forked from b2894lxlx/tuanwei-admin
refactor(gxmu): 名册页面移除手动认领与解除认领入口
This commit is contained in:
@@ -80,23 +80,6 @@
|
|||||||
{{ record.userId ? '已认领' : '未认领' }}
|
{{ record.userId ? '已认领' : '未认领' }}
|
||||||
</a-tag>
|
</a-tag>
|
||||||
</template>
|
</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>
|
</template>
|
||||||
</ele-pro-table>
|
</ele-pro-table>
|
||||||
</a-card>
|
</a-card>
|
||||||
@@ -116,12 +99,7 @@
|
|||||||
import { hasPermission } from '@/utils/permission';
|
import { hasPermission } from '@/utils/permission';
|
||||||
import { listOrganizations } from '@/api/system/organization';
|
import { listOrganizations } from '@/api/system/organization';
|
||||||
import { listClassInfo } from '@/api/gxmu/class';
|
import { listClassInfo } from '@/api/gxmu/class';
|
||||||
import {
|
import { exportStudentRoster, pageStudentRoster } from '@/api/gxmu/student';
|
||||||
bindStudent,
|
|
||||||
exportStudentRoster,
|
|
||||||
pageStudentRoster,
|
|
||||||
unbindStudent
|
|
||||||
} from '@/api/gxmu/student';
|
|
||||||
import type {
|
import type {
|
||||||
StudentRoster,
|
StudentRoster,
|
||||||
StudentRosterParam
|
StudentRosterParam
|
||||||
@@ -191,13 +169,6 @@
|
|||||||
key: 'syncTime',
|
key: 'syncTime',
|
||||||
width: 170,
|
width: 170,
|
||||||
customRender: ({ text }) => (text ? toDateString(text) : '-')
|
customRender: ({ text }) => (text ? toDateString(text) : '-')
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '操作',
|
|
||||||
key: 'action',
|
|
||||||
fixed: 'right',
|
|
||||||
align: 'center',
|
|
||||||
width: 150
|
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
|
||||||
@@ -268,34 +239,6 @@
|
|||||||
reload();
|
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 = () => {
|
const doExport = () => {
|
||||||
exporting.value = true;
|
exporting.value = true;
|
||||||
exportStudentRoster(currentParam())
|
exportStudentRoster(currentParam())
|
||||||
|
|||||||
Reference in New Issue
Block a user