linwe
2024-07-09 e2c1995f2e135b8a7433b2bdbed2f7758261ace8
src/views/publicSecurity/noExplosionManage.vue
@@ -40,8 +40,10 @@
    <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>
      <audit-base ref="auditBase" @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>
@@ -52,10 +54,10 @@
          <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.noExplosionCategoryName }}</div>
        </div> -->
        <div class="info-item">
          <div class="info-name">场所标准地址</div>
          <div class="info-value">{{ rowDetail.addressName }}</div>
        </div>
        <div class="info-item">
          <div class="info-name">上报人</div>
          <div class="info-value">{{ rowDetail.name }}</div>
@@ -63,6 +65,15 @@
        <div class="info-item">
          <div class="info-name">上报时间</div>
          <div class="info-value">{{ rowDetail.createTime }}</div>
        </div>
        <div class="info-item">
          <div class="info-name">门牌二维码</div>
          <div class="info-value">
            <!-- <img style="width: 60px;height: 60px;" :src="rowDetail.qrImg" alt="" /> -->
            <el-image v-if="rowDetail.qrImg" style="width: 60px; height: 60px" :src="rowDetail.qrImg"
              @click="loockImag(rowDetail.qrImg)" :preview-src-list="srcList">
            </el-image>
          </div>
        </div>
      </div>
      <div class="title">
@@ -87,12 +98,19 @@
          </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 v-if="type === 1" class="pic-item" v-for="pic in item.imageUrlsList">
                <el-image style="width: 100px; height: 100px" :src="pic" :fit="fit"
                  :preview-src-list="item.imageUrlsList"></el-image>
              </div>
              <div v-if="type === 2" style="line-height: 100px;" v-for="pic in item.imageUrlsList">
                <el-button @click="downloadFile(item.imageUrls)" type="primary">下载</el-button>
              </div>
            </div>
          </div>
        </div>
@@ -110,6 +128,7 @@
    applyTaskExamine
  } from "@/api/task/task"
  import auditBase from './components/auditBase'
  import {
    mapGetters
  } from "vuex"
@@ -143,21 +162,22 @@
  export default {
    data() {
      //手机号格式校验
      let validatorPhone = function(rule, value, callback) {
        if (value) {
          if (!/^1[3456789]\d{9}$/.test(value)) {
            callback(new Error('手机号格式有误!'))
          } else {
            callback()
          }
        }
        callback()
      }
      // 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: [],
        srcList: [],
        auditRules: {
          status: [{
            required: true,
@@ -208,6 +228,20 @@
          columnBtn: false,
          dialogClickModal: false,
          column: [{
              label: "创建时间",
              prop: "dateRange",
              type: "daterange",
              format: "yyyy-MM-dd",
              valueFormat: "yyyy-MM-dd",
              searchRange: true,
              startPlaceholder: '开始日期',
              endPlaceholder: '结束日期',
              align: 'center',
              search: true,
              hide: true,
              searchSpan: 5,
              searchLabelWidth: 76,
            }, {
              label: "场所名称",
              prop: "placeName",
              span: 24,
@@ -238,30 +272,41 @@
              search: true,
              searchSpan: 4,
              searchLabelWidth: 96,
              align: 'center'
            }, {
            },
            {
              label: "所属街道",
              prop: "streetName",
              span: 24,
              row: true,
              searchSpan: 4,
              search: true,
              // search: true,
              align: 'center'
            },
            {
              parent: false,
              label: "所属社区",
              prop: "communityName",
              span: 24,
              row: true,
              searchSpan: 4,
              width: 150,
              search: true,
              width: 160,
              overHidden: true,
              align: 'center'
              type: "tree",
              searchSpan: 4,
              dicUrl: "/api/blade-system/region/treeToCommunity",
              props: {
                label: "name",
                value: "name",
              },
              cascader: ["gridCode"],
              rules: [{
                required: true,
                message: "请选择所属社区",
                trigger: "blur",
              }, ],
            },
            {
              label: "所属网格",
              prop: "gridName",
              label: "派出所",
              prop: "pcsName",
              span: 24,
              row: true,
              searchSpan: 4,
@@ -287,15 +332,7 @@
              searchSpan: 4,
              align: 'center'
            },
            {
              label: "无诈上报数量",
              prop: "number",
              span: 24,
              row: true,
              slot: true,
              searchSpan: 4,
              align: 'center'
            },
            {
              width: 110,
              label: "审核状态",
@@ -316,6 +353,7 @@
          ],
        },
        data: [],
        type: '',
        auditBasePopup: false,
        questionTypeList: [],
@@ -327,11 +365,12 @@
    provide() {
      return {
        placeElement: this,
        placeElement: this
      }
    },
    components: {
      auditBase,
      campusReporting,
      hotelReporting,
      labelReporting,
@@ -403,7 +442,24 @@
        }
      }
    },
    methods: {
      loockImag(img) {
        console.log("**************", img)
        this.srcList = []
        this.srcList.push(img)
      },
      downloadFile(url) {
        window.location.href = url
        // window.open(url);
        // const link = document.createElement('a');
        // link.href = url;
        // link.download = "";
        // link.target = "_blank"; // 可选,如果希望在新窗口中下载文件,请取消注释此行
        // link.click();
      },
      // 点击展开收缩
      flodQL(index) {
        this.rowDetail.qTypeList[index].isShowQList = !this.rowDetail.qTypeList[index].isShowQList
@@ -441,6 +497,8 @@
      },
      getDetail(rowData) {
        console.log("*************rowData**************" + JSON.stringify(rowData.type))
        this.type = rowData.type
        this.getPatrolGroupTree({
          type: 2,
          childType: rowData.noExplosionCategory
@@ -488,6 +546,8 @@
                isShowQList: true
              })
            })
            // console.log("999999999999999999999999" + JSON.stringify(newArr))
            row.qTypeList = newArr
          }
          // 九小类型转换
@@ -559,6 +619,10 @@
          reportType: row.reportType
        }
        this.visible = true
        var that = this
        this.$nextTick(() => {
          that.$refs.auditBase.init(row)
        })
      },
      colseDetail() {
@@ -621,23 +685,23 @@
        delete row.smallLabel
        add({
          ...row,
          label
        }).then(
          () => {
            this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!",
            })
            done()
          },
          (error) => {
            window.console.log(error)
            loading()
          }
        )
        // 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) {
@@ -659,23 +723,23 @@
        delete row.smallLabel
        update({
          ...row,
          label
        }).then(
          () => {
            this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!",
            })
            done()
          },
          (error) => {
            window.console.log(error)
            loading()
          }
        )
        // update({
        //   ...row,
        //   label
        // }).then(
        //   () => {
        //     this.onLoad(this.page)
        //     this.$message({
        //       type: "success",
        //       message: "操作成功!",
        //     })
        //     done()
        //   },
        //   (error) => {
        //     window.console.log(error)
        //     loading()
        //   }
        // )
      },
      rowDel(row) {
@@ -705,6 +769,12 @@
      searchChange(params, done) {
        this.query = params
        this.page.currentPage = 1
        let dateRange = params.dateRange
        if (params.dateRange) {
          params.startTime = dateRange[0] + " 00:00:00"
          params.endTime = dateRange[1] + " 23:59:59"
          delete params.dateRange
        }
        this.onLoad(this.page, params)
        done()
      },
@@ -728,7 +798,7 @@
            type: "warning",
          })
          .then(() => {
            return remove(this.ids)
            // return remove(this.ids)
          })
          .then(() => {
            this.onLoad(this.page)
@@ -778,7 +848,7 @@
        this.onLoad(this.page, this.query)
      },
      onLoad(page, params = {}) {
        const {} = this.query
        this.query = {}
        let values = {
          ...params,
        }
@@ -795,7 +865,7 @@
              }
            })
          }
          data.records.forEach(item => {})
          // data.records.forEach(item => {})
          this.page.total = data.total
          this.data = data.records
          this.loading = false