From 764cb58899b8ca0e9632a5e83c6950569442c41c Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Wed, 02 Nov 2022 14:28:12 +0800
Subject: [PATCH] 图片更改

---
 src/views/hd/baseMap.vue |   76 ++++++++++++++++++++++++-------------
 1 files changed, 49 insertions(+), 27 deletions(-)

diff --git a/src/views/hd/baseMap.vue b/src/views/hd/baseMap.vue
index e76c086..c8ac185 100644
--- a/src/views/hd/baseMap.vue
+++ b/src/views/hd/baseMap.vue
@@ -34,17 +34,17 @@
       <template slot-scope="{ type, disabled }" slot="haveBaseMapForm">
         <div class="inputInline" v-show="!notSet">
           <el-input
-            v-model="chouseBaseMapTypeOnce"
+            v-model="chouseBaseMapNameOnce"
             placeholder="底图名称"
             class="inputInlineType"
           ></el-input>
           <el-input
-            placeholder="请输入底图地址"
+            placeholder="请输入底图地址,示例:http://localhost:6080/arcgis/rest/services/test/MapServer"
             v-model="mapServiceValueOnce"
             class="input-with-select"
           >
             <!-- <el-select
-            v-model="chouseBaseMapTypeOnce"
+            v-model="chouseBaseMapNameOnce"
             slot="prepend"
             placeholder="请选择"
           >
@@ -63,7 +63,6 @@
         <baseMapMap
           ref="baseMapMap"
           id="baseMapMap"
-          @setMapData="setMapData"
           @changeMapSI="changeMapSI"
         ></baseMapMap>
       </template>
@@ -91,7 +90,7 @@
   data() {
     return {
       mapServiceValueOnce: "",
-      chouseBaseMapTypeOnce: "XYZ",
+      chouseBaseMapNameOnce: "",
       form: {},
       query: {},
       loading: true,
@@ -138,6 +137,29 @@
               },
             ],
           },
+          {
+            label: "底图数量",
+            prop: "addressNum",
+            viewDisply: false,
+            addDisplay: false,
+            editDisply: false,
+          },
+          {
+            label: "创建时间",
+            prop: "createtime",
+            viewDisply: false,
+            addDisplay: false,
+            // hide: true,
+            editDisply: false,
+          },
+          {
+            label: "修改时间",
+            prop: "updatetime",
+            viewDisply: false,
+            addDisplay: false,
+            // hide: true,
+            editDisply: false,
+          },
           // {
           //   label: "活动地点",
           //   viewDisply:false,
@@ -176,6 +198,7 @@
           {
             label: "专题底图",
             hide: true,
+            viewDisply: false,
             prop: "haveBaseMap",
             component: "AvueUeditor",
             // options: {
@@ -266,6 +289,7 @@
     addMapServices(val) {
       if (val == 1) {
         this.mapServiceValueOnce = "";
+        this.chouseBaseMapNameOnce = "";
       }
       if (this.mapServiceValueOnce == "") {
         this.$message({
@@ -274,32 +298,29 @@
         });
         return;
       }
-      if (this.chouseBaseMapTypeOnce == "") {
+      if (this.chouseBaseMapNameOnce == "") {
         this.$message({
-          message: "请输入地图服务类型",
+          message: "请输入地图服务名称",
           type: "warning",
         });
         return;
       }
-      // console.log(this.mapServiceValue, this.chouseBaseMapType);
+      // console.log(this.mapServiceValue, this.chouseBasemapname);
       // this.form["haveBaseMap"] = this.mapServiceValueOnce;
       //传入控制地图层 转store
       // this.$refs.baseMapMap.addService({
-      //   type: this.chouseBaseMapType,
+      //   type: this.chouseBasemapname,
       //   service: this.mapServiceValue,
       // });
       let that = this;
       this.$store.commit("setMapServiceValue", {
-        type: that.chouseBaseMapTypeOnce,
+        name: that.chouseBaseMapNameOnce,
         service: that.mapServiceValueOnce,
         show: true,
         layer: null,
       });
       this.mapServiceValueOnce = "";
-    },
-    setMapData(val) {
-      this.LineData = val[0];
-      this.PointData = val[1];
+      this.chouseBaseMapNameOnce = "";
     },
     rowSave(row, done, loading) {
       if (row.haveBaseMap == "") {
@@ -310,20 +331,21 @@
         loading();
         return;
       }
-      let types = "",
+      let names = "",
         urls = "",
         leng = this.mapServiceValue.length - 1;
+      //处理结果
       for (let k in this.mapServiceValue) {
-        types += this.mapServiceValue[k].type;
+        names += this.mapServiceValue[k].name;
         urls += this.mapServiceValue[k].service;
         if (k != leng) {
-          types += ",";
+          names += ",";
           urls += ",";
         }
       }
       let data = {
         hdid: row.hdid,
-        maptype: types,
+        mapname: names,
         mapurl: urls,
       };
       // console.log(data);
@@ -382,18 +404,18 @@
         loading();
         return;
       }
-      let types = "",
+      let names = "",
         urls = "",
         leng = this.mapServiceValue.length - 1;
       for (let k in this.mapServiceValue) {
-        types += this.mapServiceValue[k].type;
+        names += this.mapServiceValue[k].name;
         urls += this.mapServiceValue[k].service;
         if (k != leng) {
-          types += ",";
+          names += ",";
           urls += ",";
         }
       }
-      row.maptype = types;
+      row.mapname = names;
       row.mapurl = urls;
       // console.log(row);
       // loading();
@@ -492,15 +514,15 @@
           this.form = res.data.data;
           console.log(res);
           //解析数据
-          let types = this.form.maptype.split(","),
+          let names = this.form.mapname.split(","),
             urls = this.form.mapurl.split(",");
-          console.log(types);
+          console.log(names);
           console.log(urls);
 
-          for (let k in types) {
+          for (let k in names) {
             setTimeout(() => {
               this.$store.commit("setMapServiceValue", {
-                type: types[k],
+                name: names[k],
                 service: urls[k],
                 show: true,
                 layer: null,
@@ -574,7 +596,7 @@
         this.page.total = data.total;
         this.data = data.records;
         for (let k in this.data) {
-          this.data[k]["haveBaseMap"] = this.data[k].maptype;
+          this.data[k]["addressNum"] = this.data[k].mapname.split(",").length;
         }
         this.loading = false;
         this.selectionClear();

--
Gitblit v1.9.3