47 hai 1 mes
pai
achega
97d1dba73f

+ 2 - 1
src/views/system/graduateStudent/UserForm.vue

@@ -211,7 +211,8 @@ const formRules = reactive<FormRules>({
       trigger: 'blur'
     }
   ],
-  userNumber: [{ required: true, message: '学号不能为空', trigger: 'blur' }]
+  userNumber: [{ required: true, message: '学号不能为空', trigger: 'blur' }],
+  userType: [{ required: true, message: '用户类型不能为空', trigger: 'blur' }],
 })
 const formRef = ref() // 表单 Ref
 const deptList = ref<Tree[]>([]) // 树形结构

+ 6 - 3
src/views/system/graduateStudent/index.vue

@@ -175,7 +175,8 @@
       </ContentWrap>
       <ContentWrap>
         <el-table v-loading="loading" :data="list">
-          <el-table-column label="用户编号" align="center" key="id" prop="id" />
+          <el-table-column type="index" width="50" />
+          <!-- <el-table-column label="用户编号" align="center" key="id" prop="id" /> -->
           <!-- <el-table-column
             label="账号"
             align="center"
@@ -408,8 +409,10 @@ const handleQuery = () => {
 
 /** 重置按钮操作 */
 const resetQuery = () => {
-  queryFormRef.value?.resetFields()
-  handleQuery()
+  queryFormRef.value.resetFields();
+  queryParams.supervisor = undefined; // 手动重置导师
+  queryParams.supervisorId = undefined; // 手动重置导师ID
+  handleQuery();
 }
 
 

+ 2 - 1
src/views/system/selfAchievement/UserAchievementForm.vue

@@ -107,7 +107,8 @@ const achievementTypes = ref([
 // 署名次序选项
 const sorts = ref([
   { label: '第一作者', value: "1" },
-  { label: '第二作者', value: "2" },
+  { label: '第二作者(导师为第一作者)', value: "2" },
+  { label: '其他', value: "3" },
 ]);
 
 

+ 38 - 7
src/views/system/selfAchievement/index.vue

@@ -41,9 +41,21 @@
           class="!w-240px"
         >
           <el-option :label="'第一作者'" :value="1" />
-          <el-option :label="'第二作者'" :value="2" />
+          <el-option :label="'第二作者(导师为第一作者)'" :value="2" />
+          <el-option :label="'其他'" :value="3" />
         </el-select>
       </el-form-item>
+      <el-form-item label="毕业条件" prop='isGraduate'>
+            <el-select 
+              v-model="queryParams.isGraduate" 
+              placeholder="是否达成毕业条件"  
+              @keyup.enter="handleQuery"
+              class="!w-240px"
+              >
+              <el-option label="已达成" :value="0" />
+              <el-option label="未达成" :value="1" />
+              </el-select>
+          </el-form-item>
       <!-- <el-form-item label="创建时间" prop="createTime">
         <el-date-picker
           v-model="queryParams.createTime"
@@ -114,9 +126,12 @@
               rowData.row.sort == 1
                ? '第一作者'
                 : rowData.row.sort == 2
-               ? '第二作者'
-                : '其他'
-            }}</span>
+               ? '第二作者(导师为第一作者)'
+                : rowData.row.sort == 3
+               ? '其他'
+                : '未知署名'
+            }}
+            </span>
         </template>
       </el-table-column>
 
@@ -133,12 +148,26 @@
         :formatter="dateFormatter"
         width="180px"
       /> -->
-      <el-table-column label="图片材料" align="center">
-        <!-- #default获取当前·行数据 -->
+      <el-table-column label="图片材料" align="center" prop="detail" >
         <template #default="{ row }">
-          <a :href="row.detail" target="_blank" v-if="row.detail">{{ row.detail }}</a>
+          <div class="demo-image__preview" v-if="queryParams" >
+              <el-image
+                style="width: 40px; height:40px;margin-right: 5px"
+                class="h-80px w-80px"
+                lazy
+                :src="row.detail"
+                :preview-src-list="[row.detail]"
+                preview-teleported
+                fit="cover"
+              />
+          </div>
         </template>
       </el-table-column>
+      <!-- <el-table-column label="图片材料" align="center" prop="detail" >
+        <template #default="{ row }">
+          <a :href="row.detail" target="_blank" v-if="row.detail">{{ row.detail }}</a>
+        </template>
+      </el-table-column> -->
       <el-table-column label="操作" align="center" min-width="120px">
         <template #default="rowData">
           <el-button
@@ -199,6 +228,8 @@ const queryParams = reactive({
   userName: undefined,
   createTime: [],
   detail: undefined,
+  isGraduate: undefined,
+  
 })
 const queryFormRef = ref() // 搜索的表单
 const exportLoading = ref(false) // 导出的加载中

+ 6 - 4
src/views/system/studentAttendanceManage/studentAttendance/index.vue

@@ -26,7 +26,7 @@
           class="!w-240px"
         />
       </el-form-item> 
-      <el-form-item label="导师姓名" prop="supervisor">
+      <el-form-item label="导师姓名" prop="supervisor" v-if="userInfo.userType !== '3'">
         <el-select
               v-model="queryParams.supervisor"
               @change="handleSupervisorChange"
@@ -98,7 +98,7 @@
       <!-- <el-table-column label="工作间id" align="center" prop="deptId" /> -->
       <!-- <el-table-column label="日期" align="center" prop="date" /> -->
       <el-table-column label="学号" align="center" prop="userNumber"  />
-      <el-table-column label="导师姓名" align="center" prop="supervisor" />
+      <el-table-column label="导师姓名" align="center" prop="supervisor" v-if="userInfo.userType !== '3'"/>
       <el-table-column
         v-if="userInfo.userType === '4'"
         label="工作间名称"
@@ -280,8 +280,10 @@ const handleQuery = () => {
 
 /** 重置按钮操作 */
 const resetQuery = () => {
-  queryFormRef.value.resetFields()
-  handleQuery()
+  queryFormRef.value.resetFields();
+  queryParams.supervisor = undefined; // 手动重置导师
+  queryParams.supervisorId = undefined; // 手动重置导师ID
+  handleQuery();
 }
 
 /** 添加/修改操作 */

+ 6 - 4
src/views/system/studentAttendanceManage/studentAttendanceError/index.vue

@@ -35,7 +35,7 @@
             class="!w-240px"
           />
         </el-form-item>
-        <el-form-item label="导师姓名" prop="supervisor">
+        <el-form-item label="导师姓名" prop="supervisor" v-if="userInfo.userType !== '3'">
           <el-select
               v-model="queryParams.supervisor"
               @change="handleSupervisorChange"
@@ -121,7 +121,7 @@
       </el-table-column>
       <el-table-column label="姓名" align="center" prop="studentName" />
       <el-table-column label="学号" align="center" prop="userNumber"  />
-      <el-table-column label="导师姓名" align="center" prop="supervisor" />
+      <el-table-column label="导师姓名" align="center" prop="supervisor" v-if="userInfo.userType !== '3'"/>
       <el-table-column
         v-if="userInfo.userType === '4'"
         label="工作间名称"
@@ -275,8 +275,10 @@ const handleQuery = () => {
 
 /** 重置按钮操作 */
 const resetQuery = () => {
-  queryFormRef.value.resetFields()
-  handleQuery()
+  queryFormRef.value.resetFields();
+  queryParams.supervisor = undefined; // 手动重置导师
+  queryParams.supervisorId = undefined; // 手动重置导师ID
+  handleQuery();
 }
 
 /** 添加/修改操作 */

+ 17 - 77
src/views/system/studentAttendanceManage/studentAttendanceExcused/StudentAttendanceForm.vue

@@ -14,45 +14,14 @@
               class="!w-full"
               v-model="formData.date"
               value-format="YYYY-MM-DD"
-              type="date"
+              type="dates"
               placeholder="选择日期"
               :disabled-date="disabledDate"
             />
           </el-form-item>
       </el-col>
-      <!-- <el-col :span="12">
-        <el-form-item label="姓名" prop="studentName">
-          <el-input v-model="formData.studentName" placeholder="请输入姓名" />
-        </el-form-item>
-      </el-col> -->
-    </el-row>
-
-    <!-- <el-row>
-      <el-col :span="12">
-        <el-form-item label="学号" prop="userNumber">
-          <el-input v-model="formData.userNumber" placeholder="请输入学号" />
-        </el-form-item>
-      </el-col>
-      <el-col :span="12">
-        <el-form-item label="导师名称" prop="supervisor">
-        <el-input v-model="formData.supervisor" placeholder="请输入导师名称" />
-      </el-form-item>
-      </el-col>
     </el-row>
 
-    <el-row>
-      <el-col :span="12">
-        <el-form-item label="工作间名称" prop="deptName">
-          <el-input v-model="formData.deptName" placeholder="请输入工作间名称" />
-        </el-form-item>
-      </el-col>
-      <el-col :span="12">
-        <el-form-item label="打卡类型" prop="clockInStatus">
-          <el-input v-model="clockInStatuE" value="请假" disabled />
-        </el-form-item>
-      </el-col>
-    </el-row> -->
-
     <el-row>
       <el-col :span="24">
         <el-form-item label="备注原因" prop="remark">
@@ -61,40 +30,6 @@
       </el-col>
     </el-row>
     
-      <!-- <el-form-item label="学生id" prop="studentId">
-        <el-input v-model="formData.studentId" placeholder="请输入学生id" />
-      </el-form-item> -->  
-      <!-- <el-form-item label="工作间id" prop="deptId">
-        <el-input v-model="formData.deptId" placeholder="请输入工作间id" />
-      </el-form-item> -->
-      <!-- <el-form-item label="打卡时间" prop="clockInTime">
-        <el-date-picker
-          v-model="formData.clockInTime"
-          type="datetime"
-          value-format="x"
-          placeholder="选择打卡时间"
-        />
-      </el-form-item> -->
-      <!-- <el-form-item label="打卡状态 0正常,1迟到、2早退、3缺勤、4请假" prop="clockInStatus">
-        <el-radio-group v-model="formData.clockInStatus">
-          <el-radio label="1">请选择字典生成</el-radio>
-        </el-radio-group>
-      </el-form-item> -->
-      <!-- <el-form-item label="打卡状态 " prop="clockInStatus">
-        <el-select
-          v-model="formData.clockInStatus"
-          placeholder="请选择打卡状态 "
-          clearable
-          class="!w-240px"
-        >
-        <el-option
-          v-for="option in clockInStatusOptions"
-          :key="option.value"
-          :label="option.label"
-          :value="option.value"
-        />
-        </el-select>
-      </el-form-item> -->     
     </el-form>
     <template #footer>
       <el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
@@ -137,7 +72,7 @@ const formRules = reactive({
   deptId: [{ required: true, message: '工作间id不能为空', trigger: 'blur' }],
   deptName: [{ required: true, message: '工作间名称不能为空', trigger: 'blur' }],
   date: [{ required: true, message: '日期不能为空', trigger: 'blur' }],
-  
+  remark:[{ required: true, message: '备注原因不能为空', trigger: 'blur' }],
 })
 const formRef = ref() // 表单 Ref
 
@@ -178,19 +113,24 @@ const submitForm = async () => {
   // 提交请求
   formLoading.value = true
   try {
-    const data = formData.value as unknown as StudentAttendanceVO
-    if (formType.value === 'create') {
-      await StudentAttendanceApi.createStudentAttendance(data)
-      message.success(t('common.createSuccess'))
-    } else {
-      await StudentAttendanceApi.updateStudentAttendance(data)
-      message.success(t('common.updateSuccess'))
+    const data = formData.value as unknown as StudentAttendanceVO;
+    const dates = Array.isArray(formData.value.date) ? formData.value.date : [];
+    for (const date of dates) {
+      const submissionData = { ...data, date }; // 为每个日期创建新的提交数据
+      if (formType.value === 'create') {
+        await StudentAttendanceApi.createStudentAttendance(submissionData);
+      } else {
+        await StudentAttendanceApi.updateStudentAttendance(submissionData);
+      }
     }
-    dialogVisible.value = false
+    
+    message.success(t('common.operationSuccess'));
+    dialogVisible.value = false;
+
     // 发送操作成功的事件
-    emit('success')
+    emit('success');
   } finally {
-    formLoading.value = false
+    formLoading.value = false;
   }
 }
 

+ 8 - 5
src/views/system/studentAttendanceManage/studentAttendanceExcused/index.vue

@@ -35,7 +35,7 @@
             class="!w-240px"
           />
         </el-form-item>
-        <el-form-item label="导师姓名" prop="supervisor">
+        <el-form-item label="导师姓名" prop="supervisor" v-if="userInfo.userType !== '3'">
           <el-select
               v-model="queryParams.supervisor"
               @change="handleSupervisorChange"
@@ -95,7 +95,7 @@
           @click="openForm('create')"
           v-hasPermi="['system:student-attendance:create']"
         >
-          <Icon icon="ep:plus" class="mr-5px" /> 新增
+          <Icon icon="ep:plus" class="mr-5px" /> 创建请假
         </el-button>
         <el-button
           type="success"
@@ -121,7 +121,7 @@
       </el-table-column>
       <el-table-column label="姓名" align="center" prop="studentName" />
       <el-table-column label="学号" align="center" prop="userNumber"  />
-      <el-table-column label="导师姓名" align="center" prop="supervisor" />
+      <el-table-column label="导师姓名" align="center" prop="supervisor" v-if="userInfo.userType !== '3'"/>
       <el-table-column
         v-if="userInfo.userType === '4'"
         label="工作间名称"
@@ -129,6 +129,7 @@
         prop="deptName"
         width="100"
       />
+      <el-table-column label="请假原因" align="center" prop="remark" />
       <el-table-column label="打卡类型" align="center" prop="clockInStatus">
         <template #default="scope">
           <dict-tag :type="DICT_TYPE.SYSTEM_STUDENT_ATTENDANCE_TYPE" :value="scope.row.clockInStatus" />
@@ -275,8 +276,10 @@ const handleQuery = () => {
 
 /** 重置按钮操作 */
 const resetQuery = () => {
-  queryFormRef.value.resetFields()
-  handleQuery()
+  queryFormRef.value.resetFields();
+  queryParams.supervisor = undefined; // 手动重置导师
+  queryParams.supervisorId = undefined; // 手动重置导师ID
+  handleQuery();
 }
 
 /** 添加/修改操作 */

+ 7 - 7
src/views/system/studentAttendanceManage/studentFaceManage/index.vue

@@ -26,7 +26,7 @@
           class="!w-240px"
         />
       </el-form-item>
-      <el-form-item label="导师姓名" prop="supervisor">
+      <el-form-item label="导师姓名" prop="supervisor" v-if="userInfo.userType !== '3'">
         <el-select
               v-model="queryParams.supervisor"
               @change="handleSupervisorChange"
@@ -112,7 +112,7 @@
       <el-table-column label="Id" align="center" prop="id" />
       <el-table-column label="姓名" align="center" prop="nickname" />
       <el-table-column label="学号" align="center" prop="userNumber" width="150" />
-      <el-table-column label="导师姓名" align="center" prop="supervisor" />
+      <el-table-column label="导师姓名" align="center" prop="supervisor" v-if="userInfo.userType !== '3'"/>
       <el-table-column 
         v-if="userInfo.userType === '4'" 
         label="工作间名称" 
@@ -121,7 +121,7 @@
         width="100"
       />
       <el-table-column
-        label="导入时间"
+        label="更新时间"
         align="center"
         prop="photoUpdateTime"
         :formatter="dateFormatter"
@@ -149,7 +149,6 @@
       <el-table-column label="详情" align="center" prop="photoUrl">
         <template #default="scope">
           <el-image
-            
             lazy
             class="h-80px w-80px"
             :src="scope.row.photoUrl"
@@ -292,10 +291,11 @@ const handleQuery = () => {
 
 /** 重置按钮操作 */
 const resetQuery = () => {
-  queryFormRef.value.resetFields()
-  handleQuery()
+  queryFormRef.value.resetFields();
+  queryParams.supervisor = undefined; // 手动重置导师
+  queryParams.supervisorId = undefined; // 手动重置导师ID
+  handleQuery();
 }
-
 /** 添加/修改操作 */
 const formRef = ref()
 const openForm = (type: string, id?: number) => {

+ 13 - 3
src/views/system/workroomCollege/deptInfo/index.vue

@@ -105,7 +105,7 @@
     <div class="flex flex-col">
        <el-card class="teacher-info w-full">
         <template #header>
-          <div class="card-header">
+          <div class="card-header1">
             <span>导师信息</span>
           </div>
         </template>
@@ -113,7 +113,7 @@
       </el-card>
       <el-card class="student-info w-full mb-3">
         <template #header>
-          <div class="card-header">
+          <div class="card-header1">
             <span>学生信息</span>
           </div>
         </template>
@@ -328,7 +328,6 @@ export default defineComponent({
 
 .user-info {
   margin-top: 10px;
-  
   margin-left: 5%;
   margin-right: 5%;
   padding-right: 0;
@@ -415,5 +414,16 @@ export default defineComponent({
   max-width: 150px; /* 设置图片的最大宽度 */
   height: auto; /* 保持图片的高度自动 */
 }
+.flex {
+  display: flex;
+  flex-direction: column;
+  gap: 15px; 
+}
+.card-header1 {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  border: 0px;
+}
 
 </style>

+ 35 - 3
src/views/system/workroomCollege/deptInfo/student.vue

@@ -1,7 +1,8 @@
 <template>
       <ContentWrap>
         <el-table v-loading="loading" :data="list">
-          <el-table-column label="用户编号" align="center" key="id" prop="id" />
+          <el-table-column type="index" width="50" />
+          <!-- <el-table-column label="用户编号" align="center" key="id" prop="id" /> -->
           <el-table-column
             label="账号"
             align="center"
@@ -21,19 +22,45 @@
             prop="deptName"
             :show-overflow-tooltip="true"
           />
-          <el-table-column label="手机号码" align="center" prop="mobile" width="120" />
+          <el-table-column label="手机号码" align="center" prop="mobile" />
           <el-table-column label="是否达成毕业条件" align="center" prop="isGraduate">
             <template #default="scope">
               <dict-tag :type="DICT_TYPE.SYSTEM_STUDENT_GRADUATE_STATUS" :value="scope.row.isGraduate" />  
             </template>
           </el-table-column>
+          <el-table-column label="人脸详情" align="center" prop="photoUrl">
+            <template #default="scope">
+              <el-image
+                lazy
+                class="h-80px w-80px"
+                style="width: 40px; height:40px;margin-right: 5px"
+                :src="scope.row.photoUrl"
+                :preview-src-list="[scope.row.photoUrl]"
+                preview-teleported
+                :zoom-rate="1.2"
+                :max-scale="7"
+                :min-scale="0.2"
+                :initial-index="4"
+                fit="cover"
+              />
+            </template>
+          </el-table-column>
           <el-table-column
             label="创建时间"
             align="center"
             prop="createTime"
             :formatter="dateFormatter"
-            width="180"
+            
           />
+          <el-table-column label="操作" align="center">
+            <template #default="scope">
+              <div class="flex items-center justify-center">
+                <el-button type="text" @click="openUserAchievement(scope.row.id)">
+                  成果详情
+                </el-button>
+              </div>
+            </template>
+          </el-table-column>
         
         </el-table>
         <Pagination
@@ -69,6 +96,11 @@ const queryParams = reactive({
   createTime: [],
 })
 
+const router = useRouter()
+const openUserAchievement = (id) => {
+  router.push({ name: 'UserAchievement', query: { id: id} });
+}
+
 /** 查询列表 */
 const getList = async () => {
   loading.value = true

+ 3 - 2
src/views/system/workroomCollege/deptInfo/teacher.vue

@@ -1,7 +1,8 @@
 <template>
       <ContentWrap>
         <el-table v-loading="loading" :data="list">
-          <el-table-column label="用户编号" align="center" key="id" prop="id" />
+          <el-table-column type="index" width="50" />
+          <!-- <el-table-column label="用户编号" align="center" key="id" prop="id" /> -->
           <el-table-column
             label="账号"
             align="center"
@@ -21,7 +22,7 @@
             prop="deptName"
             :show-overflow-tooltip="true"
           />
-          <el-table-column label="手机号码" align="center" prop="mobile" width="120" />
+          <el-table-column label="手机号码" align="center" prop="mobile" />
           <el-table-column
             label="创建时间"
             align="center"

+ 19 - 16
src/views/system/workroomCollege/user/UserForm.vue

@@ -45,7 +45,7 @@
           </el-form-item>
         </el-col>
         <el-col :span="12">
-          <el-form-item v-if="formData.id === undefined" label="用户密码" prop="password">
+          <el-form-item v-if="formData.id === undefined" label="用户密码" prop="password" required="ture">
             <el-input
               v-model="formData.password"
               placeholder="请输入用户密码"
@@ -68,20 +68,22 @@
             </el-select>
           </el-form-item>
         </el-col>
-        <el-col :span="12" v-if="formType === 'create-S' || formType === 'update-S'">
+        <el-col :span="12" v-if="formType === 'update-S'">
           <el-form-item label="用户类型" prop="userType">
-            <!-- <el-select v-model="formData.userType" placeholder="请选择用户类型" :disabled="formType === 'create-S' || formType === 'update-S'">
-              <el-option
-                label="在校生"
-                value="1"
+            <el-select v-model="formData.userType" placeholder="请选择用户类型">
+             <el-option
+                v-for="option in userTypes"
+                :key="option.value"
+                :label="option.label"
+                :value="option.value"
                 />
-            </el-select> -->
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12" v-if="formType === 'create-S'">
+          <el-form-item label="用户类型" prop="userType">
             <el-input  v-model="userTypeSt" value="在校生" placeholder="在校生" :disabled="true"/> 
           </el-form-item>
-          <!-- <el-form-item label="用户类型" prop="userType">
-            <span style="margin-left: 10px;">在校生</span>
-            <el-input type="hidden" v-model="formData.userType" value="1" /> 固定为在校生
-          </el-form-item> -->
         </el-col>
         <el-col :span="12" v-if="formType === 'create-T' || formType === 'update-T'">
           <el-form-item label="用户类型" prop="userType">
@@ -138,16 +140,16 @@
             <el-input v-model="formData.userNumber" placeholder="请输入工号" />
           </el-form-item>
         </el-col>
-        <el-col :span="12" v-if="formType === 'update-T' || formType === 'update-S'">
-          <el-form-item label="用户密码" prop="password">
+        <el-col :span="12" v-if="formType === 'update-S' || formType === 'update-T'">
+          <el-form-item label="重置密码" prop="password">
             <el-input
               v-model="formData.password"
-              placeholder="请输入用户密码"
+              placeholder="请重置用户密码"
               show-password
               type="password"
             />
           </el-form-item>
-        </el-col>
+        </el-col> 
       </el-row>
 
       <!-- <el-row>
@@ -258,6 +260,7 @@ const formRules = reactive<FormRules>({
   ],
   supervisor: [{ required: true, message: '导师不能为空', trigger: 'blur' }],
   userNumber: [{ required: true, message: '学号不能为空', trigger: 'blur' }],
+  userType: [{ required: true, message: '用户类型不能为空', trigger: 'blur' }],
 })
 
 const formRef = ref() // 表单 Ref
@@ -329,7 +332,7 @@ defineExpose({ open }) // 提供 open 方法,用于打开弹窗
 const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
 const submitForm = async () => {
   // 校验表单
-  if(formType.value === 'create-S' || formType.value === 'update-S'){
+  if(formType.value === 'create-S'){
     formData.value.userType = userTypeSt.value
   }
   console.log(formData.value,'提交的表单');

+ 69 - 18
src/views/system/workroomCollege/user/student.vue

@@ -44,24 +44,41 @@
               class="!w-240px"
             />
           </el-form-item>
-          <el-form-item label="工作间" prop="deptName" v-if="userInfo.userType === '4'">
+          <el-form-item label="手机号码" prop="mobile">
             <el-input
-              v-model="queryParams.deptName"
-              placeholder="请输入工作间"
+              v-model="queryParams.mobile"
+              placeholder="请输入手机号码"
               clearable
               @keyup.enter="handleQuery"
               class="!w-240px"
             />
           </el-form-item>
-          <el-form-item label="手机号码" prop="mobile">
+           <el-form-item label="邮箱" prop="email">
             <el-input
-              v-model="queryParams.mobile"
-              placeholder="请输入手机号码"
+              v-model="queryParams.email"
+              placeholder="请输入邮箱"
               clearable
               @keyup.enter="handleQuery"
               class="!w-240px"
             />
           </el-form-item>
+          <el-form-item label="导师姓名" prop="supervisor">
+          <el-select
+              v-model="queryParams.supervisor"
+              @change="handleSupervisorChange"
+              placeholder="请选择导师"
+              clearable
+              filterable
+              class="!w-240px"
+            >
+              <el-option
+                v-for="user in users"
+                :key="user.id"
+                :label="user.nickname"
+                :value="user.id"
+              />
+            </el-select>
+      </el-form-item>
           <el-form-item label="毕业条件" prop='isGraduate'>
             <el-select 
               v-model="queryParams.isGraduate" 
@@ -73,15 +90,7 @@
               <el-option label="未达成" :value="1" />
               </el-select>
           </el-form-item>
-          <!-- <el-form-item label="邮箱" prop="email">
-            <el-input
-              v-model="queryParams.email"
-              placeholder="请输入邮箱"
-              clearable
-              @keyup.enter="handleQuery"
-              class="!w-240px"
-            />
-          </el-form-item> -->
+         
           <!-- <el-form-item label="状态" prop="status">
             <el-select
               v-model="queryParams.status"
@@ -150,7 +159,7 @@
       <ContentWrap>
         <el-table v-loading="loading" :data="list">
           <el-table-column type="index" width="50" />
-          <el-table-column label="用户编号" align="center" key="id" prop="id" />
+          <!-- <el-table-column label="用户编号" align="center" key="id" prop="id" /> -->
           <el-table-column
             label="账号"
             align="center"
@@ -196,6 +205,23 @@
               <dict-tag :type="DICT_TYPE.SYSTEM_STUDENT_GRADUATE_STATUS" :value="scope.row.isGraduate" />  
             </template>
           </el-table-column>
+          <el-table-column label="人脸详情" align="center" prop="photoUrl">
+            <template #default="scope">
+                <el-image
+                  lazy
+                  class="h-80px w-80px"
+                  style="width: 40px; height:40px;margin-right: 5px"
+                  :src="scope.row.photoUrl"
+                  :preview-src-list="[scope.row.photoUrl]"
+                  preview-teleported
+                  :zoom-rate="1.2"
+                  :max-scale="7"
+                  :min-scale="0.2"
+                  :initial-index="4"
+                  fit="cover"
+                />
+            </template>
+          </el-table-column> 
           <el-table-column
             label="创建时间"
             align="center"
@@ -323,6 +349,7 @@ const queryParams = reactive({
   createTime: [],
   isGraduate: undefined,
   supervisor: undefined,
+  supervisorId: undefined,
 })
 const queryFormRef = ref() // 搜索的表单
 
@@ -343,6 +370,27 @@ const openUserAchievement = (id) => {
   router.push({ name: 'UserAchievementcopy', query: { id: id} });
 }
 
+//获取所有导师
+const users = ref()
+const getSupervisor= async () => {
+  try {
+    const response = await UserApi.getSupervisor()
+    console.log(response, '所有导师');
+    users.value = response
+  } catch (error) {
+    console.error('Error fetching user data:', error)
+  }
+}
+//传supervisorId给queryParams
+const handleSupervisorChange = (value: number) => {
+  const selectedUser = users.value.find(user => user.id === value);
+  if (selectedUser) {
+    queryParams.supervisorId = selectedUser.id;
+    handleQuery();
+    // queryParams.supervisor = selectedUser.nickname;
+  }
+}
+
 
 /** 搜索按钮操作 */
 const handleQuery = () => {
@@ -352,8 +400,10 @@ const handleQuery = () => {
 
 /** 重置按钮操作 */
 const resetQuery = () => {
-  queryFormRef.value?.resetFields()
-  handleQuery()
+  queryFormRef.value.resetFields();
+  queryParams.supervisor = undefined; // 手动重置导师
+  queryParams.supervisorId = undefined; // 手动重置导师ID
+  handleQuery();
 }
 
 /** 处理部门被点击 */
@@ -468,5 +518,6 @@ const handleRole = (row: UserApi.UserVO) => {
 onMounted(() => {
   getUserInfo()
   getList()
+  getSupervisor()
 })
 </script>

+ 3 - 3
src/views/system/workroomCollege/user/teacher.vue

@@ -44,7 +44,7 @@
               class="!w-240px"
             />
           </el-form-item>
-          <el-form-item label="工作间" prop="deptName" v-if="userInfo.userType === '4'">
+          <!-- <el-form-item label="工作间" prop="deptName" v-if="userInfo.userType === '4'">
             <el-input
               v-model="queryParams.deptName"
               placeholder="请输入工作间"
@@ -52,7 +52,7 @@
               @keyup.enter="handleQuery"
               class="!w-240px"
             />
-          </el-form-item>
+          </el-form-item> -->
           <el-form-item label="手机号码" prop="mobile">
             <el-input
               v-model="queryParams.mobile"
@@ -131,7 +131,7 @@
       <ContentWrap>
         <el-table v-loading="loading" :data="list">
           <el-table-column type="index" width="50" />
-          <el-table-column label="用户编号" align="center" key="id" prop="id" />
+          <!-- <el-table-column label="用户编号" align="center" key="id" prop="id" /> -->
           <el-table-column
             label="账号"
             align="center"

+ 13 - 0
src/views/system/workroomCollege/userAchievement/index.vue

@@ -60,6 +60,17 @@
           <el-option :label="'第二作者'" :value="2" />
         </el-select>
       </el-form-item>
+      <el-form-item label="毕业条件" prop='isGraduate'>
+            <el-select 
+              v-model="queryParams.isGraduate" 
+              placeholder="是否达成毕业条件"  
+              @keyup.enter="handleQuery"
+              class="!w-240px"
+              >
+              <el-option label="已达成" :value="0" />
+              <el-option label="未达成" :value="1" />
+              </el-select>
+          </el-form-item>
       <!-- <el-form-item label="创建时间" prop="createTime">
         <el-date-picker
           v-model="queryParams.createTime"
@@ -195,6 +206,7 @@ import { UserAchievementApi, UserAchievementVO } from '@/api/system/userAchievem
 import UserAchievementForm from './UserAchievementForm.vue'
 import * as UserApi from '@/api/system/user'
 import { useRoute } from 'vue-router'
+import { DICT_TYPE } from '@/utils/dict'
 
 /** 成果 列表 */
 defineOptions({ name: 'UserAchievement' })
@@ -218,6 +230,7 @@ const queryParams = reactive({
   createTime: [],
   detail: undefined,
   sort: undefined,
+  isGraduate: undefined,
 })
 const queryFormRef = ref() // 搜索的表单
 const exportLoading = ref(false) // 导出的加载中

+ 39 - 71
src/views/system/workroomTeacher/dept/index.vue

@@ -9,8 +9,11 @@
   <div class="flex">
     <el-card class="workspace-info w-full" style="padding-bottom: 40px;">
         <template #header>
-          <div class="card-header">
-            <span>工作间信息</span>
+          <div class="card-header" style="display: flex; align-items: center; justify-content: space-between;">
+            <span style="flex-grow: 1; text-align: center;">工作间信息</span>
+            <div class="pull-right">
+              <el-button type="primary" @click="openDialog">修改</el-button>
+            </div>
           </div>
         </template>
         <ul class="user-info">
@@ -72,9 +75,6 @@
           </div>
         </div>
         
-        <div class="button-container">
-          <el-button type="primary" @click="openDialog">修改</el-button>
-        </div>
       </el-card>
       <DeptForm
         ref="formRef"
@@ -84,67 +84,25 @@
         @update:visible="dialogVisible = $event"
         @success="handleSuccess"
       />
-    <!-- <el-card class="workspace-info ml-3 w-2/3">
-      <template #header>
-        <div class="card-header">
-          <span>{{ userInfo.name }}</span>
-        </div>
-      </template>
-      <el-form ref="formRef" :model="form" label-width="100px" :rules="rules" style="margin-left: 5%; margin-right: 5%;;">
-        <el-form-item>
-          <template #label>
-            <span style="font-weight: bold;">负责人信息</span>
-          </template>
-          <span style="font-weight: bold;">------</span>
-        </el-form-item>
-        <el-form-item label="负责人名称" prop="leaderUserId">
-          <el-select
-          v-model="form.leaderUserId"
-          @change="handleSupervisorChange"
-          placeholder="请选择负责人"
-          clearable
-          filterable
-          multiple
-          :disabled="!isEditMode"
-        >
-          <el-option
-            v-for="user in users"
-            :key="user.id"
-            :label="user.nickname"
-            :value="user.id"
-          />
-        </el-select>
-        </el-form-item>
-        <el-form-item>
-          <template #label>
-            <span style="font-weight: bold;">工作间信息</span>
-          </template>
-          <span style="font-weight: bold;">------</span>
-        </el-form-item>
-        <el-form-item label="工作室号码" prop="phone">
-          <el-input v-model="form.phone" :disabled="!isEditMode"/>
-        </el-form-item>
-        <el-form-item label="工作室邮箱" prop="email">
-          <el-input v-model="form.email" :disabled="!isEditMode"/>
-        </el-form-item>
-        
-        <el-form-item label="工作间地址" prop="address">
-          <el-input v-model="form.address" :disabled="!isEditMode"/>
-        </el-form-item>
-        <el-form-item label="工作间名称" prop="name">
-          <el-input v-model="form.name" :disabled="!isEditMode"/>
-        </el-form-item>
-        <el-form-item label="工作间简介" prop="description">
-          <el-input type="textarea" v-model="form.description" :disabled="!isEditMode"/>
-        </el-form-item>
-        <el-form-item>
-          <el-button type="primary" @click="toggleEditMode">{{ isEditMode ? '保存' : '修改' }}</el-button>
-          <el-button type="primary" @click="submit">保存</el-button> -->
-          <!-- <el-button type="danger" @click="init">重置</el-button>
-        </el-form-item>
-      </el-form>
-    </el-card> -->
   </div>
+  <div class="flex flex-col">
+       <el-card class="teacher-info w-full" style="margin-top: 15px; margin-bottom: 15px;">
+        <template #header>
+          <div class="card-header1">
+            <span>导师信息</span>
+          </div>
+        </template>
+        <teacher :id="form.id" />
+      </el-card>
+      <el-card class="student-info w-full mb-3">
+        <template #header>
+          <div class="card-header1">
+            <span>学生信息</span>
+          </div>
+        </template>
+        <student :id="form.id" />
+      </el-card>
+    </div>
  
 </template>
 
@@ -157,10 +115,14 @@ import { useMessage } from '@/hooks/web/useMessage';
 import { updateDept, DeptVO, getUserDept } from '@/api/system/dept/index';
 import * as UserApi from '@/api/system/user'
 import DeptForm from './DeptForm.vue';
+import student from './student.vue';
+import teacher from './teacher.vue';
 
 export default defineComponent({
   components: {
-    DeptForm
+    DeptForm,
+    student,
+    teacher,
   },
   setup() {
     const { t } = useI18n();
@@ -356,7 +318,13 @@ const fetchImageUrls = async () => {
   height: 20px;
 }
 
-.card-header {
+/* .card-header {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+} */
+
+.card-header1 {
   display: flex;
   justify-content: center;
   align-items: center;
@@ -440,11 +408,11 @@ const fetchImageUrls = async () => {
   margin-top: 20px;
 }
 
-.button-container {
+/* .button-container {
   display: flex;
-  justify-content: center; /* 水平居中 */
-  margin-top: 30px; /* 上间距 */
-}
+  justify-content: center; 
+  margin-top: 30px; 
+} */
 
 .image-container {
   display: flex; /* 使图片横向排列 */

+ 16 - 15
src/views/system/workroomTeacher/user/UserForm.vue

@@ -11,7 +11,7 @@
       <el-row>
         <el-col :span="12">
           <el-form-item label="姓名" prop="nickname">
-            <el-input v-model="formData.nickname" placeholder="请输入姓名" />
+            <el-input v-model="formData.nickname" placeholder="请输入姓名" disabled="true"/>
           </el-form-item>
         </el-col>
         <el-col :span="12">
@@ -41,7 +41,7 @@
       </el-row>
       <el-row>
         <el-col :span="12">
-          <el-form-item v-if="formData.id === undefined" label="账号" prop="username">
+          <el-form-item v-if="formData.id === undefined" label="账号" prop="username" disabel="true">
             <el-input v-model="formData.username" placeholder="请输入账号" />
           </el-form-item>
         </el-col>
@@ -69,7 +69,7 @@
             </el-select>
           </el-form-item>
         </el-col>
-        <el-col :span="12" v-if="formType === 'create-S' || formType === 'update-S'">
+        <el-col :span="12">
           <!-- <el-form-item label="用户类型" prop="userType">
             <el-select v-model="formData.userType" placeholder="请选择用户类型">
               <el-option
@@ -80,13 +80,7 @@
                 />
             </el-select>
           </el-form-item> -->
-          <el-form-item label="用户类型" prop="userType">
-            <span style="margin-left: 10px;">在校生</span>
-            <input type="hidden" v-model="formData.userType" value="1" /> <!-- 固定为在校生 -->
-          </el-form-item>
-        </el-col>
-        <el-col :span="12" v-if="formType === 'create-T' || formType === 'update-T'">
-          <!-- <el-form-item label="用户类型" prop="userType">
+          <el-form-item label="用户类型" prop="userType" v-if="formType === 'update-S'">
             <el-select v-model="formData.userType" placeholder="请选择用户类型">
               <el-option
                 v-for="option in userTypes"
@@ -95,10 +89,8 @@
                 :value="option.value"
                 />
             </el-select>
-          </el-form-item> -->
-          <el-form-item label="用户类型" prop="userType">
-            <span style="margin-left: 10px;">导师</span> <!-- 无法选择,直接显示 -->
-            <input type="hidden" v-model="formData.userType" value="3" /> <!-- 固定为导师 -->
+            <!-- <span style="margin-left: 10px;">在校生</span>
+            <input type="hidden" v-model="formData.userType" value="1" /> 固定为在校生 -->
           </el-form-item>
         </el-col>
       </el-row>
@@ -126,7 +118,7 @@
 
         <el-col :span="12">
           <el-form-item label="学号" prop="userNumber" v-if="formType === 'create-S' || formType === 'update-S'">
-            <el-input v-model="formData.userNumber" placeholder="请输入学号" />
+            <el-input v-model="formData.userNumber" placeholder="请输入学号" disabled="true"/>
           </el-form-item>
         </el-col>
       </el-row>
@@ -250,6 +242,15 @@ const handleSupervisorChange = (value: number) => {
   }
 }
 
+//用户类型
+const userTypes = computed(() => {
+  const types = [];
+  if (formType.value === 'create-S' || formType.value === 'update-S') {
+    types.push({ label: '在校生', value: "1" });
+    types.push({ label: '毕业生', value: "2" });
+  }
+  return types;
+});
 
 /** 打开弹窗 */
 const open = async (type: string, id?: number) => {

+ 38 - 10
src/views/system/workroomTeacher/user/student.vue

@@ -12,7 +12,7 @@
           :inline="true"
           label-width="68px"
         >
-          <el-form-item label="账号" prop="username">
+          <!-- <el-form-item label="账号" prop="username">
             <el-input
               v-model="queryParams.username"
               placeholder="请输入账号"
@@ -20,7 +20,7 @@
               @keyup.enter="handleQuery"
               class="!w-240px"
             />
-          </el-form-item>
+          </el-form-item> -->
           <el-form-item label="姓名" prop="nickname">
             <el-input
               v-model="queryParams.nickname"
@@ -39,9 +39,9 @@
               class="!w-240px"
             />
           </el-form-item>
-          <el-form-item label="工作间" prop="deptName">
+          <!-- <el-form-item label="工作间" prop="deptName">
             <el-input v-model="queryParams.deptName" placeholder="请输入工作间" clearable @keyup.enter="handleQuery" class="!w-240px" />
-          </el-form-item>
+          </el-form-item> -->
           <el-form-item label="手机号码" prop="mobile">
             <el-input
               v-model="queryParams.mobile"
@@ -51,6 +51,15 @@
               class="!w-240px"
             />
           </el-form-item>
+          <el-form-item label="邮箱" prop="email">
+            <el-input
+              v-model="queryParams.email"
+              placeholder="请输入邮箱"
+              clearable
+              @keyup.enter="handleQuery"
+              class="!w-240px"
+            />
+          </el-form-item>
           <el-form-item label="毕业条件" prop='isGraduate'>
             <el-select 
               v-model="queryParams.isGraduate" 
@@ -122,13 +131,13 @@
       <ContentWrap>
         <el-table v-loading="loading" :data="list">
           <el-table-column type="index" width="50" />
-          <el-table-column label="用户编号" align="center" key="id" prop="id" />
-          <el-table-column
+          <!-- <el-table-column label="用户编号" align="center" key="id" prop="id" /> -->
+          <!-- <el-table-column
             label="账号"
             align="center"
             prop="username"
             :show-overflow-tooltip="true"
-          />
+          /> -->
           <el-table-column
             label="姓名"
             align="center"
@@ -141,14 +150,15 @@
             prop="userNumber"
             :show-overflow-tooltip="true"
           />
-          <el-table-column
+          <!-- <el-table-column
             label="工作间"
             align="center"
             key="deptName"
             prop="deptName"
             :show-overflow-tooltip="true"
-          />
-          <el-table-column label="手机号码" align="center" prop="mobile" width="120" />
+          /> -->
+          <el-table-column label="手机号码" align="center" prop="mobile"/>
+          <el-table-column label="邮箱" align="center" prop="email"/>
           <!-- <el-table-column label="状态" key="status"  align="center" width="90">
             <template #default="scope">
               <el-switch
@@ -164,6 +174,23 @@
               <dict-tag :type="DICT_TYPE.SYSTEM_STUDENT_GRADUATE_STATUS" :value="scope.row.isGraduate" />  
             </template>
           </el-table-column>
+          <el-table-column label="人脸详情" align="center" prop="photoUrl">
+            <template #default="scope">
+              <el-image
+                lazy
+                class="h-80px w-80px"
+                style="width: 40px; height:40px;margin-right: 5px"
+                :src="scope.row.photoUrl"
+                :preview-src-list="[scope.row.photoUrl]"
+                preview-teleported
+                :zoom-rate="1.2"
+                :max-scale="7"
+                :min-scale="0.2"
+                :initial-index="4"
+                fit="cover"
+              />
+            </template>
+          </el-table-column>
           <el-table-column
             label="创建时间"
             align="center"
@@ -274,6 +301,7 @@ const queryParams = reactive({
   nickname: undefined,
   userNumber: undefined,
   mobile: undefined,
+  email: undefined,
   status: undefined,
   deptId: undefined,
   deptName: undefined,

+ 3 - 3
src/views/system/workroomTeacher/user/teacher.vue

@@ -89,13 +89,13 @@
       <ContentWrap>
         <el-table v-loading="loading" :data="list">
           <el-table-column type="index" width="50" />
-          <el-table-column label="用户编号" align="center" key="id" prop="id" />
-          <el-table-column
+          <!-- <el-table-column label="用户编号" align="center" key="id" prop="id" /> -->
+          <!-- <el-table-column
             label="账号"
             align="center"
             prop="username"
             :show-overflow-tooltip="true"
-          />
+          /> -->
           <el-table-column
             label="姓名"
             align="center"

+ 12 - 0
src/views/system/workroomTeacher/userAchievement/index.vue

@@ -60,6 +60,17 @@
           <el-option :label="'第二作者'" :value="2" />
         </el-select>
       </el-form-item>
+      <el-form-item label="毕业条件" prop='isGraduate'>
+            <el-select 
+              v-model="queryParams.isGraduate" 
+              placeholder="是否达成毕业条件"  
+              @keyup.enter="handleQuery"
+              class="!w-240px"
+              >
+              <el-option label="已达成" :value="0" />
+              <el-option label="未达成" :value="1" />
+              </el-select>
+          </el-form-item>
       <!-- <el-form-item label="创建时间" prop="createTime">
         <el-date-picker
           v-model="queryParams.createTime"
@@ -219,6 +230,7 @@ const queryParams = reactive({
   createTime: [],
   detail: undefined,
   sort: undefined,
+  isGraduate: undefined,
 })
 const queryFormRef = ref() // 搜索的表单
 const exportLoading = ref(false) // 导出的加载中