Browse Source

修复部分BUG, table border 等

master
DU 1 month ago
parent
commit
1d197631c9
  1. 53
      src/components/DataListPanel/index.vue
  2. 2
      src/layout/components/Navbar.vue
  3. 8
      src/permission.js
  4. 2
      src/store/modules/user.js
  5. 4
      src/utils/request.js
  6. 4
      src/views/flowable/definition/index.vue
  7. 3
      src/views/flowable/hazardConfig/index.vue
  8. 4
      src/views/flowable/task/form/index.vue
  9. 7
      src/views/login.vue
  10. 2
      src/views/monitor/cache/list.vue
  11. 2
      src/views/monitor/job/index.vue
  12. 2
      src/views/monitor/job/log.vue
  13. 4
      src/views/monitor/logininfor/index.vue
  14. 1
      src/views/monitor/online/index.vue
  15. 4
      src/views/monitor/operlog/index.vue
  16. 3
      src/views/points/management/index.vue
  17. 4
      src/views/system/config/index.vue
  18. 3
      src/views/system/dept/index.vue
  19. 4
      src/views/system/dict/index.vue
  20. 4
      src/views/system/expression/index.vue
  21. 4
      src/views/system/listener/index.vue
  22. 3
      src/views/system/menu/index.vue
  23. 4
      src/views/system/notice/index.vue
  24. 4
      src/views/system/post/index.vue
  25. 27
      src/views/system/role/index.vue
  26. 4
      src/views/system/user/index.vue

53
src/components/DataListPanel/index.vue

@ -1,5 +1,8 @@ @@ -1,5 +1,8 @@
<template>
<section class="data-list-panel">
<section
class="data-list-panel"
:class="{ 'data-list-panel--modern-table': modernTable }"
>
<div v-if="$slots.filters || $slots.actions" class="data-list-panel__toolbar">
<div v-if="$slots.filters" class="data-list-panel__filters">
<slot name="filters" />
@ -25,7 +28,13 @@ @@ -25,7 +28,13 @@
<script>
export default {
name: 'DataListPanel'
name: 'DataListPanel',
props: {
modernTable: {
type: Boolean,
default: false
}
}
}
</script>
@ -76,29 +85,31 @@ export default { @@ -76,29 +85,31 @@ export default {
min-height: 36px;
}
::v-deep .data-list-panel__table .el-table,
::v-deep .data-list-panel__table .el-table__expanded-cell {
background: transparent;
}
.data-list-panel--modern-table {
::v-deep .data-list-panel__table .el-table,
::v-deep .data-list-panel__table .el-table__expanded-cell {
background: transparent;
}
::v-deep .data-list-panel__table .el-table--border,
::v-deep .data-list-panel__table .el-table--group {
border: 0;
}
::v-deep .data-list-panel__table .el-table--border,
::v-deep .data-list-panel__table .el-table--group {
border: 0;
}
::v-deep .data-list-panel__table .el-table--border::after,
::v-deep .data-list-panel__table .el-table--group::after,
::v-deep .data-list-panel__table .el-table__cell {
border-right: 0;
}
::v-deep .data-list-panel__table .el-table--border::after,
::v-deep .data-list-panel__table .el-table--group::after,
::v-deep .data-list-panel__table .el-table__cell {
border-right: 0;
}
::v-deep .data-list-panel__table .el-table::before {
height: 1px;
background: var(--prototype-divider, #f0f0f2);
}
::v-deep .data-list-panel__table .el-table::before {
height: 1px;
background: var(--prototype-divider, #f0f0f2);
}
::v-deep .data-list-panel__table th.el-table__cell {
background: #fafbfc;
::v-deep .data-list-panel__table th.el-table__cell {
background: #fafbfc;
}
}
::v-deep .data-list-filter-form {

2
src/layout/components/Navbar.vue

@ -109,7 +109,7 @@ export default { @@ -109,7 +109,7 @@ export default {
type: 'warning'
}).then(() => {
this.$store.dispatch('LogOut').then(() => {
location.href = '/index';
window.location.replace('/login')
})
}).catch(() => {});
}

8
src/permission.js

@ -32,11 +32,11 @@ router.beforeEach((to, from, next) => { @@ -32,11 +32,11 @@ router.beforeEach((to, from, next) => {
next({ ...to, replace: true }) // hack方法 确保addRoutes已完成
})
}).catch(err => {
store.dispatch('LogOut').then(() => {
Message.error(err)
next({ path: '/' })
})
store.dispatch('FedLogOut').then(() => {
Message.error(err)
next({ path: '/login', replace: true })
})
})
} else {
next()
}

2
src/store/modules/user.js

@ -91,6 +91,8 @@ const user = { @@ -91,6 +91,8 @@ const user = {
FedLogOut({ commit }) {
return new Promise(resolve => {
commit('SET_TOKEN', '')
commit('SET_ROLES', [])
commit('SET_PERMISSIONS', [])
removeToken()
resolve()
})

4
src/utils/request.js

@ -86,8 +86,8 @@ service.interceptors.response.use(res => { @@ -86,8 +86,8 @@ service.interceptors.response.use(res => {
isRelogin.show = true;
MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', { confirmButtonText: '重新登录', cancelButtonText: '取消', type: 'warning' }).then(() => {
isRelogin.show = false;
store.dispatch('LogOut').then(() => {
location.href = '/index';
store.dispatch('FedLogOut').then(() => {
window.location.replace('/login');
})
}).catch(() => {
isRelogin.show = false;

4
src/views/flowable/definition/index.vue

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
<template>
<div class="app-container system-list-page">
<data-list-panel>
<data-list-panel modern-table>
<template #filters>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" class="data-list-filter-form">
<el-form-item label="名称" prop="name">
@ -68,7 +68,7 @@ @@ -68,7 +68,7 @@
</template>
</el-alert>
</template>
<el-table v-loading="loading" fit :data="definitionList" class="data-list-table" @selection-change="handleSelectionChange">
<el-table v-loading="loading" fit :data="definitionList" border class="data-list-table" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="50" align="center" />
<el-table-column label="流程编号" align="center" prop="deploymentId" :show-overflow-tooltip="true"/>
<el-table-column label="流程标识" align="center" prop="flowKey" :show-overflow-tooltip="true" />

3
src/views/flowable/hazardConfig/index.vue

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
<template>
<div class="app-container hazard-flow-config-page">
<data-list-panel>
<data-list-panel modern-table>
<template #filters>
<el-form
v-show="showSearch"
@ -109,6 +109,7 @@ @@ -109,6 +109,7 @@
<el-table
v-loading="loading"
:data="configList"
border
row-key="id"
class="data-list-table"
empty-text="暂无流程模板配置"

4
src/views/flowable/task/form/index.vue

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
<template>
<div class="app-container system-list-page">
<data-list-panel>
<data-list-panel modern-table>
<template #filters>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" class="data-list-filter-form">
<el-form-item label="表单名称" prop="formName">
@ -59,7 +59,7 @@ @@ -59,7 +59,7 @@
</el-row>
</template>
<el-table v-loading="loading" :data="formList" class="data-list-table" @selection-change="handleSelectionChange">
<el-table v-loading="loading" :data="formList" border class="data-list-table" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="50" align="center" />
<el-table-column label="表单主键" align="center" prop="formId" />
<el-table-column label="表单名称" align="center" prop="formName" />

7
src/views/login.vue

@ -124,7 +124,12 @@ export default { @@ -124,7 +124,12 @@ export default {
Cookies.remove('rememberMe');
}
this.$store.dispatch("Login", this.loginForm).then(() => {
this.$router.push({ path: this.redirect || '/hazard/ledger' }).catch(() => {})
const redirectPath = this.redirect && this.redirect.split('?')[0]
const invalidRedirects = ['/index', '/404', '/login']
const targetPath = redirectPath && !invalidRedirects.includes(redirectPath)
? this.redirect
: '/hazard/ledger'
this.$router.replace({ path: targetPath }).catch(() => {})
}).catch(() => {
this.loading = false;
if (this.captchaEnabled) {

2
src/views/monitor/cache/list.vue vendored

@ -15,6 +15,7 @@ @@ -15,6 +15,7 @@
<el-table
v-loading="loading"
:data="cacheNames"
border
:height="tableHeight"
highlight-current-row
@row-click="getCacheKeys"
@ -73,6 +74,7 @@ @@ -73,6 +74,7 @@
<el-table
v-loading="subLoading"
:data="cacheKeys"
border
:height="tableHeight"
highlight-current-row
@row-click="handleCacheValue"

2
src/views/monitor/job/index.vue

@ -91,7 +91,7 @@ @@ -91,7 +91,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="jobList" @selection-change="handleSelectionChange">
<el-table v-loading="loading" :data="jobList" border @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="任务编号" width="100" align="center" prop="jobId" />
<el-table-column label="任务名称" align="center" prop="jobName" :show-overflow-tooltip="true" />

2
src/views/monitor/job/log.vue

@ -101,7 +101,7 @@ @@ -101,7 +101,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="jobLogList" @selection-change="handleSelectionChange">
<el-table v-loading="loading" :data="jobLogList" border @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="日志编号" width="80" align="center" prop="jobLogId" />
<el-table-column label="任务名称" align="center" prop="jobName" :show-overflow-tooltip="true" />

4
src/views/monitor/logininfor/index.vue

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
<template>
<div class="app-container system-list-page">
<data-list-panel>
<data-list-panel modern-table>
<template #filters>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" class="data-list-filter-form">
<el-form-item label="登录地址" prop="ipaddr">
@ -97,7 +97,7 @@ @@ -97,7 +97,7 @@
</el-row>
</template>
<el-table ref="tables" v-loading="loading" :data="list" class="data-list-table" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="handleSortChange">
<el-table ref="tables" v-loading="loading" :data="list" border class="data-list-table" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="handleSortChange">
<el-table-column type="selection" width="50" align="center" />
<el-table-column label="访问编号" align="center" prop="infoId" />
<el-table-column label="用户名称" align="center" prop="userName" :show-overflow-tooltip="true" sortable="custom" :sort-orders="['descending', 'ascending']" />

1
src/views/monitor/online/index.vue

@ -26,6 +26,7 @@ @@ -26,6 +26,7 @@
<el-table
v-loading="loading"
:data="list.slice((pageNum-1)*pageSize,pageNum*pageSize)"
border
style="width: 100%;"
>
<el-table-column label="序号" type="index" align="center">

4
src/views/monitor/operlog/index.vue

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
<template>
<div class="app-container system-list-page">
<data-list-panel>
<data-list-panel modern-table>
<template #filters>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" class="data-list-filter-form">
<el-form-item label="操作地址" prop="operIp">
@ -111,7 +111,7 @@ @@ -111,7 +111,7 @@
</el-row>
</template>
<el-table ref="tables" v-loading="loading" :data="list" class="data-list-table" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="handleSortChange">
<el-table ref="tables" v-loading="loading" :data="list" border class="data-list-table" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="handleSortChange">
<el-table-column type="selection" width="50" align="center" />
<el-table-column label="日志编号" align="center" prop="operId" />
<el-table-column label="系统模块" align="center" prop="title" :show-overflow-tooltip="true" />

3
src/views/points/management/index.vue

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
<div class="app-container points-management">
<el-tabs v-model="activeTab">
<el-tab-pane label="积分规则" name="rules">
<data-list-panel>
<data-list-panel modern-table>
<template #filters>
<el-form
ref="queryForm"
@ -85,6 +85,7 @@ @@ -85,6 +85,7 @@
<el-table
v-loading="loading"
:data="ruleList"
border
class="data-list-table"
empty-text="暂无积分规则"
>

4
src/views/system/config/index.vue

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
<template>
<div class="app-container system-list-page">
<data-list-panel>
<data-list-panel modern-table>
<template #filters>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" class="data-list-filter-form">
<el-form-item label="参数名称" prop="configName">
@ -98,7 +98,7 @@ @@ -98,7 +98,7 @@
</el-row>
</template>
<el-table v-loading="loading" :data="configList" class="data-list-table" @selection-change="handleSelectionChange">
<el-table v-loading="loading" :data="configList" border class="data-list-table" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="50" align="center" />
<el-table-column label="参数主键" align="center" prop="configId" />
<el-table-column label="参数名称" align="center" prop="configName" :show-overflow-tooltip="true" />

3
src/views/system/dept/index.vue

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
<template>
<div class="app-container system-list-page">
<data-list-panel>
<data-list-panel modern-table>
<template #filters>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" class="data-list-filter-form">
<el-form-item label="部门名称" prop="deptName">
@ -53,6 +53,7 @@ @@ -53,6 +53,7 @@
v-if="refreshTable"
v-loading="loading"
:data="deptList"
border
row-key="deptId"
:default-expand-all="isExpandAll"
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"

4
src/views/system/dict/index.vue

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
<template>
<div class="app-container system-list-page">
<data-list-panel>
<data-list-panel modern-table>
<template #filters>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" class="data-list-filter-form">
<el-form-item label="字典名称" prop="dictName">
@ -103,7 +103,7 @@ @@ -103,7 +103,7 @@
</el-row>
</template>
<el-table v-loading="loading" :data="typeList" class="data-list-table" @selection-change="handleSelectionChange">
<el-table v-loading="loading" :data="typeList" border class="data-list-table" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="50" align="center" />
<el-table-column label="字典编号" align="center" prop="dictId" />
<el-table-column label="字典名称" align="center" prop="dictName" :show-overflow-tooltip="true" />

4
src/views/system/expression/index.vue

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
<template>
<div class="app-container system-list-page">
<data-list-panel>
<data-list-panel modern-table>
<template #filters>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" class="data-list-filter-form">
<el-form-item label="名称" prop="name">
@ -68,7 +68,7 @@ @@ -68,7 +68,7 @@
</el-row>
</template>
<el-table v-loading="loading" :data="expressionList" class="data-list-table" @selection-change="handleSelectionChange">
<el-table v-loading="loading" :data="expressionList" border class="data-list-table" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="50" align="center" />
<el-table-column label="主键" align="center" prop="id" />
<el-table-column label="名称" align="center" prop="name" />

4
src/views/system/listener/index.vue

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
<template>
<div class="app-container system-list-page">
<data-list-panel>
<data-list-panel modern-table>
<template #filters>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" class="data-list-filter-form">
<el-form-item label="名称" prop="name">
@ -68,7 +68,7 @@ @@ -68,7 +68,7 @@
</el-row>
</template>
<el-table v-loading="loading" :data="listenerList" class="data-list-table" @selection-change="handleSelectionChange">
<el-table v-loading="loading" :data="listenerList" border class="data-list-table" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="50" align="center" />
<el-table-column label="名称" align="center" prop="name" />
<el-table-column label="监听类型" align="center" prop="type">

3
src/views/system/menu/index.vue

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
<template>
<div class="app-container system-list-page">
<data-list-panel>
<data-list-panel modern-table>
<template #filters>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" class="data-list-filter-form">
<el-form-item label="菜单名称" prop="menuName">
@ -53,6 +53,7 @@ @@ -53,6 +53,7 @@
v-if="refreshTable"
v-loading="loading"
:data="menuList"
border
row-key="menuId"
:default-expand-all="isExpandAll"
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"

4
src/views/system/notice/index.vue

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
<template>
<div class="app-container system-list-page">
<data-list-panel>
<data-list-panel modern-table>
<template #filters>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" class="data-list-filter-form">
<el-form-item label="公告标题" prop="noticeTitle">
@ -68,7 +68,7 @@ @@ -68,7 +68,7 @@
</el-row>
</template>
<el-table v-loading="loading" :data="noticeList" class="data-list-table" @selection-change="handleSelectionChange">
<el-table v-loading="loading" :data="noticeList" border class="data-list-table" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="50" align="center" />
<el-table-column label="序号" align="center" prop="noticeId" width="100" />
<el-table-column

4
src/views/system/post/index.vue

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
<template>
<div class="app-container system-list-page">
<data-list-panel>
<data-list-panel modern-table>
<template #filters>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" class="data-list-filter-form">
<el-form-item label="岗位编码" prop="postCode">
@ -76,7 +76,7 @@ @@ -76,7 +76,7 @@
</el-row>
</template>
<el-table v-loading="loading" :data="postList" class="data-list-table" @selection-change="handleSelectionChange">
<el-table v-loading="loading" :data="postList" border class="data-list-table" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="50" align="center" />
<el-table-column label="岗位编号" align="center" prop="postId" />
<el-table-column label="岗位编码" align="center" prop="postCode" />

27
src/views/system/role/index.vue

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
<template>
<div class="app-container role-management-page">
<data-list-panel>
<data-list-panel modern-table>
<template #filters>
<el-form
v-show="showSearch"
@ -96,6 +96,7 @@ @@ -96,6 +96,7 @@
<el-table
v-loading="loading"
:data="roleList"
border
class="role-list-table"
@selection-change="handleSelectionChange"
>
@ -132,8 +133,22 @@ @@ -132,8 +133,22 @@
@click="handleDelete(scope.row)"
v-hasPermi="['system:role:remove']"
>删除</el-button>
<el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['system:role:edit']">
<el-button size="mini" type="primary">更多<i class="el-icon-arrow-down el-icon--right" /></el-button>
<el-dropdown
trigger="click"
size="mini"
@command="(command) => handleCommand(command, scope.row)"
v-hasPermi="['system:role:edit']"
>
<el-button
class="role-more-button"
size="mini"
type="primary"
aria-label="更多操作"
>
<el-tooltip content="更多操作" placement="top">
<i class="el-icon-more" />
</el-tooltip>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item
command="handleDataScope"
@ -659,6 +674,12 @@ export default { @@ -659,6 +674,12 @@ export default {
margin-left: 6px;
}
::v-deep .role-list-table .role-more-button {
width: 32px;
padding-right: 0;
padding-left: 0;
}
::v-deep .role-list-actions .top-right-btn {
float: none;
margin-left: 8px;

4
src/views/system/user/index.vue

@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
</el-col>
<el-col :span="20" :xs="24" class="user-list-column">
<data-list-panel>
<data-list-panel modern-table>
<template #filters>
<el-form v-show="showSearch" ref="queryForm" :model="queryParams" size="small" :inline="true" class="user-filter-form">
<el-form-item prop="userName">
@ -128,7 +128,7 @@ @@ -128,7 +128,7 @@
</div>
</template>
<el-table v-loading="loading" :data="userList" class="user-list-table" @selection-change="handleSelectionChange">
<el-table v-loading="loading" :data="userList" border class="user-list-table" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="50" align="center" />
<el-table-column v-if="columns[0].visible" key="userId" label="用户编号" prop="userId" width="105" />
<el-table-column v-if="columns[1].visible" key="userName" label="用户账号" prop="userName" min-width="120" :show-overflow-tooltip="true" />

Loading…
Cancel
Save