From d24b4beed49f4d2ffc7bbfbf2331d744ebe30aa5 Mon Sep 17 00:00:00 2001 From: aixianling Date: Mon, 4 Mar 2024 12:29:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=9D=E8=AF=95=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../qujing/AppPhotoReport/PhotoDetail.vue | 131 ++++++++++-------- 1 file changed, 76 insertions(+), 55 deletions(-) diff --git a/src/project/qujing/AppPhotoReport/PhotoDetail.vue b/src/project/qujing/AppPhotoReport/PhotoDetail.vue index aaed3ef..99d18e4 100644 --- a/src/project/qujing/AppPhotoReport/PhotoDetail.vue +++ b/src/project/qujing/AppPhotoReport/PhotoDetail.vue @@ -13,47 +13,47 @@
- 暂无照片 + 暂无照片 - +
- 暂无照片 + 暂无照片
- {{ $dict.getLabel('qujingRiskLevel', info.judgeRiskLevel) }} + + {{ $dict.getLabel("qujingRiskLevel", info.judgeRiskLevel) }} + - - ,{{ $dict.getLabel('qujingRisk', item) }} - + ,{{ $dict.getLabel("qujingRisk", item) }} - + - + - - - - - + + + + +
@@ -62,7 +62,7 @@ - +
去评价
@@ -77,67 +77,82 @@ export default { info: {}, result: {}, currentTab: 0, - evaluation: {} - } + evaluation: {}, + }; }, computed: { detailStatus: v => { - const status = !v.evaluation.id ? v.info.eventStatus : 'evaluation' + const status = !v.evaluation.id ? v.info.eventStatus : "evaluation"; return { - cls: 'status-' + status, - label: !v.evaluation.id ? v.$dict.getLabel('qujingEventStatus', v.info.eventStatus) : "已评价" - } + cls: "status-" + status, + label: !v.evaluation.id ? v.$dict.getLabel("qujingEventStatus", v.info.eventStatus) : "已评价", + }; }, process() { - const list = this.info.processList + const list = this.info.processList; if (this.evaluation.id) { - const {id, createUserName, score, createTime: doTime, rateText: doExplain} = this.evaluation + const {id, createUserName, score, createTime: doTime, rateText: doExplain} = this.evaluation; list.splice(0, 0, { - id, doTime, doExplain, - systemExplain: `${createUserName}完成评价 (${score}星评价)` - }) + id, + doTime, + doExplain, + systemExplain: `${createUserName}完成评价 (${score}星评价)`, + }); } - return list - } + return list; + }, + tabs: v => { + const tabs = [{name: "办理进度"}]; + if (!!v.evaluation?.id) { + tabs.push({name: "我的评价"}); + } + return tabs; + }, }, onShow() { - this.getInfo() + this.getInfo(); }, onLoad(query) { - this.id = query.id - this.getInfo() - this.$dict.load(['qujingEventStatus', 'qujingDoStatus', 'qujingEventType', 'sex', 'qujingRisk', 'qujingRiskLevel']) + this.id = query.id; + this.getInfo(); + this.$dict.load(["qujingEventStatus", "qujingDoStatus", "qujingEventType", "sex", "qujingRisk", "qujingRiskLevel"]); }, methods: { getInfo() { - this.$loading() - this.$instance.post(`/app/appclapeventinfoqujing/queryDetailById?id=${this.id}`).then(res => { - if (res?.data) { - this.info = res.data - if (['3', '4'].includes(res.data.eventStatus) && res.data.groupName != '矛盾调解') { - this.result = res.data.processList[0] - } - if(this.info.judgeRisk) { - this.info.judgeRiskList = this.info.judgeRisk.split(',') - } - } - }).finally(() => this.$hideLoading()) + this.$loading(); + this.$instance + .post(`/app/appclapeventinfoqujing/queryDetailById?id=${this.id}`) + .then(res => { + if (res?.data) { + this.info = res.data; + if (["3", "4"].includes(res.data.eventStatus) && res.data.groupName != "矛盾调解") { + this.result = res.data.processList[0]; + } + if (this.info.judgeRisk) { + this.info.judgeRiskList = this.info.judgeRisk.split(","); + } + } + }) + .finally(() => this.$hideLoading()); }, previewResult(url) { uni.previewImage({ urls: this.result.files.map(v => v.url), - current: url - }) + current: url, + }); }, preview(url) { uni.previewImage({ urls: this.info.files.map(v => v.url), - current: url - }) - } - } -} + current: url, + }); + }, + hasFiles(files) { + return files?.length > 0; + }, + }, +};