|  |  |  | 
|---|
|  |  |  | <template> | 
|---|
|  |  |  | <GlobalWindow width="920px" title="工单详情" :visible.sync="visible" :confirm-working="isWorking" @close="close" | 
|---|
|  |  |  | <GlobalWindow width="100%" title="工单详情" :visible.sync="visible" :confirm-working="isWorking" @close="close" | 
|---|
|  |  |  | @confirm="confirm"> | 
|---|
|  |  |  | <div class="main"> | 
|---|
|  |  |  | <div class="title"> | 
|---|
|  |  |  | <span>工单详情</span> | 
|---|
|  |  |  | <div> | 
|---|
|  |  |  | <div class="status primaryColor" v-if="info.dealStatus == 0 || info.dealStatus == null">待指派</div> | 
|---|
|  |  |  | <div class="status" v-if="info.dealStatus == 1">已指派</div> | 
|---|
|  |  |  | <div class="status gray" v-if="info.dealStatus == 2">已处理</div> | 
|---|
|  |  |  | <div class="title_left"> | 
|---|
|  |  |  | <span>工单详情</span> | 
|---|
|  |  |  | <div> | 
|---|
|  |  |  | <div class="status primaryColor" v-if="info.dealStatus == 0 || info.dealStatus == null">待指派</div> | 
|---|
|  |  |  | <div class="status green" v-if="info.dealStatus == 1">已指派</div> | 
|---|
|  |  |  | <div class="status gray" v-if="info.dealStatus == 2">已处理</div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <el-button v-if="info.origin === 1" @click="openWT">查看问题上报</el-button> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="main_content"> | 
|---|
|  |  |  | <div class="list"> | 
|---|
|  |  |  | 
|---|
|  |  |  | <div class="item"> | 
|---|
|  |  |  | <div class="la">工单分类</div> | 
|---|
|  |  |  | <div class="val">{{ info.categoryName }}</div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="item"> | 
|---|
|  |  |  | <div class="la">来源</div> | 
|---|
|  |  |  | <div class="val" v-if="info.origin === 0">自建</div> | 
|---|
|  |  |  | <div class="val" v-if="info.origin === 1">问题转工单</div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="item"> | 
|---|
|  |  |  | <div class="la">上报人</div> | 
|---|
|  |  |  | 
|---|
|  |  |  | <div class="value" v-if="info.fileList == null || !info.fileList.length">无</div> | 
|---|
|  |  |  | <div class="value" v-if="info.fileList != null && info.fileList.length"> | 
|---|
|  |  |  | <div v-for="item in info.fileList" :key="item.id" style="display: inline;margin-right: 20px"> | 
|---|
|  |  |  | <video v-if="item.fileurlFull && item.fileurlFull.endsWith('.mp4')" ref="videoRef" controls | 
|---|
|  |  |  | preload="auto" style="width: 80px;height: 80px;object-fit: contain;" :src="item.fileurlFull" /> | 
|---|
|  |  |  | <el-image v-else-if="item.fileurlFull" style="width:80px; height: 80px" :src="item.fileurlFull" | 
|---|
|  |  |  | <!-- <video v-if="item.fileurlFull && item.fileurlFull.endsWith('.mp4')" ref="videoRef" controls | 
|---|
|  |  |  | preload="auto" style="width: 80px;height: 80px;object-fit: contain;" :src="item.fileurlFull" /> --> | 
|---|
|  |  |  | <el-image v-if="item.type == 0" style="width:80px; height: 80px" :src="item.fileurlFull" | 
|---|
|  |  |  | :preview-src-list="[item.fileurlFull]"> | 
|---|
|  |  |  | </el-image> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div v-if="info.fileList && info.fileList.length > 0 && info.fileList.filter(i => i.type == 1).length > 0" | 
|---|
|  |  |  | class="item max"> | 
|---|
|  |  |  | <div class="la">问题视频</div> | 
|---|
|  |  |  | <div class="value"> | 
|---|
|  |  |  | <div v-for="item in info.fileList" :key="item.id" style="display: inline;margin-right: 20px"> | 
|---|
|  |  |  | <video v-if="item.type == 1" ref="videoRef" controls preload="auto" | 
|---|
|  |  |  | style="width: 240px;height: 160px;object-fit: contain;" :src="item.fileurlFull" /> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | 
|---|
|  |  |  | <div class="side"> | 
|---|
|  |  |  | <div class="title">工单流转记录</div> | 
|---|
|  |  |  | <div class="flow_list"> | 
|---|
|  |  |  | <div class="item" v-for="item,i in info.logList"> | 
|---|
|  |  |  | <div class="item" v-for="item, i in info.logList"> | 
|---|
|  |  |  | <div class="icon"> | 
|---|
|  |  |  | <div class="dian"></div> | 
|---|
|  |  |  | <div v-if="i < info.logList.length - 1" class="line"></div> | 
|---|
|  |  |  | 
|---|
|  |  |  | <div class="name">{{ item.title }}</div> | 
|---|
|  |  |  | <div class="time">操作时间:{{ item.createDate }}</div> | 
|---|
|  |  |  | <div class="creator">操作人:{{ item.param1 }}</div> | 
|---|
|  |  |  | <div class="creator" v-if="item.param2">指派给:{{ item.param2 }}</div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="title">{{ info.dealStatus == 0 || info.dealStatus == 1 ? '工单处理' : '处理结果' }}</div> | 
|---|
|  |  |  | <div class="title" | 
|---|
|  |  |  | v-if="info.dealStatus == 2 || info.dealStatus == 0 || (info.dealStatus == 1 && info.dealUserId === userInfo.id)"> | 
|---|
|  |  |  | {{ info.dealStatus == 0 || info.dealStatus == 1 ? '工单处理' : '处理结果' }}</div> | 
|---|
|  |  |  | <el-form :model="param" ref="form" :rules="rules"> | 
|---|
|  |  |  | <template v-if="info.dealStatus == 0 || info.dealStatus == null"> | 
|---|
|  |  |  | <el-form-item label="处理方式" prop="dealType"> | 
|---|
|  |  |  | 
|---|
|  |  |  | <el-radio v-model="param.dealType" :label="0">指派</el-radio> | 
|---|
|  |  |  | <el-radio v-model="param.dealType" :label="1">直接回复</el-radio> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item v-if="param.dealType == 0" label="指派给" prop="dealUserId"> | 
|---|
|  |  |  | <el-select v-model="param.dealUserId" clearable filterable class="w400"> | 
|---|
|  |  |  | <el-option v-for="item in staffList" :label="item.realname" :value="item.id"></el-option> | 
|---|
|  |  |  | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="现场图片"> | 
|---|
|  |  |  | <div class="file_list"> | 
|---|
|  |  |  | <el-upload class="avatar-uploader" :data="uploadData" :auto-upload="true" | 
|---|
|  |  |  | :action="uploadImgUrl" :show-file-list="false" :on-success="uploadAvatarSuccess" :on-error="uploadError" | 
|---|
|  |  |  | <el-upload class="avatar-uploader" :data="uploadData" :auto-upload="true" :action="uploadImgUrl" | 
|---|
|  |  |  | :show-file-list="false" :on-success="uploadAvatarSuccess" :on-error="uploadError" | 
|---|
|  |  |  | :before-upload="beforeUpload"> | 
|---|
|  |  |  | <div class="upload_wrap"> | 
|---|
|  |  |  | <i class="el-icon-plus avatar-uploader-icon"></i> | 
|---|
|  |  |  | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </el-form> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <!--  问题上报详情  --> | 
|---|
|  |  |  | <problemReportingDetails ref="problemReportingDetails" /> | 
|---|
|  |  |  | </GlobalWindow> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <script> | 
|---|
|  |  |  | import GlobalWindow from '@/components/common/GlobalWindow' | 
|---|
|  |  |  | import BaseOpera from '@/components/base/BaseOpera' | 
|---|
|  |  |  | import problemReportingDetails from './problemReportingDetails' | 
|---|
|  |  |  | import { detailById, dispatchOrder, dealOrder } from '@/api/workorder/ywWorkorder' | 
|---|
|  |  |  | import { getByWorkorderId } from '@/api/ywProblem' | 
|---|
|  |  |  | import { getUserList } from '@/api/system/user' | 
|---|
|  |  |  | import { Message, Loading } from 'element-ui' | 
|---|
|  |  |  | import dayjs from 'dayjs' | 
|---|
|  |  |  | export default { | 
|---|
|  |  |  | components: { | 
|---|
|  |  |  | GlobalWindow | 
|---|
|  |  |  | GlobalWindow, | 
|---|
|  |  |  | problemReportingDetails | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | extends: BaseOpera, | 
|---|
|  |  |  | data() { | 
|---|
|  |  |  | 
|---|
|  |  |  | this.getStaff() | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | methods: { | 
|---|
|  |  |  | openWT() { | 
|---|
|  |  |  | getByWorkorderId(this.id) | 
|---|
|  |  |  | .then(res => { | 
|---|
|  |  |  | console.log(res) | 
|---|
|  |  |  | this.$refs.problemReportingDetails.open('问题上报详情', res) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | confirm() { | 
|---|
|  |  |  | this.$refs['form'].validate((valid) => { | 
|---|
|  |  |  | if (valid) { | 
|---|
|  |  |  | 
|---|
|  |  |  | const { id } = this | 
|---|
|  |  |  | detailById(id).then(res => { | 
|---|
|  |  |  | this.info = res | 
|---|
|  |  |  | if (this.info.dealStatus == 1) { | 
|---|
|  |  |  | this.$set(this.param, 'getDate', dayjs().format('YYYY-MM-DD HH:mm:ss')) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | getStaff() { | 
|---|
|  |  |  | 
|---|
|  |  |  | padding-top: 20px; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .title { | 
|---|
|  |  |  | font-weight: 500; | 
|---|
|  |  |  | font-size: 18px; | 
|---|
|  |  |  | color: $primary-color; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | margin-bottom: 10px; | 
|---|
|  |  |  | display: flex; | 
|---|
|  |  |  | align-items: center; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .status { | 
|---|
|  |  |  | padding: 0 6px; | 
|---|
|  |  |  | height: 22px; | 
|---|
|  |  |  | line-height: 22px; | 
|---|
|  |  |  | border-radius: 2px; | 
|---|
|  |  |  | border: 1px solid #00BA92; | 
|---|
|  |  |  | color: #00BA92; | 
|---|
|  |  |  | font-weight: 400; | 
|---|
|  |  |  | font-size: 12px; | 
|---|
|  |  |  | margin-left: 10px; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .primaryColor { | 
|---|
|  |  |  | border: 1px solid $primary-color; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .gray { | 
|---|
|  |  |  | color: gray; | 
|---|
|  |  |  | border: 1px solid gray; | 
|---|
|  |  |  | justify-content: space-between; | 
|---|
|  |  |  | .title_left { | 
|---|
|  |  |  | display: flex; | 
|---|
|  |  |  | align-items: center; | 
|---|
|  |  |  | font-weight: 500; | 
|---|
|  |  |  | font-size: 18px; | 
|---|
|  |  |  | color: $primary-color; | 
|---|
|  |  |  | .status { | 
|---|
|  |  |  | padding: 0 12px; | 
|---|
|  |  |  | height: 24px; | 
|---|
|  |  |  | line-height: 24px; | 
|---|
|  |  |  | border-radius: 2px; | 
|---|
|  |  |  | border: 1px solid #00BA92; | 
|---|
|  |  |  | color: #00BA92; | 
|---|
|  |  |  | font-weight: 400; | 
|---|
|  |  |  | font-size: 12px; | 
|---|
|  |  |  | margin-left: 10px; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .primaryColor { | 
|---|
|  |  |  | border: 1px solid rgba(63, 126, 239, .2); | 
|---|
|  |  |  | background-color: rgba(63, 126, 239, .2); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .green { | 
|---|
|  |  |  | background-color: rgba(83, 183, 148, .2); | 
|---|
|  |  |  | border: 1px solid rgba(83, 183, 148, .2); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .gray { | 
|---|
|  |  |  | color: #333333; | 
|---|
|  |  |  | background-color: rgba(128, 128, 128, .2); | 
|---|
|  |  |  | border: 1px solid rgba(128, 128, 128, .2); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .item { | 
|---|
|  |  |  | width: 33.3%; | 
|---|
|  |  |  | margin-bottom: 12px; | 
|---|
|  |  |  | margin-bottom: 14px; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .la { | 
|---|
|  |  |  | color: #7f7f7f; | 
|---|
|  |  |  | margin-top: 2px; | 
|---|
|  |  |  | margin-bottom: 6px; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | width: 100%; | 
|---|
|  |  |  | display: flex; | 
|---|
|  |  |  | align-items: center; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .la { | 
|---|
|  |  |  | margin-bottom: 0; | 
|---|
|  |  |  | width: 72px; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .max { | 
|---|
|  |  |  | width: 100%; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .main_content{ | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .main_content { | 
|---|
|  |  |  | display: flex; | 
|---|
|  |  |  | .side{ | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .side { | 
|---|
|  |  |  | width: 370px; | 
|---|
|  |  |  | .title{ | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .title { | 
|---|
|  |  |  | font-size: 14px; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .flow_list{ | 
|---|
|  |  |  | .item{ | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .flow_list { | 
|---|
|  |  |  | .item { | 
|---|
|  |  |  | display: flex; | 
|---|
|  |  |  | .icon{ | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .icon { | 
|---|
|  |  |  | width: 28px; | 
|---|
|  |  |  | display: flex; | 
|---|
|  |  |  | flex-direction: column; | 
|---|
|  |  |  | align-items: center; | 
|---|
|  |  |  | .dian{ | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .dian { | 
|---|
|  |  |  | width: 12px; | 
|---|
|  |  |  | height: 12px; | 
|---|
|  |  |  | border-radius: 50%; | 
|---|
|  |  |  | background-color: #e89e42; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .line{ | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .line { | 
|---|
|  |  |  | width: 1px; | 
|---|
|  |  |  | height: 100%; | 
|---|
|  |  |  | background-color: #e89e42; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .content{ | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .content { | 
|---|
|  |  |  | font-size: 12px; | 
|---|
|  |  |  | color: #999999; | 
|---|
|  |  |  | padding-bottom: 12px; | 
|---|
|  |  |  | .name{ | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .name { | 
|---|
|  |  |  | font-size: 13px; | 
|---|
|  |  |  | color: #333333; | 
|---|
|  |  |  | } | 
|---|