Compare commits

..

No commits in common. "9f58884a5b460fb1af018e4eb03e8197b5e0b014" and "dc54d40853b23c6189a8d93b60cb87ed69cddb9c" have entirely different histories.

12 changed files with 129 additions and 249 deletions

View File

@ -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_SUB_GSR = '//localhost:9530/new-digital-agriculture-screen/'
# 接口 # 接口
VITE_APP_BASE_API = '/apis' VITE_APP_BASE_API = '/apis'
# VITE_APP_BASE_URL = 'http://192.168.18.99:8080' VITE_APP_BASE_URL = 'http://192.168.18.99:8080'
VITE_APP_BASE_URL = 'http://192.168.18.9:8080' # VITE_APP_BASE_URL = 'http://192.168.18.14:8080'//线下测试
VITE_APP_UPLOAD_API = '/uploadApis' VITE_APP_UPLOAD_API = '/uploadApis'
VITE_APP_UPLOAD_URL = 'http://192.168.18.99:8080' VITE_APP_UPLOAD_URL = 'http://192.168.18.99:8080'

View File

@ -5,8 +5,8 @@ VITE_APP_MIAN = 'daimp-front-main'
VITE_APP_MIAN_URL = 'http://localhost:9000' VITE_APP_MIAN_URL = 'http://localhost:9000'
VITE_APP_NAME = 'sub-government-affairs-service' VITE_APP_NAME = 'sub-government-affairs-service'
VITE_APP_BASE_API = '/apis' VITE_APP_BASE_API = '/apis'
# VITE_APP_BASE_URL = 'http://192.168.18.99:8080' VITE_APP_BASE_URL = 'http://192.168.18.99:8080'
VITE_APP_BASE_URL = 'http://192.168.18.9:8080' # VITE_APP_BASE_URL = 'http://192.168.18.14:8080'
VITE_APP_UPLOAD_API = '/uploadApis' VITE_APP_UPLOAD_API = '/uploadApis'
VITE_APP_UPLOAD_URL = 'http://192.168.18.99:9300' VITE_APP_UPLOAD_URL = 'http://192.168.18.99:9300'
# VITE_APP_UPLOAD_URL = 'http://192.168.18.14:8080' # VITE_APP_UPLOAD_URL = 'http://192.168.18.14:8080'

View File

@ -9,12 +9,12 @@ const dictRoutes = [
redirect: '/sub-government-affairs-service/region', redirect: '/sub-government-affairs-service/region',
meta: { title: '基础信息维护', icon: 'DocumentRemove' }, meta: { title: '基础信息维护', icon: 'DocumentRemove' },
children: [ children: [
// { {
// path: '/sub-government-affairs-service/region', path: '/sub-government-affairs-service/region',
// name: 'region', name: 'region',
// component: () => import('@/views/dict/component/region/index.vue'), component: () => import('@/views/dict/component/region/index.vue'),
// meta: { title: '行政信息', icon: '' }, meta: { title: '行政信息', icon: '' },
// }, },
{ {
path: '/sub-government-affairs-service/landCassification', path: '/sub-government-affairs-service/landCassification',
name: 'landCassification', name: 'landCassification',

View File

@ -15,12 +15,12 @@ const landsRoutes = [
// 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',
// component: () => import('@/views/landManage/component/plantPlan/index.vue'), component: () => import('@/views/landManage/component/plantPlan/index.vue'),
// meta: { title: '种植计划', icon: '' }, meta: { title: '种植计划', icon: '' },
// }, },
{ {
path: '/sub-government-affairs-service/operationRecord', path: '/sub-government-affairs-service/operationRecord',
name: 'operationRecord', name: 'operationRecord',

View File

@ -130,7 +130,7 @@ const state = reactive({
}, },
}, },
{ {
label: '种植面积(亩)', label: '种植面积',
prop: 'plantingArea', prop: 'plantingArea',
rules: { rules: {
required: true, required: true,
@ -156,7 +156,7 @@ const state = reactive({
}, },
}, },
{ {
label: '生长周期(周)', label: '生长周期',
prop: 'growthCycle', prop: 'growthCycle',
width: '120px', width: '120px',
viewDisabled: true, viewDisabled: true,

View File

@ -2,7 +2,7 @@
<div class="custom-page"> <div class="custom-page">
<el-row :gutter="20"> <el-row :gutter="20">
<splitpanes class="default-theme"> <splitpanes class="default-theme">
<!-- <pane size="16"> <pane size="16">
<el-col> <el-col>
<custom-table-tree title="土地用途分类信息" :data="treeData" :option="treeOption" filter @node-click="handleNodeClick"> <custom-table-tree title="土地用途分类信息" :data="treeData" :option="treeOption" filter @node-click="handleNodeClick">
<template #default="{ data }"> <template #default="{ data }">
@ -12,7 +12,7 @@
</template> </template>
</custom-table-tree> </custom-table-tree>
</el-col> </el-col>
</pane> --> </pane>
<pane size="84"> <pane size="84">
<el-col> <el-col>
<avue-crud <avue-crud
@ -33,15 +33,6 @@
@row-save="rowSave" @row-save="rowSave"
@row-update="rowUpdate" @row-update="rowUpdate"
> >
<template #icon="{ row }">
<i :class="row.icon" style="font-size: 24px"></i>
</template>
<!-- <template #icon="{ row }">
<i :class="row.icon" style="font-size: 24px"></i>
</template>
<template #menu="{ row, size }">
<el-button :size="size" text type="primary" @click="handleAdd(row)">新增子级</el-button>
</template> -->
<template #menu-left> <template #menu-left>
<el-button type="success" icon="download" @click="onExport">导出</el-button> <el-button type="success" icon="download" @click="onExport">导出</el-button>
</template> </template>
@ -55,37 +46,6 @@
<custom-table-operate :actions="state.options.actions" :data="scope" /> <custom-table-operate :actions="state.options.actions" :data="scope" />
</template> </template>
</avue-crud> </avue-crud>
<!-- <avue-crud
ref="crudRef"
v-model="state.form"
v-model:search="state.query"
v-model:page="state.pageData"
:table-loading="state.loading"
:data="state.data"
:option="state.options"
@refresh-change="refreshChange"
@search-reset="searchChange"
@search-change="searchChange"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@row-del="rowDel"
@row-save="rowSave"
@row-update="rowUpdate"
>
<template #menu-left>
<el-button type="success" icon="download" @click="onExport">导出</el-button>
</template>
<template #status="{ row }">
<el-tag v-if="row.status == 1" type="success">启用</el-tag>
<el-tag v-if="row.status == 0" type="danger">禁用</el-tag>
</template>
<template #menu="scope">
<custom-table-operate :actions="state.options.actions" :data="scope" />
</template>
</avue-crud> -->
</el-col> </el-col>
</pane> </pane>
</splitpanes> </splitpanes>
@ -123,16 +83,10 @@ const state = reactive({
selection: [], selection: [],
options: { options: {
...CRUD_OPTIONS, ...CRUD_OPTIONS,
headerAlign: 'center',
align: 'center',
border: true,
index: true,
rowKey: 'id',
rowParentKey: 'pid',
dialogWidth: 600, dialogWidth: 600,
selection: false, selection: false,
column: [ column: [
// { label: '', prop: 'id', addDisplay: false, editDisplay: false }, { label: '编号', prop: 'id', addDisplay: false, editDisplay: false },
{ {
label: '分类名称', label: '分类名称',
prop: 'landType', prop: 'landType',
@ -244,14 +198,7 @@ const getLandTree = async () => {
try { try {
const res = await getLandTypeTree(); const res = await getLandTypeTree();
if (res.code == 200) { if (res.code == 200) {
const { current, size, total, records } = res.data;
treeData.value = [{ id: '0', landType: '土地分类', children: 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) { } catch (err) {
app.$message.error(err.msg); app.$message.error(err.msg);
@ -288,28 +235,24 @@ const loadData = () => {
const handleNodeClick = (data, node) => { const handleNodeClick = (data, node) => {
treeSelected.value = data; treeSelected.value = data;
// loadData(); loadData();
getLandTree();
}; };
onMounted(() => { onMounted(() => {
// loadData(); loadData();
getLandTree();
}); });
// //
const currentChange = (current) => { const currentChange = (current) => {
state.query.current = current; state.query.current = current;
// loadData(); loadData();
getLandTree();
}; };
// //
const sizeChange = (size) => { const sizeChange = (size) => {
state.query.current = 1; state.query.current = 1;
state.query.size = size; state.query.size = size;
// loadData(); loadData();
getLandTree();
}; };
// //
@ -317,14 +260,12 @@ const searchChange = (params, done) => {
if (done) done(); if (done) done();
state.query = params; state.query = params;
state.query.current = 1; state.query.current = 1;
// loadData(); loadData();
getLandTree();
}; };
// //
const refreshChange = () => { const refreshChange = () => {
// loadData(); loadData();
getLandTree();
app.$message.success('刷新成功'); app.$message.success('刷新成功');
}; };
@ -345,9 +286,8 @@ async function rowStatus(row) {
if (res.code == 200) { if (res.code == 200) {
app.$message.success('操作成功!'); app.$message.success('操作成功!');
nextTick(() => { nextTick(() => {
row.status = status; state.data[row.$index].status = status;
// loadData(); loadData();
// getLandTree();
}); });
} }
} }
@ -358,7 +298,7 @@ async function rowDel(row, done, loading) {
if (res.code === 200) { if (res.code === 200) {
app.$message.success('已删除!'); app.$message.success('已删除!');
getLandTree(); getLandTree();
// loadData(); loadData();
done(); done();
} }
loading(); loading();
@ -380,7 +320,7 @@ const rowSave = async (row, done, loading) => {
app.$message.success('添加成功!'); app.$message.success('添加成功!');
done(); done();
getLandTree(); getLandTree();
// loadData(); loadData();
} }
}) })
.catch((err) => { .catch((err) => {
@ -403,7 +343,7 @@ const rowUpdate = (row, index, done, loading) => {
editLandType(row).then((res) => { editLandType(row).then((res) => {
if (res.code === 200) { if (res.code === 200) {
app.$message.success('更新成功!'); app.$message.success('更新成功!');
// loadData(); loadData();
getLandTree(); getLandTree();
done(); done();
} }

View File

@ -46,7 +46,6 @@ import { useApp } from '@/hooks';
import { CRUD_OPTIONS } from '@/config'; import { CRUD_OPTIONS } from '@/config';
import { useUserStore } from '@/store/modules/user'; import { useUserStore } from '@/store/modules/user';
import { getRegion } from '@/apis/index'; import { getRegion } from '@/apis/index';
import { getAnnualList } from '@/apis/land';
const { VITE_APP_BASE_API } = import.meta.env; const { VITE_APP_BASE_API } = import.meta.env;
const app = useApp(); const app = useApp();
@ -134,26 +133,26 @@ const infoData = reactive({
}); });
const loadData = () => { const loadData = () => {
state.loading = true; //state.loading = true;
getAnnualList(state.query) // getAnnualList(state.query)
.then((res) => { // .then((res) => {
if (res.code === 200) { // if (res.code === 200) {
const { current, size, total, records } = res.data; // const { current, size, total, records } = res.data;
state.data = records; // state.data = records;
state.pageData = { // state.pageData = {
currentPage: current || 1, // currentPage: current || 1,
pageSize: size || 10, // pageSize: size || 10,
total: total, // total: total,
}; // };
} // }
}) // })
.catch((err) => { // .catch((err) => {
app.$message.error(err.msg); // app.$message.error(err.msg);
state.data = []; // state.data = [];
}) // })
.finally(() => { // .finally(() => {
state.loading = false; // state.loading = false;
}); // });
}; };
const getTree = () => { const getTree = () => {
@ -203,24 +202,24 @@ const selectionChange = (rows) => {
}; };
const handleNodeClick = (data) => { const handleNodeClick = (data) => {
if (data.level == '2') { // if (data.level == '2') {
return; // return;
} // }
if (data.level == '0') { // if (data.level == '0') {
infoData.countyId = data.id; // infoData.countyId = data.id;
infoData.townId = ''; // infoData.townId = '';
} // }
if (data.level == '1') { // if (data.level == '1') {
let countys = // let countys =
typeTree.value.filter((m) => { // typeTree.filter((m) => {
return m.id == data.pId; // return m.id == data.pId;
}) || []; // }) || [];
let town = countys[0] && countys[0].children ? countys[0].children : []; // let town = countys[0] && countys[0].children ? countys[0].children : [];
townOptions.value = town; // townOptions = town;
infoData.townId = data.id; // infoData.townId = data.id;
infoData.countyId = data.pId; // infoData.countyId = data.pId;
} // }
console.info('infoData', infoData); // console.info('infoData', infoData);
}; };
// //
const rowStatus = (row) => { const rowStatus = (row) => {

View File

@ -77,19 +77,12 @@ const handleLandChange = async (value, form, done) => {
const productTypeOptions = reactive([ const productTypeOptions = reactive([
{ label: '蔬菜', value: '0' }, { label: '蔬菜', value: '0' },
{ label: '水果', value: '1' }, { 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([ const bTypeOptions = reactive([
{ label: '农户', value: '0' }, { label: '养殖', value: '0' },
// { label: '', value: '1' }, { label: '种植', value: '1' },
{ label: '合作社', value: '2' }, { label: '畜牧业', value: '1' },
]); ]);
let timeVal = ref([]); let timeVal = ref([]);
@ -186,35 +179,6 @@ const state = reactive({
trigger: 'blur', 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: '合作社地址', label: '合作社地址',
prop: 'villageCode', prop: 'villageCode',
@ -333,7 +297,7 @@ const state = reactive({
column: [ column: [
{ {
label: '主体名称', label: '主体名称',
prop: 'businessName', prop: 'taskCode',
rules: { required: true, message: '请输入', trigger: 'blur' }, rules: { required: true, message: '请输入', trigger: 'blur' },
}, },
{ {
@ -351,7 +315,7 @@ const state = reactive({
}, },
{ {
label: '主要产品', label: '主要产品',
prop: 'primaryProduct', prop: 'product',
rules: { required: false, message: '请输入', trigger: 'blur' }, rules: { required: false, message: '请输入', trigger: 'blur' },
}, },
{ {
@ -371,9 +335,9 @@ const state = reactive({
}, },
{ {
label: '合作社地址', label: '合作社地址',
prop: 'villageCode', prop: 'inspectionTarget',
rules: { required: true, message: '请输入', trigger: 'blur' }, rules: { required: true, message: '请输入', trigger: 'blur' },
type: 'cascader', type: 'select',
props: { props: {
label: 'areaName', label: 'areaName',
value: 'areaCode', value: 'areaCode',

View File

@ -344,7 +344,7 @@ const state = reactive({
label: '合作社地址', label: '合作社地址',
prop: 'inspectionTarget', prop: 'inspectionTarget',
rules: { required: true, message: '请输入', trigger: 'blur' }, rules: { required: true, message: '请输入', trigger: 'blur' },
type: 'cascader', type: 'select',
props: { props: {
label: 'areaName', label: 'areaName',
value: 'areaCode', value: 'areaCode',

View File

@ -6,7 +6,7 @@
v-model:search="state.query" v-model:search="state.query"
v-model:page="state.pageData" v-model:page="state.pageData"
:table-loading="state.loading" :table-loading="state.loading"
:data="data" :data="state.data"
:option="state.options" :option="state.options"
@refresh-change="refreshChange" @refresh-change="refreshChange"
@search-reset="searchChange" @search-reset="searchChange"
@ -93,31 +93,6 @@ const enterpriseBase = [
{ label: '公司地址', prop: 'crop' }, { 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({ const state = reactive({
loading: false, loading: false,
query: { query: {
@ -149,7 +124,7 @@ const state = reactive({
}, },
{ {
label: '主体名称', label: '主体名称',
prop: 'executors', prop: 'executor',
search: true, search: true,
addDisplay: false, addDisplay: false,
editDisplay: false, editDisplay: false,
@ -196,18 +171,18 @@ const state = reactive({
addDisplay: false, addDisplay: false,
editDisplay: false, editDisplay: false,
}, },
// { {
// label: '', label: '经营产品种类',
// showOverflowTooltip: true, showOverflowTooltip: true,
// search: false, search: false,
// addDisplay: false, addDisplay: false,
// editDisplay: false, editDisplay: false,
// rules: { rules: {
// required: true, required: true,
// message: '', message: '请输入',
// trigger: 'blur', trigger: 'blur',
// }, },
// }, },
{ {
label: '主要产品', label: '主要产品',
prop: 'crop', prop: 'crop',
@ -222,19 +197,19 @@ const state = reactive({
}, },
{ {
label: '审核状态', label: '审核状态',
prop: 'status', prop: 'crop',
addDisplay: false, addDisplay: false,
editDisplay: false, editDisplay: false,
search: false, search: false,
}, },
{ {
label: '审核意见', label: '审核意见',
prop: 'seek', prop: 'crop',
addDisplay: false, addDisplay: false,
editDisplay: false, editDisplay: false,
}, },
{ label: '审核时间', prop: 'seektime', addDisplay: false, editDisplay: false, search: false }, { label: '审核时间', prop: 'crop', addDisplay: false, editDisplay: false, search: false },
{ label: '创建时间', prop: 'creatTime', addDisplay: false, editDisplay: false, search: false }, { label: '创建时间', prop: 'crop', addDisplay: false, editDisplay: false, search: false },
], ],
searchColumn: [ searchColumn: [
{ label: '主体代码', prop: 'landName', search: true }, { label: '主体代码', prop: 'landName', search: true },

View File

@ -38,7 +38,7 @@ const res = [
name: `1号基地`, name: `1号基地`,
area: 100, area: 100,
status: 1, status: 1,
location: '东经 92°45至 99°23北纬 20°27至 18°35F', location: '东经 92°54至 99°23北纬 20°27至 18°41F',
type: 1, type: 1,
p1: 1, p1: 1,
p2: 100, p2: 100,
@ -52,7 +52,7 @@ const res = [
name: `2号基地`, name: `2号基地`,
area: 211, area: 211,
status: 1, status: 1,
location: '东经 92°44至 99°24北纬 20°23′至 18°31F', location: '东经 92°54至 99°21北纬 20°25′至 18°31F',
type: 1, type: 1,
p1: 1, p1: 1,
p2: 120, p2: 120,
@ -66,7 +66,7 @@ const res = [
name: `3号基地`, name: `3号基地`,
area: 121, area: 121,
status: 1, status: 1,
location: '东经 92°43至 99°25北纬 20°21至 18°31F', location: '东经 92°53至 99°22北纬 20°21至 18°32F',
type: 1, type: 1,
p1: 1, p1: 1,
p2: 56, p2: 56,
@ -80,7 +80,7 @@ const res = [
name: `4号基地`, name: `4号基地`,
area: 231, area: 231,
status: 2, status: 2,
location: '东经 92°42至 99°26北纬 21°20′至 18°32F', location: '东经 92°53至 99°22北纬 20°21′至 18°32F',
type: 2, type: 2,
p1: 2, p1: 2,
p2: 145, p2: 145,

View File

@ -6,7 +6,7 @@
v-model:search="state.query" v-model:search="state.query"
v-model:page="state.page" v-model:page="state.page"
:table-loading="state.loading" :table-loading="state.loading"
:data="res" :data="state.data"
:option="state.options" :option="state.options"
@refresh-change="refreshChange" @refresh-change="refreshChange"
@search-reset="searchChange" @search-reset="searchChange"
@ -32,32 +32,34 @@ import { sleep } from '@/utils';
import { CRUD_OPTIONS } from '@/config'; import { CRUD_OPTIONS } from '@/config';
import Mock from 'mockjs'; import Mock from 'mockjs';
const res = [ const res = Mock.mock({
'data|2': [
{ {
id: '100001', id: '@increment(100000)',
name: '小麦', name: '小麦',
shop: '万好芽种公司', shop: '万好芽种公司',
buyTime: '2025-01-20 20:32:24', buyTime: '@datetime("yyyy-MM-dd HH:mm:ss")',
avalibleTime: '2026-01-20 20:32:24', avalibleTime: '@datetime("yyyy-MM-dd HH:mm:ss")',
createdTime: '2025-01-20 20:32:24', createdTime: '@datetime("yyyy-MM-dd HH:mm:ss")',
}, },
{ {
id: '100002', id: '@increment(100000)',
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: '玉米', name: '玉米',
shop: '万好芽种公司', shop: '万好芽种公司',
buyTime: '2025-01-12 17:25:32', buyTime: '@datetime("yyyy-MM-dd HH:mm:ss")',
avalibleTime: '2026-01-12 17:25:32', avalibleTime: '@datetime("yyyy-MM-dd HH:mm:ss")',
createdTime: '2025-01-12 17:25:32', 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 app = useApp(); const app = useApp();
const crudRef = ref(null); const crudRef = ref(null);