This commit is contained in:
曹辉 2023-05-04 14:45:41 +08:00
parent 297c4ee1fa
commit 9589551b14
13 changed files with 578 additions and 524 deletions

View File

@ -1,3 +0,0 @@
var baseurl = "http://192.168.16.30:8080";
export default baseurl

View File

@ -14,7 +14,6 @@ import {
} from "@/api/system/goodsCategory";
import editor from "@/components/Editor";
import stationAcatar from "../stationAvatar/index.vue";
import baseurl from "@/api/baseurl.js";
let id = 0;
export default {
@ -415,9 +414,9 @@ export default {
updatePicture(obj).then((res) => {});
}
if (response.code == 200) {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
}
});
} else {
@ -427,10 +426,10 @@ export default {
// this.nurseStationId=this.form.nurseStationId
addGoodsInfo(this.form).then((response) => {
if (response.code == 200) {
this.$modal.msgSuccess("新增成功");
this.StationName = "请选择所属护理站";
this.open = false;
this.getList();
this.$modal.msgSuccess("新增成功");
this.StationName = "请选择所属护理站";
this.open = false;
this.getList();
}
});
}

View File

@ -234,7 +234,6 @@ import {
getStationCategoryList
} from "@/api/system/goodsCategory";
import stationAcatar from "../stationAvatar/index.vue";
import baseurl from "@/api/baseurl";
let id = 0;
export default {
name: "GoodsCategory",
@ -266,7 +265,7 @@ export default {
}
},
imgone: "",
baseurl: "",
baseurl: process.env.VUE_APP_BASE_API,
//
loading: true,
//
@ -328,7 +327,6 @@ export default {
watch: {},
created() {
this.baseurl = baseurl;
this.getList();
this.info();
},

View File

@ -106,7 +106,6 @@
<script>
import { VueCropper } from "vue-cropper";
import baseurl from "@/api/baseurl.js";
import { updateNurseStationHeads, posts } from "@/api/system/stationAvatar.js";
export default {
@ -149,7 +148,7 @@ export default {
} else if (this.img == "") {
this.options.img = null;
} else {
this.options.img = baseurl + this.img;
this.options.img = process.env.VUE_APP_BASE_API + this.img;
}
},
watch: {
@ -160,7 +159,7 @@ export default {
} else if (this.img == "") {
this.options.img = null;
} else {
this.options.img = baseurl + this.img;
this.options.img = process.env.VUE_APP_BASE_API + this.img;
}
},
},
@ -215,7 +214,7 @@ export default {
formData.append("file", data);
formData.append("type", this.types);
updateNurseStationHeads(formData).then((response) => {
this.options.img = baseurl + response.imgUrl;
this.options.img = process.env.VUE_APP_BASE_API + response.imgUrl;
this.$emit("imgUrl", response.imgUrl);
this.openimg = false;
});

View File

@ -14,7 +14,6 @@ import {
} from "@/api/system/goodsCategory";
import { getListByUser } from "@/api/system/userlist.js";
import stationAcatar from "../stationAvatar/index.vue";
import baseurl from "@/api/baseurl.js";
export default {
components: { stationAcatar, editor },
@ -430,10 +429,10 @@ export default {
this.imgsurl = { pictureUrlList: [] };
++this.isResouceShow;
if (response.code == 200) {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
}
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
}
});
} else {
this.form.goodDetailsLists.forEach((e) => {
@ -442,10 +441,10 @@ export default {
addGoodsInfo(this.form).then((response) => {
++this.isResouceShow;
if (response.code == 200) {
this.$modal.msgSuccess("新增成功");
// this.StationName = "请选择所属护理站";
this.open = false;
this.getList();
this.$modal.msgSuccess("新增成功");
// this.StationName = "请选择所属护理站";
this.open = false;
this.getList();
}
});
}

View File

@ -489,13 +489,12 @@ import {
selectOrderEvaluate
} from "@/api/system/goodsOrder";
import { getListByUser } from "@/api/system/userlist.js";
import baseurl from "@/api/baseurl.js";
export default {
name: "GoodsOrder",
data() {
return {
baseurl: null,
baseurl: process.env.VUE_APP_BASE_API,
//
innerorder: false,
//
@ -615,7 +614,6 @@ export default {
};
},
created() {
this.baseurl = baseurl;
this.info();
this.infos();
},

View File

@ -387,14 +387,13 @@ import {
getPersonInfo
} from "@/api/system/order";
import { getListByUser } from "@/api/system/userlist.js";
import baseurl from "@/api/baseurl.js";
export default {
name: "order",
data() {
return {
map: null,
baseurl: null,
baseurl: process.env.VUE_APP_BASE_API,
orderStatuslist: [
{
value: "WAIT_PAY",
@ -501,7 +500,6 @@ export default {
};
},
created() {
this.baseurl = baseurl;
this.info();
this.infos();
},

View File

@ -12,7 +12,6 @@ import {
import { getToken } from "@/utils/auth";
import { getListByUser } from "@/api/system/userlist.js";
import stationAcatar from "../stationAvatar/index.vue";
import baseurl from '@/api/baseurl'
export default {
components: { stationAcatar },
name: "Person",
@ -38,7 +37,7 @@ export default {
cb(new Error("请输入正确的联系电话"));
};
return {
baseurl: null,
baseurl: process.env.VUE_APP_BASE_API,
//男女选择
positionalTitleLevellist: [{
label: "初级",
@ -58,22 +57,22 @@ export default {
value: "NOT_CHECK",
}],
sexs: [{
label: "男",
value: "MALE",
},
{
label: "女",
value: "FEMALE",
},
label: "男",
value: "MALE",
},
{
label: "女",
value: "FEMALE",
},
],
nursePersonTypes: [{
label: "护士",
value: "NURSE",
},
{
label: "护理师",
value: "NURSE_TEACHER",
},
label: "护士",
value: "NURSE",
},
{
label: "护理师",
value: "NURSE_TEACHER",
},
],
innerVisible: false,
innerVisible2: false,
@ -202,7 +201,7 @@ export default {
validator: checkMobile2,
message: "",
trigger: "blur",
},],
}, ],
address: [
{ required: true, message: "居住地址不能为空", trigger: "blur" },
],
@ -210,7 +209,6 @@ export default {
};
},
created() {
this.baseurl = baseurl
this.infos();
this.info();
},
@ -238,7 +236,7 @@ export default {
this.form.nurseStationPersonCertificateList.push(obj);
}
},
imgUrl(imgUrl) { },
imgUrl(imgUrl) {},
//接收图片所属的item
imgclassifyItem(item) {
let items = JSON.parse(item);
@ -554,14 +552,14 @@ export default {
const ids = row.id || this.ids;
this.$modal
.confirm("是否确认删除护理站人员信息的数据项?")
.then(function () {
.then(function() {
return delPerson(ids);
})
.then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
})
.catch(() => { });
.catch(() => {});
},
/** 导入按钮操作 */
handleImport() {
@ -603,8 +601,8 @@ export default {
handleExport() {
this.download(
"system/person/export", {
...this.queryParams,
},
...this.queryParams,
},
`person_${new Date().getTime()}.xlsx`
);
},

View File

@ -518,7 +518,6 @@
</template>
<script>
import baseurl from "@/api/baseurl.js";
import {
listPoser,
getPoser,
@ -681,7 +680,7 @@ export default {
};
},
created() {
this.videourl = baseurl + "/system/station/updateNurseStationHeads";
this.videourl = process.env.VUE_APP_BASE_API + "/system/station/updateNurseStationHeads";
this.info();
this.PosterImageJump();
},
@ -867,7 +866,7 @@ export default {
this.objitem.push(imgUrlData.posterPictureUrl);
},
imgUrl2(imgUrl) {
this.videoForm.showVideoPath = baseurl + imgUrl;
this.videoForm.showVideoPath = process.env.VUE_APP_BASE_API + imgUrl;
this.form.posterVideoUrl = imgUrl;
},
/** 查询泉医到家系统海报模块信息(包含咨询简介信息)列表 */

View File

@ -123,7 +123,6 @@
<script>
import { VueCropper } from "vue-cropper";
import baseurl from "@/api/baseurl.js";
import {
updateNurseStationHeads,
posts,
@ -173,14 +172,14 @@ export default {
} else if (this.tovideo == "") {
this.video.VideoPath = null;
} else {
this.video.VideoPath = baseurl + this.tovideo;
this.video.VideoPath = process.env.VUE_APP_BASE_API + this.tovideo;
}
if (this.img == null) {
this.options.img = null;
} else if (this.img == "") {
this.options.img = null;
} else {
this.options.img = baseurl + this.img;
this.options.img = process.env.VUE_APP_BASE_API + this.img;
}
if (this.types == "posterVideoUrl" || this.types == "itemDirectoryUrl") {
this.title = "上传视频";
@ -204,7 +203,7 @@ export default {
} else if (this.img == "") {
this.options.img = null;
} else {
this.options.img = baseurl + this.img;
this.options.img = process.env.VUE_APP_BASE_API + this.img;
}
}
},
@ -277,7 +276,7 @@ export default {
this.uploadbtn = false;
uploadVideoUrl(formData).then(response => {
if (response.code == 200) {
this.video.VideoPath = baseurl + response.imgUrl;
this.video.VideoPath = process.env.VUE_APP_BASE_API + response.imgUrl;
this.$emit("imgUrl", response.imgUrl);
this.items.itemDirectoryUrl = response.imgUrl;
this.$emit("item", JSON.stringify(this.items));
@ -296,7 +295,7 @@ export default {
) {
uploadUrl(formData).then(response => {
if (response.code == 200) {
this.options.img = baseurl + response.imgUrl;
this.options.img = process.env.VUE_APP_BASE_API + response.imgUrl;
this.$emit("imgUrl", response.imgUrl);
this.openimg = false;
} else {
@ -308,7 +307,7 @@ export default {
} else if (this.types == "trainingCategoryPictureUrl") {
uploadTrainingCategoryPicture(formData).then(response => {
if (response.code == 200) {
this.options.img = baseurl + response.imgUrl;
this.options.img = process.env.VUE_APP_BASE_API + response.imgUrl;
this.$emit("imgUrl", response.imgUrl);
this.openimg = false;
} else {
@ -320,7 +319,7 @@ export default {
} else if (this.types == "posterVideoUrl") {
updatePoserHeads(formData).then(response => {
if (response.code == 200) {
this.video.VideoPath = baseurl + response.imgUrl;
this.video.VideoPath = process.env.VUE_APP_BASE_API + response.imgUrl;
this.$emit("imgUrl", response.imgUrl);
this.openimg = false;
} else {
@ -332,7 +331,7 @@ export default {
} else {
updateNurseStationHeads(formData).then(response => {
if (response.code == 200) {
this.options.img = baseurl + response.imgUrl;
this.options.img = process.env.VUE_APP_BASE_API + response.imgUrl;
this.$emit("imgUrl", response.imgUrl);
if (this.types == "attributePitureUrl") {
this.items.attributePitureUrl = response.imgUrl;

View File

@ -0,0 +1,305 @@
<template>
<div>
<div class="user-info-head" :class="video.VideoPath ? 'wihi' : ''" @click="editCropper()">
<video
style="width: 208px; height: 208px"
v-bind:src="video.VideoPath"
class="avatar video-avatar"
controls="controls"
>您的浏览器不支持视频播放</video>
<i
class="el-icon-plus avatar-uploader-icon"
style="
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
"
></i>
</div>
<el-dialog
:title="title"
:visible.sync="openimg"
width="950px"
append-to-body
@opened="modalOpened"
@close="closeDialog"
>
<el-row>
<el-col :xs="24" :md="24" :style="{ height: '350px' }">
<div class="avatar-upload-preview">
<video
v-if="openimg"
style="width: 100%; height: 100%"
v-bind:src="videoForm.showVideoPath"
class="avatar video-avatar"
controls="controls"
>您的浏览器不支持视频播放</video>
</div>
</el-col>
</el-row>
<br />
<el-progress
v-if="progressFlag"
:percentage="loadProgress"
style="height:30px;padding-bottom:20px"
></el-progress>
<el-row style="padding-bottom:0px">
<el-col :lg="3" :md="2">
<el-upload
:show-file-list="false"
class="upload-demo"
ref="upload"
:action="uploadurl"
:on-preview="handlePreview"
:auto-upload="false"
:on-change="loadJsonFromFile"
:data="filedata"
:headers="headers"
:on-progress="uploadVideoProcess"
:on-success="handleAvatarSuccess"
>
<el-button slot="trigger" size="small" type="primary" style="float:left">选取文件</el-button>
</el-upload>
</el-col>
<el-col :lg="{ span: 2, offset: 18 }" :md="2">
<el-button v-if="uploadbtn" type="primary" size="small" @click="submitUpload"> </el-button>
<el-button v-else :loading="!uploadbtn" type="primary" size="small">提交中...</el-button>
</el-col>
</el-row>
</el-dialog>
</div>
</template>
<script>
import { VueCropper } from "vue-cropper";
import { uploadVideoUrl } from "@/api/system/stationAvatar.js";
import { getToken } from "@/utils/auth";
export default {
components: { VueCropper },
props: ["img", "type", "item", "tovideo"],
data() {
return {
fileList: [],
loadProgress: 0, //
progressFlag: false, //
uploadbtn: true, //
imageUrl: "",
//
openimg: false,
// cropper
visible: false,
//
title: "上传图片/视频",
filedata: {
type: ""
},
headers: {
Authorization: "Bearer " + getToken() // token
},
options: {
img: null, //
autoCrop: true, //
autoCropWidth: 300, //
autoCropHeight: 300, //
fixedBox: true //
},
previews: {},
items: {},
//
videoForm: {
showVideoPath: null //
},
video: {
VideoPath: null //
},
uploadurl: undefined
};
},
created() {
this.uploadurl =
process.env.VUE_APP_BASE_API + "/system/trainingItem/uploadVideoUrl";
this.uploadbtn = true;
this.filedata.type = this.type;
this.items = this.item;
this.videoForm.showVideoPath = process.env.VUE_APP_BASE_API + this.tovideo;
this.video.VideoPath = process.env.VUE_APP_BASE_API + this.tovideo;
this.title = "上传视频";
},
watch: {
tovideo: {
handler(newimg, oldimg) {
this.uploadbtn = true;
this.videoForm.showVideoPath = process.env.VUE_APP_BASE_API + this.tovideo;
this.video.VideoPath = process.env.VUE_APP_BASE_API + this.tovideo;
}
},
item: {
handler(newimg, oldimg) {
this.uploadbtn = true;
this.items = this.item;
}
},
type: {
handler(newimg, oldimg) {
this.filedata.type = this.type;
}
}
},
methods: {
uploadVideoProcess(event, file, fileList) {
this.progressFlag = true; //
this.loadProgress = parseInt(event.percent); //
if (this.loadProgress >= 100) {
this.loadProgress = 100;
setTimeout(() => {
this.progressFlag = false;
}, 1000); //
}
},
loadJsonFromFile(file, fileList) {
const reader = new FileReader();
this.previews.data = file.raw;
this.videoForm.showVideoPath = URL.createObjectURL(file.raw);
reader.readAsDataURL(file.raw);
reader.onload = () => {
// this.options.img = reader.result;
};
},
submitUpload() {
this.uploadbtn = false;
this.$refs.upload.submit();
},
handlePreview(file) {},
//
editCropper() {
this.openimg = true;
},
//
modalOpened() {
this.visible = true;
},
//
requestUpload() {},
//
rotateLeft() {
this.$refs.cropper.rotateLeft();
},
//
rotateRight() {
this.$refs.cropper.rotateRight();
},
//
changeScale(num) {
num = num || 1;
this.$refs.cropper.changeScale(num);
},
//
beforeUpload(file) {
const reader = new FileReader();
this.previews.data = file;
this.videoForm.showVideoPath = URL.createObjectURL(file);
reader.readAsDataURL(file);
reader.onload = () => {
// this.options.img = reader.result;
};
},
handleAvatarSuccess(res, file) {
this.video.VideoPath = process.env.VUE_APP_BASE_API + res.imgUrl;
this.items.itemDirectoryUrl = res.imgUrl;
this.$emit("item", JSON.stringify(this.items));
this.$modal.msgSuccess("上传视频成功");
this.openimg = false;
this.uploadbtn = true;
},
//
uploadImg() {
this.uploadbtn = true;
let formData = new FormData();
if (this.previews.data) {
formData.append("file", this.previews.data);
formData.append("type", this.filedata.type);
this.$modal.msgSuccess("上传视频中,请耐心等待");
this.uploadbtn = false;
uploadVideoUrl(formData).then(response => {
if (response.code == 200) {
this.video.VideoPath = process.env.VUE_APP_BASE_API + 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 {
this.openimg = false;
}
// this.videoForm.showVideoPath = null;
this.previews.data = null;
},
//
realTime(data) {
this.previews = data;
},
//
closeDialog() {
this.visible = false;
}
}
};
</script>
<style scoped lang="scss">
.title {
position: absolute;
bottom: 5%;
left: 50%;
transform: translate(-50%, 0%);
}
.avatar-upload-preview {
position: absolute;
top: 0%;
left: 50%;
transform: translate(-50%, 0%);
width: 300px;
height: 300px;
border-radius: 0%;
box-shadow: 0 0 4px #ccc;
overflow: hidden;
}
.user-info-head {
position: relative;
display: inline-block;
background: #fafafa;
width: 100px;
height: 100px;
}
.user-info-head:hover:after {
content: "";
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
color: #eee;
background: rgba(0, 0, 0, 0.5);
font-size: 24px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
cursor: pointer;
line-height: 110px;
border-radius: 50%;
}
.wihi {
background-color: #fff;
width: 100px;
height: 100px;
}
.wihi:hover:after {
transform: translate(50%, 50%);
}
</style>

View File

@ -40,16 +40,8 @@
</el-select>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
@ -62,8 +54,7 @@
size="mini"
@click="handleAdd"
v-hasPermi="['system:trainingItem:add']"
>新增</el-button
>
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@ -74,8 +65,7 @@
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:trainingItem:edit']"
>修改</el-button
>
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@ -86,8 +76,7 @@
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:trainingItem:remove']"
>删除</el-button
>
>删除</el-button>
</el-col>
<!-- <el-col :span="1.5">
<el-button
@ -99,11 +88,8 @@
v-hasPermi="['system:trainingItem:export']"
>导出</el-button
>
</el-col> -->
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-col>-->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table
@ -112,45 +98,25 @@
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column
label="学习培训课程组名称"
align="center"
prop="trainingParentName"
/>
<el-table-column
label="培训课程编号"
align="center"
prop="trainingItemCode"
/>
<el-table-column
property="trainingItemTitle"
label="培训课程名称"
align="center"
/>
<el-table-column label="学习培训课程组名称" align="center" prop="trainingParentName" />
<el-table-column label="培训课程编号" align="center" prop="trainingItemCode" />
<el-table-column property="trainingItemTitle" label="培训课程名称" align="center" />
<el-table-column
label="培训课程价格"
align="center"
prop="trainingItemPrice"
/>
<el-table-column
label="培训课程类型"
align="center"
prop="trainingItemType"
>
<el-table-column label="培训课程价格" align="center" prop="trainingItemPrice" />
<el-table-column label="培训课程类型" align="center" prop="trainingItemType">
<template slot-scope="scope">
{{ scope.row.trainingItemType == "VIDEO_LEARNING" ? "视频学习" : "" }}
{{
scope.row.trainingItemType == "GRAPHIC_LEARNING" ? "图文学习" : ""
scope.row.trainingItemType == "GRAPHIC_LEARNING" ? "图文学习" : ""
}}
{{ scope.row.trainingItemType == "LIVE_COURSES" ? "直播课程" : "" }}
{{
scope.row.trainingItemType == "OFFLINE_TRAINING" ? "线下培训" : ""
scope.row.trainingItemType == "OFFLINE_TRAINING" ? "线下培训" : ""
}}
{{
scope.row.trainingItemType == "LEARNING_ITEM_GROUP"
? "学习培训课程组"
: ""
scope.row.trainingItemType == "LEARNING_ITEM_GROUP"
? "学习培训课程组"
: ""
}}
</template>
</el-table-column>
@ -162,8 +128,7 @@
active-color="#13ce66"
inactive-color="#ff4949"
@change="uptrainingShelfFlag(scope.row)"
>
</el-switch>
></el-switch>
</template>
</el-table-column>
<!-- <el-table-column
@ -191,17 +156,9 @@
prop="trainingItemEndTime"
width="180"
>
</el-table-column> -->
<el-table-column
label="培训课程排序"
align="center"
prop="trainingItemSort"
/>
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
>
</el-table-column>-->
<el-table-column label="培训课程排序" align="center" prop="trainingItemSort" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
@ -209,16 +166,14 @@
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:trainingItem:edit']"
>修改</el-button
>
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:trainingItem:remove']"
>删除</el-button
>
>删除</el-button>
</template>
</el-table-column>
</el-table>
@ -245,22 +200,14 @@
label-width="80px"
:inline="true"
>
<el-form-item
label="分类编码"
prop="trainingItemCode"
label-width="120"
>
<el-form-item label="分类编码" prop="trainingItemCode" label-width="120">
<el-input
v-model="trainingParentqueryParams.trainingItemCode"
placeholder="请输入分类编码"
clearable
/>
</el-form-item>
<el-form-item
label="培训课程组名称"
prop="trainingParentName"
label-width="120"
>
<el-form-item label="培训课程组名称" prop="trainingParentName" label-width="120">
<el-input
v-model="trainingParentqueryParams.trainingParentName"
placeholder="请输入培训课程组名称"
@ -268,16 +215,8 @@
/>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="trainingParentinfo"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuerylist"
>重置</el-button
>
<el-button type="primary" icon="el-icon-search" size="mini" @click="trainingParentinfo">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuerylist">重置</el-button>
</el-form-item>
</el-form>
@ -308,20 +247,9 @@
label="培训课程组名称"
align="center"
:show-overflow-tooltip="true"
>
</el-table-column>
<el-table-column
property="trainingItemCode"
label="培训分类编码"
align="center"
>
</el-table-column>
<el-table-column
property="trainingItemPrice"
label="价格"
align="center"
>
</el-table-column>
></el-table-column>
<el-table-column property="trainingItemCode" label="培训分类编码" align="center"></el-table-column>
<el-table-column property="trainingItemPrice" label="价格" align="center"></el-table-column>
<!-- <el-table-column
property="trainingItemType"
@ -346,7 +274,7 @@
: ""
}}
</template>
</el-table-column> -->
</el-table-column>-->
</el-table>
<pagination
v-show="total3 > 0"
@ -453,7 +381,7 @@
:limit.sync="trainingCategoryqueryParams.pageSize"
@pagination="info"
/>
</el-dialog> -->
</el-dialog>-->
<!-- 添加或修改学习培训课程信息对话框 -->
<el-dialog
:title="!isEditFlag ? '添加学习培训课程信息' : '修改学习培训课程信息'"
@ -461,13 +389,7 @@
width="1300px"
append-to-body
>
<el-form
ref="form"
:model="form"
:rules="rules"
label-width="140px"
:inline="true"
>
<el-form ref="form" :model="form" :rules="rules" label-width="140px" :inline="true">
<el-form-item label="培训课程名称" prop="trainingItemTitle">
<el-input
style="width: 250px"
@ -501,7 +423,7 @@
"
>
<el-button
type=""
type
v-if="form.trainingParentName == '请选择所属培训课程组'"
@click="trainingParentitem()"
style="
@ -511,11 +433,10 @@
color: #c0c4cc;
overflow: hidden;
"
>{{ form.trainingParentName }}</el-button
>
>{{ form.trainingParentName }}</el-button>
<el-button
@click="trainingParentitem()"
type=""
type
v-else
style="
width: 250px;
@ -524,8 +445,7 @@
padding-left: -10px;
overflow: hidden;
"
>{{ form.trainingParentName }}</el-button
>
>{{ form.trainingParentName }}</el-button>
</el-form-item>
<!-- <el-form-item
label="所属培训课程分类"
@ -563,7 +483,7 @@
"
>{{ form.trainingCategoryName }}</el-button
>
</el-form-item> -->
</el-form-item>-->
<el-form-item label="培训课程价格" prop="trainingItemPrice">
<el-input
@ -577,12 +497,7 @@
</el-form-item>
<el-form-item label="是否可以购买" prop="buyFlag">
<el-select
v-model="form.buyFlag"
placeholder="请选择"
clearable
style="width: 250px"
>
<el-select v-model="form.buyFlag" placeholder="请选择" clearable style="width: 250px">
<el-option
v-for="item in option"
:key="item.value"
@ -612,7 +527,7 @@
v-model="form.trainingItemCoverUrl"
type="textarea"
placeholder="请输入内容"
/> -->
/>-->
</el-form-item>
<el-form-item label="培训课程海报图片" prop="trainingItemPosterUrl">
<stationAcatar
@ -625,7 +540,7 @@
v-model="form.trainingItemPosterUrl"
type="textarea"
placeholder="请输入内容"
/> -->
/>-->
</el-form-item>
<el-form-item
@ -649,7 +564,7 @@
style="width: 250px"
v-model="form.trainingItemDetails"
placeholder="请输入培训课程详情"
/> -->
/>-->
</el-form-item>
<el-form-item
@ -688,8 +603,7 @@
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择培训课程日期"
>
</el-date-picker>
></el-date-picker>
</el-form-item>
<el-form-item
label="培训课程开始时间"
@ -706,8 +620,7 @@
selectableRange: '00:00:00 - 23:59:59',
}"
placeholder="任意时间点"
>
</el-time-picker>
></el-time-picker>
</el-form-item>
<el-form-item
label="培训课程结束时间"
@ -725,29 +638,21 @@
selectableRange: '00:00:00 - 23:59:59',
}"
placeholder="任意时间点"
>
</el-time-picker>
></el-time-picker>
</el-form-item>
<el-form-item
label="培训课程地址"
prop="trainingItemAddress"
v-if="form.trainingItemType == 'OFFLINE_TRAINING'"
>
<el-input
v-model="form.trainingItemAddress"
placeholder="请输入培训课程地址"
/>
<el-input v-model="form.trainingItemAddress" placeholder="请输入培训课程地址" />
</el-form-item>
<el-form-item
label="报名须知"
prop="trainingItemNotes"
v-if="form.trainingItemType == 'OFFLINE_TRAINING'"
>
<el-input
style="width: 250px"
v-model="form.trainingItemNotes"
placeholder="请输入报名须知"
/>
<el-input style="width: 250px" v-model="form.trainingItemNotes" placeholder="请输入报名须知" />
</el-form-item>
<el-table
v-if="form.trainingItemType == 'VIDEO_LEARNING'"
@ -771,8 +676,7 @@
},
]"
>
<stationAcatar
@imgUrl="imgUrl4"
<trainingAvatar
@item="itemDirectoryUrl"
:tovideo="scope.row.itemDirectoryUrl"
:type="'itemDirectoryUrl'"
@ -868,15 +772,8 @@
</el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button size="mini" type="text" @click="addPictureUrl"
>新增</el-button
>
<el-button
size="mini"
type="text"
@click="delPictureUrl(scope.row)"
>删除</el-button
>
<el-button size="mini" type="text" @click="addPictureUrl">新增</el-button>
<el-button size="mini" type="text" @click="delPictureUrl(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
@ -898,15 +795,15 @@ import {
delTrainingItem,
addTrainingItem,
updateTrainingItem,
updateTrainingShelfFlag,
updateTrainingShelfFlag
} from "@/api/system/trainingItem";
import stationAcatar from "../stationAvatar/index.vue";
import trainingAvatar from "../trainingAvatar/index.vue";
import editor from "@/components/Editor";
import baseurl from "@/api/baseurl.js";
import { updatePicture } from "@/api/system/station";
export default {
name: "TrainingItem",
components: { stationAcatar, editor },
components: { stationAcatar, editor, trainingAvatar },
data() {
return {
@ -920,38 +817,38 @@ export default {
pageNum: 1,
pageSize: 10,
trainingItemCode: "",
trainingParentName: "",
trainingParentName: ""
},
trainingCategoryqueryParams: {
pageNum: 1,
pageSize: 10,
trainingCategoryCode: "",
trainingCategoryName: "",
trainingCategoryName: ""
},
option: [
{
value: 0,
label: "是",
label: "是"
},
{
value: 1,
label: "否",
},
label: "否"
}
],
value: "",
options: [
{
value: "GRAPHIC_LEARNING",
label: "图文学习",
label: "图文学习"
},
{
value: "LEARNING_ITEM_GROUP",
label: "学习培训课程组",
label: "学习培训课程组"
},
{
value: "VIDEO_LEARNING",
label: "视频学习",
},
label: "视频学习"
}
// {
// value: "LIVE_COURSES",
// label: "",
@ -997,7 +894,7 @@ export default {
trainingItemEndTime: null,
trainingItemAddress: null,
trainingItemNotes: null,
trainingItemSort: null,
trainingItemSort: null
},
//
form: {
@ -1007,9 +904,9 @@ export default {
itemDirectoryTitle: null,
itemDirectoryUrl: null,
itemDirectoryIntroduce: null,
itemDirectorySort: null,
},
],
itemDirectorySort: null
}
]
},
imgtwo: "",
imgone: "",
@ -1026,7 +923,7 @@ export default {
// { required: true, message: "", trigger: "blur" },
// ],
trainingItemTitle: [
{ required: true, message: "请输入培训课程名称", trigger: "blur" },
{ required: true, message: "请输入培训课程名称", trigger: "blur" }
],
// trainingItemPrice: [
// { required: true, message: "", trigger: "blur" },
@ -1046,38 +943,38 @@ export default {
// },
// ],
trainingItemType: [
{ required: true, message: "请选择培训课程类型", trigger: "blur" },
{ required: true, message: "请选择培训课程类型", trigger: "blur" }
],
trainingItemDetails: [
{ required: true, message: "请输入培训课程详情", trigger: "blur" },
{ required: true, message: "请输入培训课程详情", trigger: "blur" }
],
trainingItemContent: [
{ required: true, message: "请输入培训课程内容", trigger: "blur" },
{ required: true, message: "请输入培训课程内容", trigger: "blur" }
],
trainingItemDate: [
{ required: true, message: "请输入培训课程日期", trigger: "blur" },
{ required: true, message: "请输入培训课程日期", trigger: "blur" }
],
trainingItemStartTime: [
{
required: true,
message: "请输入培训课程开始时间",
trigger: "blur",
},
trigger: "blur"
}
],
trainingItemEndTime: [
{
required: true,
message: "请输入培训课程结束时间",
trigger: "blur",
},
trigger: "blur"
}
],
trainingItemAddress: [
{ required: true, message: "请输入培训课程地址", trigger: "blur" },
],
{ required: true, message: "请输入培训课程地址", trigger: "blur" }
]
// trainingItemSort: [
// { required: true, message: "", trigger: "blur" },
// ],
},
}
};
},
created() {
@ -1112,7 +1009,7 @@ export default {
itemDirectoryUrl: null,
itemDirectoryIntroduce: null,
itemDirectorySort: null,
idd: this.idd,
idd: this.idd
};
if (this.form.trainingItemDirectoryList.length >= 5) {
this.$message.error("最多新增5条");
@ -1127,19 +1024,17 @@ export default {
if (this.form.trainingItemDirectoryList.length == 1) {
this.$message.error("最后一条不可删除");
} else {
this.form.trainingItemDirectoryList =
this.form.trainingItemDirectoryList.filter(
(e) => e.idd != item.idd
);
this.form.trainingItemDirectoryList = this.form.trainingItemDirectoryList.filter(
e => e.idd != item.idd
);
}
} else if (!item.idd && item.trainingItemDirectoryId) {
if (this.form.trainingItemDirectoryList.length == 1) {
this.$message.error("最后一条不可删除");
} else {
this.form.trainingItemDirectoryList =
this.form.trainingItemDirectoryList.filter(
(e) => e.trainingItemDirectoryId != item.trainingItemDirectoryId
);
this.form.trainingItemDirectoryList = this.form.trainingItemDirectoryList.filter(
e => e.trainingItemDirectoryId != item.trainingItemDirectoryId
);
}
}
},
@ -1148,20 +1043,19 @@ export default {
itemDirectoryUrl(item) {
let items = JSON.parse(item);
if (items.idd && !items.trainingItemDirectoryId) {
this.form.trainingItemDirectoryList.forEach((e) => {
this.form.trainingItemDirectoryList.forEach(e => {
if (e.idd == items.idd) {
e.itemDirectoryUrl = items.itemDirectoryUrl;
}
});
} else if (!items.idd && items.attributeDetailsId) {
this.form.trainingItemDirectoryList.forEach((e) => {
this.form.trainingItemDirectoryList.forEach(e => {
if (e.attributeDetailsId == items.attributeDetailsId) {
e.itemDirectoryUrl = items.itemDirectoryUrl;
}
});
}
},
imgUrl4(imgUrl) {},
imgs(item) {
console.log(item);
this.imgsurl.pictureUrlList.push(item);
@ -1182,7 +1076,7 @@ export default {
pageNum: 1,
pageSize: 10,
trainingCategoryCode: "",
trainingParentName: "",
trainingParentName: ""
};
this.trainingParentinfo();
},
@ -1226,7 +1120,7 @@ export default {
//
trainingParentinfo() {
this.loading = true;
selectTrainingParent(this.trainingParentqueryParams).then((response) => {
selectTrainingParent(this.trainingParentqueryParams).then(response => {
console.log(response);
this.trainingParentlist = response.rows;
this.total3 = response.total;
@ -1250,15 +1144,15 @@ export default {
if (row.trainingShelfFlag == false) {
var obj = {
id: row.id,
trainingShelfFlag: 1,
trainingShelfFlag: 1
};
} else if (row.trainingShelfFlag == true) {
var obj = {
id: row.id,
trainingShelfFlag: 0,
trainingShelfFlag: 0
};
}
updateTrainingShelfFlag(obj).then((res) => {
updateTrainingShelfFlag(obj).then(res => {
if (obj.trainingShelfFlag == 0) {
this.$modal.msgSuccess("已修改上架状态为上架");
} else {
@ -1270,9 +1164,9 @@ export default {
/** 查询学习培训课程信息列表 */
getList() {
this.loading = true;
listTrainingItem(this.queryParams).then((response) => {
listTrainingItem(this.queryParams).then(response => {
this.trainingItemList = response.rows;
response.rows.forEach((e) => {
response.rows.forEach(e => {
if (e.trainingShelfFlag == 0) {
e.trainingShelfFlag = true;
} else if (e.trainingShelfFlag == 1) {
@ -1293,10 +1187,10 @@ export default {
obj.pictureUrlList.push(this.form.trainingItemPosterUrl);
}
if (obj.pictureUrlList.length > 0) {
updatePicture(obj).then((res) => {});
updatePicture(obj).then(res => {});
}
if (this.imgsurl.pictureUrlList.length > 0) {
updatePicture(this.imgsurl).then((res) => {});
updatePicture(this.imgsurl).then(res => {});
}
this.imgsurl = { pictureUrlList: [] };
@ -1313,8 +1207,8 @@ export default {
itemDirectoryUrl: null,
itemDirectoryIntroduce: null,
itemDirectorySort: null,
idd: this.idd,
},
idd: this.idd
}
],
trainingParentId: "",
id: null,
@ -1340,7 +1234,7 @@ export default {
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
updateTime: null
};
this.resetForm("form");
},
@ -1357,7 +1251,7 @@ export default {
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id);
this.ids = selection.map(item => item.id);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
@ -1371,9 +1265,9 @@ export default {
itemDirectoryTitle: null,
itemDirectoryUrl: null,
itemDirectoryIntroduce: null,
itemDirectorySort: null,
},
],
itemDirectorySort: null
}
]
};
this.reset();
this.open = true;
@ -1384,13 +1278,13 @@ export default {
handleUpdate(row) {
this.reset();
const id = row.id || this.ids;
getTrainingItem(id).then((response) => {
getTrainingItem(id).then(response => {
var obj = {
itemDirectoryName: null,
itemDirectoryTitle: null,
itemDirectoryUrl: null,
itemDirectoryIntroduce: null,
itemDirectorySort: null,
itemDirectorySort: null
};
if (response.data.trainingItemDirectoryList.length == 0) {
response.data.trainingItemDirectoryList.push(obj);
@ -1413,11 +1307,10 @@ export default {
if (!this.form.trainingItemSort) {
this.form.trainingItemSort = null;
}
this.$refs["form"].validate((valid) => {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.trainingItemStartTime) {
this.form.trainingItemStartTimeStr =
this.form.trainingItemStartTime;
this.form.trainingItemStartTimeStr = this.form.trainingItemStartTime;
} else {
this.form.trainingItemStartTimeStr = "00:00:00";
}
@ -1428,7 +1321,7 @@ export default {
this.form.trainingItemDirectoryList = [];
}
if (this.form.trainingItemId != null) {
updateTrainingItem(this.form).then((response) => {
updateTrainingItem(this.form).then(response => {
var obj = { pictureUrlList: [] };
if (this.imgone != this.form.trainingItemCoverUrl) {
obj.pictureUrlList.push(this.imgone);
@ -1438,20 +1331,20 @@ export default {
}
this.imgsurl = { pictureUrlList: [] };
if (obj.pictureUrlList.length > 0) {
updatePicture(obj).then((res) => {});
updatePicture(obj).then(res => {});
}
if (response.code == 200) {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
}
});
} else {
addTrainingItem(this.form).then((response) => {
addTrainingItem(this.form).then(response => {
if (response.code == 200) {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
}
});
}
@ -1468,7 +1361,7 @@ export default {
.confirm(
'是否确认删除培训课程名称为"' + trainingItemTitles + '"的数据项?'
)
.then(function () {
.then(function() {
return delTrainingItem(ids);
})
.then(() => {
@ -1482,12 +1375,12 @@ export default {
this.download(
"system/trainingItem/export",
{
...this.queryParams,
...this.queryParams
},
`trainingItem_${new Date().getTime()}.xlsx`
);
},
},
}
}
};
</script>
<style lang="scss" scoped>

View File

@ -9,11 +9,7 @@
label-width="100px"
>
<el-form-item label="所属护理站" prop="nurseStationName">
<el-select
v-model="queryParams.nurseStationId"
placeholder="请选择护理站"
@change="handleQuery"
>
<el-select v-model="queryParams.nurseStationId" placeholder="请选择护理站" @change="handleQuery">
<el-option
v-for="item in handstationlist"
:key="item.id"
@ -45,13 +41,9 @@
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item> -->
</el-form-item>-->
<el-form-item label="订单状态" prop="trainingOrderStatus">
<el-select
v-model="queryParams.trainingOrderStatus"
placeholder="请选择订单状态"
clearable
>
<el-select v-model="queryParams.trainingOrderStatus" placeholder="请选择订单状态" clearable>
<el-option
v-for="item in trainingOrderStatusoptions"
:key="item.value"
@ -62,24 +54,13 @@
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table
@ -88,100 +69,47 @@
@selection-change="handleSelectionChange"
>
]
<el-table-column
label="所属护理站"
align="center"
prop="nurseStationName"
/>
<el-table-column
label="护理员姓名"
align="center"
prop="nursePersonName"
/>
<el-table-column label="所属护理站" align="center" prop="nurseStationName" />
<el-table-column label="护理员姓名" align="center" prop="nursePersonName" />
<el-table-column label="订单编号" align="center" prop="trainingOrderNo" />
<el-table-column
property="trainingItemTitle"
label="培训课程名称"
align="center"
/>
<el-table-column
label="订单状态"
align="center"
prop="trainingOrderStatus"
>
<el-table-column property="trainingItemTitle" label="培训课程名称" align="center" />
<el-table-column label="订单状态" align="center" prop="trainingOrderStatus">
<template slot-scope="scope">
<el-button v-if="scope.row.trainingOrderStatus == 'WAIT_PAY'"
>待付款</el-button
>
<el-button
type="primary"
v-if="scope.row.trainingOrderStatus == 'PAY'"
>已付款</el-button
>
<el-button
type="warning"
v-if="scope.row.trainingOrderStatus == 'WAIT_REFUND'"
>退款中</el-button
>
<el-button v-if="scope.row.trainingOrderStatus == 'WAIT_PAY'">待付款</el-button>
<el-button type="primary" v-if="scope.row.trainingOrderStatus == 'PAY'">已付款</el-button>
<el-button type="warning" v-if="scope.row.trainingOrderStatus == 'WAIT_REFUND'">退款中</el-button>
<el-button
type="danger"
v-if="scope.row.trainingOrderStatus == 'CANCEL'"
>已取消</el-button
>
<el-button
type="success"
v-if="scope.row.trainingOrderStatus == 'REFUNDED'"
>已退款</el-button
>
<el-button type="danger" v-if="scope.row.trainingOrderStatus == 'CANCEL'">已取消</el-button>
<el-button type="success" v-if="scope.row.trainingOrderStatus == 'REFUNDED'">已退款</el-button>
</template>
</el-table-column>
<el-table-column
label="订单金额"
align="center"
prop="trainingOrderAmount"
/>
<el-table-column
label="下单方式"
align="center"
prop="trainingOrderChannel"
>
<el-table-column label="订单金额" align="center" prop="trainingOrderAmount" />
<el-table-column label="下单方式" align="center" prop="trainingOrderChannel">
<template slot-scope="scope">
{{ scope.row.trainingOrderChannel == "MOBILE_APP" ? "手机App" : "" }}
{{
scope.row.trainingOrderChannel == "WECHAT_APPLET"
? "微信小程序"
: ""
scope.row.trainingOrderChannel == "WECHAT_APPLET"
? "微信小程序"
: ""
}}
{{
scope.row.trainingOrderChannel == "ALI_PAY_APPLET"
? "支付宝小程序"
: ""
scope.row.trainingOrderChannel == "ALI_PAY_APPLET"
? "支付宝小程序"
: ""
}}
</template>
</el-table-column>
<el-table-column
label="下单时间"
align="center"
prop="trainingOrderTime"
width="180"
>
</el-table-column>
<el-table-column label="下单时间" align="center" prop="trainingOrderTime" width="180"></el-table-column>
<!-- <el-table-column label="备注信息" align="center" prop="remark" /> -->
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-zoom-in"
@click="handleUpdate(scope.row)"
>查看</el-button
>
>查看</el-button>
<el-button
size="mini"
@ -189,8 +117,7 @@
icon="el-icon-error"
@click="cencel(scope.row)"
v-if="scope.row.trainingOrderStatus == 'PAY'"
>退款</el-button
>
>退款</el-button>
</template>
</el-table-column>
</el-table>
@ -203,12 +130,7 @@
@pagination="getList"
/>
<!-- 退款弹框 -->
<el-dialog
title="退款"
:visible.sync="innerrefund"
append-to-body
width="500px"
>
<el-dialog title="退款" :visible.sync="innerrefund" append-to-body width="500px">
<el-form :inline="true" :rules="rules" label-width="120px">
<el-form-item label="订单编号" prop="trainingOrderNo">
<el-input
@ -261,7 +183,7 @@
:rows="5"
disabled
/>
</el-form-item> -->
</el-form-item>-->
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cencelbtn"> </el-button>
@ -269,19 +191,8 @@
</div>
</el-dialog>
<!-- 查看学习培训订单主对话框 -->
<el-dialog
:title="title"
:visible.sync="open"
width="1200px"
append-to-body
>
<el-form
ref="form"
:model="form"
:rules="rules"
label-width="100px"
:inline="true"
>
<el-dialog :title="title" :visible.sync="open" width="1200px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px" :inline="true">
<el-form-item label="护理员姓名" prop="nursePersonName">
<div class="text">{{ form.nursePersonName }}</div>
</el-form-item>
@ -304,71 +215,48 @@
v-loading="loading"
style="margin: 10px 0 20px 0; padding-bottom: 20px"
>
<el-table-column
prop="trainingItemTitle"
label="培训课程名称"
align="center"
></el-table-column>
<el-table-column
prop="trainingItemType"
label="课程类型"
align="center"
>
<el-table-column prop="trainingItemTitle" label="培训课程名称" align="center"></el-table-column>
<el-table-column prop="trainingItemType" label="课程类型" align="center">
<template slot-scope="scope">
{{
scope.row.trainingItemType == "VIDEO_LEARNING" ? "视频学习" : ""
scope.row.trainingItemType == "VIDEO_LEARNING" ? "视频学习" : ""
}}
{{
scope.row.trainingItemType == "GRAPHIC_LEARNING"
? "图文学习"
: ""
scope.row.trainingItemType == "GRAPHIC_LEARNING"
? "图文学习"
: ""
}}
{{
scope.row.trainingItemType == "LIVE_COURSES" ? "直播课程" : ""
scope.row.trainingItemType == "LIVE_COURSES" ? "直播课程" : ""
}}
{{
scope.row.trainingItemType == "OFFLINE_TRAINING"
? "线下培训"
: ""
scope.row.trainingItemType == "OFFLINE_TRAINING"
? "线下培训"
: ""
}}
{{
scope.row.trainingItemType == "LEARNING_ITEM_GROUP"
? "学习培训课程组"
: ""
scope.row.trainingItemType == "LEARNING_ITEM_GROUP"
? "学习培训课程组"
: ""
}}
</template>
</el-table-column>
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-zoom-in"
@click="handlelook(scope.row)"
>查看</el-button
>
>查看</el-button>
</template>
</el-table-column>
</el-table>
</el-form>
</el-dialog>
<!-- 查看图文 -->
<el-dialog
title="查看图文"
:visible.sync="innerrefundvideo"
append-to-body
width="1000px"
>
<el-form
:inline="true"
:rules="rules"
label-width="130px"
:model="formlist"
>
<el-dialog title="查看图文" :visible.sync="innerrefundvideo" append-to-body width="1000px">
<el-form :inline="true" :rules="rules" label-width="130px" :model="formlist">
<el-form-item
label="培训课程详情"
prop="trainingItemDetails"
@ -405,11 +293,7 @@
<img class="img" :src="baseurl + formlist.trainingItemCoverUrl" alt />
</el-form-item>
<el-form-item label="培训课程海报图片" prop="trainingItemPosterUrl">
<img
class="img"
:src="baseurl + formlist.trainingItemPosterUrl"
alt
/>
<img class="img" :src="baseurl + formlist.trainingItemPosterUrl" alt />
</el-form-item>
<el-table
ref="list"
@ -420,27 +304,17 @@
>
<el-table-column label="章节视频" align="center" width="300">
<template slot-scope="scope">
<video
class="img"
:src="baseurl + scope.row.itemDirectoryUrl"
controls="controls"
></video>
<video class="img" :src="baseurl + scope.row.itemDirectoryUrl" controls="controls"></video>
</template>
</el-table-column>
<el-table-column label="章节名称" align="center">
<template slot-scope="scope">
<el-input
v-model="scope.row.itemDirectoryName"
placeholder="请输入章节名称"
></el-input>
<el-input v-model="scope.row.itemDirectoryName" placeholder="请输入章节名称"></el-input>
</template>
</el-table-column>
<el-table-column label="章节标题" align="center">
<template slot-scope="scope">
<el-input
v-model="scope.row.itemDirectoryTitle"
placeholder="请输入章节标题"
></el-input>
<el-input v-model="scope.row.itemDirectoryTitle" placeholder="请输入章节标题"></el-input>
</template>
</el-table-column>
</el-table>
@ -458,9 +332,8 @@ import {
delTrainingOrder,
xylWeChatRefundNotify,
addTrainingOrder,
updateTrainingOrder,
updateTrainingOrder
} from "@/api/system/trainingOrder";
import baseurl from "@/api/baseurl.js";
import stationAcatar from "../stationAvatar/index.vue";
import editor from "@/components/Editor";
import { getListByUser } from "@/api/system/userlist.js";
@ -469,28 +342,28 @@ export default {
components: { stationAcatar, editor },
data() {
return {
baseurl: null,
baseurl: process.env.VUE_APP_BASE_API,
trainingOrderStatusoptions: [
{
value: "WAIT_PAY",
label: "待付款",
label: "待付款"
},
{
value: "PAY",
label: "已付款",
label: "已付款"
},
{
value: "WAIT_REFUND",
label: "退款中",
label: "退款中"
},
{
value: "REFUNDED",
label: "已退款",
label: "已退款"
},
{
value: "CANCEL",
label: "已取消",
},
label: "已取消"
}
],
nurseStationshow: false,
@ -503,46 +376,46 @@ export default {
trainingItemTypeoptions: [
{
value: "GRAPHIC_LEARNING",
label: "图文学习",
label: "图文学习"
},
{
value: "LEARNING_ITEM_GROUP",
label: "学习培训项目组",
label: "学习培训项目组"
},
{
value: "VIDEO_LEARNING",
label: "视频学习",
},
label: "视频学习"
}
],
//
ids: [],
optiondeflag: [
{
value: 0,
label: "否",
label: "否"
},
{
value: 1,
label: "是",
},
label: "是"
}
],
options: [
{
value: "MOBILE_APP",
label: "手机App",
label: "手机App"
},
{
value: "WECHAT_APPLET",
label: "微信小程序",
label: "微信小程序"
},
{
value: "ALI_PAY_APPLET",
label: "支付宝小程序",
},
label: "支付宝小程序"
}
],
getListByUserquery: {
pageNum: 1,
pageSize: 10,
pageSize: 10
},
handstationlist: [], //list
//
@ -572,7 +445,7 @@ export default {
trainingOrderStatus: null,
trainingOrderAmount: null,
trainingOrderChannel: null,
trainingOrderTime: null,
trainingOrderTime: null
},
//
form: {},
@ -580,14 +453,13 @@ export default {
nurseStationlist: [],
trainingOrderDetailsList: [],
//
rules: {},
rules: {}
};
},
created() {
this.getList();
this.infos();
this.info();
this.baseurl = baseurl;
},
methods: {
//
@ -615,13 +487,13 @@ export default {
let items = JSON.parse(item);
console.log(items);
if (items.idd && !items.trainingItemDirectoryId) {
this.form.trainingItemDirectoryList.forEach((e) => {
this.form.trainingItemDirectoryList.forEach(e => {
if (e.idd == items.idd) {
e.itemDirectoryUrl = items.itemDirectoryUrl;
}
});
} else if (!items.idd && items.attributeDetailsId) {
this.form.trainingItemDirectoryList.forEach((e) => {
this.form.trainingItemDirectoryList.forEach(e => {
if (e.attributeDetailsId == items.attributeDetailsId) {
e.itemDirectoryUrl = items.itemDirectoryUrl;
}
@ -636,7 +508,7 @@ export default {
// // 退
cencel(row) {
console.log(row);
refundInformation(row.id).then((response) => {
refundInformation(row.id).then(response => {
this.query = response.data;
this.innerrefund = true;
});
@ -650,9 +522,9 @@ export default {
var obj = {
orderNo: this.query.trainingOrderNo,
refundPrice: this.query.trainingOrderAmount,
trainingOrderFlag: "TRAINING",
trainingOrderFlag: "TRAINING"
};
xylWeChatRefundNotify(obj).then((res) => {
xylWeChatRefundNotify(obj).then(res => {
if (res.code == 200) {
this.$modal.msgSuccess("退款有延迟,请耐心等待");
}
@ -663,7 +535,7 @@ export default {
/** 查询学习培训订单主列表 */
getList() {
this.loading = true;
listTrainingOrder(this.queryParams).then((response) => {
listTrainingOrder(this.queryParams).then(response => {
this.trainingOrderList = response.rows;
this.total = response.total;
this.loading = false;
@ -684,7 +556,7 @@ export default {
this.formlist.trainingItemDetails = row.trainingItemDetails;
this.formlist.trainingItemContent = row.trainingItemContent;
this.formlist.trainingItemType = row.trainingItemType;
orderItemDirectory(row.trainingOrderDetailsId).then((response) => {
orderItemDirectory(row.trainingOrderDetailsId).then(response => {
this.formlist.list = response.rows;
this.loading = false;
});
@ -707,7 +579,7 @@ export default {
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
updateTime: null
};
this.resetForm("form");
},
@ -723,9 +595,9 @@ export default {
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.nursePersonName = null;
this.queryParams.trainingOrderNo = null;
this.queryParams.trainingOrderStatus = null;
}
// this.queryParams = {
// pageNum: 1,
@ -735,7 +607,7 @@ export default {
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id);
this.ids = selection.map(item => item.id);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
@ -749,7 +621,7 @@ export default {
handleUpdate(row) {
this.reset();
const id = row.id || this.ids;
getTrainingOrder(id).then((response) => {
getTrainingOrder(id).then(response => {
console.log(response);
this.form = response.data;
this.form.trainingOrderDetailsList =
@ -770,22 +642,22 @@ export default {
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate((valid) => {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateTrainingOrder(this.form).then((response) => {
updateTrainingOrder(this.form).then(response => {
if (response.code == 200) {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
}
});
} else {
addTrainingOrder(this.form).then((response) => {
addTrainingOrder(this.form).then(response => {
if (response.code == 200) {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
}
});
}
@ -797,7 +669,7 @@ export default {
const ids = row.id || this.ids;
this.$modal
.confirm('是否确认删除学习培训订单主编号为"' + ids + '"的数据项?')
.then(function () {
.then(function() {
return delTrainingOrder(ids);
})
.then(() => {
@ -811,12 +683,12 @@ export default {
this.download(
"system/trainingOrder/export",
{
...this.queryParams,
...this.queryParams
},
`trainingOrder_${new Date().getTime()}.xlsx`
);
},
},
}
}
};
</script>
<style lang="scss">