|
|
@@ -26,7 +26,7 @@
|
|
|
|
|
|
<!-- 表格展示 -->
|
|
|
<!-- {{form['tableData_' + tabIndex]}}-->
|
|
|
- <div v-if="tabsOptions && tabsOptions[tabIndex] ">
|
|
|
+ <div v-if="tabsOptions && tabsOptions[tabIndex] && flgVisible">
|
|
|
<DkTable slot="top" :id="'table-'+$options.name" :ref="'table-select-' + tabIndex"
|
|
|
:data="form['tableData_' + tabIndex]"
|
|
|
:height="tabsOptions.length > 1?this.tableHeight - 30:this.tableHeight"
|
|
|
@@ -71,6 +71,7 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
reportId: '',
|
|
|
+ flgVisible:true,
|
|
|
form: {},
|
|
|
reportForm: {},
|
|
|
tableData: [],// 报表数据
|
|
|
@@ -80,7 +81,7 @@ export default {
|
|
|
tabsOptions: [], // tab数据源
|
|
|
changeFlag: false,// 是否是跳转
|
|
|
searchParams: {},// 查询条件
|
|
|
- linkChangeTabs:[],// 点击链接跳转到相应的页签
|
|
|
+ linkChangeTabs:{},// 点击链接跳转到相应的页签
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -106,7 +107,7 @@ export default {
|
|
|
* @date : 2023/4/19 18:01
|
|
|
*/
|
|
|
async chooseData(row, rowIndex,changeTabName) {
|
|
|
- console.log('eee',row,rowIndex,changeTabName)
|
|
|
+ this.flgVisible = false
|
|
|
if(!changeTabName){
|
|
|
changeTabName = this.tabsOptions[this.tabIndex].changeTabName
|
|
|
}
|
|
|
@@ -124,6 +125,7 @@ export default {
|
|
|
}
|
|
|
// 切换页签,处理小计
|
|
|
this.changeTabHandleSubTotal();
|
|
|
+ this.flgVisible = true;
|
|
|
this.$nextTick(() => {
|
|
|
//查询条件
|
|
|
this.setCondition(this.searchCond)
|
|
|
@@ -135,7 +137,7 @@ export default {
|
|
|
if (changeScript.indexOf(',') >= 0) {
|
|
|
let changeScripts = changeScript.split(',');
|
|
|
changeScripts.forEach(it => {
|
|
|
- params[it] = row[it]
|
|
|
+ params[it] = row[it]?row[it]:null
|
|
|
})
|
|
|
} else {
|
|
|
params[changeScript] = row[changeScript]
|
|
|
@@ -144,7 +146,6 @@ export default {
|
|
|
this.getData(params) // 执行查询
|
|
|
this.searchParams = {...params} // 记录当时的查询条件
|
|
|
this.changeFlag = true;
|
|
|
-
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
@@ -179,6 +180,7 @@ export default {
|
|
|
* @date : 2023/3/30 8:48
|
|
|
*/
|
|
|
handleChangeSqlTab(val) {
|
|
|
+ this.flgVisible = false
|
|
|
this.$nextTick(() => {
|
|
|
// 先记录现在的页签的表格翻页信息
|
|
|
// console.log('this.pageInfo', this.pageInfo, this.tabsOptions[this.tabIndex])
|
|
|
@@ -189,6 +191,9 @@ export default {
|
|
|
}
|
|
|
// 切换页签,处理小计
|
|
|
this.changeTabHandleSubTotal();
|
|
|
+ setTimeout(()=>{
|
|
|
+ this.flgVisible = true;
|
|
|
+ },200)
|
|
|
})
|
|
|
},
|
|
|
/**
|
|
|
@@ -262,8 +267,9 @@ export default {
|
|
|
* @author : 周兴
|
|
|
* @date : 2023/4/28 16:00
|
|
|
*/
|
|
|
- handleLink(e){
|
|
|
- this.chooseData(e);
|
|
|
+ handleLink(row,rowIndex, field){
|
|
|
+ let changeTabName = this.linkChangeTabs[field]
|
|
|
+ this.chooseData(row,rowIndex,changeTabName);
|
|
|
},
|
|
|
/**
|
|
|
* @desc : 设置小计行
|
|
|
@@ -515,7 +521,7 @@ export default {
|
|
|
* @date : 2023/3/28 19:55
|
|
|
*/
|
|
|
handleTableSetting(row, index) {
|
|
|
- let table = row.tableSettingList;
|
|
|
+ let table = row.tableSettingList?.copy();
|
|
|
row.tableColumns = []
|
|
|
this.showFooter = false;
|
|
|
if (table && table.length > 0) {
|
|
|
@@ -533,10 +539,7 @@ export default {
|
|
|
// 是否是链接
|
|
|
if(it.flgLink){
|
|
|
item.type = 'link'
|
|
|
- this.linkChangeTabs.push({
|
|
|
- field:it.code,
|
|
|
- tabName:it.changeTabName
|
|
|
- })
|
|
|
+ this.linkChangeTabs[it.code] = it.changeTabName
|
|
|
}
|
|
|
item.dataType = it.dataType ? it.dataType : this.$config.dataType.str
|
|
|
if (it.flgSum) {
|