From 23abf3c8d6ca9577608a3d5ab207d0da67e6e752 Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期三, 06 十一月 2024 16:47:58 +0800
Subject: [PATCH] 搜索样式功能统一、一些搜索bug

---
 src/views/system/contract/score/index.vue           |    8 +-
 src/views/system/point/index.vue                    |   21 ++++++
 src/views/system/work-order/threshold/index.vue     |   17 +----
 src/views/system/platform/index.vue                 |    4 
 src/views/system/monitor/face/index.vue             |    2 
 src/views/system/monitor/car/index.vue              |    2 
 src/views/system/check/template/index.vue           |    4 
 src/views/system/work-order/index.vue               |   75 ++++++++++++++++++------
 src/views/system/monitor/recovery/index.vue         |    2 
 src/views/system/work-order/distribute/index.vue    |    4 
 src/views/system/contract/contract-result/index.vue |    4 +
 src/views/system/monitor/video/index.vue            |    2 
 src/views/system/data-manage/data-detail/index.vue  |    9 +-
 src/views/screen/components/map3.vue                |    3 
 src/views/system/contract/contract/index.vue        |    2 
 src/views/system/report/index.vue                   |    2 
 16 files changed, 106 insertions(+), 55 deletions(-)

diff --git a/src/views/screen/components/map3.vue b/src/views/screen/components/map3.vue
index 6a314ae..a8c8f34 100644
--- a/src/views/screen/components/map3.vue
+++ b/src/views/screen/components/map3.vue
@@ -417,7 +417,8 @@
           },
 
           formatter: function (params) {
-            return `{style|${params.data.name} \n 瑙嗛锛�${params.data.number} \n 杞﹁締锛�${params.data.number} \n 浜鸿劯锛�${params.data.number}}`
+            return `{style|${params.data.name} 锛�${params.data.number}}`
+            // return `{style|${params.data.name} \n 瑙嗛锛�${params.data.number} \n 杞﹁締锛�${params.data.number} \n 浜鸿劯锛�${params.data.number}}`
           },
           rich: {
             style: {
diff --git a/src/views/system/check/template/index.vue b/src/views/system/check/template/index.vue
index f790db1..964d6d3 100644
--- a/src/views/system/check/template/index.vue
+++ b/src/views/system/check/template/index.vue
@@ -3,7 +3,7 @@
     <el-form style="margin-left :20px" :model="queryParams" ref="queryForm" size="small" :inline="true"
              v-show="showSearch" label-width="68px">
       <el-form-item label="鑰冩牳绫诲瀷" prop="examineCategory">
-        <el-select v-model="queryParams.examineCategory" placeholder="鑰冩牳绫诲瀷" clearable @keyup.enter.native="handleQuery">
+        <el-select v-model="queryParams.examineCategory" placeholder="鑰冩牳绫诲瀷" clearable @change="handleQuery">
           <el-option
             v-for="dict in dict.type.platform_examine_category"
             :key="dict.value"
@@ -13,7 +13,7 @@
         </el-select>
       </el-form-item>
       <el-form-item label="鑰冩牳鏍囩" prop="examineTag">
-        <el-select v-model="queryParams.examineTag" placeholder="鑰冩牳鏍囩" clearable @keyup.enter.native="handleQuery">
+        <el-select v-model="queryParams.examineTag" placeholder="鑰冩牳鏍囩" clearable @change="handleQuery">
           <el-option
             v-for="dict in dict.type.platform_examine_tag"
             :key="parseInt(dict.value)"
diff --git a/src/views/system/contract/contract-result/index.vue b/src/views/system/contract/contract-result/index.vue
index e97a6e6..e1fc67a 100644
--- a/src/views/system/contract/contract-result/index.vue
+++ b/src/views/system/contract/contract-result/index.vue
@@ -43,6 +43,7 @@
           range-separator="-"
           start-placeholder="寮�濮嬫棩鏈�"
           end-placeholder="缁撴潫鏃ユ湡"
+          @change="handleQuery"
         ></el-date-picker>
       </el-form-item>
       <el-form-item>
@@ -306,6 +307,9 @@
       if (null != this.daterangeCheckTime && "" != this.daterangeCheckTime) {
         this.queryParams["createStartTime"] = this.daterangeCheckTime[0];
         this.queryParams["createEndTime"] = this.daterangeCheckTime[1];
+      }else {
+        this.queryParams["createStartTime"] = null;
+        this.queryParams["createEndTime"] = null;
       }
       console.log("this.queryParams", this.queryParams);
       listCheckResult(this.queryParams).then((response) => {
diff --git a/src/views/system/contract/contract/index.vue b/src/views/system/contract/contract/index.vue
index 3ad33e6..b99629d 100644
--- a/src/views/system/contract/contract/index.vue
+++ b/src/views/system/contract/contract/index.vue
@@ -11,7 +11,7 @@
         />
       </el-form-item>
       <el-form-item label="鍚堝悓鐘舵��">
-        <el-select v-model="queryParams.status" @change="getList">
+        <el-select v-model="queryParams.status" @change="getList" clearable>
           <el-option label="鍏ㄩ儴" value=""></el-option>
           <el-option label="鏈夋晥" value="ACTIVE"></el-option>
           <el-option label="鏈敓鏁�" value="NOT_START"></el-option>
diff --git a/src/views/system/contract/score/index.vue b/src/views/system/contract/score/index.vue
index fd5e618..6b931fb 100644
--- a/src/views/system/contract/score/index.vue
+++ b/src/views/system/contract/score/index.vue
@@ -8,13 +8,13 @@
         </el-select>
       </el-form-item>
       <el-form-item label="瀹℃牳鏃堕棿">
-        <el-date-picker v-model="daterangeAuditingTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss"
-          type="daterange" range-separator="-" start-placeholder="寮�濮嬫棩鏈�" end-placeholder="缁撴潫鏃ユ湡"></el-date-picker>
+        <el-date-picker v-model="daterangeAuditingTime" style="width: 240px" value-format="yyyy-MM-dd"
+          type="daterange" range-separator="-" start-placeholder="寮�濮嬫棩鏈�" end-placeholder="缁撴潫鏃ユ湡" @change="handleQuery"></el-date-picker>
       </el-form-item>
 
       <el-form-item label="鍒涘缓鏃堕棿">
-        <el-date-picker v-model="daterangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss"
-          type="daterange" range-separator="-" start-placeholder="寮�濮嬫棩鏈�" end-placeholder="缁撴潫鏃ユ湡"></el-date-picker>
+        <el-date-picker v-model="daterangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd"
+          type="daterange" range-separator="-" start-placeholder="寮�濮嬫棩鏈�" end-placeholder="缁撴潫鏃ユ湡" @change="handleQuery"></el-date-picker>
       </el-form-item>
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">鎼滅储</el-button>
diff --git a/src/views/system/data-manage/data-detail/index.vue b/src/views/system/data-manage/data-detail/index.vue
index 00c2aff..01dfd99 100644
--- a/src/views/system/data-manage/data-detail/index.vue
+++ b/src/views/system/data-manage/data-detail/index.vue
@@ -76,11 +76,11 @@
     </el-row>
     <div style="display: flex;position: relative">
       <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
-        <el-form-item label="鍏抽敭璇�" prop="bayonetNumber">
-          <el-input v-model="queryParams.keyword" placeholder="鍏抽敭璇嶆悳绱�" clearable @input="handleQuery"/>
+        <el-form-item label="鍏抽敭瀛�" prop="bayonetNumber">
+          <el-input v-model="queryParams.keyword" placeholder="鍥芥爣鐮�/璁惧鍚�/ip鎼滅储" clearable @keyup.enter.native="handleQuery" @clear="handleQuery"/>
         </el-form-item>
         <el-form-item :label="this.optionsName" prop="option" v-show = "this.optionsStatus">
-          <el-select  v-model="queryParams.option" size="small" clearable>
+          <el-select  v-model="queryParams.option" size="small" clearable @change="handleQuery">
             <el-option v-for="option in options" :key="option.value" :label="option.label" :value="option.value"></el-option>
           </el-select>
         </el-form-item>
@@ -89,7 +89,8 @@
               v-model="queryParams.date"
               type="date"
               placeholder="閫夋嫨鏃ユ湡"
-              value-format="yyyy-MM-dd">
+              value-format="yyyy-MM-dd"
+              @change="handleQuery">
             </el-date-picker>
         </el-form-item>
         <el-form-item>
diff --git a/src/views/system/monitor/car/index.vue b/src/views/system/monitor/car/index.vue
index c288741..4fbb860 100644
--- a/src/views/system/monitor/car/index.vue
+++ b/src/views/system/monitor/car/index.vue
@@ -51,7 +51,7 @@
       <el-form-item label="鍏抽敭瀛�" prop="name">
         <el-input
           v-model="queryParams.name"
-          placeholder="璇疯緭鍏ュ叧閿瓧"
+          placeholder="璁惧鍚�/璁惧缂栫爜/IP/鍗曚綅鍚�"
           clearable
           @keyup.enter.native="handleQuery"
           @clear="handleQuery"
diff --git a/src/views/system/monitor/face/index.vue b/src/views/system/monitor/face/index.vue
index 0b3ce68..6337f63 100644
--- a/src/views/system/monitor/face/index.vue
+++ b/src/views/system/monitor/face/index.vue
@@ -51,7 +51,7 @@
       <el-form-item label="鍏抽敭瀛�" prop="name">
         <el-input
           v-model="queryParams.name"
-          placeholder="璇疯緭鍏ュ叧閿瓧"
+          placeholder="璁惧鍚�/璁惧缂栫爜/IP/鍗曚綅鍚�"
           clearable
           @keyup.enter.native="handleQuery"
           @clear="handleQuery"
diff --git a/src/views/system/monitor/recovery/index.vue b/src/views/system/monitor/recovery/index.vue
index f0c9ea2..015e5d3 100644
--- a/src/views/system/monitor/recovery/index.vue
+++ b/src/views/system/monitor/recovery/index.vue
@@ -51,7 +51,7 @@
       <el-form-item label="鍏抽敭瀛�" prop="name">
         <el-input
           v-model="queryParams.name"
-          placeholder="璇疯緭鍏ュ叧閿瓧"
+          placeholder="璁惧鍚�/璁惧缂栫爜/IP/鍗曚綅鍚�"
           clearable
           @keyup.enter.native="handleQuery"
           @clear="handleQuery"
diff --git a/src/views/system/monitor/video/index.vue b/src/views/system/monitor/video/index.vue
index f4a2b4d..c750024 100644
--- a/src/views/system/monitor/video/index.vue
+++ b/src/views/system/monitor/video/index.vue
@@ -54,7 +54,7 @@
           <el-form-item label="鍏抽敭瀛�" prop="name">
             <el-input
               v-model="queryParams.name"
-              placeholder="璇疯緭鍏ュ叧閿瓧"
+              placeholder="璁惧鍚�/璁惧缂栫爜/IP/鍗曚綅鍚�"
               clearable
               @keyup.enter.native="handleQuery"
               @clear="handleQuery"
diff --git a/src/views/system/platform/index.vue b/src/views/system/platform/index.vue
index 340e6a2..ce8240e 100644
--- a/src/views/system/platform/index.vue
+++ b/src/views/system/platform/index.vue
@@ -1,8 +1,8 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" @submit.native.prevent>
       <el-form-item label="骞冲彴鍚嶇О" prop="workOrderNo">
-        <el-input v-model="queryParams.keyword" placeholder="鍏抽敭璇嶆悳绱�" @clear="handleQuery" clearable @keyup.enter.native="handleQuery" size="small"></el-input>
+        <el-input v-model="queryParams.keyword" placeholder="璇疯緭鍏ュ钩鍙板悕绉�" @clear="handleQuery" clearable @keyup.enter.native="handleQuery" size="small" ></el-input>
       </el-form-item>
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">鎼滅储</el-button>
diff --git a/src/views/system/point/index.vue b/src/views/system/point/index.vue
index 7743bcc..93f2536 100644
--- a/src/views/system/point/index.vue
+++ b/src/views/system/point/index.vue
@@ -5,6 +5,19 @@
         <el-input v-model="queryParams.pointName" placeholder="杈撳叆鐐逛綅鍚嶇О" clearable @clear="handleQuery" @keyup.enter.native="handleQuery" />
       </el-form-item>
       <el-form-item label="鍗曚綅" prop="unit">
+        <el-select
+          v-model="queryParams.unitId"
+          placeholder="璇烽�夋嫨鍗曚綅"
+          clearable
+          @change="handleQuery"
+        >
+          <el-option
+            v-for="unit in unitList"
+            :key="unit.id"
+            :label="unit.value"
+            :value="unit.id"
+          />
+        </el-select>
       </el-form-item>
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">鎼滅储</el-button>
@@ -247,7 +260,6 @@
 import { unitSelect } from "@/api/platform/unit";
 import { getCascader } from '@/api/platform/region'
 import { cascader } from '@/api/system/dept'
-
 export default {
   name: "Point",
   dicts: ['point_tag', 'area_code'],
@@ -442,7 +454,12 @@
     handleEditBatch() {
       this.batchOpen = true;
     },
-
+    // 杩愮淮鍏徃涓嬫媺鏁版嵁
+    selectUnit() {
+      workList(this.queryParams).then(res => {
+        this.unitList = res.data;
+      })
+    },
     // 鑾峰彇鍖哄幙绾ц仈
     getCascader() {
       getCascader().then(res => {
diff --git a/src/views/system/report/index.vue b/src/views/system/report/index.vue
index e9b31f0..fdc7e08 100644
--- a/src/views/system/report/index.vue
+++ b/src/views/system/report/index.vue
@@ -2,7 +2,7 @@
   <div class="app-container">
     <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
       <el-form-item label="鍏抽敭瀛�" prop="peopleId">
-        <el-input v-model="queryParams.keyword" placeholder="璇疯緭鍏ュ叧閿瓧" clearable @keyup.enter.native="handleQuery" />
+        <el-input v-model="queryParams.keyword" placeholder="鐐逛綅鍚嶆悳绱�" clearable @keyup.enter.native="handleQuery" @clear="handleQuery"/>
       </el-form-item>
       <el-form-item label="鎶ュ绫诲瀷" prop="reportType">
         <el-select v-model="queryParams.reportType" @change="handleQuery" placeholder="鎶ュ绫诲瀷" clearable>
diff --git a/src/views/system/work-order/distribute/index.vue b/src/views/system/work-order/distribute/index.vue
index 04d47be..7d56ea9 100644
--- a/src/views/system/work-order/distribute/index.vue
+++ b/src/views/system/work-order/distribute/index.vue
@@ -16,10 +16,10 @@
     <el-row class="op-warp">
       <el-row v-show="showSearch">
         <el-form :model="queryParams" ref="queryForm" size="small" :inline="true">
-          <el-form-item label="鍏抽敭璇�" prop="keyword">
+          <el-form-item label="鍏抽敭瀛�" prop="keyword">
             <el-input
               v-model="queryParams.keyword"
-              placeholder="鍏抽敭璇嶆悳绱�"
+              placeholder="宸ュ崟鍙�/璁惧鍚�/璁惧缂栧彿鎼滅储"
               clearable
               @keyup.enter.native="page"
               @clear="page"
diff --git a/src/views/system/work-order/index.vue b/src/views/system/work-order/index.vue
index 0cd1e06..5c47a9e 100644
--- a/src/views/system/work-order/index.vue
+++ b/src/views/system/work-order/index.vue
@@ -1,7 +1,20 @@
 <template>
-  <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
-      <el-form-item label="鍏抽敭璇�" prop="keyword">
+  <div style=" padding: 0 20px;">
+    <el-row type="flex" justify="left" v-if="this.$store.state.user.roles.some(role => ['admin', 'zg_city', 'city_leader'].includes(role))">
+      <el-col :span="24" style="position: relative">
+        <el-menu :default-active="activeIndex" class="el-menu" mode="horizontal">
+          <el-menu-item index="0" @click="changeUnit(null, '鍏ㄩ儴')">
+            鍏ㄩ儴鍗曚綅锛坽{ totalWorkOrders }}锛�
+          </el-menu-item>
+          <el-menu-item :index="index + 1" v-for="(item, index) in unitList" :key="index" @click="changeUnit(item.id, item.value)">
+            {{ item.unitName }}锛坽{ item.workOrderCount }}锛�
+          </el-menu-item>
+        </el-menu>
+      </el-col>
+    </el-row>
+
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" style="margin-top: 10px;">
+      <el-form-item label="鍏抽敭瀛�" prop="keyword">
         <el-input
           v-model="queryParams.keyword"
           placeholder="宸ュ崟鍙�/鐐逛綅鍚嶇О鎼滅储"
@@ -42,7 +55,6 @@
         <el-button icon="el-icon-refresh" size="small" @click="resetQuery">閲嶇疆</el-button>
       </el-form-item>
     </el-form>
-
     <el-row :gutter="10" class="mb8">
       <el-col :span="1.5">
         <el-button
@@ -121,10 +133,13 @@
                     <el-col :span="24" class="time">鏁呴殰鏃堕棿锛歿{ item.createTime }}</el-col>
                   </el-row>
                   <el-row class="work-order-item">
-                    <el-col class="time" :span="24"><div>鍥芥爣鐮侊細{{ item.serialNumber }}</div>
+                    <el-col class="time" :span="24">
+                      <div>鍥芥爣鐮侊細{{ item.serialNumber }}</div>
                       <el-tooltip effect="dark" :content="item.source" placement="top-start">
                         <div>{{ item.source }}</div>
-                      </el-tooltip></el-col>
+                      </el-tooltip>
+                      <div>IP锛歿{ item.ip }}</div>
+                    </el-col>
                   </el-row>
                   <el-row style="position: absolute;bottom: 10px">
                     <el-button
@@ -488,6 +503,7 @@
   getYwCondition,
   process
 } from '@/api/platform/work-order'
+import {workList} from "@/api/platform/unit";
 import { addReport } from '@/api/platform/report'
 import WorkOrderAuditing from "@/components/WorkOrder/WorkOrderAuditing";
 
@@ -497,10 +513,12 @@
   components: {WorkOrderAuditing},
   data() {
     return {
+      activeIndex: '0',
       drawer: false,
       empty: false,
       openShowCurrent: null,
       ywConditions: [],
+      unitList: [],
       batchAuditingVisible: false,
       batchAuditingWorkOrder: {
         errorTypes: [],
@@ -570,6 +588,7 @@
         keyword: null,
         status: ''
       },
+
       // 琛ㄥ崟鍙傛暟
       form: {},
       // 瀹℃牳琛ㄥ崟
@@ -651,6 +670,12 @@
       this.ywData.content = item.ywCondition
       this.ywData.fileList = item.ywProofMaterials
       this.drawer = true
+    },
+    changeUnit(unitId, unitName) {
+      this.unitId = unitId;
+      this.queryParams.unitId = unitId;
+      this.unitName = unitName;
+      this.getList()
     },
     // 鎵归噺瀹℃牳
     batchAuditing(result) {
@@ -817,22 +842,28 @@
       if (this.queryParams.timeRange && this.queryParams.timeRange.length > 0) {
         this.queryParams.start = this.queryParams.timeRange[0]
         this.queryParams.end = this.queryParams.timeRange[1]
+      }else {
+        this.queryParams.start = null
+        this.queryParams.end = null
       }
-
+      this.queryParams.isNotDistribute = true;
       listWorkOrder(this.queryParams).then(response => {
-        response.data.forEach(item => {
-          if (item.imgList) {
-            item.imgList = item.imgList.map(img => {
-              return this.$img + img
-            })
+        workList(this.queryParams).then(res => {
+          this.unitList = res.data;
+          response.data.forEach(item => {
+            if (item.imgList) {
+              item.imgList = item.imgList.map(img => {
+                return this.$img + img
+              })
+            }
+          })
+          this.workOrderList = response.data
+          this.total = response.total
+          this.loading = false
+          if (this.total === 0) {
+            this.empty = true
           }
         })
-        this.workOrderList = response.data
-        this.total = response.total
-        this.loading = false
-        if (this.total === 0) {
-          this.empty = true
-        }
       })
       //   .catch(error => {
       //   //閬垮厤闃查噸鎻愬崱鍦ㄥ姞杞�
@@ -945,7 +976,12 @@
         ...this.queryParams
       }, `work-order_${new Date().getTime()}.xlsx`)
     }
-  }
+  },
+  computed: {
+    totalWorkOrders() {
+      return this.unitList.reduce((total, item) => total + item.workOrderCount, 0);
+    },
+  },
 }
 </script>
 
@@ -1015,4 +1051,5 @@
 ::v-deep el-step__description.is-finish {
   color: gray;
 }
+
 </style>
diff --git a/src/views/system/work-order/threshold/index.vue b/src/views/system/work-order/threshold/index.vue
index 6e2d5af..aaef9f5 100644
--- a/src/views/system/work-order/threshold/index.vue
+++ b/src/views/system/work-order/threshold/index.vue
@@ -285,20 +285,11 @@
     </el-row>
     <el-row class="content-warp">
       <div class="header鈥攖ext" style="margin-bottom: 5px">宸ュ崟鐧藉悕鍗�</div>
-      <el-form :model="queryParams" ref="queryForm" size="small" :inline="true">
-        <el-form-item label="璁惧缂栫爜" prop="serialNumber">
+      <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" @submit.native.prevent>
+        <el-form-item label="鍏抽敭瀛�" prop="keyword">
           <el-input
-            v-model="queryParams.serialNumber"
-            placeholder="璁惧缂栫爜"
-            clearable
-            @keyup.enter.native="getWhiteList"
-            @clear="getWhiteList"
-          />
-        </el-form-item>
-        <el-form-item label="鐐逛綅鍚嶇О" prop="pointName">
-          <el-input
-            v-model="queryParams.pointName"
-            placeholder="鐐逛綅鍚嶇О"
+            v-model="queryParams.keyword"
+            placeholder="璁惧缂栫爜/鐐逛綅鍚�"
             clearable
             @keyup.enter.native="getWhiteList"
             @clear="getWhiteList"

--
Gitblit v1.8.0