Merge pull request #5366 from dataease/pr@dev@fix_panel-link

fix(仪表板): 修复仪表板联动后需要清除联动条件才能进行下次联动的问题
This commit is contained in:
王嘉豪 2023-05-30 18:22:56 +08:00 committed by GitHub
commit 212570502f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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