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