Merge branch 'feature_0521' of http://git.51jingcheng.com/zhenghuang/bsdgy-front into feature_0521
commit
f1f89e5212
@ -0,0 +1,92 @@
|
|||||||
|
<template>
|
||||||
|
<div style="padding: 0 40px;">
|
||||||
|
<Form ref="formValidate"
|
||||||
|
:model="useData"
|
||||||
|
:label-width="80">
|
||||||
|
<Row>
|
||||||
|
<i-col span="22"
|
||||||
|
offset="2">
|
||||||
|
<FormItem label="配置范围"
|
||||||
|
prop="activityRange">
|
||||||
|
<Collapse simple>
|
||||||
|
<Panel :key="index"
|
||||||
|
v-for="(item, index) in groups">
|
||||||
|
{{
|
||||||
|
item.name
|
||||||
|
}} {{
|
||||||
|
item.stores.length
|
||||||
|
}}家店铺
|
||||||
|
<div slot="content">
|
||||||
|
<div class="activityShopClass">
|
||||||
|
<div class="mr10"
|
||||||
|
v-for="(item, index) in item.stores"
|
||||||
|
:key="index">
|
||||||
|
<Tag class="tagClass"
|
||||||
|
color="blue">{{ item.name }}</Tag>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</Panel>
|
||||||
|
</Collapse>
|
||||||
|
</FormItem>
|
||||||
|
</i-col>
|
||||||
|
</Row>
|
||||||
|
</Form>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import store from "../../store/index";
|
||||||
|
export default {
|
||||||
|
name: "useActivityStepFoure",
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
useData: store.getters.useData,
|
||||||
|
operate: "收起",
|
||||||
|
displayActivityShopFlag: false,
|
||||||
|
groups: [],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
detail: Object
|
||||||
|
},
|
||||||
|
created () {
|
||||||
|
let _this = this;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
console.log(123, this.detail)
|
||||||
|
_this.detail.organizations.forEach((item) => {
|
||||||
|
item.stores = _this._.filter(
|
||||||
|
_this.detail.stores,
|
||||||
|
(s) => s.companyId == item.id || s.parentId == item.id
|
||||||
|
);
|
||||||
|
console.log(item.stores)
|
||||||
|
_this.groups.push(item);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
isDisplay () {
|
||||||
|
if (this.operate === "展开") {
|
||||||
|
this.operate = "收起";
|
||||||
|
this.displayActivityShopFlag = false;
|
||||||
|
} else {
|
||||||
|
this.operate = "展开";
|
||||||
|
this.displayActivityShopFlag = true;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.activityShopClass {
|
||||||
|
display: flex;
|
||||||
|
justify-content: start;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
.mr10 {
|
||||||
|
margin-right: 20px;
|
||||||
|
}
|
||||||
|
.tagClass {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
</style>
|
Loading…
Reference in New Issue