修改打包报错问题
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<!-- 搜索表单 -->
|
||||
<el-form :model="queryForm" inline class="mb-4" ref="searchFormRef">
|
||||
<el-form :model="queryForm" inline ref="searchFormRef">
|
||||
<el-form-item label="招生计划" prop="groupId">
|
||||
<el-select v-model="queryForm.groupId" filterable clearable placeholder="请选择招生计划">
|
||||
<el-option
|
||||
@@ -45,7 +45,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="getDataList">查询</el-button>
|
||||
<el-button type="primary" plain icon="Refresh" class="ml10" @click="resetQuery">重置</el-button>
|
||||
<el-button icon="Refresh" class="ml10" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
{{ getTypeLabel(scope.row.type) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="姓名[唯一号]" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="name" label="姓名[唯一号]" width="140" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="majorChangeInfo" label="专业变更情况" align="center" show-overflow-tooltip />
|
||||
<el-table-column label="学费变更情况" align="center">
|
||||
<el-table-column prop="dbName" label="费用类型" align="center" show-overflow-tooltip />
|
||||
@@ -82,10 +82,9 @@
|
||||
<el-table-column prop="createBy" label="异动发起人" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="createDate" label="异动时间" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="remarks" label="备注信息" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="isMajorChange" label="异动审核" align="center" show-overflow-tooltip>
|
||||
<el-table-column prop="isMajorChange" label="异动审核" width="110" align="center" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.isMajorChange == '0'" style="color: green">{{ getMajor(scope.row.isMajorChange) }}</span>
|
||||
<span v-if="scope.row.isMajorChange != '0'" style="color: red">{{ getMajor(scope.row.isMajorChange) }}</span>
|
||||
<AuditState :state="scope.row.isMajorChange" :options="auditStateOptions" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="100" align="center" fixed="right">
|
||||
@@ -111,7 +110,7 @@
|
||||
/>
|
||||
|
||||
<!-- 异动审核弹窗 -->
|
||||
<el-dialog v-model="majorChangeVisible" title="异动审核">
|
||||
<el-dialog v-model="majorChangeVisible" title="异动审核" width="600px">
|
||||
<el-form :model="exarmForm" ref="exarmFormRef" label-width="80px" :rules="dataRule">
|
||||
<el-form-item label="审核结果" prop="isMajorChange">
|
||||
<el-select v-model="exarmForm.isMajorChange" filterable clearable placeholder="请选择审核结果" style="width: 100%">
|
||||
@@ -150,9 +149,12 @@ import { ref, reactive, computed, onMounted, defineAsyncComponent } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useUserInfo } from '/@/stores/userInfo'
|
||||
import { BasicTableProps, useTable } from '/@/hooks/table'
|
||||
import { useMessage, useMessageBox } from '/@/hooks/message'
|
||||
import { useMessage } from '/@/hooks/message'
|
||||
import { fetchList, putObj } from '/@/api/recruit/recruitstudentsignupturnover'
|
||||
import { list } from '/@/api/recruit/recruitstudentplangroup'
|
||||
import { getList } from '/@/api/recruit/recruitstudentplangroup'
|
||||
import type { StateOption } from '/@/components/AuditState/index.vue'
|
||||
|
||||
const AuditState = defineAsyncComponent(() => import('/@/components/AuditState/index.vue'))
|
||||
|
||||
// 使用 Pinia store
|
||||
const userInfoStore = useUserInfo()
|
||||
@@ -169,7 +171,6 @@ const permissions = computed(() => {
|
||||
|
||||
// 消息提示 hooks
|
||||
const message = useMessage()
|
||||
const messageBox = useMessageBox()
|
||||
|
||||
// 表格引用
|
||||
const tableRef = ref()
|
||||
@@ -182,8 +183,31 @@ const majorChangeVisible = ref(false)
|
||||
// 数据
|
||||
const planList = ref<any[]>([])
|
||||
const typeList = ref([{ label: '专业变更', value: '1' }, { label: '退学', value: '2' }])
|
||||
const isMajorChangeList = ref([{ label: '通过', value: '3' }, { label: '驳回', value: '2' }])
|
||||
const majorChangeList = ref([{ label: '通过', value: '3' }, { label: '驳回', value: '2' }, { label: '待审核', value: '1' }])
|
||||
|
||||
// 审核状态选项配置(用于 AuditState 组件和检索条件)
|
||||
const auditStateOptions = ref<StateOption[]>([
|
||||
{ value: '1', label: '待审核', type: 'warning', icon: 'fa-regular fa-clock', effect: 'light' },
|
||||
{ value: '2', label: '驳回', type: 'danger', icon: 'fa-solid fa-circle-xmark', effect: 'dark' },
|
||||
{ value: '3', label: '通过', type: 'success', icon: 'fa-solid fa-circle-check', effect: 'dark' }
|
||||
])
|
||||
|
||||
// 从 auditStateOptions 派生检索条件列表(只包含 label 和 value)
|
||||
const majorChangeList = computed(() => {
|
||||
return auditStateOptions.value.map(item => ({
|
||||
label: item.label,
|
||||
value: item.value
|
||||
}))
|
||||
})
|
||||
|
||||
// 审核弹窗中的选项(只包含通过和驳回)
|
||||
const isMajorChangeList = computed(() => {
|
||||
return auditStateOptions.value
|
||||
.filter(item => item.value === '2' || item.value === '3')
|
||||
.map(item => ({
|
||||
label: item.label,
|
||||
value: item.value
|
||||
}))
|
||||
})
|
||||
|
||||
// 查询表单
|
||||
const queryForm = reactive({
|
||||
@@ -214,17 +238,6 @@ const getTypeLabel = (type: string) => {
|
||||
return item ? item.label : ''
|
||||
}
|
||||
|
||||
// 获取审核状态
|
||||
const getMajor = (type: string) => {
|
||||
if (type == '1') {
|
||||
return '待审核'
|
||||
} else if (type == '2') {
|
||||
return '驳回'
|
||||
} else if (type == '3') {
|
||||
return '已通过'
|
||||
}
|
||||
return ''
|
||||
}
|
||||
|
||||
// 表格状态
|
||||
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
@@ -247,14 +260,14 @@ const { getDataList, currentChangeHandle, sizeChangeHandle, tableStyle } = useTa
|
||||
// 初始化
|
||||
const init = async () => {
|
||||
try {
|
||||
const data = await list()
|
||||
const data = await getList()
|
||||
planList.value = data.data || []
|
||||
if (planList.value.length > 0) {
|
||||
queryForm.groupId = planList.value[0].id
|
||||
}
|
||||
getDataList()
|
||||
} catch (error) {
|
||||
console.error('初始化失败', error)
|
||||
message.error('初始化失败')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -290,9 +303,9 @@ const update = async () => {
|
||||
// 重置查询
|
||||
const resetQuery = () => {
|
||||
searchFormRef.value?.resetFields()
|
||||
Object.keys(queryForm).forEach(key => {
|
||||
queryForm[key] = ''
|
||||
})
|
||||
queryForm.groupId = ''
|
||||
queryForm.search = ''
|
||||
queryForm.isMajorChange = ''
|
||||
if (planList.value.length > 0) {
|
||||
queryForm.groupId = planList.value[0].id
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user