| | |
| | | </el-col> |
| | | <el-col :span="12" class="mb20"> |
| | | <el-form-item label="部门" prop="part_id" label-width="54"> |
| | | <el-select v-model="dialogFormValue.part_id"> |
| | | <el-option v-for="item in departmentList" :key="item.id" :value="item.id" :label="item?.name"></el-option> |
| | | </el-select> |
| | | <el-tree-select |
| | | filterable |
| | | class="w100" |
| | | v-model="dialogFormValue.part_id" |
| | | :props="{ |
| | | id: 'id', |
| | | label: 'name', |
| | | children: 'children', |
| | | }" |
| | | :data="departmentTreeList" |
| | | node-key="id" |
| | | :clearable="true" |
| | | :accordion="false" |
| | | :expandNode="false" |
| | | :check-strictly="true" |
| | | > |
| | | </el-tree-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12" class="mb20" |
| | |
| | | import { userSexMap } from '../types'; |
| | | import * as userApi from '/@/api/auth/user'; |
| | | import { formatDate } from '/@/utils/formatTime'; |
| | | import { convertListToTree } from '/@/utils/util'; |
| | | |
| | | const props = defineProps(['item', 'roleList', 'departmentList']); |
| | | const emit = defineEmits(['update', 'insert']); |
| | | |
| | | const departmentTreeList = computed(() => { |
| | | const treeData = convertListToTree(props.departmentList, { |
| | | ID: 'id', |
| | | ParentID: 'parent_id', |
| | | Children: 'children', |
| | | }); |
| | | |
| | | return treeData; |
| | | }); |
| | | |
| | | //#region ====================== 增加、修改记录操作, dialog init====================== |
| | | const isEditDialog = ref(false); |
| | | const dialogTitle = computed(() => { |