Lou
2024-02-03 2d95e769f7dcdc30e2ba699d6674820787b5e5fb
subPackage/workbench/views/cscj.vue
@@ -532,6 +532,7 @@
               title: '详情'
            })
         }
         this.getCurrentLocation();
      },
@@ -608,7 +609,7 @@
         async getAllBizDict() {
            // 获取九小场所类型
            await this.getBizDict('nineType', this.nineTypeList)
            // await this.getBizDict('nineType', this.nineTypeList)
            // 获取阵地
            await this.getBizDict('frontType', this.frontTypeList)
         },
@@ -933,17 +934,25 @@
            uni.getLocation({
               type: 'gcj02', // 坐标系类型
               success: (res) => {
                  var latitude = res.latitude; // 维度
                  var longitude = res.longitude; // 经度
                  // var latitude = res.latitude; // 维度
                  // var longitude = res.longitude; // 经度
                  this.form.lng = longitude
                  this.form.lat = latitude
                  this.form.jwd =
                     `${Number(res.longitude).toFixed(6)},${Number(res.latitude).toFixed(6)}`
                  // this.form.lng = longitude
                  // this.form.lat = latitude
                  // this.form.jwd =
                  //    `${Number(res.longitude).toFixed(6)},${Number(res.latitude).toFixed(6)}`
               },
               fail: function(res) {
                  console.log('获取定位失败:' + res.errMsg);
               complete: (res) => {
                  if (res.latitude) {
                     this.$set(this.form, "x", res.longitude)
                     this.$set(this.form, "y", res.latitude)
                  } else {
                     uni.showModal({
                        title: "提示!",
                        content: `获取定位信息失败 ${res.errMsg}`,
                        showCancel: false
                     })
                  }
               }
            });
         },