Bläddra i källkod

部分接口及地图及问题上报修改

zhanghao 2 månader sedan
förälder
incheckning
0a79177d5c

+ 15 - 0
src/api/screen/service.js

@@ -584,6 +584,21 @@ export function getProjectNumY(appOrg) {
   })
 }
 
+// 查询对应市的项目
+export function getProjectByAppOrg(appOrg) {
+  return request({
+    url: '/large/production/getProjectByAppOrg/' + appOrg,
+    method: 'get'
+  })
+}
+
+export function getProjectNumZ(appOrg) {
+  return request({
+    url: '/large/production/getProjectNumZ/' + appOrg,
+    method: 'get'
+  })
+}
+
 // 各单位已接入项目数量和已接入摄像头数量
 export function getProjectCameraNumList(appOrg) {
   return request({

BIN
src/assets/zhang/engineer/issueTitle.png


+ 78 - 136
src/views/screen/engineering/issueSubDia.vue

@@ -1,5 +1,10 @@
 <template>
-  <div class="main-data data-weeks-foods">
+  <div class="issueDia">
+    <div style="width: 100%;height: 35px;margin-bottom: 20px;display: flex;justify-content: center">
+      <img src="../../../assets/zhang/engineer/issueTitle.png">
+      <div class="myTitle">问题上报</div>
+      <div style="background-color: #42b983;width: 20px;height: 20px;position: absolute;top: 0;right: 0" @click="close"></div>
+    </div>
     <div v-if="dialogVisible" style="z-index: 10000;display: flex;justify-content: center;align-items: center;background-color: rgba(59,58,58,0.35);position: absolute;width: 100%;height: 100%">
       <div style="display: flex;width: 400px;height: 320px;justify-content: center;align-items: center;box-shadow: 0 2px 4px 0 rgba(0,0,0,0.2), 0 25px 50px 0 rgba(0, 0, 0, 0.1);position: relative;background-color: rgba(114,215,199,0.17);border-radius: 4px">
         <i class="el-icon-circle-close" style="color: #00F6EC;position: absolute;right: 10px;top:10px;" @click="handleCloseView"></i>
@@ -7,39 +12,49 @@
       </div>
     </div>
 
-    <div class="myTitle">问题上报</div>
-    <div class="close-btn" @click="close"></div>
+
     <div class="me">
       <div style="width: 35%;color: #00ffff;">
-        <div style="text-align: right;margin-bottom: 10px;height: 32px;line-height: 32px">时间:</div>
-        <div style="text-align: right;margin-bottom: 20px;height: 32px;line-height: 32px">标题:</div>
-        <div style="text-align: right;margin-bottom: 145px;">问题内容:</div>
-        <!-- <div style="text-align: right;margin-bottom: 13px">选项:</div> -->
-        <div style="text-align: right">附件:</div>
+<!--        <div style="text-align: right;margin-bottom: 10px;height: 32px;line-height: 32px">时间:</div>-->
+        <div style="text-align: right;margin-bottom: 25px;height: 32px;line-height: 32px">标题:</div>
+        <div style="text-align: right;margin-bottom: 125px;">内容:</div>
+        <div style="text-align: right;margin-bottom: 125px;">整改要求:</div>
+        <div style="text-align: right">截图附件:</div>
       </div>
       <div style="width: 65%;">
-        <el-date-picker
+<!--        <el-date-picker
           style="margin-bottom: 10px"
           v-model="value"
           type="date"
           placeholder="选择日期">
-        </el-date-picker>
-        <el-input placeholder="请输入标题" style="margin-bottom: 10px;width: 220px"></el-input>
-        <el-input type="textarea" :rows=8 placeholder="请输入内容" resize="none" style="margin-bottom: 10px;width: 350px"></el-input>
-        <!-- <el-checkbox v-model="check" @change="change">备选项1</el-checkbox>
-        <el-checkbox v-model="checked" @change="changed" style="margin-right: 200px">备选项</el-checkbox> -->
-        <div style="width: 130px;height: 130px;background: rgba(15, 86, 86, 0.54);margin-top: 10px;color: #00ffff;position: relative;font-size: 45px;display: flex;align-items: center">
+        </el-date-picker>-->
+        <div>
+          <el-input placeholder="请输入标题" style="margin-bottom: 20px;width: 220px"></el-input>
+        </div>
+
+        <el-input type="textarea" :rows=6 placeholder="请输入内容" resize="none" style="margin-bottom: 20px;width: 350px"></el-input>
+
+        <el-input type="textarea" :rows=6 placeholder="请输入整改要求" resize="none" style="margin-bottom: 20px;width: 350px"></el-input>
+
+        <div style="width: 130px;height: 130px;background: rgba(15, 86, 86, 0.54);margin-bottom: 10px;mborder-radius: 4px;color: #00ffff;position: relative;font-size: 45px;display: flex;align-items: center">
           <i v-if="!fileFlag" class="el-icon-plus" style="position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);"></i>
           <input v-if="!fileFlag" type="file" ref="fileInput" @change="handleFileChange" style="display: none;position: absolute;left: -1000px"/>
           <div v-if="!fileFlag" @click="triggerFileInput" style="width: 100%;height: 100%;cursor: pointer;position: absolute;"></div>
           <div class="sth" v-if="fileFlag">
-            <i class="el-icon-view" @click="handlePictureCardPreview"></i>
-            <i class="el-icon-delete" @click="handleRemove"></i>
+            <div style="width: 0;height: 0;border-left: 30px solid transparent;border-top: 30px solid #000000;position: absolute;top: 0;right: 0">
+            </div>
+            <div class="close-icon" @click="handleRemove"></div>
+            <div style="width: 100%;height: 50%">
+              <div style="width: 100%;height: 50%;display: flex;justify-content: center;align-items: start">
+                <i class="el-icon-view" @click="handlePictureCardPreview"></i>
+              </div>
+              <div style="width: 100%;height: 50%;display: flex;justify-content: center;color: #00FFFF;font-size: 14px;align-items: end">预览</div>
+            </div>
           </div>
-          <img width="100%" :src="dialogImageUrl" alt="">
+          <img width="100%" :src="dialogImageUrl" v-if="fileFlag" style="height: 100%;object-fit: cover;">
         </div>
-        <el-button style="width: 100px;margin-top: 10px;margin-right: 10px">提交</el-button>
-        <el-button style="width: 100px;margin-top: 10px;background: rgba(15, 86, 86, 0.54);color: #00ffff">取消</el-button>
+        <el-button style="width: 100px;margin-top: 10px;margin-right: 10px;border: 1px solid #00FFFF;border-radius: 2px;">提交</el-button>
+        <el-button style="width: 100px;margin-top: 10px;background: rgba(15, 86, 86, 0.54);color: #00ffff;border: 1px solid #00FFFF;border-radius: 2px;">取消</el-button>
       </div>
     </div>
   </div>
@@ -110,15 +125,45 @@ export default {
 </script>
 
 <style lang="scss" scoped>
+.close-icon {
+  position: absolute;
+  right: 2px;
+  top: 3px;
+  width: 15px;
+  height: 15px;
+  cursor: pointer;
+}
+
+.close-icon::before,
+.close-icon::after {
+  content: '';
+  position: absolute;
+  top: 50%;
+  left: 50%;
+  width: 10px;
+  height: 1px;
+  background-color: #00FFFF;
+  transform-origin: center;
+  transform: translate(-50%, -50%);
+}
+
+.close-icon::before {
+  transform: translate(-50%, -50%) rotate(45deg); /* 旋转 45 度 */
+}
+
+.close-icon::after {
+  transform: translate(-50%, -50%) rotate(-45deg); /* 旋转 -45 度 */
+}
+
 .myTitle{
   color: #00F6EC;
-  font-size: 20px;
-  margin-left: 30px;
-  margin-top: 13px;
-  margin-bottom: 18px;
+  font-size: 16px;
+  position: absolute;
+  left: 40px;
+  top: 6px;
 }
 .me{
-  display: flex;flex-wrap: wrap;justify-content: space-around;height: 380px;overflow: auto;
+  display: flex;flex-wrap: wrap;justify-content: space-around;height: 100%;overflow: auto;
 }
 .me::-webkit-scrollbar {
   display: none;
@@ -131,8 +176,9 @@ export default {
   cursor: pointer;
   opacity: 0;
   display: flex;
-  justify-content: space-around;
+  justify-content: center;
   align-items: center;
+  flex-wrap: wrap;
 }
 .sth:hover{
   opacity: 1;
@@ -159,128 +205,24 @@ export default {
 .el-select .el-input .el-select__caret {
   display: none;
 }
-.data-weeks-foods {
+.issueDia {
   position: relative;
-  width: 668px;
-  height: 432px;
-  background: rgba(35, 60, 80, 0.37) url("../../../assets/images/main/dialog-bg.png") no-repeat;
+  width: 640px;
+  height: 708px;
   background-size: cover;
-  .close-btn {
-    position: absolute;
-    right: 0;
-    top: 0;
-    width: 50px;
-    height: 50px;
-    cursor: pointer;
-  }
-  .choose-area {
-    position: absolute;
-    right: 100px;
-    top: 7px;
-    width: 80.05px;
-    height: 30px;
-    line-height: 30px;
-    padding-left: 15px;
-    font-size: 14px;
-    color: #00ffff;
-    background: url("../../../assets/images/main/choose_short.png") no-repeat;
-    cursor: pointer;
-  }
-  .choose-area.choose-week{
-    right: 200px;
-  }
-  .content-area {
-    display: flex;
-    flex-direction: column;
-    padding: 15px 20px 0 15px;
-    padding-top: 0 !important;
-  }
-
-  .content-title {
-    width: 515px;
-    height: 26px;
-    background: url("../../../assets/images/main/title_pro_long.png") no-repeat;
-    background-size: 100% 100%;
-    font-family: "PingFangSC";
-    font-size: 16px;
-    font-weight: bold;
-    color: #00ffff;
-    padding-left: 17px;
-    .title {
-      display: block;
-    }
-  }
 
-  .title-format {
-    display: flex;
-    flex-direction: row;
-    align-items: center;
-    img {
-      width: 6px;
-      height: 24px;
-      margin-right: 6px;
-    }
-    .title-info {
-      display: flex;
-      flex-direction: column;
-      font-size: 12px;
-      color: #ffffff;
-      .title-en {
-        font-size: 8px;
-        color: #ffffff;
-        opacity: 0.4;
-      }
-    }
-  }
-
-  .choose-area {
-    .el-select {
-      width: 90%;
-    }
-    .el-input {
-      input {
-        background: rgba(255, 255, 255, 0);
-        color: #00ffff;
-        border: none;
-        padding: 0;
-        width: 30px;
-      }
-    }
-  }
-
-  .no-data{
-    text-align: center;
-    color: #62ffe5;
-    font-size: 25px;
-    margin-top: 150px;
-  }
-
-  ::-webkit-scrollbar {
-    width: 3px;
-    height: 3px;
-  }
-
-  ::-webkit-scrollbar-thumb {
-    //滑块部分
-    // border-radius: 5px;
-    background-color: #58cbbb;
-  }
-
-  ::-webkit-scrollbar-track {
-    //轨道部分
-    // box-shadow: inset 0 0 5px #ddd;
-    background: #ddd;
-    // border-radius: 5px;
-  }
+  background-image: radial-gradient(circle at 50% 50%, #031417b3 0%, #0C1A1A 84%);
 }
 
 ::v-deep .el-input__inner{
   color: #00ffff;
   background-color: rgba(15, 86, 86, 0.54);
+  border: 1px solid #00ffff4d;
 }
 ::v-deep .el-textarea__inner{
   color: #00ffff;
   background-color: rgba(15, 86, 86, 0.54);
+  border: 1px solid #00ffff4d;
 }
 ::v-deep .el-button{
   font-weight: bold;

+ 27 - 2
src/views/screen/engineering/main.vue

@@ -57,7 +57,7 @@
         height="850px"
         @mapClick="onMapClick"
       ></province>-->
-      <Map @transmit="transmit" v-if="showMap"></Map>
+      <Map @transmit="transmit" v-if="showMap" :list1="list1" :list2="list2"></Map>
       <div
         v-if="showLocal"
         class="img-area flex-row align-items-center flex-center"
@@ -250,7 +250,7 @@ import unitAccessDialog from "@/views/screen/engineering/unitAccessDialog.vue";
 import CarCost from "@/views/screen/official/carCost.vue";
 import ResourceList from "@/views/screen/official/resourceList.vue";
 import CarHealth from "@/views/screen/official/carHealth.vue";
-import { getProjectNum, getProjectNumX, getProjectNumY } from '@/api/screen/service'
+import { getProjectNum, getProjectNumX, getProjectNumY, getProjectNumZ } from '@/api/screen/service'
 export default {
   name: "EngineeringMain",
   components: {
@@ -291,6 +291,21 @@ export default {
         {name:"基础施工",num:0},{name:"主体工程",num:0},
         {name:"室内外装修",num:0},{name:"室外工程",num:0},
       ],
+      mapArr:[
+        "1A003",
+        "1B001",
+        "1C001",
+        "1D001",
+        "1E001",
+        "1F001",
+        "1K001",
+        "1L001",
+        "1H001",
+        "1M001",
+        "1J001",
+      ],
+      list1: [],
+      list2: [],
       showRes:0,
       showC:false,
       showIssue:0,
@@ -347,6 +362,7 @@ export default {
   created() {
     this.getProjectNum();
     this.getProjectNumX();
+    this.getProjectNumZ()
   },
   destroyed() {},
   beforeDestroy() {},
@@ -399,6 +415,15 @@ export default {
         }
       });
     },
+    getProjectNumZ() {
+      getProjectNumZ(this.mapArr).then((res) => {
+        if (Number(res.code) === 200) {
+          const fetchedData = res.data;
+          this.list1 = res.data.list1
+          this.list2 = res.data.list2
+        }
+      });
+    },
     chooseRes(){
       this.closeDialog()
       this.showC = true

+ 82 - 42
src/views/screen/map/map.vue

@@ -31,10 +31,42 @@ import 临汾市 from '@/views/screen/map/临汾市.json'
 import 长治市 from '@/views/screen/map/长治市.json'
 import 运城市 from '@/views/screen/map/运城市.json'
 import 晋城市 from '@/views/screen/map/晋城市.json'
+import { getProjectByAppOrg } from '@/api/screen/service'
 let imgElement
 export default {
+  props: {
+    list1: Array,
+    list2: Array
+  },
   data(){
     return{
+      projectList: [],
+      area: [
+        { name: "太原市", appOrg: "1A003" },
+        { name: "大同市", appOrg: "1B001" },
+        { name: "阳泉市", appOrg: "1C001" },
+        { name: "长治市", appOrg: "1D001" },
+        { name: "晋城市", appOrg: "1E001" },
+        { name: "朔州市", appOrg: "1F001" },
+        { name: "晋中市", appOrg: "1K001" },
+        { name: "临汾市", appOrg: "1L001" },
+        { name: "忻州市", appOrg: "1H001" },
+        { name: "运城市", appOrg: "1M001" },
+        { name: "吕梁市", appOrg: "1J001" }
+      ],
+      points: [
+        { name: "太原市", coordinate: [112.4493, 37.8570], appOrg: "1A003", x: "1", y: "2" },
+        { name: "大同市", coordinate: [113.3002, 40.0768], appOrg: "1B001", x: "1", y: "2" },
+        { name: "阳泉市", coordinate: [113.5805, 37.8563], appOrg: "1C001", x: "1", y: "2" },
+        { name: "长治市", coordinate: [113.1163, 36.1954], appOrg: "1D001", x: "1", y: "2" },
+        { name: "晋城市", coordinate: [112.8513, 35.4907], appOrg: "1E001", x: "1", y: "2" },
+        { name: "朔州市", coordinate: [112.4329, 39.3312], appOrg: "1F001", x: "1", y: "2" },
+        { name: "晋中市", coordinate: [112.8527, 37.6870], appOrg: "1K001", x: "1", y: "2" },
+        { name: "临汾市", coordinate: [111.5186, 36.0882], appOrg: "1L001", x: "1", y: "2" },
+        { name: "忻州市", coordinate: [112.7341, 38.4167], appOrg: "1H001", x: "1", y: "2" },
+        { name: "运城市", coordinate: [111.0069, 35.0264], appOrg: "1M001", x: "1", y: "2" },
+        { name: "吕梁市", coordinate: [111.1443, 37.5183], appOrg: "1J001", x: "1", y: "2" }
+      ],
       appOrg: "10001",
       showBack: false,
       dataSource: {
@@ -54,6 +86,12 @@ export default {
   },
   created () {},
   mounted() {
+    let i = 0
+    for (let it of this.points){
+      it.x = this.list1[i]
+      it.y = this.list2[i]
+      i++
+    }
     this.$nextTick(() => {
       imgElement = document.getElementById("mapBackground");
       setTimeout(() => {
@@ -63,33 +101,7 @@ export default {
   },
   methods: {
     initCharts() {
-      const area = [
-        { name: "太原市", appOrg: "1A003" },
-        { name: "大同市", appOrg: "1B001" },
-        { name: "阳泉市", appOrg: "1C001" },
-        { name: "长治市", appOrg: "1D001" },
-        { name: "晋城市", appOrg: "1E001" },
-        { name: "朔州市", appOrg: "1F001" },
-        { name: "晋中市", appOrg: "1K001" },
-        { name: "临汾市", appOrg: "1L001" },
-        { name: "忻州市", appOrg: "1H001" },
-        { name: "运城市", appOrg: "1M001" },
-        { name: "吕梁市", appOrg: "1J001" }
-      ];
-      const points = [
-        { name: "太原市", coordinate: [112.4493, 37.8570], x: "1", y: "2" },
-        { name: "大同市", coordinate: [113.3002, 40.0768], x: "1", y: "2" },
-        { name: "阳泉市", coordinate: [113.5805, 37.8563], x: "1", y: "2" },
-        { name: "长治市", coordinate: [113.1163, 36.1954], x: "1", y: "2" },
-        { name: "晋城市", coordinate: [112.8513, 35.4907], x: "1", y: "2" },
-        { name: "朔州市", coordinate: [112.4329, 39.3312], x: "1", y: "2" },
-        { name: "晋中市", coordinate: [112.8527, 37.6870], x: "1", y: "2" },
-        { name: "临汾市", coordinate: [111.5186, 36.0882], x: "1", y: "2" },
-        { name: "忻州市", coordinate: [112.7341, 38.4167], x: "1", y: "2" },
-        { name: "运城市", coordinate: [111.0069, 35.0264], x: "1", y: "2" },
-        { name: "吕梁市", coordinate: [111.1443, 37.5183], x: "1", y: "2" }
-      ];
-      const charts = echarts.init(this.$refs["charts"]);
+      this.charts = echarts.init(this.$refs["charts"]);
       const option = {
         // 设置背景颜色,"transparent" 表示透明背景
         backgroundColor: "transparent",
@@ -154,7 +166,7 @@ export default {
               fontWeight: 600, // 字重
               emphasis: { color: "#fff" }, // 悬浮时的文字颜色
             },
-            data: area
+            data: this.area
           },
 
           {
@@ -162,9 +174,10 @@ export default {
             coordinateSystem: "geo", // 使用 `geo` 作为坐标系
             symbol: "image://" + require("@/assets/zhang/myMap/projectPosition.png"), // 自定义标记(图片)
             symbolSize: [30, 20], // 标记大小(宽 30,高 20)
-            data: points.map(({ name, coordinate, x, y }) => ({
+            data: this.points.map(({ name, coordinate, appOrg, x, y }) => ({
               name, // 点名称
               value: coordinate, // 经纬度坐标
+              appOrg,
               x, // 额外数据(在建项目数)
               y, // 额外数据(施工项目数)
             })),
@@ -173,29 +186,42 @@ export default {
       };
       // 地图注册,第一个参数的名字必须和option.geo.map一致
       echarts.registerMap("shanxi",shanxi)
-      charts.setOption(option);
+      this.charts.setOption(option);
       // 监听点击事件
-      charts.on("click", (params) => {
+      this.charts.on("click", (params) => {
         if (params.componentType === "geo") {
           // 点击的是地图区域
           console.log("Clicked map area: ", params.name);
         } else if (params.componentType === "series") {
           // 点击的是自定义图标(scatter)
-          console.log("Clicked scatter point: ", params.name, params.data.appOrg);
+          console.log("Clicked scatter point: ", params.data.appOrg);
           this.appOrg = params.data.appOrg
           this.$emit('transmit', this.appOrg)
           // 销毁当前图表实例
-          charts.dispose();
+          this.charts.dispose();
           // 重新初始化并设置新的配置项
           this.$nextTick(() => {
-            this.initChildren(params.name) // 重新初始化图表
-            this.showBack = true
+            getProjectByAppOrg(this.appOrg).then((res) => {
+              if (Number(res.code) === 200) {
+                for (let it of res.data){
+                  let coordinate = []
+                  let obj = {}
+                  coordinate.push(it.abscissa)
+                  coordinate.push(it.ordinate)
+                  obj.coordinate = coordinate
+                  obj.name = it.projectName
+                  this.projectList.push(obj)
+                }
+                this.initChildren(params.name) // 重新初始化图表
+                this.showBack = true
+              }
+            })
           });
         }
       });
     },
     initChildren(cityName){
-      const charts = echarts.init(this.$refs["charts"]);
+      this.childCharts = echarts.init(this.$refs["charts"]);
       const option = {
         // 设置背景颜色,"transparent" 表示透明背景
         backgroundColor: "transparent",
@@ -251,18 +277,32 @@ export default {
             select: { disabled: true }, // 禁用地图的选中状态,防止点击后颜色锁定
             label: {
               show: true, // 显示区域名称
-              color: "#FFF", // 文字颜色
-              fontSize: 16, // 文字大小
-              fontWeight: 600, // 字重
-              emphasis: { color: "#fff" }, // 悬浮时的文字颜色
+              color: "#11F6F2", // 文字颜色
+              fontSize: 12, // 文字大小
+              emphasis: { color: "#11F6F2" }, // 悬浮时的文字颜色
             },
-          }
+          },
+          {
+            type: "scatter", // 散点图(用于标注特殊位置)
+            coordinateSystem: "geo", // 使用 `geo` 作为坐标系
+            symbol: 'circle', // 自定义标记
+            symbolSize: 10, // 标记的大小
+            itemStyle: {
+              color: 'yellow'
+            },
+            data: this.projectList.map(({ name, coordinate }) => ({
+              name, // 点名称
+              value: coordinate // 经纬度坐标
+            })),
+          },
         ]
       };
       echarts.registerMap("child", this.dataSource[cityName])
-      charts.setOption(option);
+      this.childCharts.setOption(option);
     },
     beBack(){
+      this.projectList = []
+      this.childCharts.dispose();
       this.initCharts()
       this.showBack = false
       this.appOrg = "10001"