index.vue 3.43 KB
Newer Older
1 2 3
<template>
  <div class="add">
    <div class="add-tab">
neogcg's avatar
neogcg committed
4 5 6
      <el-tabs v-model="activeName" :stretc="true" @tab-click="handleClick">
        <el-tab-pane label="铁路线" name="0">
          <div class="content" v-if="activeName === '0'">
neogcg's avatar
neogcg committed
7
            <div class="content-title">添加铁路线</div>
neogcg's avatar
neogcg committed
8
            <railWay></railWay>
neogcg's avatar
neogcg committed
9
          </div>
neogcg's avatar
neogcg committed
10 11 12 13 14
        </el-tab-pane>

        <el-tab-pane label="站点" name="1">
          <div class="content" v-if="activeName === '1'">
            <div class="content-title">添加站点</div>
neogcg's avatar
neogcg committed
15
            <station></station>
neogcg's avatar
neogcg committed
16 17 18 19 20
          </div>
        </el-tab-pane>
        <el-tab-pane label="FSU" name="2">
          <div class="content" v-if="activeName === '2'">
            <div class="content-title">添加FSU</div>
neogcg's avatar
neogcg committed
21
            <FSU></FSU>
neogcg's avatar
neogcg committed
22 23 24 25 26
          </div>
        </el-tab-pane>
        <el-tab-pane label="监测设备" name="3">
          <div class="content" v-if="activeName === '3'">
            <div class="content-title">添加监测设备</div>
neogcg's avatar
neogcg committed
27
            <monitorEquip></monitorEquip>
neogcg's avatar
neogcg committed
28 29 30 31 32
          </div>
        </el-tab-pane>
        <el-tab-pane label="漏缆" name="4">
          <div class="content" v-if="activeName === '4'">
            <div class="content-title">添加漏缆</div>
neogcg's avatar
neogcg committed
33
            <leakyCable></leakyCable>
neogcg's avatar
neogcg committed
34 35 36 37 38 39 40
          </div>
        </el-tab-pane>
        <el-tab-pane label="天馈线" name="5">
          <div class="content" v-if="activeName === '5'">
            <div class="content-title">添加天馈线</div>
          </div>
        </el-tab-pane>
41 42 43 44 45 46
      </el-tabs>
    </div>
  </div>
</template>

<script>
neogcg's avatar
neogcg committed
47 48 49 50 51 52
import { railWaysave, sitesave } from "../api";
import railWay from "./comp/railWay.vue";
import monitorEquip from "./comp/monitorEquip.vue";
import station from "./comp/station.vue";
import FSU from "./comp/FSU.vue";
import leakyCable from "./comp/leakyCable.vue";
53
export default {
neogcg's avatar
neogcg committed
54 55 56 57 58 59
  components: {
    monitorEquip,
    station,
    railWay,
    FSU,
    leakyCable,
neogcg's avatar
neogcg committed
60
  },
61 62
  data() {
    return {
neogcg's avatar
neogcg committed
63
      activeName: "0",
64 65
      tabs: [
        {
neogcg's avatar
neogcg committed
66 67
          label: "铁路线",
          key: "0",
68 69
        },
        {
neogcg's avatar
neogcg committed
70 71
          label: "站点",
          key: "1",
72 73
        },
        {
neogcg's avatar
neogcg committed
74 75
          label: "FSU",
          key: "2",
76 77
        },
        {
neogcg's avatar
neogcg committed
78 79
          label: "监测设备",
          key: "3",
80 81
        },
        {
neogcg's avatar
neogcg committed
82 83
          label: "漏缆",
          key: "4",
84 85
        },
        {
neogcg's avatar
neogcg committed
86 87 88
          label: "天馈线",
          key: "5",
        },
89
      ],
neogcg's avatar
neogcg committed
90
    };
91 92
  },
  methods: {
neogcg's avatar
neogcg committed
93
    handleClick(tab, event) {},
neogcg's avatar
neogcg committed
94 95
  },
};
96 97 98 99 100 101
</script>

<style lang="scss" scoped>
::v-deep .el-tabs__nav {
  display: flex;
  width: 100%;
102
  padding-bottom: 10px;
103 104 105
  .el-tabs__item {
    flex: 1;
    text-align: center;
106 107 108 109 110 111 112 113
    font-size: 18px;
    color: #666;
  }
  .el-tabs__item.is-active {
    color: #1e64f6;
  }
  .el-tabs__active-bar {
    background-color: #1e64f6;
114 115
  }
}
116 117 118 119 120 121 122 123 124
.add {
  padding: 10px;
  .tab {
    // width: 600px;
    margin: 0 auto;
  }
  .content {
    border: 1px solid #e3e3e3;
    border-radius: 10px;
neogcg's avatar
neogcg committed
125 126
    // height: 700px;
    // overflow-y: scroll;
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142
    .content-title {
      width: 100%;
      height: 60px;
      background: rgba(226, 235, 255, 0.39);
      line-height: 60px;
      font-size: 18px;
      color: #333;
      font-weight: 500;
      text-align: center;
      border-bottom: 1px solid #e3e3e3;
    }
    .form {
      padding: 20px 0;
      width: 600px;
      margin: 0 auto;
    }
143
  }
144 145 146 147 148 149
  .btn {
    padding-top: 50px;
    text-align: center;
    button {
      width: 120px;
    }
150 151 152
  }
}
</style>