refactor(gxmu): 名册页面移除手动认领与解除认领入口
This commit is contained in:
@@ -80,23 +80,6 @@
|
||||
{{ record.userId ? '已认领' : '未认领' }}
|
||||
</a-tag>
|
||||
</template>
|
||||
<template v-else-if="column.key === 'action'">
|
||||
<a-space>
|
||||
<a
|
||||
v-if="hasPermission('gxmu:student:list') && !record.userId"
|
||||
@click="doBind(record)"
|
||||
>
|
||||
手动认领
|
||||
</a>
|
||||
<a-popconfirm
|
||||
v-if="hasPermission('gxmu:student:list') && record.userId"
|
||||
title="确定解除该学生的账号关联吗?"
|
||||
@confirm="doUnbind(record)"
|
||||
>
|
||||
<a class="ele-text-danger">解除认领</a>
|
||||
</a-popconfirm>
|
||||
</a-space>
|
||||
</template>
|
||||
</template>
|
||||
</ele-pro-table>
|
||||
</a-card>
|
||||
@@ -116,12 +99,7 @@
|
||||
import { hasPermission } from '@/utils/permission';
|
||||
import { listOrganizations } from '@/api/system/organization';
|
||||
import { listClassInfo } from '@/api/gxmu/class';
|
||||
import {
|
||||
bindStudent,
|
||||
exportStudentRoster,
|
||||
pageStudentRoster,
|
||||
unbindStudent
|
||||
} from '@/api/gxmu/student';
|
||||
import { exportStudentRoster, pageStudentRoster } from '@/api/gxmu/student';
|
||||
import type {
|
||||
StudentRoster,
|
||||
StudentRosterParam
|
||||
@@ -191,13 +169,6 @@
|
||||
key: 'syncTime',
|
||||
width: 170,
|
||||
customRender: ({ text }) => (text ? toDateString(text) : '-')
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
fixed: 'right',
|
||||
align: 'center',
|
||||
width: 150
|
||||
}
|
||||
]);
|
||||
|
||||
@@ -268,34 +239,6 @@
|
||||
reload();
|
||||
};
|
||||
|
||||
const doBind = (record: StudentRoster) => {
|
||||
const hide = message.loading('请求中..', 0);
|
||||
bindStudent(record.id)
|
||||
.then((msg) => {
|
||||
hide();
|
||||
message.success(msg);
|
||||
reload();
|
||||
})
|
||||
.catch((e) => {
|
||||
hide();
|
||||
message.error(e.message);
|
||||
});
|
||||
};
|
||||
|
||||
const doUnbind = (record: StudentRoster) => {
|
||||
const hide = message.loading('请求中..', 0);
|
||||
unbindStudent(record.id)
|
||||
.then((msg) => {
|
||||
hide();
|
||||
message.success(msg);
|
||||
reload();
|
||||
})
|
||||
.catch((e) => {
|
||||
hide();
|
||||
message.error(e.message);
|
||||
});
|
||||
};
|
||||
|
||||
const doExport = () => {
|
||||
exporting.value = true;
|
||||
exportStudentRoster(currentParam())
|
||||
|
||||
Reference in New Issue
Block a user