@@ -152,7 +151,7 @@ import { StartProcessBo } from '@/api/workflow/workflowCommon/types';
import { ComponentInternalInstance, nextTick, ref, reactive, computed, toRefs, onMounted } from 'vue';
import { useUserStoreHook } from '@/store/modules/user';
import { systemUserList } from '@/api/design/appointment';
-import { extractBatch, extractDetail } from '@/api/design/Professional';
+import { extractBatch, extractDetail, extractUserMajor } from '@/api/design/Professional';
import { listVolumeCatalog } from '@/api/design/volumeCatalog';
import { catalogList } from '@/api/design/designChange';
import { getUser } from '@/api/system/user';
@@ -197,7 +196,8 @@ const userInfo = ref({
phonenumber: '',
userId: ''
});
-const { des_user_major } = toRefs
(proxy?.useDict('des_user_major'));
+// const { des_user_major } = toRefs(proxy?.useDict('des_user_major'));
+const des_user_major = ref([]);
const buttonLoading = ref(false);
const loading = ref(true);
const disableAll = ref(false);
@@ -440,7 +440,14 @@ const getDeptAllUser = async (deptId: any) => {
ElMessage.error('获取用户列表失败');
}
};
-
+// 获取专业
+const getMajor = async () => {
+ let res = await extractUserMajor({ userId: userId.value, projectId: currentProject.value?.id });
+ if (res.code == 200) {
+ des_user_major.value = res.data;
+ console.log(des_user_major.value);
+ }
+};
/** 回显表单数据(编辑/查看/审批场景) */
const byProjectIdAll = async () => {
loading.value = true;
@@ -532,6 +539,7 @@ onMounted(() => {
// 编辑/查看/审批场景:加载已有数据
const { type } = routeParams.value;
+ await getMajor();
if (type === 'update' || type === 'view' || type === 'approval') {
await getDeptAllUser(userStore.deptId);
await byProjectIdAll();
diff --git a/src/views/design/appointment/index.vue b/src/views/design/appointment/index.vue
index e3dbba0..7e58d1f 100644
--- a/src/views/design/appointment/index.vue
+++ b/src/views/design/appointment/index.vue
@@ -220,23 +220,17 @@