Browse Source

安防感知 园区切换

zhouwang 2 days ago
parent
commit
4997122da8
1 changed files with 40 additions and 2 deletions
  1. 40 2
      src/views/info/elevatorInfo/index.vue

+ 40 - 2
src/views/info/elevatorInfo/index.vue

@@ -10,6 +10,18 @@
10
           @keyup.enter.native="handleQuery"
10
           @keyup.enter.native="handleQuery"
11
         />
11
         />
12
       </el-form-item>
12
       </el-form-item>
13
+
14
+      <el-form-item label="园区" prop="parkId">
15
+        <el-select v-model="queryParams.parkId" placeholder="请选择" clearable size="small">
16
+          <el-option
17
+            v-for="item in parkList"
18
+            :key="item.parkId"
19
+            :label="item.parkName"
20
+            :value="item.parkId"
21
+          />
22
+        </el-select>
23
+      </el-form-item>
24
+
13
       <el-form-item label="大楼" prop="buildingId">
25
       <el-form-item label="大楼" prop="buildingId">
14
         <template>
26
         <template>
15
           <el-select v-model="queryParams.buildingId" filterable placeholder="请选择">
27
           <el-select v-model="queryParams.buildingId" filterable placeholder="请选择">
@@ -164,6 +176,18 @@
164
         <el-form-item label="电梯型号" prop="elevatorCode">
176
         <el-form-item label="电梯型号" prop="elevatorCode">
165
           <el-input v-model="form.elevatorCode" placeholder="请输入电梯型号" />
177
           <el-input v-model="form.elevatorCode" placeholder="请输入电梯型号" />
166
         </el-form-item>
178
         </el-form-item>
179
+
180
+        <el-form-item label="园区" prop="parkId">
181
+          <el-select v-model="form.parkId" placeholder="请选择" clearable size="small">
182
+            <el-option
183
+              v-for="item in parkList"
184
+              :key="item.parkId"
185
+              :label="item.parkName"
186
+              :value="item.parkId"
187
+            />
188
+          </el-select>
189
+        </el-form-item>
190
+
167
         <el-form-item label="大楼" prop="buildingId">
191
         <el-form-item label="大楼" prop="buildingId">
168
           <template>
192
           <template>
169
             <el-select v-model="form.buildingId" filterable placeholder="请选择">
193
             <el-select v-model="form.buildingId" filterable placeholder="请选择">
@@ -218,7 +242,9 @@
218
         <el-form-item label="运行时间" prop="runTime">
242
         <el-form-item label="运行时间" prop="runTime">
219
           <el-input v-model="form.runTime" placeholder="请输入" />
243
           <el-input v-model="form.runTime" placeholder="请输入" />
220
         </el-form-item>
244
         </el-form-item>
221
-
245
+        <el-form-item label="监控地址" prop="elevatorUrl">
246
+          <el-input v-model="form.elevatorUrl" placeholder="请输入" />
247
+        </el-form-item>
222
       </el-form>
248
       </el-form>
223
       <div slot="footer" class="dialog-footer">
249
       <div slot="footer" class="dialog-footer">
224
         <el-button type="primary" @click="submitForm">确 定</el-button>
250
         <el-button type="primary" @click="submitForm">确 定</el-button>
@@ -231,11 +257,13 @@
231
 <script>
257
 <script>
232
 import { listElevatorInfo, getElevatorInfo, delElevatorInfo, addElevatorInfo, updateElevatorInfo, exportElevatorInfo } from "@/api/info/elevatorInfo";
258
 import { listElevatorInfo, getElevatorInfo, delElevatorInfo, addElevatorInfo, updateElevatorInfo, exportElevatorInfo } from "@/api/info/elevatorInfo";
233
 import { listBuildingInfo, getBuildingInfo } from "@/api/info/buildingInfo";
259
 import { listBuildingInfo, getBuildingInfo } from "@/api/info/buildingInfo";
260
+import { listParkInfo, getParkInfo, delParkInfo, addParkInfo, updateParkInfo, exportParkInfo } from "@/api/info/parkInfo";
234
 export default {
261
 export default {
235
   name: "ElevatorInfo",
262
   name: "ElevatorInfo",
236
   dicts: ['elevator_info_status', 'elevator_type', 'connection_status'],
263
   dicts: ['elevator_info_status', 'elevator_type', 'connection_status'],
237
   data() {
264
   data() {
238
     return {
265
     return {
266
+      parkList: [],
239
       buildingList: [],
267
       buildingList: [],
240
       // 遮罩层
268
       // 遮罩层
241
       loading: true,
269
       loading: true,
@@ -265,6 +293,7 @@ export default {
265
         buildingId: null,
293
         buildingId: null,
266
         status: null,
294
         status: null,
267
         elevatorName: null,
295
         elevatorName: null,
296
+        parkId: null
268
       },
297
       },
269
       queryBuildingParams: {
298
       queryBuildingParams: {
270
         pageNum: 1,
299
         pageNum: 1,
@@ -283,9 +312,16 @@ export default {
283
   created() {
312
   created() {
284
     this.getList();
313
     this.getList();
285
     this.getBuilding();
314
     this.getBuilding();
315
+    this.getParkList();
286
   },
316
   },
287
   methods: {
317
   methods: {
288
 
318
 
319
+    getParkList() {
320
+      listParkInfo(this.queryBuildingParams).then(response => {
321
+        this.parkList = response.data.list;
322
+      });
323
+    },
324
+
289
     getBuildingName(buildingId) {
325
     getBuildingName(buildingId) {
290
       const building = this.buildingList.find(b => b.buildingId === buildingId);
326
       const building = this.buildingList.find(b => b.buildingId === buildingId);
291
       return building ? building.buildingName : '未知';
327
       return building ? building.buildingName : '未知';
@@ -324,7 +360,9 @@ export default {
324
         type: null,
360
         type: null,
325
         runFloor: null,
361
         runFloor: null,
326
         runTime: null,
362
         runTime: null,
327
-        connectStatus: null
363
+        connectStatus: null,
364
+        elevatorUrl: null,
365
+        parkId: null
328
       };
366
       };
329
       this.resetForm("form");
367
       this.resetForm("form");
330
     },
368
     },