修改法规清单

This commit is contained in:
范强强
2023-03-20 15:51:33 +08:00
parent 9ab0d31c70
commit deedff2f0c
5 changed files with 787 additions and 226 deletions
@@ -3,6 +3,7 @@
<div class="process-header-title">
<div class="process-header-btn">
<!-- 终止流程-->
<a-button class="header-btn termin" v-if="isTerminationProcess" @click="terminationProcess" type="danger" ghost>
{{$t('terminationProcess')}}
</a-button>
@@ -13,10 +14,13 @@
<a-button class="header-btn termin" v-if="isSendBack" @click="sendBackCkick" type="danger" ghost>
{{$t('sendBack')}}
</a-button>
<!-- 提交-->
<a-button class="header-btn submit" v-if="isSubmit" @click="submit" type="primary">{{$t('submit')}}</a-button>
<a-button class="header-btn submit" v-if="isResubmit" @click="Resubmit" type="primary">{{$t('Resubmit')}}</a-button>
<a-button class="header-btn submit" v-if="isAdopt" @click="adopt" type="primary">{{$t('submit')}}</a-button>
<a-button class="header-btn issue" v-if="isConfirm" @click="confirm" type="primary">{{$t('confirm')}}</a-button>
<a-button v-if="isCancel" @click="cancel">{{$t('cancel')}}</a-button>
</div>
</div>
</div>
@@ -65,6 +69,14 @@
type: Boolean,
default: false
},
isCancel:{
type: Boolean,
default: false
},
isConfirm:{
type: Boolean,
default: false
}
},
methods: {
terminationProcess() {
@@ -95,7 +107,15 @@
adopt() {
let handlingTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
this.$emit('adopt', handlingTime)
}
},
cancel(){
let handlingTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
this.$emit('cancel', handlingTime)
},
confirm(){
let handlingTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
this.$emit('confirm', handlingTime)
},
}
}
</script>
@@ -80,6 +80,7 @@
},
mounted() {
this.queryForm = this.standardContentQuery
console.log(this.queryForm)
},
methods: {
urlClick(val) {
@@ -45,208 +45,30 @@
@showSizeChange="SizeChange"
/>
</div>
<a-drawer
:title="title"
:maskClosable="false"
:width="948"
placement="right"
:closable="true"
@close="handleCancel"
:visible="visible"
style="height: 100%;overflow: auto;padding-bottom: 53px;">
<div style="margin-bottom: 40px">
<div class="header-text">
{{$t('basicInformation')}}
</div>
<div class="content-text">
<div class="text-field" v-for="(item,index) in projectInformationList" :key="index">
<span class="text-field-left" :title="item.title">{{item.title}}</span>
<span class="text-field-right text-field-right-url"
:title="queryForm[item.value]"
v-if="item.type == 1"
>{{queryForm[item.value]}}</span>
<span class="text-field-right text-field-right-url"
v-else-if="item.type == '4'" :title="queryForm[item.value]"
>{{queryForm[item.value]}}</span>
<span class="text-field-right" v-else :title="queryForm[item.value]"
>{{queryForm[item.value]}}</span>
</div>
</div>
</div>
<div style="margin-bottom: 40px">
<div class="header-text">
{{$t('TaskRequirements')}}
</div>
<div class="content-text">
<div class="text-field" :class="{'text-content-button-one':item.type == 4 ? true :false}"
v-for="(item,index) in standardContentList" :key="index">
<span class="text-field-left" :title="item.title">{{item.title}}</span>
<span class="text-field-right text-field-right-url"
v-if="item.type == 1"
></span>
<span class="text-field-right text-field-right-url"
v-else-if="item.type == '5'"
></span>
<span class="text-field-right text-field-right-url"
v-else-if="item.type == 2"
>{{ $t('viewFile') }}</span>
<span class="text-field-right" v-else
></span>
</div>
</div>
</div>
<div style="margin-bottom: 40px">
<div class="header-text">
{{$t('personLiableConfirm')}}
</div>
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text" :title="$t('reviewResults')">{{$t('reviewResults')}}</span>
</div>
<a-form-model-item class="itemModel">
<a-radio-group>
<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>
{{$t('turnToDo')}}
</a-radio>
</a-radio-group>
</a-form-model-item>
</div>
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text" :title="$t('feedbackMessage')">{{$t('feedbackMessage')}}</span>
</div>
<a-form-model-item class="itemModel">
<a-textarea :placeholder="$t('pleaseEnter')+$t('feedbackMessage')"
rows="4"/>
</a-form-model-item>
</div>
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('enclosure')">{{$t('enclosure')}}</span>
</div>
<a-form-model-item class="itemModel">
<a-button type="primary">{{$t('uploadattachment')}}</a-button>
</a-form-model-item>
</div>
</div>
<div style="margin-bottom: 40px">
<div class="header-text">
{{$t('circulationHistory')}}
</div>
<div class="process-content">
<div style="display: flex;justify-content: space-between">
<div class="process-content-content">
<img src="../../../../assets/wancheng.png" class="process-content-left" alt="">
<img src="../../../../assets/shijian.png" class="process-content-left" alt="">
<img src="../../../../assets/xian.png" class="process-content-left" alt="">
<div class="process-content-right">
<div class="process-content-right-top"></div>
</div>
</div>
</div>
<div class="process-content-right-xian"></div>
</div>
<a-table
:pagination="false"
:scroll="{x: '100%'}"
rowKey="id"
:columns="Historycolumns"
>
</a-table>
</div>
<div class="drawer-bootom-button">
<a-button style="margin-right: .8rem" @click="handleCancel">{{$t('cancel')}}</a-button>
<a-button style="margin-right: .8rem" type="danger">{{$t('sendBack')}}</a-button>
<a-button type="primary">{{$t('adopt')}}</a-button>
</div>
</a-drawer>
<designCompliance ref="designComplianceRef"/>
</div>
</template>
<script>
import { getAction, postAction, deleteAction } from '@/api/manage'
import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header'
import designCompliance from './designCompliance'
import confirmationDrawer from './confirmationDrawer'
export default {
name: 'dealtWith',
components:{
confirmationDrawer
components: {
confirmationDrawer,
designCompliance
},
mixins:[ResizeHeader, ResizeColumnProvide,],
mixins: [ResizeHeader, ResizeColumnProvide],
data() {
return {
visible: false,
title:'',
title: '',
queryForm: {},
dataSource: [],
loading: false,
projectInformationList: [
{
title: this.$t('entryName'),
value: 'projectName'
},
{
title: this.$t('regulationNo'),
value: 'targetMarket_dictText'
},
{
title: this.$t('title'),
value: 'subtitle'
},
{
title: this.$t('subtitle'),
value: 'serialNumber',
type: '4'
},
{
title: this.$t('applicableSupplement'),
value: 'title'
},
],
standardContentList: [
{
title: this.$t('Sponsor'),
value: this.$route.query.Sponsor
},
{
title: this.$t('personLiable'),
value: this.$route.query.personLiable
},
{
title: this.$t('closingDate'),
value: this.$route.query.DueDate
},
{
title: this.$t('typeOfDeliverables'),
value: this.$route.query.typeOfDeliverables
},
{
title: this.$t('deliverableTemplate'),
value: this.$route.query.deliverableTemplate,
type: 2
},
{},
{
title: this.$t('descriptionDeliverables'),
value: this.$route.query.remarks
}
],
columns: [
{
title: this.$t('RelatedItems'),
@@ -351,7 +173,7 @@
dataIndex: '',
ellipsis: true,
width: 210
},
}
],
selectedRowKeys: [],
pageSize: 10,
@@ -359,14 +181,14 @@
total: 0,
url: {
list: '/todoCenter/projectProcess/todoTaskList',
urlFrom: 'project/projectLibraryBase/queryById',
urlFrom: 'project/projectLibraryBase/queryById'
},
queryParam: {},
regulatoryCertificationTaskPlanList: []
}
},
mounted() {
if(this.$route.query.projectName){
if (this.$route.query.projectName) {
this.queryParam.projectName = this.$route.query.projectName
}
this.getList()
@@ -427,7 +249,7 @@
}
})
window.open(newUrl.href, '_blank')
}else if (row.flowType == '21') {
} else if (row.flowType == '21') {
let newUrl = this.$router.resolve({
path: '/ProjectDetails',
query: {
@@ -474,9 +296,7 @@
// query: query
// })
// window.open(newUrl.href, '_blank')
this.visible = true
this.title = this.$t('designComplianceReview')
this.getQueryForm()
this.$refs.designComplianceRef.getList(JSON.parse(JSON.stringify(query)),this.$t('designComplianceReview'))
} else if (row.flowType == '3') {
row.taskId = row.taskId + ''
@@ -599,26 +419,14 @@
},
handleCancel() {
this.visible = false
},
getQueryForm() {
getAction(this.url.urlFrom).then((res) => {
if (res.success) {
this.queryForm = res.result[0] || {}
if (this.queryProject) {
this.queryForm = { ...this.queryForm, ...this.queryProject }
console.log(this.queryForm)
}
} else {
this.queryForm = {}
}
})
},
}
}
}
</script>
<style lang="less" scoped>
@import '~@assets/less/common.less';
.page {
text-align: right;
margin-top: 20px;
@@ -657,27 +465,27 @@
display: flex;
flex-wrap: wrap;
.text-field {
width: 50%;
margin-bottom: 8px;
.text-field {
width: 50%;
margin-bottom: 8px;
.text-field-right {
width: calc(100% - 200px);
display: inline-block;
font-size: 14px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
word-break: break-word;
color: #040B29;
font-weight: 400;
}
.text-field-right {
width: calc(100% - 200px);
display: inline-block;
font-size: 14px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
word-break: break-word;
color: #040B29;
font-weight: 400;
}
.text-field-right-url {
color: #00B3BE !important;
cursor: pointer;
}
}
.text-field-right-url {
color: #00B3BE !important;
cursor: pointer;
}
}
}
.itemModel {
@@ -0,0 +1,419 @@
<template>
<div style="position: relative">
<a-drawer
:title="title"
:maskClosable="false"
:width="1200"
placement="right"
:closable="true"
@close="handleCancel"
:visible="visible"
style="height: 100%;overflow: auto;padding-bottom: 53px;">
<JLoading :loading="loading">{{textLoading}}</JLoading>
<projectInformation
v-if="isDisplay"
:title="$t('basicInformation')"
:projectInformationList="projectInformationList"
:url="url"
:projectInformationId="this.queryBy.projectLibraryId"
:queryProject="queryProject"
/>
<standardContent
v-if="isDisplay"
:title="$t('TaskRequirements')"
:standardContentList="standardContentList"
:url="url"
:standardContentQuery="queryProject"
/>
<reviewedByThePersonInCharge
v-if="isDisplay"
ref="reviewedByThePersonInChargeRef"
:query="queryData"
:queryBy="queryBy"
:queryPersonInCharge="queryPersonInCharge"/>
<div class="drawer-bootom-button">
<footerProcess
v-if="isDisplay"
:is-adopt="isAdopt"
:isSendBack="isSendBack"
:isSubmit="isSubmit"
:is-resubmit="isResubmit"
:is-cancel="isCancel"
:is-confirm="isConfirm"
@terminationProcess="terminationProcess"
@adopt="adopt"
@sendBack="sendBack"
@submit="submit"
@Resubmit="Resubmit"
@cancel="handleCancel"
@confirm="confirm"
/>
</div>
</a-drawer>
</div>
</template>
<script>
import projectInformation from '../../../processCenter/components/projectInformation'
import standardContent from '../../../processCenter/components/standardContent'
import footerProcess from '../../../processCenter/components/footerProcess'
import reviewedByThePersonInCharge from './reviewedByThePersonInCharge'
import { getAction, postAction, deleteAction, downloadFile, putAction } from '@/api/manage'
import { mapGetters } from 'vuex'
export default {
name: 'designCompliance',
components: {
projectInformation,
standardContent,
reviewedByThePersonInCharge,
footerProcess
},
data() {
return {
visible: false,
title: '',
queryBy: {},
loading: false,
url: {
urlFrom: 'project/projectLibraryBase/queryById',
queryProjectLawsInventoryInfoById: 'project/projectLawsInventoryEO/queryProjectLawsInventoryInfoById',
queryTaskDetailByTaskIds: '/task/queryTaskDetailByTaskIds',
edit: '/project/projectTaskInventoryDetailEO/edit',
dreSubmit: '/project/projectTaskInventoryFeedbackEO/dreSubmit',
list: '/project/projectTaskInventoryFeedbackEO/list'
},
projectInformationList: [
{
title: this.$t('entryName'),
value: 'projectName'
},
{
title: this.$t('targetMarket'),
value: 'targetMarket_dictText'
},
{
title: this.$t('subtitle'),
value: 'subtitle'
},
{
title: this.$t('standard'),
value: 'serialNumber',
type: '4'
},
{
title: this.$t('title'),
value: 'title'
},
{
title: this.$t('applicableSupplement'),
value: 'applicableSupplement'
}
// {
// title: this.$t('remarks'),
// value: 'remark'
// }
],
standardContentList: [],
isDisplay: false,
queryProject: {},
queryData: {},
textLoading: this.$t('dataLoading'),
queryPersonInCharge: {}
}
},
computed: {
isSendBack() {
if (this.queryData.TaskKey == 'fqrsh' && this.queryData.isDisplay) {
return true
}
return false
},
isAdopt() {
if (this.queryData.TaskKey == 'fqrsh' && this.queryData.isDisplay) {
if (this.queryBy.reviewResult == 'Compliance' || this.queryBy.reviewResult == 'NA') {
return true
}
}
return false
},
isSubmit() {
if (this.queryData.TaskKey == 'zrrclrw' && this.queryData.isDisplay) {
return true
}
return false
},
isResubmit() {
if (this.queryData.TaskKey == 'dreDispose' && this.queryData.isDisplay) {
if (this.queryPersonInCharge.engineerFeedbackContent && this.queryPersonInCharge.status != 'haveDone') {
return true
}
}
return false
},
isCancel() {
if (this.queryData.TaskKey == 'zrrqr' || this.queryData.TaskKey == 'dezrrqr') {
return true
}
return false
},
isConfirm() {
if (this.queryData.TaskKey == 'zrrqr' || this.queryData.TaskKey == 'dezrrqr') {
return true
}
return false
}
},
mounted() {
},
methods: {
...mapGetters(['userInfo']),
handleCancel() {
this.visible = false
},
terminationProcess(operatorTime) {
this.textLoading = this.$t('terminationProcessing')
this.loading = true
this.queryBy.reviewResult = 'Termination of task'
this.$refs.reviewedByThePersonInChargeRef.submitNoRule((res) => {
this.completeTask({ flag: 2, operatorTime: operatorTime, ...res })
})
},
adopt(operatorTime) {
this.$refs.reviewedByThePersonInChargeRef.submit((res) => {
this.textLoading = this.$t('Submitting')
this.loading = true
res.flag = 0
res.operatorTime = operatorTime
this.completeTask(res)
})
},
sendBack(operatorTime) {
this.textLoading = this.$t('Returning')
this.loading = true
if (this.queryBy.reviewResult == 'Non-Compliance' || this.queryBy.reviewResult == 'To be tracked') {
} else {
this.queryBy.reviewResult = 'No rating'
}
this.$refs.reviewedByThePersonInChargeRef.submitNoRule((res) => {
this.completeTask({ flag: 1, operatorTime: operatorTime, ...res })
})
},
Resubmit(operatorTime) {
this.$refs.reviewedByThePersonInChargeRef.submit((res) => {
this.textLoading = this.$t('Submitting')
this.loading = true
res.operatorTime = operatorTime
if (this.$route.query.TaskKey == 'dreDispose') {
this.dreSubmit(res)
}
})
},
submit(operatorTime) {
this.$refs.reviewedByThePersonInChargeRef.submit((res) => {
this.textLoading = this.$t('Submitting')
this.loading = true
res.operatorTime = operatorTime
if (this.$route.query.TaskKey == 'dreDispose') {
this.dreSubmit(res)
} else {
if (this.$route.query.TaskKey == 'zrrclrw') {
let dataSource = this.$refs.engineeringConfirmationRef.dataSource
let isTrue
if (dataSource && dataSource.length > 0) {
for (let i = 0; i < dataSource.length; i++) {
if (dataSource[i].status == 'haveDone' || dataSource[i].createUser) {
isTrue = true
} else {
isTrue = false
this.$message.warning(this.$t('pleaseSubmitStatus'))
this.loading = false
return
}
}
} else {
isTrue = true
}
if (isTrue) {
this.completeTask(res)
}
}
}
})
},
dreSubmit(val) {
let query = {
id: this.queryPersonInCharge.id,
engineerFeedbackContent: val.engineerFeedbackContent,
fileId: val.fileId,
flowType: this.$route.query.flowType,
actiProcInstId: this.$route.query.actiProcInstId,
deliveryRequirements: val.deliveryRequirements,
engineeringInterfacePersonReply: this.queryPersonInCharge.engineeringInterfacePersonReply
}
putAction(this.url.dreSubmit, query).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
if (this.$route.query.router) {
this.$router.push({
path: '/projectRegulationTasks'
})
} else {
this.$router.push({
path: '/ProjectDetails',
query: {
type: '103',
...this.$route.query
}
})
}
// setTimeout(() => {
// this.loading = false
// window.close()
// }, 1000)
} else {
this.loading = false
this.$message.warning(this.$t('operationFailed'))
}
})
},
confirm(operatorTime){
this.$refs.reviewedByThePersonInChargeRef.submit((res) => {
this.completeTask({operatorTime: operatorTime, ...res })
})
},
completeTask(value) {
let json = Object.assign(this.queryBy, value)
let data = JSON.stringify(json).replace(/\"/g, '\'')
Object.keys(value).forEach(res => {
if (value[res] && typeof value[res] == 'string') {
value[res] = value[res].replace(/\"/g, '“')
value[res] = value[res].replace(/\'/g, '')
}
})
let query = {
userid: this.userInfo().id,
taskId: this.queryData.taskId || this.queryData.taskIds,
json: data
}
postAction('/workFlow/completeTask', query).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.edit()
} else {
this.loading = false
this.$message.warning(res.message)
}
})
},
getList(row, title) {
this.queryData = row
this.loading = true
this.visible = true
this.title = title
let _this = this
this.standardContentList = [
{
title: this.$t('Sponsor'),
value: this.queryData.Sponsor
},
{
title: this.$t('personLiable'),
value: this.queryData.personLiable
},
{
title: this.$t('cutoffTime'),
value: this.queryData.DueDate
},
{
title: this.$t('typeOfDeliverables'),
value: this.queryData.typeOfDeliverables
},
{
title: this.$t('deliverableTemplate'),
value: this.queryData.deliverableTemplate,
type: 2
},
{},
{
title: this.$t('descriptionDeliverables'),
value: this.queryData.remarks
}
]
let query = {
actiProcInstId: row.actiProcInstId,
createBy: this.userInfo().username
}
this.loading = true
getAction(this.url.list, query).then((res) => {
if (res.success) {
this.queryPersonInCharge = res.result[0] || {}
if (row.taskIds) {
this.isDisplay = false
this.queryTaskDetailByTask(function() {
_this.queryProjectLawsInventoryInfo()
})
} else {
this.loading = true
this.isDisplay = false
this.queryBy.projectLibraryId = row.projectLibraryId
this.queryBy.id = row.projectTaskInventoryId
this.queryProjectLawsInventoryInfo()
}
} else {
this.dataSource = []
}
})
},
queryTaskDetailByTask(callback) {
this.loading = true
getAction(this.url.queryTaskDetailByTaskIds, { taskIds: this.queryData.taskIds }).then((res) => {
if (res instanceof String) {
this.queryBy = JSON.parse(res) || {}
callback()
} else {
this.queryBy = res || {}
callback()
}
})
},
queryProjectLawsInventoryInfo() {
let query = {
id: this.queryBy.id,
operatorType: 'taskAffirmQuery'
}
this.queryBy.approvalOpinion = ''
getAction(this.url.queryProjectLawsInventoryInfoById, query).then((res) => {
if (res.success) {
this.queryProject = res.result[0] || {}
this.loading = false
this.isDisplay = true
} else {
this.queryProject = {}
this.loading = false
this.isDisplay = true
}
})
}
}
}
</script>
<style scoped>
.drawer-bootom-button {
position: absolute;
bottom: 0;
z-index: 100;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>
@@ -0,0 +1,313 @@
<template>
<div class="box">
<div class="box-text">
<div class="header-text">
{{query.TaskKey == 'zrrqr' || query.TaskKey == 'dezrrqr' || query.TaskKey == 'zrrtjjfw' || $route.query.TaskKey
== 'dezrrtjjfw'
? $t('personLiableConfirm'):$t('fillInProjectDelivery')}}
</div>
</div>
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="Required" v-if="query.isDisplay">*</span>
<span class="title-text-text" :title="$t('resultofhandling')">{{$t('resultofhandling')}}</span>
</div>
<a-form-model-item class="itemModel" :prop="query.isDisplay?'':'disposeResult'">
<a-radio-group style="margin-top: 2px"
:disabled="!query.isDisplay?true:false"
@change="reviewResultChange"
class="box-input"
v-model="formInline.disposeResult">
<a-radio value="Accepted" v-if="query.TaskKey == 'zrrqr' || query.TaskKey == 'dezrrqr'">
{{$t('accept')}}
</a-radio>
<a-radio value="Rejected" v-if="query.TaskKey == 'zrrqr'">
{{$t('refuse')}}
</a-radio>
<a-radio value="Returned" v-if="query.TaskKey == 'dezrrqr'">
{{$t('sendBack')}}
</a-radio>
<a-radio value="To be tracked" v-if="query.TaskKey == 'zrrtjjfw' || query.TaskKey == 'dezrrtjjfw'">
{{$t('Tracked')}}
</a-radio>
<a-radio value="NA" v-if="query.TaskKey == 'zrrtjjfw' || query.TaskKey == 'dezrrtjjfw'">
{{$t('notInvolved')}}
</a-radio>
<a-radio value="Transfer" v-if="query.TaskKey == 'zrrtjjfw' || query.TaskKey == 'zrrqr'">
{{$t('turnToDo')}}
</a-radio>
</a-radio-group>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<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="!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="!query.isDisplay?true:false"
@uploadSuccess="uploadSuccess"/>
<SelectedBy ref="SelectedByRef" :title="$t('turnToDo')" @SelectedByForm="SelectedByForm"></SelectedBy>
</div>
</template>
<script>
import { getAction, postAction, putAction, deleteAction } from '@/api/manage'
import uploadFile from '@/components/uploadFile/file'
import SelectedBy from '@/components/SelectedBy/index'
export default {
name: 'reviewedByThePersonInCharge',
components: {
uploadFile,
SelectedBy
},
props: ['queryBy', 'queryPersonInCharge', 'query'],
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: {
disposeResult: [
{
required: true,
message: this.$t('reviewResults') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
approvalOpinion: [
{
required: true,
message: this.$t('feedbackMessage') + this.$t('cannotEmpty'),
trigger: 'blur'
},
{
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() {
console.log(this.query)
this.formInline.approvalOpinion = ''
this.formInline = { ...this.formInline }
// this.query.isDisplay = JSON.parse(this.query.isDisplay)
this.query.isDisplay = true
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)
}
})
},
reviewResultChange(value) {
if (value.target.value == 'Transfer') {
this.$refs.SelectedByRef.getPush()
} else {
this.$refs.SelectedByRef.visible = false
this.formInline.secondChargePersonUserId = ''
}
},
//转办接口
SelectedByForm(userIds) {
this.formInline.secondChargePersonUserId = userIds
this.$refs.SelectedByRef.visible = false
},
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: 18px;
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>