Commit f51b09fb authored by 黄奎's avatar 黄奎
parents bc9fb94e c02b238f
......@@ -195,10 +195,15 @@
<div>
<q-btn flat size="xs" icon="edit"
color="accent" style="font-weight:400" label="编辑" @click="editQuotation(props.row)" />
<q-btn flat size="xs" icon="edit"
color="accent" style="font-weight:400" label="删除" @click="delActive(props.row)" />
<!-- <q-btn flat size="xs" icon="edit"
color="accent" style="font-weight:400" label="删除" @click="delActive(props.row)" /> -->
<q-btn-dropdown flat size="xs" color="dark" label="更多" style="margin-left:10px;">
<q-list>
<q-item clickable v-close-popup @click="delActive(props.row)">
<q-item-section>
<q-item-label>删除</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-close-popup @click="goUrl('/activity/activeSignUpList',props.row,1)">
<q-item-section>
<q-item-label>报名列表</q-item-label>
......@@ -326,7 +331,8 @@ import ActiveForm from '../../components/activity/active-from'
name: "LocationName",
label: "位置",
field:"LocationName",
align: "left"
align: "left",
width:80
},
{
name: "activeStutes",
......@@ -343,6 +349,7 @@ import ActiveForm from '../../components/activity/active-from'
{
name: 'optioned',
label: '操作',
required:true,
align: "left"
}
],
......
......@@ -526,8 +526,10 @@
});
},
UploadImage(file) {
this.UploadFileToTencent(this.FileType().GoodsImg, file.file, res => {
if (res.resultCode == 1) {
if (this.addpageMsg.Type == 2) {
this.addpageMsg.Image = res.FileUrl;
}
......@@ -543,6 +545,7 @@
UploadViittoFile('Edu/Video', file.file, res => {
console.log("res",res);
if (res.resultCode == 1) {
this.Success('上传成功')
that.addpageMsg.Image = res.VideoCoverImg;
that.addpageMsg.Path = res.FileUrl;
that.addpageMsg.Name = res.FileName;
......
......@@ -473,6 +473,7 @@ export default {
}
},
Vue.prototype.uploadStart = function (path, fileObj, callback) {
let that = this
var upInfo = JSON.parse(localStorage.uploadInfo);
//获取文件扩展名
var filename = fileObj.name;
......@@ -495,6 +496,7 @@ export default {
SecretId: uploadMsg.SecretId,
SecretKey: uploadMsg.SecretKey,
});
that.Info('上传中...')
cos.putObject({
Bucket: uploadMsg.Bucket,
Region: uploadMsg.Region, //存储桶所在地域,必须字段
......@@ -518,6 +520,38 @@ export default {
}
});
},
//上传至阿里云
Vue.prototype.uploadToAli = function (path, fileObj, successCall) {
var upInfo = JSON.parse(localStorage.uploadInfo);
var OSS = require('ali-oss');
var oss = new OSS({
region: upInfo.Region,
accessKeyId: upInfo.SecretId,
accessKeySecret: upInfo.SecretKey,
bucket: upInfo.Bucket
})
//获取文件扩展名
var filename = fileObj.name;
var index = filename.lastIndexOf(".");
var suffix = filename.substr(index);
var timestamp1 = Date.parse(new Date()) + "_" + (Math.ceil(Math.random() * 1000));
let str = '';
if (this.isOnline()) {
str = "/Test"
}
var newFileName = str + '/Upload/' + path + "/" + timestamp1 + "" + suffix;
this.Info('上传中...')
var result = oss.multipartUpload(newFileName, fileObj, {
progress: function* (p) { }
}).then(res => {
var uploadResult = {
resultCode: 1,
FileName: fileObj.name,
FileUrl: res.res.requestUrls[0].replace('http', 'https')
}
successCall(uploadResult);
})
},
//公用判断图片地址 判断是否包含http
Vue.prototype.getIconLink = function (url) {
let str = ''
......
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