| | |
| | | }}</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="部门" prop="part_name" width="100" show-overflow-tooltip> </el-table-column> |
| | | <el-table-column label="部门" prop="part_id" width="100" show-overflow-tooltip> |
| | | <template #default="scope"> |
| | | {{ departmentMap[scope.row.part_id]?.name }} |
| | | </template> |
| | | |
| | | </el-table-column> |
| | | |
| | | <el-table-column label="手机号" prop="phone" width="120" show-overflow-tooltip> </el-table-column> |
| | | <el-table-column label="邮件" prop="email" width="190" show-overflow-tooltip> </el-table-column> |
| | |
| | | </div> |
| | | </template> |
| | | |
| | | <OptDlg v-model="optDlgIsShow" :item="optDlgMapRow" @insert="insertOpt" @update="updateOpt" :roleList="roleList"></OptDlg> |
| | | <OptDlg v-model="optDlgIsShow" :item="optDlgMapRow" @insert="insertOpt" @update="updateOpt" :roleList="roleList" :departmentList="departmentList"></OptDlg> |
| | | <OptPasswordDlg |
| | | v-model="optPasswordDlgIsShow" |
| | | :item="optPasswordDlgMapRow" |
| | | @update="updatePasswordOpt" |
| | | :roleList="roleList" |
| | | ></OptPasswordDlg> |
| | | <OptRoleDlg v-model="optRoleDlgIsShow" :item="optRoleDlgMapRow" @update="updateRoleOpt" :roleList="roleList"></OptRoleDlg> |
| | | <OptSampleDrawer v-model:isShow="sampleDrawerIsShow" :user="sampleMapUser" /> |
| | | <OptRoleDlg v-model="optRoleDlgIsShow" :item="optRoleDlgMapRow" @update="updateRoleOpt" :roleList="roleList" ></OptRoleDlg> |
| | | <OptSampleDrawer v-model:isShow="sampleDrawerIsShow" :user="sampleMapUser"/> |
| | | <!-- <MetricPrompt v-model="infoDlgIsShow" :metricItem="infoDlgMapRow"></MetricPrompt> |
| | | <MetricName v-model="metricNameIsShow" :metricItem="metricNameMapRow"></MetricName> --> |
| | | </HMContainer> |
| | |
| | | |
| | | import * as userApi from '/@/api/auth/user'; |
| | | |
| | | import { getRoleInfoListByPost } from '/@/api/auth/role'; |
| | | import HMContainer from '/@/components/layout/HMContainer.vue'; |
| | | import { ElMessageBox, ElMessage } from 'element-plus'; |
| | | import { ElMessage, ElMessageBox } from 'element-plus'; |
| | | import { computed } from 'vue'; |
| | | import OptSampleDrawer from './optDlg/OptSampleDrawer.vue'; |
| | | import { getRoleInfoListByPost } from '/@/api/auth/role'; |
| | | import HMContainer from '/@/components/layout/HMContainer.vue'; |
| | | import { get_department_list } from '/@/api/department'; |
| | | //#region ====================== 表格数据,table init ====================== |
| | | const tableLoading = ref(false); |
| | | const tableData = ref([]); |
| | |
| | | sampleMapUser.value = row; |
| | | }; |
| | | //#endregion |
| | | |
| | | //#region ====================== 获取不么列表 ====================== |
| | | |
| | | const departmentList = ref([]); |
| | | const getDepartmentList = async () => { |
| | | const res = await get_department_list(); |
| | | departmentList.value = res?.values ?? []; |
| | | }; |
| | | const departmentMap = computed(() => getItemMap(departmentList.value, 'id')); |
| | | |
| | | |
| | | //#endregion |
| | | onMounted(async () => { |
| | | await getRoleList(); |
| | | await getDepartmentList(); |
| | | |
| | | getTableData(); |
| | | }); |