修改提交

This commit is contained in:
曹辉 2023-04-27 16:17:41 +08:00
parent 54c84d1916
commit 2ec2f6440a
3 changed files with 28 additions and 49 deletions

View File

@ -8,5 +8,6 @@ ENV = 'development'
# VUE_APP_BASE_API = '/dev-api'
VUE_APP_BASE_API = 'http://192.168.16.76:8080'
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true

View File

@ -5,4 +5,4 @@ VUE_APP_TITLE = 泉医到家运营管理平台
ENV = 'production'
# 泉医到家运营管理平台/生产环境
VUE_APP_BASE_API = 'http://192.168.16.76:8080'
VUE_APP_BASE_API = 'http://192.168.16.30:8088'

View File

@ -1,19 +1,13 @@
<template>
<div>
<div
class="user-info-head"
:class="video.VideoPath ? 'wihi' : ''"
@click="editCropper()"
>
<div class="user-info-head" :class="video.VideoPath ? 'wihi' : ''" @click="editCropper()">
<video
style="width: 208px; height: 208px"
v-if="video.VideoPath"
v-bind:src="video.VideoPath"
class="avatar video-avatar"
controls="controls"
>
您的浏览器不支持视频播放
</video>
>您的浏览器不支持视频播放</video>
<img
v-if="options.img"
v-bind:src="options.img"
@ -31,7 +25,6 @@
"
></i>
</div>
<el-dialog
:title="title"
:visible.sync="openimg"
@ -62,14 +55,8 @@
v-bind:src="videoForm.showVideoPath"
class="avatar video-avatar"
controls="controls"
>
您的浏览器不支持视频播放
</video>
<img
style="width: 100%; height: 100%"
v-if="previews.url"
:src="previews.url"
/>
>您的浏览器不支持视频播放</video>
<img style="width: 100%; height: 100%" v-if="previews.url" :src="previews.url" />
<div v-else></div>
</div>
<div
@ -79,9 +66,7 @@
types != 'posterPictureUrl' &&
types != 'itemDirectoryUrl'
"
>
请上传图片为800x800px的正方形
</div>
>请上传图片为800x800px的正方形</div>
</el-col>
</el-row>
<br />
@ -128,16 +113,8 @@
></el-button>
</el-col>-->
<el-col :lg="{ span: 2, offset: 19 }" :md="2">
<el-button
v-if="uploadbtn"
type="primary"
size="small"
@click="uploadImg()"
> </el-button
>
<el-button v-else :loading="!uploadbtn" type="primary" size="small"
> ...</el-button
>
<el-button v-if="uploadbtn" type="primary" size="small" @click="uploadImg()"> </el-button>
<el-button v-else :loading="!uploadbtn" type="primary" size="small"> ...</el-button>
</el-col>
</el-row>
</el-dialog>
@ -153,7 +130,7 @@ import {
uploadVideoUrl,
uploadTrainingCategoryPicture,
updatePoserHeads,
uploadUrl,
uploadUrl
} from "@/api/system/stationAvatar.js";
export default {
@ -175,17 +152,17 @@ export default {
autoCrop: true, //
autoCropWidth: 300, //
autoCropHeight: 300, //
fixedBox: true, //
fixedBox: true //
},
previews: {},
items: {},
//
videoForm: {
showVideoPath: null, //
showVideoPath: null //
},
video: {
VideoPath: null, //
},
VideoPath: null //
}
};
},
created() {
@ -213,12 +190,12 @@ export default {
},
watch: {
tovideo: {
handler(newimg, oldimg) {},
handler(newimg, oldimg) {}
},
item: {
handler(newimg, oldimg) {
this.items = this.item;
},
}
},
img: {
handler(newimg, oldimg) {
@ -229,13 +206,13 @@ export default {
} else {
this.options.img = baseurl + this.img;
}
},
}
},
type: {
handler(newimg, oldimg) {
this.types = this.type;
},
},
}
}
},
methods: {
//
@ -298,7 +275,7 @@ export default {
if (this.types == "itemDirectoryUrl") {
this.$modal.msgSuccess("上传视频中,请耐心等待");
this.uploadbtn = false;
uploadVideoUrl(formData).then((response) => {
uploadVideoUrl(formData).then(response => {
if (response.code == 200) {
this.video.VideoPath = baseurl + response.imgUrl;
this.$emit("imgUrl", response.imgUrl);
@ -307,10 +284,11 @@ export default {
this.openimg = false;
} else {
this.$emit("item", "false");
setTimeout((e) => {
setTimeout(e => {
this.openimg = false;
}, 1000);
}
this.videoForm.showVideoPath = null;
this.uploadbtn = true;
});
} else if (
@ -318,25 +296,25 @@ export default {
this.types == "trainingItemContentUrl" ||
this.types == "trainingItemPosterUrl"
) {
uploadUrl(formData).then((response) => {
uploadUrl(formData).then(response => {
this.options.img = baseurl + response.imgUrl;
this.$emit("imgUrl", response.imgUrl);
this.openimg = false;
});
} else if (this.types == "trainingCategoryPictureUrl") {
uploadTrainingCategoryPicture(formData).then((response) => {
uploadTrainingCategoryPicture(formData).then(response => {
this.options.img = baseurl + response.imgUrl;
this.$emit("imgUrl", response.imgUrl);
this.openimg = false;
});
} else if (this.types == "posterVideoUrl") {
updatePoserHeads(formData).then((response) => {
updatePoserHeads(formData).then(response => {
this.video.VideoPath = baseurl + response.imgUrl;
this.$emit("imgUrl", response.imgUrl);
this.openimg = false;
});
} else {
updateNurseStationHeads(formData).then((response) => {
updateNurseStationHeads(formData).then(response => {
this.options.img = baseurl + response.imgUrl;
this.$emit("imgUrl", response.imgUrl);
if (this.types == "attributePitureUrl") {
@ -378,8 +356,8 @@ export default {
closeDialog() {
this.imgs = "";
this.visible = false;
},
},
}
}
};
</script>
<style scoped lang="scss">