linwe
2024-08-08 1a5c9d89d7a1347046692ce5086a1391027c8593
代码优化
13 files modified
2 files added
2509 ■■■■ changed files
src/api/place/place.js 13 ●●●● patch | view | raw | blame | history
src/api/user.js 6 ●●●● patch | view | raw | blame | history
src/page/login/userlogin.vue 50 ●●●● patch | view | raw | blame | history
src/views/backblask/BackblastArticle.vue 2 ●●●●● patch | view | raw | blame | history
src/views/backblask/BackblastPubRecord.vue 1 ●●●● patch | view | raw | blame | history
src/views/backblask/BackblastWarnHanRec.vue 35 ●●●● patch | view | raw | blame | history
src/views/cGovernance/gridWorkLog.vue 117 ●●●●● patch | view | raw | blame | history
src/views/cGovernance/gridWorkLogTwo.vue 598 ●●●●● patch | view | raw | blame | history
src/views/grid/jwGrid.vue 6 ●●●● patch | view | raw | blame | history
src/views/place/components/baseAllInfo.vue 69 ●●●● patch | view | raw | blame | history
src/views/publicSecurity/keynotePersonnelManageTree.vue 10 ●●●● patch | view | raw | blame | history
src/views/publicSecurity/keynotePlaceManage.vue 134 ●●●●● patch | view | raw | blame | history
src/views/publicSecurity/keynotePlaceManageTwo.vue 1166 ●●●●● patch | view | raw | blame | history
src/views/resource/distapch.vue 36 ●●●●● patch | view | raw | blame | history
src/views/task/customTask/index.vue 266 ●●●●● patch | view | raw | blame | history
src/api/place/place.js
@@ -98,6 +98,17 @@
  });
};
export const updatePoiLabelColor = (placeId, color) => {
  return request({
    url: "/api/blade-place/place/updatePoiLabelColor",
    method: "get",
    params: {
      placeId,
      color
    },
  });
};
export const getPlaceDetaill = (houseCode) => {
  return request({
    url: "/api/blade-place/place/getDetail",
@@ -167,5 +178,3 @@
      params: params
    });
  };
src/api/user.js
@@ -8,14 +8,14 @@
    'Tenant-Id': tenantId,
    'Dept-Id': (website.switchMode ? deptId : ''),
    'Role-Id': (website.switchMode ? roleId : ''),
    // 'Captcha-Key': key,
    // 'Captcha-Code': code,
    'Captcha-Key': key,
    'Captcha-Code': code,
  },
  params: {
    tenantId,
    username,
    password,
    grant_type:"password",
    grant_type: "captcha",
    scope: "all",
    type,
    // 查全部-暂定
src/page/login/userlogin.vue
@@ -1,10 +1,7 @@
<template>
  <el-form class="login-form" status-icon :rules="loginRules" ref="loginForm" :model="loginForm" label-width="0">
    <!-- <el-form-item v-if="tenantMode" prop="tenantId">
      <el-input size="small"
                @keyup.enter.native="handleLogin"
                v-model="loginForm.tenantId"
                auto-complete="off"
      <el-input size="small" @keyup.enter.native="handleLogin" v-model="loginForm.tenantId" auto-complete="off"
                :placeholder="$t('login.tenantId')">
        <i slot="prefix" class="icon-quanxian"/>
      </el-input>
@@ -22,25 +19,21 @@
        <i slot="prefix" class="icon-mima" />
      </el-input>
    </el-form-item>
    <!-- <el-form-item v-if="this.website.captchaMode" prop="code">
    <el-form-item v-if="this.website.captchaMode" prop="code">
      <el-row :span="24">
        <el-col :span="16">
          <el-input size="small"
                    @keyup.enter.native="handleLogin"
                    v-model="loginForm.code"
                    auto-complete="off"
          <el-input size="small" @keyup.enter.native="handleLogin" v-model="loginForm.code" auto-complete="off"
                    :placeholder="$t('login.code')">
            <i slot="prefix" class="icon-yanzhengma"/>
          </el-input>
        </el-col>
        <el-col :span="8">
          <div class="login-code">
            <img :src="loginForm.image" class="login-code-img" @click="refreshCode"
            />
            <img :src="loginForm.image" class="login-code-img" @click="refreshCode" />
          </div>
        </el-col>
      </el-row>
    </el-form-item> -->
    </el-form-item>
    <el-form-item>
      <el-button type="primary" size="small" @click.native.prevent="handleLogin" class="login-submit">{{
                $t('login.submit') }}
@@ -60,7 +53,9 @@
  import {
    info
  } from "@/api/system/tenant"
  // import {getCaptcha} from "@/api/user";
  import {
    getCaptcha
  } from "@/api/user";
  import {
    getTopUrl
  } from "@/util/util"
@@ -97,6 +92,11 @@
          username: [{
            required: true,
            message: "请输入用户名",
            trigger: "blur"
          }],
          code: [{
            required: true,
            message: "请输入验证码",
            trigger: "blur"
          }],
          password: [{
@@ -161,8 +161,8 @@
      }
    },
    created() {
      this.getTenant()
      //   this.refreshCode();
      // this.getTenant()
      this.refreshCode();
    },
    mounted() {},
    watch: {
@@ -190,15 +190,15 @@
    },
    props: [],
    methods: {
      // refreshCode () {
      //     if (this.website.captchaMode) {
      //         getCaptcha().then(res => {
      //             const data = res.data
      //             this.loginForm.key = data.key
      //             this.loginForm.image = data.image
      //         })
      //     }
      // },
      refreshCode() {
        if (this.website.captchaMode) {
          getCaptcha().then(res => {
            const data = res.data
            this.loginForm.key = data.key
            this.loginForm.image = data.image
          })
        }
      },
      showPassword() {
        this.passwordType === "" ?
          (this.passwordType = "password") :
@@ -250,7 +250,7 @@
              loading.close()
            }).catch(() => {
              loading.close()
              // this.refreshCode()
              this.refreshCode()
            })
          }
        })
src/views/backblask/BackblastArticle.vue
@@ -127,6 +127,8 @@
              hide: true,
              searchSpan: 5,
              searchLabelWidth: 76,
              addDisplay: false,
              editDisplay: false,
            }, {
              overHidden: true,
              label: "宣传标题",
src/views/backblask/BackblastPubRecord.vue
@@ -211,6 +211,7 @@
              width: 120
            },
            {
              labelWidth: 120,
              label: "所属街道",
              parent: false,
              search: true,
src/views/backblask/BackblastWarnHanRec.vue
@@ -91,10 +91,11 @@
              hide: true,
              searchSpan: 5,
              searchLabelWidth: 76,
              addDisplay: false,
              editDisplay: false,
            }, {
              label: "地址",
              prop: "address",
              // align: 'center',
              minWidth: 210,
              search: true,
              searchSpan: 5,
@@ -105,7 +106,6 @@
            }, {
              label: "核实内容信息",
              prop: "recContent",
              // align: 'center',
              minWidth: 150,
              labelWidth: 120,
              type: "textarea",
@@ -114,25 +114,15 @@
              overHidden: true,
            },
            {
              label: "核实现场照片",
              prop: "sceUrls",
              // align: 'center',
              labelWidth: 120,
              row: true,
              span: 24,
              fileType: 'img',
              type: "upload",
              listType: "picture-card",
              dataType: "string",
              width: 110,
            }, {
              label: "创建时间",
              prop: "createTime",
              labelWidth: 120,
              align: 'center',
              width: 156,
              row: true,
              searchPlaceholder: '请输入'
              searchPlaceholder: '请输入',
              addDisplay: false,
              editDisplay: false,
            }, {
              label: "民警姓名",
              prop: "policeman",
@@ -176,6 +166,7 @@
            // },
            {
              searchLabelWidth: 90,
              labelWidth: 120,
              label: "辖区派出所",
              search: true,
              searchSpan: 4,
@@ -202,7 +193,19 @@
              labelWidth: 120,
              searchLabelWidth: 96,
              searchPlaceholder: '请输入宣防单位'
            }
            }, {
              label: "核实现场照片",
              prop: "sceUrls",
              // align: 'center',
              labelWidth: 120,
              row: true,
              span: 24,
              fileType: 'img',
              type: "upload",
              listType: "picture-card",
              dataType: "string",
              width: 110,
            },
          ],
        },
        data: []
src/views/cGovernance/gridWorkLog.vue
@@ -2,17 +2,16 @@
<template>
    <basic-container>
        <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" @row-del="rowDel"
            v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave"
            :before-open="beforeOpen" @search-change="searchChange" @search-reset="searchReset"
            @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
            @refresh-change="refreshChange" @on-load="onLoad">
      v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave" :before-open="beforeOpen"
      @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
      @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
            <template slot="householdIdType" slot-scope="{item,value,label}">
                <span>{{ showNamePhone(item) }}</span>
            </template>
            <template slot="menuLeft">
                <el-button size="small" icon="el-icon-delete" plain v-if="permission.gridWorkLog_delete"
                    @click="handleDelete">删 除
        <el-button size="small" icon="el-icon-delete" plain v-if="permission.gridWorkLog_delete" @click="handleDelete">删
          除
                </el-button>
            </template>
@@ -26,11 +25,26 @@
</template>
<script>
import { getPersonPublicSelect } from "@/api/public"
import { getDetatils as householdDetail } from "@/api/userHouse/list/houseHold"
import { getList, remove, update, add, getGridWorkLog } from "@/api/grid/gridWorkLog"
import { getList as getHouseholdList, getDetatils as getHouseholdDetail } from "@/api/userHouse/list/houseHold"
import { mapGetters } from "vuex"
  import {
    getPersonPublicSelect
  } from "@/api/public"
  import {
    getDetatils as householdDetail
  } from "@/api/userHouse/list/houseHold"
  import {
    getList,
    remove,
    update,
    add,
    getGridWorkLog
  } from "@/api/grid/gridWorkLog"
  import {
    getList as getHouseholdList,
    getDetatils as getHouseholdDetail
  } from "@/api/userHouse/list/houseHold"
  import {
    mapGetters
  } from "vuex"
import website from '@/config/website'
export default {
@@ -64,15 +78,14 @@
                selection: true,
                excelBtn: true,
                dialogClickModal: false,
                column: [
                    {
          column: [{
                        width: 120,
                        label: "走访类型",
                        prop: "type",
                        span: 12,
                        searchSpan: 4,
                        search: true,
                        searchLabelWidth: 76,
              searchLabelWidth: 80,
                        type: "select",
                        dicUrl: "/api/blade-system/dict-biz/dictionary?code=haveType",
                        dataType: "number",
@@ -80,13 +93,11 @@
                            label: "dictValue",
                            value: "dictKey",
                        },
                        rules: [
                            {
              rules: [{
                                required: true,
                                message: "请选择走访类型",
                                trigger: "blur",
                            },
                        ],
              }, ],
                    },
                    {
@@ -95,23 +106,26 @@
                        prop: "personType",
                        span: 12,
                        type: "tree",
                        dicUrl: "/api/blade-label/label/getLabelList?parentId=100",
              dicUrl: "/api/blade-label/label/getLabelList?parentId=1000",
                        props: {
                            label: "name",
                            value: "id"
                        },
                        searchSpan: 4,
                        search: true,
                        change: ({ value, column, item, dic }) => {
              change: ({
                value,
                column,
                item,
                dic
              }) => {
                            this.getUserList(value)
                        },
                        rules: [
                            {
              rules: [{
                                required: true,
                                message: "请选择重点人群",
                                trigger: "blur",
                            },
                        ],
              }, ],
                    },
                    {
@@ -137,17 +151,15 @@
                            value: 'id',
                        },
                        dicData: [],
                        rules: [
                            {
              rules: [{
                                required: true,
                                message: '请输入姓名',
                                trigger: 'blur'
                            }
                        ],
              }],
                    },
                    {
                        width: 120,
              width: 100,
                        label: "联系方式",
                        prop: "phone",
                        span: 12,
@@ -191,7 +203,27 @@
                        prop: "gridName",
                    },
                    {
                        width: 144,
              width: 110,
              searchLabelWidth: 80,
              overHidden: true,
              label: "状态",
              display: false,
              prop: "status",
              type: 'select',
              search: true,
              searchSpan: 4,
              dicData: [{
                  label: "未走访",
                  value: "1",
                },
                {
                  label: "已走访",
                  value: "2",
                }
              ],
            },
            {
              width: 140,
                        label: "走访时间",
                        prop: "workTime",
                        searchLabelWidth: 120,
@@ -199,30 +231,25 @@
                        row: true,
                        format: "yyyy-MM-dd HH:mm:ss",
                        valueFormat: "yyyy-MM-dd HH:mm:ss",
                        rules: [
                            {
              rules: [{
                                required: true,
                                message: "请输入走访时间",
                                trigger: "blur",
              }, ],
                            },
                        ],
                    },
                    {
              width: 140,
                        overHidden: true,
                        label: "走访内容",
                        prop: "context",
                        type: "textarea",
                        span: 24,
                        rules: [
                            {
              rules: [{
                                required: true,
                                message: "请输入走访内容",
                                trigger: "blur",
              }, ],
                            },
                        ],
                    },
                    {
                        width: 110,
                        label: "走访取证",
@@ -258,13 +285,11 @@
                        type: "date",
                        format: "yyyy-MM-dd HH:mm:ss",
                        valueFormat: "yyyy-MM-dd HH:mm:ss",
                        rules: [
                            {
              rules: [{
                                required: true,
                                message: "请输入上报时间",
                                trigger: "blur",
                            },
                        ],
              }, ],
                    },
                ],
            },
@@ -525,7 +550,9 @@
            this.onLoad(this.page, this.query)
        },
        onLoad (page, params = {}) {
            const { dateTime } = this.query
        const {
          dateTime
        } = this.query
            let values = {
                ...params,
            }
src/views/cGovernance/gridWorkLogTwo.vue
New file
@@ -0,0 +1,598 @@
<!-- 走访日志 -->
<template>
  <basic-container>
    <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" @row-del="rowDel"
      v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave" :before-open="beforeOpen"
      @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
      @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
      <template slot="householdIdType" slot-scope="{item,value,label}">
        <span>{{ showNamePhone(item) }}</span>
      </template>
      <template slot="menuLeft">
        <el-button size="small" icon="el-icon-delete" plain v-if="permission.gridWorkLog_delete" @click="handleDelete">删
          除
        </el-button>
      </template>
      <template slot-scope="{row, size}" slot="phone">
        <el-button :size="size" type="text" @click="showStringDispose(row, 'phoneflag')"
          v-text="textDispose(row, 'phoneflag', 'phone')">
        </el-button>
      </template>
    </avue-crud>
  </basic-container>
</template>
<script>
  import {
    getPersonPublicSelect
  } from "@/api/public"
  import {
    getDetatils as householdDetail
  } from "@/api/userHouse/list/houseHold"
  import {
    getList,
    remove,
    update,
    add,
    getGridWorkLog
  } from "@/api/grid/gridWorkLog"
  import {
    getList as getHouseholdList,
    getDetatils as getHouseholdDetail
  } from "@/api/userHouse/list/houseHold"
  import {
    mapGetters
  } from "vuex"
  import website from '@/config/website'
  export default {
    data() {
      return {
        form: {},
        query: {},
        loading: true,
        page: {
          pageSize: 10,
          currentPage: 1,
          total: 0,
        },
        datetime: "",
        selectionList: [],
        option: {
          labelWidth: 120,
          searchLabelWidth: 96,
          searchShow: true,
          searchMenuSpan: 3,
          menuWidth: 210,
          height: "auto",
          calcHeight: 54,
          dialogWidth: 950,
          tip: false,
          border: true,
          //stripe:true,
          index: true,
          viewBtn: true,
          selection: true,
          excelBtn: true,
          dialogClickModal: false,
          column: [{
              width: 120,
              label: "走访类型",
              prop: "type",
              span: 12,
              searchSpan: 4,
              search: true,
              searchLabelWidth: 80,
              type: "select",
              dicUrl: "/api/blade-system/dict-biz/dictionary?code=haveType",
              dataType: "number",
              props: {
                label: "dictValue",
                value: "dictKey",
              },
              rules: [{
                required: true,
                message: "请选择走访类型",
                trigger: "blur",
              }, ],
            },
            {
              overHidden: true,
              label: "重点人群",
              prop: "personType",
              span: 12,
              type: "tree",
              dicUrl: "/api/blade-label/label/getLabelList?parentId=1000",
              props: {
                label: "name",
                value: "id"
              },
              searchSpan: 4,
              search: true,
              change: ({
                value,
                column,
                item,
                dic
              }) => {
                this.getUserList(value)
              },
              rules: [{
                required: true,
                message: "请选择重点人群",
                trigger: "blur",
              }, ],
            },
            {
              width: 110,
              display: false,
              label: "被访人姓名",
              prop: "name",
              searchLabelWidth: 120,
              searchSpan: 5,
              search: true,
            },
            {
              disabled: true,
              label: "被访人姓名",
              prop: "householdId",
              type: 'select',
              remote: true,
              hide: true,
              dicUrl: "",
              props: {
                label: 'name',
                value: 'id',
              },
              dicData: [],
              rules: [{
                required: true,
                message: '请输入姓名',
                trigger: 'blur'
              }],
            },
            {
              width: 100,
              label: "联系方式",
              prop: "phone",
              span: 12,
              disabled: true,
              searchSpan: 4,
              search: true,
              slot: true
            },
            {
              width: 156,
              overHidden: true,
              label: "走访地址",
              prop: "address",
              span: 24,
              disabled: true,
            },
            {
              width: 110,
              label: "所属街道",
              display: false,
              prop: "townName",
            },
            {
              width: 156,
              overHidden: true,
              label: "所属社区",
              display: false,
              prop: "neiName",
              search: true,
              searchSpan: 4
            },
            {
              width: 110,
              overHidden: true,
              label: "所属网格",
              display: false,
              prop: "gridName",
            },
            {
              width: 110,
              searchLabelWidth: 80,
              overHidden: true,
              label: "状态",
              display: false,
              prop: "status",
              type: 'select',
              search: true,
              searchSpan: 4,
              dicData: [{
                  label: "未走访",
                  value: "1",
                },
                {
                  label: "已走访",
                  value: "2",
                }
              ],
            },
            {
              width: 140,
              label: "走访时间",
              prop: "workTime",
              searchLabelWidth: 120,
              type: "date",
              row: true,
              format: "yyyy-MM-dd HH:mm:ss",
              valueFormat: "yyyy-MM-dd HH:mm:ss",
              rules: [{
                required: true,
                message: "请输入走访时间",
                trigger: "blur",
              }, ],
            },
            {
              width: 140,
              overHidden: true,
              label: "走访内容",
              prop: "context",
              type: "textarea",
              span: 24,
              rules: [{
                required: true,
                message: "请输入走访内容",
                trigger: "blur",
              }, ],
            },
            {
              width: 110,
              label: "走访取证",
              prop: "url",
              type: "upload",
              listType: "picture-card",
              dataType: "string",
              multiple: true,
              action: "/api/blade-resource/oss/endpoint/put-file",
              propsHttp: {
                res: "data",
                name: 'name',
                url: "link",
              },
              span: 24,
            },
            {
              width: 110,
              label: "录入人",
              display: false,
              prop: "createUserName",
            },
            {
              display: false,
              width: 144,
              label: "上报时间",
              prop: "createTime",
              searchLabelWidth: 120,
              type: "date",
              format: "yyyy-MM-dd HH:mm:ss",
              valueFormat: "yyyy-MM-dd HH:mm:ss",
              rules: [{
                required: true,
                message: "请输入上报时间",
                trigger: "blur",
              }, ],
            },
          ],
        },
        data: [],
      }
    },
    watch: {
      "form.householdId": {
        handler(val) {
          if (val) {
            householdDetail(val).then(res => {
              let data = res.data.data
              this.form.phone = data.phoneNumber
              this.form.address = data.currentAddress
            })
          }
        }
      },
      'form.personType': {
        handler(newData) {
          let householdIdColumn = this.findObject(
            this.option.column,
            'householdId'
          )
          if (newData) {
            householdIdColumn.disabled = false
          } else {
            householdIdColumn.disabled = true
          }
        },
      },
      'form.type': {
        handler(newData) {
          let householdIdColumn = this.findObject(
            this.option.column,
            'householdId'
          )
          let personTypeColumn = this.findObject(
            this.option.column,
            'personType'
          )
          if (newData == 1) {
            householdIdColumn.disabled = false
            personTypeColumn.display = false
          } else {
            householdIdColumn.disabled = true
            personTypeColumn.display = true
          }
        },
      },
    },
    computed: {
      ...mapGetters(["permission", "userInfo"]),
      permissionList() {
        return {
          addBtn: this.vaildData(this.permission.gridWorkLog_add, true),
          viewBtn: this.vaildData(this.permission.gridWorkLog_view, true),
          delBtn: this.vaildData(this.permission.gridWorkLog_delete, true),
          editBtn: this.vaildData(this.permission.gridWorkLog_edit, true),
        }
      },
      ids() {
        let ids = []
        this.selectionList.forEach((ele) => {
          ids.push(ele.id)
        })
        return ids.join(",")
      },
      showNamePhone() {
        return (data) => {
          if (data.phoneNumber && data.phoneNumber.trim() != '') {
            return `${data.name}(${data.phoneNumber})`
          }
          return data.name
        }
      },
      textDispose() {
        return (row, flag, type) => {
          if (row[flag] || row[type] == null) {
            return row[type]
          } else {
            if (type == 'principalIdCard') {
              return row[type].replace(/^(.{6})(?:\d+)(.{4})$/, "$1******$2")
            } else {
              return row[type].replace(/^(.{3})(?:\d+)(.{4})$/, "$1****$2")
            }
          }
        }
      }
    },
    created() {
      this.getUserList()
    },
    methods: {
      showStringDispose(row, type) {
        row[type] = !row[type]
      },
      getUserList(param = '') {
        let dicUrl = `/api/blade-household/household/selectHouseholdList?labelId=${param}&searchKey={{key}}&limit=20`
        const column = this.findObject(this.option.column, "householdId")
        column.dicUrl = dicUrl
      },
      rowSave(row, done, loading) {
        if (row.url.length > 0) {
          var urls = []
          var split = row.url.split(",")
          split.forEach(url => {
            var names = url.split("jczz/")
            urls.push(names[1])
          })
          row.url = urls.join(",")
        }
        add(row).then(
          () => {
            this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!",
            })
            done()
          },
          (error) => {
            window.console.log(error)
            loading()
          }
        )
      },
      rowUpdate(row, index, done, loading) {
        if (row.url.length > 0) {
          var urls = []
          var split = row.url.split(",")
          split.forEach(url => {
            var names = url.split("jczz/")
            urls.push(names[1])
          })
          row.url = urls.join(",")
        }
        update(row).then(
          () => {
            this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!",
            })
            done()
          },
          (error) => {
            window.console.log(error)
            loading()
          }
        )
      },
      rowDel(row) {
        this.$confirm("确定将选择数据删除?", {
            confirmButtonText: "确定",
            cancelButtonText: "取消",
            type: "warning",
          })
          .then(() => {
            return remove(row.id)
          })
          .then(() => {
            this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!",
            })
          })
      },
      searchReset() {
        this.query = {}
        this.onLoad(this.page)
      },
      searchChange(params, done) {
        this.query = params
        this.page.currentPage = 1
        this.onLoad(this.page, params)
        done()
      },
      selectionChange(list) {
        this.selectionList = list
      },
      selectionClear() {
        this.selectionList = []
        this.$refs.crud.toggleSelection()
      },
      handleDelete() {
        if (this.selectionList.length === 0) {
          this.$message.warning("请选择至少一条数据")
          return
        }
        this.$confirm("确定将选择数据删除?", {
            confirmButtonText: "确定",
            cancelButtonText: "取消",
            type: "warning",
          })
          .then(() => {
            return remove(this.ids)
          })
          .then(() => {
            this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!",
            })
            this.$refs.crud.toggleSelection()
          })
      },
      beforeOpen(done, type) {
        if (["edit", "view"].includes(type)) {
          getGridWorkLog(this.form.id).then((res) => {
            this.form = res.data.data
            if (this.form.url) {
              if (this.form.url.length > 0) {
                var urls = []
                var names = this.form.url.split(",")
                names.forEach(name => {
                  urls.push(website.minioUrl + name)
                })
                this.form.url = urls.join(",")
              }
            }
            getPersonPublicSelect({
              id: this.form.householdId
            }).then(res => {
              const column = this.findObject(this.option.column, "householdId")
              column.dicData = res.data.data
            })
          })
        }
        // con
        done()
      },
      currentChange(currentPage) {
        this.page.currentPage = currentPage
      },
      sizeChange(pageSize) {
        this.page.pageSize = pageSize
      },
      refreshChange() {
        this.onLoad(this.page, this.query)
      },
      onLoad(page, params = {}) {
        const {
          dateTime
        } = this.query
        let values = {
          ...params,
        }
        if (dateTime) {
          values = {
            ...params,
            startTime: dateTime[0],
            endTime: dateTime[1],
            ...this.query,
          }
          values.dateTime = null
        }
        this.loading = true
        getList(page.currentPage, page.pageSize, values).then((res) => {
          const data = res.data.data
          this.page.total = data.total
          this.data = data.records
          this.data.forEach(item => {
            this.$set(item, 'phoneflag', false)
            if (item.url) {
              if (item.url.length > 0) {
                var urls = []
                var names = item.url.split(",")
                names.forEach(name => {
                  urls.push(website.minioUrl + name)
                })
                item.url = urls.join(",")
              }
            }
          })
          this.loading = false
          this.selectionClear()
        })
      }
    },
  }
</script>
<style>
  .avue-upload__icon {
    line-height: 6;
  }
</style>
src/views/grid/jwGrid.vue
@@ -78,7 +78,7 @@
              searchSpan: 4,
              type: "tree",
              // search: true,
              row: true,
              // row: true,
              hide: true,
              dicUrl: "/api/blade-policeStation/policeStation/tree",
              props: {
@@ -114,6 +114,8 @@
              search: true,
              searchSpan: 4,
              // parent: false,
              addDisplay: false,
              editDisplay: false,
              prop: "pcsName",
              type: "tree",
              dicUrl: "/api/blade-system/dept/treeByDept?deptId=1727974759086493697",
@@ -133,6 +135,8 @@
              label: "所属社区",
              prop: "communityName",
              search: true,
              addDisplay: false,
              editDisplay: false,
              searchSpan: 4,
              width: 150,
              type: "tree",
src/views/place/components/baseAllInfo.vue
@@ -18,8 +18,8 @@
        <box-title class="m10" :classVal="9" :title="'房东信息'"></box-title>
        <avue-form v-if="restShow" ref="restForm" :option="houseOwnerOption" v-model="placeForm"></avue-form>
        <box-title class="m10" :classVal="9" :title="'其他信息'"></box-title>
        <avue-form v-if="restShow" ref="restForm" :option="optionDetail" v-model="placeForm"></avue-form>
        <box-title class="m10" :classVal="9" :title="'学校信息'" v-if="schoolShow"></box-title>
        <avue-form v-if="schoolShow" ref="restForm" :option="optionDetail" v-model="placeForm"></avue-form>
        <box-title class="m10" :classVal="9" :title="'从业人员'"></box-title>
        <avue-crud :option="placeOption" :table-loading="loading" :data="placeExt" ref="crud" v-model="houseHoldForm"
@@ -76,6 +76,7 @@
        roleBox: false,
        baseShow: false,
        restShow: false,
        schoolShow: false,
        placeExt: [],
@@ -95,9 +96,6 @@
                trigger: "blur",
              }, ],
            },
            {
              label: "负责人",
              prop: "principal",
@@ -405,34 +403,6 @@
              prop: "addressName",
              span: 12
            },
            // {
            //   width: 160,
            //   overHidden: true,
            //   slot: true,
            //   label: "标准地址",
            //   prop: "houseCodeBinds",
            //   span: 24,
            //   type: 'select',
            //   labelWidth:120,
            //   dataType: "object",
            //   remote: true,
            //   multiple: true,
            //   hide: true,
            //   display: false,
            //   filterable:true,
            //   dicUrl: `/api/blade-doorplateAddress/doorplateAddress/getPlaceList`,
            //   props: {
            //     label: 'addressName',
            //     value: 'addressCode',
            //   },
            //   dicData: [],
            //   rules: [{
            //     required: false,
            //     message: "请选择标准地址",
            //     trigger: "blur",
            //   }, ]
            // },
            {
              span: 24,
              hide: true,
@@ -511,8 +481,6 @@
                trigger: "blur",
              }, ],
            },
            {
              label: "营业执照",
              prop: "imageUrls",
@@ -548,7 +516,6 @@
            },
          ],
        },
        loading: true,
        placeOption: {
          menu: true,
@@ -608,7 +575,6 @@
              label: "身份证号",
              prop: "idCard",
            },
            {
              labelWidth: 100,
              label: "电话号码",
@@ -622,7 +588,6 @@
                trigger: "blur",
              }, ],
            },
            {
              labelWidth: 100,
              label: "现居住地",
@@ -636,7 +601,6 @@
              prop: "jobNature",
              // hide: true
            },
            {
              label: "从业人员照片",
              prop: "employerImg",
@@ -680,8 +644,6 @@
              type: "datetime",
              format: "yyyy-MM-dd",
              valueFormat: "yyyy-MM-dd",
              // format: "yyyy-MM-dd hh:mm:ss",
              // valueFormat: "yyyy-MM-dd hh:mm:ss",
              rules: [{
                required: false,
                message: "请选择离职时间",
@@ -705,7 +667,6 @@
                }
              ],
            },
          ]
        },
        holdPage: {
@@ -737,7 +698,6 @@
              slot: true,
              overHidden: true,
              rules: [{
                // validator: validatorPhone,
                trigger: "blur",
              }, ],
            },
@@ -759,9 +719,7 @@
        userOption: {
          submitBtn: false,
          emptyBtn: false,
          column: [
            {
          column: [{
              width: 96,
              label: "电话",
              prop: "legalTel",
@@ -787,12 +745,8 @@
                trigger: "blur",
              }, ],
            },
          ],
        },
        standardAddressList: [], //标准地址数据
        standardAddress: "",
        standardAddressSearchKey: ""
@@ -864,6 +818,7 @@
        this.roleBox = true
        this.baseShow = false
        this.restShow = false
        this.schoolShow = false
        this.form = {}
        this.placeForm = {}
@@ -896,10 +851,7 @@
                  .join(",")
              }
              if (
                that.form.placePoiLabelVOList &&
                that.form.placePoiLabelVOList.length
              ) {
              if (that.form.placePoiLabelVOList && that.form.placePoiLabelVOList.length) {
                let lebelTwo = that.form.placePoiLabelVOList.find((item) => {
                  return item.type == 2
                })
@@ -915,9 +867,6 @@
              that.baseShow = true
              const data = restInfo.data.data
              if (data) {
                let imageUrls = data.imageUrls
@@ -947,7 +896,10 @@
                }
              }
              console.log("***********1**********", that.form)
              if (that.form.label === '1601') {
                that.schoolShow = true
              }
              that.restShow = true
            })
          )
@@ -1144,6 +1096,7 @@
        this.$refs.restForm && this.$refs.restForm.resetForm()
        this.baseShow = false
        this.restShow = false
        this.schoolShow = false
        this.roleBox = false
      },
src/views/publicSecurity/keynotePersonnelManageTree.vue
@@ -17,13 +17,13 @@
      </template>
      <template slot-scope="{row, size}" slot="number1">
        <el-button :size="size" type="text" @click="showStringDispose(row, '1033')">
        <el-button :size="size" type="text" @click="showStringDispose(row, '1025')">
          {{ row.number1 }}
        </el-button>
      </template>
      <template slot-scope="{row, size}" slot="number2">
        <el-button :size="size" type="text" @click="showStringDispose(row, '15')">
        <el-button :size="size" type="text" @click="showStringDispose(row, '23')">
          {{ row.number2 }}
        </el-button>
      </template>
@@ -104,14 +104,14 @@
            },
            {
              span: 12,
              label: "孤寡老人",
              label: "取保监居",
              prop: "number1",
              align: 'center',
              searchSpan: 4,
            },
            {
              span: 12,
              label: "留守儿童",
              label: "关注人员",
              prop: "number2",
              align: 'center',
              searchSpan: 4,
@@ -167,7 +167,7 @@
      showStringDispose(row, type) {
        row.labelId = type
        row.parentId = 1032
        row.parentId = 103
        this.userPopup = true
        var that = this
        this.$nextTick(() => {
src/views/publicSecurity/keynotePlaceManage.vue
@@ -12,12 +12,17 @@
        <el-button type="text" :size="size" plain @click.stop="getDetail(row)">
          详情
        </el-button>
        <el-button type="text" :size="size" icon="el-icon-s-check" v-if="permission.place_check"
          :disabled="row.status != 1" plain @click=" goAudit(row)">审 核
        <el-button type="text" :size="size" v-if="permission.place_check" :disabled="row.status != 1" plain
          @click=" goAudit(row)">审 核
        </el-button>
        <!-- <el-button type="text" :size="size" icon="el-icon-delete" v-if="permission.place_del" plain
                    @click="rowDel(row)">删 除
        <!--   <el-button type="text" :size="size" icon="el-icon-view" plain @click="rowDel(row)"> 删除
                </el-button> -->
        <el-button type="text" :size="size" plain @click="rowUpdateLabelColor(row)"> 标签颜色
        </el-button>
      </template>
      <template slot="status" slot-scope="{row, size}">
@@ -47,6 +52,31 @@
    <el-dialog :visible.sync="visible" append-to-body destroy-on-close title="审核" width="30%"
      custom-class="flow-design-dialog" :before-close="handleClose">
      <audit-base @handleSubmit="submitAudit"></audit-base>
    </el-dialog>
    <el-dialog :visible.sync="visibleLabelColor" append-to-body destroy-on-close title="标签颜色" width="600px"
      custom-class="flow-design-dialog" :before-close="handleLabelColorClose">
      <div class="labelColor">
        <div style="width:200px; margin: auto;
">
          <div>
            <el-radio-group v-model="color" @input="changColor">
              <el-radio-button label="green">绿</el-radio-button>
              <el-radio-button label="yellow">黄</el-radio-button>
              <el-radio-button label="red">红</el-radio-button>
            </el-radio-group>
          </div>
          <div style=" width:200px;margin: auto; text-align: center;">
            <el-button style="margin-top: 40px;" @click="saveLabelColor()" type="primary">保存</el-button>
          </div>
        </div>
      </div>
    </el-dialog>
    <el-drawer title="消防自查详情" :visible.sync="isDetail" :append-to-body="true" size="40%" direction="rtl">
@@ -106,7 +136,7 @@
              {{ item.remark }}
            </div>
          </div>
          <div class="yh-pic-box">
          <!--  <div class="yh-pic-box">
            <div class="yh-pic-name">
              整改后图片
            </div>
@@ -123,7 +153,7 @@
            <div class="yh-remark-value">
              {{ item.rectificationRemark }}
            </div>
          </div>
          </div> -->
        </div>
      </div>
    </el-drawer>
@@ -137,6 +167,10 @@
    update,
    add,
  } from "@/api/task/task"
  import {
    updatePoiLabelColor
  } from '@/api/place/place'
  import {
    mapGetters
@@ -184,6 +218,8 @@
      }
      return {
        color: 'green',
        placeId: '',
        isDetail: false,
        refreshNum: 1,
        rowDetail: [],
@@ -198,6 +234,7 @@
          }],
        },
        visible: false,
        visibleLabelColor: false,
        taskType: 0,
        curRow: {},
        roleBox: false,
@@ -217,7 +254,7 @@
          searchLabelWidth: 96,
          searchShow: true,
          searchMenuSpan: 3,
          menuWidth: 200,
          menuWidth: 260,
          // menu: false,
          height: "auto",
          calcHeight: 54,
@@ -251,6 +288,7 @@
              searchSpan: 5,
              searchLabelWidth: 76,
            }, {
              width: 140,
              label: "场所名称",
              prop: "placeName",
              span: 24,
@@ -260,6 +298,7 @@
              align: 'center'
            },
            {
              width: 140,
              label: "场所地址",
              prop: "location",
              span: 24,
@@ -268,7 +307,9 @@
              searchLabelWidth: 46,
              overHidden: true,
              align: 'center'
            }, {
            },
            {
              width: 120,
              label: "场所类别",
              prop: "nineType",
              align: 'center',
@@ -349,6 +390,7 @@
              align: 'center'
            },
            {
              width: 100,
              label: "场所负责人电话",
              prop: "principalPhone",
              span: 24,
@@ -372,14 +414,55 @@
              prop: "status",
              span: 24,
              align: 'center',
              slot: true,
              // slot: true,
              type: "select",
              searchSpan: 4,
              search: true,
              dicData: [{
                  label: "待审核",
                  value: 1
            },
            {
                  label: "已审核",
                  value: 2
                },
                {
                  label: "未通过",
                  value: 3
                },
                {
                  label: "待完成",
                  value: 4
                }
              ],
            },
            {
              label: "标签颜色",
              prop: "color",
              span: 24,
              row: true,
              searchLabelWidth: 46,
              align: 'center',
              dicData: [{
                  label: "绿",
                  value: "green",
                },
                {
                  label: "黄",
                  value: "yellow",
                },
                {
                  label: "红",
                  value: "red",
                },
              ],
            },
            {
              width: 120,
              label: "创建时间",
              prop: "createTime",
              span: 24,
              row: true,
              searchSpan: 4,
              searchLabelWidth: 46,
              align: 'center'
            },
@@ -475,6 +558,26 @@
      }
    },
    methods: {
      changColor(e) {
        console.log("*******************", e)
        this.color = e
      },
      saveLabelColor() {
        updatePoiLabelColor(this.placeId, this.color).then(res => {
          if (res.data) {
            this.visibleLabelColor = false
            this.onLoad(this.page, this.query)
          }
        })
      },
      rowUpdateLabelColor(row) {
        this.visibleLabelColor = true
        this.color = row.color
        this.placeId = row.placeId
      },
      // 点击展开收缩
      flodQL(index) {
        this.rowDetail.qTypeList[index].isShowQList = !this.rowDetail.qTypeList[index].isShowQList
@@ -598,6 +701,11 @@
      // 弹窗关闭回调
      handleClose() {
        this.cancelAudit()
      },
      // 弹窗关闭回调
      handleLabelColorClose() {
        // this.cancelAudit()
        this.visibleLabelColor = false
      },
      // 取消审核
@@ -1049,4 +1157,10 @@
      }
    }
  }
  .labelColor {
    // display: flex;
    // justify-content: center;
    /* 居中对齐 */
  }
</style>
src/views/publicSecurity/keynotePlaceManageTwo.vue
New file
@@ -0,0 +1,1166 @@
<template>
  <basic-container>
    <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" @row-del="rowDel"
      v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave" :before-open="beforeOpen"
      @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
      @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
      <template slot-scope="{row, size}" slot="menu">
        <!-- <el-button type="text" :size="size" icon="el-icon-view" v-if="permission.place_view" plain
                    @click="lookDetail(row, 0)">查 看
                </el-button> -->
        <el-button type="text" :size="size" plain @click.stop="getDetail(row)">
          详情
        </el-button>
        <el-button type="text" :size="size" v-if="permission.place_check" :disabled="row.status != 1" plain
          @click=" goAudit(row)">审 核
        </el-button>
        <!--   <el-button type="text" :size="size" icon="el-icon-view" plain @click="rowDel(row)"> 删除
        </el-button> -->
        <el-button type="text" :size="size" plain @click="rowUpdateLabelColor(row)"> 标签颜色
        </el-button>
      </template>
      <template slot="status" slot-scope="{row, size}">
        <el-tag :size="size" :type="showStatus(row.status).type">
          {{ showStatus(row.status).text }}
        </el-tag>
      </template>
      <template slot-scope="{row, size}" slot="principalPhone">
        <el-button :size="size" type="text" @click="showStringDispose(row, 'principalPhoneflag')"
          v-text="textDispose(row, 'principalPhoneflag', 'principalPhone')">
        </el-button>
      </template>
      <template slot="menuLeft">
        <el-button type="warning" size="small" plain icon="el-icon-download" @click="handleExport">导出
        </el-button>
      </template>
    </avue-crud>
    <el-dialog title="" append-to-body :visible.sync="auditBasePopup" width="60%">
      <campusReporting @colseDetail="colseDetail" v-if="taskType == 6" ref="campusReporting"></campusReporting>
      <hotelReporting @colseDetail="colseDetail" v-if="taskType == 2" ref="hotelReporting"></hotelReporting>
      <labelReporting @colseDetail="colseDetail" v-if="taskType == 3" ref="labelReporting"></labelReporting>
    </el-dialog>
    <el-dialog :visible.sync="visible" append-to-body destroy-on-close title="审核" width="30%"
      custom-class="flow-design-dialog" :before-close="handleClose">
      <audit-base @handleSubmit="submitAudit"></audit-base>
    </el-dialog>
    <el-dialog :visible.sync="visibleLabelColor" append-to-body destroy-on-close title="标签颜色" width="600px"
      custom-class="flow-design-dialog" :before-close="handleLabelColorClose">
      <div class="labelColor">
        <div style="width:200px; margin: auto;
">
          <div>
            <el-radio-group v-model="color" @input="changColor">
              <el-radio-button label="green">绿</el-radio-button>
              <el-radio-button label="yellow">黄</el-radio-button>
              <el-radio-button label="red">红</el-radio-button>
            </el-radio-group>
          </div>
          <div style=" width:200px;margin: auto; text-align: center;">
            <el-button style="margin-top: 40px;" @click="saveLabelColor()" type="primary">保存</el-button>
          </div>
        </div>
      </div>
    </el-dialog>
    <el-drawer title="消防自查详情" :visible.sync="isDetail" :append-to-body="true" size="40%" direction="rtl">
      <div class="title">
        <div class="icon">{{ refreshNum }}</div>
        基础信息
      </div>
      <div class="basic-info" v-loading="drawerLoading">
        <div class="info-item">
          <div class="info-name">场所名称</div>
          <div class="info-value">{{ rowDetail.placeName }}</div>
        </div>
        <div class="info-item">
          <div class="info-name">检查人</div>
          <div class="info-value">{{ rowDetail.name }}</div>
        </div>
        <div class="info-item">
          <div class="info-name">检查时间</div>
          <div class="info-value">{{ rowDetail.createTime }}</div>
        </div>
      </div>
      <div class="title">
        <div class="icon"></div>
        检查记录
      </div>
      <div class="question-list" v-for="(tItem, tIndex) in rowDetail.qTypeList" :key='tIndex' v-loading="drawerLoading">
        <div class="question-type" @click="flodQL(tIndex)">
          <div class="type-name">
            {{ CNNum[tIndex] }}、{{ tItem.questionName }}
          </div>
          <div class="icon-box"><i class="el-icon-arrow-down" v-show="tItem.isShowQList"></i><i class="el-icon-arrow-up"
              v-show="!tItem.isShowQList"></i></div>
        </div>
        <div class="question-item" v-for="(item, index) in tItem.questionList" :key='index' v-show="tItem.isShowQList">
          <div class="question-name">
            <div class="key">{{ index + 1 }}、{{ item.itemsNameTitle }}</div>
            <div class="value"><el-radio v-model="radio" label="1" disabled>存在</el-radio>
              <el-radio v-model="radio" label="2" disabled>不存在</el-radio>
            </div>
          </div>
          <div class="yh-pic-box">
            <div class="yh-pic-name">
              隐患图片
            </div>
            <div class="yh-pic-list">
              <div class="pic-item" v-for="pic in item.imageUrlsList">
                <el-image style="width: 100px; height: 100px" :src="pic" :fit="fit"></el-image>
              </div>
            </div>
          </div>
          <div class="yh-remark">
            <div class="yh-remark-name">
              隐患描述
            </div>
            <div class="yh-remark-value">
              {{ item.remark }}
            </div>
          </div>
          <!--  <div class="yh-pic-box">
            <div class="yh-pic-name">
              整改后图片
            </div>
            <div class="yh-pic-list">
              <div class="pic-item" v-for="pic in item.rectificationImageUrlsList">
                <el-image style="width: 100px; height: 100px" :src="pic" :fit="fit"></el-image>
              </div>
            </div>
          </div>
          <div class="yh-remark">
            <div class="yh-remark-name">
              整改后描述
            </div>
            <div class="yh-remark-value">
              {{ item.rectificationRemark }}
            </div>
          </div> -->
        </div>
      </div>
    </el-drawer>
  </basic-container>
</template>
<script>
  import {
    getTaskPlaceSelfCheckList,
    removeTask,
    update,
    add,
  } from "@/api/task/task"
  import {
    updatePoiLabelColor
  } from '@/api/place/place'
  import {
    mapGetters
  } from "vuex"
  import {
    applyTaskExamine,
    getTaskPlaceSelfCheckInfo
  } from "@/api/publicSecurity/keynoteManage"
  import {
    getPatrolGroupTree,
    getDictBizTree
  } from "@/api/publicSecurity/ninePlaceManage"
  import website from '@/config/website'
  import NProgress from 'nprogress'
  import 'nprogress/nprogress.css'
  import Qs from "qs"
  import {
    exportBlob
  } from "@/api/common"
  import {
    getToken
  } from '@/util/auth'
  import {
    downloadXls
  } from "@/util/util"
  import {
    dateNow
  } from "@/util/date"
  import campusReporting from './components/campusReporting'
  import hotelReporting from './components/hotelReporting'
  import labelReporting from './components/labelReporting'
  export default {
    data() {
      //手机号格式校验
      let validatorPhone = function(rule, value, callback) {
        if (value) {
          if (!/^1[3456789]\d{9}$/.test(value)) {
            callback(new Error('手机号格式有误!'))
          } else {
            callback()
          }
        }
        callback()
      }
      return {
        color: 'green',
        placeId: '',
        isDetail: false,
        refreshNum: 1,
        rowDetail: [],
        auditRules: {
          status: [{
            required: true,
            message: "必填"
          }],
          remark: [{
            required: true,
            message: "必填"
          }],
        },
        visible: false,
        visibleLabelColor: false,
        taskType: 0,
        curRow: {},
        roleBox: false,
        form: {},
        query: {},
        loading: true,
        drawerLoading: false,
        page: {
          pageSize: 10,
          currentPage: 1,
          total: 0,
        },
        selectionList: [],
        option: {
          labelWidth: 120,
          searchLabelWidth: 96,
          searchShow: true,
          searchMenuSpan: 3,
          menuWidth: 260,
          // menu: false,
          height: "auto",
          calcHeight: 54,
          dialogWidth: 950,
          tip: false,
          border: true,
          addBtn: false,
          delBtn: false,
          //stripe:true,
          index: true,
          editBtn: false,
          viewBtn: false,
          // selection: true,
          excelBtn: false,
          refreshBtn: false,
          searchShowBtn: false,
          columnBtn: false,
          dialogClickModal: false,
          column: [{
              label: "自查时间",
              prop: "dateRange",
              type: "daterange",
              format: "yyyy-MM-dd",
              valueFormat: "yyyy-MM-dd",
              searchRange: true,
              startPlaceholder: '开始日期',
              endPlaceholder: '结束日期',
              align: 'center',
              search: true,
              hide: true,
              searchSpan: 5,
              searchLabelWidth: 76,
            }, {
              width: 140,
              label: "场所名称",
              prop: "placeName",
              span: 24,
              row: true,
              searchSpan: 4,
              search: true,
              align: 'center'
            },
            {
              width: 140,
              label: "场所地址",
              prop: "location",
              span: 24,
              row: true,
              searchSpan: 4,
              searchLabelWidth: 46,
              overHidden: true,
              align: 'center'
            },
            {
              width: 120,
              label: "场所类别",
              prop: "nineType",
              align: 'center',
              dicUrl: "/api/blade-system/dict-biz/tree?code=nineType",
              props: {
                label: "title",
                value: "key",
              },
              type: 'select',
              search: true,
              searchSpan: 4,
              searchLabelWidth: 96,
              align: 'center'
            },
            {
              label: "所属街道",
              parent: false,
              search: true,
              searchSpan: 4,
              prop: "streetName",
              type: "tree",
              dicUrl: "/api/blade-system/region/getTownTree",
              props: {
                label: "name",
                value: "name"
              },
              rules: [{
                required: true,
                message: "请选择所属街道",
                trigger: "blur",
              }, ],
            },
            {
              parent: false,
              label: "所属社区",
              prop: "communityName",
              search: true,
              searchSpan: 4,
              width: 150,
              type: "tree",
              dicUrl: "/api/blade-system/region/treeToCommunity",
              props: {
                label: "name",
                value: "name",
              },
              cascader: ["gridCode"],
              rules: [{
                required: true,
                message: "请选择所属社区",
                trigger: "blur",
              }, ],
            },
            {
              label: "所属网格",
              prop: "gridName",
              span: 24,
              row: true,
              searchSpan: 4,
              search: true,
              align: 'center'
            },
            {
              label: "场所隐患",
              prop: "remark",
              span: 24,
              row: true,
              searchSpan: 4,
              align: 'center'
            },
            {
              label: "场所负责人",
              prop: "principal",
              span: 24,
              row: true,
              searchSpan: 4,
              search: true,
              align: 'center'
            },
            {
              width: 100,
              label: "场所负责人电话",
              prop: "principalPhone",
              span: 24,
              row: true,
              slot: true,
              searchSpan: 4,
              align: 'center'
            },
            {
              width: 110,
              label: "签名",
              prop: "signaturePath",
              type: "upload",
              listType: "picture-img",
              span: 24,
              align: 'center'
            },
            {
              width: 110,
              label: "审核状态",
              prop: "status",
              span: 24,
              align: 'center',
              // slot: true,
              type: "select",
              searchSpan: 4,
              search: true,
              dicData: [{
                  label: "待审核",
                  value: 1
                },
                {
                  label: "已审核",
                  value: 2
                },
                {
                  label: "未通过",
                  value: 3
                },
                {
                  label: "待完成",
                  value: 4
                }
              ],
            },
            {
              label: "标签颜色",
              prop: "color",
              span: 24,
              row: true,
              searchLabelWidth: 46,
              align: 'center',
              dicData: [{
                  label: "绿",
                  value: "green",
                },
                {
                  label: "黄",
                  value: "yellow",
                },
                {
                  label: "红",
                  value: "red",
                },
              ],
            },
            {
              width: 120,
              label: "创建时间",
              prop: "createTime",
              span: 24,
              row: true,
              searchLabelWidth: 46,
              align: 'center'
            },
          ],
        },
        data: [],
        auditBasePopup: false,
        questionTypeList: [],
        CNNum: ['一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '十二', '十三', '十四', '十五'],
        nineTypeList: [],
        radio: '1',
      }
    },
    provide() {
      return {
        placeElement: this,
      }
    },
    components: {
      campusReporting,
      hotelReporting,
      labelReporting,
    },
    watch: {},
    created() {
      this.getPatrolGroupTree()
      this.getDictBizTree()
    },
    computed: {
      ...mapGetters(["permission", "userInfo"]),
      permissionList() {
        return {
          addBtn: this.vaildData(this.permission.place_add, false),
          viewBtn: this.vaildData(this.permission.place_view, true),
          delBtn: this.vaildData(this.permission.place_del, true),
          // editBtn: this.vaildData(this.permission.place_edit, true),
        }
      },
      ids() {
        let ids = []
        this.selectionList.forEach((ele) => {
          ids.push(ele.id)
        })
        return ids.join(",")
      },
      showStatus() {
        return (data) => {
          let tags = {}
          if (data == 1) {
            tags = {
              type: 'warning',
              text: '待审核'
            }
          } else if (data == 2) {
            tags = {
              type: 'success',
              text: '已审核'
            }
          } else if (data == 3) {
            tags = {
              type: 'danger',
              text: '未通过'
            }
          } else if (data == 4) {
            tags = {
              type: 'warning',
              text: '待完成'
            }
          }
          return tags
        }
      },
      textDispose() {
        return (row, flag, type) => {
          if (row[flag] || row[type] == null) {
            return row[type]
          } else {
            if (type == 'principalIdCard') {
              return row[type].replace(/^(.{6})(?:\d+)(.{4})$/, "$1******$2")
            } else {
              return row[type].replace(/^(.{3})(?:\d+)(.{4})$/, "$1****$2")
            }
          }
        }
      }
    },
    methods: {
      changColor(e) {
        console.log("*******************", e)
        this.color = e
      },
      saveLabelColor() {
        updatePoiLabelColor(this.placeId, this.color).then(res => {
          if (res.data) {
            this.visibleLabelColor = false
            this.onLoad(this.page, this.query)
          }
        })
      },
      rowUpdateLabelColor(row) {
        this.visibleLabelColor = true
        this.color = row.color
        this.placeId = row.placeId
      },
      // 点击展开收缩
      flodQL(index) {
        this.rowDetail.qTypeList[index].isShowQList = !this.rowDetail.qTypeList[index].isShowQList
        this.refreshNum += 1
      },
      // 对数组按属性分组
      groupBy(arr, key) {
        return arr.reduce((acc, curr) => {
          (acc[curr[key]] = acc[curr[key]] || []).push(curr)
          return acc
        }, {})
      },
      // 九小类型字典接口
      getDictBizTree() {
        getDictBizTree({
          code: 'nineType'
        }).then(res => {
          this.nineTypeList = res.data.data
        })
      },
      // 九小类型转换
      switchNineType(type) {
        return this.nineTypeList.find(item => item.key === type) ? this.nineTypeList.find(item => item.key === type)
          .title : ''
      },
      // 获取问题类型
      getPatrolGroupTree() {
        getPatrolGroupTree({
          type: 1,
          childType: 1
        }).then(res => {
          this.questionTypeList = res.data.data
        })
      },
      getDetail(rowData) {
        this.drawerLoading = true
        this.isDetail = true
        getTaskPlaceSelfCheckInfo({
          taskId: rowData.taskId
        }).then(res => {
          let row = res.data.data
          if (row.taskPlaceRecordVOList) {
            row.taskPlaceRecordVOList.forEach(item => {
              item.imageUrlsList = []
              item.rectificationImageUrlsList = []
              if (item.imageUrls) {
                item.imageUrlsList = item.imageUrls.split(',').map(ele => {
                  return website.minioUrl + ele
                })
              }
              if (item.rectificationImageUrls) {
                item.rectificationImageUrlsList = item.rectificationImageUrls.split(',').map(ele => {
                  return website.minioUrl + ele
                })
              }
              // 查询问题类型
              this.questionTypeList.forEach(qItem => {
                qItem.children.forEach(qChild => {
                  if (qChild.id == item.itemId) {
                    item.qType = qItem.title
                    item.itemsNameTitle = qChild.title
                  }
                })
              })
            })
          }
          if (row.taskPlaceRecordVOList) {
            // 把相同类型问题分组
            let obj = this.groupBy(row.taskPlaceRecordVOList, 'qType')
            let arr = Object.entries(obj)
            let newArr = []
            arr.forEach(part => {
              newArr.push({
                questionName: part[0],
                questionList: part[1],
                isShowQList: true
              })
            })
            row.qTypeList = newArr
          }
          // 九小类型转换
          row.nineTypeName = this.switchNineType(row.nineType)
          this.rowDetail = row
          this.drawerLoading = false
        })
      },
      handleExport() {
        this.$confirm("是否导出消防自查数据?", "提示", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning"
        }).then(() => {
          NProgress.start()
          var data = {
            ...this.query
          }
          // data.isNine = 1
          data = Qs.stringify(data)
          exportBlob(
            `/api/blade-taskPlaceSelfCheck/taskPlaceSelfCheck/export-taskPlaceSelfCheck?${this.website.tokenHeader}=${getToken()}&` +
            data
          ).then(res => {
            console.log('exportBlob', res)
            downloadXls(res.data, `消防自查${dateNow()}.xlsx`)
            NProgress.done()
          })
        })
      },
      showStringDispose(row, type) {
        row[type] = !row[type]
      },
      // 弹窗关闭回调
      handleClose() {
        this.cancelAudit()
      },
      // 弹窗关闭回调
      handleLabelColorClose() {
        // this.cancelAudit()
        this.visibleLabelColor = false
      },
      // 取消审核
      cancelAudit() {
        this.visible = false
      },
      // 确认提交审核
      submitAudit(form) {
        let auditForm = {
          status: form.status == '1' ? '2' : '3',
          remark: form.confirmNotion,
          reportType: 2
        }
        applyTaskExamine(Object.assign(this.auditParams, auditForm)).then(res => {
          if (res.data.code == 200) {
            this.$message.warning("审核成功")
            this.onLoad(this.page)
            this.cancelAudit()
          }
        })
      },
      // 审核按钮
      goAudit(row) {
        this.auditParams = {
          id: row.taskId,
          reportType: row.reportType
        }
        this.visible = true
      },
      colseDetail() {
        this.auditBasePopup = false
        this.onLoad(this.page)
      },
      lookDetail(row, applyType) {
        this.auditBasePopup = true
        var that = this
        if (row.reportType == 6) {
          this.taskType = 6
          this.$nextTick(() => {
            that.$refs.campusReporting.init(row, applyType)
          })
        }
        if (row.reportType == 2) {
          this.taskType = 2
          this.$nextTick(() => {
            that.$refs.hotelReporting.init(row, applyType)
          })
        }
        if (row.reportType == 3 || row.reportType == 4 || row.reportType == 5) {
          this.taskType = 3
          this.$nextTick(() => {
            that.$refs.labelReporting.init(row, applyType)
          })
        }
      },
      auditCur(row) {
        this.curAuditRow = row
        this.auditBasePopup = true
      },
      roleBoxClose() {
        this.curRow = {}
      },
      ManageTenants(item) {
        this.curRow = item
        this.roleBox = true
      },
      rowSave(row, done, loading) {
        if (row.imageUrls && row.imageUrls.length > 0) {
          var urls = []
          var split = row.imageUrls.split(",").filter(item => item != '')
          split.forEach(url => {
            var names = url.split("jczz/")
            urls.push(names[1])
          })
          row.imageUrls = urls.join(",")
        }
        let label = row.label
        if (row.smallLabel != '') {
          label = label + ',' + row.smallLabel
        }
        delete row.smallLabel
        add({
          ...row,
          label
        }).then(
          () => {
            this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!",
            })
            done()
          },
          (error) => {
            window.console.log(error)
            loading()
          }
        )
      },
      rowUpdate(row, index, done, loading) {
        if (row.imageUrls.length > 0) {
          var urls = []
          var split = row.imageUrls.split(",").filter(item => item != '')
          split.forEach(url => {
            var names = url.split("jczz/")
            urls.push(names[1])
          })
          row.imageUrls = urls.join(",")
        }
        let label = row.label
        if (row.smallLabel != '') {
          label = label + ',' + row.smallLabel
        }
        delete row.smallLabel
        update({
          ...row,
          label
        }).then(
          () => {
            this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!",
            })
            done()
          },
          (error) => {
            window.console.log(error)
            loading()
          }
        )
      },
      rowDel(row) {
        this.$confirm("确定将选择数据删除?", {
            confirmButtonText: "确定",
            cancelButtonText: "取消",
            type: "warning",
          })
          .then(() => {
            row.isDeleted = 1
            return removeTask(row)
          })
          .then(() => {
            this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!",
            })
          })
      },
      searchReset() {
        this.query = {}
        this.page.currentPage = 1
        this.onLoad(this.page)
      },
      searchChange(params, done) {
        this.query = params
        this.page.currentPage = 1
        let dateRange = params.dateRange
        if (params.dateRange) {
          params.startTime = dateRange[0]
          params.endTime = dateRange[1]
          delete params.dateRange
        }
        this.onLoad(this.page, params)
        done()
      },
      selectionChange(list) {
        this.selectionList = list
      },
      selectionClear() {
        this.selectionList = []
        this.$nextTick(() => {
          this.$refs.crud && this.$refs.crud.toggleSelection()
        })
      },
      handleDelete() {
        if (this.selectionList.length === 0) {
          this.$message.warning("请选择至少一条数据")
          return
        }
        this.$confirm("确定将选择数据删除?", {
            confirmButtonText: "确定",
            cancelButtonText: "取消",
            type: "warning",
          })
          .then(() => {
            return remove(this.ids)
          })
          .then(() => {
            this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!",
            })
            this.$refs.crud.toggleSelection()
          })
      },
      beforeOpen(done, type) {
        if (["edit", "view"].includes(type)) {} else {
          done()
        }
      },
      currentChange(currentPage) {
        this.page.currentPage = currentPage
        this.onLoad(this.page, this.query)
      },
      sizeChange(pageSize) {
        this.page.pageSize = pageSize
        this.onLoad(this.page, this.query)
      },
      refreshChange() {
        this.page.currentPage = 1
        this.onLoad(this.page, this.query)
      },
      onLoad(page, params = {}) {
        const {} = this.query
        let values = {
          ...params,
        }
        values.type = 1
        this.loading = true
        getTaskPlaceSelfCheckList(page.currentPage, page.pageSize, values).then((res) => {
          const data = {
            ...res.data.data,
            records: res.data.data.records.map(item => {
              return {
                ...item,
                'createTime': item.createTime.slice(0, 16),
                'principalPhoneflag': false,
              }
            })
          }
          data.records.forEach(item => {
            if (item.signaturePath && item.signaturePath.length > 0) {
              var urls = []
              var names = item.signaturePath.split(",")
              names.forEach(name => {
                urls.push(website.minioUrl + name)
              })
              item.signaturePath = urls.join(",")
            }
          })
          this.page.total = data.total
          this.data = data.records
          this.loading = false
          this.selectionClear()
        })
      }
    }
  }
</script>
<style lang="scss" scoped>
  :deep(.cur-container-box) {
    padding: 0;
  }
  :deep(.el-button--text) {
    border: 0;
    background: transparent !important;
  }
  :deep(.el-radio__input.is-disabled+span.el-radio__label) {
    color: #000;
  }
  :deep(.el-radio__input.is-checked+.el-radio__label) {
    color: #409EFF !important;
  }
  :deep(.el-radio__input.is-checked .el-radio__inner::after) {
    background-color: #FFF;
  }
  :deep(.el-radio__input.is-checked .el-radio__inner) {
    background-color: #409EFF;
  }
  :deep(.avue-crud__img) {
    height: 30px !important;
  }
  :deep(.el-radio) {
    margin-right: 20px;
  }
  .avue-upload__icon {
    line-height: 6;
  }
  .cur-container-box {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    overflow: hidden;
    .content-box {
      margin: 0 4px;
      padding: 0 16px;
      height: 0;
      flex: 1;
      overflow: hidden;
      overflow-y: auto;
    }
    .footer-btn-box {
      margin-top: 10px;
      display: flex;
      justify-content: center;
    }
  }
  .title {
    margin: 10px;
    height: 40px;
    background-color: #eee;
    display: flex;
    align-items: center;
    .icon {
      width: 4px;
      height: 18px;
      background-color: #409dfe;
      margin: 0 10px;
      color: transparent;
    }
  }
  .basic-info {
    padding: 0 20px;
    font-size: 14px;
    .info-item {
      display: flex;
      padding: 10px;
      .info-name {
        width: 100px;
        display: flex;
        align-items: center;
      }
      .info-value {
        display: flex;
        align-items: center;
      }
    }
  }
  .question-list {
    padding: 0 20px;
    font-size: 14px;
    .question-type {
      height: 60px;
      display: flex;
      align-items: center;
      cursor: pointer;
      justify-content: space-between;
      padding-right: 20px;
      .type-name {}
      .icon-box {}
    }
    .question-item {
      margin-bottom: 20px;
      padding: 10px;
      background: #f5f7fa;
      border-radius: 8px;
      &>div {
        margin: 14px 0;
      }
      .question-name {
        display: flex;
        .key {
          width: 80%;
          padding-right: 20px;
          word-break: break-all;
        }
        .value {
          width: 20%;
          display: flex;
          align-items: center;
          justify-content: center;
        }
      }
      .yh-pic-box {
        display: flex;
        height: 100px;
        .yh-pic-name {
          width: 100px;
          display: flex;
          align-items: center;
          justify-content: left;
        }
        .yh-pic-list {
          width: 0;
          flex: 1;
          display: flex;
        }
      }
      .yh-remark {
        display: flex;
        .yh-remark-name {
          width: 100px;
          display: flex;
          align-items: center;
          justify-content: left;
        }
        .yh-remark-value {
          word-break: break-all;
        }
      }
    }
  }
  .labelColor {
    // display: flex;
    // justify-content: center;
    /* 居中对齐 */
  }
</style>
src/views/resource/distapch.vue
@@ -1,10 +1,9 @@
<template>
    <basic-container>
        <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" :permission="permissionList"
            v-model="form" ref="crud" @row-update="rowUpdate" @row-save="rowSave" @row-del="rowDel"
            :before-open="beforeOpen" @search-change="searchChange" @search-reset="searchReset"
            @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
            @refresh-change="refreshChange" @on-load="onLoad">
      v-model="form" ref="crud" @row-update="rowUpdate" @row-save="rowSave" @row-del="rowDel" :before-open="beforeOpen"
      @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
      @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
            <template slot="menuLeft">
                <el-button type="danger" size="small" icon="el-icon-delete" plain v-if="permission.job_del"
                    @click="handleDelete">删 除
@@ -12,11 +11,11 @@
            </template>
            <template slot-scope="{ row, size, index }" slot="menu">
                <el-button :size="size" type="text" icon="el-icon-video-pause" v-if="permission.job_enable && row.triggerStatus==1"
                    @click="handleEnable(row,0)">停止
        <el-button :size="size" type="text" icon="el-icon-video-pause"
          v-if="permission.job_enable && row.triggerStatus==1" @click="handleEnable(row,0)">停止
                </el-button>
                <el-button :size="size" type="text" icon="el-icon-video-play" v-if="permission.job_enable && row.triggerStatus==0"
                    @click.stop="handleEnable(row,1)">启用
        <el-button :size="size" type="text" icon="el-icon-video-play"
          v-if="permission.job_enable && row.triggerStatus==0" @click.stop="handleEnable(row,1)">启用
                </el-button>
            </template>
@@ -56,8 +55,17 @@
</template>
<script>
import { getList, add, update, remove, start,stop } from "@/api/xxljob/xxljob"
import { mapGetters } from "vuex"
  import {
    getList,
    add,
    update,
    remove,
    start,
    stop
  } from "@/api/xxljob/xxljob"
  import {
    mapGetters
  } from "vuex"
import func from "@/util/func"
import vueCron from 'vue-cron'
export default {
@@ -94,8 +102,7 @@
                dialogClickModal: false,
                dialogDirection: 'rtl',
                dialogType: 'dialog',
                column: [
                {
          column: [{
                        label: "任务描述",
                        searchLabelWidth: 76,
                        prop: "jobDesc",
@@ -179,8 +186,7 @@
                        addDisplay:false,
                        editDisplay:false,
                        dataType:"number",
                        dicData:[
                            {
              dicData: [{
                                label:"运行",
                                value: 1
                            },
@@ -337,7 +343,7 @@
        rowSave (row, done, loading) {
            row['jobGroup'] = 1;
            row['glueType'] = 'bean';
        row['glueType'] = 'BEAN';
            row['scheduleType'] = 'CRON';
            row['executorParam'] = '';
            row['executorRouteStrategy'] = 'FIRST';
src/views/task/customTask/index.vue
@@ -7,6 +7,7 @@
      @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
      <template slot-scope="{row, size}" slot="menu">
        <el-button size="small" type="text" icon="el-icon-edit" plain @click="handleEdit(row)">编辑
        </el-button>
@@ -19,39 +20,18 @@
        </el-button>
      </template>
      <!--   <template slot="menu" slot-scope="{row, size, index}">
        <el-button size="small" type="text" icon="el-icon-share" plain @click="share(row)">分享
        </el-button>
      </template> -->
      <!--   <template slot-scope="{row, size}" slot="phone">
        <el-button :size="size" type="text" @click="showStringDispose(row, 'phoneflag')"
          v-text="textDispose(row, 'phoneflag', 'phone')">
        </el-button>
      </template> -->
      <!-- <template slot-scope="{type, disabled}" slot="sceneGeoForm">
        <el-button type="primary" style="font-size: 14px;  border: none;" icon="el-icon-map-location"
          @click="openMap()">获取位置</el-button>
        <avue-input-map style="position: fixed; top: -11111111111111px;" ref="avueInputMap" :params="form.params"
          placeholder="请选择地图" v-model="form.sceneGeo"></avue-input-map>
      </template> -->
    </avue-crud>
    <el-dialog title="编辑" append-to-body :visible.sync="editPopup" center @close="editClose">
      <avue-form ref="formRef" :option="option" v-model="editForm" @submit="handleSubmit">
        <template slot-scope="{type, disabled}" slot="sceneGeo">
        <!-- <template slot-scope="{type, disabled}" slot="sceneGeo">
          <el-button type="primary" style="font-size: 14px;  border: none;" icon="el-icon-map-location"
            @click="openMapTwo()">获取位置</el-button>
          <avue-input-map style="position: fixed; top: -11111111111111px;" ref="avueInputMapTwo"
            :params="editForm.params" placeholder="请选择地图" v-model="editForm.sceneGeo"></avue-input-map>
        </template>
        </template> -->
      </avue-form>
@@ -137,14 +117,24 @@
          selection: true,
          dialogClickModal: false,
          column: [{
              span: 12,
              searchSpan: 4,
              label: "任务名称",
              prop: "name",
              search: true,
              rules: [{
                required: true,
                message: "请输入任务名称",
                trigger: "blur",
              }, ],
            },
            {
              searchSpan: 4,
              label: "任务类型",
              prop: "taskType",
              type: "select",
              value: "1",
              search: true,
              dicData: [{
                label: "走访任务",
                value: "0"
@@ -152,20 +142,107 @@
                label: "自查任务",
                value: "1"
              }],
            }, {
            },
            // {
            //   label: "所属街道",
            //   parent: false,
            //   search: true,
            //   searchSpan: 4,
            //   prop: "townStreetName",
            //   type: "tree",
            //   dicUrl: "/api/blade-system/region/getTownTree",
            //   props: {
            //     label: "name",
            //     value: "name"
            //   },
            //   rules: [{
            //     required: true,
            //     message: "请选择所属街道",
            //     trigger: "blur",
            //   }, ],
            // },
            {
              hide: true,
              // parent: false,
              label: "任务范围",
              prop: "taskRange",
              search: false,
              type: "tree",
              dicUrl: "/api/blade-system/region/treeToCommunity",
              props: {
                label: "name",
                value: "id",
              },
              cascader: ["gridCode"],
              // rules: [{
              //   required: true,
              //   message: "请选择所属社区",
              //   trigger: "blur",
              // }, ],
            },
            {
              label: "人员标签",
              prop: "labelId",
              type: "tree",
              parent: false,
              dicUrl: "/api/blade-label/label/getLabelList?parentId=1000",
              display: false,
              props: {
                label: "name",
                value: "id",
              },
            }, {
              rules: [{
                required: true,
                message: "请选择人员标签",
                trigger: "blur",
              }, ],
            },
            {
              span: 7,
              display: false,
              label: "场所标签",
              prop: "placeLabel",
              labelWidth: 120,
              type: "select",
              dicUrl: "/api/blade-category/category/getCategory?level=2",
              cascader: ["placeSmallLabel"],
              props: {
                label: "categoryName",
                value: "categoryNo",
              },
              dataType: "string",
              // hide: true,
              // rules: [{
              //   required: true,
              //   message: "请选择场所标签",
              //   trigger: "blur",
              // }, ],
            },
            {
              span: 5,
              display: false,
              label: "",
              labelWidth: 20,
              prop: "placeSmallLabel",
              type: "select",
              dicUrl: "/api/blade-category/category/getCategory?parentNo={{placeLabel}}",
              props: {
                label: "categoryName",
                value: "categoryNo",
              },
              rules: [{
                required: true,
                message: "请选择场所标签",
                trigger: "blur",
              }, ],
              dataType: "string",
              hide: true,
            },
            {
              label: "标签颜色",
              prop: "labelColor",
              type: "select",
              display: true,
              value: "green",
              dicData: [{
                  label: "绿",
@@ -180,6 +257,11 @@
                  value: "red",
                },
              ],
              rules: [{
                required: true,
                message: "请选择标签颜色",
                trigger: "blur",
              }, ],
            }, {
              label: "任务计划",
              prop: "cron",
@@ -189,41 +271,15 @@
                label: "title",
                value: "remark",
              },
            }, {
              span: 7,
              label: "场所标签",
              prop: "placeLabel",
              labelWidth: 120,
              type: "select",
              dicUrl: "/api/blade-category/category/getCategory?level=2",
              cascader: ["placeSmallLabel"],
              props: {
                label: "categoryName",
                value: "categoryNo",
              },
              dataType: "string",
              hide: true,
              rules: [{
                required: true,
                message: "请输入场所标签",
                message: "请选择任务计划",
                trigger: "blur",
              }, ],
            },
            {
              span: 5,
              label: "",
              labelWidth: 20,
              prop: "placeSmallLabel",
              type: "select",
              dicUrl: "/api/blade-category/category/getCategory?parentNo={{placeLabel}}",
              props: {
                label: "categoryName",
                value: "categoryNo",
              },
              dataType: "string",
              hide: true,
            }, {
              label: "九小类型",
              display: false,
              prop: "nineType",
              searchSpan: 4,
              dataType: "number",
@@ -235,26 +291,34 @@
                label: "title",
                value: "key",
              },
              search: true,
              // rules: [{
              //   required: true,
              //   message: "请选择九小类型",
              //   trigger: "blur",
              // }, ],
              searchLabelWidth: 46,
            },
            {
              label: "状态",
              prop: "taskStatus",
              type: "select",
              value: "1",
              value: 1,
              dicData: [{
                  label: "停止",
                  value: "1",
                  value: 1,
                },
                {
                  label: "启用",
                  value: "2",
                  value: 2,
                }
              ],
            }, {
              addDisplay: false,
            },
            {
              label: "创建时间",
              prop: "createTime",
              addDisplay: false,
              editDisplay: false,
            },
          ],
        },
@@ -263,44 +327,67 @@
      }
    },
    watch: {
      "form.sceneGeo": {
      "form.taskType": {
        // form是表单或者表格绑定的数据集,v-model='form'
        handler(val) {
          if (typeof val == "object") {
            console.log("*****11**********" + val)
            console.log("*****789111**********" + !val)
            if (val.length <= 0) {
              return
            }
            console.log("*****789**********" + val)
            var arr = val
            //经纬度替换
            this.form.sceneGeoLat = arr[1]
            this.form.sceneGeoLng = arr[0]
            this.form.location = arr[2]
        handler(newData) {
          console.log("*******************", newData)
          const column = this.findObject(this.option.column, "placeLabel")
          const column2 = this.findObject(this.option.column, "placeSmallLabel")
          const column3 = this.findObject(this.option.column, "labelId")
          const column5 = this.findObject(this.option.column, "nineType")
          if (newData == 1) {
            column.display = true
            column5.display = true
            column2.display = true
            column3.display = false
          } else {
            column.display = false
            column5.display = false
            column2.display = false
            column3.display = true
          }
        },
      },
      "editForm.sceneGeo": {
      "editForm.taskType": {
        // form是表单或者表格绑定的数据集,v-model='form'
        handler(val) {
          if (typeof val == "object") {
            if (val.length <= 0) {
              return
        handler(newData) {
          console.log("*******************", newData)
          const column = this.findObject(this.option.column, "placeLabel")
          const column2 = this.findObject(this.option.column, "placeSmallLabel")
          const column3 = this.findObject(this.option.column, "labelId")
          const column5 = this.findObject(this.option.column, "nineType")
          if (newData == 1) {
            column.display = true
            column5.display = true
            column2.display = true
            column3.display = false
          } else {
            column.display = false
            column5.display = false
            column2.display = false
            column3.display = true
            }
            console.log("*****789**********" + val)
            console.log("*****78910**********" + !val)
        },
      },
            var arr = val
            //经纬度替换
            this.editForm.sceneGeoLat = arr[1]
            this.editForm.sceneGeoLng = arr[0]
            this.editForm.location = arr[2]
          }
        },
      },
      // "editForm.sceneGeo": {
      //   // form是表单或者表格绑定的数据集,v-model='form'
      //   handler(val) {
      //     if (typeof val == "object") {
      //       if (val.length <= 0) {
      //         return
      //       }
      //       console.log("*****789**********" + val)
      //       console.log("*****78910**********" + !val)
      //       var arr = val
      //       //经纬度替换
      //       this.editForm.sceneGeoLat = arr[1]
      //       this.editForm.sceneGeoLng = arr[0]
      //       this.editForm.location = arr[2]
      //     }
      //   },
      // },
    },
    computed: {
@@ -544,6 +631,7 @@
      beforeOpen(done, type) {
        if (["edit", "view"].includes(type)) {
          getDetail(this.form.id).then((res) => {
            console.log("********************", res.data)
            this.form = res.data.data
          })
        }