tag-dev-pro-20250613
This commit is contained in:
parent
cec1b42f99
commit
711c632cfc
@ -33,12 +33,12 @@ const landsRoutes = [
|
||||
component: () => import('@/views/landManage/component/landPartol/index.vue'),
|
||||
meta: { title: '土地使用巡查', icon: '' },
|
||||
},
|
||||
{
|
||||
path: '/sub-government-affairs-service/illegalHandle',
|
||||
name: 'illegalHandle',
|
||||
component: () => import('@/views/landManage/component/illegalHandle/index.vue'),
|
||||
meta: { title: '土地案件', icon: '' },
|
||||
},
|
||||
// {
|
||||
// path: '/sub-government-affairs-service/illegalHandle',
|
||||
// name: 'illegalHandle',
|
||||
// component: () => import('@/views/landManage/component/illegalHandle/index.vue'),
|
||||
// meta: { title: '土地案件', icon: '' },
|
||||
// },
|
||||
],
|
||||
},
|
||||
];
|
||||
|
@ -16,7 +16,7 @@ export default [
|
||||
path: '/sub-government-affairs-service/landCassification',
|
||||
name: 'landCassification',
|
||||
component: () => import('@/views/dict/component/landCassification/index.vue'),
|
||||
meta: { title: '土地分类', icon: '' },
|
||||
meta: { title: '土地分类', icon: 'Discount' },
|
||||
},
|
||||
{
|
||||
redirect: '/sub-government-affairs-service/add-grid',
|
||||
|
@ -55,20 +55,20 @@ export default [
|
||||
path: '/sub-government-affairs-service/trace-search',
|
||||
name: 'trace-search',
|
||||
component: () => import('@/views/trace/search/index.vue'),
|
||||
meta: { title: '溯源查询', icon: '' },
|
||||
meta: { title: '溯源查询', icon: 'Files' },
|
||||
},
|
||||
{
|
||||
path: '/sub-government-affairs-service/trace-info',
|
||||
name: 'trace-info',
|
||||
component: () => import('@/views/trace/search/info.vue'),
|
||||
meta: { title: '溯源详情', icon: '' },
|
||||
meta: { title: '溯源详情', icon: 'DocumentCopy' },
|
||||
hidden: true,
|
||||
},
|
||||
{
|
||||
path: '/sub-government-affairs-service/trace-statistic',
|
||||
name: 'trace-statistic',
|
||||
component: () => import('@/views/trace/statistic/index.vue'),
|
||||
meta: { title: '溯源统计', icon: '' },
|
||||
meta: { title: '溯源统计', icon: 'Filter' },
|
||||
},
|
||||
],
|
||||
},
|
||||
|
@ -117,7 +117,7 @@
|
||||
<!-- 土地产权信息 tab -->
|
||||
<template v-else>
|
||||
<el-button @click="activeTab = 'basic'">上一步</el-button>
|
||||
<el-button v-if="formDataProperty.landId" type="primary" @click="submitPropertyInfo">提交</el-button>
|
||||
<el-button v-if="formDataProperty.id" type="primary" @click="submitPropertyInfo">提交</el-button>
|
||||
<el-button v-else type="primary" @click="submitAll">保存</el-button>
|
||||
</template>
|
||||
</span>
|
||||
|
@ -14,7 +14,7 @@
|
||||
<el-button type="primary" icon="Plus" @click="handleAdd">新增</el-button>
|
||||
</template>
|
||||
<template #menu="scope">
|
||||
<custom-table-operate :actions="crudOptions.actions" :data="scope" />
|
||||
<custom-table-operate :actions="getActions(scope.row)" :data="scope" />
|
||||
</template>
|
||||
</avue-crud>
|
||||
<el-dialog :key="dialogTitle" v-model="visible" :title="dialogTitle" width="60%" align-center :draggable="true">
|
||||
@ -170,86 +170,78 @@ const crudOptions = reactive({
|
||||
column: [
|
||||
{ label: '农企/合作社名称', prop: 'businessName' },
|
||||
{ label: '地点', prop: 'regAddress' },
|
||||
{ label: '面积', prop: 'area' },
|
||||
{ label: '面积', prop: 'area', formatter: (row, column, cellValue) => `${Number(cellValue).toFixed(2)} 亩` },
|
||||
{ label: '经营产品', prop: 'businessScope' },
|
||||
{ label: '联系人', prop: 'contactPerson' },
|
||||
{ label: '联系电话', prop: 'phone' },
|
||||
{ label: '聘工人数', prop: 'villageCount' },
|
||||
{ label: '状态', prop: 'status' },
|
||||
{ label: '信息录入时间', prop: 'createTime' },
|
||||
{ label: '信息更新时间', prop: 'updateTime' },
|
||||
],
|
||||
actions: [
|
||||
{
|
||||
name: '查看',
|
||||
icon: 'view',
|
||||
event: ({ row }) => handleView(row),
|
||||
},
|
||||
{
|
||||
name: '编辑',
|
||||
icon: 'edit',
|
||||
event: ({ row }) => handleEdit(row),
|
||||
},
|
||||
{
|
||||
type: 'danger',
|
||||
name: '删除',
|
||||
icon: 'delete',
|
||||
event: ({ row }) => handleDelete(row.id),
|
||||
},
|
||||
// 驳回原因 showRejectReason (仅显示)
|
||||
{
|
||||
name: '驳回原因',
|
||||
icon: 'warning',
|
||||
event: ({ row }) => {
|
||||
showRejectReason(row);
|
||||
},
|
||||
},
|
||||
|
||||
// 提交审核 handleSubmit
|
||||
{
|
||||
name: '提交审核',
|
||||
icon: 'check',
|
||||
event: ({ row }) => {
|
||||
if (row.status === '待提交') {
|
||||
handleSubmit();
|
||||
} else {
|
||||
ElMessage.warning('当前状态不允许提交审核');
|
||||
}
|
||||
},
|
||||
},
|
||||
// 撤销(待审核 → 待提交),超级管理员和提交人拥有撤销 handleWithdraw
|
||||
{
|
||||
name: '撤销',
|
||||
icon: 'undo',
|
||||
event: ({ row }) => {
|
||||
handleWithdraw(row);
|
||||
},
|
||||
},
|
||||
// 重新提交 handleResubmit
|
||||
{
|
||||
name: '重新提交',
|
||||
icon: 'resubmit',
|
||||
event: (row) => {
|
||||
handleResubmit(row);
|
||||
},
|
||||
},
|
||||
// 通过(待审核 → 已通过) handleApprove
|
||||
{
|
||||
name: '通过',
|
||||
icon: 'check-circle',
|
||||
event: ({ row }) => {
|
||||
handleApprove(row);
|
||||
},
|
||||
},
|
||||
// 驳回(待审核 → 已驳回) handleReject
|
||||
{
|
||||
name: '驳回',
|
||||
icon: 'close-circle',
|
||||
event: ({ row }) => {
|
||||
handleReject(row);
|
||||
},
|
||||
},
|
||||
],
|
||||
// actions: [
|
||||
// {
|
||||
// name: '查看',
|
||||
// icon: 'view',
|
||||
// event: ({ row }) => handleView(row),
|
||||
// },
|
||||
// {
|
||||
// name: '编辑',
|
||||
// icon: 'edit',
|
||||
// event: ({ row }) => handleEdit(row),
|
||||
// },
|
||||
// {
|
||||
// type: 'danger',
|
||||
// name: '删除',
|
||||
// icon: 'delete',
|
||||
// event: ({ row }) => handleDelete(row.id),
|
||||
// },
|
||||
// {
|
||||
// name: '驳回原因',
|
||||
// icon: 'warning',
|
||||
// event: ({ row }) => {
|
||||
// showRejectReason(row);
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// name: '提交审核',
|
||||
// icon: 'check',
|
||||
// event: ({ row }) => {
|
||||
// if (row.status === '待提交') {
|
||||
// handleSubmit();
|
||||
// } else {
|
||||
// ElMessage.warning('当前状态不允许提交审核');
|
||||
// }
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// name: '撤销',
|
||||
// icon: 'undo',
|
||||
// event: ({ row }) => {
|
||||
// handleWithdraw(row);
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// name: '重新提交',
|
||||
// icon: 'resubmit',
|
||||
// event: (row) => {
|
||||
// handleResubmit(row);
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// name: '通过',
|
||||
// icon: 'check-circle',
|
||||
// event: ({ row }) => {
|
||||
// handleApprove(row);
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// name: '驳回',
|
||||
// icon: 'close-circle',
|
||||
// event: ({ row }) => {
|
||||
// handleReject(row);
|
||||
// },
|
||||
// },
|
||||
// ],
|
||||
});
|
||||
// watch(
|
||||
// () => formData.value.addressArr,
|
||||
@ -308,26 +300,6 @@ const getEnterDetail = async (id) => {
|
||||
],
|
||||
};
|
||||
|
||||
// // 初始化图片预览(如果之前实现了图片预览功能)
|
||||
// if (response.data.cooperativePhoto) {
|
||||
// cooperativePhotoList.value = [
|
||||
// {
|
||||
// name: '合作社照片',
|
||||
// url: response.data.cooperativePhoto,
|
||||
// status: 'success',
|
||||
// },
|
||||
// ];
|
||||
// }
|
||||
// if (response.data.businessLicence) {
|
||||
// businessLicenceList.value = [
|
||||
// {
|
||||
// name: '营业执照',
|
||||
// url: response.data.businessLicence,
|
||||
// status: 'success',
|
||||
// },
|
||||
// ];
|
||||
// }
|
||||
|
||||
console.log('详情数据加载完成', formData.value);
|
||||
} else {
|
||||
ElMessage.error(response?.msg || '获取详情失败:服务器未返回有效数据');
|
||||
@ -534,6 +506,85 @@ function handleSkipSave() {
|
||||
handleSkip();
|
||||
handleSubmit();
|
||||
}
|
||||
import { useUserStore } from '@/store/modules/user';
|
||||
const UserStore = useUserStore();
|
||||
const user = UserStore.getUserInfo();
|
||||
console.log('admin 属性:', user.admin);
|
||||
const isAdmin = user.admin;
|
||||
const getActions = (row) => {
|
||||
const actions = [
|
||||
// {
|
||||
// name: '查看',
|
||||
// icon: 'view',
|
||||
// event: () => handleView(row),
|
||||
// },
|
||||
// {
|
||||
// name: '编辑',
|
||||
// icon: 'edit',
|
||||
// event: () => handleEdit(row),
|
||||
// },
|
||||
{
|
||||
type: 'danger',
|
||||
name: '删除',
|
||||
icon: 'delete',
|
||||
event: () => handleDelete(row.id),
|
||||
},
|
||||
];
|
||||
|
||||
switch (row.status) {
|
||||
case '0': // 待提交
|
||||
actions.push(
|
||||
{
|
||||
name: '提交审核',
|
||||
icon: 'check',
|
||||
event: () => handleSubmit(row),
|
||||
},
|
||||
{
|
||||
name: '重新提交',
|
||||
icon: 'resubmit',
|
||||
event: () => handleResubmit(row),
|
||||
}
|
||||
);
|
||||
break;
|
||||
|
||||
case '1': // 待审核
|
||||
if (isAdmin) {
|
||||
actions.push(
|
||||
{
|
||||
name: '通过',
|
||||
icon: 'check-circle',
|
||||
event: () => handleApprove(row),
|
||||
},
|
||||
{
|
||||
name: '驳回',
|
||||
icon: 'close-circle',
|
||||
event: () => handleReject(row),
|
||||
}
|
||||
);
|
||||
} else {
|
||||
actions.push({
|
||||
name: '撤销',
|
||||
icon: 'undo',
|
||||
event: () => handleWithdraw(row),
|
||||
});
|
||||
}
|
||||
break;
|
||||
|
||||
case '2': // 已通过
|
||||
// 仅基础操作
|
||||
break;
|
||||
|
||||
case '3': // 已驳回
|
||||
actions.push({
|
||||
name: '驳回原因',
|
||||
icon: 'warning',
|
||||
event: () => showRejectReason(row),
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
||||
return actions;
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
@ -354,21 +354,17 @@ const getFarmerById = async (id) => {
|
||||
};
|
||||
// 查看
|
||||
async function handleView(row) {
|
||||
console.log('查看', row);
|
||||
dialogTitle.value = '查看';
|
||||
isReadonly.value = true; // 设置为只读模式
|
||||
|
||||
const data = await getFarmerById(row.id);
|
||||
if (data) {
|
||||
console.log('data :>> ', data);
|
||||
const addressArr = [data.provinceCode, data.cityCode, data.countyCode, data.townCode, data.villageCode].filter(Boolean);
|
||||
console.log('addressArr :>> ', addressArr);
|
||||
formData.value = {
|
||||
...data,
|
||||
addressArr: addressArr,
|
||||
};
|
||||
}
|
||||
console.log('cc formData.value :>> ', formData.value.addressArr);
|
||||
nextTick(() => {
|
||||
dialogVisible.value = true;
|
||||
});
|
||||
@ -387,15 +383,18 @@ async function handleEdit(row) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
const data = await getFarmerById(row.id);
|
||||
if (data) {
|
||||
const addressArr = [data.provinceCode, data.cityCode, data.countyCode, data.townCode, data.villageCode].filter(Boolean);
|
||||
formData.value = {
|
||||
...data,
|
||||
addressArr: addressArr,
|
||||
};
|
||||
}
|
||||
dialogTitle.value = '编辑';
|
||||
isReadonly.value = false;
|
||||
dialogVisible.value = true;
|
||||
getFarmerById(row.id).then((data) => {
|
||||
if (data) {
|
||||
formData.value = {
|
||||
...data,
|
||||
};
|
||||
}
|
||||
nextTick(() => {
|
||||
dialogVisible.value = true;
|
||||
});
|
||||
}
|
||||
|
||||
@ -409,7 +408,6 @@ function handleSubmit(row) {
|
||||
};
|
||||
approveFarmer(params)
|
||||
.then(() => {
|
||||
console.log(`ID=${row.id} 提交审核`);
|
||||
row.rejectReason = ''; // 清空驳回原因
|
||||
getData(); // 重新获取数据
|
||||
})
|
||||
|
@ -232,9 +232,7 @@ const state = reactive({
|
||||
message: '请输入',
|
||||
trigger: 'blur',
|
||||
},
|
||||
formatter: (row) => {
|
||||
return row.area + '亩';
|
||||
},
|
||||
formatter: (row, column, cellValue) => `${Number(cellValue).toFixed(2)} 亩`,
|
||||
},
|
||||
{
|
||||
label: '海拔(米)',
|
||||
|
Loading…
x
Reference in New Issue
Block a user