tj
2025-06-05 bba272999cc546f65781bf3d20245a3f819af67f
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
<template>
  <div class="container">
    <div class="title">新建用户</div>
    <div class="wrap"><user-info :allGroups="allGroups" /></div>
  </div>
</template>
 
<script>
import { ref, onMounted } from 'vue'
import Admin from '@/lin/model/admin'
import UserInfo from './user-info'
 
export default {
  components: {
    UserInfo,
  },
  setup() {
    const allGroups = ref([])
    const loading = ref(false)
 
    onMounted(async () => {
      try {
        loading.value = true
        allGroups.value = await Admin.getAllGroups()
        loading.value = false
      } catch (e) {
        loading.value = false
        console.error(e)
      }
    })
 
    return {
      loading,
      allGroups,
    }
  },
}
</script>
 
<style lang="scss" scoped>
.container {
  .title {
    height: 59px;
    line-height: 59px;
    color: $parent-title-color;
    font-size: 16px;
    font-weight: 500;
    text-indent: 40px;
    border-bottom: 1px solid #dae1ec;
  }
 
  .wrap {
    padding: 0px 20px;
  }
}
</style>