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';