|
@@ -5,6 +5,7 @@
|
|
|
</template>
|
|
|
<script setup>
|
|
|
import { schoolTree, schoolAdd, schoolItem, schoolUpdate, schoolDelete } from "../../api/admin/school";
|
|
|
+import { courseList, courseAdd } from "../../api/admin/course";
|
|
|
|
|
|
/**
|
|
|
* 获取学校全部结构
|
|
@@ -208,6 +209,72 @@ const schoolDeleteEvent = () => {
|
|
|
|
|
|
schoolDeleteEvent();
|
|
|
|
|
|
+
|
|
|
+/**
|
|
|
+ * 获取课程列表
|
|
|
+ */
|
|
|
+const courseListEvent = () => {
|
|
|
+
|
|
|
+ let submit = {
|
|
|
+ "dto" : JSON.stringify({
|
|
|
+ // 第几页
|
|
|
+ "pageNum": 1,
|
|
|
+ // 每页显示多少数据
|
|
|
+ "pageSize": 3,
|
|
|
+ // 搜索的名称
|
|
|
+ "name": ""
|
|
|
+ })
|
|
|
+ };
|
|
|
+
|
|
|
+ courseList(submit)
|
|
|
+ .then(response => {
|
|
|
+
|
|
|
+ let data = response?.data?.data;
|
|
|
+ console.log(
|
|
|
+ "courseListEvent response", response, data
|
|
|
+ );
|
|
|
+
|
|
|
+ }).catch(error => {
|
|
|
+
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+courseListEvent();
|
|
|
+
|
|
|
+/**
|
|
|
+ * 课程新增
|
|
|
+ */
|
|
|
+const courseAddEvent = () => {
|
|
|
+
|
|
|
+ let submit = {
|
|
|
+ // 课程名称
|
|
|
+ "name": "新增自定义课程名称",
|
|
|
+ // 可以传多个班级的id
|
|
|
+ // "classIds": [],
|
|
|
+ "classIds": [
|
|
|
+ "1385288575779737600",
|
|
|
+ "1385288584269008896",
|
|
|
+ ],
|
|
|
+ };
|
|
|
+
|
|
|
+ courseAdd(submit)
|
|
|
+ .then(response => {
|
|
|
+
|
|
|
+ let data = response?.data?.data;
|
|
|
+ console.log(
|
|
|
+ "courseAddEvent response", response, data
|
|
|
+ );
|
|
|
+
|
|
|
+ }).catch(error => {
|
|
|
+
|
|
|
+ });
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+// courseAddEvent();
|
|
|
+
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
|