Commit 52f106ce authored by 黄奎's avatar 黄奎

文件上传修改

parent 3516fae3
......@@ -177,7 +177,7 @@
<el-form-item label='公司确认章'>
<el-upload
class="avatar-uploader"
:action="importFileUrl"
:http-request="UploadImage"
:show-file-list="false"
:on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload">
......@@ -190,7 +190,7 @@
<el-form-item label='行程Logo'>
<el-upload
class="avatar-uploader"
:action="importFileUrlLogo"
:http-request="UploadImage_Logo"
:show-file-list="false"
:on-success="handleAvatarSuccessLogo"
:before-upload="beforeAvatarUpload">
......@@ -237,8 +237,6 @@
ProvinceList:[],
CityList:[],
commonDefaultSelect:0,
importFileUrl:this.domainManager().UploadFileUrl+'?cmd=User_post_FileUpload&fileType=1&fileLimit=10',
importFileUrlLogo:this.domainManager().UploadFileUrl+'?cmd=User_post_FileUpload&fileType=1&fileLimit=10',
imageUrl:'',
imageUrlLogo:'',
loading:true,
......@@ -346,6 +344,28 @@
this.getEmployee();
},
methods: {
//上传图片
UploadImage(file) {
let newArr = [];
newArr.push(file.file);
let fileName = file.file.name;
var path = "/Upload/Temporary/";
this.UploadSelfFileT(path, newArr, x => {
this.imageUrl = this.domainManager().ViittoFileUrl + x.data.FilePath;
this.addMsg.ConfirmationSignet=x.data.FilePath;
});
},
//上传图片
UploadImage_Logo(file) {
let newArr = [];
newArr.push(file.file);
let fileName = file.file.name;
var path = "/Upload/Temporary/";
this.UploadSelfFileT(path, newArr, x => {
this.imageUrlLogo = this.domainManager().ViittoFileUrl + x.data.FilePath;
this.addMsg.TravelLogo=x.data.FilePath;
});
},
handleAvatarSuccess(res, file) { //上传
if(res.resultCode==1){
var img_path = res.data.FullFilePath
......
......@@ -164,7 +164,7 @@
<el-form-item label='Logo'>
<el-upload
class="avatar-uploader"
:action="importFileUrl"
:http-request="UploadImage"
:show-file-list="false"
:on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload">
......@@ -208,7 +208,6 @@
innerVisible: false,
isRight: true,
dialogTitle: '',
importFileUrl:this.domainManager().UploadFileUrl+'?cmd=User_post_FileUpload&fileType=1&fileLimit=10',
imageUrl:'',
rules: { //表单验证
GroupName: [{
......@@ -342,6 +341,17 @@
this.getVersion();
},
methods: {
//上传图片
UploadImage(file) {
let newArr = [];
newArr.push(file.file);
let fileName = file.file.name;
var path = "/Upload/Temporary/";
this.UploadSelfFileT(path, newArr, x => {
this.imageUrl = this.domainManager().ViittoFileUrl + x.data.FilePath;
this.addMsg.Logo=x.data.FilePath;
});
},
sendVal(id){
let obj=this.versions.find(item=>item.Id===id)
if(obj)
......
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