linwei
2024-01-10 f89867e71936474a1afd1994e49a3f55d937ec33
src/views/publicSecurity/components/hotelReporting.vue
@@ -1,303 +1,299 @@
<template>
    <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 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 {
  import {
    getDetail,
    update
} from "@/api/task/hotelReporting"
import website from '@/config/website'
export default {
    data () {
        return {
            form: {},
            applyType: '',
            option: {
                submitBtn: false,
                emptyBtn: false,
                column: [{
                    label: '酒店名称',
                    prop: 'hotelName',
                    disabled: true,
                    span: 8,
                    labelWidth: 120,
                }, {
                    label: '申请时间',
                    prop: 'checkTime',
                    disabled: true,
                    span: 8,
                    labelWidth: 120,
                }, {
                    label: '申请人',
                    prop: 'checkUserName',
                    disabled: true,
                    span: 8,
                    labelWidth: 120,
                }, {
                    label: '申请人手机',
                    prop: 'checkTelephone',
                    disabled: true,
                    span: 8,
                    labelWidth: 120,
                }, {
                    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,
                }, {
                    width: 110,
                    label: '灭火器图片',
                    prop: 'fireImageUrls',
                    fileType: 'img',
                    type: "upload",
                    listType: "picture-card",
                    dataType: "string",
                    disabled: true,
                    span: 8,
                    labelWidth: 120,
                }, {
                    label: '安全通道状态',
                    prop: 'scStatus',
                    disabled: true,
                    span: 8,
                    labelWidth: 120,
                }, {
                    width: 110,
                    label: '安全通道图片',
                    prop: 'scImageUrls',
                    fileType: 'img',
                    type: "upload",
                    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: '有',
                        value: '1'
                    },
                    {
                        label: '无',
                        value: '2'
                    }
                    ]
  } from "@/api/task/hotelReporting"
  import website from '@/config/website'
  export default {
    data() {
      return {
        form: {},
        applyType: '',
        option: {
          submitBtn: false,
          emptyBtn: false,
          column: [{
              label: '酒店名称',
              prop: 'hotelName',
              disabled: true,
              span: 8,
              labelWidth: 120,
            }, {
              label: '申请时间',
              prop: 'checkTime',
              disabled: true,
              span: 8,
              labelWidth: 120,
            }, {
              label: '申请人',
              prop: 'checkUserName',
              disabled: true,
              span: 8,
              labelWidth: 120,
            }, {
              label: '申请人手机',
              prop: 'checkTelephone',
              disabled: true,
              span: 8,
              labelWidth: 120,
            }, {
              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,
            }, {
              width: 110,
              label: '灭火器图片',
              prop: 'fireImageUrls',
              fileType: 'img',
              type: "upload",
              listType: "picture-card",
              dataType: "string",
              disabled: true,
              span: 8,
              labelWidth: 120,
            }, {
              label: '安全通道状态',
              prop: 'scStatus',
              disabled: true,
              span: 8,
              labelWidth: 120,
            }, {
              width: 110,
              label: '安全通道图片',
              prop: 'scImageUrls',
              fileType: 'img',
              type: "upload",
              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: '有',
                  value: '1'
                },
                {
                    label: '技防设施照片',
                    prop: 'pfImageUrls',
                    fileType: 'img',
                    type: "upload",
                    listType: "picture-card",
                    dataType: "string",
                    disabled: true,
                    span: 8,
                    labelWidth: 120,
                  label: '无',
                  value: '2'
                }
              ]
            },
            {
              label: '技防设施照片',
              prop: 'pfImageUrls',
              fileType: 'img',
              type: "upload",
              listType: "picture-card",
              dataType: "string",
              disabled: true,
              span: 8,
              labelWidth: 120,
            },
            {
              label: '接待未成年人需要做到五个必须',
              prop: 'fiveMust',
              disabled: true,
              span: 8,
              labelWidth: 120,
              type: 'select',
              dicData: [{
                  label: "必须询问同住人员身份关系情况,并记录备查",
                  value: '1'
                },
                {
                    label: '接待未成年人需要做到五个必须',
                    prop: 'fiveMust',
                    disabled: true,
                    span: 8,
                    labelWidth: 120,
                    type: 'select',
                    dicData: [{
                        label: "必须询问同住人员身份关系情况,并记录备查",
                        value: '1'
                    },
                    {
                        label: "必须立即向公安机关报告可以情况,并及时联系未成年人的父母获取其他监护人,同时采取相应安全保护措施",
                        value: '2'
                    },
                    {
                        label: "必须查验入住未成年人身份,并如实登记报送相关信息",
                        value: '3'
                    },
                    {
                        label: "必须询问未成年父母或者其他监护人的联系方式并记录备查",
                        value: '4'
                    },
                    {
                        label: "必须加强安全巡查和访客管理,预防针对未成年人的不法侵害",
                        value: '5'
                    },
                    {
                        label: "以上皆未做到",
                        value: '6'
                    }
                    ]
                  label: "必须立即向公安机关报告可以情况,并及时联系未成年人的父母获取其他监护人,同时采取相应安全保护措施",
                  value: '2'
                },
                {
                    label: '未成年人入住登记本照片',
                    prop: 'uanImageUrls',
                    fileType: 'img',
                    type: "upload",
                    listType: "picture-card",
                    dataType: "string",
                    disabled: true,
                    span: 8,
                    labelWidth: 120,
                  label: "必须查验入住未成年人身份,并如实登记报送相关信息",
                  value: '3'
                },
                {
                    label: '是否完全实名制登记',
                    prop: 'realName',
                    disabled: true,
                    span: 8,
                    labelWidth: 120,
                  label: "必须询问未成年父母或者其他监护人的联系方式并记录备查",
                  value: '4'
                },
                {
                    label: '确认时间',
                    prop: 'confirmTime',
                    disabled: true,
                    span: 8,
                    labelWidth: 120,
                  label: "必须加强安全巡查和访客管理,预防针对未成年人的不法侵害",
                  value: '5'
                },
                {
                    label: '确认用户',
                    prop: 'confirmUserName',
                    disabled: true,
                    span: 8,
                    labelWidth: 120,
                },
                {
                    label: '安全通道有无',
                    prop: 'scFlag',
                    disabled: true,
                    span: 8,
                    labelWidth: 120,
                  label: "以上皆未做到",
                  value: '6'
                }
              ]
            },
            {
              label: '未成年人入住登记本照片',
              prop: 'uanImageUrls',
              fileType: 'img',
              type: "upload",
              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: '审核意见',
                    prop: 'confirmNotion',
                    disabled: true,
                    span: 8,
                    labelWidth: 120,
                },
                {
                    label: '审核状态',
                    prop: 'confirmFlag',
                    type: 'select',
                    dicData: [{
                        label: '待审核',
                        value: '1'
                    }, {
                        label: '审核通过',
                        value: '2'
                    }, {
                        label: '审核不通过',
                        value: '3'
                    }],
                    disabled: true,
                    span: 8,
                    labelWidth: 120,
                },
                ]
            }
            },
            {
              label: '审核意见',
              prop: 'confirmNotion',
              disabled: true,
              span: 8,
              labelWidth: 120,
            },
            {
              label: '审核状态',
              prop: 'confirmFlag',
              type: 'select',
              dicData: [{
                label: '待审核',
                value: '1'
              }, {
                label: '审核通过',
                value: '2'
              }, {
                label: '审核不通过',
                value: '3'
              }],
              disabled: true,
              span: 8,
              labelWidth: 120,
            },
          ]
        }
      }
    },
    methods: {
        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)
        },
      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)
      },
        getTaskDetail (taskId) {
            getDetail({
                taskId: taskId
            }).then((res) => {
                this.form = res.data.data
                if (this.form.uanImageUrls) {
                    this.form.uanImageUrls = website.minioUrl + this.form.uanImageUrls
                }
                if (this.form.pfImageUrls) {
                    this.form.pfImageUrls = website.minioUrl + this.form.pfImageUrls
                }
                if (this.form.scImageUrls) {
                    this.form.scImageUrls = website.minioUrl + this.form.scImageUrls
                }
                if (this.form.fireImageUrls) {
                    this.form.fireImageUrls = website.minioUrl + this.form.fireImageUrls
                }
      getTaskDetail(taskId) {
        getDetail({
          taskId: taskId
        }).then((res) => {
          this.form = res.data.data
          if (this.form.uanImageUrls) {
            this.form.uanImageUrls = website.minioUrl + this.form.uanImageUrls
          }
          if (this.form.pfImageUrls) {
            this.form.pfImageUrls = website.minioUrl + this.form.pfImageUrls
          }
          if (this.form.scImageUrls) {
            this.form.scImageUrls = website.minioUrl + this.form.scImageUrls
          }
          if (this.form.fireImageUrls) {
            this.form.fireImageUrls = website.minioUrl + this.form.fireImageUrls
          }
            })
        }
        })
      }
    }
}
  }
</script>
<style lang="scss" scoped>
.cur-container-box {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    overflow: hidden;
  .cur-container-box {
    padding: 50px;
    .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;
    }
}
  }
</style>