From 1988fed055a24fc2fe8dbb9a7537e554f020c690 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=8B=E4=BA=8E=E5=88=9D=E8=A7=81?= <752204717@qq.com> Date: Thu, 30 May 2024 13:19:35 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=A2=9E=E5=8A=A0=E5=88=86?= =?UTF-8?q?=E7=B1=BB=E7=AD=9B=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TaihuPublicWelfare/articleList.vue | 383 +++++++++++++++ .../component/articleList/add.vue | 463 ++++++++++++++++++ src/views/modules/course/courseList.vue | 134 ++++- 3 files changed, 958 insertions(+), 22 deletions(-) create mode 100644 src/views/modules/TaihuPublicWelfare/articleList.vue create mode 100644 src/views/modules/TaihuPublicWelfare/component/articleList/add.vue diff --git a/src/views/modules/TaihuPublicWelfare/articleList.vue b/src/views/modules/TaihuPublicWelfare/articleList.vue new file mode 100644 index 0000000..9efdef8 --- /dev/null +++ b/src/views/modules/TaihuPublicWelfare/articleList.vue @@ -0,0 +1,383 @@ + + + + + + + + + + + 查询 + 新增 + + + + + + + + + + + 富文本 + 外链 + + + + + + + {{ scope.row.content }} + + {{ scope.row.url }} + + + + + + + + + + 修改 + 删除 + + + + + + + + + + + + + + diff --git a/src/views/modules/TaihuPublicWelfare/component/articleList/add.vue b/src/views/modules/TaihuPublicWelfare/component/articleList/add.vue new file mode 100644 index 0000000..a191ac2 --- /dev/null +++ b/src/views/modules/TaihuPublicWelfare/component/articleList/add.vue @@ -0,0 +1,463 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 取消 + 确定 + + + + + + + diff --git a/src/views/modules/course/courseList.vue b/src/views/modules/course/courseList.vue index e2802f7..6ebd58e 100644 --- a/src/views/modules/course/courseList.vue +++ b/src/views/modules/course/courseList.vue @@ -7,11 +7,24 @@ > + + + + - + - - + + - { + console.log("🚀 ~ getDataList ~ data:", data); + if (data && data.code === 0) { + if (type == 1) { + this.options[type].children = data.Medicals; + } else if (type == 2) { + this.options[type].children = data.sociologys; + } + + // this.totalPage = data.page.totalCount + } else { + this.options[type].children = []; + // this.totalPage = 0 + } + this.dataListLoading = false; + }); + + console.log("this.options at line 333:", this.options); + }, // 获取数据列表 getDataList() { + var data = { + page: this.pageIndex, + limit: this.pageSize, + courseName: this.query.courseName //关键字 + }; + + if (this.selectType.length == 0) { + data.type = 0; + data.medicalId = ""; + data.sociologyId = ""; + } else if (this.selectType.length >= 1) { + data.type = this.selectType[0]=='all'?0:this.selectType[0]; + if (this.selectType.length == 1) { + + data.medicalId = ""; + data.sociologyId = ""; + + } + if (this.selectType.length > 1) { + if (this.selectType[0] == 1) { + data.medicalId = this.selectType[this.selectType.length - 1]; + data.sociologyId = ""; + } + if (this.selectType[0] == 2) { + data.medicalId = ""; + data.sociologyId = this.selectType[this.selectType.length - 1]; + } + } + } + this.dataListLoading = true; this.$http({ url: this.$http.adornUrl("/master/course/getCourseList"), method: "post", - data: this.$http.adornData({ - page: this.pageIndex, - limit: this.pageSize, - type: this.query.type || 0, //类型0全部,1:医学,2:国学 - categoryId: this.query.categoryId, //医学类型id,当type为1时为必填项;为0时代表全部 - sociologyId: this.query.sociologyId, //国学类型id,当type为2时为必填项;为0代表全部 - keywords: this.query.keywords //关键字 - }) + data: this.$http.adornData(data) }).then(({ data }) => { if (data && data.code === 0) { this.dataList = data.page.records; @@ -453,3 +536,10 @@ export default { } }; +