bug 77959

This commit is contained in:
赵霄
2023-11-02 10:52:46 +08:00
parent 6d6e1fa505
commit aa40cf0ebf
16 changed files with 104 additions and 27 deletions
+6 -1
View File
@@ -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;
}
+6
View File
@@ -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]
+13 -1
View File
@@ -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:分页器的高度
* 48pxa-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}`
}
+14 -1
View File
@@ -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:分页器的高度
* 48pxa-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) }
+18 -6
View File
@@ -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
+5 -1
View File
@@ -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: {
@@ -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"
@@ -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"
@@ -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 {
}
</script>
<style scoped>
<style scoped lang="less">
@import '~@assets/less/common.less';
</style>
@@ -6,20 +6,27 @@
<a-input-search class="tree-search" v-model="searchValue" :placeholder="$t('nodeQuickLookup')" @search="onSearch" />
<div class="page-tree-box page-tree-box-has-search">
<a-spin :spinning="loading">
<a-tree :show-line="true" :show-icon="true" :tree-data="treeData" :selected-keys="selectedKeys" :replaceFields="{key: 'id'}">
<a-tree :show-line="true"
:show-icon="true"
:tree-data="treeData"
:selected-keys="selectedKeys"
:replaceFields="{key: 'id'}">
<template #title="record">
<div class="tree-operate-node"
@mouseenter="handleTreeMouseover(record.id)"
@mouseleave="handleTreeMouseout(record.id)"
@click="handleSelectTreeNode(record)">
<a-icon class="parent-node-icon" type="folder" v-if="record.dataRef.children && record.dataRef.children.length > 0" />
<a-icon class="parent-node-icon"
type="folder"
v-if="record.dataRef.children && record.dataRef.children.length > 0" />
<a-tooltip>
<template #title>
{{ record.name }}{{ record.itemName }}
</template>
<span class="tree-node-custom-title">{{ record.name }} {{ record.itemName }}</span>
</a-tooltip>
<div class="tree-operate-node-btn-box" :class="{'tree-operate-node-btn-box-hide': record.id !== mouseInNodeKey}">
<div class="tree-operate-node-btn-box"
:class="{'tree-operate-node-btn-box-hide': record.id !== mouseInNodeKey}">
<!--新增-->
<a-button icon="plus"
class="tree-operate-node-btn"
@@ -131,7 +138,7 @@
rowKey="id"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:pagination="ipagination"
:scroll="{x: '100%'}"
:scroll="{x: '100%', y: yScrollHeight}"
:operation-list="operationList"
:loading="loading"
@change="tableOnChange"
@@ -272,7 +279,8 @@ export default {
},
disabledMixinsCreate: true,
tableSlotField: ['item_content', 'interpretation_articles'],
uploadData: {}
uploadData: {},
isBackTitle: true
}
},
computed: {
@@ -155,7 +155,18 @@ export default {
}
},
computed: {
...mapGetters(['userInfo'])
...mapGetters(['userInfo']),
yScrollHeight () {
/**
* 前几个使用变量是为了配合iframe嵌套,算出页面显示范围的高度
* 56pxtab的高度
* 48px:分页器的高度
* 48pxa-card的padding(上24+下24
* 54px:表头行的高度
*/
log
return `calc(100vh - ${this.defaultHeight['user-info-height']} - ${this.defaultHeight['breadcrumb-height']} - ${this.defaultHeight.oneLineSearchHeight} - 56px - 48px - 48px - 54px - ${this.isBackTitle ? '56px' : '0'})`
},
},
created () {
this.queryParam.responsibleDepartment = this.userInfo.departIds
@@ -68,7 +68,7 @@
rowKey="id"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:pagination="ipagination"
:scroll="{x: '100%'}"
:scroll="{x: '100%', y: yScrollHeight}"
@change="handleTableChange">
<!-- 项目名称-->
@@ -215,5 +215,5 @@ export default {
</script>
<style scoped lang="less">
@import '~@assets/less/common.less';
</style>
@@ -125,7 +125,7 @@
rowKey="id"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:pagination="ipagination"
:scroll="{x: '100%'}"
:scroll="{x: '100%', y: yScrollHeight}"
:loading="loading"
@change="tableOnChange">
@@ -218,6 +218,7 @@ import UserSelectModal from '../../../components/selection/UserSelectModal.vue'
import DomesticSystemTreeModal from './modules/DomesticSystemTreeModal.vue'
import SelectionDomesticStandardDrawer from './modules/SelectionDomesticStandardDrawer.vue'
import { postDownFile } from '../../../api/manage.js'
import { mapGetters } from 'vuex'
export default {
name: 'DomesticStandardList',
@@ -12,7 +12,11 @@
<a-col :md="6" :sm="8">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchReset" icon="reload" ghost>{{ $t('reset') }}</a-button>
<a-button type="primary" @click="searchQuery" icon="search" style="margin-left: 8px" v-has="'dynamicMessage:search'">
<a-button type="primary"
@click="searchQuery"
icon="search"
style="margin-left: 8px"
v-has="'dynamicMessage:search'">
{{ $t('query') }}
</a-button>
</span>
@@ -32,7 +36,7 @@
rowKey="id"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:pagination="ipagination"
:scroll="{x: 1000}"
:scroll="{x: 1000, y: yScrollHeight}"
:loading="loading"
:operation-list="operationList"
@change="handleTableChange"
@@ -117,7 +117,7 @@
rowKey="id"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:pagination="ipagination"
:scroll="{x: '100%'}"
:scroll="{x: '100%', y: yScrollHeight}"
:loading="loading"
@change="tableOnChange">
@@ -117,7 +117,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"