修改删除绑定逻辑
This commit is contained in:
parent
18ebc91da2
commit
1ecc091f41
@ -75,7 +75,7 @@ export default {
|
||||
};
|
||||
},
|
||||
subscribeMessage(res) {
|
||||
if (this.$refs.deomonTopic) {
|
||||
if (this.$refs.deomonTopic && !window.location.href.includes('trainroom')) {
|
||||
this.$refs.deomonTopic.doShow(res);
|
||||
this.$store.dispatch('socket/setRoomInvite');
|
||||
}
|
||||
|
@ -49,13 +49,16 @@ function queryDeleteModels(state, device, dict) {
|
||||
if (!dict[elem.code] || !dict[elem.code]._dispose) {
|
||||
const copyModel = deepAssign({}, elem);
|
||||
if (copyModel.parentCode) {
|
||||
const setionModel = deepAssign({}, dict[copyModel.parentCode] || state.mapDevice[copyModel.parentCode]);
|
||||
setionModel.relevanceSectionList.forEach((sectionCode, index) => {
|
||||
if (sectionCode == copyModel.code) {
|
||||
setionModel.relevanceSectionList.splice(index, 1);
|
||||
dict[setionModel.code] = setionModel;
|
||||
}
|
||||
});
|
||||
const model = dict[copyModel.parentCode] || state.mapDevice[copyModel.parentCode] || {};
|
||||
if (model.code) {
|
||||
const setionModel = deepAssign({}, model);
|
||||
setionModel.relevanceSectionList.forEach((sectionCode, index) => {
|
||||
if (sectionCode == copyModel.code) {
|
||||
setionModel.relevanceSectionList.splice(index, 1);
|
||||
dict[setionModel.code] = setionModel;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
copyModel.relSwitchCode = '';
|
||||
copyModel.isSwitchSection = false;
|
||||
@ -650,7 +653,6 @@ const map = {
|
||||
|
||||
const list = Object.values(dict);
|
||||
handleOperation(state, list);
|
||||
|
||||
commit('mapRender', list);
|
||||
resolve(list);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user