| | |
| | | <template v-else>暂无标签</template> |
| | | </span> |
| | | </p> |
| | | <p class="item"> |
| | | <span class="label">上级店铺:</span> |
| | | <span class="info"> |
| | | {{storeRelationship.upStore ? storeRelationship.upStore.storeName:'暂无'}} |
| | | </span> |
| | | </p> |
| | | <p class="item"> |
| | | <span class="label">下级店铺:</span> |
| | | <span class="info"> |
| | | {{ storeRelationship.downStore && storeRelationship.downStore.length |
| | | ? storeRelationship.downStore.map(store => store.storeName).join('、') |
| | | : '暂无' }} |
| | | </span> |
| | | </p> |
| | | <div style="display: flex;align-items: center;justify-content: center;"> |
| | | <Button type="primary" @click="addStoreTag(storeInfo)">新增标签</Button> |
| | | </div> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getStoreRelationship} from "@/api/storeRelationship" |
| | | import { getTag,bind,getStoreTagsById,delTagByStoreTagRefId } from "@/api/store-tag" |
| | | import ossManage from "@/views/sys/oss-manage/ossManage"; |
| | | import * as RegExp from '@/libs/RegExp.js'; |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | storeRelationship:{},//店铺关系对象 |
| | | tagOptions:[], |
| | | submitLoading:false, |
| | | tagForm:{ |
| | |
| | | refundOrderTotal: 0,//售后单总条数 |
| | | }; |
| | | }, |
| | | watch: { |
| | | // 监听路由对象变化 |
| | | $route(to, from) { |
| | | console.log(to.name) |
| | | if (to.name === 'shop-detail' && to.query.id) { |
| | | if (to.query.id !== from.query.id) { |
| | | this.id = to.query.id; |
| | | this.init(); |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | getStoreRelationship(){ |
| | | getStoreRelationship(this.id).then(res =>{ |
| | | if (res.code === 200){ |
| | | this.$set(this, "storeRelationship", res.data); |
| | | } |
| | | }) |
| | | }, |
| | | handleDeleteTag(storeTagRefId){ |
| | | console.log(storeTagRefId) |
| | | delTagByStoreTagRefId(storeTagRefId).then(res=>{ |
| | |
| | | }, |
| | | init() { |
| | | this.getStoreTags(); |
| | | |
| | | this.getStoreRelationship(); |
| | | this.getStoreTag(); |
| | | //查店铺基本信息 |
| | | this.getStoreInfo(); |
| | |
| | | mounted() { |
| | | this.id = this.$route.query.id; |
| | | this.init(); |
| | | console.log("加载页面") |
| | | } |
| | | }; |
| | | </script> |