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