Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
闫晓茹 2024-03-06 17:12:13 +08:00
commit 09d8c48339
4 changed files with 365 additions and 35 deletions

View File

@ -82,6 +82,7 @@
icon="el-icon-delete" icon="el-icon-delete"
size="mini" size="mini"
@click="handleDelete" @click="handleDelete"
:disabled="multiple"
v-hasPermi="['manage:materials:remove']" v-hasPermi="['manage:materials:remove']"
>批量删除</el-button >批量删除</el-button
> >
@ -189,13 +190,12 @@
prop="materialsFilePath" prop="materialsFilePath"
v-if="form.materialsType == 'VIDEO'" v-if="form.materialsType == 'VIDEO'"
> >
<stationAcatar <trainingAvatar
style="width: 208px" @imgUrl="imgUrl2"
@imgUrl="imgUrl2" :tovideo="form.materialsFilePath"
:tovideo="form.materialsFilePath" :type="'materialsVideoUrl'"
:type="'materialsVideoUrl'" />
v-if="open"
/>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
@ -309,10 +309,11 @@
<script> <script>
import { listMaterials, getMaterials, delMaterials, addMaterials, updateMaterials,crowdInfo } from "@/api/manage/materials"; import { listMaterials, getMaterials, delMaterials, addMaterials, updateMaterials,crowdInfo } from "@/api/manage/materials";
import stationAcatar from "../../system/stationAvatar/index.vue"; import stationAcatar from "../../system/stationAvatar/index.vue";
import trainingAvatar from "../../system/trainingAvatar/index.vue";
export default { export default {
name: "Materials", name: "Materials",
components: { stationAcatar }, components: { stationAcatar ,trainingAvatar},
dicts: ['crowd_type', 'materials_type', 'video_cover_type'], dicts: ['crowd_type', 'materials_type', 'video_cover_type'],
data() { data() {
return { return {
@ -431,10 +432,14 @@ export default {
}, },
// //
radioChange(e) { radioChange(e) {
if(e=='VIDEO'){
this.form.materialsFilePath=null this.form.materialsFilePath=null
this.form.videoCoverFilePath=null this.form.videoCoverFilePath=null
}else if(e=='IMAGE_TEXT'){
this.form.materialsFilePath=null
this.form.videoCoverFilePath=null
console.log(e) }
}, },
// //
@ -445,7 +450,9 @@ export default {
imgUrl2(imgUrl) { imgUrl2(imgUrl) {
this.form.materialsFilePath = process.env.VUE_APP_BASE_API + imgUrl; this.form.materialsFilePath = process.env.VUE_APP_BASE_API + imgUrl;
this.form.materialsFilePath = imgUrl; this.form.materialsFilePath = imgUrl;
}, },
// //
imgUrl3(imgUrl) { imgUrl3(imgUrl) {
console.log(this.form.videoCoverFilePath) console.log(this.form.videoCoverFilePath)
@ -456,7 +463,13 @@ export default {
// //
changecheck(e, item) { changecheck(e, item) {
this.ids = this.materialsList.map(item => item.checked ? item.id : undefined).filter(e => e) this.ids = this.materialsList.map(item => item.checked ? item.id : undefined).filter(e => e)
// console.log(this.ids) if(this.ids.length>0){
this.multiple = false
}else{
this.multiple = true
}
console.log(this.ids)
// console.log(item) // console.log(item)
// console.log(e) // console.log(e)
@ -603,6 +616,8 @@ export default {
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
this.getList();
console.log(this.ids) console.log(this.ids)
if(this.ids.length==0){ if(this.ids.length==0){
this.$modal.msgError("请先选择一条数据"); this.$modal.msgError("请先选择一条数据");

View File

@ -78,7 +78,7 @@
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="5"> <el-col :span="5">
<div class="left" ref="box"> <div class="leftmessage" ref="box">
<div class="name">科室名称</div> <div class="name">科室名称</div>
<div> <div>
<el-input <el-input
@ -160,8 +160,9 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="短信状态" label="短信状态"
align="center" align="right"
prop="textMessageStatus" prop="textMessageStatus"
width="90px"
> >
<!-- <template slot-scope="scope"> <!-- <template slot-scope="scope">
{{ scope.row.textMessageStatus == "GROUNDING" ? "上架" : "" }} {{ scope.row.textMessageStatus == "GROUNDING" ? "上架" : "" }}
@ -928,8 +929,8 @@ export default {
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
.left { .leftmessage {
height: 530px; height: 800px;
overflow: auto; overflow: auto;
.name { .name {
font-weight: 700; font-weight: 700;
@ -976,6 +977,6 @@ export default {
// margin-left: 10px; // // margin-left: 10px; //
position: relative; position: relative;
top: 16px; top: 16px;
left: 12px; left: 25px;
} }
</style> </style>

View File

@ -52,7 +52,7 @@
</el-form-item> </el-form-item>
<el-form-item label="服务包价格" prop="packagePrice"> <el-form-item label="服务包价格" prop="packagePrice">
<el-input <el-input
oninput="value=value.replace(/[^\d.]/g,'')" oninput="value=value.replace(/[^\d.]/g,'')"
v-model="queryParams.packagePrice" v-model="queryParams.packagePrice"
placeholder="请输入服务包价格" placeholder="请输入服务包价格"
clearable clearable
@ -165,11 +165,7 @@
:data="servicepackageList" :data="servicepackageList"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<el-table-column <el-table-column label="序号" align="center" type="index" />
label="序号"
align="center"
type="index"
/>
<el-table-column <el-table-column
label="服务包名称" label="服务包名称"
align="center" align="center"
@ -232,8 +228,7 @@
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-notebook-2 icon="el-icon-notebook-2"
"
@click="detail(scope.row)" @click="detail(scope.row)"
>详情</el-button >详情</el-button
> >
@ -348,7 +343,7 @@
</el-form-item> </el-form-item>
<el-form-item label="服务包价格" prop="packagePrice"> <el-form-item label="服务包价格" prop="packagePrice">
<el-input <el-input
oninput="value=value.replace(/[^\d.]/g,'')" oninput="value=value.replace(/[^\d.]/g,'')"
v-model="form.packagePrice" v-model="form.packagePrice"
placeholder="请输入服务包价格" placeholder="请输入服务包价格"
style="width: 204px" style="width: 204px"
@ -378,7 +373,11 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="服务包期限" prop="packageTerm"> <el-form-item label="服务包期限" prop="packageTerm">
<el-input v-model="form.packageTerm" placeholder="请输入服务包期限" style="width: 208px"> <el-input
v-model="form.packageTerm"
placeholder="请输入服务包期限"
style="width: 208px"
>
<el-select <el-select
style="width: 60px" style="width: 60px"
slot="append" slot="append"
@ -422,7 +421,7 @@
:prop="`voList.${index}.serviceContent`" :prop="`voList.${index}.serviceContent`"
> >
<el-select <el-select
style="margin-left:10px" style="margin-left: 10px"
v-model="aitem.serviceContent" v-model="aitem.serviceContent"
placeholder="请选择服务内容" placeholder="请选择服务内容"
@change="changcontent" @change="changcontent"
@ -665,10 +664,19 @@
<span>{{ formdetail.diseaseTypeName }}</span> <span>{{ formdetail.diseaseTypeName }}</span>
</el-form-item> </el-form-item>
<el-form-item label="服务包名称:" prop="packageVersion"> <el-form-item label="服务包名称:" prop="packageVersion">
<span>{{ formdetail.packageName }}</span> <span
style="
display: inline-block;
width: 110px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
"
>{{ formdetail.packageName }}</span
>
</el-form-item> </el-form-item>
<el-form-item label="价格:" prop="packageVersion"> <el-form-item label="价格:" prop="packageVersion">
<span>{{ formdetail.packagePrice }}</span> <span>{{ formdetail.packagePrice }}</span>
</el-form-item> </el-form-item>
<el-form-item label="服务期限:" prop="packageVersion"> <el-form-item label="服务期限:" prop="packageVersion">
<span>{{ formdetail.packageTermAndUnit }}</span> <span>{{ formdetail.packageTermAndUnit }}</span>
@ -763,8 +771,8 @@ export default {
querydisease: { querydisease: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
diseaseTypeName:null, diseaseTypeName: null,
departmentId:null, departmentId: null,
}, },
listdisease: [], listdisease: [],
diseasetotal: 0, diseasetotal: 0,
@ -1021,7 +1029,7 @@ export default {
serviccontent(serviceWayId).then(response => { serviccontent(serviceWayId).then(response => {
this.optionscontent = response.rows; this.optionscontent = response.rows;
}); });
this.form.voList.serviceContent=''; this.form.voList.serviceContent = '';
}, },
// //
changcontent(e) { changcontent(e) {
@ -1046,7 +1054,6 @@ export default {
let sum = 0; let sum = 0;
this.DepartmentoList.forEach((item) => { this.DepartmentoList.forEach((item) => {
if (item.countNum != null) { if (item.countNum != null) {
console.log(item.countNum)
sum += item.countNum; sum += item.countNum;
} }
this.count = sum; this.count = sum;
@ -1175,6 +1182,17 @@ export default {
updateBy: null, updateBy: null,
updateTime: null updateTime: null
}; };
this.optionsway=[],
//
this.optionscontent=[],
//
this.optionsfrequency=[
{
value: '',
label: ''
}
],
this.resetForm("form"); this.resetForm("form");
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
@ -1196,6 +1214,7 @@ export default {
// //
handleAdd() { handleAdd() {
this.reset(); this.reset();
this.getserviceWayList() this.getserviceWayList()
this.form = { this.form = {
voList: [ voList: [
@ -1209,8 +1228,6 @@ export default {
], ],
}; };
console.log(this.form) console.log(this.form)
this.form.whetherRelease = 0 this.form.whetherRelease = 0
this.form.packageTermUnit = '年' this.form.packageTermUnit = '年'
if (this.itemname) { if (this.itemname) {
@ -1381,7 +1398,7 @@ export default {
::v-deep .el-input-group { ::v-deep .el-input-group {
width: 204px !important; width: 204px !important;
} }
.leftserv{ .leftserv {
height: 1000px; height: 1000px;
overflow: auto; overflow: auto;
.name { .name {

View File

@ -0,0 +1,297 @@
<template>
<div>
<div class="user-info-head" :class="video.VideoPath ? 'wihi' : ''" @click="editCropper()">
<video style="width: 208px; height: 208px" v-bind:src="video.VideoPath" v-if="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 { uploadFilefm } 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 + "/manage/file/uploadFile";
this.uploadbtn = true;
this.filedata.type = this.type;
this.items = this.item;
if (this.tovideo == null) {
this.video.VideoPath = null;
} else if (this.tovideo == "") {
this.video.VideoPath = null;
} else {
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;
if (newimg == null) {
this.video.VideoPath = null;
this.videoForm.showVideoPath = null
} else if (newimg == "") {
this.video.VideoPath = null;
this.videoForm.showVideoPath = null
} else {
this.videoForm.showVideoPath = process.env.VUE_APP_BASE_API + newimg;
this.video.VideoPath = process.env.VUE_APP_BASE_API + newimg;
}
}
},
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) {
if (res.code == 200) {
this.video.VideoPath = process.env.VUE_APP_BASE_API + res.imgUrl;
this.$emit("imgUrl", res.imgUrl);
this.$modal.msgSuccess("上传视频成功");
this.openimg = false;
} else {
this.$message.error(res.msg);
}
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;
uploadFilefm(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>