Browse Source

菜单配置等

preview
jiangyy 4 years ago
parent
commit
f0e0aebead
  1. BIN
      epmet-oper-web/src/assets/img/modules/wx-mini/index-set/wailian-bg.jpg
  2. 64
      epmet-oper-web/src/assets/scss/modules/wx-mini/index-set.scss
  3. 279
      epmet-oper-web/src/components/wx-index/cpt-item.vue
  4. 100
      epmet-oper-web/src/router/index.js
  5. 5
      epmet-oper-web/src/views/modules/customer/customize/ConfigEdit.vue
  6. 16
      epmet-oper-web/src/views/modules/customer/customize/MiniHome.vue

BIN
epmet-oper-web/src/assets/img/modules/wx-mini/index-set/wailian-bg.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

64
epmet-oper-web/src/assets/scss/modules/wx-mini/index-set.scss

@ -637,7 +637,10 @@
} }
} }
} }
} }
} }
} }
@ -841,9 +844,70 @@
color: rgba(51, 51, 51, 1); color: rgba(51, 51, 51, 1);
} }
} }
} }
} }
} }
// 更多功能2
.mw-cpt-cnt_function2 {
position: relative;
margin-top: 10px;
.d-cpt-wrap {
border-radius: 10px;
// overflow-x: scroll;
overflow: hidden;
margin: 0 13px;
background-color: white;
.link {
width: 100%;
position: relative;
> img {
width: 308px;
margin: 13px;
height: 160px;
border-radius: 10px;
}
span {
position: absolute;
top: 30px;
left: 20px;
color: #fff;
font-size: 22px;
font-family: PingFang SC;
font-weight: bold;
color: #ffffff;
}
}
.dots {
position: absolute;
bottom: 12px;
left: 0;
right: 0;
width: 100%;
display: flex;
justify-content: center;
> i {
float: right;
position: relative;
top: 11px;
margin: 0 2px;
width: 5px;
height: 5px;
border-radius: 50%;
background: rgba(0, 0, 0, 0.26);
&.z-on {
background: rgba(255, 255, 255, 1);
}
}
}
}
}
// 积分银行积分排行 // 积分银行积分排行
.mw-cpt-score_rank { .mw-cpt-score_rank {

279
epmet-oper-web/src/components/wx-index/cpt-item.vue

@ -144,7 +144,7 @@
</div> </div>
</div> </div>
<!-- 中间菜单栏组件 --> <!-- 更多功能组件 -->
<div class="mw-cpt-cnt_menus" <div class="mw-cpt-cnt_menus"
v-else-if="item.componentFrontId==='resi-functionList-extend-moreFunctionIcons'"> v-else-if="item.componentFrontId==='resi-functionList-extend-moreFunctionIcons'">
<div class="d-cpt-wrap"> <div class="d-cpt-wrap">
@ -167,7 +167,34 @@
</div> </div>
</div> </div>
</div> </div>
<!-- 更多功能2栏组件 -->
<div class="mw-cpt-cnt_function2"
v-else-if="item.componentFrontId==='resi-functionList-extend-moreFunctionIcons2'">
<div class="d-cpt-wrap">
<div class="link">
<img src="@/assets/img/modules/wx-mini/index-set/wailian-bg.jpg"
mode="aspectFill" />
<span>{{'建议直通车'}}</span>
<img src="@/assets/img/modules/wx-mini/index-set/wailian-bg.jpg"
mode="aspectFill" />
<span>{{'建议直通车'}}</span>
</div>
<div class="dots">
<i></i>
<i></i>
<i></i>
<i class="z-on"></i>
<!-- <div class="dot {{index==currentIndex ? 'z-on' : ''}}"
wx:key="*this"
wx:for-index="index"
wx:for-item="item"
wx:for="{{list}}"></div> -->
</div>
</div>
</div>
<!-- 群组件 --> <!-- 群组件 -->
<div class="mw-cpt-cnt_groups" <div class="mw-cpt-cnt_groups"
v-else-if="item.componentFrontId==='resi-functionList-group-recommendGroupSlider'"> v-else-if="item.componentFrontId==='resi-functionList-group-recommendGroupSlider'">
@ -344,130 +371,135 @@
</div> </div>
</div> </div>
<!-- 党员积分排行组件 --> <!-- 党员积分排行组件 -->
<div class="mw-cpt-party" <div class="mw-cpt-party"
v-else-if="item.componentFrontId==='resi-functionList-top-party'"> v-else-if="item.componentFrontId==='resi-functionList-top-party'">
<div class="d-cpt-wrap"> <div class="d-cpt-wrap">
<div class="d-cpt-title">党员积分排行榜</div> <div class="d-cpt-title">党员积分排行榜</div>
<div class="m-box"> <div class="m-box">
<div class="rank_title"> <div class="rank_title">
<p class="rank_title_left">身边党员</p> <p class="rank_title_left">身边党员</p>
<div class="red_line"></div> <div class="red_line"></div>
<p class="rank_title_right">社区党员</p> <p class="rank_title_right">社区党员</p>
</div> </div>
<div class="rank_img_score"> <div class="rank_img_score">
<div class="list"><!--:key,列表循环的唯一标识符 --> <div class="list">
<div class="item" <!--:key,列表循环的唯一标识符 -->
:key="subindex" <div class="item"
v-for="(subitem, subindex) in item.demoData.list1"> :key="subindex"
<div class="d-group-logo"> v-for="(subitem, subindex) in item.demoData.list1">
<div v-if="subindex === 0" <div class="d-group-logo">
class="logo1" ></div> <div v-if="subindex === 0"
<div v-else-if="subindex === 1" class="logo1"></div>
class="logo2"></div> <div v-else-if="subindex === 1"
<div v-else-if="subindex === 2" class="logo2"></div>
class="logo3"></div> <div v-else-if="subindex === 2"
</div> class="logo3"></div>
</div>
<div class="d-group-rank">
<span v-if="subindex===0" class="rank_1">2</span> <div class="d-group-rank">
<span v-if="subindex===1" class="rank_2">1</span> <span v-if="subindex===0"
<span v-if="subindex===2" class="rank_3">3</span> class="rank_1">2</span>
<span v-if="subindex===1"
</div> class="rank_2">1</span>
<span v-if="subindex===2"
<div class="d-group-imgback"> class="rank_3">3</span>
<div v-if="subindex === 0"
class="back_1" ></div> </div>
<div v-else-if="subindex === 1"
class="back_2"></div> <div class="d-group-imgback">
<div v-else-if="subindex === 2" <div v-if="subindex === 0"
class="back_3"></div> class="back_1"></div>
</div> <div v-else-if="subindex === 1"
<div class="d-group-img"> class="back_2"></div>
<img v-if="subindex === 0" <div v-else-if="subindex === 2"
class="img1" class="back_3"></div>
src="../../assets/img/modules/wx-mini/index-set/page/girl.jpg"> </div>
<img v-if="subindex === 1" <div class="d-group-img">
class="img2" <img v-if="subindex === 0"
src="../../assets/img/modules/wx-mini/index-set/page/duck.jpg"> class="img1"
<img v-if="subindex === 2" src="../../assets/img/modules/wx-mini/index-set/page/girl.jpg">
class="img3" <img v-if="subindex === 1"
src="../../assets/img/modules/wx-mini/index-set/page/girl.jpg"> class="img2"
</div> src="../../assets/img/modules/wx-mini/index-set/page/duck.jpg">
<img v-if="subindex === 2"
<div class="d-group-score"> class="img3"
<span v-if="subindex===0" class="score_1">{{subitem.title1}}</span> src="../../assets/img/modules/wx-mini/index-set/page/girl.jpg">
<span v-if="subindex===1" class="score_2">{{subitem.title2}}</span> </div>
<span v-if="subindex===2" class="score_3">{{subitem.title3}}</span>
</div> <div class="d-group-score">
<span v-if="subindex===0"
<div class="d-group-name"> class="score_1">{{subitem.title1}}</span>
<span v-if="subindex===1"
class="score_2">{{subitem.title2}}</span>
<span v-if="subindex===0" class="name_1">{{subitem.info1}}</span> <span v-if="subindex===2"
<span v-if="subindex===1" class="name_2">{{subitem.info2}}</span> class="score_3">{{subitem.title3}}</span>
<span v-if="subindex===2" class="name_3">{{subitem.info3}}</span> </div>
</div> <div class="d-group-name">
</div>
</div> <span v-if="subindex===0"
</div> class="name_1">{{subitem.info1}}</span>
<!--更多-标题--> <span v-if="subindex===1"
<div class="list-more"> class="name_2">{{subitem.info2}}</span>
<ul class="list1"> <span v-if="subindex===2"
<li class="list_1">排名</li> class="name_3">{{subitem.info3}}</span>
<li class="list_1">头像</li>
<li class="list_1">姓名</li> </div>
<li class="list_2">当月积分</li> </div>
</div>
</ul> </div>
</div> <!--更多-标题-->
<div class="list-more">
<!--更多排名--> <ul class="list1">
<div class="rank_more_score"> <li class="list_1">排名</li>
<div class="list"> <li class="list_1">头像</li>
<div class="item" <li class="list_1">姓名</li>
:key="subindex" <li class="list_2">当月积分</li>
v-for="(subitem,subindex) in item.demoData.list2">
<div class="d-group-rank"> </ul>
<span>{{subitem.rank}}</span> </div>
</div>
<div class="d-group-img"> <!--更多排名-->
<img v-if="subindex===1" <div class="rank_more_score">
src="../../assets/img/modules/wx-mini/index-set/page/good.jpg" <div class="list">
class="list3_img1"> <div class="item"
<img v-else-if="subindex===2" :key="subindex"
src="../../assets/img/modules/wx-mini/index-set/page/girl.jpg" v-for="(subitem,subindex) in item.demoData.list2">
class="list3_img1"> <div class="d-group-rank">
<img v-else-if="subindex===3" <span>{{subitem.rank}}</span>
src="../../assets/img/modules/wx-mini/index-set/page/duck.jpg" </div>
class="list3_img1"> <div class="d-group-img">
<img v-else="subindex===4" <img v-if="subindex===1"
src="../../assets/img/modules/wx-mini/index-set/page/duck.jpg" src="../../assets/img/modules/wx-mini/index-set/page/good.jpg"
class="list3_img1"> class="list3_img1">
</div> <img v-else-if="subindex===2"
<div class="d-group-name"> src="../../assets/img/modules/wx-mini/index-set/page/girl.jpg"
<span>{{subitem.name}}</span> class="list3_img1">
</div> <img v-else-if="subindex===3"
<div class="d-group-score"> src="../../assets/img/modules/wx-mini/index-set/page/duck.jpg"
<span>{{subitem.score}}</span> class="list3_img1">
</div> <img v-else-if="subindex===4"
</div> src="../../assets/img/modules/wx-mini/index-set/page/duck.jpg"
</div> class="list3_img1">
</div>
<div class="d-group-name">
<span>{{subitem.name}}</span>
</div> </div>
<div class="d-group-score">
<div class="line"></div> <span>{{subitem.score}}</span>
<span class="list6">查看更多</span> </div>
</div>
</div> </div>
</div>
</div>
</div>
<div class="line"></div>
<span class="list6">查看更多</span>
</div>
</div>
</div>
<!-- 占位组件 --> <!-- 占位组件 -->
<div class="mw-cpt-placeholder" <div class="mw-cpt-placeholder"
@ -479,6 +511,7 @@
<!-- 操作区 --> <!-- 操作区 -->
<div class="d-cpt-operate a-scale-in" <div class="d-cpt-operate a-scale-in"
z
:class="{'z-small': item.region!=='functionList'}" :class="{'z-small': item.region!=='functionList'}"
v-show="isFocused" v-show="isFocused"
@click.stop> @click.stop>

100
epmet-oper-web/src/router/index.js

@ -124,56 +124,56 @@ router.beforeEach((to, from, next) => {
if (userType === 'work') { if (userType === 'work') {
const customerId=localStorage.getItem('customerId') const customerId=localStorage.getItem('customerId')
console.log('customerId:' ,customerId) console.log('customerId:' ,customerId)
if(customerId==='1e68188b8f7e9ab15658c164bd5b3676'){ // if(customerId==='1e68188b8f7e9ab15658c164bd5b3676'){
// if(customerId==='45687aa479955f9d06204d415238f7cc'){ // // if(customerId==='45687aa479955f9d06204d415238f7cc'){
const menuList=[ // const menuList=[
{ // {
children: [], // children: [],
createdBy: "a76fc711807ac9827d7611b0f94ec220", // createdBy: "a76fc711807ac9827d7611b0f94ec220",
createdTime: "2020-08-26 16:38", // createdTime: "2020-08-26 16:38",
delFlag: null, // delFlag: null,
icon: "icon-database", // icon: "icon-database",
id: "abe812eb350f6b5eda575e268e50ac1c", // id: "abe812eb350f6b5eda575e268e50ac1c",
name: "定制功能配置", // name: "定制功能配置",
parentName: null, // parentName: null,
permissions: "", // permissions: "",
pid: "0", // pid: "0",
resourceList: null, // resourceList: null,
revision: 0, // revision: 0,
showFlag: 1, // showFlag: 1,
sort: 2, // sort: 2,
type: 0, // type: 0,
updatedBy: "a76fc711807ac9827d7611b0f94ec220", // updatedBy: "a76fc711807ac9827d7611b0f94ec220",
updatedTime: "2020-09-02 14:49", // updatedTime: "2020-09-02 14:49",
url: "customer/customize/ConfigItem", // url: "customer/customize/ConfigItem",
}, // },
{ // {
children: [], // children: [],
createdBy: "a76fc711807ac9827d7611b0f94ec220", // createdBy: "a76fc711807ac9827d7611b0f94ec220",
createdTime: "2020-08-26 16:38", // createdTime: "2020-08-26 16:38",
delFlag: null, // delFlag: null,
icon: "icon-file-text", // icon: "icon-file-text",
id: "8e55eba74c920c00c44c125e3bc73ddc", // id: "8e55eba74c920c00c44c125e3bc73ddc",
name: "居民端首页配置", // name: "居民端首页配置",
parentName: null, // parentName: null,
permissions: "", // permissions: "",
pid: "0", // pid: "0",
resourceList: null, // resourceList: null,
revision: 0, // revision: 0,
showFlag: 1, // showFlag: 1,
sort: 3, // sort: 3,
type: 0, // type: 0,
updatedBy: "a76fc711807ac9827d7611b0f94ec220", // updatedBy: "a76fc711807ac9827d7611b0f94ec220",
updatedTime: "2020-09-02 14:49", // updatedTime: "2020-09-02 14:49",
url: "customer/customize/MiniHome", // url: "customer/customize/MiniHome",
} // }
] // ]
window.SITE_CONFIG['menuList'] = menuList // window.SITE_CONFIG['menuList'] = menuList
fnAddDynamicMenuRoutes(window.SITE_CONFIG['menuList']) // fnAddDynamicMenuRoutes(window.SITE_CONFIG['menuList'])
// next({ ...to, replace: true }) // // next({ ...to, replace: true })
next({ ...to, replace: true }) // next({ ...to, replace: true })
}else{ // }else{
http http
.get('/gov/access/menu/nav') .get('/gov/access/menu/nav')
.then(({ data: res }) => { .then(({ data: res }) => {
@ -189,7 +189,7 @@ router.beforeEach((to, from, next) => {
.catch(() => { .catch(() => {
next({ name: 'loginWork' }) next({ name: 'loginWork' })
}) })
} // }
// localStorage.getItem('customerId') // localStorage.getItem('customerId')
// 1e68188b8f7e9ab15658c164bd5b3676 // 1e68188b8f7e9ab15658c164bd5b3676

5
epmet-oper-web/src/views/modules/customer/customize/ConfigEdit.vue

@ -35,8 +35,9 @@
<div v-if="userType==='oper'" <div v-if="userType==='oper'"
style="margin-top:20px"> style="margin-top:20px">
<el-form-item label="外链地址" <el-form-item label="外链地址"
class="block"
prop="targetLink"> prop="targetLink">
<el-input class="item_width_1" <el-input style="width:400px;display:block;margin-bottom:10px; float:left"
v-model="dataForm.targetLink" v-model="dataForm.targetLink"
placeholder="外链地址"></el-input> placeholder="外链地址"></el-input>
@ -51,7 +52,7 @@
<div> <div>
<el-input style="width:300px;display:block;margin-bottom:10px; float:left" <el-input style="width:400px;display:block;margin-bottom:10px; float:left"
placeholder='请输入业务域名' placeholder='请输入业务域名'
v-model="dataForm.domainName"> </el-input> v-model="dataForm.domainName"> </el-input>

16
epmet-oper-web/src/views/modules/customer/customize/MiniHome.vue

@ -180,15 +180,14 @@
<span>{{ focusedCpt.configurationDescription }}</span> <span>{{ focusedCpt.configurationDescription }}</span>
</div> </div>
<div v-if="focusedCpt.componentFrontId === 'resi-functionList-heart-banner'" class="d-set-banners"> <div v-if="focusedCpt.componentFrontId === 'resi-functionList-heart-banner'"
class="d-set-banners">
<span>Banner图</span> <span>Banner图</span>
<el-upload <el-upload class="upload-demos"
class="upload-demos" :show-file-list="false"
:show-file-list="false" :on-success="handleBannerSuccess"
:on-success="handleBannerSuccess" :before-upload="beforeBannerUpload"
:before-upload="beforeBannerUpload" :action="uploadUlr">
:action="uploadUlr"
>
<i class="el-icon-plus avatar-uploader-icon"></i> <i class="el-icon-plus avatar-uploader-icon"></i>
</el-upload> </el-upload>
</div> </div>
@ -810,6 +809,7 @@ export default {
addCpt (item, tempOnlyId, displayOrder = 0) { addCpt (item, tempOnlyId, displayOrder = 0) {
console.log('添加组件到实例') console.log('添加组件到实例')
let trueItem = cloneDeep(item) let trueItem = cloneDeep(item)
debugger
trueItem.tempOnlyId = tempOnlyId trueItem.tempOnlyId = tempOnlyId
trueItem.displayOrder = displayOrder trueItem.displayOrder = displayOrder
this.cptList.push(trueItem) this.cptList.push(trueItem)

Loading…
Cancel
Save