学习很差啦 2022-12-07 10:36:17 +08:00
commit d84250ab88
4 changed files with 117 additions and 92 deletions

View File

@ -26,11 +26,18 @@
>选择促销活动</Button >选择促销活动</Button
> >
</div> </div>
<Alert type="warning" v-if="res.name == '商品分类'"> <Alert type="warning" v-if="res.name == ''"
>装修提示
<template slot="desc"> <template slot="desc">
<div style="color:red"> 如果当前装修模块不是最后一项模块且模块内容绑定为分类则会默认展示绑定分类的100条商品信息</div> <div style="color: red">
<div style="color:red"> 如果当前装修模块是最后一项模块且模块内容绑定为分类则会默认会根据绑定分类触底加载商品信息</div> 如果当前装修模块不是最后一项模块且模块内容绑定为分类则会默认展示绑定分类的100条商品信息
<div style="color:red"> 如果当前装修内容不为分类则会展示当前商品的静态信息</div> </div>
<div style="color: red">
如果当前装修模块是最后一项模块且模块内容绑定为分类则会默认会根据绑定分类触底加载商品信息
</div>
<div style="color: red">
如果当前装修内容不为分类则会展示当前商品的静态信息
</div>
</template> </template>
</Alert> </Alert>
@ -120,10 +127,7 @@
<div class="decorate-view"> <div class="decorate-view">
<div class="decorate-view-title">绑定</div> <div class="decorate-view-title">绑定</div>
<div class="decorate-view-link"> <div class="decorate-view-link">
<div <div v-if="res.options.list[0].listWay.length != 0">
v-if="res.options.list[0].listWay.length != 0"
>
<!-- 绑定商品选择器回调已选择的商品 --> <!-- 绑定商品选择器回调已选择的商品 -->
<div <div
@ -160,25 +164,23 @@
> >
</div> </div>
</div> </div>
</div> </div>
<!-- 显示绑定分类 --> <!-- 显示绑定分类 -->
<div v-if="title_item.bindCategory" > <div v-if="title_item.bindCategory">
绑定分类为{{ title_item.bindCategory.name }} 绑定分类为{{ title_item.bindCategory.name }}
</div> </div>
</div> </div>
<div class="decorate-view-btn"> <div class="decorate-view-btn">
<Button <Button
@click="bindGoodsId(title_item,title_index)" @click="bindGoodsId(title_item, title_index)"
size="small" size="small"
>选择商品</Button >选择商品</Button
> >
<Button <Button
@click="bindGoodsCategory(title_index)" @click="bindGoodsCategory(title_index)"
size="small" size="small"
style="margin-top: 20px"
style='margin-top:20px'
>选择分类</Button >选择分类</Button
> >
</div> </div>
@ -437,10 +439,15 @@
{{ item.model === "hotzone" ? "绘制热区" : "选择链接" }}</Button {{ item.model === "hotzone" ? "绘制热区" : "选择链接" }}</Button
> >
</div> </div>
</div>
<!-- 链接地址--> <!-- 链接地址-->
<div <div
class="decorate-view" class="decorate-view"
v-if="item.url && item.url.url && item.url.___type == 'other'" v-if="
item.url &&
item.url.url !== undefined &&
item.url.___type == 'other'
"
> >
<div class="decorate-view-title">外部链接</div> <div class="decorate-view-title">外部链接</div>
<div> <div>
@ -448,13 +455,18 @@
</div> </div>
</div> </div>
<p v-if="item.url && item.url.url && item.url.___type == 'other'"> <p
v-if="
item.url &&
item.url.url !== undefined &&
item.url.___type == 'other'
"
>
(如非同域名下则在小程序与公众号中无效) (如非同域名下则在小程序与公众号中无效)
</p> </p>
</div> </div>
</div> </div>
</div> </div>
</div>
<Button <Button
v-if=" v-if="
@ -475,8 +487,11 @@
@selectedGoodsData="selectedGoodsData" @selectedGoodsData="selectedGoodsData"
></liliDialog> ></liliDialog>
<Modal width='800px' title="选择分类" v-model="enableSelectCategory"> <Modal width="800px" title="选择分类" v-model="enableSelectCategory">
<categoryTemplate v-if="enableSelectCategory" @selected="confirmCategory" /> <categoryTemplate
v-if="enableSelectCategory"
@selected="confirmCategory"
/>
</Modal> </Modal>
<hotzone ref="hotzone" @changeZone="changeZone"></hotzone> <hotzone ref="hotzone" @changeZone="changeZone"></hotzone>
@ -496,7 +511,7 @@ export default {
components: { components: {
ossManage, ossManage,
hotzone, hotzone,
categoryTemplate categoryTemplate,
}, },
data() { data() {
return { return {
@ -513,8 +528,8 @@ export default {
selectedGoods: "", // selectedGoods: "", //
selectedLinks: "", // selectedLinks: "", //
modelList: "", // modelList: "", //
enableSelectCategory:false, // enableSelectCategory: false, //
goodsSelectedIndex:0, // goodsSelectedIndex: 0, //
}; };
}, },
watch: { watch: {
@ -526,23 +541,26 @@ export default {
props: ["res"], props: ["res"],
methods: { methods: {
// //
confirmCategory(val){ confirmCategory(val) {
let data = {...this.res.options.list[0].titleWay[this.goodsSelectedIndex]} let data = {
...this.res.options.list[0].titleWay[this.goodsSelectedIndex],
};
let callback = { let callback = {
id:val[0].id, id: val[0].id,
name:val[0].name, name: val[0].name,
categoryIdWay:val[0].id categoryIdWay: val[0].id,
}; };
data = { data = {
...data, ...data,
bindCategory:callback bindCategory: callback,
} };
this.res.options.list[0].listWay = this.res.options.list[0].listWay.filter(item=>{ this.res.options.list[0].listWay =
return item.___index != this.goodsSelectedIndex this.res.options.list[0].listWay.filter((item) => {
}) return item.___index != this.goodsSelectedIndex;
this.res.options.list[0].titleWay[this.goodsSelectedIndex] = data });
this.res.options.list[0].titleWay[this.goodsSelectedIndex] = data;
console.log( this.res.options.list[0]) console.log(this.res.options.list[0]);
}, },
// //
slotGoods(list, key, val) { slotGoods(list, key, val) {
@ -621,7 +639,7 @@ export default {
}, },
// //
selectedLink(val) { selectedLink(val) {
this.selectedLinks.zoneInfo = [] this.selectedLinks.zoneInfo = [];
delete val.selected; delete val.selected;
delete val.intro; delete val.intro;
delete val.mobileIntro; delete val.mobileIntro;
@ -644,20 +662,20 @@ export default {
}); });
this.res.options.list[0].listWay.push(...data); this.res.options.list[0].listWay.push(...data);
// //
this.res.options.list[0].titleWay[this.goodsSelectedIndex].bindCategory = "" this.res.options.list[0].titleWay[this.goodsSelectedIndex].bindCategory =
"";
this.linkType = ""; this.linkType = "";
}, },
// //
bindGoodsId(val,index) { bindGoodsId(val, index) {
this.selectedGoods = val; this.selectedGoods = val;
this.goodsSelectedIndex = index this.goodsSelectedIndex = index;
this.liliDialogFlag(true); this.liliDialogFlag(true);
}, },
// //
bindGoodsCategory(index,key){ bindGoodsCategory(index, key) {
this.enableSelectCategory = true this.enableSelectCategory = true;
this.goodsSelectedIndex = index this.goodsSelectedIndex = index;
}, },
// //
clickDrawer(item, index) { clickDrawer(item, index) {

View File

@ -871,7 +871,9 @@
this.$set(this, "storeInfo", res.result); this.$set(this, "storeInfo", res.result);
//switchtruefalse //switchtruefalse
this.storeInfo.storeDisable = this.storeInfo.storeDisable === "OPEN" ? true : false this.storeInfo.storeDisable = this.storeInfo.storeDisable === "OPEN" ? true : false
if(this.storeInfo.goodsManagementCategory != null){
this.checkAllGroup = this.storeInfo.goodsManagementCategory.split(","); this.checkAllGroup = this.storeInfo.goodsManagementCategory.split(",");
}
this.storeInfo.legalPhoto = this.storeInfo.legalPhoto.split(","); this.storeInfo.legalPhoto = this.storeInfo.legalPhoto.split(",");
}); });
}, },

View File

@ -24,7 +24,7 @@
<Select v-model="searchForm.storeDisable" clearable style="width: 200px"> <Select v-model="searchForm.storeDisable" clearable style="width: 200px">
<Option value="OPEN">开启中</Option> <Option value="OPEN">开启中</Option>
<Option value="CLOSED">已关闭</Option> <Option value="CLOSED">已关闭</Option>
<Option value="APPLY">申请中</Option> <!-- <Option value="APPLY">申请中</Option> -->
<Option value="APPLYING">审核中</Option> <Option value="APPLYING">审核中</Option>
<Option value="REFUSED">审核拒绝</Option> <Option value="REFUSED">审核拒绝</Option>
</Select> </Select>
@ -329,6 +329,7 @@ export default {
}, },
// //
getDataList() { getDataList() {
console.log(this.searchForm)
this.loading = true; this.loading = true;
// //
getShopListData(this.searchForm).then((res) => { getShopListData(this.searchForm).then((res) => {

View File

@ -289,6 +289,10 @@ export const editDepartment = (ids, params) => {
export const loadDepartment = (id) => { export const loadDepartment = (id) => {
return getRequest(`/department/${id}`); return getRequest(`/department/${id}`);
}; };
// 搜索部门
export const searchDepartment = (params) => {
return getRequest("/department", params);
};
// 通过部门获取全部角色数据 // 通过部门获取全部角色数据
export const getUserByDepartmentId = (id, params) => { export const getUserByDepartmentId = (id, params) => {