@@ -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;
+ },
+ },
+};