审查视图

src/components/transport.vue 4.8 KB
1  
刘建成 authored
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202
<template>
  <div>
    
    <div class="transport-box">
      
      <div class="fahuo">
        <ul class="ul-list">
          <li
            v-for="(item, index) in addlist"
            :key="index"
            :class="active == index ? 'liks' : 'lik'"
            @click="li(index)"
          >
            <img
              :src="item.activeUrl"
              class="fa-img"
              alt=""
              v-if="active == index"
            />
            <img :src="item.url" class="fa-img" alt="" v-else />

            {{ item.text }}
          </li>
        </ul>
      </div>
    </div>
    <Tabbar :actives="2"></Tabbar>
    <Fa v-if="fai"></Fa>
    <Pei v-if="peii"></Pei>
    <Pai v-if="paii"></Pai>
    <Zhuan v-if="zhuan"></Zhuan>
    <Fayun v-if="fayun"></Fayun>
    <Zaitu v-if="zaitu"></Zaitu>
    <Sonda v-if="sonda"></Sonda>
    <Jie v-if="jies"></Jie>
  </div>
</template>

<script>
import Tabbar from "./tabbar.vue";
import Fa from "./yunshu/fa.vue";
import Pei from "./yunshu/pei.vue";
import Pai from "./yunshu/pai.vue";
import Zhuan from "./yunshu/zhuan.vue";
import Fayun from "./yunshu/fayun.vue";
import Zaitu from './yunshu/zaitu.vue';
import Sonda from './yunshu/sonda.vue';
import Jie from './yunshu/jie.vue';
export default {
  components: {
    Tabbar,
    Fa,
    Pei,
    Pai,
    Zhuan,
    Fayun,
    Zaitu,
    Sonda,
    Jie
  },
  data() {
    return {
      addlist: [
        {
          url: require("../assets/21.png"),
          activeUrl: require("../assets/9.png"),
          text: "发货计划",
        },
        {
          url: require("../assets/14.png"),
          activeUrl: require("../assets/4.png"),
          text: "配车计划",
        },
        {
          url: require("../assets/20.png"),
          activeUrl: require("../assets/8.png"),
          text: "派车管理",
        },
        {
          url: require("../assets/17.png"),
          activeUrl: require("../assets/3.png"),
          text: "装车作业",
        },
        {
          url: require("../assets/12.png"),
          activeUrl: require("../assets/7.png"),
          text: "发运管理",
        },
        {
          url: require("../assets/16.png"),
          activeUrl: require("../assets/2.png"),
          text: "在途管理",
        },
        {
          url: require("../assets/15.png"),
          activeUrl: require("../assets/5.png"),
          text: "送达作业",
        },
        {
          url: require("../assets/13.png"),
          activeUrl: require("../assets/6.png"),
          text: "结项管理",
        },
      ],
      active: "0",
      fai: true,
      peii: false,
      paii: false,
      zhuan:false,
      fayun:false,
      zaitu:false,
      sonda:false,
      jies:false
    };
  },
  methods: {
    //tab切换
    li(index) {
     
      this.active = index;
      if (this.active == 0) {
        this.fai = true;
        this.peii = false;
        this.paii = false;
        this.zhuan = false
        this.fayun = false
        this.zaitu = false
        this.sonda = false
        this.jies = false
      } else if (this.active == 1) {
        this.peii = true;
        this.fai = false;
        this.paii = false;
        this.zhuan = false
        this.fayun = false
        this.zaitu = false
        this.sonda = false
        this.jies = false
      } else if (this.active == 2) {
        this.fai = false;
        this.peii = false;
        this.paii = true;
        this.zhuan = false
        this.fayun = false
        this.zaitu = false
        this.sonda = false
        this.jies = false
      }else if(this.active == 3){
        this.fai = false;
        this.peii = false;
        this.paii = false;
        this.zhuan = true
        this.fayun = false
        this.zaitu = false
        this.sonda = false
        this.jies = false
      }else if(this.active == 4){
        this.fai = false;
        this.peii = false;
        this.paii = false;
        this.zhuan = false
        this.fayun = true
        this.zaitu = false
        this.sonda = false
        this.jies = false
      }else if(this.active == 5){
        this.fai = false;
        this.peii = false;
        this.paii = false;
        this.zhuan = false
        this.fayun = false
        this.zaitu = true
        this.sonda = false
        this.jies = false
      }else if(this.active == 6){
        this.fai = false;
        this.peii = false;
        this.paii = false;
        this.zhuan = false
        this.fayun = false
        this.zaitu = false
        this.sonda = true
        this.jies = false
      }else if(this.active == 7){
        this.fai = false;
        this.peii = false;
        this.paii = false;
        this.zhuan = false
        this.fayun = false
        this.zaitu = false
        this.sonda = false
        this.jies = true
      }
      console.log(index);
    },
  },
};
</script>

<style scoped>
@import "../css/transport.css";
</style>