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%" > + + + + + {{ item.label }} + + + + + + + + + +
+ + + + + + +
+
+ + + + + 取消 + 确定 + + + + + + + diff --git a/src/views/modules/commonNews/newsList.vue b/src/views/modules/commonNews/newsList.vue new file mode 100644 index 0000000..603f646 --- /dev/null +++ b/src/views/modules/commonNews/newsList.vue @@ -0,0 +1,378 @@ + + + diff --git a/src/views/modules/course/medicalLabel.vue b/src/views/modules/course/medicalLabel.vue index e69de29..dc8acd8 100644 --- a/src/views/modules/course/medicalLabel.vue +++ b/src/views/modules/course/medicalLabel.vue @@ -0,0 +1,1155 @@ + + + + diff --git a/src/views/modules/course/nationalStudiesOperationsList.vue b/src/views/modules/course/nationalStudiesOperationsList.vue index b42bbde..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 @@ --> @@ -297,6 +314,51 @@ ref="addOrUpdate" @refreshDataList="getDataList" > + +
+ + + + +

+ {{ dataForm.title }} +

+ + +
+ + + +
+
+ + 取 消 + 确 定 + +
@@ -310,6 +372,7 @@ import commonTree from "@/views/components/commonBookTags/tags.vue"; export default { data() { return { + dialogVisible: false, isEdit: false, checkAll: false, isIndeterminate: true, @@ -324,7 +387,8 @@ export default { hasBindProductList: "/master/courseSociologyMarket/getCourseListByMarketId", CanBindProductList: "/master/courseSociologyMarket/getNotToMarketList" - }, + , editSort: "/master/courseSociologyMarket/editMarketSort", + }, addForm: {}, isFresh: false, dataRule: { @@ -415,13 +479,57 @@ 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; + }, handleSubmitDataForm: debounce(async function() { + var that = this; + this.$http + .request({ + url: this.$http.adornUrl(`${this.urlList.editSort}`), + method: "POST", + data: { + marketId: this.dataForm.marketId, + courseId: this.dataForm.courseId, + + sort: Number(this.dataForm.sort) + }, + 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), + dataFormEdit(row) { + console.log('row at line 523:', row) + this.dataForm = { + + marketId: row.sociologyMarketId, + courseId: row.courseId, + sort: row.sort, + title: row.courseEntity.title + }; + this.dialogVisible = true; }, handleCheckAllChange(val) { this.$nextTick(() => { @@ -572,7 +680,7 @@ export default { ) .then(async () => { // var lableIds = row[0].bookLabelId; - var productIds = row[0].id; + var productIds = row[0].courseId; // // return false // var selectShopArr = this.$refs.commonShop.selectShopArr; diff --git a/src/views/modules/course/operationsList.vue b/src/views/modules/course/operationsList.vue index ff8ce13..dd455b3 100644 --- a/src/views/modules/course/operationsList.vue +++ b/src/views/modules/course/operationsList.vue @@ -2,7 +2,7 @@
- + + + + + @@ -224,13 +245,13 @@ @@ -310,6 +373,7 @@ import commonTree from "@/views/components/commonBookTags/tags.vue"; export default { data() { return { + dialogVisible: false, isEdit: false, checkAll: false, isIndeterminate: true, @@ -317,13 +381,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/courseMedicineMarket/editMarketSort" }, addForm: {}, isFresh: false, @@ -416,12 +480,57 @@ 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: { + marketId: this.dataForm.marketId, + courseId: this.dataForm.courseId, + + sort: Number(this.dataForm.sort) + }, + 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 = { + + marketId: row.medicineMarketId, + courseId: row.courseId, + sort: row.sort, + title: row.courseEntity.title + }; + this.dialogVisible = true; }, handleCheckAllChange(val) { this.$nextTick(() => { @@ -532,10 +641,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 +656,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) } @@ -572,7 +681,7 @@ export default { ) .then(async () => { // var lableIds = row[0].bookLabelId; - var productIds = row[0].id; + var productIds = row[0].courseId; // // return false // var selectShopArr = this.$refs.commonShop.selectShopArr; 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/src/views/modules/courseSettings/chapter-add-or-update.vue b/src/views/modules/courseSettings/chapter-add-or-update.vue index fae4966..dfede43 100644 --- a/src/views/modules/courseSettings/chapter-add-or-update.vue +++ b/src/views/modules/courseSettings/chapter-add-or-update.vue @@ -1,274 +1,246 @@ - - diff --git a/src/views/modules/courseSettings/medicalCourseDescription.vue b/src/views/modules/courseSettings/medicalCourseDescription.vue index 9924308..e008687 100644 --- a/src/views/modules/courseSettings/medicalCourseDescription.vue +++ b/src/views/modules/courseSettings/medicalCourseDescription.vue @@ -1,127 +1,24 @@ @@ -130,6 +27,14 @@ import AddOrUpdate from "./chapter-add-or-update"; export default { data() { return { + currentTab: 0, + type: 0, + setList: [ + { label: "购买须知", id: 0 }, + { label: "使用须知", id: 1 }, + { label: "学习次序", id: 2 }, + { label: "超V用户", id: 3 } + ], dataForm: { key: "" }, @@ -164,33 +69,53 @@ export default { this.getDataList(); }, methods: { + handleClick(tab, event) { + this.getDataList() + }, // 获取数据列表 getDataList() { this.dataListLoading = true; - this.$http({ - url: this.$http.adornUrl( - "/master/course/getCourseCatalogueChapterList" - ), - method: "post", - data: this.$http.adornData({ - id: this.catalogue_id, - 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 //关键字 + this.$http + .request({ + url: this.$http.adornUrl(`/master/course/getCourseRecord`), + method: "POST", + data: { + type: this.type + }, + header: { + //默认 无 说明:请求头 + "Content-Type": "application/json" + } }) - }).then(({ data }) => { - if (data && data.code === 0) { - this.dataList = data.page.records; - this.totalPage = data.page.total; - } else { - this.dataList = []; - this.totalPage = 0; - } - this.dataListLoading = false; - }); + .then(({ data }) => { + var that=this + console.log("data at line 86:", data); + if (data && data.code === 0) { console.log('that.currentTab at line 91:', that.currentTab) + var content='' + switch (that.currentTab) { + + case "0": + content=data.result.buyRecord + break; + case "1": + content=data.result.useRecord + break; + case "2": + content=data.result.studyRecord + + break; + case "3": + content=data.result.vipRecord + + break; + } + that.$nextTick(()=>{ + that.$refs[`addOrUpdate${that.currentTab}`][0].init(content); +}) + + } + this.dataListLoading = false; + }); }, // 每页数 sizeChangeHandle(val) { @@ -344,8 +269,11 @@ export default { overflow: hidden; display: -webkit-box; - -webkit-line-clamp:1; + -webkit-line-clamp: 1; -webkit-box-orient: vertical; } +::v-deep .mod-config .el-tabs .el-tabs__content { + height: 100% !important; +} diff --git a/src/views/modules/courseSettings/nationalStudiesCourseDescription.vue b/src/views/modules/courseSettings/nationalStudiesCourseDescription.vue index 9924308..2d3dbf8 100644 --- a/src/views/modules/courseSettings/nationalStudiesCourseDescription.vue +++ b/src/views/modules/courseSettings/nationalStudiesCourseDescription.vue @@ -1,127 +1,24 @@ @@ -130,6 +27,15 @@ import AddOrUpdate from "./chapter-add-or-update"; export default { data() { return { + content: '', + currentTab: 0, + type: 1, + setList: [ + { label: "购买须知", id: 0 }, + { label: "使用须知", id: 1 }, + { label: "学习次序", id: 2 }, + { label: "超V用户", id: 3 } + ], dataForm: { key: "" }, @@ -164,33 +70,55 @@ export default { this.getDataList(); }, methods: { + handleClick(tab, event) { + + this.getDataList() + }, // 获取数据列表 getDataList() { this.dataListLoading = true; - this.$http({ - url: this.$http.adornUrl( - "/master/course/getCourseCatalogueChapterList" - ), - method: "post", - data: this.$http.adornData({ - id: this.catalogue_id, - 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 //关键字 + this.$http + .request({ + url: this.$http.adornUrl(`/master/course/getCourseRecord`), + method: "POST", + data: { + type: this.type + }, + header: { + //默认 无 说明:请求头 + "Content-Type": "application/json" + } }) - }).then(({ data }) => { - if (data && data.code === 0) { - this.dataList = data.page.records; - this.totalPage = data.page.total; - } else { - this.dataList = []; - this.totalPage = 0; - } - this.dataListLoading = false; - }); + .then(({ data }) => { + var that=this + console.log("data at line 86:", data); + if (data && data.code === 0) { console.log('that.currentTab at line 91:', that.currentTab) + var content='' + switch (that.currentTab) { + + case "0": + content=data.result.buyRecord + break; + case "1": + content=data.result.useRecord + break; + case "2": + content=data.result.studyRecord + + break; + case "3": + content=data.result.vipRecord + + break; + } + that.$nextTick(()=>{ + this.content=content + that.$refs[`addOrUpdate${that.currentTab}`][0].init(content); +}) + + } + this.dataListLoading = false; + }); }, // 每页数 sizeChangeHandle(val) { @@ -344,8 +272,11 @@ export default { overflow: hidden; display: -webkit-box; - -webkit-line-clamp:1; + -webkit-line-clamp: 1; -webkit-box-orient: vertical; } +::v-deep .mod-config .el-tabs .el-tabs__content { + height: 100% !important; +} diff --git a/src/views/modules/xieyi/add-update.vue b/src/views/modules/xieyi/add-update.vue index 41ed62e..98af2b4 100644 --- a/src/views/modules/xieyi/add-update.vue +++ b/src/views/modules/xieyi/add-update.vue @@ -40,7 +40,33 @@ import { quillEditor } from 'vue-quill-editor' - + const toolbarOptions = [ + ["bold", "italic", "underline", "strike"], // 加粗,斜体,下划线,删除线 + ["blockquote", "code-block"], //引用,代码块 + [{ header: 1 }, { header: 2 }], // 几级标题 + [{ list: "ordered" }, { list: "bullet" }], // 有序列表,无序列表 + [{ script: "sub" }, { script: "super" }], // 下角标,上角标 + [{ indent: "-1" }, { indent: "+1" }], // 缩进 + [{ direction: "rtl" }], // 文字输入方向 + [{ size: ["small", false, "large", "huge"] }], // 字体大小 + [{ header: [1, 2, 3, 4, 5, 6, false] }], // 标题 + [{ color: [] }, { background: [] }], // 颜色选择 + [ + { + font: [ + "SimSun", + "SimHei", + "Microsoft-YaHei", + "KaiTi", + "FangSong", + "Arial" + ] + } + ], // 字体 + [{ align: [] }], // 居中 + ["clean"], // 清除样式, + ["link", "image"] // 上传图片、上传视频 +]; import 'quill/dist/quill.core.css' import 'quill/dist/quill.snow.css' import 'quill/dist/quill.bubble.css' @@ -88,50 +114,10 @@ ], editorOption: { modules: { - toolbar: [ - ['bold', 'italic', 'underline', 'strike'], // 加粗 斜体 下划线 删除线 - ['blockquote', 'code-block'], // 引用 代码块 - [{ - header: 1 - }, { - header: 2 - }], // 1、2 级标题 - [{ - list: 'ordered' - }, { - list: 'bullet' - }], // 有序、无序列表 - [{ - script: 'sub' - }, { - script: 'super' - }], // 上标/下标 - [{ - indent: '-1' - }, { - indent: '+1' - }], // 缩进 - [{ - direction: 'rtl' - }], // 文本方向 - [{ - size: ['12', '14', '16', '18', '20', '22', '24', '28', '32', '36'] - }], // 字体大小 - [{ - header: [1, 2, 3, 4, 5, 6] - }], // 标题 - [{ - color: [] - }, { - background: [] - }], // 字体颜色、字体背景颜色 - // [{ font: ['songti'] }], // 字体种类 - [{ - align: [] - }], // 对齐方式 - ['clean'], // 清除文本格式 - ['image', 'video'] // 链接、图片、视频 - ] + toolbar: { + container: toolbarOptions, + + } }, placeholder: '请输入正文' }, 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';