lin
2024-04-11 aec6c2f5b7af18dc7d33997b29e146e0a06b1105
维修基金优化
16 files modified
13702 ■■■■ changed files
src/views/gzll/process/maintenanceFundApply/detail.vue 194 ●●●● patch | view | raw | blame | history
src/views/gzll/process/maintenanceFundApply/form.vue 9 ●●●●● patch | view | raw | blame | history
src/views/gzll/process/maintenanceFundApply/handle.vue 877 ●●●● patch | view | raw | blame | history
src/views/patrolList/patrolRecord.vue 694 ●●●● patch | view | raw | blame | history
src/views/place/components/baseAllInfo.vue 2132 ●●●● patch | view | raw | blame | history
src/views/property/process/maintenanceFundApply/detail.vue 734 ●●●● patch | view | raw | blame | history
src/views/property/process/maintenanceFundApply/edit.vue 880 ●●●● patch | view | raw | blame | history
src/views/property/process/maintenanceFundApply/form.vue 9 ●●●●● patch | view | raw | blame | history
src/views/property/process/maintenanceFundApply/handle.vue 881 ●●●● patch | view | raw | blame | history
src/views/property/propertyCapitalApply.vue 1858 ●●●● patch | view | raw | blame | history
src/views/propertySupervision/process/maintenanceFundApply/detail.vue 734 ●●●● patch | view | raw | blame | history
src/views/propertySupervision/process/maintenanceFundApply/form.vue 9 ●●●●● patch | view | raw | blame | history
src/views/propertySupervision/process/maintenanceFundApply/handle.vue 10 ●●●● patch | view | raw | blame | history
src/views/publicSecurity/keynotePlaceManage.vue 1777 ●●●● patch | view | raw | blame | history
src/views/publicSecurity/ninePlaceManage/patrolRecord.vue 1316 ●●●● patch | view | raw | blame | history
src/views/publicSecurity/ninePlaceManage/situationRectification.vue 1588 ●●●● patch | view | raw | blame | history
src/views/gzll/process/maintenanceFundApply/detail.vue
@@ -11,7 +11,7 @@
          <span>审批信息</span>
        </div>
        <avue-form :option="option" :value="form">
          <template slot-scope="{ row, size, index }" slot="vote">
            <div>{{ topicTitle }}</div>
            <el-table :data="topictData" v-if="topictData.length">
@@ -27,7 +27,7 @@
              </el-table-column>
            </el-table>
          </template>
        </avue-form>
        <!-- <el-form-item label="申请人">
          <el-input :disabled="true" v-model="form.flow.assigneeName" />
@@ -92,13 +92,13 @@
    getPropertyCapitalApply
  } from "@/api/property/propertyCapitalApply";
  import {
  getLists
} from "@/api/discuss/topics"
import deitDiscussion from "../../components/deitDiscussion.vue"
export default {
  components: {
    deitDiscussion
  },
    getLists
  } from "@/api/discuss/topics"
  import deitDiscussion from "../../components/deitDiscussion.vue"
  export default {
    components: {
      deitDiscussion
    },
    data() {
      return {
        businessId: '',
@@ -198,10 +198,10 @@
              disabled: true
            },
            {
              label: "项目分摊方式",
              prop: "allocationWay",
              label: "楼栋",
              prop: "buildingName",
              labelWidth: 140,
              value: '按建筑面积分摊',
              value: '',
              span: 12,
              row: true,
              disabled: true
@@ -278,52 +278,52 @@
            },
            {
          disabled:true,
          display: false,
          hide: true,
          parent: false,
          label: "投票结果",
          prop: "articleId",
          search: false,
          viewDisabled: false,
          type: 'select',
          dicUrl: `/api/blade-article/article/getArticleByDistrictId?type=4&eventType=1&districtId={{districtId}}`,
          cascader: ['vote'],
          props: {
            label: "title",
            value: "id"
          },
          defaultExpandedKeys: ["361102003"],
          span: 12,
          labelWidth:140,
          rules: [{
            required: true,
            message: "请选择投票结果",
            trigger: "blur",
          },],
          change: (val) => {
            console.log("val===>", val)
            // console.log("form===>",this.form)
            if (val.value && !this.form.id) {
              this.articleRange = val.articleRange;
              // this.showDialog = true;
              // this.getDetail(val.value, val.articleRange)
            }
              disabled: true,
              display: false,
              hide: true,
              parent: false,
              label: "投票结果",
              prop: "articleId",
              search: false,
              viewDisabled: false,
              type: 'select',
              dicUrl: `/api/blade-article/article/getArticleByDistrictId?type=4&eventType=1&districtId={{districtId}}`,
              cascader: ['vote'],
              props: {
                label: "title",
                value: "id"
              },
              defaultExpandedKeys: ["361102003"],
              span: 12,
              labelWidth: 140,
              rules: [{
                required: true,
                message: "请选择投票结果",
                trigger: "blur",
              }, ],
              change: (val) => {
                console.log("val===>", val)
                // console.log("form===>",this.form)
                if (val.value && !this.form.id) {
                  this.articleRange = val.articleRange;
                  // this.showDialog = true;
                  // this.getDetail(val.value, val.articleRange)
                }
          }
        },
              }
            },
        {
          disabled: true,
          display: false,
          span: 24,
          hide: true,
          prop: "vote",
          slot: true,
          label: "投票详情",
          labelWidth: 140,
            {
              disabled: true,
              display: false,
              span: 24,
              hide: true,
              prop: "vote",
              slot: true,
              label: "投票详情",
              labelWidth: 140,
        },
            },
            {
              label: "项目摘要",
@@ -368,38 +368,38 @@
          ],
        },
        topictData: [],
      topicTitle: "",
      articleRange: ""
        topicTitle: "",
        articleRange: ""
      }
    },
    watch: {
    'form.districtId': {
      handler(newData) {
        const column = this.findObject(this.option.column, "articleId")
        if (newData && this.form.articleId) {
          column.display = true;
        } else {
          column.display = false
      'form.districtId': {
        handler(newData) {
          const column = this.findObject(this.option.column, "articleId")
          if (newData && this.form.articleId) {
            column.display = true;
          } else {
            column.display = false
          }
        }
      }
    },
      },
    'form.articleId': {
      handler(newData) {
        this.getVoteDetail(this.form.articleId, this.articleRange)
        const column = this.findObject(this.option.column, "vote")
        if (newData) {
          column.display = true;
        } else {
          column.display = false
      'form.articleId': {
        handler(newData) {
          this.getVoteDetail(this.form.articleId, this.articleRange)
          const column = this.findObject(this.option.column, "vote")
          if (newData) {
            column.display = true;
          } else {
            column.display = false
          }
        }
      }
    },
      },
  },
    },
    created() {
      this.init();
@@ -428,32 +428,30 @@
        });
      },
      getVoteDetail(articleId, districtId) {
      let params = {
        level: 1,
        articleId: articleId,
        districtId: districtId
      }
      getLists(1, 10, params).then(res => {
        const data = res.data.data
        if (data.length) {
          this.topictData = data[0].children;
          this.topicTitle = data[0].discussContent;
        let params = {
          level: 1,
          articleId: articleId,
          districtId: districtId
        }
      })
    },
        getLists(1, 10, params).then(res => {
          const data = res.data.data
          if (data.length) {
            this.topictData = data[0].children;
            this.topicTitle = data[0].discussContent;
          }
        })
      },
    openUserPopup(row) {
      this.$refs.DeitDiscussion.openUser(row, 1, [this.form.districtId])
    },
      openUserPopup(row) {
        this.$refs.DeitDiscussion.openUser(row, 1, [this.form.districtId])
      },
    }
  }
</script>
<style>
.workOrderStyle {
  font-weight: normal;
}
</style>
  .workOrderStyle {
    font-weight: normal;
  }
</style>
src/views/gzll/process/maintenanceFundApply/form.vue
@@ -100,12 +100,13 @@
              }, ],
            },
            {
              label: "项目分摊方式",
              prop: "allocationWay",
              label: "楼栋",
              prop: "buildingName",
              labelWidth: 140,
              value: '按建筑面积分摊',
              value: '',
              span: 12,
              row: true,
              disabled: true
            },
            {
              label: '联系人',
@@ -264,4 +265,4 @@
      }
    }
  }
</script>
</script>
src/views/gzll/process/maintenanceFundApply/handle.vue
@@ -74,475 +74,476 @@
    </div>
    <deitDiscussion ref="DeitDiscussion">
  </deitDiscussion>
    </deitDiscussion>
  </basic-container>
</template>
<script>
import {
  historyFlowList,
  leaveDetail
} from "@/api/work/process"
  import {
    historyFlowList,
    leaveDetail
  } from "@/api/work/process"
import {
  getList,
  remove,
  update,
  add,
  getPropertyCapitalApply
} from "@/api/property/propertyCapitalApply"
import {
  completeTask
} from "@/api/work/work"
import website from '@/config/website'
import {
  getLists,
} from "@/api/discuss/topics"
  import {
    getList,
    remove,
    update,
    add,
    getPropertyCapitalApply
  } from "@/api/property/propertyCapitalApply"
  import {
    completeTask
  } from "@/api/work/work"
  import website from '@/config/website'
  import {
    getLists,
  } from "@/api/discuss/topics"
import deitDiscussion from "../../components/deitDiscussion"
  import deitDiscussion from "../../components/deitDiscussion"
export default {
  components: {
    deitDiscussion
  },
  data() {
    return {
      taskId: '',
      businessId: '',
      processInstanceId: '',
      src: '',
      flowList: [],
      form: {
        flow: {
          assigneeName: '',
        },
        startTime: '',
        endTime: '',
        reason: '',
      },
      option: {
        height: "auto",
        calcHeight: 54,
        dialogWidth: 1150,
        tip: false,
        searchShow: true,
        searchMenuSpan: 3,
        menuWidth: 350,
        border: true,
        //stripe:true,
        submitBtn: false,
        emptyBtn: false,
        index: true,
        viewBtn: true,
        selection: true,
        dialogClickModal: false,
        column: [{
          label: "小区",
          prop: "districtId",
          searchSpan: 5,
          search: true,
          type: 'tree',
          dicUrl: `/api/blade-district/district/getDistrictTree`,
          props: {
            label: "name",
            value: "id"
  export default {
    components: {
      deitDiscussion
    },
    data() {
      return {
        taskId: '',
        businessId: '',
        processInstanceId: '',
        src: '',
        flowList: [],
        form: {
          flow: {
            assigneeName: '',
          },
          defaultExpandedKeys: ["361102003"],
          span: 12,
          labelWidth: 120,
          width: 220,
          overHidden: true,
          rules: [{
            required: true,
            message: "请选择小区",
            trigger: "blur",
          },],
          disabled: true
          startTime: '',
          endTime: '',
          reason: '',
        },
        {
          label: '维修项目名称',
          prop: 'name',
          searchLabelWidth: 120,
          searchSpan: 5,
          search: true,
          span: 12,
          labelWidth: 140,
          rules: [{
            required: true,
            message: "请输入维修项目名称",
            trigger: "blur",
          },],
          disabled: true
        },
        {
          label: "预计开工时间",
          prop: "runTime",
          span: 12,
          labelWidth: 140,
          type: "date",
          format: "yyyy-MM-dd",
          valueFormat: "yyyy-MM-dd",
          rules: [{
            required: true,
            message: "请选择合同开始时间",
            trigger: "blur",
          },],
          disabled: true
        },
        {
          label: "预计竣工时间",
          prop: "completedTime",
          labelWidth: 140,
          span: 12,
          type: "date",
          format: "yyyy-MM-dd",
          valueFormat: "yyyy-MM-dd",
          rules: [{
            required: true,
            message: "请选择合同结束时间",
            trigger: "blur",
          },],
          disabled: true
        },
        {
          label: "项目分摊方式",
          prop: "allocationWay",
          labelWidth: 140,
          value: '按建筑面积分摊',
          span: 12,
          row: true,
          disabled: true
        },
        {
          label: '联系人',
          prop: 'linkman',
          span: 12,
          labelWidth: 120,
          search: true,
          searchSpan: 4,
          rules: [{
            required: true,
            message: "请输入联系人",
            trigger: "blur",
          },],
          disabled: true
        },
        {
          label: '联系方式',
          prop: 'linkPhone',
          span: 12,
          labelWidth: 140,
          rules: [{
            required: true,
            message: "请输入联系方式",
            trigger: "blur",
          },],
          disabled: true
        },
        {
          label: "项目预算总金额(元)",
          prop: "budgetAmount",
          span: 12,
          hide: true,
          labelWidth: 140,
          type: 'number',
          precision: 2,
          value: '0.00',
          disabled: true
        },
        {
          label: "实际预算金额(元)",
          prop: "actualAmount",
          span: 12,
          hide: true,
          labelWidth: 140,
          type: 'number',
          precision: 2,
          value: '0.00',
          disabled: true
        },
        {
          label: "自筹金额(元)",
          prop: "selfAmount",
          span: 12,
          hide: true,
          labelWidth: 140,
          type: 'number',
          precision: 2,
          value: '0.00',
          disabled: true
        },
        {
          label: "预算应拨付金额(元)",
          prop: "budgetAppropriateAmount",
          span: 12,
          hide: true,
          labelWidth: 140,
          type: 'number',
          precision: 2,
          value: '0.00',
          disabled: true
        },
        option: {
          height: "auto",
          calcHeight: 54,
          dialogWidth: 1150,
          tip: false,
          searchShow: true,
          searchMenuSpan: 3,
          menuWidth: 350,
          border: true,
          //stripe:true,
          submitBtn: false,
          emptyBtn: false,
          index: true,
          viewBtn: true,
          selection: true,
          dialogClickModal: false,
          column: [{
              label: "小区",
              prop: "districtId",
              searchSpan: 5,
              search: true,
              type: 'tree',
              dicUrl: `/api/blade-district/district/getDistrictTree`,
              props: {
                label: "name",
                value: "id"
              },
              defaultExpandedKeys: ["361102003"],
              span: 12,
              labelWidth: 120,
              width: 220,
              overHidden: true,
              rules: [{
                required: true,
                message: "请选择小区",
                trigger: "blur",
              }, ],
              disabled: true
            },
            {
              label: '维修项目名称',
              prop: 'name',
              searchLabelWidth: 120,
              searchSpan: 5,
              search: true,
              span: 12,
              labelWidth: 140,
              rules: [{
                required: true,
                message: "请输入维修项目名称",
                trigger: "blur",
              }, ],
              disabled: true
            },
            {
              label: "预计开工时间",
              prop: "runTime",
              span: 12,
              labelWidth: 140,
              type: "date",
              format: "yyyy-MM-dd",
              valueFormat: "yyyy-MM-dd",
              rules: [{
                required: true,
                message: "请选择合同开始时间",
                trigger: "blur",
              }, ],
              disabled: true
            },
            {
              label: "预计竣工时间",
              prop: "completedTime",
              labelWidth: 140,
              span: 12,
              type: "date",
              format: "yyyy-MM-dd",
              valueFormat: "yyyy-MM-dd",
              rules: [{
                required: true,
                message: "请选择合同结束时间",
                trigger: "blur",
              }, ],
              disabled: true
            },
            {
              label: "楼栋",
              prop: "buildingName",
              labelWidth: 140,
              value: '',
              span: 12,
              row: true,
              disabled: true
            },
            {
              label: '联系人',
              prop: 'linkman',
              span: 12,
              labelWidth: 120,
              search: true,
              searchSpan: 4,
              rules: [{
                required: true,
                message: "请输入联系人",
                trigger: "blur",
              }, ],
              disabled: true
            },
            {
              label: '联系方式',
              prop: 'linkPhone',
              span: 12,
              labelWidth: 140,
              rules: [{
                required: true,
                message: "请输入联系方式",
                trigger: "blur",
              }, ],
              disabled: true
            },
            {
              label: "项目预算总金额(元)",
              prop: "budgetAmount",
              span: 12,
              hide: true,
              labelWidth: 140,
              type: 'number',
              precision: 2,
              value: '0.00',
              disabled: true
            },
            {
              label: "实际预算金额(元)",
              prop: "actualAmount",
              span: 12,
              hide: true,
              labelWidth: 140,
              type: 'number',
              precision: 2,
              value: '0.00',
              disabled: true
            },
            {
              label: "自筹金额(元)",
              prop: "selfAmount",
              span: 12,
              hide: true,
              labelWidth: 140,
              type: 'number',
              precision: 2,
              value: '0.00',
              disabled: true
            },
            {
              label: "预算应拨付金额(元)",
              prop: "budgetAppropriateAmount",
              span: 12,
              hide: true,
              labelWidth: 140,
              type: 'number',
              precision: 2,
              value: '0.00',
              disabled: true
            },
        {
          display: false,
          hide: true,
          parent: false,
          label: "投票结果",
          prop: "articleId",
          search: false,
          viewDisabled: false,
          type: 'select',
          dicUrl: `/api/blade-article/article/getArticleByDistrictId?type=4&eventType=1&districtId={{districtId}}`,
          // slot: true,
          formslot: true,
          cascader: ['vote'],
          props: {
            label: "title",
            value: "id"
          },
          defaultExpandedKeys: ["361102003"],
          span: 12,
          width: 260,
          rules: [{
            required: true,
            message: "请选择投票结果",
            trigger: "blur",
          },],
          change: (val) => {
            console.log("val===>", val)
            // console.log("form===>",this.form)
            if (val.value && !this.form.id) {
              this.articleRange = val.articleRange;
              // this.showDialog = true;
              // this.getDetail(val.value, val.articleRange)
            {
              display: false,
              hide: true,
              parent: false,
              label: "投票结果",
              prop: "articleId",
              search: false,
              viewDisabled: false,
              type: 'select',
              dicUrl: `/api/blade-article/article/getArticleByDistrictId?type=4&eventType=1&districtId={{districtId}}`,
              // slot: true,
              formslot: true,
              cascader: ['vote'],
              props: {
                label: "title",
                value: "id"
              },
              defaultExpandedKeys: ["361102003"],
              span: 12,
              width: 260,
              rules: [{
                required: true,
                message: "请选择投票结果",
                trigger: "blur",
              }, ],
              change: (val) => {
                console.log("val===>", val)
                // console.log("form===>",this.form)
                if (val.value && !this.form.id) {
                  this.articleRange = val.articleRange;
                  // this.showDialog = true;
                  // this.getDetail(val.value, val.articleRange)
                }
              }
            },
            {
              display: false,
              span: 24,
              hide: true,
              prop: "vote",
              slot: true,
              label: "投票详情",
              labelWidth: 140
            },
            {
              label: "项目摘要",
              span: 24,
              hide: true,
              prop: "projectDigest",
              placeholder: "例如:“XX小区XX栋XX设施设备维修,总的预算金额是X,是否含有审价,本次维修涉及范围共XX户,总面积的建筑面积为XX平方米”",
              labelWidth: 140,
              type: "textarea",
              disabled: true
            },
            {
              label: "项目进度描述",
              span: 24,
              hide: true,
              prop: "projectDescribe",
              labelWidth: 140,
              type: "textarea",
              disabled: true
            }, {
              label: "批复意见",
              span: 24,
              hide: true,
              prop: "comment",
              labelWidth: 140,
              type: "textarea",
              rules: [{
                required: true,
                message: "请输入批复意见",
                trigger: "blur",
              }, ],
            },
            {
              label: '施工方案附件',
              prop: 'constructionSchemeUrls',
              type: 'upload',
              listType: 'picture-img',
              span: 24,
              hide: true,
              labelWidth: 140,
              multiple: true,
              // showFileList: true,
              propsHttp: {
                res: 'data',
                name: "originalName",
                url: "link"
              },
              action: '/api/blade-resource/oss/endpoint/put-file-attach',
              rules: [{
                required: true,
                message: "请上传施工方案",
                trigger: "blur",
              }, ],
            }
          ],
        },
        topictData: [],
        topicTitle: "",
        articleRange: ""
      }
    },
    watch: {
      'form.districtId': {
        handler(newData) {
          const column = this.findObject(this.option.column, "articleId")
          if (newData && this.form.articleId) {
            column.display = true;
          } else {
            column.display = false
          }
        },
        {
          display: false,
          span: 24,
          hide: true,
          prop: "vote",
          slot: true,
          label: "投票详情",
          labelWidth: 140
        },
        {
          label: "项目摘要",
          span: 24,
          hide: true,
          prop: "projectDigest",
          placeholder: "例如:“XX小区XX栋XX设施设备维修,总的预算金额是X,是否含有审价,本次维修涉及范围共XX户,总面积的建筑面积为XX平方米”",
          labelWidth: 140,
          type: "textarea",
          disabled: true
        },
        {
          label: "项目进度描述",
          span: 24,
          hide: true,
          prop: "projectDescribe",
          labelWidth: 140,
          type: "textarea",
          disabled: true
        }, {
          label: "批复意见",
          span: 24,
          hide: true,
          prop: "comment",
          labelWidth: 140,
          type: "textarea",
          rules: [{
            required: true,
            message: "请输入批复意见",
            trigger: "blur",
          },],
        },
        {
          label: '施工方案附件',
          prop: 'constructionSchemeUrls',
          type: 'upload',
          listType: 'picture-img',
          span: 24,
          hide: true,
          labelWidth: 140,
          multiple: true,
          // showFileList: true,
          propsHttp: {
            res: 'data',
            name: "originalName",
            url: "link"
          },
          action: '/api/blade-resource/oss/endpoint/put-file-attach',
          rules: [{
            required: true,
            message: "请上传施工方案",
            trigger: "blur",
          },],
        }
        ],
      },
      topictData: [],
      topicTitle: "",
      articleRange: ""
    }
  },
  watch: {
    'form.districtId': {
      handler(newData) {
        const column = this.findObject(this.option.column, "articleId")
        if (newData && this.form.articleId) {
          column.display = true;
        } else {
          column.display = false
      'form.articleId': {
        handler(newData) {
          this.getVoteDetail(this.form.articleId, this.articleRange)
          const column = this.findObject(this.option.column, "vote")
          if (newData) {
            column.display = true;
          } else {
            column.display = false
          }
        }
      }
      },
    },
    'form.articleId': {
      handler(newData) {
        this.getVoteDetail(this.form.articleId, this.articleRange)
        const column = this.findObject(this.option.column, "vote")
        if (newData) {
          column.display = true;
        } else {
          column.display = false
        }
      }
    },
  },
  created() {
    this.init()
  },
  beforeRouteUpdate(to, from, next) {
    // 在当前路由改变,但是该组件被复用时调用
    // 举例来说,对于一个带有动态参数的路径 /foo/:id,在 /foo/1 和 /foo/2 之间跳转的时候
    // 由于会渲染同样的 Foo 组件,因此组件实例会被复用。而这个钩子就会在这个情况下被调用
    // 可以访问组件实例 `this`
    if (to.fullPath !== from.fullPath) {
      next()
    created() {
      this.init()
    }
  },
  methods: {
    init() {
      this.taskId = this.$route.params.taskId
      this.processInstanceId = this.$route.params.processInstanceId
      this.businessId = this.$route.params.businessId
      historyFlowList(this.processInstanceId).then(res => {
        const data = res.data
        if (data.success) {
          this.flowList = data.data
        }
      })
      getPropertyCapitalApply(this.businessId).then(res => {
        const data = res.data
        if (data.success) {
          data.data.constructionSchemeUrls = website.minioUrl + data.data.constructionSchemeUrls
          this.form = data.data
        }
      })
    },
    handleAgree() {
      if (!this.form.comment) {
        this.$message.warning('请先填写批复意见')
        return
    beforeRouteUpdate(to, from, next) {
      // 在当前路由改变,但是该组件被复用时调用
      // 举例来说,对于一个带有动态参数的路径 /foo/:id,在 /foo/1 和 /foo/2 之间跳转的时候
      // 由于会渲染同样的 Foo 组件,因此组件实例会被复用。而这个钩子就会在这个情况下被调用
      // 可以访问组件实例 `this`
      if (to.fullPath !== from.fullPath) {
        next()
        this.init()
      }
      const params = {
        taskId: this.taskId,
        processInstanceId: this.processInstanceId,
        flag: 'ok',
        comment: this.form.comment,
      }
      completeTask(params).then(res => {
        const data = res.data
        if (data.success) {
          this.$message.success(data.msg)
          this.$router.$avueRouter.closeTag()
          this.$router.push({
            path: `/gzll/todo`
          })
        } else {
          this.$message.error(data.msg || '提交失败')
    },
    methods: {
      init() {
        this.taskId = this.$route.params.taskId
        this.processInstanceId = this.$route.params.processInstanceId
        this.businessId = this.$route.params.businessId
        historyFlowList(this.processInstanceId).then(res => {
          const data = res.data
          if (data.success) {
            this.flowList = data.data
          }
        })
        getPropertyCapitalApply(this.businessId).then(res => {
          const data = res.data
          if (data.success) {
            data.data.constructionSchemeUrls = website.minioUrl + data.data.constructionSchemeUrls
            this.form = data.data
          }
        })
      },
      handleAgree() {
        if (!this.form.comment) {
          this.$message.warning('请先填写批复意见')
          return
        }
      })
    },
    handleDisagree() {
      if (!this.form.comment) {
        this.$message.warning('请先填写批复意见')
        return
      }
      const params = {
        taskId: this.taskId,
        processInstanceId: this.processInstanceId,
        comment: this.form.comment,
      }
      completeTask(params).then(res => {
        const data = res.data
        if (data.success) {
          this.$message.success(data.msg)
          this.$router.$avueRouter.closeTag()
          this.$router.push({
            path: `/gzll/todo`
          })
        } else {
          this.$message.error(data.msg || '提交失败')
        const params = {
          taskId: this.taskId,
          processInstanceId: this.processInstanceId,
          flag: 'ok',
          comment: this.form.comment,
        }
      })
    },
    handleCancel() {
      this.$router.$avueRouter.closeTag()
      this.$router.push({
        path: `/gzll/todo`
      })
    },
    getVoteDetail(articleId, districtId) {
      let params = {
        level: 1,
        articleId: articleId,
        districtId: districtId
      }
      getLists(1, 10, params).then(res => {
        const data = res.data.data
        if (data.length) {
          this.topictData = data[0].children;
          this.topicTitle = data[0].discussContent;
        completeTask(params).then(res => {
          const data = res.data
          if (data.success) {
            this.$message.success(data.msg)
            this.$router.$avueRouter.closeTag()
            this.$router.push({
              path: `/gzll/todo`
            })
          } else {
            this.$message.error(data.msg || '提交失败')
          }
        })
      },
      handleDisagree() {
        if (!this.form.comment) {
          this.$message.warning('请先填写批复意见')
          return
        }
      })
    },
        const params = {
          taskId: this.taskId,
          processInstanceId: this.processInstanceId,
          comment: this.form.comment,
        }
        completeTask(params).then(res => {
          const data = res.data
          if (data.success) {
            this.$message.success(data.msg)
            this.$router.$avueRouter.closeTag()
            this.$router.push({
              path: `/gzll/todo`
            })
          } else {
            this.$message.error(data.msg || '提交失败')
          }
        })
      },
      handleCancel() {
        this.$router.$avueRouter.closeTag()
        this.$router.push({
          path: `/gzll/todo`
        })
      },
      getVoteDetail(articleId, districtId) {
        let params = {
          level: 1,
          articleId: articleId,
          districtId: districtId
        }
        getLists(1, 10, params).then(res => {
          const data = res.data.data
          if (data.length) {
            this.topictData = data[0].children;
            this.topicTitle = data[0].discussContent;
          }
        })
      },
    openUserPopup(row) {
      this.$refs.DeitDiscussion.openUser(row, 1, [this.form.districtId])
    },
      openUserPopup(row) {
        this.$refs.DeitDiscussion.openUser(row, 1, [this.form.districtId])
      },
    }
  }
}
</script>
<style scoped>
.container {
  position: relative;
  /* 确保按钮相对于该元素定位 */
}
  .container {
    position: relative;
    /* 确保按钮相对于该元素定位 */
  }
#myButton {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}
.workOrderStyle {
  font-weight: normal;
}
</style>
  #myButton {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
  }
  .workOrderStyle {
    font-weight: normal;
  }
</style>
src/views/patrolList/patrolRecord.vue
@@ -1,51 +1,50 @@
<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="{type,size,row }" slot="menu">
                <el-button icon="el-icon-detail" :size="size" :type="type" @click.stop="getDetail(row)">
                    详情
                </el-button>
            </template>
            <template slot-scope="{type,size,row }" slot="menu">
                <el-button icon="el-icon-detail" :size="size" :type="type" @click.stop="getDetail(row)">
                    详情
                </el-button>
            </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="{type,size,row }" slot="menu">
        <el-button icon="el-icon-detail" :size="size" :type="type" @click.stop="getDetail(row)">
          详情
        </el-button>
      </template>
      <template slot-scope="{type,size,row }" slot="menu">
        <el-button icon="el-icon-detail" :size="size" :type="type" @click.stop="getDetail(row)">
          详情
        </el-button>
      </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>
        </avue-crud>
      <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>
    </avue-crud>
        <el-drawer title="巡查详情" :visible.sync="isDetail" :append-to-body="true" size="60%" direction="rtl">
    <el-drawer title="巡查详情" :visible.sync="isDetail" :append-to-body="true" size="60%" direction="rtl">
            <el-card class="trackClass" style="overflow-y: auto">
      <el-card class="trackClass" style="overflow-y: auto">
        <el-collapse v-model="activeNames" @change="handleChange">
          <div v-for="(item, index) in 10" :key="index">
            <el-collapse-item title="一致性 Consistency" name="1">
              <div>{{ index }}
                <el-collapse v-model="activeNames" @change="handleChange">
                    <div v-for="(item, index) in 10" :key="index">
                        <el-collapse-item title="一致性 Consistency" name="1">
                            <div>{{ index }}
                                <el-collapse v-model="activeNames" @change="handleChange">
                                    <div v-for="(item, index) in 3" :key="index">
                                        <el-collapse-item title="er致性 Consistency" name="1">
                                            <div>在界面中一致:所有的元素和结构需保持一致,比如:设计样式、图标和文本、元素的位置等。{{ index }}</div>
                                        </el-collapse-item>
                                    </div>
                                </el-collapse>
                            </div>
                        </el-collapse-item>
                    </div>
                  <div v-for="(item, index) in 3" :key="index">
                    <el-collapse-item title="er致性 Consistency" name="1">
                      <div>在界面中一致:所有的元素和结构需保持一致,比如:设计样式、图标和文本、元素的位置等。{{ index }}</div>
                    </el-collapse-item>
                  </div>
                </el-collapse>
              </div>
            </el-collapse-item>
          </div>
        </el-collapse>
                <!--  <el-form :model="form" label-position="right" size="mini" class="taskinfoForm" label-width="70px">
        <!--  <el-form :model="form" label-position="right" size="mini" class="taskinfoForm" label-width="70px">
          <el-row>
            <el-col :span="24">
              <el-form-item label="巡查内容">
@@ -71,351 +70,354 @@
          </el-row>
        </el-form> -->
            </el-card>
      </el-card>
            <!-- <DcMap v-if="isDetail" :is-detail="isDetail" :range="form.taskRoute" :patrolRoute="form.patrolRoute">
      <!-- <DcMap v-if="isDetail" :is-detail="isDetail" :range="form.taskRoute" :patrolRoute="form.patrolRoute">
      </DcMap> -->
        </el-drawer>
    </el-drawer>
    </basic-container>
  </basic-container>
</template>
<script>
import {
  import {
    getList,
    remove,
    add,
    update,
    getDetail,
    getPatrolGroupTree
} from "@/api/patrol/placeChek"
  } from "@/api/patrol/placeChek"
import website from '@/config/website'
  import website from '@/config/website'
// import {
//   getDistrictTree
// } from "@/api/district/index"
  // import {
  //   getDistrictTree
  // } from "@/api/district/index"
import {
  import {
    mapGetters
} from "vuex"
  } from "vuex"
export default {
    data () {
        return {
            isDetail: false,
            form: {},
            query: {},
            loading: true,
            page: {
                pageSize: 10,
                currentPage: 1,
                total: 0,
  export default {
    data() {
      return {
        isDetail: false,
        form: {},
        query: {},
        loading: true,
        page: {
          pageSize: 10,
          currentPage: 1,
          total: 0,
        },
        datetime: "",
        selectionList: [],
        option: {
          labelWidth: 120,
          searchLabelWidth: 96,
          searchShow: true,
          searchMenuSpan: 3,
          // menuWidth: 450,
          // 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: true,
          dialogClickModal: false,
          header: false,
          column: [{
              label: "所属街道",
              prop: "streetName",
              span: 24,
              row: true,
              searchSpan: 4,
              search: true,
            },
            datetime: "",
            selectionList: [],
            option: {
                labelWidth: 120,
                searchLabelWidth: 96,
                searchShow: true,
                searchMenuSpan: 3,
                // menuWidth: 450,
                // 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: true,
                dialogClickModal: false,
                header:false,
                column: [{
                    label: "所属街道",
                    prop: "streetName",
                    span: 24,
                    row: true,
                    searchSpan: 4,
                    search: true,
                },
                {
                    label: "所属社区",
                    prop: "communityName",
                    span: 24,
                    row: true,
                    searchSpan: 4,
                    search: true,
                },
                {
                    label: "所属网格",
                    prop: "gridName",
                    span: 24,
                    row: true,
                    searchSpan: 4,
                    search: true,
                },
                {
                    label: "场所名称",
                    prop: "placeName",
                    span: 24,
                    row: true,
                    searchSpan: 4,
                    search: true,
                },
                {
                    label: "场所隐患",
                    prop: "remark",
                    span: 24,
                    row: true,
                    searchSpan: 4,
                },
                {
                    label: "场所负责人",
                    prop: "principal",
                    span: 24,
                    row: true,
                    searchSpan: 4,
                    search: true,
                },
                {
                    label: "场所负责人电话",
                    prop: "principalPhone",
                    span: 24,
                    row: true,
                    searchSpan: 4,
                    slot: true
                },
                {
                    label: "场所地址",
                    prop: "location",
                    span: 24,
                    row: true,
                    searchSpan: 4,
                    searchLabelWidth: 46,
                },
                {
                    width: 110,
                    label: "签名",
                    prop: "signaturePath",
                    type: "upload",
                    listType: "picture-img",
                    span: 24,
                },
                {
                    label: "创建时间",
                    prop: "createTime",
                    span: 24,
                    row: true,
                    searchSpan: 4,
                    searchLabelWidth: 46,
                },
                ],
            {
              label: "所属社区",
              prop: "communityName",
              span: 24,
              row: true,
              searchSpan: 4,
              search: true,
            },
            data: [],
            {
              label: "所属网格",
              prop: "gridName",
              span: 24,
              row: true,
              searchSpan: 4,
              search: true,
            },
            {
              label: "场所名称",
              prop: "placeName",
              span: 24,
              row: true,
              searchSpan: 4,
              search: true,
            },
            {
              label: "场所隐患",
              prop: "remark",
              span: 24,
              row: true,
              searchSpan: 4,
            },
            patrolTree: [],
        }
            {
              label: "场所负责人",
              prop: "principal",
              span: 24,
              row: true,
              searchSpan: 4,
              search: true,
            },
            {
              label: "场所负责人电话",
              prop: "principalPhone",
              span: 24,
              row: true,
              searchSpan: 4,
              slot: true
            },
            {
              label: "场所地址",
              prop: "location",
              span: 24,
              row: true,
              searchSpan: 4,
              searchLabelWidth: 46,
            },
            {
              width: 110,
              label: "签名",
              prop: "signaturePath",
              type: "upload",
              listType: "picture-img",
              span: 24,
            },
            {
              label: "创建时间",
              prop: "createTime",
              span: 24,
              row: true,
              searchSpan: 4,
              searchLabelWidth: 46,
            },
          ],
        },
        data: [],
        patrolTree: [],
      }
    },
    watch: {
        "form.articleType": {
            handler (val) {
                if (val) {
                    var videoUrl = this.findObject(this.option.column, "videoUrl")
                    var content = this.findObject(this.option.column, "content")
                    if (val.indexOf('ksp') != -1) {
                        videoUrl.display = true
                        content.display = false
                        videoUrl.rules = [{
                            required: false,
                            message: "请选择视频",
                            trigger: "blur",
                        },]
                    } else {
                        videoUrl.display = false
                        content.display = true
                        videoUrl.rules = ""
                    }
                }
            },
            immediate: true,
        }
      "form.articleType": {
        handler(val) {
          if (val) {
            var videoUrl = this.findObject(this.option.column, "videoUrl")
            var content = this.findObject(this.option.column, "content")
            if (val.indexOf('ksp') != -1) {
              videoUrl.display = true
              content.display = false
              videoUrl.rules = [{
                required: false,
                message: "请选择视频",
                trigger: "blur",
              }, ]
            } else {
              videoUrl.display = false
              content.display = true
              videoUrl.rules = ""
            }
          }
        },
        immediate: true,
      }
    },
    computed: {
        ...mapGetters(["permission", "userInfo"]),
        permissionList () {
            return {
                addBtn: this.vaildData(this.permission.article_add, true),
                viewBtn: this.vaildData(this.permission.article_view, true),
                delBtn: this.vaildData(this.permission.article_delete, true),
                editBtn: this.vaildData(this.permission.article_edit, true),
            }
        },
        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")
                    }
                }
            }
      ...mapGetters(["permission", "userInfo"]),
      permissionList() {
        return {
          addBtn: this.vaildData(this.permission.article_add, true),
          viewBtn: this.vaildData(this.permission.article_view, true),
          delBtn: this.vaildData(this.permission.article_delete, true),
          editBtn: this.vaildData(this.permission.article_edit, true),
        }
      },
      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: {
        showStringDispose (row, type) {
            row[type] = !row[type]
        },
      showStringDispose(row, type) {
        row[type] = !row[type]
      },
        getDetail (row) {
            this.isDetail = true
        },
        searchReset () {
            this.query = {}
      getDetail(row) {
        this.isDetail = true
      },
      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)
        },
        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.$message({
              type: "success",
              message: "操作成功!",
            })
            this.$refs.crud.toggleSelection()
        },
        handleDelete () {
            if (this.selectionList.length === 0) {
                this.$message.warning("请选择至少一条数据")
                return
          })
      },
      beforeOpen(done, type) {
        if (["edit", "view"].includes(type)) {
          getNotice(this.form.id).then((res) => {
            let data = res.data.data
            // data.forEach(item=>{
            if (data.url.length > 0) {
              var urls = []
              var names = data.url.split(",")
              names.forEach(name => {
                urls.push(website.minioUrl + name)
              })
              data.url = urls.join(",")
            }
            this.$confirm("确定将选择数据删除?", {
                confirmButtonText: "确定",
                cancelButtonText: "取消",
                type: "warning",
            data.articleList = JSON.parse(data.articleRange)
            this.form = 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 = {}) {
        this.loading = true
        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then((res) => {
          const data = res.data.data
          this.page.total = data.total
          this.data = data.records
          this.data.forEach(item => {
            this.$set(item, 'principalPhoneflag', false)
            if (item.signaturePath.length > 0) {
              var urls = []
              var names = item.signaturePath.split(",")
              names.forEach(name => {
                urls.push(website.minioUrl + name)
              })
              item.signaturePath = urls.join(",")
            }
          })
          this.loading = false
          this.selectionClear()
        })
        getPatrolGroupTree({
          type: 1,
          childType: 1
        }).then((res) => {
          const data = res.data.data
          this.patrolTree = data
          // const column = this.findObject(this.option.column, "articleList")
          // column.dicData = res.data.data
          this.loading = false
        })
      },
      updateFb(row) {
        if (row.publish == "0") {
          row.publish = "1"
        } else {
          row.publish = "0"
        }
        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: "操作成功!",
            })
                .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)) {
                getNotice(this.form.id).then((res) => {
                    let data = res.data.data
                    // data.forEach(item=>{
                    if (data.url.length > 0) {
                        var urls = []
                        var names = data.url.split(",")
                        names.forEach(name => {
                            urls.push(website.minioUrl + name)
                        })
                        data.url = urls.join(",")
                    }
                    data.articleList = JSON.parse(data.articleRange)
                    this.form = 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 = {}) {
            this.loading = true
            getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then((res) => {
                const data = res.data.data
                this.page.total = data.total
                this.data = data.records
                this.data.forEach(item => {
                    this.$set(item, 'principalPhoneflag', false)
                    if (item.signaturePath.length > 0) {
                        var urls = []
                        var names = item.signaturePath.split(",")
                        names.forEach(name => {
                            urls.push(website.minioUrl + name)
                        })
                        item.signaturePath = urls.join(",")
                    }
                })
                this.loading = false
                this.selectionClear()
            })
            getPatrolGroupTree({}).then((res) => {
                const data = res.data.data
                this.patrolTree = data
                // const column = this.findObject(this.option.column, "articleList")
                // column.dicData = res.data.data
                this.loading = false
            })
        },
        updateFb (row) {
            if (row.publish == "0") {
                row.publish = "1"
            } else {
                row.publish = "0"
            }
            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()
                }
            )
        },
          },
          (error) => {
            window.console.log(error)
            loading()
          }
        )
      },
    },
}
  }
</script>
<style>
.avue-upload__icon {
  .avue-upload__icon {
    line-height: 6;
}
</style>
  }
</style>
src/views/place/components/baseAllInfo.vue
@@ -16,7 +16,7 @@
        <box-title class="m10" :classVal="9" :title="'房东信息'"></box-title>
        <avue-form v-if="restShow" ref="restForm" :option="houseOwnerOption" v-model="form"></avue-form>
        <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>
@@ -39,1118 +39,1108 @@
</template>
<script>
import {
  getPlaceDetaill,
  getPlaceExt,
  holdRemove,
  holdAdd,
  holdUpdate,
  getHoldList,
  update,
  updatePlaceExt,
  getPlaceAddressList
} from "@/api/place/place"
import {
  getPlaceList
} from "@/api/doorplateAddress/doorplateAddress"
import website from "@/config/website"
  import {
    getPlaceDetaill,
    getPlaceExt,
    holdRemove,
    holdAdd,
    holdUpdate,
    getHoldList,
    update,
    updatePlaceExt,
    getPlaceAddressList
  } from "@/api/place/place"
  import {
    getPlaceList
  } from "@/api/doorplateAddress/doorplateAddress"
  import website from "@/config/website"
import boxTitle from "./boxTitle"
  import boxTitle from "./boxTitle"
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 {
      roleBox: false,
      baseShow: false,
      restShow: false,
      placeExt: [],
      form: {},
      option: {
        submitBtn: false,
        emptyBtn: false,
        column: [{
          span: 12,
          label: "场所名称",
          prop: "placeName",
          labelWidth: 120,
          rules: [{
            required: true,
            message: "请输入场所名称",
            trigger: "blur",
          },],
        },
        {
          label: "负责人",
          prop: "principal",
          labelWidth: 120,
          rules: [{
            required: false,
            message: "请输入负责人",
            trigger: "blur",
          },],
        },
        {
          width: 96,
          label: "手机号码",
          prop: "principalPhone",
          labelWidth: 120,
          search: true,
          searchSpan: 4,
          slot: true,
          overHidden: true,
          rules: [{
            validator: validatorPhone,
            trigger: "blur",
          },],
        },
        {
          width: 120,
          overHidden: true,
          label: "身份证号",
          labelWidth: 120,
          prop: "principalIdCard",
          search: true,
          searchSpan: 4,
          slot: true,
          rules: [{
            required: false,
            message: "请输身份证号",
            trigger: "blur",
          }],
        },
        {
          hide: true,
          parent: false,
          label: "所属社区",
          labelWidth: 120,
          prop: "neiCode",
          search: false,
          type: "tree",
          dicUrl: "/api/blade-system/region/tree",
          props: {
            label: "name",
            value: "id",
          },
          cascader: ["gridCode"],
          // dicFormatter: (res) => {
          //  return dsposeData(res.data)
          // },
          rules: [{
            required: true,
            message: "请选择所属社区",
            trigger: "blur",
          },],
        },
        {
          hide: true,
          label: "所属网格",
          prop: "gridCode",
          type: "tree",
          labelWidth: 120,
          cell: true,
          props: {
            label: "gridName",
            value: "gridCode",
          },
          // dataType: 'string',
          dicUrl: "/api/blade-grid/grid/getGridList?communityCode={{neiCode}}",
          rules: [{
            required: true,
            message: "请选择所属网格",
            trigger: "blur",
          },],
        },
        {
          span: 7,
          label: "场所标签",
          prop: "label",
          labelWidth: 120,
          type: "select",
          dicUrl: "/api/blade-category/category/getCategory?level=2",
          cascader: ["smallLabel"],
          props: {
            label: "categoryName",
            value: "categoryNo",
          },
          dataType: "string",
          hide: true,
          rules: [{
            required: true,
            message: "请输入场所标签",
            trigger: "blur",
          },],
        },
        {
          span: 5,
          label: "",
          labelWidth: 20,
          prop: "smallLabel",
          type: "select",
          dicUrl: "/api/blade-category/category/getCategory?parentNo={{label}}",
          props: {
            label: "categoryName",
            value: "categoryNo",
          },
          dataType: "string",
          hide: true,
        },
        {
          span: 12,
          label: "标签颜色",
          prop: "color",
          type: "select",
          labelWidth: 120,
          dicData: [{
            label: "绿",
            value: "green",
          },
          {
            label: "黄",
            value: "yellow",
          },
          {
            label: "红",
            value: "red",
          },
          ],
          props: {
            label: "label",
            value: "value",
          },
          hide: true,
        },
        {
          span: 12,
          label: "九小场所",
          prop: "isNine",
          labelWidth: 120,
          type: "select",
          dicData: [{
            label: "是",
            value: 1,
          },
          {
            label: "否",
            value: 2,
          }
          ],
          rules: [{
            required: true,
            message: "请选择九小分类",
            trigger: "blur",
          },],
          hide: true,
        },
        {
          span: 12,
          label: "九小分类",
          prop: "nineType",
          labelWidth: 120,
          type: "select",
          display: false,
          dicUrl: "/api/blade-system/dict-biz/dictionary?code=nineType",
          dataType: "number",
          hide: true,
          props: {
            label: "dictValue",
            value: "dictKey",
          },
        },
        {
          span: 12,
          label: "阵地",
          prop: "isFront",
          labelWidth: 120,
          type: "select",
          dicData: [{
            label: "是",
            value: 1,
          },
          {
            label: "否",
            value: 2,
          }
          ],
          hide: true,
          rules: [{
            required: true,
            message: "请选择阵地",
            trigger: "blur",
          },],
        },
        {
          span: 12,
          label: "阵地类型",
          prop: "frontType",
          type: "select",
          labelWidth: 120,
          display: false,
          row: true,
          dicUrl: "/api/blade-system/dict-biz/dictionary?code=frontType",
          dataType: "number",
          hide: true,
          props: {
            label: "dictValue",
            value: "dictKey",
          },
        },
        {
          span: 12,
          label: "三级消防单位",
          prop: "threeFireProtection",
          labelWidth: 120,
          type: "select",
          dicData: [{
            label: "是",
            value: 1,
          },
          {
            label: "否",
            value: 2,
          }
          ],
          hide: true,
          rules: [{
            required: false,
            message: "请选择三级消防单位",
            trigger: "blur",
          },],
        },
        {
          label: "场所照片",
          prop: "imageUrls",
          width: 80,
          type: "upload",
          labelWidth: 120,
          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: 160,
          overHidden: true,
          slot: true,
          label: "地址",
          prop: "location",
          type: "map",
          dataType: "string",
          labelWidth: 120,
          span: 24,
          value: [117.96646, 28.431002, ""],
          cascader: ['houseCodeBinds'],
          rules: [{
            required: true,
            message: "请选择地址",
            trigger: "blur",
          },],
        },
        {
          width: 160,
          overHidden: true,
          display: false,
          labelWidth: 120,
          hide: true,
          label: "地址",
          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,
          prop: "houseCodeBinds",
          slot: true,
          label: "标准地址",
          labelWidth: 120,
        },
        {
          label: "备注",
          prop: "remark",
          type: 'textarea',
          labelWidth: 120,
          hide: true,
          span: 24,
          rules: [{
            required: false,
            message: "请输入场所备注",
            trigger: "blur",
          },],
        },
        ],
      },
      placeForm: {},
      optionDetail: {
        submitBtn: false,
        emptyBtn: false,
        column: [{
          labelWidth: 100,
          label: "法人信息",
          prop: "legalPerson",
        },
        {
          labelWidth: 100,
          label: "法人电话",
          prop: "legalTel",
          search: true,
          searchSpan: 4,
          slot: true,
          overHidden: true,
          rules: [{
            validator: validatorPhone,
            trigger: "blur",
          },],
        },
        {
          label: "营业执照",
          prop: "imageUrls",
          width: 80,
          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,
        },
        {
          label: "场所平面图",
          prop: "planImageUrls",
          width: 80,
          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,
        },
        ],
      },
      loading: true,
      placeOption: {
        menu: true,
        height: 300,
        calcHeight: 54,
        dialogWidth: 950,
        tip: false,
        searchShow: false,
        addBtn: true,
        delBtn: true,
        editBtn: true,
        border: true,
        index: true,
        dialogClickModal: false,
        column: [{
          labelWidth: 100,
          label: "姓名",
          prop: "name",
          searchSpan: 4,
          search: true,
        },
        {
          labelWidth: 100,
          label: "性别",
          prop: "gender",
          type: "select",
          dicData: [{
            label: "男",
            value: 1
          },
          {
            label: "女",
            value: 0
          },
          {
            label: "未知",
            value: "3"
          }
          ],
        },
        {
          labelWidth: 100,
          span: 12,
          label: "民族",
          prop: "ethnicity",
          type: "select",
          row: true,
          dicUrl: "/api/blade-system/dict-biz/dictionary?code=nationType",
          dataType: "number",
          props: {
            label: "dictValue",
            value: "dictKey",
          },
        },
        {
          labelWidth: 100,
          label: "身份证号",
          prop: "idCard",
        },
        {
          labelWidth: 100,
          label: "电话号码",
          prop: "telephone",
          search: true,
          searchSpan: 4,
          slot: true,
          overHidden: true,
          rules: [{
            validator: validatorPhone,
            trigger: "blur",
          },],
        },
        {
          labelWidth: 100,
          label: "现居住地",
          prop: "tempAddress",
          searchSpan: 4,
          search: true,
        },
        {
          labelWidth: 100,
          label: "岗位",
          prop: "jobNature",
          // hide: true
        },
        {
          label: "从业人员照片",
          prop: "employerImg",
          labelWidth: 100,
          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,
          hide: true
        },
        {
          label: "入职时间",
          labelWidth: 100,
          hide: true,
          row: true,
          prop: "resignationTime",
          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: "请选择入职时间",
            trigger: "blur",
          }]
        },
        {
          label: "离职时间",
          labelWidth: 100,
          hide: true,
          row: true,
          prop: "employmentTime",
          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: "请选择离职时间",
            trigger: "blur",
          }]
        },
        {
          labelWidth: 100,
          label: "状态",
          prop: "resignationFlag",
          // hide: true
          type: "select",
          display: false,
          dicData: [{
            label: "在职",
            value: 1
          },
          {
            label: "离职",
            value: 2
          }
          ],
        },
        ]
      },
      holdPage: {
        pageSize: 20,
        currentPage: 1,
        total: 0,
      },
      houseHoldForm: {},
      houseOwnerOption: {
        submitBtn: false,
        emptyBtn: false,
        column: [
          {
            width: 96,
            label: "姓名",
            prop: "landlordName",
            search: true,
            searchSpan: 4,
            slot: true,
            overHidden: true
          },
          {
            width: 96,
            label: "身份证号",
            prop: "landlordIdCard",
            search: true,
            searchSpan: 4,
            slot: true,
            overHidden: true
          },
          {
            width: 96,
            label: "手机号",
            prop: "landlordPhone",
            search: true,
            searchSpan: 4,
            slot: true,
            overHidden: true,
            rules: [{
              validator: validatorPhone,
              trigger: "blur",
            },],
          },
          {
            width: 96,
            label: "微信号",
            prop: "legalTel",
            search: true,
            searchSpan: 4,
            slot: true,
            overHidden: true,
            rules: [{
              validator: validatorPhone,
              trigger: "blur",
            },],
          },
        ],
      },
      userOption: {
        submitBtn: false,
        emptyBtn: false,
        column: [
          {
            width: 96,
            label: "电话",
            prop: "legalTel",
            search: true,
            searchSpan: 4,
            slot: true,
            overHidden: true,
            rules: [{
              validator: validatorPhone,
              trigger: "blur",
            },],
          },
          {
            width: 96,
            label: "微信号",
            prop: "legalTel",
            search: true,
            searchSpan: 4,
            slot: true,
            overHidden: true,
            rules: [{
              validator: validatorPhone,
              trigger: "blur",
            },],
          },
        ],
      },
      standardAddressList: [], //标准地址数据
      standardAddress: "",
      standardAddressSearchKey: ""
    }
  },
  components: {
    boxTitle
  },
  inject: ["placeElement"],
  watch: {
    'form.houseBindList': {
      handler(newData) {
        console.log("=======>", newData)
      }
    },
    'form.isNine': {
      handler(newData) {
        if (newData) {
          let nineTypeColumn = this.findObject(
            this.option.column,
            'nineType'
          )
          if (newData == 1) {
            nineTypeColumn.display = true
  export default {
    data() {
      //手机号格式校验
      let validatorPhone = function(rule, value, callback) {
        if (value) {
          if (!/^1[3456789]\d{9}$/.test(value)) {
            callback(new Error("手机号格式有误!"))
          } else {
            nineTypeColumn.display = false
            callback()
          }
        }
      },
    },
    'form.isFront': {
      handler(newData) {
        if (newData) {
          let frontTypeColumn = this.findObject(
            this.option.column,
            'frontType'
          )
          if (newData == 1) {
            frontTypeColumn.display = true
          } else {
            frontTypeColumn.display = false
          }
        }
        callback()
      }
    },
    'form.addressName': {
      handler(newData) {
        console.log("111111")
        const column = this.findObject(this.option.column, "houseCodeBinds")
        if (newData) {
          column.display = true;
        } else {
          column.display = false
        }
      }
    }
  },
  methods: {
    initOpen(newData) {
      console.log("item==>", newData);
      this.curRow = newData
      this.roleBox = true
      this.baseShow = false
      this.restShow = false
      this.form = {}
      this.placeForm = {}
      const that = this
      that.$axios
        .all([getPlaceDetaill(newData["houseCode"]), getPlaceExt({
          placeId: newData["id"]
        }), getPlaceList()])
        .then(
          that.$axios.spread(function (baseInfo, restInfo) {
            console.log("houseCodeBinds===>", baseInfo.data.data.houseCodeBinds)
            that.form = baseInfo.data.data
            that.form.addressName = that.form.location;
            that.form.location = [
              that.form.lng,
              that.form.lat,
              that.form.location,
            ].join(",")
            if (baseInfo.data.data.houseCodeBinds) {
              that.standardAddressList = baseInfo.data.data.houseBindList;
              that.form.houseCodeBinds = baseInfo.data.data.houseCodeBinds.split(",")
            }
            if (that.form.imageUrls && that.form.imageUrls.length) {
              that.form.imageUrls = that.form.imageUrls
                .split(",")
                .filter((item) => item != "")
                .map((item) => website.minioUrl + item)
                .join(",")
            }
            if (
              that.form.placePoiLabelVOList &&
              that.form.placePoiLabelVOList.length
            ) {
              let lebelTwo = that.form.placePoiLabelVOList.find((item) => {
                return item.type == 2
              })
              if (lebelTwo) that.form.label = String(lebelTwo.poiCode)
              let lebelThree = that.form.placePoiLabelVOList.find((item) => {
                return item.type == 3
              })
              if (lebelThree) that.form.smallLabel = String(lebelThree.poiCode)
            }
            that.baseShow = true
            const data = restInfo.data.data
            if (data) {
              let imageUrls = data.imageUrls
              let planImageUrls = data.planImageUrls
              if (imageUrls && imageUrls.length) {
                imageUrls = imageUrls
                  .split(",")
                  .filter((item) => item != "")
                  .map((item) => website.minioUrl + item)
                  .join(",")
              }
              if (planImageUrls && planImageUrls.length) {
                planImageUrls = planImageUrls
                  .split(",")
                  .filter((item) => item != "")
                  .map((item) => website.minioUrl + item)
                  .join(",")
              }
              that.placeForm = {
                ...data,
                imageUrls,
                planImageUrls,
              }
            }
            that.restShow = true
          })
        )
      that.getPlaceAddressListRequest()
    },
    locationDispose(data) {
      data = data.split(",")
      return {
        longitude: data[0],
        latitude: data[1],
        location: data[2],
      }
    },
        roleBox: false,
        baseShow: false,
        restShow: false,
    selectionClear() {
      this.$nextTick(() => {
        this.$refs.crud && this.$refs.crud.toggleSelection()
      })
    },
        placeExt: [],
    houseHoldRowUpdate(row, index, done, loading) {
      holdUpdate(row).then(
        () => {
          this.holdOnLoad(this.holdPage)
          this.$message({
            type: "success",
            message: "操作成功!",
          })
          done()
        form: {},
        option: {
          submitBtn: false,
          emptyBtn: false,
          column: [{
              span: 12,
              label: "场所名称",
              prop: "placeName",
              labelWidth: 120,
              rules: [{
                required: true,
                message: "请输入场所名称",
                trigger: "blur",
              }, ],
            },
            {
              label: "负责人",
              prop: "principal",
              labelWidth: 120,
              rules: [{
                required: false,
                message: "请输入负责人",
                trigger: "blur",
              }, ],
            },
            {
              width: 96,
              label: "手机号码",
              prop: "principalPhone",
              labelWidth: 120,
              search: true,
              searchSpan: 4,
              slot: true,
              overHidden: true,
              rules: [{
                validator: validatorPhone,
                trigger: "blur",
              }, ],
            },
            {
              width: 120,
              overHidden: true,
              label: "身份证号",
              labelWidth: 120,
              prop: "principalIdCard",
              search: true,
              searchSpan: 4,
              slot: true,
              rules: [{
                required: false,
                message: "请输身份证号",
                trigger: "blur",
              }],
            },
            {
              hide: true,
              parent: false,
              label: "所属社区",
              labelWidth: 120,
              prop: "neiCode",
              search: false,
              type: "tree",
              dicUrl: "/api/blade-system/region/tree",
              props: {
                label: "name",
                value: "id",
              },
              cascader: ["gridCode"],
              // dicFormatter: (res) => {
              //  return dsposeData(res.data)
              // },
              rules: [{
                required: true,
                message: "请选择所属社区",
                trigger: "blur",
              }, ],
            },
            {
              hide: true,
              label: "所属网格",
              prop: "gridCode",
              type: "tree",
              labelWidth: 120,
              cell: true,
              props: {
                label: "gridName",
                value: "gridCode",
              },
              // dataType: 'string',
              dicUrl: "/api/blade-grid/grid/getGridList?communityCode={{neiCode}}",
              rules: [{
                required: true,
                message: "请选择所属网格",
                trigger: "blur",
              }, ],
            },
            {
              span: 7,
              label: "场所标签",
              prop: "label",
              labelWidth: 120,
              type: "select",
              dicUrl: "/api/blade-category/category/getCategory?level=2",
              cascader: ["smallLabel"],
              props: {
                label: "categoryName",
                value: "categoryNo",
              },
              dataType: "string",
              hide: true,
              rules: [{
                required: true,
                message: "请输入场所标签",
                trigger: "blur",
              }, ],
            },
            {
              span: 5,
              label: "",
              labelWidth: 20,
              prop: "smallLabel",
              type: "select",
              dicUrl: "/api/blade-category/category/getCategory?parentNo={{label}}",
              props: {
                label: "categoryName",
                value: "categoryNo",
              },
              dataType: "string",
              hide: true,
            },
            {
              span: 12,
              label: "标签颜色",
              prop: "color",
              type: "select",
              labelWidth: 120,
              dicData: [{
                  label: "绿",
                  value: "green",
                },
                {
                  label: "黄",
                  value: "yellow",
                },
                {
                  label: "红",
                  value: "red",
                },
              ],
              props: {
                label: "label",
                value: "value",
              },
              hide: true,
            },
            {
              span: 12,
              label: "九小场所",
              prop: "isNine",
              labelWidth: 120,
              type: "select",
              dicData: [{
                  label: "是",
                  value: 1,
                },
                {
                  label: "否",
                  value: 2,
                }
              ],
              rules: [{
                required: true,
                message: "请选择九小分类",
                trigger: "blur",
              }, ],
              hide: true,
            },
            {
              span: 12,
              label: "九小分类",
              prop: "nineType",
              labelWidth: 120,
              type: "select",
              display: false,
              dicUrl: "/api/blade-system/dict-biz/dictionary?code=nineType",
              dataType: "number",
              hide: true,
              props: {
                label: "dictValue",
                value: "dictKey",
              },
            },
            {
              span: 12,
              label: "阵地",
              prop: "isFront",
              labelWidth: 120,
              type: "select",
              dicData: [{
                  label: "是",
                  value: 1,
                },
                {
                  label: "否",
                  value: 2,
                }
              ],
              hide: true,
              rules: [{
                required: true,
                message: "请选择阵地",
                trigger: "blur",
              }, ],
            },
            {
              span: 12,
              label: "阵地类型",
              prop: "frontType",
              type: "select",
              labelWidth: 120,
              display: false,
              row: true,
              dicUrl: "/api/blade-system/dict-biz/dictionary?code=frontType",
              dataType: "number",
              hide: true,
              props: {
                label: "dictValue",
                value: "dictKey",
              },
            },
            {
              span: 12,
              label: "三级消防单位",
              prop: "threeFireProtection",
              labelWidth: 120,
              type: "select",
              dicData: [{
                  label: "是",
                  value: 1,
                },
                {
                  label: "否",
                  value: 2,
                }
              ],
              hide: true,
              rules: [{
                required: false,
                message: "请选择三级消防单位",
                trigger: "blur",
              }, ],
            },
            {
              label: "场所照片",
              prop: "imageUrls",
              width: 80,
              type: "upload",
              labelWidth: 120,
              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: 160,
              overHidden: true,
              slot: true,
              label: "地址",
              prop: "location",
              type: "map",
              dataType: "string",
              labelWidth: 120,
              span: 24,
              value: [117.96646, 28.431002, ""],
              cascader: ['houseCodeBinds'],
              rules: [{
                required: true,
                message: "请选择地址",
                trigger: "blur",
              }, ],
            },
            {
              width: 160,
              overHidden: true,
              display: false,
              labelWidth: 120,
              hide: true,
              label: "地址",
              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,
              prop: "houseCodeBinds",
              slot: true,
              label: "标准地址",
              labelWidth: 120,
            },
            {
              label: "备注",
              prop: "remark",
              type: 'textarea',
              labelWidth: 120,
              hide: true,
              span: 24,
              rules: [{
                required: false,
                message: "请输入场所备注",
                trigger: "blur",
              }, ],
            },
          ],
        },
        (error) => {
          window.console.log(error)
          loading()
        }
      )
    },
    houseHoldRowDel(row) {
      this.$confirm("确定将选择数据删除?", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          return holdRemove(row.id)
        })
        .then(() => {
          this.holdOnLoad(this.holdPage)
        placeForm: {},
        optionDetail: {
          submitBtn: false,
          emptyBtn: false,
          column: [{
              labelWidth: 100,
              label: "法人信息",
              prop: "legalPerson",
            },
          this.$message({
            type: "success",
            message: "操作成功!",
          })
        })
    },
            {
              labelWidth: 100,
              label: "法人电话",
              prop: "legalTel",
              search: true,
              searchSpan: 4,
              slot: true,
              overHidden: true,
              rules: [{
                validator: validatorPhone,
                trigger: "blur",
              }, ],
            },
    houseHoldRowSave(row, done, loading) {
      holdAdd({
        ...row,
        placeId: this.curRow.id,
      }).then(
        () => {
          this.holdOnLoad(this.holdPage)
          this.$message({
            type: "success",
            message: "操作成功!",
          })
          done()
            {
              label: "营业执照",
              prop: "imageUrls",
              width: 80,
              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,
            },
            {
              label: "场所平面图",
              prop: "planImageUrls",
              width: 80,
              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,
            },
          ],
        },
        (error) => {
          window.console.log(error)
          loading()
        }
      )
    },
    refreshHoldChange() {
      this.holdOnLoad(this.holdPage)
    },
        loading: true,
        placeOption: {
          menu: true,
          height: 300,
          calcHeight: 54,
          dialogWidth: 950,
          tip: false,
          searchShow: false,
          addBtn: true,
          delBtn: true,
          editBtn: true,
          border: true,
          index: true,
          dialogClickModal: false,
          column: [{
              labelWidth: 100,
              label: "姓名",
              prop: "name",
              searchSpan: 4,
              search: true,
            },
            {
              labelWidth: 100,
              label: "性别",
              prop: "gender",
              type: "select",
              dicData: [{
                  label: "男",
                  value: 1
                },
                {
                  label: "女",
                  value: 0
                },
                {
                  label: "未知",
                  value: "3"
                }
              ],
            },
            {
              labelWidth: 100,
              span: 12,
              label: "民族",
              prop: "ethnicity",
              type: "select",
              row: true,
              dicUrl: "/api/blade-system/dict-biz/dictionary?code=nationType",
              dataType: "number",
              props: {
                label: "dictValue",
                value: "dictKey",
              },
            },
            {
              labelWidth: 100,
              label: "身份证号",
              prop: "idCard",
            },
    holdOnLoad(holdPage, params = {}) {
      if (!this.curRow.id) return
            {
              labelWidth: 100,
              label: "电话号码",
              prop: "telephone",
              search: true,
              searchSpan: 4,
              slot: true,
              overHidden: true,
              rules: [{
                validator: validatorPhone,
                trigger: "blur",
              }, ],
            },
      let values = {
        ...params,
        placeId: this.curRow.id,
            {
              labelWidth: 100,
              label: "现居住地",
              prop: "tempAddress",
              searchSpan: 4,
              search: true,
            },
            {
              labelWidth: 100,
              label: "岗位",
              prop: "jobNature",
              // hide: true
            },
            {
              label: "从业人员照片",
              prop: "employerImg",
              labelWidth: 100,
              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,
              hide: true
            },
            {
              label: "入职时间",
              labelWidth: 100,
              hide: true,
              row: true,
              prop: "resignationTime",
              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: "请选择入职时间",
                trigger: "blur",
              }]
            },
            {
              label: "离职时间",
              labelWidth: 100,
              hide: true,
              row: true,
              prop: "employmentTime",
              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: "请选择离职时间",
                trigger: "blur",
              }]
            },
            {
              labelWidth: 100,
              label: "状态",
              prop: "resignationFlag",
              // hide: true
              type: "select",
              display: false,
              dicData: [{
                  label: "在职",
                  value: 1
                },
                {
                  label: "离职",
                  value: 2
                }
              ],
            },
          ]
        },
        holdPage: {
          pageSize: 20,
          currentPage: 1,
          total: 0,
        },
        houseHoldForm: {},
        houseOwnerOption: {
          submitBtn: false,
          emptyBtn: false,
          column: [
            {
              width: 96,
              label: "姓名",
              prop: "landlordName",
              search: true,
              searchSpan: 4,
              slot: true,
              overHidden: true
            },
            {
              width: 96,
              label: "身份证号",
              prop: "landlordIdCard",
              search: true,
              searchSpan: 4,
              slot: true,
              overHidden: true,
              rules: [{
                // validator: validatorPhone,
                trigger: "blur",
              }, ],
            },
            {
              width: 96,
              label: "手机号",
              prop: "landlordPhone",
              search: true,
              searchSpan: 4,
              slot: true,
              overHidden: true,
              rules: [{
                validator: validatorPhone,
                trigger: "blur",
              }, ],
            },
          ],
        },
        userOption: {
          submitBtn: false,
          emptyBtn: false,
          column: [
            {
              width: 96,
              label: "电话",
              prop: "legalTel",
              search: true,
              searchSpan: 4,
              slot: true,
              overHidden: true,
              rules: [{
                validator: validatorPhone,
                trigger: "blur",
              }, ],
            },
            {
              width: 96,
              label: "微信号",
              prop: "legalTel",
              search: true,
              searchSpan: 4,
              slot: true,
              overHidden: true,
              rules: [{
                validator: validatorPhone,
                trigger: "blur",
              }, ],
            },
          ],
        },
        standardAddressList: [], //标准地址数据
        standardAddress: "",
        standardAddressSearchKey: ""
      }
    },
      getHoldList(holdPage.currentPage, holdPage.pageSize, values).then(
        (res) => {
          const data = res.data.data
    components: {
      boxTitle
    },
          this.holdPage.total = data.total
          this.placeExt = data.records
    inject: ["placeElement"],
          this.loading = false
          this.selectionClear()
    watch: {
      'form.houseBindList': {
        handler(newData) {
          console.log("=======>", newData)
        }
      )
    },
      },
    holdCurrentChange(currentPage) {
      this.holdPage.currentPage = currentPage
    },
      'form.isNine': {
        handler(newData) {
          if (newData) {
            let nineTypeColumn = this.findObject(
              this.option.column,
              'nineType'
            )
    holdSizeChange(pageSize) {
      this.holdPage.pageSize = pageSize
    },
            if (newData == 1) {
              nineTypeColumn.display = true
            } else {
              nineTypeColumn.display = false
            }
          }
        },
      },
      'form.isFront': {
        handler(newData) {
          if (newData) {
            let frontTypeColumn = this.findObject(
              this.option.column,
              'frontType'
            )
    desposeImage(data) {
      if (data) {
        if (data.length > 0) {
          var urls = []
          var split = data.split(",").filter((item) => item != "")
          split.forEach((url) => {
            var names = url.split("jczz/")
            urls.push(names[1])
          })
          data = urls.join(",")
            if (newData == 1) {
              frontTypeColumn.display = true
            } else {
              frontTypeColumn.display = false
            }
          }
        }
      },
      'form.addressName': {
        handler(newData) {
          console.log("111111")
          const column = this.findObject(this.option.column, "houseCodeBinds")
          if (newData) {
            column.display = true;
          } else {
            column.display = false
          }
        }
      }
      return data
    },
    methods: {
      initOpen(newData) {
        console.log("item==>", newData);
        this.curRow = newData
        this.roleBox = true
        this.baseShow = false
        this.restShow = false
        this.form = {}
        this.placeForm = {}
    dataUpdate() {
      const that = this
        const that = this
      let imageUrls = this.desposeImage(this.form.imageUrls)
      let placeImages = this.desposeImage(this.placeForm.imageUrls)
      let placePlanImageUrls = this.desposeImage(this.placeForm.planImageUrls)
        that.$axios
          .all([getPlaceDetaill(newData["houseCode"]), getPlaceExt({
            placeId: newData["id"]
          }), getPlaceList()])
          .then(
            that.$axios.spread(function(baseInfo, restInfo) {
              console.log("houseCodeBinds===>", baseInfo.data.data.houseCodeBinds)
              that.form = baseInfo.data.data
              that.form.addressName = that.form.location;
              that.form.location = [
                that.form.lng,
                that.form.lat,
                that.form.location,
              ].join(",")
              if (baseInfo.data.data.houseCodeBinds) {
                that.standardAddressList = baseInfo.data.data.houseBindList;
                that.form.houseCodeBinds = baseInfo.data.data.houseCodeBinds.split(",")
              }
      let label = this.form.label
              if (that.form.imageUrls && that.form.imageUrls.length) {
                that.form.imageUrls = that.form.imageUrls
                  .split(",")
                  .filter((item) => item != "")
                  .map((item) => website.minioUrl + item)
                  .join(",")
              }
      if (this.form.smallLabel != "") {
        label = label + "," + this.form.smallLabel
      }
      delete this.form.smallLabel
      if (Array.isArray(this.form.houseCodeBinds)) {
        this.form.houseCodeBinds = this.form.houseCodeBinds.join(",")
      }
      this.$refs.baseForm.validate((valid, done, msg) => {
        if (valid) {
          that.$axios
            .all([
              update({
                // ...this.placeElement.curRow,
                ...this.form,
                imageUrls,
                label,
                ...this.locationDispose(this.form.location),
              }),
              updatePlaceExt({
                ...this.placeForm,
                imageUrls: placeImages,
                planImageUrls: placePlanImageUrls,
              }),
            ])
            .then(
              that.$axios.spread(function () {
                that.$message({
                  type: "success",
                  message: "操作成功!",
              if (
                that.form.placePoiLabelVOList &&
                that.form.placePoiLabelVOList.length
              ) {
                let lebelTwo = that.form.placePoiLabelVOList.find((item) => {
                  return item.type == 2
                })
                that.roleBoxClose()
                if (lebelTwo) that.form.label = String(lebelTwo.poiCode)
                that.placeElement.onLoad(
                  that.placeElement.page,
                  that.placeElement.query
                )
                let lebelThree = that.form.placePoiLabelVOList.find((item) => {
                  return item.type == 3
                })
                done()
              })
            )
        } else {
          console.log("error submit!!")
          return false
                if (lebelThree) that.form.smallLabel = String(lebelThree.poiCode)
              }
              that.baseShow = true
              const data = restInfo.data.data
              if (data) {
                let imageUrls = data.imageUrls
                let planImageUrls = data.planImageUrls
                if (imageUrls && imageUrls.length) {
                  imageUrls = imageUrls
                    .split(",")
                    .filter((item) => item != "")
                    .map((item) => website.minioUrl + item)
                    .join(",")
                }
                if (planImageUrls && planImageUrls.length) {
                  planImageUrls = planImageUrls
                    .split(",")
                    .filter((item) => item != "")
                    .map((item) => website.minioUrl + item)
                    .join(",")
                }
                that.placeForm = {
                  ...data,
                  imageUrls,
                  planImageUrls,
                }
              }
              that.restShow = true
            })
          )
        that.getPlaceAddressListRequest()
      },
      locationDispose(data) {
        data = data.split(",")
        return {
          longitude: data[0],
          latitude: data[1],
          location: data[2],
        }
      })
      },
      selectionClear() {
        this.$nextTick(() => {
          this.$refs.crud && this.$refs.crud.toggleSelection()
        })
      },
      houseHoldRowUpdate(row, index, done, loading) {
        holdUpdate(row).then(
          () => {
            this.holdOnLoad(this.holdPage)
            this.$message({
              type: "success",
              message: "操作成功!",
            })
            done()
          },
          (error) => {
            window.console.log(error)
            loading()
          }
        )
      },
      houseHoldRowDel(row) {
        this.$confirm("确定将选择数据删除?", {
            confirmButtonText: "确定",
            cancelButtonText: "取消",
            type: "warning",
          })
          .then(() => {
            return holdRemove(row.id)
          })
          .then(() => {
            this.holdOnLoad(this.holdPage)
            this.$message({
              type: "success",
              message: "操作成功!",
            })
          })
      },
      houseHoldRowSave(row, done, loading) {
        holdAdd({
          ...row,
          placeId: this.curRow.id,
        }).then(
          () => {
            this.holdOnLoad(this.holdPage)
            this.$message({
              type: "success",
              message: "操作成功!",
            })
            done()
          },
          (error) => {
            window.console.log(error)
            loading()
          }
        )
      },
      refreshHoldChange() {
        this.holdOnLoad(this.holdPage)
      },
      holdOnLoad(holdPage, params = {}) {
        if (!this.curRow.id) return
        let values = {
          ...params,
          placeId: this.curRow.id,
        }
        getHoldList(holdPage.currentPage, holdPage.pageSize, values).then(
          (res) => {
            const data = res.data.data
            this.holdPage.total = data.total
            this.placeExt = data.records
            this.loading = false
            this.selectionClear()
          }
        )
      },
      holdCurrentChange(currentPage) {
        this.holdPage.currentPage = currentPage
      },
      holdSizeChange(pageSize) {
        this.holdPage.pageSize = pageSize
      },
      desposeImage(data) {
        if (data) {
          if (data.length > 0) {
            var urls = []
            var split = data.split(",").filter((item) => item != "")
            split.forEach((url) => {
              var names = url.split("jczz/")
              urls.push(names[1])
            })
            data = urls.join(",")
          }
        }
        return data
      },
      dataUpdate() {
        const that = this
        let imageUrls = this.desposeImage(this.form.imageUrls)
        let placeImages = this.desposeImage(this.placeForm.imageUrls)
        let placePlanImageUrls = this.desposeImage(this.placeForm.planImageUrls)
        let label = this.form.label
        if (this.form.smallLabel != "") {
          label = label + "," + this.form.smallLabel
        }
        delete this.form.smallLabel
        if (Array.isArray(this.form.houseCodeBinds)) {
          this.form.houseCodeBinds = this.form.houseCodeBinds.join(",")
        }
        this.form.placeExtEntity = null
        this.$refs.baseForm.validate((valid, done, msg) => {
          if (valid) {
            that.$axios
              .all([
                update({
                  // ...this.placeElement.curRow,
                  ...this.form,
                  imageUrls,
                  label,
                  ...this.locationDispose(this.form.location),
                }),
                updatePlaceExt({
                  ...this.placeForm,
                  imageUrls: placeImages,
                  planImageUrls: placePlanImageUrls,
                }),
              ])
              .then(
                that.$axios.spread(function() {
                  that.$message({
                    type: "success",
                    message: "操作成功!",
                  })
                  that.roleBoxClose()
                  that.placeElement.onLoad(
                    that.placeElement.page,
                    that.placeElement.query
                  )
                  done()
                })
              )
          } else {
            console.log("error submit!!")
            return false
          }
        })
      },
      roleBoxClose() {
        this.form = {}
        this.placeForm = {}
        this.$refs.baseForm && this.$refs.baseForm.resetForm()
        this.$refs.restForm && this.$refs.restForm.resetForm()
        this.baseShow = false
        this.restShow = false
        this.roleBox = false
      },
      getPlaceAddressListRequest(query) {
        getPlaceAddressList({
          addressName: query
        }).then(res => {
          this.standardAddressList = res.data.data;
        })
      },
      onSelectChange(e) {
        console.log("selectChange===>", e);
        // this.getPlaceAddressListRequest()
      },
      onRemoteMethod(query) {
        console.log("remote===>", query)
        this.getPlaceAddressListRequest(query)
      },
    },
    roleBoxClose() {
      this.form = {}
      this.placeForm = {}
      this.$refs.baseForm && this.$refs.baseForm.resetForm()
      this.$refs.restForm && this.$refs.restForm.resetForm()
      this.baseShow = false
      this.restShow = false
      this.roleBox = false
    },
    getPlaceAddressListRequest(query) {
      getPlaceAddressList({
        addressName: query
      }).then(res => {
        this.standardAddressList = res.data.data;
      })
    },
    onSelectChange(e) {
      console.log("selectChange===>", e);
      // this.getPlaceAddressListRequest()
    },
    onRemoteMethod(query) {
      console.log("remote===>", query)
      this.getPlaceAddressListRequest(query)
    },
  },
}
  }
</script>
<style lang="scss" scoped>
.cur-container-box {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow: hidden;
  .content-box {
    margin: 0 4px;
    padding: 0 10px;
    height: 0;
    flex: 1;
    overflow: hidden;
    overflow-y: auto;
  }
  .footer-btn-box {
    margin-top: 10px;
  .cur-container-box {
    display: flex;
    justify-content: center;
    flex-direction: column;
    width: 100%;
    height: 100%;
    overflow: hidden;
    .content-box {
      margin: 0 4px;
      padding: 0 10px;
      height: 0;
      flex: 1;
      overflow: hidden;
      overflow-y: auto;
    }
    .footer-btn-box {
      margin-top: 10px;
      display: flex;
      justify-content: center;
    }
  }
}
</style>
</style>
src/views/property/process/maintenanceFundApply/detail.vue
@@ -75,389 +75,387 @@
      </el-card>
    </el-form>
    <deitDiscussion ref="DeitDiscussion">
  </deitDiscussion>
    </deitDiscussion>
  </basic-container>
</template>
<script>
import {
  historyFlowList,
  leaveDetail
} from "@/api/work/process";
import {
  getList,
  remove,
  update,
  add,
  getPropertyCapitalApply
} from "@/api/property/propertyCapitalApply";
  import {
    historyFlowList,
    leaveDetail
  } from "@/api/work/process";
  import {
    getList,
    remove,
    update,
    add,
    getPropertyCapitalApply
  } from "@/api/property/propertyCapitalApply";
import {
  getLists
} from "@/api/discuss/topics"
import deitDiscussion from "../../components/deitDiscussion.vue"
export default {
  components: {
    deitDiscussion
  },
  data() {
    return {
      businessId: '',
      processInstanceId: '',
      src: '',
      flowList: [],
      form: {
        flow: {
          assigneeName: '',
        },
        startTime: '',
        endTime: '',
        reason: '',
      },
      option: {
        height: "auto",
        calcHeight: 54,
        dialogWidth: 1150,
        tip: false,
        searchShow: true,
        searchMenuSpan: 3,
        menuWidth: 350,
        border: true,
        //stripe:true,
        submitBtn: false,
        emptyBtn: false,
        index: true,
        viewBtn: true,
        selection: true,
        dialogClickModal: false,
        column: [{
          label: "小区",
          prop: "districtId",
          searchSpan: 5,
          search: true,
          type: 'tree',
          dicUrl: `/api/blade-district/district/getDistrictTree`,
          cascader: ['articleId'],
          props: {
            label: "name",
            value: "id"
  import {
    getLists
  } from "@/api/discuss/topics"
  import deitDiscussion from "../../components/deitDiscussion.vue"
  export default {
    components: {
      deitDiscussion
    },
    data() {
      return {
        businessId: '',
        processInstanceId: '',
        src: '',
        flowList: [],
        form: {
          flow: {
            assigneeName: '',
          },
          defaultExpandedKeys: ["361102003"],
          span: 12,
          labelWidth: 120,
          width: 220,
          overHidden: true,
          rules: [{
            required: true,
            message: "请选择小区",
            trigger: "blur",
          },],
          disabled: true
          startTime: '',
          endTime: '',
          reason: '',
        },
        {
          label: '维修项目名称',
          prop: 'name',
          searchLabelWidth: 120,
          searchSpan: 5,
          search: true,
          span: 12,
          labelWidth: 140,
          rules: [{
            required: true,
            message: "请输入维修项目名称",
            trigger: "blur",
          },],
          disabled: true
        },
        {
          label: "预计开工时间",
          prop: "runTime",
          span: 12,
          labelWidth: 140,
          type: "date",
          format: "yyyy-MM-dd",
          valueFormat: "yyyy-MM-dd",
          rules: [{
            required: true,
            message: "请选择合同开始时间",
            trigger: "blur",
          },],
          disabled: true
        },
        {
          label: "预计竣工时间",
          prop: "completedTime",
          labelWidth: 140,
          span: 12,
          type: "date",
          format: "yyyy-MM-dd",
          valueFormat: "yyyy-MM-dd",
          rules: [{
            required: true,
            message: "请选择合同结束时间",
            trigger: "blur",
          },],
          disabled: true
        },
        {
          label: "项目分摊方式",
          prop: "allocationWay",
          labelWidth: 140,
          value: '按建筑面积分摊',
          span: 12,
          row: true,
          disabled: true
        },
        {
          label: '联系人',
          prop: 'linkman',
          span: 12,
          labelWidth: 120,
          search: true,
          searchSpan: 4,
          rules: [{
            required: true,
            message: "请输入联系人",
            trigger: "blur",
          },],
          disabled: true
        },
        {
          label: '联系方式',
          prop: 'linkPhone',
          span: 12,
          labelWidth: 140,
          rules: [{
            required: true,
            message: "请输入联系方式",
            trigger: "blur",
          },],
          disabled: true
        },
        {
          label: "项目预算总金额(元)",
          prop: "budgetAmount",
          span: 12,
          hide: true,
          labelWidth: 140,
          type: 'number',
          precision: 2,
          value: '0.00',
          disabled: true
        },
        {
          label: "实际预算金额(元)",
          prop: "actualAmount",
          span: 12,
          hide: true,
          labelWidth: 140,
          type: 'number',
          precision: 2,
          value: '0.00',
          disabled: true
        },
        {
          label: "自筹金额(元)",
          prop: "selfAmount",
          span: 12,
          hide: true,
          labelWidth: 140,
          type: 'number',
          precision: 2,
          value: '0.00',
          disabled: true
        },
        {
          label: "预算应拨付金额(元)",
          prop: "budgetAppropriateAmount",
          span: 12,
          hide: true,
          labelWidth: 140,
          type: 'number',
          precision: 2,
          value: '0.00',
          disabled: true
        },
        {
          disabled:true,
          display: false,
          hide: true,
          parent: false,
          label: "投票结果",
          prop: "articleId",
          search: false,
          viewDisabled: false,
          type: 'select',
          dicUrl: `/api/blade-article/article/getArticleByDistrictId?type=4&eventType=1&districtId={{districtId}}`,
          cascader: ['vote'],
          props: {
            label: "title",
            value: "id"
          },
          defaultExpandedKeys: ["361102003"],
          span: 12,
          labelWidth:140,
          rules: [{
            required: true,
            message: "请选择投票结果",
            trigger: "blur",
          },],
          change: (val) => {
            console.log("val===>", val)
            // console.log("form===>",this.form)
            if (val.value && !this.form.id) {
              this.articleRange = val.articleRange;
              // this.showDialog = true;
              // this.getDetail(val.value, val.articleRange)
        option: {
          height: "auto",
          calcHeight: 54,
          dialogWidth: 1150,
          tip: false,
          searchShow: true,
          searchMenuSpan: 3,
          menuWidth: 350,
          border: true,
          //stripe:true,
          submitBtn: false,
          emptyBtn: false,
          index: true,
          viewBtn: true,
          selection: true,
          dialogClickModal: false,
          column: [{
              label: "小区",
              prop: "districtId",
              searchSpan: 5,
              search: true,
              type: 'tree',
              dicUrl: `/api/blade-district/district/getDistrictTree`,
              cascader: ['articleId'],
              props: {
                label: "name",
                value: "id"
              },
              defaultExpandedKeys: ["361102003"],
              span: 12,
              labelWidth: 120,
              width: 220,
              overHidden: true,
              rules: [{
                required: true,
                message: "请选择小区",
                trigger: "blur",
              }, ],
              disabled: true
            },
            {
              label: '维修项目名称',
              prop: 'name',
              searchLabelWidth: 120,
              searchSpan: 5,
              search: true,
              span: 12,
              labelWidth: 140,
              rules: [{
                required: true,
                message: "请输入维修项目名称",
                trigger: "blur",
              }, ],
              disabled: true
            },
            {
              label: "预计开工时间",
              prop: "runTime",
              span: 12,
              labelWidth: 140,
              type: "date",
              format: "yyyy-MM-dd",
              valueFormat: "yyyy-MM-dd",
              rules: [{
                required: true,
                message: "请选择合同开始时间",
                trigger: "blur",
              }, ],
              disabled: true
            },
            {
              label: "预计竣工时间",
              prop: "completedTime",
              labelWidth: 140,
              span: 12,
              type: "date",
              format: "yyyy-MM-dd",
              valueFormat: "yyyy-MM-dd",
              rules: [{
                required: true,
                message: "请选择合同结束时间",
                trigger: "blur",
              }, ],
              disabled: true
            },
            {
              label: "楼栋",
              prop: "buildingName",
              labelWidth: 140,
              value: '',
              span: 12,
              row: true,
              disabled: true
            },
            {
              label: '联系人',
              prop: 'linkman',
              span: 12,
              labelWidth: 120,
              search: true,
              searchSpan: 4,
              rules: [{
                required: true,
                message: "请输入联系人",
                trigger: "blur",
              }, ],
              disabled: true
            },
            {
              label: '联系方式',
              prop: 'linkPhone',
              span: 12,
              labelWidth: 140,
              rules: [{
                required: true,
                message: "请输入联系方式",
                trigger: "blur",
              }, ],
              disabled: true
            },
            {
              label: "项目预算总金额(元)",
              prop: "budgetAmount",
              span: 12,
              hide: true,
              labelWidth: 140,
              type: 'number',
              precision: 2,
              value: '0.00',
              disabled: true
            },
            {
              label: "实际预算金额(元)",
              prop: "actualAmount",
              span: 12,
              hide: true,
              labelWidth: 140,
              type: 'number',
              precision: 2,
              value: '0.00',
              disabled: true
            },
            {
              label: "自筹金额(元)",
              prop: "selfAmount",
              span: 12,
              hide: true,
              labelWidth: 140,
              type: 'number',
              precision: 2,
              value: '0.00',
              disabled: true
            },
            {
              label: "预算应拨付金额(元)",
              prop: "budgetAppropriateAmount",
              span: 12,
              hide: true,
              labelWidth: 140,
              type: 'number',
              precision: 2,
              value: '0.00',
              disabled: true
            },
            {
              disabled: true,
              display: false,
              hide: true,
              parent: false,
              label: "投票结果",
              prop: "articleId",
              search: false,
              viewDisabled: false,
              type: 'select',
              dicUrl: `/api/blade-article/article/getArticleByDistrictId?type=4&eventType=1&districtId={{districtId}}`,
              cascader: ['vote'],
              props: {
                label: "title",
                value: "id"
              },
              defaultExpandedKeys: ["361102003"],
              span: 12,
              labelWidth: 140,
              rules: [{
                required: true,
                message: "请选择投票结果",
                trigger: "blur",
              }, ],
              change: (val) => {
                console.log("val===>", val)
                // console.log("form===>",this.form)
                if (val.value && !this.form.id) {
                  this.articleRange = val.articleRange;
                  // this.showDialog = true;
                  // this.getDetail(val.value, val.articleRange)
                }
              }
            },
            {
              disabled: true,
              display: false,
              span: 24,
              hide: true,
              prop: "vote",
              slot: true,
              label: "投票详情",
              labelWidth: 140,
            },
            {
              label: "项目摘要",
              span: 24,
              hide: true,
              prop: "projectDigest",
              placeholder: "例如:“XX小区XX栋XX设施设备维修,总的预算金额是X,是否含有审价,本次维修涉及范围共XX户,总面积的建筑面积为XX平方米”",
              labelWidth: 140,
              type: "textarea",
              disabled: true
            },
            {
              label: "项目进度描述",
              span: 24,
              hide: true,
              prop: "projectDescribe",
              labelWidth: 140,
              type: "textarea",
              disabled: true
            },
            {
              label: '施工方案附件',
              prop: 'constructionSchemeUrls',
              type: 'upload',
              span: 24,
              hide: true,
              labelWidth: 140,
              multiple: true,
              // showFileList: true,
              propsHttp: {
                res: 'data',
                name: "originalName",
                url: "link"
              },
              action: '/api/blade-resource/oss/endpoint/put-file-attach',
              rules: [{
                required: true,
                message: "请上传施工方案",
                trigger: "blur",
              }, ],
            }
          ],
        },
        topictData: [],
        topicTitle: "",
        articleRange: ""
      }
    },
    watch: {
      'form.districtId': {
        handler(newData) {
          const column = this.findObject(this.option.column, "articleId")
          if (newData && this.form.articleId) {
            column.display = true;
          } else {
            column.display = false
          }
        },
        {
          disabled: true,
          display: false,
          span: 24,
          hide: true,
          prop: "vote",
          slot: true,
          label: "投票详情",
          labelWidth: 140,
        },
        {
          label: "项目摘要",
          span: 24,
          hide: true,
          prop: "projectDigest",
          placeholder: "例如:“XX小区XX栋XX设施设备维修,总的预算金额是X,是否含有审价,本次维修涉及范围共XX户,总面积的建筑面积为XX平方米”",
          labelWidth: 140,
          type: "textarea",
          disabled: true
        },
        {
          label: "项目进度描述",
          span: 24,
          hide: true,
          prop: "projectDescribe",
          labelWidth: 140,
          type: "textarea",
          disabled: true
        },
        {
          label: '施工方案附件',
          prop: 'constructionSchemeUrls',
          type: 'upload',
          span: 24,
          hide: true,
          labelWidth: 140,
          multiple: true,
          // showFileList: true,
          propsHttp: {
            res: 'data',
            name: "originalName",
            url: "link"
          },
          action: '/api/blade-resource/oss/endpoint/put-file-attach',
          rules: [{
            required: true,
            message: "请上传施工方案",
            trigger: "blur",
          },],
        }
        ],
      },
      topictData: [],
      topicTitle: "",
      articleRange: ""
      'form.articleId': {
        handler(newData) {
          this.getVoteDetail(this.form.articleId, this.articleRange)
          const column = this.findObject(this.option.column, "vote")
          if (newData) {
            column.display = true;
          } else {
            column.display = false
          }
        }
      },
    },
    created() {
      this.init();
    },
    methods: {
      init() {
        this.processInstanceId = this.$route.params.processInstanceId;
        this.businessId = this.$route.params.businessId;
        historyFlowList(this.processInstanceId).then(res => {
          const data = res.data;
          if (data.success) {
            this.flowList = data.data;
          }
        })
        getPropertyCapitalApply(this.businessId).then(res => {
          const data = res.data;
          if (data.success) {
            this.form = data.data;
          }
        })
      },
      handleCancel() {
        this.$router.$avueRouter.closeTag();
        this.$router.push({
          path: `/work/start`
        });
      },
      getVoteDetail(articleId, districtId) {
        let params = {
          level: 1,
          articleId: articleId,
          districtId: districtId
        }
        getLists(1, 10, params).then(res => {
          const data = res.data.data
          if (data.length) {
            this.topictData = data[0].children;
            this.topicTitle = data[0].discussContent;
          }
        })
      },
      openUserPopup(row) {
        this.$refs.DeitDiscussion.openUser(row, 1, [this.form.districtId])
      },
    }
  },
  watch: {
    'form.districtId': {
      handler(newData) {
        const column = this.findObject(this.option.column, "articleId")
        if (newData && this.form.articleId) {
          column.display = true;
        } else {
          column.display = false
        }
      }
    },
    'form.articleId': {
      handler(newData) {
        this.getVoteDetail(this.form.articleId, this.articleRange)
        const column = this.findObject(this.option.column, "vote")
        if (newData) {
          column.display = true;
        } else {
          column.display = false
        }
      }
    },
  },
  created() {
    this.init();
  },
  methods: {
    init() {
      this.processInstanceId = this.$route.params.processInstanceId;
      this.businessId = this.$route.params.businessId;
      historyFlowList(this.processInstanceId).then(res => {
        const data = res.data;
        if (data.success) {
          this.flowList = data.data;
        }
      })
      getPropertyCapitalApply(this.businessId).then(res => {
        const data = res.data;
        if (data.success) {
          this.form = data.data;
        }
      })
    },
    handleCancel() {
      this.$router.$avueRouter.closeTag();
      this.$router.push({
        path: `/work/start`
      });
    },
    getVoteDetail(articleId, districtId) {
      let params = {
        level: 1,
        articleId: articleId,
        districtId: districtId
      }
      getLists(1, 10, params).then(res => {
        const data = res.data.data
        if (data.length) {
          this.topictData = data[0].children;
          this.topicTitle = data[0].discussContent;
        }
      })
    },
    openUserPopup(row) {
      this.$refs.DeitDiscussion.openUser(row, 1, [this.form.districtId])
    },
  }
}
</script>
<style>
.workOrderStyle {
  font-weight: normal;
}
</style>
  .workOrderStyle {
    font-weight: normal;
  }
</style>
src/views/property/process/maintenanceFundApply/edit.vue
@@ -85,466 +85,468 @@
</template>
<script>
import {
  historyFlowList,
  leaveDetail
} from "@/api/work/process";
  import {
    historyFlowList,
    leaveDetail
  } from "@/api/work/process";
import {
  getList,
  remove,
  update,
  add,
  getPropertyCapitalApply
} from "@/api/property/propertyCapitalApply";
import {
  completeTask
} from "@/api/work/work";
import {
  getLists
} from "@/api/discuss/topics"
import deitDiscussion from "../../components/deitDiscussion.vue"
export default {
  components: {
    deitDiscussion
  },
  data() {
    return {
      taskId: '',
      businessId: '',
      processInstanceId: '',
      src: '',
      flowList: [],
      form: {
        flow: {
          assigneeName: '',
        },
        startTime: '',
        endTime: '',
        reason: '',
        comment: '',
      },
      option: {
        height: "auto",
        calcHeight: 54,
        dialogWidth: 1150,
        tip: false,
        searchShow: true,
        searchMenuSpan: 3,
        menuWidth: 350,
        border: true,
        //stripe:true,
        submitBtn: false,
        emptyBtn: false,
        index: true,
        viewBtn: true,
        selection: true,
        dialogClickModal: false,
        column: [{
          label: "小区",
          prop: "districtId",
          searchSpan: 5,
          search: true,
          type: 'tree',
          dicUrl: `/api/blade-district/district/getDistrictTree`,
          cascader: ['articleId'],
          props: {
            label: "name",
            value: "id"
  import {
    getList,
    remove,
    update,
    add,
    getPropertyCapitalApply
  } from "@/api/property/propertyCapitalApply";
  import {
    completeTask
  } from "@/api/work/work";
  import {
    getLists
  } from "@/api/discuss/topics"
  import deitDiscussion from "../../components/deitDiscussion.vue"
  export default {
    components: {
      deitDiscussion
    },
    data() {
      return {
        taskId: '',
        businessId: '',
        processInstanceId: '',
        src: '',
        flowList: [],
        form: {
          flow: {
            assigneeName: '',
          },
          defaultExpandedKeys: ["361102003"],
          span: 12,
          labelWidth: 140,
          width: 220,
          overHidden: true,
          rules: [{
            required: true,
            message: "请选择小区",
            trigger: "blur",
          },],
          startTime: '',
          endTime: '',
          reason: '',
          comment: '',
        },
        {
          label: '维修项目名称',
          prop: 'name',
          searchLabelWidth: 120,
          searchSpan: 5,
          search: true,
          span: 12,
          labelWidth: 140,
          rules: [{
            required: true,
            message: "请输入维修项目名称",
            trigger: "blur",
          },],
        },
        {
          label: "预计开工时间",
          prop: "runTime",
          span: 12,
          labelWidth: 140,
          type: "date",
          format: "yyyy-MM-dd",
          valueFormat: "yyyy-MM-dd",
          rules: [{
            required: true,
            message: "请选择合同开始时间",
            trigger: "blur",
          },],
        },
        {
          label: "预计竣工时间",
          prop: "completedTime",
          labelWidth: 140,
          span: 12,
          type: "date",
          format: "yyyy-MM-dd",
          valueFormat: "yyyy-MM-dd",
          rules: [{
            required: true,
            message: "请选择合同结束时间",
            trigger: "blur",
          },],
        },
        {
          label: "项目分摊方式",
          prop: "allocationWay",
          labelWidth: 140,
          value: '按建筑面积分摊',
          span: 12,
          row: true,
        },
        {
          label: '联系人',
          prop: 'linkman',
          span: 12,
          labelWidth: 140,
          search: true,
          searchSpan: 4,
          rules: [{
            required: true,
            message: "请输入联系人",
            trigger: "blur",
          },],
        },
        {
          label: '联系方式',
          prop: 'linkPhone',
          span: 12,
          labelWidth: 140,
          rules: [{
            required: true,
            message: "请输入联系方式",
            trigger: "blur",
          },],
        },
        {
          label: "项目预算总金额(元)",
          prop: "budgetAmount",
          span: 12,
          hide: true,
          labelWidth: 140,
          type: 'number',
          precision: 2,
          value: '0.00',
        },
        {
          label: "实际预算金额(元)",
          prop: "actualAmount",
          span: 12,
          hide: true,
          labelWidth: 140,
          type: 'number',
          precision: 2,
          value: '0.00',
        },
        {
          label: "自筹金额(元)",
          prop: "selfAmount",
          span: 12,
          hide: true,
          labelWidth: 140,
          type: 'number',
          precision: 2,
          value: '0.00',
        },
        {
          label: "预算应拨付金额(元)",
          prop: "budgetAppropriateAmount",
          span: 12,
          hide: true,
          labelWidth: 140,
          type: 'number',
          precision: 2,
          value: '0.00',
        },
        {
          display: false,
          hide: true,
          parent: false,
          label: "投票结果",
          prop: "articleId",
          search: false,
          viewDisabled: false,
          type: 'select',
          dicUrl: `/api/blade-article/article/getArticleByDistrictId?type=4&eventType=1&districtIdList={{districtId}}`,
          // slot: true,
          formslot: true,
          cascader: ['vote'],
          props: {
            label: "title",
            value: "id"
          },
          defaultExpandedKeys: ["361102003"],
          span: 12,
          width: 260,
          rules: [{
            required: true,
            message: "请选择投票结果",
            trigger: "blur",
          },],
          change: (val) => {
            console.log("val===>", val)
            // console.log("form===>",this.form)
        option: {
          height: "auto",
          calcHeight: 54,
          dialogWidth: 1150,
          tip: false,
          searchShow: true,
          searchMenuSpan: 3,
          menuWidth: 350,
          border: true,
          //stripe:true,
          submitBtn: false,
          emptyBtn: false,
          index: true,
          viewBtn: true,
          selection: true,
          dialogClickModal: false,
          column: [{
              label: "小区",
              prop: "districtId",
              searchSpan: 5,
              search: true,
              type: 'tree',
              dicUrl: `/api/blade-district/district/getDistrictTree`,
              cascader: ['articleId'],
              props: {
                label: "name",
                value: "id"
              },
              defaultExpandedKeys: ["361102003"],
              span: 12,
              labelWidth: 140,
              width: 220,
              overHidden: true,
              rules: [{
                required: true,
                message: "请选择小区",
                trigger: "blur",
              }, ],
            },
            {
              label: '维修项目名称',
              prop: 'name',
              searchLabelWidth: 120,
              searchSpan: 5,
              search: true,
              span: 12,
              labelWidth: 140,
              rules: [{
                required: true,
                message: "请输入维修项目名称",
                trigger: "blur",
              }, ],
            },
            {
              label: "预计开工时间",
              prop: "runTime",
              span: 12,
              labelWidth: 140,
              type: "date",
              format: "yyyy-MM-dd",
              valueFormat: "yyyy-MM-dd",
              rules: [{
                required: true,
                message: "请选择合同开始时间",
                trigger: "blur",
              }, ],
            },
            {
              label: "预计竣工时间",
              prop: "completedTime",
              labelWidth: 140,
              span: 12,
              type: "date",
              format: "yyyy-MM-dd",
              valueFormat: "yyyy-MM-dd",
              rules: [{
                required: true,
                message: "请选择合同结束时间",
                trigger: "blur",
              }, ],
            },
            {
              label: "楼栋",
              prop: "buildingName",
              value: '',
              span: 12,
              row: true,
              rules: [{
                required: true,
                message: "请输入楼栋",
                trigger: "blur",
              }, ],
            },
            {
              label: '联系人',
              prop: 'linkman',
              span: 12,
              labelWidth: 140,
              search: true,
              searchSpan: 4,
              rules: [{
                required: true,
                message: "请输入联系人",
                trigger: "blur",
              }, ],
            },
            {
              label: '联系方式',
              prop: 'linkPhone',
              span: 12,
              labelWidth: 140,
              rules: [{
                required: true,
                message: "请输入联系方式",
                trigger: "blur",
              }, ],
            },
            {
              label: "项目预算总金额(元)",
              prop: "budgetAmount",
              span: 12,
              hide: true,
              labelWidth: 140,
              type: 'number',
              precision: 2,
              value: '0.00',
            },
            {
              label: "实际预算金额(元)",
              prop: "actualAmount",
              span: 12,
              hide: true,
              labelWidth: 140,
              type: 'number',
              precision: 2,
              value: '0.00',
            },
            {
              label: "自筹金额(元)",
              prop: "selfAmount",
              span: 12,
              hide: true,
              labelWidth: 140,
              type: 'number',
              precision: 2,
              value: '0.00',
            },
            {
              label: "预算应拨付金额(元)",
              prop: "budgetAppropriateAmount",
              span: 12,
              hide: true,
              labelWidth: 140,
              type: 'number',
              precision: 2,
              value: '0.00',
            },
            {
              display: false,
              hide: true,
              parent: false,
              label: "投票结果",
              prop: "articleId",
              search: false,
              viewDisabled: false,
              type: 'select',
              dicUrl: `/api/blade-article/article/getArticleByDistrictId?type=4&eventType=1&districtIdList={{districtId}}`,
              // slot: true,
              formslot: true,
              cascader: ['vote'],
              props: {
                label: "title",
                value: "id"
              },
              defaultExpandedKeys: ["361102003"],
              span: 12,
              width: 260,
              rules: [{
                required: true,
                message: "请选择投票结果",
                trigger: "blur",
              }, ],
              change: (val) => {
                console.log("val===>", val)
                // console.log("form===>",this.form)
              }
            },
            {
              display: false,
              span: 24,
              hide: true,
              prop: "vote",
              slot: true,
              label: "投票详情",
              labelWidth: 140,
            },
            {
              label: "项目摘要",
              span: 24,
              hide: true,
              prop: "projectDigest",
              placeholder: "例如:“XX小区XX栋XX设施设备维修,总的预算金额是X,是否含有审价,本次维修涉及范围共XX户,总面积的建筑面积为XX平方米”",
              labelWidth: 140,
              type: "textarea",
            },
            {
              label: "项目进度描述",
              span: 24,
              hide: true,
              prop: "projectDescribe",
              labelWidth: 140,
              type: "textarea",
            },
            // {
            //   label: "批复意见",
            //   span: 24,
            //   hide: true,
            //   prop: "comment",
            //   labelWidth: 140,
            //   type: "textarea",
            //   rules: [{
            //     required: true,
            //     message: "请输入批复意见",
            //     trigger: "blur",
            //   }, ],
            // },
            {
              label: '施工方案附件',
              prop: 'constructionSchemeUrls',
              type: 'upload',
              span: 24,
              hide: true,
              labelWidth: 140,
              multiple: true,
              // showFileList: true,
              propsHttp: {
                res: 'data',
                name: "originalName",
                url: "link"
              },
              action: '/api/blade-resource/oss/endpoint/put-file-attach',
              rules: [{
                required: true,
                message: "请上传施工方案",
                trigger: "blur",
              }, ],
            }
          ],
        },
        topictData: [],
        topicTitle: "",
        articleRange: ""
      }
    },
    watch: {
      'form.districtId': {
        handler(newData) {
          const column = this.findObject(this.option.column, "articleId")
          if (newData && this.form.articleId) {
            column.display = true;
          } else {
            column.display = false
          }
        },
        {
          display: false,
          span: 24,
          hide: true,
          prop: "vote",
          slot: true,
          label: "投票详情",
          labelWidth: 140,
        },
        {
          label: "项目摘要",
          span: 24,
          hide: true,
          prop: "projectDigest",
          placeholder: "例如:“XX小区XX栋XX设施设备维修,总的预算金额是X,是否含有审价,本次维修涉及范围共XX户,总面积的建筑面积为XX平方米”",
          labelWidth: 140,
          type: "textarea",
        },
        {
          label: "项目进度描述",
          span: 24,
          hide: true,
          prop: "projectDescribe",
          labelWidth: 140,
          type: "textarea",
        },
        // {
        //   label: "批复意见",
        //   span: 24,
        //   hide: true,
        //   prop: "comment",
        //   labelWidth: 140,
        //   type: "textarea",
        //   rules: [{
        //     required: true,
        //     message: "请输入批复意见",
        //     trigger: "blur",
        //   }, ],
        // },
        {
          label: '施工方案附件',
          prop: 'constructionSchemeUrls',
          type: 'upload',
          span: 24,
          hide: true,
          labelWidth: 140,
          multiple: true,
          // showFileList: true,
          propsHttp: {
            res: 'data',
            name: "originalName",
            url: "link"
          },
          action: '/api/blade-resource/oss/endpoint/put-file-attach',
          rules: [{
            required: true,
            message: "请上传施工方案",
            trigger: "blur",
          },],
        }
        ],
      },
      topictData: [],
      topicTitle: "",
      articleRange: ""
    }
  },
  watch: {
    'form.districtId': {
      handler(newData) {
        const column = this.findObject(this.option.column, "articleId")
        if (newData && this.form.articleId) {
          column.display = true;
        } else {
          column.display = false
      'form.articleId': {
        handler(newData) {
          this.getVoteDetail(this.form.articleId, this.articleRange)
          const column = this.findObject(this.option.column, "vote")
          if (newData) {
            column.display = true;
          } else {
            column.display = false
          }
        }
      }
      },
    },
    'form.articleId': {
      handler(newData) {
        this.getVoteDetail(this.form.articleId, this.articleRange)
        const column = this.findObject(this.option.column, "vote")
        if (newData) {
          column.display = true;
        } else {
          column.display = false
        }
      }
    },
  },
  created() {
    this.init();
  },
  beforeRouteUpdate(to, from, next) {
    // 在当前路由改变,但是该组件被复用时调用
    // 举例来说,对于一个带有动态参数的路径 /foo/:id,在 /foo/1 和 /foo/2 之间跳转的时候
    // 由于会渲染同样的 Foo 组件,因此组件实例会被复用。而这个钩子就会在这个情况下被调用
    // 可以访问组件实例 `this`
    if (to.fullPath !== from.fullPath) {
      next();
    created() {
      this.init();
    }
  },
  methods: {
    handleSubmit(form, done, loading) {
      if (form.constructionSchemeUrls.length > 0) {
        var urls = []
        var split = form.constructionSchemeUrls.split(",");
        split.forEach(url => {
          var names = url.split("jczz/");
          urls.push(names[1])
    },
    beforeRouteUpdate(to, from, next) {
      // 在当前路由改变,但是该组件被复用时调用
      // 举例来说,对于一个带有动态参数的路径 /foo/:id,在 /foo/1 和 /foo/2 之间跳转的时候
      // 由于会渲染同样的 Foo 组件,因此组件实例会被复用。而这个钩子就会在这个情况下被调用
      // 可以访问组件实例 `this`
      if (to.fullPath !== from.fullPath) {
        next();
        this.init();
      }
    },
    methods: {
      handleSubmit(form, done, loading) {
        if (form.constructionSchemeUrls.length > 0) {
          var urls = []
          var split = form.constructionSchemeUrls.split(",");
          split.forEach(url => {
            var names = url.split("jczz/");
            urls.push(names[1])
          })
          form.constructionSchemeUrls = urls.join(",")
        }
        update(form).then(
          () => {
            this.onLoad(this.page);
            this.$message({
              type: "success",
              message: "操作成功!",
            });
            done();
          },
          (error) => {
            window.console.log(error);
            loading();
          }
        );
      },
      init() {
        this.taskId = this.$route.params.taskId;
        this.processInstanceId = this.$route.params.processInstanceId;
        this.businessId = this.$route.params.businessId;
        historyFlowList(this.processInstanceId).then(res => {
          const data = res.data;
          if (data.success) {
            this.flowList = data.data;
          }
        })
        form.constructionSchemeUrls = urls.join(",")
      }
      update(form).then(
        () => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          done();
        },
        (error) => {
          window.console.log(error);
          loading();
        getPropertyCapitalApply(this.businessId).then(res => {
          const data = res.data;
          if (data.success) {
            this.form = data.data;
          }
        })
      },
      handleAgree() {
        // if (!this.form.comment) {
        //   this.$message.warning('请先填写批复意见');
        //   return;
        // }
        const params = {
          taskId: this.taskId,
          processInstanceId: this.processInstanceId,
          flag: 'ok',
          comment: this.form.comment,
        };
        completeTask(params).then(res => {
          const data = res.data;
          if (data.success) {
            this.$message.success(data.msg);
            this.$router.$avueRouter.closeTag();
            this.$router.push({
              path: `/property/propertyCapitalApply`
            });
          } else {
            this.$message.error(data.msg || '提交失败');
          }
        })
      },
      handleDisagree() {
        this.form.comment = '关闭申请'
        if (!this.form.comment) {
          this.$message.warning('请先填写批复意见');
          return;
        }
      );
    },
    init() {
      this.taskId = this.$route.params.taskId;
      this.processInstanceId = this.$route.params.processInstanceId;
      this.businessId = this.$route.params.businessId;
      historyFlowList(this.processInstanceId).then(res => {
        const data = res.data;
        if (data.success) {
          this.flowList = data.data;
        }
      })
      getPropertyCapitalApply(this.businessId).then(res => {
        const data = res.data;
        if (data.success) {
          this.form = data.data;
        }
      })
    },
    handleAgree() {
      // if (!this.form.comment) {
      //   this.$message.warning('请先填写批复意见');
      //   return;
      // }
      const params = {
        taskId: this.taskId,
        processInstanceId: this.processInstanceId,
        flag: 'ok',
        comment: this.form.comment,
      };
      completeTask(params).then(res => {
        const data = res.data;
        if (data.success) {
          this.$message.success(data.msg);
          this.$router.$avueRouter.closeTag();
          this.$router.push({
            path: `/property/propertyCapitalApply`
          });
        } else {
          this.$message.error(data.msg || '提交失败');
        }
      })
    },
    handleDisagree() {
      this.form.comment = '关闭申请'
      if (!this.form.comment) {
        this.$message.warning('请先填写批复意见');
        return;
      }
      const params = {
        taskId: this.taskId,
        processInstanceId: this.processInstanceId,
        comment: this.form.comment,
      };
      completeTask(params).then(res => {
        const data = res.data;
        if (data.success) {
          this.$message.success(data.msg);
          this.$router.$avueRouter.closeTag();
          this.$router.push({
            path: `/property/propertyCapitalApply`
          });
        } else {
          this.$message.error(data.msg || '提交失败');
        }
      })
    },
    handleCancel() {
      this.$router.$avueRouter.closeTag();
      this.$router.push({
        path: `/property/todo`
      });
    },
        const params = {
          taskId: this.taskId,
          processInstanceId: this.processInstanceId,
          comment: this.form.comment,
        };
        completeTask(params).then(res => {
          const data = res.data;
          if (data.success) {
            this.$message.success(data.msg);
            this.$router.$avueRouter.closeTag();
            this.$router.push({
              path: `/property/propertyCapitalApply`
            });
          } else {
            this.$message.error(data.msg || '提交失败');
          }
        })
      },
      handleCancel() {
        this.$router.$avueRouter.closeTag();
        this.$router.push({
          path: `/property/todo`
        });
      },
    getVoteDetail(articleId, districtId) {
      let params = {
        level: 1,
        articleId: articleId,
        districtId: districtId
      }
      getLists(1, 10, params).then(res => {
        const data = res.data.data
        if (data.length) {
          this.topictData = data[0].children;
          this.topicTitle = data[0].discussContent;
      getVoteDetail(articleId, districtId) {
        let params = {
          level: 1,
          articleId: articleId,
          districtId: districtId
        }
      })
    },
        getLists(1, 10, params).then(res => {
          const data = res.data.data
          if (data.length) {
            this.topictData = data[0].children;
            this.topicTitle = data[0].discussContent;
          }
        })
      },
    openUserPopup(row) {
      this.$refs.DeitDiscussion.openUser(row, 1, [this.form.districtId])
    },
      openUserPopup(row) {
        this.$refs.DeitDiscussion.openUser(row, 1, [this.form.districtId])
      },
    }
  }
}
</script>
<style>
.workOrderStyle {
  font-weight: normal;
}
</style>
  .workOrderStyle {
    font-weight: normal;
  }
</style>
src/views/property/process/maintenanceFundApply/form.vue
@@ -100,12 +100,13 @@
              }, ],
            },
            {
              label: "项目分摊方式",
              prop: "allocationWay",
              label: "楼栋",
              prop: "buildingName",
              labelWidth: 140,
              value: '按建筑面积分摊',
              value: '',
              span: 12,
              row: true,
              disabled: true
            },
            {
              label: '联系人',
@@ -264,4 +265,4 @@
      }
    }
  }
</script>
</script>
src/views/property/process/maintenanceFundApply/handle.vue
@@ -81,461 +81,462 @@
</template>
<script>
import {
  historyFlowList,
  leaveDetail
} from "@/api/work/process"
  import {
    historyFlowList,
    leaveDetail
  } from "@/api/work/process"
import {
  getList,
  remove,
  update,
  add,
  getPropertyCapitalApply
} from "@/api/property/propertyCapitalApply"
import {
  completeTask
} from "@/api/work/work"
import website from '@/config/website'
import {
  getLists
} from "@/api/discuss/topics"
import deitDiscussion from "../../components/deitDiscussion.vue"
  import {
    getList,
    remove,
    update,
    add,
    getPropertyCapitalApply
  } from "@/api/property/propertyCapitalApply"
  import {
    completeTask
  } from "@/api/work/work"
  import website from '@/config/website'
  import {
    getLists
  } from "@/api/discuss/topics"
  import deitDiscussion from "../../components/deitDiscussion.vue"
export default {
  components: {
    deitDiscussion
  },
  data() {
    return {
      taskId: '',
      businessId: '',
      processInstanceId: '',
      src: '',
      flowList: [],
      form: {
        flow: {
          assigneeName: '',
        },
        startTime: '',
        endTime: '',
        reason: '',
      },
      option: {
        height: "auto",
        calcHeight: 54,
        dialogWidth: 1150,
        tip: false,
        searchShow: true,
        searchMenuSpan: 3,
        menuWidth: 350,
        border: true,
        //stripe:true,
        submitBtn: false,
        emptyBtn: false,
        index: true,
        viewBtn: true,
        selection: true,
        dialogClickModal: false,
        column: [{
          label: "小区",
          prop: "districtId",
          searchSpan: 5,
          search: true,
          type: 'tree',
          dicUrl: `/api/blade-district/district/getDistrictTree`,
          cascader: ['articleId'],
          props: {
            label: "name",
            value: "id"
  export default {
    components: {
      deitDiscussion
    },
    data() {
      return {
        taskId: '',
        businessId: '',
        processInstanceId: '',
        src: '',
        flowList: [],
        form: {
          flow: {
            assigneeName: '',
          },
          defaultExpandedKeys: ["361102003"],
          span: 12,
          labelWidth: 140,
          overHidden: true,
          rules: [{
            required: true,
            message: "请选择小区",
            trigger: "blur",
          },],
          disabled: true
          startTime: '',
          endTime: '',
          reason: '',
        },
        {
          label: '维修项目名称',
          prop: 'name',
          searchLabelWidth: 120,
          searchSpan: 5,
          search: true,
          span: 12,
          labelWidth: 140,
          width: 220,
          rules: [{
            required: true,
            message: "请输入维修项目名称",
            trigger: "blur",
          },],
          disabled: true
        option: {
          height: "auto",
          calcHeight: 54,
          dialogWidth: 1150,
          tip: false,
          searchShow: true,
          searchMenuSpan: 3,
          menuWidth: 350,
          border: true,
          //stripe:true,
          submitBtn: false,
          emptyBtn: false,
          index: true,
          viewBtn: true,
          selection: true,
          dialogClickModal: false,
          column: [{
              label: "小区",
              prop: "districtId",
              searchSpan: 5,
              search: true,
              type: 'tree',
              dicUrl: `/api/blade-district/district/getDistrictTree`,
              cascader: ['articleId'],
              props: {
                label: "name",
                value: "id"
              },
              defaultExpandedKeys: ["361102003"],
              span: 12,
              labelWidth: 140,
              overHidden: true,
              rules: [{
                required: true,
                message: "请选择小区",
                trigger: "blur",
              }, ],
              disabled: true
            },
            {
              label: '维修项目名称',
              prop: 'name',
              searchLabelWidth: 120,
              searchSpan: 5,
              search: true,
              span: 12,
              labelWidth: 140,
              width: 220,
              rules: [{
                required: true,
                message: "请输入维修项目名称",
                trigger: "blur",
              }, ],
              disabled: true
            },
            {
              label: "预计开工时间",
              prop: "runTime",
              span: 12,
              labelWidth: 140,
              type: "date",
              format: "yyyy-MM-dd",
              valueFormat: "yyyy-MM-dd",
              rules: [{
                required: true,
                message: "请选择合同开始时间",
                trigger: "blur",
              }, ],
              disabled: true
            },
            {
              label: "预计竣工时间",
              prop: "completedTime",
              labelWidth: 140,
              span: 12,
              type: "date",
              format: "yyyy-MM-dd",
              valueFormat: "yyyy-MM-dd",
              rules: [{
                required: true,
                message: "请选择合同结束时间",
                trigger: "blur",
              }, ],
              disabled: true
            },
            {
              label: "楼栋",
              prop: "buildingName",
              labelWidth: 140,
              value: '',
              span: 12,
              row: true,
              disabled: true
            },
            {
              label: '联系人',
              prop: 'linkman',
              span: 12,
              labelWidth: 140,
              search: true,
              searchSpan: 4,
              rules: [{
                required: true,
                message: "请输入联系人",
                trigger: "blur",
              }, ],
              disabled: true
            },
            {
              label: '联系方式',
              prop: 'linkPhone',
              span: 12,
              labelWidth: 140,
              rules: [{
                required: true,
                message: "请输入联系方式",
                trigger: "blur",
              }, ],
              disabled: true
            },
            {
              label: "项目预算总金额(元)",
              prop: "budgetAmount",
              span: 12,
              hide: true,
              labelWidth: 140,
              type: 'number',
              precision: 2,
              value: '0.00',
              disabled: true
            },
            {
              label: "实际预算金额(元)",
              prop: "actualAmount",
              span: 12,
              hide: true,
              labelWidth: 140,
              type: 'number',
              precision: 2,
              value: '0.00',
              disabled: true
            },
            {
              label: "自筹金额(元)",
              prop: "selfAmount",
              span: 12,
              hide: true,
              labelWidth: 140,
              type: 'number',
              precision: 2,
              value: '0.00',
              disabled: true
            },
            {
              label: "预算应拨付金额(元)",
              prop: "budgetAppropriateAmount",
              span: 12,
              hide: true,
              labelWidth: 140,
              type: 'number',
              precision: 2,
              value: '0.00',
              disabled: true
            },
            {
              disabled: true,
              display: false,
              hide: true,
              parent: false,
              label: "投票结果",
              prop: "articleId",
              search: false,
              viewDisabled: false,
              type: 'select',
              dicUrl: `/api/blade-article/article/getArticleByDistrictId?type=4&eventType=1&districtIdList={{districtId}}`,
              // slot: true,
              formslot: true,
              cascader: ['vote'],
              props: {
                label: "title",
                value: "id"
              },
              defaultExpandedKeys: ["361102003"],
              span: 12,
              labelWidth: 140,
              rules: [{
                required: true,
                message: "请选择议事",
                trigger: "blur",
              }, ],
              change: (val) => {
                console.log("val===>", val)
                // console.log("form===>",this.form)
              }
            },
            {
              disabled: true,
              display: false,
              span: 24,
              hide: true,
              prop: "vote",
              // formslot: true,
              slot: true,
              label: "投票详情",
              labelWidth: 140
            },
            {
              label: "项目摘要",
              span: 24,
              hide: true,
              prop: "projectDigest",
              placeholder: "例如:“XX小区XX栋XX设施设备维修,总的预算金额是X,是否含有审价,本次维修涉及范围共XX户,总面积的建筑面积为XX平方米”",
              labelWidth: 140,
              type: "textarea",
              disabled: true
            },
            {
              label: "项目进度描述",
              span: 24,
              hide: true,
              prop: "projectDescribe",
              labelWidth: 140,
              type: "textarea",
              disabled: true
            }, {
              label: "批复意见",
              span: 24,
              hide: true,
              prop: "comment",
              labelWidth: 140,
              type: "textarea",
              rules: [{
                required: true,
                message: "请输入批复意见",
                trigger: "blur",
              }, ],
            },
            {
              label: '施工方案附件',
              prop: 'constructionSchemeUrls',
              type: 'upload',
              listType: 'picture-img',
              span: 24,
              hide: true,
              labelWidth: 140,
              multiple: true,
              // showFileList: true,
              propsHttp: {
                res: 'data',
                name: "originalName",
                url: "link"
              },
              action: '/api/blade-resource/oss/endpoint/put-file-attach',
              rules: [{
                required: true,
                message: "请上传施工方案",
                trigger: "blur",
              }, ],
            }
          ],
        },
        {
          label: "预计开工时间",
          prop: "runTime",
          span: 12,
          labelWidth: 140,
          type: "date",
          format: "yyyy-MM-dd",
          valueFormat: "yyyy-MM-dd",
          rules: [{
            required: true,
            message: "请选择合同开始时间",
            trigger: "blur",
          },],
          disabled: true
        },
        {
          label: "预计竣工时间",
          prop: "completedTime",
          labelWidth: 140,
          span: 12,
          type: "date",
          format: "yyyy-MM-dd",
          valueFormat: "yyyy-MM-dd",
          rules: [{
            required: true,
            message: "请选择合同结束时间",
            trigger: "blur",
          },],
          disabled: true
        },
        {
          label: "项目分摊方式",
          prop: "allocationWay",
          labelWidth: 140,
          value: '按建筑面积分摊',
          span: 12,
          // row: true,
          disabled: true
        },
        {
          label: '联系人',
          prop: 'linkman',
          span: 12,
          labelWidth: 140,
          search: true,
          searchSpan: 4,
          rules: [{
            required: true,
            message: "请输入联系人",
            trigger: "blur",
          },],
          disabled: true
        },
        {
          label: '联系方式',
          prop: 'linkPhone',
          span: 12,
          labelWidth: 140,
          rules: [{
            required: true,
            message: "请输入联系方式",
            trigger: "blur",
          },],
          disabled: true
        },
        {
          label: "项目预算总金额(元)",
          prop: "budgetAmount",
          span: 12,
          hide: true,
          labelWidth: 140,
          type: 'number',
          precision: 2,
          value: '0.00',
          disabled: true
        },
        {
          label: "实际预算金额(元)",
          prop: "actualAmount",
          span: 12,
          hide: true,
          labelWidth: 140,
          type: 'number',
          precision: 2,
          value: '0.00',
          disabled: true
        },
        {
          label: "自筹金额(元)",
          prop: "selfAmount",
          span: 12,
          hide: true,
          labelWidth: 140,
          type: 'number',
          precision: 2,
          value: '0.00',
          disabled: true
        },
        {
          label: "预算应拨付金额(元)",
          prop: "budgetAppropriateAmount",
          span: 12,
          hide: true,
          labelWidth: 140,
          type: 'number',
          precision: 2,
          value: '0.00',
          disabled: true
        },
        {
          disabled: true,
          display: false,
          hide: true,
          parent: false,
          label: "投票结果",
          prop: "articleId",
          search: false,
          viewDisabled: false,
          type: 'select',
          dicUrl: `/api/blade-article/article/getArticleByDistrictId?type=4&eventType=1&districtIdList={{districtId}}`,
          // slot: true,
          formslot: true,
          cascader: ['vote'],
          props: {
            label: "title",
            value: "id"
          },
          defaultExpandedKeys: ["361102003"],
          span: 12,
          labelWidth: 140,
          rules: [{
            required: true,
            message: "请选择议事",
            trigger: "blur",
          },],
          change: (val) => {
            console.log("val===>", val)
            // console.log("form===>",this.form)
        topictData: [],
        topicTitle: "",
        articleRange: ""
      }
    },
    watch: {
      'form.districtId': {
        handler(newData) {
          const column = this.findObject(this.option.column, "articleId")
          if (newData && this.form.articleId) {
            column.display = true;
          } else {
            column.display = false
          }
        },
        {
          disabled: true,
          display: false,
          span: 24,
          hide: true,
          prop: "vote",
          // formslot: true,
          slot:true,
          label: "投票详情",
          labelWidth:140
        },
        {
          label: "项目摘要",
          span: 24,
          hide: true,
          prop: "projectDigest",
          placeholder: "例如:“XX小区XX栋XX设施设备维修,总的预算金额是X,是否含有审价,本次维修涉及范围共XX户,总面积的建筑面积为XX平方米”",
          labelWidth: 140,
          type: "textarea",
          disabled: true
        },
        {
          label: "项目进度描述",
          span: 24,
          hide: true,
          prop: "projectDescribe",
          labelWidth: 140,
          type: "textarea",
          disabled: true
        }, {
          label: "批复意见",
          span: 24,
          hide: true,
          prop: "comment",
          labelWidth: 140,
          type: "textarea",
          rules: [{
            required: true,
            message: "请输入批复意见",
            trigger: "blur",
          },],
        },
        {
          label: '施工方案附件',
          prop: 'constructionSchemeUrls',
          type: 'upload',
          listType: 'picture-img',
          span: 24,
          hide: true,
          labelWidth: 140,
          multiple: true,
          // showFileList: true,
          propsHttp: {
            res: 'data',
            name: "originalName",
            url: "link"
          },
          action: '/api/blade-resource/oss/endpoint/put-file-attach',
          rules: [{
            required: true,
            message: "请上传施工方案",
            trigger: "blur",
          },],
        }
        ],
      },
      topictData: [],
      topicTitle: "",
      articleRange: ""
    }
  },
  watch: {
    'form.districtId': {
      handler(newData) {
        const column = this.findObject(this.option.column, "articleId")
        if (newData && this.form.articleId) {
          column.display = true;
        } else {
          column.display = false
      'form.articleId': {
        handler(newData) {
          console.log("data===>", newData)
          this.getVoteDetail(this.form.articleId, this.articleRange)
          const column = this.findObject(this.option.column, "vote")
          if (newData) {
            column.display = true;
          } else {
            column.display = false
          }
        }
      }
    },
    'form.articleId': {
      handler(newData) {
        console.log("data===>", newData)
        this.getVoteDetail(this.form.articleId, this.articleRange)
        const column = this.findObject(this.option.column, "vote")
        if (newData) {
          column.display = true;
        } else {
          column.display = false
        }
      }
      },
    },
  },
  created() {
    this.init()
  },
  beforeRouteUpdate(to, from, next) {
    // 在当前路由改变,但是该组件被复用时调用
    // 举例来说,对于一个带有动态参数的路径 /foo/:id,在 /foo/1 和 /foo/2 之间跳转的时候
    // 由于会渲染同样的 Foo 组件,因此组件实例会被复用。而这个钩子就会在这个情况下被调用
    // 可以访问组件实例 `this`
    if (to.fullPath !== from.fullPath) {
      next()
    created() {
      this.init()
    },
    beforeRouteUpdate(to, from, next) {
      // 在当前路由改变,但是该组件被复用时调用
      // 举例来说,对于一个带有动态参数的路径 /foo/:id,在 /foo/1 和 /foo/2 之间跳转的时候
      // 由于会渲染同样的 Foo 组件,因此组件实例会被复用。而这个钩子就会在这个情况下被调用
      // 可以访问组件实例 `this`
      if (to.fullPath !== from.fullPath) {
        next()
        this.init()
      }
    },
    methods: {
      init() {
        this.taskId = this.$route.params.taskId
        this.processInstanceId = this.$route.params.processInstanceId
        this.businessId = this.$route.params.businessId
        historyFlowList(this.processInstanceId).then(res => {
          const data = res.data
          if (data.success) {
            this.flowList = data.data
          }
        })
        getPropertyCapitalApply(this.businessId).then(res => {
          const data = res.data
          if (data.success) {
            data.data.constructionSchemeUrls = website.minioUrl + data.data.constructionSchemeUrls
            this.form = data.data
          }
        })
      },
      handleAgree() {
        if (!this.form.comment) {
          this.$message.warning('请先填写批复意见')
          return
        }
        const params = {
          taskId: this.taskId,
          processInstanceId: this.processInstanceId,
          flag: 'ok',
          comment: this.form.comment,
        }
        completeTask(params).then(res => {
          const data = res.data
          if (data.success) {
            this.$message.success(data.msg)
            this.$router.$avueRouter.closeTag()
            this.$router.push({
              path: `/property/todo`
            })
          } else {
            this.$message.error(data.msg || '提交失败')
          }
        })
      },
      handleDisagree() {
        if (!this.form.comment) {
          this.$message.warning('请先填写批复意见')
          return
        }
        const params = {
          taskId: this.taskId,
          processInstanceId: this.processInstanceId,
          comment: this.form.comment,
        }
        completeTask(params).then(res => {
          const data = res.data
          if (data.success) {
            this.$message.success(data.msg)
            this.$router.$avueRouter.closeTag()
            this.$router.push({
              path: `/property/todo`
            })
          } else {
            this.$message.error(data.msg || '提交失败')
          }
        })
      },
      handleCancel() {
        this.$router.$avueRouter.closeTag()
        this.$router.push({
          path: `/property/todo`
        })
      },
      getVoteDetail(articleId, districtId) {
        let params = {
          level: 1,
          articleId: articleId,
          districtId: districtId
        }
        getLists(1, 10, params).then(res => {
          const data = res.data.data
          if (data.length) {
            this.topictData = data[0].children;
            this.topicTitle = data[0].discussContent;
          }
        })
      },
      openUserPopup(row) {
        this.$refs.DeitDiscussion.openUser(row, 1, [this.form.districtId])
      },
    }
  },
  methods: {
    init() {
      this.taskId = this.$route.params.taskId
      this.processInstanceId = this.$route.params.processInstanceId
      this.businessId = this.$route.params.businessId
      historyFlowList(this.processInstanceId).then(res => {
        const data = res.data
        if (data.success) {
          this.flowList = data.data
        }
      })
      getPropertyCapitalApply(this.businessId).then(res => {
        const data = res.data
        if (data.success) {
          data.data.constructionSchemeUrls = website.minioUrl + data.data.constructionSchemeUrls
          this.form = data.data
        }
      })
    },
    handleAgree() {
      if (!this.form.comment) {
        this.$message.warning('请先填写批复意见')
        return
      }
      const params = {
        taskId: this.taskId,
        processInstanceId: this.processInstanceId,
        flag: 'ok',
        comment: this.form.comment,
      }
      completeTask(params).then(res => {
        const data = res.data
        if (data.success) {
          this.$message.success(data.msg)
          this.$router.$avueRouter.closeTag()
          this.$router.push({
            path: `/property/todo`
          })
        } else {
          this.$message.error(data.msg || '提交失败')
        }
      })
    },
    handleDisagree() {
      if (!this.form.comment) {
        this.$message.warning('请先填写批复意见')
        return
      }
      const params = {
        taskId: this.taskId,
        processInstanceId: this.processInstanceId,
        comment: this.form.comment,
      }
      completeTask(params).then(res => {
        const data = res.data
        if (data.success) {
          this.$message.success(data.msg)
          this.$router.$avueRouter.closeTag()
          this.$router.push({
            path: `/property/todo`
          })
        } else {
          this.$message.error(data.msg || '提交失败')
        }
      })
    },
    handleCancel() {
      this.$router.$avueRouter.closeTag()
      this.$router.push({
        path: `/property/todo`
      })
    },
    getVoteDetail(articleId, districtId) {
      let params = {
        level: 1,
        articleId: articleId,
        districtId: districtId
      }
      getLists(1, 10, params).then(res => {
        const data = res.data.data
        if (data.length) {
          this.topictData = data[0].children;
          this.topicTitle = data[0].discussContent;
        }
      })
    },
    openUserPopup(row) {
      this.$refs.DeitDiscussion.openUser(row, 1, [this.form.districtId])
    },
  }
}
</script>
<style scoped>
.container {
  position: relative;
  /* 确保按钮相对于该元素定位 */
}
  .container {
    position: relative;
    /* 确保按钮相对于该元素定位 */
  }
#myButton {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}
.workOrderStyle {
  font-weight: normal;
}
</style>
  #myButton {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
  }
  .workOrderStyle {
    font-weight: normal;
  }
</style>
src/views/property/propertyCapitalApply.vue
@@ -80,964 +80,968 @@
  </basic-container>
</template>
<script>
import {
  getList,
  remove,
  update,
  add,
  getPropertyCapitalApply
} from "@/api/property/propertyCapitalApply"
import {
  mapGetters
} from "vuex"
import website from '@/config/website'
import func from "@/util/func"
import {
  getLists,
} from "@/api/discuss/topics"
  import {
    getList,
    remove,
    update,
    add,
    getPropertyCapitalApply
  } from "@/api/property/propertyCapitalApply"
  import {
    mapGetters
  } from "vuex"
  import website from '@/config/website'
  import func from "@/util/func"
  import {
    getLists,
  } from "@/api/discuss/topics"
import deitDiscussion from "./components/deitDiscussion"
  import deitDiscussion from "./components/deitDiscussion"
export default {
  components: {
    deitDiscussion
  },
  data() {
    return {
      showDialog: false,
      form: {
        // constructionSchemeUrls:[]
      },
      query: {},
      loading: true,
      page: {
        pageSize: 10,
        currentPage: 1,
        total: 0,
      },
      datetime: "",
      selectionList: [],
      option: {
        labelWidth: 154,
        searchLabelWidth: 96,
        searchShow: true,
        searchMenuSpan: 3,
        menuWidth: 210,
        height: "auto",
        calcHeight: 54,
        dialogWidth: 1150,
        tip: false,
        border: true,
        //stripe:true,
        index: true,
        editBtn: false,
        viewBtn: false,
        delBtn: false,
        selection: true,
        dialogClickModal: false,
        viewBtnText: "查看申请",
        column: [{
          width: 220,
          overHidden: true,
          label: '小区名称',
          addDisplay: false,
          editDisplay: false,
          viewDisplay: false,
          prop: "districtName",
          search: true,
          searchSpan: 4,
          searchLabelWidth: 76,
          rules: [{
            required: true,
            message: "请输入小区名称",
            trigger: "blur",
          }],
        },
        {
          hide: true,
          parent: false,
          label: "小区",
          prop: "districtId",
          search: false,
          type: 'tree',
          dicUrl: `/api/blade-district/district/getDistrictTree?filterFlag=1`,
          cascader: ['articleId'],
          props: {
            label: "name",
            value: "id"
          },
          defaultExpandedKeys: ["361102003"],
          span: 12,
          width: 260,
          rules: [{
            required: true,
            message: "请选择小区",
            trigger: "blur",
          },],
        },
        {
          label: '维修项目名称',
          prop: 'name',
          searchSpan: 5,
          searchLabelWidth: 124,
          search: true,
          span: 12,
          rules: [{
            required: true,
            message: "请输入维修项目名称",
            trigger: "blur",
          },],
        },
        {
          width: 110,
          label: "所属街道",
          addDisplay: false,
          editDisplay: false,
          viewDisplay: false,
          prop: "streetName",
          search: true,
          searchSpan: 4
        },
        {
          width: 156,
          overHidden: true,
          label: "所属社区",
          addDisplay: false,
          editDisplay: false,
          viewDisplay: false,
          prop: "communityName",
          search: true,
          searchSpan: 4
        },
        {
          width: 100,
          label: "预计开工时间",
          prop: "runTime",
          span: 12,
          type: "date",
          format: "yyyy-MM-dd",
          valueFormat: "yyyy-MM-dd",
          rules: [{
            required: true,
            message: "请选择合同开始时间",
            trigger: "blur",
          },],
        },
        {
          width: 100,
          label: "预计竣工时间",
          prop: "completedTime",
          span: 12,
          type: "date",
          format: "yyyy-MM-dd",
          valueFormat: "yyyy-MM-dd",
          rules: [{
            required: true,
            message: "请选择合同结束时间",
            trigger: "blur",
          },],
        },
        {
          label: "项目分摊方式",
          prop: "allocationWay",
          value: '按建筑面积分摊',
          span: 12,
          row: true,
        },
        {
          width: 110,
          label: '联系人',
          prop: 'linkman',
          span: 12,
          searchSpan: 4,
          searchLabelWidth: 80,
          search: true,
          rules: [{
            required: true,
            message: "请输入联系人",
            trigger: "blur",
          },],
        },
        {
          width: 120,
          label: '联系方式',
          prop: 'linkPhone',
          span: 12,
          rules: [{
            required: true,
            message: "请输入联系方式",
            trigger: "blur",
          },],
        },
        {
          width: 100,
          label: '申请时间',
          prop: 'applyTime',
          span: 12,
          display: false,
        }, {
          label: '审核进度',
          prop: 'applyStatus',
          span: 12,
          display: false,
          dicData: [{
            label: "待审核",
            value: 0,
          }, {
            label: "业委会",
            value: 1,
          }, {
            label: "街道",
            value: 2,
          }, {
            label: "区住建局",
            value: 3,
          }, {
            label: "调整申请",
            value: 4,
          }, {
            label: "审核通过",
            value: 5,
          }, {
            label: "审核不通过",
            value: 6,
          }, {
            label: "上饶住建局",
            value: 7,
          }]
        },
        {
          label: "项目预算总金额(元)",
          prop: "budgetAmount",
          span: 12,
          hide: true,
          type: 'number',
          precision: 2,
          value: '0.00'
        },
        {
          label: "实际预算金额(元)",
          prop: "actualAmount",
          span: 12,
          hide: true,
          type: 'number',
          precision: 2,
          value: '0.00'
        },
        {
          label: "自筹金额(元)",
          prop: "selfAmount",
          span: 12,
          hide: true,
          type: 'number',
          precision: 2,
          value: '0.00'
        },
        {
          label: "预算应拨付金额(元)",
          prop: "budgetAppropriateAmount",
          span: 12,
          hide: true,
          type: 'number',
          precision: 2,
          value: '0.00'
        },
        {
          display: false,
          hide: true,
          parent: false,
          label: "投票结果",
          prop: "articleId",
          search: false,
          viewDisabled: false,
          type: 'select',
          dicUrl: `/api/blade-article/article/getArticleByDistrictId?type=4&eventType=1&districtId={{districtId}}`,
          // slot: true,
          formslot: true,
          cascader: ['vote'],
          props: {
            label: "title",
            value: "id"
          },
          defaultExpandedKeys: ["361102003"],
          span: 12,
          width: 260,
          rules: [{
            required: true,
            message: "请选择议事",
            trigger: "blur",
          },],
          change: (val) => {
            console.log("val===>", val)
            // console.log("form===>",this.form)
            if (val.value && !this.form.id) {
              this.articleRange = val.articleRange;
              // this.showDialog = true;
              // this.getDetail(val.value, val.articleRange)
            }
          }
        },
        {
          display: false,
          span: 24,
          hide: true,
          prop: "vote",
          formslot: true,
          label: "投票详情"
        },
        {
          label: "项目摘要",
          span: 24,
          hide: true,
          prop: "projectDigest",
          placeholder: "例如:“XX小区XX栋XX设施设备维修,总的预算金额是X,是否含有审价,本次维修涉及范围共XX户,总面积的建筑面积为XX平方米”",
          type: "textarea"
        },
        {
          label: "项目进度描述",
          span: 24,
          hide: true,
          prop: "projectDescribe",
          type: "textarea"
        },
        // {
        //   label: '施工方案附件',
        //   prop: 'constructionSchemeUrls',
        //   type: 'upload',
        //   span: 24,
        //   hide: true,
        //   multiple: true,
        //   listType: "text",
        //   propsHttp: {
        //     res: 'data',
        //     name: "name",
        //     url: "link"
        //   },
        //   action: '/api/blade-resource/oss/endpoint/put-file-attach',
        //   rules: [{
        //     required: true,
        //     message: "请上传施工方案",
        //     trigger: "blur",
        //   }]
        // },
        {
          label: "维修资金使用申请审批表",
          offset: 2,
          labelPosition: "top",
          prop: "file1",
          type: "upload",
          listType: "text",
          action: "/api/blade-resource/oss/endpoint/put-file-attach",
          propsHttp: {
            res: "data",
            name: 'name',
            url: "link",
          },
          span: 24,
          hide: true,
          rules: [{
            required: true,
            message: "请上传文件",
            trigger: "blur",
          }],
        },
        {
          label: "申请使用维修资金的报告、附维修部位彩色照片、业委会(物管会)会议纪要(社区意见)",
          offset: 2,
          labelPosition: "top",
          prop: "file2",
          type: "upload",
          listType: "text",
          action: "/api/blade-resource/oss/endpoint/put-file-attach",
          propsHttp: {
            res: "data",
            name: 'name',
            url: "link",
          },
          span: 24,
          hide: true,
          rules: [{
            required: true,
            message: "请上传文件",
            trigger: "blur",
          }],
        },
        {
          label: "公示单,现场勘察图片、公示照片(公示期7天)",
          offset: 2,
          labelPosition: "top",
          prop: "file3",
          type: "upload",
          listType: "text",
          action: "/api/blade-resource/oss/endpoint/put-file-attach",
          propsHttp: {
            res: "data",
            name: 'name',
            url: "link",
          },
          span: 24,
          hide: true,
          rules: [{
            required: true,
            message: "请上传文件",
            trigger: "blur",
          }],
        },
        {
          label: "维修单位出具的工程款发票(验收合格后以竣工决算审核报告审定金额开具)",
          offset: 2,
          labelPosition: "top",
          prop: "file4",
          type: "upload",
          listType: "text",
          action: "/api/blade-resource/oss/endpoint/put-file-attach",
          propsHttp: {
            res: "data",
            name: 'name',
            url: "link",
          },
          span: 24,
          hide: true,
          rules: [{
            required: true,
            message: "请上传文件",
            trigger: "blur",
          }],
        },
        {
          label: "应急维修需提供专业机构出具的检验检测报告或(乡镇人民政府)街道办事处现场核实意见",
          offset: 2,
          labelPosition: "top",
          prop: "file5",
          type: "upload",
          listType: "text",
          action: "/api/blade-resource/oss/endpoint/put-file-attach",
          propsHttp: {
            res: "data",
            name: 'name',
            url: "link",
          },
          span: 24,
          hide: true,
          rules: [{
            required: true,
            message: "请上传文件",
            trigger: "blur",
          }],
        },
        {
          label: "业主签名表或线上表决记录(应急情况不提供)",
          offset: 2,
          labelPosition: "top",
          prop: "file6",
          type: "upload",
          listType: "text",
          action: "/api/blade-resource/oss/endpoint/put-file-attach",
          propsHttp: {
            res: "data",
            name: 'name',
            url: "link",
          },
          span: 24,
          hide: true,
          rules: [{
            required: true,
            message: "请上传文件",
            trigger: "blur",
          }],
        },
        {
          label: "政府采购资料",
          offset: 2,
          labelPosition: "top",
          prop: "file7",
          type: "upload",
          listType: "text",
          action: "/api/blade-resource/oss/endpoint/put-file-attach",
          propsHttp: {
            res: "data",
            name: 'name',
            url: "link",
          },
          span: 24,
          hide: true,
          rules: [{
            required: true,
            message: "请上传文件",
            trigger: "blur",
          }],
        },
        {
          label: "维修和更新、改造方案、维修项目的协议或合同",
          offset: 2,
          labelPosition: "top",
          prop: "file8",
          type: "upload",
          listType: "text",
          action: "/api/blade-resource/oss/endpoint/put-file-attach",
          propsHttp: {
            res: "data",
            name: 'name',
            url: "link",
          },
          span: 24,
          hide: true,
          rules: [{
            required: true,
            message: "请上传文件",
            trigger: "blur",
          }],
        },
        {
          label: "维修改造工程竣工验收单一式两份(维修完工需经申请人签字);维修项目签证单(超出预算清单内容的需出具签证单)",
          offset: 2,
          labelPosition: "top",
          prop: "file9",
          type: "upload",
          listType: "text",
          action: "/api/blade-resource/oss/endpoint/put-file-attach",
          propsHttp: {
            res: "data",
            name: 'name',
            url: "link",
          },
          span: 24,
          hide: true,
          rules: [{
            required: true,
            message: "请上传文件",
            trigger: "blur",
          }],
        },
        {
          label: "维修项目决算、造价机构出具的决算审价报告",
          offset: 2,
          labelPosition: "top",
          prop: "file10",
          type: "upload",
          listType: "text",
          action: "/api/blade-resource/oss/endpoint/put-file-attach",
          propsHttp: {
            res: "data",
            name: 'name',
            url: "link",
          },
          span: 24,
          hide: true,
          rules: [{
            required: true,
            message: "请上传文件",
            trigger: "blur",
          }],
        },
        {
          label: "业主委员会情况登记表;经办人或代理人证件(复印件),复印件上签名、联系电话",
          offset: 2,
          labelPosition: "top",
          prop: "file11",
          type: "upload",
          listType: "text",
          action: "/api/blade-resource/oss/endpoint/put-file-attach",
          propsHttp: {
            res: "data",
            name: 'name',
            url: "link",
          },
          span: 24,
          hide: true,
          rules: [{
            required: true,
            message: "请上传文件",
            trigger: "blur",
          }],
        },
        ],
      },
      data: [],
      optionList: {
        header: false,
        menu: false,
        headerAlign: 'center',
        align: 'center',
        border: true,
        addBtn: false,
        editBtn: false,
        delBtn: false,
        defaultExpandAll: true,
        rowKey: 'id',
        rowParentKey: 'parentId',
        column: [{
          label: '选项内容',
          prop: 'optionContent',
        },
        {
          label: '人数',
          prop: 'number',
          slot: true,
        }
        ]
      },
      topictData: [],
      topicTitle: "",
      articleRange: ""
    }
  },
  watch: {
    // 'form.districtId':{
    //   handler(newVal,oldVal){
    //     console.log("val===>", newVal)
    //     if(newVal){
    //         this.showDialog = true;
    //       }
    //   },
    //   deep: true,
    //     immediate: true
    // }
    'form.districtId': {
      handler(newData) {
        const column = this.findObject(this.option.column, "articleId")
        if (newData) {
          column.display = true;
        } else {
          column.display = false
        }
      }
  export default {
    components: {
      deitDiscussion
    },
    'form.articleId': {
      handler(newData) {
        console.log("data===>", newData)
        this.getDetail(this.form.articleId, this.articleRange)
        const column = this.findObject(this.option.column, "vote")
        if (newData) {
          column.display = true;
        } else {
          column.display = false
        }
      }
    },
  },
  computed: {
    ...mapGetters(["permission", "userInfo"]),
    permissionList() {
    data() {
      return {
        addBtn: this.vaildData(this.permission.propertyCapitalApply_add, true),
        viewBtn: this.vaildData(this.permission.propertyCapitalApply_view, true),
        delBtn: this.vaildData(this.permission.propertyCapitalApply_delete, true),
        editBtn: this.vaildData(this.permission.propertyCapitalApply_edit, true),
        showDialog: false,
        form: {
          // constructionSchemeUrls:[]
        },
        query: {},
        loading: true,
        page: {
          pageSize: 10,
          currentPage: 1,
          total: 0,
        },
        datetime: "",
        selectionList: [],
        option: {
          labelWidth: 154,
          searchLabelWidth: 96,
          searchShow: true,
          searchMenuSpan: 3,
          menuWidth: 210,
          height: "auto",
          calcHeight: 54,
          dialogWidth: 1150,
          tip: false,
          border: true,
          //stripe:true,
          index: true,
          editBtn: false,
          viewBtn: false,
          delBtn: false,
          selection: true,
          dialogClickModal: false,
          viewBtnText: "查看申请",
          column: [{
              width: 220,
              overHidden: true,
              label: '小区名称',
              addDisplay: false,
              editDisplay: false,
              viewDisplay: false,
              prop: "districtName",
              search: true,
              searchSpan: 4,
              searchLabelWidth: 76,
              rules: [{
                required: true,
                message: "请输入小区名称",
                trigger: "blur",
              }],
            },
            {
              hide: true,
              parent: false,
              label: "小区",
              prop: "districtId",
              search: false,
              type: 'tree',
              dicUrl: `/api/blade-district/district/getDistrictTree?filterFlag=1`,
              cascader: ['articleId'],
              props: {
                label: "name",
                value: "id"
              },
              defaultExpandedKeys: ["361102003"],
              span: 12,
              width: 260,
              rules: [{
                required: true,
                message: "请选择小区",
                trigger: "blur",
              }, ],
            },
            {
              label: '维修项目名称',
              prop: 'name',
              searchSpan: 5,
              searchLabelWidth: 124,
              search: true,
              span: 12,
              rules: [{
                required: true,
                message: "请输入维修项目名称",
                trigger: "blur",
              }, ],
            },
            {
              width: 110,
              label: "所属街道",
              addDisplay: false,
              editDisplay: false,
              viewDisplay: false,
              prop: "streetName",
              search: true,
              searchSpan: 4
            },
            {
              width: 156,
              overHidden: true,
              label: "所属社区",
              addDisplay: false,
              editDisplay: false,
              viewDisplay: false,
              prop: "communityName",
              search: true,
              searchSpan: 4
            },
            {
              width: 100,
              label: "预计开工时间",
              prop: "runTime",
              span: 12,
              type: "date",
              format: "yyyy-MM-dd",
              valueFormat: "yyyy-MM-dd",
              rules: [{
                required: true,
                message: "请选择合同开始时间",
                trigger: "blur",
              }, ],
            },
            {
              width: 100,
              label: "预计竣工时间",
              prop: "completedTime",
              span: 12,
              type: "date",
              format: "yyyy-MM-dd",
              valueFormat: "yyyy-MM-dd",
              rules: [{
                required: true,
                message: "请选择合同结束时间",
                trigger: "blur",
              }, ],
            },
            {
              label: "楼栋",
              prop: "buildingName",
              value: '',
              span: 12,
              row: true,
              rules: [{
                required: true,
                message: "请输入楼栋",
                trigger: "blur",
              }, ],
            },
            {
              width: 110,
              label: '联系人',
              prop: 'linkman',
              span: 12,
              searchSpan: 4,
              searchLabelWidth: 80,
              search: true,
              rules: [{
                required: true,
                message: "请输入联系人",
                trigger: "blur",
              }, ],
            },
            {
              width: 120,
              label: '联系方式',
              prop: 'linkPhone',
              span: 12,
              rules: [{
                required: true,
                message: "请输入联系方式",
                trigger: "blur",
              }, ],
            },
            {
              width: 100,
              label: '申请时间',
              prop: 'applyTime',
              span: 12,
              display: false,
            }, {
              label: '审核进度',
              prop: 'applyStatus',
              span: 12,
              display: false,
              dicData: [{
                label: "待审核",
                value: 0,
              }, {
                label: "业委会",
                value: 1,
              }, {
                label: "街道",
                value: 2,
              }, {
                label: "区住建局",
                value: 3,
              }, {
                label: "调整申请",
                value: 4,
              }, {
                label: "审核通过",
                value: 5,
              }, {
                label: "审核不通过",
                value: 6,
              }, {
                label: "上饶住建局",
                value: 7,
              }]
            },
            {
              label: "项目预算总金额(元)",
              prop: "budgetAmount",
              span: 12,
              hide: true,
              type: 'number',
              precision: 2,
              value: '0.00'
            },
            {
              label: "实际预算金额(元)",
              prop: "actualAmount",
              span: 12,
              hide: true,
              type: 'number',
              precision: 2,
              value: '0.00'
            },
            {
              label: "自筹金额(元)",
              prop: "selfAmount",
              span: 12,
              hide: true,
              type: 'number',
              precision: 2,
              value: '0.00'
            },
            {
              label: "预算应拨付金额(元)",
              prop: "budgetAppropriateAmount",
              span: 12,
              hide: true,
              type: 'number',
              precision: 2,
              value: '0.00'
            },
            {
              display: false,
              hide: true,
              parent: false,
              label: "投票结果",
              prop: "articleId",
              search: false,
              viewDisabled: false,
              type: 'select',
              dicUrl: `/api/blade-article/article/getArticleByDistrictId?type=4&eventType=1&districtId={{districtId}}`,
              // slot: true,
              formslot: true,
              cascader: ['vote'],
              props: {
                label: "title",
                value: "id"
              },
              defaultExpandedKeys: ["361102003"],
              span: 12,
              width: 260,
              rules: [{
                required: true,
                message: "请选择议事",
                trigger: "blur",
              }, ],
              change: (val) => {
                console.log("val===>", val)
                // console.log("form===>",this.form)
                if (val.value && !this.form.id) {
                  this.articleRange = val.articleRange;
                  // this.showDialog = true;
                  // this.getDetail(val.value, val.articleRange)
                }
              }
            },
            {
              display: false,
              span: 24,
              hide: true,
              prop: "vote",
              formslot: true,
              label: "投票详情"
            },
            {
              label: "项目摘要",
              span: 24,
              hide: true,
              prop: "projectDigest",
              placeholder: "例如:“XX小区XX栋XX设施设备维修,总的预算金额是X,是否含有审价,本次维修涉及范围共XX户,总面积的建筑面积为XX平方米”",
              type: "textarea"
            },
            {
              label: "项目进度描述",
              span: 24,
              hide: true,
              prop: "projectDescribe",
              type: "textarea"
            },
            // {
            //   label: '施工方案附件',
            //   prop: 'constructionSchemeUrls',
            //   type: 'upload',
            //   span: 24,
            //   hide: true,
            //   multiple: true,
            //   listType: "text",
            //   propsHttp: {
            //     res: 'data',
            //     name: "name",
            //     url: "link"
            //   },
            //   action: '/api/blade-resource/oss/endpoint/put-file-attach',
            //   rules: [{
            //     required: true,
            //     message: "请上传施工方案",
            //     trigger: "blur",
            //   }]
            // },
            {
              label: "维修资金使用申请审批表",
              offset: 2,
              labelPosition: "top",
              prop: "file1",
              type: "upload",
              listType: "text",
              action: "/api/blade-resource/oss/endpoint/put-file-attach",
              propsHttp: {
                res: "data",
                name: 'name',
                url: "link",
              },
              span: 24,
              hide: true,
              rules: [{
                required: true,
                message: "请上传文件",
                trigger: "blur",
              }],
            },
            {
              label: "申请使用维修资金的报告、附维修部位彩色照片、业委会(物管会)会议纪要(社区意见)",
              offset: 2,
              labelPosition: "top",
              prop: "file2",
              type: "upload",
              listType: "text",
              action: "/api/blade-resource/oss/endpoint/put-file-attach",
              propsHttp: {
                res: "data",
                name: 'name',
                url: "link",
              },
              span: 24,
              hide: true,
              rules: [{
                required: true,
                message: "请上传文件",
                trigger: "blur",
              }],
            },
            {
              label: "公示单,现场勘察图片、公示照片(公示期7天)",
              offset: 2,
              labelPosition: "top",
              prop: "file3",
              type: "upload",
              listType: "text",
              action: "/api/blade-resource/oss/endpoint/put-file-attach",
              propsHttp: {
                res: "data",
                name: 'name',
                url: "link",
              },
              span: 24,
              hide: true,
              rules: [{
                required: true,
                message: "请上传文件",
                trigger: "blur",
              }],
            },
            {
              label: "维修单位出具的工程款发票(验收合格后以竣工决算审核报告审定金额开具)",
              offset: 2,
              labelPosition: "top",
              prop: "file4",
              type: "upload",
              listType: "text",
              action: "/api/blade-resource/oss/endpoint/put-file-attach",
              propsHttp: {
                res: "data",
                name: 'name',
                url: "link",
              },
              span: 24,
              hide: true,
              rules: [{
                required: true,
                message: "请上传文件",
                trigger: "blur",
              }],
            },
            {
              label: "应急维修需提供专业机构出具的检验检测报告或(乡镇人民政府)街道办事处现场核实意见",
              offset: 2,
              labelPosition: "top",
              prop: "file5",
              type: "upload",
              listType: "text",
              action: "/api/blade-resource/oss/endpoint/put-file-attach",
              propsHttp: {
                res: "data",
                name: 'name',
                url: "link",
              },
              span: 24,
              hide: true,
              rules: [{
                required: true,
                message: "请上传文件",
                trigger: "blur",
              }],
            },
            {
              label: "业主签名表或线上表决记录(应急情况不提供)",
              offset: 2,
              labelPosition: "top",
              prop: "file6",
              type: "upload",
              listType: "text",
              action: "/api/blade-resource/oss/endpoint/put-file-attach",
              propsHttp: {
                res: "data",
                name: 'name',
                url: "link",
              },
              span: 24,
              hide: true,
              rules: [{
                required: true,
                message: "请上传文件",
                trigger: "blur",
              }],
            },
            {
              label: "政府采购资料",
              offset: 2,
              labelPosition: "top",
              prop: "file7",
              type: "upload",
              listType: "text",
              action: "/api/blade-resource/oss/endpoint/put-file-attach",
              propsHttp: {
                res: "data",
                name: 'name',
                url: "link",
              },
              span: 24,
              hide: true,
              rules: [{
                required: true,
                message: "请上传文件",
                trigger: "blur",
              }],
            },
            {
              label: "维修和更新、改造方案、维修项目的协议或合同",
              offset: 2,
              labelPosition: "top",
              prop: "file8",
              type: "upload",
              listType: "text",
              action: "/api/blade-resource/oss/endpoint/put-file-attach",
              propsHttp: {
                res: "data",
                name: 'name',
                url: "link",
              },
              span: 24,
              hide: true,
              rules: [{
                required: true,
                message: "请上传文件",
                trigger: "blur",
              }],
            },
            {
              label: "维修改造工程竣工验收单一式两份(维修完工需经申请人签字);维修项目签证单(超出预算清单内容的需出具签证单)",
              offset: 2,
              labelPosition: "top",
              prop: "file9",
              type: "upload",
              listType: "text",
              action: "/api/blade-resource/oss/endpoint/put-file-attach",
              propsHttp: {
                res: "data",
                name: 'name',
                url: "link",
              },
              span: 24,
              hide: true,
              rules: [{
                required: true,
                message: "请上传文件",
                trigger: "blur",
              }],
            },
            {
              label: "维修项目决算、造价机构出具的决算审价报告",
              offset: 2,
              labelPosition: "top",
              prop: "file10",
              type: "upload",
              listType: "text",
              action: "/api/blade-resource/oss/endpoint/put-file-attach",
              propsHttp: {
                res: "data",
                name: 'name',
                url: "link",
              },
              span: 24,
              hide: true,
              rules: [{
                required: true,
                message: "请上传文件",
                trigger: "blur",
              }],
            },
            {
              label: "业主委员会情况登记表;经办人或代理人证件(复印件),复印件上签名、联系电话",
              offset: 2,
              labelPosition: "top",
              prop: "file11",
              type: "upload",
              listType: "text",
              action: "/api/blade-resource/oss/endpoint/put-file-attach",
              propsHttp: {
                res: "data",
                name: 'name',
                url: "link",
              },
              span: 24,
              hide: true,
              rules: [{
                required: true,
                message: "请上传文件",
                trigger: "blur",
              }],
            },
          ],
        },
        data: [],
        optionList: {
          header: false,
          menu: false,
          headerAlign: 'center',
          align: 'center',
          border: true,
          addBtn: false,
          editBtn: false,
          delBtn: false,
          defaultExpandAll: true,
          rowKey: 'id',
          rowParentKey: 'parentId',
          column: [{
              label: '选项内容',
              prop: 'optionContent',
            },
            {
              label: '人数',
              prop: 'number',
              slot: true,
            }
          ]
        },
        topictData: [],
        topicTitle: "",
        articleRange: ""
      }
    },
    ids() {
      let ids = []
      this.selectionList.forEach((ele) => {
        ids.push(ele.id)
      })
      return ids.join(",")
    },
    watch: {
      // 'form.districtId':{
      //   handler(newVal,oldVal){
      //     console.log("val===>", newVal)
      //     if(newVal){
      //         this.showDialog = true;
      //       }
      //   },
      //   deep: true,
      //     immediate: true
      // }
    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")
      'form.districtId': {
        handler(newData) {
          const column = this.findObject(this.option.column, "articleId")
          if (newData) {
            column.display = true;
          } else {
            return row[type].replace(/^(.{3})(?:\d+)(.{4})$/, "$1****$2")
            column.display = false
          }
        }
      },
      'form.articleId': {
        handler(newData) {
          console.log("data===>", newData)
          this.getDetail(this.form.articleId, this.articleRange)
          const column = this.findObject(this.option.column, "vote")
          if (newData) {
            column.display = true;
          } else {
            column.display = false
          }
        }
      },
    },
    computed: {
      ...mapGetters(["permission", "userInfo"]),
      permissionList() {
        return {
          addBtn: this.vaildData(this.permission.propertyCapitalApply_add, true),
          viewBtn: this.vaildData(this.permission.propertyCapitalApply_view, true),
          delBtn: this.vaildData(this.permission.propertyCapitalApply_delete, true),
          editBtn: this.vaildData(this.permission.propertyCapitalApply_edit, true),
        }
      },
      ids() {
        let ids = []
        this.selectionList.forEach((ele) => {
          ids.push(ele.id)
        })
        return ids.join(",")
      },
      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: {
    rowView() {
      this.showDialog = false;
    },
    methods: {
    showStringDispose(row, type) {
      row[type] = !row[type]
    },
      rowView() {
        this.showDialog = false;
      },
    handleWork(row) {
      this.$router.push({
        path: `/property/process/maintenanceFundApply/edit/${row.taskId}/${row.processInstanceId}/${row.id}`
      })
    },
    goDetail(row) {
      this.$router.push({
        path: `/property/process/maintenanceFundApply/detail/${row.processInstanceId}/${row.id}`
      })
    },
    setFile(fileObj) {
      for (let i in fileObj) {
        fileObj[i] = func.join(fileObj[i])
        if (fileObj[i].length > 0) {
      showStringDispose(row, type) {
        row[type] = !row[type]
      },
      handleWork(row) {
        this.$router.push({
          path: `/property/process/maintenanceFundApply/edit/${row.taskId}/${row.processInstanceId}/${row.id}`
        })
      },
      goDetail(row) {
        this.$router.push({
          path: `/property/process/maintenanceFundApply/detail/${row.processInstanceId}/${row.id}`
        })
      },
      setFile(fileObj) {
        for (let i in fileObj) {
          fileObj[i] = func.join(fileObj[i])
          if (fileObj[i].length > 0) {
            var urls = []
            var split = fileObj[i].split(",")
            split.forEach(url => {
              var names = url.split("jczz/")
              urls.push(names[1])
            })
            fileObj[i] = urls.join(",")
          }
        }
        return fileObj;
      },
      rowSave(row, done, loading) {
        // row.constructionSchemeUrls = func.join(row.constructionSchemeUrls)
        // if (row.constructionSchemeUrls.length > 0) {
        //   var urls = []
        //   var split = row.constructionSchemeUrls.split(",")
        //   split.forEach(url => {
        //     var names = url.split("jczz/")
        //     urls.push(names[1])
        //   })
        //   row.constructionSchemeUrls = urls.join(",")
        // }
        let keys = ["file1", "file2", "file3", "file4", "file5", "file6", "file7", "file8", "file9", "file10", "file11"]
        let files = {};
        for (let i in row) {
          if (keys.indexOf(i) != -1) {
            files[i] = row[i];
          }
        }
        for (let k in files) {
          files[k] = func.join(files[k])
          if (files[k].length) {
            let urls = [];
            let split = files[k].split(",");
            split.forEach(url => {
              let names = url.split("jczz/");
              urls.push(names[1]);
            })
            files[k] = urls.join(",")
          }
        }
        row.attachment = JSON.stringify(files);
        for (let j in row) {
          if (keys.indexOf(j) != -1) {
            delete row[j];
          }
        }
        console.log("提交===>", row);
        row.propertyFlag = 1
        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.constructionSchemeUrls.length > 0) {
          var urls = []
          var split = fileObj[i].split(",")
          var split = row.constructionSchemeUrls.split(",")
          split.forEach(url => {
            var names = url.split("jczz/")
            urls.push(names[1])
          })
          fileObj[i] = urls.join(",")
          row.constructionSchemeUrls = urls.join(",")
        }
      }
      return fileObj;
    },
    rowSave(row, done, loading) {
      // row.constructionSchemeUrls = func.join(row.constructionSchemeUrls)
      // if (row.constructionSchemeUrls.length > 0) {
      //   var urls = []
      //   var split = row.constructionSchemeUrls.split(",")
      //   split.forEach(url => {
      //     var names = url.split("jczz/")
      //     urls.push(names[1])
      //   })
      //   row.constructionSchemeUrls = urls.join(",")
      // }
      let keys = ["file1", "file2", "file3", "file4", "file5", "file6", "file7", "file8", "file9", "file10", "file11"]
      let files = {};
      for (let i in row) {
        if (keys.indexOf(i) != -1) {
          files[i] = row[i];
        }
      }
      for (let k in files) {
        files[k] = func.join(files[k])
        if (files[k].length) {
          let urls = [];
          let split = files[k].split(",");
          split.forEach(url => {
            let names = url.split("jczz/");
            urls.push(names[1]);
          })
          files[k] = urls.join(",")
        }
      }
      row.attachment = JSON.stringify(files);
      for (let j in row) {
        if (keys.indexOf(j) != -1) {
          delete row[j];
        }
      }
      console.log("提交===>", row);
      row.propertyFlag = 1
      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.constructionSchemeUrls.length > 0) {
        var urls = []
        var split = row.constructionSchemeUrls.split(",")
        split.forEach(url => {
          var names = url.split("jczz/")
          urls.push(names[1])
        })
        row.constructionSchemeUrls = 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) {
      console.log(111);
      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)) {
        getPropertyCapitalApply(this.form.id).then((res) => {
          this.form = res.data.data
          this.form.propertyFlag = 1
          if (this.form.constructionSchemeUrls.length > 0) {
            var urls = []
            var names = this.form.constructionSchemeUrls.split(",")
            names.forEach(name => {
              urls.push(website.minioUrl + name)
        update(row).then(
          () => {
            this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!",
            })
            this.form.constructionSchemeUrls = urls.join(",")
            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) {
        console.log(111);
        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)) {
          getPropertyCapitalApply(this.form.id).then((res) => {
            this.form = res.data.data
            this.form.propertyFlag = 1
            if (this.form.constructionSchemeUrls.length > 0) {
              var urls = []
              var names = this.form.constructionSchemeUrls.split(",")
              names.forEach(name => {
                urls.push(website.minioUrl + name)
              })
              this.form.constructionSchemeUrls = urls.join(",")
            }
          })
        }
        // 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, 'linkPhoneflag', false)
            // if (item.constructionSchemeUrls.length > 0) {
            //   var urls = []
            //   var names = item.constructionSchemeUrls.split(",")
            //   names.forEach(name => {
            //     urls.push(website.minioUrl + name)
            //   })
            //   item.constructionSchemeUrls = urls.join(",")
            // }
          })
          this.loading = false
          this.selectionClear()
        })
      },
      getDetail(articleId, districtId) {
        let params = {
          level: 1,
          articleId: articleId,
          districtId: districtId
        }
        getLists(1, 10, params).then(res => {
          const data = res.data.data
          if (data.length) {
            this.topictData = data[0].children;
            this.topicTitle = data[0].discussContent;
          }
        })
      }
      // 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, 'linkPhoneflag', false)
          // if (item.constructionSchemeUrls.length > 0) {
          //   var urls = []
          //   var names = item.constructionSchemeUrls.split(",")
          //   names.forEach(name => {
          //     urls.push(website.minioUrl + name)
          //   })
          //   item.constructionSchemeUrls = urls.join(",")
          // }
        })
        this.loading = false
        this.selectionClear()
      })
    },
      },
    getDetail(articleId, districtId) {
      let params = {
        level: 1,
        articleId: articleId,
        districtId: districtId
      }
      getLists(1, 10, params).then(res => {
        const data = res.data.data
        if (data.length) {
          this.topictData = data[0].children;
          this.topicTitle = data[0].discussContent;
        }
      })
    },
      openUserPopup(row) {
        this.$refs.DeitDiscussion.openUser(row, 1, [this.form.districtId])
      },
    openUserPopup(row) {
      this.$refs.DeitDiscussion.openUser(row, 1, [this.form.districtId])
    },
    }
  }
}
</script>
<style>
.avue-upload__icon {
  line-height: 6;
}
  .avue-upload__icon {
    line-height: 6;
  }
.workOrderStyle {
  font-weight: normal;
}
</style>
  .workOrderStyle {
    font-weight: normal;
  }
</style>
src/views/propertySupervision/process/maintenanceFundApply/detail.vue
@@ -75,389 +75,387 @@
      </el-card>
    </el-form>
    <deitDiscussion ref="DeitDiscussion">
  </deitDiscussion>
    </deitDiscussion>
  </basic-container>
</template>
<script>
import {
  historyFlowList,
  leaveDetail
} from "@/api/work/process";
import {
  getList,
  remove,
  update,
  add,
  getPropertyCapitalApply
} from "@/api/property/propertyCapitalApply";
  import {
    historyFlowList,
    leaveDetail
  } from "@/api/work/process";
  import {
    getList,
    remove,
    update,
    add,
    getPropertyCapitalApply
  } from "@/api/property/propertyCapitalApply";
import {
  getLists
} from "@/api/discuss/topics"
import deitDiscussion from "../../components/deitDiscussion.vue"
export default {
  components: {
    deitDiscussion
  },
  data() {
    return {
      businessId: '',
      processInstanceId: '',
      src: '',
      flowList: [],
      form: {
        flow: {
          assigneeName: '',
        },
        startTime: '',
        endTime: '',
        reason: '',
      },
      option: {
        height: "auto",
        calcHeight: 54,
        dialogWidth: 1150,
        tip: false,
        searchShow: true,
        searchMenuSpan: 3,
        menuWidth: 350,
        border: true,
        //stripe:true,
        submitBtn: false,
        emptyBtn: false,
        index: true,
        viewBtn: true,
        selection: true,
        dialogClickModal: false,
        column: [{
          label: "小区",
          prop: "districtId",
          searchSpan: 5,
          search: true,
          type: 'tree',
          dicUrl: `/api/blade-district/district/getDistrictTree`,
          cascader: ['articleId'],
          props: {
            label: "name",
            value: "id"
  import {
    getLists
  } from "@/api/discuss/topics"
  import deitDiscussion from "../../components/deitDiscussion.vue"
  export default {
    components: {
      deitDiscussion
    },
    data() {
      return {
        businessId: '',
        processInstanceId: '',
        src: '',
        flowList: [],
        form: {
          flow: {
            assigneeName: '',
          },
          defaultExpandedKeys: ["361102003"],
          span: 12,
          labelWidth: 120,
          width: 220,
          overHidden: true,
          rules: [{
            required: true,
            message: "请选择小区",
            trigger: "blur",
          },],
          disabled: true
          startTime: '',
          endTime: '',
          reason: '',
        },
        {
          label: '维修项目名称',
          prop: 'name',
          searchLabelWidth: 120,
          searchSpan: 5,
          search: true,
          span: 12,
          labelWidth: 140,
          rules: [{
            required: true,
            message: "请输入维修项目名称",
            trigger: "blur",
          },],
          disabled: true
        },
        {
          label: "预计开工时间",
          prop: "runTime",
          span: 12,
          labelWidth: 140,
          type: "date",
          format: "yyyy-MM-dd",
          valueFormat: "yyyy-MM-dd",
          rules: [{
            required: true,
            message: "请选择合同开始时间",
            trigger: "blur",
          },],
          disabled: true
        },
        {
          label: "预计竣工时间",
          prop: "completedTime",
          labelWidth: 140,
          span: 12,
          type: "date",
          format: "yyyy-MM-dd",
          valueFormat: "yyyy-MM-dd",
          rules: [{
            required: true,
            message: "请选择合同结束时间",
            trigger: "blur",
          },],
          disabled: true
        },
        {
          label: "项目分摊方式",
          prop: "allocationWay",
          labelWidth: 140,
          value: '按建筑面积分摊',
          span: 12,
          row: true,
          disabled: true
        },
        {
          label: '联系人',
          prop: 'linkman',
          span: 12,
          labelWidth: 120,
          search: true,
          searchSpan: 4,
          rules: [{
            required: true,
            message: "请输入联系人",
            trigger: "blur",
          },],
          disabled: true
        },
        {
          label: '联系方式',
          prop: 'linkPhone',
          span: 12,
          labelWidth: 140,
          rules: [{
            required: true,
            message: "请输入联系方式",
            trigger: "blur",
          },],
          disabled: true
        },
        {
          label: "项目预算总金额(元)",
          prop: "budgetAmount",
          span: 12,
          hide: true,
          labelWidth: 140,
          type: 'number',
          precision: 2,
          value: '0.00',
          disabled: true
        },
        {
          label: "实际预算金额(元)",
          prop: "actualAmount",
          span: 12,
          hide: true,
          labelWidth: 140,
          type: 'number',
          precision: 2,
          value: '0.00',
          disabled: true
        },
        {
          label: "自筹金额(元)",
          prop: "selfAmount",
          span: 12,
          hide: true,
          labelWidth: 140,
          type: 'number',
          precision: 2,
          value: '0.00',
          disabled: true
        },
        {
          label: "预算应拨付金额(元)",
          prop: "budgetAppropriateAmount",
          span: 12,
          hide: true,
          labelWidth: 140,
          type: 'number',
          precision: 2,
          value: '0.00',
          disabled: true
        },
        {
          disabled:true,
          display: false,
          hide: true,
          parent: false,
          label: "投票结果",
          prop: "articleId",
          search: false,
          viewDisabled: false,
          type: 'select',
          dicUrl: `/api/blade-article/article/getArticleByDistrictId?type=4&eventType=1&districtId={{districtId}}`,
          cascader: ['vote'],
          props: {
            label: "title",
            value: "id"
          },
          defaultExpandedKeys: ["361102003"],
          span: 12,
          labelWidth:140,
          rules: [{
            required: true,
            message: "请选择投票结果",
            trigger: "blur",
          },],
          change: (val) => {
            console.log("val===>", val)
            // console.log("form===>",this.form)
            if (val.value && !this.form.id) {
              this.articleRange = val.articleRange;
              // this.showDialog = true;
              // this.getDetail(val.value, val.articleRange)
        option: {
          height: "auto",
          calcHeight: 54,
          dialogWidth: 1150,
          tip: false,
          searchShow: true,
          searchMenuSpan: 3,
          menuWidth: 350,
          border: true,
          //stripe:true,
          submitBtn: false,
          emptyBtn: false,
          index: true,
          viewBtn: true,
          selection: true,
          dialogClickModal: false,
          column: [{
              label: "小区",
              prop: "districtId",
              searchSpan: 5,
              search: true,
              type: 'tree',
              dicUrl: `/api/blade-district/district/getDistrictTree`,
              cascader: ['articleId'],
              props: {
                label: "name",
                value: "id"
              },
              defaultExpandedKeys: ["361102003"],
              span: 12,
              labelWidth: 120,
              width: 220,
              overHidden: true,
              rules: [{
                required: true,
                message: "请选择小区",
                trigger: "blur",
              }, ],
              disabled: true
            },
            {
              label: '维修项目名称',
              prop: 'name',
              searchLabelWidth: 120,
              searchSpan: 5,
              search: true,
              span: 12,
              labelWidth: 140,
              rules: [{
                required: true,
                message: "请输入维修项目名称",
                trigger: "blur",
              }, ],
              disabled: true
            },
            {
              label: "预计开工时间",
              prop: "runTime",
              span: 12,
              labelWidth: 140,
              type: "date",
              format: "yyyy-MM-dd",
              valueFormat: "yyyy-MM-dd",
              rules: [{
                required: true,
                message: "请选择合同开始时间",
                trigger: "blur",
              }, ],
              disabled: true
            },
            {
              label: "预计竣工时间",
              prop: "completedTime",
              labelWidth: 140,
              span: 12,
              type: "date",
              format: "yyyy-MM-dd",
              valueFormat: "yyyy-MM-dd",
              rules: [{
                required: true,
                message: "请选择合同结束时间",
                trigger: "blur",
              }, ],
              disabled: true
            },
            {
              label: "楼栋",
              prop: "buildingName",
              labelWidth: 140,
              value: '',
              span: 12,
              row: true,
              disabled: true
            },
            {
              label: '联系人',
              prop: 'linkman',
              span: 12,
              labelWidth: 120,
              search: true,
              searchSpan: 4,
              rules: [{
                required: true,
                message: "请输入联系人",
                trigger: "blur",
              }, ],
              disabled: true
            },
            {
              label: '联系方式',
              prop: 'linkPhone',
              span: 12,
              labelWidth: 140,
              rules: [{
                required: true,
                message: "请输入联系方式",
                trigger: "blur",
              }, ],
              disabled: true
            },
            {
              label: "项目预算总金额(元)",
              prop: "budgetAmount",
              span: 12,
              hide: true,
              labelWidth: 140,
              type: 'number',
              precision: 2,
              value: '0.00',
              disabled: true
            },
            {
              label: "实际预算金额(元)",
              prop: "actualAmount",
              span: 12,
              hide: true,
              labelWidth: 140,
              type: 'number',
              precision: 2,
              value: '0.00',
              disabled: true
            },
            {
              label: "自筹金额(元)",
              prop: "selfAmount",
              span: 12,
              hide: true,
              labelWidth: 140,
              type: 'number',
              precision: 2,
              value: '0.00',
              disabled: true
            },
            {
              label: "预算应拨付金额(元)",
              prop: "budgetAppropriateAmount",
              span: 12,
              hide: true,
              labelWidth: 140,
              type: 'number',
              precision: 2,
              value: '0.00',
              disabled: true
            },
            {
              disabled: true,
              display: false,
              hide: true,
              parent: false,
              label: "投票结果",
              prop: "articleId",
              search: false,
              viewDisabled: false,
              type: 'select',
              dicUrl: `/api/blade-article/article/getArticleByDistrictId?type=4&eventType=1&districtId={{districtId}}`,
              cascader: ['vote'],
              props: {
                label: "title",
                value: "id"
              },
              defaultExpandedKeys: ["361102003"],
              span: 12,
              labelWidth: 140,
              rules: [{
                required: true,
                message: "请选择投票结果",
                trigger: "blur",
              }, ],
              change: (val) => {
                console.log("val===>", val)
                // console.log("form===>",this.form)
                if (val.value && !this.form.id) {
                  this.articleRange = val.articleRange;
                  // this.showDialog = true;
                  // this.getDetail(val.value, val.articleRange)
                }
              }
            },
            {
              disabled: true,
              display: false,
              span: 24,
              hide: true,
              prop: "vote",
              slot: true,
              label: "投票详情",
              labelWidth: 140,
            },
            {
              label: "项目摘要",
              span: 24,
              hide: true,
              prop: "projectDigest",
              placeholder: "例如:“XX小区XX栋XX设施设备维修,总的预算金额是X,是否含有审价,本次维修涉及范围共XX户,总面积的建筑面积为XX平方米”",
              labelWidth: 140,
              type: "textarea",
              disabled: true
            },
            {
              label: "项目进度描述",
              span: 24,
              hide: true,
              prop: "projectDescribe",
              labelWidth: 140,
              type: "textarea",
              disabled: true
            },
            {
              label: '施工方案附件',
              prop: 'constructionSchemeUrls',
              type: 'upload',
              span: 24,
              hide: true,
              labelWidth: 140,
              multiple: true,
              // showFileList: true,
              propsHttp: {
                res: 'data',
                name: "originalName",
                url: "link"
              },
              action: '/api/blade-resource/oss/endpoint/put-file-attach',
              rules: [{
                required: true,
                message: "请上传施工方案",
                trigger: "blur",
              }, ],
            }
          ],
        },
        topictData: [],
        topicTitle: "",
        articleRange: ""
      }
    },
    watch: {
      'form.districtId': {
        handler(newData) {
          const column = this.findObject(this.option.column, "articleId")
          if (newData && this.form.articleId) {
            column.display = true;
          } else {
            column.display = false
          }
        },
        {
          disabled: true,
          display: false,
          span: 24,
          hide: true,
          prop: "vote",
          slot: true,
          label: "投票详情",
          labelWidth: 140,
        },
        {
          label: "项目摘要",
          span: 24,
          hide: true,
          prop: "projectDigest",
          placeholder: "例如:“XX小区XX栋XX设施设备维修,总的预算金额是X,是否含有审价,本次维修涉及范围共XX户,总面积的建筑面积为XX平方米”",
          labelWidth: 140,
          type: "textarea",
          disabled: true
        },
        {
          label: "项目进度描述",
          span: 24,
          hide: true,
          prop: "projectDescribe",
          labelWidth: 140,
          type: "textarea",
          disabled: true
        },
        {
          label: '施工方案附件',
          prop: 'constructionSchemeUrls',
          type: 'upload',
          span: 24,
          hide: true,
          labelWidth: 140,
          multiple: true,
          // showFileList: true,
          propsHttp: {
            res: 'data',
            name: "originalName",
            url: "link"
          },
          action: '/api/blade-resource/oss/endpoint/put-file-attach',
          rules: [{
            required: true,
            message: "请上传施工方案",
            trigger: "blur",
          },],
        }
        ],
      },
      topictData: [],
      topicTitle: "",
      articleRange: ""
      'form.articleId': {
        handler(newData) {
          this.getVoteDetail(this.form.articleId, this.articleRange)
          const column = this.findObject(this.option.column, "vote")
          if (newData) {
            column.display = true;
          } else {
            column.display = false
          }
        }
      },
    },
    created() {
      this.init();
    },
    methods: {
      init() {
        this.processInstanceId = this.$route.params.processInstanceId;
        this.businessId = this.$route.params.businessId;
        historyFlowList(this.processInstanceId).then(res => {
          const data = res.data;
          if (data.success) {
            this.flowList = data.data;
          }
        })
        getPropertyCapitalApply(this.businessId).then(res => {
          const data = res.data;
          if (data.success) {
            this.form = data.data;
          }
        })
      },
      handleCancel() {
        this.$router.$avueRouter.closeTag();
        this.$router.push({
          path: `/work/start`
        });
      },
      getVoteDetail(articleId, districtId) {
        let params = {
          level: 1,
          articleId: articleId,
          districtId: districtId
        }
        getLists(1, 10, params).then(res => {
          const data = res.data.data
          if (data.length) {
            this.topictData = data[0].children;
            this.topicTitle = data[0].discussContent;
          }
        })
      },
      openUserPopup(row) {
        this.$refs.DeitDiscussion.openUser(row, 1, [this.form.districtId])
      },
    }
  },
  watch: {
    'form.districtId': {
      handler(newData) {
        const column = this.findObject(this.option.column, "articleId")
        if (newData && this.form.articleId) {
          column.display = true;
        } else {
          column.display = false
        }
      }
    },
    'form.articleId': {
      handler(newData) {
        this.getVoteDetail(this.form.articleId, this.articleRange)
        const column = this.findObject(this.option.column, "vote")
        if (newData) {
          column.display = true;
        } else {
          column.display = false
        }
      }
    },
  },
  created() {
    this.init();
  },
  methods: {
    init() {
      this.processInstanceId = this.$route.params.processInstanceId;
      this.businessId = this.$route.params.businessId;
      historyFlowList(this.processInstanceId).then(res => {
        const data = res.data;
        if (data.success) {
          this.flowList = data.data;
        }
      })
      getPropertyCapitalApply(this.businessId).then(res => {
        const data = res.data;
        if (data.success) {
          this.form = data.data;
        }
      })
    },
    handleCancel() {
      this.$router.$avueRouter.closeTag();
      this.$router.push({
        path: `/work/start`
      });
    },
    getVoteDetail(articleId, districtId) {
      let params = {
        level: 1,
        articleId: articleId,
        districtId: districtId
      }
      getLists(1, 10, params).then(res => {
        const data = res.data.data
        if (data.length) {
          this.topictData = data[0].children;
          this.topicTitle = data[0].discussContent;
        }
      })
    },
    openUserPopup(row) {
      this.$refs.DeitDiscussion.openUser(row, 1, [this.form.districtId])
    },
  }
}
</script>
<style>
.workOrderStyle {
  font-weight: normal;
}
</style>
  .workOrderStyle {
    font-weight: normal;
  }
</style>
src/views/propertySupervision/process/maintenanceFundApply/form.vue
@@ -100,12 +100,13 @@
              }, ],
            },
            {
              label: "项目分摊方式",
              prop: "allocationWay",
              label: "楼栋",
              prop: "buildingName",
              labelWidth: 140,
              value: '按建筑面积分摊',
              value: '',
              span: 12,
              row: true,
              disabled: true
            },
            {
              label: '联系人',
@@ -264,4 +265,4 @@
      }
    }
  }
</script>
</script>
src/views/propertySupervision/process/maintenanceFundApply/handle.vue
@@ -207,12 +207,12 @@
              disabled: true
            },
            {
              label: "项目分摊方式",
              prop: "allocationWay",
              label: "楼栋",
              prop: "buildingName",
              labelWidth: 140,
              value: '按建筑面积分摊',
              value: '',
              span: 12,
              // row: true,
              row: true,
              disabled: true
            },
            {
@@ -539,4 +539,4 @@
  .workOrderStyle {
    font-weight: normal;
  }
</style>
</style>
src/views/publicSecurity/keynotePlaceManage.vue
@@ -1,884 +1,899 @@
<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">
  <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
      <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" icon="el-icon-s-check" 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
        <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>
        <!-- <el-button type="text" :size="size" icon="el-icon-delete" v-if="permission.place_del" plain
                    @click="rowDel(row)">删 除
                </el-button> -->
            </template>
      </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="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>
      <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 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-drawer title="消防自查详情" :visible.sync="isDetail" :append-to-body="true" size="40%" direction="rtl">
            <div class="title">
                <div class="icon">{{ refreshNum }}</div>
                基础信息
    <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-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.nineTypeName }}</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 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.nineTypeName }}</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="yh-pic-box">
            <div class="yh-pic-name">
              隐患图片
            </div>
            <div class="title">
                <div class="icon"></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 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>
          <div class="yh-remark">
            <div class="yh-remark-name">
              隐患描述
            </div>
        </el-drawer>
    </basic-container>
            <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 {
  import {
    getTaskPlaceSelfCheckList,
    removeTask,
    update,
    add,
} from "@/api/task/task"
  } from "@/api/task/task"
import {
  import {
    mapGetters
} from "vuex"
import {
  } 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 {
  } 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 {
  } from "@/api/common"
  import {
    getToken
} from '@/util/auth'
import {
  } from '@/util/auth'
  import {
    downloadXls
} from "@/util/util"
import {
  } from "@/util/util"
  import {
    dateNow
} from "@/util/date"
import campusReporting from './components/campusReporting'
import hotelReporting from './components/hotelReporting'
import labelReporting from './components/labelReporting'
  } 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()
                }
            }
  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 {
            isDetail: false,
            refreshNum: 1,
            rowDetail: [],
            auditRules: {
                status: [{ required: true, message: "必填" }],
                remark: [{ required: true, message: "必填" }],
            },
            visible: false,
            taskType: 0,
            curRow: {},
            roleBox: false,
      return {
        isDetail: false,
        refreshNum: 1,
        rowDetail: [],
        auditRules: {
          status: [{
            required: true,
            message: "必填"
          }],
          remark: [{
            required: true,
            message: "必填"
          }],
        },
        visible: false,
        taskType: 0,
        curRow: {},
        roleBox: false,
            form: {},
            query: {},
            loading: true,
            drawerLoading: false,
            page: {
                pageSize: 10,
                currentPage: 1,
                total: 0,
        form: {},
        query: {},
        loading: true,
        drawerLoading: false,
        page: {
          pageSize: 10,
          currentPage: 1,
          total: 0,
        },
        selectionList: [],
        option: {
          labelWidth: 120,
          searchLabelWidth: 96,
          searchShow: true,
          searchMenuSpan: 3,
          menuWidth: 200,
          // 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: "placeName",
              span: 24,
              row: true,
              searchSpan: 4,
              search: true,
              align: 'center'
            },
            selectionList: [],
            option: {
                labelWidth: 120,
                searchLabelWidth: 96,
                searchShow: true,
                searchMenuSpan: 3,
                menuWidth: 200,
                // 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: "placeName",
                        span: 24,
                        row: true,
                        searchSpan: 4,
                        search: true,
                        align: 'center'
                    },
                    {
                        label: "场所地址",
                        prop: "location",
                        span: 24,
                        row: true,
                        searchSpan: 4,
                        searchLabelWidth: 46,
                        overHidden: true,
                        align: 'center'
                    }, {
                        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: "所属街道",
                        prop: "streetName",
                        span: 24,
                        row: true,
                        searchSpan: 4,
                        search: true,
                        align: 'center'
                    },
                    {
                        label: "所属社区",
                        prop: "communityName",
                        span: 24,
                        row: true,
                        searchSpan: 4,
                        search: true,
                        width: 160,
                        overHidden: true,
                        align: 'center'
                    },
                    {
                        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'
                    },
                    {
                        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,
                    },
                    {
                        label: "创建时间",
                        prop: "createTime",
                        span: 24,
                        row: true,
                        searchSpan: 4,
                        searchLabelWidth: 46,
                        align: 'center'
                    },
                ],
            {
              label: "场所地址",
              prop: "location",
              span: 24,
              row: true,
              searchSpan: 4,
              searchLabelWidth: 46,
              overHidden: true,
              align: 'center'
            }, {
              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: "所属街道",
              prop: "streetName",
              span: 24,
              row: true,
              searchSpan: 4,
              search: true,
              align: 'center'
            },
            data: [],
            {
              label: "所属社区",
              prop: "communityName",
              span: 24,
              row: true,
              searchSpan: 4,
              search: true,
              width: 160,
              overHidden: true,
              align: 'center'
            },
            {
              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'
            },
            {
              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,
            },
            {
              label: "创建时间",
              prop: "createTime",
              span: 24,
              row: true,
              searchSpan: 4,
              searchLabelWidth: 46,
              align: 'center'
            },
          ],
        },
        data: [],
            auditBasePopup: false,
            questionTypeList: [],
            CNNum: ['一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '十二', '十三', '十四', '十五'],
            nineTypeList: [],
            radio: '1',
        }
        auditBasePopup: false,
        questionTypeList: [],
        CNNum: ['一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '十二', '十三', '十四', '十五'],
        nineTypeList: [],
        radio: '1',
      }
    },
    provide () {
        return {
            placeElement: this,
        }
    provide() {
      return {
        placeElement: this,
      }
    },
    components: {
        campusReporting,
        hotelReporting,
        labelReporting,
      campusReporting,
      hotelReporting,
      labelReporting,
    },
    watch: {},
    created () {
        this.getPatrolGroupTree()
        this.getDictBizTree()
    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")
                    }
                }
            }
      ...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: {
        // 点击展开收缩
        flodQL (index) {
            this.rowDetail.qTypeList[index].isShowQList = !this.rowDetail.qTypeList[index].isShowQList
            this.refreshNum += 1
        },
      // 点击展开收缩
      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
            }, {})
        },
      // 对数组按属性分组
      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
      // 九小类型字典接口
      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
                  }
                })
              })
            })
        },
        // 九小类型转换
        switchNineType (type) {
            return this.nineTypeList.find(item => item.key === type) ? this.nineTypeList.find(item => item.key === type).title : ''
        },
        // 获取问题类型
        getPatrolGroupTree () {
            getPatrolGroupTree().then(res => {
                this.questionTypeList = res.data.data
          }
          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
        })
        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]
      },
        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()
                })
            })
        },
      // 弹窗关闭回调
      handleClose() {
        this.cancelAudit()
      },
        showStringDispose (row, type) {
            row[type] = !row[type]
        },
      // 取消审核
      cancelAudit() {
        this.visible = false
      },
        // 弹窗关闭回调
        handleClose () {
            this.cancelAudit()
        },
        // 取消审核
        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
            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)) {
                // getPlace(this.form.id).then((res) => {
                //   this.form = res.data.data
                //   if (this.form.imageUrls.length) {
                //     this.form.imageUrls = this.form.imageUrls.split(",").filter(item => item != '').map(item => website
                //       .minioUrl + item).join(',')
                //   }
                //   if (this.form.placePoiLabelVOList.length) {
                //     let lebelTwo = this.form.placePoiLabelVOList.find(item => {
                //       return item.type == 2
                //     })
                //     if (lebelTwo) this.form.label = String(lebelTwo.poiCode)
                //     let lebelThree = this.form.placePoiLabelVOList.find(item => {
                //       return item.type == 3
                //     })
                //     if (lebelThree) this.form.smallLabel = String(lebelThree.poiCode)
                //   }
                //   done()
                // })
            } 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,
            }
            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.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()
            })
      // 确认提交审核
      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
        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)) {
          // getPlace(this.form.id).then((res) => {
          //   this.form = res.data.data
          //   if (this.form.imageUrls.length) {
          //     this.form.imageUrls = this.form.imageUrls.split(",").filter(item => item != '').map(item => website
          //       .minioUrl + item).join(',')
          //   }
          //   if (this.form.placePoiLabelVOList.length) {
          //     let lebelTwo = this.form.placePoiLabelVOList.find(item => {
          //       return item.type == 2
          //     })
          //     if (lebelTwo) this.form.label = String(lebelTwo.poiCode)
          //     let lebelThree = this.form.placePoiLabelVOList.find(item => {
          //       return item.type == 3
          //     })
          //     if (lebelThree) this.form.smallLabel = String(lebelThree.poiCode)
          //   }
          //   done()
          // })
        } 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,
        }
        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.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) {
  :deep(.cur-container-box) {
    padding: 0;
}
  }
:deep(.el-button--text) {
  :deep(.el-button--text) {
    border: 0;
    background: transparent !important;
}
  }
:deep(.el-radio__input.is-disabled+span.el-radio__label) {
  :deep(.el-radio__input.is-disabled+span.el-radio__label) {
    color: #000;
}
  }
:deep(.el-radio__input.is-checked+.el-radio__label) {
  :deep(.el-radio__input.is-checked+.el-radio__label) {
    color: #409EFF !important;
}
  }
:deep(.el-radio__input.is-checked .el-radio__inner::after) {
  :deep(.el-radio__input.is-checked .el-radio__inner::after) {
    background-color: #FFF;
}
  }
:deep(.el-radio__input.is-checked .el-radio__inner) {
  :deep(.el-radio__input.is-checked .el-radio__inner) {
    background-color: #409EFF;
}
  }
:deep(.avue-crud__img) {
  :deep(.avue-crud__img) {
    height: 30px !important;
}
  }
:deep(.el-radio) {
  :deep(.el-radio) {
    margin-right: 20px;
}
  }
.avue-upload__icon {
  .avue-upload__icon {
    line-height: 6;
}
  }
.cur-container-box {
  .cur-container-box {
    display: flex;
    flex-direction: column;
    width: 100%;
@@ -886,22 +901,22 @@
    overflow: hidden;
    .content-box {
        margin: 0 4px;
        padding: 0 16px;
        height: 0;
        flex: 1;
        overflow: hidden;
        overflow-y: auto;
      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;
      margin-top: 10px;
      display: flex;
      justify-content: center;
    }
}
  }
.title {
  .title {
    margin: 10px;
    height: 40px;
    background-color: #eee;
@@ -909,111 +924,111 @@
    align-items: center;
    .icon {
        width: 4px;
        height: 18px;
        background-color: #409dfe;
        margin: 0 10px;
        color: transparent;
      width: 4px;
      height: 18px;
      background-color: #409dfe;
      margin: 0 10px;
      color: transparent;
    }
}
  }
.basic-info {
  .basic-info {
    padding: 0 20px;
    font-size: 14px;
    .info-item {
      display: flex;
      padding: 10px;
      .info-name {
        width: 100px;
        display: flex;
        padding: 10px;
        align-items: center;
      }
        .info-name {
            width: 100px;
            display: flex;
            align-items: center;
        }
        .info-value {
            display: flex;
            align-items: center;
        }
      .info-value {
        display: flex;
        align-items: center;
      }
    }
}
  }
.question-list {
  .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;
      height: 60px;
      display: flex;
      align-items: center;
      cursor: pointer;
      justify-content: space-between;
      padding-right: 20px;
        .type-name {}
      .type-name {}
        .icon-box {}
      .icon-box {}
    }
    .question-item {
        margin-bottom: 20px;
        padding: 10px;
        background: #f5f7fa;
        border-radius: 8px;
      margin-bottom: 20px;
      padding: 10px;
      background: #f5f7fa;
      border-radius: 8px;
        &>div {
            margin: 14px 0;
      &>div {
        margin: 14px 0;
      }
      .question-name {
        display: flex;
        .key {
          width: 80%;
          padding-right: 20px;
          word-break: break-all;
        }
        .question-name {
            display: flex;
        .value {
          width: 20%;
          display: flex;
          align-items: center;
          justify-content: center;
        }
      }
            .key {
                width: 80%;
                padding-right: 20px;
                word-break: break-all;
            }
      .yh-pic-box {
        display: flex;
        height: 100px;
            .value {
                width: 20%;
                display: flex;
                align-items: center;
                justify-content: center;
            }
        .yh-pic-name {
          width: 100px;
          display: flex;
          align-items: center;
          justify-content: left;
        }
        .yh-pic-box {
            display: flex;
            height: 100px;
        .yh-pic-list {
          width: 0;
          flex: 1;
          display: flex;
        }
      }
            .yh-pic-name {
                width: 100px;
                display: flex;
                align-items: center;
                justify-content: left;
            }
      .yh-remark {
        display: flex;
            .yh-pic-list {
                width: 0;
                flex: 1;
                display: flex;
            }
        .yh-remark-name {
          width: 100px;
          display: flex;
          align-items: center;
          justify-content: left;
        }
        .yh-remark {
            display: flex;
            .yh-remark-name {
                width: 100px;
                display: flex;
                align-items: center;
                justify-content: left;
            }
            .yh-remark-value {
                word-break: break-all;
            }
        .yh-remark-value {
          word-break: break-all;
        }
      }
    }
}
</style>
  }
</style>
src/views/publicSecurity/ninePlaceManage/patrolRecord.vue
@@ -1,652 +1,660 @@
<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="principalPhone">
                <el-button :size="size" type="text" @click="showStringDispose(row, 'principalPhoneflag')"
                    v-text="textDispose(row, 'principalPhoneflag', 'principalPhone')">
                </el-button>
            </template>
            <template slot-scope="{type,size,row }" slot="menu">
                <el-button icon="el-icon-detail" :size="size" :type="type" @click.stop="getDetail(row)">
                    详情
                </el-button>
            </template>
            <template slot="menuLeft">
                <el-button type="warning" size="small" plain icon="el-icon-download" @click="handleExport">导出
                </el-button>
            </template>
        </avue-crud>
  <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="principalPhone">
        <el-button :size="size" type="text" @click="showStringDispose(row, 'principalPhoneflag')"
          v-text="textDispose(row, 'principalPhoneflag', 'principalPhone')">
        </el-button>
      </template>
      <template slot-scope="{type,size,row }" slot="menu">
        <el-button icon="el-icon-detail" :size="size" :type="type" @click.stop="getDetail(row)">
          详情
        </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-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">
                <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.nineTypeName }}</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>
    <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">
        <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.nineTypeName }}</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'>
                <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 class="question-list" v-for="(tItem, tIndex) in rowDetail.qTypeList" :key='tIndex'>
        <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>
        </el-drawer>
          </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>
  </basic-container>
</template>
<script>
import {
  import {
    getList,
    remove,
    update,
    add,
    getNotice,
    upcomment
} from "@/api/patrol/placeChek"
  } from "@/api/patrol/placeChek"
import {
    getPatrolGroupTree, getDictBizTree
} from "@/api/publicSecurity/ninePlaceManage"
  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 {
  import website from '@/config/website'
  import NProgress from 'nprogress'
  import 'nprogress/nprogress.css'
  import Qs from "qs"
  import {
    exportBlob
} from "@/api/common"
import {
  } from "@/api/common"
  import {
    getToken
} from '@/util/auth'
import {
  } from '@/util/auth'
  import {
    downloadXls
} from "@/util/util"
import {
  } from "@/util/util"
  import {
    dateNow
} from "@/util/date"
import {
  } from "@/util/date"
  import {
    getDistrictTree
} from "@/api/district/index"
  } from "@/api/district/index"
import {
  import {
    mapGetters
} from "vuex"
  } from "vuex"
export default {
    data () {
        return {
            isDetail: false,
            form: {},
            query: {},
            loading: true,
            page: {
                pageSize: 10,
                currentPage: 1,
                total: 0,
  export default {
    data() {
      return {
        isDetail: false,
        form: {},
        query: {},
        loading: true,
        page: {
          pageSize: 10,
          currentPage: 1,
          total: 0,
        },
        datetime: "",
        selectionList: [],
        option: {
          labelWidth: 120,
          searchLabelWidth: 96,
          searchShow: true,
          searchMenuSpan: 3,
          menuWidth: 100,
          // 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: "placeName",
              span: 24,
              row: true,
              searchSpan: 4,
              search: true,
              align: 'center'
            },
            datetime: "",
            selectionList: [],
            option: {
                labelWidth: 120,
                searchLabelWidth: 96,
                searchShow: true,
                searchMenuSpan: 3,
                menuWidth: 100,
                // 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: "placeName",
                        span: 24,
                        row: true,
                        searchSpan: 4,
                        search: true,
                        align: 'center'
                    },
                    {
                        label: "场所地址",
                        prop: "location",
                        span: 24,
                        row: true,
                        searchSpan: 4,
                        searchLabelWidth: 46,
                        overHidden: true,
                        align: 'center'
                    },
                    {
                        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: "所属街道",
                        prop: "streetName",
                        span: 24,
                        row: true,
                        searchSpan: 4,
                        search: true,
                        align: 'center'
                    },
                    {
                        label: "所属社区",
                        prop: "communityName",
                        span: 24,
                        row: true,
                        searchSpan: 4,
                        search: true,
                        width: 160,
                        overHidden: true,
                        align: 'center'
                    },
                    {
                        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'
                    },
                    {
                        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'
                    },
                    {
                        label: "创建时间",
                        prop: "createTime",
                        span: 24,
                        row: true,
                        searchSpan: 4,
                        searchLabelWidth: 46,
                        align: 'center'
                    },
                ],
            {
              label: "场所地址",
              prop: "location",
              span: 24,
              row: true,
              searchSpan: 4,
              searchLabelWidth: 46,
              overHidden: true,
              align: 'center'
            },
            data: [],
            {
              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: "所属街道",
              prop: "streetName",
              span: 24,
              row: true,
              searchSpan: 4,
              search: true,
              align: 'center'
            },
            {
              label: "所属社区",
              prop: "communityName",
              span: 24,
              row: true,
              searchSpan: 4,
              search: true,
              width: 160,
              overHidden: true,
              align: 'center'
            },
            {
              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'
            },
            {
              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'
            },
            {
              label: "创建时间",
              prop: "createTime",
              span: 24,
              row: true,
              searchSpan: 4,
              searchLabelWidth: 46,
              align: 'center'
            },
          ],
        },
        data: [],
            districtTree: [],
            rowDetail: [],
            refreshNum: 1,
            radio: '1',
            questionTypeList: [],
            CNNum: ['一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '十二', '十三', '十四', '十五'],
            nineTypeList: []
        }
        districtTree: [],
        rowDetail: [],
        refreshNum: 1,
        radio: '1',
        questionTypeList: [],
        CNNum: ['一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '十二', '十三', '十四', '十五'],
        nineTypeList: []
      }
    },
    watch: {
        "form.articleType": {
            handler (val) {
                if (val) {
                    var videoUrl = this.findObject(this.option.column, "videoUrl")
                    var content = this.findObject(this.option.column, "content")
                    if (val.indexOf('ksp') != -1) {
                        videoUrl.display = true
                        content.display = false
                        videoUrl.rules = [{
                            required: false,
                            message: "请选择视频",
                            trigger: "blur",
                        },]
                    } else {
                        videoUrl.display = false
                        content.display = true
                        videoUrl.rules = ""
                    }
                }
            },
            immediate: true,
        }
      "form.articleType": {
        handler(val) {
          if (val) {
            var videoUrl = this.findObject(this.option.column, "videoUrl")
            var content = this.findObject(this.option.column, "content")
            if (val.indexOf('ksp') != -1) {
              videoUrl.display = true
              content.display = false
              videoUrl.rules = [{
                required: false,
                message: "请选择视频",
                trigger: "blur",
              }, ]
            } else {
              videoUrl.display = false
              content.display = true
              videoUrl.rules = ""
            }
          }
        },
        immediate: true,
      }
    },
    computed: {
        ...mapGetters(["permission", "userInfo"]),
        permissionList () {
            return {
                addBtn: this.vaildData(this.permission.article_add, true),
                viewBtn: this.vaildData(this.permission.article_view, true),
                delBtn: this.vaildData(this.permission.article_delete, true),
                editBtn: this.vaildData(this.permission.article_edit, true),
            }
        },
        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")
                    }
                }
            }
      ...mapGetters(["permission", "userInfo"]),
      permissionList() {
        return {
          addBtn: this.vaildData(this.permission.article_add, true),
          viewBtn: this.vaildData(this.permission.article_view, true),
          delBtn: this.vaildData(this.permission.article_delete, true),
          editBtn: this.vaildData(this.permission.article_edit, true),
        }
      },
      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.getPatrolGroupTree()
        this.getDictBizTree()
    created() {
      this.getPatrolGroupTree()
      this.getDictBizTree()
    },
    methods: {
        handleExport () {
            this.$confirm("是否导出场所检查数据?", "提示", {
                confirmButtonText: "确定",
                cancelButtonText: "取消",
                type: "warning"
            }).then(() => {
                NProgress.start()
                var data = {
                    ...this.query
      handleExport() {
        this.$confirm("是否导出场所检查数据?", "提示", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning"
        }).then(() => {
          NProgress.start()
          var data = {
            ...this.query
          }
          // data.isNine = 1
          data = Qs.stringify(data)
          exportBlob(
            `/api/blade-placeCheck/placeCheck/export-placeCheck?${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]
      },
      // 点击展开收缩
      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(row) {
        if (row.patrolRecordVOList) {
          row.patrolRecordVOList.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
                }
                // data.isNine = 1
                data = Qs.stringify(data)
                exportBlob(
                    `/api/blade-placeCheck/placeCheck/export-placeCheck?${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]
        },
        // 点击展开收缩
        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
          })
        }
        if (row.patrolRecordVOList) {
          // 把相同类型问题分组
          let obj = this.groupBy(row.patrolRecordVOList, 'qType')
          let arr = Object.entries(obj)
          let newArr = []
          arr.forEach(part => {
            newArr.push({
              questionName: part[0],
              questionList: part[1],
              isShowQList: true
            })
        },
          })
          row.qTypeList = newArr
        }
        // 九小类型转换
        switchNineType (type) {
            return this.nineTypeList.find(item => item.key === type) ? this.nineTypeList.find(item => item.key === type).title : ''
        },
        row.nineTypeName = this.switchNineType(row.nineType)
        this.rowDetail = row
        this.isDetail = true
      },
        // 获取问题类型
        getPatrolGroupTree () {
            getPatrolGroupTree().then(res => {
                this.questionTypeList = res.data.data
            })
        },
        getDetail (row) {
            if (row.patrolRecordVOList) {
                row.patrolRecordVOList.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.patrolRecordVOList) {
                // 把相同类型问题分组
                let obj = this.groupBy(row.patrolRecordVOList, '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.isDetail = true
        },
        searchReset () {
            this.query = {}
      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)
        },
        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.$message({
              type: "success",
              message: "操作成功!",
            })
            this.$refs.crud.toggleSelection()
        },
        handleDelete () {
            if (this.selectionList.length === 0) {
                this.$message.warning("请选择至少一条数据")
                return
          })
      },
      beforeOpen(done, type) {
        if (["edit", "view"].includes(type)) {
          getNotice(this.form.id).then((res) => {
            let data = res.data.data
            // data.forEach(item=>{
            if (data.url.length > 0) {
              var urls = []
              var names = data.url.split(",")
              names.forEach(name => {
                urls.push(website.minioUrl + name)
              })
              data.url = urls.join(",")
            }
            this.$confirm("确定将选择数据删除?", {
                confirmButtonText: "确定",
                cancelButtonText: "取消",
                type: "warning",
            data.articleList = JSON.parse(data.articleRange)
            this.form = 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 = {}) {
        this.loading = true
        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then((res) => {
          const data = {
            ...res.data.data,
            records: res.data.data.records.map(item => {
              return {
                ...item,
                'createTime': item.createTime.slice(0, 16),
                'principalPhoneflag': false,
              }
            })
                .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)) {
                getNotice(this.form.id).then((res) => {
                    let data = res.data.data
                    // data.forEach(item=>{
                    if (data.url.length > 0) {
                        var urls = []
                        var names = data.url.split(",")
                        names.forEach(name => {
                            urls.push(website.minioUrl + name)
                        })
                        data.url = urls.join(",")
                    }
                    data.articleList = JSON.parse(data.articleRange)
                    this.form = data
                })
          }
          data.records.forEach(item => {
            if (item.signaturePath.length > 0) {
              var urls = []
              var names = item.signaturePath.split(",")
              names.forEach(name => {
                urls.push(website.minioUrl + name)
              })
              item.signaturePath = urls.join(",")
            }
            // con
          })
          this.page.total = data.total
          this.data = data.records
          this.loading = false
          this.selectionClear()
        }).catch(err => {
          setTimeout(() => {
            this.loading = false
          }, 300)
        })
        getDistrictTree({
          filterFlag: 1
        }).then((res) => {
          const data = res.data.data
          this.districtTree = data
          const column = this.findObject(this.option.column, "articleList")
          column.dicData = res.data.data
          this.loading = false
        }).catch(err => {
          setTimeout(() => {
            this.loading = false
          }, 300)
        })
      },
      updateFb(row) {
        if (row.publish == "0") {
          row.publish = "1"
        } else {
          row.publish = "0"
        }
        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()
        },
        currentChange (currentPage) {
            this.page.currentPage = currentPage
        },
        sizeChange (pageSize) {
            this.page.pageSize = pageSize
        },
        refreshChange () {
            this.onLoad(this.page, this.query)
        },
        onLoad (page, params = {}) {
            this.loading = true
            getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).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.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()
            }).catch(err => {
                setTimeout(() => {
                    this.loading = false
                }, 300)
            })
            getDistrictTree({
                filterFlag: 1
            }).then((res) => {
                const data = res.data.data
                this.districtTree = data
                const column = this.findObject(this.option.column, "articleList")
                column.dicData = res.data.data
                this.loading = false
            }).catch(err => {
                setTimeout(() => {
                    this.loading = false
                }, 300)
            })
        },
        updateFb (row) {
            if (row.publish == "0") {
                row.publish = "1"
            } else {
                row.publish = "0"
            }
            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()
                }
            )
        },
          },
          (error) => {
            window.console.log(error)
            loading()
          }
        )
      },
    },
}
  }
</script>
<style lang="scss" scoped>
.avue-upload__icon {
  .avue-upload__icon {
    line-height: 6;
}
  }
:deep(.el-drawer__header) {
  :deep(.el-drawer__header) {
    margin-bottom: 10px;
}
  }
:deep(.el-radio__input.is-disabled+span.el-radio__label) {
  :deep(.el-radio__input.is-disabled+span.el-radio__label) {
    color: #000;
}
  }
:deep(.el-radio__input.is-checked+.el-radio__label) {
  :deep(.el-radio__input.is-checked+.el-radio__label) {
    color: #409EFF !important;
}
  }
:deep(.el-radio__input.is-checked .el-radio__inner::after) {
  :deep(.el-radio__input.is-checked .el-radio__inner::after) {
    background-color: #FFF;
}
  }
:deep(.el-radio__input.is-checked .el-radio__inner) {
  :deep(.el-radio__input.is-checked .el-radio__inner) {
    background-color: #409EFF;
}
  }
:deep(.avue-crud__img) {
  :deep(.avue-crud__img) {
    height: 30px !important;
}
  }
:deep(.el-radio) {
  :deep(.el-radio) {
    margin-right: 20px;
}
  }
.title {
  .title {
    margin: 10px;
    height: 40px;
    background-color: #eee;
@@ -654,111 +662,111 @@
    align-items: center;
    .icon {
        width: 4px;
        height: 18px;
        background-color: #409dfe;
        margin: 0 10px;
        color: transparent;
      width: 4px;
      height: 18px;
      background-color: #409dfe;
      margin: 0 10px;
      color: transparent;
    }
}
  }
.basic-info {
  .basic-info {
    padding: 0 20px;
    font-size: 14px;
    .info-item {
      display: flex;
      padding: 10px;
      .info-name {
        width: 100px;
        display: flex;
        padding: 10px;
        align-items: center;
      }
        .info-name {
            width: 100px;
            display: flex;
            align-items: center;
        }
        .info-value {
            display: flex;
            align-items: center;
        }
      .info-value {
        display: flex;
        align-items: center;
      }
    }
}
  }
.question-list {
  .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;
      height: 60px;
      display: flex;
      align-items: center;
      cursor: pointer;
      justify-content: space-between;
      padding-right: 20px;
        .type-name {}
      .type-name {}
        .icon-box {}
      .icon-box {}
    }
    .question-item {
        margin-bottom: 20px;
        padding: 10px;
        background: #f5f7fa;
        border-radius: 8px;
      margin-bottom: 20px;
      padding: 10px;
      background: #f5f7fa;
      border-radius: 8px;
        &>div {
            margin: 14px 0;
      &>div {
        margin: 14px 0;
      }
      .question-name {
        display: flex;
        .key {
          width: 80%;
          padding-right: 20px;
          word-break: break-all;
        }
        .question-name {
            display: flex;
        .value {
          width: 20%;
          display: flex;
          align-items: center;
          justify-content: center;
        }
      }
            .key {
                width: 80%;
                padding-right: 20px;
                word-break: break-all;
            }
      .yh-pic-box {
        display: flex;
        height: 100px;
            .value {
                width: 20%;
                display: flex;
                align-items: center;
                justify-content: center;
            }
        .yh-pic-name {
          width: 100px;
          display: flex;
          align-items: center;
          justify-content: left;
        }
        .yh-pic-box {
            display: flex;
            height: 100px;
        .yh-pic-list {
          width: 0;
          flex: 1;
          display: flex;
        }
      }
            .yh-pic-name {
                width: 100px;
                display: flex;
                align-items: center;
                justify-content: left;
            }
      .yh-remark {
        display: flex;
            .yh-pic-list {
                width: 0;
                flex: 1;
                display: flex;
            }
        .yh-remark-name {
          width: 100px;
          display: flex;
          align-items: center;
          justify-content: left;
        }
        .yh-remark {
            display: flex;
            .yh-remark-name {
                width: 100px;
                display: flex;
                align-items: center;
                justify-content: left;
            }
            .yh-remark-value {
                word-break: break-all;
            }
        .yh-remark-value {
          word-break: break-all;
        }
      }
    }
}
</style>
  }
</style>
src/views/publicSecurity/ninePlaceManage/situationRectification.vue
@@ -1,722 +1,734 @@
<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="menuLeft">
                <div class="tab-list">
                    <div :class="{ 'choose': typeStatus == 3 }" @click="changeType(3)">全部</div>
                    <div :class="{ 'choose': typeStatus == 1 }" @click="changeType(1)">待审核</div>
                    <div :class="{ 'choose': typeStatus == 2 }" @click="changeType(2)">已审核</div>
                </div>
                <el-button type="warning" size="small" plain icon="el-icon-download" @click="handleExport">导出
                </el-button>
            </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="menuLeft">
        <div class="tab-list">
          <div :class="{ 'choose': typeStatus == 3 }" @click="changeType(3)">全部</div>
          <div :class="{ 'choose': typeStatus == 1 }" @click="changeType(1)">待审核</div>
          <div :class="{ 'choose': typeStatus == 2 }" @click="changeType(2)">已审核</div>
        </div>
        <el-button type="warning" size="small" plain icon="el-icon-download" @click="handleExport">导出
        </el-button>
      </template>
            <template slot-scope="{row, size}" slot="status">
                <el-tag :size="size" :type="showConfirmFlag(row.status).type">{{ showConfirmFlag(row.status).text
      <template slot-scope="{row, size}" slot="status">
        <el-tag :size="size" :type="showConfirmFlag(row.status).type">{{ showConfirmFlag(row.status).text
                }}</el-tag>
            </template>
            <template slot-scope="{type,size,row }" slot="menu">
                <el-button icon="el-icon-detail" :size="size" :type="type" @click.stop="getDetail(row)">
                    详情
                </el-button>
                <el-button icon="el-icon-s-check" :size="size" :type="type" @click.stop="goAudit(row)"
                    :disabled="row.status != 1">审核</el-button>
            </template>
        </avue-crud>
        <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">
                <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.$nineType }}</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>
      </template>
      <template slot-scope="{type,size,row }" slot="menu">
        <el-button icon="el-icon-detail" :size="size" :type="type" @click.stop="getDetail(row)">
          详情
        </el-button>
        <el-button icon="el-icon-s-check" :size="size" :type="type" @click.stop="goAudit(row)"
          :disabled="row.status != 1">审核</el-button>
      </template>
    </avue-crud>
    <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">
        <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.$nineType }}</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'>
                <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 class="question-list" v-for="(tItem, tIndex) in rowDetail.qTypeList" :key='tIndex'>
        <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 class="question-list" v-show="rowDetail.isShowRemarkTitle">
                <div class="question-type" @click="flodRM()">
                    <div class="type-name">
                        {{ CNNum[rowDetail.remarkNo] }}、其他隐患问题
                    </div>
                    <div class="icon-box"><i class="el-icon-arrow-down" v-show="rowDetail.isShowRemark"></i><i
                            class="el-icon-arrow-up" v-show="!rowDetail.isShowRemark"></i></div>
                </div>
                <div class="remark-box" v-show="rowDetail.isShowRemark">{{ rowDetail.remark }}</div>
          </div>
          <div class="yh-pic-box">
            <div class="yh-pic-name">
              隐患图片
            </div>
        </el-drawer>
        <!-- 审核弹窗 -->
        <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>
    </basic-container>
            <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>
      <div class="question-list" v-show="rowDetail.isShowRemarkTitle">
        <div class="question-type" @click="flodRM()">
          <div class="type-name">
            {{ CNNum[rowDetail.remarkNo] }}、其他隐患问题
          </div>
          <div class="icon-box"><i class="el-icon-arrow-down" v-show="rowDetail.isShowRemark"></i><i
              class="el-icon-arrow-up" v-show="!rowDetail.isShowRemark"></i></div>
        </div>
        <div class="remark-box" v-show="rowDetail.isShowRemark">{{ rowDetail.remark }}</div>
      </div>
    </el-drawer>
    <!-- 审核弹窗 -->
    <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>
  </basic-container>
</template>
<script>
import {
  import {
    mapGetters
} from "vuex"
import {
    getZGQKList, getPatrolGroupTree, applyRectification
} from "@/api/publicSecurity/ninePlaceManage"
import NProgress from 'nprogress'
import 'nprogress/nprogress.css'
import Qs from "qs"
import {
  } from "vuex"
  import {
    getZGQKList,
    getPatrolGroupTree,
    applyRectification
  } from "@/api/publicSecurity/ninePlaceManage"
  import NProgress from 'nprogress'
  import 'nprogress/nprogress.css'
  import Qs from "qs"
  import {
    exportBlob
} from "@/api/common"
import {
  } from "@/api/common"
  import {
    getToken
} from '@/util/auth'
import {
  } from '@/util/auth'
  import {
    downloadXls
} from "@/util/util"
import {
  } from "@/util/util"
  import {
    dateNow
} from "@/util/date"
import website from '@/config/website'
  } from "@/util/date"
  import website from '@/config/website'
export default {
    data () {
        return {
            auditRules: {
                status: [{ required: true, message: "必填" }],
                reasonFailure: [{ required: true, message: "必填" }],
            },
            visible: false,
            typeStatus: 1,
            isDetail: false,
            rowDetail: [],
            form: {},
            query: {},
            loading: true,
  export default {
    data() {
      return {
        auditRules: {
          status: [{
            required: true,
            message: "必填"
          }],
          reasonFailure: [{
            required: true,
            message: "必填"
          }],
        },
        visible: false,
        typeStatus: 1,
        isDetail: false,
        rowDetail: [],
        form: {},
        query: {},
        loading: true,
            page: {
                pageSize: 10,
                currentPage: 1,
                total: 0,
            },
            datetime: "",
            selectionList: [],
            option: {
                height: "auto",
                calcHeight: 54,
                dialogWidth: 950,
                tip: false,
                searchShow: true,
                searchMenuSpan: 3,
                menu: true,
                menuWidth: 120,
                border: true,
                index: true,
                editBtn: false,
                delBtn: false,
                addBtn: false,
                refreshBtn: false,
                searchShowBtn: false,
                columnBtn: false,
                dialogClickModal: false,
                column: [{
                    label: "场所名称",
                    prop: "placeName",
                    align: 'center',
                    search: true,
                    searchSpan: 4,
                    searchLabelWidth: 76,
                }, {
                    label: "场所地址",
                    prop: "addressName",
                    align: 'center',
                    search: true,
                    searchSpan: 4,
                    searchLabelWidth: 96,
                }, {
                    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,
                }, {
                    label: "存在安全隐患或违法行为",
                    prop: "hiddenDanger",
                    align: 'center',
                    width: 280
                }, {
                    label: "是否下发《责令改正通知书》或是否处罚",
                    prop: "rectificationNoticeFlag",
                    align: 'center',
                    dicData: [
                        {
                            label: "否",
                            value: 1,
                        },
                        {
                            label: "是",
                            value: 2,
                        }
                    ],
                    width: 140
        page: {
          pageSize: 10,
          currentPage: 1,
          total: 0,
        },
        datetime: "",
        selectionList: [],
        option: {
          height: "auto",
          calcHeight: 54,
          dialogWidth: 950,
          tip: false,
          searchShow: true,
          searchMenuSpan: 3,
          menu: true,
          menuWidth: 120,
          border: true,
          index: true,
          editBtn: false,
          delBtn: false,
          addBtn: false,
          refreshBtn: false,
          searchShowBtn: false,
          columnBtn: false,
          dialogClickModal: false,
          column: [{
              label: "场所名称",
              prop: "placeName",
              align: 'center',
              search: true,
              searchSpan: 4,
              searchLabelWidth: 76,
            }, {
              label: "场所地址",
              prop: "addressName",
              align: 'center',
              search: true,
              searchSpan: 4,
              searchLabelWidth: 96,
            }, {
              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,
            }, {
              label: "存在安全隐患或违法行为",
              prop: "hiddenDanger",
              align: 'center',
              width: 280
            }, {
              label: "是否下发《责令改正通知书》或是否处罚",
              prop: "rectificationNoticeFlag",
              align: 'center',
              dicData: [{
                  label: "否",
                  value: 1,
                },
                {
                    label: "是否整改完毕",
                    prop: "rectificationFlag",
                    align: 'center',
                    dicData: [
                        {
                            label: "否",
                            value: 1,
                        },
                        {
                            label: "是",
                            value: 2,
                        }
                    ],
                    type: 'select',
                    search: true,
                    searchSpan: 4,
                    searchLabelWidth: 124,
                    width: 100
                }, {
                    label: "完成整改时限",
                    prop: "rectificationEndTime",
                    align: 'center',
                    width: 100
                }, {
                    label: "检查时间",
                    prop: "createTime",
                    align: 'center',
                    width: 100
                }, {
                    label: "派出所名称",
                    prop: "deptName",
                    align: 'center',
                    search: true,
                    searchSpan: 4,
                    searchLabelWidth: 106,
                }, {
                    label: "审核状态",
                    prop: "status",
                    align: 'center',
                    dicData: [
                        {
                            label: "待审核",
                            value: 1,
                        },
                        {
                            label: "审核通过",
                            value: 2,
                        },
                        {
                            label: "审核不通过",
                            value: 3,
                        },
                        {
                            label: "待上报",
                            value: 4,
                        }
                    ],
                    search: false,
                    searchSpan: 4,
                    searchLabelWidth: 106,
                }, {
                    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,
                }],
                  label: "是",
                  value: 2,
                }
              ],
              width: 140
            },
            data: [],
            refreshNum: 1,
            radio: '1',
            questionTypeList: [],
            CNNum: ['一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '十二', '十三', '十四', '十五']
        }
            {
              label: "是否整改完毕",
              prop: "rectificationFlag",
              align: 'center',
              dicData: [{
                  label: "否",
                  value: 1,
                },
                {
                  label: "是",
                  value: 2,
                }
              ],
              type: 'select',
              search: true,
              searchSpan: 4,
              searchLabelWidth: 124,
              width: 100
            }, {
              label: "完成整改时限",
              prop: "rectificationEndTime",
              align: 'center',
              width: 100
            }, {
              label: "检查时间",
              prop: "createTime",
              align: 'center',
              width: 100
            }, {
              label: "派出所名称",
              prop: "deptName",
              align: 'center',
              search: true,
              searchSpan: 4,
              searchLabelWidth: 106,
            }, {
              label: "审核状态",
              prop: "status",
              align: 'center',
              dicData: [{
                  label: "待审核",
                  value: 1,
                },
                {
                  label: "审核通过",
                  value: 2,
                },
                {
                  label: "审核不通过",
                  value: 3,
                },
                {
                  label: "待上报",
                  value: 4,
                }
              ],
              search: false,
              searchSpan: 4,
              searchLabelWidth: 106,
            }, {
              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,
            }
          ],
        },
        data: [],
        refreshNum: 1,
        radio: '1',
        questionTypeList: [],
        CNNum: ['一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '十二', '十三', '十四', '十五']
      }
    },
    computed: {
        ...mapGetters(["permission", "userInfo"]),
        permissionList () {
            return {
                addBtn: this.vaildData(this.permission.place_add, true),
                viewBtn: this.vaildData(this.permission.place_view, true),
                delBtn: this.vaildData(this.permission.place_delete, true),
                editBtn: this.vaildData(this.permission.place_edit, true),
            }
        },
        ids () {
            let ids = []
            this.selectionList.forEach((ele) => {
                ids.push(ele.id)
            })
            return ids.join(",")
        },
        showConfirmFlag () {
            return (data) => {
                let tags = {
                    text: '',
                    type: ''
                }
                if (data == 1) {
                    tags = {
                        text: '待审核',
                        type: 'warning'
                    }
                } else if (data == 2) {
                    tags = {
                        text: '审核通过',
                        type: 'success'
                    }
                } else if (data == 3) {
                    tags = {
                        text: '审核不通过',
                        type: 'danger'
                    }
                } else if (data == 4) {
                    tags = {
                        text: '待上报',
                        type: 'info'
                    }
                }
                return tags
            }
      ...mapGetters(["permission", "userInfo"]),
      permissionList() {
        return {
          addBtn: this.vaildData(this.permission.place_add, true),
          viewBtn: this.vaildData(this.permission.place_view, true),
          delBtn: this.vaildData(this.permission.place_delete, true),
          editBtn: this.vaildData(this.permission.place_edit, true),
        }
      },
      ids() {
        let ids = []
        this.selectionList.forEach((ele) => {
          ids.push(ele.id)
        })
        return ids.join(",")
      },
      showConfirmFlag() {
        return (data) => {
          let tags = {
            text: '',
            type: ''
          }
          if (data == 1) {
            tags = {
              text: '待审核',
              type: 'warning'
            }
          } else if (data == 2) {
            tags = {
              text: '审核通过',
              type: 'success'
            }
          } else if (data == 3) {
            tags = {
              text: '审核不通过',
              type: 'danger'
            }
          } else if (data == 4) {
            tags = {
              text: '待上报',
              type: 'info'
            }
          }
          return tags
        }
      }
    },
    created () {
        this.getPatrolGroupTree()
    created() {
      this.getPatrolGroupTree()
    },
    methods: {
        // 弹窗关闭回调
        handleClose () {
            this.cancelAudit()
        },
      // 弹窗关闭回调
      handleClose() {
        this.cancelAudit()
      },
        // 取消审核
        cancelAudit () {
            this.visible = false
        },
      // 取消审核
      cancelAudit() {
        this.visible = false
      },
        // 确认提交审核
        submitAudit (form) {
            let auditForm = {
                status: form.status == '1' ? '2' : '3',
                reasonFailure: form.confirmNotion,
            }
            applyRectification(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.id,
                taskId: row.taskId
            }
            this.visible = true
        },
        // 折叠问题列表
        flodQL (index) {
            this.rowDetail.qTypeList[index].isShowQList = !this.rowDetail.qTypeList[index].isShowQList
            this.refreshNum += 1
        },
        // 折叠其他
        flodRM () {
            this.rowDetail.isShowRemark = !this.rowDetail.isShowRemark
            this.refreshNum += 1
        },
        // 对数组按属性分组
        groupBy (arr, key) {
            return arr.reduce((acc, curr) => {
                (acc[curr[key]] = acc[curr[key]] || []).push(curr)
                return acc
            }, {})
        },
        // 获取问题类型
        getPatrolGroupTree () {
            getPatrolGroupTree().then(res => {
                this.questionTypeList = res.data.data
            })
        },
        getDetail (row) {
            if (row.patrolRecordVOList) {
                row.patrolRecordVOList.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
                            }
                        })
                    })
                })
            }
            // 把相同类型问题分组
            let obj = this.groupBy(row.patrolRecordVOList, '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.remarkNo = newArr.length
            row.isShowRemarkTitle = row.remark ? true : false
            row.isShowRemark = true
            this.rowDetail = row
            this.isDetail = true
        },
        changeType (type) {
            this.typeStatus = type
            this.page.currentPage = 1
            this.onLoad(this.page)
        },
        handleExport () {
            this.$confirm("是否导出整改情况数据?", "提示", {
                confirmButtonText: "确定",
                cancelButtonText: "取消",
                type: "warning"
            }).then(() => {
                NProgress.start()
                var data = {
                    ...this.query
                }
                data = Qs.stringify(data)
                exportBlob(
                    `/api/blade-taskPlaceRectification/taskPlaceRectification/exportRectificationStatistics?${this.website.tokenHeader}=${getToken()}&` + data
                ).then(res => {
                    downloadXls(res.data, `整改情况${dateNow()}.xlsx`)
                    NProgress.done()
                })
            })
        },
        rowSave (row, 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
            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.onLoad(this.page)
        },
        searchChange (params, done) {
            let dateRange = params.dateRange
            if (params.dateRange) {
                params.startTime = dateRange[0]
                params.endTime = dateRange[1]
                delete params.dateRange
            }
            this.query = params
            this.page.currentPage = 1
            this.onLoad(this.page)
            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
        },
        sizeChange (pageSize) {
            this.page.pageSize = pageSize
        },
        refreshChange () {
            // this.onLoad(this.page, this.query)
        },
        onLoad (page, params = {}) {
            this.loading = true
            if (this.typeStatus == 1) {
                this.query.status = '1'
            } else if (this.typeStatus == 2) {
                this.query.status = '2'
            } else if (this.typeStatus == 3) {
                this.query.status = ''
            }
            if ('startTime' in this.query) {
                this.query.startTime += ' 00:00:00'
            }
            if ('endTime' in this.query) {
                this.query.endTime += ' 23:59:59'
            }
            getZGQKList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
                console.log('getZGQKList', res.data.data)
                const data = res.data.data
                data.records.forEach(item => {
                    item.createTime = item.createTime ? item.createTime.slice(0, 10) : ''
                    item.rectificationEndTime = item.rectificationEndTime ? item.rectificationEndTime.slice(0, 10) : ''
                })
                this.page.total = data.total
                this.data = data.records
                this.loading = false
                this.selectionClear()
            })
      // 确认提交审核
      submitAudit(form) {
        let auditForm = {
          status: form.status == '1' ? '2' : '3',
          reasonFailure: form.confirmNotion,
        }
        applyRectification(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.id,
          taskId: row.taskId
        }
        this.visible = true
      },
      // 折叠问题列表
      flodQL(index) {
        this.rowDetail.qTypeList[index].isShowQList = !this.rowDetail.qTypeList[index].isShowQList
        this.refreshNum += 1
      },
      // 折叠其他
      flodRM() {
        this.rowDetail.isShowRemark = !this.rowDetail.isShowRemark
        this.refreshNum += 1
      },
      // 对数组按属性分组
      groupBy(arr, key) {
        return arr.reduce((acc, curr) => {
          (acc[curr[key]] = acc[curr[key]] || []).push(curr)
          return acc
        }, {})
      },
      // 获取问题类型
      getPatrolGroupTree() {
        getPatrolGroupTree({
          type: 1,
          childType: 1
        }).then(res => {
          this.questionTypeList = res.data.data
        })
      },
      getDetail(row) {
        if (row.patrolRecordVOList) {
          row.patrolRecordVOList.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
                }
              })
            })
          })
        }
        // 把相同类型问题分组
        let obj = this.groupBy(row.patrolRecordVOList, '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.remarkNo = newArr.length
        row.isShowRemarkTitle = row.remark ? true : false
        row.isShowRemark = true
        this.rowDetail = row
        this.isDetail = true
      },
      changeType(type) {
        this.typeStatus = type
        this.page.currentPage = 1
        this.onLoad(this.page)
      },
      handleExport() {
        this.$confirm("是否导出整改情况数据?", "提示", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning"
        }).then(() => {
          NProgress.start()
          var data = {
            ...this.query
          }
          data = Qs.stringify(data)
          exportBlob(
            `/api/blade-taskPlaceRectification/taskPlaceRectification/exportRectificationStatistics?${this.website.tokenHeader}=${getToken()}&` +
            data
          ).then(res => {
            downloadXls(res.data, `整改情况${dateNow()}.xlsx`)
            NProgress.done()
          })
        })
      },
      rowSave(row, 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
        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.onLoad(this.page)
      },
      searchChange(params, done) {
        let dateRange = params.dateRange
        if (params.dateRange) {
          params.startTime = dateRange[0]
          params.endTime = dateRange[1]
          delete params.dateRange
        }
        this.query = params
        this.page.currentPage = 1
        this.onLoad(this.page)
        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
      },
      sizeChange(pageSize) {
        this.page.pageSize = pageSize
      },
      refreshChange() {
        // this.onLoad(this.page, this.query)
      },
      onLoad(page, params = {}) {
        this.loading = true
        if (this.typeStatus == 1) {
          this.query.status = '1'
        } else if (this.typeStatus == 2) {
          this.query.status = '2'
        } else if (this.typeStatus == 3) {
          this.query.status = ''
        }
        if ('startTime' in this.query) {
          this.query.startTime += ' 00:00:00'
        }
        if ('endTime' in this.query) {
          this.query.endTime += ' 23:59:59'
        }
        getZGQKList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
          console.log('getZGQKList', res.data.data)
          const data = res.data.data
          data.records.forEach(item => {
            item.createTime = item.createTime ? item.createTime.slice(0, 10) : ''
            item.rectificationEndTime = item.rectificationEndTime ? item.rectificationEndTime.slice(0, 10) : ''
          })
          this.page.total = data.total
          this.data = data.records
          this.loading = false
          this.selectionClear()
        })
      }
    }
}
  }
</script>
<style lang="scss" scoped>
.avue-upload__icon {
  .avue-upload__icon {
    line-height: 6;
}
  }
.tab-list {
  .tab-list {
    display: flex;
    margin-right: 6px;
    border: 1px solid #dcdfe6;
@@ -725,55 +737,55 @@
    height: 34px;
    &>div {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 60px;
        cursor: pointer;
        font-size: 12px;
      display: flex;
      align-items: center;
      justify-content: center;
      width: 60px;
      cursor: pointer;
      font-size: 12px;
    }
    &>div:nth-child(2) {
        border-left: 1px solid #dcdfe6;
        border-right: 1px solid #dcdfe6;
      border-left: 1px solid #dcdfe6;
      border-right: 1px solid #dcdfe6;
    }
    .choose {
        color: #FFF;
        background-color: #409dfe;
      color: #FFF;
      background-color: #409dfe;
    }
}
  }
:deep(.avue-crud__left) {
  :deep(.avue-crud__left) {
    display: flex;
    align-items: center;
}
  }
:deep(.el-drawer__header) {
  :deep(.el-drawer__header) {
    margin-bottom: 10px;
}
  }
:deep(.el-radio__input.is-disabled+span.el-radio__label) {
  :deep(.el-radio__input.is-disabled+span.el-radio__label) {
    color: #000;
}
  }
:deep(.el-radio__input.is-checked+.el-radio__label) {
  :deep(.el-radio__input.is-checked+.el-radio__label) {
    color: #409EFF !important;
}
  }
:deep(.el-radio__input.is-checked .el-radio__inner::after) {
  :deep(.el-radio__input.is-checked .el-radio__inner::after) {
    background-color: #FFF;
}
  }
:deep(.el-radio__input.is-checked .el-radio__inner) {
  :deep(.el-radio__input.is-checked .el-radio__inner) {
    background-color: #409EFF;
}
  }
:deep(.el-radio) {
  :deep(.el-radio) {
    margin-right: 20px;
}
  }
.title {
  .title {
    margin: 10px;
    height: 40px;
    background-color: #eee;
@@ -781,119 +793,119 @@
    align-items: center;
    .icon {
        width: 4px;
        height: 18px;
        background-color: #409dfe;
        margin: 0 10px;
        color: transparent;
      width: 4px;
      height: 18px;
      background-color: #409dfe;
      margin: 0 10px;
      color: transparent;
    }
}
  }
.basic-info {
  .basic-info {
    padding: 0 20px;
    font-size: 14px;
    .info-item {
      display: flex;
      padding: 10px;
      .info-name {
        width: 100px;
        display: flex;
        padding: 10px;
        align-items: center;
      }
        .info-name {
            width: 100px;
            display: flex;
            align-items: center;
        }
        .info-value {
            display: flex;
            align-items: center;
        }
      .info-value {
        display: flex;
        align-items: center;
      }
    }
}
  }
.question-list {
  .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;
      height: 60px;
      display: flex;
      align-items: center;
      cursor: pointer;
      justify-content: space-between;
      padding-right: 20px;
        .type-name {}
      .type-name {}
        .icon-box {}
      .icon-box {}
    }
    .question-item {
        margin-bottom: 20px;
        padding: 10px;
        background: #f5f7fa;
        border-radius: 8px;
      margin-bottom: 20px;
      padding: 10px;
      background: #f5f7fa;
      border-radius: 8px;
        &>div {
            margin: 14px 0;
      &>div {
        margin: 14px 0;
      }
      .question-name {
        display: flex;
        .key {
          width: 80%;
          padding-right: 20px;
          word-break: break-all;
        }
        .question-name {
            display: flex;
        .value {
          width: 20%;
          display: flex;
          align-items: center;
          justify-content: center;
        }
      }
            .key {
                width: 80%;
                padding-right: 20px;
                word-break: break-all;
            }
      .yh-pic-box {
        display: flex;
        height: 100px;
            .value {
                width: 20%;
                display: flex;
                align-items: center;
                justify-content: center;
            }
        .yh-pic-name {
          width: 100px;
          display: flex;
          align-items: center;
          justify-content: left;
        }
        .yh-pic-box {
            display: flex;
            height: 100px;
        .yh-pic-list {
          width: 0;
          flex: 1;
          display: flex;
        }
      }
            .yh-pic-name {
                width: 100px;
                display: flex;
                align-items: center;
                justify-content: left;
            }
      .yh-remark {
        display: flex;
            .yh-pic-list {
                width: 0;
                flex: 1;
                display: flex;
            }
        .yh-remark-name {
          width: 100px;
          display: flex;
          align-items: center;
          justify-content: left;
        }
        .yh-remark {
            display: flex;
            .yh-remark-name {
                width: 100px;
                display: flex;
                align-items: center;
                justify-content: left;
            }
            .yh-remark-value {
                word-break: break-all;
            }
        .yh-remark-value {
          word-break: break-all;
        }
      }
    }
    .remark-box {
        padding: 10px;
        background-color: #f5f7fa;
        border-radius: 8px;
        min-height: 40px;
        margin-bottom: 20px;
      padding: 10px;
      background-color: #f5f7fa;
      border-radius: 8px;
      min-height: 40px;
      margin-bottom: 20px;
    }
}
  }
</style>