修改
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) {
|
export function posts(data) {
|
||||||
return request({
|
return request({
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -151,7 +151,7 @@
|
|||||||
:limit.sync="getListByUserquery.pageSize"
|
:limit.sync="getListByUserquery.pageSize"
|
||||||
@pagination="info"
|
@pagination="info"
|
||||||
/>
|
/>
|
||||||
<!-- 新增护理站信息对话框 -->
|
<!-- 新增修改护理站信息对话框 -->
|
||||||
<el-dialog
|
<el-dialog
|
||||||
:title="title"
|
:title="title"
|
||||||
:visible.sync="open"
|
:visible.sync="open"
|
||||||
@ -265,13 +265,38 @@
|
|||||||
maxlength="11"
|
maxlength="11"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="排序" prop="sort">
|
<el-form-item label="护理机构分类" required>
|
||||||
<el-input
|
<template>
|
||||||
placeholder="请输入排序"
|
<el-button
|
||||||
v-model="form.sort"
|
type=""
|
||||||
oninput="value=value.replace(/[^\d]/g,'')"
|
style="
|
||||||
maxLength="10"
|
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>
|
||||||
<el-form-item label="负责人" prop="dutyPerson">
|
<el-form-item label="负责人" prop="dutyPerson">
|
||||||
<el-input
|
<el-input
|
||||||
@ -287,6 +312,70 @@
|
|||||||
maxlength="11"
|
maxlength="11"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</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-form-item label="护理站总概述" prop="nurseStationDescription">
|
||||||
<el-input
|
<el-input
|
||||||
style="width: 540px"
|
style="width: 540px"
|
||||||
@ -298,7 +387,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="护理站简介" prop="agencyIntroduce">
|
<el-form-item label="护理站简介" prop="agencyIntroduce">
|
||||||
<editor
|
<editor
|
||||||
@imgs="imgs"
|
@imgs="imgs"
|
||||||
:min-height="62"
|
:min-height="62"
|
||||||
style="width: 90%; margin: 0 auto"
|
style="width: 90%; margin: 0 auto"
|
||||||
v-model="form.agencyIntroduce"
|
v-model="form.agencyIntroduce"
|
||||||
@ -379,6 +468,88 @@
|
|||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</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
|
<el-dialog
|
||||||
:title="upload.title"
|
:title="upload.title"
|
||||||
|
|||||||
@ -96,6 +96,7 @@ export default {
|
|||||||
title: "",
|
title: "",
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
|
Classifyshow: false,
|
||||||
//权限查询
|
//权限查询
|
||||||
getListByUserquery: {
|
getListByUserquery: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
@ -284,6 +285,13 @@ export default {
|
|||||||
sort: null,
|
sort: null,
|
||||||
nurseStationLabelList: [],
|
nurseStationLabelList: [],
|
||||||
streetCode: null,
|
streetCode: null,
|
||||||
|
openingHoursDescribe: null,
|
||||||
|
afternoonOpenStartTime: null, //下午开始
|
||||||
|
afternoonOpenEndTime: null, //下午结束
|
||||||
|
morningOpenEndTime: null, //上午结束
|
||||||
|
morningOpenStartTime: null, //上午开始
|
||||||
|
nurseStationClassifyIds: null,
|
||||||
|
classifyNameList: '请选择护理站所属机构分类',
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
@ -360,6 +368,10 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm() {
|
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.nurseStationLabelList = this.looknurseStationLabel;
|
||||||
this.form.nurseStationType = this.nurseStationType2;
|
this.form.nurseStationType = this.nurseStationType2;
|
||||||
console.log(this.form);
|
console.log(this.form);
|
||||||
|
|||||||
@ -2,15 +2,25 @@
|
|||||||
<div>
|
<div>
|
||||||
<div
|
<div
|
||||||
class="user-info-head"
|
class="user-info-head"
|
||||||
|
:class="video.VideoPath ? 'wihi' : ''"
|
||||||
@click="editCropper()"
|
@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
|
<img
|
||||||
v-if="options.img"
|
v-if="options.img"
|
||||||
v-bind:src="options.img"
|
v-bind:src="options.img"
|
||||||
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"
|
||||||
@ -24,7 +34,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-dialog
|
<el-dialog
|
||||||
title="上传图片"
|
:title="title"
|
||||||
:visible.sync="openimg"
|
:visible.sync="openimg"
|
||||||
width="950px"
|
width="950px"
|
||||||
append-to-body
|
append-to-body
|
||||||
@ -47,6 +57,15 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :md="12" :style="{ height: '350px' }">
|
<el-col :xs="24" :md="12" :style="{ height: '350px' }">
|
||||||
<div class="avatar-upload-preview">
|
<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
|
<img
|
||||||
style="width: 100%; height: 100%"
|
style="width: 100%; height: 100%"
|
||||||
v-if="previews.url"
|
v-if="previews.url"
|
||||||
@ -54,7 +73,9 @@
|
|||||||
/>
|
/>
|
||||||
<div v-else></div>
|
<div v-else></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="title">请上传图片为800x800px的正方形</div>
|
<div class="title" v-if="types != 'posterVideoUrl'">
|
||||||
|
请上传图片为800x800px的正方形
|
||||||
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<br />
|
<br />
|
||||||
@ -113,7 +134,11 @@
|
|||||||
<script>
|
<script>
|
||||||
import { VueCropper } from "vue-cropper";
|
import { VueCropper } from "vue-cropper";
|
||||||
import baseurl from "@/api/baseurl.js";
|
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 {
|
export default {
|
||||||
components: { VueCropper },
|
components: { VueCropper },
|
||||||
@ -128,7 +153,7 @@ export default {
|
|||||||
// 是否显示cropper
|
// 是否显示cropper
|
||||||
visible: false,
|
visible: false,
|
||||||
// 弹出层标题
|
// 弹出层标题
|
||||||
title: "上传头像",
|
title: "上传图片/视频",
|
||||||
options: {
|
options: {
|
||||||
img: null, //裁剪图片的地址
|
img: null, //裁剪图片的地址
|
||||||
autoCrop: true, // 是否默认生成截图框
|
autoCrop: true, // 是否默认生成截图框
|
||||||
@ -138,6 +163,13 @@ export default {
|
|||||||
},
|
},
|
||||||
previews: {},
|
previews: {},
|
||||||
items: {},
|
items: {},
|
||||||
|
//显示上传按钮
|
||||||
|
videoForm: {
|
||||||
|
showVideoPath: "", //回显的变量
|
||||||
|
},
|
||||||
|
video: {
|
||||||
|
VideoPath: null, //回显的变量
|
||||||
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@ -150,6 +182,11 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.options.img = baseurl + this.img;
|
this.options.img = baseurl + this.img;
|
||||||
}
|
}
|
||||||
|
if (this.types == "posterVideoUrl") {
|
||||||
|
this.title = "上传视频";
|
||||||
|
} else {
|
||||||
|
this.title = "上传图片";
|
||||||
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
item: {
|
item: {
|
||||||
@ -200,18 +237,29 @@ export default {
|
|||||||
},
|
},
|
||||||
// 上传预处理
|
// 上传预处理
|
||||||
beforeUpload(file) {
|
beforeUpload(file) {
|
||||||
if (file.type.indexOf("image/") == -1) {
|
if (this.types == "posterVideoUrl") {
|
||||||
this.$modal.msgError(
|
|
||||||
"文件格式错误,请上传图片类型,如:JPG,PNG后缀的文件。"
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
const reader = new FileReader();
|
const reader = new FileReader();
|
||||||
this.previews.data = file;
|
this.previews.data = file;
|
||||||
this.previews.url = URL.createObjectURL(file);
|
this.previews.url = URL.createObjectURL(file);
|
||||||
|
this.videoForm.showVideoPath = URL.createObjectURL(file);
|
||||||
reader.readAsDataURL(file);
|
reader.readAsDataURL(file);
|
||||||
reader.onload = () => {
|
reader.onload = () => {
|
||||||
// this.options.img = reader.result;
|
// 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) {
|
if (this.previews.data) {
|
||||||
formData.append("file", this.previews.data);
|
formData.append("file", this.previews.data);
|
||||||
formData.append("type", this.types);
|
formData.append("type", this.types);
|
||||||
updateNurseStationHeads(formData).then((response) => {
|
if (this.types == "posterVideoUrl") {
|
||||||
this.options.img = baseurl + response.imgUrl;
|
updatePoserHeads(formData).then((response) => {
|
||||||
this.$emit("imgUrl", response.imgUrl);
|
this.video.VideoPath = baseurl + response.imgUrl;
|
||||||
if (this.types == "attributePitureUrl") {
|
this.$emit("imgUrl", response.imgUrl);
|
||||||
this.items.attributePitureUrl = response.imgUrl;
|
this.openimg = false;
|
||||||
this.$emit("item", JSON.stringify(this.items));
|
});
|
||||||
}
|
} else {
|
||||||
if (this.types == "nurseItemClassifyUrl") {
|
updateNurseStationHeads(formData).then((response) => {
|
||||||
this.items.classifyPictureUrl = response.imgUrl;
|
this.options.img = baseurl + response.imgUrl;
|
||||||
this.$emit("item", JSON.stringify(this.items));
|
this.$emit("imgUrl", response.imgUrl);
|
||||||
}
|
if (this.types == "attributePitureUrl") {
|
||||||
if (this.types == "nurseStationClassifyUrl") {
|
this.items.attributePitureUrl = response.imgUrl;
|
||||||
this.items.classifyPictureUrl = response.imgUrl;
|
this.$emit("item", JSON.stringify(this.items));
|
||||||
this.$emit("item", JSON.stringify(this.items));
|
}
|
||||||
}
|
if (this.types == "nurseItemClassifyUrl") {
|
||||||
this.openimg = false;
|
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 {
|
} else {
|
||||||
this.openimg = false;
|
this.openimg = false;
|
||||||
}
|
}
|
||||||
@ -274,8 +334,9 @@ export default {
|
|||||||
.user-info-head {
|
.user-info-head {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
height: 120px;
|
|
||||||
background: #fafafa;
|
background: #fafafa;
|
||||||
|
width: 100px;
|
||||||
|
height: 100px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.user-info-head:hover:after {
|
.user-info-head:hover:after {
|
||||||
@ -295,4 +356,11 @@ export default {
|
|||||||
line-height: 110px;
|
line-height: 110px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
|
.wihi {
|
||||||
|
width: 100px;
|
||||||
|
height: 100px;
|
||||||
|
}
|
||||||
|
.wihi:hover:after {
|
||||||
|
transform: translate(50%, 50%);
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user