From bf96fe51fe184bc74ce6cbcd4967a4748107ad74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E5=BC=BA=E5=BC=BA?= <787203167> Date: Sat, 9 Dec 2023 12:54:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A1=B9=E7=9B=AE=E5=BA=93?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../moudles/addModel.vue | 134 ++++++------------ .../moudles/detilModel.vue | 41 +++++- .../projectNonConformance/moudles/viewImg.vue | 47 ++++++ 3 files changed, 128 insertions(+), 94 deletions(-) create mode 100644 jero-web/src/views/projectManagement/projectNonConformance/moudles/viewImg.vue diff --git a/jero-web/src/views/projectManagement/projectNonConformance/moudles/addModel.vue b/jero-web/src/views/projectManagement/projectNonConformance/moudles/addModel.vue index 9971a73f8..8101f67a1 100644 --- a/jero-web/src/views/projectManagement/projectNonConformance/moudles/addModel.vue +++ b/jero-web/src/views/projectManagement/projectNonConformance/moudles/addModel.vue @@ -338,7 +338,8 @@
@@ -463,47 +464,6 @@
' + ''+this.userInfo().username + ' ' +''+ time +''+ '
' + '' + this.$t('Problemstate') + this.$t('by') + '\'' + this.problemState + '\'' + this.$t('Changeto') + '\'' + value + '\''+'
' - if (JSON.stringify(this.formInline.progressTrackingList[0]) == '{}' || this.formInline.progressTrackingList[0].progressTracking == '') { - this.formInline.progressTrackingList.forEach((item, index) => { - item.progressTracking = text - }) - return - } - this.formInline.progressTrackingList.push({ progressTracking: text }) + let text = '' + '' + this.userInfo().username + ' ' + '' + time + '' + '
' + '' + this.$t('Problemstate') + this.$t('by') + '\'' + this.problemState + '\'' + this.$t('Changeto') + '\'' + value + '\'' + '
' + // if (JSON.stringify(this.formInline.progressTrackingList[0]) == '{}' || this.formInline.progressTrackingList[0].progressTracking == '') { + // this.formInline.progressTrackingList.forEach((item, index) => { + // item.progressTracking = text + // }) + // return + // } + + this.formInline.progressTrackingList.push({ progressTracking: text, isDescription: false }) } }, Standardselectioninput(val) { @@ -802,7 +763,7 @@ this.disabled = false this.formInline = { fileLinkList: [{}], - progressTrackingList: [{}], + progressTrackingList: [], approvalEvidenceLinkList: [{}] } this.isDisplayIndex = true @@ -837,7 +798,7 @@ this.formInline.problemState = undefined } if (this.formInline.progressTrackingList == null) { - this.formInline.progressTrackingList = [{}] + this.formInline.progressTrackingList = [] } if (this.formInline.approvalEvidenceLinkList == null) { this.formInline.approvalEvidenceLinkList = [{}] @@ -871,12 +832,14 @@ TrackingModelForm(row) { let time = moment(new Date()).format('YYYY-MM-DD HH:mm:ss') let text = '' + '' + this.userInfo().username + '' + '' + time + '' + '
' + row - this.formInline.progressTrackingList.forEach((item, index) => { - if (!item.progressTracking) { - this.formInline.progressTrackingList.splice(0, 1) - } - }) - this.formInline.progressTrackingList.splice(this.index + 1, 1, { progressTracking: text }) + // this.formInline.progressTrackingList.forEach((item, index) => { + // if (!item.progressTracking) { + // this.formInline.progressTrackingList.splice(0, 1) + // } + // }) + this.formInline.progressTrackingList.push({ progressTracking: text, isDescription: false }) + + // this.formInline.progressTrackingList.splice(this.index + 1, 1, { progressTracking: text }) console.log(this.formInline.progressTrackingList) }, addprogresstrackingClick(index) { @@ -890,36 +853,17 @@ }) }, deleteprogresstrackingClick(index, item) { - if (this.formInline.progressTrackingList.length > 1) { - this.formInline.progressTrackingList.splice(index, 1) - } else { - item.progressTracking = '' - } + /* if (this.formInline.progressTrackingList.length > 1) { + + } else { + item.progressTracking = '' + }*/ + this.formInline.progressTrackingList.splice(index, 1) this.formInline = { ...this.formInline } }, handleCancel() { this.visible = false }, - Cancel() { - this.visibletrack = false - this.formInlinetracking = {} - this.$refs.ruleFormtracking.clearValidate() - }, - handleOk() { - let time = moment(new Date()).format('YYYY-MM-DD HH:mm:ss') - this.$refs.ruleFormtracking.validate(valid => { - if (valid) { - let text = this.userInfo().username + ' ' + time + ' ' + this.formInlinetracking.progressTracking - this.formInline.progressTrackingList.forEach((item, index) => { - if (!item.progressTracking) { - this.formInline.progressTrackingList.splice(0, 1) - } - }) - this.formInline.progressTrackingList.splice(this.index + 1, 1, { progressTracking: text }) - this.visibletrack = false - } - }) - }, handleSubmit() { this.$refs.ruleForm.validate(valid => { if (valid) { @@ -1105,6 +1049,11 @@ getAction('/project/projectLibraryBase/getPlatform', { platform: platform }).then((res) => { this.relatedItemsList = res || [] }) + }, + progressTrackingOpenClick(e) { + if (e.target.localName == 'img') { + this.$refs.viewImgRef.getData(e.target.currentSrc) + } } } } @@ -1349,12 +1298,17 @@ ::v-deep .text-box-index-text .text-class { background: #fff !important; } - .progressTrackingListClass{ + + .progressTrackingListClass { width: 100%; display: flex; margin-bottom: 16px } - .progressTrackingListClass:last-child{ + + .progressTrackingListClass:last-child { margin-bottom: 0; } + ::v-deep .text-box-index-text-top img { + max-width: 100% !important; + } \ No newline at end of file diff --git a/jero-web/src/views/projectManagement/projectNonConformance/moudles/detilModel.vue b/jero-web/src/views/projectManagement/projectNonConformance/moudles/detilModel.vue index 00aac233c..5ccaad0e6 100644 --- a/jero-web/src/views/projectManagement/projectNonConformance/moudles/detilModel.vue +++ b/jero-web/src/views/projectManagement/projectNonConformance/moudles/detilModel.vue @@ -131,8 +131,12 @@ {{$t('descriptions')}}