|
@@ -7,9 +7,6 @@
|
|
|
<template #role>
|
|
|
<el-option v-for="i in roleList" :key="i._id" :label="i.name" :value="i._id"></el-option>
|
|
|
</template>
|
|
|
- <template #region>
|
|
|
- <el-option v-for="i in regionList" :key="i._id" :label="i.name" :value="i._id"></el-option>
|
|
|
- </template>
|
|
|
</cForm>
|
|
|
</el-col>
|
|
|
</el-col>
|
|
@@ -25,15 +22,17 @@ import { ref, reactive, onMounted } from 'vue';
|
|
|
import { ElMessage } from 'element-plus';
|
|
|
import type { FormRules } from 'element-plus';
|
|
|
// 接口
|
|
|
-import { AdminStore } from '@/stores/users/admin';
|
|
|
+import { AdminStore } from '@/stores/users/admin'; // 管理员
|
|
|
+import { DoctorStore } from '@/stores/users/doctor'; //医生
|
|
|
+import { NurseStore } from '@/stores/users/nurse'; //护士
|
|
|
import { RoleStore } from '@/stores/basic/role'; // 角色
|
|
|
-import { RegionStore } from '@/stores/basic/region'; // 区域
|
|
|
import { DictDataStore } from '@/stores/basic/dictData'; // 字典表
|
|
|
import type { IQueryResult } from '@/util/types.util';
|
|
|
const adminAxios = AdminStore();
|
|
|
+const doctorAxios = DoctorStore();
|
|
|
+const nurseAxios = NurseStore();
|
|
|
const dictAxios = DictDataStore();
|
|
|
const roleAxios = RoleStore();
|
|
|
-const regionAxios = RegionStore();
|
|
|
let user: Ref<any> = ref(store.state.user);
|
|
|
// 加载中
|
|
|
const loading: Ref<any> = ref(false);
|
|
@@ -44,7 +43,6 @@ let fields: Ref<any[]> = ref([
|
|
|
{ label: '姓名', model: 'name' },
|
|
|
{ label: '手机号', model: 'phone' },
|
|
|
{ label: '角色', model: 'role', type: 'select' },
|
|
|
- { label: '区域', model: 'region', type: 'select' }
|
|
|
]);
|
|
|
const rules = reactive<FormRules>({
|
|
|
name: [{ required: true, message: '请输入姓名', trigger: 'blur' }],
|
|
@@ -53,7 +51,6 @@ const rules = reactive<FormRules>({
|
|
|
});
|
|
|
// 字典表
|
|
|
const roleList: Ref<any> = ref([]);
|
|
|
-const regionList: Ref<any> = ref([]);
|
|
|
const statusList: Ref<any> = ref([]);
|
|
|
// 请求
|
|
|
onMounted(async () => {
|
|
@@ -88,9 +85,6 @@ const searchOther = async () => {
|
|
|
// 状态
|
|
|
res = await dictAxios.query({ type: 'exam_status', is_use: '0' });
|
|
|
if (res.errcode == '0') statusList.value = res.data;
|
|
|
- // 区域
|
|
|
- res = await regionAxios.query({ is_use: '0' });
|
|
|
- if (res.errcode == '0') regionList.value = res.data;
|
|
|
};
|
|
|
// 返回上一页
|
|
|
const toBack = () => {
|