Browse Source

Merge branch 'master' of http://114.244.114.158:8802/siwei/real3d-portalsite

maxiaoxiao 11 tháng trước cách đây
mục cha
commit
9ec6b04244

+ 2 - 1
src/api/ghss/hgxfx.js

@@ -6,7 +6,8 @@ const hgxfxApi = {
     GetPage: '/apply/hgxfx/GetPage',
     GetScx: '/apply/hgxfx/GetScxList',
     UpdateScx: '/apply/hgxfx/UpdateScx',
-    ShapeUpload:'/file/uploadShpZip',
+    // ShapeUpload:'/file/uploadShpZip',
+    ShapeUpload: '/onemap-file/saveGeom',
     GetLog: '/apply/hgxfx/GetLog',
 }
 

+ 59 - 0
src/components/mapView/range.vue

@@ -13,6 +13,7 @@
         :auto-upload="false"
         :show-file-list="false"
         :file-list="fileList"
+        :limit="1"
       >
         <el-tooltip
           v-if="fileList.length > 0"
@@ -85,6 +86,7 @@ export default {
       handlerDraw: null,
       draw: null, //绘制
       fileList: [], //文件
+      fileDataID: "", //存储上传文件获取到的id
     };
   },
   mounted() {
@@ -104,6 +106,61 @@ export default {
         this.clearAll();
       }
       const formdata = new FormData();
+      formdata.append("file", file.raw);
+      formdata.append("fromType", 2);
+      formdata.append("fromRoute", this.$route.path);
+      // this.addPolygon();
+      ShapeUpload(formdata).then((res) => {
+        if (res.success) {
+          viewer.entities.removeAll();
+          this.fileDataID = res.data.id;
+          let geoms = res.data.geom
+            .substring(
+              res.data.geom.indexOf("(((") + 3,
+              res.data.geom.length - 3
+            )
+            .split(")),((");
+          for (let i = 0; i < geoms.length; i++) {
+            let geom = geoms[i].split(",");
+            let points = [];
+            for (let j = 0; j < geom.length; j++) {
+              points.push(parseFloat(geom[j].split(" ")[0]));
+              points.push(parseFloat(geom[j].split(" ")[1]));
+            }
+            points.push(parseFloat(geom[0].split(" ")[0]));
+            points.push(parseFloat(geom[0].split(" ")[1]));
+            viewer.entities.add({
+              // polyline: new Cesium.PolylineGraphics({
+              //   positions: Cesium.Cartesian3.fromDegreesArray(points),
+              //   width: 3,
+              //   material: Cesium.Color.BLUE.withAlpha(0.9),
+              //   clampToGround: true,
+              // }),
+              polygon: {
+                hierarchy: {
+                  positions: Cesium.Cartesian3.fromDegreesArray(points),
+                },
+                material: Cesium.Color.WHITE.withAlpha(0.3),
+                clampToGround: true,
+                outline: true,
+                outlineWidth: 5,
+                outlineColor: Cesium.Color.BLUE,
+              },
+            });
+          }
+          viewer.flyTo(viewer.entities);
+        }
+      });
+    },
+
+    //上传文件
+    handleChange1(file, fileList) {
+      if (fileList.length > 0) {
+        this.fileList = [fileList[fileList.length - 1]]; //这一步,是展示最后一次选择文件
+        this.clearAll();
+      }
+      const formdata = new FormData();
+
       formdata.append("file", file.raw);
       this.addPolygon();
       // ShapeUpload(formdata).then((res) => {
@@ -191,6 +248,8 @@ export default {
 
     //清除
     clearAll() {
+      //销毁上传创建的面
+      viewer.entities.removeAll();
       this.model.xzfw = "";
       this.model.xzmj = 0;
       common.clearHandlerDrawing("Polygon");

+ 13 - 6
src/views/cockpit/hysy.vue

@@ -19,7 +19,9 @@
                         <span>66.23</span>公顷
                     </div>
                 </div>
+
                 <div id="dial_watch_hysy">
+
                     <div class="text">
                         <p>计划出让海域</p>
                         <span>66.23</span>公顷
@@ -230,17 +232,21 @@ export default {
             let option = {
                 backgroundColor: 'rgba(0,0,0,0)',
                 title: {
-                    text: '{num|' + demoData.value + '%}',
-                    x: '50%',
+                    text: `{num|${demoData.value}%} ` + '\n' + `{label|完成率}`,
+
+                    x: '49%',
                     y: '70%',
                     textAlign: 'center',
                     textStyle: {
                         rich: {
                             num: {
-                                fontWeight: '900',
+                                fontWeight: '600',
                                 color: 'rgba(249, 180, 71, 1)',
                                 fontFamily: '微软雅黑',
-                                fontSize: 18,
+                                fontSize: 14,
+                            }, label: {
+                                color: "#fff",
+                                fontSize: 12,
                             },
                         },
                     },
@@ -331,7 +337,7 @@ export default {
                         radius: ['65%', '50%'],
                         center: ['50%', '70%'],
                         startAngle: 220,
-                        endAngle: -44,
+                        endAngle: -10,
                         color: [
                             {
                                 type: 'linear',
@@ -556,7 +562,8 @@ export default {
     // margin-top: 10px;
     margin-left: 15px;
 
-    margin-top:3px;
+    margin-top: 3px;
+
     p {
         font-kerning: normal;
         font-family: "Arial Negreta", "Arial Normal", "Arial";

+ 0 - 5
src/views/cockpit/stxf.vue

@@ -69,7 +69,6 @@ export default {
         { value: "ssxf", label: "山水工程" },
       ],
       tab: "tdzz",
-      model_switch: 'tdzz',
       paramdatas: {},
       sdlist: {
         tdzz: [
@@ -114,10 +113,6 @@ export default {
       this.jiDataInfo = res.data
     },
     changeCharts(e) {
-      this.model_switch = e
-      console.log('options[1].value: ', this.options[0].value);
-      console.log('model_switch: ', this.model_switch);
-      console.log(this.model_switch == this.options[0].value);
 
     },
     GetQueryOne(datas) {

+ 6 - 2
src/views/cockpit/tdsc.vue

@@ -11,7 +11,11 @@
       </el-select>
     </div>
 
-    <div id="scje_echart"></div>
+    <div v-show="tab == options[0].value">
+      <div id="scje_echart"></div>
+    </div>
+    <div v-show="tab == options[1].value">
+    </div>
   </div>
 </template>
 
@@ -78,7 +82,7 @@ export default {
         itemWidth: 24,
         itemHeight: 15,
         itemGap: 15,
-        top: '-4%',
+        top: '5%',
         right: '2%',
         selectedMode: false
       }

+ 8 - 4
src/views/cockpit/tdsy.vue

@@ -136,17 +136,21 @@ export default {
       let option = {
         backgroundColor: 'rgba(0,0,0,0)',
         title: {
-          text: '{num|' + demoData.value + '%}',
-          x: '50%',
+          text: `{num|${demoData.value}%} ` + '\n' + `{label|完成率}`,
+
+          x: '49%',
           y: '70%',
           textAlign: 'center',
           textStyle: {
             rich: {
               num: {
-                fontWeight: '900',
+                fontWeight: '600',
                 color: 'rgba(249, 180, 71, 1)',
                 fontFamily: '微软雅黑',
-                fontSize: 18,
+                fontSize: 14,
+              }, label: {
+                color: "#fff",
+                fontSize: 12,
               },
             },
           },