From 2672956edeada2ffaf7851fa1559fe9940b2efab Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=88=98=E5=A6=8D?= <1455167345@qq.com>
Date: Thu, 29 Aug 2024 10:06:46 +0800
Subject: [PATCH] =?UTF-8?q?=E7=9F=BF=E4=BA=A7=E7=9A=84=E7=AD=9B=E9=80=89?=
=?UTF-8?q?=E6=9D=A1=E4=BB=B6=E6=94=BE=E5=9C=A8=E5=AD=97=E5=85=B8=E9=87=8C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/utils/global.ts | 18 +++-
.../demo/minerals/patchsummary/index.vue | 22 -----
.../patchsummary/patchsummary.data.ts | 94 +++++--------------
3 files changed, 39 insertions(+), 95 deletions(-)
diff --git a/src/utils/global.ts b/src/utils/global.ts
index a41aa76a..96853d84 100644
--- a/src/utils/global.ts
+++ b/src/utils/global.ts
@@ -1,4 +1,6 @@
// @/utils/global
+import { getLoad } from '@/api/sys/sysDataItemDetail';
+
// 全局变量配置
export const getYearList = () => {
const num = 4;
@@ -49,7 +51,7 @@ export const mapStatusOptions = [
export const auditMapStatusOptions = [
{ label: '市级驳回', value: '市级驳回' },
{ label: '县级驳回', value: '县级驳回' },
-]
+];
// 标注类型
export const markTypeOptions = [
{ label: '在建', value: '在建' },
@@ -175,3 +177,17 @@ export const monthAllOptions = () => {
arr.reverse().unshift({ label: '全部', value: 0 });
return arr;
};
+
+// 根据字典获取对应的筛选数据
+export const getOptions = (code: string) => {
+ let arry: any = [];
+ getLoad({ code: code }).then((res) => {
+ res.forEach((item: any) => {
+ arry.push({
+ label: item.itemName,
+ value: item.itemValue,
+ });
+ });
+ });
+ return arry;
+};
diff --git a/src/views/demo/minerals/patchsummary/index.vue b/src/views/demo/minerals/patchsummary/index.vue
index b6363efe..10fcd5dd 100644
--- a/src/views/demo/minerals/patchsummary/index.vue
+++ b/src/views/demo/minerals/patchsummary/index.vue
@@ -14,20 +14,6 @@
-
-
-
-
-
-
@@ -110,10 +96,6 @@
const areaParams = ref({
tubanArea1: null,
tubanArea2: null,
- gengdiArea1: null,
- gengdiArea2: null,
- jibenArea1: null,
- jibenArea2: null,
});
const tableData = ref([]);
const tablePaginationRight = ref({
@@ -242,10 +224,6 @@
areaParams.value = {
tubanArea1: null,
tubanArea2: null,
- gengdiArea1: null,
- gengdiArea2: null,
- jibenArea1: null,
- jibenArea2: null,
};
tablePaginationRight.value.current = 1;
getTableData(searchParams.value);
diff --git a/src/views/demo/minerals/patchsummary/patchsummary.data.ts b/src/views/demo/minerals/patchsummary/patchsummary.data.ts
index aad6a588..f91ee573 100644
--- a/src/views/demo/minerals/patchsummary/patchsummary.data.ts
+++ b/src/views/demo/minerals/patchsummary/patchsummary.data.ts
@@ -6,12 +6,14 @@ import {
markTypeOptions,
nowStatusOptions,
mapTypeOptions,
+ getOptions,
} from '@/utils/global';
+
export const columns: BasicColumn[] = [
{
title: '年度',
- dataIndex: 'year',
+ dataIndex: 'syear_base',
},
{
title: '图斑编号',
@@ -37,7 +39,7 @@ export const columns: BasicColumn[] = [
},
{
title: '图斑类型',
- dataIndex: 'typename',
+ dataIndex: 'type_base',
},
{
title: '矿种',
@@ -157,7 +159,7 @@ export const searchFormSchema: FormSchema[] = [
},
},
{
- field: 'year',
+ field: 'syear_base',
component: 'Select',
colProps: { span: 4 },
label: '年度',
@@ -171,36 +173,33 @@ export const searchFormSchema: FormSchema[] = [
component: 'Select',
colProps: { span: 4 },
componentProps: {
- options: patchSourceOptions,
+ options: getOptions('tubanlaiyuan'),
},
},
{
- field: 'typename',
+ field: 'type_base',
label: '图斑类型',
component: 'Select',
colProps: { span: 4 },
componentProps: {
- options: [
- { label: '部级矿产卫片图斑', value: '部级矿产卫片图斑' },
- { label: '省级矿产卫片图斑', value: '省级矿产卫片图斑' },
- ],
+ options: getOptions('kctubanleixing'),
},
},
{
- field: 'isIllegal',
+ field: 'hefapanding_fill',
label: '判定结果',
component: 'Select',
colProps: { span: 4 },
componentProps: {
- options: mapTypeOptions,
+ options: getOptions('kcpandingjieguo'),
},
},
{
- field: 'nowStatus',
+ field: 'status_base',
label: '当前状态',
component: 'Select',
componentProps: {
- options: nowStatusOptions,
+ options: getOptions('kcdangqianzhuangtai'),
},
colProps: { span: 4 },
},
@@ -210,67 +209,31 @@ export const searchFormSchema: FormSchema[] = [
component: 'Select',
colProps: { span: 4 },
componentProps: {
- options: [
- { label: '拆除复耕', value: '0' },
- { label: '补办手续', value: '1' },
- ],
+ options: getOptions('kczhenggaicuoshi'),
},
},
-
- // {
- // field: 'picihao',
- // label: '批次',
- // component: 'Select',
- // colProps: { span: 4 },
- // componentProps: {
- // options: [],
- // },
- // },
-
- // {
- // field: 'isBuildName',
- // label: '标注类型',
- // component: 'Select',
- // colProps: { span: 4 },
- // componentProps: {
- // options: markTypeOptions,
- // },
- // },
-
{
- field: 'caseNo',
+ field: 'tubannum_base',
label: '图斑编号',
component: 'Input',
colProps: { span: 4 },
},
- // {
- // field: 'originalcaseno',
- // label: '标识号',
- // component: 'Input',
- // colProps: { span: 4 },
- // },
{
- field: 'measureName',
+ field: 'wefatype_kcfill',
label: '开采违法类型',
component: 'Select',
colProps: { span: 4 },
componentProps: {
- options: [
- { label: '拆除复耕', value: '0' },
- { label: '补办手续', value: '1' },
- ],
+ options: getOptions('kaicaiweifa'),
},
},
{
- field: 'measureName',
+ field: 'weifatype_jgfill',
label: '加工违法类型',
component: 'Select',
colProps: { span: 4 },
componentProps: {
- options: [
- { label: '拆除复耕', value: '0' },
- { label: '补办手续', value: '1' },
- ],
+ options: getOptions('jiagongweifa'),
},
},
@@ -281,21 +244,8 @@ export const searchFormSchema: FormSchema[] = [
colProps: { span: 4 },
slot: 'tubanmianji',
},
- // {
- // field: 'gengdimianji',
- // label: '耕地面积',
- // colProps: { span: 4 },
- // slot: 'gengdimianji',
- // },
- // {
- // field: 'jibennongtianmianji',
- // label: '永农面积',
- // colProps: { span: 4 },
- // slot: 'jibennongtianmianji',
- // },
-
{
- field: 'measureName',
+ field: 'zhongdianflag_base',
label: '是否重点矿区',
component: 'Select',
colProps: { span: 4 },
@@ -308,16 +258,16 @@ export const searchFormSchema: FormSchema[] = [
},
},
{
- field: 'measureName',
+ field: 'kuangzhong_kcfill',
label: '权属矿种',
component: 'Select',
colProps: { span: 4 },
componentProps: {
- options: [],
+ options: getOptions('kuangzhong'),
},
},
{
- field: '[startDate, endDate]',
+ field: '[startTime, endTime]',
label: '日期范围',
component: 'RangePicker',
componentProps: {