法规清单自定义表头

This commit is contained in:
zyx.net
2023-02-01 16:48:32 +08:00
parent 2553d595c6
commit 03644065da
@@ -161,7 +161,7 @@
<span style="position: absolute;left: -13px;top: -4px">...</span>{{ $t('more') }} <span style="position: absolute;left: -13px;top: -4px">...</span>{{ $t('more') }}
</div> </div>
</a-popconfirm> </a-popconfirm>
<a-popconfirm overlayClassName='popconfirmmize' placement="bottomRight" > <a-popconfirm :visible="customizevisible" overlayClassName='popconfirmmize' placement="bottomRight" >
<template slot="title" id="popconfirmmize"> <template slot="title" id="popconfirmmize">
<div style="height:320px;overflow:scroll;overflow-x: auto;"> <div style="height:320px;overflow:scroll;overflow-x: auto;">
<a-checkbox <a-checkbox
@@ -177,11 +177,12 @@
</a-checkbox> </a-checkbox>
</a-checkbox-group> </a-checkbox-group>
<div class="drawer-bootom-button"> <div class="drawer-bootom-button">
<a-button @click="cancel" style="margin-right: 16px">{{$t('cancel')}}</a-button>
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('determine')}}</a-button> <a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('determine')}}</a-button>
</div> </div>
</div> </div>
</template> </template>
<div class="operator-text" style="position: relative"> <div class="operator-text" style="position: relative" @click='getcustomize'>
<a-icon type="setting"/> <a-icon type="setting"/>
{{ $t('customize') }} {{ $t('customize') }}
</div> </div>
@@ -868,6 +869,7 @@
isDisplay: true, isDisplay: true,
selectedRowKeys: [], selectedRowKeys: [],
visible: false, visible: false,
customizevisible: false,
formInline: {}, formInline: {},
rules: { rules: {
inventoryAffirmDueDate: [ inventoryAffirmDueDate: [
@@ -1976,9 +1978,16 @@
}) })
} }
}) })
this.columnsAll.forEach(item => { this.columnsAll.forEach((item) => {
this.checkedList.push(item.dataIndex) if(item.children){
item.children.forEach((val) => {
this.checkedList.push(item.dataIndex,val.dataIndex)
})
}else {
this.checkedList.push(item.dataIndex)
}
}) })
console.log(this.checkedList)
this.loading = false this.loading = false
this.JLoading = false this.JLoading = false
} else { } else {
@@ -2061,6 +2070,13 @@
console.log(this.selectedValue,'console.log(this.selectedValue)') console.log(this.selectedValue,'console.log(this.selectedValue)')
this.selectedValue = this.checkedList this.selectedValue = this.checkedList
}, },
getcustomize(){
console.log(11111)
this.customizevisible = true
},
cancel(){
this.customizevisible = false
},
handleSubmit(){ handleSubmit(){
let list = [] let list = []
let uniqueArray = this.selectedValue.filter((item, index, array) => { let uniqueArray = this.selectedValue.filter((item, index, array) => {
@@ -2083,10 +2099,12 @@
if (res.success) { if (res.success) {
this.confirmLoading = false this.confirmLoading = false
this.$message.success(this.$t('OperationSuccessful')) this.$message.success(this.$t('OperationSuccessful'))
this.customizevisible = false
this.getHeader() this.getHeader()
} else { } else {
this.$message.warning(this.$t('operationFailed')) this.$message.warning(this.$t('operationFailed'))
this.confirmLoading = false this.confirmLoading = false
this.customizevisible = false
} }
}) })
}, },
@@ -2948,6 +2966,7 @@
align-items: flex-start; align-items: flex-start;
} }
.customize-text-title{ .customize-text-title{
margin-left: 0;
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
color: #040B29; color: #040B29;