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

文件上传修改

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