From 2fda34643bc22e25f6c569415da5f955c81536bf Mon Sep 17 00:00:00 2001 From: Houjie <714924425@qq.com> Date: 星期二, 03 六月 2025 09:37:08 +0800 Subject: [PATCH] 设备详情通过ID过滤/设备详情增加上传附件 --- pages/reportRepair/reportRepair.vue | 35 +++++++++++++++++++++++++++-------- 1 files changed, 27 insertions(+), 8 deletions(-) diff --git a/pages/reportRepair/reportRepair.vue b/pages/reportRepair/reportRepair.vue index 4141107..5c506e0 100644 --- a/pages/reportRepair/reportRepair.vue +++ b/pages/reportRepair/reportRepair.vue @@ -46,7 +46,7 @@ <view class="padding flex flex-direction"> <view class="flex-sub bg-blue padding-sm margin-xl radius text-sm text-center text-white" - @click.stop="ProductionTask()" hover-class="is-hover">鎻愪氦</view> + @click.stop="ProductionTask()" hover-class="is-hover">鎻愪氦</view> </view> @@ -57,6 +57,7 @@ import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js"; export default { mixins: [MescrollMixin], // 浣跨敤mixin + data() { return { // 鍥剧墖鍥炴樉 @@ -90,7 +91,7 @@ faultNameList: [], faultName: '', faultType: '', - breakdownFlag: '', + breakdownFlag: '1', loadTime: Date.now(), faultDescription: '' }, @@ -126,7 +127,9 @@ announcement1: [], msg1Count: 0, msg2Count: 0, - msg1Title: "" + msg1Title: "", + equipmentId: '', + AuthLsit:[] } }, computed: { @@ -164,7 +167,7 @@ this.getSera() }, created() { - // this.getEquipment(); + this.getfaultReasonList(); }, methods: { @@ -184,6 +187,7 @@ console.log(this.announcement1); //璁剧疆鍒楄〃鏁版嵁 if (res.data.success) { + this.equipmentId = this.announcement1.id this.formData.numSear = this.announcement1.equipmentCode + '[' + this.announcement1 .equipmentName + ']' @@ -315,6 +319,14 @@ }); return false } + if (this.formData.breakdownFlag == 0 || this.formData.breakdownFlag == undefined) { + uni.showToast({ + icon: "none", + title: '鏄惁鍋滄満涓虹┖!', + duration: 2000 + }); + return false + } // 璇锋眰寮�濮� 澧炲姞閬僵灞� uni.showLoading({ mask: true, @@ -338,16 +350,23 @@ title: '鎻愪氦鎴愬姛', duration: 2000 }); - this.$Router.replaceAll({ - name: 'index' + console.log(this.equipmentId) + uni.reLaunch({ + url: `/pages/reportRepair/reportRepairList/reportRepairList?equipmentId=${this.equipmentId}` }) + } else { + uni.showToast({ + icon: "error", + title: res.data.message, + duration: 2000 + }); } }).catch(() => { - this.$tip.loaded(); + uni.hideLoading(); uni.showToast({ icon: "error", - title: '鎻愪氦澶辫触', + title: '缃戠粶杩炴帴澶辫触', duration: 2000 }); }); -- Gitblit v1.9.3