优化
This commit is contained in:
@ -31,7 +31,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="专业" prop="user_major" class="mb-4">
|
||||
<el-select v-model="form.user_major" placeholder="请选择专业" class="transition-all duration-300 border-gray-300">
|
||||
<el-option v-for="item in des_user_major" :key="item.value" :label="item.label" :value="item.value" />
|
||||
<el-option v-for="item in des_user_major" :key="item.userMajor" :label="item.userMajorName" :value="item.userMajor" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="电话" prop="phone" class="mb-4">
|
||||
@ -42,7 +42,6 @@
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 资料文件区域:单独表单校验 -->
|
||||
<div class="mb-6">
|
||||
<div class="flex items-center justify-between mb-4">
|
||||
@ -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<any>(proxy?.useDict('des_user_major'));
|
||||
// const { des_user_major } = toRefs<any>(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();
|
||||
|
Reference in New Issue
Block a user