12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- <template>
- <div class="query-box">
- <div class="query-head">
- <div class="query-tbas">
- <div class="tbas-title" :class="activeKey == '1' ? 'active' : ''" @click="activeclick('1')">对象设置</div>
- <a-divider type="vertical" style="height: 15px; background-color: #f4f5f7; margin: 8px 20px" />
- <div class="tbas-title" :class="activeKey == '2' ? 'active' : ''" @click="activeclick('2')">维修记录</div>
- <a-divider type="vertical" style="height: 15px; background-color: #f4f5f7; margin: 8px 20px" />
- <div class="tbas-title" :class="activeKey == '3' ? 'active' : ''" @click="activeclick('3')">报废记录</div>
- </div>
- </div>
- <div class="query-body">
- <Setup ref="setupRef" v-if="activeKey == '1'" />
- <Upkeep ref="upkeepRef" v-if="activeKey == '2'" />
- <Scrap ref="scraplRef" v-if="activeKey == '3'" />
- </div>
- </div>
- </template>
- <script setup>
- import Setup from './setup.vue'
- import Upkeep from './upkeep.vue'
- import Scrap from './scrap.vue'
- const activeKey = ref('1')
- const setupRef = ref(null)
- const upkeepRef = ref(null)
- const scraplRef = ref(null)
- onMounted(() => {})
- onBeforeMount(() => {})
- // 点击标签
- const activeclick = (v) => {
- activeKey.value = v
- }
- </script>
- <style lang="less" scoped>
- .query-box {
- width: 100%;
- background-color: #fff;
- // 顶部
- .query-head {
- width: 100%;
- height: 50px;
- display: flex;
- justify-content: space-between;
- padding: 15px;
- border-bottom: 1px solid #e7e7e7;
- .query-tbas {
- width: 95%;
- display: flex;
- .tbas-title {
- height: 35px;
- line-height: 25px;
- color: #a7a7a7;
- font-size: 16px;
- cursor: pointer;
- }
- .active {
- color: #1b8fff;
- border-bottom: 2px solid #1b8fff;
- }
- }
- }
- }
- </style>
|