From ffed524cd7be2d8eb1d50713e43ed73993f66633 Mon Sep 17 00:00:00 2001 From: 13713575202 <1345916905@qq.com> Date: Mon, 26 May 2025 16:10:52 +0800 Subject: [PATCH] xiabin --- main/.env.development | 4 +- .../.env.development | 4 +- .../src/router/modules/dict.js | 12 +-- .../src/router/modules/lands.js | 12 +-- .../component/annualPlans/index.vue | 4 +- .../component/landCassification/index.vue | 90 +++++++++++++++---- .../src/views/dict/component/region/index.vue | 77 ++++++++-------- .../views/productOperateMain/coOp/index.vue | 50 +++++++++-- .../productOperateMain/enterprise/index.vue | 2 +- .../views/productOperateMain/examine/list.vue | 61 +++++++++---- .../src/views/trace/record/base/index.vue | 8 +- .../src/views/trace/record/seed/index.vue | 56 ++++++------ 12 files changed, 250 insertions(+), 130 deletions(-) diff --git a/main/.env.development b/main/.env.development index 328aab0..422e1d4 100644 --- a/main/.env.development +++ b/main/.env.development @@ -11,7 +11,7 @@ VITE_APP_SUB_GSS = '//localhost:9529/sub-government-screen-service/' VITE_APP_SUB_GSR = '//localhost:9530/new-digital-agriculture-screen/' # 接口 VITE_APP_BASE_API = '/apis' -VITE_APP_BASE_URL = 'http://192.168.18.99:8080' -# VITE_APP_BASE_URL = 'http://192.168.18.14:8080'//线下测试 +# VITE_APP_BASE_URL = 'http://192.168.18.99:8080' +VITE_APP_BASE_URL = 'http://192.168.18.9:8080' VITE_APP_UPLOAD_API = '/uploadApis' VITE_APP_UPLOAD_URL = 'http://192.168.18.99:8080' \ No newline at end of file diff --git a/sub-government-affairs-service/.env.development b/sub-government-affairs-service/.env.development index ec64d21..34cace5 100644 --- a/sub-government-affairs-service/.env.development +++ b/sub-government-affairs-service/.env.development @@ -5,8 +5,8 @@ VITE_APP_MIAN = 'daimp-front-main' VITE_APP_MIAN_URL = 'http://localhost:9000' VITE_APP_NAME = 'sub-government-affairs-service' VITE_APP_BASE_API = '/apis' -VITE_APP_BASE_URL = 'http://192.168.18.99:8080' -# VITE_APP_BASE_URL = 'http://192.168.18.14:8080' +# VITE_APP_BASE_URL = 'http://192.168.18.99:8080' +VITE_APP_BASE_URL = 'http://192.168.18.9:8080' VITE_APP_UPLOAD_API = '/uploadApis' VITE_APP_UPLOAD_URL = 'http://192.168.18.99:9300' # VITE_APP_UPLOAD_URL = 'http://192.168.18.14:8080' \ No newline at end of file diff --git a/sub-government-affairs-service/src/router/modules/dict.js b/sub-government-affairs-service/src/router/modules/dict.js index c8eea4c..ba5f8c3 100644 --- a/sub-government-affairs-service/src/router/modules/dict.js +++ b/sub-government-affairs-service/src/router/modules/dict.js @@ -9,12 +9,12 @@ const dictRoutes = [ redirect: '/sub-government-affairs-service/region', meta: { title: '基础信息维护', icon: 'DocumentRemove' }, children: [ - { - path: '/sub-government-affairs-service/region', - name: 'region', - component: () => import('@/views/dict/component/region/index.vue'), - meta: { title: '行政信息', icon: '' }, - }, + // { + // path: '/sub-government-affairs-service/region', + // name: 'region', + // component: () => import('@/views/dict/component/region/index.vue'), + // meta: { title: '行政信息', icon: '' }, + // }, { path: '/sub-government-affairs-service/landCassification', name: 'landCassification', diff --git a/sub-government-affairs-service/src/router/modules/lands.js b/sub-government-affairs-service/src/router/modules/lands.js index d1226bc..a18c426 100644 --- a/sub-government-affairs-service/src/router/modules/lands.js +++ b/sub-government-affairs-service/src/router/modules/lands.js @@ -15,12 +15,12 @@ const landsRoutes = [ // component: () => import('@/views/landManage/component/landsManage/index.vue'), // meta: { title: '土地信息登记', icon: '' }, // }, - { - path: '/sub-government-affairs-service/plantPlan', - name: 'plantPlan', - component: () => import('@/views/landManage/component/plantPlan/index.vue'), - meta: { title: '种植计划', icon: '' }, - }, + // { + // path: '/sub-government-affairs-service/plantPlan', + // name: 'plantPlan', + // component: () => import('@/views/landManage/component/plantPlan/index.vue'), + // meta: { title: '种植计划', icon: '' }, + // }, { path: '/sub-government-affairs-service/operationRecord', name: 'operationRecord', diff --git a/sub-government-affairs-service/src/views/annualPlan/component/annualPlans/index.vue b/sub-government-affairs-service/src/views/annualPlan/component/annualPlans/index.vue index 6939280..7c9bc3f 100644 --- a/sub-government-affairs-service/src/views/annualPlan/component/annualPlans/index.vue +++ b/sub-government-affairs-service/src/views/annualPlan/component/annualPlans/index.vue @@ -130,7 +130,7 @@ const state = reactive({ }, }, { - label: '种植面积', + label: '种植面积(亩)', prop: 'plantingArea', rules: { required: true, @@ -156,7 +156,7 @@ const state = reactive({ }, }, { - label: '生长周期', + label: '生长周期(周)', prop: 'growthCycle', width: '120px', viewDisabled: true, diff --git a/sub-government-affairs-service/src/views/dict/component/landCassification/index.vue b/sub-government-affairs-service/src/views/dict/component/landCassification/index.vue index d392829..0d43261 100644 --- a/sub-government-affairs-service/src/views/dict/component/landCassification/index.vue +++ b/sub-government-affairs-service/src/views/dict/component/landCassification/index.vue @@ -2,7 +2,7 @@
- + + + + + + + + + + @@ -83,10 +123,16 @@ const state = reactive({ selection: [], options: { ...CRUD_OPTIONS, + headerAlign: 'center', + align: 'center', + border: true, + index: true, + rowKey: 'id', + rowParentKey: 'pid', dialogWidth: 600, selection: false, column: [ - { label: '编号', prop: 'id', addDisplay: false, editDisplay: false }, + // { label: '编号', prop: 'id', addDisplay: false, editDisplay: false }, { label: '分类名称', prop: 'landType', @@ -198,7 +244,14 @@ const getLandTree = async () => { try { const res = await getLandTypeTree(); if (res.code == 200) { + const { current, size, total, records } = res.data; treeData.value = [{ id: '0', landType: '土地分类', children: res.data }]; + state.data = treeData.value; + state.pageData = { + currentPage: current || 1, + pageSize: size || 10, + total: total, + }; } } catch (err) { app.$message.error(err.msg); @@ -235,24 +288,28 @@ const loadData = () => { const handleNodeClick = (data, node) => { treeSelected.value = data; - loadData(); + // loadData(); + getLandTree(); }; onMounted(() => { - loadData(); + // loadData(); + getLandTree(); }); // 页数 const currentChange = (current) => { state.query.current = current; - loadData(); + // loadData(); + getLandTree(); }; // 条数 const sizeChange = (size) => { state.query.current = 1; state.query.size = size; - loadData(); + // loadData(); + getLandTree(); }; // 搜索 @@ -260,12 +317,14 @@ const searchChange = (params, done) => { if (done) done(); state.query = params; state.query.current = 1; - loadData(); + // loadData(); + getLandTree(); }; // 刷新 const refreshChange = () => { - loadData(); + // loadData(); + getLandTree(); app.$message.success('刷新成功'); }; @@ -286,8 +345,9 @@ async function rowStatus(row) { if (res.code == 200) { app.$message.success('操作成功!'); nextTick(() => { - state.data[row.$index].status = status; - loadData(); + row.status = status; + // loadData(); + // getLandTree(); }); } } @@ -298,7 +358,7 @@ async function rowDel(row, done, loading) { if (res.code === 200) { app.$message.success('已删除!'); getLandTree(); - loadData(); + // loadData(); done(); } loading(); @@ -320,7 +380,7 @@ const rowSave = async (row, done, loading) => { app.$message.success('添加成功!'); done(); getLandTree(); - loadData(); + // loadData(); } }) .catch((err) => { @@ -343,7 +403,7 @@ const rowUpdate = (row, index, done, loading) => { editLandType(row).then((res) => { if (res.code === 200) { app.$message.success('更新成功!'); - loadData(); + // loadData(); getLandTree(); done(); } diff --git a/sub-government-affairs-service/src/views/dict/component/region/index.vue b/sub-government-affairs-service/src/views/dict/component/region/index.vue index aabebdc..74a30c3 100644 --- a/sub-government-affairs-service/src/views/dict/component/region/index.vue +++ b/sub-government-affairs-service/src/views/dict/component/region/index.vue @@ -46,6 +46,7 @@ import { useApp } from '@/hooks'; import { CRUD_OPTIONS } from '@/config'; import { useUserStore } from '@/store/modules/user'; import { getRegion } from '@/apis/index'; +import { getAnnualList } from '@/apis/land'; const { VITE_APP_BASE_API } = import.meta.env; const app = useApp(); @@ -133,26 +134,26 @@ const infoData = reactive({ }); const loadData = () => { - //state.loading = true; - // getAnnualList(state.query) - // .then((res) => { - // if (res.code === 200) { - // const { current, size, total, records } = res.data; - // state.data = records; - // state.pageData = { - // currentPage: current || 1, - // pageSize: size || 10, - // total: total, - // }; - // } - // }) - // .catch((err) => { - // app.$message.error(err.msg); - // state.data = []; - // }) - // .finally(() => { - // state.loading = false; - // }); + state.loading = true; + getAnnualList(state.query) + .then((res) => { + if (res.code === 200) { + const { current, size, total, records } = res.data; + state.data = records; + state.pageData = { + currentPage: current || 1, + pageSize: size || 10, + total: total, + }; + } + }) + .catch((err) => { + app.$message.error(err.msg); + state.data = []; + }) + .finally(() => { + state.loading = false; + }); }; const getTree = () => { @@ -202,24 +203,24 @@ const selectionChange = (rows) => { }; const handleNodeClick = (data) => { - // if (data.level == '2') { - // return; - // } - // if (data.level == '0') { - // infoData.countyId = data.id; - // infoData.townId = ''; - // } - // if (data.level == '1') { - // let countys = - // typeTree.filter((m) => { - // return m.id == data.pId; - // }) || []; - // let town = countys[0] && countys[0].children ? countys[0].children : []; - // townOptions = town; - // infoData.townId = data.id; - // infoData.countyId = data.pId; - // } - // console.info('infoData', infoData); + if (data.level == '2') { + return; + } + if (data.level == '0') { + infoData.countyId = data.id; + infoData.townId = ''; + } + if (data.level == '1') { + let countys = + typeTree.value.filter((m) => { + return m.id == data.pId; + }) || []; + let town = countys[0] && countys[0].children ? countys[0].children : []; + townOptions.value = town; + infoData.townId = data.id; + infoData.countyId = data.pId; + } + console.info('infoData', infoData); }; // 编辑 const rowStatus = (row) => { diff --git a/sub-government-affairs-service/src/views/productOperateMain/coOp/index.vue b/sub-government-affairs-service/src/views/productOperateMain/coOp/index.vue index ab35a44..ed991af 100644 --- a/sub-government-affairs-service/src/views/productOperateMain/coOp/index.vue +++ b/sub-government-affairs-service/src/views/productOperateMain/coOp/index.vue @@ -77,12 +77,19 @@ const handleLandChange = async (value, form, done) => { const productTypeOptions = reactive([ { label: '蔬菜', value: '0' }, { label: '水果', value: '1' }, + { label: '畜产品', value: '2' }, + { label: '水产品', value: '3' }, + { label: '谷物', value: '4' }, + { label: '农资', value: '5' }, + { label: '种源', value: '6' }, + { label: '农产品加工', value: '7' }, + { label: '其他', value: '8' }, ]); const bTypeOptions = reactive([ - { label: '养殖', value: '0' }, - { label: '种植', value: '1' }, - { label: '畜牧业', value: '1' }, + { label: '农户', value: '0' }, + // { label: '种植', value: '1' }, + { label: '合作社', value: '2' }, ]); let timeVal = ref([]); @@ -179,6 +186,35 @@ const state = reactive({ trigger: 'blur', }, }, + // { + // label: '网格区域', + // prop: 'cities', + // type: 'cascader', + // hide: true, + // addDisplay: true, + // editDisplay: true, + // viewDisplay: false, + // // multiple: true, + // // checkStrictly: true, + // // collapseTags: true, + // // emitPath: false, + // // checkDescendants: false, + // props: { + // label: 'areaName', + // value: 'areaCode', + // children: 'areaChildVOS', + // }, + // dicUrl: `${VITE_APP_BASE_API}/system/area/region?areaCode=530000`, + // dicHeaders: { + // authorization: UserStore.token, + // }, + // dicFormatter: (res) => res.data ?? [], + // rules: { + // required: true, + // message: '请选择', + // trigger: 'blur', + // }, + // }, { label: '合作社地址', prop: 'villageCode', @@ -297,7 +333,7 @@ const state = reactive({ column: [ { label: '主体名称', - prop: 'taskCode', + prop: 'businessName', rules: { required: true, message: '请输入', trigger: 'blur' }, }, { @@ -315,7 +351,7 @@ const state = reactive({ }, { label: '主要产品', - prop: 'product', + prop: 'primaryProduct', rules: { required: false, message: '请输入', trigger: 'blur' }, }, { @@ -335,9 +371,9 @@ const state = reactive({ }, { label: '合作社地址', - prop: 'inspectionTarget', + prop: 'villageCode', rules: { required: true, message: '请输入', trigger: 'blur' }, - type: 'select', + type: 'cascader', props: { label: 'areaName', value: 'areaCode', diff --git a/sub-government-affairs-service/src/views/productOperateMain/enterprise/index.vue b/sub-government-affairs-service/src/views/productOperateMain/enterprise/index.vue index cd99d08..58943ff 100644 --- a/sub-government-affairs-service/src/views/productOperateMain/enterprise/index.vue +++ b/sub-government-affairs-service/src/views/productOperateMain/enterprise/index.vue @@ -344,7 +344,7 @@ const state = reactive({ label: '合作社地址', prop: 'inspectionTarget', rules: { required: true, message: '请输入', trigger: 'blur' }, - type: 'select', + type: 'cascader', props: { label: 'areaName', value: 'areaCode', diff --git a/sub-government-affairs-service/src/views/productOperateMain/examine/list.vue b/sub-government-affairs-service/src/views/productOperateMain/examine/list.vue index e2bb84c..cea9660 100644 --- a/sub-government-affairs-service/src/views/productOperateMain/examine/list.vue +++ b/sub-government-affairs-service/src/views/productOperateMain/examine/list.vue @@ -6,7 +6,7 @@ v-model:search="state.query" v-model:page="state.pageData" :table-loading="state.loading" - :data="state.data" + :data="data" :option="state.options" @refresh-change="refreshChange" @search-reset="searchChange" @@ -93,6 +93,31 @@ const enterpriseBase = [ { label: '公司地址', prop: 'crop' }, ]; +const data = reactive([ + { + executor: '100001', + executors: '好又来蔬菜批发公司', + BType: '农企合作社', + operationDate: '2030-05-23', + crop: '蔬菜', + status: '通过', + seek: '暂无', + seektime: '2025-01-12', + creatTime: '2025-01-1-01', + }, + { + executor: '100002', + executors: '亚恒商贸有限公司', + BType: '农企合作社', + operationDate: '2030-03-22', + crop: '蔬菜', + status: '通过', + seek: '暂无', + seektime: '2025-01-05', + creatTime: '2025-01-1-01', + }, +]); + const state = reactive({ loading: false, query: { @@ -124,7 +149,7 @@ const state = reactive({ }, { label: '主体名称', - prop: 'executor', + prop: 'executors', search: true, addDisplay: false, editDisplay: false, @@ -171,18 +196,18 @@ const state = reactive({ addDisplay: false, editDisplay: false, }, - { - label: '经营产品种类', - showOverflowTooltip: true, - search: false, - addDisplay: false, - editDisplay: false, - rules: { - required: true, - message: '请输入', - trigger: 'blur', - }, - }, + // { + // label: '经营产品种类', + // showOverflowTooltip: true, + // search: false, + // addDisplay: false, + // editDisplay: false, + // rules: { + // required: true, + // message: '请输入', + // trigger: 'blur', + // }, + // }, { label: '主要产品', prop: 'crop', @@ -197,19 +222,19 @@ const state = reactive({ }, { label: '审核状态', - prop: 'crop', + prop: 'status', addDisplay: false, editDisplay: false, search: false, }, { label: '审核意见', - prop: 'crop', + prop: 'seek', addDisplay: false, editDisplay: false, }, - { label: '审核时间', prop: 'crop', addDisplay: false, editDisplay: false, search: false }, - { label: '创建时间', prop: 'crop', addDisplay: false, editDisplay: false, search: false }, + { label: '审核时间', prop: 'seektime', addDisplay: false, editDisplay: false, search: false }, + { label: '创建时间', prop: 'creatTime', addDisplay: false, editDisplay: false, search: false }, ], searchColumn: [ { label: '主体代码', prop: 'landName', search: true }, diff --git a/sub-government-affairs-service/src/views/trace/record/base/index.vue b/sub-government-affairs-service/src/views/trace/record/base/index.vue index ef10f2d..2a33b49 100644 --- a/sub-government-affairs-service/src/views/trace/record/base/index.vue +++ b/sub-government-affairs-service/src/views/trace/record/base/index.vue @@ -38,7 +38,7 @@ const res = [ name: `1号基地`, area: 100, status: 1, - location: '东经 92°54′至 99°23′,北纬 20°27′至 18°41′F', + location: '东经 92°45′至 99°23′,北纬 20°27′至 18°35′F', type: 1, p1: 1, p2: 100, @@ -52,7 +52,7 @@ const res = [ name: `2号基地`, area: 211, status: 1, - location: '东经 92°54′至 99°21′,北纬 20°25′至 18°31′F', + location: '东经 92°44′至 99°24′,北纬 20°23′至 18°31′F', type: 1, p1: 1, p2: 120, @@ -66,7 +66,7 @@ const res = [ name: `3号基地`, area: 121, status: 1, - location: '东经 92°53′至 99°22′,北纬 20°21′至 18°32′F', + location: '东经 92°43′至 99°25′,北纬 20°21′至 18°31′F', type: 1, p1: 1, p2: 56, @@ -80,7 +80,7 @@ const res = [ name: `4号基地`, area: 231, status: 2, - location: '东经 92°53′至 99°22′,北纬 20°21′至 18°32′F', + location: '东经 92°42′至 99°26′,北纬 21°20′至 18°32′F', type: 2, p1: 2, p2: 145, diff --git a/sub-government-affairs-service/src/views/trace/record/seed/index.vue b/sub-government-affairs-service/src/views/trace/record/seed/index.vue index bb45f25..7e8c93c 100644 --- a/sub-government-affairs-service/src/views/trace/record/seed/index.vue +++ b/sub-government-affairs-service/src/views/trace/record/seed/index.vue @@ -6,7 +6,7 @@ v-model:search="state.query" v-model:page="state.page" :table-loading="state.loading" - :data="state.data" + :data="res" :option="state.options" @refresh-change="refreshChange" @search-reset="searchChange" @@ -32,34 +32,32 @@ import { sleep } from '@/utils'; import { CRUD_OPTIONS } from '@/config'; import Mock from 'mockjs'; -const res = Mock.mock({ - 'data|2': [ - { - id: '@increment(100000)', - name: '小麦', - shop: '万好芽种公司', - buyTime: '@datetime("yyyy-MM-dd HH:mm:ss")', - avalibleTime: '@datetime("yyyy-MM-dd HH:mm:ss")', - createdTime: '@datetime("yyyy-MM-dd HH:mm:ss")', - }, - { - id: '@increment(100000)', - name: '玉米', - shop: '万好芽种公司', - buyTime: '@datetime("yyyy-MM-dd HH:mm:ss")', - avalibleTime: '@datetime("yyyy-MM-dd HH:mm:ss")', - createdTime: '@datetime("yyyy-MM-dd HH:mm:ss")', - }, - { - id: '@increment(100000)', - name: '南瓜', - shop: '丰隆种源专卖点', - buyTime: '@datetime("yyyy-MM-dd HH:mm:ss")', - avalibleTime: '@datetime("yyyy-MM-dd HH:mm:ss")', - createdTime: '@datetime("yyyy-MM-dd HH:mm:ss")', - }, - ], -}); +const res = [ + { + id: '100001', + name: '小麦', + shop: '万好芽种公司', + buyTime: '2025-01-20 20:32:24', + avalibleTime: '2026-01-20 20:32:24', + createdTime: '2025-01-20 20:32:24', + }, + { + id: '100002', + name: '南瓜', + shop: '丰隆种源公司', + buyTime: '2025-01-15 14:20:21', + avalibleTime: '2026-01-15 14:20:21', + createdTime: '2025-01-15 14:20:21', + }, + { + id: '100003', + name: '玉米', + shop: '万好芽种公司', + buyTime: '2025-01-12 17:25:32', + avalibleTime: '2026-01-12 17:25:32', + createdTime: '2025-01-12 17:25:32', + }, +]; const app = useApp(); const crudRef = ref(null);