平台件项目库 法规清单关联平台件修改
This commit is contained in:
@@ -9,30 +9,17 @@
|
||||
:visible="visible"
|
||||
style="height: 100%;overflow: auto;padding-bottom: 53px;">
|
||||
<div style="margin-bottom: 60px" v-for='(item,index) in data'>
|
||||
<div>{{'GB 111'}}{{$t('associatedItem')}}</div>
|
||||
<div>{{item.title}}{{$t('associatedItem')}}</div>
|
||||
<a-table
|
||||
:components="drag(columns,'columns')"
|
||||
:columns="columns"
|
||||
rowKey="id"
|
||||
:scroll="{x: 1000}"
|
||||
:data-source="item.list"
|
||||
:data-source="item.result"
|
||||
:pagination="false"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange,columnTitle:'' }"
|
||||
:row-selection="{ selectedRowKeys: selectQuery['selectedRowKeys'+index], onChange:(value, data) =>onChange(value, data, index),columnTitle:'' }"
|
||||
:loading="loading">
|
||||
|
||||
</a-table>
|
||||
<!-- <div class="page" v-if="dataList.length > 0">-->
|
||||
<!-- <a-pagination-->
|
||||
<!-- :show-total="total => $t('total')+` ${total} `+$t('strip')"-->
|
||||
<!-- show-quick-jumper-->
|
||||
<!-- show-size-changer-->
|
||||
<!-- :page-size.sync="pageSize"-->
|
||||
<!-- :total="total"-->
|
||||
<!-- :current="pageNo"-->
|
||||
<!-- @change="onChange"-->
|
||||
<!-- @showSizeChange="SizeChange"-->
|
||||
<!-- />-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
|
||||
<div class="drawer-bootom-button">
|
||||
@@ -57,6 +44,8 @@
|
||||
queryParam: {},
|
||||
confirmLoading: false,
|
||||
selectedRowKeys: [],
|
||||
selectQuery:{},
|
||||
selectedRow: [],
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('entryName'),
|
||||
@@ -81,7 +70,7 @@
|
||||
},
|
||||
{
|
||||
title: this.$t('NareaOfResponsibility'),
|
||||
dataIndex: 'dutyTerritory',
|
||||
dataIndex: 'dutyTerritory_dictText',
|
||||
align: 'left',
|
||||
ellipsis: true,
|
||||
width: 140
|
||||
@@ -102,57 +91,57 @@
|
||||
},
|
||||
{
|
||||
title: this.$t('verify') + '-' + this.$t('typeOfDeliverables'),
|
||||
dataIndex: 'deliverableTypeName',
|
||||
dataIndex: 'verifyDeliverableTypeName',
|
||||
align: 'left',
|
||||
ellipsis: true,
|
||||
width: 130
|
||||
},
|
||||
],
|
||||
data: [
|
||||
{
|
||||
id:'1',
|
||||
list:[
|
||||
{
|
||||
createBy: "linda.zhao",
|
||||
createByCn: null,
|
||||
createTime: "2023-04-17 19:10:14",
|
||||
cut: null,
|
||||
id: "1647920396307046401",
|
||||
name: "EU/UK Regulation List V23.04",
|
||||
orderBy: null,
|
||||
orderByField: null,
|
||||
readFlag: null,
|
||||
state: "1",
|
||||
state_dictText: "已发布",
|
||||
sysOrgCode: "SUPERVISORY_ORGANIZATION-3-522",
|
||||
updateBy: "admin",
|
||||
updateTime: "2023-05-10 15:24:33",
|
||||
upgradeExplanation: "asd",
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
id:'1',
|
||||
list:[
|
||||
{
|
||||
createBy: "linda.zhao",
|
||||
createByCn: null,
|
||||
createTime: "2023-04-17 19:10:14",
|
||||
cut: null,
|
||||
id: "1647920396307046401",
|
||||
name: "EU/UK Regulation List V23.04",
|
||||
orderBy: null,
|
||||
orderByField: null,
|
||||
readFlag: null,
|
||||
state: "1",
|
||||
state_dictText: "已发布",
|
||||
sysOrgCode: "SUPERVISORY_ORGANIZATION-3-522",
|
||||
updateBy: "admin",
|
||||
updateTime: "2023-05-10 15:24:33",
|
||||
upgradeExplanation: "asd",
|
||||
}
|
||||
]
|
||||
},
|
||||
// {
|
||||
// id:'1',
|
||||
// list:[
|
||||
// {
|
||||
// createBy: "linda.zhao",
|
||||
// createByCn: null,
|
||||
// createTime: "2023-04-17 19:10:14",
|
||||
// cut: null,
|
||||
// id: "1647920396307046401",
|
||||
// name: "EU/UK Regulation List V23.04",
|
||||
// orderBy: null,
|
||||
// orderByField: null,
|
||||
// readFlag: null,
|
||||
// state: "1",
|
||||
// state_dictText: "已发布",
|
||||
// sysOrgCode: "SUPERVISORY_ORGANIZATION-3-522",
|
||||
// updateBy: "admin",
|
||||
// updateTime: "2023-05-10 15:24:33",
|
||||
// upgradeExplanation: "asd",
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
// {
|
||||
// id:'1',
|
||||
// list:[
|
||||
// {
|
||||
// createBy: "linda.zhao",
|
||||
// createByCn: null,
|
||||
// createTime: "2023-04-17 19:10:14",
|
||||
// cut: null,
|
||||
// id: "1647920396307046401",
|
||||
// name: "EU/UK Regulation List V23.04",
|
||||
// orderBy: null,
|
||||
// orderByField: null,
|
||||
// readFlag: null,
|
||||
// state: "1",
|
||||
// state_dictText: "已发布",
|
||||
// sysOrgCode: "SUPERVISORY_ORGANIZATION-3-522",
|
||||
// updateBy: "admin",
|
||||
// updateTime: "2023-05-10 15:24:33",
|
||||
// upgradeExplanation: "asd",
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
],
|
||||
content: [],
|
||||
loading: false,
|
||||
@@ -173,7 +162,7 @@
|
||||
this.type = type
|
||||
this.ids = ids
|
||||
this.queryParam = {}
|
||||
this.selectedRowKeys = []
|
||||
this.selectQuery = {}
|
||||
this.replacePage()
|
||||
},
|
||||
searchQuery() {
|
||||
@@ -185,15 +174,6 @@
|
||||
this.queryParam = {}
|
||||
this.replacePage()
|
||||
},
|
||||
onChange(page, pageSize) {
|
||||
this.pageNo = page
|
||||
this.replacePage()
|
||||
},
|
||||
SizeChange(page, pageSize) {
|
||||
this.pageNo = 1
|
||||
this.pageSize = pageSize
|
||||
this.replacePage()
|
||||
},
|
||||
replacePage() {
|
||||
let query = {
|
||||
ids: this.ids,
|
||||
@@ -203,57 +183,69 @@
|
||||
this.loading = true
|
||||
postAction('project/projectLibraryBase/listPlatform', query).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataList = res.result.records || []
|
||||
this.selectedRowKeys = this.dataList.map(item => item.id)
|
||||
this.total = res.result.total
|
||||
this.data = res.result || []
|
||||
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
|
||||
this.visible = true
|
||||
if(this.data.length >= 1){
|
||||
this.visible = true
|
||||
}
|
||||
} else {
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
onSelectChange(value) {
|
||||
this.selectedRowKeys = value
|
||||
// if (this.selectedRowKeys.length > 1) {
|
||||
// this.selectedRowKeys.shift()
|
||||
// }
|
||||
onChange(value,data,ind) {
|
||||
this.selectQuery['selectedRowKeys'+ind] = value
|
||||
this.data = [...this.data]
|
||||
},
|
||||
handleCancel() {
|
||||
this.visible = false
|
||||
},
|
||||
handleSubmit(flag) {
|
||||
console.log(this.selectedRowKeys)
|
||||
return
|
||||
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||
if (this.selectQuery) {
|
||||
this.confirmLoading = true
|
||||
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
|
||||
this.confirmLoading = false
|
||||
this.$emit('associatedplatthreeForm',selectedRowKeys.join(','))
|
||||
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
|
||||
// }
|
||||
// })
|
||||
let array = Object.values(this.selectQuery)
|
||||
let arr = []
|
||||
this.data.forEach((val,index) => {
|
||||
array.forEach((item,index1) => {
|
||||
if(index == index1){
|
||||
arr.push({
|
||||
lawsInventoryId:val.lawsInventoryId,
|
||||
platformLawsInventoryIds:item.join(',')
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
arr = arr
|
||||
console.log(arr)
|
||||
let query = {
|
||||
list : JSON.parse(JSON.stringify(arr))
|
||||
}
|
||||
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')
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
this.confirmLoading = false
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
// this.$message.warning(this.$t('selectLeastOne'))
|
||||
this.visible = false
|
||||
}
|
||||
},
|
||||
getAdd() {
|
||||
|
||||
@@ -1297,18 +1297,18 @@
|
||||
}
|
||||
}else{
|
||||
flag = '2'
|
||||
this.$refs.associatedplatRef.transferModel(flag,type,this.selectedRowKeys.join(','))
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
}
|
||||
},
|
||||
associatedplatForm(id,flag,type,ids){
|
||||
if(flag == '1'){
|
||||
this.$refs.associatedplatthreeRef.transferModel(id,type,ids)
|
||||
}else{
|
||||
this.$refs.associatedplattwoRef.transferModel(id,type,ids)
|
||||
}
|
||||
// if(flag == '1'){
|
||||
// this.$refs.associatedplatthreeRef.transferModel(id,type,ids)
|
||||
// }else{
|
||||
// this.$refs.associatedplattwoRef.transferModel(id,type,ids)
|
||||
// }
|
||||
},
|
||||
associatedplattwoForm(id,type,ids){
|
||||
this.$refs.associatedplatthreeRef.transferModel(id,type,ids)
|
||||
// this.$refs.associatedplatthreeRef.transferModel(id,type,ids)
|
||||
},
|
||||
associatedplatthreeForm(id){
|
||||
console.log(id)
|
||||
|
||||
@@ -1982,7 +1982,7 @@
|
||||
this.$refs.associatedplatthreeRef.transferModel(id,type,ids)
|
||||
},
|
||||
associatedplatthreeForm(id){
|
||||
console.log(id)
|
||||
this.getList()
|
||||
},
|
||||
//批量设置
|
||||
batSettingClick() {
|
||||
|
||||
Reference in New Issue
Block a user