From 5f2beaf67cd6f2bec8996115b3ece480fdc0ef44 Mon Sep 17 00:00:00 2001 From: "zyx.net" Date: Tue, 5 Sep 2023 11:53:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=AA=E7=AC=A6=E5=90=88=E9=A1=B9=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E7=BC=96=E8=BE=91=E5=BC=B9=E6=A1=86=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/addModelconformance.vue | 128 ++++----- .../components/nonConformance.vue | 3 +- .../projectNonConformance/index.vue | 24 +- .../moudles/addModel.vue | 259 ++++++++---------- 4 files changed, 185 insertions(+), 229 deletions(-) diff --git a/jero-web/src/views/projectManagement/components/addModelconformance.vue b/jero-web/src/views/projectManagement/components/addModelconformance.vue index 978ba4b47..597eef7a0 100644 --- a/jero-web/src/views/projectManagement/components/addModelconformance.vue +++ b/jero-web/src/views/projectManagement/components/addModelconformance.vue @@ -47,7 +47,7 @@
- + {{'PS-issue'}}
@@ -170,7 +170,7 @@
- + {{$t('descriptions')}}
@@ -184,36 +184,36 @@ - -
-
- - {{$t('documents')}} -
- -
- - - -
- - {{ (formInline.file === 'null' || formInline.file === '' || - formInline.file == null) ? $t('Fileupload') : $t('viewUploadedFiles') - }} - -
+ +
+
+ + {{$t('documents')}}
- + +
+ + + +
+ + {{ (formInline.file === 'null' || formInline.file === '' || + formInline.file == null) ? $t('Fileupload') : $t('viewUploadedFiles') + }} + +
+
+
@@ -225,7 +225,7 @@
- +
- + { if (valid) { - this.confirmLoading = true - let url = '' - let action = '' - if (this.formInline.id) { - url = this.url.edit - action = putAction + this.confirmLoading = true + let url = '' + let action = '' + if (this.formInline.id) { + url = this.url.edit + action = putAction + } else { + url = this.url.add + action = postAction + } + let formInline = JSON.parse(JSON.stringify(this.formInline)) + // Object.keys(formInline).forEach(res => { + // if (formInline[res] && formInline[res] instanceof Array) { + // formInline[res] = formInline[res].join(',') + // } + // }) + let query = { + problemManagementEO:formInline + } + action(url, query).then((res) => { + if (res.success) { + this.$message.success(this.$t('OperationSuccessful')) + this.visible = false + this.confirmLoading = false + this.$emit('fillAddForm') } else { - url = this.url.add - action = postAction + this.confirmLoading = false + this.$message.warning(this.$t('operationFailed')) } - let formInline = JSON.parse(JSON.stringify(this.formInline)) - // Object.keys(formInline).forEach(res => { - // if (formInline[res] && formInline[res] instanceof Array) { - // formInline[res] = formInline[res].join(',') - // } - // }) - let query = { - problemManagementEO:formInline - } - action(url, query).then((res) => { - if (res.success) { - this.$message.success(this.$t('OperationSuccessful')) - this.visible = false - this.confirmLoading = false - this.$emit('fillAddForm') - } else { - this.confirmLoading = false - this.$message.warning(this.$t('operationFailed')) - } - }) + }) } }) } diff --git a/jero-web/src/views/projectManagement/components/nonConformance.vue b/jero-web/src/views/projectManagement/components/nonConformance.vue index 16dff372d..1add5aba1 100644 --- a/jero-web/src/views/projectManagement/components/nonConformance.vue +++ b/jero-web/src/views/projectManagement/components/nonConformance.vue @@ -211,7 +211,8 @@ align: 'left', dataIndex: 'title', width: 170, - sorter:true + sorter:true, + ellipsis: true }, { title: this.$t('Relevantlawsregulations'), diff --git a/jero-web/src/views/projectManagement/projectNonConformance/index.vue b/jero-web/src/views/projectManagement/projectNonConformance/index.vue index d9e3294cd..e8e4583b9 100644 --- a/jero-web/src/views/projectManagement/projectNonConformance/index.vue +++ b/jero-web/src/views/projectManagement/projectNonConformance/index.vue @@ -8,8 +8,8 @@
{{$t('title')}}
- +
@@ -17,8 +17,8 @@
{{$t('Relevantlawsregulations')}}
- +
@@ -28,7 +28,7 @@ + :value="item.id"> {{ item.projectName}} @@ -75,7 +75,7 @@
- + {{'PS-issue'}}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -102,11 +70,11 @@
+ v-model="formInline.lawsId"/>
@@ -120,7 +88,7 @@ + :value="item.id"> {{ item.projectName}} @@ -156,7 +124,7 @@ class="box-input-search" optionFilterProp="label" :getPopupContainer="triggerNode=> triggerNode.parentNode" - v-model="formInline.firstLevelDutyTerritory"> + v-model="formInline.dutyTerritory">
- + {{$t('descriptions')}}
@@ -216,36 +184,36 @@ - -
-
- - {{$t('documents')}} -
- -
- - - -
- - {{ (formInline.accessory_id === 'null' || formInline.accessory_id === '' || - formInline.accessory_id == null) ? $t('Fileupload') : $t('viewUploadedFiles') - }} - -
+ +
+
+ + {{$t('documents')}}
- + +
+ + + +
+ + {{ (formInline.file === 'null' || formInline.file === '' || + formInline.file == null) ? $t('Fileupload') : $t('viewUploadedFiles') + }} + +
+
+
@@ -256,15 +224,15 @@ :title="$t('progresstracking')">{{$t('progresstracking')}}
- @@ -278,9 +246,9 @@ {{$t('conculsion')}}
- + @@ -295,24 +263,24 @@ {{$t('examineapproveevidence')}} - -
+ +
-
- {{ (formInline.examineapproveevidence === 'null' || formInline.examineapproveevidence === '' || - formInline.examineapproveevidence == null) ? $t('Fileupload') : $t('viewUploadedFiles') + @click="clickButtonToUpload('approvalEvidence')"> + {{ (formInline.approvalEvidence === 'null' || formInline.approvalEvidence === '' || + formInline.approvalEvidence == null) ? $t('Fileupload') : $t('viewUploadedFiles') }}
@@ -327,7 +295,7 @@
- + {{$t('progresstracking')}} - + @@ -370,7 +338,7 @@ // import addModel from './a/ddModel' import Standardselection from '@/components/Standardselection/index' import uploadFile from '@/components/uploadFile/file' -import { getAction, postAction, downloadFile } from '@/api/manage' +import { getAction, postAction,putAction, downloadFile } from '@/api/manage' import moment from 'moment' import { mapGetters } from 'vuex' @@ -406,7 +374,7 @@ export default { visible: false, visibletrack: false, rulestracking:{ - text: [ + progressTracking: [ { required: true, message: this.$t('text') + this.$t('cannotEmpty'), @@ -415,9 +383,9 @@ export default { ] }, formInline: { - list:[{}], - examineapproveevidencelist:[{}], - progresstrackinglist:[{}] + fileLinkList:[{}], + progressTrackingList:[{}], + approvalEvidenceLink:[{}] }, formInlinetracking:{}, confirmLoading: false, @@ -449,8 +417,8 @@ export default { ], index:'', url: { - add: '/report/lawsMonthlyReportWriteEO/add', - edit: '/report/lawsMonthlyReportWriteEO/edit', + add: '/project/problemManagementEO/add', + edit: '/project/problemManagementEO/edit', queryById: '/report/lawsMonthlyReportWriteEO/queryById' } } @@ -485,7 +453,7 @@ export default { }, StandardselectionChange(value, id) { console.log(id) - this.formInline.documentId = id + this.formInline.lawsId = id this.formInline = { ...this.formInline } }, clickButtonToUpload(item) { @@ -514,7 +482,6 @@ export default { }, ...mapGetters(['userInfo']), add() { - console.log(this.userInfo()) this.templateDisabled = false this.getNameList() this.getFirstLevelDutyTerritory() @@ -522,9 +489,9 @@ export default { this.visible = true this.disabled = false this.formInline = { - list:[{}], - examineapproveevidencelist:[{}], - progresstrackinglist:[{}] + fileLinkList:[{}], + progressTrackingList:[{}], + approvalEvidenceLink:[{}] } this.$nextTick(() => { this.formInline = { ...this.formInline } @@ -544,19 +511,19 @@ export default { }) }, addClick(index){ - this.formInline.list.splice(index + 1, 0, {}) + this.formInline.fileLinkList.splice(index + 1, 0, {}) this.formInline = { ...this.formInline } }, deleteClick(index) { - this.formInline.list.splice(index, 1) + this.formInline.fileLinkList.splice(index, 1) this.formInline = { ...this.formInline } }, addvidenceClick(index){ - this.formInline.examineapproveevidencelist.splice(index + 1, 0, {}) + this.formInline.approvalEvidenceLinkList.splice(index + 1, 0, {}) this.formInline = { ...this.formInline } }, deletevidenceClick(index) { - this.formInline.examineapproveevidencelist.splice(index, 1) + this.formInline.approvalEvidenceLinkList.splice(index, 1) this.formInline = { ...this.formInline } }, addprogresstrackingClick(index){ @@ -570,11 +537,11 @@ export default { }) }, deleteprogresstrackingClick(index,item) { - if(item.text && item.text != ''){ + if(item.progressTracking && item.progressTracking != ''){ if(index == 0){ - item.text = '' + item.progressTracking = '' }else{ - this.formInline.progresstrackinglist.splice(index, 1) + this.formInline.progressTrackingList.splice(index, 1) } } this.formInline = { ...this.formInline } @@ -592,14 +559,14 @@ export default { 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.text - this.formInline.progresstrackinglist.forEach((item,index) => { - console.log(item.text) - if(!item.text){ - this.formInline.progresstrackinglist.splice(0,1) + let text = this.userInfo().username + ' ' + time + ' ' + this.formInlinetracking.progressTracking + this.formInline.progressTrackingList.forEach((item,index) => { + console.log(item.progressTracking) + if(!item.progressTracking){ + this.formInline.progressTrackingList.splice(0,1) } }) - this.formInline.progresstrackinglist.splice(this.index+1, 1, {text:text}) + this.formInline.progressTrackingList.splice(this.index+1, 1, {progressTracking:text}) this.visibletrack = false } }) @@ -608,47 +575,35 @@ export default { console.log(this.formInline) this.$refs.ruleForm.validate(valid => { if (valid) { - let text = '' - if (this.$refs.defaultTemplateRef) { - text = 'defaultTemplateRef' - } else if (this.$refs.solicitOpinionsRef) { - text = 'solicitOpinionsRef' - } else if (this.$refs.releaseStandardRef) { - text = 'releaseStandardRef' - } else if (this.$refs.industryTemplateRef) { - text = 'industryTemplateRef' + this.confirmLoading = true + let url = '' + let action = '' + if (this.formInline.id) { + url = this.url.edit + action = putAction + } else { + url = this.url.add + action = postAction } - this.$refs[text].getData((val) => { - this.confirmLoading = true - let url = '' - if (this.formInline.id) { - url = this.url.edit + let formInline = JSON.parse(JSON.stringify(this.formInline)) + // Object.keys(formInline).forEach(res => { + // if (formInline[res] && formInline[res] instanceof Array) { + // formInline[res] = formInline[res].join(',') + // } + // }) + let query = { + problemManagementEO:formInline + } + action(url, query).then((res) => { + if (res.success) { + this.$message.success(this.$t('OperationSuccessful')) + this.visible = false + this.confirmLoading = false + this.$emit('fillAddForm') } else { - url = this.url.add + this.confirmLoading = false + this.$message.warning(this.$t('operationFailed')) } - let formInline = JSON.parse(JSON.stringify(this.formInline)) - Object.keys(formInline).forEach(res => { - if (formInline[res] && formInline[res] instanceof Array) { - formInline[res] = formInline[res].join(',') - } - }) - let query = Object.assign(val, { - month: formInline.month, - memoriesChapter: formInline.memoriesChapter, - contentTemplate: formInline.contentTemplate, - memoriesChapterOne:formInline.memoriesChapterOne - }) - postAction(url, query).then((res) => { - if (res.success) { - this.$message.success(this.$t('OperationSuccessful')) - this.visible = false - this.confirmLoading = false - this.$emit('fillAddForm') - } else { - this.confirmLoading = false - this.$message.warning(this.$t('operationFailed')) - } - }) }) } })