From a8e2b253c63d9947d13226354a6b580a2aa81caa Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Tue, 16 May 2023 14:09:17 +0800 Subject: [PATCH] fix --- src/setting.js | 8 +- src/utils/api.js | 2 + src/views/course/Curriculum.vue | 45 +++-- src/views/customer/AddCustomer.vue | 125 ++++++------ src/views/data/Product.vue | 56 +++--- src/views/match/manage/index.vue | 23 ++- src/views/order/AddOrder.vue | 135 +++++++------ src/views/parnerOperation/learnMg.vue | 2 - src/views/serve/projectList.vue | 7 +- src/views/shop/addProduct/index.vue | 272 +++++++++++++++++--------- src/views/shop/list/market/index.vue | 134 ++++++++++--- src/views/shop/list/product/index.vue | 71 ++++--- 12 files changed, 551 insertions(+), 329 deletions(-) diff --git a/src/setting.js b/src/setting.js index 5b1b6a7..5f0626c 100644 --- a/src/setting.js +++ b/src/setting.js @@ -9,10 +9,10 @@ let jumpPath = `${location.origin}/judgmentPoint` let host = `${location.origin}/` if (isDev) { jumpPath = 'http://192.168.31.125:8087/' // 本地调试-需要启动本地判分点系统 -// host = 'http://121.37.12.51/' + host = 'http://121.37.12.51/' // host = 'https://huorantech.cn/' -// host = 'http://192.168.31.151:9000/'// 榕 - host = 'http://192.168.31.52:9000/'// 赓 + // host = 'http://192.168.31.151:9000/'// 榕 + // host = 'http://192.168.31.52:9000/'// 赓 } else if (isPro) { jumpPath = 'https://www.huorantech.cn/judgmentPoint/' } @@ -45,7 +45,7 @@ const Setting = { isDev, isPro, // 是否使用动态路由 - dynamicRoute: false, + dynamicRoute: true, /** * @description 默认密码 */ diff --git a/src/utils/api.js b/src/utils/api.js index 05e55e1..8e61dba 100644 --- a/src/utils/api.js +++ b/src/utils/api.js @@ -139,6 +139,7 @@ export default { isShelves: `nakadai/nakadai/curriculum/isShelves`, //上下架课程 getInternalProjectBySystemId: `occupationlab/occupationlab/projectManage/getInternalProjectBySystemId`, //根据系统id、项目权限获取系统内置项目 checkConfig: `nakadai/nakadai/curriculum/checkConfig`, + deleteCoursePrompt: `nakadai/nakadai/curriculum/deleteCoursePrompt`, // 课程章节管理 addChapter: `nakadai/nakadai/curriculum/chapter/addChapter`, //添加章节 editChapter: `nakadai/nakadai/curriculum/chapter/editChapter`, //修改章节 @@ -239,6 +240,7 @@ export default { updateProduct: `data/data/product/update`, saveRecord: `data/data/dataRecord/saveRecord`, getAllTableIdBycategoryId: `data/data/product/getAllTableIdBycategoryId`, + deleteDataPrompt: `data/data/product/deleteDataPrompt`, // 关键词 addKeyword: `data/data/keyword/addKeyword`, diff --git a/src/views/course/Curriculum.vue b/src/views/course/Curriculum.vue index 496fb2f..a442781 100644 --- a/src/views/course/Curriculum.vue +++ b/src/views/course/Curriculum.vue @@ -245,16 +245,19 @@ export default { }, // 删除 handleDelete(row) { - this.$confirm("确定要删除吗?", "提示", { - type: "warning" - }).then(() => { + this.$post(`${this.api.deleteCoursePrompt}?cids=${row.cid}`).then(({ status }) => { + if (status === 200) { + this.$confirm("确定要删除吗?", "提示", { + type: "warning" + }).then(() => { this.$post(`${this.api.delCourse}?cids=${row.cid}`).then(res => { - this.getData(); - this.$message.success("删除成功"); - }).catch(err => { - }); - }).catch(() => { - }); + this.getData(); + this.$message.success("删除成功"); + }).catch(err => {}) + }).catch(() => { + }); + } + }).catch(err => {}) }, // 处理多选 handleSelectionChange(val) { @@ -262,12 +265,18 @@ export default { }, // 批量删除 delAllSelection() { - if (this.multipleSelection.length) { + if (this.multipleSelection.length) { + let cids = [] + this.multipleSelection.forEach(i => { + cids.push('cids=' + i.cid) + }); + this.$post(`${this.api.deleteCoursePrompt}?${cids.join('&')}`).then(({ status }) => { + if (status === 200) { this.$confirm("确定要删除吗?", "提示", { type: "warning" }).then(() => { let ids = this.multipleSelection.map(i => i.cid); - this.$post(`${this.api.delCourse}?cids=${ids.toString()}`).then(res => { + this.$post(`${this.api.delCourse}?cids=${ids.toString()}`).then(res => { if(ids.length == this.courseData.length){ if(this.pageNo > 1){ this.pageNo = this.pageNo-1 @@ -276,13 +285,13 @@ export default { this.getData(); this.$message.success("删除成功"); this.$refs.table.clearSelection() - }).catch(err => { - }); - }).catch(() => { - }); - } else { - this.$message.warning("请先选择课程 !"); - } + }).catch(err => {}) + }).catch(() => {}) + } + }).catch(err => {}) + } else { + this.$message.warning("请先选择课程 !"); + } }, // 处理页码切换 handleCurrentChange(val) { diff --git a/src/views/customer/AddCustomer.vue b/src/views/customer/AddCustomer.vue index 870822a..72b1f02 100644 --- a/src/views/customer/AddCustomer.vue +++ b/src/views/customer/AddCustomer.vue @@ -23,7 +23,7 @@ - + @@ -86,9 +86,9 @@
- + - +