linwe
2024-08-09 5e2aafeede13d337380f736567caf74f49713be7
src/views/backblask/BackblastWarnHanRec.vue
@@ -62,15 +62,15 @@
          height: "auto",
          calcHeight: 54,
          dialogWidth: 950,
          menuWidth: 100,
          menuWidth: 220,
          tip: false,
          searchShow: true,
          searchMenuSpan: 3,
          // menu: false,
          border: true,
          index: true,
          editBtn: false,
          delBtn: false,
          editBtn: true,
          delBtn: true,
          addBtn: false,
          viewBtn: true,
          refreshBtn: false,
@@ -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",
@@ -163,16 +153,38 @@
              labelWidth: 120,
              width: 156,
              searchPlaceholder: '请输入地区'
            }, {
            },
            // {
            //   label: "辖区派出所",
            //   prop: "pcsName",
            //   align: 'center',
            //   search: true,
            //   searchSpan: 4,
            //   labelWidth: 120,
            //   searchLabelWidth: 96,
            //   searchPlaceholder: '请输入辖区派出所'
            // },
            {
              searchLabelWidth: 90,
              labelWidth: 120,
              label: "辖区派出所",
              prop: "pcsName",
              align: 'center',
              search: true,
              searchSpan: 4,
              labelWidth: 120,
              searchLabelWidth: 96,
              searchPlaceholder: '请输入辖区派出所'
            }, {
              // parent: false,
              prop: "pcsName",
              type: "tree",
              dicUrl: "/api/blade-system/dept/treeByDept?deptId=1727974759086493697",
              props: {
                label: "title",
                value: "title"
              },
              rules: [{
                required: true,
                message: "请选择辖区派出所",
                trigger: "blur",
              }, ],
            },
            {
              label: "宣防单位",
              prop: "deptName",
              align: 'center',
@@ -181,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: []
@@ -258,13 +282,13 @@
          row.imageUrls = urls.join(",")
        }
        let label = row.label
        // let label = row.label
        if (row.smallLabel != '') {
          label = label + ',' + row.smallLabel
        }
        // if (row.smallLabel != '') {
        //   label = label + ',' + row.smallLabel
        // }
        delete row.smallLabel
        // delete row.smallLabel
        add({
          ...row,
@@ -286,28 +310,25 @@
      },
      rowUpdate(row, index, done, loading) {
        if (row.imageUrls.length > 0) {
        if (row.sceUrls.length > 0) {
          var urls = []
          var split = row.imageUrls.split(",").filter(item => item != '')
          var split = row.sceUrls.split(",").filter(item => item != '')
          split.forEach(url => {
            var names = url.split("jczz/")
            urls.push(names[1])
          })
          row.imageUrls = urls.join(",")
          row.sceUrls = urls.join(",")
        }
        let label = row.label
        // let label = row.label
        if (row.smallLabel != '') {
          label = label + ',' + row.smallLabel
        }
        // if (row.smallLabel != '') {
        //   label = label + ',' + row.smallLabel
        // }
        delete row.smallLabel
        // delete row.smallLabel
        update({
          ...row,
          label
        }).then(
        update(row).then(
          () => {
            this.onLoad(this.page)
            this.$message({
@@ -331,7 +352,7 @@
          })
          .then(() => {
            row.isDeleted = 1
            return removeTask(row)
            return update(row)
          })
          .then(() => {
            this.onLoad(this.page)