Commit c0901f18 by lixiaomin

修改轮播位置

parent 2a9bd14d
...@@ -49,12 +49,7 @@ ...@@ -49,12 +49,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="适用范围" align="center" prop="areaLimitDesc"/> <el-table-column label="适用范围" align="center" prop="areaLimitDesc"/>
<el-table-column label="轮播位置" align="center" prop="target"> <el-table-column label="轮播位置" align="center" prop="targetStr"/>
<template slot-scope="scope">
<span v-if="scope.row.target == 1">菜单页顶部</span>
<span v-if="scope.row.target == 2">我的页banner</span>
</template>
</el-table-column>
<el-table-column label="轮播顺序" align="center" prop="sort" /> <el-table-column label="轮播顺序" align="center" prop="sort" />
<el-table-column label="链接地址" align="center" prop="page" /> <el-table-column label="链接地址" align="center" prop="page" />
<el-table-column label="状态" align="center" prop="state"> <el-table-column label="状态" align="center" prop="state">
...@@ -97,7 +92,7 @@ ...@@ -97,7 +92,7 @@
</el-row> </el-row>
<el-row> <el-row>
<el-form-item label="轮播位置" prop="target"> <el-form-item label="轮播位置" prop="target">
<el-select v-model="form.target" placeholder="请选择" clearable style="width: 300px;"> <el-select v-model="form.target" placeholder="请选择" clearable style="width: 300px;" multiple>
<el-option label="我的页banner" value='2' /> <el-option label="我的页banner" value='2' />
<el-option label="菜单页顶部" value='1' /> <el-option label="菜单页顶部" value='1' />
</el-select> </el-select>
...@@ -174,7 +169,7 @@ export default { ...@@ -174,7 +169,7 @@ export default {
id:null, id:null,
type:'', type:'',
state:null, state:null,
target:null, target:[],
shopIds:[], shopIds:[],
area:[], area:[],
city:[], city:[],
...@@ -273,7 +268,7 @@ export default { ...@@ -273,7 +268,7 @@ export default {
this.form.id=null; this.form.id=null;
this.form.image=""; this.form.image="";
this.form.page=""; this.form.page="";
this.form.target=""; this.form.target=[];
this.storesRange=[]; this.storesRange=[];
this.form.sort=""; this.form.sort="";
this.form.shopIds=[], this.form.shopIds=[],
...@@ -286,12 +281,11 @@ export default { ...@@ -286,12 +281,11 @@ export default {
this.title="修改轮播图"; this.title="修改轮播图";
let obj=Object.assign({},row); let obj=Object.assign({},row);
this.form=obj; this.form=obj;
this.form.target=obj.target+""; this.form.target=obj.target;
let list=this.getMap(); let list=this.getMap();
getShopAreaTree().then((response) => { getShopAreaTree().then((response) => {
if(response.code==200){ if(response.code==200){
let treeList=response.data; let treeList=response.data;
console.log("treeList ",treeList);
//填充省市区的label值 //填充省市区的label值
for(let i=0;i<treeList.length;i++){ for(let i=0;i<treeList.length;i++){
treeList[i].label=list.get(treeList[i].value); treeList[i].label=list.get(treeList[i].value);
......
...@@ -48,11 +48,7 @@ ...@@ -48,11 +48,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="适用范围" align="center" prop="areaLimitDesc"/> <el-table-column label="适用范围" align="center" prop="areaLimitDesc"/>
<el-table-column label="轮播位置" align="center" prop="target"> <el-table-column label="轮播位置" align="center" prop="targetStr"/>
<template slot-scope="scope">
<span v-if="scope.row.target == 0">菜单轮播</span>
</template>
</el-table-column>
<el-table-column label="轮播顺序" align="center" prop="sort" /> <el-table-column label="轮播顺序" align="center" prop="sort" />
<el-table-column label="链接地址" align="center" prop="page" /> <el-table-column label="链接地址" align="center" prop="page" />
<el-table-column label="状态" align="center" prop="state"> <el-table-column label="状态" align="center" prop="state">
...@@ -95,7 +91,7 @@ ...@@ -95,7 +91,7 @@
</el-row> </el-row>
<el-row> <el-row>
<el-form-item label="轮播位置" prop="target"> <el-form-item label="轮播位置" prop="target">
<el-select v-model="form.target" placeholder="请选择" clearable style="width: 300px;"> <el-select v-model="form.target" placeholder="请选择" clearable style="width: 300px;" multiple>
<el-option label="菜单轮播" value='0' /> <el-option label="菜单轮播" value='0' />
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -171,7 +167,7 @@ export default { ...@@ -171,7 +167,7 @@ export default {
id:null, id:null,
type:'', type:'',
state:null, state:null,
target:null, target:[],
shopIds:[], shopIds:[],
area:[], area:[],
city:[], city:[],
...@@ -270,7 +266,7 @@ export default { ...@@ -270,7 +266,7 @@ export default {
this.form.id=null; this.form.id=null;
this.form.image=""; this.form.image="";
this.form.page=""; this.form.page="";
this.form.target=""; this.form.target=[];
this.storesRange=[]; this.storesRange=[];
this.form.sort=""; this.form.sort="";
this.form.shopIds=[], this.form.shopIds=[],
...@@ -283,12 +279,11 @@ export default { ...@@ -283,12 +279,11 @@ export default {
this.title="修改轮播图"; this.title="修改轮播图";
let obj=Object.assign({},row); let obj=Object.assign({},row);
this.form=obj; this.form=obj;
this.form.target=obj.target+""; this.form.target=obj.target;
let list=this.getMap(); let list=this.getMap();
getShopAreaTree().then((response) => { getShopAreaTree().then((response) => {
if(response.code==200){ if(response.code==200){
let treeList=response.data; let treeList=response.data;
console.log("treeList ",treeList);
//填充省市区的label值 //填充省市区的label值
for(let i=0;i<treeList.length;i++){ for(let i=0;i<treeList.length;i++){
treeList[i].label=list.get(treeList[i].value); treeList[i].label=list.get(treeList[i].value);
......
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