优化
This commit is contained in:
@ -5,7 +5,12 @@
|
||||
<div class="bg-gradient-to-r from-blue-500 to-blue-600 text-white p-6">
|
||||
<h2 class="text-2xl font-bold flex items-center"><i class="el-icon-user-circle mr-3"></i>人员配置</h2>
|
||||
<p class="text-blue-100 mt-2 opacity-90">请配置项目相关负责人员信息</p>
|
||||
<el-button @click="disabledForm = false" class="px-8 py-2.5 transition-all duration-300 font-medium" v-if="disabledForm">
|
||||
<el-button
|
||||
@click="disabledForm = false"
|
||||
v-hasPermi="['design:user:list']"
|
||||
class="px-8 py-2.5 transition-all duration-300 font-medium"
|
||||
v-if="disabledForm"
|
||||
>
|
||||
点击编辑
|
||||
</el-button>
|
||||
</div>
|
||||
@ -220,7 +225,7 @@
|
||||
</div>
|
||||
|
||||
<!-- 提交按钮区域 -->
|
||||
<div class="flex justify-center space-x-6 mt-8 pt-6 border-t border-gray-100">
|
||||
<div class="flex justify-center space-x-6 mt-8 pt-6 border-t border-gray-100">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="large"
|
||||
|
@ -436,6 +436,8 @@ const disabledForm = ref(true); // 初始禁用表单(编辑时开启)
|
||||
|
||||
/** 查询当前部门的所有用户(确保用户列表有效) */
|
||||
const getDeptAllUser = async (deptId: number | undefined) => {
|
||||
console.log(1111111111111);
|
||||
|
||||
if (!deptId) {
|
||||
ElMessage.warning('请先选择部门');
|
||||
return;
|
||||
|
@ -17,6 +17,7 @@
|
||||
<el-select
|
||||
:disabled="disabledAll"
|
||||
v-model="form.userId"
|
||||
filterable
|
||||
placeholder="请选择收资人"
|
||||
class="w-full transition-all duration-300 border-gray-300 focus:border-blue-400 focus:ring-1 focus:ring-blue-400"
|
||||
>
|
||||
@ -93,6 +94,7 @@
|
||||
<el-select
|
||||
:disabled="disabledAll"
|
||||
v-model="item.userId"
|
||||
filterable
|
||||
placeholder="请选择人员"
|
||||
class="w-full transition-all duration-300 border-gray-300 focus:border-blue-400 focus:ring-1 focus:ring-blue-400"
|
||||
>
|
||||
@ -112,7 +114,7 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="submitForm"
|
||||
v-hasPermi="['design:collect:add']"
|
||||
v-hasPermi="['design:collect:batch']"
|
||||
v-if="!form.id || form.status == 'draft'"
|
||||
size="large"
|
||||
class="px-8 transition-all hover:bg-blue-600"
|
||||
@ -181,6 +183,7 @@ import { systemUserList } from '@/api/design/appointment';
|
||||
import { collectBatch, byProjectId, exportWord } from '@/api/design/received';
|
||||
import { getUser } from '@/api/system/user';
|
||||
import type { ComponentInternalInstance, ElFormInstance } from 'element-plus';
|
||||
import { getInfo } from '@/api/login';
|
||||
|
||||
// 全局实例与状态管理
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
@ -202,7 +205,7 @@ const disabledAll = ref(false); // 表单是否全部禁用
|
||||
const form = reactive({
|
||||
projectId: currentProject.value?.id,
|
||||
userId: '', // 收资人
|
||||
user_major: '', // 专业
|
||||
user_major: '1', // 专业
|
||||
phone: '', // 电话
|
||||
email: '', // 邮箱
|
||||
id: '', // 表单ID
|
||||
@ -273,6 +276,8 @@ const byProjectIdAll = async () => {
|
||||
disabledAll.value = false;
|
||||
|
||||
if (res.code == 200 && res.data) {
|
||||
console.log('🚀 ~ byProjectIdAll ~ res:', res);
|
||||
|
||||
const data = res.data;
|
||||
// 回显基本信息
|
||||
form.userId = data.userId || '';
|
||||
@ -415,7 +420,7 @@ const onView = () => {
|
||||
/** 获取当前用户详情(回显个人信息) */
|
||||
const getUserDetail = async () => {
|
||||
try {
|
||||
const res = await getUser(userId.value);
|
||||
const res = await getInfo();
|
||||
if (res.data?.user) {
|
||||
form.userId = res.data.user.userId;
|
||||
form.phone = res.data.user.phonenumber || '';
|
||||
|
Reference in New Issue
Block a user