|
@@ -29,6 +29,7 @@ import TheEmpty from '/src/components/TheEmpty';
|
|
|
import TheTooltip from '/src/components/TheTooltip';
|
|
|
import PreviewWindow from '../preview-window';
|
|
|
import { state as globalState } from '/src/state';
|
|
|
+import {courseSchedulePage} from '../home/api'
|
|
|
export default defineComponent({
|
|
|
name: 'class-classList',
|
|
|
setup(props, { emit }) {
|
|
@@ -55,7 +56,8 @@ export default defineComponent({
|
|
|
removeVisiable: false,
|
|
|
removeRow: {} as any,
|
|
|
previewModal: false,
|
|
|
- previewParams: {} as any
|
|
|
+ previewParams: {} as any,
|
|
|
+ lastCourse:null as any
|
|
|
});
|
|
|
const formRef = ref();
|
|
|
const dialog = useDialog();
|
|
@@ -237,7 +239,20 @@ export default defineComponent({
|
|
|
state.studentVisible = true;
|
|
|
};
|
|
|
|
|
|
- const classesBegin = (row: any) => {
|
|
|
+ const classesBegin = async(row: any) => {
|
|
|
+ try{
|
|
|
+ const res = await courseSchedulePage({"classGroupId": row.id})
|
|
|
+ if(res.data.rows.length>0){
|
|
|
+ state.lastCourse = res.data.rows[0]
|
|
|
+ console.log(state.lastCourse,'state.lastCourse')
|
|
|
+ }else{
|
|
|
+ state.lastCourse = null
|
|
|
+ }
|
|
|
+ console.log(res)
|
|
|
+ // const lastCorse =
|
|
|
+ }catch(e){
|
|
|
+ console.log(e)
|
|
|
+ }
|
|
|
state.activeRow = row;
|
|
|
state.goCourseVisiable = true;
|
|
|
};
|