a
This commit is contained in:
@@ -85,7 +85,7 @@
|
||||
<!-- 操作按钮 -->
|
||||
<div class="mb15">
|
||||
<el-button
|
||||
v-if="permissions.recruit_recruitprestudent_add"
|
||||
v-auth="'recruit_recruitprestudent_add'"
|
||||
type="primary"
|
||||
icon="FolderAdd"
|
||||
@click="addOrUpdateHandle(null)"
|
||||
@@ -116,10 +116,16 @@
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
|
||||
<el-table-column prop="djName" label="对接人" width="150" align="center">
|
||||
<el-table-column prop="djName" label="对接人" width="230" align="center">
|
||||
<template #default="scope">
|
||||
{{ scope.row.djName }} <br />
|
||||
<span style="color: #0e90d2">{{ scope.row.djTime }}</span>
|
||||
<div v-if="scope.row.djName || scope.row.djTime" class="contact-cell">
|
||||
<div v-if="scope.row.djName" class="contact-name">
|
||||
<el-icon class="contact-icon"><User /></el-icon>
|
||||
<span class="contact-text">{{ scope.row.djName }}</span>
|
||||
</div>
|
||||
<span v-if="scope.row.djTime" class="time-text">{{ scope.row.djTime }}</span>
|
||||
</div>
|
||||
<span v-else class="empty-text">-</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="学生姓名" width="120" align="center" show-overflow-tooltip />
|
||||
@@ -136,10 +142,10 @@
|
||||
{{ getSchoolName(scope.row.schoolId) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="250" align="center" fixed="left">
|
||||
<el-table-column label="操作" width="250" align="center" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
v-if="permissions.recruit_recruitprestudent_edit"
|
||||
v-auth="'recruit_recruitprestudent_edit'"
|
||||
type="primary"
|
||||
link
|
||||
icon="EditPen"
|
||||
@@ -148,7 +154,8 @@
|
||||
修改
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="permissions.recruit_recruitprestudent_dj && scope.row.isDj == '0'"
|
||||
v-auth="'recruit_recruitprestudent_dj'"
|
||||
v-if="scope.row.isDj == '0'"
|
||||
type="primary"
|
||||
link
|
||||
icon="Connection"
|
||||
@@ -157,7 +164,7 @@
|
||||
确认对接
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="permissions.recruit_recruitprestudent_del"
|
||||
v-auth="'recruit_recruitprestudent_del'"
|
||||
type="primary"
|
||||
link
|
||||
icon="Delete"
|
||||
@@ -189,12 +196,11 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="recruitprestudent">
|
||||
import { ref, reactive, computed, onMounted, nextTick, defineAsyncComponent } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useUserInfo } from '/@/stores/userInfo'
|
||||
import { ref, reactive, onMounted, nextTick, defineAsyncComponent } from 'vue'
|
||||
import { BasicTableProps, useTable } from '/@/hooks/table'
|
||||
import { useDict } from '/@/hooks/dict'
|
||||
import { useMessage, useMessageBox } from '/@/hooks/message'
|
||||
import { User } from '@element-plus/icons-vue'
|
||||
import { delObj, fetchList, sureDJ } from '/@/api/recruit/recruitprestudent'
|
||||
import { getList } from '/@/api/recruit/recruitstudentplangroup'
|
||||
import { listcz } from '/@/api/recruit/recruitstudentplan'
|
||||
@@ -203,19 +209,6 @@ import { getDeptListByLevelTwo } from '/@/api/basic/basicdept'
|
||||
|
||||
const TableForm = defineAsyncComponent(() => import('./enrolplantemplate-form.vue'))
|
||||
|
||||
// 使用 Pinia store
|
||||
const userInfoStore = useUserInfo()
|
||||
const { userInfos } = storeToRefs(userInfoStore)
|
||||
|
||||
// 创建权限对象
|
||||
const permissions = computed(() => {
|
||||
const perms: Record<string, boolean> = {}
|
||||
userInfos.value.authBtnList.forEach((perm: string) => {
|
||||
perms[perm] = true
|
||||
})
|
||||
return perms
|
||||
})
|
||||
|
||||
// 消息提示 hooks
|
||||
const message = useMessage()
|
||||
const messageBox = useMessageBox()
|
||||
@@ -299,7 +292,7 @@ const init = async () => {
|
||||
|
||||
getDataList()
|
||||
} catch (error) {
|
||||
console.error('初始化失败', error)
|
||||
message.error('初始化失败')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -319,7 +312,7 @@ const getMajor = async (groupId: string) => {
|
||||
planMajorList.value = data.data || []
|
||||
getDataList()
|
||||
} catch (error) {
|
||||
console.error('获取专业列表失败', error)
|
||||
message.error('获取专业列表失败')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -392,4 +385,39 @@ onMounted(() => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.contact-cell {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
justify-content: center;
|
||||
white-space: nowrap;
|
||||
|
||||
.contact-name {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
white-space: nowrap;
|
||||
|
||||
.contact-icon {
|
||||
color: #909399;
|
||||
font-size: 14px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.contact-text {
|
||||
font-weight: 500;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
.time-text {
|
||||
font-size: 12px;
|
||||
color: var(--el-color-primary);
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
.empty-text {
|
||||
color: #c0c4cc;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user