From 190c26f2a72ef1c59715451a719cb5a00067f764 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=97=AB=E6=99=93=E8=8C=B9?= <1935832701@qq.com> Date: Thu, 27 Apr 2023 11:05:00 +0800 Subject: [PATCH 01/19] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/trainingCategory.js | 44 + src/api/system/trainingItem.js | 68 + src/api/system/trainingOrder.js | 68 + src/views/system/trainingCategory/index.vue | 438 ++++++ src/views/system/trainingItem/index.vue | 1440 +++++++++++++++++++ src/views/system/trainingOrder/index.vue | 779 ++++++++++ 6 files changed, 2837 insertions(+) create mode 100644 src/api/system/trainingCategory.js create mode 100644 src/api/system/trainingItem.js create mode 100644 src/api/system/trainingOrder.js create mode 100644 src/views/system/trainingCategory/index.vue create mode 100644 src/views/system/trainingItem/index.vue create mode 100644 src/views/system/trainingOrder/index.vue diff --git a/src/api/system/trainingCategory.js b/src/api/system/trainingCategory.js new file mode 100644 index 0000000..c2a7fb9 --- /dev/null +++ b/src/api/system/trainingCategory.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询学习培训分类列表 +export function listTrainingCategory(query) { + return request({ + url: '/system/trainingCategory/list', + method: 'get', + params: query + }) +} + +// 查询学习培训分类详细 +export function getTrainingCategory(id) { + return request({ + url: '/system/trainingCategory/' + id, + method: 'get' + }) +} + +// 新增学习培训分类 +export function addTrainingCategory(data) { + return request({ + url: '/system/trainingCategory/add', + method: 'post', + data: data + }) +} + +// 修改学习培训分类 +export function updateTrainingCategory(data) { + return request({ + url: '/system/trainingCategory/edit', + method: 'post', + data: data + }) +} + +// 删除学习培训分类 +export function delTrainingCategory(id) { + return request({ + url: '/system/trainingCategory/' + id, + method: 'delete' + }) +} diff --git a/src/api/system/trainingItem.js b/src/api/system/trainingItem.js new file mode 100644 index 0000000..137ea15 --- /dev/null +++ b/src/api/system/trainingItem.js @@ -0,0 +1,68 @@ +import request from '@/utils/request' + +// 查询学习培训项目信息列表 +export function listTrainingItem(query) { + return request({ + url: '/system/trainingItem/list', + method: 'get', + params: query + }) +} +export function listTrainingCategory(query) { + return request({ + url: '/system/trainingCategory/list', + method: 'get', + params: query + }) +} +// 父级项目组 +export function selectTrainingParent(query) { + return request({ + url: '/system/trainingItem/selectTrainingParent', + method: 'get', + params: query + }) +} +// 修改上下架 +export function updateTrainingShelfFlag(data) { + return request({ + url: '/system/trainingItem/updateTrainingShelfFlag', + method: 'post', + data: data + + }) +} + +// 查询学习培训项目信息详细 +export function getTrainingItem(id) { + return request({ + url: '/system/trainingItem/' + id, + method: 'get' + }) +} + +// 新增学习培训项目信息 +export function addTrainingItem(data) { + return request({ + url: '/system/trainingItem/add', + method: 'post', + data: data + }) +} + +// 修改学习培训项目信息 +export function updateTrainingItem(data) { + return request({ + url: '/system/trainingItem/edit', + method: 'post', + data: data + }) +} + +// 删除学习培训项目信息 +export function delTrainingItem(id) { + return request({ + url: '/system/trainingItem/' + id, + method: 'delete' + }) +} diff --git a/src/api/system/trainingOrder.js b/src/api/system/trainingOrder.js new file mode 100644 index 0000000..0954095 --- /dev/null +++ b/src/api/system/trainingOrder.js @@ -0,0 +1,68 @@ +import request from '@/utils/request' + +// 查询学习培训订单主列表 +export function listTrainingOrder(query) { + return request({ + url: '/system/trainingOrder/list', + method: 'get', + params: query + }) +} +// 查看视频 +export function orderItemDirectory(id) { + return request({ + url: `/system/trainingOrder/orderItemDirectory?trainingOrderDetailsId=${id}`, + method: 'get', + + }) +} + +// 查询学习培训订单主详细 +export function getTrainingOrder(id) { + return request({ + url: '/system/trainingOrder/' + id, + method: 'get' + }) +} +// 确定按钮 +export function xylWeChatRefundNotify(data) { + return request({ + url: '/nurseApp/weChatPayment/weChatRefundOrderApply', + method: 'post', + data: data + }) +} +// 退款 +export function refundInformation(id) { + return request({ + url: `/system/trainingOrder/refundInformation` + `?id=${id}`, + method: 'get', + }) +} + + +// 新增学习培训订单主 +export function addTrainingOrder(data) { + return request({ + url: '/system/trainingOrder/add', + method: 'post', + data: data + }) +} + +// 修改学习培训订单主 +export function updateTrainingOrder(data) { + return request({ + url: '/system/trainingOrder/edit', + method: 'post', + data: data + }) +} + +// 删除学习培训订单主 +export function delTrainingOrder(id) { + return request({ + url: '/system/trainingOrder/' + id, + method: 'delete' + }) +} diff --git a/src/views/system/trainingCategory/index.vue b/src/views/system/trainingCategory/index.vue new file mode 100644 index 0000000..d0d6d68 --- /dev/null +++ b/src/views/system/trainingCategory/index.vue @@ -0,0 +1,438 @@ + + + + + \ No newline at end of file diff --git a/src/views/system/trainingItem/index.vue b/src/views/system/trainingItem/index.vue new file mode 100644 index 0000000..b50dcc5 --- /dev/null +++ b/src/views/system/trainingItem/index.vue @@ -0,0 +1,1440 @@ + + + + \ No newline at end of file diff --git a/src/views/system/trainingOrder/index.vue b/src/views/system/trainingOrder/index.vue new file mode 100644 index 0000000..98c7258 --- /dev/null +++ b/src/views/system/trainingOrder/index.vue @@ -0,0 +1,779 @@ + + + + \ No newline at end of file From c8b434a69d2a4af806fe998eea12292bbd3f4766 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=97=AB=E6=99=93=E8=8C=B9?= <1935832701@qq.com> Date: Thu, 27 Apr 2023 14:28:50 +0800 Subject: [PATCH 02/19] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/trainingItem/index.vue | 79 ++++++++++++------------ src/views/system/trainingOrder/index.vue | 15 +++-- 2 files changed, 51 insertions(+), 43 deletions(-) diff --git a/src/views/system/trainingItem/index.vue b/src/views/system/trainingItem/index.vue index b50dcc5..c161e64 100644 --- a/src/views/system/trainingItem/index.vue +++ b/src/views/system/trainingItem/index.vue @@ -357,7 +357,7 @@ /> - - + --> {{ form.trainingParentName }} - {{ form.trainingCategoryName }} - + --> @@ -861,7 +861,7 @@ export default { idd: 1, innerVisiblepd: false, loading: true, - innerVisible: false, + // innerVisible: false, trainingParentqueryParams: { pageNum: 1, pageSize: 10, @@ -1113,15 +1113,16 @@ export default { console.log(item); this.imgsurl.pictureUrlList.push(item); }, - addresetQuerylist() { - this.trainingCategoryqueryParams = { - pageNum: 1, - pageSize: 10, - trainingCategoryCode: "", - trainingCategoryName: "", - }; - this.info(); - }, + // 重置 + // addresetQuerylist() { + // this.trainingCategoryqueryParams = { + // pageNum: 1, + // pageSize: 10, + // trainingCategoryCode: "", + // trainingCategoryName: "", + // }; + // this.info(); + // }, // 重置 resetQuerylist() { this.trainingParentqueryParams = { @@ -1133,42 +1134,42 @@ export default { this.trainingParentinfo(); }, // 培训分类 - clickitem() { - this.info(); - this.innerVisible = true; - }, + // clickitem() { + // this.info(); + // this.innerVisible = true; + // }, // 父级课程组 trainingParentitem() { this.trainingParentinfo(); this.innerVisiblepd = true; }, - innerVisiblecancelzx() { - this.innerVisible = false; - }, + // innerVisiblecancelzx() { + // this.innerVisible = false; + // }, innerVisiblecancelpd() { this.innerVisiblepd = false; }, - nurseclick(row) { - this.form.trainingCategoryId = row.id; - this.form.trainingCategoryName = row.trainingCategoryName; - this.innerVisible = false; - }, + // nurseclick(row) { + // this.form.trainingCategoryId = row.id; + // this.form.trainingCategoryName = row.trainingCategoryName; + // this.innerVisible = false; + // }, // 父级课程组 trainingParentitemlist(row) { this.form.trainingParentId = row.id; this.form.trainingParentName = row.trainingParentName; this.innerVisiblepd = false; }, - info() { - this.loading = true; - listTrainingCategory(this.trainingCategoryqueryParams).then( - (response) => { - this.trainingCategoryList = response.rows; - this.total2 = response.total; - this.loading = false; - } - ); - }, + // info() { + // this.loading = true; + // listTrainingCategory(this.trainingCategoryqueryParams).then( + // (response) => { + // this.trainingCategoryList = response.rows; + // this.total2 = response.total; + // this.loading = false; + // } + // ); + // }, // 父级课程组 trainingParentinfo() { this.loading = true; @@ -1182,6 +1183,7 @@ export default { imgUrl(imgUrl) { this.form.trainingCategoryPictureUrl = imgUrl; }, + // 图片 imgUrl2(imgUrl) { this.form.trainingItemCoverUrl = imgUrl; }, @@ -1189,6 +1191,7 @@ export default { console.log(imgUrl); this.form.trainingItemPosterUrl = imgUrl; }, + //上架 uptrainingShelfFlag(row) { console.log(row); if (row.trainingShelfFlag == false) { diff --git a/src/views/system/trainingOrder/index.vue b/src/views/system/trainingOrder/index.vue index 98c7258..d41bc1c 100644 --- a/src/views/system/trainingOrder/index.vue +++ b/src/views/system/trainingOrder/index.vue @@ -349,10 +349,16 @@ label-width="130px" :model="formlist" > - +
{{ formlist.trainingItemDetails }}
- + - @@ -372,9 +377,9 @@ alt /> - { this.formlist.list = response.rows; this.loading = false; From c2907a03cd7dae6982d4f6c38f0240a066dcecba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=97=AB=E6=99=93=E8=8C=B9?= <1935832701@qq.com> Date: Thu, 27 Apr 2023 16:52:53 +0800 Subject: [PATCH 03/19] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/stationAvatar/index.vue | 143 +++++++++++++++++------ 1 file changed, 105 insertions(+), 38 deletions(-) diff --git a/src/views/system/stationAvatar/index.vue b/src/views/system/stationAvatar/index.vue index 896a540..72660b4 100644 --- a/src/views/system/stationAvatar/index.vue +++ b/src/views/system/stationAvatar/index.vue @@ -25,7 +25,6 @@ " > -
请上传图片为800x800px的正方形
@@ -109,8 +112,9 @@ @click="rotateRight()" > --> - - 提 交 + + 提 交 + 提 交 中...
@@ -123,15 +127,18 @@ import baseurl from "@/api/baseurl.js"; import { updateNurseStationHeads, posts, - updatePoserHeads + uploadVideoUrl, + uploadTrainingCategoryPicture, + updatePoserHeads, + uploadUrl } from "@/api/system/stationAvatar.js"; export default { components: { VueCropper }, - props: ["img", "type", "item", "tovideo"], data() { return { + uploadbtn: true, //上传中不允许点击 imageUrl: "", types: "", // 是否显示弹出层 @@ -175,7 +182,7 @@ export default { } else { this.options.img = baseurl + this.img; } - if (this.types == "posterVideoUrl") { + if (this.types == "posterVideoUrl" || this.types == "itemDirectoryUrl") { this.title = "上传视频"; } else { this.title = "上传图片"; @@ -233,7 +240,7 @@ export default { }, // 上传预处理 beforeUpload(file) { - if (this.types == "posterVideoUrl") { + if (this.types == "posterVideoUrl" || this.types == "itemDirectoryUrl") { const reader = new FileReader(); this.previews.data = file; this.previews.url = URL.createObjectURL(file); @@ -260,50 +267,110 @@ export default { }, // 上传图片 uploadImg() { + this.uploadbtn = true; let formData = new FormData(); if (this.previews.data) { formData.append("file", this.previews.data); formData.append("type", this.types); - if (this.types == "posterVideoUrl") { + if (this.types == "itemDirectoryUrl") { + this.$modal.msgSuccess("上传视频中,请耐心等待"); + this.uploadbtn = false; + uploadVideoUrl(formData).then(response => { + if (response.code == 200) { + this.video.VideoPath = baseurl + response.imgUrl; + this.$emit("imgUrl", response.imgUrl); + this.items.itemDirectoryUrl = response.imgUrl; + this.$emit("item", JSON.stringify(this.items)); + this.openimg = false; + } else { + setTimeout(e => { + this.openimg = false; + }, 1000); + } + this.uploadbtn = true; + }); + } else if ( + this.types == "trainingItemCoverUrl" || + this.types == "trainingItemContentUrl" || + this.types == "trainingItemPosterUrl" + ) { + uploadUrl(formData).then(response => { + if (response.code == 200) { + this.options.img = baseurl + response.imgUrl; + this.$emit("imgUrl", response.imgUrl); + this.openimg = false; + } else { + setTimeout(e => { + this.openimg = false; + }, 1000); + } + }); + } else if (this.types == "trainingCategoryPictureUrl") { + uploadTrainingCategoryPicture(formData).then(response => { + if (response.code == 200) { + this.options.img = baseurl + response.imgUrl; + this.$emit("imgUrl", response.imgUrl); + this.openimg = false; + } else { + setTimeout(e => { + this.openimg = false; + }, 1000); + } + }); + } else if (this.types == "posterVideoUrl") { updatePoserHeads(formData).then(response => { - this.video.VideoPath = baseurl + response.imgUrl; - this.$emit("imgUrl", response.imgUrl); - this.openimg = false; + if (response.code == 200) { + this.video.VideoPath = baseurl + response.imgUrl; + this.$emit("imgUrl", response.imgUrl); + this.openimg = false; + } else { + setTimeout(e => { + this.openimg = false; + }, 1000); + } }); } else { updateNurseStationHeads(formData).then(response => { - this.options.img = baseurl + response.imgUrl; - this.$emit("imgUrl", response.imgUrl); - if (this.types == "attributePitureUrl") { - this.items.attributePitureUrl = response.imgUrl; - this.$emit("item", JSON.stringify(this.items)); + if (response.code == 200) { + this.options.img = baseurl + response.imgUrl; + this.$emit("imgUrl", response.imgUrl); + if (this.types == "attributePitureUrl") { + this.items.attributePitureUrl = response.imgUrl; + this.$emit("item", JSON.stringify(this.items)); + } + if (this.types == "nurseItemClassifyUrl") { + this.items.classifyPictureUrl = response.imgUrl; + this.$emit("item", JSON.stringify(this.items)); + } + if (this.types == "nurseStationClassifyUrl") { + this.items.classifyPictureUrl = response.imgUrl; + this.$emit("item", JSON.stringify(this.items)); + } + if (this.types == "posterPictureUrl") { + this.items.posterPictureUrl = response.imgUrl; + this.$emit("item", JSON.stringify(this.items)); + } + if (this.types == "certificateUrl") { + this.items.certificateUrl = response.imgUrl; + this.$emit("item", JSON.stringify(this.items)); + } + if (this.types == "personCertificateUrl") { + this.items.certificateUrl = response.imgUrl; + this.$emit("item", JSON.stringify(this.items)); + } + this.openimg = false; + } else { + setTimeout(e => { + this.openimg = false; + }, 1000); } - if (this.types == "nurseItemClassifyUrl") { - this.items.classifyPictureUrl = response.imgUrl; - this.$emit("item", JSON.stringify(this.items)); - } - if (this.types == "nurseStationClassifyUrl") { - this.items.classifyPictureUrl = response.imgUrl; - this.$emit("item", JSON.stringify(this.items)); - } - if (this.types == "posterPictureUrl") { - this.items.posterPictureUrl = response.imgUrl; - this.$emit("item", JSON.stringify(this.items)); - } - if (this.types == "certificateUrl") { - this.items.certificateUrl = response.imgUrl; - this.$emit("item", JSON.stringify(this.items)); - } - if (this.types == "personCertificateUrl") { - this.items.certificateUrl = response.imgUrl; - this.$emit("item", JSON.stringify(this.items)); - } - this.openimg = false; }); } } else { this.openimg = false; } + this.videoForm.showVideoPath = null; + this.previews.data = null; }, // 实时预览 realTime(data) { From 0f78ff427285ae374d25871f1b0161db1599d8e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=97=AB=E6=99=93=E8=8C=B9?= <1935832701@qq.com> Date: Thu, 27 Apr 2023 16:56:42 +0800 Subject: [PATCH 04/19] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/trainingItem/index.vue | 15 ++++++++++----- src/views/system/trainingOrder/index.vue | 6 ++++-- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/views/system/trainingItem/index.vue b/src/views/system/trainingItem/index.vue index c161e64..a50beff 100644 --- a/src/views/system/trainingItem/index.vue +++ b/src/views/system/trainingItem/index.vue @@ -1093,7 +1093,6 @@ export default { // 章节视频 itemDirectoryUrl(item) { let items = JSON.parse(item); - console.log(items); if (items.idd && !items.trainingItemDirectoryId) { this.form.trainingItemDirectoryList.forEach((e) => { if (e.idd == items.idd) { @@ -1298,7 +1297,7 @@ export default { }, /** 重置按钮操作 */ resetQuery() { - this.queryParams.trainingItemType=''; + this.queryParams.trainingItemType = ""; this.resetForm("queryForm"); this.handleQuery(); }, @@ -1403,11 +1402,14 @@ export default { }, /** 删除按钮操作 */ handleDelete(row) { - console.log(row) + console.log(row); const ids = row.id || this.ids; - const trainingItemTitles = row.trainingItemTitle || this.trainingItemTitles; + const trainingItemTitles = + row.trainingItemTitle || this.trainingItemTitles; this.$modal - .confirm('是否确认删除培训课程名称为"' + trainingItemTitles + '"的数据项?') + .confirm( + '是否确认删除培训课程名称为"' + trainingItemTitles + '"的数据项?' + ) .then(function () { return delTrainingItem(ids); }) @@ -1437,6 +1439,9 @@ export default { // height: 208px !important; background: none; } +::v-deep .wihi:hover:after { + transform: translate(0%,30%); +} ::v-deep .video-avatar { transform: translateX(-25%); } diff --git a/src/views/system/trainingOrder/index.vue b/src/views/system/trainingOrder/index.vue index d41bc1c..018fa83 100644 --- a/src/views/system/trainingOrder/index.vue +++ b/src/views/system/trainingOrder/index.vue @@ -24,14 +24,14 @@ @keyup.enter.native="handleQuery" />
- + { + console.log(response) this.form = response.data; this.form.trainingOrderDetailsList = response.data.trainingOrderDetailsList; From 660a0d4c5b0ea11fbee2fb0ef10f8cc6085368cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=97=AB=E6=99=93=E8=8C=B9?= <1935832701@qq.com> Date: Thu, 27 Apr 2023 17:00:01 +0800 Subject: [PATCH 05/19] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Editor/index.vue | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/src/components/Editor/index.vue b/src/components/Editor/index.vue index 1e5db86..616fa47 100644 --- a/src/components/Editor/index.vue +++ b/src/components/Editor/index.vue @@ -9,10 +9,10 @@ :show-file-list="false" :headers="headers" style="display: none" + :data="filetype" ref="upload" v-if="this.type == 'url'" - > - + >
@@ -57,10 +57,18 @@ export default { type: String, default: "url", }, + url: { + type: String, + default: "/common/richTextPictureUrl", + }, + // filetypes: { + // type: String, + // default: "", + // }, }, data() { return { - uploadUrl: process.env.VUE_APP_BASE_API + "/common/richTextPictureUrl", // 上传的图片服务器地址 + uploadUrl: process.env.VUE_APP_BASE_API, // 上传的图片服务器地址 headers: { Authorization: "Bearer " + getToken(), }, @@ -82,14 +90,22 @@ export default { [{ color: [] }, { background: [] }], // 字体颜色、字体背景颜色 [{ align: [] }], // 对齐方式 ["clean"], // 清除文本格式 - ["link", "image", "video"], // 链接、图片、视频 + ["link", "image"], // 链接、图片、视频 ], }, placeholder: "请输入内容", readOnly: this.readOnly, }, + filetype: { + type: "", + }, }; }, + created() { + this.uploadUrl = process.env.VUE_APP_BASE_API + this.url; + // console.log(this.url) + // this.filetype.type = this.filetypes; + }, computed: { styles() { let style = {}; @@ -181,9 +197,8 @@ export default { "image", process.env.VUE_APP_BASE_API + res.fileName ); - + console.log(res); this.$emit("imgs", res.fileName); - // 调整光标到最后 quill.setSelection(length + 1); } else { From b17e17e63bfc4447ebd6bc3393fd15fbc8effeea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=97=AB=E6=99=93=E8=8C=B9?= <1935832701@qq.com> Date: Thu, 27 Apr 2023 17:07:49 +0800 Subject: [PATCH 06/19] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/stationAvatar.js | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/src/api/system/stationAvatar.js b/src/api/system/stationAvatar.js index d42ceb0..5bac56b 100644 --- a/src/api/system/stationAvatar.js +++ b/src/api/system/stationAvatar.js @@ -10,8 +10,6 @@ export function updateNurseStationHeads(data) { } //海报视频上传 - - export function updatePoserHeads(data) { return request({ url: '/system/poser/updatePoserHeads', @@ -19,6 +17,28 @@ export function updatePoserHeads(data) { data: data }) } +export function uploadVideoUrl(data) { + return request({ + url: '/system/trainingItem/uploadVideoUrl', + method: 'post', + data: data + }) +} + +export function uploadUrl(data) { + return request({ + url: '/system/trainingItem/uploadUrl', + method: 'post', + data: data + }) +} +export function uploadTrainingCategoryPicture(data) { + return request({ + url: '/system/trainingCategory/uploadTrainingCategoryPicture', + method: 'post', + data: data + }) +} export function posts(data) { return request({ From 39ab955be4318414a870138ed39e1fd00aa248d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=97=AB=E6=99=93=E8=8C=B9?= <1935832701@qq.com> Date: Thu, 27 Apr 2023 17:20:08 +0800 Subject: [PATCH 07/19] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/request.js | 88 ++++++++++++++++++++++---------------------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/src/utils/request.js b/src/utils/request.js index 303a7eb..6431e83 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -12,7 +12,7 @@ let downloadLoadingInstance; export let isRelogin = { show: false }; axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8' - // 创建axios实例 +// 创建axios实例 const service = axios.create({ // axios中请求配置有baseURL选项,表示请求URL公共部分 baseURL: process.env.VUE_APP_BASE_API, @@ -24,7 +24,7 @@ const service = axios.create({ service.interceptors.request.use(config => { // 是否需要设置 token const isToken = (config.headers || {}).isToken === false - // 是否需要防止数据重复提交 + // 是否需要防止数据重复提交 const isRepeatSubmit = (config.headers || {}).repeatSubmit === false if (getToken() && !isToken) { config.headers['Authorization'] = 'Bearer ' + getToken() // 让每个请求携带自定义token 请根据实际情况自行修改 @@ -67,48 +67,48 @@ service.interceptors.request.use(config => { // 响应拦截器 service.interceptors.response.use(res => { - // 未设置状态码则默认成功状态 - const code = res.data.code || 200; - // 获取错误信息 - const msg = errorCode[code] || res.data.msg || errorCode['default'] - // 二进制数据则直接返回 - if (res.request.responseType === 'blob' || res.request.responseType === 'arraybuffer') { - return res.data + // 未设置状态码则默认成功状态 + const code = res.data.code || 200; + // 获取错误信息 + const msg = errorCode[code] || res.data.msg || errorCode['default'] + // 二进制数据则直接返回 + if (res.request.responseType === 'blob' || res.request.responseType === 'arraybuffer') { + return res.data + } + if (code === 401) { + if (!isRelogin.show) { + isRelogin.show = true; + MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', { + confirmButtonText: '重新登录', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + isRelogin.show = false; + store.dispatch('LogOut').then(() => { + location.href = '/index'; + }) + }).catch(() => { + isRelogin.show = false; + }); } - if (code === 401) { - if (!isRelogin.show) { - isRelogin.show = true; - MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', { - confirmButtonText: '重新登录', - cancelButtonText: '取消', - type: 'warning' - }).then(() => { - isRelogin.show = false; - store.dispatch('LogOut').then(() => { - location.href = '/index'; - }) - }).catch(() => { - isRelogin.show = false; - }); - } - return Promise.reject('无效的会话,或者会话已过期,请重新登录。') - } else if (code === 500) { - Message({ - message: msg, - type: 'error' - }) - return Promise.reject(new Error(msg)) - } else if (code === 600) { - return Promise.reject(new Error(msg)) - } else if (code !== 200) { - Notification.error({ - title: msg - }) - return Promise.reject('error') - } else { - return res.data - } - }, + return Promise.reject('无效的会话,或者会话已过期,请重新登录。') + } else if (code === 500) { + Message({ + message: msg, + type: 'error' + }) + return res.data & Promise.reject(new Error(msg)) + } else if (code === 600) { + return Promise.reject(new Error(msg)) + } else if (code !== 200) { + Notification.error({ + title: msg + }) + return Promise.reject('error') + } else { + return res.data + } +}, error => { console.log('err' + error) let { message } = error; @@ -135,7 +135,7 @@ export function download(url, params, filename) { transformRequest: [(params) => { return tansParams(params) }], headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, responseType: 'blob' - }).then(async(data) => { + }).then(async (data) => { const isLogin = await blobValidate(data); if (isLogin) { const blob = new Blob([data]) From 3aed378a087611332f17cd015b107ee3873bfc0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=97=AB=E6=99=93=E8=8C=B9?= <1935832701@qq.com> Date: Thu, 27 Apr 2023 17:36:20 +0800 Subject: [PATCH 08/19] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/trainingOrder/index.vue | 178 ++++++++++++++++++++++- 1 file changed, 172 insertions(+), 6 deletions(-) diff --git a/src/views/system/trainingOrder/index.vue b/src/views/system/trainingOrder/index.vue index 018fa83..eeeff6f 100644 --- a/src/views/system/trainingOrder/index.vue +++ b/src/views/system/trainingOrder/index.vue @@ -8,6 +8,11 @@ v-show="showSearch" label-width="100px" > + + + {{ queryParams.nurseStationName }} + + + ] + - +
{{ formlist.trainingItemDetails }}
- + " + prop="trainingItemContent" + v-if=" + formlist.trainingItemType == 'GRAPHIC_LEARNING' || + formlist.trainingItemType == 'LEARNING_ITEM_GROUP' + " + >
+ + + + + + + + + + + 搜索 + 重置 + + + + + + + + + + + + + + @@ -429,7 +547,7 @@ import { import baseurl from "@/api/baseurl.js"; import stationAcatar from "../stationAvatar/index.vue"; import editor from "@/components/Editor"; - +import { getListByUser } from "@/api/system/userlist.js"; export default { name: "TrainingOrder", components: { stationAcatar, editor }, @@ -458,6 +576,8 @@ export default { label: "已取消", }, ], + nurseStationshow: false, + // 遮罩层 loading: true, innerrefund: false, @@ -504,6 +624,10 @@ export default { label: "支付宝小程序", }, ], + getListByUserquery: { + pageNum: 1, + pageSize: 10, + }, // 非单个禁用 single: true, // 非多个禁用 @@ -512,6 +636,7 @@ export default { showSearch: true, // 总条数 total: 0, + stationtotal: 0, // 学习培训订单主表格数据 trainingOrderList: [], // 弹出层标题 @@ -523,7 +648,7 @@ export default { pageNum: 1, pageSize: 10, nurseStationId: null, - trainingOrderAmount:null, + trainingOrderAmount: null, nurseStationPersonId: null, nursePersonName: null, trainingOrderNo: null, @@ -535,6 +660,7 @@ export default { // 表单参数 form: {}, list: [], + nurseStationlist: [], trainingOrderDetailsList: [], // 表单校验 rules: {}, @@ -545,6 +671,35 @@ export default { this.baseurl = baseurl; }, methods: { + //页面所属护理站 + ParamsStation(item) { + this.info(); + this.nurseStationshow = true; + }, + //护理站list + info() { + getListByUser(this.getListByUserquery).then((res) => { + this.nurseStationlist = res.rows; + this.stationtotal = res.total; + }); + }, + clicknurseStationshow() { + this.nurseStationshow = false; + }, + //护理站重置 + stationcancel() { + this.getListByUserquery = { + pageNum: 1, + pageSize: 10, + }; + this.info(); + }, + //护理站页面选择护理站 + choicestationid(item) { + this.queryParams.nurseStationName = item.nurseStationName; + this.queryParams.nurseStationId = item.id; + this.nurseStationshow = false; + }, // 章节视频 itemDirectoryUrl(item) { let items = JSON.parse(item); @@ -654,6 +809,10 @@ export default { /** 重置按钮操作 */ resetQuery() { this.resetForm("queryForm"); + this.queryParams = { + pageNum: 1, + pageSize: 10, + }; this.handleQuery(); }, // 多选框选中数据 @@ -673,7 +832,7 @@ export default { this.reset(); const id = row.id || this.ids; getTrainingOrder(id).then((response) => { - console.log(response) + console.log(response); this.form = response.data; this.form.trainingOrderDetailsList = response.data.trainingOrderDetailsList; @@ -764,6 +923,13 @@ export default { padding: 0 15px; border: 1px solid #e6ebf5; } +.stationbtn { + width: 208px; + text-align: left; + height: 32px; + overflow: hidden; + font-size: 14px; +} .textdetails { width: 600px; // height: 300px; From 0c514af1a0312caf5daef13ad57245b95be8ac07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=97=AB=E6=99=93=E8=8C=B9?= <1935832701@qq.com> Date: Fri, 28 Apr 2023 09:25:45 +0800 Subject: [PATCH 09/19] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/trainingOrder/index.vue | 160 ++++++----------------- 1 file changed, 39 insertions(+), 121 deletions(-) diff --git a/src/views/system/trainingOrder/index.vue b/src/views/system/trainingOrder/index.vue index eeeff6f..d2b29c9 100644 --- a/src/views/system/trainingOrder/index.vue +++ b/src/views/system/trainingOrder/index.vue @@ -9,9 +9,18 @@ label-width="100px" > - - {{ queryParams.nurseStationName }} - + + + - - - - - - - - - - - 搜索 - 重置 - - - - - - - - - - - - - - @@ -628,6 +544,7 @@ export default { pageNum: 1, pageSize: 10, }, + handstationlist: [], //页面搜索list // 非单个禁用 single: true, // 非多个禁用 @@ -668,37 +585,30 @@ export default { }, created() { this.getList(); + this.infos(); + this.info(); this.baseurl = baseurl; }, methods: { //页面所属护理站 - ParamsStation(item) { - this.info(); - this.nurseStationshow = true; - }, - //护理站list + //权限列表 info() { - getListByUser(this.getListByUserquery).then((res) => { + getListByUser(this.queryParams).then(res => { + this.total = res.total; this.nurseStationlist = res.rows; - this.stationtotal = res.total; + this.queryParams.nurseStationId = res.rows[0].id; + this.getList(); + // this.handleQuery(); }); }, - clicknurseStationshow() { - this.nurseStationshow = false; - }, - //护理站重置 - stationcancel() { - this.getListByUserquery = { + infos() { + var queryFor = { pageNum: 1, - pageSize: 10, + pageSize: 9999 }; - this.info(); - }, - //护理站页面选择护理站 - choicestationid(item) { - this.queryParams.nurseStationName = item.nurseStationName; - this.queryParams.nurseStationId = item.id; - this.nurseStationshow = false; + getListByUser(queryFor).then(res => { + this.handstationlist = res.rows; + }); }, // 章节视频 itemDirectoryUrl(item) { @@ -801,6 +711,7 @@ export default { }; this.resetForm("form"); }, + /** 搜索按钮操作 */ handleQuery() { this.queryParams.pageNum = 1; @@ -809,10 +720,17 @@ export default { /** 重置按钮操作 */ resetQuery() { this.resetForm("queryForm"); - this.queryParams = { - pageNum: 1, - pageSize: 10, - }; + if (this.nurseStationlist[0]) { + this.queryParams.pageNum = 1; + this.queryParams.pageSize = 10; + this.queryParams.nursePersonName=null; + this.queryParams.trainingOrderNo=null; + this.queryParams.trainingOrderStatus=null; + } + // this.queryParams = { + // pageNum: 1, + // pageSize: 10, + // }; this.handleQuery(); }, // 多选框选中数据 From 5114554e4d37756dab87efba94b8c1b2504e562d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=97=AB=E6=99=93=E8=8C=B9?= <1935832701@qq.com> Date: Fri, 28 Apr 2023 11:37:53 +0800 Subject: [PATCH 10/19] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/trainingItem/index.vue | 156 ++++++++++++++++-------- 1 file changed, 105 insertions(+), 51 deletions(-) diff --git a/src/views/system/trainingItem/index.vue b/src/views/system/trainingItem/index.vue index a50beff..cbd3cce 100644 --- a/src/views/system/trainingItem/index.vue +++ b/src/views/system/trainingItem/index.vue @@ -749,19 +749,28 @@ placeholder="请输入报名须知" /> - - - - - + + + + + + + +