|
@@ -3,8 +3,7 @@
|
|
|
<el-row class="order_tab">
|
|
|
<el-col :span="24">
|
|
|
<div class="tab_list">
|
|
|
- <div class="tab_item" @click="changeTabs(i)" :class="{'tab_item_ac':tab_ac==i?true:false}"
|
|
|
- v-for="(item,i) in tab_list" :key="i">
|
|
|
+ <div class="tab_item" @click="changeTabs(i)" :class="{'tab_item_ac':tab_ac==i?true:false}" v-for="(item,i) in tab_list" :key="i">
|
|
|
<span>{{item.name}}</span>
|
|
|
<div class="tab_line"></div>
|
|
|
</div>
|
|
@@ -21,106 +20,117 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import shopList from './shopCompoents/shopList';
|
|
|
- import storeList from './shopCompoents/bindTakeOut.vue';
|
|
|
- import deliveryList from './shopCompoents/bindDelivery.vue';
|
|
|
- import printerList from './shopCompoents/bindPrinter.vue';
|
|
|
- export default {
|
|
|
- name: 'HelloWorld',
|
|
|
- components: {
|
|
|
- shopList,
|
|
|
- storeList,
|
|
|
- deliveryList,
|
|
|
- printerList
|
|
|
- },
|
|
|
+import shopList from "./shopCompoents/shopList";
|
|
|
+import storeList from "./shopCompoents/bindTakeOut.vue";
|
|
|
+import deliveryList from "./shopCompoents/bindDelivery.vue";
|
|
|
+import printerList from "./shopCompoents/bindPrinter.vue";
|
|
|
+import bus from "../common/bus.js";
|
|
|
+export default {
|
|
|
+ name: "HelloWorld",
|
|
|
+ components: {
|
|
|
+ shopList,
|
|
|
+ storeList,
|
|
|
+ deliveryList,
|
|
|
+ printerList,
|
|
|
+ },
|
|
|
|
|
|
- data() {
|
|
|
- return {
|
|
|
- activeName: 'shopList',
|
|
|
- tab_list: [
|
|
|
- {name: '门店列表', index: 0},
|
|
|
- {name: '绑定外卖平台', index: 1},
|
|
|
- {name: '绑定配送平台', index: 2},
|
|
|
- {name: '绑定打印机', index: 3}
|
|
|
- ],
|
|
|
- tab_ac: 0,
|
|
|
- }
|
|
|
- },
|
|
|
- methods: {
|
|
|
- changeTabs(i) {
|
|
|
- this.tab_ac = i;
|
|
|
- switch(i) {
|
|
|
- case 0:
|
|
|
- this.activeName = 'shopList';
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ activeName: "shopList",
|
|
|
+ tab_list: [
|
|
|
+ { name: "门店列表", index: 0 },
|
|
|
+ { name: "绑定外卖平台", index: 1 },
|
|
|
+ { name: "绑定配送平台", index: 2 },
|
|
|
+ { name: "绑定打印机", index: 3 },
|
|
|
+ ],
|
|
|
+ tab_ac: 0,
|
|
|
+ };
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ bus.$on("goPrinter", () => {
|
|
|
+ this.changeTabs(3);
|
|
|
+ });
|
|
|
+ let i = this.$route.query.tab_ac;
|
|
|
+ if (i) {
|
|
|
+ this.changeTabs(Number(i));
|
|
|
+ // this.$route.query = {}
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted() {},
|
|
|
+ methods: {
|
|
|
+ changeTabs(i) {
|
|
|
+ this.tab_ac = i;
|
|
|
+ switch (i) {
|
|
|
+ case 0:
|
|
|
+ this.activeName = "shopList";
|
|
|
break;
|
|
|
- case 1:
|
|
|
- this.activeName = 'storeList';
|
|
|
+ case 1:
|
|
|
+ this.activeName = "storeList";
|
|
|
break;
|
|
|
- case 2:
|
|
|
- this.activeName = 'deliveryList';
|
|
|
+ case 2:
|
|
|
+ this.activeName = "deliveryList";
|
|
|
break;
|
|
|
- case 3:
|
|
|
- this.activeName = 'printerList';
|
|
|
+ case 3:
|
|
|
+ this.activeName = "printerList";
|
|
|
break;
|
|
|
- default:
|
|
|
- this.activeName = 'shopList';
|
|
|
+ default:
|
|
|
+ this.activeName = "shopList";
|
|
|
break;
|
|
|
- }
|
|
|
- },
|
|
|
+ }
|
|
|
},
|
|
|
- mounted() {
|
|
|
- }
|
|
|
- }
|
|
|
+ },
|
|
|
+ mounted() {},
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
|
|
<style scoped lang="scss">
|
|
|
- .shopInfo {
|
|
|
- .order_tab {
|
|
|
+.shopInfo {
|
|
|
+ .order_tab {
|
|
|
+ width: 100%;
|
|
|
+ height: 74px;
|
|
|
+ background: #fff;
|
|
|
+
|
|
|
+ .tab_list {
|
|
|
width: 100%;
|
|
|
height: 74px;
|
|
|
- background: #FFF;
|
|
|
+ padding-top: 20px;
|
|
|
+ padding-left: 36px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ display: flex;
|
|
|
|
|
|
- .tab_list {
|
|
|
- width: 100%;
|
|
|
- height: 74px;
|
|
|
- padding-top: 20px;
|
|
|
- padding-left: 36px;
|
|
|
- box-sizing: border-box;
|
|
|
- display: flex;
|
|
|
+ .tab_item {
|
|
|
+ min-width: 58px;
|
|
|
+ margin-right: 56px;
|
|
|
+ font-size: 16px;
|
|
|
+ font-weight: 500;
|
|
|
+ color: #b1b1b1;
|
|
|
+ position: relative;
|
|
|
+ text-align: center;
|
|
|
+ cursor: pointer;
|
|
|
|
|
|
- .tab_item {
|
|
|
- min-width: 58px;
|
|
|
- margin-right: 56px;
|
|
|
- font-size: 16px;
|
|
|
- font-weight: 500;
|
|
|
- color: #B1B1B1;
|
|
|
- position: relative;
|
|
|
- text-align: center;
|
|
|
- cursor: pointer;
|
|
|
-
|
|
|
- .tab_line {
|
|
|
- width: 58px;
|
|
|
- height: 6px;
|
|
|
- background: #FFF;
|
|
|
- border-radius: 3px;
|
|
|
- margin: 15px auto 0;
|
|
|
- }
|
|
|
+ .tab_line {
|
|
|
+ width: 58px;
|
|
|
+ height: 6px;
|
|
|
+ background: #fff;
|
|
|
+ border-radius: 3px;
|
|
|
+ margin: 15px auto 0;
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
- .tab_item_ac {
|
|
|
- color: #FC7200;
|
|
|
+ .tab_item_ac {
|
|
|
+ color: #fc7200;
|
|
|
|
|
|
- .tab_line {
|
|
|
- background: #FC7200;
|
|
|
- }
|
|
|
+ .tab_line {
|
|
|
+ background: #fc7200;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
- .content {
|
|
|
- width: 100%;
|
|
|
- margin-top: 10px;
|
|
|
- }
|
|
|
+ .content {
|
|
|
+ width: 100%;
|
|
|
+ margin-top: 10px;
|
|
|
}
|
|
|
+}
|
|
|
</style>
|