From 3c2c1ee281c57b60e0fdc19f7adefe0df7e094b4 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: Wed, 22 May 2024 10:24:14 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E8=90=A5=E9=94=80?= =?UTF-8?q?=E6=A0=87=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/commonBookTags/shopproduct.vue | 33 +- .../commonBookTags/shopproductTable.vue | 1 + src/views/modules/course/medicalLabel.vue | 1155 +++++++++++++++++ .../course/nationalStudiesOperationsList.vue | 68 +- src/views/modules/course/operationsList.vue | 148 ++- src/views/modules/course/sociologyList.vue | 10 +- static/config/index.js | 2 +- 7 files changed, 1379 insertions(+), 38 deletions(-) diff --git a/src/views/components/commonBookTags/shopproduct.vue b/src/views/components/commonBookTags/shopproduct.vue index cab3848..358be78 100644 --- a/src/views/components/commonBookTags/shopproduct.vue +++ b/src/views/components/commonBookTags/shopproduct.vue @@ -68,6 +68,7 @@ style="width: 100%" > + + + + + + + + + + + + +
+ + 确定 + +
+ +
+ + 确定 + +
+ + + + + + + + + + + + + + diff --git a/src/views/modules/course/nationalStudiesOperationsList.vue b/src/views/modules/course/nationalStudiesOperationsList.vue index b42bbde..cc23301 100644 --- a/src/views/modules/course/nationalStudiesOperationsList.vue +++ b/src/views/modules/course/nationalStudiesOperationsList.vue @@ -179,6 +179,14 @@ /> + @@ -297,6 +305,51 @@ ref="addOrUpdate" @refreshDataList="getDataList" > + +
+ + + + +

+ {{ dataForm.title }} +

+ + +
+ + + +
+
+ + 取 消 + 确 定 + +
@@ -310,6 +363,7 @@ import commonTree from "@/views/components/commonBookTags/tags.vue"; export default { data() { return { + dialogVisible: false, isEdit: false, checkAll: false, isIndeterminate: true, @@ -324,6 +378,9 @@ export default { hasBindProductList: "/master/courseSociologyMarket/getCourseListByMarketId", CanBindProductList: "/master/courseSociologyMarket/getNotToMarketList" + , editSort: "/master/courseSociology/updateCourseToSociologySort", + }, dataForm: { + key: "" }, addForm: {}, isFresh: false, @@ -415,13 +472,16 @@ export default { this.isEdit = false; this.getDataList(); }, - methods: { + methods: { handleClose() { + this.dataForm = {}; + this.dialogVisible = false; + }, UpNumber(e) { e.target.value = e.target.value.replace(/[^\d]/g, ""); }, - dataFormEdit() { - this.checkAll = false; - this.isEdit = !this.isEdit; + dataFormEdit(row) { + this.dataForm = { ...row }; + this.dialogVisible = true; }, handleCheckAllChange(val) { this.$nextTick(() => { diff --git a/src/views/modules/course/operationsList.vue b/src/views/modules/course/operationsList.vue index ff8ce13..15c89de 100644 --- a/src/views/modules/course/operationsList.vue +++ b/src/views/modules/course/operationsList.vue @@ -2,7 +2,7 @@
+ 修改排序 +
@@ -224,13 +232,13 @@ @@ -310,6 +370,7 @@ import commonTree from "@/views/components/commonBookTags/tags.vue"; export default { data() { return { + dialogVisible: false, isEdit: false, checkAll: false, isIndeterminate: true, @@ -317,13 +378,13 @@ export default { treeList: "/master/courseMedicineMarket/marketTree", delete: "/master/courseMedicineMarket/delMarket", deleteShop: - "/master/courseMedicineMarket/delToMarket", - saveShop: "/master/courseMedicineMarket/saveToMarket", - add: "/master/courseMedicineMarket/saveOrUpdateMarket", - edit: "/master/courseMedicineMarket/saveOrUpdateMarket", - getAssociatedGoodsList: - "/master/courseMedicineMarket/getCourseByMarketId", - getNotToLabelList: "/master/courseMedicineMarket/getNotToMarketList" + "/master/courseMedicineMarket/unbindCourseAndMedicineMarket", + saveShop: "/master/courseMedicineMarket/bindCourseAndMedicineMarket", + add: "/master/courseMedicineMarket/addSociologyMarket", + edit: "/master/courseMedicineMarket/editSociologyMarket", + hasBindProductList: "/master/courseMedicineMarket/getCourseByMarketId", + CanBindProductList: "/master/courseMedicineMarket/getNotToMarketList", + editSort: "/master/courseSociology/updateCourseToSociologySort" }, addForm: {}, isFresh: false, @@ -416,12 +477,49 @@ export default { this.getDataList(); }, methods: { + handleClose() { + this.dataForm = {}; + this.dialogVisible = false; + }, + handleSubmitDataForm: debounce(async function() { + var that = this; + this.$http + .request({ + url: this.$http.adornUrl(`${this.urlList.editSort}`), + method: "POST", + data: { + id: this.dataForm.bindId, + sort: Number(this.dataForm.toSociologySort) + }, + header: { + //默认 无 说明:请求头 + "Content-Type": "application/json" + } + }) + + .then(async ({ data }) => { + if (data && data.code === 0) { + this.$message.success(data.msg); + + if (this.$refs.commonShop) { + this.$refs.commonShop.getAssociatedGoodsList({ + courseId: this.addForm.id + }); + } + } else { + this.$message.error(data.msg); + } + that.dialogVisible = false; + }); + + that.$forceUpdate(); + }, 200), UpNumber(e) { e.target.value = e.target.value.replace(/[^\d]/g, ""); }, - dataFormEdit() { - this.checkAll = false; - this.isEdit = !this.isEdit; + dataFormEdit(row) { + this.dataForm = { ...row }; + this.dialogVisible = true; }, handleCheckAllChange(val) { this.$nextTick(() => { @@ -532,10 +630,10 @@ export default { await this.getDataList(); this.$nextTick(async () => { - this.$refs.commonTree.setCurrentNodeShow(data.result.id); + this.$refs.commonTree.setCurrentNodeShow(data.market.id); - this.addForm = data.result; - this.currentNode = { data: { ...data.result } }; + this.addForm = data.market; + this.currentNode = { data: { ...data.market } }; this.$message({ message: "操作成功", type: "success", @@ -547,10 +645,10 @@ export default { }); } else { this.$message.error(data.msg); - setTimeout(()=>{ - this.addForm = { ...this.currentNode.data }; - },500) - + setTimeout(() => { + this.addForm = { ...this.currentNode.data }; + }, 500); + // console.log('this.addForm at line 550:', this.addForm) // console.log('this.addForm at line 550:', this.currentNode) } diff --git a/src/views/modules/course/sociologyList.vue b/src/views/modules/course/sociologyList.vue index 4288602..badd7c4 100644 --- a/src/views/modules/course/sociologyList.vue +++ b/src/views/modules/course/sociologyList.vue @@ -72,7 +72,7 @@ >
- 已绑定课程列表 + 已关联课程列表 { this.$refs.commonShop.handleCheckAllChange(val); diff --git a/static/config/index.js b/static/config/index.js index 71ef68a..d81f202 100644 --- a/static/config/index.js +++ b/static/config/index.js @@ -9,7 +9,7 @@ // window.SITE_CONFIG['baseUrl'] = 'http://59.110.212.44:9200/pb'; window.SITE_CONFIG['baseUrl'] = 'https://testapi.nuttyreading.com'; // 线上测试环境11 // window.SITE_CONFIG['baseUrl'] = 'https://api.nuttyreading.com'; // 线上正式环境 - // window.SITE_CONFIG['baseUrl'] = 'http://192.168.110.110:9200/pb'; + // window.SITE_CONFIG['baseUrl'] = 'http://192.168.110.110:9200/pb';//磊哥 // window.SITE_CONFIG['baseUrl'] = 'http://59.110.212.44:9200/pb'; // window.SITE_CONFIG['baseUrl'] = 'http://192.168.110.100:9200/pb'; From 555c0cb6b0fe8947629c65216bde7650d50ecd0a 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: Wed, 22 May 2024 15:16:31 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=9B=BD=E5=AD=A6=E5=8C=BB=E5=AD=A6?= =?UTF-8?q?=E8=90=A5=E9=94=80=E6=A0=87=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../course/nationalStudiesOperationsList.vue | 76 +++++++++++++++---- src/views/modules/course/operationsList.vue | 51 ++++++++----- 2 files changed, 93 insertions(+), 34 deletions(-) diff --git a/src/views/modules/course/nationalStudiesOperationsList.vue b/src/views/modules/course/nationalStudiesOperationsList.vue index cc23301..585d750 100644 --- a/src/views/modules/course/nationalStudiesOperationsList.vue +++ b/src/views/modules/course/nationalStudiesOperationsList.vue @@ -95,7 +95,7 @@ :isNoSearch="true" :otherInfo="{ httpType: 'raw', - httpDataValueName: 'courseList' + httpDataValueName: 'list' }" :defaultForm="{ marketId: addForm.id @@ -150,13 +150,13 @@ --> @@ -62,7 +64,7 @@ const toolbarOptions = [ ["link", "image"] // 上传图片、上传视频 ]; export default { - props:['dataInfo'], + props: ["dataInfo", "type"], data() { return { baseUrl: global.baseUrl, @@ -90,7 +92,7 @@ export default { } } }, - placeholder: "请输入"+this.dataInfo.label + placeholder: "请输入" + this.dataInfo.label }, visible: false, props: { @@ -107,12 +109,9 @@ export default { dialogImageUrl: "", dialogVisible: false, dataForm: { - courseId: 0, - catalogueId: 0, - title: "", - imgUrl: "", + content: "", - sort: 1 + }, splitsTypeList: [], dataRule: {} @@ -152,61 +151,37 @@ export default { onEditorReady(quill) { // console.log('editor ready!', quill) }, - init(row, catalogue_id, courseid) { - console.log("row21", row); - this.dataForm = row ? JSON.parse(JSON.stringify(row)) : {}; - this.dataForm.courseId = courseid ? courseid : ""; - this.dataForm.catalogueId = catalogue_id ? catalogue_id : ""; - this.visible = true; - if (this.dataForm.imgUrl && this.dataForm.imgUrl != "") { - var img = { - name: "", - url: this.dataForm.imgUrl - }; - var attr = []; - attr.push(img); - this.fileList = attr; - } else { - this.fileList = []; - } + init(content) { + console.log("row21", content); + this.dataForm.content=content + + }, + getContent(){ + }, // 表单提交 dataFormSubmit() { - this.$refs["dataForm"].validate(valid => { - if (valid) { - this.$http({ - url: this.$http.adornUrl( - `${ - !this.dataForm.id - ? "/master/course/addCourseCatalogueChapter" - : "/master/course/editCourseCatalogueChapter" - }` - ), - method: "post", - data: this.$http.adornData({ - id: this.dataForm.id || undefined, - courseId: this.dataForm.courseId || undefined, - catalogueId: this.dataForm.catalogueId || undefined, - title: this.dataForm.title, - imgUrl: this.dataForm.imgUrl, - content: this.dataForm.content, - sort: this.dataForm.sort - }) - }).then(({ data }) => { - if (data && data.code === 0) { - this.$message({ - message: "操作成功", - type: "success", - duration: 1500, - onClose: () => { - this.visible = false; - this.$emit("refreshDataList"); - } - }); - } else { - this.$message.error(data.msg); + this.$http({ + url: this.$http.adornUrl("/master/course/editCourseRecord"), + method: "post", + data: this.$http.adornData({ + type: this.type, + recordType: this.dataInfo.id, //0 buy_record , 1 use_record , 2 study_record, 3 vip_record + content: this.dataForm.content + }) + }).then(({ data }) => { + if (data && data.code === 0) { + this.$message({ + message: "操作成功", + type: "success", + duration: 1500, + onClose: () => { + this.visible = false; + this.$emit("refreshDataList"); } }); + } else { + this.$message.error(data.msg); } }); }, diff --git a/src/views/modules/courseSettings/medicalCourseDescription.vue b/src/views/modules/courseSettings/medicalCourseDescription.vue index 2fd9282..e008687 100644 --- a/src/views/modules/courseSettings/medicalCourseDescription.vue +++ b/src/views/modules/courseSettings/medicalCourseDescription.vue @@ -1,11 +1,18 @@