对接法规技术评估

This commit is contained in:
qq787203167
2022-07-14 11:05:33 +08:00
parent d6c1da3152
commit 860270eba8
6 changed files with 265 additions and 24 deletions
+2
View File
@@ -1132,4 +1132,6 @@ module.exports = {
standardDocuments:'Standard documents', standardDocuments:'Standard documents',
pleaseCompleteTheEvaluationMethodorEvaluator:'Please complete the evaluation method or evaluator in the list', pleaseCompleteTheEvaluationMethodorEvaluator:'Please complete the evaluation method or evaluator in the list',
reviewComments:'Review comments', reviewComments:'Review comments',
PleaseCompleteList:'Please complete the compliance results in the list',
sponsorFeedback:'Sponsor feedback',
} }
+2
View File
@@ -1136,4 +1136,6 @@ module.exports = {
standardDocuments:'标准文件', standardDocuments:'标准文件',
pleaseCompleteTheEvaluationMethodorEvaluator:'请补全列表中评估方式或评估人', pleaseCompleteTheEvaluationMethodorEvaluator:'请补全列表中评估方式或评估人',
reviewComments:'审核意见', reviewComments:'审核意见',
PleaseCompleteList:'请补全列表中符合性结果',
sponsorFeedback:'发起人反馈',
} }
@@ -87,7 +87,6 @@
title: this.$t('clauseContent'), title: this.$t('clauseContent'),
dataIndex: 'itemContent', dataIndex: 'itemContent',
align: 'center', align: 'center',
ellipsis: true,
scopedSlots: { customRender: 'clauseContent' } scopedSlots: { customRender: 'clauseContent' }
}, },
{ {
@@ -123,7 +123,6 @@
title: this.$t('clauseContent'), title: this.$t('clauseContent'),
dataIndex: 'iterms_conditions', dataIndex: 'iterms_conditions',
align: 'center', align: 'center',
ellipsis: true,
scopedSlots: { customRender: 'clauseContent' } scopedSlots: { customRender: 'clauseContent' }
}, },
{ {
@@ -22,21 +22,81 @@
<div class="clauseContent-text" v-html="text"></div> <div class="clauseContent-text" v-html="text"></div>
</a-tooltip> </a-tooltip>
</div> </div>
<span slot="nameTechnicalDocument" slot-scope="text,result">
<a-input class="box-input"
:maxLength="100"
v-model="result.technicalFileName"
:placeholder="$t('PleaseEnter')+$t('nameTechnicalDocument')"/>
</span>
<span slot="chapter" slot-scope="text,result">
<a-textarea :placeholder="$t('pleaseEnter')+$t('chapter')"
v-model="result.section"
:maxLength="300"
:rows="2"/>
</span>
<span slot="opinion" slot-scope="text,result">
<a-textarea :placeholder="$t('pleaseEnter')+$t('opinion')"
v-model="result.opinion"
:maxLength="300"
:rows="2"/>
</span>
<span slot="enclosure" slot-scope="text,result,index">
<a-button type="primary" class="button-text"
@click="clickButtonToUpload('accessoryFile',index)">
{{ (result.accessoryFile === 'null' || result.accessoryFile === '' ||
result.accessoryFile == null) ? $t('clickUpload') : $t('viewUploadedFiles')
}}
</a-button>
</span>
<span slot="complianceResults" slot-scope="text,result">
<a-select :placeholder="$t('PleaseSelect')+$t('complianceResults')"
class="box-input"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
allowClear
v-model="result.complianceResult">
<a-select-option v-for="(item, key) in complianceResultsList"
:key="key"
:value="item.value">
<span style="display: inline-block;width: 100%" :title="item.name ">
{{ item.name }}
</span>
</a-select-option>
</a-select>
</span>
<span slot="accessoryFile" slot-scope="text,result">
<a v-if="text" @click="accessoryFileClick(text)">
{{ $t('viewFile') }}
</a>
<span v-else>--</span>
</span>
<span slot="Results" slot-scope="text,result">
{{text == 'Compliance' ? $t('accord'):$t('nonConformity')}}
</span>
<span slot="sponsorFeedback" slot-scope="text,result">
<a-textarea :placeholder="$t('pleaseEnter')+$t('sponsorFeedback')"
v-model="result.sponsorFeedback"
:maxLength="300"
:rows="2"/>
</span>
</a-table> </a-table>
</div> </div>
<uploadFile ref="uploadFile" :disabled="disabled" @uploadSuccess="uploadSuccess"></uploadFile> <uploadFile ref="uploadFile" :disabled="disabled" @uploadSuccess="uploadSuccess"></uploadFile>
<viewFileModel ref="viewFileModelRef"/>
</div> </div>
</template> </template>
<script> <script>
import { getAction, postAction } from '@/api/manage' import { getAction, postAction } from '@/api/manage'
import uploadFile from '@/components/uploadFile/file' import uploadFile from '@/components/uploadFile/file'
import viewFileModel from '@/components/viewFileModel/index'
export default { export default {
name: 'evaluatorFeedback', name: 'evaluatorFeedback',
components: { components: {
uploadFile uploadFile,
viewFileModel
}, },
props: { props: {
title: { title: {
@@ -56,61 +116,154 @@
loading: false, loading: false,
uploadIndex: '', uploadIndex: '',
dataSource: [], dataSource: [],
columns: [ complianceResultsList: [
{
name: this.$t('accord'),
value: 'Compliance'
},
{
name: this.$t('nonConformity'),
value: 'Non-Compliance'
}
],
columnsTwo: [
{ {
title: this.$t('clauseNo'), title: this.$t('clauseNo'),
dataIndex: 'itemNum', dataIndex: 'itemNum',
align: 'center', align: 'center',
width: 180,
ellipsis: true ellipsis: true
}, },
{ {
title: this.$t('clauseName'), title: this.$t('clauseName'),
dataIndex: 'itemName', dataIndex: 'itemName',
align: 'center', align: 'center',
width: 180,
ellipsis: true ellipsis: true
}, },
{ {
title: this.$t('clauseContent'), title: this.$t('clauseContent'),
dataIndex: 'itemContent', dataIndex: 'itemContent',
align: 'center', align: 'center',
ellipsis: true, width: 280,
scopedSlots: { customRender: 'clauseContent' } scopedSlots: { customRender: 'clauseContent' }
}, },
{ {
title: this.$t('evaluationMethod'), title: this.$t('evaluationMethod'),
dataIndex: 'evaluationMethod', dataIndex: 'evaluationMethodsName',
align: 'center', align: 'center',
width: 180,
ellipsis: true ellipsis: true
}, },
{ {
title: this.$t('nameTechnicalDocument'), title: this.$t('nameTechnicalDocument'),
dataIndex: 'nameTechnicalDocument', dataIndex: 'technicalFileName',
align: 'center', align: 'center',
width: 280,
scopedSlots: { customRender: 'nameTechnicalDocument' }
},
{
title: this.$t('chapter'),
dataIndex: 'section',
align: 'center',
width: 180,
scopedSlots: { customRender: 'chapter' }
},
{
title: this.$t('opinion'),
dataIndex: 'opinion',
align: 'center',
width: 180,
scopedSlots: { customRender: 'opinion' }
},
{
title: this.$t('enclosure'),
dataIndex: 'accessoryFile',
align: 'center',
width: 180,
scopedSlots: { customRender: 'enclosure' }
},
{
title: this.$t('complianceResults'),
dataIndex: 'complianceResult',
align: 'center',
width: 180,
scopedSlots: { customRender: 'complianceResults' }
}
],
columnsThree: [
{
title: this.$t('clauseNo'),
dataIndex: 'itemNum',
align: 'center',
width: 180,
ellipsis: true
},
{
title: this.$t('clauseName'),
dataIndex: 'itemName',
align: 'center',
width: 180,
ellipsis: true
},
{
title: this.$t('clauseContent'),
dataIndex: 'itemContent',
align: 'center',
width: 280,
scopedSlots: { customRender: 'clauseContent' }
},
{
title: this.$t('evaluationMethod'),
dataIndex: 'evaluationMethodsName',
align: 'center',
width: 180,
ellipsis: true
},
{
title: this.$t('nameTechnicalDocument'),
dataIndex: 'technicalFileName',
align: 'center',
width: 280,
ellipsis: true ellipsis: true
}, },
{ {
title: this.$t('chapter'), title: this.$t('chapter'),
dataIndex: 'chapter', dataIndex: 'section',
align: 'center', align: 'center',
width: 180,
ellipsis: true ellipsis: true
}, },
{ {
title: this.$t('opinion'), title: this.$t('opinion'),
dataIndex: 'opinion', dataIndex: 'opinion',
align: 'center', align: 'center',
width: 180,
ellipsis: true ellipsis: true
}, },
{ {
title: this.$t('enclosure'), title: this.$t('enclosure'),
dataIndex: 'enclosure', dataIndex: 'accessoryFile',
align: 'center', align: 'center',
ellipsis: true width: 180,
ellipsis: true,
scopedSlots: { customRender: 'accessoryFile' }
}, },
{ {
title: this.$t('complianceResults'), title: this.$t('complianceResults'),
dataIndex: 'complianceResults', dataIndex: 'complianceResult',
align: 'center', align: 'center',
ellipsis: true width: 180,
ellipsis: true,
scopedSlots: { customRender: 'Results' }
},
{
title: this.$t('sponsorFeedback'),
dataIndex: 'sponsorFeedback',
align: 'center',
width: 180,
ellipsis: true,
scopedSlots: { customRender: 'sponsorFeedback' }
} }
] ]
} }
@@ -118,6 +271,21 @@
mounted() { mounted() {
if (this.evaluatorFeedbackList && this.evaluatorFeedbackList.length > 0) { if (this.evaluatorFeedbackList && this.evaluatorFeedbackList.length > 0) {
this.dataSource = this.evaluatorFeedbackList this.dataSource = this.evaluatorFeedbackList
if (this.$route.query.taskDefinitionKey != 'pgrqr') {
this.dataSource.forEach(res => {
res.sponsorFeedback = ''
})
this.dataSource = [...this.dataSource]
}
}
},
computed: {
columns() {
if (this.$route.query.taskDefinitionKey == 'pgrqr') {
return this.columnsTwo
} else {
return this.columnsThree
}
} }
}, },
methods: { methods: {
@@ -126,7 +294,7 @@
this.$refs.uploadFile.visible = true this.$refs.uploadFile.visible = true
this.uploadName = item this.uploadName = item
this.uploadIndex = index this.uploadIndex = index
getAction('sys/common/getFileInfos', { id: this.dataList[this.uploadIndex][this.uploadName] }).then((res) => { getAction('sys/common/getFileInfos', { id: this.dataSource[this.uploadIndex][this.uploadName] }).then((res) => {
if (res.success) { if (res.success) {
this.$refs.uploadFile.perentHandleFunc(res.result) this.$refs.uploadFile.perentHandleFunc(res.result)
} else { } else {
@@ -143,8 +311,23 @@
}) })
} }
/** 赋值给当前对应的表单文件 */ /** 赋值给当前对应的表单文件 */
this.dataList[this.uploadIndex][this.uploadName] = attIdList.join(',') this.dataSource[this.uploadIndex][this.uploadName] = attIdList.join(',')
this.dataList = [...this.dataList] this.dataSource = [...this.dataSource]
},
submitData(callBack) {
for (let i = 0; i < this.dataSource.length; i++) {
if (!this.dataSource[i].complianceResult) {
this.$message.warning(this.$t('PleaseCompleteList'))
return
}
}
callBack && callBack(this.dataSource)
},
preservationData(callBack) {
callBack && callBack(this.dataSource)
},
accessoryFileClick(item) {
this.$refs.viewFileModelRef.clickButtonToUpload(item)
} }
} }
} }
@@ -214,7 +397,7 @@
.button-text { .button-text {
height: 38px; height: 38px;
width: calc(100% - 100px); width: calc(100%);
line-height: 38px; line-height: 38px;
background: #fff; background: #fff;
border: 1px #00B3BE solid; border: 1px #00B3BE solid;
@@ -233,6 +416,7 @@
margin-left: 8px; margin-left: 8px;
cursor: pointer; cursor: pointer;
} }
.clauseContent-text { .clauseContent-text {
width: 100%; width: 100%;
overflow: hidden; overflow: hidden;
@@ -245,4 +429,15 @@
text-justify: inter-ideograph; text-justify: inter-ideograph;
word-break: break-all word-break: break-all
} }
</style>
<style>
.box-input .ant-select-selection--single {
height: 38px;
}
.box-input .ant-select-selection__rendered {
line-height: 38px;
height: 38px;
}
</style> </style>
@@ -78,7 +78,7 @@
isPreservation: false, isPreservation: false,
isSendBack: false, isSendBack: false,
isTrue: false, isTrue: false,
standardContentList:[], standardContentList: [],
standardContent: [ standardContent: [
{ {
title: this.$t('standard'), title: this.$t('standard'),
@@ -110,7 +110,7 @@
value: 'processBackground' value: 'processBackground'
} }
], ],
evaluatorFeedback:[ evaluatorFeedback: [
{ {
title: this.$t('standard'), title: this.$t('standard'),
value: 'serialNumber' value: 'serialNumber'
@@ -137,7 +137,7 @@
title: this.$t('processBackground'), title: this.$t('processBackground'),
value: 'processBackground' value: 'processBackground'
} }
], ]
} }
}, },
mounted() { mounted() {
@@ -174,7 +174,7 @@
lawsTechnologyEvaluationItem() { lawsTechnologyEvaluationItem() {
getAction('/lawsTechnologyEvaluation/lawsTechnologyEvaluationItemResultEO/list', { getAction('/lawsTechnologyEvaluation/lawsTechnologyEvaluationItemResultEO/list', {
lawsTechnologyEvaluationId: this.queryProject.lawsTechnologyEvaluationId, lawsTechnologyEvaluationId: this.queryProject.lawsTechnologyEvaluationId,
actiProcInstId: this.$route.query.prcId, actiProcInstId: this.$route.query.prcId
}).then((res) => { }).then((res) => {
if (res.success) { if (res.success) {
this.evaluatorFeedbackList = res.result || [] this.evaluatorFeedbackList = res.result || []
@@ -206,8 +206,39 @@
}, },
preservation() { preservation() {
this.loading = true this.loading = true
this.$refs.evaluatorFeedbackRef.preservationData((res) => { if (this.isTrue) {
this.insertBatch(res, 1) this.$refs.evaluatorFeedbackListRef.preservationData((res) => {
this.batchUpdate(res, 1)
})
} else {
this.$refs.evaluatorFeedbackRef.preservationData((res) => {
this.insertBatch(res, 1)
})
}
},
batchUpdate(val, num) {
let query = {
actiProcInstId: this.$route.query.prcId,
lawsTechnologyEvaluationId: this.queryProject.lawsTechnologyEvaluationId,
itemResultList: val
}
postAction('/lawsTechnologyEvaluation/lawsTechnologyEvaluationItemResultEO/batchUpdate', query).then((res) => {
if (res.success) {
if (num == 1) {
this.$message.success(this.$t('OperationSuccessful'))
this.loading = false
} else {
if (this.queryProject.msg) {
delete this.queryProject.msg
}
this.completeTask()
}
} else {
if (num == 1) {
this.loading = false
this.$message.warning(this.$t('operationFailed'))
}
}
}) })
}, },
insertBatch(val, num) { insertBatch(val, num) {
@@ -235,7 +266,11 @@
}, },
sendBack() { sendBack() {
if (this.isTrue) { if (this.isTrue) {
this.$refs.evaluatorFeedbackListRef.preservationData((res) => {
this.loading = true
this.queryProject.flag = '2'
this.batchUpdate(res, 2)
})
} else { } else {
this.$refs.evaluatorFeedbackRef.preservationData((res) => { this.$refs.evaluatorFeedbackRef.preservationData((res) => {
this.loading = true this.loading = true
@@ -247,7 +282,16 @@
}, },
submit() { submit() {
if (this.isTrue) { if (this.isTrue) {
this.$refs.evaluatorFeedbackListRef.submitData((res) => {
if (this.$route.query.taskDefinitionKey == 'pgrqr') {
this.loading = true
this.batchUpdate(res, 2)
} else {
this.loading = true
this.queryProject.flag = '1'
this.batchUpdate(res, 2)
}
})
} else { } else {
this.$refs.evaluatorFeedbackRef.submitData((res) => { this.$refs.evaluatorFeedbackRef.submitData((res) => {
if (this.$route.query.taskDefinitionKey == 'pgrqr') { if (this.$route.query.taskDefinitionKey == 'pgrqr') {