diff --git a/epmet-oper-web/src/views/modules/wx-mini/index-set.vue b/epmet-oper-web/src/views/modules/wx-mini/index-set.vue index 213e405..083f822 100644 --- a/epmet-oper-web/src/views/modules/wx-mini/index-set.vue +++ b/epmet-oper-web/src/views/modules/wx-mini/index-set.vue @@ -710,15 +710,27 @@ export default { }, // 判断组件所属区域类别 checkCptRegion (item) { - const { componentFrontId } = item - const fun = name => name === componentFrontId - if (['resi-titleList-home-gridNameTitle'].findIndex(fun) !== -1) { + const { region } = item + // const { componentFrontId } = item + // const fun = name => name === componentFrontId + // if (['resi-titleList-home-gridNameTitle'].findIndex(fun) !== -1) { + // return 'top' + // } else if (['resi-topList-voice-hotNewsSwiper'].findIndex(fun) !== -1) { + // return 'ban' + // } else if (['resi-functionList-extend-moreFunctionIcons', 'resi-functionList-group-recommendGroupSlider', 'resi-functionList-hall-hotSubjectList'].findIndex(fun) !== -1) { + // return 'cnt' + // } else if (['resi-floatingList-mine-newMessageButton'].findIndex(fun) !== -1) { + // return 'fixed' + // } else { + // return 'none' + // } + if (region === 'titleList') { return 'top' - } else if (['resi-topList-voice-hotNewsSwiper'].findIndex(fun) !== -1) { + } else if (region === 'topList') { return 'ban' - } else if (['resi-functionList-extend-moreFunctionIcons', 'resi-functionList-group-recommendGroupSlider', 'resi-functionList-hall-hotSubjectList'].findIndex(fun) !== -1) { + } else if (region === 'functionList') { return 'cnt' - } else if (['resi-floatingList-mine-newMessageButton'].findIndex(fun) !== -1) { + } else if (region === 'floatingList') { return 'fixed' } else { return 'none' @@ -727,8 +739,10 @@ export default { // 判断组件是否可用复用 checkCptReuse (item) { const { componentFrontId } = item + const reuseList = this.cptTypeList[0].componentList.map(v => v.componentFrontId) const fun = name => name === componentFrontId - return ['resi-functionList-hall-hotSubjectList'].findIndex(fun) !== -1 + // return ['resi-functionList-hall-hotSubjectList'].findIndex(fun) !== -1 + return reuseList.findIndex(fun) !== -1 }, // 根据所属区域简称得到名字 getCptRegionName (id) { @@ -781,7 +795,7 @@ export default { console.log('添加组件到实例') let trueItem = cloneDeep(item) trueItem.tempOnlyId = tempOnlyId - trueItem.region = region + trueItem.localRegion = region trueItem.displayOrder = displayOrder this.cptList.push(trueItem) },