Commit 653f83d4 authored by zhangjianguo's avatar zhangjianguo

1

parents 0ba954ed df963540
...@@ -82,3 +82,12 @@ ...@@ -82,3 +82,12 @@
.blue{ .blue{
color:#409EFF; color:#409EFF;
} }
.cred{
color: rgb(245, 108, 108);
}
.el-form-item{
position: relative;
}
.center{
text-align:center;
}
...@@ -23,3 +23,12 @@ input, textarea, select{ ...@@ -23,3 +23,12 @@ input, textarea, select{
.w400{ .w400{
width:400px; width:400px;
} }
.CommonHeader{
padding: 18px 20px;
-webkit-box-sizing: border-box;
box-sizing: border-box;
background-color: #fff;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
color:#303133;
}
This diff is collapsed.
<template>
<div class="mimipage">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane v-for="(item,index) in dataList" :label="item.PageTypeName" :name="item.PageTypeId+''" :key="index">
<template v-for="(subItem,subIndex) in item.SubMenuList">
<div :key="subIndex">
<span v-if="subItem.SelfPageName">{{subItem.SelfPageName}}</span>
<span v-else>{{subItem.PageName}} </span>
{{subItem.PageUrl}} <br />
<span v-if="subItem.IsParameter==1">
<el-input v-model="subItem.ParameterValue"></el-input>
</span>
</div>
</template>
</el-tab-pane>
</el-tabs>
</div>
</template>
<script>
export default {
data() {
return {
loading: false,
dataList: [],
activeName: "1"
};
},
created() {
},
methods: {
handleClick(tab, event) {
},
getList() {
this.apipost("/api/Tenant/GetMiniprogramPageListExt", {}, res => {
if (res.data.resultCode == 1) {
this.dataList = res.data.data;
} else {
this.Info(res.data.message);
}
})
},
},
mounted() {
this.getList();
}
};
</script>
<style>
.navNavIconImg {
width: 80px;
height: 80px;
}
.navNavIconImg NavIconImg {
width: 100%;
height: 100%;
}
.mimipage .blue {
color: #409EFF;
}
.mimipage .content .searchInput {
border: 1px solid #DCDFE6;
border-radius: 4px;
}
.mimipage .content .searchInput .el-input__inner {
border: none;
outline: none;
height: 30px;
line-height: 30px;
}
.mimipage .content .searchInput {
line-height: normal;
display: inline-table;
width: 100%;
border-collapse: separate;
border-spacing: 0;
width: 250px;
margin-right: 20px;
}
.mimipage .content {
background: #fff;
margin-top: 10px;
padding: 20px;
box-sizing: border-box;
}
</style>
<style>
.mimitBody{
padding:20px;
background-color: #fff;
margin:10px 0 20px 0;
display:table;
width:100%;
}
.mimitList{
margin-bottom:15px;
display: flex;
flex-direction: row;
}
.mimitBody .el-tag{
min-width: 120px;
padding-right: 50px;
}
.mimititle .el-button--small{
padding:9px 25px;
}
</style>
<template>
<div class="mimititle">
<div class="CommonHeader">页面标题设置</div>
<div class="mimitBody">
<template v-for="(item,index) in dataList">
<div class="el-col el-col-12 mimitList" :key="index">
<el-tag>{{item.firstItem.PageName}}</el-tag>
<el-input type="text" style="margin:0 20px;" v-model="item.firstItem.SelfPageName" size="small"></el-input>
</div>
<div class="el-col el-col-12 mimitList" :key="index+1000">
<el-tag v-if="item.secondItem">{{item.secondItem.PageName}}</el-tag>
<el-input v-if="item.secondItem" v-model="item.secondItem.SelfPageName" type="text" style="margin:0 20px;" size="small"></el-input>
</div>
</template>
</div>
<el-button size="small" type="primary" @click="submitForm()">保存</el-button>
<el-button size="small" @click="resetInfo()">恢复默认</el-button>
</div>
</template>
<script>
export default {
data() {
return {
loading: false,
dataList: [],
};
},
created() {
},
methods: {
getList() {
this.dataList = [];
this.apipost("/api/Tenant/GetMiniprogramPageListExt", {}, res => {
if (res.data.resultCode == 1) {
var data = res.data.data;
var myArray = [];
if (data && data.length > 0) {
data.forEach(item => {
if (item.SubMenuList && item.SubMenuList.length > 0) {
item.SubMenuList.forEach(subItem => {
myArray.push(subItem);
})
}
});
if (myArray && myArray.length > 0) {
var totalpage = 0;
if (myArray.length % 2 == 1) {
totalpage = parseInt(myArray.length / 2) + parseInt(1);
} else {
totalpage = parseInt(myArray.length / 2);
}
for (var index = 0; index < totalpage; index++) {
var singleIndex = index * 2;
var doubleIndex = Number(index * 2) + Number(1)
var obj = {
firstItem: "",
secondItem: ""
};
if (singleIndex <= myArray.length) {
obj.firstItem = myArray[singleIndex];
}
if (doubleIndex <= myArray.length) {
obj.secondItem = myArray[doubleIndex];
}
this.dataList.push(obj)
}
}
}
} else {
this.Info(res.data.message);
}
})
},
//保存标题
submitForm() {
var setArray = []; //新增修改的数组
if (this.dataList && this.dataList.length > 0) {
this.dataList.forEach(item => {
if (item.firstItem) {
setArray.push({
Id: item.firstItem.Id,
SelfPageName: item.firstItem.SelfPageName,
});
}
if (item.secondItem) {
setArray.push({
Id: item.secondItem.Id,
SelfPageName: item.secondItem.SelfPageName,
});
}
})
}
var msg = {
setMsg: setArray,
};
this.apipost("/api/Tenant/SetMiniprogramPageTitle", msg, res => {
if (res.data.resultCode == 1) {
this.getList();
this.Success(res.data.message);
} else {
this.Info(res.data.message);
}
})
},
//恢复默认
resetInfo(){
if (this.dataList && this.dataList.length > 0) {
this.dataList.forEach(item => {
if (item.firstItem) {
item.firstItem.SelfPageName=''
}
if (item.secondItem) {
item.secondItem.SelfPageName=''
}
})
}
}
},
mounted() {
this.getList();
}
};
</script>
<style>
.navNavIconImg {
width: 80px;
height: 80px;
}
.navNavIconImg NavIconImg {
width: 100%;
height: 100%;
}
.mimititle .blue {
color: #409EFF;
}
.mimititle .content .searchInput {
border: 1px solid #DCDFE6;
border-radius: 4px;
}
.mimititle .content .searchInput .el-input__inner {
border: none;
outline: none;
height: 30px;
line-height: 30px;
}
.mimititle .content .searchInput {
line-height: normal;
display: inline-table;
width: 100%;
border-collapse: separate;
border-spacing: 0;
width: 250px;
margin-right: 20px;
}
.mimititle .content {
background: #fff;
margin-top: 10px;
padding: 20px;
box-sizing: border-box;
}
</style>
<style>
.storeContent {
background-color: #fff;
margin-top: 10px;
padding: 20px 0;
}
.theme_List {
width: 60%;
display: flex;
flex-direction: row;
flex-wrap: wrap;
}
.item-active {
border: 2px solid #3399ff !important;
}
.theme_List>div {
display: flex;
justify-content: center;
align-items: center;
width: 127px;
height: 61px;
position: relative;
border: 1px solid #e2e2e2;
border-radius: 5px;
margin-left: 20px;
margin-bottom: 20px;
overflow: hidden;
cursor: pointer;
}
.theme_color {
width: 46px;
height: 33px;
margin-right: 5px;
transform-origin: 50% 50%;
position: relative;
}
.theme_color div {
width: 25px;
height: 25px;
border-radius: 5px;
position: absolute;
top: 3.5px;
transform: rotate(45deg);
}
.deep {
left: 3.5px;
}
.shallow {
left: 18.5px;
}
.theme_Item .text {
margin-left: 5px;
font-size: 12px;
color: #666666;
}
.theme_Item:hover {
margin-top: -3px;
box-shadow: 0 4px 4px 4px #ECECEC;
}
.theme_show {
height: 460px;
width: 60%;
padding: 5px;
margin: 20px 0 20px 20px;
display: flex;
justify-content: space-between;
flex-direction: row;
}
.imgList_item {
width: 250px;
height: 100%;
box-shadow: 0 10px 30px 3px #dddddd;
background-repeat: no-repeat;
background-size: 100% 100%;
}
.ColorOne div:nth-child(1) {
background-color: rgb(243, 152, 0);
}
.ColorOne div:nth-child(2) {
background-color: rgb(255, 69, 68);
}
.ColorTwo div:nth-child(1) {
background-color: rgb(85, 85, 85);
}
.ColorTwo div:nth-child(2) {
background-color: rgb(252, 198, 0);
}
.ColorThree div:nth-child(1) {
background-color: rgb(255, 230, 232);
}
.ColorThree div:nth-child(2) {
background-color: rgb(255, 84, 123);
}
.ColorFour div:nth-child(1) {
background-color: rgb(240, 235, 216);
}
.ColorFour div:nth-child(2) {
background-color: rgb(221, 183, 102);
}
.ColorFive div:nth-child(1) {
background-color: rgb(233, 235, 255);
}
.ColorFive div:nth-child(2) {
background-color: rgb(119, 131, 234);
}
.ColorSix div:nth-child(1) {
background-color: rgb(85, 85, 85);
}
.ColorSix div:nth-child(2) {
background-color: rgb(255, 69, 68);
}
.ColorSeven div:nth-child(1) {
background-color: rgb(225, 244, 227);
}
.ColorSeven div:nth-child(2) {
background-color: rgb(99, 190, 114);
}
.ColorEight div:nth-child(1) {
background-color: rgb(219, 233, 249);
}
.ColorEight div:nth-child(2) {
background-color: rgb(74, 144, 226);
}
.ColorNine div:nth-child(1) {
background-color: rgb(222, 222, 222);
}
.ColorNine div:nth-child(2) {
background-color: rgb(51, 51, 51);
}
.ColorTen div:nth-child(1) {
background-color: rgb(255, 218, 218);
}
.ColorTen div:nth-child(2) {
background-color: rgb(255, 69, 68);
}
</style>
<template>
<div class="storeStyle">
<div class="CommonHeader">
商城风格
</div>
<div class="storeContent">
<div class="theme_List">
<div class="theme_Item" :class="{'item-active':checked==index}" v-for="(item,index) in storeObj"
@click="getStyle(index,item)" :key="index">
<div class="theme_color" :class="item.cssName">
<div class="deep"></div>
<div class="shallow"></div>
</div>
<div class="text">{{item.name}}</div>
</div>
</div>
<div class="theme_show">
<div class="imgList_item" :style="{backgroundImage:'url('+domainManager().ImageUrl+'/Static/' + Url1 + ')'}">
</div>
<div class="imgList_item" :style="{backgroundImage:'url('+domainManager().ImageUrl+'/Static/' + Url2 + ')'}">
</div>
<div class="imgList_item" :style="{backgroundImage:'url('+domainManager().ImageUrl+'/Static/' + Url3 + ')'}">
</div>
</div>
</div>
<el-button size="small" style="margin-top:20px;padding:9px 25px;" type="primary" @click="Save()">保存</el-button>
</div>
</template>
<script>
export default {
data() {
return {
//默认选中
checked: 0,
storeObj: [{
name: '默认风格',
cssName: 'ColorOne',
Id: 0,
ImgArr: ['classic-red-pic-1.png', 'classic-red-pic-2.png', 'classic-red-pic-2.png']
}, {
name: '活力黄',
cssName: 'ColorTwo',
Id: 1,
ImgArr: ['vibrant-yellow-pic-1.png', 'vibrant-yellow-pic-2.png', 'vibrant-yellow-pic-3.png']
}, {
name: '浪漫粉',
cssName: 'ColorThree',
Id: 2,
ImgArr: ['romantic-powder-pic-1.png', 'romantic-powder-pic-2.png', 'romantic-powder-pic-3.png']
}, {
name: '流光金',
cssName: 'ColorFour',
Id: 3,
ImgArr: ['streamer-gold-pic-1.png', 'streamer-gold-pic-2.png', 'streamer-gold-pic-3.png']
}, {
name: '优雅紫',
cssName: 'ColorFive',
Id: 4,
ImgArr: ['elegant-purple-pic-1.png', 'elegant-purple-pic-2.png', 'elegant-purple-pic-3.png']
}, {
name: '品味红',
cssName: 'ColorSix',
Id: 5,
ImgArr: ['taste-red-pic-1.png', 'taste-red-pic-2.png', 'taste-red-pic-3.png']
}, {
name: '清新绿',
cssName: 'ColorSeven',
Id: 6,
ImgArr: ['fresh-green-pic-1.png', 'fresh-green-pic-2.png', 'fresh-green-pic-3.png']
}, {
name: '商务蓝',
cssName: 'ColorEight',
Id: 7,
ImgArr: ['business-blue-pic-1.png', 'business-blue-pic-2.png', 'business-blue-pic-3.png']
}, {
name: '纯粹黑',
cssName: 'ColorNine',
Id: 8,
ImgArr: ['pure-black-pic-1.png', 'pure-black-pic-2.png', 'pure-black-pic-3.png']
}, {
name: '热情红',
cssName: 'ColorTen',
Id: 9,
ImgArr: ['passionate-red-pic-1.png', 'passionate-red-pic-2.png', 'passionate-red-pic-3.png']
}],
//图片
Url1: 'classic-red-pic-1.png',
Url2: 'classic-red-pic-2.png',
Url3: 'classic-red-pic-2.png',
addMsg: {
MallBaseId: 0,
MallShopStyle: 0
}
};
},
created() {
},
methods: {
//点击
getStyle(index, item) {
this.checked = index;
this.Url1 = item.ImgArr[0];
this.Url2 = item.ImgArr[1];
this.Url3 = item.ImgArr[2];
this.addMsg.MallShopStyle = item.Id;
},
Save() {
var mallId = this.getLocalStorage().MallBaseId;
this.apipost("/api/Tenant/SetMiniProgrameShopStyle", this.addMsg, res => {
if (res.data.resultCode == 1) {
this.Success("设置成功!");
this.GetList();
} else {
this.Info(res.data.message);
}
})
},
GetList() {
var mallId = this.getLocalStorage().MallBaseId;
this.apipost("/api/Tenant/GetMiniPrograme", {
MallBaseId: mallId
}, res => {
if (res.data.resultCode == 1) {
this.addMsg.MallShopStyle = res.data.data.MallShopStyle;
this.checked = this.addMsg.MallShopStyle;
} else {
this.Info(res.data.message);
}
})
}
},
mounted() {
this.addMsg.MallBaseId = this.getLocalStorage().MallBaseId;
this.GetList();
}
};
</script>
This diff is collapsed.
This diff is collapsed.
...@@ -196,7 +196,7 @@ ...@@ -196,7 +196,7 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible = false">取 消</el-button> <el-button size="small" @click="czjfDig = false">取 消</el-button>
<el-button size="small" type="primary" @click="czsubmitForm('addMsg')">确 定</el-button> <el-button size="small" type="primary" @click="czsubmitForm('addMsg')">确 定</el-button>
</span> </span>
</el-dialog> </el-dialog>
......
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
flex-wrap: wrap; flex-wrap: wrap;
align-items: center; align-items: center;
width: 300px; width: 300px;
float:right; float: right;
} }
.marinRightList ul { .marinRightList ul {
...@@ -285,7 +285,8 @@ ...@@ -285,7 +285,8 @@
<div class="is-show-menu-2" v-if="isShowOne" @click="showTwo=true,isShowOne=false">>></div> <div class="is-show-menu-2" v-if="isShowOne" @click="showTwo=true,isShowOne=false">>></div>
<div class="leftMenu1"> <div class="leftMenu1">
<div class="aside-logo"> <div class="aside-logo">
<div class="asideInner" @click="CommonJump('zanIndex'),firstCked=0,showTwo=false">{{currentUser.MallName}}</div> <div class="asideInner" @click="CommonJump('zanIndex'),firstCked=0,showTwo=false">{{currentUser.MallName}}
</div>
</div> </div>
<ul> <ul>
<li class="menu-item" @mouseover="mouseOver(item)" @mouseout="mouseOutMenu()" v-for="(item,index) in MenuList" <li class="menu-item" @mouseover="mouseOver(item)" @mouseout="mouseOutMenu()" v-for="(item,index) in MenuList"
...@@ -381,9 +382,9 @@ ...@@ -381,9 +382,9 @@
}, },
created() { created() {
this.currentUser = this.getLocalStorage(); this.currentUser = this.getLocalStorage();
this.$router.push({ // this.$router.push({
path: 'zanIndex' // path: 'zanIndex'
}); // });
}, },
methods: { methods: {
...@@ -426,7 +427,35 @@ ...@@ -426,7 +427,35 @@
path: item.MenuUrl path: item.MenuUrl
}); });
} }
},
refreshpage() {
var isFind = 0;
let path = this.$route.path.split("?")[0];
if (this.MenuList && this.MenuList.length > 0) {
this.MenuList.forEach(item => {
if (item.SubList && item.SubList.length) {
item.SubList.forEach(subItem => {
if (isFind == 0 && subItem.MenuUrl == path) {
isFind = 1;
this.defaultActive = subItem.MenuId + '';
this.firstCked = item.MenuId + '';
this.mouseOver(item);
}
if (isFind == 0 && subItem.ThirdList && subItem.ThirdList.length > 0) {
subItem.ThirdList.forEach(childItem => {
if (isFind == 0 && childItem.MenuUrl == path) {
isFind = 1;
this.defaultActive = childItem.MenuId + '';
this.firstCked = item.MenuId + '';
this.mouseOver(item);
}
})
} }
});
}
});
}
},
}, },
mounted() { mounted() {
this.getMenuList(); this.getMenuList();
...@@ -435,6 +464,15 @@ ...@@ -435,6 +464,15 @@
window.onresize = () => { window.onresize = () => {
this.Height = document.documentElement.clientHeight - 60 this.Height = document.documentElement.clientHeight - 60
} }
this.refreshpage();
},
watch: {
MenuList: {
handler: function (val, oldVal) {
this.refreshpage();
},
deep: true
}
} }
}; };
......
...@@ -27,13 +27,21 @@ ...@@ -27,13 +27,21 @@
<template> <template>
<div class="menuDiv"> <div class="menuDiv">
<div class="query-box"> <div class="query-box">
名称: <el-input type="text" style="width:234px;" size="small" v-model="msg.MenuName" clearable @keyup.enter.native="msg.pageIndex=1,getPageList()"></el-input>
等级: <el-select style="width:234px;" size="small" v-model="msg.MenuLevel">
<el-option label="全部" :key="0" :value="0"></el-option>
<el-option label="一级" :key="1" :value="1"></el-option>
<el-option label="二级" :key="2" :value="2"></el-option>
<el-option label="三级" :key="3" :value="3"></el-option>
</el-select>
<button type="button" class="normalBtn" @click="msg.pageIndex=1,getPageList()">查询</button>
<button type="button" class="normalBtn" @click="menuDialog=true,resetMsg()">新增</button> <button type="button" class="normalBtn" @click="menuDialog=true,resetMsg()">新增</button>
</div> </div>
<table class="commonTable" border="0" cellspacing="0" cellpadding="0" v-loading="loading"> <table class="commonTable" border="0" cellspacing="0" cellpadding="0" v-loading="loading">
<tr> <tr>
<th>菜单编号</th> <th>菜单编号</th>
<th>菜单名称</th> <th>菜单名称</th>
<th>菜单</th> <th>菜单</th>
<th>菜单等级</th> <th>菜单等级</th>
<th>父级菜单编号</th> <th>父级菜单编号</th>
<th>状态</th> <th>状态</th>
...@@ -48,13 +56,16 @@ ...@@ -48,13 +56,16 @@
<td>{{item.StatusStr}}</td> <td>{{item.StatusStr}}</td>
<td> <td>
<el-tooltip class="item" effect="dark" content="修改" placement="top-start"> <el-tooltip class="item" effect="dark" content="修改" placement="top-start">
<el-button type="primary" icon="el-icon-edit" @click="getMenu(item.MenuId)" circle style="padding:6px;"></el-button> <el-button type="primary" icon="el-icon-edit" @click="getMenu(item.MenuId)" circle style="padding:6px;">
</el-button>
</el-tooltip> </el-tooltip>
<el-tooltip class="item" effect="dark" content="删除" placement="top-start"> <el-tooltip class="item" effect="dark" content="删除" placement="top-start">
<el-button v-if="item.Status==0" type="danger" icon="el-icon-delete" @click="delMenu(item.MenuId)" circle style="padding:6px;"></el-button> <el-button v-if="item.Status==0" type="danger" icon="el-icon-delete" @click="delMenu(item.MenuId)" circle
style="padding:6px;"></el-button>
</el-tooltip> </el-tooltip>
<el-tooltip class="item" effect="dark" content="恢复" placement="top-start"> <el-tooltip class="item" effect="dark" content="恢复" placement="top-start">
<el-button v-if="item.Status==1" type="primary" icon="iconfont icon-icon_huifu" @click="recoverMenu(item.MenuId)" circle style="padding:5px;"></el-button> <el-button v-if="item.Status==1" type="primary" icon="iconfont icon-icon_huifu"
@click="recoverMenu(item.MenuId)" circle style="padding:5px;"></el-button>
</el-tooltip> </el-tooltip>
</td> </td>
</tr> </tr>
...@@ -73,7 +84,8 @@ ...@@ -73,7 +84,8 @@
<el-input type="text" style="width:234px" size="small" maxlength="25" v-model="addMsg.MenuUrl"></el-input> <el-input type="text" style="width:234px" size="small" maxlength="25" v-model="addMsg.MenuUrl"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="菜单等级" prop="MenuLevel"> <el-form-item label="菜单等级" prop="MenuLevel">
<el-select style="width:234px;" size="small" v-model="addMsg.MenuLevel" @change="getChildMenuList(addMsg.MenuLevel)"> <el-select style="width:234px;" size="small" v-model="addMsg.MenuLevel"
@change="getChildMenuList(addMsg.MenuLevel)">
<el-option label="一级" :key="1" :value="1"></el-option> <el-option label="一级" :key="1" :value="1"></el-option>
<el-option label="二级" :key="2" :value="2"></el-option> <el-option label="二级" :key="2" :value="2"></el-option>
<el-option label="三级" :key="3" :value="3"></el-option> <el-option label="三级" :key="3" :value="3"></el-option>
...@@ -81,11 +93,7 @@ ...@@ -81,11 +93,7 @@
</el-form-item> </el-form-item>
<el-form-item label="父级菜单编号" v-if="addMsg.MenuLevel!=1" prop="ParentId"> <el-form-item label="父级菜单编号" v-if="addMsg.MenuLevel!=1" prop="ParentId">
<el-select style="width:234px;" size="small" v-model="addMsg.ParentId"> <el-select style="width:234px;" size="small" v-model="addMsg.ParentId">
<el-option <el-option v-for="item in parentList" :key="item.MenuId" :label="item.MenuName" :value="item.MenuId">
v-for="item in parentList"
:key="item.MenuId"
:label="item.MenuName"
:value="item.MenuId">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -93,7 +101,8 @@ ...@@ -93,7 +101,8 @@
<el-input type="text" style="width:234px" size="small" maxlength="25" v-model="addMsg.IconClass"></el-input> <el-input type="text" style="width:234px" size="small" maxlength="25" v-model="addMsg.IconClass"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="排序"> <el-form-item label="排序">
<el-input type="text" style="width:234px" @keyup.native="checkInteger(addMsg,'SortNum')" size="small" maxlength="25" v-model="addMsg.SortNum"></el-input> <el-input type="text" style="width:234px" @keyup.native="checkInteger(addMsg,'SortNum')" size="small"
maxlength="25" v-model="addMsg.SortNum"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
...@@ -113,7 +122,9 @@ ...@@ -113,7 +122,9 @@
total: 0, total: 0,
msg: { msg: {
pageIndex: 1, pageIndex: 1,
pageSize: 20 pageSize: 20,
MenuLevel: 0,
MenuName: "", //菜单名称
}, },
dataList: [], dataList: [],
addMsg: { addMsg: {
...@@ -125,18 +136,13 @@ ...@@ -125,18 +136,13 @@
Status: 0, Status: 0,
SortNum: 0, SortNum: 0,
}, },
parentList:[], parentList: [],
menurules: { menurules: {
MenuName: [{ MenuName: [{
required: true, required: true,
message: '请填写菜单名称。', message: '请填写菜单名称。',
trigger: 'blur' trigger: 'blur'
}], }],
// MenuUrl: [{
// required: true,
// message: '请填写菜单链接。',
// trigger: 'blur'
// }]
} }
}; };
}, },
...@@ -159,7 +165,7 @@ ...@@ -159,7 +165,7 @@
}); });
}, },
//重置菜单 //重置菜单
resetMsg(){ resetMsg() {
let msg = { let msg = {
MenuName: '', MenuName: '',
MenuUrl: '', MenuUrl: '',
...@@ -187,7 +193,7 @@ ...@@ -187,7 +193,7 @@
this.apipost("/api/Tenant/SetMenu", this.addMsg, res => { this.apipost("/api/Tenant/SetMenu", this.addMsg, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.getPageList(); this.getPageList();
this.menuDialog=false; this.menuDialog = false;
} else { } else {
this.Info(res.data.message); this.Info(res.data.message);
} }
...@@ -200,7 +206,7 @@ ...@@ -200,7 +206,7 @@
}, res => { }, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.addMsg = res.data.data; this.addMsg = res.data.data;
this.menuDialog=true; this.menuDialog = true;
this.getChildMenuList(this.addMsg.MenuLevel); this.getChildMenuList(this.addMsg.MenuLevel);
} else { } else {
this.Info(res.data.message); this.Info(res.data.message);
...@@ -240,12 +246,12 @@ ...@@ -240,12 +246,12 @@
}, },
//获取父级菜单编号 //获取父级菜单编号
getChildMenuList(MenuLevel) { getChildMenuList(MenuLevel) {
this.parentList=[]; this.parentList = [];
this.apipost("/api/Tenant/GetMenuChildList", { this.apipost("/api/Tenant/GetMenuChildList", {
MenuLevel: MenuLevel-1, MenuLevel: MenuLevel - 1,
}, res => { }, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.parentList=res.data.data; this.parentList = res.data.data;
} else { } else {
this.Info(res.data.message); this.Info(res.data.message);
} }
......
<style>
.minimenuDiv {
padding: 20px;
}
.minimenuDiv .query-box {
width: 100%;
padding: 0 0 20px;
border-bottom: 1px solid #ccc;
position: relative;
text-align: right;
}
.minimenuDiv .normalBtn {
color: #fff;
padding: 0 15px;
height: 30px;
background: #e95252;
border: 1px solid #e95252;
cursor: pointer;
border-radius: 15px;
margin-left: 10px;
outline: none;
}
</style>
<template>
<div class="minimenuDiv">
<div class="query-box">
名称: <el-input type="text" style="width:234px;" size="small" v-model="msg.PageName" clearable
@keyup.enter.native="msg.pageIndex=1,getPageList()"></el-input>
等级: <el-select style="width:234px;" size="small" v-model="msg.QPageType">
<el-option label="全部" :key="0" :value="0"></el-option>
<el-option v-for="item in pageType" :key="item.Id" :value="item.Id" :label="item.Name"></el-option>
</el-select>
状态: <el-select style="width:234px;" size="small" v-model="msg.Status">
<el-option label="全部" :key="-1" :value="-1"></el-option>
<el-option :key="0" :value="0" label="正常"></el-option>
<el-option :key="1" :value="1" label="禁用"></el-option>
</el-select>
<button type="button" class="normalBtn" @click="msg.pageIndex=1,getPageList()">查询</button>
<button type="button" class="normalBtn" @click="menuDialog=true,resetMsg()">新增</button>
<button type="button" class="normalBtn" @click="CommonJump('setminipage',{})">设置小程序菜单</button>
</div>
<table class="commonTable" border="0" cellspacing="0" cellpadding="0" v-loading="loading">
<tr>
<th>菜单编号</th>
<th>菜单名称</th>
<th>菜单链接</th>
<th>菜单分类</th>
<th>状态</th>
<th>操作</th>
</tr>
<tr v-for="(item,index) in dataList" :key="index">
<td>{{item.PageId}}</td>
<td>{{item.PageName}}</td>
<td>{{item.PageUrl}}</td>
<td>{{item.PageTypeStr}}</td>
<td>{{item.StatusStr}}</td>
<td>
<el-tooltip class="item" effect="dark" content="修改" placement="top-start">
<el-button type="primary" icon="el-icon-edit" @click="getMenu(item.PageId)" circle style="padding:6px;">
</el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="删除" placement="top-start">
<el-button v-if="item.Status==0" type="danger" icon="el-icon-delete" @click="delMenu(item.PageId)" circle
style="padding:6px;"></el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="恢复" placement="top-start">
<el-button v-if="item.Status==1" type="primary" icon="iconfont icon-icon_huifu"
@click="recoverMenu(item.PageId)" circle style="padding:5px;"></el-button>
</el-tooltip>
</td>
</tr>
</table>
<el-pagination background @current-change="handleCurrentChange" :current-page.sync="currentPage"
v-if="dataList.length>0" layout="total,prev, pager, next, jumper" :page-size="msg.pageSize" :total="total">
</el-pagination>
<!-- 新增菜单 -->
<el-dialog title="新增菜单" :visible.sync="menuDialog" width="500px">
<el-form :model="addMsg" :rules="menurules" ref="addMsg" label-width="150px">
<el-form-item label="菜单名称" prop="PageName">
<el-input type="text" style="width:234px" size="small" maxlength="25" v-model="addMsg.PageName"></el-input>
</el-form-item>
<el-form-item label="菜单连接" prop="MenuUrl">
<el-input type="text" style="width:234px" size="small" maxlength="25" v-model="addMsg.PageUrl"></el-input>
</el-form-item>
<el-form-item label="菜单类型">
<el-select style="width:234px;" size="small" v-model="addMsg.PageType">
<el-option v-for="item in pageType" :key="item.Id" :value="item.Id" :label="item.Name"></el-option>
</el-select>
</el-form-item>
<el-form-item label="是否有参数">
<el-switch v-model="addMsg.IsParameter" :active-value="1" :inactive-value="0"></el-switch>
</el-form-item>
<el-form-item label="参数值" v-if="addMsg.IsParameter==1">
<el-input type="text" style="width:234px" size="small" maxlength="25" v-model="addMsg.ParameterValue">
</el-input>
</el-form-item>
<el-form-item label="排序">
<el-input type="text" style="width:234px" @keyup.native="checkInteger(addMsg,'PageSort')" size="small"
maxlength="25" v-model="addMsg.PageSort"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="menuDialog = false">取 消</el-button>
<el-button size="small" type="primary" @click="submitForm('addMsg')">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
data() {
return {
loading: false,
menuDialog: false,
currentPage: 1,
total: 0,
msg: {
pageIndex: 1,
pageSize: 20,
QPageType: 0,
PageName: "", //菜单名称
Status: -1, //菜单状态
},
dataList: [],
addMsg: {
PageId: 0, //页面编号
PageType: 1, //页面类型(1-基础页面,2-营销页面,3-订单页面,4-插件页面,5-diy页面
PageName: '', //页面名称
PageUrl: "", //页面地址
PageSort: 0, //页面排序
IsParameter: 0, //是否有参数(0-无参数,1-有参数)
ParameterValue: "", //参数值
},
pageType: [],
menurules: {
PageName: [{
required: true,
message: '请填写菜单名称。',
trigger: 'blur'
}],
}
};
},
created() {
},
methods: {
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getPageList();
},
submitForm(addMsg) {
//提交创建、修改表单
this.$refs[addMsg].validate(valid => {
if (valid) {
this.addMenu();
} else {
return false;
}
});
},
//重置菜单
resetMsg() {
this.addMsg.PageId = 0;
this.addMsg.PageType = 1;
this.addMsg.PageName = "";
this.addMsg.PageUrl = "";
this.addMsg.PageSort = 0;
this.addMsg.IsParameter = 0;
this.addMsg.ParameterValue = "";
},
//获取页面类型
getPageTypeList() {
this.apipost("/api/Tenant/GetMiniProgramePageType", {}, res => {
if (res.data.resultCode == 1) {
this.pageType = res.data.data;
} else {
this.Info(res.data.message);
}
})
},
//获取分页数据
getPageList() {
this.apipost("/api/Tenant/GetMiniProgramePageManage_Page", this.msg, res => {
if (res.data.resultCode == 1) {
this.dataList = res.data.data.pageData;
this.total = res.data.data.count;
} else {
this.Info(res.data.message);
}
})
},
//添加修改菜单
addMenu() {
this.apipost("/api/Tenant/SetMiniProgramePageManage", this.addMsg, res => {
if (res.data.resultCode == 1) {
this.getPageList();
this.menuDialog = false;
this.resetMsg();
} else {
this.Info(res.data.message);
}
})
},
//根据编号获取菜单
getMenu(Id) {
this.apipost("/api/Tenant/GetMiniProgramePageManage", {
PageId: Id
}, res => {
if (res.data.resultCode == 1) {
this.addMsg = res.data.data;
this.menuDialog = true;
} else {
this.Info(res.data.message);
}
})
},
//删除菜单
delMenu(Id) {
var that = this;
that.Confirm("是否删除?", function () {
that.apipost("/api/Tenant/SetMiniProgramePageManageStatus", {
PageId: Id,
Status: 1
}, res => {
if (res.data.resultCode == 1) {
that.Success(res.data.message);
that.getPageList();
} else {
that.Info(res.data.message);
}
})
});
},
//恢复菜单
recoverMenu(Id) {
this.apipost("/api/Tenant/SetMiniProgramePageManageStatus", {
PageId: Id,
Status: 0
}, res => {
if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.getPageList();
} else {
this.Info(res.data.message);
}
})
},
},
mounted() {
this.getPageTypeList();
this.getPageList();
}
};
</script>
<style>
.minimenuDiv {
padding: 20px;
}
.minimenuDiv .query-box {
width: 100%;
padding: 0 0 20px;
border-bottom: 1px solid #ccc;
position: relative;
text-align: right;
}
.minimenuDiv .normalBtn {
color: #fff;
padding: 0 15px;
height: 30px;
background: #e95252;
border: 1px solid #e95252;
cursor: pointer;
border-radius: 15px;
margin-left: 10px;
outline: none;
}
</style>
<template>
<div class="minimenuDiv">
<div class="query-box">
<button type="button" class="normalBtn" @click="setMiniProgramPage()">保存</button>
</div>
<table class="commonTable" border="0" cellspacing="0" cellpadding="0" v-loading="loading">
<tr>
<th>菜单类型</th>
<th>菜单</th>
</tr>
<tr v-for="(item,index) in dataList" :key="index">
<td>
<el-checkbox v-model="item.IsChecked" :key="index" @change="ChangeItem(item)">{{item.PageTypeName}}
</el-checkbox>
</td>
<td style="text-align:left; padding-left:5px;">
<template v-for="(subItem,subIndex) in item.SubMenuList">
<el-checkbox v-model="subItem.IsChecked" :key="subIndex">{{subItem.PageName}}</el-checkbox>
</template>
</td>
</tr>
</table>
</div>
</template>
<script>
export default {
data() {
return {
loading: false,
dataList: [],
pageType: [],
MallBaseId: 0, //小程序Id
};
},
created() {
},
methods: {
ChangeItem(item) {
if (item.SubMenuList && item.SubMenuList.length > 0) {
item.SubMenuList.forEach(subItem => {
subItem.IsChecked = item.IsChecked;
})
}
},
//获取分页数据
getPageList() {
this.apipost("/api/Tenant/GetMiniProgramePageManageList", {}, res => {
if (res.data.resultCode == 1) {
this.dataList = res.data.data;
} else {
this.Info(res.data.message);
}
})
},
//添加修改菜单
setMiniProgramPage() {
var setArray = []; //新增修改的数组
var deleteArray = []; //删除的数组
if (this.dataList && this.dataList.length > 0) {
this.dataList.forEach(item => {
if (item.SubMenuList && item.SubMenuList.length > 0) {
item.SubMenuList.forEach(subItem => {
if (subItem.IsChecked) {
setArray.push({
Id: subItem.Id,
PageId: subItem.PageId,
MallBaseId: this.MallBaseId
});
} else {
deleteArray.push({
Id: subItem.Id,
PageId: subItem.PageId,
MallBaseId: this.MallBaseId
})
}
})
}
})
}
if (setArray.length == 0 && deleteArray.length == 0) {
this.Info("请选择要操作的菜单!");
return;
}
var msg = {
setMsg: setArray,
delMsg: deleteArray
};
this.apipost("/api/Tenant/SetMiniProgram_Page", msg, res => {
if (res.data.resultCode == 1) {
this.getPageList();
this.Success(res.data.message);
} else {
this.Info(res.data.message);
}
})
},
},
mounted() {
this.MallBaseId = this.getLocalStorage().MallBaseId;
this.getPageList();
}
};
</script>
...@@ -56,7 +56,7 @@ export default { ...@@ -56,7 +56,7 @@ export default {
let domainUrl = ''; let domainUrl = '';
domainUrl = "http://192.168.2.214:8200"; domainUrl = "http://192.168.2.214:8200";
// domainUrl = "https://localhost:5001"; // domainUrl = "https://localhost:5001";
domainUrl = "http://192.168.2.65"; domainUrl = "http://192.168.2.17:8088";
let locationName = window.location.hostname; let locationName = window.location.hostname;
if (locationName.indexOf('testerp.oytour') !== -1) { if (locationName.indexOf('testerp.oytour') !== -1) {
domainUrl = "http://testapi.oytour.com"; domainUrl = "http://testapi.oytour.com";
...@@ -68,6 +68,7 @@ export default { ...@@ -68,6 +68,7 @@ export default {
DomainUrl: domainUrl, DomainUrl: domainUrl,
//常用提交数据URL //常用提交数据URL
PostUrl: domainUrl + "/api/common/post", PostUrl: domainUrl + "/api/common/post",
ImageUrl:'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com'
}; };
return obj; return obj;
}, },
...@@ -121,6 +122,7 @@ export default { ...@@ -121,6 +122,7 @@ export default {
UserImg: "User", //用户相图片 UserImg: "User", //用户相图片
//常用提交数据URL //常用提交数据URL
GoodsImg: "Goods", //素材相关文件 GoodsImg: "Goods", //素材相关文件
SetImg: "Set", //用户相图片
}; };
return fileTypeJson; return fileTypeJson;
}, },
......
...@@ -4,8 +4,7 @@ import Router from 'vue-router' ...@@ -4,8 +4,7 @@ import Router from 'vue-router'
Vue.use(Router) Vue.use(Router)
export default new Router({ export default new Router({
routes: [ routes: [{
{
path: '/', path: '/',
name: 'login', name: 'login',
component: resolve => require(['@/components/Login'], resolve), component: resolve => require(['@/components/Login'], resolve),
...@@ -16,7 +15,7 @@ export default new Router({ ...@@ -16,7 +15,7 @@ export default new Router({
component: resolve => require(['@/components/Login'], resolve), component: resolve => require(['@/components/Login'], resolve),
}, },
{ {
path:'/Forgetpassword', path: '/Forgetpassword',
name: 'Forgetpassword', name: 'Forgetpassword',
component: resolve => require(['@/components/Forgetpassword'], resolve), component: resolve => require(['@/components/Forgetpassword'], resolve),
}, },
...@@ -35,12 +34,21 @@ export default new Router({ ...@@ -35,12 +34,21 @@ export default new Router({
name: 'menu', name: 'menu',
component: resolve => require(['@/components/system/menu'], resolve), component: resolve => require(['@/components/system/menu'], resolve),
}, },
{
path: '/minimenu', //小程序菜单管理
name: 'minimenu',
component: resolve => require(['@/components/system/minimenu'], resolve),
},
{
path: '/setminipage', //设置小程序菜单
name: 'setminipage',
component: resolve => require(['@/components/system/setminipage'], resolve),
},
{ {
path: '/mall', path: '/mall',
name: 'mall', name: 'mall',
component: resolve => require(['@/components/mall'], resolve), component: resolve => require(['@/components/mall'], resolve),
children:[ children: [{
{
path: '/zanIndex', path: '/zanIndex',
name: 'zanIndex', name: 'zanIndex',
component: resolve => require(['@/components/zanIndex'], resolve), component: resolve => require(['@/components/zanIndex'], resolve),
...@@ -88,6 +96,13 @@ export default new Router({ ...@@ -88,6 +96,13 @@ export default new Router({
name: 'baseSet', name: 'baseSet',
component: resolve => require(['@/components/UserMan/baseSet'], resolve), component: resolve => require(['@/components/UserMan/baseSet'], resolve),
}, },
// 用户管理 分销商管理 自定义设置
{
path: '/customSet',
name: 'customSet',
component: resolve => require(['@/components/UserMan/customSet'], resolve),
},
// 商品管理 素材管理 // 商品管理 素材管理
{ {
path: '/materialMan', path: '/materialMan',
...@@ -117,6 +132,29 @@ export default new Router({ ...@@ -117,6 +132,29 @@ export default new Router({
path: '/navigationIcon', path: '/navigationIcon',
name: 'navigationIcon', name: 'navigationIcon',
component: resolve => require(['@/components/StoreDesign/navigationIcon'], resolve), component: resolve => require(['@/components/StoreDesign/navigationIcon'], resolve),
},
//店铺管理 商城风格
{
path: '/storeStyle',
name: 'storeStyle',
component: resolve => require(['@/components/StoreDesign/storeStyle'], resolve),
},
//店铺管理 标签栏
{
path: '/labelBar',
name: 'labelBar',
component: resolve => require(['@/components/StoreDesign/labelBar'], resolve),
},
//店铺管理 小程序页面
{
path: '/minipage',
name: 'minipage',
component: resolve => require(['@/components/StoreDesign/minipage'], resolve),
}, //店铺管理 小程序页面标题
{
path: '/minititle',
name: 'minititle',
component: resolve => require(['@/components/StoreDesign/minititle'], resolve),
} }
] ]
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment