项目库 关联平台件失败提示语

This commit is contained in:
zyx.net
2023-09-25 11:07:02 +08:00
parent c7018f1975
commit 44147c1ca1
7 changed files with 130 additions and 47 deletions
+1
View File
@@ -1977,4 +1977,5 @@ module.exports = {
unpublishedregulationsselected:'Only unpublished regulations can be selected',
PlatformInformation:'Platform Information',
Processdetails:'Process Details',
matchempty:'The match is empty'
}
+1
View File
@@ -3933,4 +3933,5 @@ module.exports = {
unpublishedregulationsselected:'仅能选择未发布的法规',
PlatformInformation:'平台件信息',
Processdetails:'流程详情',
matchempty:'匹配项为空'
}
@@ -226,27 +226,6 @@
this.confirmLoading = false
this.$emit('associatedplatForm',selectedRowKeys.join(','),this.flag,this.type,this.ids)
this.selectedRowKeys = []
// postAction(this.url.addModel, {
// dummyInventoryBaseId: selectedRowKeys.join(','),
// projectLibraryId: this.$route.query.id,
// flag: flag
// }).then((res) => {
// if (res.success) {
// this.confirmLoading = false
// this.$message.success(this.$t('OperationSuccessful'))
// this.visible = false
// this.selectedRowKeys = []
// this.$emit('transferListForm')
// } else {
// if (res.message == '该虚拟清单的维护清单中没有数据,是否需要添加') {
// this.confirmLoading = false
// this.getAdd()
// return
// }
// this.$message.warning(this.$t('operationFailed'))
// this.confirmLoading = false
// }
// })
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
@@ -97,6 +97,7 @@
width: 130
},
],
msg:'',
data: [
// {
// id:'1',
@@ -191,20 +192,19 @@
this.loading = true
postAction(this.flag == '2' ? '/project/projectLibraryBase/listPlatformAll' : 'project/projectLibraryBase/listPlatform', this.flag == '2' ? val : query).then((res) => {
if (res.success) {
this.data = res.result || []
this.data = res.result.result || []
this.msg = res.result.msg || ''
this.data.forEach((item,index) => {
let name = 'selectedRowKeys'+index
this.selectQuery[name] = item.result.map(val => val.id)
// for(var i in item.result.map(val => val.id)){
// this.selectedRowKeys.push(item.result.map(val => val.id)[i])
// }
// this.selectedRow.push(item.result)
})
console.log(this.selectQuery)
// console.log(this.selectedRow)
this.loading = false
if(this.data.length >= 1){
this.visible = true
}else {
this.$emit('associatedplatthreeFormHomo',this.msg)
}
} else {
this.loading = false
@@ -234,18 +234,25 @@
})
})
arr = arr
console.log(arr)
let query = {
list : JSON.parse(JSON.stringify(arr))
list : JSON.parse(JSON.stringify(arr)),
msg:this.msg
}
console.log(query)
postAction('project/lawsInventoryPlatformEO/addBatch', query).then((res) => {
if (res.success) {
this.confirmLoading = false
this.$message.success(this.$t('OperationSuccessful'))
this.visible = false
this.selectQuery = {}
this.$emit('associatedplatthreeForm')
if(res.result == ''){
this.confirmLoading = false
this.$message.success(this.$t('OperationSuccessful'))
this.visible = false
this.selectQuery = {}
this.$emit('associatedplatthreeForm')
}else{
this.confirmLoading = false
this.visible = false
this.selectQuery = {}
this.$emit('associatedplatthreeFormHomo',res.result)
}
} else {
this.$message.warning(this.$t('operationFailed'))
this.confirmLoading = false
@@ -253,7 +260,7 @@
})
} else {
// this.$message.warning(this.$t('selectLeastOne'))
this.visible = false
this.$emit('associatedplatthreeForm')
}
},
getAdd() {
@@ -42,7 +42,7 @@
:placeholder="$t('PleaseSelect')+$t('regulationNo')"
v-model="formInline.serialNumber"></a-input>
<a-input class="box-input"
:disabled="true"
:disabled="flowdisabled"
v-else
v-model.trim="formInline.serialNumber"
:placeholder="$t('PleaseEnter')+this.$t('regulationNo')"/>
@@ -504,6 +504,7 @@
optionFilterProp="label"
@change="handleInput('sdt',formInline.sdt)"
showSearch
:disabled="flowdisabled"
v-model="formInline.sdt">
<a-select-option v-for="(item, key) in engineeringInterfacePersonList"
:label="item.name"
@@ -534,6 +535,7 @@
:maxTagCount="1"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
class="box-input"
:disabled="flowdisabled"
style="width: 100%"
:tree-data="DeliverableTreeList"
:placeholder="$t('PleaseSelect')+$t('typeOfDeliverables')"
@@ -552,6 +554,7 @@
:title="$t('deliverableTemplate')">{{$t('deliverableTemplate')}}</span>
</div>
<a-form-model-item class="itemModel" prop="deliverableTemplate">
<!-- this.$refs.uploadFile.disabled = isTrue-->
<a-button type="primary" class="button-text"
@click="clickButtonToUpload('deliverableTemplate')">
{{ (formInline.deliverableTemplate === 'null' || formInline.deliverableTemplate === ''
@@ -577,9 +580,9 @@
:query="{db_field_name:'dutyPerson',db_field_txt:$t('personLiable')}"
:personneQuery="formInline"
:isSingleChoice="true"
:disabled="flowdisabled"
v-if="personnelVisible"
@change="PersonnelSelectionChange"
:disabled="disabled"
v-model="formInline.dutyPersonName"/>
</a-form-model-item>
</div>
@@ -598,6 +601,7 @@
message: $t('closingDate') + $t('cannotEmpty'), trigger: 'change'}]"
>
<a-date-picker class="box-input"
:disabled="flowdisabled"
:placeholder="$t('PleaseSelect')+$t('closingDate')"
@change="dateChange({db_field_name:'endTime'})"
format="YYYY-MM-DD"
@@ -693,6 +697,7 @@
formInline: {},
confirmLoading: false,
visible: false,
disabledType:'',
personnelVisible: false,
yearNameDataList: [],
firstLevelDutyTerritoryList: [],
@@ -761,6 +766,7 @@
]
},
disabled: false,
flowdisabled: false,
projectNameList: [],
title: '',
DeliverableTreeList: [],
@@ -869,6 +875,11 @@
if (value.dutyTerritory && value.dutyTerritory.length > 0) {
this.queryPersonByProject(value.dutyTerritory.join(','))
}
console.log(value)
if(value.projectCertificationInventoryEOS && value.projectCertificationInventoryEOS.length > 0){
this.flowdisabled = true
this.$refs.uploadFile.disabled = true
}
this.getRegulationNo()
this.title = this.$t('edit')
this.$nextTick(() => {
@@ -464,6 +464,28 @@
/>
</div>
</div>
<!-- 关联错误数据提示-->
<a-modal
:title="$t('operationFailed')"
:width="860"
v-model="visibleoperationFailed"
:maskClosable="false"
:footer="null"
>
<a-row :gutter="24">
<a-col :span="24">
<div style='font-size: 18px;margin-bottom: 20px;display: flex;justify-content: center'
class="box-title-text-index">
<span v-html="visibleoperation"></span>
</div>
</a-col>
</a-row>
<div class="imports-footer">
<div class="imports-footer-wrap" style='text-align: center;'>
<a-button class="imports-btn" type="primary" @click="cancleoperationFailed">{{$t('cancel')}}</a-button>
</div>
</div>
</a-modal>
<transferList :url="url" @transferListForm="transferListForm" ref="transferListRef"/>
<certificationDirectory :isDisplayNum="isDisplayNum" :roleSwitchingCode="roleSwitchingCode"
:url="url" ref="certificationDirectoryRef"/>
@@ -610,6 +632,8 @@
pageSize: 50,
total: 0,
JTextLoading: false,
visibleoperationFailed: false,
visibleoperation:'',
CertificationColor: {
'Test passed': 'accordColor',
'Test failed': 'nonConformityColor',
@@ -1278,6 +1302,7 @@
if(this.selectedRowKeys && this.selectedRowKeys.length > 0){
this.detailedWarningList = []
let dataSource = []
let status = ''
for (let i = 0; i < this.dataSource.length; i++) {
for (let j = 0; j < this.selectedRowKeys.length; j++) {
if (this.dataSource[i].id == this.selectedRowKeys[j]) {
@@ -1288,12 +1313,16 @@
for (let i = 0; i < dataSource.length; i++) {
if (dataSource[i].flowStatus == 'List to be released') {
flag = '1'
this.$refs.associatedplatRef.transferModel(flag,type,this.selectedRowKeys.join(','))
status = '1'
} else {
this.$message.warning(this.$t('unpublishedregulationsselected'))
return
status = '2'
}
}
if(status == '1'){
this.$refs.associatedplatRef.transferModel(flag,type,this.selectedRowKeys.join(','))
}else{
this.$message.warning(this.$t('unpublishedregulationsselected'))
}
}else{
flag = '2'
this.$message.warning(this.$t('selectLeastOne'))
@@ -1308,9 +1337,15 @@
if(type == '认证'){
postAction('/project/projectCertificationInventoryEO/listPlatform', query).then((res) => {
if (res.success) {
this.$refs.associatedplatRef.visible = false
this.$message.success(this.$t('OperationSuccessful'))
this.getList()
if(res.result == ''){
this.$refs.associatedplatRef.visible = false
this.$message.success(this.$t('OperationSuccessful'))
this.selectedRowKeys = []
this.getList()
}else{
this.visibleoperation = res.result
this.visibleoperationFailed = true
}
}
})
}
@@ -1320,6 +1355,12 @@
// this.$refs.associatedplattwoRef.transferModel(id,type,ids)
// }
},
cancleoperationFailed(){
this.visibleoperationFailed = false
this.$refs.associatedplatRef.handleCancel()
this.selectedRowKeys = []
this.getList()
},
associatedplattwoForm(id,type,ids){
// this.$refs.associatedplatthreeRef.transferModel(id,type,ids)
},
@@ -435,7 +435,7 @@
<transferList :url="url" @transferListForm="transferListForm" ref="transferListRef"/>
<associatedplat :url="url" @associatedplatForm="associatedplatForm" ref="associatedplatRef"/>
<associatedplattwo :url="url" @associatedplattwoForm="associatedplattwoForm" ref="associatedplattwoRef"/>
<associatedplatthree :url="url" @associatedplatthreeForm="associatedplatthreeForm" ref="associatedplatthreeRef"/>
<associatedplatthree :url="url" @associatedplatthreeFormHomo="associatedplatthreeFormHomo" @associatedplatthreeForm="associatedplatthreeForm" ref="associatedplatthreeRef"/>
<customizeList :url="url" @customizeListForm="customizeListForm" ref="customizeListRef"/>
<transferListvirtal :url="url" @transferListFormHomo="transferListFormHomo" ref="transferListvirtalRef"/>
<fixedPlate @fixedPlateForm="addModelList" ref="fixedPlateRef"/>
@@ -688,6 +688,28 @@
</span>
</a-table>
</a-modal>
<!-- 关联错误数据提示-->
<a-modal
:title="$t('operationFailed')"
:width="860"
v-model="visibleoperationFailed"
:maskClosable="false"
:footer="null"
>
<a-row :gutter="24">
<a-col :span="24">
<div style='font-size: 18px;margin-bottom: 20px;display: flex;justify-content: center'
class="box-title-text-index">
<span v-html="visibleoperation"></span>
</div>
</a-col>
</a-row>
<div class="imports-footer">
<div class="imports-footer-wrap" style='text-align: center;'>
<a-button class="imports-btn" type="primary" @click="cancleoperationFailed">{{$t('cancel')}}</a-button>
</div>
</div>
</a-modal>
<JLoading :loading="JLoading">{{ $t('dataLoading') }}</JLoading>
<JLoading :loading="JTextLoading">{{ $t('Submitting') }}</JLoading>
<resultReportedUpload @resultReportedUploadForm="addModelList" ref="resultReportedUploadRef"/>
@@ -757,6 +779,7 @@
data() {
return {
toggleSearchStatus: false,
visibleoperationFailed: false,
visibleQuestion: false,
visibleReset: false,
confirmLoadingReset: false,
@@ -768,6 +791,7 @@
pageSize: 50,
total: 0,
long:'',
visibleoperation:'',
roleSwitchingList: [],
formInlineQuestion: {},
formInlineReset: {},
@@ -1955,7 +1979,7 @@
transferClick() {
this.$refs.transferListRef.transferModel()
},
// 关联平台件
// 关联平台件visibleoperation
associatedplatformClick(type){
let flag = ''
if(this.selectedRowKeys && this.selectedRowKeys.length > 0){
@@ -1978,7 +2002,6 @@
status = '2'
}
}
console.log(status)
if(status == '1'){
this.$refs.associatedplatRef.transferModel(flag,type,this.selectedRowKeys.join(','))
}else{
@@ -1986,8 +2009,6 @@
}
}else{
flag = '2'
this.selectedRowKeys = this.dataSource.map(val => val.id)
console.log(this.selectedRowKeys)
this.$refs.associatedplatRef.transferModel(flag,type,this.selectedRowKeys.join(','))
}
},
@@ -2002,6 +2023,28 @@
this.$refs.associatedplatthreeRef.transferModel(id,flag,type,ids)
},
associatedplatthreeForm(id){
this.$refs.associatedplatRef.handleCancel()
this.$refs.associatedplattwoRef.handleCancel()
this.selectedRowKeys = []
this.getList()
},
associatedplatthreeFormHomo(msg){
if(msg){
this.visibleoperation = msg
this.visibleoperationFailed = true
}else{
this.$message.warning(this.$t('matchempty'))
this.$refs.associatedplatRef.handleCancel()
this.$refs.associatedplattwoRef.handleCancel()
this.selectedRowKeys = []
this.getList()
}
},
cancleoperationFailed(){
this.visibleoperationFailed = false
this.$refs.associatedplatRef.handleCancel()
this.$refs.associatedplattwoRef.handleCancel()
this.selectedRowKeys = []
this.getList()
},
//批量设置