|  |  | 
 |  |  | <template> | 
 |  |  |   <GlobalWindow width="100%" title="工单详情" :visible.sync="visible" :confirm-working="isWorking" @close="close" | 
 |  |  |     @confirm="confirm"> | 
 |  |  |   <GlobalWindow width="100%" title="工单详情" :withFooter="withFooter" :visible.sync="visible" :confirm-working="isWorking" | 
 |  |  |     @confirm="confirm" @close="closeView"> | 
 |  |  |     <div class="main"> | 
 |  |  |       <div class="title"> | 
 |  |  |         <div class="title_left"> | 
 |  |  | 
 |  |  |             <div class="status gray" v-if="info.dealStatus == 2">已处理</div> | 
 |  |  |           </div> | 
 |  |  |         </div> | 
 |  |  |         <el-button v-if="info.origin === 1" @click="openWT">查看问题上报</el-button> | 
 |  |  |         <el-button v-if="info.origin === 1 && isShow" @click="openWT">查看问题上报</el-button> | 
 |  |  |       </div> | 
 |  |  |       <div class="main_content"> | 
 |  |  |         <div class="list"> | 
 |  |  | 
 |  |  |           </div> | 
 |  |  |         </template> | 
 |  |  |       </el-form> | 
 |  |  |       <!--  问题上报详情  --> | 
 |  |  |       <ProblemReportingDetails ref="problem_Reporting_Details" @close="closeDetails" /> | 
 |  |  |     </div> | 
 |  |  |     <!--  问题上报详情  --> | 
 |  |  |     <problemReportingDetails ref="problemReportingDetails" /> | 
 |  |  |   </GlobalWindow> | 
 |  |  | </template> | 
 |  |  |  | 
 |  |  | <script> | 
 |  |  | import GlobalWindow from '@/components/common/GlobalWindow' | 
 |  |  | import BaseOpera from '@/components/base/BaseOpera' | 
 |  |  | import problemReportingDetails from './problemReportingDetails' | 
 |  |  | // import ProblemReportingDetails from './problemReportingDetails' | 
 |  |  | // import ProblemReportingDetails from '@/views/workorder/components/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 { mapState } from 'vuex' | 
 |  |  | import dayjs from 'dayjs' | 
 |  |  | export default { | 
 |  |  |   name: 'detail', | 
 |  |  |   components: { | 
 |  |  |     GlobalWindow, | 
 |  |  |     problemReportingDetails | 
 |  |  |     ProblemReportingDetails: () => import('./problemReportingDetails') | 
 |  |  |   }, | 
 |  |  |   extends: BaseOpera, | 
 |  |  |   data() { | 
 |  |  |     return { | 
 |  |  |       id: '', | 
 |  |  |       visible: false, | 
 |  |  |       param: { | 
 |  |  |         dealType: 0 | 
 |  |  |       }, | 
 |  |  | 
 |  |  |       uploadData: { | 
 |  |  |         folder: 'YW_WORKORDER_FILE' | 
 |  |  |       }, | 
 |  |  |       isShow: true, | 
 |  |  |       test: false | 
 |  |  |     } | 
 |  |  |   }, | 
 |  |  |   computed: { | 
 |  |  |     userInfo() { | 
 |  |  |       return this.$store.state.userInfo | 
 |  |  |     }, | 
 |  |  |     withFooter() { | 
 |  |  |       if (this.info) { | 
 |  |  |         return this.info.dealStatus === 0 || (this.info.dealStatus === 1 && (this.userInfo.id === this.info.dealUserId)); | 
 |  |  |       } else { | 
 |  |  |         return false; | 
 |  |  |       } | 
 |  |  |     } | 
 |  |  |   }, | 
 |  |  |   created() { | 
 |  |  |     this.getStaff() | 
 |  |  |   }, | 
 |  |  |   methods: { | 
 |  |  |     closeDetails() { | 
 |  |  |       console.log('1') | 
 |  |  |       this.test = false | 
 |  |  |     }, | 
 |  |  |     closeView() { | 
 |  |  |       this.$emit('close') | 
 |  |  |       this.visible = false | 
 |  |  |     }, | 
 |  |  |     open (title, target, show) { | 
 |  |  |       this.title = title | 
 |  |  |       this.isShow = show | 
 |  |  |       this.id = target.workorderId | 
 |  |  |       this.getDetail() | 
 |  |  |     }, | 
 |  |  |     openWT() { | 
 |  |  |       getByWorkorderId(this.id) | 
 |  |  |         .then(res => { | 
 |  |  |           console.log(res) | 
 |  |  |           this.$refs.problemReportingDetails.open('问题上报详情', res) | 
 |  |  |           this.test = true | 
 |  |  |           this.$nextTick(() => { | 
 |  |  |             this.$refs.problem_Reporting_Details.open('问题上报详情', res, false) | 
 |  |  |           }) | 
 |  |  |         }) | 
 |  |  |     }, | 
 |  |  |     confirm() { | 
 |  |  | 
 |  |  |         if (this.info.dealStatus == 1) { | 
 |  |  |           this.$set(this.param, 'getDate', dayjs().format('YYYY-MM-DD HH:mm:ss')) | 
 |  |  |         } | 
 |  |  |         this.visible = true | 
 |  |  |       }) | 
 |  |  |     }, | 
 |  |  |     getStaff() { |