Browse Source

Merge branch 'master' of http://gogs.gisvg.com/YDM/graduate-ui

47 3 months ago
parent
commit
4039f5054d

File diff suppressed because it is too large
+ 255 - 336
pnpm-lock.yaml


+ 6 - 22
src/views/system/workroomTeacher/dept/index.vue

@@ -86,23 +86,13 @@
       />
   </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 style="margin-top: 15px;">
+      <teacher :id="form.id" />
     </div>
+    <div>
+      <student :id="form.id" />
+    </div>
+  </div>
  
 </template>
 
@@ -324,15 +314,9 @@ const fetchImageUrls = async () => {
   align-items: center;
 } */
 
-.card-header1 {
-  display: flex;
-  justify-content: center;
-  align-items: center;
-}
 
 .user-info {
   margin-top: 10px;
-  
   margin-left: 5%;
   margin-right: 5%;
   padding-right: 0;

+ 136 - 0
src/views/system/workroomTeacher/dept/student.vue

@@ -0,0 +1,136 @@
+<template>
+      <ContentWrap>
+        <div class="table-container">
+          <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"
+            prop="username"
+            :show-overflow-tooltip="true"
+          /> -->
+          <el-table-column
+            label="姓名"
+            align="center"
+            prop="nickname"
+            :show-overflow-tooltip="true"
+          />
+          <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="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" width="190">
+            <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>
+        </div>
+      
+        <Pagination
+          :total="total"
+          v-model:page="queryParams.pageNo"
+          v-model:limit="queryParams.pageSize"
+          @pagination="getList"
+        />
+      </ContentWrap>
+
+</template>
+<script lang="ts" setup>
+import { DICT_TYPE } from '@/utils/dict'
+import { dateFormatter } from '@/utils/formatTime'
+import * as UserApi from '@/api/system/user'
+import { defineProps } from 'vue';
+import { useRouter } from 'vue-router';
+
+defineOptions({ name: 'SystemUser' })
+
+const props = defineProps<{
+  id: string; // 根据需要修改类型
+}>();
+
+const loading = ref(true) // 列表的加载中
+const total = ref(0) // 列表的总页数
+const list = ref([]) // 列表的数
+const queryParams = reactive({
+  pageNo: 1,
+  pageSize: 10,
+  username: undefined,
+  mobile: undefined,
+  status: undefined,
+  deptId: props.id,
+  createTime: [],
+})
+
+const router = useRouter()
+const openUserAchievement = (id) => {
+  router.push({ name: 'UserAchievement', query: { id: id} });
+}
+
+/** 查询列表 */
+const getList = async () => {
+  loading.value = true
+  try {
+    queryParams.deptId = props.id
+    const data = await UserApi.getStudentPage(queryParams)
+    list.value = data.list
+    total.value = data.total
+  } finally {
+    loading.value = false
+  }
+}
+/** 初始化 */
+onMounted(() => {
+  getList()
+})
+</script>
+
+<style scoped>
+.table-container .el-table {
+  border: none !important; /* 移除表格的外边框 */
+}
+
+.table-container .el-table th, 
+.table-container .el-table td {
+  border: none !important; /* 移除表头和单元格的边框 */
+}
+</style>

+ 86 - 0
src/views/system/workroomTeacher/dept/teacher.vue

@@ -0,0 +1,86 @@
+<template>
+      <ContentWrap>
+        <el-table v-loading="loading" :data="list">
+          <el-table-column type="index"/>
+          <!-- <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"
+            prop="nickname"
+            :show-overflow-tooltip="true"
+          />
+          <el-table-column
+            label="工作间"
+            align="center"
+            key="deptName"
+            prop="deptName"
+            :show-overflow-tooltip="true"
+          />
+          <el-table-column label="手机号码" align="center" prop="mobile"/>
+          <el-table-column
+            label="创建时间"
+            align="center"
+            prop="createTime"
+            :formatter="dateFormatter"
+            width="180"
+          />
+        <Pagination
+          :total="total"
+          v-model:page="queryParams.pageNo"
+          v-model:limit="queryParams.pageSize"
+          @pagination="getList"
+        />
+      </el-table>
+    </ContentWrap>
+</template>
+<script lang="ts" setup>
+import { dateFormatter } from '@/utils/formatTime'
+import * as UserApi from '@/api/system/user'
+
+defineOptions({ name: 'SystemUser' })
+
+const props = defineProps<{
+  id: string; // 根据需要修改类型
+}>();
+
+const loading = ref(true) // 列表的加载中
+const total = ref(0) // 列表的总页数
+const list = ref([]) // 列表的数
+const queryParams = reactive({
+  pageNo: 1,
+  pageSize: 10,
+  username: undefined,
+  mobile: undefined,
+  status: undefined,
+  deptId: props.id,
+  createTime: []
+})
+
+const showIsGraduate = ref(false);
+
+/** 查询列表 */
+const getList = async () => {
+  loading.value = true
+  try {
+    queryParams.deptId = props.id
+    const data = await UserApi.getTeacherPage(queryParams)
+    console.log(data, 'data');
+    list.value = data.list
+    total.value = data.total
+    showIsGraduate.value = data.list.some(user => user.hasOwnProperty('isGraduate'));
+  } finally {
+    loading.value = false
+  }
+}
+
+/** 初始化 */
+onMounted(() => {
+  getList()
+})
+</script>

Some files were not shown because too many files changed in this diff