Commit 004a9cd5 authored by youjie's avatar youjie

no message

parent cc7de4ea
...@@ -97,7 +97,8 @@ ...@@ -97,7 +97,8 @@
<el-col :span="8"> <el-col :span="8">
<el-form-item label="Web LOGO" style="margin-bottom: 0;"> <el-form-item label="Web LOGO" style="margin-bottom: 0;">
<div class="webSliderDiv" style="width:100px;height:100px;"> <div class="webSliderDiv" style="width:100px;height:100px;">
<el-upload :http-request="UploadAttachmentLogo" :multiple="true" <el-upload :http-request="UploadAttachmentLogo"
:multiple="true"
accept="image/jpeg,image/gif,image/png,image/bmp" :show-file-list="false" action=""> accept="image/jpeg,image/gif,image/png,image/bmp" :show-file-list="false" action="">
<img v-if="plugData.Logo" :src="plugData.Logo" class="web_imgUrl" alt="" /> <img v-if="plugData.Logo" :src="plugData.Logo" class="web_imgUrl" alt="" />
<div class="addIconDiv"> <div class="addIconDiv">
...@@ -154,7 +155,9 @@ ...@@ -154,7 +155,9 @@
<td rowspan="2"> <td rowspan="2">
<el-form-item :label="$t('objFill.v101.fengmian')+(index+1)" style="margin-bottom: 0;"> <el-form-item :label="$t('objFill.v101.fengmian')+(index+1)" style="margin-bottom: 0;">
<div class="webSliderDiv" @click="menuIndex=index"> <div class="webSliderDiv" @click="menuIndex=index">
<el-upload :http-request="UploadAttachment" :multiple="false" :accept="getAccept(item.FileType)" <el-upload :http-request="UploadAttachment"
:before-upload="beforeUploadVideo"
:multiple="false" :accept="getAccept(item.FileType)"
:show-file-list="false" action=""> :show-file-list="false" action="">
<img v-if="item.FileType==1&&item.FileUrl" :src="item.FileUrl" class="web_imgUrl" alt="" /> <img v-if="item.FileType==1&&item.FileUrl" :src="item.FileUrl" class="web_imgUrl" alt="" />
<video v-if="item.FileType==2&&item.FileUrl" :src="item.FileUrl" class="web_imgUrl" <video v-if="item.FileType==2&&item.FileUrl" :src="item.FileUrl" class="web_imgUrl"
...@@ -421,29 +424,49 @@ ...@@ -421,29 +424,49 @@
} }
}); });
}, },
beforeUploadVideo: function (file) { // 视频验证
const isLt10M = file.size / 1024 / 1024 < 10;
if (['video/mp4', 'video/ogg', 'video/flv', 'video/avi', 'video/wmv', 'video/rmvb'].indexOf(file.type) === -
1) {
this.$message.error(this.$t('objFill.qingsczqdspgs'));
return false;
}
if (!isLt10M) {
this.$message.error(this.$t('objFill.shngcspbncgs'));
return false;
}
},
//上传图片 //上传图片
UploadAttachment(file,type) { UploadAttachment(file,type) {
let newArr = []; let newArr = [];
newArr.push(file.file); newArr.push(file.file);
var path = "/Upload/WebSite/"; var path = "/Upload/WebSite/";
this.$message.info(this.$t('tips.shangchuanzhong')) this.$message.info(this.$t('tips.shangchuanzhong'))
if(this.plugData.MenuList[this.menuIndex].FileType==1){ console.log(this.plugData.MenuList[this.menuIndex].FileUrl,'-----11111')
console.log(this.plugData.MenuList[this.menuIndex].FileUrl,'-----11111') this.UploadSelfFileT(path, newArr, x => {
this.UploadSelfFileT(path, newArr, x => { var str = x.data.FilePath;
var str = x.data.FilePath; var imgUrl = this.domainManager().ViittoFileUrl + str;
var imgUrl = this.domainManager().ViittoFileUrl + str; this.plugData.MenuList[this.menuIndex].FileUrl = imgUrl;
this.plugData.MenuList[this.menuIndex].FileUrl = imgUrl; this.$message.success(this.$t('tips.scchenggong'));
this.$message.success(this.$t('tips.scchenggong')); },2);
});
}else{ // if(this.plugData.MenuList[this.menuIndex].FileType==1){
console.log(this.plugData.MenuList[this.menuIndex].FileUrl,'-----22222') // console.log(this.plugData.MenuList[this.menuIndex].FileUrl,'-----11111')
this.UploadFileToAli2024(path, newArr, x => { // this.UploadSelfFileT(path, newArr, x => {
var str = x.data.FilePath; // var str = x.data.FilePath;
var imgUrl = this.domainManager().ViittoFileUrl + str; // var imgUrl = this.domainManager().ViittoFileUrl + str;
this.plugData.MenuList[this.menuIndex].FileUrl = imgUrl; // this.plugData.MenuList[this.menuIndex].FileUrl = imgUrl;
this.$message.success(this.$t('tips.scchenggong')); // this.$message.success(this.$t('tips.scchenggong'));
}); // },2);
} // }else{
// console.log(this.plugData.MenuList[this.menuIndex].FileUrl,'-----22222')
// this.UploadFileToAli2024(path, newArr, x => {
// var str = x.data.FilePath;
// var imgUrl = this.domainManager().ViittoFileUrl + str;
// this.plugData.MenuList[this.menuIndex].FileUrl = imgUrl;
// this.$message.success(this.$t('tips.scchenggong'));
// },2);
// }
}, },
UploadAttachment2(file) { UploadAttachment2(file) {
...@@ -456,7 +479,7 @@ ...@@ -456,7 +479,7 @@
var imgUrl = this.domainManager().ViittoFileUrl + str; var imgUrl = this.domainManager().ViittoFileUrl + str;
this.plugData.MenuList[this.menuIndex].SubMenuList[this.subMenuIndex].FileUrl = imgUrl; this.plugData.MenuList[this.menuIndex].SubMenuList[this.subMenuIndex].FileUrl = imgUrl;
this.$message.success(this.$t('tips.scchenggong')); this.$message.success(this.$t('tips.scchenggong'));
}); },2);
}, },
UploadAttachmentLogo(file) { UploadAttachmentLogo(file) {
let newArr = []; let newArr = [];
......
...@@ -290,7 +290,7 @@ ...@@ -290,7 +290,7 @@
var imgUrl = this.domainManager().ViittoFileUrl + str; var imgUrl = this.domainManager().ViittoFileUrl + str;
this.plugData.NavList[this.clickIndex].FileUrl = imgUrl; this.plugData.NavList[this.clickIndex].FileUrl = imgUrl;
this.$message.success(this.$t('tips.scchenggong')); this.$message.success(this.$t('tips.scchenggong'));
}); },2);
}, },
//显示菜单弹窗 //显示菜单弹窗
ShowMenuDialog(item) { ShowMenuDialog(item) {
......
...@@ -285,7 +285,7 @@ ...@@ -285,7 +285,7 @@
var str = x.data.FilePath; var str = x.data.FilePath;
var imgUrl = this.domainManager().ViittoFileUrl + str; var imgUrl = this.domainManager().ViittoFileUrl + str;
this.plugData.NavList[this.clickIndex].FileUrl = imgUrl; this.plugData.NavList[this.clickIndex].FileUrl = imgUrl;
}); },2);
}, },
UploadAttachmentMLogo(file) { UploadAttachmentMLogo(file) {
let newArr = []; let newArr = [];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment