bihuisong 1 سال پیش
والد
کامیت
b68179345e

+ 16 - 0
zhsq_qk-system/src/main/java/zhsq_qk/system/domain/SysCameraPolice.java

@@ -63,12 +63,27 @@ public class SysCameraPolice extends BaseEntity {
     @Excel(name = "类型")
     private String buildType;
 
+    /**
+     * 类型
+     */
+    @Excel(name = "类型")
+    private String buildTypeName;
+
     private String policeName;
 
     public String getPoliceName() {
         return policeName;
     }
 
+    public String getBuildTypeName() {
+        return buildTypeName;
+    }
+
+    public void setBuildTypeName(String buildTypeName) {
+        this.buildTypeName = buildTypeName;
+    }
+
+
     public void setPoliceName(String policeName) {
         this.policeName = policeName;
     }
@@ -154,6 +169,7 @@ public class SysCameraPolice extends BaseEntity {
                 .append("position", getPosition())
                 .append("policeId", getPoliceId())
                 .append("cameraName", getCameraName())
+                .append("buildTypeName", getBuildTypeName())
                 .toString();
     }
 }

+ 7 - 1
zhsq_qk-system/src/main/resources/mapper/system/SysCameraMapper.xml

@@ -24,6 +24,7 @@
         <result property="longitude" column="longitude"/>
         <result property="latitude" column="latitude"/>
         <result property="buildType" column="build_type"/>
+        <result property="buildTypeName" column="buildTypeName"/>
     </resultMap>
 
     <sql id="selectSysCameraVo">
@@ -39,7 +40,12 @@
         a.address,
         a.longitude,
         a.latitude,
-        a.build_type
+        a.build_type,
+        case
+        when a.build_type = 1 then '小区建设'
+        when a.build_type = 2 then '路面建设'
+        when a.build_type = 3 then '已有'
+        end buildTypeName
         FROM
         sys_camera a
         left join sys_police_station b on a.police_id = b.id

+ 1 - 1
zhsq_qk-ui/src/api/components/supermap.js

@@ -11,7 +11,7 @@ export function selectSuperMap() {
 // 查询摄像头落点列表
 export function listForMark(query) {
   return request({
-    url: '/system/camera/list',
+    url: '/system/camera/selectCameraList',
     method: 'get',
     params: query
   })

+ 4 - 3
zhsq_qk-ui/src/views/supermap/supermap.vue

@@ -289,8 +289,9 @@ export default {
     init: function (options) {
       listForMark().then(response => {
         let res = response;
-        for (let i = 0; i < res.rows.length; i++) {
-          this.addMark(res.rows[i]);
+        console.log("resresresres",res)
+        for (let i = 0; i < res.data.length; i++) {
+          this.addMark(res.data[i]);
         }
       });
     },
@@ -314,7 +315,7 @@ export default {
       marker.on('mouseover', function () {
         let html = "";
         html += "<p class='v-p-color'>摄像头名称:" + options.cameraName + "</p>";
-        html += "<p class='v-p-color'>摄像头类型:" + options.buildType + "</p>";
+        html += "<p class='v-p-color'>摄像头类型:" + options.buildTypeName + "</p>";
         html += "<p class='v-p-color'>所属派出所:" + options.policeName + "</p>";
         this.bindPopup(html).openPopup(this.getLatLng());
       });