Commit 3c54c17f authored by 何虹's avatar 何虹 💬

优化select-list,权限

parent 66a71e12
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
import commonMixins from '../../ucClass/commonMixins' import commonMixins from '../../ucClass/commonMixins'
export default { export default {
mixins: [commonMixins], mixins: [commonMixins],
components:{ components: {
// 'el-dropdown-menu': DropdownMenu, // 'el-dropdown-menu': DropdownMenu,
// 'el-dropdown': Dropdown, // 'el-dropdown': Dropdown,
// 'el-dropdown-item':DropdownItem, // 'el-dropdown-item':DropdownItem,
...@@ -215,13 +215,21 @@ export default { ...@@ -215,13 +215,21 @@ export default {
if (user_info) { if (user_info) {
const user_info_json = JSON.parse(user_info) const user_info_json = JSON.parse(user_info)
const { is_admin } = user_info_json const { is_admin } = user_info_json
if (!is_admin) {
if (!is_admin || is_admin === 0) {
// 不是管理员的情况下隐藏页面设置和action设置 // 不是管理员的情况下隐藏页面设置和action设置
tempList = tempList.filter( tempList = tempList.filter(
item => item =>
item.click !== '$setAction' && item.click !== '$setPageConfig' item.click !== '$setAction' && item.click !== '$setPageConfig'
) )
} }
} else {
if (self !== top) {
tempList = tempList.filter(
item =>
item.click !== '$setAction' && item.click !== '$setPageConfig'
)
}
} }
return tempList.filter(item => this.showItem(item)) return tempList.filter(item => this.showItem(item))
} }
......
...@@ -44,6 +44,15 @@ export default { ...@@ -44,6 +44,15 @@ export default {
boxEventMouse(event) { boxEventMouse(event) {
const that = this const that = this
event.stopPropagation() event.stopPropagation()
const user_info = sessionStorage['user_info']
if (user_info) {
const user_info_json = JSON.parse(user_info)
const { is_admin } = user_info_json
if (!is_admin || is_admin === 0) return
}
if (!user_info) {
if (top !== self) return
}
if (event.shiftKey && event.altKey && !event.ctrlKey) { if (event.shiftKey && event.altKey && !event.ctrlKey) {
that.showJsonEditDialog() that.showJsonEditDialog()
} }
......
...@@ -445,4 +445,10 @@ export default { ...@@ -445,4 +445,10 @@ export default {
.textareaInput >>> textarea { .textareaInput >>> textarea {
height: 100%; height: 100%;
} }
.dyncUiItemChildBox >>> .el-icon-time {
display: none !important;
}
.dyncUiItemChildBox >>> .el-icon-date {
display: none !important;
}
</style> </style>
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
top='10px' top='10px'
:close-on-click-modal='false' :close-on-click-modal='false'
:before-close='beforeClose' :before-close='beforeClose'
append-to-body :append-to-body='true'
center center
title="查询" title="查询"
:visible.sync="dialogTableVisible" :visible.sync="dialogTableVisible"
...@@ -347,7 +347,7 @@ export default { ...@@ -347,7 +347,7 @@ export default {
this.leftTabeData = this.removeUniq(this.leftTabeData, isSelectedList) this.leftTabeData = this.removeUniq(this.leftTabeData, isSelectedList)
}, },
async showDialog() { async showDialog() {
console.log('showDialog') if (this.getDisabled) return
const { dialogWidth, tableHeight } = this.configData const { dialogWidth, tableHeight } = this.configData
let dialogWidth_ = dialogWidth || this.dialogWidth let dialogWidth_ = dialogWidth || this.dialogWidth
if (typeof dialogWidth === 'string') { if (typeof dialogWidth === 'string') {
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
icon="el-icon-refresh" icon="el-icon-refresh"
></el-button> ></el-button>
<el-button <el-button
:disabled="linkBtnDisabled" :disabled="linkBtnDisabled||getDisabled_()"
v-if='configData.linkBtnUi' v-if='configData.linkBtnUi'
size="mini" size="mini"
@click='showAddPage' @click='showAddPage'
......
<template> <template>
<div style="width:100%;height:100%;"> <div style="width:100%;height:100%;" class="itemBoxHstable">
<template v-if="item.showType==='text'||!item.showType"> <template v-if="item.showType==='text'||!item.showType">
<span <span
style="width:100%" style="width:100%"
...@@ -300,3 +300,11 @@ export default { ...@@ -300,3 +300,11 @@ export default {
} }
} }
</script> </script>
<style scoped>
.itemBoxHstable >>> .el-icon-time {
display: none !important;
}
.itemBoxHstable >>> .el-icon-date {
display: none !important;
}
</style>
...@@ -1026,11 +1026,11 @@ export default { ...@@ -1026,11 +1026,11 @@ export default {
} */ } */
/*滑块轨道*/ /*滑块轨道*/
._hs_table .el-table__body-wrapper::-webkit-scrollbar { ._hs_table .el-table__body-wrapper::-webkit-scrollbar {
width: 8px; width: 12px;
height: 8px; height: 12px;
} }
._hs_table .el-table__body-wrapper::-webkit-scrollbar-thumb { ._hs_table .el-table__body-wrapper::-webkit-scrollbar-thumb {
background-color: #ddd; background-color: #8b8b8b;
border-radius: 3px; border-radius: 3px;
} }
/*轨道*/ /*轨道*/
......
...@@ -12,11 +12,11 @@ export default { ...@@ -12,11 +12,11 @@ export default {
event.stopPropagation() event.stopPropagation()
} }
el.addEventListener('click', el.stopProp) el.addEventListener('click', el.stopProp)
document.body.addEventListener('click', el.handler) document.body.addEventListener('click', el.handler, true)
}, },
unbind(el, binding) { unbind(el, binding) {
el.removeEventListener('click', el.stopProp) el.removeEventListener('click', el.stopProp)
document.body.removeEventListener('click', el.handler) document.body.removeEventListener('click', el.handler, true)
}, },
install(Vue) { install(Vue) {
Vue.directive('clickoutside', { Vue.directive('clickoutside', {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment