对接法规技术评估

This commit is contained in:
qq787203167
2022-07-13 17:33:48 +08:00
parent 857251e183
commit 4877c3706d
4 changed files with 116 additions and 63 deletions
+1 -1
View File
@@ -1134,5 +1134,5 @@ module.exports = {
feedbackEvaluation:'反馈评估', feedbackEvaluation:'反馈评估',
clauseEvaluation:'条款评估', clauseEvaluation:'条款评估',
standardDocuments:'标准文件', standardDocuments:'标准文件',
pleaseCompleteTheEvaluationMethodorEvaluator:'Please complete the evaluation method or evaluator in the list', pleaseCompleteTheEvaluationMethodorEvaluator:'请补全列表中评估方式或评估人',
} }
@@ -410,8 +410,9 @@
this.formInline = { ...this.formInline } this.formInline = { ...this.formInline }
}, },
evaluationMethodsChange(key, name) { evaluationMethodsChange(key, name) {
this.formInline.evaluationMethods = [] this.formInline.evaluationMethods = key
this.formInline.evaluationMethods = name this.formInline.evaluationMethodsName = []
this.formInline.evaluationMethodsName = name
}, },
dateChange(item) { dateChange(item) {
this.formInline[item] = this.formInline[item] ? moment(this.formInline[item]).format('YYYY-MM-DD') : '' this.formInline[item] = this.formInline[item] ? moment(this.formInline[item]).format('YYYY-MM-DD') : ''
@@ -431,7 +432,7 @@
if (this.selectedRowKeysRecord && this.selectedRowKeysRecord.length == 0) { if (this.selectedRowKeysRecord && this.selectedRowKeysRecord.length == 0) {
this.$message.warning(this.$t('pleaseSelectStandard')) this.$message.warning(this.$t('pleaseSelectStandard'))
} else { } else {
if (this.$refs.TermInformationRef) { if (this.isTrue) {
this.$refs.TermInformationRef.submitData((dataList) => { this.$refs.TermInformationRef.submitData((dataList) => {
this.submitData(startTime, dataList) this.submitData(startTime, dataList)
}) })
@@ -479,7 +480,7 @@
query = { query = {
type: 6, type: 6,
...value, ...value,
msg: JSON.stringify({ evaluators: this.$refs.TermInformationRef.dataList }).replace(/\"/g, '\'') msg: JSON.stringify({ evaluators: value.evaluators }).replace(/\"/g, '\'')
} }
} }
postAction('/workFlow/startProcess', query).then((res) => { postAction('/workFlow/startProcess', query).then((res) => {
@@ -11,15 +11,19 @@
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required">*</span> <span class="Required" v-if="!disabled">*</span>
<span class="title-text-text" :title="$t('complianceResults')">{{$t('complianceResults')}}</span> <span class="title-text-text" :title="$t('complianceResults')">{{$t('complianceResults')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="flag"> <div class="title-text-right" v-if="disabled">
<a-radio-group style="margin-top: 2px" class="box-input" v-model="formInline.flag"> {{formInline.complianceResult == 'Compliance'?$t('accord'):$t('nonConformity')}}
<a-radio value="0"> </div>
<a-form-model-item class="itemModel" v-if="!disabled" :prop="!disabled?'complianceResult':''">
<a-radio-group style="margin-top: 2px" class="box-input"
v-model="formInline.complianceResult">
<a-radio value="Compliance">
{{$t('accord')}} {{$t('accord')}}
</a-radio> </a-radio>
<a-radio value="1"> <a-radio value="Non-Compliance">
{{$t('nonConformity')}} {{$t('nonConformity')}}
</a-radio> </a-radio>
</a-radio-group> </a-radio-group>
@@ -32,21 +36,24 @@
{{$t('feedbackPoint')+(index+1)}} {{$t('feedbackPoint')+(index+1)}}
<a-icon class="icon-size" <a-icon class="icon-size"
@click="addData" @click="addData"
v-if="(formInline.dataList.length-1) == index" v-if="(formInline.dataList.length-1) == index && !disabled"
type="plus-circle"/> type="plus-circle"/>
<a-icon class="icon-size" <a-icon class="icon-size"
@click="deleteData" @click="deleteData"
v-if="formInline.dataList.length > 1 && (formInline.dataList.length - 1) == index" v-if="formInline.dataList.length > 1 && (formInline.dataList.length - 1) == index && !disabled"
type="minus-circle"/> type="minus-circle"/>
</div> </div>
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required">*</span> <span class="Required" v-if="!disabled">*</span>
<span class="title-text-text" :title="$t('relevantSections')">{{$t('relevantSections')}}</span> <span class="title-text-text" :title="$t('relevantSections')">{{$t('relevantSections')}}</span>
</div> </div>
<a-form-model-item class="itemModel" <div class="title-text-right" v-if="disabled">
{{item.relatedSection}}
</div>
<a-form-model-item class="itemModel" v-if="!disabled"
:prop="'dataList.'+index+'.relatedSection'" :prop="'dataList.'+index+'.relatedSection'"
:rules="[{ required: true, message: $t('relevantSections') + $t('cannotEmpty'), trigger: 'blur'}, :rules="[{ required: true, message: $t('relevantSections') + $t('cannotEmpty'), trigger: 'blur'},
{max: 300,message: $t('relevantSections') + $t('cannotExceed') + 300 + $t('Characters'),trigger: 'blur' {max: 300,message: $t('relevantSections') + $t('cannotExceed') + 300 + $t('Characters'),trigger: 'blur'
@@ -61,11 +68,14 @@
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required">*</span> <span class="Required" v-if="!disabled">*</span>
<span class="title-text-text" <span class="title-text-text"
:title="$t('problemDescription')">{{$t('problemDescription')}}</span> :title="$t('problemDescription')">{{$t('problemDescription')}}</span>
</div> </div>
<a-form-model-item class="itemModel" :prop="'dataList.'+index+'.issueOrSuggest'" <div class="title-text-right" v-if="disabled">
{{item.issueOrSuggest}}
</div>
<a-form-model-item class="itemModel" :prop="'dataList.'+index+'.issueOrSuggest'" v-if="!disabled"
:rules="[{ required: true, message: $t('problemDescription') + $t('cannotEmpty'), trigger: 'blur'}, :rules="[{ required: true, message: $t('problemDescription') + $t('cannotEmpty'), trigger: 'blur'},
{max: 300,message: $t('problemDescription') + $t('cannotExceed') + 300 + $t('Characters'),trigger: 'blur' {max: 300,message: $t('problemDescription') + $t('cannotExceed') + 300 + $t('Characters'),trigger: 'blur'
}]"> }]">
@@ -83,7 +93,15 @@
<div class="title-text"> <div class="title-text">
<span class="title-text-text" :title="$t('enclosure')">{{$t('enclosure')}}</span> <span class="title-text-text" :title="$t('enclosure')">{{$t('enclosure')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="accessoryFile"> <div class="title-text-right" v-if="disabled">
<span style="color: #21c9cc" v-if="item.accessoryFile" @click="viewUploadedFilesClick(item.accessoryFile)">
{{$t('viewUploadedFiles')}}
</span>
<span v-else>
--
</span>
</div>
<a-form-model-item class="itemModel" prop="accessoryFile" v-if="!disabled">
<a-button type="primary" class="button-text" <a-button type="primary" class="button-text"
@click="clickButtonToUpload('accessoryFile',index)"> @click="clickButtonToUpload('accessoryFile',index)">
{{ (item.accessoryFile === 'null' || item.accessoryFile === '' || {{ (item.accessoryFile === 'null' || item.accessoryFile === '' ||
@@ -98,17 +116,19 @@
</a-form-model> </a-form-model>
</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: {
@@ -120,19 +140,22 @@
default: (() => { default: (() => {
return [] return []
}) })
},
complianceResult: {
type: Object,
default: {}
} }
}, },
data() { data() {
return { return {
formInline: {}, formInline: {},
disabled: false,
rules: { rules: {
flag:[ complianceResult: [
{ {
required: true, required: true,
message: this.$t('complianceResults') + this.$t('cannotEmpty'), message: this.$t('complianceResults') + this.$t('cannotEmpty'),
trigger: 'change' trigger: 'change'
}, }
], ],
relatedSection: [ relatedSection: [
{ {
@@ -159,6 +182,7 @@
} }
] ]
}, },
disabled: false,
uploadIndex: '', uploadIndex: '',
dataList: [] dataList: []
} }
@@ -177,8 +201,16 @@
} }
] ]
} }
if (this.complianceResult.complianceResult) {
this.formInline.complianceResult = this.complianceResult.complianceResult
}
this.formInline = { ...this.formInline } this.formInline = { ...this.formInline }
}) })
if (this.$route.query.taskDefinitionKey == 'pgrqr') {
this.disabled = false
} else {
this.disabled = true
}
}, },
methods: { methods: {
clickButtonToUpload(item, index) { clickButtonToUpload(item, index) {
@@ -204,7 +236,10 @@
} }
/** 赋值给当前对应的表单文件 */ /** 赋值给当前对应的表单文件 */
this.formInline.dataList[this.uploadIndex][this.uploadName] = attIdList.join(',') this.formInline.dataList[this.uploadIndex][this.uploadName] = attIdList.join(',')
this.formInline = [...this.formInline] this.formInline = { ...this.formInline }
},
viewUploadedFilesClick(item) {
this.$refs.viewFileModelRef.clickButtonToUpload(item)
}, },
addData() { addData() {
this.formInline.dataList.push({ this.formInline.dataList.push({
@@ -213,19 +248,22 @@
reason: '', reason: '',
accessoryFile: '' accessoryFile: ''
}) })
this.formInline = [...this.formInline] this.formInline = { ...this.formInline }
}, },
deleteData() { deleteData() {
this.formInline.dataList.pop() this.formInline.dataList.pop()
this.formInline = [...this.formInline] this.formInline = { ...this.formInline }
}, },
submitData(callBack){ submitData(callBack) {
this.$refs.ruleForm.validate(valid => { this.$refs.ruleForm.validate(valid => {
if (valid) { if (valid) {
callBack && callBack(this.formInline) callBack && callBack(this.formInline)
} }
}) })
}, },
preservationData(callBack) {
callBack && callBack(this.formInline)
}
} }
} }
</script> </script>
@@ -283,6 +321,17 @@
margin-bottom: 12px; margin-bottom: 12px;
} }
.title-text-right {
display: inline-block;
width: calc(100% - 130px);
padding-top: 15px;
font-size: 14px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: #000F16;
}
.Required { .Required {
color: red; color: red;
margin-right: 4px; margin-right: 4px;
@@ -13,13 +13,14 @@
:standardContentQuery="queryProject" :standardContentQuery="queryProject"
/> />
<evaluatorFeedback <evaluatorFeedback
v-if="isDisplay" v-if="isDisplay && !isTrue"
ref="evaluatorFeedbackRef" ref="evaluatorFeedbackRef"
:complianceResult="complianceResult"
:feedbackDataList="feedbackDataList" :feedbackDataList="feedbackDataList"
:title="$t('evaluatorFeedback')" :title="$t('evaluatorFeedback')"
/> />
<evaluatorFeedbackList <evaluatorFeedbackList
v-if="isDisplay" v-if="isDisplay && isTrue"
ref="evaluatorFeedbackListRef" ref="evaluatorFeedbackListRef"
:title="$t('evaluatorFeedback')" :title="$t('evaluatorFeedback')"
/> />
@@ -47,6 +48,7 @@
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage' import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
import moment from 'moment' import moment from 'moment'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
export default { export default {
name: 'evaluationProcess', name: 'evaluationProcess',
components: { components: {
@@ -62,12 +64,14 @@
title: this.$t('collectionOfRegulatoryOpinions'), title: this.$t('collectionOfRegulatoryOpinions'),
url: { url: {
queryTaskDetailByTaskIds: '/task/queryTaskDetailByTaskIds', queryTaskDetailByTaskIds: '/task/queryTaskDetailByTaskIds',
list: '/lawsOpinionGather/lawsOpinionAssessmentResultEO/list' list: '/lawsTechnologyEvaluation/lawsTechnologyEvaluationResultEO/queryEvaluationResultAndComplianceResult'
}, },
loading: false, loading: false,
isDisplay: true, isDisplay: true,
feedbackDataList: [], feedbackDataList: [],
queryProject: {}, queryProject: {},
complianceResult:{},
isTrue: false,
standardContentList: [ standardContentList: [
{ {
title: this.$t('standard'), title: this.$t('standard'),
@@ -79,7 +83,7 @@
}, },
{ {
title: this.$t('regulatoryEngineer'), title: this.$t('regulatoryEngineer'),
value: 'currentUserName' value: 'regulationOwnerName'
}, },
{ {
title: this.$t('closingDate'), title: this.$t('closingDate'),
@@ -87,7 +91,7 @@
}, },
{ {
title: this.$t('evaluationMethod'), title: this.$t('evaluationMethod'),
value: 'evaluationMethod', value: 'evaluationMethodsName'
}, },
{ {
title: this.$t('RelevantMaterials'), title: this.$t('RelevantMaterials'),
@@ -98,44 +102,46 @@
title: this.$t('processBackground'), title: this.$t('processBackground'),
value: 'processBackground' value: 'processBackground'
} }
// {
// title: this.$t('remarks'),
// value: 'remark'
// }
] ]
} }
}, },
mounted() { mounted() {
this.isDisplay = false this.isDisplay = false
this.queryTaskDetailByTask(() => { this.queryTaskDetailByTask()
this.lawsOpinionAssessmentResult()
})
}, },
methods: { methods: {
...mapGetters(['userInfo']), ...mapGetters(['userInfo']),
queryTaskDetailByTask(callback) { queryTaskDetailByTask() {
this.loading = true this.loading = true
getAction(this.url.queryTaskDetailByTaskIds, { taskIds: this.$route.query.taskIds }).then((res) => { getAction(this.url.queryTaskDetailByTaskIds, { taskIds: this.$route.query.taskIds }).then((res) => {
if (res instanceof String) { if (res instanceof String) {
this.queryProject = JSON.parse(res) || {} this.queryProject = JSON.parse(res) || {}
callback && callback()
} else { } else {
this.queryProject = res || {} this.queryProject = res || {}
callback && callback()
} }
this.queryProject.evaluationTypeName = this.queryProject.evaluationType == 'Feedback evaluation' ? this.$t('feedbackEvaluation') :this.$t('clauseEvaluation') this.isTrue = this.queryProject.evaluationType == 'Feedback evaluation' ? false : true
if (this.isTrue) {
this.standardContentList = this.standardContentList.filter(res => {
return res.title != this.$t('evaluationMethod')
})
} else {
this.lawsOpinionAssessmentResult()
}
}) })
}, },
lawsOpinionAssessmentResult() { lawsOpinionAssessmentResult() {
getAction(this.url.list, { getAction(this.url.list, {
lawsOpinionGatherId: this.queryProject.id, lawsTechnologyEvaluationId: this.queryProject.lawsTechnologyEvaluationId,
actiProcInstId: this.$route.query.prcId actiProcInstId: this.$route.query.prcId,
createBy: this.userInfo().username
}).then((res) => { }).then((res) => {
if (res.success) { if (res.success) {
this.feedbackDataList = res.result || [] this.complianceResult = res.result.complianceResult || {}
this.feedbackDataList = res.result.evaluationResultEOList || []
this.loading = false this.loading = false
} else { } else {
this.feedbackDataList = [] this.feedbackDataList = []
this.complianceResult = {}
this.loading = false this.loading = false
} }
this.isDisplay = true this.isDisplay = true
@@ -143,21 +149,21 @@
}, },
preservation() { preservation() {
this.loading = true this.loading = true
let dataList = this.$refs.feedbackInformationRef.dataList this.$refs.evaluatorFeedbackRef.preservationData((res) => {
this.insertBatch(dataList, 1) this.insertBatch(res, 1)
},
insertBatch(list, num) {
list.forEach(res => {
res.lawsOpinionGatherId = this.queryProject.id
res.actiProcInstId = this.$route.query.prcId
}) })
postAction('/lawsOpinionGather/lawsOpinionAssessmentResultEO/insertBatch', { dataList:list }).then((res) => { },
insertBatch(val, num) {
let query = {
actiProcInstId: this.$route.query.prcId,
lawsTechnologyEvaluationId: this.queryProject.lawsTechnologyEvaluationId,
complianceResult: val.complianceResult,
evaluationResultList: val.dataList
}
postAction('/lawsTechnologyEvaluation/lawsTechnologyEvaluationResultEO/evaluatorSaveResult', query).then((res) => {
if (res.success) { if (res.success) {
if (num == 1) { if (num == 1) {
this.$message.success(this.$t('OperationSuccessful')) this.$message.success(this.$t('OperationSuccessful'))
this.$router.push({
path: '/collectionOfRegulatoryOpinions'
})
this.loading = false this.loading = false
} else { } else {
this.completeTask() this.completeTask()
@@ -171,9 +177,9 @@
}) })
}, },
submit() { submit() {
this.$refs.evaluatorFeedbackRef.submitData() this.$refs.evaluatorFeedbackRef.submitData((res) => {
// let dataList = this.$refs.feedbackInformationRef.dataList this.insertBatch(res, 2)
// this.insertBatch(dataList, 2) })
}, },
completeTask() { completeTask() {
let query = { let query = {
@@ -183,13 +189,10 @@
} }
postAction('/workFlow/completeTask', query).then((res) => { postAction('/workFlow/completeTask', query).then((res) => {
if (res.success) { if (res.success) {
// setTimeout(() => {
// window.close()
// }, 1000)
this.$message.success(this.$t('OperationSuccessful')) this.$message.success(this.$t('OperationSuccessful'))
this.loading = false this.loading = false
this.$router.push({ this.$router.push({
path: '/collectionOfRegulatoryOpinions' path: '/technologyAssessment'
}) })
} else { } else {
this.loading = false this.loading = false