Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
09c87cb373
@ -17,5 +17,5 @@ VITE_APP_UPLOAD_API = '/uploadApis'
|
|||||||
# VITE_APP_UPLOAD_URL = 'http://47.109.205.240:9300'
|
# VITE_APP_UPLOAD_URL = 'http://47.109.205.240:9300'
|
||||||
# 内网接口地址
|
# 内网接口地址
|
||||||
VITE_APP_BASE_URL = 'http://192.168.18.99:8080'
|
VITE_APP_BASE_URL = 'http://192.168.18.99:8080'
|
||||||
VITE_APP_UPLOAD_URL = 'http://192.168.18.74:8080'
|
VITE_APP_UPLOAD_URL = 'http://192.168.18.99:8080'
|
||||||
# VITE_APP_VIST_URL = 'http://192.168.18.99'
|
# VITE_APP_VIST_URL = 'http://192.168.18.99'
|
||||||
|
|||||||
@ -12,6 +12,7 @@ declare module 'vue' {
|
|||||||
'CenterMap copy': typeof import('./src/components/centerMap copy.vue')['default']
|
'CenterMap copy': typeof import('./src/components/centerMap copy.vue')['default']
|
||||||
CodeDialog: typeof import('./src/components/code-dialog/index.vue')['default']
|
CodeDialog: typeof import('./src/components/code-dialog/index.vue')['default']
|
||||||
Components: typeof import('./src/components/index.js')['default']
|
Components: typeof import('./src/components/index.js')['default']
|
||||||
|
copy: typeof import('./src/components/centerMap copy.vue')['default']
|
||||||
CurrentTime: typeof import('./src/components/currentTime.vue')['default']
|
CurrentTime: typeof import('./src/components/currentTime.vue')['default']
|
||||||
CustomBack: typeof import('./src/components/customBack.vue')['default']
|
CustomBack: typeof import('./src/components/customBack.vue')['default']
|
||||||
CustomCarouselPicture: typeof import('./src/components/custom-carousel-picture/index.vue')['default']
|
CustomCarouselPicture: typeof import('./src/components/custom-carousel-picture/index.vue')['default']
|
||||||
|
|||||||
@ -10,8 +10,13 @@ VITE_APP_UPLOAD_API = '/uploadApis'
|
|||||||
|
|
||||||
# 阿里云接口地址
|
# 阿里云接口地址
|
||||||
# VITE_APP_BASE_URL = 'http://47.109.205.240:8080'
|
# VITE_APP_BASE_URL = 'http://47.109.205.240:8080'
|
||||||
# VITE_APP_UPLOAD_URL = 'http://47.109.205.240:9300'
|
# VITE_APP_UPLOAD_URL = 'http://47.109.205.240:9204'
|
||||||
|
|
||||||
# 内网接口地址
|
# 内网测试库接口地址
|
||||||
VITE_APP_BASE_URL = 'http://192.168.18.99:8080'
|
VITE_APP_BASE_URL = 'http://192.168.18.99:8080'
|
||||||
VITE_APP_UPLOAD_URL = 'http://192.168.18.74:8080'
|
# VITE_APP_UPLOAD_URL = 'http://192.168.18.98:9204'
|
||||||
|
VITE_APP_UPLOAD_URL = 'http://192.168.18.99:8080'
|
||||||
|
|
||||||
|
# 本地开发接口地址
|
||||||
|
# VITE_APP_BASE_URL = 'http://192.168.18.74:8080'
|
||||||
|
# VITE_APP_UPLOAD_URL = 'http://192.168.18.74:8080'
|
||||||
@ -248,8 +248,14 @@ export function exportlandInspection(params = {}) {
|
|||||||
// #region
|
// #region
|
||||||
|
|
||||||
/* 查询土地违法处理 */
|
/* 查询土地违法处理 */
|
||||||
export function getLandIllegal(params = {}) {
|
// export function getLandIllegal(params = {}) {
|
||||||
return request('land-resource/landViolation/page', {
|
// return request('land-resource/landViolation/page', {
|
||||||
|
// method: 'GET',
|
||||||
|
// params,
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
export function getIllegalList(params = {}) {
|
||||||
|
return request('/land-resource/inspection/illegal/list', {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
params,
|
params,
|
||||||
});
|
});
|
||||||
|
|||||||
@ -18,6 +18,13 @@ export function getLandList(params) {
|
|||||||
params,
|
params,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
// 新增全部土地信息(POST)
|
||||||
|
export function createLand(data = {}) {
|
||||||
|
return request('/land-resource/landManage/v1/save', {
|
||||||
|
method: 'POST',
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存土地基础信息
|
* 保存土地基础信息
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 1.9 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 281 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.4 MiB |
@ -120,6 +120,8 @@ const containerStyle = computed(() => ({
|
|||||||
text-align: right;
|
text-align: right;
|
||||||
line-height: 32px;
|
line-height: 32px;
|
||||||
width: 120px;
|
width: 120px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding-right: 12px;
|
||||||
}
|
}
|
||||||
.controls {
|
.controls {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@ -104,21 +104,6 @@ const fetchAreaData = async () => {
|
|||||||
// }
|
// }
|
||||||
// );
|
// );
|
||||||
|
|
||||||
// 内部更新 => 外部同步
|
|
||||||
watch(
|
|
||||||
selectedAreaPath,
|
|
||||||
(val) => {
|
|
||||||
if (props.emitPath) {
|
|
||||||
// 期望数组模式,确保输出数组
|
|
||||||
emit('update:modelValue', Array.isArray(val) ? val : []);
|
|
||||||
} else {
|
|
||||||
// 期望字符串模式,确保输出字符串
|
|
||||||
emit('update:modelValue', typeof val === 'string' ? val : '');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{ deep: true }
|
|
||||||
);
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
fetchAreaData();
|
fetchAreaData();
|
||||||
});
|
});
|
||||||
|
|||||||
@ -9,123 +9,36 @@ const inputSuppliesRoutes = [
|
|||||||
redirect: '/sub-government-affairs-service/material/pesticide',
|
redirect: '/sub-government-affairs-service/material/pesticide',
|
||||||
meta: { title: '投入品管理', icon: 'FullScreen' },
|
meta: { title: '投入品管理', icon: 'FullScreen' },
|
||||||
children: [
|
children: [
|
||||||
|
{
|
||||||
|
path: '/sub-government-affairs-service/material/annualPlans',
|
||||||
|
name: 'annualPlans',
|
||||||
|
component: () => import('@/views/inputSuppliesManage/material/annualPlan/index.vue'),
|
||||||
|
meta: { title: '农产品种植管理', icon: 'Timer' },
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/sub-government-affairs-service/material/pesticide',
|
path: '/sub-government-affairs-service/material/pesticide',
|
||||||
name: 'input-supplies-pesticide',
|
name: 'input-supplies-pesticide',
|
||||||
component: () => import('@/views/inputSuppliesManage/material/pesticide/index.vue'),
|
component: () => import('@/views/inputSuppliesManage/material/pesticide/index.vue'),
|
||||||
meta: { title: '农药管理', icon: '' },
|
meta: { title: '农药使用管理', icon: 'Orange' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/sub-government-affairs-service/material/fertilizer',
|
path: '/sub-government-affairs-service/material/fertilizer',
|
||||||
name: 'input-supplies-fertilizer',
|
name: 'input-supplies-fertilizer',
|
||||||
component: () => import('@/views/inputSuppliesManage/material/fertilizer/index.vue'),
|
component: () => import('@/views/inputSuppliesManage/material/fertilizer/index.vue'),
|
||||||
meta: { title: '肥料管理', icon: '' },
|
meta: { title: '肥料使用管理', icon: 'Grid' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/sub-government-affairs-service/material/seed',
|
path: '/sub-government-affairs-service/material/seed',
|
||||||
name: 'input-supplies-seed',
|
name: 'input-supplies-seed',
|
||||||
component: () => import('@/views/inputSuppliesManage/material/seed/index.vue'),
|
component: () => import('@/views/inputSuppliesManage/material/seed/index.vue'),
|
||||||
meta: { title: '种子使用监督管理', icon: '' },
|
meta: { title: '种子使用管理', icon: 'Watermelon' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/sub-government-affairs-service/material/others',
|
path: '/sub-government-affairs-service/material/others',
|
||||||
name: 'input-supplies-others',
|
name: 'input-supplies-others',
|
||||||
component: () => import('@/views/inputSuppliesManage/material/others/index.vue'),
|
component: () => import('@/views/inputSuppliesManage/material/others/index.vue'),
|
||||||
meta: { title: '其他投入品', icon: '' },
|
meta: { title: '其他投入品', icon: 'TakeawayBox' },
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: '/sub-government-affairs-service/material/annualPlans',
|
|
||||||
name: 'annualPlans',
|
|
||||||
component: () => import('@/views/inputSuppliesManage/material/annualPlan/index.vue'),
|
|
||||||
meta: { title: '种植进度网格化管理', icon: '' },
|
|
||||||
},
|
|
||||||
// {
|
|
||||||
// path: '/sub-government-affairs-service/materialManage',
|
|
||||||
// name: 'materialManage',
|
|
||||||
// component: Views,
|
|
||||||
// redirect: '/sub-government-affairs-service/material/pesticide',
|
|
||||||
// meta: { title: '投入品管理', icon: 'OfficeBuilding' },
|
|
||||||
// children: [
|
|
||||||
// {
|
|
||||||
// path: '/sub-government-affairs-service/material/pesticide',
|
|
||||||
// name: 'input-supplies-pesticide',
|
|
||||||
// component: () => import('@/views/inputSuppliesManage/material/pesticide/index.vue'),
|
|
||||||
// meta: { title: '农药管理', icon: '' },
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// path: '/sub-government-affairs-service/material/fertilizer',
|
|
||||||
// name: 'input-supplies-fertilizer',
|
|
||||||
// component: () => import('@/views/inputSuppliesManage/material/fertilizer/index.vue'),
|
|
||||||
// meta: { title: '肥料管理', icon: '' },
|
|
||||||
// },
|
|
||||||
// // {
|
|
||||||
// // path: '/sub-government-affairs-service/material/pesticide',
|
|
||||||
// // name: 'input-supplies-pesticide',
|
|
||||||
// // component: () => import('@/views/inputSuppliesManage/material/pesticide/index.vue'),
|
|
||||||
// // meta: { title: '农药管理', icon: '' },
|
|
||||||
// // },
|
|
||||||
// // {
|
|
||||||
// // path: '/sub-government-affairs-service/material/ratPoison',
|
|
||||||
// // name: 'input-supplies-ratPoison',
|
|
||||||
// // component: () => import('@/views/inputSuppliesManage/material/ratPoison/index.vue'),
|
|
||||||
// // meta: { title: '兽药管理', icon: '' },
|
|
||||||
// // },
|
|
||||||
// {
|
|
||||||
// path: '/sub-government-affairs-service/material/seed',
|
|
||||||
// name: 'input-supplies-seed',
|
|
||||||
// component: () => import('@/views/inputSuppliesManage/material/seed/index.vue'),
|
|
||||||
// meta: { title: '种子管理', icon: '' },
|
|
||||||
// },
|
|
||||||
// // {
|
|
||||||
// // path: '/sub-government-affairs-service/material/farmMachinery',
|
|
||||||
// // name: 'input-supplies-farmMachinery',
|
|
||||||
// // component: () => import('@/views/inputSuppliesManage/material/farmMachinery/index.vue'),
|
|
||||||
// // meta: { title: '农机管理', icon: '' },
|
|
||||||
// // },
|
|
||||||
// ],
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// path: '/sub-government-affairs-service/productionDealer',
|
|
||||||
// name: 'productionDealer',
|
|
||||||
// component: () => import('@/views/inputSuppliesManage/productionDealer/index.vue'),
|
|
||||||
// meta: { title: '企业经销商管理', icon: '' },
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// path: '/sub-government-affairs-service/enterpriseDealerCheck',
|
|
||||||
// name: 'enterpriseDealerCheck',
|
|
||||||
// component: () => import('@/views/inputSuppliesManage/enterpriseDealerCheck/index.vue'),
|
|
||||||
// meta: { title: '企业经销商抽检', icon: '' },
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// path: '/sub-government-affairs-service/useSupervise',
|
|
||||||
// name: 'useSupervise',
|
|
||||||
// component: () => import('@/views/inputSuppliesManage/useSupervise/index.vue'),
|
|
||||||
// meta: { title: '使用监管', icon: '' },
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// path: '/sub-government-affairs-service/leaseSupervise',
|
|
||||||
// name: 'leaseSupervise',
|
|
||||||
// component: () => import('@/views/inputSuppliesManage/leaseSupervise/index.vue'),
|
|
||||||
// meta: { title: '农机租赁监管', icon: '' },
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// path: '/sub-government-affairs-service/redBlackRank',
|
|
||||||
// name: 'redBlackRank',
|
|
||||||
// component: () => import('@/views/inputSuppliesManage/redBlackRank/index.vue'),
|
|
||||||
// meta: { title: '企业红黑榜', icon: '' },
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// path: '/sub-government-affairs-service/knowledgeManage',
|
|
||||||
// name: 'knowledgeManage',
|
|
||||||
// component: () => import('@/views/inputSuppliesManage/knowledgeManage/index.vue'),
|
|
||||||
// meta: { title: '知识库', icon: '' },
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// path: '/sub-government-affairs-service/patrolCaseManage',
|
|
||||||
// name: 'patrolCaseManage',
|
|
||||||
// component: () => import('@/views/inputSuppliesManage/patrolCaseManage/index.vue'),
|
|
||||||
// meta: { title: '巡查与案件管理', icon: 'Document' },
|
|
||||||
// },
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
@ -9,12 +9,12 @@ const landsRoutes = [
|
|||||||
redirect: '/sub-government-affairs-service/plantPlan',
|
redirect: '/sub-government-affairs-service/plantPlan',
|
||||||
meta: { title: '土地管理', icon: 'Grape' },
|
meta: { title: '土地管理', icon: 'Grape' },
|
||||||
children: [
|
children: [
|
||||||
{
|
// {
|
||||||
path: '/sub-government-affairs-service/landsManage',
|
// path: '/sub-government-affairs-service/landsManage',
|
||||||
name: 'landsManage',
|
// name: 'landsManage',
|
||||||
component: () => import('@/views/landManage/component/landsManage/index.vue'),
|
// component: () => import('@/views/landManage/component/landsManage/index.vue'),
|
||||||
meta: { title: '土地资源信息登记', icon: '' },
|
// meta: { title: '土地资源信息登记', icon: '' },
|
||||||
},
|
// },
|
||||||
// {
|
// {
|
||||||
// path: '/sub-government-affairs-service/plantPlan',
|
// path: '/sub-government-affairs-service/plantPlan',
|
||||||
// name: 'plantPlan',
|
// name: 'plantPlan',
|
||||||
|
|||||||
@ -18,7 +18,7 @@ export default [
|
|||||||
path: '/sub-government-affairs-service/individual',
|
path: '/sub-government-affairs-service/individual',
|
||||||
component: () => import('@/views/productOperateMain/individual/index.vue'),
|
component: () => import('@/views/productOperateMain/individual/index.vue'),
|
||||||
name: 'individual',
|
name: 'individual',
|
||||||
meta: { title: '农户管理', icon: '' },
|
meta: { title: '农户管理', icon: 'Place' },
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// path: '/sub-government-affairs-service/collective',
|
// path: '/sub-government-affairs-service/collective',
|
||||||
@ -30,7 +30,7 @@ export default [
|
|||||||
path: '/sub-government-affairs-service/coop',
|
path: '/sub-government-affairs-service/coop',
|
||||||
component: () => import('@/views/productOperateMain/coOp/index.vue'),
|
component: () => import('@/views/productOperateMain/coOp/index.vue'),
|
||||||
name: 'coop',
|
name: 'coop',
|
||||||
meta: { title: '企业管理', icon: '' },
|
meta: { title: '企业管理', icon: 'Finished' },
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// path: '/sub-government-affairs-service/enterprise',
|
// path: '/sub-government-affairs-service/enterprise',
|
||||||
|
|||||||
@ -1,22 +1,57 @@
|
|||||||
import Layout from '@/layouts/index.vue';
|
import Layout from '@/layouts/index.vue';
|
||||||
// import annualplanRouters from './annualplan';
|
|
||||||
import statisticsRoutes from './statisticAnalysis';
|
|
||||||
import landsRoutes from './lands';
|
import landsRoutes from './lands';
|
||||||
// import dictRoutes from './dict';
|
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
{
|
{
|
||||||
path: '/sub-government-affairs-service/resource',
|
path: '/sub-government-affairs-service/resource',
|
||||||
name: 'resourceManagement',
|
name: 'resourceManagement',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
redirect: '/sub-government-affairs-service/landCassification',
|
redirect: '/sub-government-affairs-service/resource/database/statistics',
|
||||||
meta: { title: '土地资源管理', icon: 'icon-test' },
|
meta: { title: '土地资源管理', icon: 'icon-test' },
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: '/sub-government-affairs-service/landCassification',
|
path: '/sub-government-affairs-service/resource/database',
|
||||||
name: 'landCassification',
|
name: 'landResourceDatabase',
|
||||||
component: () => import('@/views/dict/component/landCassification/index.vue'),
|
redirect: '/sub-government-affairs-service/resource/database/statistics',
|
||||||
meta: { title: '土地分类', icon: '' },
|
meta: { title: '土地资源库', icon: 'Connection' },
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: '/sub-government-affairs-service/resource/database/statistics',
|
||||||
|
name: 'landStatistics',
|
||||||
|
component: () => import('@/views/resource/database/Statistics.vue'),
|
||||||
|
meta: { title: '统计数据', icon: '' },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/sub-government-affairs-service/resource/database/map',
|
||||||
|
name: 'landMap',
|
||||||
|
component: () => import('@/views/resource/database/LandMap.vue'),
|
||||||
|
meta: { title: '地块地图', icon: '' },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/sub-government-affairs-service/resource/database/cultivated-land',
|
||||||
|
name: 'cultivatedLand',
|
||||||
|
component: () => import('@/views/resource/database/CultivatedLand.vue'),
|
||||||
|
meta: { title: '耕地', icon: '' },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/sub-government-affairs-service/resource/database/orchard',
|
||||||
|
name: 'orchardLand',
|
||||||
|
component: () => import('@/views/resource/database/Orchard.vue'),
|
||||||
|
meta: { title: '园地', icon: '' },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/sub-government-affairs-service/resource/database/forest',
|
||||||
|
name: 'forestLand',
|
||||||
|
component: () => import('@/views/resource/database/Forest.vue'),
|
||||||
|
meta: { title: '林地', icon: '' },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/sub-government-affairs-service/resource/database/grassland',
|
||||||
|
name: 'grassLand',
|
||||||
|
component: () => import('@/views/resource/database/Grassland.vue'),
|
||||||
|
meta: { title: '草地', icon: '' },
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
redirect: '/sub-government-affairs-service/add-grid',
|
redirect: '/sub-government-affairs-service/add-grid',
|
||||||
@ -45,10 +80,7 @@ export default [
|
|||||||
// },
|
// },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
// ...annualplanRouters,
|
|
||||||
...landsRoutes,
|
...landsRoutes,
|
||||||
// ...statisticsRoutes,
|
|
||||||
// ...dictRoutes,
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
@ -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' },
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|||||||
@ -18,21 +18,11 @@
|
|||||||
@cell-click="handleCellClick"
|
@cell-click="handleCellClick"
|
||||||
>
|
>
|
||||||
<template #menu="{ row }">
|
<template #menu="{ row }">
|
||||||
<el-button v-if="row.status == '0'" type="primary" @click="handleInfo(row)">登记处理</el-button>
|
<el-button link type="primary" @click="handleInfo(row)">查看</el-button>
|
||||||
</template>
|
<el-button link type="primary" @click="handleInfo(row)">案件处理</el-button>
|
||||||
<template #status="{ row }"> {{ row.status == '0' ? '未' : '已' }}处理 </template>
|
|
||||||
<template #sceneProof-form="{ row, type }">
|
|
||||||
<section class="proof_content_">
|
|
||||||
<span v-if="type == 'add'">(照片、视频)</span>
|
|
||||||
<Attrs v-model:attrs="examineForm.proof" :type="type" :limit="5" :file-num="5" accept="image/*,video/*" />
|
|
||||||
</section>
|
|
||||||
</template>
|
|
||||||
<template #attrs_-form="{ row, type }">
|
|
||||||
<FileUpload v-model:attrs="examineForm.attrs" :format="['rar', 'zip', 'doc', 'docx', 'pdf']" :type="type" />
|
|
||||||
</template>
|
</template>
|
||||||
</avue-crud>
|
</avue-crud>
|
||||||
</section>
|
</section>
|
||||||
<Register v-model:visible="caseInfo.visible" />
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
@ -41,7 +31,7 @@ import { CRUD_OPTIONS } from '@/config';
|
|||||||
import { useUserStore } from '@/store/modules/user';
|
import { useUserStore } from '@/store/modules/user';
|
||||||
import Register from './common/Register.vue';
|
import Register from './common/Register.vue';
|
||||||
import FileUpload from './common/FileUpload.vue';
|
import FileUpload from './common/FileUpload.vue';
|
||||||
import { getLandIllegal, createLandIllegal, registerLandIllegal, illegalInfo } from '@/apis/land';
|
import { getIllegalList, createLandIllegal, registerLandIllegal, illegalInfo } from '@/apis/land';
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus';
|
import { ElMessage, ElMessageBox } from 'element-plus';
|
||||||
import Attrs from '../../common/Attrs.vue';
|
import Attrs from '../../common/Attrs.vue';
|
||||||
import { add } from 'lodash';
|
import { add } from 'lodash';
|
||||||
@ -109,148 +99,78 @@ const documentData = ref([
|
|||||||
const option = ref({
|
const option = ref({
|
||||||
...CRUD_OPTIONS,
|
...CRUD_OPTIONS,
|
||||||
refreshBtn: false,
|
refreshBtn: false,
|
||||||
|
index: false,
|
||||||
rowKey: 'caseId',
|
rowKey: 'caseId',
|
||||||
editTitle: '案件登记处理',
|
editTitle: '案件登记处理',
|
||||||
selection: false,
|
selection: false,
|
||||||
|
addBtn: false,
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
label: '案件编号',
|
label: '违法行为',
|
||||||
prop: 'caseId',
|
prop: 'illegalTypeName',
|
||||||
search: true,
|
search: true,
|
||||||
editDisplay: false,
|
editDisplay: false,
|
||||||
viewDisplay: false,
|
viewDisplay: false,
|
||||||
rules: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: '请选择',
|
|
||||||
trigger: 'blur',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '案件名称',
|
|
||||||
prop: 'caseName',
|
|
||||||
editDisplay: false,
|
|
||||||
viewDisplay: false,
|
|
||||||
rules: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: '请选择',
|
|
||||||
trigger: 'blur',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '关联单位',
|
|
||||||
prop: 'relatedUnit',
|
|
||||||
editDisplay: false,
|
|
||||||
viewDisplay: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '关联土地·',
|
|
||||||
prop: 'landId',
|
|
||||||
type: 'select',
|
|
||||||
addDisplay: true,
|
|
||||||
hide: true,
|
|
||||||
dicUrl: `${VITE_APP_BASE_API}/land-resource/landManage/page`,
|
|
||||||
dicQuery: {
|
|
||||||
current: 1,
|
|
||||||
size: 9999,
|
|
||||||
},
|
|
||||||
props: {
|
|
||||||
value: 'id',
|
|
||||||
label: 'landName',
|
|
||||||
},
|
|
||||||
dicMethod: 'get',
|
|
||||||
dicHeaders: {
|
|
||||||
authorization: UserStore.token,
|
|
||||||
},
|
|
||||||
dicFormatter: (res) => {
|
|
||||||
landsArr.value = res?.data?.records ?? [];
|
|
||||||
return res?.data?.records ?? [];
|
|
||||||
},
|
|
||||||
editDisplay: false,
|
|
||||||
viewDisplay: false,
|
|
||||||
rules: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: '请选择',
|
|
||||||
trigger: 'blur',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '联系电话',
|
|
||||||
prop: 'phone',
|
|
||||||
hide: true,
|
|
||||||
editDisplay: false,
|
|
||||||
viewDisplay: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '法定代表人',
|
|
||||||
prop: 'legalPerson',
|
|
||||||
addDisplay: true,
|
|
||||||
hide: true,
|
|
||||||
editDisplay: false,
|
|
||||||
viewDisplay: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '统一社会信用代码',
|
|
||||||
prop: 'usciCode',
|
|
||||||
addDisplay: true,
|
|
||||||
hide: true,
|
|
||||||
editDisplay: false,
|
|
||||||
viewDisplay: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '违法情况',
|
|
||||||
prop: 'violationSituation',
|
|
||||||
type: 'textarea',
|
|
||||||
addDisplay: true,
|
|
||||||
hide: true,
|
|
||||||
width: '100%',
|
|
||||||
span: 24,
|
|
||||||
editDisplay: false,
|
|
||||||
viewDisplay: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '负责人',
|
|
||||||
prop: 'responsiblePerson',
|
|
||||||
display: false,
|
|
||||||
addDisplay: true,
|
|
||||||
editDisplay: false,
|
|
||||||
viewDisplay: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '案件进度',
|
|
||||||
prop: 'status',
|
|
||||||
display: false,
|
|
||||||
search: true,
|
|
||||||
type: 'select',
|
type: 'select',
|
||||||
dicData: [
|
dicData: [
|
||||||
{ label: '未处理', value: 0 },
|
{ label: '未处理', value: 0 },
|
||||||
{ label: '已处理', value: 1 },
|
{ label: '已处理', value: 1 },
|
||||||
],
|
],
|
||||||
|
// rules: [
|
||||||
|
// {
|
||||||
|
// required: true,
|
||||||
|
// message: '请选择',
|
||||||
|
// trigger: 'blur',
|
||||||
|
// },
|
||||||
|
// ],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '违法行为描述',
|
||||||
|
prop: 'desc',
|
||||||
|
editDisplay: false,
|
||||||
|
viewDisplay: false,
|
||||||
|
rules: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: '请选择',
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '任务编号',
|
||||||
|
prop: 'illegalTypeCode',
|
||||||
|
search: true,
|
||||||
|
editDisplay: false,
|
||||||
|
viewDisplay: false,
|
||||||
|
rules: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: '请输入任务编号',
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '巡查任务名称',
|
||||||
|
prop: 'inspectionTaskName',
|
||||||
|
editDisplay: false,
|
||||||
|
viewDisplay: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '巡查任务对象',
|
||||||
|
prop: 'inspectionTaskTarget',
|
||||||
addDisplay: true,
|
addDisplay: true,
|
||||||
editDisplay: false,
|
editDisplay: false,
|
||||||
viewDisplay: false,
|
viewDisplay: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '案件结果',
|
label: '状态',
|
||||||
prop: 'status',
|
prop: 'status',
|
||||||
display: false,
|
|
||||||
addDisplay: true,
|
addDisplay: true,
|
||||||
editDisplay: false,
|
editDisplay: false,
|
||||||
viewDisplay: false,
|
viewDisplay: false,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: '处理时间',
|
|
||||||
prop: 'updateTime',
|
|
||||||
display: false,
|
|
||||||
addDisplay: false,
|
|
||||||
editDisplay: true,
|
|
||||||
viewDisplay: false,
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
group: [
|
group: [
|
||||||
{
|
{
|
||||||
@ -439,13 +359,14 @@ watch(
|
|||||||
// #region
|
// #region
|
||||||
|
|
||||||
async function getList() {
|
async function getList() {
|
||||||
_loading.value = true;
|
// _loading.value = true;
|
||||||
let params = {
|
let params = {
|
||||||
|
illegalFlag: 1,
|
||||||
current: page.value.currentPage,
|
current: page.value.currentPage,
|
||||||
size: page.value.pageSize,
|
size: page.value.pageSize,
|
||||||
...searchData.value,
|
// ...searchData.value,
|
||||||
};
|
};
|
||||||
let res = await getLandIllegal(params);
|
let res = await getIllegalList(params);
|
||||||
console.log('res -- ', res);
|
console.log('res -- ', res);
|
||||||
_loading.value = false;
|
_loading.value = false;
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
@ -464,10 +385,10 @@ function handleSizeChange(val) {
|
|||||||
}
|
}
|
||||||
function handleInfo(row) {
|
function handleInfo(row) {
|
||||||
console.log('row', row);
|
console.log('row', row);
|
||||||
examineForm.caseId = row.caseId;
|
// examineForm.caseId = row.caseId;
|
||||||
// caseInfo.value.visible = true;
|
// // caseInfo.value.visible = true;
|
||||||
crudRef.value.rowEdit(row);
|
// crudRef.value.rowEdit(row);
|
||||||
// crudRef.value.rowView(row);
|
// // crudRef.value.rowView(row);
|
||||||
}
|
}
|
||||||
async function handleSearch(form, done) {
|
async function handleSearch(form, done) {
|
||||||
page.value.currentPage = 1;
|
page.value.currentPage = 1;
|
||||||
@ -569,7 +490,7 @@ function handleOpenFrom(done, type) {
|
|||||||
if (type == 'view') {
|
if (type == 'view') {
|
||||||
option.value.group.find((v) => v.prop == 'caseHandle').column.find((v) => v.prop == 'attrs_').label = lab;
|
option.value.group.find((v) => v.prop == 'caseHandle').column.find((v) => v.prop == 'attrs_').label = lab;
|
||||||
}
|
}
|
||||||
done();
|
// done();
|
||||||
}
|
}
|
||||||
function handleCloseFrom(done) {
|
function handleCloseFrom(done) {
|
||||||
console.log('form close');
|
console.log('form close');
|
||||||
|
|||||||
@ -30,16 +30,16 @@
|
|||||||
</avue-crud>
|
</avue-crud>
|
||||||
|
|
||||||
<!-- 新增弹窗 -->
|
<!-- 新增弹窗 -->
|
||||||
<el-dialog v-model="addDialogVisible" title="新增" width="800px" top="8vh">
|
<el-dialog :key="dialogTitle" v-model="visible" :title="dialogTitle" width="60%" align-center :draggable="true">
|
||||||
<el-tabs v-model="activeTab">
|
<el-tabs v-model="activeTab" class="tabs-wrapper">
|
||||||
<el-tab-pane label="土地基本信息" name="basic">
|
<el-tab-pane label="土地基本信息" name="basic">
|
||||||
<el-form ref="basicFormRef" :model="formDataBasic" :rules="basicRules" label-width="120px" class="form-container">
|
<p class="form-title">编辑基本信息</p>
|
||||||
|
<el-form ref="basicFormRef" :model="formDataBasic" :disabled="isReadonly" label-width="120px">
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="12">
|
||||||
<el-form-item label="地块名称" prop="landName">
|
<el-form-item label="地块名称" prop="landName">
|
||||||
<el-input v-model="formDataBasic.landName" placeholder="请输入地块名称" />
|
<el-input v-model="formDataBasic.landName" placeholder="请输入地块名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="面积(亩)" prop="area">
|
|
||||||
<el-input-number v-model="formDataBasic.area" :min="0" :precision="2" :step="0.1" controls-position="right" style="width: 100%" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="土地类型" prop="landType">
|
<el-form-item label="土地类型" prop="landType">
|
||||||
<el-select v-model="formDataBasic.landType" placeholder="选择土地类型" clearable>
|
<el-select v-model="formDataBasic.landType" placeholder="选择土地类型" clearable>
|
||||||
<el-option v-for="item in landTypeOptions" :key="item.id" :label="item.landType" :value="item.id" />
|
<el-option v-for="item in landTypeOptions" :key="item.id" :label="item.landType" :value="item.id" />
|
||||||
@ -48,9 +48,6 @@
|
|||||||
<el-form-item label="具体位置" prop="address">
|
<el-form-item label="具体位置" prop="address">
|
||||||
<el-input v-model="formDataBasic.address" placeholder="请输入具体位置" />
|
<el-input v-model="formDataBasic.address" placeholder="请输入具体位置" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="所属网格" prop="gridId">
|
|
||||||
<AreaCascader v-model:region-code="formDataBasic.regionCode" v-model:grid-id="formDataBasic.gridId" label="" :width="500" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="土壤类型" prop="soilTypeId">
|
<el-form-item label="土壤类型" prop="soilTypeId">
|
||||||
<url-select
|
<url-select
|
||||||
v-model="formDataBasic.soilTypeId"
|
v-model="formDataBasic.soilTypeId"
|
||||||
@ -63,25 +60,30 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="土地照片" prop="landUrl">
|
<el-form-item label="土地照片" prop="landUrl">
|
||||||
<el-upload
|
<FileUploader v-model="formDataBasic.landUrl" :limit="1" />
|
||||||
:http-request="customUploadRequest"
|
|
||||||
:on-success="(res, file) => handleUploadSuccess(res, file, 'basic')"
|
|
||||||
multiple
|
|
||||||
:show-file-list="true"
|
|
||||||
>
|
|
||||||
<template #trigger>
|
|
||||||
<el-button type="primary">点击上传</el-button>
|
|
||||||
</template>
|
|
||||||
</el-upload>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="面积(亩)" prop="area">
|
||||||
|
<el-input-number v-model="formDataBasic.area" :min="0" :precision="2" :step="0.1" controls-position="right" style="width: 100%" />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="" label-width="0" prop="gridId">
|
||||||
|
<AreaCascader v-model:region-code="formDataBasic.regionCode" v-model:grid-id="formDataBasic.gridId" label="" :split-rows="true" />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="土地范围" prop="scope">
|
<el-form-item label="土地范围" prop="scope">
|
||||||
<el-input v-model="formDataBasic.scope" placeholder="请输入土地范围" />
|
<el-input v-model="formDataBasic.scope" placeholder="请输入土地范围" />
|
||||||
<!-- <Attrs v-model:attrs="formDataBasic.scope" type="add" accept="image/*" /> -->
|
<!-- <Attrs v-model:attrs="formDataBasic.scope" type="add" accept="image/*" /> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="土地产权信息" name="property">
|
<el-tab-pane label="土地产权信息" name="property">
|
||||||
<el-form ref="propertyFormRef" :model="formDataProperty" :rules="propertyRules" label-width="120px" class="form-container">
|
<p class="form-title">编辑产权信息</p>
|
||||||
|
<el-form ref="propertyFormRef" style="width: 60%" :model="formDataProperty" :disabled="isReadonly" label-width="120px">
|
||||||
|
<el-row :gutter="20">
|
||||||
<el-form-item label="地块名称">
|
<el-form-item label="地块名称">
|
||||||
<el-input v-model="formDataProperty.landName" disabled />
|
<el-input v-model="formDataProperty.landName" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -97,87 +99,27 @@
|
|||||||
<el-form-item label="产权证书" prop="propertyCertificateUrl">
|
<el-form-item label="产权证书" prop="propertyCertificateUrl">
|
||||||
<FileUploader v-model="formDataProperty.propertyCertificateUrl" :limit="1" />
|
<FileUploader v-model="formDataProperty.propertyCertificateUrl" :limit="1" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
|
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
<el-button @click="addDialogVisible = false">取消</el-button>
|
<el-button @click="visible = false">取消</el-button>
|
||||||
<el-button v-if="activeTab === 'basic'" type="primary" @click="handleAddSubmit('basic')">提交</el-button>
|
|
||||||
<el-button v-if="activeTab === 'basic'" :disabled="disabledProperty" @click="activeTab = 'property'">下一步</el-button>
|
<!-- 土地基本信息 tab -->
|
||||||
<el-button v-else @click="activeTab = 'basic'">上一步</el-button>
|
<template v-if="activeTab === 'basic'">
|
||||||
<el-button v-if="activeTab === 'property'" type="primary" @click="handleAddSubmit('property')"> 提交 </el-button>
|
<el-button type="primary" @click="submitBasicInfo">暂存</el-button>
|
||||||
</span>
|
<el-button @click="activeTab = 'property'">下一步</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
|
||||||
|
|
||||||
<!-- 查看和编辑共用弹窗 -->
|
<!-- 土地产权信息 tab -->
|
||||||
<el-dialog v-model="viewEditDialogVisible" :title="viewEditTitle" width="800px" top="8vh">
|
<template v-else>
|
||||||
<el-form
|
<el-button @click="activeTab = 'basic'">上一步</el-button>
|
||||||
ref="viewEditFormRef"
|
<el-button v-if="formDataProperty.id" type="primary" @click="submitPropertyInfo">提交</el-button>
|
||||||
:model="viewEditFormData"
|
<el-button v-else type="primary" @click="submitAll">保存</el-button>
|
||||||
:rules="isView ? {} : editRules"
|
</template>
|
||||||
label-width="120px"
|
|
||||||
class="view-edit-form"
|
|
||||||
:disabled="isView"
|
|
||||||
>
|
|
||||||
<h3 class="section-title">土地基本信息</h3>
|
|
||||||
<el-form-item label="地块名称" prop="landName">
|
|
||||||
<el-input v-model="viewEditFormData.landName" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="面积(亩)" prop="area">
|
|
||||||
<el-input-number v-model="viewEditFormData.area" :min="0" :precision="2" :step="0.1" controls-position="right" style="width: 100%" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="土地类型" prop="landType">
|
|
||||||
<el-select v-model="viewEditFormData.landType" clearable>
|
|
||||||
<el-option v-for="item in landTypeOptions" :key="item.id" :label="item.landType" :value="item.id" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="具体位置" prop="address">
|
|
||||||
<el-input v-model="viewEditFormData.address" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="所属网格" prop="gridId">
|
|
||||||
<AreaCascader v-model="viewEditFormData.regionCode" v-model:grid-id="viewEditFormData.gridId" :width="500" label="" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="土壤类型" prop="soilTypeId">
|
|
||||||
<url-select
|
|
||||||
v-model="viewEditFormData.soilTypeId"
|
|
||||||
url="/land-resource/baseInfo/soilTypePage"
|
|
||||||
:params="{ current: 1, size: 100 }"
|
|
||||||
label-key="soilType"
|
|
||||||
value-key="id"
|
|
||||||
:clearable="true"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="土地照片" prop="landUrl">
|
|
||||||
<FileUploader v-model="viewEditFormData.landUrl" :limit="1" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="土地范围" prop="scope">
|
|
||||||
<el-input v-model="viewEditFormData.scope" />
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
<h3 class="section-title">土地产权信息</h3>
|
|
||||||
<el-form-item label="产权人姓名" prop="propertyName">
|
|
||||||
<el-input v-model="viewEditFormData.propertyName" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="联系方式" prop="propertyPhone">
|
|
||||||
<el-input v-model="viewEditFormData.propertyPhone" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="产权编号" prop="landCode">
|
|
||||||
<el-input v-model="viewEditFormData.landCode" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="产权证书" prop="propertyCertificateUrl">
|
|
||||||
<FileUploader v-model="viewEditFormData.propertyCertificateUrl" :limit="1" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
<template #footer>
|
|
||||||
<span class="dialog-footer">
|
|
||||||
<el-button @click="viewEditDialogVisible = false">{{ isView ? '关闭' : '取消' }}</el-button>
|
|
||||||
<el-button v-if="isView" type="primary" @click="handleEdit">编辑</el-button>
|
|
||||||
<el-button v-if="!isView" type="primary" @click="handleView">查看</el-button>
|
|
||||||
<el-button v-if="!isView" type="primary" @click="handleViewEditSubmit"> 提交 </el-button>
|
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@ -187,8 +129,9 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref, reactive, onMounted, computed, nextTick } from 'vue';
|
import { ref, reactive, onMounted, computed, nextTick } from 'vue';
|
||||||
import { CRUD_OPTIONS } from '@/config';
|
import { CRUD_OPTIONS } from '@/config';
|
||||||
import { getLandList, saveBaseInfo, saveProperty, editLand, deleteLand } from '@/apis/landResourceManagement/landManagement';
|
import { getLandList, createLand, saveBaseInfo, saveProperty, editLand, deleteLand } from '@/apis/landResourceManagement/landManagement';
|
||||||
import { CommonUpload } from '@/apis/index';
|
import { CommonUpload } from '@/apis/index';
|
||||||
|
import { ElMessage, ElMessageBox } from 'element-plus';
|
||||||
import request from '@/utils/axios';
|
import request from '@/utils/axios';
|
||||||
|
|
||||||
// ==============================
|
// ==============================
|
||||||
@ -196,17 +139,14 @@ import request from '@/utils/axios';
|
|||||||
// ==============================
|
// ==============================
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const crudRef = ref();
|
const crudRef = ref();
|
||||||
const addDialogVisible = ref(false);
|
const visible = ref(false);
|
||||||
|
const isReadonly = ref(false);
|
||||||
const activeTab = ref('basic');
|
const activeTab = ref('basic');
|
||||||
const viewEditDialogVisible = ref(false);
|
const dialogTitle = ref('新增');
|
||||||
const isView = ref(false);
|
|
||||||
// 控制是否启用验证规则
|
|
||||||
const isValidationEnabled = ref(false);
|
|
||||||
|
|
||||||
// 表单引用
|
// 表单引用
|
||||||
const basicFormRef = ref(null);
|
const basicFormRef = ref(null);
|
||||||
const propertyFormRef = ref(null);
|
const propertyFormRef = ref(null);
|
||||||
const viewEditFormRef = ref(null);
|
|
||||||
|
|
||||||
// 分页数据
|
// 分页数据
|
||||||
const pageData = ref({
|
const pageData = ref({
|
||||||
@ -251,97 +191,6 @@ const formDataProperty = ref({
|
|||||||
propertyCertificateUrl: '',
|
propertyCertificateUrl: '',
|
||||||
});
|
});
|
||||||
|
|
||||||
const viewEditFormData = ref({
|
|
||||||
id: '',
|
|
||||||
landName: '',
|
|
||||||
gridId: '',
|
|
||||||
gridName: '',
|
|
||||||
area: 0,
|
|
||||||
landType: '',
|
|
||||||
landTypeId: '',
|
|
||||||
landTypeName: '',
|
|
||||||
address: '',
|
|
||||||
detailAddress: '',
|
|
||||||
fullLandType: '',
|
|
||||||
fullRegionName: '',
|
|
||||||
soilTypeId: '',
|
|
||||||
soilType: '',
|
|
||||||
landUrl: '',
|
|
||||||
scope: '',
|
|
||||||
propertyName: '',
|
|
||||||
propertyPhone: '',
|
|
||||||
landCode: '',
|
|
||||||
propertyCertificateUrl: '',
|
|
||||||
updateTime: '',
|
|
||||||
});
|
|
||||||
|
|
||||||
// OSS URL
|
|
||||||
const ossUrl = 'http://gov-cloud.oss-cn-chengdu.aliyuncs.com/';
|
|
||||||
|
|
||||||
// ==============================
|
|
||||||
// 计算属性
|
|
||||||
// ==============================
|
|
||||||
const viewEditTitle = computed(() => {
|
|
||||||
return isView.value ? '查看' : '编辑';
|
|
||||||
});
|
|
||||||
|
|
||||||
const disabledProperty = computed(() => {
|
|
||||||
return formDataBasic.value.id ? false : true;
|
|
||||||
});
|
|
||||||
|
|
||||||
// ==============================
|
|
||||||
// 表单验证规则
|
|
||||||
// ==============================
|
|
||||||
const basicRules = reactive(
|
|
||||||
isValidationEnabled.value
|
|
||||||
? {
|
|
||||||
landName: [{ required: true, message: '请输入地块名称', trigger: 'blur' }],
|
|
||||||
area: [
|
|
||||||
{ required: true, message: '请输入面积', trigger: 'blur' },
|
|
||||||
{
|
|
||||||
type: 'number',
|
|
||||||
min: 0,
|
|
||||||
message: '面积必须大于0',
|
|
||||||
trigger: 'blur',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
landType: [{ required: true, message: '请选择土地类型', trigger: 'change' }],
|
|
||||||
address: [{ required: true, message: '请输入具体位置', trigger: 'blur' }],
|
|
||||||
gridId: [{ required: true, message: '请选择所属网格', trigger: 'change' }],
|
|
||||||
soilTypeId: [{ required: true, message: '请选择土壤类型', trigger: 'change' }],
|
|
||||||
landUrl: [{ required: true, message: '请上传土地照片', trigger: 'change' }],
|
|
||||||
scope: [{ required: true, message: '请输入土地范围', trigger: 'blur' }],
|
|
||||||
}
|
|
||||||
: {}
|
|
||||||
);
|
|
||||||
|
|
||||||
const propertyRules = reactive(
|
|
||||||
isValidationEnabled.value
|
|
||||||
? {
|
|
||||||
propertyName: [{ required: true, message: '请输入产权人姓名', trigger: 'blur' }],
|
|
||||||
propertyPhone: [
|
|
||||||
{ required: true, message: '请输入联系方式', trigger: 'blur' },
|
|
||||||
{
|
|
||||||
pattern: /^1[3-9]\d{9}$/,
|
|
||||||
message: '请输入正确的手机号码',
|
|
||||||
trigger: 'blur',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
landCode: [{ required: true, message: '请输入产权编号', trigger: 'blur' }],
|
|
||||||
propertyCertificateUrl: [{ required: true, message: '请上传产权证书', trigger: 'change' }],
|
|
||||||
}
|
|
||||||
: {}
|
|
||||||
);
|
|
||||||
|
|
||||||
const editRules = reactive(
|
|
||||||
isValidationEnabled.value
|
|
||||||
? {
|
|
||||||
...basicRules,
|
|
||||||
...propertyRules,
|
|
||||||
}
|
|
||||||
: {}
|
|
||||||
);
|
|
||||||
|
|
||||||
// ==============================
|
// ==============================
|
||||||
// CRUD 配置
|
// CRUD 配置
|
||||||
// ==============================
|
// ==============================
|
||||||
@ -353,7 +202,7 @@ const option = reactive({
|
|||||||
column: [
|
column: [
|
||||||
{ label: '地块名称', prop: 'landName' },
|
{ label: '地块名称', prop: 'landName' },
|
||||||
{ label: '所属网格', prop: 'gridName' },
|
{ label: '所属网格', prop: 'gridName' },
|
||||||
{ label: '面积', prop: 'area', formatter: (row, column, cellValue) => `${cellValue} 亩` },
|
{ label: '面积', prop: 'area', formatter: (row, column, cellValue) => `${Number(cellValue).toFixed(2)} 亩` },
|
||||||
{ label: '土地类型', prop: 'landTypeName' },
|
{ label: '土地类型', prop: 'landTypeName' },
|
||||||
{ label: '所属行政区域', prop: 'fullRegionName' },
|
{ label: '所属行政区域', prop: 'fullRegionName' },
|
||||||
{ label: '具体位置', prop: 'address' },
|
{ label: '具体位置', prop: 'address' },
|
||||||
@ -364,16 +213,16 @@ const option = reactive({
|
|||||||
{ 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: '删除',
|
||||||
@ -440,7 +289,7 @@ const handleAdd = () => {
|
|||||||
propertyCertificateUrl: '',
|
propertyCertificateUrl: '',
|
||||||
};
|
};
|
||||||
|
|
||||||
addDialogVisible.value = true;
|
visible.value = true;
|
||||||
activeTab.value = 'basic';
|
activeTab.value = 'basic';
|
||||||
|
|
||||||
// 重置表单验证
|
// 重置表单验证
|
||||||
@ -455,22 +304,15 @@ const handleAdd = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const handleView = (row) => {
|
const handleView = (row) => {
|
||||||
isView.value = true;
|
isReadonly.value = true;
|
||||||
viewEditFormData.value = { ...row };
|
dialogTitle.value = '土地资源详情';
|
||||||
viewEditDialogVisible.value = true;
|
visible.value = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleEdit = (row) => {
|
const handleEdit = (row) => {
|
||||||
isView.value = false;
|
dialogTitle.value = '编辑';
|
||||||
viewEditFormData.value = { ...row };
|
isReadonly.value = false;
|
||||||
viewEditDialogVisible.value = true;
|
visible.value = true;
|
||||||
|
|
||||||
// 重置表单验证
|
|
||||||
// nextTick(() => {
|
|
||||||
// if (viewEditFormRef.value) {
|
|
||||||
// viewEditFormRef.value.resetFields();
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleDelete = (id) => {
|
const handleDelete = (id) => {
|
||||||
@ -500,94 +342,57 @@ const resetSearch = () => {
|
|||||||
// ==============================
|
// ==============================
|
||||||
// 方法 - 表单提交
|
// 方法 - 表单提交
|
||||||
// ==============================
|
// ==============================
|
||||||
const handleAddSubmit = async (tab) => {
|
const submitBasicInfo = async () => {
|
||||||
try {
|
try {
|
||||||
if (tab === 'basic') {
|
|
||||||
await basicFormRef.value.validate();
|
await basicFormRef.value.validate();
|
||||||
const res = await saveBaseInfo(formDataBasic.value);
|
const res = await saveBaseInfo(formDataBasic.value);
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
activeTab.value = 'property';
|
|
||||||
formDataProperty.value.id = res.data.id;
|
formDataProperty.value.id = res.data.id;
|
||||||
formDataProperty.value.landName = formDataBasic.value.landName;
|
formDataProperty.value.landName = formDataBasic.value.landName;
|
||||||
|
ElMessage.success('基本信息已暂存');
|
||||||
}
|
}
|
||||||
} else if (tab === 'property') {
|
} catch (error) {
|
||||||
|
console.error('暂存失败', error);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const submitPropertyInfo = async () => {
|
||||||
|
try {
|
||||||
await propertyFormRef.value.validate();
|
await propertyFormRef.value.validate();
|
||||||
|
if (!formDataProperty.value.id) {
|
||||||
|
ElMessage.error('请先保存基本信息');
|
||||||
|
return;
|
||||||
|
}
|
||||||
const res = await saveProperty(formDataProperty.value);
|
const res = await saveProperty(formDataProperty.value);
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
addDialogVisible.value = false;
|
ElMessage.success('产权信息提交成功');
|
||||||
getData();
|
visible.value = false;
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
console.error('表单提交失败', error);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleViewEditSubmit = async () => {
|
|
||||||
try {
|
|
||||||
await viewEditFormRef.value.validate();
|
|
||||||
// 合并提交逻辑
|
|
||||||
const { id, ...formData } = viewEditFormData.value;
|
|
||||||
if (id) {
|
|
||||||
// 更新逻辑
|
|
||||||
// await updateLandInfo({ id, ...formData });
|
|
||||||
await editLand({ id, ...formData });
|
|
||||||
viewEditDialogVisible.value = false;
|
|
||||||
getData();
|
getData();
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('表单提交失败', error);
|
console.error('产权信息提交失败', error);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// ==============================
|
const submitAll = async () => {
|
||||||
// 方法 - 文件上传
|
|
||||||
// ==============================
|
|
||||||
const customUploadRequest = async (options) => {
|
|
||||||
const formData = new FormData();
|
|
||||||
formData.append('file', options.file);
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const response = await CommonUpload(formData);
|
await basicFormRef.value.validate();
|
||||||
options.onSuccess(response, options.file);
|
await propertyFormRef.value.validate();
|
||||||
return response;
|
|
||||||
} catch (err) {
|
const combinedData = {
|
||||||
console.error('上传失败', err);
|
...formDataProperty.value,
|
||||||
options.onError(err);
|
...formDataBasic.value,
|
||||||
throw err;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
const baseRes = await createLand(combinedData);
|
||||||
const handleUploadSuccess = (res, file, type) => {
|
if (baseRes.code === 200) {
|
||||||
if (res?.data?.url) {
|
ElMessage.success('全部信息保存成功');
|
||||||
const url = res.data.url;
|
visible.value = false;
|
||||||
|
getData();
|
||||||
switch (type) {
|
} else {
|
||||||
case 'basic':
|
ElMessage.error('信息保存失败');
|
||||||
formDataBasic.value.landUrl = url;
|
|
||||||
break;
|
|
||||||
case 'property':
|
|
||||||
formDataProperty.value.propertyCertificateUrl = url;
|
|
||||||
break;
|
|
||||||
case 'viewEditBasic':
|
|
||||||
viewEditFormData.value.landUrl = url;
|
|
||||||
break;
|
|
||||||
case 'viewEditProperty':
|
|
||||||
viewEditFormData.value.propertyCertificateUrl = url;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
} catch (error) {
|
||||||
// 手动触发验证
|
console.error('保存失败', error);
|
||||||
nextTick(() => {
|
|
||||||
if (type === 'basic' && basicFormRef.value) {
|
|
||||||
basicFormRef.value.validateField('landUrl');
|
|
||||||
} else if (type === 'property' && propertyFormRef.value) {
|
|
||||||
propertyFormRef.value.validateField('propertyCertificateUrl');
|
|
||||||
} else if (type.includes('viewEdit') && viewEditFormRef.value) {
|
|
||||||
const field = type === 'viewEditBasic' ? 'landUrl' : 'propertyCertificateUrl';
|
|
||||||
viewEditFormRef.value.validateField(field);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -616,6 +421,11 @@ onMounted(() => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
// :deep(.el-dialog__body) {
|
||||||
|
// padding: 20px;
|
||||||
|
// height: calc(100vh - 300px);
|
||||||
|
// overflow-y: auto;
|
||||||
|
// }
|
||||||
.custom-page {
|
.custom-page {
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
height: calc(100vh - 150px);
|
height: calc(100vh - 150px);
|
||||||
@ -632,40 +442,40 @@ onMounted(() => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.tabs-wrapper {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
// background-color: #7daaaa;
|
||||||
|
|
||||||
.form-container,
|
:deep(.el-tabs__item) {
|
||||||
.view-edit-form {
|
font-size: 16px;
|
||||||
padding: 0 20px;
|
color: #555555;
|
||||||
max-height: calc(100vh - 300px);
|
font-weight: 500;
|
||||||
overflow-y: auto;
|
// border: 1 solid #f000;
|
||||||
|
|
||||||
.el-form-item {
|
|
||||||
margin-bottom: 22px;
|
|
||||||
}
|
}
|
||||||
}
|
:deep(.el-tabs__content) {
|
||||||
|
padding: 20px;
|
||||||
.view-edit-form {
|
// background-color: #f5f5f5;
|
||||||
.section-title {
|
|
||||||
color: #409eff;
|
|
||||||
border-bottom: 1px solid #eee;
|
|
||||||
padding-bottom: 10px;
|
|
||||||
margin: 20px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.preview-image {
|
|
||||||
max-width: 100%;
|
|
||||||
max-height: 200px;
|
|
||||||
border: 1px solid #eee;
|
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
display: block;
|
height: calc(100vh - 300px);
|
||||||
margin-top: 8px;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
:deep(.el-tab-pane) {
|
||||||
|
margin: 0 auto;
|
||||||
|
width: 80%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-title {
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 500;
|
||||||
|
margin: 30px 0;
|
||||||
|
color: #333333;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dialog-footer {
|
.dialog-footer {
|
||||||
display: flex;
|
display: block;
|
||||||
justify-content: flex-end;
|
text-align: center;
|
||||||
padding: 10px 20px 0;
|
|
||||||
border-top: 1px solid #eee;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -13,19 +13,7 @@
|
|||||||
<el-input v-model="localForm.contactPerson" placeholder="请输入" />
|
<el-input v-model="localForm.contactPerson" placeholder="请输入" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="农企/合作社照片">
|
<el-form-item label="农企/合作社照片">
|
||||||
<el-upload
|
<FileUploader v-model="localForm.cooperativePhoto" :limit="1" />
|
||||||
action="#"
|
|
||||||
:http-request="customUploadRequest"
|
|
||||||
:on-success="(res, file) => handleUploadSuccess(res, file, 'cooperativePhoto')"
|
|
||||||
:file-list="cooperativePhotoList"
|
|
||||||
list-type="picture-card"
|
|
||||||
:limit="1"
|
|
||||||
:on-exceed="handleExceed"
|
|
||||||
:on-remove="() => handleRemove('cooperativePhoto')"
|
|
||||||
>
|
|
||||||
<el-icon><Plus /></el-icon>
|
|
||||||
</el-upload>
|
|
||||||
<!-- <FileUploader v-model="localForm.cooperativePhoto" :limit="1" /> -->
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
@ -47,18 +35,6 @@
|
|||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="营业执照">
|
<el-form-item label="营业执照">
|
||||||
<!-- <el-upload
|
|
||||||
action="#"
|
|
||||||
:http-request="customUploadRequest"
|
|
||||||
:on-success="(res, file) => handleUploadSuccess(res, file, 'businessLicence')"
|
|
||||||
:file-list="businessLicenceList"
|
|
||||||
list-type="picture-card"
|
|
||||||
:limit="1"
|
|
||||||
:on-exceed="handleExceed"
|
|
||||||
:on-remove="() => handleRemove('businessLicence')"
|
|
||||||
>
|
|
||||||
<el-icon><Plus /></el-icon>
|
|
||||||
</el-upload> -->
|
|
||||||
<FileUploader v-model="localForm.businessLicence" :limit="1" />
|
<FileUploader v-model="localForm.businessLicence" :limit="1" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -67,14 +43,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, reactive, watch } from 'vue';
|
import { ref, toRefs, reactive, watch } from 'vue';
|
||||||
import { Plus } from '@element-plus/icons-vue';
|
|
||||||
import cloneDeep from 'lodash/cloneDeep';
|
|
||||||
import { CommonUpload } from '@/apis/index';
|
|
||||||
import { ElMessage } from 'element-plus';
|
|
||||||
import Attrs from './Attrs.vue';
|
|
||||||
import { useCoop } from '../../../../store/modules/coop';
|
|
||||||
const localForm = useCoop().$state.data;
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
modelValue: {
|
modelValue: {
|
||||||
@ -82,97 +51,11 @@ const props = defineProps({
|
|||||||
required: true,
|
required: true,
|
||||||
default: () => ({}),
|
default: () => ({}),
|
||||||
},
|
},
|
||||||
// readonly: Boolean,
|
readonly: Boolean,
|
||||||
});
|
});
|
||||||
|
|
||||||
const ossUrl = 'http://gov-cloud.oss-cn-chengdu.aliyuncs.com/';
|
|
||||||
const cooperativePhotoList = ref([]);
|
|
||||||
const businessLicenceList = ref([]);
|
|
||||||
|
|
||||||
const emit = defineEmits(['update:modelValue']);
|
const emit = defineEmits(['update:modelValue']);
|
||||||
|
const { modelValue: localForm } = toRefs(props);
|
||||||
// 建立本地副本,避免直接修改 props
|
|
||||||
// const localForm = ref({ ...props.modelValue });
|
|
||||||
|
|
||||||
// 深度监听本地副本的变化,实时更新父组件
|
|
||||||
// watch(
|
|
||||||
// localForm,
|
|
||||||
// (newVal) => {
|
|
||||||
// emit('update:modelValue', { ...newVal });
|
|
||||||
// },
|
|
||||||
// { deep: true }
|
|
||||||
// );
|
|
||||||
// watch(
|
|
||||||
// () => props.modelValue,
|
|
||||||
// (newVal) => {
|
|
||||||
// Object.assign(localForm, cloneDeep(newVal));
|
|
||||||
// },
|
|
||||||
// { deep: true }
|
|
||||||
// );
|
|
||||||
|
|
||||||
const customUploadRequest = async (options) => {
|
|
||||||
const formData = new FormData();
|
|
||||||
formData.append('file', options.file);
|
|
||||||
|
|
||||||
try {
|
|
||||||
const response = await CommonUpload(formData);
|
|
||||||
options.onSuccess(response, options.file);
|
|
||||||
return response;
|
|
||||||
} catch (err) {
|
|
||||||
console.error('上传失败', err);
|
|
||||||
options.onError(err);
|
|
||||||
throw err;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
const handleUploadSuccess = (res, file, fieldName) => {
|
|
||||||
localForm[fieldName] = res.data.url;
|
|
||||||
// 更新预览列表
|
|
||||||
const previewItem = {
|
|
||||||
name: res.data.name,
|
|
||||||
url: ossUrl + res.data.url, // 确保这是完整的可访问URL
|
|
||||||
status: 'success',
|
|
||||||
};
|
|
||||||
if (fieldName === 'cooperativePhoto') {
|
|
||||||
cooperativePhotoList.value = [previewItem];
|
|
||||||
} else {
|
|
||||||
businessLicenceList.value = [previewItem];
|
|
||||||
}
|
|
||||||
};
|
|
||||||
// 处理移除图片
|
|
||||||
const handleRemove = (fieldName) => {
|
|
||||||
localForm[fieldName] = '';
|
|
||||||
if (fieldName === 'cooperativePhoto') {
|
|
||||||
cooperativePhotoList.value = [];
|
|
||||||
} else {
|
|
||||||
businessLicenceList.value = [];
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// 处理文件超出限制
|
|
||||||
const handleExceed = () => {
|
|
||||||
ElMessage.warning('只能上传一张图片,请先删除当前图片');
|
|
||||||
};
|
|
||||||
|
|
||||||
// 初始化时如果有图片,设置预览
|
|
||||||
if (localForm.cooperativePhoto) {
|
|
||||||
cooperativePhotoList.value = [
|
|
||||||
{
|
|
||||||
name: '合作社照片',
|
|
||||||
url: ossUrl + localForm.cooperativePhoto,
|
|
||||||
status: 'success',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (localForm.businessLicence) {
|
|
||||||
businessLicenceList.value = [
|
|
||||||
{
|
|
||||||
name: '营业执照',
|
|
||||||
url: ossUrl + localForm.businessLicence,
|
|
||||||
status: 'success',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
@ -72,7 +72,7 @@ import { reactive, watch } from 'vue';
|
|||||||
import { Plus } from '@element-plus/icons-vue';
|
import { Plus } from '@element-plus/icons-vue';
|
||||||
import cloneDeep from 'lodash/cloneDeep';
|
import cloneDeep from 'lodash/cloneDeep';
|
||||||
import { useCoop } from '../../../../store/modules/coop';
|
import { useCoop } from '../../../../store/modules/coop';
|
||||||
const localForm = useCoop().$state.data;
|
// const localForm = useCoop().$state.data;
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
modelValue: {
|
modelValue: {
|
||||||
@ -88,16 +88,16 @@ const props = defineProps({
|
|||||||
const emit = defineEmits(['update:modelValue']);
|
const emit = defineEmits(['update:modelValue']);
|
||||||
|
|
||||||
// 本地副本,存放各表的文件列表
|
// 本地副本,存放各表的文件列表
|
||||||
// const localForm = reactive(cloneDeep(props.modelValue));
|
const localForm = reactive(cloneDeep(props.modelValue));
|
||||||
|
|
||||||
// watch 同步回父组件
|
// watch 同步回父组件
|
||||||
// watch(
|
watch(
|
||||||
// () => localForm,
|
() => localForm,
|
||||||
// (val) => {
|
(val) => {
|
||||||
// emit('update:modelValue', { ...val });
|
emit('update:modelValue', { ...val });
|
||||||
// },
|
},
|
||||||
// { deep: true }
|
{ deep: true }
|
||||||
// );
|
);
|
||||||
// watch(
|
// watch(
|
||||||
// () => props.modelValue,
|
// () => props.modelValue,
|
||||||
// (newVal) => {
|
// (newVal) => {
|
||||||
|
|||||||
@ -2,34 +2,32 @@
|
|||||||
<el-form :model="localForm" label-width="160px" :disabled="readonly">
|
<el-form :model="localForm" label-width="160px" :disabled="readonly">
|
||||||
<div class="credit-evaluation">
|
<div class="credit-evaluation">
|
||||||
<h3>信用评级</h3>
|
<h3>信用评级</h3>
|
||||||
|
|
||||||
<el-form-item label="信用评价">
|
<el-form-item label="信用评价">
|
||||||
<el-rate v-model="localForm.creditEvaluation" allow-half show-score score-template="{value} 分" />
|
<el-rate v-model="localForm.creditEvaluation" show-score score-template="{value} 分" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="带动周边农户">
|
<el-form-item label="带动周边农户">
|
||||||
<el-rate v-model="localForm.supportedFarmers" allow-half show-score score-template="{value} 分" />
|
<el-rate v-model="localForm.supportedFarmers" show-score score-template="{value} 分" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="社会效益">
|
<el-form-item label="社会效益">
|
||||||
<el-rate v-model="localForm.socialImpact" allow-half show-score score-template="{value} 分" />
|
<el-rate v-model="localForm.socialImpact" show-score score-template="{value} 分" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="高新技术应用">
|
<el-form-item label="高新技术应用">
|
||||||
<el-rate v-model="localForm.techApplication" allow-half show-score score-template="{value} 分" />
|
<el-rate v-model="localForm.techApplication" show-score score-template="{value} 分" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="产品质量及服务保障">
|
<el-form-item label="产品质量及服务保障">
|
||||||
<el-rate v-model="localForm.productQuality" allow-half show-score score-template="{value} 分" />
|
<el-rate v-model="localForm.productQuality" show-score score-template="{value} 分" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { reactive, watch } from 'vue';
|
import { toRefs, watch } from 'vue';
|
||||||
import cloneDeep from 'lodash/cloneDeep';
|
|
||||||
import { useCoop } from '../../../../store/modules/coop';
|
|
||||||
const localForm = useCoop().$state.data;
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
modelValue: {
|
modelValue: {
|
||||||
@ -42,8 +40,10 @@ const props = defineProps({
|
|||||||
|
|
||||||
const emit = defineEmits(['update:modelValue']);
|
const emit = defineEmits(['update:modelValue']);
|
||||||
|
|
||||||
// const localForm = reactive(cloneDeep(props.modelValue));
|
// 解构出响应式引用,保持与父组件绑定
|
||||||
|
const { modelValue: localForm } = toRefs(props);
|
||||||
|
|
||||||
|
// 如需在评分变化时同步更新父组件(可选,某些场景可能冗余)
|
||||||
// watch(
|
// watch(
|
||||||
// localForm,
|
// localForm,
|
||||||
// (newVal) => {
|
// (newVal) => {
|
||||||
@ -51,14 +51,8 @@ const emit = defineEmits(['update:modelValue']);
|
|||||||
// },
|
// },
|
||||||
// { deep: true }
|
// { deep: true }
|
||||||
// );
|
// );
|
||||||
// watch(
|
|
||||||
// () => props.modelValue,
|
|
||||||
// (newVal) => {
|
|
||||||
// Object.assign(localForm, cloneDeep(newVal));
|
|
||||||
// },
|
|
||||||
// { deep: true }
|
|
||||||
// );
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.credit-evaluation {
|
.credit-evaluation {
|
||||||
width: 600px;
|
width: 600px;
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</avue-crud>
|
</avue-crud>
|
||||||
|
|
||||||
<el-dialog :key="dialogTitle" v-model="dialogVisible" :title="dialogTitle" width="80%">
|
<el-dialog :key="dialogTitle" v-model="dialogVisible" :title="dialogTitle" width="60%" append-to-body>
|
||||||
<el-form :model="formData" label-width="120px" class="custom-form" :disabled="isReadonly">
|
<el-form :model="formData" label-width="120px" class="custom-form" :disabled="isReadonly">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@ -105,8 +105,15 @@ import { ref, reactive, watch, onMounted, computed } from 'vue';
|
|||||||
import { CRUD_OPTIONS } from '@/config';
|
import { CRUD_OPTIONS } from '@/config';
|
||||||
import { ElMessageBox, ElMessage } from 'element-plus';
|
import { ElMessageBox, ElMessage } from 'element-plus';
|
||||||
import { getMemberList, addMember, updateMember, deleteMembers } from '@/apis/businessEntity';
|
import { getMemberList, addMember, updateMember, deleteMembers } from '@/apis/businessEntity';
|
||||||
import { useCoop } from '../../../../store/modules/coop';
|
// import { useCoop } from '../../../../store/modules/coop';
|
||||||
const defaultFormData = useCoop().$state.data;
|
// const defaultFormData = useCoop().$state.data;
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
entId: {
|
||||||
|
type: String,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
const dialogTitle = ref('新增');
|
const dialogTitle = ref('新增');
|
||||||
const dialogVisible = ref(false);
|
const dialogVisible = ref(false);
|
||||||
@ -121,36 +128,36 @@ const pageData = ref({
|
|||||||
total: 0,
|
total: 0,
|
||||||
});
|
});
|
||||||
const searchForm = ref({
|
const searchForm = ref({
|
||||||
entId: '',
|
entId: props.entId,
|
||||||
userId: '',
|
userId: '',
|
||||||
});
|
});
|
||||||
const crudData = ref([]);
|
const crudData = ref([]);
|
||||||
// 定义默认表单数据
|
// 定义默认表单数据
|
||||||
// const defaultFormData = {
|
const defaultFormData = {
|
||||||
// id: '',
|
id: '',
|
||||||
// entId: '',
|
entId: '',
|
||||||
// name: '',
|
name: '',
|
||||||
// idType: '101',
|
idType: '101',
|
||||||
// idCard: '',
|
idCard: '',
|
||||||
// sex: '1',
|
sex: '1',
|
||||||
// age: '',
|
age: '',
|
||||||
// phone: '',
|
phone: '',
|
||||||
// provinceCode: '', // 省
|
provinceCode: '', // 省
|
||||||
// cityCode: '', // 市
|
cityCode: '', // 市
|
||||||
// countyCode: '', // 区县
|
countyCode: '', // 区县
|
||||||
// townCode: '', // 镇
|
townCode: '', // 镇
|
||||||
// street: '', // 村
|
street: '', // 村
|
||||||
// addressArr: [],
|
addressArr: [],
|
||||||
// detailAddress: '',
|
detailAddress: '',
|
||||||
// area: '',
|
area: '',
|
||||||
// planCrop: '',
|
planCrop: '',
|
||||||
// planCropName: '',
|
planCropName: '',
|
||||||
// address: '',
|
address: '',
|
||||||
// createTime: '',
|
createTime: '',
|
||||||
// createUser: '',
|
createUser: '',
|
||||||
// updateTime: '',
|
updateTime: '',
|
||||||
// updateUser: '',
|
updateUser: '',
|
||||||
// };
|
};
|
||||||
// 新增表单数据,使用默认数据初始化
|
// 新增表单数据,使用默认数据初始化
|
||||||
const formData = ref({ ...defaultFormData });
|
const formData = ref({ ...defaultFormData });
|
||||||
const resetForm = () => {
|
const resetForm = () => {
|
||||||
@ -183,7 +190,7 @@ const crudOptions = reactive({
|
|||||||
{ label: '年龄', prop: 'age' },
|
{ label: '年龄', prop: 'age' },
|
||||||
{ label: '联系方式', prop: 'phone' },
|
{ label: '联系方式', prop: 'phone' },
|
||||||
{ label: '居住地行政区划', prop: 'address' },
|
{ label: '居住地行政区划', prop: 'address' },
|
||||||
{ label: '种植作物', prop: 'planCrop' },
|
{ label: '种植作物', prop: 'planCropName' },
|
||||||
],
|
],
|
||||||
actions: [
|
actions: [
|
||||||
{
|
{
|
||||||
@ -204,15 +211,22 @@ const crudOptions = reactive({
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
const syncAddressToForm = () => {
|
||||||
|
const arr = formData.value.addressArr || [];
|
||||||
|
[formData.value.provinceCode, formData.value.cityCode, formData.value.countyCode, formData.value.townCode, formData.value.villageCode] = arr;
|
||||||
|
};
|
||||||
async function getData() {
|
async function getData() {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
try {
|
try {
|
||||||
const params = {
|
const params = {
|
||||||
...searchForm.value,
|
// ...searchForm.value,
|
||||||
|
entId: props.entId,
|
||||||
current: pageData.value.currentPage,
|
current: pageData.value.currentPage,
|
||||||
size: pageData.value.pageSize,
|
size: pageData.value.pageSize,
|
||||||
};
|
};
|
||||||
|
if (!props.entId) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const response = await getMemberList(params);
|
const response = await getMemberList(params);
|
||||||
if (response.code === 200 && response.data) {
|
if (response.code === 200 && response.data) {
|
||||||
crudData.value = response.data.records;
|
crudData.value = response.data.records;
|
||||||
@ -231,16 +245,25 @@ async function getData() {
|
|||||||
loading.value = false;
|
loading.value = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
getData();
|
getData();
|
||||||
});
|
|
||||||
|
// onMounted(() => {
|
||||||
|
// getData();
|
||||||
|
// });
|
||||||
|
watch(
|
||||||
|
() => props.entId,
|
||||||
|
() => {
|
||||||
|
getData();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
const handleSave = async () => {
|
const handleSave = async () => {
|
||||||
try {
|
try {
|
||||||
let response;
|
let response;
|
||||||
|
syncAddressToForm();
|
||||||
if (dialogTitle.value === '新增') {
|
if (dialogTitle.value === '新增') {
|
||||||
// 新增操作调用 saveFarmerList 接口
|
// 新增操作调用 saveFarmerList 接口
|
||||||
|
formData.value.entId = props.entId;
|
||||||
response = await addMember(formData.value);
|
response = await addMember(formData.value);
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
ElMessage.success('新增成功');
|
ElMessage.success('新增成功');
|
||||||
@ -266,18 +289,6 @@ const handleSave = async () => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// watch(
|
|
||||||
// () => formData.value.addressArr,
|
|
||||||
// (newValue) => {
|
|
||||||
// if (newValue.length <= 3) {
|
|
||||||
// formData.value.provinceCode = '530000';
|
|
||||||
// formData.value.cityCode = '530900';
|
|
||||||
// formData.value.countyCode = newValue[0];
|
|
||||||
// formData.value.townCode = newValue[1];
|
|
||||||
// formData.value.street = newValue[2];
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// );
|
|
||||||
const handleAdd = () => {
|
const handleAdd = () => {
|
||||||
isReadonly.value = false; // 设置为可编辑模式
|
isReadonly.value = false; // 设置为可编辑模式
|
||||||
resetForm();
|
resetForm();
|
||||||
@ -289,7 +300,7 @@ function handleView(row) {
|
|||||||
dialogTitle.value = '查看';
|
dialogTitle.value = '查看';
|
||||||
isReadonly.value = true; // 设置为只读模式
|
isReadonly.value = true; // 设置为只读模式
|
||||||
dialogVisible.value = true;
|
dialogVisible.value = true;
|
||||||
const addressArr = [row.countyCode, row.townCode, row.street].filter(Boolean);
|
const addressArr = [row.provinceCode || '', row.cityCode || '', row.countyCode || '', row.townCode || '', row.villageCode || ''];
|
||||||
formData.value = {
|
formData.value = {
|
||||||
...row,
|
...row,
|
||||||
addressArr,
|
addressArr,
|
||||||
@ -300,7 +311,7 @@ async function handleEdit(row) {
|
|||||||
dialogTitle.value = '编辑';
|
dialogTitle.value = '编辑';
|
||||||
isReadonly.value = false;
|
isReadonly.value = false;
|
||||||
dialogVisible.value = true;
|
dialogVisible.value = true;
|
||||||
const addressArr = [row.countyCode, row.townCode, row.street].filter(Boolean);
|
const addressArr = [row.provinceCode || '', row.cityCode || '', row.countyCode || '', row.townCode || '', row.villageCode || ''];
|
||||||
formData.value = {
|
formData.value = {
|
||||||
...row,
|
...row,
|
||||||
addressArr,
|
addressArr,
|
||||||
|
|||||||
@ -71,10 +71,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { reactive, watch } from 'vue';
|
import { toRefs, reactive, watch } from 'vue';
|
||||||
import cloneDeep from 'lodash/cloneDeep';
|
|
||||||
import { useCoop } from '../../../../store/modules/coop';
|
|
||||||
const localForm = useCoop().$state.data;
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
modelValue: {
|
modelValue: {
|
||||||
@ -86,25 +83,8 @@ const props = defineProps({
|
|||||||
});
|
});
|
||||||
|
|
||||||
const emit = defineEmits(['update:modelValue']);
|
const emit = defineEmits(['update:modelValue']);
|
||||||
|
// 解构出响应式引用,保持与父组件绑定
|
||||||
// 创建本地副本(为了避免直接修改 props)
|
const { modelValue: localForm } = toRefs(props);
|
||||||
// const localForm = reactive(cloneDeep(props.modelValue));
|
|
||||||
|
|
||||||
// 监听本地副本的变化,自动回传给父组件
|
|
||||||
// watch(
|
|
||||||
// localForm,
|
|
||||||
// (newVal) => {
|
|
||||||
// emit('update:modelValue', { ...newVal });
|
|
||||||
// },
|
|
||||||
// { deep: true }
|
|
||||||
// );
|
|
||||||
// watch(
|
|
||||||
// () => props.modelValue,
|
|
||||||
// (newVal) => {
|
|
||||||
// Object.assign(localForm, cloneDeep(newVal));
|
|
||||||
// },
|
|
||||||
// { deep: true }
|
|
||||||
// );
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
@ -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">
|
||||||
@ -23,7 +23,7 @@
|
|||||||
<TabBasicInfo v-model="formData" :readonly="isReadonly" />
|
<TabBasicInfo v-model="formData" :readonly="isReadonly" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="登记注册信息" name="register">
|
<el-tab-pane label="登记注册信息" name="register">
|
||||||
<TabRegister v-model="formData" />
|
<TabRegister v-model="formData" :readonly="isReadonly" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="经营信息" name="business">
|
<el-tab-pane label="经营信息" name="business">
|
||||||
<TabBusinessInfo v-model="formData" :readonly="isReadonly" />
|
<TabBusinessInfo v-model="formData" :readonly="isReadonly" />
|
||||||
@ -31,8 +31,8 @@
|
|||||||
<el-tab-pane label="信用评级" name="credit">
|
<el-tab-pane label="信用评级" name="credit">
|
||||||
<TabCreditEvaluation v-model="formData" :readonly="isReadonly" />
|
<TabCreditEvaluation v-model="formData" :readonly="isReadonly" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane v-if="dialogTitle === '查看'" label="职工/社员管理" name="employee">
|
<el-tab-pane v-if="dialogTitle !== '新增'" label="职工/社员管理" name="employee">
|
||||||
<TabMember :readonly="isReadonly" />
|
<TabMember :readonly="isReadonly" :ent-id="formData.id" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
|
|
||||||
@ -57,10 +57,6 @@ import TabBusinessInfo from './components/TabBusinessInfo.vue';
|
|||||||
import TabCreditEvaluation from './components/TabCreditEvaluation.vue';
|
import TabCreditEvaluation from './components/TabCreditEvaluation.vue';
|
||||||
import TabMember from './components/TabMember.vue';
|
import TabMember from './components/TabMember.vue';
|
||||||
import { getEnterList, getEnterById, addEnter, updateEnter, approvalEnter, deleteEnter } from '@/apis/businessEntity';
|
import { getEnterList, getEnterById, addEnter, updateEnter, approvalEnter, deleteEnter } from '@/apis/businessEntity';
|
||||||
import { cloneDeep } from 'lodash';
|
|
||||||
import { useCoop } from '../../../store/modules/coop';
|
|
||||||
|
|
||||||
const useCoopData = useCoop();
|
|
||||||
|
|
||||||
// 控制弹窗显示
|
// 控制弹窗显示
|
||||||
const visible = ref(false);
|
const visible = ref(false);
|
||||||
@ -76,6 +72,7 @@ const searchForm = ref({
|
|||||||
productType: '',
|
productType: '',
|
||||||
primaryProduct: '',
|
primaryProduct: '',
|
||||||
});
|
});
|
||||||
|
const initialSearchForm = { ...searchForm.value };
|
||||||
// 数据和状态
|
// 数据和状态
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
id: '',
|
id: '',
|
||||||
@ -116,6 +113,19 @@ const formData = ref({
|
|||||||
techApplication: 2,
|
techApplication: 2,
|
||||||
productQuality: 1,
|
productQuality: 1,
|
||||||
});
|
});
|
||||||
|
const initialFormData = { ...formData.value };
|
||||||
|
|
||||||
|
const resetForm = () => {
|
||||||
|
formData.value = { ...initialFormData };
|
||||||
|
};
|
||||||
|
const syncAddressToForm = () => {
|
||||||
|
const arr = Array.isArray(formData.value.addressArr) ? formData.value.addressArr : [];
|
||||||
|
formData.value.provinceCode = arr[0] || '';
|
||||||
|
formData.value.cityCode = arr[1] || '';
|
||||||
|
formData.value.countyCode = arr[2] || '';
|
||||||
|
formData.value.townCode = arr[3] || '';
|
||||||
|
formData.value.villageCode = arr[4] || '';
|
||||||
|
};
|
||||||
|
|
||||||
// 保存处理
|
// 保存处理
|
||||||
const handleSubmit = async () => {
|
const handleSubmit = async () => {
|
||||||
@ -124,27 +134,22 @@ const handleSubmit = async () => {
|
|||||||
let response;
|
let response;
|
||||||
if (dialogTitle.value === '新增') {
|
if (dialogTitle.value === '新增') {
|
||||||
formData.value.id = '';
|
formData.value.id = '';
|
||||||
|
syncAddressToForm();
|
||||||
response = await addEnter(formData.value);
|
response = await addEnter(formData.value);
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
ElMessage.success('新增成功');
|
ElMessage.success('新增成功');
|
||||||
visible.value = false;
|
visible.value = false;
|
||||||
getData(); // 刷新表格数据
|
getData();
|
||||||
}
|
}
|
||||||
} else if (dialogTitle.value === '编辑') {
|
} else if (dialogTitle.value === '编辑') {
|
||||||
formData.value.provinceCode = formData.value.addressArr[0];
|
syncAddressToForm();
|
||||||
formData.value.cityCode = formData.value.addressArr[1];
|
|
||||||
formData.value.countyCode = formData.value.addressArr[2];
|
|
||||||
formData.value.townCode = formData.value.addressArr[3];
|
|
||||||
formData.value.villageCode = formData.value.addressArr[4];
|
|
||||||
|
|
||||||
response = await updateEnter(formData.value);
|
response = await updateEnter(formData.value);
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
ElMessage.success('编辑成功');
|
ElMessage.success('编辑成功');
|
||||||
visible.value = false;
|
visible.value = false;
|
||||||
getData(); // 刷新表格数据
|
getData();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 可刷新表格数据
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
ElMessage.error('保存失败');
|
ElMessage.error('保存失败');
|
||||||
} finally {
|
} finally {
|
||||||
@ -168,88 +173,16 @@ const crudOptions = reactive({
|
|||||||
searchBtn: false,
|
searchBtn: false,
|
||||||
emptyBtn: false,
|
emptyBtn: false,
|
||||||
column: [
|
column: [
|
||||||
{ label: '农企/合作社名称', prop: 'businessName' },
|
{ label: '企业名称', prop: 'businessName' },
|
||||||
{ label: '地点', prop: 'regAddress' },
|
{ label: '所属行政区划', prop: 'address' },
|
||||||
{ 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: [
|
|
||||||
{
|
|
||||||
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);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
});
|
});
|
||||||
// watch(
|
// watch(
|
||||||
// () => formData.value.addressArr,
|
// () => formData.value.addressArr,
|
||||||
@ -279,7 +212,6 @@ const getData = async () => {
|
|||||||
page: pageData.value.currentPage,
|
page: pageData.value.currentPage,
|
||||||
size: pageData.value.pageSize,
|
size: pageData.value.pageSize,
|
||||||
});
|
});
|
||||||
console.log('response', response);
|
|
||||||
crudData.value = response.data.records;
|
crudData.value = response.data.records;
|
||||||
pageData.value.total = response.data.total;
|
pageData.value.total = response.data.total;
|
||||||
pageData.value.currentPage = response.data.current;
|
pageData.value.currentPage = response.data.current;
|
||||||
@ -293,11 +225,10 @@ const getData = async () => {
|
|||||||
|
|
||||||
const getEnterDetail = async (id) => {
|
const getEnterDetail = async (id) => {
|
||||||
try {
|
try {
|
||||||
|
resetForm();
|
||||||
const response = await getEnterById(id);
|
const response = await getEnterById(id);
|
||||||
if (response?.code === 200 && response.data) {
|
|
||||||
// 使用深拷贝避免污染原始数据
|
|
||||||
formData.value = {
|
formData.value = {
|
||||||
...cloneDeep(response.data),
|
...response.data,
|
||||||
// 确保addressArr始终是5个元素,不足的用空字符串填充
|
// 确保addressArr始终是5个元素,不足的用空字符串填充
|
||||||
addressArr: [
|
addressArr: [
|
||||||
response.data.provinceCode || '',
|
response.data.provinceCode || '',
|
||||||
@ -307,33 +238,7 @@ const getEnterDetail = async (id) => {
|
|||||||
response.data.villageCode || '',
|
response.data.villageCode || '',
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
// // 初始化图片预览(如果之前实现了图片预览功能)
|
|
||||||
// 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 || '获取详情失败:服务器未返回有效数据');
|
|
||||||
}
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('获取详情失败:', error);
|
|
||||||
ElMessage.error(`获取详情失败:${error.message || '请稍后重试'}`);
|
ElMessage.error(`获取详情失败:${error.message || '请稍后重试'}`);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -345,9 +250,8 @@ function handleTabChange(tab) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const handleAdd = () => {
|
const handleAdd = () => {
|
||||||
useCoopData.getData({});
|
|
||||||
isReadonly.value = false;
|
isReadonly.value = false;
|
||||||
// resetForm();
|
resetForm();
|
||||||
dialogTitle.value = '新增';
|
dialogTitle.value = '新增';
|
||||||
visible.value = true;
|
visible.value = true;
|
||||||
};
|
};
|
||||||
@ -355,7 +259,6 @@ const handleAdd = () => {
|
|||||||
const handleView = async (row) => {
|
const handleView = async (row) => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
dialogTitle.value = '查看';
|
dialogTitle.value = '查看';
|
||||||
formData.value = null;
|
|
||||||
try {
|
try {
|
||||||
await getEnterDetail(row.id);
|
await getEnterDetail(row.id);
|
||||||
isReadonly.value = true;
|
isReadonly.value = true;
|
||||||
@ -368,14 +271,10 @@ const handleView = async (row) => {
|
|||||||
|
|
||||||
// 编辑详情(可修改)
|
// 编辑详情(可修改)
|
||||||
const handleEdit = async (row) => {
|
const handleEdit = async (row) => {
|
||||||
console.log(row);
|
|
||||||
formData.value = row;
|
|
||||||
formData.value.addressArr = [row.provinceCode, row.cityCode, row.countyCode, row.townCode, row.villageCode];
|
|
||||||
useCoopData.getData(formData.value);
|
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
dialogTitle.value = '编辑';
|
dialogTitle.value = '编辑';
|
||||||
try {
|
try {
|
||||||
await getEnterById(row.id);
|
await getEnterDetail(row.id);
|
||||||
isReadonly.value = false;
|
isReadonly.value = false;
|
||||||
activeTab.value = 'basic';
|
activeTab.value = 'basic';
|
||||||
visible.value = true;
|
visible.value = true;
|
||||||
@ -383,6 +282,26 @@ const handleEdit = async (row) => {
|
|||||||
loading.value = false;
|
loading.value = false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
// 提交审核
|
||||||
|
const handleSubmitApprove = async (row) => {
|
||||||
|
try {
|
||||||
|
const params = {
|
||||||
|
id: row.id,
|
||||||
|
status: '1', // 待审核
|
||||||
|
reason: '提交审核',
|
||||||
|
};
|
||||||
|
const res = await approvalEnter(params);
|
||||||
|
if (res.code === 200) {
|
||||||
|
ElMessage.success('提交审核成功');
|
||||||
|
row.status = '1';
|
||||||
|
getData(); // 刷新表格数据
|
||||||
|
} else {
|
||||||
|
ElMessage.error(res.msg || '提交审核失败');
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
ElMessage.error('提交审核失败');
|
||||||
|
}
|
||||||
|
};
|
||||||
// 重新提交(被驳回 → 待审核)
|
// 重新提交(被驳回 → 待审核)
|
||||||
function handleResubmit(row) {
|
function handleResubmit(row) {
|
||||||
ElMessageBox.confirm('确认重新提交吗?', '重新提交').then(() => {
|
ElMessageBox.confirm('确认重新提交吗?', '重新提交').then(() => {
|
||||||
@ -534,6 +453,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: () => handleSubmitApprove(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">
|
||||||
|
|||||||
@ -30,7 +30,7 @@
|
|||||||
</avue-crud>
|
</avue-crud>
|
||||||
|
|
||||||
<!-- 新增弹窗 -->
|
<!-- 新增弹窗 -->
|
||||||
<el-dialog :key="dialogTitle" v-model="dialogVisible" :title="dialogTitle" width="80%" align-center :draggable="true">
|
<el-dialog :key="dialogTitle" v-model="dialogVisible" :title="dialogTitle" width="60%" align-center :draggable="true">
|
||||||
<el-form :model="formData" label-width="120px" class="custom-form" :disabled="isReadonly">
|
<el-form :model="formData" label-width="120px" class="custom-form" :disabled="isReadonly">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dialogTitle.value = '编辑';
|
const data = await getFarmerById(row.id);
|
||||||
isReadonly.value = false;
|
|
||||||
dialogVisible.value = true;
|
|
||||||
getFarmerById(row.id).then((data) => {
|
|
||||||
if (data) {
|
if (data) {
|
||||||
|
const addressArr = [data.provinceCode, data.cityCode, data.countyCode, data.townCode, data.villageCode].filter(Boolean);
|
||||||
formData.value = {
|
formData.value = {
|
||||||
...data,
|
...data,
|
||||||
|
addressArr: addressArr,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
dialogTitle.value = '编辑';
|
||||||
|
isReadonly.value = false;
|
||||||
|
nextTick(() => {
|
||||||
|
dialogVisible.value = true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -409,7 +408,6 @@ function handleSubmit(row) {
|
|||||||
};
|
};
|
||||||
approveFarmer(params)
|
approveFarmer(params)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
console.log(`ID=${row.id} 提交审核`);
|
|
||||||
row.rejectReason = ''; // 清空驳回原因
|
row.rejectReason = ''; // 清空驳回原因
|
||||||
getData(); // 重新获取数据
|
getData(); // 重新获取数据
|
||||||
})
|
})
|
||||||
|
|||||||
@ -0,0 +1,324 @@
|
|||||||
|
<template>
|
||||||
|
<div class="custom-page">
|
||||||
|
<h1>耕地</h1>
|
||||||
|
<!-- 搜索 -->
|
||||||
|
<el-form :inline="true" :model="searchForm" class="search-bar">
|
||||||
|
<el-form-item label="关键词">
|
||||||
|
<el-input v-model="searchForm.name" placeholder="请输入关键词" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item lable="">
|
||||||
|
<AreaCascader v-model:region-code="searchForm.regionCode" v-model:grid-id="searchForm.id" :width="600" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" @click="handleSearch"> 搜索 </el-button>
|
||||||
|
<el-button @click="resetSearch"> 重置 </el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<!-- 四个固定 Tabs -->
|
||||||
|
<el-tabs v-model="activeTab" @tab-click="handleTabChange">
|
||||||
|
<!-- <el-tab-pane label="待提交" name="0" /> -->
|
||||||
|
<el-tab-pane label="待审核" name="1" />
|
||||||
|
<el-tab-pane label="已通过" name="2" />
|
||||||
|
<el-tab-pane label="已驳回" name="0" />
|
||||||
|
</el-tabs>
|
||||||
|
<avue-crud
|
||||||
|
ref="crudRef"
|
||||||
|
v-model:page="pageData"
|
||||||
|
:data="crudData"
|
||||||
|
:option="crudOptions"
|
||||||
|
:table-loading="loading"
|
||||||
|
@current-change="handleCurrentChange"
|
||||||
|
@size-change="handleSizeChange"
|
||||||
|
>
|
||||||
|
<!-- <template #menu-left>
|
||||||
|
<el-button type="primary" icon="Plus" @click="handleAdd">新增网格</el-button>
|
||||||
|
</template> -->
|
||||||
|
<template #menu="scope">
|
||||||
|
<custom-table-operate :actions="crudOptions.actions" :data="scope" />
|
||||||
|
</template>
|
||||||
|
</avue-crud>
|
||||||
|
<el-dialog :key="dialogTitle" v-model="visible" :title="dialogTitle" width="60%" align-center :draggable="true">
|
||||||
|
<el-form ref="form" :model="formData" :rules="rules" :disabled="isReadonly" label-width="100px" class="form-item">
|
||||||
|
<p class="form-title">填写网格信息</p>
|
||||||
|
<el-form-item label="网格名称" prop="gridName">
|
||||||
|
<el-input v-model="formData.gridName" placeholder="请输入网格名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="所属行政区域" prop="gridAreaCode">
|
||||||
|
<AreaSelect v-model="formData.gridAreaCode" :label="null" :emit-path="false" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="网格化地图" prop="scopeImg">
|
||||||
|
<FileUploader v-model="formData.scopeImg" :limit="1" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="note">
|
||||||
|
<el-input v-model="formData.note" placeholder="请输入备注" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button @click="handleCancel">取消</el-button>
|
||||||
|
<el-button v-if="!isReadonly" type="primary" @click="handleSubmit()"> 保存 </el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
// ---------------------------------------------------------------------
|
||||||
|
// avue-crud 通用代码
|
||||||
|
// ---------------------------------------------------------------------
|
||||||
|
import { ref, reactive, watch, onMounted, computed, nextTick } from 'vue';
|
||||||
|
import { CRUD_OPTIONS } from '@/config';
|
||||||
|
import { ElMessage, ElMessageBox } from 'element-plus';
|
||||||
|
import { useUserStore } from '@/store/modules/user';
|
||||||
|
import { mockData } from './landData';
|
||||||
|
|
||||||
|
const UserStore = useUserStore();
|
||||||
|
const user = UserStore.getUserInfo();
|
||||||
|
console.log('admin 属性:', user.admin);
|
||||||
|
|
||||||
|
const loading = ref(false);
|
||||||
|
|
||||||
|
const visible = ref(false);
|
||||||
|
const isReadonly = ref(false);
|
||||||
|
const dialogTitle = ref();
|
||||||
|
const activeTab = ref('1');
|
||||||
|
const formData = ref({
|
||||||
|
gridName: '',
|
||||||
|
gridAreaCode: '',
|
||||||
|
scope: '',
|
||||||
|
scopeImg: '',
|
||||||
|
note: '',
|
||||||
|
});
|
||||||
|
const initialFormData = { ...formData.value };
|
||||||
|
const resetForm = () => {
|
||||||
|
formData.value = { ...initialFormData };
|
||||||
|
};
|
||||||
|
|
||||||
|
const pageData = ref({
|
||||||
|
currentPage: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
total: 0,
|
||||||
|
});
|
||||||
|
const searchForm = ref({
|
||||||
|
gridName: '',
|
||||||
|
keyword: '',
|
||||||
|
regionCode: '',
|
||||||
|
id: '',
|
||||||
|
status: -1,
|
||||||
|
});
|
||||||
|
const initialSearchForm = { ...searchForm.value };
|
||||||
|
const resetSearch = () => {
|
||||||
|
searchForm.value = { ...initialSearchForm };
|
||||||
|
};
|
||||||
|
// 过滤对象,只保留有值的属性
|
||||||
|
const filterObject = (obj) => {
|
||||||
|
const newObj = {};
|
||||||
|
Object.keys(obj).forEach((key) => {
|
||||||
|
const value = obj[key];
|
||||||
|
// 检查值是否有效,排除空字符串、null 和 undefined
|
||||||
|
if (value !== '' && value !== null && value !== undefined) {
|
||||||
|
newObj[key] = value;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return newObj;
|
||||||
|
};
|
||||||
|
|
||||||
|
const crudData = ref([]);
|
||||||
|
const crudOptions = reactive({
|
||||||
|
...CRUD_OPTIONS,
|
||||||
|
addBtn: false,
|
||||||
|
header: false,
|
||||||
|
searchBtn: false,
|
||||||
|
emptyBtn: false,
|
||||||
|
refreshBtn: false,
|
||||||
|
height: 'calc(100vh - 360px)',
|
||||||
|
column: [
|
||||||
|
{ label: '地块编号', prop: 'id', width: 160 },
|
||||||
|
{ label: '地块名称', prop: 'landName', width: 170 },
|
||||||
|
{ label: '面积', prop: 'area', formatter: (row, column, cellValue) => `${Number(cellValue).toFixed(2)} 亩` },
|
||||||
|
{ label: '土地分类', prop: 'landTypeName' },
|
||||||
|
{ label: '土壤类型', prop: 'soilTypeName' },
|
||||||
|
{ label: '所属行政区域', prop: 'fullRegionName', width: 160 },
|
||||||
|
{ label: '所属网格', prop: 'gridName', width: 90 },
|
||||||
|
{ label: '具体位置', prop: 'address', width: 160 },
|
||||||
|
{ label: '土地承包经营人', prop: 'propertyName' },
|
||||||
|
{ label: '联系电话', prop: 'propertyPhone' },
|
||||||
|
{ label: '土地经营权证书编号', prop: 'landCode', width: 160 },
|
||||||
|
{ label: '是否土地流转', prop: 'isTransfer' },
|
||||||
|
{ label: '土地受让方', prop: 'transferName' },
|
||||||
|
{ label: '受让方联系电话', prop: 'transferPhone', width: 100 },
|
||||||
|
{ label: '流转合同', prop: 'transferContract' },
|
||||||
|
{ label: '信息填报人', prop: 'fillName' },
|
||||||
|
{ label: '信息填报单位', prop: 'fillGroup' },
|
||||||
|
{ label: '信息填报时间', prop: 'fillTime' },
|
||||||
|
// { label: '信息更新人', prop: 'updateName' },
|
||||||
|
// { label: '信息更新单位', prop: 'updateGroup' },
|
||||||
|
{ 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),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
const handleTabChange = ({ name }) => {
|
||||||
|
// activeTab.value = name;
|
||||||
|
console.log('切换tab', activeTab.value);
|
||||||
|
getData();
|
||||||
|
};
|
||||||
|
const handleRefresh = async () => {
|
||||||
|
searchForm.value = { ...initialSearchForm };
|
||||||
|
getData();
|
||||||
|
};
|
||||||
|
const handleCurrentChange = (val) => {
|
||||||
|
pageData.value.currentPage = val;
|
||||||
|
};
|
||||||
|
const handleSizeChange = (val) => {
|
||||||
|
pageData.value.pageSize = val;
|
||||||
|
};
|
||||||
|
const handleView = (row) => {
|
||||||
|
isReadonly.value = true;
|
||||||
|
formData.value = { ...row };
|
||||||
|
dialogTitle.value = '查看网格';
|
||||||
|
// visible.value = true;
|
||||||
|
};
|
||||||
|
const handleEdit = (row) => {
|
||||||
|
isReadonly.value = false;
|
||||||
|
formData.value = { ...row };
|
||||||
|
dialogTitle.value = '编辑网格';
|
||||||
|
// visible.value = true;
|
||||||
|
};
|
||||||
|
const handleDelete = async (row) => {
|
||||||
|
console.log('删除', row);
|
||||||
|
// try {
|
||||||
|
// await ElMessageBox.confirm('确认删除该网格吗?', '提示', {
|
||||||
|
// confirmButtonText: '确定',
|
||||||
|
// cancelButtonText: '取消',
|
||||||
|
// type: 'warning',
|
||||||
|
// });
|
||||||
|
|
||||||
|
// const response = await deleteGrid(row.id);
|
||||||
|
|
||||||
|
// ElMessage.success('删除成功');
|
||||||
|
// getData();
|
||||||
|
// } catch (error) {
|
||||||
|
// if (error === 'cancel') {
|
||||||
|
// ElMessage.info('已取消删除');
|
||||||
|
// } else {
|
||||||
|
// ElMessage.error('删除失败');
|
||||||
|
// console.error('删除异常:', error);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleSubmit = async () => {
|
||||||
|
console.log('提交表单:', formData.value);
|
||||||
|
try {
|
||||||
|
if (dialogTitle.value === '新增网格') {
|
||||||
|
await createGrid(formData.value);
|
||||||
|
ElMessage.success('新增成功');
|
||||||
|
resetForm();
|
||||||
|
visible.value = false;
|
||||||
|
getData();
|
||||||
|
} else {
|
||||||
|
await updateGrid(formData.value);
|
||||||
|
ElMessage.success('更新成功');
|
||||||
|
resetForm();
|
||||||
|
visible.value = false;
|
||||||
|
getData();
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
ElMessage.error(error.message || '新增失败,请重试');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------
|
||||||
|
// 业务代码
|
||||||
|
// ---------------------------------------------------------------------
|
||||||
|
import { createGrid, updateGrid, deleteGrid, fetchGridList, getGridDetail, exportGrid } from '@/apis/landResourceManagement/gridManagement';
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
getData();
|
||||||
|
});
|
||||||
|
const getData = async () => {
|
||||||
|
// const filteredParams = filterObject(searchForm.value);
|
||||||
|
// const response = await fetchGridList(filteredParams);
|
||||||
|
// crudData.value = Array.isArray(response.data.records) ? response.data.records : [];
|
||||||
|
loading.value = true;
|
||||||
|
// 模拟接口延迟
|
||||||
|
await new Promise((resolve) => setTimeout(resolve, 300));
|
||||||
|
crudData.value = mockData.filter((item) => item.status === activeTab.value);
|
||||||
|
pageData.value.total = crudData.value.length;
|
||||||
|
loading.value = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleAdd = () => {
|
||||||
|
console.log('handleAdd');
|
||||||
|
resetForm();
|
||||||
|
isReadonly.value = false;
|
||||||
|
dialogTitle.value = '新增网格';
|
||||||
|
visible.value = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleSearch = () => {
|
||||||
|
getData();
|
||||||
|
};
|
||||||
|
const handleCancel = () => {
|
||||||
|
visible.value = false;
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.custom-page {
|
||||||
|
padding-bottom: 0px;
|
||||||
|
}
|
||||||
|
h1 {
|
||||||
|
font-size: 20px;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
.search-bar {
|
||||||
|
padding-left: 20px;
|
||||||
|
}
|
||||||
|
:deep(.el-dialog__body) {
|
||||||
|
padding: 20px;
|
||||||
|
height: calc(100vh - 300px);
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
.form-title {
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 500;
|
||||||
|
margin: 30px 0;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
.form-item {
|
||||||
|
width: 500px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
.dialog-footer {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.custom-search {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding-left: 20px;
|
||||||
|
|
||||||
|
.el-button {
|
||||||
|
margin-left: 12px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -0,0 +1,329 @@
|
|||||||
|
<template>
|
||||||
|
<div class="custom-page">
|
||||||
|
<h1>林地</h1>
|
||||||
|
<!-- 搜索 -->
|
||||||
|
<el-form :inline="true" :model="searchForm" class="search-bar">
|
||||||
|
<el-form-item label="关键词">
|
||||||
|
<el-input v-model="searchForm.name" placeholder="请输入关键词" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item lable="">
|
||||||
|
<AreaCascader v-model:region-code="searchForm.regionCode" v-model:grid-id="searchForm.id" :width="600" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" @click="handleSearch"> 搜索 </el-button>
|
||||||
|
<el-button @click="resetSearch"> 重置 </el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<!-- 四个固定 Tabs -->
|
||||||
|
<el-tabs v-model="activeTab" @tab-click="handleTabChange">
|
||||||
|
<!-- <el-tab-pane label="待提交" name="0" /> -->
|
||||||
|
<el-tab-pane label="待审核" name="1" />
|
||||||
|
<el-tab-pane label="已通过" name="2" />
|
||||||
|
<el-tab-pane label="已驳回" name="0" />
|
||||||
|
</el-tabs>
|
||||||
|
<avue-crud
|
||||||
|
ref="crudRef"
|
||||||
|
v-model:page="pageData"
|
||||||
|
:data="crudData"
|
||||||
|
:option="crudOptions"
|
||||||
|
:table-loading="loading"
|
||||||
|
@current-change="handleCurrentChange"
|
||||||
|
@size-change="handleSizeChange"
|
||||||
|
>
|
||||||
|
<!-- <template #menu-left>
|
||||||
|
<el-button type="primary" icon="Plus" @click="handleAdd">新增网格</el-button>
|
||||||
|
</template> -->
|
||||||
|
<template #menu="scope">
|
||||||
|
<custom-table-operate :actions="crudOptions.actions" :data="scope" />
|
||||||
|
</template>
|
||||||
|
</avue-crud>
|
||||||
|
<el-dialog :key="dialogTitle" v-model="visible" :title="dialogTitle" width="60%" align-center :draggable="true">
|
||||||
|
<el-form ref="form" :model="formData" :rules="rules" :disabled="isReadonly" label-width="100px" class="form-item">
|
||||||
|
<p class="form-title">填写网格信息</p>
|
||||||
|
<el-form-item label="网格名称" prop="gridName">
|
||||||
|
<el-input v-model="formData.gridName" placeholder="请输入网格名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="所属行政区域" prop="gridAreaCode">
|
||||||
|
<AreaSelect v-model="formData.gridAreaCode" :label="null" :emit-path="false" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="网格化地图" prop="scopeImg">
|
||||||
|
<FileUploader v-model="formData.scopeImg" :limit="1" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="note">
|
||||||
|
<el-input v-model="formData.note" placeholder="请输入备注" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button @click="handleCancel">取消</el-button>
|
||||||
|
<el-button v-if="!isReadonly" type="primary" @click="handleSubmit()"> 保存 </el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
// ---------------------------------------------------------------------
|
||||||
|
// avue-crud 通用代码
|
||||||
|
// ---------------------------------------------------------------------
|
||||||
|
import { ref, reactive, watch, onMounted, computed, nextTick } from 'vue';
|
||||||
|
import { CRUD_OPTIONS } from '@/config';
|
||||||
|
import { ElMessage, ElMessageBox } from 'element-plus';
|
||||||
|
import { useUserStore } from '@/store/modules/user';
|
||||||
|
import { mockData } from './landData';
|
||||||
|
|
||||||
|
const UserStore = useUserStore();
|
||||||
|
const user = UserStore.getUserInfo();
|
||||||
|
console.log('admin 属性:', user.admin);
|
||||||
|
|
||||||
|
const loading = ref(false);
|
||||||
|
|
||||||
|
const visible = ref(false);
|
||||||
|
const isReadonly = ref(false);
|
||||||
|
const dialogTitle = ref();
|
||||||
|
const activeTab = ref('1');
|
||||||
|
const formData = ref({
|
||||||
|
gridName: '',
|
||||||
|
gridAreaCode: '',
|
||||||
|
scope: '',
|
||||||
|
scopeImg: '',
|
||||||
|
note: '',
|
||||||
|
});
|
||||||
|
const initialFormData = { ...formData.value };
|
||||||
|
const resetForm = () => {
|
||||||
|
formData.value = { ...initialFormData };
|
||||||
|
};
|
||||||
|
|
||||||
|
const pageData = ref({
|
||||||
|
currentPage: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
total: 0,
|
||||||
|
});
|
||||||
|
const searchForm = ref({
|
||||||
|
gridName: '',
|
||||||
|
keyword: '',
|
||||||
|
regionCode: '',
|
||||||
|
id: '',
|
||||||
|
status: -1,
|
||||||
|
});
|
||||||
|
const initialSearchForm = { ...searchForm.value };
|
||||||
|
const resetSearch = () => {
|
||||||
|
searchForm.value = { ...initialSearchForm };
|
||||||
|
};
|
||||||
|
// 过滤对象,只保留有值的属性
|
||||||
|
const filterObject = (obj) => {
|
||||||
|
const newObj = {};
|
||||||
|
Object.keys(obj).forEach((key) => {
|
||||||
|
const value = obj[key];
|
||||||
|
// 检查值是否有效,排除空字符串、null 和 undefined
|
||||||
|
if (value !== '' && value !== null && value !== undefined) {
|
||||||
|
newObj[key] = value;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return newObj;
|
||||||
|
};
|
||||||
|
|
||||||
|
const crudData = ref([]);
|
||||||
|
const crudOptions = reactive({
|
||||||
|
...CRUD_OPTIONS,
|
||||||
|
addBtn: false,
|
||||||
|
header: false,
|
||||||
|
searchBtn: false,
|
||||||
|
emptyBtn: false,
|
||||||
|
refreshBtn: false,
|
||||||
|
height: 'calc(100vh - 360px)',
|
||||||
|
column: [
|
||||||
|
{ label: '地块编号', prop: 'id', width: 160 },
|
||||||
|
{ label: '地块名称', prop: 'landName', width: 170 },
|
||||||
|
{ label: '面积', prop: 'area', formatter: (row, column, cellValue) => `${Number(cellValue).toFixed(2)} 亩` },
|
||||||
|
{ label: '土地分类', prop: 'landTypeName' },
|
||||||
|
{ label: '土壤类型', prop: 'soilTypeName' },
|
||||||
|
{ label: '所属行政区域', prop: 'fullRegionName', width: 160 },
|
||||||
|
{ label: '所属网格', prop: 'gridName', width: 90 },
|
||||||
|
{ label: '具体位置', prop: 'address', width: 160 },
|
||||||
|
{ label: '土地承包经营人', prop: 'propertyName' },
|
||||||
|
{ label: '联系电话', prop: 'propertyPhone' },
|
||||||
|
{ label: '土地经营权证书编号', prop: 'landCode', width: 160 },
|
||||||
|
{ label: '是否土地流转', prop: 'isTransfer' },
|
||||||
|
{ label: '土地受让方', prop: 'transferName' },
|
||||||
|
{ label: '受让方联系电话', prop: 'transferPhone', width: 100 },
|
||||||
|
{ label: '流转合同', prop: 'transferContract' },
|
||||||
|
{ label: '信息填报人', prop: 'fillName' },
|
||||||
|
{ label: '信息填报单位', prop: 'fillGroup' },
|
||||||
|
{ label: '信息填报时间', prop: 'fillTime' },
|
||||||
|
// { label: '信息更新人', prop: 'updateName' },
|
||||||
|
// { label: '信息更新单位', prop: 'updateGroup' },
|
||||||
|
{ 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),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
const handleTabChange = ({ name }) => {
|
||||||
|
// activeTab.value = name;
|
||||||
|
console.log('切换tab', activeTab.value);
|
||||||
|
getData();
|
||||||
|
};
|
||||||
|
const handleRefresh = async () => {
|
||||||
|
searchForm.value = { ...initialSearchForm };
|
||||||
|
getData();
|
||||||
|
};
|
||||||
|
const handleCurrentChange = (val) => {
|
||||||
|
pageData.value.currentPage = val;
|
||||||
|
};
|
||||||
|
const handleSizeChange = (val) => {
|
||||||
|
pageData.value.pageSize = val;
|
||||||
|
};
|
||||||
|
const handleView = (row) => {
|
||||||
|
isReadonly.value = true;
|
||||||
|
formData.value = { ...row };
|
||||||
|
dialogTitle.value = '查看网格';
|
||||||
|
// visible.value = true;
|
||||||
|
};
|
||||||
|
const handleEdit = (row) => {
|
||||||
|
isReadonly.value = false;
|
||||||
|
formData.value = { ...row };
|
||||||
|
dialogTitle.value = '编辑网格';
|
||||||
|
// visible.value = true;
|
||||||
|
};
|
||||||
|
const handleDelete = async (row) => {
|
||||||
|
console.log('删除', row);
|
||||||
|
// try {
|
||||||
|
// await ElMessageBox.confirm('确认删除该网格吗?', '提示', {
|
||||||
|
// confirmButtonText: '确定',
|
||||||
|
// cancelButtonText: '取消',
|
||||||
|
// type: 'warning',
|
||||||
|
// });
|
||||||
|
|
||||||
|
// const response = await deleteGrid(row.id);
|
||||||
|
|
||||||
|
// ElMessage.success('删除成功');
|
||||||
|
// getData();
|
||||||
|
// } catch (error) {
|
||||||
|
// if (error === 'cancel') {
|
||||||
|
// ElMessage.info('已取消删除');
|
||||||
|
// } else {
|
||||||
|
// ElMessage.error('删除失败');
|
||||||
|
// console.error('删除异常:', error);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleSubmit = async () => {
|
||||||
|
console.log('提交表单:', formData.value);
|
||||||
|
try {
|
||||||
|
if (dialogTitle.value === '新增网格') {
|
||||||
|
await createGrid(formData.value);
|
||||||
|
ElMessage.success('新增成功');
|
||||||
|
resetForm();
|
||||||
|
visible.value = false;
|
||||||
|
getData();
|
||||||
|
} else {
|
||||||
|
await updateGrid(formData.value);
|
||||||
|
ElMessage.success('更新成功');
|
||||||
|
resetForm();
|
||||||
|
visible.value = false;
|
||||||
|
getData();
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
ElMessage.error(error.message || '新增失败,请重试');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------
|
||||||
|
// 业务代码
|
||||||
|
// ---------------------------------------------------------------------
|
||||||
|
import { createGrid, updateGrid, deleteGrid, fetchGridList, getGridDetail, exportGrid } from '@/apis/landResourceManagement/gridManagement';
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
getData();
|
||||||
|
});
|
||||||
|
const getData = async () => {
|
||||||
|
// const filteredParams = filterObject(searchForm.value);
|
||||||
|
// const response = await fetchGridList(filteredParams);
|
||||||
|
// crudData.value = Array.isArray(response.data.records) ? response.data.records : [];
|
||||||
|
loading.value = true;
|
||||||
|
// 模拟接口延迟
|
||||||
|
await new Promise((resolve) => setTimeout(resolve, 300));
|
||||||
|
crudData.value = mockData
|
||||||
|
.filter((item) => item.status === activeTab.value)
|
||||||
|
.map((item) => ({
|
||||||
|
...item,
|
||||||
|
landTypeName: '林地',
|
||||||
|
}));
|
||||||
|
pageData.value.total = crudData.value.length;
|
||||||
|
loading.value = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleAdd = () => {
|
||||||
|
console.log('handleAdd');
|
||||||
|
resetForm();
|
||||||
|
isReadonly.value = false;
|
||||||
|
dialogTitle.value = '新增网格';
|
||||||
|
visible.value = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleSearch = () => {
|
||||||
|
getData();
|
||||||
|
};
|
||||||
|
const handleCancel = () => {
|
||||||
|
visible.value = false;
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.custom-page {
|
||||||
|
padding-bottom: 0px;
|
||||||
|
}
|
||||||
|
h1 {
|
||||||
|
font-size: 20px;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
.search-bar {
|
||||||
|
padding-left: 20px;
|
||||||
|
}
|
||||||
|
:deep(.el-dialog__body) {
|
||||||
|
padding: 20px;
|
||||||
|
height: calc(100vh - 300px);
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
.form-title {
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 500;
|
||||||
|
margin: 30px 0;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
.form-item {
|
||||||
|
width: 500px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
.dialog-footer {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.custom-search {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding-left: 20px;
|
||||||
|
|
||||||
|
.el-button {
|
||||||
|
margin-left: 12px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -0,0 +1,329 @@
|
|||||||
|
<template>
|
||||||
|
<div class="custom-page">
|
||||||
|
<h1>草地</h1>
|
||||||
|
<!-- 搜索 -->
|
||||||
|
<el-form :inline="true" :model="searchForm" class="search-bar">
|
||||||
|
<el-form-item label="关键词">
|
||||||
|
<el-input v-model="searchForm.name" placeholder="请输入关键词" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item lable="">
|
||||||
|
<AreaCascader v-model:region-code="searchForm.regionCode" v-model:grid-id="searchForm.id" :width="600" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" @click="handleSearch"> 搜索 </el-button>
|
||||||
|
<el-button @click="resetSearch"> 重置 </el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<!-- 四个固定 Tabs -->
|
||||||
|
<el-tabs v-model="activeTab" @tab-click="handleTabChange">
|
||||||
|
<!-- <el-tab-pane label="待提交" name="0" /> -->
|
||||||
|
<el-tab-pane label="待审核" name="1" />
|
||||||
|
<el-tab-pane label="已通过" name="2" />
|
||||||
|
<el-tab-pane label="已驳回" name="0" />
|
||||||
|
</el-tabs>
|
||||||
|
<avue-crud
|
||||||
|
ref="crudRef"
|
||||||
|
v-model:page="pageData"
|
||||||
|
:data="crudData"
|
||||||
|
:option="crudOptions"
|
||||||
|
:table-loading="loading"
|
||||||
|
@current-change="handleCurrentChange"
|
||||||
|
@size-change="handleSizeChange"
|
||||||
|
>
|
||||||
|
<!-- <template #menu-left>
|
||||||
|
<el-button type="primary" icon="Plus" @click="handleAdd">新增网格</el-button>
|
||||||
|
</template> -->
|
||||||
|
<template #menu="scope">
|
||||||
|
<custom-table-operate :actions="crudOptions.actions" :data="scope" />
|
||||||
|
</template>
|
||||||
|
</avue-crud>
|
||||||
|
<el-dialog :key="dialogTitle" v-model="visible" :title="dialogTitle" width="60%" align-center :draggable="true">
|
||||||
|
<el-form ref="form" :model="formData" :rules="rules" :disabled="isReadonly" label-width="100px" class="form-item">
|
||||||
|
<p class="form-title">填写网格信息</p>
|
||||||
|
<el-form-item label="网格名称" prop="gridName">
|
||||||
|
<el-input v-model="formData.gridName" placeholder="请输入网格名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="所属行政区域" prop="gridAreaCode">
|
||||||
|
<AreaSelect v-model="formData.gridAreaCode" :label="null" :emit-path="false" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="网格化地图" prop="scopeImg">
|
||||||
|
<FileUploader v-model="formData.scopeImg" :limit="1" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="note">
|
||||||
|
<el-input v-model="formData.note" placeholder="请输入备注" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button @click="handleCancel">取消</el-button>
|
||||||
|
<el-button v-if="!isReadonly" type="primary" @click="handleSubmit()"> 保存 </el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
// ---------------------------------------------------------------------
|
||||||
|
// avue-crud 通用代码
|
||||||
|
// ---------------------------------------------------------------------
|
||||||
|
import { ref, reactive, watch, onMounted, computed, nextTick } from 'vue';
|
||||||
|
import { CRUD_OPTIONS } from '@/config';
|
||||||
|
import { ElMessage, ElMessageBox } from 'element-plus';
|
||||||
|
import { useUserStore } from '@/store/modules/user';
|
||||||
|
import { mockData } from './landData';
|
||||||
|
|
||||||
|
const UserStore = useUserStore();
|
||||||
|
const user = UserStore.getUserInfo();
|
||||||
|
console.log('admin 属性:', user.admin);
|
||||||
|
|
||||||
|
const loading = ref(false);
|
||||||
|
|
||||||
|
const visible = ref(false);
|
||||||
|
const isReadonly = ref(false);
|
||||||
|
const dialogTitle = ref();
|
||||||
|
const activeTab = ref('1');
|
||||||
|
const formData = ref({
|
||||||
|
gridName: '',
|
||||||
|
gridAreaCode: '',
|
||||||
|
scope: '',
|
||||||
|
scopeImg: '',
|
||||||
|
note: '',
|
||||||
|
});
|
||||||
|
const initialFormData = { ...formData.value };
|
||||||
|
const resetForm = () => {
|
||||||
|
formData.value = { ...initialFormData };
|
||||||
|
};
|
||||||
|
|
||||||
|
const pageData = ref({
|
||||||
|
currentPage: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
total: 0,
|
||||||
|
});
|
||||||
|
const searchForm = ref({
|
||||||
|
gridName: '',
|
||||||
|
keyword: '',
|
||||||
|
regionCode: '',
|
||||||
|
id: '',
|
||||||
|
status: -1,
|
||||||
|
});
|
||||||
|
const initialSearchForm = { ...searchForm.value };
|
||||||
|
const resetSearch = () => {
|
||||||
|
searchForm.value = { ...initialSearchForm };
|
||||||
|
};
|
||||||
|
// 过滤对象,只保留有值的属性
|
||||||
|
const filterObject = (obj) => {
|
||||||
|
const newObj = {};
|
||||||
|
Object.keys(obj).forEach((key) => {
|
||||||
|
const value = obj[key];
|
||||||
|
// 检查值是否有效,排除空字符串、null 和 undefined
|
||||||
|
if (value !== '' && value !== null && value !== undefined) {
|
||||||
|
newObj[key] = value;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return newObj;
|
||||||
|
};
|
||||||
|
|
||||||
|
const crudData = ref([]);
|
||||||
|
const crudOptions = reactive({
|
||||||
|
...CRUD_OPTIONS,
|
||||||
|
addBtn: false,
|
||||||
|
header: false,
|
||||||
|
searchBtn: false,
|
||||||
|
emptyBtn: false,
|
||||||
|
refreshBtn: false,
|
||||||
|
height: 'calc(100vh - 360px)',
|
||||||
|
column: [
|
||||||
|
{ label: '地块编号', prop: 'id', width: 160 },
|
||||||
|
{ label: '地块名称', prop: 'landName', width: 170 },
|
||||||
|
{ label: '面积', prop: 'area', formatter: (row, column, cellValue) => `${Number(cellValue).toFixed(2)} 亩` },
|
||||||
|
{ label: '土地分类', prop: 'landTypeName' },
|
||||||
|
{ label: '土壤类型', prop: 'soilTypeName' },
|
||||||
|
{ label: '所属行政区域', prop: 'fullRegionName', width: 160 },
|
||||||
|
{ label: '所属网格', prop: 'gridName', width: 90 },
|
||||||
|
{ label: '具体位置', prop: 'address', width: 160 },
|
||||||
|
{ label: '土地承包经营人', prop: 'propertyName' },
|
||||||
|
{ label: '联系电话', prop: 'propertyPhone' },
|
||||||
|
{ label: '土地经营权证书编号', prop: 'landCode', width: 160 },
|
||||||
|
{ label: '是否土地流转', prop: 'isTransfer' },
|
||||||
|
{ label: '土地受让方', prop: 'transferName' },
|
||||||
|
{ label: '受让方联系电话', prop: 'transferPhone', width: 100 },
|
||||||
|
{ label: '流转合同', prop: 'transferContract' },
|
||||||
|
{ label: '信息填报人', prop: 'fillName' },
|
||||||
|
{ label: '信息填报单位', prop: 'fillGroup' },
|
||||||
|
{ label: '信息填报时间', prop: 'fillTime' },
|
||||||
|
// { label: '信息更新人', prop: 'updateName' },
|
||||||
|
// { label: '信息更新单位', prop: 'updateGroup' },
|
||||||
|
{ 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),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
const handleTabChange = ({ name }) => {
|
||||||
|
// activeTab.value = name;
|
||||||
|
console.log('切换tab', activeTab.value);
|
||||||
|
getData();
|
||||||
|
};
|
||||||
|
const handleRefresh = async () => {
|
||||||
|
searchForm.value = { ...initialSearchForm };
|
||||||
|
getData();
|
||||||
|
};
|
||||||
|
const handleCurrentChange = (val) => {
|
||||||
|
pageData.value.currentPage = val;
|
||||||
|
};
|
||||||
|
const handleSizeChange = (val) => {
|
||||||
|
pageData.value.pageSize = val;
|
||||||
|
};
|
||||||
|
const handleView = (row) => {
|
||||||
|
isReadonly.value = true;
|
||||||
|
formData.value = { ...row };
|
||||||
|
dialogTitle.value = '查看网格';
|
||||||
|
// visible.value = true;
|
||||||
|
};
|
||||||
|
const handleEdit = (row) => {
|
||||||
|
isReadonly.value = false;
|
||||||
|
formData.value = { ...row };
|
||||||
|
dialogTitle.value = '编辑网格';
|
||||||
|
// visible.value = true;
|
||||||
|
};
|
||||||
|
const handleDelete = async (row) => {
|
||||||
|
console.log('删除', row);
|
||||||
|
// try {
|
||||||
|
// await ElMessageBox.confirm('确认删除该网格吗?', '提示', {
|
||||||
|
// confirmButtonText: '确定',
|
||||||
|
// cancelButtonText: '取消',
|
||||||
|
// type: 'warning',
|
||||||
|
// });
|
||||||
|
|
||||||
|
// const response = await deleteGrid(row.id);
|
||||||
|
|
||||||
|
// ElMessage.success('删除成功');
|
||||||
|
// getData();
|
||||||
|
// } catch (error) {
|
||||||
|
// if (error === 'cancel') {
|
||||||
|
// ElMessage.info('已取消删除');
|
||||||
|
// } else {
|
||||||
|
// ElMessage.error('删除失败');
|
||||||
|
// console.error('删除异常:', error);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleSubmit = async () => {
|
||||||
|
console.log('提交表单:', formData.value);
|
||||||
|
try {
|
||||||
|
if (dialogTitle.value === '新增网格') {
|
||||||
|
await createGrid(formData.value);
|
||||||
|
ElMessage.success('新增成功');
|
||||||
|
resetForm();
|
||||||
|
visible.value = false;
|
||||||
|
getData();
|
||||||
|
} else {
|
||||||
|
await updateGrid(formData.value);
|
||||||
|
ElMessage.success('更新成功');
|
||||||
|
resetForm();
|
||||||
|
visible.value = false;
|
||||||
|
getData();
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
ElMessage.error(error.message || '新增失败,请重试');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------
|
||||||
|
// 业务代码
|
||||||
|
// ---------------------------------------------------------------------
|
||||||
|
import { createGrid, updateGrid, deleteGrid, fetchGridList, getGridDetail, exportGrid } from '@/apis/landResourceManagement/gridManagement';
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
getData();
|
||||||
|
});
|
||||||
|
const getData = async () => {
|
||||||
|
// const filteredParams = filterObject(searchForm.value);
|
||||||
|
// const response = await fetchGridList(filteredParams);
|
||||||
|
// crudData.value = Array.isArray(response.data.records) ? response.data.records : [];
|
||||||
|
loading.value = true;
|
||||||
|
// 模拟接口延迟
|
||||||
|
await new Promise((resolve) => setTimeout(resolve, 300));
|
||||||
|
crudData.value = mockData
|
||||||
|
.filter((item) => item.status === activeTab.value)
|
||||||
|
.map((item) => ({
|
||||||
|
...item,
|
||||||
|
landTypeName: '草地',
|
||||||
|
}));
|
||||||
|
pageData.value.total = crudData.value.length;
|
||||||
|
loading.value = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleAdd = () => {
|
||||||
|
console.log('handleAdd');
|
||||||
|
resetForm();
|
||||||
|
isReadonly.value = false;
|
||||||
|
dialogTitle.value = '新增网格';
|
||||||
|
visible.value = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleSearch = () => {
|
||||||
|
getData();
|
||||||
|
};
|
||||||
|
const handleCancel = () => {
|
||||||
|
visible.value = false;
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.custom-page {
|
||||||
|
padding-bottom: 0px;
|
||||||
|
}
|
||||||
|
h1 {
|
||||||
|
font-size: 20px;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
.search-bar {
|
||||||
|
padding-left: 20px;
|
||||||
|
}
|
||||||
|
:deep(.el-dialog__body) {
|
||||||
|
padding: 20px;
|
||||||
|
height: calc(100vh - 300px);
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
.form-title {
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 500;
|
||||||
|
margin: 30px 0;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
.form-item {
|
||||||
|
width: 500px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
.dialog-footer {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.custom-search {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding-left: 20px;
|
||||||
|
|
||||||
|
.el-button {
|
||||||
|
margin-left: 12px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
<template>
|
||||||
|
<div class="custom-page" :style="`background-image: url(${getAssetsFile('images/landBase/land1.png')})`">
|
||||||
|
<!-- <h1>统计数据</h1>
|
||||||
|
<div class="content"></div> -->
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref, watch, onMounted, computed } from 'vue';
|
||||||
|
import { getAssetsFile } from '@/utils';
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.custom-page {
|
||||||
|
height: calc(100vh - 150px);
|
||||||
|
background-size: cover;
|
||||||
|
// background-position: center;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -0,0 +1,329 @@
|
|||||||
|
<template>
|
||||||
|
<div class="custom-page">
|
||||||
|
<h1>园地</h1>
|
||||||
|
<!-- 搜索 -->
|
||||||
|
<el-form :inline="true" :model="searchForm" class="search-bar">
|
||||||
|
<el-form-item label="关键词">
|
||||||
|
<el-input v-model="searchForm.name" placeholder="请输入关键词" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item lable="">
|
||||||
|
<AreaCascader v-model:region-code="searchForm.regionCode" v-model:grid-id="searchForm.id" :width="600" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" @click="handleSearch"> 搜索 </el-button>
|
||||||
|
<el-button @click="resetSearch"> 重置 </el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<!-- 四个固定 Tabs -->
|
||||||
|
<el-tabs v-model="activeTab" @tab-click="handleTabChange">
|
||||||
|
<!-- <el-tab-pane label="待提交" name="0" /> -->
|
||||||
|
<el-tab-pane label="待审核" name="1" />
|
||||||
|
<el-tab-pane label="已通过" name="2" />
|
||||||
|
<el-tab-pane label="已驳回" name="0" />
|
||||||
|
</el-tabs>
|
||||||
|
<avue-crud
|
||||||
|
ref="crudRef"
|
||||||
|
v-model:page="pageData"
|
||||||
|
:data="crudData"
|
||||||
|
:option="crudOptions"
|
||||||
|
:table-loading="loading"
|
||||||
|
@current-change="handleCurrentChange"
|
||||||
|
@size-change="handleSizeChange"
|
||||||
|
>
|
||||||
|
<!-- <template #menu-left>
|
||||||
|
<el-button type="primary" icon="Plus" @click="handleAdd">新增网格</el-button>
|
||||||
|
</template> -->
|
||||||
|
<template #menu="scope">
|
||||||
|
<custom-table-operate :actions="crudOptions.actions" :data="scope" />
|
||||||
|
</template>
|
||||||
|
</avue-crud>
|
||||||
|
<el-dialog :key="dialogTitle" v-model="visible" :title="dialogTitle" width="60%" align-center :draggable="true">
|
||||||
|
<el-form ref="form" :model="formData" :rules="rules" :disabled="isReadonly" label-width="100px" class="form-item">
|
||||||
|
<p class="form-title">填写网格信息</p>
|
||||||
|
<el-form-item label="网格名称" prop="gridName">
|
||||||
|
<el-input v-model="formData.gridName" placeholder="请输入网格名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="所属行政区域" prop="gridAreaCode">
|
||||||
|
<AreaSelect v-model="formData.gridAreaCode" :label="null" :emit-path="false" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="网格化地图" prop="scopeImg">
|
||||||
|
<FileUploader v-model="formData.scopeImg" :limit="1" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="note">
|
||||||
|
<el-input v-model="formData.note" placeholder="请输入备注" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button @click="handleCancel">取消</el-button>
|
||||||
|
<el-button v-if="!isReadonly" type="primary" @click="handleSubmit()"> 保存 </el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
// ---------------------------------------------------------------------
|
||||||
|
// avue-crud 通用代码
|
||||||
|
// ---------------------------------------------------------------------
|
||||||
|
import { ref, reactive, watch, onMounted, computed, nextTick } from 'vue';
|
||||||
|
import { CRUD_OPTIONS } from '@/config';
|
||||||
|
import { ElMessage, ElMessageBox } from 'element-plus';
|
||||||
|
import { useUserStore } from '@/store/modules/user';
|
||||||
|
import { mockData } from './landData';
|
||||||
|
|
||||||
|
const UserStore = useUserStore();
|
||||||
|
const user = UserStore.getUserInfo();
|
||||||
|
console.log('admin 属性:', user.admin);
|
||||||
|
|
||||||
|
const loading = ref(false);
|
||||||
|
|
||||||
|
const visible = ref(false);
|
||||||
|
const isReadonly = ref(false);
|
||||||
|
const dialogTitle = ref();
|
||||||
|
const activeTab = ref('1');
|
||||||
|
const formData = ref({
|
||||||
|
gridName: '',
|
||||||
|
gridAreaCode: '',
|
||||||
|
scope: '',
|
||||||
|
scopeImg: '',
|
||||||
|
note: '',
|
||||||
|
});
|
||||||
|
const initialFormData = { ...formData.value };
|
||||||
|
const resetForm = () => {
|
||||||
|
formData.value = { ...initialFormData };
|
||||||
|
};
|
||||||
|
|
||||||
|
const pageData = ref({
|
||||||
|
currentPage: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
total: 0,
|
||||||
|
});
|
||||||
|
const searchForm = ref({
|
||||||
|
gridName: '',
|
||||||
|
keyword: '',
|
||||||
|
regionCode: '',
|
||||||
|
id: '',
|
||||||
|
status: -1,
|
||||||
|
});
|
||||||
|
const initialSearchForm = { ...searchForm.value };
|
||||||
|
const resetSearch = () => {
|
||||||
|
searchForm.value = { ...initialSearchForm };
|
||||||
|
};
|
||||||
|
// 过滤对象,只保留有值的属性
|
||||||
|
const filterObject = (obj) => {
|
||||||
|
const newObj = {};
|
||||||
|
Object.keys(obj).forEach((key) => {
|
||||||
|
const value = obj[key];
|
||||||
|
// 检查值是否有效,排除空字符串、null 和 undefined
|
||||||
|
if (value !== '' && value !== null && value !== undefined) {
|
||||||
|
newObj[key] = value;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return newObj;
|
||||||
|
};
|
||||||
|
|
||||||
|
const crudData = ref([]);
|
||||||
|
const crudOptions = reactive({
|
||||||
|
...CRUD_OPTIONS,
|
||||||
|
addBtn: false,
|
||||||
|
header: false,
|
||||||
|
searchBtn: false,
|
||||||
|
emptyBtn: false,
|
||||||
|
refreshBtn: false,
|
||||||
|
height: 'calc(100vh - 360px)',
|
||||||
|
column: [
|
||||||
|
{ label: '地块编号', prop: 'id', width: 160 },
|
||||||
|
{ label: '地块名称', prop: 'landName', width: 170 },
|
||||||
|
{ label: '面积', prop: 'area', formatter: (row, column, cellValue) => `${Number(cellValue).toFixed(2)} 亩` },
|
||||||
|
{ label: '土地分类', prop: 'landTypeName' },
|
||||||
|
{ label: '土壤类型', prop: 'soilTypeName' },
|
||||||
|
{ label: '所属行政区域', prop: 'fullRegionName', width: 160 },
|
||||||
|
{ label: '所属网格', prop: 'gridName', width: 90 },
|
||||||
|
{ label: '具体位置', prop: 'address', width: 160 },
|
||||||
|
{ label: '土地承包经营人', prop: 'propertyName' },
|
||||||
|
{ label: '联系电话', prop: 'propertyPhone' },
|
||||||
|
{ label: '土地经营权证书编号', prop: 'landCode', width: 160 },
|
||||||
|
{ label: '是否土地流转', prop: 'isTransfer' },
|
||||||
|
{ label: '土地受让方', prop: 'transferName' },
|
||||||
|
{ label: '受让方联系电话', prop: 'transferPhone', width: 100 },
|
||||||
|
{ label: '流转合同', prop: 'transferContract' },
|
||||||
|
{ label: '信息填报人', prop: 'fillName' },
|
||||||
|
{ label: '信息填报单位', prop: 'fillGroup' },
|
||||||
|
{ label: '信息填报时间', prop: 'fillTime' },
|
||||||
|
// { label: '信息更新人', prop: 'updateName' },
|
||||||
|
// { label: '信息更新单位', prop: 'updateGroup' },
|
||||||
|
{ 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),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
const handleTabChange = ({ name }) => {
|
||||||
|
// activeTab.value = name;
|
||||||
|
console.log('切换tab', activeTab.value);
|
||||||
|
getData();
|
||||||
|
};
|
||||||
|
const handleRefresh = async () => {
|
||||||
|
searchForm.value = { ...initialSearchForm };
|
||||||
|
getData();
|
||||||
|
};
|
||||||
|
const handleCurrentChange = (val) => {
|
||||||
|
pageData.value.currentPage = val;
|
||||||
|
};
|
||||||
|
const handleSizeChange = (val) => {
|
||||||
|
pageData.value.pageSize = val;
|
||||||
|
};
|
||||||
|
const handleView = (row) => {
|
||||||
|
isReadonly.value = true;
|
||||||
|
formData.value = { ...row };
|
||||||
|
dialogTitle.value = '查看网格';
|
||||||
|
// visible.value = true;
|
||||||
|
};
|
||||||
|
const handleEdit = (row) => {
|
||||||
|
isReadonly.value = false;
|
||||||
|
formData.value = { ...row };
|
||||||
|
dialogTitle.value = '编辑网格';
|
||||||
|
// visible.value = true;
|
||||||
|
};
|
||||||
|
const handleDelete = async (row) => {
|
||||||
|
console.log('删除', row);
|
||||||
|
// try {
|
||||||
|
// await ElMessageBox.confirm('确认删除该网格吗?', '提示', {
|
||||||
|
// confirmButtonText: '确定',
|
||||||
|
// cancelButtonText: '取消',
|
||||||
|
// type: 'warning',
|
||||||
|
// });
|
||||||
|
|
||||||
|
// const response = await deleteGrid(row.id);
|
||||||
|
|
||||||
|
// ElMessage.success('删除成功');
|
||||||
|
// getData();
|
||||||
|
// } catch (error) {
|
||||||
|
// if (error === 'cancel') {
|
||||||
|
// ElMessage.info('已取消删除');
|
||||||
|
// } else {
|
||||||
|
// ElMessage.error('删除失败');
|
||||||
|
// console.error('删除异常:', error);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleSubmit = async () => {
|
||||||
|
console.log('提交表单:', formData.value);
|
||||||
|
try {
|
||||||
|
if (dialogTitle.value === '新增网格') {
|
||||||
|
await createGrid(formData.value);
|
||||||
|
ElMessage.success('新增成功');
|
||||||
|
resetForm();
|
||||||
|
visible.value = false;
|
||||||
|
getData();
|
||||||
|
} else {
|
||||||
|
await updateGrid(formData.value);
|
||||||
|
ElMessage.success('更新成功');
|
||||||
|
resetForm();
|
||||||
|
visible.value = false;
|
||||||
|
getData();
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
ElMessage.error(error.message || '新增失败,请重试');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------
|
||||||
|
// 业务代码
|
||||||
|
// ---------------------------------------------------------------------
|
||||||
|
import { createGrid, updateGrid, deleteGrid, fetchGridList, getGridDetail, exportGrid } from '@/apis/landResourceManagement/gridManagement';
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
getData();
|
||||||
|
});
|
||||||
|
const getData = async () => {
|
||||||
|
// const filteredParams = filterObject(searchForm.value);
|
||||||
|
// const response = await fetchGridList(filteredParams);
|
||||||
|
// crudData.value = Array.isArray(response.data.records) ? response.data.records : [];
|
||||||
|
loading.value = true;
|
||||||
|
// 模拟接口延迟
|
||||||
|
await new Promise((resolve) => setTimeout(resolve, 300));
|
||||||
|
crudData.value = mockData
|
||||||
|
.filter((item) => item.status === activeTab.value)
|
||||||
|
.map((item) => ({
|
||||||
|
...item,
|
||||||
|
landTypeName: '园地',
|
||||||
|
}));
|
||||||
|
pageData.value.total = crudData.value.length;
|
||||||
|
loading.value = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleAdd = () => {
|
||||||
|
console.log('handleAdd');
|
||||||
|
resetForm();
|
||||||
|
isReadonly.value = false;
|
||||||
|
dialogTitle.value = '新增网格';
|
||||||
|
visible.value = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleSearch = () => {
|
||||||
|
getData();
|
||||||
|
};
|
||||||
|
const handleCancel = () => {
|
||||||
|
visible.value = false;
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.custom-page {
|
||||||
|
padding-bottom: 0px;
|
||||||
|
}
|
||||||
|
h1 {
|
||||||
|
font-size: 20px;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
.search-bar {
|
||||||
|
padding-left: 20px;
|
||||||
|
}
|
||||||
|
:deep(.el-dialog__body) {
|
||||||
|
padding: 20px;
|
||||||
|
height: calc(100vh - 300px);
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
.form-title {
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 500;
|
||||||
|
margin: 30px 0;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
.form-item {
|
||||||
|
width: 500px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
.dialog-footer {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.custom-search {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding-left: 20px;
|
||||||
|
|
||||||
|
.el-button {
|
||||||
|
margin-left: 12px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -0,0 +1,17 @@
|
|||||||
|
<template>
|
||||||
|
<div class="custom-page" :style="`background-image: url(${getAssetsFile('images/landBase/land2.png')})`">
|
||||||
|
<!-- <h1>统计数据</h1>
|
||||||
|
<div class="content"></div> -->
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref, watch, onMounted, computed } from 'vue';
|
||||||
|
import { getAssetsFile } from '@/utils';
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.custom-page {
|
||||||
|
height: calc(100vh - 150px);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -0,0 +1,222 @@
|
|||||||
|
export const mockData = [
|
||||||
|
{
|
||||||
|
id: 'GM2025001',
|
||||||
|
landName: '耿马镇允楞村耕地一号',
|
||||||
|
area: 8.72,
|
||||||
|
landTypeName: '耕地',
|
||||||
|
soilTypeName: '红壤',
|
||||||
|
fullRegionName: '云南省临沧市耿马傣族佤族自治县耿马镇允楞村',
|
||||||
|
gridName: '耿马网格1',
|
||||||
|
address: '允楞村委会旁',
|
||||||
|
propertyName: '刘勇',
|
||||||
|
propertyPhone: '15908761234',
|
||||||
|
landCode: 'GM2025-E1',
|
||||||
|
isTransfer: '否',
|
||||||
|
transferName: '',
|
||||||
|
transferPhone: '',
|
||||||
|
transferContract: '',
|
||||||
|
fillName: '赵敏',
|
||||||
|
fillGroup: '耿马镇农业服务中心',
|
||||||
|
fillTime: '2025-06-02 08:45:00',
|
||||||
|
updateTime: '2025-06-05 13:20:30',
|
||||||
|
status: '0',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'GM2025002',
|
||||||
|
landName: '耿马镇复兴村耕地二号',
|
||||||
|
area: 12.34,
|
||||||
|
landTypeName: '耕地',
|
||||||
|
soilTypeName: '黄壤',
|
||||||
|
fullRegionName: '云南省临沧市耿马傣族佤族自治县耿马镇复兴村',
|
||||||
|
gridName: '耿马网格A',
|
||||||
|
address: '复兴村大路东侧',
|
||||||
|
propertyName: '张芳',
|
||||||
|
propertyPhone: '13607894521',
|
||||||
|
landCode: 'GM2025-E2',
|
||||||
|
isTransfer: '是',
|
||||||
|
transferName: '李强',
|
||||||
|
transferPhone: '13809123456',
|
||||||
|
transferContract: 'HZ-GM-002.pdf',
|
||||||
|
fillName: '王磊',
|
||||||
|
fillGroup: '耿马镇政府',
|
||||||
|
fillTime: '2025-06-03 09:15:00',
|
||||||
|
updateTime: '2025-06-06 14:05:10',
|
||||||
|
status: '1',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'GM2025003',
|
||||||
|
landName: '勐撒镇城子村耕地三号',
|
||||||
|
area: 5.6,
|
||||||
|
landTypeName: '耕地',
|
||||||
|
soilTypeName: '壤土',
|
||||||
|
fullRegionName: '云南省临沧市耿马傣族佤族自治县勐撒镇城子村',
|
||||||
|
gridName: '勐撒网格B',
|
||||||
|
address: '城子村太阳路北侧',
|
||||||
|
propertyName: '赵杰',
|
||||||
|
propertyPhone: '15012346789',
|
||||||
|
landCode: 'GM2025-E3',
|
||||||
|
isTransfer: '否',
|
||||||
|
transferName: '',
|
||||||
|
transferPhone: '',
|
||||||
|
transferContract: '',
|
||||||
|
fillName: '孙丽',
|
||||||
|
fillGroup: '勐撒镇农业站',
|
||||||
|
fillTime: '2025-06-04 10:30:00',
|
||||||
|
updateTime: '2025-06-07 16:40:45',
|
||||||
|
status: '2',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'GM2025004',
|
||||||
|
landName: '孟定镇罕宏村耕地四号',
|
||||||
|
area: 14.28,
|
||||||
|
landTypeName: '耕地',
|
||||||
|
soilTypeName: '砂壤',
|
||||||
|
fullRegionName: '云南省临沧市耿马傣族佤族自治县孟定镇罕宏村',
|
||||||
|
gridName: '孟定网格C',
|
||||||
|
address: '罕宏村公路旁',
|
||||||
|
propertyName: '周涛',
|
||||||
|
propertyPhone: '15876543210',
|
||||||
|
landCode: 'GM2025-E4',
|
||||||
|
isTransfer: '是',
|
||||||
|
transferName: '吴静',
|
||||||
|
transferPhone: '13987654321',
|
||||||
|
transferContract: 'HZ-GM-004.pdf',
|
||||||
|
fillName: '郑勇',
|
||||||
|
fillGroup: '孟定镇人民政府',
|
||||||
|
fillTime: '2025-06-05 11:50:00',
|
||||||
|
updateTime: '2025-06-08 09:10:20',
|
||||||
|
status: '0',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'GM2025005',
|
||||||
|
landName: '贺派乡芒抗村耕地五号',
|
||||||
|
area: 7.95,
|
||||||
|
landTypeName: '耕地',
|
||||||
|
soilTypeName: '钙质红壤',
|
||||||
|
fullRegionName: '云南省临沧市耿马傣族佤族自治县贺派乡芒抗村',
|
||||||
|
gridName: '贺派网格D',
|
||||||
|
address: '芒抗村文化站东侧',
|
||||||
|
propertyName: '钱海',
|
||||||
|
propertyPhone: '13765432109',
|
||||||
|
landCode: 'GM2025-E5',
|
||||||
|
isTransfer: '否',
|
||||||
|
transferName: '',
|
||||||
|
transferPhone: '',
|
||||||
|
transferContract: '',
|
||||||
|
fillName: '李霞',
|
||||||
|
fillGroup: '贺派乡农村合作社',
|
||||||
|
fillTime: '2025-06-06 08:20:00',
|
||||||
|
updateTime: '2025-06-09 15:35:30',
|
||||||
|
status: '1',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'GM2025006',
|
||||||
|
landName: '四排山乡东坡村耕地六号',
|
||||||
|
area: 10.5,
|
||||||
|
landTypeName: '耕地',
|
||||||
|
soilTypeName: '红壤',
|
||||||
|
fullRegionName: '云南省临沧市耿马傣族佤族自治县四排山乡东坡村',
|
||||||
|
gridName: '四排山网格E',
|
||||||
|
address: '东坡村卫生室旁',
|
||||||
|
propertyName: '吴强',
|
||||||
|
propertyPhone: '15123459876',
|
||||||
|
landCode: 'GM2025-E6',
|
||||||
|
isTransfer: '否',
|
||||||
|
transferName: '',
|
||||||
|
transferPhone: '',
|
||||||
|
transferContract: '',
|
||||||
|
fillName: '赵慧',
|
||||||
|
fillGroup: '四排山乡政府',
|
||||||
|
fillTime: '2025-06-07 09:40:00',
|
||||||
|
updateTime: '2025-06-10 12:25:15',
|
||||||
|
status: '2',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'GM2025007',
|
||||||
|
landName: '勐撒镇箐门口村耕地七号',
|
||||||
|
area: 6.3,
|
||||||
|
landTypeName: '耕地',
|
||||||
|
soilTypeName: '砂壤',
|
||||||
|
fullRegionName: '云南省临沧市耿马傣族佤族自治县勐撒镇箐门口村',
|
||||||
|
gridName: '勐撒网格F',
|
||||||
|
address: '箐门口村村委路口',
|
||||||
|
propertyName: '郑飞',
|
||||||
|
propertyPhone: '15234568790',
|
||||||
|
landCode: 'GM2025-E7',
|
||||||
|
isTransfer: '是',
|
||||||
|
transferName: '孙敏',
|
||||||
|
transferPhone: '15345678901',
|
||||||
|
transferContract: 'HZ-GM-007.pdf',
|
||||||
|
fillName: '钱军',
|
||||||
|
fillGroup: '勐撒镇综治办',
|
||||||
|
fillTime: '2025-06-08 14:10:00',
|
||||||
|
updateTime: '2025-06-11 11:55:45',
|
||||||
|
status: '0',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'GM2025008',
|
||||||
|
landName: '孟定镇景信村耕地八号',
|
||||||
|
area: 9.11,
|
||||||
|
landTypeName: '耕地',
|
||||||
|
soilTypeName: '壤土',
|
||||||
|
fullRegionName: '云南省临沧市耿马傣族佤族自治县孟定镇景信村',
|
||||||
|
gridName: '孟定网格G',
|
||||||
|
address: '景信村村口',
|
||||||
|
propertyName: '钱芳',
|
||||||
|
propertyPhone: '15456789012',
|
||||||
|
landCode: 'GM2025-E8',
|
||||||
|
isTransfer: '否',
|
||||||
|
transferName: '',
|
||||||
|
transferPhone: '',
|
||||||
|
transferContract: '',
|
||||||
|
fillName: '李强',
|
||||||
|
fillGroup: '孟定镇农业站',
|
||||||
|
fillTime: '2025-06-09 10:05:00',
|
||||||
|
updateTime: '2025-06-12 13:40:30',
|
||||||
|
status: '1',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'GM2025009',
|
||||||
|
landName: '耿马镇团结村耕地九号',
|
||||||
|
area: 11.76,
|
||||||
|
landTypeName: '耕地',
|
||||||
|
soilTypeName: '红壤',
|
||||||
|
fullRegionName: '云南省临沧市耿马傣族佤族自治县耿马镇团结村',
|
||||||
|
gridName: '耿马网格H',
|
||||||
|
address: '团结村大桥旁',
|
||||||
|
propertyName: '孙明',
|
||||||
|
propertyPhone: '15567890123',
|
||||||
|
landCode: 'GM2025-E9',
|
||||||
|
isTransfer: '否',
|
||||||
|
transferName: '',
|
||||||
|
transferPhone: '',
|
||||||
|
transferContract: '',
|
||||||
|
fillName: '周杰',
|
||||||
|
fillGroup: '耿马镇政府',
|
||||||
|
fillTime: '2025-06-10 11:30:00',
|
||||||
|
updateTime: '2025-06-13 16:15:20',
|
||||||
|
status: '2',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'GM2025010',
|
||||||
|
landName: '贺派乡落阳村耕地十号',
|
||||||
|
area: 7.22,
|
||||||
|
landTypeName: '耕地',
|
||||||
|
soilTypeName: '砂壤',
|
||||||
|
fullRegionName: '云南省临沧市耿马傣族佤族自治县贺派乡落阳村',
|
||||||
|
gridName: '贺派网格I',
|
||||||
|
address: '落阳村学校旁',
|
||||||
|
propertyName: '李平',
|
||||||
|
propertyPhone: '15678901234',
|
||||||
|
landCode: 'GM2025-E10',
|
||||||
|
isTransfer: '是',
|
||||||
|
transferName: '王敏',
|
||||||
|
transferPhone: '15789012345',
|
||||||
|
transferContract: 'HZ-GM-010.pdf',
|
||||||
|
fillName: '张华',
|
||||||
|
fillGroup: '贺派乡综治办',
|
||||||
|
fillTime: '2025-06-11 13:00:00',
|
||||||
|
updateTime: '2025-06-14 09:50:55',
|
||||||
|
status: '0',
|
||||||
|
},
|
||||||
|
];
|
||||||
@ -415,10 +415,4 @@ const onExport = () => {
|
|||||||
.dialog-footer {
|
.dialog-footer {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
:deep(.area-cascader-label) {
|
|
||||||
padding: 0 12px 0 0;
|
|
||||||
margin: 0;
|
|
||||||
width: 120px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -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: '海拔(米)',
|
||||||
|
|||||||
@ -1,11 +1,3 @@
|
|||||||
/*
|
|
||||||
* @Descripttion:
|
|
||||||
* @Author: zenghua.wang
|
|
||||||
* @Date: 2022-09-18 21:24:29
|
|
||||||
* @LastEditors: zenghua.wang
|
|
||||||
* @LastEditTime: 2025-03-20 14:24:31
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { defineConfig, loadEnv } from 'vite';
|
import { defineConfig, loadEnv } from 'vite';
|
||||||
import vue from '@vitejs/plugin-vue';
|
import vue from '@vitejs/plugin-vue';
|
||||||
import qiankun from 'vite-plugin-qiankun';
|
import qiankun from 'vite-plugin-qiankun';
|
||||||
|
|||||||
1
sub-operation-service/components.d.ts
vendored
1
sub-operation-service/components.d.ts
vendored
@ -7,6 +7,7 @@ export {}
|
|||||||
|
|
||||||
declare module 'vue' {
|
declare module 'vue' {
|
||||||
export interface GlobalComponents {
|
export interface GlobalComponents {
|
||||||
|
BreadComp: typeof import('./src/components/breadComp.vue')['default']
|
||||||
CenterMap: typeof import('./src/components/centerMap.vue')['default']
|
CenterMap: typeof import('./src/components/centerMap.vue')['default']
|
||||||
CodeDialog: typeof import('./src/components/code-dialog/index.vue')['default']
|
CodeDialog: typeof import('./src/components/code-dialog/index.vue')['default']
|
||||||
copy: typeof import('./src/components/custom-scroll-title copy/index.vue')['default']
|
copy: typeof import('./src/components/custom-scroll-title copy/index.vue')['default']
|
||||||
|
|||||||
@ -88,10 +88,6 @@ const meuns = ref([
|
|||||||
label: '智慧种植',
|
label: '智慧种植',
|
||||||
path: '/sub-operation-service/smartFarm',
|
path: '/sub-operation-service/smartFarm',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: '农事服务',
|
|
||||||
path: '/sub-operation-service/farmService',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: '电商交易',
|
label: '电商交易',
|
||||||
path: '/sub-operation-service/ecommerce',
|
path: '/sub-operation-service/ecommerce',
|
||||||
@ -108,6 +104,10 @@ const meuns = ref([
|
|||||||
label: '仓储物流',
|
label: '仓储物流',
|
||||||
path: '/sub-operation-service/warehouseLogistics',
|
path: '/sub-operation-service/warehouseLogistics',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '农事服务',
|
||||||
|
path: '/sub-operation-service/farmService',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '公共品牌',
|
label: '公共品牌',
|
||||||
path: '/sub-operation-service/brand',
|
path: '/sub-operation-service/brand',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user