linwei
2024-01-04 d1954622eee916e07532a79e2cc2dfce6788487f
src/views/publicSecurity/components/bailReportingDetail.vue
@@ -1,47 +1,70 @@
<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/bailReporting"
  export default {
    data() {
      return {
        data: {},
        form: {},
        applyType: '',
        option: {
          submitBtn: false,
          emptyBtn: false,
          column: [{
            // span: 10,
            label: '自查人名称',
            label: '申请人',
            prop: 'checkUserName',
            disabled: true,
            span: 8,
          }, {
            // span: 12,
            label: '自查人手机',
            label: '申请人手机',
            prop: 'checkTelephone',
            disabled: true,
            span: 8,
          }, {
            label: '自查位置',
            label: '申请位置',
            prop: 'location',
            disabled: true,
            span: 8,
          }, {
            label: '确认时间',
            label: '审核时间',
            prop: 'confirmTime',
            disabled: true,
            span: 8,
          }, {
            label: '确认用户',
            label: '审核人',
            prop: 'confirmUserName',
            disabled: true,
            span: 8,
          }, {
            label: '确认意见',
            label: '审核意见',
            prop: 'confirmNotion',
            disabled: true,
            span: 8,
          }, {
            label: '确认标记',
            label: '审核状态',
            prop: 'confirmFlag',
            disabled: true,
            span: 8,
            type: 'select',
            dicData: [{
              label: '待审核',
@@ -57,14 +80,17 @@
            label: '申请时间',
            prop: 'applyTime',
            disabled: true,
            span: 8,
          }, {
            label: '外出原因',
            prop: 'applyName',
            disabled: true,
            span: 8,
          }, {
            label: '身份证号',
            prop: 'idCard',
            disabled: true,
            span: 8,
          }, {
            label: '位置图片',
            fileType: 'img',
@@ -74,17 +100,22 @@
            prop: 'locationImageUrls',
            disabled: true,
          }, {
            label: '确认人电话',
            label: '审核人电话',
            prop: 'confirmUserTelephone',
            disabled: true,
            span: 8,
          }, {
            label: '出发-当前时间',
            prop: 'startTime',
            disabled: true,
            span: 8,
            labelWidth: 120,
          }, {
            label: '出发-报备位置',
            prop: 'startLocation',
            disabled: true,
            span: 8,
            labelWidth: 120,
          }, {
            label: '出发-位置图片',
            fileType: 'img',
@@ -93,14 +124,19 @@
            dataType: "string",
            prop: 'startImageUrls',
            disabled: true,
            labelWidth: 120,
          }, {
            label: '到达-当前时间',
            prop: 'reachTime',
            disabled: true,
            labelWidth: 120,
            span: 8,
          }, {
            label: '到达-报备位置',
            prop: 'reachLocation',
            disabled: true,
            span: 8,
            labelWidth: 120,
          }, {
            label: '到达-位置图片',
            fileType: 'img',
@@ -109,14 +145,19 @@
            dataType: "string",
            prop: 'reachImageUrls',
            disabled: true,
            labelWidth: 120,
          }, {
            label: '返回-当前时间',
            prop: 'returnTime',
            disabled: true,
            labelWidth: 120,
            span: 8,
          }, {
            label: '返回-报备位置',
            prop: 'returnLocation',
            disabled: true,
            span: 8,
            labelWidth: 120,
          }, {
            label: '返回-位置图片',
            fileType: 'img',
@@ -124,17 +165,29 @@
            listType: "picture-card",
            dataType: "string",
            prop: 'returnImageUrls',
            disabled: true,
          }, {
            label: '创建时间',
            prop: 'createTime',
            labelWidth: 120,
            disabled: true,
          }, ]
        }
      }
    },
    methods: {
      init(data) {
      auditPass(type) {
        update({
          confirmFlag: 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.form = {}
        this.getTaskDetail(data.id)
      },
@@ -142,7 +195,7 @@
        getDetail({
          taskId: taskId
        }).then((res) => {
          this.data = res.data.data
          this.form = res.data.data
        })
      }
@@ -150,5 +203,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>