forked from xxhjsb/hbt-prevention-ui
43 lines
1.3 KiB
Vue
43 lines
1.3 KiB
Vue
<template>
|
|
<router-view></router-view>
|
|
</template>
|
|
<script lang="ts">
|
|
import SystemService from 'hbt-common/service/system.service';
|
|
import { Component,Vue } from 'vue-property-decorator';
|
|
@Component
|
|
export default class BlankComponent extends Vue {
|
|
|
|
public systemService = new SystemService()
|
|
created(){
|
|
Promise.all([
|
|
this.systemService.getDeptTree(),
|
|
this.systemService.getDeptList(),
|
|
this.systemService.getUserList({pageSize:0}),
|
|
this.systemService.getDictData("common_yes_no")
|
|
]).then(((results:any)=>{
|
|
this.$store.commit("setDeptTreeList",results[0].data);
|
|
|
|
this.$store.commit("setDeptList",results[1].data.map((item)=>{
|
|
return {
|
|
name:item.deptName,
|
|
value:item.deptId
|
|
}
|
|
}))
|
|
|
|
this.$store.commit("setUserList",results[2].data.datas.map((item)=>{
|
|
return {
|
|
name:item.nickName,
|
|
value:item.userId
|
|
}
|
|
}))
|
|
this.$store.commit("set_common_yes_no",results[3].data.map(item=>{
|
|
return {
|
|
name:item.dictLabel,
|
|
value:isNaN(+item.dictValue)?item.dictValue:+item.dictValue
|
|
}
|
|
}))
|
|
}))
|
|
}
|
|
}
|
|
</script>
|