diff --git a/sub-government-affairs-service/src/router/modules/trace.js b/sub-government-affairs-service/src/router/modules/trace.js
index 78ae707..fc1fa29 100644
--- a/sub-government-affairs-service/src/router/modules/trace.js
+++ b/sub-government-affairs-service/src/router/modules/trace.js
@@ -141,54 +141,68 @@ export default [
},
],
},
+ // {
+ // path: '/sub-government-affairs-service/record',
+ // name: 'record',
+ // component: Views,
+ // meta: { title: '种植档案', icon: 'Tickets' },
+ // redirect: '/sub-government-affairs-service/record-base',
+ // children: [
+ // {
+ // path: '/sub-government-affairs-service/record-base',
+ // component: () => import('@/views/trace/record/base/index.vue'),
+ // name: 'record-base',
+ // meta: { title: '基地档案', icon: '' },
+ // },
+ // {
+ // path: '/sub-government-affairs-service/record-seed',
+ // component: () => import('@/views/trace/record/seed/index.vue'),
+ // name: 'record-seed',
+ // meta: { title: '种子档案', icon: '' },
+ // },
+ // ],
+ // },
+ // {
+ // path: '/sub-government-affairs-service/agricultural',
+ // name: 'agricultural',
+ // component: Views,
+ // meta: { title: '农事管理', icon: 'SetUp' },
+ // redirect: '/sub-government-affairs-service/agricultural-coding',
+ // children: [
+ // {
+ // path: '/sub-government-affairs-service/agricultural-coding',
+ // component: () => import('@/views/trace/agricultural/coding/index.vue'),
+ // name: 'agricultural-coding',
+ // meta: { title: '采收与赋码管理', icon: '' },
+ // },
+ // {
+ // path: '/sub-government-affairs-service/agricultural-quality',
+ // component: () => import('@/views/trace/agricultural/quality/index.vue'),
+ // name: 'agricultural-quality',
+ // meta: { title: '产品质检管理', icon: '' },
+ // },
+ // ],
+ // },
{
- path: '/sub-government-affairs-service/record',
- name: 'record',
- component: Views,
- meta: { title: '种植档案', icon: 'Tickets' },
- redirect: '/sub-government-affairs-service/record-base',
+ path: '/sub-government-affairs-service/trace',
+ name: 'trace-management',
+ meta: { title: '溯源管理', icon: 'Connection' },
+ redirect: '/sub-government-affairs-service/trace-search',
children: [
{
- path: '/sub-government-affairs-service/record-base',
- component: () => import('@/views/trace/record/base/index.vue'),
- name: 'record-base',
- meta: { title: '基地档案', icon: '' },
+ path: '/sub-government-affairs-service/trace-search',
+ name: 'trace-search',
+ component: () => import('@/views/trace/search/index.vue'),
+ meta: { title: '溯源查询', icon: 'Files' },
},
{
- path: '/sub-government-affairs-service/record-seed',
- component: () => import('@/views/trace/record/seed/index.vue'),
- name: 'record-seed',
- meta: { title: '种子档案', icon: '' },
+ path: '/sub-government-affairs-service/trace-statistic',
+ name: 'trace-statistic',
+ component: () => import('@/views/trace/statistic/index.vue'),
+ meta: { title: '溯源统计', icon: 'Filter' },
},
],
},
- {
- path: '/sub-government-affairs-service/agricultural',
- name: 'agricultural',
- component: Views,
- meta: { title: '农事管理', icon: 'SetUp' },
- redirect: '/sub-government-affairs-service/agricultural-coding',
- children: [
- {
- path: '/sub-government-affairs-service/agricultural-coding',
- component: () => import('@/views/trace/agricultural/coding/index.vue'),
- name: 'agricultural-coding',
- meta: { title: '采收与赋码管理', icon: '' },
- },
- {
- path: '/sub-government-affairs-service/agricultural-quality',
- component: () => import('@/views/trace/agricultural/quality/index.vue'),
- name: 'agricultural-quality',
- meta: { title: '产品质检管理', icon: '' },
- },
- ],
- },
- {
- path: '/sub-government-affairs-service/trace-search',
- name: 'trace-search',
- component: () => import('@/views/trace/search/index.vue'),
- meta: { title: '溯源查询', icon: 'Files' },
- },
{
path: '/sub-government-affairs-service/trace-info',
name: 'trace-info',
@@ -196,12 +210,6 @@ export default [
meta: { title: '溯源详情', icon: 'DocumentCopy' },
hidden: true,
},
- {
- path: '/sub-government-affairs-service/trace-statistic',
- name: 'trace-statistic',
- component: () => import('@/views/trace/statistic/index.vue'),
- meta: { title: '溯源统计', icon: 'Filter' },
- },
],
},
];
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 1a7c75c..9ec953c 100644
--- a/sub-government-affairs-service/src/views/productOperateMain/coOp/index.vue
+++ b/sub-government-affairs-service/src/views/productOperateMain/coOp/index.vue
@@ -185,7 +185,7 @@ const crudOptions = reactive({
{ label: '所属行政区划', prop: 'address' },
{ label: '所属网格', prop: 'gridCode' },
{ label: '种植作物', prop: 'planCrop' },
- { label: '账号(手机号)', prop: 'phone' },
+ // { label: '账号(手机号)', prop: 'phone' },
{ label: '信息录入时间', prop: 'createTime' },
{ label: '信息更新时间', prop: 'updateTime' },
],
diff --git a/sub-government-affairs-service/src/views/resource/database/Forest.vue b/sub-government-affairs-service/src/views/resource/database/Forest.vue
index a984e85..a113801 100644
--- a/sub-government-affairs-service/src/views/resource/database/Forest.vue
+++ b/sub-government-affairs-service/src/views/resource/database/Forest.vue
@@ -20,7 +20,13 @@
:show-sort="true"
style="height: calc(100vh - 320px)"
@page-change="handlePageChange"
- />
+ >
+
+
+
+
+
@@ -40,7 +46,6 @@
clearable
check-strictly
:render-after-expand="false"
- @change="handleLandTypeChange"
/>
@@ -157,7 +162,6 @@ const activeTab = ref('1');
const handleTabChange = ({ name }) => {
// activeTab.value = name;
console.log('切换tab', activeTab.value);
- searchForm.value.landStatus = Number(activeTab.value);
getData();
};
@@ -180,7 +184,7 @@ const columns = ref([
{ label: '土地承包经营人', prop: 'propertyName' },
{ label: '联系电话', prop: 'propertyPhone' },
{ label: '土地经营权证书编号', prop: 'landCode', width: 160 },
- { label: '是否土地流转', prop: 'isTransfer' },
+ { label: '是否土地流转', prop: 'isTransfer', formatter: (row, column, cellValue) => (cellValue === 1 ? '是' : '否') },
{ label: '土地受让方', prop: 'transferName' },
{ label: '受让方联系电话', prop: 'transferPhone', width: 100 },
{ label: '流转合同', prop: 'transferContract' },
@@ -190,8 +194,62 @@ const columns = ref([
// { label: '信息更新人', prop: 'updateName' },
// { label: '信息更新单位', prop: 'updateGroup' },
{ label: '信息更新时间', prop: 'updateTime' },
+ { label: '操作', prop: 'action', slotName: 'action', fixed: 'right' },
]);
+const 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),
+ },
+];
+const handleView = async (row) => {
+ isReadonly.value = true;
+ formData.value = await getLandDetail(row.id);
+ 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 handlePageChange = ({ page, pageSize }) => {
pageData.value.currentPage = page;
pageData.value.pageSize = pageSize;
@@ -218,18 +276,16 @@ import { mockData } from './landData';
import { createLand, deleteLand, editLand, fetchLandList, getLandById, approveLand } from '@/apis/landResourceManagement/landManagement';
import request from '@/utils/axios';
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));
- tableData.value = mockData
- .filter((item) => item.status === activeTab.value)
- .map((item) => ({
- ...item,
- landTypeName: '林地',
- }));
+ const requestData = {
+ ...searchForm.value,
+ page: pageData.value.currentPage,
+ size: pageData.value.pageSize,
+ landStatus: activeTab.value,
+ landTypeName: '草地',
+ };
+ const response = await fetchLandList(requestData);
+ tableData.value = Array.isArray(response.data.records) ? response.data.records : [];
pageData.value.total = tableData.value.length;
loading.value = false;
};
@@ -270,4 +326,51 @@ h1 {
font-size: 20px;
font-weight: bold;
}
+.tabs-wrapper {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ // background-color: #7daaaa;
+
+ .el-tabs__header {
+ width: 100%;
+
+ .el-tabs__nav-scroll {
+ display: flex;
+ justify-content: center;
+ }
+
+ .el-tabs__item {
+ font-size: 16px;
+ color: #555555;
+ font-weight: 500;
+ }
+ }
+ :deep(.el-tabs__content) {
+ padding: 20px;
+ // background-color: #af8686;
+ border-radius: 4px;
+ width: 80%;
+ height: calc(100vh - 400px);
+ overflow-y: auto;
+
+ .el-tab-pane {
+ margin: 0 auto;
+ width: 100%;
+ // background-color: #555555;
+ }
+ }
+}
+
+.form-title {
+ font-size: 16px;
+ font-weight: 500;
+ margin: 30px 0;
+ color: #333333;
+}
+
+.dialog-footer {
+ display: block;
+ text-align: center;
+}
diff --git a/sub-government-affairs-service/src/views/resource/database/Grassland.vue b/sub-government-affairs-service/src/views/resource/database/Grassland.vue
index f3a6548..47a3872 100644
--- a/sub-government-affairs-service/src/views/resource/database/Grassland.vue
+++ b/sub-government-affairs-service/src/views/resource/database/Grassland.vue
@@ -31,7 +31,7 @@
@size-change="handleSizeChange"
>
-
+
@@ -236,7 +236,7 @@ const crudOptions = reactive({
{ label: '土地承包经营人', prop: 'propertyName' },
{ label: '联系电话', prop: 'propertyPhone' },
{ label: '土地经营权证书编号', prop: 'landCode', width: 160 },
- { label: '是否土地流转', prop: 'landTransfer' },
+ { label: '是否土地流转', prop: 'landTransfer', formatter: (row, column, cellValue) => (cellValue === 1 ? '是' : '否') },
{ label: '土地受让方', prop: 'transferName' },
{ label: '受让方联系电话', prop: 'transferPhone', width: 100 },
{ label: '流转合同', prop: 'transferContract' },
diff --git a/sub-government-affairs-service/src/views/resource/database/components/LandSearch.vue b/sub-government-affairs-service/src/views/resource/database/components/LandSearch.vue
index 408550d..8b7559d 100644
--- a/sub-government-affairs-service/src/views/resource/database/components/LandSearch.vue
+++ b/sub-government-affairs-service/src/views/resource/database/components/LandSearch.vue
@@ -25,7 +25,7 @@