doum
3 天以前 bc09bc87234065abe7130b84c92f81f143f5f3e7
admin/src/components/business/OperaHiddenDangerWindow.vue
@@ -10,7 +10,7 @@
        <div class="header">
          <div class="left">
            <div class="h1">隐患提报</div>
            <div class="time">提报时间:{{model.createDate}}</div>
            <div class="time">提报时间:{{model.submitTime}}</div>
          </div>
          <div class="right" v-if="model.status==0">待处理</div>
          <div class="right"  style="background:#53b76f " v-if="model.status==1">已处理</div>
@@ -43,7 +43,6 @@
                  <video
                      v-if="item.fileurlFull && item.fileurlFull.endsWith('.mp4')"
                      ref="videoRef"
                      autoplay
                      controls
                      preload="auto"
                      style="width: 80px;height: 80px;object-fit: contain;"
@@ -116,9 +115,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">
@@ -128,7 +127,7 @@
                </div>
                <div class="line">
                  <div class="company">
                    {{ item.createUserName }} {{ item.companyName }}
                    {{ item.createUserName }}
                    <div style="display: inline" v-if="index == logList.length-1">
                      (<span class="status-green" v-if="model.status==1">已处理</span>
                      <span class="status-blue" v-if="model.status==0">待处理</span>
@@ -144,9 +143,9 @@
    </div>
    <!--  -->
    <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 @click="openHandModal"  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="isBackProblem=true"  v-if="model.status==0&& model.checkUserId == userInfo.memberId" type="danger"  >退回</el-button>
      <el-button @click="openBackModal"  v-if="model.status==0&& model.checkUserId == userInfo.memberId" type="danger"  >退回</el-button>
      <el-button @click="visible=false">返回</el-button>
    </template>
@@ -162,9 +161,9 @@
          <el-select v-model="transForm.memberId" style="width: 300px"  filterable clearable placeholder="请选择转交安全员">
            <el-option
                v-for="item in memberList"
                :key="item.id"
                :label="item.name"
                :value="item.id">
                :key="item.memberId"
                :label="item.companyName ? `${item.realname}-${item.companyName}` : item.realname"
                :value="item.memberId">
            </el-option>
          </el-select>
        </el-form-item>
@@ -236,7 +235,7 @@
              v-model="backForm.checkDate"
          />
        </el-form-item>
        <el-form-item label="整改前" prop="dealBeforeFileList">
        <el-form-item label="图片/视频" prop="dealBeforeFileList">
          <div class="df_ac">
            <upload  width="80px" height="80px" :list="backForm.dealBeforeFileList" :tips="'图片/视频'"    accept=".png,.jpg,.jpeg,.mp4" folder="hiddendanger" @loading="uploading = true" @dele="dele($event,2)" @success="uploadFileList($event, 2)" />
          </div>
@@ -264,8 +263,10 @@
import BaseOpera from '@/components/base/BaseOpera'
import GlobalWindow from '@/components/common/GlobalWindow'
import upload from '@/components/common/upload'
import dayjs from 'dayjs'
import { memberList } from '@/api/business/hiddenDangerParam'
import { mapState } from 'vuex'
import {findAllList as userList} from "@/api/system/user";
export default {
  components: { GlobalWindow, upload },
  extends: BaseOpera,
@@ -309,7 +310,7 @@
        /*,
        dealBeforeFileList: [
          { required: true, message: '请上传整改前情况' }
        ]*/
        ] */
      },
      memberList: [],
      transForm: {
@@ -338,6 +339,24 @@
    })
  },
  methods: {
    openHandModal () {
      const { model } = this
      this.isShowProblem = true
      this.$set(this.dealForm, 'checkDate', dayjs().format('YYYY-MM-DD HH:mm:ss'))
      if (model.submitFileList && model.submitFileList.length > 0) {
        this.$set(this.dealForm, 'dealBeforeFileList', model.submitFileList.map(item => {
          return {
            fileurl: item.fileurl,
            name: item.name,
            url: item.fileurlFull
          }
        }))
      }
    },
    openBackModal () {
      this.isBackProblem = true
      this.$set(this.backForm, 'checkDate', dayjs().format('YYYY-MM-DD HH:mm:ss'))
    },
    dele (index, type) {
      if (type == 0) {
        if (this.dealForm.dealBeforeFileList != null && this.dealForm.dealBeforeFileList.length > index) {
@@ -407,6 +426,7 @@
                this.$tip.apiSuccess('处理成功')
                this.getDetail()
                this.getLogList()
                this.$emit('success')
                this.isShowProblem = false
              })
              .catch(e => {
@@ -436,6 +456,7 @@
                this.$tip.apiSuccess('退回成功')
                this.getDetail()
                this.getLogList()
                this.$emit('success')
                this.isBackProblem = false
              })
              .catch(e => {
@@ -488,6 +509,7 @@
                this.$tip.apiSuccess('转交成功')
                this.getDetail()
                this.getLogList()
                this.$emit('success')
                this.isShowTransfer = false
              })
              .catch(e => {
@@ -518,9 +540,13 @@
      this.loadMemberList()
    },
    loadMemberList () {
      memberList({}).then(res => {
      userList({ queryParam: this.filterText, querySpecial: 1, type: 2, companyType: 1, workStatus: 0 })
        .then(res => {
          this.memberList = res || []
        })
      /*memberList({}).then(res => {
        this.memberList = res
      })
      })*/
    },
    reject () { },
    handleAvatarSuccess () { },
@@ -530,6 +556,7 @@
</script>
<style lang="scss" scoped>
@import "@/assets/style/variables.scss";
.side_title{
  font-weight: 600;
  font-size: 18px;
@@ -594,6 +621,7 @@
          .value {
            color: #111111;
            flex: 1;
          }
        }
      }
@@ -683,6 +711,11 @@
            color: #53b76f;
            font-size: 24px;
          }
          .iconnew{
            width: 24px;
            height: 24px;
          }
          .icon1 {
            position: relative;
            z-index: 11;
@@ -700,7 +733,7 @@
            height: 40px;
            border-radius: 50%;
            margin: 0 12px 0 16px;
            border: 1px solid;
            //border: 1px solid;
          }
          .content {
            flex: 1;
@@ -721,7 +754,7 @@
                font-size: 13px;
                color: #888888;
                .status {
                  color: #00ba67;
                  color: $primaryColor;
                }
              }
            }