From 0d7d6fc9a5c40ccc90190b0f24039ec1362f120f Mon Sep 17 00:00:00 2001 From: “dzb” <2632970487@qq.com> Date: 星期一, 17 十月 2022 11:33:10 +0800 Subject: [PATCH] 新增设备管理、完善消息新增,修改bug --- src/components/solveProblem/index.vue | 124 ++++++++++++++++++++++++++++------------- 1 files changed, 84 insertions(+), 40 deletions(-) diff --git a/src/components/solveProblem/index.vue b/src/components/solveProblem/index.vue index f9f9be8..9223300 100644 --- a/src/components/solveProblem/index.vue +++ b/src/components/solveProblem/index.vue @@ -1,60 +1,104 @@ <template> <div class="sovle-problem"> <div class="sovle-header"> - <div class="sovle-limit">澶勭悊鏃堕檺:{{}}</div> - <div class="sovle-limit">鍓╀綑鏃堕棿:23灏忔椂</div> + <div class="sovle-limit">澶勭悊鏃堕檺:{{dispatchInfo.disposeDate}}</div> + <div class="sovle-limit">鍓╀綑鏃堕棿:{{getRestTime(dispatchInfo.disposeDate)}}</div> </div> <div class="sovle-timeline"> <el-timeline> <el-timeline-item :color="mycolor" v-for="item in list" :key="item.id"> <div class="title"> - <div class="title-left">銆恵{item.name}}銆憑{item.name === '娲鹃仯' ? '娲鹃仯鍛�':item.name === '澶勭悊' ? '澶勭悊浜�':'璇勫畾浜�'}}:{{item.disposeRecords.length !==0 ? item.disposeRecords[0].handleId : ''}}</div> - <div class="title-right">{{item.disposeRecords.length !==0 ? item.disposeRecords[0].endTime:''}}</div> + <div class="title-left">銆恵{item.name}}銆憑{item.name === '娲鹃仯' ? '娲鹃仯鍛�':item.name === '澶勭悊' ? + '澶勭悊浜�':'璇勫畾浜�'}}:{{item.disposeRecords.length !==0 ? item.disposeRecords[0].handleId : ''}} + </div> + <div class="title-right">{{item.disposeRecords.length !==0 ? filterTime(item.disposeRecords[0].endTime):''}} + </div> </div> - <div class="message">銆恵{item.name === '娲鹃仯' ? '娲鹃仯鎰忚':item.name === '澶勭悊' ? '澶勭悊缁撴灉':'璇勫畾缁撴灉'}}銆戣鐩稿叧鎵ф硶闃熷憳鍙婃椂鍓嶅線鐜板満杩涜澶勭疆</div> - </el-timeline-item> + <div class="message">{{filterPerson(item.name)}}</div> + </el-timeline-item> </el-timeline> </div> </div> -</template> +</template> <script> - export default{ - data(){ - return{ - mycolor:'#02a7f0', - list:[] +import helper from '@/utils/mydate' +import {computeTime} from '@/utils/helper' +export default { + data() { + return { + mycolor: '#02a7f0', + list: [], + dispatchInfo: {}, + } + }, + props: ['handlePassVo', 'baseCase'], + created() { + const { handlePassVo: mylist, baseCase } = this; + console.log(baseCase, mylist); + if (mylist) { + this.list = mylist.workflowConfigSteps; + } + if (baseCase.dispatchInfo) { + this.dispatchInfo = baseCase.dispatchInfo; + } + }, + methods: { + // 鑾峰緱鎰忚 + filterPerson(name) { + const { baseCase, dispatchInfo } = this; + if (name === '璋冨害') { + return '銆愭淳閬f剰瑙併��' + dispatchInfo.dispatchOpinion + } else if (name === '鏍告煡') { + return '銆愭牳鏌ョ粨鏋溿��' + baseCase.handlingOpinion + } else if (name === '缁撴') { + return '銆愯瘎瀹氱粨鏋溿��' + baseCase.finalOpinion + } else { + return '銆愬鐞嗙粨鏋溿��' + baseCase.handlingOpinion } }, - props:['problemProVo'], - created(){ - const {problemProVo:{workflowConfigSteps:mylist}} = this; - console.log(mylist); - this.list = mylist; - } + // 澶勭悊鏃堕棿 + filterTime(time){ + if(time){ + return helper(time) + }else{ + return + } + + }, + // 鑾峰緱鍓╀綑鏃堕棿 + getRestTime(limitTime){ + if(limitTime){ + return computeTime(limitTime) + } + return + } } +} </script> <style lang="scss" scoped> - .sovle-problem{ - .sovle-header{ - padding: 0 200px; - display: flex; - line-height: 60px; - justify-content: space-between; - } - .title{ - display: flex; - justify-content: space-between; - line-height: 40px; - padding: 0 20px; - color: #4b9bb7; - font-size: 16px; - } - .message{ - padding: 20px; - background-color: #070f22; - color: #4b9bb7; - line-height: 20px; - font-size: 10px; - } +.sovle-problem { + .sovle-header { + padding: 0 200px; + display: flex; + line-height: 60px; + justify-content: space-between; } + + .title { + display: flex; + justify-content: space-between; + line-height: 40px; + padding: 0 20px; + color: #4b9bb7; + font-size: 16px; + } + + .message { + padding: 20px; + background-color: #070f22; + color: #4b9bb7; + line-height: 20px; + font-size: 10px; + } +} </style> \ No newline at end of file -- Gitblit v1.8.0