From 1c391db321fae77ddcd297e14fbe1429960ead49 Mon Sep 17 00:00:00 2001
From: 龚焕茏 <2842157468@qq.com>
Date: 星期二, 05 三月 2024 14:42:20 +0800
Subject: [PATCH] 景区运行数据基础功能

---
 src/views/dg/danger/total.vue |   25 +++++++++++++++----------
 1 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/src/views/dg/danger/total.vue b/src/views/dg/danger/total.vue
index 8657463..34a9652 100644
--- a/src/views/dg/danger/total.vue
+++ b/src/views/dg/danger/total.vue
@@ -82,16 +82,16 @@
       <el-form ref="dangerTotalFormRef" :model="form" :rules="rules" label-width="80px">
         <el-form-item label="闀囪鍚嶇О" prop="townStreetName" label-width="100">
           <!-- <el-input v-model="form.townStreetName" placeholder="璇疯緭鍏ラ晣琛楀悕绉�" /> -->
-          <el-select v-model="form.townStreetName" placeholder="璇烽�夋嫨" clearable style="width: 240px" @keyup.enter="handleQuery" >
+          <el-select v-model="form.townStreetName" placeholder="璇烽�夋嫨" clearable style="width: 240px" >
               <el-option v-for="item in townStreetNames" :key="item.townStreetName" :label="item.townStreetName" :value="item.townStreetName"/>
             </el-select>
         </el-form-item>
         <el-form-item label="缁熻鍛ㄦ湡" prop="periodDate" label-width="100">
-          <el-select v-model="form.period" placeholder="璇烽�夋嫨" style="width: 100px;">
+          <el-select v-model="form.period" placeholder="璇烽�夋嫨" style="width: 100px;" @change="clearPeriod">
             <el-option key="1" label="骞村害" :value="1" />
             <el-option key="2" label="鏈堝害" :value="2" />
           </el-select>
-          &nbsp;
+          &emsp;
           <el-date-picker v-model="form.periodDate" :type="pickerType" :value-format="pickerFormat" placeholder="璇烽�夋嫨缁熻鍛ㄦ湡" />
         </el-form-item>
         <el-form-item label="鍙戠幇闅愭偅" prop="findSecurityRisks" label-width="100">
@@ -144,12 +144,12 @@
 });
 
 const townStreetNames = [
-  {
-    townStreetName: '骞哥琛楅亾',
-  },
-  {
-    townStreetName: '閾舵潖琛楅亾'
-  }];
+{
+  townStreetName: '骞哥琛楅亾',
+},
+{
+  townStreetName: '閾舵潖琛楅亾'
+}];
 
 const initFormData: DangerTotalForm = {
   id: undefined,
@@ -159,7 +159,7 @@
   findSecurityRisks: undefined,
   issueNotice: undefined,
   dealWithSecurityRisks: undefined,
-  status: undefined
+  status: 1
 }
 const data = reactive<PageData<DangerTotalForm, DangerTotalQuery>>({
   form: {...initFormData},
@@ -309,4 +309,9 @@
 const pickerFormat = computed(() => {
   return form.value.period === 1 ? 'YYYY' : 'YYYY-MM';
 });
+
+/** 娓呯┖鍛ㄦ湡 */
+const clearPeriod = () => {
+  form.value.periodDate = undefined;
+};
 </script>

--
Gitblit v1.8.0