|
@@ -1,7 +1,7 @@
|
|
|
import Loading from '_c/loading'
|
|
import Loading from '_c/loading'
|
|
|
import {button as buttonList} from '@/locale/lang/zh-CN.js'
|
|
import {button as buttonList} from '@/locale/lang/zh-CN.js'
|
|
|
import {request} from "@/api/base";
|
|
import {request} from "@/api/base";
|
|
|
-import {localRead, localSave} from "@/libs/base/util";
|
|
|
|
|
|
|
+import {localRead, localRemove, localSave} from "@/libs/base/util";
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* @desc : 一览界面混入
|
|
* @desc : 一览界面混入
|
|
@@ -19,7 +19,8 @@ export const indexMixin = {
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
- loading: false,
|
|
|
|
|
|
|
+ loading: false, // 加载标识
|
|
|
|
|
+ modalVisible:false, // 弹框显示
|
|
|
existsFlag:true,
|
|
existsFlag:true,
|
|
|
searchButtonName: null, // 查询按钮的权限名称
|
|
searchButtonName: null, // 查询按钮的权限名称
|
|
|
initSearchFlag: true, // 初始查询标识
|
|
initSearchFlag: true, // 初始查询标识
|
|
@@ -31,6 +32,7 @@ export const indexMixin = {
|
|
|
currentPage: 1
|
|
currentPage: 1
|
|
|
},
|
|
},
|
|
|
split: 0.5,// 分区的默认
|
|
split: 0.5,// 分区的默认
|
|
|
|
|
+ _mainHeight:0,// 初始加载时div的大小,用户退出全屏后计算大小使用
|
|
|
formDataInit: {}, // 记录页面初始化的数据
|
|
formDataInit: {}, // 记录页面初始化的数据
|
|
|
tableData: [],
|
|
tableData: [],
|
|
|
searchInfo: [], // 记录的查询的实体
|
|
searchInfo: [], // 记录的查询的实体
|
|
@@ -560,6 +562,18 @@ export const indexMixin = {
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
/**
|
|
/**
|
|
|
|
|
+ * @desc : desc
|
|
|
|
|
+ * @author : 周兴
|
|
|
|
|
+ * @date : 2023/4/27 8:43
|
|
|
|
|
+ */
|
|
|
|
|
+ handleVisibleModal(e){
|
|
|
|
|
+ if(e){
|
|
|
|
|
+ this.modalVisible = true;
|
|
|
|
|
+ }else{
|
|
|
|
|
+ this.modalVisible = false;
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ /**
|
|
|
* @desc : 监听全局键盘按钮按下的事件
|
|
* @desc : 监听全局键盘按钮按下的事件
|
|
|
* @author : 周兴
|
|
* @author : 周兴
|
|
|
* @date : 2022/3/4 16:57
|
|
* @date : 2022/3/4 16:57
|
|
@@ -645,12 +659,22 @@ export const indexMixin = {
|
|
|
collapseChange() {
|
|
collapseChange() {
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
this.resizeTable() // 重新计算表格高度
|
|
this.resizeTable() // 重新计算表格高度
|
|
|
- }, 300)
|
|
|
|
|
|
|
+ }, 500)
|
|
|
|
|
|
|
|
// 光标停留在第一个控件上
|
|
// 光标停留在第一个控件上
|
|
|
this.$refs['searchCond'].focus()
|
|
this.$refs['searchCond'].focus()
|
|
|
},
|
|
},
|
|
|
/**
|
|
/**
|
|
|
|
|
+ * @desc : 重算table的高度(给resize调用)
|
|
|
|
|
+ * @author : 周兴
|
|
|
|
|
+ * @date : 2023/4/27 11:44
|
|
|
|
|
+ */
|
|
|
|
|
+ resizeTableByResize(){
|
|
|
|
|
+ setTimeout(()=>{
|
|
|
|
|
+ this.resizeTable();
|
|
|
|
|
+ },800)
|
|
|
|
|
+ },
|
|
|
|
|
+ /**
|
|
|
* @desc : 重算table的高度
|
|
* @desc : 重算table的高度
|
|
|
* @author : 周兴
|
|
* @author : 周兴
|
|
|
* @date : 2022/3/14 9:24
|
|
* @date : 2022/3/14 9:24
|
|
@@ -691,6 +715,12 @@ export const indexMixin = {
|
|
|
if (mainDiv && mainDiv.length > 0) {
|
|
if (mainDiv && mainDiv.length > 0) {
|
|
|
mainHeight = mainDiv[0].clientHeight
|
|
mainHeight = mainDiv[0].clientHeight
|
|
|
}
|
|
}
|
|
|
|
|
+ // 如果是最小化有值,说明是从还原回来
|
|
|
|
|
+ let restore = localRead('restore')
|
|
|
|
|
+ if(restore === 'restore'){
|
|
|
|
|
+ mainHeight = this._mainHeight;
|
|
|
|
|
+ localRemove('restore');
|
|
|
|
|
+ }
|
|
|
let toolsHeight = 0;
|
|
let toolsHeight = 0;
|
|
|
if (document.getElementById('BaseIndexButtonGroup') != null) {
|
|
if (document.getElementById('BaseIndexButtonGroup') != null) {
|
|
|
toolsHeight = document.getElementById('BaseIndexButtonGroup').offsetHeight
|
|
toolsHeight = document.getElementById('BaseIndexButtonGroup').offsetHeight
|
|
@@ -700,7 +730,6 @@ export const indexMixin = {
|
|
|
if (this.allScreenFlag) {
|
|
if (this.allScreenFlag) {
|
|
|
this.tableHeight = mainHeight - 3 - pageHeight - tableToolsHeight + 90
|
|
this.tableHeight = mainHeight - 3 - pageHeight - tableToolsHeight + 90
|
|
|
} else {
|
|
} else {
|
|
|
- // console.log('searchHeight',searchHeight)
|
|
|
|
|
// 如果没有Switch开关,不用除以2
|
|
// 如果没有Switch开关,不用除以2
|
|
|
if (this.tableSwitch) {
|
|
if (this.tableSwitch) {
|
|
|
this.tableHeight = mainHeight - searchHeight - toolsHeight - 3 - 20 - footInfoHeight - pageHeight - tableToolsHeight - tabHeight + 10
|
|
this.tableHeight = mainHeight - searchHeight - toolsHeight - 3 - 20 - footInfoHeight - pageHeight - tableToolsHeight - tabHeight + 10
|
|
@@ -708,6 +737,7 @@ export const indexMixin = {
|
|
|
// console.log('333', mainHeight, searchHeight, toolsHeight, footInfoHeight, pageHeight, tableToolsHeight, tabHeight)
|
|
// console.log('333', mainHeight, searchHeight, toolsHeight, footInfoHeight, pageHeight, tableToolsHeight, tabHeight)
|
|
|
this.tableHeight = (mainHeight - searchHeight - toolsHeight - 3 - 20 - footInfoHeight - pageHeight - tableToolsHeight - tabHeight - 15) / 2
|
|
this.tableHeight = (mainHeight - searchHeight - toolsHeight - 3 - 20 - footInfoHeight - pageHeight - tableToolsHeight - tabHeight - 15) / 2
|
|
|
}
|
|
}
|
|
|
|
|
+ // console.log('tableHeight',this.tableHeight,mainHeight)
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
@@ -845,7 +875,6 @@ export const indexMixin = {
|
|
|
*/
|
|
*/
|
|
|
buttonClick(e) {
|
|
buttonClick(e) {
|
|
|
if (this._buttonList && this._buttonList.length > 0) {
|
|
if (this._buttonList && this._buttonList.length > 0) {
|
|
|
- console.log('bb', this._buttonList, e,e.target._params)
|
|
|
|
|
this._buttonList.forEach(it => {
|
|
this._buttonList.forEach(it => {
|
|
|
if (!it.button.disabledFlag) {
|
|
if (!it.button.disabledFlag) {
|
|
|
it.button.disabledFlag = true;
|
|
it.button.disabledFlag = true;
|
|
@@ -870,7 +899,7 @@ export const indexMixin = {
|
|
|
}
|
|
}
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
_this.resizeTable() // 重新计算表格高度
|
|
_this.resizeTable() // 重新计算表格高度
|
|
|
- }, 600)
|
|
|
|
|
|
|
+ }, 800)
|
|
|
// _this.columnDrop2()
|
|
// _this.columnDrop2()
|
|
|
//监听form页面滚动
|
|
//监听form页面滚动
|
|
|
_this.$nextTick(() => {
|
|
_this.$nextTick(() => {
|
|
@@ -992,7 +1021,7 @@ export const indexMixin = {
|
|
|
this.addKeyBoardEvent()
|
|
this.addKeyBoardEvent()
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
this.resizeTable() // 重新计算表格高度
|
|
this.resizeTable() // 重新计算表格高度
|
|
|
- }, 600)
|
|
|
|
|
|
|
+ }, 800)
|
|
|
},
|
|
},
|
|
|
deactivated() {
|
|
deactivated() {
|
|
|
//清空快捷键
|
|
//清空快捷键
|
|
@@ -1030,7 +1059,15 @@ export const indexMixin = {
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
|
|
|
+ localRemove('maxFlag');
|
|
|
this._mountedInit(); // 调用加载完后的方法
|
|
this._mountedInit(); // 调用加载完后的方法
|
|
|
|
|
+ this.$nextTick(()=>{
|
|
|
|
|
+ // 计算main-div的高度
|
|
|
|
|
+ let mainDiv = document.getElementsByClassName('main-div');
|
|
|
|
|
+ if (mainDiv && mainDiv.length > 0) {
|
|
|
|
|
+ this._mainHeight = mainDiv[0].clientHeight;
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
}
|
|
}
|
|
|
|
|
|