修改法规清单

This commit is contained in:
范强强
2023-03-20 14:06:02 +08:00
parent 2d461c1ac3
commit f602034628
2 changed files with 68 additions and 86 deletions
@@ -31,7 +31,6 @@
</div> </div>
<a-form-model-item class="itemModel" prop="title"> <a-form-model-item class="itemModel" prop="title">
<a-input class="box-input" <a-input class="box-input"
:disabled="formInline.roleCodeIndex == 0 ? false : true"
v-model="formInline.title" v-model="formInline.title"
:placeholder="$t('PleaseEnter')+$t('title')"/> :placeholder="$t('PleaseEnter')+$t('title')"/>
</a-form-model-item> </a-form-model-item>
@@ -46,7 +45,6 @@
</div> </div>
<a-form-model-item class="itemModel" prop="subtitle"> <a-form-model-item class="itemModel" prop="subtitle">
<a-input class="box-input" <a-input class="box-input"
:disabled="formInline.roleCodeIndex == 0 ? false : true"
v-model="formInline.subtitle" v-model="formInline.subtitle"
:placeholder="$t('PleaseEnter')+$t('subtitle')"/> :placeholder="$t('PleaseEnter')+$t('subtitle')"/>
</a-form-model-item> </a-form-model-item>
@@ -60,7 +58,6 @@
</div> </div>
<a-form-model-item class="itemModel" prop="applicableSupplement"> <a-form-model-item class="itemModel" prop="applicableSupplement">
<a-input class="box-input" <a-input class="box-input"
:disabled="formInline.roleCodeIndex == 0 ? false : true"
v-model="formInline.applicableSupplement" v-model="formInline.applicableSupplement"
:placeholder="$t('PleaseEnter')+$t('applicableSupplement')"/> :placeholder="$t('PleaseEnter')+$t('applicableSupplement')"/>
</a-form-model-item> </a-form-model-item>
@@ -158,8 +155,6 @@
</div> </div>
<a-form-model-item class="itemModel-multi" prop="attestationType"> <a-form-model-item class="itemModel-multi" prop="attestationType">
<j-multi-select-tag class="box-input" v-model="formInline.attestationType" <j-multi-select-tag class="box-input" v-model="formInline.attestationType"
:disabled="formInline.roleCodeIndex == 0 ||
(formInline.roleCodeIndex == 4 && formInline.homologationEngineerId == userInfoQuery.id) ? false : true"
:placeholder="$t('PleaseSelect')+$t('certificationType')" :placeholder="$t('PleaseSelect')+$t('certificationType')"
:type="'select'" :type="'select'"
:triggerChange="false" :dictCode="'attestation_type'"/> :triggerChange="false" :dictCode="'attestation_type'"/>
@@ -169,14 +164,12 @@
<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" v-if="formInline.roleCodeIndex == 0">*</span> <span class="Required">*</span>
<span class="title-text-text" <span class="title-text-text"
:title="$t('certificationLevel')">{{$t('certificationLevel')}}</span> :title="$t('certificationLevel')">{{$t('certificationLevel')}}</span>
</div> </div>
<a-form-model-item class="itemModel-multi" prop="attestationRank"> <a-form-model-item class="itemModel-multi" prop="attestationRank">
<j-multi-select-tag class="box-input" v-model="formInline.attestationRank" <j-multi-select-tag class="box-input" v-model="formInline.attestationRank"
:disabled="formInline.roleCodeIndex == 0 ||
(formInline.roleCodeIndex == 4 && formInline.homologationEngineerId == userInfoQuery.id) ? false : true"
:placeholder="$t('PleaseSelect')+$t('certificationLevel')" :placeholder="$t('PleaseSelect')+$t('certificationLevel')"
:type="'select'" :type="'select'"
:triggerChange="false" :dictCode="'attestation_rank'"/> :triggerChange="false" :dictCode="'attestation_rank'"/>
@@ -202,7 +195,7 @@
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
<a-col :span="12" v-if="formInline.roleCodeIndex == 0"> <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" v-if="formInline.roleCodeIndex == 0">*</span> <span class="Required" v-if="formInline.roleCodeIndex == 0">*</span>
@@ -211,9 +204,9 @@
<a-form-model-item class="itemModel" :prop="'regulationOwnerId'"> <a-form-model-item class="itemModel" :prop="'regulationOwnerId'">
<a-select :placeholder="$t('PleaseSelect')+$t('regulatoryEngineer')" <a-select :placeholder="$t('PleaseSelect')+$t('regulatoryEngineer')"
class="box-input" class="box-input"
:disabled="formInline.roleCodeIndex == 0 ? false : true"
:getPopupContainer="triggerNode=> triggerNode.parentNode" :getPopupContainer="triggerNode=> triggerNode.parentNode"
allowClear allowClear
:disabled="formInline.roleCodeIndex == 0 ? false : true"
v-model="formInline.regulationOwnerId"> v-model="formInline.regulationOwnerId">
<a-select-option v-for="(item, key) in regulatoryEngineerList" <a-select-option v-for="(item, key) in regulatoryEngineerList"
:key="key" :key="key"
@@ -227,7 +220,7 @@
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
<a-row :gutter="24" v-if="formInline.roleCodeIndex == 0"> <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">-->
@@ -255,7 +248,7 @@
<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" v-if="formInline.roleCodeIndex == 0">*</span> <span class="Required">*</span>
<span class="title-text-text" :title="$t('engineeringInterfacePerson')">{{$t('engineeringInterfacePerson')}}</span> <span class="title-text-text" :title="$t('engineeringInterfacePerson')">{{$t('engineeringInterfacePerson')}}</span>
</div> </div>
<a-form-model-item class="itemModel" :prop="'engineeringInterfacePerson'"> <a-form-model-item class="itemModel" :prop="'engineeringInterfacePerson'">
@@ -263,7 +256,6 @@
class="box-input" class="box-input"
allowClear allowClear
:getPopupContainer="triggerNode=> triggerNode.parentNode" :getPopupContainer="triggerNode=> triggerNode.parentNode"
:disabled="formInline.roleCodeIndex == 0 ? false : true"
v-model="formInline.engineeringInterfacePerson"> v-model="formInline.engineeringInterfacePerson">
<a-select-option v-for="(item, key) in engineeringInterfacePersonList" <a-select-option v-for="(item, key) in engineeringInterfacePersonList"
:key="key" :key="key"
@@ -312,18 +304,10 @@
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
<div class="header-text" v-if="formInline.roleCodeIndex == 0 || <div class="header-text">
(formInline.roleCodeIndex == 4 && formInline.designInitiatorId == formInline.homologationEngineerId &&
formInline.homologationEngineerId == userInfoQuery.id) ||
(formInline.roleCodeIndex == 4 && formInline.designInitiatorId == formInline.regulationOwnerId &&
formInline.regulationOwnerId == userInfoQuery.id)">
&nbsp;{{$t('confirmationOfDesignConformity')}} &nbsp;{{$t('confirmationOfDesignConformity')}}
</div> </div>
<a-row :gutter="24" v-if="formInline.roleCodeIndex == 0 || <a-row :gutter="24">
(formInline.roleCodeIndex == 4 && formInline.designInitiatorId == formInline.homologationEngineerId &&
formInline.homologationEngineerId == userInfoQuery.id) ||
(formInline.roleCodeIndex == 4 && formInline.designInitiatorId == formInline.regulationOwnerId &&
formInline.regulationOwnerId == userInfoQuery.id)">
<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">
@@ -424,11 +408,7 @@
<!-- </div>--> <!-- </div>-->
<!-- </a-col>--> <!-- </a-col>-->
<!-- </a-row>--> <!-- </a-row>-->
<a-row :gutter="24" v-if="formInline.roleCodeIndex == 0 || <a-row :gutter="24">
(formInline.roleCodeIndex == 4 && formInline.designInitiatorId == formInline.homologationEngineerId &&
formInline.homologationEngineerId == userInfoQuery.id) ||
(formInline.roleCodeIndex == 4 && formInline.designInitiatorId == formInline.regulationOwnerId &&
formInline.regulationOwnerId == userInfoQuery.id)">
<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">
@@ -472,11 +452,7 @@
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
<a-row :gutter="24" v-if="formInline.roleCodeIndex == 0 || <a-row :gutter="24">
(formInline.roleCodeIndex == 4 && formInline.designInitiatorId == formInline.homologationEngineerId &&
formInline.homologationEngineerId == userInfoQuery.id) ||
(formInline.roleCodeIndex == 4 && formInline.designInitiatorId == formInline.regulationOwnerId &&
formInline.regulationOwnerId == userInfoQuery.id)">
<a-col :span="24"> <a-col :span="24">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
@@ -657,18 +633,10 @@
<!-- </div>--> <!-- </div>-->
<!-- </a-col>--> <!-- </a-col>-->
<!-- </a-row>--> <!-- </a-row>-->
<div class="header-text" v-if="formInline.roleCodeIndex == 0 || <div class="header-text">
(formInline.roleCodeIndex == 4 && formInline.verifyInitiatorId == formInline.homologationEngineerId &&
formInline.homologationEngineerId == userInfoQuery.id) ||
(formInline.roleCodeIndex == 4 && formInline.verifyInitiatorId == formInline.regulationOwnerId &&
formInline.regulationOwnerId == userInfoQuery.id)">
&nbsp;{{$t('verificationAndConformityconfirmation')}} &nbsp;{{$t('verificationAndConformityconfirmation')}}
</div> </div>
<a-row :gutter="24" v-if="formInline.roleCodeIndex == 0 || <a-row :gutter="24">
(formInline.roleCodeIndex == 4 && formInline.verifyInitiatorId == formInline.homologationEngineerId &&
formInline.homologationEngineerId == userInfoQuery.id) ||
(formInline.roleCodeIndex == 4 && formInline.verifyInitiatorId == formInline.regulationOwnerId &&
formInline.regulationOwnerId == userInfoQuery.id)">
<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">
@@ -753,11 +721,7 @@
<!-- formInline.regulationOwnerId == userInfoQuery.id)">--> <!-- formInline.regulationOwnerId == userInfoQuery.id)">-->
<!-- --> <!-- -->
<!-- </a-row>--> <!-- </a-row>-->
<a-row :gutter="24" v-if="formInline.roleCodeIndex == 0 || <a-row :gutter="24">
(formInline.roleCodeIndex == 4 && formInline.verifyInitiatorId == formInline.homologationEngineerId &&
formInline.homologationEngineerId == userInfoQuery.id) ||
(formInline.roleCodeIndex == 4 && formInline.verifyInitiatorId == formInline.regulationOwnerId &&
formInline.regulationOwnerId == userInfoQuery.id)">
<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">
@@ -802,11 +766,7 @@
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
<a-row :gutter="24" v-if="formInline.roleCodeIndex == 0 || <a-row :gutter="24">
(formInline.roleCodeIndex == 4 && formInline.verifyInitiatorId == formInline.homologationEngineerId &&
formInline.homologationEngineerId == userInfoQuery.id) ||
(formInline.roleCodeIndex == 4 && formInline.verifyInitiatorId == formInline.regulationOwnerId &&
formInline.regulationOwnerId == userInfoQuery.id)">
<a-col :span="24"> <a-col :span="24">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
@@ -264,11 +264,7 @@
> >
<span slot="operation" slot-scope="text,record"> <span slot="operation" slot-scope="text,record">
<a class="text-operation" <a class="text-operation"
v-if="(record.inventoryAffirmStatus == 'List to confirm' && v-if="roleSwitchingCode == 0 || roleSwitchingCode == 1"
((record.roleCode == 1 && !record.regulationOwnerSubmitStatus) ||
(record.roleCode == 2 && !record.homologationEngineerSubmitStatus) ||
(record.roleCode == 4 && !record.regulationOwnerSubmitStatus && !record.homologationEngineerSubmitStatus)))
|| (record.roleCode == 0 && record.taskAffirmStatus != 'List to confirm')"
@click="edit(record)"> @click="edit(record)">
{{ $t('edit') }} {{ $t('edit') }}
</a> </a>
@@ -459,6 +455,7 @@
</a-form-model> </a-form-model>
</a-modal> </a-modal>
<JLoading :loading="JLoading">{{ $t('dataLoading') }}</JLoading> <JLoading :loading="JLoading">{{ $t('dataLoading') }}</JLoading>
<JLoading :loading="JTextLoading">{{ $t('Submitting') }}</JLoading>
<resultReportedUpload @resultReportedUploadForm="addModelList" ref="resultReportedUploadRef"/> <resultReportedUpload @resultReportedUploadForm="addModelList" ref="resultReportedUploadRef"/>
<listOfRegulationsView ref="listOfRegulationsViewRef"/> <listOfRegulationsView ref="listOfRegulationsViewRef"/>
<batchSettingPersonnel :url="url" ref="batchSettingPersonnelRef" @batchSettingPersonnelForm="addModelList"/> <batchSettingPersonnel :url="url" ref="batchSettingPersonnelRef" @batchSettingPersonnelForm="addModelList"/>
@@ -1179,7 +1176,10 @@
selectedRowKeysList: [], selectedRowKeysList: [],
rowKeysWarningList: [], rowKeysWarningList: [],
rolecode: false, rolecode: false,
dataWarningList: [] dataWarningList: [],
completeTaskList: [],
requestsNum: 0,
JTextLoading: false
} }
}, },
@@ -2082,7 +2082,7 @@
}) })
}, },
startProcess(value,type) { startProcess(value, type,index) {
let query = { let query = {
type: type, type: type,
projectLawsInvnetoryList: value, projectLawsInvnetoryList: value,
@@ -2092,11 +2092,20 @@
} }
postAction('/workFlow/startProcess', query).then((res) => { postAction('/workFlow/startProcess', query).then((res) => {
if (res.success) { if (res.success) {
// this.visible = false this.completeTaskList.push(this.completeTask(value, res.result,index))
// this.selectedRowKeys = [] Promise.all(this.completeTaskList).then((res) => {
// this.$message.success(this.$t('OperationSuccessful')) if (this.requestsNum == res.length) {
// this.confirmLoading = false this.visible = false
this.completeTask(value, res.result) this.selectedRowKeys = []
this.$message.success(this.$t('OperationSuccessful'))
this.confirmLoading = false
this.JTextLoading = false
this.getList()
}
}).catch((error) => {
this.JTextLoading = false
this.$message.warning(error.message)
})
} else { } else {
this.$message.warning(this.$t('operationFailed')) this.$message.warning(this.$t('operationFailed'))
} }
@@ -2119,14 +2128,9 @@
} }
postAction('/workFlow/completeTask', query).then((res) => { postAction('/workFlow/completeTask', query).then((res) => {
if (res.success) { if (res.success) {
// this.visible = false
// this.selectedRowKeys = []
// this.$message.success(this.$t('OperationSuccessful'))
// this.confirmLoading = false
// this.getList()
resolve(res) resolve(res)
} else { } else {
this.$message.warning(this.$t('operationFailed')) reject(res)
} }
}) })
}) })
@@ -2180,6 +2184,7 @@
let designList = [] let designList = []
let verifyList = [] let verifyList = []
let detailedWarningList = [] let detailedWarningList = []
this.completeTaskList = []
this.detailedWarningList = this.dataWarningList || [] this.detailedWarningList = this.dataWarningList || []
let _this = this let _this = this
_this.$destroyAll() _this.$destroyAll()
@@ -2225,15 +2230,21 @@
}) })
return return
} }
this.$confirm({ if (num == 1) {
content: _this.$t('confirmLaunchTask'), this.$confirm({
onOk() { content: _this.$t('confirmLaunchTask'),
_this.submitAdmin(dataList) onOk() {
} _this.submitAdmin(dataList)
}) }
})
} else {
_this.submitAdmin(dataList)
}
}, },
submitAdmin(dataList) { submitAdmin(dataList) {
let _this = this let _this = this
this.requestsNum = 0
this.JTextLoading = true
for (let i = 0; i < dataList.length; i++) { for (let i = 0; i < dataList.length; i++) {
if (dataList[i].designDeliverableType) { if (dataList[i].designDeliverableType) {
if (!dataList[i].designDutyId) { if (!dataList[i].designDutyId) {
@@ -2255,18 +2266,29 @@
< div > { dataList[i].serialNumber + _this.$t('thePersonResponsibleForVerifyingEmpty') } < /div>) < div > { dataList[i].serialNumber + _this.$t('thePersonResponsibleForVerifyingEmpty') } < /div>)
} }
} }
if (dataList[i].designDeliverableType && dataList[i].designDutyId && dataList[i].designDueDate) { if (dataList[i].designFlowStatus == 'List to be checked') {
_this.startProcess(dataList[i], 2) if (dataList[i].designDeliverableType && dataList[i].designDutyId && dataList[i].designDueDate) {
Promise.all(_this.completeTask()).then((res) => { this.requestsNum++
console.log(res) _this.startProcess(dataList[i], 2,this.requestsNum)
}).catch(error => { }
console.log('error', error) } else {
}) _this.detailedWarningList.push(
< div > { dataList[i].serialNumber + _this.$t('pleaseSelectTheDataverificationVerified') } < /div>)
} }
if (dataList[i].verifyDeliverableType && dataList[i].verifyDutyId && dataList[i].verifyDueDate) { if (dataList[i].verifyFlowStatus == 'List to be checked') {
_this.startProcess(dataList[i], 2) if (dataList[i].verifyDeliverableType && dataList[i].verifyDutyId && dataList[i].verifyDueDate) {
this.requestsNum++
_this.startProcess(dataList[i], 2,this.requestsNum)
}
} else {
_this.detailedWarningList.push(
< div > { dataList[i].serialNumber + _this.$t('pleaseSelectTheDataverificationVerified') } < /div>)
} }
} }
if (this.requestsNum == 0) {
_this.promptInformation(_this.detailedWarningList)
this.JTextLoading = false
}
}, },
handleOkComment() { handleOkComment() {
this.$refs.ruleFormComment.validate(valid => { this.$refs.ruleFormComment.validate(valid => {