Showing
2 changed files
with
65 additions
and
0 deletions
| ... | @@ -11,4 +11,10 @@ export default [{ | ... | @@ -11,4 +11,10 @@ export default [{ |
| 11 | meta: { | 11 | meta: { |
| 12 | title: '首页', | 12 | title: '首页', |
| 13 | } | 13 | } |
| 14 | +}, { | ||
| 15 | + path: '/select_user_page', | ||
| 16 | + component: () => import('./selectUserPage.vue'), | ||
| 17 | + meta: { | ||
| 18 | + title: '组织结构选择框', | ||
| 19 | + } | ||
| 14 | }]; | 20 | }]; | ... | ... |
doc/selectUserPage.vue
0 → 100644
| 1 | +<!-- | ||
| 2 | + * @Date: 2024-06-21 16:41:18 | ||
| 3 | + * @LastEditors: hookehuyr hookehuyr@gmail.com | ||
| 4 | + * @LastEditTime: 2024-06-21 16:59:12 | ||
| 5 | + * @FilePath: /vue-flow-editor/doc/selectUserPage.vue | ||
| 6 | + * @Description: 文件描述 | ||
| 7 | +--> | ||
| 8 | +<template> | ||
| 9 | + <div class="select-user-page"> | ||
| 10 | + <select-user-view | ||
| 11 | + :visible="dialogUserFormVisible" | ||
| 12 | + :list="dialogUserTags" | ||
| 13 | + @close="onCloseUserView" | ||
| 14 | + @confirm="onConfirmUserView" | ||
| 15 | + /> | ||
| 16 | + </div> | ||
| 17 | +</template> | ||
| 18 | + | ||
| 19 | +<script setup> | ||
| 20 | +import { ref, reactive, onMounted, watch, nextTick, computed } from 'vue' | ||
| 21 | +import { useRoute, useRouter } from 'vue-router' | ||
| 22 | +import SelectUserView from './selectUserView.vue' | ||
| 23 | + | ||
| 24 | +const $route = useRoute(); | ||
| 25 | +const $router = useRouter(); | ||
| 26 | + | ||
| 27 | +const dialogUserFormVisible = ref(false); | ||
| 28 | +const dialogUserTags = ref([]); | ||
| 29 | + | ||
| 30 | +onMounted(() => { | ||
| 31 | + // select_user_page?visible=1&list=[{%20"id":%20137919,%20"type":%20"user",%20"name":%20"11组寝室长"%20}] | ||
| 32 | + dialogUserFormVisible.value = $route.query.visible == 1 ? true : false; | ||
| 33 | + dialogUserTags.value = JSON.parse($route.query.list); // 默认显示的用户列表 | ||
| 34 | +}) | ||
| 35 | + | ||
| 36 | +/** | ||
| 37 | + * 打开设置用户弹框 | ||
| 38 | + */ | ||
| 39 | +const openUserForm = () => { | ||
| 40 | + dialogUserFormVisible.value = true; | ||
| 41 | + dialogUserTags.value = []; // 默认显示的用户列表 | ||
| 42 | +} | ||
| 43 | + | ||
| 44 | +const onCloseUserView = (status) => { | ||
| 45 | + dialogUserFormVisible.value = status | ||
| 46 | +} | ||
| 47 | + | ||
| 48 | +const onConfirmUserView = async (data) => { // 负责人弹框确认回调 | ||
| 49 | + console.warn(data); | ||
| 50 | +} | ||
| 51 | +</script> | ||
| 52 | + | ||
| 53 | +<style lang="scss"> | ||
| 54 | +.el-checkbox__input.is-checked .el-checkbox__inner, | ||
| 55 | +.el-switch.is-checked .el-switch__core { | ||
| 56 | + background-color: #009688 !important; | ||
| 57 | + border-color: #009688 !important; | ||
| 58 | +} | ||
| 59 | +</style> |
-
Please register or login to post a comment