对接法规技术评估
This commit is contained in:
@@ -1134,5 +1134,5 @@ module.exports = {
|
||||
feedbackEvaluation:'反馈评估',
|
||||
clauseEvaluation:'条款评估',
|
||||
standardDocuments:'标准文件',
|
||||
pleaseCompleteTheEvaluationMethodorEvaluator:'Please complete the evaluation method or evaluator in the list',
|
||||
pleaseCompleteTheEvaluationMethodorEvaluator:'请补全列表中评估方式或评估人',
|
||||
}
|
||||
+5
-4
@@ -410,8 +410,9 @@
|
||||
this.formInline = { ...this.formInline }
|
||||
},
|
||||
evaluationMethodsChange(key, name) {
|
||||
this.formInline.evaluationMethods = []
|
||||
this.formInline.evaluationMethods = name
|
||||
this.formInline.evaluationMethods = key
|
||||
this.formInline.evaluationMethodsName = []
|
||||
this.formInline.evaluationMethodsName = name
|
||||
},
|
||||
dateChange(item) {
|
||||
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) {
|
||||
this.$message.warning(this.$t('pleaseSelectStandard'))
|
||||
} else {
|
||||
if (this.$refs.TermInformationRef) {
|
||||
if (this.isTrue) {
|
||||
this.$refs.TermInformationRef.submitData((dataList) => {
|
||||
this.submitData(startTime, dataList)
|
||||
})
|
||||
@@ -479,7 +480,7 @@
|
||||
query = {
|
||||
type: 6,
|
||||
...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) => {
|
||||
|
||||
@@ -11,15 +11,19 @@
|
||||
<a-col :span="12">
|
||||
<div class="box-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>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="flag">
|
||||
<a-radio-group style="margin-top: 2px" class="box-input" v-model="formInline.flag">
|
||||
<a-radio value="0">
|
||||
<div class="title-text-right" v-if="disabled">
|
||||
{{formInline.complianceResult == 'Compliance'?$t('accord'):$t('nonConformity')}}
|
||||
</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')}}
|
||||
</a-radio>
|
||||
<a-radio value="1">
|
||||
<a-radio value="Non-Compliance">
|
||||
{{$t('nonConformity')}}
|
||||
</a-radio>
|
||||
</a-radio-group>
|
||||
@@ -32,21 +36,24 @@
|
||||
{{$t('feedbackPoint')+(index+1)}}
|
||||
<a-icon class="icon-size"
|
||||
@click="addData"
|
||||
v-if="(formInline.dataList.length-1) == index"
|
||||
v-if="(formInline.dataList.length-1) == index && !disabled"
|
||||
type="plus-circle"/>
|
||||
<a-icon class="icon-size"
|
||||
@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"/>
|
||||
</div>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<div class="box-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>
|
||||
</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'"
|
||||
:rules="[{ required: true, message: $t('relevantSections') + $t('cannotEmpty'), trigger: 'blur'},
|
||||
{max: 300,message: $t('relevantSections') + $t('cannotExceed') + 300 + $t('Characters'),trigger: 'blur'
|
||||
@@ -61,11 +68,14 @@
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required">*</span>
|
||||
<span class="Required" v-if="!disabled">*</span>
|
||||
<span class="title-text-text"
|
||||
:title="$t('problemDescription')">{{$t('problemDescription')}}</span>
|
||||
</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'},
|
||||
{max: 300,message: $t('problemDescription') + $t('cannotExceed') + 300 + $t('Characters'),trigger: 'blur'
|
||||
}]">
|
||||
@@ -83,7 +93,15 @@
|
||||
<div class="title-text">
|
||||
<span class="title-text-text" :title="$t('enclosure')">{{$t('enclosure')}}</span>
|
||||
</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"
|
||||
@click="clickButtonToUpload('accessoryFile',index)">
|
||||
{{ (item.accessoryFile === 'null' || item.accessoryFile === '' ||
|
||||
@@ -98,17 +116,19 @@
|
||||
</a-form-model>
|
||||
</div>
|
||||
<uploadFile ref="uploadFile" :disabled="disabled" @uploadSuccess="uploadSuccess"></uploadFile>
|
||||
<viewFileModel ref="viewFileModelRef"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction } from '@/api/manage'
|
||||
import uploadFile from '@/components/uploadFile/file'
|
||||
|
||||
import viewFileModel from '@/components/viewFileModel/index'
|
||||
export default {
|
||||
name: 'evaluatorFeedback',
|
||||
components: {
|
||||
uploadFile
|
||||
uploadFile,
|
||||
viewFileModel
|
||||
},
|
||||
props: {
|
||||
title: {
|
||||
@@ -120,19 +140,22 @@
|
||||
default: (() => {
|
||||
return []
|
||||
})
|
||||
},
|
||||
complianceResult: {
|
||||
type: Object,
|
||||
default: {}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
formInline: {},
|
||||
disabled: false,
|
||||
rules: {
|
||||
flag:[
|
||||
complianceResult: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('complianceResults') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
},
|
||||
}
|
||||
],
|
||||
relatedSection: [
|
||||
{
|
||||
@@ -159,6 +182,7 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
disabled: false,
|
||||
uploadIndex: '',
|
||||
dataList: []
|
||||
}
|
||||
@@ -177,8 +201,16 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
if (this.complianceResult.complianceResult) {
|
||||
this.formInline.complianceResult = this.complianceResult.complianceResult
|
||||
}
|
||||
this.formInline = { ...this.formInline }
|
||||
})
|
||||
if (this.$route.query.taskDefinitionKey == 'pgrqr') {
|
||||
this.disabled = false
|
||||
} else {
|
||||
this.disabled = true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickButtonToUpload(item, index) {
|
||||
@@ -204,7 +236,10 @@
|
||||
}
|
||||
/** 赋值给当前对应的表单文件 */
|
||||
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() {
|
||||
this.formInline.dataList.push({
|
||||
@@ -213,19 +248,22 @@
|
||||
reason: '',
|
||||
accessoryFile: ''
|
||||
})
|
||||
this.formInline = [...this.formInline]
|
||||
this.formInline = { ...this.formInline }
|
||||
},
|
||||
deleteData() {
|
||||
this.formInline.dataList.pop()
|
||||
this.formInline = [...this.formInline]
|
||||
this.formInline = { ...this.formInline }
|
||||
},
|
||||
submitData(callBack){
|
||||
submitData(callBack) {
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
callBack && callBack(this.formInline)
|
||||
}
|
||||
})
|
||||
},
|
||||
preservationData(callBack) {
|
||||
callBack && callBack(this.formInline)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -283,6 +321,17 @@
|
||||
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 {
|
||||
color: red;
|
||||
margin-right: 4px;
|
||||
|
||||
@@ -13,13 +13,14 @@
|
||||
:standardContentQuery="queryProject"
|
||||
/>
|
||||
<evaluatorFeedback
|
||||
v-if="isDisplay"
|
||||
v-if="isDisplay && !isTrue"
|
||||
ref="evaluatorFeedbackRef"
|
||||
:complianceResult="complianceResult"
|
||||
:feedbackDataList="feedbackDataList"
|
||||
:title="$t('evaluatorFeedback')"
|
||||
/>
|
||||
<evaluatorFeedbackList
|
||||
v-if="isDisplay"
|
||||
v-if="isDisplay && isTrue"
|
||||
ref="evaluatorFeedbackListRef"
|
||||
:title="$t('evaluatorFeedback')"
|
||||
/>
|
||||
@@ -47,6 +48,7 @@
|
||||
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
|
||||
import moment from 'moment'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'evaluationProcess',
|
||||
components: {
|
||||
@@ -62,12 +64,14 @@
|
||||
title: this.$t('collectionOfRegulatoryOpinions'),
|
||||
url: {
|
||||
queryTaskDetailByTaskIds: '/task/queryTaskDetailByTaskIds',
|
||||
list: '/lawsOpinionGather/lawsOpinionAssessmentResultEO/list'
|
||||
list: '/lawsTechnologyEvaluation/lawsTechnologyEvaluationResultEO/queryEvaluationResultAndComplianceResult'
|
||||
},
|
||||
loading: false,
|
||||
isDisplay: true,
|
||||
feedbackDataList: [],
|
||||
queryProject: {},
|
||||
complianceResult:{},
|
||||
isTrue: false,
|
||||
standardContentList: [
|
||||
{
|
||||
title: this.$t('standard'),
|
||||
@@ -79,7 +83,7 @@
|
||||
},
|
||||
{
|
||||
title: this.$t('regulatoryEngineer'),
|
||||
value: 'currentUserName'
|
||||
value: 'regulationOwnerName'
|
||||
},
|
||||
{
|
||||
title: this.$t('closingDate'),
|
||||
@@ -87,7 +91,7 @@
|
||||
},
|
||||
{
|
||||
title: this.$t('evaluationMethod'),
|
||||
value: 'evaluationMethod',
|
||||
value: 'evaluationMethodsName'
|
||||
},
|
||||
{
|
||||
title: this.$t('RelevantMaterials'),
|
||||
@@ -98,44 +102,46 @@
|
||||
title: this.$t('processBackground'),
|
||||
value: 'processBackground'
|
||||
}
|
||||
// {
|
||||
// title: this.$t('remarks'),
|
||||
// value: 'remark'
|
||||
// }
|
||||
]
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.isDisplay = false
|
||||
this.queryTaskDetailByTask(() => {
|
||||
this.lawsOpinionAssessmentResult()
|
||||
})
|
||||
this.queryTaskDetailByTask()
|
||||
},
|
||||
methods: {
|
||||
...mapGetters(['userInfo']),
|
||||
queryTaskDetailByTask(callback) {
|
||||
queryTaskDetailByTask() {
|
||||
this.loading = true
|
||||
getAction(this.url.queryTaskDetailByTaskIds, { taskIds: this.$route.query.taskIds }).then((res) => {
|
||||
if (res instanceof String) {
|
||||
this.queryProject = JSON.parse(res) || {}
|
||||
callback && callback()
|
||||
} else {
|
||||
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() {
|
||||
getAction(this.url.list, {
|
||||
lawsOpinionGatherId: this.queryProject.id,
|
||||
actiProcInstId: this.$route.query.prcId
|
||||
lawsTechnologyEvaluationId: this.queryProject.lawsTechnologyEvaluationId,
|
||||
actiProcInstId: this.$route.query.prcId,
|
||||
createBy: this.userInfo().username
|
||||
}).then((res) => {
|
||||
if (res.success) {
|
||||
this.feedbackDataList = res.result || []
|
||||
this.complianceResult = res.result.complianceResult || {}
|
||||
this.feedbackDataList = res.result.evaluationResultEOList || []
|
||||
this.loading = false
|
||||
} else {
|
||||
this.feedbackDataList = []
|
||||
this.complianceResult = {}
|
||||
this.loading = false
|
||||
}
|
||||
this.isDisplay = true
|
||||
@@ -143,21 +149,21 @@
|
||||
},
|
||||
preservation() {
|
||||
this.loading = true
|
||||
let dataList = this.$refs.feedbackInformationRef.dataList
|
||||
this.insertBatch(dataList, 1)
|
||||
},
|
||||
insertBatch(list, num) {
|
||||
list.forEach(res => {
|
||||
res.lawsOpinionGatherId = this.queryProject.id
|
||||
res.actiProcInstId = this.$route.query.prcId
|
||||
this.$refs.evaluatorFeedbackRef.preservationData((res) => {
|
||||
this.insertBatch(res, 1)
|
||||
})
|
||||
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 (num == 1) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.$router.push({
|
||||
path: '/collectionOfRegulatoryOpinions'
|
||||
})
|
||||
this.loading = false
|
||||
} else {
|
||||
this.completeTask()
|
||||
@@ -171,9 +177,9 @@
|
||||
})
|
||||
},
|
||||
submit() {
|
||||
this.$refs.evaluatorFeedbackRef.submitData()
|
||||
// let dataList = this.$refs.feedbackInformationRef.dataList
|
||||
// this.insertBatch(dataList, 2)
|
||||
this.$refs.evaluatorFeedbackRef.submitData((res) => {
|
||||
this.insertBatch(res, 2)
|
||||
})
|
||||
},
|
||||
completeTask() {
|
||||
let query = {
|
||||
@@ -183,13 +189,10 @@
|
||||
}
|
||||
postAction('/workFlow/completeTask', query).then((res) => {
|
||||
if (res.success) {
|
||||
// setTimeout(() => {
|
||||
// window.close()
|
||||
// }, 1000)
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.loading = false
|
||||
this.$router.push({
|
||||
path: '/collectionOfRegulatoryOpinions'
|
||||
path: '/technologyAssessment'
|
||||
})
|
||||
} else {
|
||||
this.loading = false
|
||||
|
||||
Reference in New Issue
Block a user