Commit 91a210fc authored by zhengke's avatar zhengke
parents 3f28fefa eaddb46e
......@@ -34,6 +34,9 @@
.w100{
width:100px!important;
}
.w120{
width:120px!important;
}
.w200{
width:200px!important;
}
......
This diff is collapsed.
This diff is collapsed.
......@@ -9,29 +9,32 @@
</div>
<div class="content">
<el-table :data="dataList" v-loading="loading" border style="width: 100%;margin:20px 0">
<el-table-column prop="mall_id" label="ID" width="100">
<el-table-column prop="Id" label="ID" width="100">
</el-table-column>
<el-table-column prop="title" width="436" label="标题">
<el-table-column prop="PageName" width="436" label="标题">
</el-table-column>
<el-table-column label="导航与模板" prop="navs" width="750">
<el-table-column label="导航与模板" prop="DetailsList" width="750">
<template slot-scope="scope">
<div class="templat-list">
<div class="templat-item">
<div>{{scope.row.navs[0].navs}}</div>
<div style="color: rgb(153, 153, 153);">{{scope.row.navs[0].template}}</div>
</div>
<template v-if="scope.row.DetailsList && scope.row.DetailsList.length>0"
v-for="(subItem,subIndex) in scope.row.DetailsList">
<div class="templat-item" :key="subIndex">
<div>{{subItem.NavName}}</div>
<div style="color: rgb(153, 153, 153);">{{subItem.TemplateId}}</div>
</div>
</template>
</div>
</template>
</el-table-column>
<el-table-column prop="is_home_page" label="设为首页" width="80">
<el-table-column prop="IsHome" label="设为首页" width="80">
<template slot-scope="scope">
<el-switch v-model="scope.row.is_home_page" active-color="#409EFF" :active-value="1" :inactive-value="0">
<el-switch v-model="scope.row.IsHome" active-color="#409EFF" :active-value="1" :inactive-value="0">
</el-switch>
</template>
</el-table-column>
<el-table-column prop="is_disable" label="禁用/启用" width="85">
<el-table-column prop="IsUse" label="禁用/启用" width="85">
<template slot-scope="scope">
<el-switch v-model="scope.row.is_disable" active-color="#409EFF" :active-value="1" :inactive-value="0">
<el-switch v-model="scope.row.IsUse" active-color="#409EFF" :active-value="1" :inactive-value="0">
</el-switch>
</template>
</el-table-column>
......@@ -58,40 +61,41 @@
<div class="conten_indder">
<el-form label-width="150px">
<el-form-item label="标题">
<el-input type="text" size="small" v-model="addMsg.title"></el-input>
<el-input type="text" size="small" v-model="addMsg.PageName"></el-input>
</el-form-item>
<el-form-item label="启用/禁用">
<el-switch v-model="addMsg.is_disable" active-color="#409EFF" :active-value="1" :inactive-value="0">
<el-switch v-model="addMsg.IsUse" active-color="#409EFF" :active-value="1" :inactive-value="0">
</el-switch>
</el-form-item>
<el-form-item label="显示导航条">
<el-switch v-model="addMsg.show_navs" active-color="#409EFF" :active-value="1" :inactive-value="0">
<el-switch v-model="addMsg.IsShowNav" active-color="#409EFF" :active-value="1" :inactive-value="0">
</el-switch>
</el-form-item>
<el-form-item label="模板和导航">
<div style="max-width:480px;">
<div class="Custom_item" v-for="(item,index) in addMsg.navs" :key="index">
<div class="Custom_item" v-for="(item,index) in addMsg.DetailsList" :key="index">
<div flex="box:last">
<el-form label-width="80px">
<el-form-item label="导航名称" style="margin-bottom:20px;">
<el-input type="text" v-model="item.navs" size="small"></el-input>
<el-input type="text" v-model="item.NavName" size="small"></el-input>
</el-form-item>
<el-form-item label="对应模板">
<el-input type="text" size="small" v-model="item.template">
<el-input type="text" size="small" v-model="item.TemplateId">
<el-button slot="append">选择模板</el-button>
</el-input>
</el-form-item>
</el-form>
<div style="padding-left: 15px;">
<el-tooltip class="item" effect="dark" content="删除导航" placement="bottom">
<img @click="delModel(index)" style="cursor:pointer;" src="../../assets/img/userman/del.png" alt="">
<img @click="delModel(index)" style="cursor:pointer;" src="../../assets/img/userman/del.png"
alt="">
</el-tooltip>
</div>
</div>
</div>
<el-button type="text" @click="addModule()">
<i class="el-icon-plus"></i>
<span style="color: rgb(53, 53, 53);">新增模版和导航</span>
<i class="el-icon-plus"></i>
<span style="color: rgb(53, 53, 53);">新增模版和导航</span>
</el-button>
</div>
</el-form-item>
......@@ -109,33 +113,18 @@
return {
loading: false,
CustomIsShowAdd: true,
dataList: [{
mall_id: '2028',
title: '欧洲严选',
navs: [{
navs: "欧洲严选",
navs_id: 4275,
template: "欧洲严选",
template_id: 3781
}],
show_navs: 0,
is_disable: 1,
is_home_page: 0,
is_delete: 0
}],
dataList: [],
msg: {
pageIndex: 1,
pageSize: 10,
},
addMsg: {
title: '',
is_disable: 1,
show_navs: 0,
navs: [{
navs: "",
navs_id: 0,
template: "",
template_id: 0
}]
Id: 0,
PageName: '',
IsHome: 0,
IsUse: 1,
IsShowNav: 0,
DetailsList: []
},
total: 0,
};
......@@ -152,9 +141,10 @@
this.getList();
},
getList() {
this.apipost("/api/Tenant/GetMiniProgrameNaviconPage", this.msg, res => {
this.apipost("/api/Template/GetMiniprogramPageTemplPageList", this.msg, res => {
if (res.data.resultCode == 1) {
this.dataList = res.data.data.pageData;
console.log("this.dataList", this.dataList);
this.total = res.data.data.count;
} else {
this.Info(res.data.message);
......@@ -162,33 +152,67 @@
})
},
submitform(addMsg) {
this.apipost("/api/Template/SetMiniprogramPageTempl", this.addMsg, res => {
if (res.data.resultCode == 1) {
this.getList();
this.CustomIsShowAdd = true;
} else {
this.Info(res.data.message);
}
})
},
//编辑
EditCustom() {
EditCustom(item) {
this.apipost("/api/Template/GetMiniprogramPageTempl", {
Id: item.Id
}, res => {
if (res.data.resultCode == 1) {
var jsonData = res.data.data;
this.addMsg.Id=jsonData.Id;
this.addMsg.PageName=jsonData.PageName;
this.addMsg.IsUse=jsonData.IsUse;
this.addMsg.IsShowNav=jsonData.IsShowNav;
this.addMsg.IsHome=jsonData.IsHome;
this.addMsg.DetailsList=jsonData.DetailsList;
this.CustomIsShowAdd = false;
} else {
this.Info(res.data.message);
}
})
},
//删除
RemoveCustom() {
RemoveCustom(item) {
let that = this;
that.Confirm("是否删除?", function () {
that.apipost("/api/Template/RemoveMiniprogramPageTempl", {
Id: item.Id,
Status: 1,
}, res => {
if (res.data.resultCode == 1) {
that.getList();
} else {
that.Info(res.data.message);
}
})
});
},
//新增模板导航
addModule(){
let obj={
navs: "",
navs_id: 0,
template: "",
template_id: 0
}
this.addMsg.navs.push(obj);
addModule() {
let obj = {
Id: 0,
PageTemplID: 0,
NavName: "",
TemplateId: 0,
}
this.addMsg.DetailsList.push(obj);
},
//删除模板
delModel(index){
this.addMsg.navs.splice(index,1);
delModel(index) {
this.addMsg.DetailsList.splice(index, 1);
}
},
mounted() {
//this.getList();
this.getList();
}
};
......
......@@ -228,6 +228,18 @@ export default new Router({
name: 'goodsListEdit',
component: resolve => require(['@/components/CommodityMan/goodsListEdit'], resolve),
},
// 商品管理 商品列表新增
{
path: '/orderList',
name: 'orderList',
component: resolve => require(['@/components/orderMan/orderList'], resolve),
},
// 商品管理 商品详情
{
path: '/orderDetails',
name: 'orderDetails',
component: resolve => require(['@/components/orderMan/orderDetails'], resolve),
},
//设置 基础设置
{
path: '/basicSetUp',
......
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