From 86b1851fcc07c633ddff70c68ce7fe23c72d3f65 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: Tue, 21 May 2024 11:28:20 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E6=A0=87=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/commonBookTags/commonTags.vue | 26 +- .../components/commonBookTags/shopproduct.vue | 34 +- .../commonBookTags/shopproductTable.vue | 11 +- src/views/components/commonBookTags/tags.vue | 294 ++++++++++----- ....vue => nationalStudiesOperationsList.vue} | 60 ++- src/views/modules/course/operationsList.vue | 4 +- .../courseSettings/chapter-add-or-update.vue | 274 ++++++++++++++ .../medicalCourseDescription.vue | 351 ++++++++++++++++++ .../nationalStudiesCourseDescription.vue | 351 ++++++++++++++++++ 9 files changed, 1278 insertions(+), 127 deletions(-) rename src/views/modules/course/{operationsList copy.vue => nationalStudiesOperationsList.vue} (95%) create mode 100644 src/views/modules/courseSettings/chapter-add-or-update.vue create mode 100644 src/views/modules/courseSettings/medicalCourseDescription.vue create mode 100644 src/views/modules/courseSettings/nationalStudiesCourseDescription.vue diff --git a/src/views/components/commonBookTags/commonTags.vue b/src/views/components/commonBookTags/commonTags.vue index 1b788bf..c06104a 100644 --- a/src/views/components/commonBookTags/commonTags.vue +++ b/src/views/components/commonBookTags/commonTags.vue @@ -129,7 +129,7 @@ import debounce from "lodash/debounce"; //导入lodash中的debounce import commonTree from "./tags.vue"; import commonTreeMarket from "./tags.vue"; export default { - props: ["currentType", "currentId"], + props: ["currentType", "currentId","axiosType"], data() { return { productId: null, @@ -440,7 +440,8 @@ export default { type: "warning", } ).then(() => { - this.$http({ + if(this.axiosType=='raw'){ + this.$http({ url: this.$http.adornUrl("/book/shopproduct/delete"), method: "post", data: this.$http.adornData(ids, false), @@ -458,6 +459,27 @@ export default { this.$message.error(data.msg); } }); + }else{ + this.$http({ + url: this.$http.adornUrl("/book/shopproduct/delete"), + method: "post", + data: this.$http.adornData(ids, false), + }).then(({ data }) => { + if (data && data.code === 0) { + this.$message({ + message: "操作成功", + type: "success", + duration: 1500, + onClose: () => { + this.getDataList(); + }, + }); + } else { + this.$message.error(data.msg); + } + }); + } + }); }, SwitchChange(event) { diff --git a/src/views/components/commonBookTags/shopproduct.vue b/src/views/components/commonBookTags/shopproduct.vue index 942935e..fac380d 100644 --- a/src/views/components/commonBookTags/shopproduct.vue +++ b/src/views/components/commonBookTags/shopproduct.vue @@ -166,7 +166,10 @@ export default { "isEdit", "currentId", "currentType", - "isNoSearch" + "isNoSearch", + "isNoPaging", + "axiosType", + "otherInfo", ], data() { return { @@ -319,7 +322,30 @@ export default { this.dataListLoading = true; - if (this.defaultForm.httpType == "raw") { + if (this.axiosType == "raw") { + this.$http + .request({ + url: this.$http.adornUrl(`${this.urlList.getAssociatedGoodsList}`), + method: "POST", + data: { + ...form + }, + header: { + //默认 无 说明:请求头 + "Content-Type": "application/json" + } + }) + .then(async ({ data }) => { + console.log('data at line 338:', data) + if (data && data.code === 0) { + this.associatedGoodsList = [...data[this.otherInfo.httpDataValueName]]; + + this.dataListLoading = false; + } + }); + } + + else if (this.defaultForm.httpType == "raw") { this.$http .request({ url: this.$http.adornUrl(`${this.urlList.hasBindProductList}`), @@ -339,7 +365,9 @@ export default { this.dataListLoading = false; } }); - } else { + } + + else { await this.$http({ url: this.$http.adornUrl(`${this.urlList.getAssociatedGoodsList}`), method: "post", diff --git a/src/views/components/commonBookTags/shopproductTable.vue b/src/views/components/commonBookTags/shopproductTable.vue index 7c57037..ba9e884 100644 --- a/src/views/components/commonBookTags/shopproductTable.vue +++ b/src/views/components/commonBookTags/shopproductTable.vue @@ -113,12 +113,13 @@ export default { props: [ "defaultForm", + "otherInfo", "marketIdKey", "currentType", "currentId", "title", "isNoModal", - "urlList" + "urlList", ], data() { return { @@ -245,7 +246,7 @@ export default { // } this.dataListLoading = true; this.clear(); - if (this.defaultForm.httpType == "raw") { + if (this.defaultForm.httpType == "raw"||this.otherInfo.httpType == "raw") { form.page = this.pageIndex; this.$http .request({ @@ -272,7 +273,11 @@ export default { // }, 200); this.dataListLoading = false; }); - } else { + } + + + + else { form.current = this.pageIndex; await this.$http({ url: this.$http.adornUrl(this.urlList.getNotToLabelList), diff --git a/src/views/components/commonBookTags/tags.vue b/src/views/components/commonBookTags/tags.vue index 9647e68..1dc155d 100644 --- a/src/views/components/commonBookTags/tags.vue +++ b/src/views/components/commonBookTags/tags.vue @@ -1,13 +1,21 @@