From 9fae98d981f10ae8c26df5a99492f2e555a7ede3 Mon Sep 17 00:00:00 2001 From: "30830569@qq.com" <> Date: Tue, 15 Nov 2022 15:55:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=9C=80=E6=B1=82=EF=BC=8C?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../base/crop-yields/base-yields/base.data.ts | 28 +- .../base/crop-yields/town-yields/town.data.ts | 28 +- src/views/main/meteorological/index.vue | 2 +- .../soil-monitoring/components/FormDrawer.vue | 2 +- src/views/main/soil-monitoring/index.vue | 50 +-- src/views/main/soil-monitoring/index1.vue | 353 ++++++++++++++++++ .../water-quality/components/FormDrawer.vue | 2 +- src/views/main/water-quality/index.vue | 51 +-- src/views/main/water-quality/index1.vue | 352 +++++++++++++++++ 9 files changed, 765 insertions(+), 103 deletions(-) create mode 100644 src/views/main/soil-monitoring/index1.vue create mode 100644 src/views/main/water-quality/index1.vue diff --git a/src/views/base/crop-yields/base-yields/base.data.ts b/src/views/base/crop-yields/base-yields/base.data.ts index 93c25f38..c454137d 100644 --- a/src/views/base/crop-yields/base-yields/base.data.ts +++ b/src/views/base/crop-yields/base-yields/base.data.ts @@ -53,20 +53,20 @@ export const searchFormSchema: FormSchema[] = [ }, colProps: { span: 6 }, }, - // { - // field: 'quarter', - // label: '季度', - // component: 'Select', - // componentProps: { - // options: [ - // { label: '第一季度', value: '1' }, - // { label: '第二季度', value: '2' }, - // { label: '第三季度', value: '3' }, - // { label: '第四季度', value: '4' }, - // ], - // }, - // colProps: { span: 6 }, - // }, + { + field: 'quarter', + label: '季度', + component: 'Select', + componentProps: { + options: [ + { label: '第一季度', value: '1' }, + { label: '第二季度', value: '2' }, + { label: '第三季度', value: '3' }, + { label: '第四季度', value: '4' }, + ], + }, + colProps: { span: 6 }, + }, // { // field: 'crop', // label: '农作物', diff --git a/src/views/base/crop-yields/town-yields/town.data.ts b/src/views/base/crop-yields/town-yields/town.data.ts index 93c25f38..c454137d 100644 --- a/src/views/base/crop-yields/town-yields/town.data.ts +++ b/src/views/base/crop-yields/town-yields/town.data.ts @@ -53,20 +53,20 @@ export const searchFormSchema: FormSchema[] = [ }, colProps: { span: 6 }, }, - // { - // field: 'quarter', - // label: '季度', - // component: 'Select', - // componentProps: { - // options: [ - // { label: '第一季度', value: '1' }, - // { label: '第二季度', value: '2' }, - // { label: '第三季度', value: '3' }, - // { label: '第四季度', value: '4' }, - // ], - // }, - // colProps: { span: 6 }, - // }, + { + field: 'quarter', + label: '季度', + component: 'Select', + componentProps: { + options: [ + { label: '第一季度', value: '1' }, + { label: '第二季度', value: '2' }, + { label: '第三季度', value: '3' }, + { label: '第四季度', value: '4' }, + ], + }, + colProps: { span: 6 }, + }, // { // field: 'crop', // label: '农作物', diff --git a/src/views/main/meteorological/index.vue b/src/views/main/meteorological/index.vue index c8865e7e..f9539fd4 100644 --- a/src/views/main/meteorological/index.vue +++ b/src/views/main/meteorological/index.vue @@ -227,7 +227,7 @@ time: undefined, //时间 time_interval: 'day', }) - const baseDate = ref([]) + const baseDate = ref([]) const pointDate = ref([]) const statisData = ref({}) const name = computed(() => baseDate?.value?.find((e: any) => e.id === formState.base_id)?.name) diff --git a/src/views/main/soil-monitoring/components/FormDrawer.vue b/src/views/main/soil-monitoring/components/FormDrawer.vue index 97ee2a7d..0538c2db 100644 --- a/src/views/main/soil-monitoring/components/FormDrawer.vue +++ b/src/views/main/soil-monitoring/components/FormDrawer.vue @@ -66,7 +66,7 @@ 3: 'Ⅲ级预警', 4: 'Ⅳ级预警', } - const roulsDate = ref(null) + const roulsDate = ref(null) const Title = computed(() => { if (!roulsDate.value) return [] return Object.keys(roulsDate.value.value) diff --git a/src/views/main/soil-monitoring/index.vue b/src/views/main/soil-monitoring/index.vue index 3c1590b0..05c7c425 100644 --- a/src/views/main/soil-monitoring/index.vue +++ b/src/views/main/soil-monitoring/index.vue @@ -87,40 +87,27 @@ 预警数据统计 -
+
-
-
- +
+ -
{{ item.lable }}
-
- -
@@ -170,13 +157,11 @@ time: undefined, //时间 time_interval: 'day', }) - const baseDate = ref([]) + const baseDate = ref([]) const pointDate = ref([]) const statisData = ref({}) // 预警数量 const earlyNums = ref({}) - // 选中 - const activeKey = ref('conductivity') interface EarlyWarningItem { icon: String title: String @@ -210,10 +195,7 @@ }) return arr }) - const currentActiveLable = computed( - () => tagMenus.find((e) => e.value === activeKey.value)?.lable ?? '', - ) - const chartData = computed(() => statisData.value[activeKey.value]) + const extra = computed(() => { const name1 = baseDate.value?.find((e: any) => e.id === formState.base_id)?.name const name2 = pointDate.value?.find((e: any) => e.value === formState.device_id)?.label ?? '' @@ -337,10 +319,6 @@ const handleSuccess = () => { message.success('操作成功') } - // - const onChangeTag = (e: string) => { - activeKey.value = e - } onMounted(() => { getBase() }) diff --git a/src/views/main/soil-monitoring/index1.vue b/src/views/main/soil-monitoring/index1.vue new file mode 100644 index 00000000..69e2657d --- /dev/null +++ b/src/views/main/soil-monitoring/index1.vue @@ -0,0 +1,353 @@ + + + + + diff --git a/src/views/main/water-quality/components/FormDrawer.vue b/src/views/main/water-quality/components/FormDrawer.vue index f8358128..028e5642 100644 --- a/src/views/main/water-quality/components/FormDrawer.vue +++ b/src/views/main/water-quality/components/FormDrawer.vue @@ -66,7 +66,7 @@ 3: 'Ⅲ级预警', 4: 'Ⅳ级预警', } - const roulsDate = ref(null) + const roulsDate = ref(null) const Title = computed(() => { if (!roulsDate.value) return [] return Object.keys(roulsDate.value.value) diff --git a/src/views/main/water-quality/index.vue b/src/views/main/water-quality/index.vue index ca942910..1c1e6f67 100644 --- a/src/views/main/water-quality/index.vue +++ b/src/views/main/water-quality/index.vue @@ -87,40 +87,26 @@ 预警数据统计
-
+
-
-
- +
+ -
{{ item.lable }}
-
- -
@@ -169,13 +155,12 @@ time: undefined, //时间 time_interval: 'day', }) - const baseDate = ref([]) + const baseDate = ref([]) const pointDate = ref([]) const statisData = ref({}) // 预警数量 const earlyNums = ref({}) - // 选中 - const activeKey = ref('chlorine') + interface EarlyWarningItem { icon: String title: String @@ -209,10 +194,7 @@ }) return arr }) - const currentActiveLable = computed( - () => tagMenus.find((e) => e.value === activeKey.value)?.lable ?? '', - ) - const chartData = computed(() => statisData.value[activeKey.value]) + const extra = computed(() => { const name1 = baseDate.value?.find((e: any) => e.id === formState.base_id)?.name const name2 = pointDate.value?.find((e: any) => e.value === formState.device_id)?.label ?? '' @@ -336,10 +318,7 @@ const handleSuccess = () => { message.success('操作成功') } - // - const onChangeTag = (e: string) => { - activeKey.value = e - } + onMounted(() => { getBase() }) diff --git a/src/views/main/water-quality/index1.vue b/src/views/main/water-quality/index1.vue new file mode 100644 index 00000000..eeab77e0 --- /dev/null +++ b/src/views/main/water-quality/index1.vue @@ -0,0 +1,352 @@ + + + + +