This commit is contained in:
曹辉 2023-02-15 16:00:47 +08:00
parent f16e8b3fa5
commit 3996295ac9
3 changed files with 58 additions and 31 deletions

View File

@ -63,4 +63,4 @@ export function delPoser(id) {
url: '/system/poser/' + id, url: '/system/poser/' + id,
method: 'delete' method: 'delete'
}) })
} }

View File

@ -183,7 +183,13 @@
@pagination="getList" @pagination="getList"
/> />
<!-- 添加或修改泉医到家系统海报模块信息包含咨询简介信息对话框 --> <!-- 添加或修改泉医到家系统海报模块信息包含咨询简介信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body> <el-dialog
:title="title"
:visible.sync="open"
width="800px"
:before-close="cancel"
append-to-body
>
<el-form <el-form
ref="form" ref="form"
:model="form" :model="form"
@ -209,7 +215,14 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="所属护理站" prop="nurseStationId"> <el-form-item
label="所属护理站"
prop="nurseStationId"
v-if="
form.moduleType == 'NURSE_AGENCY_MODULE' ||
form.moduleType == 'NURSE_ITEM_MODULE'
"
>
<template> <template>
<el-button <el-button
type="" type=""
@ -242,7 +255,11 @@
> >
</template> </template>
</el-form-item> </el-form-item>
<el-form-item label="所属护理项目" prop="nurseItemId"> <el-form-item
label="所属护理项目"
prop="nurseItemId"
v-if="form.moduleType == 'NURSE_ITEM_MODULE'"
>
<template> <template>
<el-button <el-button
type="" type=""
@ -279,7 +296,7 @@
<el-table <el-table
label-width="50px" label-width="50px"
style="margin-top: 20px" style="margin-top: 20px"
:data="form.PosterPictureUrlList" :data="form.posterPictureUrlLists"
> >
<el-table-column label="图片" align="center" width="300"> <el-table-column label="图片" align="center" width="300">
<template slot-scope="scope"> <template slot-scope="scope">
@ -299,7 +316,7 @@
style="width: 208px" style="width: 208px"
> >
<el-option <el-option
v-for="item in options" v-for="item in jumpTypes"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
@ -335,8 +352,9 @@
<stationAcatar <stationAcatar
style="width: 208px" style="width: 208px"
@imgUrl="imgUrl2" @imgUrl="imgUrl2"
:img="form.posterVideoUrl" :tovideo="form.posterVideoUrl"
:type="'posterVideoUrl'" :type="'posterVideoUrl'"
v-if="open"
/> />
</el-form-item> </el-form-item>
<el-form-item label="海报显示顺序" prop="poserSort"> <el-form-item label="海报显示顺序" prop="poserSort">
@ -678,6 +696,20 @@ export default {
label: "首页模块", label: "首页模块",
}, },
], ],
jumpTypes: [
{
value: "NEW_PEOPLE_WELFARE",
label: "新人福利",
},
{
value: "HOME_PAGE",
label: "首页",
},
{
value: "SHOPPING",
label: "商城",
},
],
// //
stationid: "", stationid: "",
nurseitemid: "", nurseitemid: "",
@ -744,18 +776,18 @@ export default {
// //
delPictureUrl(item) { delPictureUrl(item) {
if (item.idd && !item.id) { if (item.idd && !item.id) {
if (this.form.PosterPictureUrlList.length == 1) { if (this.form.posterPictureUrlLists.length == 1) {
this.$message.error("最后一条不可删除"); this.$message.error("最后一条不可删除");
} else { } else {
this.form.PosterPictureUrlList = this.form.posterPictureUrlLists =
this.form.PosterPictureUrlList.filter((e) => e.idd != item.idd); this.form.posterPictureUrlLists.filter((e) => e.idd != item.idd);
} }
} else if (!item.idd && item.id) { } else if (!item.idd && item.id) {
if (this.form.PosterPictureUrlList.length == 1) { if (this.form.posterPictureUrlLists.length == 1) {
this.$message.error("最后一条不可删除"); this.$message.error("最后一条不可删除");
} else { } else {
this.form.PosterPictureUrlList = this.form.posterPictureUrlLists =
this.form.PosterPictureUrlList.filter((e) => e.id != item.id); this.form.posterPictureUrlLists.filter((e) => e.id != item.id);
} }
} }
}, },
@ -767,7 +799,7 @@ export default {
jumpType: "", jumpType: "",
idd: this.idd, idd: this.idd,
}; };
this.form.PosterPictureUrlList.push(obj); this.form.posterPictureUrlLists.push(obj);
}, },
// //
clicknurseItemshow() { clicknurseItemshow() {
@ -879,6 +911,7 @@ export default {
}, },
imgUrl2(imgUrl) { imgUrl2(imgUrl) {
this.videoForm.showVideoPath = baseurl + imgUrl; this.videoForm.showVideoPath = baseurl + imgUrl;
this.form.posterVideoUrl = imgUrl;
}, },
/** 查询泉医到家系统海报模块信息(包含咨询简介信息)列表 */ /** 查询泉医到家系统海报模块信息(包含咨询简介信息)列表 */
getList() { getList() {
@ -905,7 +938,7 @@ export default {
// //
reset() { reset() {
this.form = { this.form = {
PosterPictureUrlList: [ posterPictureUrlLists: [
{ {
posterPictureUrl: "", posterPictureUrl: "",
jumpType: "", jumpType: "",
@ -913,21 +946,11 @@ export default {
}, },
], ],
id: null, id: null,
nurseStationId: null,
nurseItemId: null,
poserName: null, poserName: null,
poserCode: null,
posterIntroduce: null,
posterPictureUrl: null, posterPictureUrl: null,
posterVideoUrl: null, posterVideoUrl: null,
moduleType: null, posterVideoUrl2: null,
poserSort: null, poserSort: null,
jumpLink: null,
jumpType: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
nurseStationName: "请选择所属护理站", nurseStationName: "请选择所属护理站",
nurseStationId: null, nurseStationId: null,
nurseItemName: "请选择所属护理项目", nurseItemName: "请选择所属护理项目",

View File

@ -20,7 +20,6 @@
title="点击上传图片" title="点击上传图片"
style="width: 100px; height: 100px; line-height: 200px" style="width: 100px; height: 100px; line-height: 200px"
/> />
<i <i
v-else v-else
class="el-icon-plus avatar-uploader-icon" class="el-icon-plus avatar-uploader-icon"
@ -59,7 +58,7 @@
<div class="avatar-upload-preview"> <div class="avatar-upload-preview">
<video <video
style="width: 100%; height: 100%" style="width: 100%; height: 100%"
v-if="videoForm.showVideoPath != ''" v-if="videoForm.showVideoPath"
v-bind:src="videoForm.showVideoPath" v-bind:src="videoForm.showVideoPath"
class="avatar video-avatar" class="avatar video-avatar"
controls="controls" controls="controls"
@ -143,7 +142,7 @@ import {
export default { export default {
components: { VueCropper }, components: { VueCropper },
props: ["img", "type", "item"], props: ["img", "type", "item", "tovideo"],
data() { data() {
return { return {
imageUrl: "", imageUrl: "",
@ -165,7 +164,7 @@ export default {
items: {}, items: {},
// //
videoForm: { videoForm: {
showVideoPath: "", // showVideoPath: null, //
}, },
video: { video: {
VideoPath: null, // VideoPath: null, //
@ -175,6 +174,8 @@ export default {
created() { created() {
this.types = this.type; this.types = this.type;
this.items = this.item; this.items = this.item;
this.video.VideoPath = baseurl + this.tovideo;
console.log(this.video)
if (this.img == null) { if (this.img == null) {
this.options.img = null; this.options.img = null;
} else if (this.img == "") { } else if (this.img == "") {
@ -189,6 +190,9 @@ export default {
} }
}, },
watch: { watch: {
tovideo: {
handler(newimg, oldimg) {},
},
item: { item: {
handler(newimg, oldimg) { handler(newimg, oldimg) {
this.items = this.item; this.items = this.item;
@ -291,7 +295,7 @@ export default {
this.$emit("item", JSON.stringify(this.items)); this.$emit("item", JSON.stringify(this.items));
} }
if (this.types == "posterPictureUrl") { if (this.types == "posterPictureUrl") {
this.items.classifyPictureUrl = response.imgUrl; this.items.posterPictureUrl = response.imgUrl;
this.$emit("item", JSON.stringify(this.items)); this.$emit("item", JSON.stringify(this.items));
} }
this.openimg = false; this.openimg = false;