linwei
2024-01-04 d1954622eee916e07532a79e2cc2dfce6788487f
src/views/publicSecurity/components/hotelReporting.vue
@@ -1,14 +1,28 @@
<template>
  <avue-form :option="option" v-model="data"></avue-form>
  <div class="cur-container-box">
    <div v-if="applyType == 1">
      <div class="content-box">
        审核当前项
      </div>
      <div class="footer-btn-box">
        <el-button type="primary" size="small" @click="auditPass(2)">通 过</el-button>
        <el-button size="small" @click="auditPass(3)">驳 回</el-button>
      </div>
    </div>
    <avue-form v-else :option="option" v-model="form"></avue-form>
  </div>
</template>
<script>
  import {
    getDetail
    getDetail,
    update
  } from "@/api/task/hotelReporting"
  export default {
    data() {
      return {
        data: {},
        form: {},
        applyType: '',
        option: {
          submitBtn: false,
          emptyBtn: false,
@@ -16,30 +30,44 @@
              label: '酒店名称',
              prop: 'hotelName',
              disabled: true,
              span: 8,
              labelWidth: 120,
            }, {
              label: '自查时间',
              label: '申请时间',
              prop: 'checkTime',
              disabled: true,
              span: 8,
              labelWidth: 120,
            }, {
              label: '自查人姓名',
              label: '申请人',
              prop: 'checkUserName',
              disabled: true,
              span: 8,
              labelWidth: 120,
            }, {
              label: '自查人手机',
              label: '申请人手机',
              prop: 'checkTelephone',
              disabled: true,
              span: 8,
              labelWidth: 120,
            }, {
              label: '自查位置',
              label: '申请位置',
              prop: 'location',
              disabled: true,
              span: 8,
              labelWidth: 120,
            }, {
              label: '灭火器数量',
              prop: 'fireNums',
              disabled: true,
              span: 8,
              labelWidth: 120,
            }, {
              label: '灭火器状态',
              prop: 'fireStatus',
              disabled: true,
              span: 8,
              labelWidth: 120,
            }, {
              label: '灭火器图片',
              prop: 'fireImageUrls',
@@ -48,10 +76,14 @@
              listType: "picture-card",
              dataType: "string",
              disabled: true,
              span: 8,
              labelWidth: 120,
            }, {
              label: '安全通道状态',
              prop: 'scStatus',
              disabled: true,
              span: 8,
              labelWidth: 120,
            }, {
              label: '安全通道图片',
              prop: 'scImageUrls',
@@ -60,14 +92,20 @@
              listType: "picture-card",
              dataType: "string",
              disabled: true,
              span: 8,
              labelWidth: 120,
            }, {
              label: '技防设施有无',
              prop: 'pfFlag',
              disabled: true,
              span: 8,
              labelWidth: 120,
            }, {
              label: '技防设施名称',
              prop: 'pfName',
              disabled: true,
              span: 8,
              labelWidth: 120,
              type: 'select',
              dicData: [{
                  label: '有',
@@ -87,11 +125,15 @@
              listType: "picture-card",
              dataType: "string",
              disabled: true,
              span: 8,
              labelWidth: 120,
            },
            {
              label: '接待未成年人需要做到五个必须',
              prop: 'fiveMust',
              disabled: true,
              span: 8,
              labelWidth: 120,
              type: 'select',
              dicData: [{
                  label: "必须询问同住人员身份关系情况,并记录备查",
@@ -127,34 +169,47 @@
              listType: "picture-card",
              dataType: "string",
              disabled: true,
              span: 8,
              labelWidth: 120,
            },
            {
              label: '是否完全实名制登记',
              prop: 'realName',
              disabled: true,
              span: 8,
              labelWidth: 120,
            },
            {
              label: '确认时间',
              prop: 'confirmTime',
              disabled: true,
              span: 8,
              labelWidth: 120,
            },
            {
              label: '确认用户',
              prop: 'confirmUserName',
              disabled: true,
              span: 8,
              labelWidth: 120,
            },
            {
              label: '安全通道有无',
              prop: 'scFlag',
              disabled: true,
              span: 8,
              labelWidth: 120,
            },
            {
              label: '确认意见',
              label: '审核意见',
              prop: 'confirmNotion',
              disabled: true,
              span: 8,
              labelWidth: 120,
            },
            {
              label: '确认标记',
              label: '审核状态',
              prop: 'confirmFlag',
              type: 'select',
              dicData: [{
@@ -168,18 +223,29 @@
                value: '3'
              }],
              disabled: true,
            },
            {
              label: '创建时间',
              prop: 'createTime',
              disabled: true,
              span: 8,
              labelWidth: 120,
            },
          ]
        }
      }
    },
    methods: {
      init(data) {
      auditPass(type) {
        update({
          status: type,
          taskId: this.form.taskId,
          id: this.form.id
        }).then(() => {
          this.$message({
            type: "success",
            message: "操作成功!",
          })
          this.$emit('colseDetail');
        })
      },
      init(data, applyType) {
        this.applyType = applyType
        this.getTaskDetail(data.id)
      },
@@ -187,7 +253,7 @@
        getDetail({
          taskId: taskId
        }).then((res) => {
          this.data = res.data.data
          this.form = res.data.data
        })
      }
@@ -195,5 +261,27 @@
  }
</script>
<style>
<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 16px;
      height: 0;
      flex: 1;
      overflow: hidden;
      overflow-y: auto;
    }
    .footer-btn-box {
      margin-top: 10px;
      display: flex;
      justify-content: center;
    }
  }
</style>