-
高级选项
+
高级选项--{{focusedCpt.componentName}}
@@ -585,7 +585,7 @@ export default {
this.wxIndex.customerId = id
this.wxIndex.customerName = name
this.wxIndex.clientType = type
- console.log(this.wxIndex)
+
this.startLoading()
// let loadingInstance = Loading.service()
await this.getCptTypeList()
@@ -596,6 +596,7 @@ export default {
// loadingInstance.close()
},
processBackendCptData (item) {
+
let demoData = {}
let configuration = {}
const tempOnlyId = getRandomString(20)
@@ -603,6 +604,7 @@ export default {
demoData = JSON.parse(item.demoData)
configuration = JSON.parse(item.configuration)
} catch (err) {
+ console.log("错误项", item)
console.log(err)
}
return { tempOnlyId, ...item, demoData, configuration }
@@ -634,7 +636,7 @@ export default {
}
})]
this.cptTypeList = list
- //console.log('可用组件列表', list)
+
}
}).catch((err) => {
console.log(err)
@@ -660,7 +662,7 @@ export default {
]
this.cptList = list.map(this.processBackendCptData)
this.lastSavedCptList = cloneDeep(this.cptList)
- //console.log('用户储存组件列表', list)
+
}
}).catch((err) => {
console.log(err)
@@ -670,7 +672,7 @@ export default {
// 保存配置
save () {
- console.log('保存配置')
+
const url = getMockFilterUrl('/oper/customize/home/savehomedesign')
const { wxIndex: { clientType, customerId }, cptList } = this
const componentList = cptList.map(item => {
@@ -689,7 +691,7 @@ export default {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
- console.log(res)
+
this.lastSavedCptList = cloneDeep(this.cptList)
return this.$message.success('保存成功')
}
@@ -700,7 +702,7 @@ export default {
},
// 发布配置
publish () {
- console.log('发布配置')
+
const url = getMockFilterUrl('/oper/customize/home/distributehomedesign')
const { wxIndex: { clientType, customerId }, cptList } = this
const componentList = cptList.map(item => {
@@ -727,7 +729,7 @@ export default {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
- console.log(res)
+
this.lastSavedCptList = cloneDeep(this.cptList)
return this.$message.success('发布成功')
}
@@ -773,7 +775,7 @@ export default {
},
// 添加组件到实例-前验证
beforeAddCpt (item) {
- console.log('添加组件到实例-前验证')
+
const regionType = this.checkCptRegion(item)
const tempOnlyId = getRandomString(20)
if (regionType === 'top') {
@@ -803,14 +805,14 @@ export default {
},
// 实例内容组件重置displayOrder属性
cntCptListResort () {
- console.log('实例内容组件重置displayOrder属性')
+
this.cntCptList.forEach((item, index) => {
item.displayOrder = (index + 1) * 10
})
},
// 添加组件到实例
addCpt (item, tempOnlyId, displayOrder = 0) {
- console.log('添加组件到实例')
+
let trueItem = cloneDeep(item)
trueItem.tempOnlyId = tempOnlyId
@@ -819,7 +821,7 @@ export default {
},
// 改变实例组件显示顺序
async changeCptDisplayOrder (item, type) {
- console.log('改变实例组件显示顺序')
+
if (type === 'up') {
item.displayOrder -= 11
} else if (type === 'down') {
@@ -846,7 +848,7 @@ export default {
},
// 聚焦实例组件
focusCpt (item, index) {
- console.log('聚焦实例组件', item)
+
this.globalIndex = index
if (this.isInPreview) return
if (this.focusedCpt.tempOnlyId === item.tempOnlyId) {
diff --git a/epmet-oper-web/src/views/modules/productConfig/homeCustom/cptTypeListTestdata.vue b/epmet-oper-web/src/views/modules/productConfig/homeCustom/cptTypeListTestdata.vue
new file mode 100644
index 0000000..01b0ad3
--- /dev/null
+++ b/epmet-oper-web/src/views/modules/productConfig/homeCustom/cptTypeListTestdata.vue
@@ -0,0 +1,233 @@
+ const cptTypeListTestdata = [
+ // 通用组件
+ {
+ functionId: '0',
+ functionName: '通用组件',
+ functionType: 1, // 1通用 2功能
+ isUnfold: true,
+ componentList: [
+ {
+ componentId: '7',
+ componentName: '最新议题',
+ componentFrontId: 'resi-functionList-hall-latestIssueList',
+ region: 'functionList',
+ configuration: {
+ num: 3
+ },
+ demoData: {
+ list: [
+ {
+ avatar: '',
+ title: '最新议题的标题。最新议题的标题。最新议题的标题。最新议题的标题。',
+ content: '最新议题的内容,最新议题的内容,最新议题的内容。',
+ author: '山东路45号-刘女士',
+ date: '2020-01-02'
+ },
+ {
+ avatar: '',
+ title: '最新议题的标题。',
+ content: '最新议题的内容,最新议题的内容,最新议题的内容。',
+ author: '山东路45号-刘女士',
+ date: '2020-01-02'
+ },
+ {
+ avatar: '',
+ title: '最新议题的标题。',
+ content: '最新议题的内容,最新议题的内容,最新议题的内容。',
+ author: '山东路45号-刘女士',
+ date: '2020-01-02'
+ }
+ ]
+ },
+ configurationDescription: ''
+ },
+ {
+ componentId: '8',
+ componentName: '最新发布',
+ componentFrontId: 'resi-functionList-voice-newsList',
+ region: 'functionList',
+ configuration: {
+ num: 3
+ },
+ demoData: {
+ list: [
+ {
+ pic: '',
+ title: '新型冠状病毒检测重大突破!新型冠状病毒检测重大突破!!!',
+ author: '大港路党支部',
+ date: '2020-01-02'
+ },
+ {
+ pic: '',
+ title: '新型冠状病毒检测重大突破!',
+ author: '大港路党支部',
+ date: '2020-01-02'
+ },
+ {
+ pic: '',
+ title: '新型冠状病毒检测重大突破!',
+ author: '大港路党支部',
+ date: '2020-01-02'
+ }
+ ]
+ },
+ configurationDescription: ''
+ },
+ {
+ componentId: '9',
+ componentName: '结案项目',
+ componentFrontId: 'resi-functionList-hall-closedProjectList',
+ region: 'functionList',
+ configuration: {
+ num: 3
+ },
+ demoData: {
+ list: [
+ {
+ title: '结案项目的标题。',
+ content: '结案项目的内容,结案项目的内容,结案项目的内容。',
+ author: '党支部-卫生部门',
+ date: '2020-01-02'
+ },
+ {
+ title: '结案项目的标题。',
+ content: '结案项目的内容,结案项目的内容,结案项目的内容。',
+ author: '党支部-卫生部门',
+ date: '2020-01-02'
+ },
+ {
+ title: '结案项目的标题。',
+ content: '结案项目的内容,结案项目的内容,结案项目的内容。',
+ author: '党支部-卫生部门',
+ date: '2020-01-02'
+ }
+ ]
+ },
+ configurationDescription: ''
+ }
+ ]
+ },
+ // 功能组件
+ {
+ functionId: '1',
+ functionName: '议事厅',
+ functionType: 2, // 1通用 2功能
+ isUnfold: false,
+ componentList: [
+ {
+ componentId: '1',
+ componentName: '顶部标题',
+ componentFrontId: 'resi-titleList-home-gridNameTitle',
+ configuration: {
+ // content: ''
+ },
+ demoData: {
+ ico: '',
+ avatar: '',
+ title: '青岛市市北区大港路第二网格'
+ },
+ region: 'titleList',
+ configurationDescription: '请配置具体内容'
+ },
+ {
+ componentId: '2',
+ componentName: '轮播图',
+ componentFrontId: 'resi-topList-voice-hotNewsSwiper',
+ configuration: {
+ // content: ''
+ },
+ demoData: {
+ pic: '',
+ title: '轮播图新闻标题'
+ },
+ region: 'topList',
+ configurationDescription: '请配置具体内容'
+ },
+ {
+ componentId: '3',
+ componentName: '消息通知',
+ componentFrontId: 'resi-floatingList-mine-newMessageButton',
+ configuration: {
+ // content: ''
+ },
+ demoData: {
+ ico: '',
+ text: '有新消息!'
+ },
+ region: 'floatingList',
+ configurationDescription: ''
+ },
+ {
+ componentId: '5',
+ componentName: '功能菜单',
+ componentFrontId: 'resi-functionList-extend-moreFunctionIcons',
+ region: 'functionList',
+ configuration: {
+ // bgc: '#eee'
+ },
+ demoData: {
+ list: [
+ {
+ ico: '',
+ text: '议事厅'
+ },
+ {
+ ico: '',
+ text: '社群'
+ },
+ {
+ ico: '',
+ text: '党建声音'
+ },
+ {
+ ico: '',
+ text: '更多功能'
+ }
+ ]
+ },
+ configurationDescription: ''
+ },
+ {
+ componentId: '6',
+ componentName: '热门群',
+ componentFrontId: 'resi-functionList-group-recommendGroupSlider',
+ region: 'functionList',
+ configuration: {
+ // bgc: '#fff'
+ },
+ demoData: {
+ list: [
+ {
+ ico: '',
+ no: '1',
+ avatar: '',
+ title: '群名称',
+ info1: '山东路45号-张三',
+ info2: '共240人',
+ info3: '党员11人'
+ },
+ {
+ ico: '',
+ no: '2',
+ avatar: '',
+ title: '群名称',
+ info1: '山东路45号-张三',
+ info2: '共240人',
+ info3: '党员11人'
+ },
+ {
+ ico: '',
+ no: '3',
+ avatar: '',
+ title: '群名称',
+ info1: '山东路45号-张三',
+ info2: '共240人',
+ info3: '党员11人'
+ }
+ ]
+ },
+ configurationDescription: ''
+ }
+ ]
+ }
+ ]
\ No newline at end of file
diff --git a/epmet-oper-web/src/views/modules/productConfig/homeCustom/homepage.vue b/epmet-oper-web/src/views/modules/productConfig/homeCustom/homepage.vue
new file mode 100644
index 0000000..001f5bc
--- /dev/null
+++ b/epmet-oper-web/src/views/modules/productConfig/homeCustom/homepage.vue
@@ -0,0 +1,680 @@
+
+
+
+
取消返回
+
预览
+
保存
+
发布
+
({{ wxIndex.customerName }} - )
+
({{ wxIndex.clientType===1 ? '工作端' : '居民端' }})
+
+
+
+ 选择组件
+
+
+
+

+

+

+

+

+
+
{{ item.functionName }}
+
+

+
+
+
+
({{ getCptRegionName(checkCptRegion(cptItem)) }})
+
{{ cptItem.componentName }}
+
已添加
+
+
+ 添加
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+
+
+
({{ getCptRegionName('top') }})
+
+
+
+
({{ getCptRegionName('ban') }})
+
+
+
+
({{ getCptRegionName('fixed') }})
+
+
+
+
({{ getCptRegionName('cnt') }})
+
+
+
+
+
+
+
+
+
+
+
+
+ 高级选项--{{focusedCpt.componentName}}
+
+
+
+
+
+
+
+
+

+
{{ focusedCpt.configurationDescription }}
+
+
+ Banner图
+
+
+
+
+
+
+
+
+
+
+
+ 重置
+ 保存
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/epmet-oper-web/src/views/modules/productConfig/homeCustom/index copy 2.vue b/epmet-oper-web/src/views/modules/productConfig/homeCustom/index copy 2.vue
new file mode 100644
index 0000000..3ebdf3a
--- /dev/null
+++ b/epmet-oper-web/src/views/modules/productConfig/homeCustom/index copy 2.vue
@@ -0,0 +1,924 @@
+
+
+
+ 居民端
+ 工作端
+
+
+
+
取消返回
+
预览
+
保存
+
+
({{ wxIndex.clientType===1 ? '工作端' : '居民端' }})
+
+
+
+ 选择组件
+
+
+
+

+

+

+

+

+
+
{{ item.functionName }}
+
+

+
+
+
+
({{ getCptRegionName(checkCptRegion(cptItem)) }})
+
{{ cptItem.componentName }}
+
已添加
+
+
+ 添加
+
+
+
+
+
+
+
+
+
+
+
+
+

+
+
+
({{ getCptRegionName('top') }})
+
+
+
+
({{ getCptRegionName('ban') }})
+
+
+
+
({{ getCptRegionName('fixed') }})
+
+
+
+
({{ getCptRegionName('cnt') }})
+
+
+
+
+
+
+
+
+
+
+
+ 高级选项--{{focusedCpt.componentName}}
+
+
+
+
+
+
+
+
+

+
{{ focusedCpt.configurationDescription }}
+
+
+ Banner图
+
+
+
+
+
+
+
+
+ 重置
+ 保存
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/epmet-oper-web/src/views/modules/productConfig/homeCustom/index.vue b/epmet-oper-web/src/views/modules/productConfig/homeCustom/index.vue
index f4f6c3d..ab96925 100644
--- a/epmet-oper-web/src/views/modules/productConfig/homeCustom/index.vue
+++ b/epmet-oper-web/src/views/modules/productConfig/homeCustom/index.vue
@@ -1,222 +1,18 @@
-
居民端
+ @click="showMiniHome('', '',0)">居民端
工作端
+ @click="showMiniHome('', '',1)">工作端
-
-
-
取消返回
-
预览
-
保存
-
-
({{ wxIndex.clientType===1 ? '工作端' : '居民端' }})
-
-
-
- 选择组件
-
-
-
-

-

-

-

-

-
-
{{ item.functionName }}
-
-

-
-
-
-
({{ getCptRegionName(checkCptRegion(cptItem)) }})
-
{{ cptItem.componentName }}
-
已添加
-
-
- 添加
-
-
-
-
-
-
-
-
-
-
-
-
-

-
-
-
({{ getCptRegionName('top') }})
-
-
-
-
({{ getCptRegionName('ban') }})
-
-
-
-
({{ getCptRegionName('fixed') }})
-
-
-
-
({{ getCptRegionName('cnt') }})
-
-
-
-
-
-
-
-
-
-
-
- 高级选项
-
-
-
-
-
-
-
-
-

-
{{ focusedCpt.configurationDescription }}
-
-
- Banner图
-
-
-
-
-
-
-
-
- 重置
- 保存
-
-
-
-
-
+
+
@@ -224,322 +20,28 @@