Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
姚俊旭 2025-05-26 17:10:16 +08:00
commit 1c1b1369b3
12 changed files with 250 additions and 130 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_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'

View File

@ -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'

View File

@ -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',

View File

@ -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',

View File

@ -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,

View File

@ -2,7 +2,7 @@
<div class="custom-page">
<el-row :gutter="20">
<splitpanes class="default-theme">
<pane size="16">
<!-- <pane size="16">
<el-col>
<custom-table-tree title="土地用途分类信息" :data="treeData" :option="treeOption" filter @node-click="handleNodeClick">
<template #default="{ data }">
@ -12,7 +12,7 @@
</template>
</custom-table-tree>
</el-col>
</pane>
</pane> -->
<pane size="84">
<el-col>
<avue-crud
@ -32,6 +32,46 @@
@row-del="rowDel"
@row-save="rowSave"
@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>
<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>
<!-- <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>
@ -45,7 +85,7 @@
<template #menu="scope">
<custom-table-operate :actions="state.options.actions" :data="scope" />
</template>
</avue-crud>
</avue-crud> -->
</el-col>
</pane>
</splitpanes>
@ -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();
}

View File

@ -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) => {

View File

@ -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',

View File

@ -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',

View File

@ -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 },

View File

@ -38,7 +38,7 @@ const res = [
name: `1号基地`,
area: 100,
status: 1,
location: '东经 92°54至 99°23北纬 20°27至 18°41F',
location: '东经 92°45至 99°23北纬 20°27至 18°35F',
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°31F',
location: '东经 92°44至 99°24北纬 20°23′至 18°31F',
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°32F',
location: '东经 92°43至 99°25北纬 20°21至 18°31F',
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°32F',
location: '东经 92°42至 99°26北纬 21°20′至 18°32F',
type: 2,
p1: 2,
p2: 145,

View File

@ -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);