|
|
@@ -15,7 +15,7 @@
|
|
|
<SimpleFilterPanel
|
|
|
:key="'simple-filter-panel-' + windowNo"
|
|
|
v-model:searchText="searchText"
|
|
|
- :disabled="showComplexFilterPanel == true"
|
|
|
+ :disabled="complexFilterParams != null"
|
|
|
:window-no="windowNo"
|
|
|
:tab-index="tabIndex"
|
|
|
:filter-schema="tab.filterSchema"
|
|
|
@@ -491,7 +491,6 @@ export default {
|
|
|
// Notify.error('提示', successData.errorMessage, false);
|
|
|
// return;
|
|
|
// }
|
|
|
- let complexFilterParams = null;
|
|
|
|
|
|
if (successData.data != null && successData.data != '') {
|
|
|
let tabQueryParam = JSON.parse(successData.data);
|
|
|
@@ -501,7 +500,7 @@ export default {
|
|
|
// 简单过滤条件
|
|
|
_self.searchText = tabQueryParam.simpleFilterParams;
|
|
|
// 复杂过滤条件
|
|
|
- complexFilterParams = tabQueryParam.complexFilterParams;
|
|
|
+ _self.complexFilterParams = tabQueryParam.complexFilterParams;
|
|
|
// 排序
|
|
|
_self.sortStr = tabQueryParam.sortStr;
|
|
|
// 显示高级过滤
|
|
|
@@ -510,9 +509,25 @@ export default {
|
|
|
}else{
|
|
|
// 简单过滤条件
|
|
|
_self.searchText = null;
|
|
|
+ // 复杂过滤条件
|
|
|
+ _self.complexFilterParams = null;
|
|
|
+
|
|
|
+ // 分页数据
|
|
|
+ _self.pagination = {
|
|
|
+ total: 0,
|
|
|
+ per_page: Common.pageSize, // required
|
|
|
+ current_page: 1, // required
|
|
|
+ last_page: 10, // required
|
|
|
+ };
|
|
|
+
|
|
|
+ _self.rememberPageSize();
|
|
|
+ // 切换窗口的时候清空排序字段
|
|
|
+ _self.sortStr = '';
|
|
|
+ // 显示高级过滤
|
|
|
+ _self.showComplexFilterPanel = false;
|
|
|
}
|
|
|
|
|
|
- _self.loadWindow(_self.searchText, complexFilterParams);
|
|
|
+ _self.loadWindow();
|
|
|
},
|
|
|
errorData => {
|
|
|
Common.processException(errorData);
|
|
|
@@ -527,11 +542,6 @@ export default {
|
|
|
beforeUnmount: function () {
|
|
|
let _self = this;
|
|
|
|
|
|
- // 获取复杂查询的条件
|
|
|
- let complexFilterParams = null;
|
|
|
- if(_self.$refs.complexFilterPanel != null){
|
|
|
- complexFilterParams = _self.$refs.complexFilterPanel.getFilterParams();
|
|
|
- }
|
|
|
|
|
|
var tabQueryParam = {
|
|
|
// 分页数据
|
|
|
@@ -539,7 +549,7 @@ export default {
|
|
|
// 简单过滤条件
|
|
|
simpleFilterParams: _self.searchText,
|
|
|
// 复杂过滤条件
|
|
|
- complexFilterParams: complexFilterParams,
|
|
|
+ complexFilterParams: _self.complexFilterParams,
|
|
|
// 排序
|
|
|
sortStr: _self.sortStr,
|
|
|
// 是否现在复杂查询面板
|
|
|
@@ -623,21 +633,20 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
/**
|
|
|
- * 加载窗口的定义
|
|
|
- * @param complexFilterParams 复杂过滤条件
|
|
|
- */
|
|
|
- loadWindow: function (complexFilterParams) {
|
|
|
+ * 加载窗口的定义
|
|
|
+ */
|
|
|
+ loadWindow: function () {
|
|
|
var _self = this;
|
|
|
if (_self.windowNo) {
|
|
|
WindowServerUtil.getWindowById(_self.windowNo, function (data) {
|
|
|
WindowClientUtil.parseFilterSchema(data);
|
|
|
- _self.initWindow(data, complexFilterParams);
|
|
|
+ _self.initWindow(data);
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
|
|
|
// 根据windowId获取window
|
|
|
- initWindow: function (window, complexFilterParams) {
|
|
|
+ initWindow: function (window) {
|
|
|
var _self = this;
|
|
|
|
|
|
DataRecoveryResource.queryDataRecoveryDtoByUserId(_self.windowNo, 'edit').then(successData => {
|
|
|
@@ -649,16 +658,18 @@ export default {
|
|
|
Common.processException(errorData);
|
|
|
});
|
|
|
|
|
|
- // 切换窗口的时候清空排序字段
|
|
|
- _self.sortStr = '';
|
|
|
|
|
|
// 切换窗口的时候恢复分页插件到第一页
|
|
|
- _self.pagination = {
|
|
|
- total: 0,
|
|
|
- per_page: Common.pageSize, // required
|
|
|
- current_page: 1, // required
|
|
|
- last_page: 10, // required
|
|
|
- };
|
|
|
+ // toggled by jack 2024-01-11
|
|
|
+ // 界面后退的时候,需要记住分页数据。
|
|
|
+ //_self.pagination = {
|
|
|
+ // total: 0,
|
|
|
+ // per_page: Common.pageSize, // required
|
|
|
+ // current_page: 1, // required
|
|
|
+ // last_page: 10, // required
|
|
|
+ //};
|
|
|
+
|
|
|
+
|
|
|
_self.rememberPageSize();
|
|
|
// _self.windowNo = window.no;
|
|
|
_self.window = window;
|
|
|
@@ -687,13 +698,10 @@ export default {
|
|
|
);
|
|
|
|
|
|
_self.$nextTick(function () {
|
|
|
-
|
|
|
-
|
|
|
// 设置复杂查询条件
|
|
|
- if (complexFilterParams != null && _self.$refs.complexFilterPanel != null) {
|
|
|
- _self.$refs.complexFilterPanel.setFilterParams(complexFilterParams);
|
|
|
+ if (_self.complexFilterParams != null && _self.$refs.complexFilterPanel != null) {
|
|
|
+ _self.$refs.complexFilterPanel.setFilterParams(_self.complexFilterParams);
|
|
|
}
|
|
|
-
|
|
|
_self.queryGridData(false);
|
|
|
});
|
|
|
|
|
|
@@ -742,10 +750,13 @@ export default {
|
|
|
// 简单过滤条件
|
|
|
let simpleFilterCondition = null;
|
|
|
let filterParams = null;
|
|
|
- if(_self.showComplexFilterPanel == true){
|
|
|
- if(_self.$refs.complexFilterPanel != null){
|
|
|
- filterParams = _self.$refs.complexFilterPanel.getFilterParams();
|
|
|
- }
|
|
|
+ // BUG fixed by jack 2024-01-11
|
|
|
+ // 不应该以仪表盘的显示隐藏状态作为判断是否是高级搜索的依据。
|
|
|
+ // 1. 点击高级搜索的【查询】按钮。
|
|
|
+ // 2. 保存高级搜索的查询条件 complexFilterParams
|
|
|
+ // 3. 判断complexFilterParams是否为空,作为是否是高级搜索的依据。
|
|
|
+ if(_self.complexFilterParams != null){
|
|
|
+ filterParams = _self.complexFilterParams;
|
|
|
}else{
|
|
|
simpleFilterCondition = _self.searchText;
|
|
|
}
|
|
|
@@ -1044,27 +1055,24 @@ export default {
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
- * 简单搜索
|
|
|
- */
|
|
|
+ * 简单搜索
|
|
|
+ */
|
|
|
simpleSearch: function () {
|
|
|
var _self = this;
|
|
|
_self.pagination.current_page = 1;
|
|
|
_self.showComplexFilterPanel = false;
|
|
|
- if(_self.$refs.complexFilterPanel != null){
|
|
|
- _self.complexFilterParams = _self.$refs.complexFilterPanel.getFilterParams();
|
|
|
- }
|
|
|
+ _self.complexFilterParams = null;
|
|
|
_self.queryGridData(true);
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
- * 高级搜索
|
|
|
- */
|
|
|
+ * 高级搜索
|
|
|
+ */
|
|
|
advancedSearchOk: function (filterParams) {
|
|
|
var _self = this;
|
|
|
_self.pagination.current_page = 1;
|
|
|
- if(_self.$refs.complexFilterPanel != null){
|
|
|
- _self.complexFilterParams = filterParams;
|
|
|
- }
|
|
|
+ _self.complexFilterParams = filterParams;
|
|
|
+ _self.searchText = null;
|
|
|
_self.queryGridData(true);
|
|
|
},
|
|
|
|