|
|
@@ -88,15 +88,19 @@
|
|
|
<!-- <el-button icon="el-icon-delete" type="danger" @click="handleDelete">删除</el-button>-->
|
|
|
</vab-query-form-left-panel>
|
|
|
<vab-query-form-right-panel :span="12">
|
|
|
- <table-tool :check-list.sync="checkList" :columns="columns" />
|
|
|
+ <table-tool
|
|
|
+ ref="tableTool"
|
|
|
+ :columns.sync="finallyColumns"
|
|
|
+ :show-columns.sync="showColumns"
|
|
|
+ :table-type.sync="tableType" />
|
|
|
</vab-query-form-right-panel>
|
|
|
</vab-query-form>
|
|
|
|
|
|
<el-table ref="busTable" v-loading="listLoading" :data="list" :height="height" @selection-change="setSelectRows">
|
|
|
<el-table-column align="center" show-overflow-tooltip type="selection" />
|
|
|
<el-table-column
|
|
|
- v-for="(item, index) in finallyColumns"
|
|
|
- :key="index"
|
|
|
+ v-for="(item, index) in showColumns"
|
|
|
+ :key="index + Math.random()"
|
|
|
align="center"
|
|
|
:label="item.label"
|
|
|
:min-width="item.minWidth"
|
|
|
@@ -201,7 +205,7 @@
|
|
|
components: { Edit, Transfer, TableTool, FollowAdd },
|
|
|
data() {
|
|
|
return {
|
|
|
- activeName: 'all',
|
|
|
+ activeName: '',
|
|
|
height: this.$baseTableHeight(4),
|
|
|
queryForm: {
|
|
|
pageNum: 1,
|
|
|
@@ -217,7 +221,8 @@
|
|
|
beginTime: undefined,
|
|
|
endTime: undefined,
|
|
|
},
|
|
|
- checkList: [],
|
|
|
+ tableType: 'businessTable',
|
|
|
+ showColumns: [],
|
|
|
columns: [
|
|
|
{
|
|
|
label: '项目编码',
|
|
|
@@ -225,6 +230,7 @@
|
|
|
width: '120px',
|
|
|
minWidth: '120px',
|
|
|
sortable: false,
|
|
|
+ disableCheck: true,
|
|
|
},
|
|
|
{
|
|
|
label: '项目名称',
|
|
|
@@ -409,38 +415,36 @@
|
|
|
nboStatusOptions: [],
|
|
|
approStatusOptions: [],
|
|
|
followup: {},
|
|
|
+ finallyColumns: [],
|
|
|
}
|
|
|
},
|
|
|
- computed: {
|
|
|
- finallyColumns() {
|
|
|
- switch (this.activeName) {
|
|
|
+ watch: {
|
|
|
+ activeName(newValue) {
|
|
|
+ this.tableType = 'businessTable' + this.selectDictLabel(this.nboTypeOptions, newValue)
|
|
|
+ switch (newValue) {
|
|
|
case '10':
|
|
|
case '20':
|
|
|
case '30':
|
|
|
- return this.columns.filter(
|
|
|
- (item) => this.checkList.includes(item.label) && this.abcColumns.includes(item.label)
|
|
|
- )
|
|
|
+ this.finallyColumns = this.columns.filter((item) => this.abcColumns.includes(item.label))
|
|
|
+ break
|
|
|
case '40':
|
|
|
- return this.columns.filter(
|
|
|
- (item) => this.checkList.includes(item.label) && this.dealColumns.includes(item.label)
|
|
|
- )
|
|
|
+ this.finallyColumns = this.columns.filter((item) => this.dealColumns.includes(item.label))
|
|
|
+ break
|
|
|
case '50':
|
|
|
- return this.columns.filter(
|
|
|
- (item) => this.checkList.includes(item.label) && this.reserveColumns.includes(item.label)
|
|
|
- )
|
|
|
+ this.finallyColumns = this.columns.filter((item) => this.reserveColumns.includes(item.label))
|
|
|
+ break
|
|
|
default:
|
|
|
- return this.columns.filter(
|
|
|
- (item) => this.checkList.includes(item.label) && this.allColumns.includes(item.label)
|
|
|
- )
|
|
|
+ this.finallyColumns = this.columns.filter((item) => this.allColumns.includes(item.label))
|
|
|
}
|
|
|
},
|
|
|
},
|
|
|
created() {
|
|
|
+ this.activeName = 'all'
|
|
|
if (this.$route.params && this.$route.params.length > 0) {
|
|
|
this.queryForm = this.$route.params
|
|
|
this.activeName = this.queryForm.activeName ? this.queryForm.activeName : 'all'
|
|
|
}
|
|
|
- this.fetchData()
|
|
|
+ this.handleTabClick()
|
|
|
this.getOptions()
|
|
|
},
|
|
|
updated() {
|
|
|
@@ -474,12 +478,14 @@
|
|
|
},
|
|
|
handleTabClick() {
|
|
|
this.queryForm.pageNum = 1
|
|
|
- console.log(this.activeName)
|
|
|
if (this.activeName !== 'all') {
|
|
|
this.queryForm.nboType = this.activeName
|
|
|
} else {
|
|
|
this.queryForm.nboType = undefined
|
|
|
}
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs['tableTool'].getInitData()
|
|
|
+ })
|
|
|
this.fetchData()
|
|
|
},
|
|
|
handleTransfer() {
|