zouooh 1 yıl önce
ebeveyn
işleme
1f04bbcd4f

+ 11 - 3
src/pages/index/components/equipment_running.vue

@@ -109,10 +109,18 @@ export default {
109 109
       districtOptions: options.districtOptions,
110 110
       carOptions: [],
111 111
       columns: [
112
+        {
113
+          label: '停车场',
114
+          key: 'parkName'
115
+        },
112 116
         {
113 117
           label: '设备名称',
114 118
           key: 'deviceName'
115 119
         },
120
+        {
121
+          label: '设备类型',
122
+          key: 'deviceType'
123
+        },
116 124
         {
117 125
           label: '状态',
118 126
           key: 'deviceState'
@@ -165,9 +173,9 @@ export default {
165 173
       let params = {...this.formInline}
166 174
       let requestList = [api.queryEquipmentRunning_Sxt(params), api.queryEquipmentRunning_Zj(params),api.queryEquipmentRunning_Mwxsq(params)];
167 175
       Promise.all(requestList).then(res => {
168
-        that.modelData = res[0].data || []
169
-        that.modelData2 = res[1].data || []
170
-        that.modelData3 = res[2].data || []
176
+        this.modelData = res[0].data || []
177
+        this.modelData2 = res[1].data || []
178
+        this.modelData3 = res[2].data || []
171 179
       })
172 180
     },
173 181
     handlePageChange() {

+ 26 - 0
src/pages/index/components/park_bahavior.vue

@@ -14,6 +14,18 @@
14 14
           <el-option v-for="item in carOptions" :key="item.parkId" :label="item.carParkName" :value="item.parkId"></el-option>
15 15
         </el-select>
16 16
       </el-form-item>
17
+      <el-form-item label="查询日期">
18
+        <el-date-picker
19
+          clearable
20
+          v-model="formInline.time"
21
+          type="daterange"
22
+          range-separator="至"
23
+          start-placeholder="开始日期"
24
+          value-format="yyyy-MM-dd"
25
+          :picker-options="{disabledDate: (time) => time.getTime() > Date.now()}"
26
+          end-placeholder="结束日期">
27
+        </el-date-picker>
28
+      </el-form-item>
17 29
       <el-form-item>
18 30
         <el-button type="primary" @click="queryAll">查询</el-button>
19 31
       </el-form-item>
@@ -90,6 +102,9 @@ import piechart from "@/components/pieChart";
90 102
 import linechart from "@/components/lineChart";
91 103
 import api from "@/api/article_liao";
92 104
 import options from '@/util/options'
105
+
106
+const date = new Date;
107
+
93 108
 export default {
94 109
   components: {
95 110
     piechart,
@@ -110,6 +125,7 @@ export default {
110 125
         regionCode: '',
111 126
         keyAreas: '',
112 127
         streetName: '',
128
+        time:  [date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + (date.getDate()), date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + (date.getDate())],
113 129
         parkId: '',
114 130
       }
115 131
     }
@@ -128,6 +144,16 @@ export default {
128 144
     },
129 145
     queryAll() {
130 146
       let params = {...this.formInline}
147
+      if (
148
+        this.formInline.time && this.formInline.time.length === 2 &&
149
+        this.formInline.time[1] !== ""
150
+      ) {
151
+        this.formInline.time[0] = this.formInline.time[0].substring(0, 10) + " 00:00:00";
152
+        this.formInline.time[1] = this.formInline.time[1].substring(0, 10) + " 23:59:59";
153
+        params.begin= this.formInline.time[0]
154
+        params.end = this.formInline.time[1]
155
+      }
156
+      delete params.time
131 157
       this.parkBehaviorDuration(params)
132 158
       this.parkBehaviorRange(params)
133 159
       this.parkBehaviorTemporary(params)