Merge remote-tracking branch 'origin/master'

This commit is contained in:
zhn
2022-04-18 18:06:00 +08:00
4 changed files with 178 additions and 25 deletions
+5
View File
@@ -667,4 +667,9 @@ module.exports = {
dataConfirmation:'Please select the data whose list confirmation status is not initiated or rejected, and the regulatory engineer and certification engineer are not empty',
pleaseSelectPersonFirst:'Please select a person first',
onlyOnePersonCanBeSelected:'Only one person can be selected',
overrule:'overrule',
confirmSubmit:'confirm Submit',
confirmOverrule:'confirm Overrule',
The:'The',
submitted:'Data has been submitted and cannot be submitted again',
}
+5
View File
@@ -671,4 +671,9 @@ module.exports = {
dataConfirmation:'请选择清单确认状态为未发起或拒绝的数据,以及法规工程师认证工程师不为空',
pleaseSelectPersonFirst:'请先选择人员',
onlyOnePersonCanBeSelected:'只能选择一个人员',
overrule:'驳回',
confirmSubmit:'确认提交',
confirmOverrule:'确认驳回',
The:'第',
submitted:'条数据已提交不能重复提交',
}
@@ -46,7 +46,7 @@
</div>
<a-form-model-item class="itemModel" prop="subtitle">
<a-input class="box-input"
:disabled="false"
:disabled="formInline.roleCode == 0 || formInline.roleCode == 1 ? false : true"
v-model="formInline.subtitle"
:placeholder="$t('PleaseEnter')+$t('subtitle')"/>
</a-form-model-item>
@@ -89,7 +89,7 @@
</div>
<a-form-model-item class="itemModel" prop="implementType">
<j-dict-select-tag class="box-input" v-model="formInline.implementType"
:disabled="disabled"
:disabled="formInline.roleCode == 0 || formInline.roleCode == 1 ? false : true"
@input="handleInput('implementType')"
:placeholder="$t('PleaseSelect')+$t('implementationCategory')"
:type="'select'"
@@ -111,7 +111,7 @@
@change="dateChange({db_field_name:'implementTime'})"
format="YYYY-MM-DD"
v-model="formInline.implementTime"
:disabled="true"
:disabled="formInline.roleCode == 0 || formInline.roleCode == 1 ? false : true"
style="width: 100%"/>
</a-form-model-item>
</div>
@@ -127,7 +127,7 @@
@change="dateChange({db_field_name:'xin1Che1Xing2Shi2Shi1Ri4Qi1'})"
format="YYYY-MM-DD"
v-model="formInline.xin1Che1Xing2Shi2Shi1Ri4Qi1"
:disabled="true"
:disabled="formInline.roleCode == 0 || formInline.roleCode == 1 ? false : true"
style="width: 100%"/>
</a-form-model-item>
</div>
@@ -142,7 +142,7 @@
</div>
<a-form-model-item class="itemModel" prop="attestationType">
<j-dict-select-tag class="box-input" v-model="formInline.attestationType"
:disabled="disabled"
:disabled="formInline.roleCode == 0 || formInline.roleCode == 2 ? false : true"
@input="handleInput('attestationType')"
:placeholder="$t('PleaseSelect')+$t('certificationType')"
:type="'select'"
@@ -153,12 +153,13 @@
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required" v-if="formInline.roleCode == 0">*</span>
<span class="title-text-text"
:title="$t('certificationLevel')">{{$t('certificationLevel')}}</span>
</div>
<a-form-model-item class="itemModel" prop="attestationRank">
<j-dict-select-tag class="box-input" v-model="formInline.attestationRank"
:disabled="disabled"
:disabled="formInline.roleCode == 0 || formInline.roleCode == 2 ? false : true"
@input="handleInput('attestationRank')"
:placeholder="$t('PleaseSelect')+$t('certificationLevel')"
:type="'select'"
@@ -171,12 +172,13 @@
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required" v-if="formInline.roleCode == 0">*</span>
<span class="title-text-text"
:title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
</div>
<a-form-model-item class="itemModel" prop="areaOfResponsibility">
<j-multi-select-tag class="box-input" v-model="formInline.dutyTerritory"
:disabled="disabled"
:disabled="formInline.roleCode == 0 ? false : true"
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
:type="'select'"
:triggerChange="false" :dictCode="'duty_territory'"/>
@@ -186,11 +188,12 @@
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required" v-if="formInline.roleCode == 0">*</span>
<span class="title-text-text" :title="$t('regulatoryEngineer')">{{$t('regulatoryEngineer')}}</span>
</div>
<a-form-model-item class="itemModel" :prop="'regulationOwnerId'">
<a-select :placeholder="$t('PleaseSelect')+$t('regulatoryEngineer')"
:disabled="formInline.roleCode == 0 ? false : true"
v-model="formInline.regulationOwnerId">
<a-select-option v-for="(item, key) in regulatoryEngineerList"
:key="key"
@@ -208,10 +211,12 @@
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required" v-if="formInline.roleCode == 0">*</span>
<span class="title-text-text" :title="$t('certifiedEngineer')">{{$t('certifiedEngineer')}}</span>
</div>
<a-form-model-item class="itemModel" :prop="'homologationEngineerId'">
<a-select :placeholder="$t('PleaseSelect')+$t('certifiedEngineer')"
:disabled="formInline.roleCode == 0 ? false : true"
v-model="formInline.homologationEngineerId">
<a-select-option v-for="(item, key) in regulatoryEngineerList"
:key="key"
@@ -227,10 +232,12 @@
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required" v-if="formInline.roleCode == 0">*</span>
<span class="title-text-text" :title="$t('engineeringInterfacePerson')">{{$t('engineeringInterfacePerson')}}</span>
</div>
<a-form-model-item class="itemModel" :prop="'engineeringInterfacePerson'">
<a-select :placeholder="$t('PleaseSelect')+$t('engineeringInterfacePerson')"
:disabled="formInline.roleCode == 0 ? false : true"
v-model="formInline.engineeringInterfacePerson">
<a-select-option v-for="(item, key) in regulatoryEngineerList"
:key="key"
@@ -253,7 +260,7 @@
<a-form-model-item class="itemModel" :prop="'remarks'">
<a-textarea
:placeholder="$t('PleaseEnter')+$t('remarks')"
:disabled="disabled"
:disabled="false"
v-model="formInline.remark" :rows="4"/>
</a-form-model-item>
</div>
@@ -305,7 +312,7 @@
</div>
<a-form-model-item class="itemModel" prop="designInitiator">
<j-dict-select-tag class="box-input" v-model="formInline.designInitiator"
:disabled="disabled"
:disabled="formInline.roleCode == 0 ? false : true"
@input="handleInput('designInitiator')"
:placeholder="$t('PleaseSelect')+$t('Sponsor')"
:type="'select'"
@@ -321,7 +328,7 @@
</div>
<a-form-model-item class="itemModel" prop="designDuty">
<j-dict-select-tag class="box-input" v-model="formInline.designDuty"
:disabled="disabled"
:disabled="formInline.roleCode == 0 ? false : true"
@input="handleInput('designDuty')"
:placeholder="$t('PleaseSelect')+$t('personLiable')"
:type="'select'"
@@ -343,7 +350,7 @@
@change="dateChange({db_field_name:'designDueDate'})"
format="YYYY-MM-DD"
v-model="formInline.designDueDate"
:disabled="disabled"
:disabled="false"
style="width: 100%"/>
</a-form-model-item>
</div>
@@ -396,7 +403,7 @@
</div>
<a-form-model-item class="itemModel" prop="prehomoInitiator">
<j-dict-select-tag class="box-input" v-model="formInline.prehomoInitiator"
:disabled="disabled"
:disabled="formInline.roleCode == 0 ? false : true"
@input="handleInput('prehomoInitiator')"
:placeholder="$t('PleaseSelect')+$t('Sponsor')"
:type="'select'"
@@ -412,7 +419,7 @@
</div>
<a-form-model-item class="itemModel" prop="prehomoDuty">
<j-dict-select-tag class="box-input" v-model="formInline.prehomoDuty"
:disabled="disabled"
:disabled="formInline.roleCode == 0 ? false : true"
@input="handleInput('prehomoDuty')"
:placeholder="$t('PleaseSelect')+$t('personLiable')"
:type="'select'"
@@ -486,7 +493,7 @@
</div>
<a-form-model-item class="itemModel" prop="verifyInitiator">
<j-dict-select-tag class="box-input" v-model="formInline.verifyInitiator"
:disabled="disabled"
:disabled="formInline.roleCode == 0 ? false : true"
@input="handleInput('verifyInitiator')"
:placeholder="$t('PleaseSelect')+$t('Sponsor')"
:type="'select'"
@@ -502,7 +509,7 @@
</div>
<a-form-model-item class="itemModel" prop="verifyDuty">
<j-dict-select-tag class="box-input" v-model="formInline.verifyDuty"
:disabled="disabled"
:disabled="formInline.roleCode == 0 ? false : true"
@input="handleInput('verifyDuty')"
:placeholder="$t('PleaseSelect')+$t('personLiable')"
:type="'select'"
@@ -524,7 +531,7 @@
@change="dateChange({db_field_name:'verifyDueDate'})"
format="YYYY-MM-DD"
v-model="formInline.verifyDueDate"
:disabled="disabled"
:disabled="false"
style="width: 100%"/>
</a-form-model-item>
</div>
@@ -571,8 +578,78 @@
editModel(item) {
this.visible = true
this.$nextTick(() => {
this.rules = {}
this.formInline = item
switch (item.roleCode) {
case 0:
this.studioLogic()
break
case 1:
this.statuteLogic()
break
case 2:
this.authenticationLogic()
break
case 3:
this.engineeringLogic()
break
case 4:
this.authenticationOrengineerLogic()
break
}
})
},
studioLogic() {
this.rules = {
attestationRank: [
{
required: true,
message: this.$t('certificationLevel') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
homologationEngineerId: [
{
required: true,
message: this.$t('certifiedEngineer') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
regulationOwnerId: [
{
required: true,
message: this.$t('regulatoryEngineer') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
engineeringInterfacePerson: [
{
required: true,
message: this.$t('engineeringInterfacePerson') + this.$t('cannotEmpty'),
trigger: 'change'
}
]
}
},
statuteLogic() {
},
authenticationLogic() {
this.rules = {
attestationRank: [
{
required: true,
message: this.$t('certificationLevel') + this.$t('cannotEmpty'),
trigger: 'change'
}
]
}
},
engineeringLogic() {
},
authenticationOrengineerLogic() {
},
clickButtonToUpload(item) {
this.$refs.uploadFile.perentHandleFunc()
@@ -685,6 +762,7 @@
line-height: 38px;
height: 38px;
}
.ant-input-disabled {
color: rgba(0, 0, 0, 0.65) !important;
}
@@ -40,8 +40,8 @@
</span>
</a-row>
</div>
<div class="table-operator" v-if="isDisplay">
<div style="float: left;margin-bottom: 19px;margin-left: 20px">
<div class="table-operator">
<div style="float: left;margin-bottom: 19px;margin-left: 20px" v-if="isDisplay">
<div class="operator-text" @click="initiateListConfirmationcClick">
<a-icon type="solution"/>
{{$t('initiateListConfirmation')}}
@@ -59,7 +59,7 @@
{{$t('fixedPlate')}}
</div>
</div>
<div style="float: right;margin-top: 1px">
<div style="float: right;margin-top: 1px" v-if="isDisplay">
<div class="operator-text" v-has="'document:importZip'">
<ImportFile :url="url"/>
</div>
@@ -88,11 +88,19 @@
{{$t('BatchDelete')}}
</div>
</div>
</div>
<div class="table-operator" v-if="!isDisplay" @click="batSettingClick">
<div class="operator-text">
<a-icon type="setting"/>
{{$t('batSetting')}}
<div v-if="!isDisplay" style="float: right;margin-top: 1px;margin-bottom: 19px">
<div class="operator-text" @click="submitClick(0)">
<a-icon type="setting"/>
{{$t('submit')}}
</div>
<div class="operator-text" @click="submitClick(1)">
<a-icon type="setting"/>
{{$t('overrule')}}
</div>
<div class="operator-text" @click="batSettingClick">
<a-icon type="setting"/>
{{$t('batSetting')}}
</div>
</div>
</div>
<div style="width: 100%">
@@ -533,6 +541,63 @@
}
})
},
getRowKeys(value, callBack) {
let isTrue = true
for (let i = 0; i < this.dataSource.length; i++) {
for (let j = 0; j < value.length; j++) {
if (this.dataSource[i].id == value[j]) {
if (this.dataSource[i].roleCode == 1 && this.dataSource[i].regulationOwnerSubmitStatus) {
isTrue = false
this.$message.warning(this.$t('The') + (i+1) + this.$t('submitted'))
break
} else if (this.dataSource[i].roleCode == 2 && this.dataSource[i].homologationEngineerSubmitStatus) {
isTrue = false
this.$message.warning(this.$t('The') + (i+1) + this.$t('submitted'))
break
}
}
}
}
if (isTrue) {
callBack()
}
},
updateStatusBatch(num, selectedRowKeys) {
let _this = this
let query = {
operatorType: 1,
ids: selectedRowKeys.join(','),
projectLibraryId: _this.$route.query.id,
operatorResult: num
}
getAction(_this.url.updateStatusBatch, query).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.visible = false
_this.confirmLoading = false
_this.getList()
} else {
_this.$message.warning(_this.$t('operationFailed'))
_this.confirmLoading = false
}
})
},
submitClick(num) {
let _this = this
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
this.$confirm({
content: num == 0 ? _this.$t('confirmSubmit') : _this.$t('confirmOverrule'),
onOk() {
let selectedRowKeys = JSON.parse(JSON.stringify(_this.selectedRowKeys))
_this.getRowKeys(selectedRowKeys, function() {
_this.updateStatusBatch(num, selectedRowKeys)
})
}
})
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
handleCancel() {
this.formInline = {}
this.visible = false