liukangdong
2024-06-12 a11bc1bed7953b88213330582c2085f60b5a73b1
admin/src/components/business/OperaHiddenDangerWindow.vue
@@ -13,8 +13,8 @@
            <div class="time">提报时间:{{model.createDate}}</div>
          </div>
          <div class="right" v-if="model.status==0">待处理</div>
          <div class="right" v-if="model.status==1">已处理</div>
          <div class="right" v-if="model.status==2">已撤销</div>
          <div class="right"  style="background:#53b76f " v-if="model.status==1">已处理</div>
          <div class="right" style="background:#dc362e "  v-if="model.status==2">已退回</div>
        </div>
        <div class="info">
          <div class="title">隐患提报详情</div>
@@ -116,9 +116,9 @@
          <div class="item" v-for="(item,index) in logList" :key="item.id">
            <div class="separate" v-if="index < logList.length-1"></div>
            <div class="info">
              <i class="el-icon-success icon" v-if="(model.status ==1) || index < logList.length-1"></i>
              <i class="el-icon-question icon1" v-if="(model.status==0)  && index == logList.length-1"></i>
              <i class="el-icon-error icon2" v-if="(model.status==2)  && index == logList.length-1"></i>
              <img src="@/assets/icons/ic_tongguo.png"   class="iconnew" v-if="(model.status ==1) || index < logList.length-1"/>
              <img src="@/assets/icons/ic_dangqian.png"   class="iconnew"   v-if="(model.status==0)  && index == logList.length-1"/>
              <img src="@/assets/icons/ic_jujue.png"  class="iconnew"   v-if="(model.status==2)  && index == logList.length-1"/>
              <img v-if="item.avatar!=null && item.avatar !=''" :src="item.avatar" class="avatar" alt="" />
              <img v-if="item.avatar ==null ||item.avatar ==''"  src="@/assets/avatar/man.png" class="avatar" alt="" />
              <div class="content">
@@ -146,7 +146,7 @@
    <template   v-slot:footer>
      <el-button @click="isShowProblem = true"  type="primary"  v-if="model.status==0&& model.checkUserId == userInfo.memberId"  class="status-red">处理</el-button>
      <el-button type="primary" plain v-if="model.status==0 && model.checkUserId == userInfo.memberId" @click="handleTransfer">转交</el-button>
      <el-button @click="backDo"  v-if="model.status==0&& model.checkUserId == userInfo.memberId" type="danger"  >退回</el-button>
      <el-button @click="isBackProblem=true"  v-if="model.status==0&& model.checkUserId == userInfo.memberId" type="danger"  >退回</el-button>
      <el-button @click="visible=false">返回</el-button>
    </template>
@@ -186,8 +186,9 @@
        <el-form-item label="整改时间" prop="checkDate">
          <el-date-picker
              class="w300"
              type="date"
              placeholder="选择日期"
              type="datetime"
              value-format="yyyy-MM-dd HH:mm:ss"
              placeholder="选择整改时间"
              v-model="dealForm.checkDate"
          />
        </el-form-item>
@@ -220,16 +221,18 @@
    <el-dialog
        append-to-body
        title="隐患退回"
        class="dialogCl"
        :visible.sync="isBackProblem"
        width="480px"
        width="600px"
    >
      <el-form :model="backForm" :rules="rulesBack" ref="backForm" label-width="100px">
        <el-form-item label="退回时间" prop="checkDate">
          <el-date-picker
              class="w300"
              type="date"
              placeholder="选择日期"
              value-format="yyyy-MM-dd HH:mm:ss"
              type="datetime"
              placeholder="选择退回时间"
              v-model="backForm.checkDate"
          />
        </el-form-item>
@@ -263,7 +266,6 @@
import upload from '@/components/common/upload'
import { memberList } from '@/api/business/hiddenDangerParam'
import { mapState } from 'vuex'
import { dealHiddenDanger } from '@/api/business/hiddenDanger'
export default {
  components: { GlobalWindow, upload },
  extends: BaseOpera,
@@ -303,10 +305,11 @@
      rulesBack: {
        checkDate: [
          { required: true, message: '请选择退回时间' }
        ],
        ]
        /*,
        dealBeforeFileList: [
          { required: true, message: '请上传整改前情况' }
        ]
        ]*/
      },
      memberList: [],
      transForm: {
@@ -345,8 +348,8 @@
          this.dealForm.dealAfterFileList.splice(index, 1)
        }
      } else if (type == 2) {
        if (this.backForm.dealAfterFileList != null && this.backForm.dealAfterFileList.length > index) {
          this.backForm.dealAfterFileList.splice(index, 1)
        if (this.backForm.dealBeforeFileList != null && this.backForm.dealBeforeFileList.length > index) {
          this.backForm.dealBeforeFileList.splice(index, 1)
        }
      }
    },
@@ -356,10 +359,9 @@
          this.dealForm.dealBeforeFileList = []
        }
        this.dealForm.dealBeforeFileList.push({
          id: this.model.id,
          fileurl: e.imgaddr,
          url: e.url,
          fileUrl: e.imgaddr,
          fileName: e.originname,
          name: e.originname,
          fileType: e.type
        })
      } else if (objType === 1) {
@@ -367,21 +369,19 @@
          this.dealForm.dealAfterFileList = []
        }
        this.dealForm.dealAfterFileList.push({
          id: this.model.id,
          fileUrl: e.imgaddr,
          fileurl: e.imgaddr,
          url: e.url,
          fileName: e.originname,
          name: e.originname,
          fileType: e.type
        })
      } else if (objType === 2) {
        if (this.backForm.dealAfterFileList == null) {
          this.backForm.dealAfterFileList = []
        if (this.backForm.dealBeforeFileList == null) {
          this.backForm.dealBeforeFileList = []
        }
        this.backForm.dealAfterFileList.push({
          id: this.model.id,
          fileUrl: e.imgaddr,
        this.backForm.dealBeforeFileList.push({
          fileurl: e.imgaddr,
          url: e.url,
          fileName: e.originname,
          name: e.originname,
          fileType: e.type
        })
      }
@@ -394,20 +394,21 @@
        }
        this.$dialog.actionConfirm('操作确认', '您确认提交该隐患处理情况吗?')
          .then(() => {
            this.transfering = true
            this.dealing = true
            this.api.dealHiddenDanger({
              id: this.dataId,
              status: 1,
              checkDate: this.dealForm.checkDate,
              dealTime: this.dealForm.checkDate,
              checkInfo: this.dealForm.checkInfo,
              dealBeforeFileList: this.dealForm.dealBeforeFileList,
              dealAfterFileList: this.dealForm.dealBeforeFileList
              dealAfterFileList: this.dealForm.dealAfterFileList
            })
              .then(res => {
                this.$tip.apiSuccess('转交成功')
                this.$tip.apiSuccess('处理成功')
                this.getDetail()
                this.getLogList()
                this.isShowTransfer = false
                this.$emit('success')
                this.isShowProblem = false
              })
              .catch(e => {
              })
@@ -424,19 +425,20 @@
        }
        this.$dialog.actionConfirm('操作确认', '您确认退回该隐患处理情况吗?')
          .then(() => {
            this.transfering = true
            this.dealing = true
            this.api.dealHiddenDanger({
              id: this.dataId,
              status: 0,
              checkDate: this.backForm.checkDate,
              status: 2,
              dealTime: this.backForm.checkDate,
              checkInfo: this.backForm.checkInfo,
              dealBeforeFileList: this.backForm.dealBeforeFileList
            })
              .then(res => {
                this.$tip.apiSuccess('转交成功')
                this.$tip.apiSuccess('退回成功')
                this.getDetail()
                this.getLogList()
                this.isShowTransfer = false
                this.$emit('success')
                this.isBackProblem = false
              })
              .catch(e => {
              })
@@ -455,13 +457,13 @@
        this.memberList = []
        this.transForm = {
          memberId: null
        },
        }
        this.dealForm = {
          checkDate: null,
          checkInfo: null,
          dealBeforeFileList: [],
          dealAfterFileList: []
        },
        }
        this.backForm = {
          checkDate: null,
          checkInfo: null,
@@ -488,6 +490,7 @@
                this.$tip.apiSuccess('转交成功')
                this.getDetail()
                this.getLogList()
                this.$emit('success')
                this.isShowTransfer = false
              })
              .catch(e => {
@@ -683,6 +686,11 @@
            color: #53b76f;
            font-size: 24px;
          }
          .iconnew{
            width: 24px;
            height: 24px;
          }
          .icon1 {
            position: relative;
            z-index: 11;
@@ -692,7 +700,7 @@
          .icon2 {
            position: relative;
            z-index: 11;
            color: red;
            color: #dc362e;
            font-size: 24px;
          }
          .avatar {
@@ -700,7 +708,7 @@
            height: 40px;
            border-radius: 50%;
            margin: 0 12px 0 16px;
            border: 1px solid;
            //border: 1px solid;
          }
          .content {
            flex: 1;