zhaobao há 1 ano atrás
pai
commit
cb2744f5cd
2 ficheiros alterados com 38 adições e 20 exclusões
  1. 2 2
      src/settings.js
  2. 36 18
      src/views/bigScreen/goafCameraAlarm/index.vue

+ 2 - 2
src/settings.js

@@ -37,8 +37,8 @@ module.exports = {
   * 服务API地址
   */
   serverUrl: 'http://113.141.93.143:1888', // 正式环境
-  // devServerUrl: 'http://113.141.93.143:1888', // 开发环境
-  devServerUrl: 'http://192.168.3.5:1888', // 开发环境 qu
+  devServerUrl: 'http://113.141.93.143:1888', // 开发环境
+  // devServerUrl: 'http://192.168.3.5:1888', // 开发环境 qu
   mqttUrl: 'ws://113.141.93.143:8894/mqtt', // mqtt地址
   /**
   * websocket 地址

+ 36 - 18
src/views/bigScreen/goafCameraAlarm/index.vue

@@ -8,7 +8,7 @@
       </div>
       <div class="search-block">
         <div class="block">
-          <span class="lable">装货开始时间</span>
+          <span class="lable">{{ tabType===0?'装货开始时间':'开始时间' }}</span>
           <el-date-picker
             v-model="conditions.startLoadTime"
             type="datetime"
@@ -18,7 +18,7 @@
           />
         </div>
         <div class="block">
-          <span class="lable">装货结束时间</span>
+          <span class="lable">{{ tabType===0?'装货结束时间':'结束时间' }}</span>
           <el-date-picker
             v-model="conditions.endLoadTime"
             type="datetime"
@@ -49,8 +49,7 @@
         </div>
         <div class="block">
           <span class="lable">车牌</span>
-          <el-input v-if="tabType===0" v-model.trim="conditions.transLicense" placeholder="请输入内容车牌" style="width:150px;" />
-          <el-input v-if="tabType===1" v-model.trim="conditions.transAbnormarlLicense" placeholder="请输入内容车牌" style="width:150px;" />
+          <el-input v-model.trim="conditions.carPlate" placeholder="请输入内容车牌" style="width:150px;" />
         </div>
         <div class="block"><el-button type="primary" @click="getData">查询</el-button></div>
       </div>
@@ -160,10 +159,9 @@ export default {
         limit: 10,
         startLoadTime: '',
         endLoadTime: '',
-        transLicense: '',
-        transAbnormarlLicense: '',
         startUnLoadTime: '',
-        endUnLoadTime: ''
+        endUnLoadTime: '',
+        carPlate: ''
       },
       dataList: [],
       total: 0
@@ -178,11 +176,6 @@ export default {
       this.$router.push('/bigScreen/index')
     },
     getData() {
-      for (const key in this.conditions) {
-        if (this.isNull(this.conditions[key])) {
-          delete this.conditions[key]
-        }
-      }
       if (this.tabType === 0) {
         delete this.conditions.transAbnormarlLicense
         this.getAllinfoData()
@@ -192,14 +185,40 @@ export default {
       }
     },
     getAllinfoData() {
-      getAllinfoByPage(this.conditions).then((resp) => {
+      const params = {
+        page: this.conditions.page,
+        limit: this.conditions.limit,
+        startLoadTime: this.conditions.startLoadTime,
+        endLoadTime: this.conditions.endLoadTime,
+        transLicense: this.conditions.carPlate,
+        startUnLoadTime: this.conditions.startUnLoadTime,
+        endUnLoadTime: this.conditions.endUnLoadTime
+      }
+      for (const key in params) {
+        if (this.isNull(params[key])) {
+          delete params[key]
+        }
+      }
+      getAllinfoByPage(params).then((resp) => {
         const { data, total } = resp
         this.total = total
         this.dataList = data
       })
     },
     getAnomalyData() {
-      getAbnormarlinfoByPage(this.conditions).then((resp) => {
+      const params = {
+        page: this.conditions.page,
+        limit: this.conditions.limit,
+        startTime: this.conditions.startLoadTime,
+        endTime: this.conditions.endLoadTime,
+        transAbnormarlLicense: this.conditions.carPlate
+      }
+      for (const key in params) {
+        if (this.isNull(params[key])) {
+          delete params[key]
+        }
+      }
+      getAbnormarlinfoByPage(params).then((resp) => {
         const { data, total } = resp
         this.total = total
         this.dataList = data
@@ -218,10 +237,9 @@ export default {
         limit: 10,
         startLoadTime: '',
         endLoadTime: '',
-        transLicense: '',
-        transAbnormarlLicense: '',
         startUnLoadTime: '',
-        endUnLoadTime: ''
+        endUnLoadTime: '',
+        carPlate: ''
       }
       this.getData()
     },
@@ -252,7 +270,7 @@ export default {
                 background-color: #00539F;
                 margin-left: 10px;
                 color: rgba(255, 255, 255, 0.75);
-                &.is-active{
+                &.is-active,&.active{
                     background-color: rgba(0, 131, 207, 1);
                 }
             }