修改
This commit is contained in:
parent
203fdcab5e
commit
1d4f6cb4e6
@ -9,8 +9,16 @@ export function updateNurseStationHeads(data) {
|
||||
})
|
||||
}
|
||||
|
||||
//海报视频上传
|
||||
|
||||
|
||||
export function updatePoserHeads(data) {
|
||||
return request({
|
||||
url: '/system/poser/updatePoserHeads',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function posts(data) {
|
||||
return request({
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -151,7 +151,7 @@
|
||||
:limit.sync="getListByUserquery.pageSize"
|
||||
@pagination="info"
|
||||
/>
|
||||
<!-- 新增护理站信息对话框 -->
|
||||
<!-- 新增修改护理站信息对话框 -->
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="open"
|
||||
@ -265,13 +265,38 @@
|
||||
maxlength="11"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="排序" prop="sort">
|
||||
<el-input
|
||||
placeholder="请输入排序"
|
||||
v-model="form.sort"
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
maxLength="10"
|
||||
/>
|
||||
<el-form-item label="护理机构分类" required>
|
||||
<template>
|
||||
<el-button
|
||||
type=""
|
||||
style="
|
||||
width: 208px;
|
||||
text-align: left;
|
||||
height: 36px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
color: #c0c4cc;
|
||||
margin-top: -10px;
|
||||
"
|
||||
v-if="form.classifyNameList == '请选择护理站所属机构分类'"
|
||||
>{{ form.classifyNameList }}</el-button
|
||||
>
|
||||
<el-button
|
||||
type=""
|
||||
style="
|
||||
width: 208px;
|
||||
text-align: left;
|
||||
height: 36px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
margin-top: -10px;
|
||||
"
|
||||
v-else
|
||||
>{{ form.classifyNameList }}</el-button
|
||||
>
|
||||
</template>
|
||||
</el-form-item>
|
||||
<el-form-item label="负责人" prop="dutyPerson">
|
||||
<el-input
|
||||
@ -287,6 +312,70 @@
|
||||
maxlength="11"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="排序" prop="sort">
|
||||
<el-input
|
||||
placeholder="请输入排序"
|
||||
v-model="form.sort"
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
maxLength="10"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="营业概述" prop="openingHoursDescribe">
|
||||
<el-input
|
||||
style="width: 208px"
|
||||
v-model="form.openingHoursDescribe"
|
||||
placeholder="请输入护理站营业概述"
|
||||
maxlength="150"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="上午营业时间" prop="morningOpenStartTime">
|
||||
<el-time-select
|
||||
style="width: 208px"
|
||||
placeholder="上午营业开始时间"
|
||||
v-model="form.morningOpenStartTime"
|
||||
:picker-options="{
|
||||
start: '07:00',
|
||||
step: '00:30',
|
||||
end: '14:00',
|
||||
}"
|
||||
>
|
||||
</el-time-select>
|
||||
<el-time-select
|
||||
style="width: 208px; margin-left: 10px"
|
||||
placeholder="上午营业结束时间"
|
||||
v-model="form.morningOpenEndTime"
|
||||
:picker-options="{
|
||||
start: '08:00',
|
||||
step: '00:30',
|
||||
end: '14:30',
|
||||
}"
|
||||
>
|
||||
</el-time-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="下午营业时间" prop="afternoonOpenStartTime">
|
||||
<el-time-select
|
||||
style="width: 208px"
|
||||
placeholder="下午营业开始时间"
|
||||
v-model="form.afternoonOpenStartTime"
|
||||
:picker-options="{
|
||||
start: '12:00',
|
||||
step: '00:30',
|
||||
end: '18:00',
|
||||
}"
|
||||
>
|
||||
</el-time-select>
|
||||
<el-time-select
|
||||
style="width: 208px; margin-left: 10px"
|
||||
placeholder="下午营业结束时间"
|
||||
v-model="form.afternoonOpenEndTime"
|
||||
:picker-options="{
|
||||
start: '13:00',
|
||||
step: '00:30',
|
||||
end: '20:00',
|
||||
}"
|
||||
>
|
||||
</el-time-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="护理站总概述" prop="nurseStationDescription">
|
||||
<el-input
|
||||
style="width: 540px"
|
||||
@ -298,7 +387,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="护理站简介" prop="agencyIntroduce">
|
||||
<editor
|
||||
@imgs="imgs"
|
||||
@imgs="imgs"
|
||||
:min-height="62"
|
||||
style="width: 90%; margin: 0 auto"
|
||||
v-model="form.agencyIntroduce"
|
||||
@ -379,6 +468,88 @@
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 护理分类 -->
|
||||
<!-- <el-dialog
|
||||
title="选择护理机构分类"
|
||||
:visible.sync="Classifyshow"
|
||||
width="1100px"
|
||||
append-to-body
|
||||
:before-close="cancelClassifyshow"
|
||||
>
|
||||
<el-form :model="classifyquery" label-width="150px" :inline="true">
|
||||
<el-form-item label="护理机构分类编码" prop="classifyCode">
|
||||
<el-input
|
||||
v-model="classifyquery.classifyCode"
|
||||
placeholder="请输入护理机构分类编码"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="护理机构分类名称" prop="classifyName">
|
||||
<el-input
|
||||
v-model="classifyquery.classifyName"
|
||||
placeholder="请输入护理机构分类名称"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="classifylistInfo"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button
|
||||
icon="el-icon-refresh"
|
||||
size="mini"
|
||||
@click="classifylistcancel"
|
||||
>重置</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="classifylist"
|
||||
@cell-dblclick="choiceclassify"
|
||||
>
|
||||
<el-table-column label="请选择" width="70" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
style="width: 15px; height: 15px"
|
||||
circle
|
||||
@click="choiceclassify(scope.row)"
|
||||
v-if="form.nurseStationItem.nurseClassifyId == scope.row.id"
|
||||
></el-button>
|
||||
|
||||
<el-button
|
||||
style="width: 15px; height: 15px"
|
||||
circle
|
||||
v-else
|
||||
@click="choiceclassify(scope.row)"
|
||||
>
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
property="classifyCode"
|
||||
label="护理项目分类编码"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
property="classifyName"
|
||||
label="护理项目分类名称"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="classifytotal > 0"
|
||||
:total="classifytotal"
|
||||
:page.sync="classifyquery.pageNum"
|
||||
:limit.sync="classifyquery.pageSize"
|
||||
@pagination="classifylistInfo"
|
||||
/>
|
||||
</el-dialog> -->
|
||||
<!-- //导入 -->
|
||||
<el-dialog
|
||||
:title="upload.title"
|
||||
|
||||
@ -96,6 +96,7 @@ export default {
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
Classifyshow: false,
|
||||
//权限查询
|
||||
getListByUserquery: {
|
||||
pageNum: 1,
|
||||
@ -284,6 +285,13 @@ export default {
|
||||
sort: null,
|
||||
nurseStationLabelList: [],
|
||||
streetCode: null,
|
||||
openingHoursDescribe: null,
|
||||
afternoonOpenStartTime: null, //下午开始
|
||||
afternoonOpenEndTime: null, //下午结束
|
||||
morningOpenEndTime: null, //上午结束
|
||||
morningOpenStartTime: null, //上午开始
|
||||
nurseStationClassifyIds: null,
|
||||
classifyNameList: '请选择护理站所属机构分类',
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
@ -360,6 +368,10 @@ export default {
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.form.afternoonOpenStartTime = this.form.afternoonOpenStartTime + ':00'
|
||||
this.form.afternoonOpenEndTime = this.form.afternoonOpenEndTime + ':00'
|
||||
this.form.morningOpenEndTime = this.form.morningOpenEndTime + ':00'
|
||||
this.form.morningOpenStartTime = this.form.morningOpenStartTime + ':00'
|
||||
this.form.nurseStationLabelList = this.looknurseStationLabel;
|
||||
this.form.nurseStationType = this.nurseStationType2;
|
||||
console.log(this.form);
|
||||
|
||||
@ -2,15 +2,25 @@
|
||||
<div>
|
||||
<div
|
||||
class="user-info-head"
|
||||
:class="video.VideoPath ? 'wihi' : ''"
|
||||
@click="editCropper()"
|
||||
style="width: 100px; height: 100px"
|
||||
>
|
||||
<video
|
||||
style="width: 208px; height: 208px"
|
||||
v-if="video.VideoPath"
|
||||
v-bind:src="video.VideoPath"
|
||||
class="avatar video-avatar"
|
||||
controls="controls"
|
||||
>
|
||||
您的浏览器不支持视频播放
|
||||
</video>
|
||||
<img
|
||||
v-if="options.img"
|
||||
v-bind:src="options.img"
|
||||
title="点击上传图片"
|
||||
style="width: 100px; height: 100px; line-height: 200px"
|
||||
/>
|
||||
|
||||
<i
|
||||
v-else
|
||||
class="el-icon-plus avatar-uploader-icon"
|
||||
@ -24,7 +34,7 @@
|
||||
</div>
|
||||
|
||||
<el-dialog
|
||||
title="上传图片"
|
||||
:title="title"
|
||||
:visible.sync="openimg"
|
||||
width="950px"
|
||||
append-to-body
|
||||
@ -47,6 +57,15 @@
|
||||
</el-col>
|
||||
<el-col :xs="24" :md="12" :style="{ height: '350px' }">
|
||||
<div class="avatar-upload-preview">
|
||||
<video
|
||||
style="width: 100%; height: 100%"
|
||||
v-if="videoForm.showVideoPath != ''"
|
||||
v-bind:src="videoForm.showVideoPath"
|
||||
class="avatar video-avatar"
|
||||
controls="controls"
|
||||
>
|
||||
您的浏览器不支持视频播放
|
||||
</video>
|
||||
<img
|
||||
style="width: 100%; height: 100%"
|
||||
v-if="previews.url"
|
||||
@ -54,7 +73,9 @@
|
||||
/>
|
||||
<div v-else></div>
|
||||
</div>
|
||||
<div class="title">请上传图片为800x800px的正方形</div>
|
||||
<div class="title" v-if="types != 'posterVideoUrl'">
|
||||
请上传图片为800x800px的正方形
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<br />
|
||||
@ -113,7 +134,11 @@
|
||||
<script>
|
||||
import { VueCropper } from "vue-cropper";
|
||||
import baseurl from "@/api/baseurl.js";
|
||||
import { updateNurseStationHeads, posts } from "@/api/system/stationAvatar.js";
|
||||
import {
|
||||
updateNurseStationHeads,
|
||||
posts,
|
||||
updatePoserHeads,
|
||||
} from "@/api/system/stationAvatar.js";
|
||||
|
||||
export default {
|
||||
components: { VueCropper },
|
||||
@ -128,7 +153,7 @@ export default {
|
||||
// 是否显示cropper
|
||||
visible: false,
|
||||
// 弹出层标题
|
||||
title: "上传头像",
|
||||
title: "上传图片/视频",
|
||||
options: {
|
||||
img: null, //裁剪图片的地址
|
||||
autoCrop: true, // 是否默认生成截图框
|
||||
@ -138,6 +163,13 @@ export default {
|
||||
},
|
||||
previews: {},
|
||||
items: {},
|
||||
//显示上传按钮
|
||||
videoForm: {
|
||||
showVideoPath: "", //回显的变量
|
||||
},
|
||||
video: {
|
||||
VideoPath: null, //回显的变量
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@ -150,6 +182,11 @@ export default {
|
||||
} else {
|
||||
this.options.img = baseurl + this.img;
|
||||
}
|
||||
if (this.types == "posterVideoUrl") {
|
||||
this.title = "上传视频";
|
||||
} else {
|
||||
this.title = "上传图片";
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
item: {
|
||||
@ -200,18 +237,29 @@ export default {
|
||||
},
|
||||
// 上传预处理
|
||||
beforeUpload(file) {
|
||||
if (file.type.indexOf("image/") == -1) {
|
||||
this.$modal.msgError(
|
||||
"文件格式错误,请上传图片类型,如:JPG,PNG后缀的文件。"
|
||||
);
|
||||
} else {
|
||||
if (this.types == "posterVideoUrl") {
|
||||
const reader = new FileReader();
|
||||
this.previews.data = file;
|
||||
this.previews.url = URL.createObjectURL(file);
|
||||
this.videoForm.showVideoPath = URL.createObjectURL(file);
|
||||
reader.readAsDataURL(file);
|
||||
reader.onload = () => {
|
||||
// this.options.img = reader.result;
|
||||
};
|
||||
} else {
|
||||
if (file.type.indexOf("image/") == -1) {
|
||||
this.$modal.msgError(
|
||||
"文件格式错误,请上传图片类型,如:JPG,PNG后缀的文件。"
|
||||
);
|
||||
} else {
|
||||
const reader = new FileReader();
|
||||
this.previews.data = file;
|
||||
this.previews.url = URL.createObjectURL(file);
|
||||
reader.readAsDataURL(file);
|
||||
reader.onload = () => {
|
||||
// this.options.img = reader.result;
|
||||
};
|
||||
}
|
||||
}
|
||||
},
|
||||
// 上传图片
|
||||
@ -220,23 +268,35 @@ export default {
|
||||
if (this.previews.data) {
|
||||
formData.append("file", this.previews.data);
|
||||
formData.append("type", this.types);
|
||||
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 (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));
|
||||
}
|
||||
this.openimg = false;
|
||||
});
|
||||
if (this.types == "posterVideoUrl") {
|
||||
updatePoserHeads(formData).then((response) => {
|
||||
this.video.VideoPath = baseurl + response.imgUrl;
|
||||
this.$emit("imgUrl", response.imgUrl);
|
||||
this.openimg = false;
|
||||
});
|
||||
} 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 (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.classifyPictureUrl = response.imgUrl;
|
||||
this.$emit("item", JSON.stringify(this.items));
|
||||
}
|
||||
this.openimg = false;
|
||||
});
|
||||
}
|
||||
} else {
|
||||
this.openimg = false;
|
||||
}
|
||||
@ -274,8 +334,9 @@ export default {
|
||||
.user-info-head {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
height: 120px;
|
||||
background: #fafafa;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
.user-info-head:hover:after {
|
||||
@ -295,4 +356,11 @@ export default {
|
||||
line-height: 110px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.wihi {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
.wihi:hover:after {
|
||||
transform: translate(50%, 50%);
|
||||
}
|
||||
</style>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user