diff --git a/src/assets/less/common.less b/src/assets/less/common.less
index 93ab9ccc..f5f25445 100644
--- a/src/assets/less/common.less
+++ b/src/assets/less/common.less
@@ -37,7 +37,7 @@
/*列表上方操作按钮区域*/
.ant-card-body .table-operator,
.table-operator {
- margin-bottom: 29px;
+ margin-bottom: 15px;
font-size: 14px;
font-weight: 400;
color: #040B29;
@@ -59,6 +59,10 @@
margin-right: 16px;
}
+/deep/ .ant-table-pagination.ant-pagination {
+ margin-bottom: 0;
+}
+
/** Button按钮间距 */
.table-operator .ant-btn {
margin: 0 8px 8px 0;
@@ -826,6 +830,7 @@
.iconfont {
display: none;
}
+
span {
margin-left: 8px;
}
diff --git a/src/components/tools/setting.js b/src/components/tools/setting.js
index c6d12af7..bfb0e093 100644
--- a/src/components/tools/setting.js
+++ b/src/components/tools/setting.js
@@ -106,6 +106,12 @@ const updatePageHeight = () => {
'user-info-height': isEmbedded ? '0px' : '59px', // 用户信息的高度
'breadcrumb-height': isEmbedded ? '12px' : '45px' // 面包屑的高度
}
+ // 计算表格竖向滚动条使用
+ const storeObj = Object.assign(obj, {
+ oneLineSearchHeight: '56px',
+ oneLineOperationHeight: '55px'
+ })
+ store.commit('SET_DEFAULT_HEIGHT', storeObj)
for (const key in obj) {
document
.getElementsByTagName('body')[0]
diff --git a/src/mixins/ConfigurableTableMixin.js b/src/mixins/ConfigurableTableMixin.js
index 8f544eac..ad3f19dc 100644
--- a/src/mixins/ConfigurableTableMixin.js
+++ b/src/mixins/ConfigurableTableMixin.js
@@ -8,6 +8,7 @@ import store from '@/store'
import { isHasPermission } from '../utils/hasPermission.js'
import { FieldType } from '../enums/commonEnums.js'
import { filterObj } from '../utils/util.js'
+import { mapGetters } from 'vuex'
let importModalLoading
@@ -57,10 +58,21 @@ export const ConfigurableTableMixin = {
tokenHeader: { 'X-Access-Token': Vue.ls.get(ACCESS_TOKEN) },
getTableHeaderFunc: null, // 获取表头的方法
tableSlotField: [], // 表格需要使用插槽的字段,dbFieldName
- disabledMixinsCreate: false
+ disabledMixinsCreate: false,
+ isBackTitle: false // 是否是详情页有返回的标题
}
},
computed: {
+ ...mapGetters(['defaultHeight']),
+ yScrollHeight () {
+ /**
+ * 前几个使用变量是为了配合iframe嵌套,算出页面显示范围的高度
+ * 48px:分页器的高度
+ * 48px:a-card的padding(上24+下24)
+ * 54px:表头行的高度
+ */
+ return `calc(100vh - ${this.defaultHeight['user-info-height']} - ${this.defaultHeight['breadcrumb-height']} - ${this.defaultHeight.oneLineSearchHeight} - ${this.defaultHeight.oneLineOperationHeight} - 48px - 48px - 54px - ${this.isBackTitle ? '56px' : '0'})`
+ },
importExcelUrl () {
return `${window._CONFIG.domianURL}${this.url.importUrl}`
}
diff --git a/src/mixins/JeroListMixin.js b/src/mixins/JeroListMixin.js
index 7398a2aa..203e1080 100644
--- a/src/mixins/JeroListMixin.js
+++ b/src/mixins/JeroListMixin.js
@@ -9,6 +9,7 @@ import Vue from 'vue'
import { ACCESS_TOKEN, TENANT_ID } from '@/store/mutation-types'
import store from '@/store'
import { isHasPermission } from '../utils/hasPermission'
+import { mapGetters } from 'vuex'
// 导入的加载提示
let importModalLoading
@@ -60,7 +61,8 @@ export const JeroListMixin = {
/** 高级查询拼接方式 */
superQueryMatchType: 'and',
operateMaxNum: 1, // 表格操作列最多显示的按钮,其他显示在更多中
- needFilterTableBtn: false // 是否需要过滤表格操作列没有权限的按钮
+ needFilterTableBtn: false, // 是否需要过滤表格操作列没有权限的按钮
+ isBackTitle: false // 是否是详情页有返回的标题
}
},
created () {
@@ -78,6 +80,17 @@ export const JeroListMixin = {
}
},
computed: {
+ ...mapGetters(['defaultHeight']),
+ yScrollHeight () {
+ /**
+ * 前几个使用变量是为了配合iframe嵌套,算出页面显示范围的高度
+ * 48px:分页器的高度
+ * 48px:a-card的padding(上24+下24)
+ * 54px:表头行的高度
+ */
+ log
+ return `calc(100vh - ${this.defaultHeight['user-info-height']} - ${this.defaultHeight['breadcrumb-height']} - ${this.defaultHeight.oneLineSearchHeight} - ${this.defaultHeight.oneLineOperationHeight} - 48px - 48px - 54px - ${this.isBackTitle ? '56px' : '0'})`
+ },
// token header
tokenHeader () {
const head = { 'X-Access-Token': Vue.ls.get(ACCESS_TOKEN) }
diff --git a/src/store/getters.js b/src/store/getters.js
index b7e17968..efaea520 100644
--- a/src/store/getters.js
+++ b/src/store/getters.js
@@ -1,24 +1,36 @@
import Vue from 'vue'
import { USER_INFO, ENHANCE_PRE } from '@/store/mutation-types'
+
const getters = {
device: state => state.app.device,
theme: state => state.app.theme,
color: state => state.app.color,
token: state => state.user.token,
- avatar: state => { state.user.avatar = Vue.ls.get(USER_INFO).avatar; return state.user.avatar },
+ avatar: state => {
+ state.user.avatar = Vue.ls.get(USER_INFO).avatar
+ return state.user.avatar
+ },
username: state => state.user.username,
- nickname: state => { state.user.realname = Vue.ls.get(USER_INFO).realname; return state.user.realname },
+ nickname: state => {
+ state.user.realname = Vue.ls.get(USER_INFO).realname
+ return state.user.realname
+ },
welcome: state => state.user.welcome,
permissionList: state => state.user.permissionList,
- userInfo: state => { state.user.info = Vue.ls.get(USER_INFO); return state.user.info },
+ userInfo: state => {
+ state.user.info = Vue.ls.get(USER_INFO)
+ return state.user.info
+ },
addRouters: state => state.permission.addRouters,
- onlAuthFields: state => { return state.online.authFields },
+ onlAuthFields: state => {
+ return state.online.authFields
+ },
enhanceJs: (state) => (code) => {
state.enhance.enhanceJs[code] = Vue.ls.get(ENHANCE_PRE + code)
return state.enhance.enhanceJs[code]
},
- isEmbedded: state => state.app.isEmbedded
-
+ isEmbedded: state => state.app.isEmbedded,
+ defaultHeight: state => state.app.defaultHeight
}
export default getters
diff --git a/src/store/modules/app.js b/src/store/modules/app.js
index c3202f06..c7d8d8f6 100644
--- a/src/store/modules/app.js
+++ b/src/store/modules/app.js
@@ -28,7 +28,8 @@ const app = {
color: null,
weak: false,
multipage: true, // 默认多页签模式
- isEmbedded: false // 是否嵌入其他系统
+ isEmbedded: false, // 是否嵌入其他系统
+ defaultHeight: {} // 包含用户信息的高度、面包屑的高度、单行查询条件的高度、单行操作列的高度
},
mutations: {
SET_SIDEBAR_TYPE: (state, type) => {
@@ -82,6 +83,9 @@ const app = {
},
SET_IS_EMBEDDED (state, isEmbedded) {
state.isEmbedded = isEmbedded
+ },
+ SET_DEFAULT_HEIGHT (state, defaultHeight) {
+ state.defaultHeight = defaultHeight
}
},
actions: {
diff --git a/src/views/documentTool/customComparison/CustomComparisonList.vue b/src/views/documentTool/customComparison/CustomComparisonList.vue
index 3afdbef8..ff73d416 100644
--- a/src/views/documentTool/customComparison/CustomComparisonList.vue
+++ b/src/views/documentTool/customComparison/CustomComparisonList.vue
@@ -75,7 +75,7 @@
:can-drag="true"
:loading="loading"
:pagination="ipagination"
- :scroll="{x: '100%'}"
+ :scroll="{x: '100%', y: yScrollHeight}"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:operation-list="operationList"
@change="handleTableChange"
diff --git a/src/views/documentTool/documentComparison/DocumentComparison.vue b/src/views/documentTool/documentComparison/DocumentComparison.vue
index 788c7ccb..3c96baf9 100644
--- a/src/views/documentTool/documentComparison/DocumentComparison.vue
+++ b/src/views/documentTool/documentComparison/DocumentComparison.vue
@@ -52,7 +52,7 @@
:can-drag="true"
:loading="loading"
:pagination="ipagination"
- :scroll="{x: '100%'}"
+ :scroll="{x: '100%', y: yScrollHeight}"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:operation-list="operationList"
@change="handleTableChange"
diff --git a/src/views/documentTool/documentSplit/DocumentSplit.vue b/src/views/documentTool/documentSplit/DocumentSplit.vue
index b22ea83e..649a69c1 100644
--- a/src/views/documentTool/documentSplit/DocumentSplit.vue
+++ b/src/views/documentTool/documentSplit/DocumentSplit.vue
@@ -66,7 +66,7 @@
rowKey="id"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:pagination="ipagination"
- :scroll="{x: '100%'}"
+ :scroll="{x: '100%', y: yScrollHeight}"
:loading="loading"
:operation-list="operationList"
@change="handleTableChange"
@@ -377,5 +377,6 @@ export default {
}
-
diff --git a/src/views/documentTool/documentSplit/DocumentSplitDetail.vue b/src/views/documentTool/documentSplit/DocumentSplitDetail.vue
index f26a1d4b..d0840116 100644
--- a/src/views/documentTool/documentSplit/DocumentSplitDetail.vue
+++ b/src/views/documentTool/documentSplit/DocumentSplitDetail.vue
@@ -6,20 +6,27 @@