Kaynağa Gözat

增加发展定位和园区表

liaoyitao 3 ay önce
ebeveyn
işleme
413ff1f4f3

+ 53 - 0
src/api/info/development.js

@@ -0,0 +1,53 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询发展定位列表
4
+export function listDevelopment(query) {
5
+  return request({
6
+    url: '/info/development/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询发展定位详细
13
+export function getDevelopment(id) {
14
+  return request({
15
+    url: '/info/development/' + id,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增发展定位
21
+export function addDevelopment(data) {
22
+  return request({
23
+    url: '/info/development',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改发展定位
30
+export function updateDevelopment(data) {
31
+  return request({
32
+    url: '/info/development',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 删除发展定位
39
+export function delDevelopment(id) {
40
+  return request({
41
+    url: '/info/development/' + id,
42
+    method: 'delete'
43
+  })
44
+}
45
+
46
+// 导出发展定位
47
+export function exportDevelopment(query) {
48
+  return request({
49
+    url: '/info/development/export',
50
+    method: 'get',
51
+    params: query
52
+  })
53
+}

+ 53 - 0
src/api/info/parkInfo.js

@@ -0,0 +1,53 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询园区对象列表
4
+export function listParkInfo(query) {
5
+  return request({
6
+    url: '/info/parkInfo/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询园区对象详细
13
+export function getParkInfo(parkId) {
14
+  return request({
15
+    url: '/info/parkInfo/' + parkId,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增园区对象
21
+export function addParkInfo(data) {
22
+  return request({
23
+    url: '/info/parkInfo',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改园区对象
30
+export function updateParkInfo(data) {
31
+  return request({
32
+    url: '/info/parkInfo',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 删除园区对象
39
+export function delParkInfo(parkId) {
40
+  return request({
41
+    url: '/info/parkInfo/' + parkId,
42
+    method: 'delete'
43
+  })
44
+}
45
+
46
+// 导出园区对象
47
+export function exportParkInfo(query) {
48
+  return request({
49
+    url: '/info/parkInfo/export',
50
+    method: 'get',
51
+    params: query
52
+  })
53
+}

+ 1 - 0
src/components/FileUpload/index.vue

@@ -159,6 +159,7 @@ export default {
159
     },
159
     },
160
     // 删除文件
160
     // 删除文件
161
     handleDelete(index) {
161
     handleDelete(index) {
162
+      this.$emit('file-deleted');
162
       this.fileList.splice(index, 1);
163
       this.fileList.splice(index, 1);
163
       this.$emit("input", this.listToString(this.fileList));
164
       this.$emit("input", this.listToString(this.fileList));
164
     },
165
     },

+ 307 - 0
src/views/info/development/index.vue

@@ -0,0 +1,307 @@
1
+<template>
2
+  <div class="app-container">
3
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
4
+      <el-form-item label="名称" prop="developmentName">
5
+        <el-input
6
+          v-model="queryParams.developmentName"
7
+          placeholder="请输入名称"
8
+          clearable
9
+          size="small"
10
+          @keyup.enter.native="handleQuery"
11
+        />
12
+      </el-form-item>
13
+      <el-form-item label="文件名称" prop="fileName">
14
+        <el-input
15
+          v-model="queryParams.fileName"
16
+          placeholder="请输入文件名称"
17
+          clearable
18
+          size="small"
19
+          @keyup.enter.native="handleQuery"
20
+        />
21
+      </el-form-item>
22
+      <el-form-item>
23
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
24
+        <el-button icon="el-icon-refresh" size="mini" @click="orderBy">反序</el-button>
25
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
26
+      </el-form-item>
27
+    </el-form>
28
+
29
+    <el-row :gutter="10" class="mb8">
30
+      <el-col :span="1.5">
31
+        <el-button
32
+          type="primary"
33
+          plain
34
+          icon="el-icon-plus"
35
+          size="mini"
36
+          @click="handleAdd"
37
+          v-hasPermi="['info:development:add']"
38
+        >新增</el-button>
39
+      </el-col>
40
+      <el-col :span="1.5">
41
+        <el-button
42
+          type="success"
43
+          plain
44
+          icon="el-icon-edit"
45
+          size="mini"
46
+          :disabled="single"
47
+          @click="handleUpdate"
48
+          v-hasPermi="['info:development:edit']"
49
+        >修改</el-button>
50
+      </el-col>
51
+      <el-col :span="1.5">
52
+        <el-button
53
+          type="danger"
54
+          plain
55
+          icon="el-icon-delete"
56
+          size="mini"
57
+          :disabled="multiple"
58
+          @click="handleDelete"
59
+          v-hasPermi="['info:development:remove']"
60
+        >删除</el-button>
61
+      </el-col>
62
+      <el-col :span="1.5">
63
+        <el-button
64
+          type="warning"
65
+          plain
66
+          icon="el-icon-download"
67
+          size="mini"
68
+          :loading="exportLoading"
69
+          @click="handleExport"
70
+          v-hasPermi="['info:development:export']"
71
+        >导出</el-button>
72
+      </el-col>
73
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
74
+    </el-row>
75
+
76
+    <el-table v-loading="loading" :data="developmentList" @selection-change="handleSelectionChange">
77
+      <el-table-column type="selection" width="55" align="center" />
78
+      <el-table-column label="id" align="center" prop="id" />
79
+      <el-table-column label="名称" align="center" prop="developmentName" />
80
+      <el-table-column label="内容" align="center" prop="content" />
81
+<!--      <el-table-column label="文件路径" align="center" prop="url" />-->
82
+      <el-table-column label="文件名称" align="center" prop="fileName" />
83
+      <el-table-column label="创建时间" align="center" prop="createTime" width="180">
84
+        <template slot-scope="scope">
85
+          <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
86
+        </template>
87
+      </el-table-column>
88
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="140">
89
+        <template slot-scope="scope">
90
+          <el-button
91
+            size="mini"
92
+            type="text"
93
+            icon="el-icon-edit"
94
+            @click="handleUpdate(scope.row)"
95
+            v-hasPermi="['info:development:edit']"
96
+          >修改</el-button>
97
+          <el-button
98
+            size="mini"
99
+            type="text"
100
+            icon="el-icon-delete"
101
+            @click="handleDelete(scope.row)"
102
+            v-hasPermi="['info:development:remove']"
103
+          >删除</el-button>
104
+        </template>
105
+      </el-table-column>
106
+    </el-table>
107
+
108
+    <pagination
109
+      v-show="total>0"
110
+      :total="total"
111
+      :page.sync="queryParams.pageNum"
112
+      :limit.sync="queryParams.pageSize"
113
+      @pagination="getList"
114
+    />
115
+
116
+    <!-- 添加或修改发展定位对话框 -->
117
+    <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
118
+      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
119
+        <el-form-item label="名称" prop="developmentName">
120
+          <el-input v-model="form.developmentName" placeholder="请输入名称" />
121
+        </el-form-item>
122
+        <el-form-item label="内容" prop="content">
123
+          <el-input v-model="form.content" type="textarea" placeholder="请输入内容" />
124
+        </el-form-item>
125
+        <el-form-item label="文件">
126
+          <fileUpload :limit="1" v-model="form.url" @fatherMethod="fatherMethod" @file-uploaded="handleFileUploaded"  @file-deleted="handleFileDeleted" />
127
+        </el-form-item>
128
+        <el-form-item label="文件名称" prop="fileName">
129
+          <el-input v-model="form.fileName" placeholder="请输入文件名称" />
130
+        </el-form-item>
131
+      </el-form>
132
+      <div slot="footer" class="dialog-footer">
133
+        <el-button type="primary" @click="submitForm">确 定</el-button>
134
+        <el-button @click="cancel">取 消</el-button>
135
+      </div>
136
+    </el-dialog>
137
+  </div>
138
+</template>
139
+
140
+<script>
141
+import { listDevelopment, getDevelopment, delDevelopment, addDevelopment, updateDevelopment, exportDevelopment } from "@/api/info/development";
142
+
143
+export default {
144
+  name: "Development",
145
+  data() {
146
+    return {
147
+      isDesc: false,
148
+      // 遮罩层
149
+      loading: true,
150
+      // 导出遮罩层
151
+      exportLoading: false,
152
+      // 选中数组
153
+      ids: [],
154
+      // 非单个禁用
155
+      single: true,
156
+      // 非多个禁用
157
+      multiple: true,
158
+      // 显示搜索条件
159
+      showSearch: true,
160
+      // 总条数
161
+      total: 0,
162
+      // 发展定位表格数据
163
+      developmentList: [],
164
+      // 弹出层标题
165
+      title: "",
166
+      // 是否显示弹出层
167
+      open: false,
168
+      // 查询参数
169
+      queryParams: {
170
+        pageNum: 1,
171
+        pageSize: 10,
172
+        developmentName: null,
173
+        fileName: null,
174
+        orderBy: ''
175
+      },
176
+      // 表单参数
177
+      form: {},
178
+      // 表单校验
179
+      rules: {
180
+      }
181
+    };
182
+  },
183
+  created() {
184
+    this.getList();
185
+  },
186
+  methods: {
187
+
188
+    orderBy(){
189
+      this.isDesc = !this.isDesc; // 切换排序顺序的状态
190
+      this.queryParams.orderBy = this.isDesc ? "DESC" : ""; // 根据状态设置 orderBy 值
191
+      this.handleQuery();
192
+    },
193
+
194
+
195
+    handleFileDeleted() {
196
+      // 清除 form.fileName
197
+      this.form.fileName = '';
198
+    },
199
+
200
+    handleFileUploaded(fileName) {
201
+      this.form.fileName = fileName;
202
+    },
203
+    fatherMethod(fileName){
204
+      this.form.fileName += fileName + " " ;
205
+    },
206
+    /** 查询发展定位列表 */
207
+    getList() {
208
+      this.loading = true;
209
+      listDevelopment(this.queryParams).then(response => {
210
+        this.developmentList = response.data.list;
211
+        this.total = response.data.total;
212
+        this.loading = false;
213
+      });
214
+    },
215
+    // 取消按钮
216
+    cancel() {
217
+      this.open = false;
218
+      this.reset();
219
+    },
220
+    // 表单重置
221
+    reset() {
222
+      this.form = {
223
+        id: null,
224
+        content: null,
225
+        developmentName: null,
226
+        url: null,
227
+        fileName: null,
228
+        createTime: null
229
+      };
230
+      this.resetForm("form");
231
+    },
232
+    /** 搜索按钮操作 */
233
+    handleQuery() {
234
+      this.queryParams.pageNum = 1;
235
+      this.getList();
236
+    },
237
+    /** 重置按钮操作 */
238
+    resetQuery() {
239
+      this.resetForm("queryForm");
240
+      this.handleQuery();
241
+    },
242
+    // 多选框选中数据
243
+    handleSelectionChange(selection) {
244
+      this.ids = selection.map(item => item.id)
245
+      this.single = selection.length!==1
246
+      this.multiple = !selection.length
247
+    },
248
+    /** 新增按钮操作 */
249
+    handleAdd() {
250
+      this.reset();
251
+      this.open = true;
252
+      this.title = "添加发展定位";
253
+    },
254
+    /** 修改按钮操作 */
255
+    handleUpdate(row) {
256
+      this.reset();
257
+      const id = row.id || this.ids
258
+      getDevelopment(id).then(response => {
259
+        this.form = response.data;
260
+        this.open = true;
261
+        this.title = "修改发展定位";
262
+      });
263
+    },
264
+    /** 提交按钮 */
265
+    submitForm() {
266
+      this.$refs["form"].validate(valid => {
267
+        if (valid) {
268
+          if (this.form.id != null) {
269
+            updateDevelopment(this.form).then(response => {
270
+              this.$modal.msgSuccess("修改成功");
271
+              this.open = false;
272
+              this.getList();
273
+            });
274
+          } else {
275
+            addDevelopment(this.form).then(response => {
276
+              this.$modal.msgSuccess("新增成功");
277
+              this.open = false;
278
+              this.getList();
279
+            });
280
+          }
281
+        }
282
+      });
283
+    },
284
+    /** 删除按钮操作 */
285
+    handleDelete(row) {
286
+      const ids = row.id || this.ids;
287
+      this.$modal.confirm('是否确认删除发展定位编号为"' + ids + '"的数据项?').then(function() {
288
+        return delDevelopment(ids);
289
+      }).then(() => {
290
+        this.getList();
291
+        this.$modal.msgSuccess("删除成功");
292
+      }).catch(() => {});
293
+    },
294
+    /** 导出按钮操作 */
295
+    handleExport() {
296
+      const queryParams = this.queryParams;
297
+      this.$modal.confirm('是否确认导出所有发展定位数据项?').then(() => {
298
+        this.exportLoading = true;
299
+        return exportDevelopment(queryParams);
300
+      }).then(response => {
301
+        this.$download.name(response.msg);
302
+        this.exportLoading = false;
303
+      }).catch(() => {});
304
+    }
305
+  }
306
+};
307
+</script>

+ 47 - 13
src/views/info/equipmentInfo/index.vue

@@ -1,18 +1,18 @@
1
 <template>
1
 <template>
2
   <div class="app-container">
2
   <div class="app-container">
3
     <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
3
     <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
4
-      <el-form-item label="房间" prop="roomId">
5
-        <template>
6
-          <el-select v-model="queryParams.roomId" filterable placeholder="请选择">
7
-            <el-option
8
-              v-for="item in roomList"
9
-              :key="item.roomId"
10
-              :label="item.roomName"
11
-              :value="item.roomId">
12
-            </el-option>
13
-          </el-select>
14
-        </template>
15
-      </el-form-item>
4
+<!--      <el-form-item label="房间" prop="roomId">-->
5
+<!--        <template>-->
6
+<!--          <el-select v-model="queryParams.roomId" filterable placeholder="请选择">-->
7
+<!--            <el-option-->
8
+<!--              v-for="item in roomList"-->
9
+<!--              :key="item.roomId"-->
10
+<!--              :label="item.roomName"-->
11
+<!--              :value="item.roomId">-->
12
+<!--            </el-option>-->
13
+<!--          </el-select>-->
14
+<!--        </template>-->
15
+<!--      </el-form-item>-->
16
       <el-form-item label="大楼" prop="buildingId">
16
       <el-form-item label="大楼" prop="buildingId">
17
         <template>
17
         <template>
18
           <el-select v-model="queryParams.buildingId" filterable placeholder="请选择">
18
           <el-select v-model="queryParams.buildingId" filterable placeholder="请选择">
@@ -37,6 +37,16 @@
37
           </el-select>
37
           </el-select>
38
         </template>
38
         </template>
39
       </el-form-item>
39
       </el-form-item>
40
+      <el-form-item label="园区" prop="parkId">
41
+        <el-select v-model="queryParams.parkId" placeholder="请选择" clearable size="small">
42
+          <el-option
43
+            v-for="item in parkList"
44
+            :key="item.parkId"
45
+            :label="item.parkName"
46
+            :value="item.parkId"
47
+          />
48
+        </el-select>
49
+      </el-form-item>
40
       <el-form-item label="名称" prop="equipmentName">
50
       <el-form-item label="名称" prop="equipmentName">
41
         <el-input
51
         <el-input
42
           v-model="queryParams.equipmentName"
52
           v-model="queryParams.equipmentName"
@@ -249,6 +259,16 @@
249
             </el-select>
259
             </el-select>
250
           </template>
260
           </template>
251
         </el-form-item>
261
         </el-form-item>
262
+        <el-form-item label="园区" prop="parkId">
263
+          <el-select v-model="form.parkId" placeholder="请选择" clearable size="small">
264
+            <el-option
265
+              v-for="item in parkList"
266
+              :key="item.parkId"
267
+              :label="item.parkName"
268
+              :value="item.parkId"
269
+            />
270
+          </el-select>
271
+        </el-form-item>
252
         <el-form-item label="设备编号" prop="equipCode">
272
         <el-form-item label="设备编号" prop="equipCode">
253
           <el-input v-model="form.equipCode" placeholder="请输入" />
273
           <el-input v-model="form.equipCode" placeholder="请输入" />
254
         </el-form-item>
274
         </el-form-item>
@@ -321,11 +341,14 @@ import { listBuildingInfo, getBuildingInfo } from "@/api/info/buildingInfo";
321
 import { listAreaInfo, getAreaInfo } from "@/api/info/areaInfo";
341
 import { listAreaInfo, getAreaInfo } from "@/api/info/areaInfo";
322
 import { listRoomInfo, getRoomInfo } from "@/api/info/roomInfo";
342
 import { listRoomInfo, getRoomInfo } from "@/api/info/roomInfo";
323
 import { listEquipmentType, getEquipmentType } from "@/api/type/equipmentType";
343
 import { listEquipmentType, getEquipmentType } from "@/api/type/equipmentType";
344
+import { listParkInfo, getParkInfo, delParkInfo, addParkInfo, updateParkInfo, exportParkInfo } from "@/api/info/parkInfo";
345
+
324
 export default {
346
 export default {
325
   name: "EquipmentInfo",
347
   name: "EquipmentInfo",
326
   dicts: ['equipment_info_type', 'device_status', 'equip_brand'],
348
   dicts: ['equipment_info_type', 'device_status', 'equip_brand'],
327
   data() {
349
   data() {
328
     return {
350
     return {
351
+      parkList: [],
329
       dialogVisible: false,
352
       dialogVisible: false,
330
       map: null,
353
       map: null,
331
       handler: null,
354
       handler: null,
@@ -365,7 +388,8 @@ export default {
365
         lngLat: null,
388
         lngLat: null,
366
         rasterLngLat: null,
389
         rasterLngLat: null,
367
         typeName: null,
390
         typeName: null,
368
-        status: null
391
+        status: null,
392
+        parkId: null,
369
       },
393
       },
370
       queryBuildingParams: {
394
       queryBuildingParams: {
371
         pageNum: 1,
395
         pageNum: 1,
@@ -387,9 +411,18 @@ export default {
387
     this.getRoomList();
411
     this.getRoomList();
388
     this.getAreaList();
412
     this.getAreaList();
389
     this.getEquipmentTypeList();
413
     this.getEquipmentTypeList();
414
+    this.getParkList();
390
 
415
 
391
   },
416
   },
392
   methods: {
417
   methods: {
418
+
419
+    getParkList() {
420
+      listParkInfo(this.queryBuildingParams).then(response => {
421
+        this.parkList = response.data.list;
422
+      });
423
+    },
424
+
425
+
393
     // 销毁天地图
426
     // 销毁天地图
394
     destructionTMap ()  {
427
     destructionTMap ()  {
395
       if (this.map) {
428
       if (this.map) {
@@ -538,6 +571,7 @@ export default {
538
         status: null,
571
         status: null,
539
         brand: null,
572
         brand: null,
540
         equipCode: null,
573
         equipCode: null,
574
+        parkId: null,
541
 
575
 
542
       };
576
       };
543
       this.resetForm("form");
577
       this.resetForm("form");

+ 33 - 2
src/views/info/forewarningInfo/index.vue

@@ -22,6 +22,16 @@
22
           </el-select>
22
           </el-select>
23
         </template>
23
         </template>
24
       </el-form-item>
24
       </el-form-item>
25
+      <el-form-item label="园区" prop="parkId">
26
+        <el-select v-model="queryParams.parkId" placeholder="请选择" clearable size="small">
27
+          <el-option
28
+            v-for="item in parkList"
29
+            :key="item.parkId"
30
+            :label="item.parkName"
31
+            :value="item.parkId"
32
+          />
33
+        </el-select>
34
+      </el-form-item>
25
       <el-form-item label="是否解决" prop="isResolve">
35
       <el-form-item label="是否解决" prop="isResolve">
26
         <el-select v-model="queryParams.isResolve" placeholder="请选择是否解决" clearable size="small">
36
         <el-select v-model="queryParams.isResolve" placeholder="请选择是否解决" clearable size="small">
27
           <el-option
37
           <el-option
@@ -161,6 +171,16 @@
161
             </el-option>
171
             </el-option>
162
           </el-select>
172
           </el-select>
163
         </el-form-item>
173
         </el-form-item>
174
+        <el-form-item label="园区" prop="parkId">
175
+          <el-select v-model="form.parkId" placeholder="请选择" clearable size="small">
176
+            <el-option
177
+              v-for="item in parkList"
178
+              :key="item.parkId"
179
+              :label="item.parkName"
180
+              :value="item.parkId"
181
+            />
182
+          </el-select>
183
+        </el-form-item>
164
         <el-form-item label="设备名" prop="equipmentName">
184
         <el-form-item label="设备名" prop="equipmentName">
165
           <el-input v-model="form.equipmentName" placeholder="请输入设备名" />
185
           <el-input v-model="form.equipmentName" placeholder="请输入设备名" />
166
         </el-form-item>
186
         </el-form-item>
@@ -194,12 +214,14 @@
194
 <script>
214
 <script>
195
 import { listForewarningInfo, getForewarningInfo, delForewarningInfo, addForewarningInfo, updateForewarningInfo, exportForewarningInfo } from "@/api/info/forewarningInfo";
215
 import { listForewarningInfo, getForewarningInfo, delForewarningInfo, addForewarningInfo, updateForewarningInfo, exportForewarningInfo } from "@/api/info/forewarningInfo";
196
 import { listEquipmentInfo } from "@/api/info/equipmentInfo";
216
 import { listEquipmentInfo } from "@/api/info/equipmentInfo";
217
+import { listParkInfo, getParkInfo, delParkInfo, addParkInfo, updateParkInfo, exportParkInfo } from "@/api/info/parkInfo";
197
 
218
 
198
 export default {
219
 export default {
199
   name: "ForewarningInfo",
220
   name: "ForewarningInfo",
200
   dicts: ['sys_yes_no'],
221
   dicts: ['sys_yes_no'],
201
   data() {
222
   data() {
202
     return {
223
     return {
224
+      parkList: [],
203
       equipmentList: [],
225
       equipmentList: [],
204
       // 遮罩层
226
       // 遮罩层
205
       loading: true,
227
       loading: true,
@@ -228,7 +250,8 @@ export default {
228
         forewarningName: null,
250
         forewarningName: null,
229
         equipmentId: null,
251
         equipmentId: null,
230
         isResolve: null,
252
         isResolve: null,
231
-        resolveTime: null
253
+        resolveTime: null,
254
+        parkId: null
232
       },
255
       },
233
       queryEquipmentParams: {
256
       queryEquipmentParams: {
234
         pageNum: 1,
257
         pageNum: 1,
@@ -247,9 +270,16 @@ export default {
247
   created() {
270
   created() {
248
     this.getList();
271
     this.getList();
249
     this.getEquipmentList();
272
     this.getEquipmentList();
273
+    this.getParkList();
250
   },
274
   },
251
   methods: {
275
   methods: {
252
 
276
 
277
+    getParkList() {
278
+      listParkInfo(this.queryEquipmentParams).then(response => {
279
+        this.parkList = response.data.list;
280
+      });
281
+    },
282
+
253
     onEquipmentChange(equipmentId) {
283
     onEquipmentChange(equipmentId) {
254
       const selectedEquipment = this.equipmentList.find(equipment => equipment.equipmentId === equipmentId);
284
       const selectedEquipment = this.equipmentList.find(equipment => equipment.equipmentId === equipmentId);
255
       if (selectedEquipment) {
285
       if (selectedEquipment) {
@@ -290,7 +320,8 @@ export default {
290
         equipmentName: null,
320
         equipmentName: null,
291
         createTime: null,
321
         createTime: null,
292
         isResolve: null,
322
         isResolve: null,
293
-        resolveTime: null
323
+        resolveTime: null,
324
+        parkId: null
294
       };
325
       };
295
       this.resetForm("form");
326
       this.resetForm("form");
296
     },
327
     },

+ 32 - 0
src/views/info/organizationInfo/index.vue

@@ -49,6 +49,16 @@
49
           </el-select>
49
           </el-select>
50
         </template>
50
         </template>
51
       </el-form-item>
51
       </el-form-item>
52
+      <el-form-item label="园区" prop="parkId">
53
+        <el-select v-model="queryParams.parkId" placeholder="请选择" clearable size="small">
54
+          <el-option
55
+            v-for="item in parkList"
56
+            :key="item.parkId"
57
+            :label="item.parkName"
58
+            :value="item.parkId"
59
+          />
60
+        </el-select>
61
+      </el-form-item>
52
       <el-form-item label="户型" prop="houseTypeId">
62
       <el-form-item label="户型" prop="houseTypeId">
53
         <template>
63
         <template>
54
           <el-select v-model="queryParams.houseTypeId" filterable placeholder="请选择">
64
           <el-select v-model="queryParams.houseTypeId" filterable placeholder="请选择">
@@ -270,6 +280,16 @@
270
             </el-select>
280
             </el-select>
271
           </template>
281
           </template>
272
         </el-form-item>
282
         </el-form-item>
283
+        <el-form-item label="园区" prop="parkId">
284
+          <el-select v-model="form.parkId" placeholder="请选择" clearable size="small">
285
+            <el-option
286
+              v-for="item in parkList"
287
+              :key="item.parkId"
288
+              :label="item.parkName"
289
+              :value="item.parkId"
290
+            />
291
+          </el-select>
292
+        </el-form-item>
273
         <el-form-item label="户型" prop="houseTypeId">
293
         <el-form-item label="户型" prop="houseTypeId">
274
           <template>
294
           <template>
275
             <el-select v-model="form.houseTypeId" filterable placeholder="请选择">
295
             <el-select v-model="form.houseTypeId" filterable placeholder="请选择">
@@ -368,11 +388,14 @@ import { listAreaInfo, getAreaInfo } from "@/api/info/areaInfo";
368
 import { listRoomInfo, getRoomInfo } from "@/api/info/roomInfo";
388
 import { listRoomInfo, getRoomInfo } from "@/api/info/roomInfo";
369
 import { listOrganizationType, getOrganizationType } from "@/api/type/organizationType";
389
 import { listOrganizationType, getOrganizationType } from "@/api/type/organizationType";
370
 import { listHouseType, getHouseType } from "@/api/type/houseType";
390
 import { listHouseType, getHouseType } from "@/api/type/houseType";
391
+import { listParkInfo, getParkInfo, delParkInfo, addParkInfo, updateParkInfo, exportParkInfo } from "@/api/info/parkInfo";
392
+
371
 export default {
393
 export default {
372
   name: "OrganizationInfo",
394
   name: "OrganizationInfo",
373
   dicts: ['sys_yes_no', 'industry_type'],
395
   dicts: ['sys_yes_no', 'industry_type'],
374
   data() {
396
   data() {
375
     return {
397
     return {
398
+      parkList: [],
376
       dialogVisible: false,
399
       dialogVisible: false,
377
       map: null,
400
       map: null,
378
       handler: null,
401
       handler: null,
@@ -415,6 +438,7 @@ export default {
415
         important: null,
438
         important: null,
416
         industryType: null,
439
         industryType: null,
417
         houseTypeId: null,
440
         houseTypeId: null,
441
+        parkId: null,
418
       },
442
       },
419
       queryBuildingParams: {
443
       queryBuildingParams: {
420
         pageNum: 1,
444
         pageNum: 1,
@@ -437,9 +461,16 @@ export default {
437
     this.getAreaList();
461
     this.getAreaList();
438
     this.getOrganizationTypeList();
462
     this.getOrganizationTypeList();
439
     this.getHouseTypeLst();
463
     this.getHouseTypeLst();
464
+    this.getParkList();
440
   },
465
   },
441
   methods: {
466
   methods: {
442
 
467
 
468
+    getParkList() {
469
+      listParkInfo(this.queryBuildingParams).then(response => {
470
+        this.parkList = response.data.list;
471
+      });
472
+    },
473
+
443
 
474
 
444
     // 销毁天地图
475
     // 销毁天地图
445
     destructionTMap ()  {
476
     destructionTMap ()  {
@@ -608,6 +639,7 @@ export default {
608
         industryType: null,
639
         industryType: null,
609
         houseTypeId: null,
640
         houseTypeId: null,
610
         floor: null,
641
         floor: null,
642
+        parkId: null,
611
       };
643
       };
612
       this.resetForm("form");
644
       this.resetForm("form");
613
     },
645
     },

+ 270 - 0
src/views/info/parkInfo/index.vue

@@ -0,0 +1,270 @@
1
+<template>
2
+  <div class="app-container">
3
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
4
+      <el-form-item label="园区名称" prop="parkName">
5
+        <el-input
6
+          v-model="queryParams.parkName"
7
+          placeholder="请输入园区名称"
8
+          clearable
9
+          size="small"
10
+          @keyup.enter.native="handleQuery"
11
+        />
12
+      </el-form-item>
13
+      <el-form-item>
14
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
15
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
16
+      </el-form-item>
17
+    </el-form>
18
+
19
+    <el-row :gutter="10" class="mb8">
20
+      <el-col :span="1.5">
21
+        <el-button
22
+          type="primary"
23
+          plain
24
+          icon="el-icon-plus"
25
+          size="mini"
26
+          @click="handleAdd"
27
+          v-hasPermi="['info:parkInfo:add']"
28
+        >新增</el-button>
29
+      </el-col>
30
+      <el-col :span="1.5">
31
+        <el-button
32
+          type="success"
33
+          plain
34
+          icon="el-icon-edit"
35
+          size="mini"
36
+          :disabled="single"
37
+          @click="handleUpdate"
38
+          v-hasPermi="['info:parkInfo:edit']"
39
+        >修改</el-button>
40
+      </el-col>
41
+      <el-col :span="1.5">
42
+        <el-button
43
+          type="danger"
44
+          plain
45
+          icon="el-icon-delete"
46
+          size="mini"
47
+          :disabled="multiple"
48
+          @click="handleDelete"
49
+          v-hasPermi="['info:parkInfo:remove']"
50
+        >删除</el-button>
51
+      </el-col>
52
+      <el-col :span="1.5">
53
+        <el-button
54
+          type="warning"
55
+          plain
56
+          icon="el-icon-download"
57
+          size="mini"
58
+          :loading="exportLoading"
59
+          @click="handleExport"
60
+          v-hasPermi="['info:parkInfo:export']"
61
+        >导出</el-button>
62
+      </el-col>
63
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
64
+    </el-row>
65
+
66
+    <el-table v-loading="loading" :data="parkInfoList" @selection-change="handleSelectionChange">
67
+      <el-table-column type="selection" width="55" align="center" />
68
+      <el-table-column label="园区id" align="center" prop="parkId" />
69
+      <el-table-column label="园区名称" align="center" prop="parkName" />
70
+      <el-table-column label="坐标" align="center" prop="location" />
71
+      <el-table-column label="备注" align="center" prop="memo" />
72
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="140">
73
+        <template slot-scope="scope">
74
+          <el-button
75
+            size="mini"
76
+            type="text"
77
+            icon="el-icon-edit"
78
+            @click="handleUpdate(scope.row)"
79
+            v-hasPermi="['info:parkInfo:edit']"
80
+          >修改</el-button>
81
+          <el-button
82
+            size="mini"
83
+            type="text"
84
+            icon="el-icon-delete"
85
+            @click="handleDelete(scope.row)"
86
+            v-hasPermi="['info:parkInfo:remove']"
87
+          >删除</el-button>
88
+        </template>
89
+      </el-table-column>
90
+    </el-table>
91
+
92
+    <pagination
93
+      v-show="total>0"
94
+      :total="total"
95
+      :page.sync="queryParams.pageNum"
96
+      :limit.sync="queryParams.pageSize"
97
+      @pagination="getList"
98
+    />
99
+
100
+    <!-- 添加或修改园区对象对话框 -->
101
+    <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
102
+      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
103
+        <el-form-item label="园区名称" prop="parkName">
104
+          <el-input v-model="form.parkName" placeholder="请输入园区名称" />
105
+        </el-form-item>
106
+        <el-form-item label="坐标" prop="location">
107
+          <el-input v-model="form.location" placeholder="请输入坐标" />
108
+        </el-form-item>
109
+        <el-form-item label="备注" prop="memo">
110
+          <el-input v-model="form.memo" type="textarea" placeholder="请输入内容" />
111
+        </el-form-item>
112
+      </el-form>
113
+      <div slot="footer" class="dialog-footer">
114
+        <el-button type="primary" @click="submitForm">确 定</el-button>
115
+        <el-button @click="cancel">取 消</el-button>
116
+      </div>
117
+    </el-dialog>
118
+  </div>
119
+</template>
120
+
121
+<script>
122
+import { listParkInfo, getParkInfo, delParkInfo, addParkInfo, updateParkInfo, exportParkInfo } from "@/api/info/parkInfo";
123
+
124
+export default {
125
+  name: "ParkInfo",
126
+  data() {
127
+    return {
128
+      // 遮罩层
129
+      loading: true,
130
+      // 导出遮罩层
131
+      exportLoading: false,
132
+      // 选中数组
133
+      ids: [],
134
+      // 非单个禁用
135
+      single: true,
136
+      // 非多个禁用
137
+      multiple: true,
138
+      // 显示搜索条件
139
+      showSearch: true,
140
+      // 总条数
141
+      total: 0,
142
+      // 园区对象表格数据
143
+      parkInfoList: [],
144
+      // 弹出层标题
145
+      title: "",
146
+      // 是否显示弹出层
147
+      open: false,
148
+      // 查询参数
149
+      queryParams: {
150
+        pageNum: 1,
151
+        pageSize: 10,
152
+        parkName: null,
153
+      },
154
+      // 表单参数
155
+      form: {},
156
+      // 表单校验
157
+      rules: {
158
+        parkId: [
159
+          { required: true, message: "园区id不能为空", trigger: "blur" }
160
+        ],
161
+      }
162
+    };
163
+  },
164
+  created() {
165
+    this.getList();
166
+  },
167
+  methods: {
168
+    /** 查询园区对象列表 */
169
+    getList() {
170
+      this.loading = true;
171
+      listParkInfo(this.queryParams).then(response => {
172
+        this.parkInfoList = response.data.list;
173
+        this.total = response.data.total;
174
+        this.loading = false;
175
+      });
176
+    },
177
+    // 取消按钮
178
+    cancel() {
179
+      this.open = false;
180
+      this.reset();
181
+    },
182
+    // 表单重置
183
+    reset() {
184
+      this.form = {
185
+        parkId: null,
186
+        parkName: null,
187
+        location: null,
188
+        memo: null
189
+      };
190
+      this.resetForm("form");
191
+    },
192
+    /** 搜索按钮操作 */
193
+    handleQuery() {
194
+      this.queryParams.pageNum = 1;
195
+      this.getList();
196
+    },
197
+    /** 重置按钮操作 */
198
+    resetQuery() {
199
+      this.resetForm("queryForm");
200
+      this.handleQuery();
201
+    },
202
+    // 多选框选中数据
203
+    handleSelectionChange(selection) {
204
+      this.ids = selection.map(item => item.parkId)
205
+      this.single = selection.length!==1
206
+      this.multiple = !selection.length
207
+    },
208
+    /** 新增按钮操作 */
209
+    handleAdd() {
210
+      this.reset();
211
+      this.open = true;
212
+      this.title = "添加园区对象";
213
+    },
214
+    /** 修改按钮操作 */
215
+    handleUpdate(row) {
216
+      this.reset();
217
+      const parkId = row.parkId || this.ids
218
+      getParkInfo(parkId).then(response => {
219
+        this.form = response.data;
220
+        this.open = true;
221
+        this.title = "修改园区对象";
222
+      });
223
+    },
224
+    /** 提交按钮 */
225
+    submitForm() {
226
+      if (this.form.location){
227
+        this.form.location = JSON.parse(this.form.location)
228
+      }
229
+      this.$refs["form"].validate(valid => {
230
+        if (valid) {
231
+          if (this.form.parkId != null) {
232
+            updateParkInfo(this.form).then(response => {
233
+              this.$modal.msgSuccess("修改成功");
234
+              this.open = false;
235
+              this.getList();
236
+            });
237
+          } else {
238
+            addParkInfo(this.form).then(response => {
239
+              this.$modal.msgSuccess("新增成功");
240
+              this.open = false;
241
+              this.getList();
242
+            });
243
+          }
244
+        }
245
+      });
246
+    },
247
+    /** 删除按钮操作 */
248
+    handleDelete(row) {
249
+      const parkIds = row.parkId || this.ids;
250
+      this.$modal.confirm('是否确认删除园区对象编号为"' + parkIds + '"的数据项?').then(function() {
251
+        return delParkInfo(parkIds);
252
+      }).then(() => {
253
+        this.getList();
254
+        this.$modal.msgSuccess("删除成功");
255
+      }).catch(() => {});
256
+    },
257
+    /** 导出按钮操作 */
258
+    handleExport() {
259
+      const queryParams = this.queryParams;
260
+      this.$modal.confirm('是否确认导出所有园区对象数据项?').then(() => {
261
+        this.exportLoading = true;
262
+        return exportParkInfo(queryParams);
263
+      }).then(response => {
264
+        this.$download.name(response.msg);
265
+        this.exportLoading = false;
266
+      }).catch(() => {});
267
+    }
268
+  }
269
+};
270
+</script>

+ 6 - 1
src/views/info/policyInfo/index.vue

@@ -151,7 +151,7 @@
151
           <el-input v-model="form.policyName" placeholder="请输入政策名称" />
151
           <el-input v-model="form.policyName" placeholder="请输入政策名称" />
152
         </el-form-item>
152
         </el-form-item>
153
         <el-form-item label="政策文件">
153
         <el-form-item label="政策文件">
154
-          <fileUpload v-model="form.url" @fatherMethod="fatherMethod" @file-uploaded="handleFileUploaded" />
154
+          <fileUpload :limit="1" v-model="form.url" @fatherMethod="fatherMethod" @file-uploaded="handleFileUploaded"  @file-deleted="handleFileDeleted" />
155
         </el-form-item>
155
         </el-form-item>
156
         <el-form-item label="文件名" prop="fileName">
156
         <el-form-item label="文件名" prop="fileName">
157
           <el-input v-model="form.fileName" placeholder="请输入文件名" />
157
           <el-input v-model="form.fileName" placeholder="请输入文件名" />
@@ -228,6 +228,11 @@ export default {
228
       this.handleQuery();
228
       this.handleQuery();
229
     },
229
     },
230
 
230
 
231
+    handleFileDeleted() {
232
+      // 清除 form.fileName
233
+      this.form.fileName = '';
234
+    },
235
+
231
     handleFileUploaded(fileName) {
236
     handleFileUploaded(fileName) {
232
       this.form.fileName = fileName;
237
       this.form.fileName = fileName;
233
     },
238
     },

+ 35 - 0
src/views/system/dict/data.vue

@@ -30,6 +30,16 @@
30
           />
30
           />
31
         </el-select>
31
         </el-select>
32
       </el-form-item>
32
       </el-form-item>
33
+      <el-form-item label="园区" prop="parkId">
34
+        <el-select v-model="queryParams.parkId" placeholder="请选择" clearable size="small">
35
+          <el-option
36
+            v-for="item in parkList"
37
+            :key="item.parkId"
38
+            :label="item.parkName"
39
+            :value="item.parkId"
40
+          />
41
+        </el-select>
42
+      </el-form-item>
33
       <el-form-item>
43
       <el-form-item>
34
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
44
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
35
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
45
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -139,6 +149,16 @@
139
         <el-form-item label="字典类型">
149
         <el-form-item label="字典类型">
140
           <el-input v-model="form.dictType" :disabled="true" />
150
           <el-input v-model="form.dictType" :disabled="true" />
141
         </el-form-item>
151
         </el-form-item>
152
+        <el-form-item label="园区" prop="parkId">
153
+          <el-select v-model="form.parkId" placeholder="请选择" clearable size="small">
154
+            <el-option
155
+              v-for="item in parkList"
156
+              :key="item.parkId"
157
+              :label="item.parkName"
158
+              :value="item.parkId"
159
+            />
160
+          </el-select>
161
+        </el-form-item>
142
         <el-form-item label="数据标签" prop="dictLabel">
162
         <el-form-item label="数据标签" prop="dictLabel">
143
           <el-input v-model="form.dictLabel" placeholder="请输入数据标签" />
163
           <el-input v-model="form.dictLabel" placeholder="请输入数据标签" />
144
         </el-form-item>
164
         </el-form-item>
@@ -182,12 +202,14 @@
182
 <script>
202
 <script>
183
 import { listData, getData, delData, addData, updateData, exportData } from "@/api/system/dict/data";
203
 import { listData, getData, delData, addData, updateData, exportData } from "@/api/system/dict/data";
184
 import { listType, getType } from "@/api/system/dict/type";
204
 import { listType, getType } from "@/api/system/dict/type";
205
+import { listParkInfo, getParkInfo, delParkInfo, addParkInfo, updateParkInfo, exportParkInfo } from "@/api/info/parkInfo";
185
 
206
 
186
 export default {
207
 export default {
187
   name: "Data",
208
   name: "Data",
188
   dicts: ['sys_normal_disable'],
209
   dicts: ['sys_normal_disable'],
189
   data() {
210
   data() {
190
     return {
211
     return {
212
+      parkList: [],
191
       // 遮罩层
213
       // 遮罩层
192
       loading: true,
214
       loading: true,
193
       // 导出遮罩层
215
       // 导出遮罩层
@@ -247,6 +269,10 @@ export default {
247
         dictType: undefined,
269
         dictType: undefined,
248
         status: undefined
270
         status: undefined
249
       },
271
       },
272
+      queryParkParams: {
273
+        pageNum: 1,
274
+        pageSize: 999999,
275
+      },
250
       // 表单参数
276
       // 表单参数
251
       form: {},
277
       form: {},
252
       // 表单校验
278
       // 表单校验
@@ -267,8 +293,16 @@ export default {
267
     const dictId = this.$route.params && this.$route.params.dictId;
293
     const dictId = this.$route.params && this.$route.params.dictId;
268
     this.getType(dictId);
294
     this.getType(dictId);
269
     this.getTypeList();
295
     this.getTypeList();
296
+    this.getParkList();
270
   },
297
   },
271
   methods: {
298
   methods: {
299
+
300
+    getParkList() {
301
+      listParkInfo(this.queryParkParams).then(response => {
302
+        this.parkList = response.data.list;
303
+      });
304
+    },
305
+
272
     /** 查询字典类型详细 */
306
     /** 查询字典类型详细 */
273
     getType(dictId) {
307
     getType(dictId) {
274
       getType(dictId).then(response => {
308
       getType(dictId).then(response => {
@@ -312,6 +346,7 @@ export default {
312
         status: true,
346
         status: true,
313
         remark: undefined,
347
         remark: undefined,
314
         icon: null,
348
         icon: null,
349
+        parkId: undefined
315
       };
350
       };
316
       this.resetForm("form");
351
       this.resetForm("form");
317
     },
352
     },