386 lines
13 KiB
Java
386 lines
13 KiB
Java
<template>
|
|
<div class="box">
|
|
<div class="box-text">
|
|
<div class="header-text">
|
|
{{$route.query.TaskKey == 'zrrclrw' || $route.query.TaskKey == 'fqrsh'
|
|
? $t('personLiableConfirm'):$t('fillInProjectDelivery')}}
|
|
<a-icon :title="$route.query.TaskKey == 'zrrclrw'?$t('pleaseConfirmationResults'):$t('pleaseReviewTask')"
|
|
v-if="$route.query.TaskKey == 'zrrclrw'"
|
|
type="question-circle"/>
|
|
</div>
|
|
</div>
|
|
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
|
|
<a-row :gutter="24" v-if="$route.query.TaskKey == 'zrrclrw' && $route.query.isDisplay">
|
|
<a-col :span="24">
|
|
<div class="box-title-text">
|
|
<div class="title-text">
|
|
<span class="Required" v-if="$route.query.TaskKey == 'zrrclrw' && $route.query.isDisplay">*</span>
|
|
<span class="title-text-text" :title="$t('reviewResults')">{{$t('reviewResults')}}</span>
|
|
</div>
|
|
<a-form-model-item class="itemModel" :prop="!$route.query.isDisplay?'':'reviewResult'">
|
|
<a-radio-group style="margin-top: 2px"
|
|
:disabled="!$route.query.isDisplay?true:false"
|
|
class="box-input"
|
|
v-model="formInline.reviewResult">
|
|
<a-radio value="Compliance">
|
|
{{$t('accord')}}
|
|
</a-radio>
|
|
<a-radio value="Non-Compliance">
|
|
{{$t('nonConformity')}}
|
|
</a-radio>
|
|
<a-radio value="To be tracked">
|
|
{{$t('Tracked')}}
|
|
</a-radio>
|
|
<a-radio value="NA">
|
|
{{$t('notInvolved')}}
|
|
</a-radio>
|
|
</a-radio-group>
|
|
</a-form-model-item>
|
|
</div>
|
|
</a-col>
|
|
</a-row>
|
|
<a-row :gutter="24" v-if="$route.query.TaskKey == 'zrrclrw' && $route.query.isDisplay">
|
|
<a-col :span="24">
|
|
<div class="box-title-text">
|
|
<div class="title-text">
|
|
<span class="title-text-text" :title="$t('feedbackMessage')">{{$t('feedbackMessage')}}</span>
|
|
</div>
|
|
<a-form-model-item class="itemModel" prop="approvalOpinion">
|
|
<a-textarea :placeholder="$t('pleaseEnter')+$t('feedbackMessage')"
|
|
:disabled="!$route.query.isDisplay?true:false"
|
|
v-model="formInline.approvalOpinion"
|
|
:rows="4"/>
|
|
</a-form-model-item>
|
|
</div>
|
|
</a-col>
|
|
</a-row>
|
|
<a-row :gutter="24" v-if="$route.query.TaskKey == 'dreDispose'">
|
|
<a-col :span="24">
|
|
<div class="box-title-text">
|
|
<div class="title-text-fq">
|
|
<span class="Required" style="margin-right: 13px"></span>
|
|
<span class="title-text-text" :title="$t('projectDeliveryDescription')">{{$t('projectDeliveryDescription')}}</span>
|
|
</div>
|
|
<a-form-model-item class="itemModel">
|
|
<span class="text-header">
|
|
{{formInline.deliveryRequirements}}
|
|
</span>
|
|
</a-form-model-item>
|
|
</div>
|
|
</a-col>
|
|
</a-row>
|
|
<a-row :gutter="24" v-if="$route.query.TaskKey == 'dreDispose'">
|
|
<a-col :span="12">
|
|
<div class="box-title-text">
|
|
<div class="title-text-fq">
|
|
<span class="Required" v-if="$route.query.isDisplay">*</span>
|
|
<span class="title-text-text"
|
|
:title="$t('feedbackFromTheEngineer')">{{$t('feedbackFromTheEngineer')}}</span>
|
|
</div>
|
|
<a-form-model-item class="itemModel"
|
|
:prop="!$route.query.isDisplay?'':'engineerFeedbackContent'">
|
|
<a-textarea :placeholder="$t('pleaseEnter')+$t('feedbackFromTheEngineer')"
|
|
:disabled="!$route.query.isDisplay?true:false"
|
|
v-model="formInline.engineerFeedbackContent"
|
|
:rows="4"/>
|
|
</a-form-model-item>
|
|
</div>
|
|
</a-col>
|
|
</a-row>
|
|
<a-row :gutter="24" v-if="$route.query.TaskKey == 'dreDispose'">
|
|
<a-col :span="12">
|
|
<div class="box-title-text">
|
|
<div class="title-text-fq">
|
|
<span class="Required" v-if="this.$route.query.isDisplay">*</span>
|
|
<span class="title-text-text"
|
|
:title="$t('Deliverables')">{{$t('Deliverables')}}</span>
|
|
</div>
|
|
<a-form-model-item class="itemModel" :prop="!this.$route.query.isDisplay?'':'fileId'">
|
|
<a-button type="primary" class="button-text"
|
|
@click="clickButtonToUpload('fileId')">
|
|
{{ (formInline.fileId === 'null' || formInline.fileId === '' ||
|
|
formInline.fileId == null) ? $t('clickUpload') : $t('viewUploadedFiles')
|
|
}}
|
|
</a-button>
|
|
</a-form-model-item>
|
|
</div>
|
|
</a-col>
|
|
</a-row>
|
|
<a-row :gutter="24"
|
|
v-if="($route.query.TaskKey == 'fqrsh') || ($route.query.TaskKey == 'zrrclrw' && !$route.query.isDisplay)">
|
|
<a-col :span="24">
|
|
<div class="box-title-text">
|
|
<div class="title-text-fq">
|
|
<span class="title-text-text" :title="$t('complianceResults')">{{$t('complianceResults')}}</span>
|
|
</div>
|
|
<a-form-model-item class="itemModel">
|
|
<span class="text-header">
|
|
{{reviewResult[formInline.reviewResult]}}
|
|
</span>
|
|
</a-form-model-item>
|
|
</div>
|
|
</a-col>
|
|
</a-row>
|
|
<a-row :gutter="24"
|
|
v-if="($route.query.TaskKey == 'fqrsh') || ($route.query.TaskKey == 'zrrclrw' && !$route.query.isDisplay)">
|
|
<a-col :span="24">
|
|
<div class="box-title-text">
|
|
<div class="title-text-fq">
|
|
<span class="title-text-text" :title="$t('feedbackMessage')">{{$t('feedbackMessage')}}</span>
|
|
</div>
|
|
<a-form-model-item class="itemModel">
|
|
<span class="text-header">
|
|
{{formInline.PersonChargeFeedback}}
|
|
</span>
|
|
</a-form-model-item>
|
|
</div>
|
|
</a-col>
|
|
</a-row>
|
|
<div class="box-text" v-if="$route.query.TaskKey == 'fqrsh' && this.$route.query.isDisplay">
|
|
<div class="header-text">
|
|
{{$t('sponsorReview')}}
|
|
<a-icon :title="$t('pleaseWillBeReturned')"
|
|
type="question-circle"/>
|
|
</div>
|
|
</div>
|
|
<a-row :gutter="24" v-if="$route.query.TaskKey == 'fqrsh' && this.$route.query.isDisplay">
|
|
<a-col :span="24">
|
|
<div class="box-title-text">
|
|
<div class="title-text">
|
|
<span class="title-text-text" :title="$t('feedbackMessage')">{{$t('feedbackMessage')}}</span>
|
|
</div>
|
|
<a-form-model-item class="itemModel" prop="approvalOpinion">
|
|
<a-textarea :placeholder="$t('pleaseEnter')+$t('feedbackMessage')"
|
|
:disabled="!$route.query.isDisplay?true:false"
|
|
v-model="formInline.approvalOpinion"
|
|
:rows="4"/>
|
|
</a-form-model-item>
|
|
</div>
|
|
</a-col>
|
|
</a-row>
|
|
</a-form-model>
|
|
<uploadFile ref="uploadFile"
|
|
:disabled="!$route.query.isDisplay?true:false"
|
|
@uploadSuccess="uploadSuccess"/>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import { getAction, postAction, putAction, deleteAction } from '@/api/manage'
|
|
import uploadFile from '@/components/uploadFile/file'
|
|
|
|
export default {
|
|
name: 'reviewedByThePersonInCharge',
|
|
components: {
|
|
uploadFile
|
|
},
|
|
props: ['queryBy', 'queryPersonInCharge'],
|
|
data() {
|
|
return {
|
|
formInline: {},
|
|
reviewResult: {
|
|
'launch': this.$t('Launch'),
|
|
'Compliance': this.$t('accord'),
|
|
'Non-Compliance': this.$t('nonConformity'),
|
|
'To be tracked': this.$t('Tracked'),
|
|
'NA': this.$t('notInvolved'),
|
|
'No rating': this.$t('toBeConfirmed')
|
|
},
|
|
isTrue: false,
|
|
rules: {
|
|
reviewResult: [
|
|
{
|
|
required: true,
|
|
message: this.$t('reviewResults') + this.$t('cannotEmpty'),
|
|
trigger: 'change'
|
|
}
|
|
],
|
|
approvalOpinion: [
|
|
{
|
|
max: 300,
|
|
message: this.$t('feedbackMessage') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
|
|
trigger: 'blur'
|
|
}
|
|
],
|
|
engineerFeedbackContent: [
|
|
{
|
|
required: true,
|
|
message: this.$t('feedbackFromTheEngineer') + this.$t('cannotEmpty'),
|
|
trigger: 'blur'
|
|
},
|
|
{
|
|
max: 300,
|
|
message: this.$t('feedbackFromTheEngineer') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
|
|
trigger: 'blur'
|
|
}
|
|
],
|
|
fileId: [
|
|
{
|
|
required: true,
|
|
message: this.$t('Deliverables') + this.$t('cannotEmpty'),
|
|
trigger: 'change'
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
mounted() {
|
|
this.$route.query.isDisplay = JSON.parse(this.$route.query.isDisplay)
|
|
if (this.queryBy && this.$route.query.TaskKey == 'fqrsh') {
|
|
this.formInline.reviewResult = this.queryBy.reviewResult || undefined
|
|
this.formInline.PersonChargeFeedback = this.$route.query.PersonChargeFeedback
|
|
this.formInline = { ...this.formInline }
|
|
}
|
|
if (this.queryPersonInCharge && this.$route.query.TaskKey == 'dreDispose') {
|
|
this.formInline.deliveryRequirements = this.queryPersonInCharge.deliveryRequirements
|
|
this.formInline.engineerFeedbackContent = this.queryPersonInCharge.engineerFeedbackContent
|
|
this.formInline.fileId = this.queryPersonInCharge.fileId
|
|
this.formInline = { ...this.formInline }
|
|
}
|
|
if (this.queryBy && this.$route.query.TaskKey == 'zrrclrw') {
|
|
if (!this.$route.query.isDisplay) {
|
|
this.formInline.reviewResult = this.queryBy.reviewResult || undefined
|
|
this.formInline.approvalOpinion = this.$route.query.PersonChargeFeedback
|
|
this.formInline = { ...this.formInline }
|
|
}
|
|
}
|
|
},
|
|
methods: {
|
|
submit(callBack) {
|
|
this.$refs.ruleForm.validate(valid => {
|
|
if (valid) {
|
|
callBack(this.formInline)
|
|
}
|
|
})
|
|
},
|
|
submitNoRule(callBack) {
|
|
callBack(this.formInline)
|
|
},
|
|
clickButtonToUpload(item) {
|
|
this.$refs.uploadFile.perentHandleFunc()
|
|
this.$refs.uploadFile.visible = true
|
|
this.uploadName = item
|
|
getAction('sys/common/getFileInfos', { id: this.formInline[item] }).then((res) => {
|
|
if (res.success) {
|
|
this.$refs.uploadFile.perentHandleFunc(res.result)
|
|
} else {
|
|
this.$refs.uploadFile.perentHandleFunc()
|
|
}
|
|
})
|
|
},
|
|
/** 上传文件的回调 */
|
|
uploadSuccess(data) {
|
|
let attIdList = []
|
|
if (data && data.length > 0) {
|
|
data.map(item => {
|
|
attIdList.push(item.id || data.name)
|
|
})
|
|
}
|
|
/** 赋值给当前对应的表单文件 */
|
|
this.formInline[this.uploadName] = attIdList.join(',')
|
|
this.formInline = { ...this.formInline }
|
|
this.$nextTick(() => {
|
|
this.$refs.ruleForm.validateField([this.uploadName])
|
|
})
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
|
|
<style scoped lang="less">
|
|
.box {
|
|
padding: 0 24px 0 24px;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.box-text {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
height: 60px;
|
|
line-height: 40px;
|
|
|
|
.header-text {
|
|
font-size: 16px;
|
|
font-weight: 400;
|
|
color: #000F16;
|
|
}
|
|
}
|
|
|
|
.box-title-text {
|
|
line-height: 1.4;
|
|
display: flex;
|
|
/*align-items: center;*/
|
|
}
|
|
|
|
.title-text {
|
|
width: 88px;
|
|
text-align: right;
|
|
display: inline-block;
|
|
font-weight: 500;
|
|
font-size: 14px;
|
|
margin-right: 16px;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
height: 42px;
|
|
line-height: 48px;
|
|
color: #000F16;
|
|
}
|
|
|
|
.title-text-fq {
|
|
width: 130px;
|
|
text-align: left;
|
|
display: inline-block;
|
|
font-weight: 500;
|
|
font-size: 14px;
|
|
margin-right: 16px;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
height: 42px;
|
|
line-height: 48px;
|
|
color: #000F16;
|
|
}
|
|
|
|
.box-input {
|
|
display: inline-block;
|
|
height: 38px;
|
|
width: 100%;
|
|
}
|
|
|
|
.itemModel {
|
|
width: 100%;
|
|
display: inline-block;
|
|
margin-top: 2px;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.Required {
|
|
color: red;
|
|
margin-right: 4px;
|
|
}
|
|
|
|
.title-text-text {
|
|
margin-top: 9px;
|
|
}
|
|
|
|
/*.formAdd {*/
|
|
/* margin-bottom: 40px;*/
|
|
/*}*/
|
|
|
|
.text-header {
|
|
font-size: 16px;
|
|
color: #040B29;
|
|
font-weight: 400;
|
|
}
|
|
|
|
.button-text {
|
|
height: 38px;
|
|
width: calc(50% - 100px);
|
|
line-height: 38px;
|
|
background: #fff;
|
|
border: 1px #00B3BE solid;
|
|
color: #00B3BE;
|
|
}
|
|
</style> |