|
@@ -1,5 +1,4 @@
|
|
|
<template>
|
|
|
- <!-- 上层状态 -->
|
|
|
|
|
|
<!-- 模态框 -->
|
|
|
<n-modal v-model:show="showModal" block-scroll close-on-esc trap-focus>
|
|
@@ -53,7 +52,7 @@ import { h, defineComponent } from 'vue'
|
|
|
import { useMessage } from 'naive-ui'
|
|
|
import { NButton } from 'naive-ui'
|
|
|
import type { DataTableColumns } from 'naive-ui'
|
|
|
-import { selectTotal, addClass } from '~/src/service/api/lesson'
|
|
|
+import { selectTotal, addClass,deleteClass } from '~/src/service/api/lesson'
|
|
|
import { ref } from 'vue'
|
|
|
import {
|
|
|
onBeforeMount,
|
|
@@ -75,12 +74,11 @@ type RowData = {
|
|
|
disabled?: string
|
|
|
}
|
|
|
const tableData = ref([]);
|
|
|
-function getTableData() {
|
|
|
+async function getTableData() {
|
|
|
selectTotal().then(r => {
|
|
|
tableData.value = r.data;
|
|
|
})
|
|
|
}
|
|
|
-getTableData();
|
|
|
|
|
|
const createColumns = ({
|
|
|
sendMail
|
|
@@ -121,7 +119,9 @@ const createColumns = ({
|
|
|
]
|
|
|
}
|
|
|
//---|
|
|
|
-
|
|
|
+// deleteClass().then(r=>{
|
|
|
+// console.log(r);
|
|
|
+// })
|
|
|
|
|
|
//增加班级类
|
|
|
type easEduClass = {
|
|
@@ -145,25 +145,25 @@ let params: easEduClass = {
|
|
|
createUid: 0,
|
|
|
disabled: null
|
|
|
}
|
|
|
-function AddClassInter(params): void {
|
|
|
+async function AddClassInter(params) {
|
|
|
if (params != "") {
|
|
|
addClass(params).then(r => {
|
|
|
console.log(r);
|
|
|
})
|
|
|
|
|
|
-
|
|
|
}
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+//|
|
|
|
+//删除班级
|
|
|
+
|
|
|
+
|
|
|
export default defineComponent({
|
|
|
|
|
|
setup() {
|
|
|
- onMounted(() => {
|
|
|
- // AddClassInter(params);
|
|
|
- console.log(111);
|
|
|
-
|
|
|
-
|
|
|
+ onMounted(async() => {
|
|
|
+ getTableData();
|
|
|
});
|
|
|
const showModal = ref(false);
|
|
|
const formRef = ref<FormInst | null>(null)
|
|
@@ -187,7 +187,6 @@ export default defineComponent({
|
|
|
],
|
|
|
}
|
|
|
return {
|
|
|
- onMounted,
|
|
|
formRef,
|
|
|
rPasswordFormItemRef,
|
|
|
model: modelRef,
|