44 lines
1.1 KiB
Vue
44 lines
1.1 KiB
Vue
<template>
|
|
<div class="app-container">
|
|
<el-tabs v-model="activeName">
|
|
<el-tab-pane v-for="server in serverList" :label="server.name" :name="server.code">
|
|
<BaseNotice :server="server.code" :parent-server="parentServer" />
|
|
</el-tab-pane>
|
|
</el-tabs>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import BaseNotice from "@/views/base/notice/BaseNotice.vue";
|
|
import {listCategory} from "@/api/system/category";
|
|
import {DICT_TYPE} from "@/utils/dict";
|
|
|
|
export default {
|
|
name: "InspectionNotice",
|
|
components: {BaseNotice},
|
|
data(){
|
|
return{
|
|
parentServer: DICT_TYPE.INS_NOTICE_SERVER,
|
|
serverList: [],
|
|
activeName: null
|
|
}
|
|
},
|
|
created() {
|
|
this.getServerList()
|
|
},
|
|
methods:{
|
|
async getServerList(){
|
|
const res = await listCategory()
|
|
this.serverList = this.handleTree(res.data, 'id', 'pid', 'children', '0')
|
|
.find(item => item.code === DICT_TYPE.NOTICE_SERVER).children
|
|
.find(item => item.code === DICT_TYPE.INS_NOTICE_SERVER).children
|
|
this.activeName = this.serverList[0].code
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
|
|
</style>
|