zhongrj
2023-12-08 66f009989644d9d3aab1c0c66924429fc7b97bff
e呼即应修改,新增地图选点
4 files modified
1 files added
241 ■■■■■ changed files
package-lock.json 23 ●●●●● patch | view | raw | blame | history
package.json 1 ●●●● patch | view | raw | blame | history
public/index.html 12 ●●●●● patch | view | raw | blame | history
src/api/doorplateAddress/doorplateAddress.js 21 ●●●●● patch | view | raw | blame | history
src/views/task/eCall/index.vue 184 ●●●●● patch | view | raw | blame | history
package-lock.json
@@ -8,6 +8,7 @@
      "name": "saber-admin",
      "version": "3.2.0",
      "dependencies": {
        "avue-plugin-map": "^1.0.1",
        "avue-plugin-ueditor": "^0.1.4",
        "axios": "^0.18.0",
        "babel-polyfill": "^6.26.0",
@@ -2576,6 +2577,17 @@
      "dev": true,
      "engines": {
        "node": ">= 0.4"
      }
    },
    "node_modules/avue-plugin-map": {
      "version": "1.0.1",
      "resolved": "https://registry.npmmirror.com/avue-plugin-map/-/avue-plugin-map-1.0.1.tgz",
      "integrity": "sha512-QpGiCJZxF/DptoJrZnZWwQSxA2oBI7S8Wog3CEh9EhwrAKb+I0Ct8PWO+hBH2Q+tXTv/glhSWMh9aUbQa0/YIg==",
      "dependencies": {
        "axios": "^0.18.0",
        "element-ui": "^2.4.6",
        "vue": "^2.5.17",
        "vue-router": "^3.0.1"
      }
    },
    "node_modules/avue-plugin-ueditor": {
@@ -18848,6 +18860,17 @@
      "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==",
      "dev": true
    },
    "avue-plugin-map": {
      "version": "1.0.1",
      "resolved": "https://registry.npmmirror.com/avue-plugin-map/-/avue-plugin-map-1.0.1.tgz",
      "integrity": "sha512-QpGiCJZxF/DptoJrZnZWwQSxA2oBI7S8Wog3CEh9EhwrAKb+I0Ct8PWO+hBH2Q+tXTv/glhSWMh9aUbQa0/YIg==",
      "requires": {
        "axios": "^0.18.0",
        "element-ui": "^2.4.6",
        "vue": "^2.5.17",
        "vue-router": "^3.0.1"
      }
    },
    "avue-plugin-ueditor": {
      "version": "0.1.7",
      "resolved": "https://registry.npmmirror.com/avue-plugin-ueditor/-/avue-plugin-ueditor-0.1.7.tgz",
package.json
@@ -11,6 +11,7 @@
    "test:e2e": "vue-cli-service test:e2e"
  },
  "dependencies": {
    "avue-plugin-map": "^1.0.1",
    "avue-plugin-ueditor": "^0.1.4",
    "axios": "^0.18.0",
    "babel-polyfill": "^6.26.0",
public/index.html
@@ -18,8 +18,18 @@
  <link rel="stylesheet" href="<%= BASE_URL %>cdn/avue/2.10.16/index.css">
  <script src="<%= BASE_URL %>cdn/xlsx/FileSaver.min.js"></script>
  <script src="<%= BASE_URL %>cdn/xlsx/xlsx.full.min.js"></script>
  <link rel="icon" href="<%= BASE_URL %>favicon.png">
  <!-- AvueMap-begin-->
  <script>
    window._AMapSecurityConfig = {
      securityJsCode: '5c569caedb31676fc64da5be4c5e8cee',
    }
  </script>
  <script type="text/javascript" src='https://webapi.amap.com/maps?v=1.4.11&key=fce315b8c816ec06755a523ccae9922d&plugin=AMap.PlaceSearch'></script>
  <script src="https://webapi.amap.com/ui/1.0/main.js?v=1.0.11"></script>
    <!-- AvueMap-end-->
  <link rel="icon" href="<%= BASE_URL %>favicon.png">
  <title>基层智治综合协同平台</title>
  <style>
    html,
    body,
src/api/doorplateAddress/doorplateAddress.js
New file
@@ -0,0 +1,21 @@
import request from '@/router/axios';
export const getList = (current, size, params) => {
  return request({
    url: '/api/blade-doorplateAddress/doorplateAddress/page',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}
export const getDetatil = (params) => {
  return request({
    url: '/api/blade-doorplateAddress/doorplateAddress/detail',
    method: 'get',
    params: params
  })
}
src/views/task/eCall/index.vue
@@ -18,10 +18,10 @@
import {
  getList as getHouseList,
  getDetatil as getHouseDetail
} from "@/api/userHouse/list/house.js";
} from "@/api/doorplateAddress/doorplateAddress.js";
import { mapGetters } from "vuex";
import website from '@/config/website';
import AvueMap from "avue-plugin-map";
export default {
  data() {
    return {
@@ -42,7 +42,7 @@
        tip: false,
        searchShow: true,
        searchMenuSpan: 3,
        menuWidth: 350,
        menuWidth: 220,
        border: true,
        //stripe:true,
        index: true,
@@ -56,7 +56,7 @@
            prop: "name",
            span: 12,
            searchSpan: 4,
            width:100,
            width: 100,
            search: true,
            rules: [
              {
@@ -72,8 +72,8 @@
            span: 12,
            searchSpan: 4,
            dataType: "number",
            type:"select",
            width:100,
            type: "select",
            width: 100,
            dicUrl: "/api/blade-system/dict-biz/dictionary?code=eCallEventType",
            props: {
              label: "dictValue",
@@ -93,9 +93,9 @@
            prop: "communityCode",
            // search: true,
            // searchSpan: 4,
            width:150,
            width: 150,
            type: "tree",
            dicUrl:"/api/blade-system/region/tree?parentCode=361102005",
            dicUrl: "/api/blade-system/region/tree?parentCode=361102005",
            props: {
              label: "name",
              value: "id"
@@ -113,21 +113,20 @@
            prop: "source",
            span: 12,
            searchSpan: 4,
            width:100,
            hide:true,
            width: 100,
            hide: true,
            // search: true,
          },
          {
            label: "姓名",
            prop: "realName",
            span: 12,
            searchSpan: 4,
            width:100,
            width: 100,
            search: true,
            rules: [
              {
                required: true,
                required: false,
                message: "请输入姓名",
                trigger: "blur",
              },
@@ -137,7 +136,7 @@
            label: "联系方式",
            prop: "phone",
            span: 12,
            width:100,
            width: 100,
            searchSpan: 4,
            search: true,
            rules: [
@@ -149,12 +148,48 @@
            ],
          },
          {
            label: "事发地点",
            prop: "scene",
            overHidden: true,
            rules: [
              {
                required: true,
                message: "请输入事发地点",
                trigger: "blur",
              },
            ],
          },
          {
            label: "事发时间",
            prop: "occurrenceTime",
            width: 100,
            type: "date",
            format: "yyyy-MM-dd",
            valueFormat: "yyyy-MM-dd",
            rules: [
              {
                required: true,
                message: "请选择事发时间",
                trigger: "blur",
              },
            ],
          },
          {
            label: "事发位置",
            prop: "location",
            submitBtn:"提交",
            hide: true,
            type: 'map',
            span: 24,
            value: [117.966460, 28.431002, ""]
          },
          {
            label: "标准地址",
            prop: "addressCode",
            hide: true,
            type: "table",
            span:24,
            row:true,
            span: 24,
            row: true,
            children: {
              border: true,
              height: 400,
@@ -162,23 +197,24 @@
              searchMenuSpan: 6,
              submitText: "确定",
              column: [
                // {
                //   label: "小区",
                //   prop: "aoiName",
                //   search: true,
                //   searchSpan: 4,
                //   rules: [
                //     {
                //       required: true,
                //       message: "请选择小区",
                //       trigger: "blur",
                //     },
                //   ],
                // },
                {
                  label: "小区",
                  prop: "districtName",
                  search: true,
                  searchSpan: 4,
                  rules: [
                    {
                      required: true,
                      message: "请选择小区",
                      trigger: "blur",
                    },
                  ],
                }, {
                  label: "标准地址",
                  search: true,
                  searchSpan: 8,
                  prop: "houseName",
                  prop: "addressName",
                  display: false
                },
              ],
@@ -189,7 +225,7 @@
              total: 0
            },
            formatter: (row) => {
              return row.houseName
              return row.addressName
              // if (!row.districtName) return ''
              // return row.districtName + '-' + row.unit  + row.building  + row.room 
            },
@@ -197,7 +233,7 @@
              //首次加载去查询对应的值
              if (value) {
                getHouseDetail({
                  houseCode: value
                  addressCode: value
                }).then(res => {
                  var resData = res.data.data;
                  // 查询对应行数据
@@ -209,7 +245,7 @@
                this.loading = true;
                var params = {
                  ...data,
                  streetCode: "361102005"
                  townStreetCode: "361102005"
                }
                getHouseList(page.currentPage, page.pageSize, Object.assign(params)).then(res => {
                  const resData = res.data.data;
@@ -226,19 +262,20 @@
              }
            },
            props: {
              label: 'houseName',
              value: 'houseCode'
              label: 'addressName',
              value: 'addressCode'
            }
          },
          {
            label: "现场图片",
            prop: "imageUrls",
            width:80,
            width: 80,
            type: "upload",
            listType: "picture-card",
            dataType:"string",
            dataType: "string",
            multiple: true,
            row:true,
            row: true,
            action: "/api/blade-resource/oss/endpoint/put-file-attach",
            propsHttp: {
              res: "data",
@@ -247,37 +284,11 @@
            },
            span: 24,
          },
          {
            label: "事发地点",
            prop: "scene",
            overHidden:true,
            rules: [
              {
                required: true,
                message: "请输入事发地点",
                trigger: "blur",
              },
            ],
          },
          {
            label: "事发时间",
            prop: "occurrenceTime",
            width: 160,
            type: "date",
            format: "yyyy-MM-dd",
            valueFormat: "yyyy-MM-dd",
            rules: [
              {
                required: true,
                message: "请选择事发时间",
                trigger: "blur",
              },
            ],
          },
          {
            label: "事件简述",
            prop: "remark",
            type:"textarea",
            type: "textarea",
            span: 24,
          },
          // {
@@ -288,17 +299,17 @@
          //   span: 24,
          // },
          {
            label: "回访情况",
            prop: "retVis",
            type:"textarea",
            hide:true,
            label: "处理结果",
            prop: "disRes",
            type: "textarea",
            hide: true,
            span: 24,
          },
          {
            label: "处理结果",
            prop: "disRes",
            type:"textarea",
            hide:true,
            label: "回访情况",
            prop: "retVis",
            type: "textarea",
            hide: true,
            span: 24,
          },
          // {
@@ -313,6 +324,23 @@
    };
  },
  watch: {
    "form.location": {
      // form是表单或者表格绑定的数据集,v-model='form'
      handler(val) {
        var that = this;
        if (val) {
          console.log(val,7777)
          var arr = val.split(",");
          console.log(val,88888)
          //经纬度替换
          this.form.lat = arr[0];
          this.form.lng = arr[1];
          // this.form.location = arr[2];
        }
      },
      immediate: true,
    },
  },
  computed: {
    ...mapGetters(["permission", "userInfo"]),
@@ -446,7 +474,7 @@
          if (this.form.imageUrls.length > 0) {
            var urls = []
            var names = this.form.imageUrls.split(",");
            names.forEach(name=>{
            names.forEach(name => {
              urls.push(website.minioUrl + name)
            })
            this.form.imageUrls = urls.join(",")
@@ -484,12 +512,12 @@
        const data = res.data.data;
        this.page.total = data.total;
        this.data = data.records;
        this.data.forEach(item=>{
          if(item.imageUrls){
            if(item.imageUrls.length>0){
        this.data.forEach(item => {
          if (item.imageUrls) {
            if (item.imageUrls.length > 0) {
              var urls = []
              var names = item.imageUrls.split(",");
              names.forEach(name=>{
              names.forEach(name => {
                urls.push(website.minioUrl + name)
              })
              item.imageUrls = urls.join(",")