This commit is contained in:
guochunsi
2026-01-16 15:55:28 +08:00
parent cb74e79383
commit bbbc9a0663
7 changed files with 102 additions and 132 deletions

View File

@@ -7,11 +7,10 @@
>
<el-form :inline="true">
<el-form-item>
<el-button v-if="permissions.recruit_recruitImitateAdjustBatch_add" :icon="Plus" size="small" type="primary" @click="addOrUpdateHandle()">新增</el-button>
<el-button v-auth="'recruit_recruitImitateAdjustBatch_add'" icon="FolderAdd" type="primary" @click="addOrUpdateHandle()">新增</el-button>
</el-form-item>
</el-form>
<div class="avue-crud">
<el-table
<el-table
:data="dataList"
border
stripe
@@ -35,8 +34,7 @@
align="center"
label="性别">
<template #default="scope">
<span v-if="scope.row.gender==1"></span>
<span v-if="scope.row.gender==2"></span>
<GenderTag :sex="scope.row.gender" />
</template>
</el-table-column>
<el-table-column
@@ -45,7 +43,7 @@
align="center"
label="学历">
<template #default="scope">
{{global.getLabelValueByPropes(eduList,scope.row.degreeOfEducation,{'key':'value','value':'label'})}}
{{ getLabelValueByProps(eduList, scope.row.degreeOfEducation, { key: 'value', value: 'label' }) }}
</template>
</el-table-column>
<el-table-column
@@ -55,7 +53,7 @@
align="center"
label="拟报专业1">
<template #default="scope">
{{global.getLabelValueByPropes2(planMajorList,scope.row.wishMajorOne,{'key':'majorCode','value':'majorName'})}}
{{ getLabelValueByProps(planMajorList, scope.row.wishMajorOne, { key: 'majorCode', value: 'majorName' }) }}
</template>
</el-table-column>
<el-table-column
@@ -65,7 +63,7 @@
width="100px"
label="拟报专业2">
<template #default="scope">
{{global.getLabelValueByPropes2(planMajorList,scope.row.wishMajorTwo,{'key':'majorCode','value':'majorName'})}}
{{ getLabelValueByProps(planMajorList, scope.row.wishMajorTwo, { key: 'majorCode', value: 'majorName' }) }}
</template>
</el-table-column>
@@ -76,7 +74,7 @@
width="100px"
label="拟报专业3">
<template #default="scope">
{{global.getLabelValueByPropes2(planMajorList,scope.row.wishMajorThree,{'key':'majorCode','value':'majorName'})}}
{{ getLabelValueByProps(planMajorList, scope.row.wishMajorThree, { key: 'majorCode', value: 'majorName' }) }}
</template>
</el-table-column>
<el-table-column
@@ -85,7 +83,7 @@
align="center"
label="原录取专业">
<template #default="scope">
{{global.getLabelValueByPropes2(planMajorList,scope.row.oldConfirmedMajor,{'key':'majorCode','value':'majorName'})}}
{{ getLabelValueByProps(planMajorList, scope.row.oldConfirmedMajor, { key: 'majorCode', value: 'majorName' }) }}
</template>
</el-table-column>
<el-table-column
@@ -94,7 +92,7 @@
align="center"
label="模拟录取专业">
<template #default="scope">
{{global.getLabelValueByPropes2(planMajorList,scope.row.confirmedMajor,{'key':'majorCode','value':'majorName'})}}
{{ getLabelValueByProps(planMajorList, scope.row.confirmedMajor, { key: 'majorCode', value: 'majorName' }) }}
</template>
</el-table-column>
<el-table-column
@@ -113,49 +111,33 @@
align="center"
label="操作">
<template #default="scope">
<el-button v-if="permissions.recruit_recruitImitateAdjustBatch_edit" type="text" size="small" :icon="Edit" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
<el-button v-if="permissions.recruit_recruitImitateAdjustBatch_del" type="text" size="small" :icon="Delete" @click="deleteHandle(scope.row.id)">删除</el-button>
<el-button v-auth="'recruit_recruitImitateAdjustBatch_edit'" type="text" size="small" :icon="Edit" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
<el-button v-auth="'recruit_recruitImitateAdjustBatch_del'" type="text" size="small" :icon="Delete" @click="deleteHandle(scope.row.id)">删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
<add-m-n-stu v-if="addMnStuVisible" ref="addMnStuRef" @refreshDataList="getDataList"></add-m-n-stu>
</el-dialog>
</template>
<script setup lang="ts">
import { ref, reactive, computed, nextTick, defineAsyncComponent } from 'vue'
import { storeToRefs } from 'pinia'
import { useUserInfo } from '/@/stores/userInfo'
import { ref, reactive, nextTick, defineAsyncComponent } from 'vue'
import { useMessage, useMessageBox } from '/@/hooks/message'
import { Plus, Edit, Delete } from '@element-plus/icons-vue'
import { getMNStuList, delMNObj } from '@/api/recruit/recruitImitateAdjustBatch'
import { listPlanByCondition as planMajor } from "@/api/recruit/recruitstudentplan"
import { getTypeValue } from "@/api/admin/dict"
// @ts-ignore
import global from '@/components/tools/commondict'
import { Edit, Delete } from '@element-plus/icons-vue'
import { getMNStuList, delMNObj } from '/@/api/recruit/recruitImitateAdjustBatch'
import { listPlanByCondition as planMajor } from '/@/api/recruit/recruitstudentplan'
import { getTypeValue } from '/@/api/admin/dict'
import { getLabelValueByProps } from '/@/utils/dictLabel'
const AddMNStu = defineAsyncComponent(() => import('./addMNStu.vue'))
const GenderTag = defineAsyncComponent(() => import('@/components/GenderTag/index.vue'))
// Emits
const emit = defineEmits<{
(e: 'refreshDataList'): void
}>()
// 使用 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()
@@ -240,7 +222,4 @@ defineExpose({
</script>
<style scoped>
.avue-crud {
margin-top: 20px;
}
</style>