Files
laws_weilai/jero-web/src/views/projectManagement/components/listOfRegulationsView.vue
T

623 lines
26 KiB
Java

<template>
<div>
<a-drawer
:title="$t('view')"
:maskClosable="false"
:width="900"
placement="right"
:closable="true"
@close="handleCancel"
:visible="visible"
style="height: 100%;overflow: auto;padding-bottom: 53px;">
<a-spin :spinning="confirmLoading">
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('standard')">{{$t('standard')}}</span>
</div>
<div class="itemModel">
{{formInline.serialNumber ? formInline.serialNumber : '--'}}
</div>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('title')">{{$t('title')}}</span>
</div>
<div class="itemModel">
{{formInline.title ? formInline.title : '--'}}
</div>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('subtitle')">{{$t('subtitle')}}</span>
</div>
<div class="itemModel">
{{formInline.subtitle? formInline.subtitle : '--'}}
</div>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('applicableSupplement')">{{$t('applicableSupplement')}}</span>
</div>
<div class="itemModel">
{{formInline.applicableSupplement ? formInline.applicableSupplement : '--'}}
</div>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('certificationType')">{{$t('certificationType')}}</span>
</div>
<div class="itemModel">
{{formInline.attestationType_dictText ? formInline.attestationType_dictText : '--'}}
</div>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('certificationLevel')">{{$t('certificationLevel')}}</span>
</div>
<div class="itemModel">
{{formInline.attestationRank_dictText ? formInline.attestationRank_dictText : '--'}}
</div>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
</div>
<div class="itemModel">
{{formInline.dutyTerritory_dictText ? formInline.dutyTerritory_dictText : '--'}}
</div>
</div>
</a-col>
<a-col :span="12" v-if="formInline.roleCodeIndex == 0 || formInline.roleCodeIndex == 1">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('regulatoryEngineer')">{{$t('regulatoryEngineer')}}</span>
</div>
<div class="itemModel">
{{formInline.regulationOwnerName ? formInline.regulationOwnerName : '--'}}
</div>
</div>
</a-col>
</a-row>
<a-row :gutter="24" v-if="formInline.roleCodeIndex == 0 || formInline.roleCodeIndex == 1">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('certifiedEngineer')">{{$t('certifiedEngineer')}}</span>
</div>
<div class="itemModel">
{{formInline.homologationEngineerName ? formInline.homologationEngineerName : '--'}}
</div>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('engineeringInterfacePerson')">{{$t('engineeringInterfacePerson')}}</span>
</div>
<div class="itemModel">
{{formInline.engineeringInterfacePersonName ? formInline.engineeringInterfacePersonName : '--'}}
</div>
</div>
</a-col>
</a-row>
<div class="header-text">
&nbsp;{{$t('confirmationOfDesignConformity')}}
</div>
<a-row :gutter="24">
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text"-->
<!-- :title="$t('Sponsor')">{{$t('Sponsor')}}</span>-->
<!-- </div>-->
<!-- <div class="itemModel">-->
<!-- {{formInline.designInitiatorName ? formInline.designInitiatorName : '&#45;&#45;'}}-->
<!-- </div>-->
<!-- </div>-->
<!-- </a-col>-->
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('personLiable')">{{$t('personLiable')}}</span>
</div>
<div class="itemModel">
{{formInline.designDutyName ? formInline.designDutyName : '--'}}
</div>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('cutoffTime')">{{$t('cutoffTime')}}</span>
</div>
<div class="itemModel">
{{formInline.designDueDate ? formInline.designDueDate : '--'}}
</div>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('typeOfDeliverables')">{{$t('typeOfDeliverables')}}</span>
</div>
<div class="itemModel">
{{formInline.designDeliverableTypeName ? formInline.designDeliverableTypeName : '--'}}
</div>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('deliverableTemplate')">{{$t('deliverableTemplate')}}</span>
</div>
<div class="itemModel">
<span v-if="formInline.designDeliverableTemplate === 'null' || formInline.designDeliverableTemplate === '' ||
formInline.designDeliverableTemplate == null">
--
</span>
<a @click="clickButtonToUpload(formInline.designDeliverableTemplate)" v-else>
{{ $t('viewFile') }}
</a>
</div>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('descriptionDeliverables')">{{$t('descriptionDeliverables')}}</span>
</div>
<div class="itemModel" :prop="'designRemark'">
{{formInline.designRemark ? formInline.designRemark : '--'}}
</div>
</div>
</a-col>
</a-row>
<!-- <div class="header-text" v-if="formInline.roleCodeIndex == 0 ||-->
<!-- (formInline.roleCodeIndex == 4 && formInline.prehomoInitiatorId == formInline.homologationEngineerId &&-->
<!-- formInline.homologationEngineerId == userInfoQuery.id) ||-->
<!-- (formInline.roleCodeIndex == 4 && formInline.prehomoInitiatorId == formInline.regulationOwnerId &&-->
<!-- formInline.regulationOwnerId == userInfoQuery.id)">-->
<!-- &nbsp;{{$t('PrehomoConfirmation')}}-->
<!-- </div>-->
<!-- <a-row :gutter="24" v-if="formInline.roleCodeIndex == 0 ||-->
<!-- (formInline.roleCodeIndex == 4 && formInline.prehomoInitiatorId == formInline.homologationEngineerId &&-->
<!-- formInline.homologationEngineerId == userInfoQuery.id) ||-->
<!-- (formInline.roleCodeIndex == 4 && formInline.prehomoInitiatorId == formInline.regulationOwnerId &&-->
<!-- formInline.regulationOwnerId == userInfoQuery.id)">-->
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text"-->
<!-- :title="$t('Sponsor')">{{$t('Sponsor')}}</span>-->
<!-- </div>-->
<!-- <div class="itemModel">-->
<!-- {{formInline.prehomoInitiatorName ? formInline.prehomoInitiatorName : '&#45;&#45;'}}-->
<!-- </div>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text"-->
<!-- :title="$t('personLiable')">{{$t('personLiable')}}</span>-->
<!-- </div>-->
<!-- <div class="itemModel">-->
<!-- {{formInline.prehomoDutyName ? formInline.prehomoDutyName : '&#45;&#45;'}}-->
<!-- </div>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- </a-row>-->
<!-- <a-row :gutter="24" v-if="formInline.roleCodeIndex == 0 ||-->
<!-- (formInline.roleCodeIndex == 4 && formInline.prehomoInitiatorId == formInline.homologationEngineerId &&-->
<!-- formInline.homologationEngineerId == userInfoQuery.id) ||-->
<!-- (formInline.roleCodeIndex == 4 && formInline.prehomoInitiatorId == formInline.regulationOwnerId &&-->
<!-- formInline.regulationOwnerId == userInfoQuery.id)">-->
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text"-->
<!-- :title="$t('cutoffTime')">{{$t('cutoffTime')}}</span>-->
<!-- </div>-->
<!-- <div class="itemModel">-->
<!-- {{formInline.prehomoDueDate ? formInline.prehomoDueDate : '&#45;&#45;'}}-->
<!-- </div>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- </a-row>-->
<!-- <a-row :gutter="24" v-if="formInline.roleCodeIndex == 0 ||-->
<!-- (formInline.roleCodeIndex == 4 && formInline.prehomoInitiatorId == formInline.homologationEngineerId &&-->
<!-- formInline.homologationEngineerId == userInfoQuery.id) ||-->
<!-- (formInline.roleCodeIndex == 4 && formInline.prehomoInitiatorId == formInline.regulationOwnerId &&-->
<!-- formInline.regulationOwnerId == userInfoQuery.id)">-->
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text"-->
<!-- :title="$t('typeOfDeliverables')">{{$t('typeOfDeliverables')}}</span>-->
<!-- </div>-->
<!-- <div class="itemModel">-->
<!-- {{formInline.prehomoDeliverableTypeName ? formInline.prehomoDeliverableTypeName : '&#45;&#45;'}}-->
<!-- </div>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text"-->
<!-- :title="$t('deliverableTemplate')">{{$t('deliverableTemplate')}}</span>-->
<!-- </div>-->
<!-- <div class="itemModel">-->
<!-- <span v-if="formInline.prehomoDeliverableTemplate === 'null' || formInline.prehomoDeliverableTemplate === '' ||-->
<!-- formInline.prehomoDeliverableTemplate == null">-->
<!-- &#45;&#45;-->
<!-- </span>-->
<!-- <a @click="clickButtonToUpload(formInline.prehomoDeliverableTemplate)" v-else>-->
<!-- {{ $t('viewFile') }}-->
<!-- </a>-->
<!-- </div>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- </a-row>-->
<!-- <a-row :gutter="24" v-if="formInline.roleCodeIndex == 0 ||-->
<!-- (formInline.roleCodeIndex == 4 && formInline.prehomoInitiatorId == formInline.homologationEngineerId &&-->
<!-- formInline.homologationEngineerId == userInfoQuery.id) ||-->
<!-- (formInline.roleCodeIndex == 4 && formInline.prehomoInitiatorId == formInline.regulationOwnerId &&-->
<!-- formInline.regulationOwnerId == userInfoQuery.id)">-->
<!-- <a-col :span="24">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text"-->
<!-- :title="$t('descriptionDeliverables')">{{$t('descriptionDeliverables')}}</span>-->
<!-- </div>-->
<!-- <div class="itemModel">-->
<!-- {{formInline.prehomoRemark ? formInline.prehomoRemark : '&#45;&#45;'}}-->
<!-- </div>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- </a-row>-->
<div class="header-text">
&nbsp;{{$t('verificationAndConformityconfirmation')}}
</div>
<a-row :gutter="24">
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text"-->
<!-- :title="$t('Sponsor')">{{$t('Sponsor')}}</span>-->
<!-- </div>-->
<!-- <div class="itemModel">-->
<!-- {{formInline.verifyInitiatorName ? formInline.verifyInitiatorName : '&#45;&#45;'}}-->
<!-- </div>-->
<!-- </div>-->
<!-- </a-col>-->
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('personLiable')">{{$t('personLiable')}}</span>
</div>
<div class="itemModel">
{{formInline.verifyDutyName ? formInline.verifyDutyName : '--'}}
</div>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('cutoffTime')">{{$t('cutoffTime')}}</span>
</div>
<div class="itemModel">
{{formInline.verifyDueDate ? formInline.verifyDueDate : '--'}}
</div>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('typeOfDeliverables')">{{$t('typeOfDeliverables')}}</span>
</div>
<div class="itemModel">
{{formInline.verifyDeliverableTypeName ? formInline.verifyDeliverableTypeName : '--'}}
</div>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('deliverableTemplate')">{{$t('deliverableTemplate')}}</span>
</div>
<div class="itemModel">
<span v-if="formInline.verifyDeliverableTemplate === 'null' || formInline.verifyDeliverableTemplate === '' ||
formInline.verifyDeliverableTemplate == null">
--
</span>
<a @click="clickButtonToUpload(formInline.verifyDeliverableTemplate)" v-else>
{{ $t('viewFile') }}</a>
</div>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('descriptionDeliverables')">{{$t('descriptionDeliverables')}}</span>
</div>
<div class="itemModel">
{{formInline.verifyRemark ? formInline.verifyRemark : '--'}}
</div>
</div>
</a-col>
</a-row>
<div class="header-text" v-if="rejectCauseList && rejectCauseList.length > 0">
{{$t('listConfirmationRejectionReason')}}
</div>
<div v-if="rejectCauseList && rejectCauseList.length > 0"
v-for="(item,index) in rejectCauseList">
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('rejectedBy')">{{$t('rejectedBy')}}</span>
</div>
<div class="itemModel">
{{item.createBy ? item.createBy : '--'}}
</div>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('rejectionTime')">{{$t('rejectionTime')}}</span>
</div>
<div class="itemModel">
{{item.rejectTime ? item.rejectTime : '--'}}
</div>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('rejectReason')">{{$t('rejectReason')}}</span>
</div>
<div class="itemModel">
{{item.rejectCause ? item.rejectCause : '--'}}
</div>
</div>
</a-col>
</a-row>
</div>
<div class="header-text" v-if="rejectCauseListOne && rejectCauseListOne.length > 0">
{{$t('taskConfirmationRejectionReason')}}
</div>
<div v-if="rejectCauseListOne && rejectCauseListOne.length > 0"
v-for="(item,index) in rejectCauseListOne">
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('rejectedBy')">{{$t('rejectedBy')}}</span>
</div>
<div class="itemModel">
{{item.createBy ? item.createBy : '--'}}
</div>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('rejectionTime')">{{$t('rejectionTime')}}</span>
</div>
<div class="itemModel">
{{item.rejectTime ? item.rejectTime : '--'}}
</div>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('rejectReason')">{{$t('rejectReason')}}</span>
</div>
<div class="itemModel">
{{item.rejectCause ? item.rejectCause : '--'}}
</div>
</div>
</a-col>
</a-row>
</div>
</a-form-model>
</a-spin>
<div class="drawer-bootom-button">
<a-button style="margin-right: .8rem" @click="handleCancel">{{$t('cancel')}}</a-button>
</div>
</a-drawer>
<viewFileModel ref="viewFileModelRef"/>
</div>
</template>
<script>
import viewFileModel from '@/components/viewFileModel/index'
import { getAction, postAction, putAction } from '@/api/manage'
import { mapGetters } from 'vuex'
export default {
name: 'listOfRegulationsView',
components: {
viewFileModel
},
props: ['url'],
data() {
return {
visible: false,
confirmLoading: false,
rules: {},
rulesData: {},
formInline: {},
disabled: false,
userInfoQuery: {},
rejectCauseList: [],
rejectCauseListOne: []
}
},
mounted() {
this.userInfoQuery = this.userInfo()
},
methods: {
...mapGetters(['userInfo']),
editModel(item) {
this.visible = true
this.formInline = item
this.getRejectCause(item.id)
this.formInline = { ...this.formInline }
},
getRejectCause(id) {
let query = {
projectLawsInventoryId: id
}
getAction('/project/projectLawsInventoryRejectCauseEO/list', query).then((res) => {
if (res.success) {
this.rejectCauseList = []
this.rejectCauseListOne = []
if (res.result && res.result.length > 0) {
res.result.forEach(val => {
if (val.rejectType == '0') {
this.rejectCauseList.push(val)
} else if (val.rejectType == '1') {
this.rejectCauseListOne.push(val)
}
})
}
} else {
this.rejectCauseList = []
this.rejectCauseListOne = []
}
})
},
handleCancel() {
this.visible = false
},
clickButtonToUpload(item) {
this.$refs.viewFileModelRef.clickButtonToUpload(item)
}
}
}
</script>
<style scoped>
.box-title-text {
line-height: 1.4;
display: flex;
margin-bottom: 20px;
/*align-items: center;*/
}
.title-text {
width: 114px;
text-align: right;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
line-height: 24px;
}
.itemModel {
width: calc(100% - 130px);
display: inline-block;
font-size: 16px;
word-break: break-all;
color: #040B29;
}
.title-text-text {
margin-top: 9px;
}
.header-text {
font-size: 16px;
font-weight: bold;
margin-left: 15px;
/*border-bottom: 1px #d9d9d9 dashed;*/
height: 30px;
margin-bottom: 30px;
}
.formAdd {
margin-bottom: 40px;
}
.button-text {
height: 38px;
width: calc(100% - 100px);
line-height: 38px;
background: #fff;
border: 1px #00B3BE solid;
color: #00B3BE;
}
.drawer-bootom-button {
position: absolute;
bottom: 0;
width: 100%;
z-index: 100;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>