selectUserPage.vue
1.57 KB
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
57
58
59
<!--
* @Date: 2024-06-21 16:41:18
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-06-21 16:59:12
* @FilePath: /vue-flow-editor/doc/selectUserPage.vue
* @Description: 文件描述
-->
<template>
<div class="select-user-page">
<select-user-view
:visible="dialogUserFormVisible"
:list="dialogUserTags"
@close="onCloseUserView"
@confirm="onConfirmUserView"
/>
</div>
</template>
<script setup>
import { ref, reactive, onMounted, watch, nextTick, computed } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import SelectUserView from './selectUserView.vue'
const $route = useRoute();
const $router = useRouter();
const dialogUserFormVisible = ref(false);
const dialogUserTags = ref([]);
onMounted(() => {
// select_user_page?visible=1&list=[{%20"id":%20137919,%20"type":%20"user",%20"name":%20"11组寝室长"%20}]
dialogUserFormVisible.value = $route.query.visible == 1 ? true : false;
dialogUserTags.value = JSON.parse($route.query.list); // 默认显示的用户列表
})
/**
* 打开设置用户弹框
*/
const openUserForm = () => {
dialogUserFormVisible.value = true;
dialogUserTags.value = []; // 默认显示的用户列表
}
const onCloseUserView = (status) => {
dialogUserFormVisible.value = status
}
const onConfirmUserView = async (data) => { // 负责人弹框确认回调
console.warn(data);
}
</script>
<style lang="scss">
.el-checkbox__input.is-checked .el-checkbox__inner,
.el-switch.is-checked .el-switch__core {
background-color: #009688 !important;
border-color: #009688 !important;
}
</style>