feat: 教师选择学生进行切换查看学生配置数据信息
This commit is contained in:
@@ -2,6 +2,7 @@ import { getPtClassStudents } from '@/api/pt/neClass';
|
||||
import { ptSaveAsDefault, ptResetAsDefault } from '@/api/pt/neConfig';
|
||||
import { stuPtNeConfigApply } from '@/api/pt/neConfigApply';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { hasRoles } from '@/plugins/auth-user';
|
||||
import { message } from 'ant-design-vue/lib';
|
||||
import { onMounted, reactive } from 'vue';
|
||||
|
||||
@@ -10,7 +11,7 @@ import { onMounted, reactive } from 'vue';
|
||||
* @param param 父级传入 {t}
|
||||
* @returns
|
||||
*/
|
||||
export default function usePtOptions({t}:any) {
|
||||
export default function usePtOptions({ t }: any) {
|
||||
/**保存网元下所有配置为示例配置 */
|
||||
function ptConfigSave(neType: string) {
|
||||
ptSaveAsDefault(neType, '001').then(res => {
|
||||
@@ -124,21 +125,18 @@ export default function usePtOptions({t}:any) {
|
||||
timeout = setTimeout(fake, 500);
|
||||
}
|
||||
|
||||
/**学生选择改变 */
|
||||
function studentChange(e: any) {
|
||||
console.log(e);
|
||||
// 仅教师加载
|
||||
if (hasRoles(['teacher'])) {
|
||||
onMounted(() => {
|
||||
initStudentList();
|
||||
});
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
initStudentList();
|
||||
});
|
||||
|
||||
return {
|
||||
ptConfigSave,
|
||||
ptConfigReset,
|
||||
ptConfigApply,
|
||||
classState,
|
||||
studentChange,
|
||||
studentSearch,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user