Merge pull request #5361 from dataease/pr@dev@fix_panel-linkage

fix(仪表板): 修复仪表板联动后需要清除联动条件才能进行下次联动的问题
This commit is contained in:
王嘉豪 2023-05-30 15:37:47 +08:00 committed by GitHub
commit c2329b828a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 26 additions and 6 deletions

View File

@ -1815,7 +1815,7 @@ body.tox-dialog__disable-scroll {
}
.tox .tox-editor-header {
z-index: 1;
z-index: 1000;
}
.tox:not(.tox-tinymce-inline) .tox-editor-header {

File diff suppressed because one or more lines are too long

View File

@ -1815,7 +1815,7 @@ body.tox-dialog__disable-scroll {
}
.tox .tox-editor-header {
z-index: 1;
z-index: 1000;
}
.tox:not(.tox-tinymce-inline) .tox-editor-header {

File diff suppressed because one or more lines are too long

View File

@ -77,6 +77,8 @@ export default {
},
data() {
return {
drawLeft: 'none',
drawRight: 'auto',
initReady: false,
editReady: false,
editShow: true,
@ -148,11 +150,21 @@ export default {
},
mounted() {
this.viewInit()
bus.$on('change_panel_right_draw', this.changeRightDrawOpen)
},
beforeDestroy() {
bus.$off('fieldSelect-' + this.element.propValue.viewId)
},
methods: {
changeRightDrawOpen(param){
if(param){
this.drawLeft = 'auto!important'
this.drawRight = '380px'
}else{
this.drawLeft = 'none'
this.drawRight = 'auto'
}
},
viewInit() {
bus.$on('fieldSelect-' + this.element.propValue.viewId, this.fieldSelect)
tinymce.init({})
@ -283,3 +295,11 @@ export default {
}
</style>
<style lang="scss">
.tox-tinymce-inline{
left: var(--drawLeft);
right: var(--drawRight);
}
</style>

View File

@ -17,8 +17,8 @@ export const isChange = (conditions1, conditions2) => {
let arr1 = JSON.parse(JSON.stringify(conditions1))
let arr2 = JSON.parse(JSON.stringify(conditions2))
const strCodeAt = (str) => str[0].charCodeAt()
arr1 = arr1.sort((s1, s2) => strCodeAt(s1.componentId) - strCodeAt(s2.componentId))
arr2 = arr2.sort((s1, s2) => strCodeAt(s1.componentId) - strCodeAt(s2.componentId))
arr1 = arr1.sort((s1, s2) => strCodeAt(s1.componentId.trim() || s1.filedId) - strCodeAt(s2.componentId.trim() || s2.filedId))
arr2 = arr2.sort((s1, s2) => strCodeAt(s1.componentId.trim() || s1.filedId) - strCodeAt(s2.componentId.trim() || s2.filedId))
return JSON.stringify(arr1) !== JSON.stringify(arr2)
}