From 5b6951defb238197a46407a4db617f55fc99391a Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期五, 15 十一月 2024 11:39:41 +0800
Subject: [PATCH] 白名单故障类型

---
 src/views/system/point/index.vue |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/src/views/system/point/index.vue b/src/views/system/point/index.vue
index 93f2536..3a7ba72 100644
--- a/src/views/system/point/index.vue
+++ b/src/views/system/point/index.vue
@@ -76,6 +76,7 @@
               size="small"
               v-model="ywTimes"
               type="daterange"
+              value-format="yyyy-MM-dd"
               range-separator="鑷�"
               start-placeholder="鏇存崲杩愮淮鏃堕棿"
               end-placeholder="鏇存崲杩愮淮鏃堕棿">
@@ -157,7 +158,7 @@
               </el-cascader>
             </el-form-item>
             <el-form-item label="杩愮淮鍗曚綅" prop="unitId">
-              <el-select v-model="form.unitId" placeholder="杩愮淮鍗曚綅">
+              <el-select v-model="form.unitId" placeholder="杩愮淮鍗曚綅" clearable @clear = "clearTime">
                 <el-option v-for="item in unitList" :key="item.id" :label="item.value" :value="item.id">
                 </el-option>
               </el-select>
@@ -272,7 +273,7 @@
       provinceTag: false,
       importantCommandImageTag: false,
       timeList: [],
-      timezone: [],
+      timezone: null,
       ywTimes: [],
       fileList: [],
       importFile: null,
@@ -353,6 +354,10 @@
     this.getDyColumn();
   },
   methods: {
+    clearTime() {
+      console.log("鐢熸晥")
+      this.timezone = '';
+    },
     getDyColumn() {
       // 鏌ヨ鍔ㄦ�佸垪
       let params = {
@@ -550,6 +555,13 @@
     submitForm() {
       this.$refs['form'].validate(valid => {
         if (valid) {
+          if (this.timezone && this.timezone.length > 0) {
+            this.form.startTime = this.timezone[0]
+            this.form.endTime = this.timezone[1]
+          } else {
+            this.form.startTime = null
+            this.form.endTime = null
+          }
           if (this.form.deptId && this.form.deptId.length > 0) {
             this.form.deptId = this.form.deptId[this.form.deptId.length - 1]
           }

--
Gitblit v1.8.0