Merge pull request #3570 from dataease/pr@dev@fix_panel-new-folder

fix(仪表板): 修复新建用户无法创建仪表板目录问题
This commit is contained in:
xuwei-fit2cloud 2022-11-01 11:07:53 +08:00 committed by GitHub
commit 6fc978f8f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -104,7 +104,7 @@
</span> </span>
</el-tree> </el-tree>
<p <p
v-if="defaultData.length > 3" v-if="defaultData && defaultData.length > 3"
class="default-expansion" class="default-expansion"
@click="defaultExpansion = !defaultExpansion" @click="defaultExpansion = !defaultExpansion"
> >
@ -333,7 +333,8 @@
@click="close()" @click="close()"
>{{ >{{
$t('panel.cancel') $t('panel.cancel')
}}</el-button> }}
</el-button>
<el-button <el-button
type="primary" type="primary"
size="mini" size="mini"
@ -409,7 +410,8 @@
@click="closeMoveGroup()" @click="closeMoveGroup()"
>{{ >{{
$t('dataset.cancel') $t('dataset.cancel')
}}</el-button> }}
</el-button>
<el-button <el-button
:disabled="groupMoveConfirmDisabled" :disabled="groupMoveConfirmDisabled"
type="primary" type="primary"
@ -568,9 +570,9 @@ export default {
return this.editPanel.titlePre + this.editPanel.titleSuf return this.editPanel.titlePre + this.editPanel.titleSuf
}, },
expandedData() { expandedData() {
return this.defaultExpansion return (!this.defaultExpansion && this.defaultData && this.defaultData.length > 3)
? this.defaultData ? this.defaultData.slice(0, 3)
: this.defaultData.slice(0, 3) : this.defaultData
}, },
...mapState(['nowPanelTrackInfo']) ...mapState(['nowPanelTrackInfo'])
}, },
@ -846,7 +848,8 @@ export default {
this.defaultTree() this.defaultTree()
}) })
}) })
.catch(() => {}) .catch(() => {
})
}, },
clearCanvas() { clearCanvas() {
@ -994,7 +997,8 @@ export default {
} }
return data return data
}, },
newPanelSave(id) {}, newPanelSave(id) {
},
// //
activeNodeAndClick(panelInfo) { activeNodeAndClick(panelInfo) {
if (panelInfo) { if (panelInfo) {
@ -1108,7 +1112,7 @@ export default {
} }
</script> </script>
<style lang='scss' scoped> <style lang="scss" scoped>
.default-expansion { .default-expansion {
height: 40px; height: 40px;
width: 232px; width: 232px;
@ -1121,19 +1125,23 @@ export default {
padding-left: 22px; padding-left: 22px;
display: flex; display: flex;
align-items: center; align-items: center;
i { i {
margin-left: 5px; margin-left: 5px;
} }
} }
.main-area-input { .main-area-input {
::v-deep.el-input-group__append { ::v-deep.el-input-group__append {
width: 70px; width: 70px;
background: transparent; background: transparent;
.el-input__inner { .el-input__inner {
padding-left: 12px; padding-left: 12px;
} }
} }
} }
.header-title { .header-title {
font-size: 14px; font-size: 14px;
flex: 1; flex: 1;
@ -1165,6 +1173,7 @@ export default {
.dialog-css ::v-deep .el-dialog__body { .dialog-css ::v-deep .el-dialog__body {
padding: 15px 20px; padding: 15px 20px;
} }
.dialog-css ::v-deep .el-dialog__body { .dialog-css ::v-deep .el-dialog__body {
padding: 10px 20px 20px; padding: 10px 20px 20px;
} }
@ -1173,6 +1182,7 @@ export default {
/*display: none;*/ /*display: none;*/
visibility: hidden; visibility: hidden;
} }
.father:hover .child { .father:hover .child {
/*display: inline;*/ /*display: inline;*/
visibility: visible; visibility: visible;