Shannon_mu hace 3 años
padre
commit
1f78fe6f9d

+ 1 - 45
energyManagement/src/views/instrumentManagement/baseData.js

@@ -775,7 +775,7 @@ export const valveInfoCols = [
     }
   }, {
     label: '操作结果',
-    slot: 'operationResult',
+    prop: 'operationResult',
     format(val, data) {
       switch (val) {
         case 0:
@@ -801,47 +801,3 @@ export const valveInfoCols = [
 ]
 
 
-// 设备详情换表信息
-export const replaceDetailCols = [
-  {
-    label: '上报时间',
-    prop: 'dateCreate',
-  },
-  {
-    label: '设备编号',
-    prop: 'deviceNo',
-    slot: 'deviceNo',
-    width: 150
-  }, {
-    label: '水表电子号',
-    prop: 'meterNo',
-    slot: 'meterNo',
-    width: 150
-  }, {
-    label: '设备型号',
-    prop: 'productId',
-    slot: 'productId',
-  }, {
-    label: '水表档案号',
-    prop: 'fileNo',
-  }, {
-    label: '旧表止度',
-    prop: 'oldEndDegree',
-    format(val) {
-      return $numberFormat(val, 1)
-    }
-  }, {
-    label: '新表起度',
-    prop: 'newBeginDegree',
-    format(val) {
-      return $numberFormat(val, 1)
-    }
-  }, {
-    label: '更换方式',
-    prop: 'replaceMethod'
-  }, {
-    label: '更换人',
-    prop: 'replaceUser',
-    slot: 'replaceUser',
-  }
-]

+ 9 - 62
energyManagement/src/views/instrumentManagement/popups/tabIndex.vue

@@ -9,7 +9,6 @@
                     <span class="el-mgRight-sm" v-show="value == 'history'"> 上报时间 </span>
                     <span class="el-mgRight-sm" v-show="value == 'alarm'">告警时间</span>
                     <span class="el-mgRight-sm" v-show="value == 'valveNote'">操作时间</span>
-                    <span class="el-mgRight-sm" v-show="value == 'replace'">更换时间</span>
                     <span>
                         <el-date-picker
                             v-model="dataValue"
@@ -17,7 +16,7 @@
                             range-separator="至"
                             start-placeholder="开始日期"
                             end-placeholder="结束日期"
-                            value-format="yyyyMMdd"
+                            :value-format="dateType"
                             :picker-options="endDatePicker"
                             @change="timeQuery"
                             :clearable="false"
@@ -72,47 +71,13 @@
                 >
                 </zz-table>
             </div>
-            <div class="box__wrap" ref="replacebox" v-show="value == 'replace'">
-                <zz-table
-                    :cols="replaceDetailCols"
-                    :settings="{ showIndex: true, stripe: true }"
-                    :data="mixins_list"
-                    class="fullheight"
-                    :loading="mixins_onQuery"
-                    :pageset="mixins_pageset"
-                    @page-change="pageChange"
-                >
-                    <template slot="deviceNo" slot-scope="scope">
-                        <p v-tip>旧:{{ getRowStr(scope.row, ['DeviceNo']).oldStr || '-' }}</p>
-                        <p v-tip :style="{ color: getRowStr(scope.row, ['DeviceNo']).color }">
-                            新:{{ getRowStr(scope.row, ['DeviceNo']).newStr || '-' }}
-                        </p>
-                    </template>
-                    <template slot="meterNo" slot-scope="scope">
-                        <p v-tip>旧:{{ getRowStr(scope.row, ['MeterNo']).oldStr || '-' }}</p>
-                        <p v-tip :style="{ color: getRowStr(scope.row, ['MeterNo']).color }">
-                            新:{{ getRowStr(scope.row, ['MeterNo']).newStr || '-' }}
-                        </p>
-                    </template>
-                    <template slot="productId" slot-scope="scope">
-                        <p v-tip>旧:{{ getRowStr(scope.row, ['ProductId']).oldStr || '-' }}</p>
-                        <p v-tip :style="{ color: getRowStr(scope.row, ['ProductId']).color }">
-                            新:{{ getRowStr(scope.row, ['ProductId']).newStr || '-' }}
-                        </p>
-                    </template>
-                    <template slot="replaceUser" slot-scope="scope">
-                        <p v-tip>{{ scope.row.replaceUsername }}</p>
-                        <p v-tip>{{ scope.row.replaceUserPhone }}</p>
-                    </template>
-                </zz-table>
-            </div>
         </div>
     </div>
 </template>
 
 <script>
 import list from '@/utils/list';
-import { AlertsCols, replaceDetailCols, historyCols, valveInfoCols } from '../baseData';
+import { AlertsCols, historyCols, valveInfoCols } from '../baseData';
 import { getRowStr } from './basedata';
 import { deviceLoader } from '@/utils/basedata.js';
 import { chartOption } from './echartoption';
@@ -123,10 +88,10 @@ export default {
     data() {
         return {
             deviceLoader,
-            detailCols: [],
             type: '',
             chartoption: {}, //
             value: 'history',
+            dateType: 'yyyyMMdd',
             tabs: [
                 {
                     value: 'history',
@@ -146,7 +111,7 @@ export default {
                 // }
             ],
             dataUnit: '',
-            dataValue: '',
+            dataValue: [],
             endDatePicker: {
                 disabledDate: (time) => {
                     return time.getTime() > new Date().getTime();
@@ -162,23 +127,16 @@ export default {
             Cols: [],
             AlertsCols,
             valveInfoCols,
-            replaceDetailCols, //换表表头
             historyCols, //告警列表表头
             getRowStr,
             historyDataList: []
         };
     },
     created() {
-        let date = new Date();
-        this.value = 'history';
-        this.dataValue = [
-            this.$moment(new Date(date.getFullYear(), date.getMonth(), 1)).format('YYYYMMDD'),
-            this.$moment().format('YYYYMMDD')
-        ];
         if (!!this.$route.query.type && this.$route.query.type == 2) {
             this.tabs[2].label = '闸控记录';
         }
-
+        this.initDate('YYYYMMDD');
         this.mixins_query = {
             deviceId: this.params.id || '',
             startDate: this.dataValue.length ? `${this.dataValue[0]}` : '',
@@ -192,6 +150,10 @@ export default {
         });
     },
     methods: {
+        initDate(type) {
+            let date = new Date();
+            this.dataValue = [this.$moment(new Date(date.getFullYear(), date.getMonth(), 1)).format(type), this.$moment().format(type)];
+        },
         change(value) {
             this.value = value;
             if (value == 'history') {
@@ -199,8 +161,6 @@ export default {
                 this.getDiscount();
             } else if (value == 'alarm') {
                 this.getAllHandleAbnormal();
-            } else if (value == 'replace') {
-                this.getReplaceMeter();
             } else if (value == 'valveNote') {
                 this.getValveData();
             }
@@ -292,19 +252,6 @@ export default {
             };
             this.mixins_search();
         },
-        // 换表
-        getReplaceMeter() {
-            this.mixins_list = [];
-            this.mixins_post = 'post';
-            this.mixins_dataUrl = '/zoniot-rmcp-web/device/meter/replace/page';
-            this.mixins_query = {
-                deviceNo: this.params.deviceNo || '',
-                replaceMethod: '',
-                startDate: this.dataValue.length ? `${this.dataValue[0]}000000` : '',
-                endDate: this.dataValue.length ? `${this.dataValue[1]}235959` : ''
-            };
-            this.mixins_search();
-        },
         // 阀控记录
         getValveData() {
             this.mixins_list = [];

+ 3 - 3
energyManagement/src/views/valveControlRecords/index.vue

@@ -15,7 +15,7 @@
             </el-select>
             <el-date-picker
                 v-model="times"
-                value-format="yyyy-MM-dd"
+                value-format="yyyyMMdd"
                 type="daterange"
                 range-separator="至"
                 start-placeholder="选择开始日期"
@@ -160,8 +160,8 @@ export default {
             if (!arr) {
                 arr = ['', ''];
             }
-            this.mixins_query.startTime = arr[0];
-            this.mixins_query.endTime = arr[1];
+            this.mixins_query.startDate = arr[0];
+            this.mixins_query.endDate = arr[1];
         }
     }
 };