Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ElectricitySheep
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄媛媛
ElectricitySheep
Commits
4cbf4509
Commit
4cbf4509
authored
May 20, 2024
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
文件上传修改
parent
be8e13eb
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
355 additions
and
564 deletions
+355
-564
materialMan.vue
src/components/CommodityMan/materialMan.vue
+1
-9
orderList.vue
src/components/coffeeManage/orderList.vue
+2
-20
Choosevideo.vue
src/components/global/Choosevideo.vue
+0
-10
prizeMange.vue
src/components/tradePavilion/prizeMange.vue
+322
-474
index.js
src/plug/index.js
+30
-51
No files found.
src/components/CommodityMan/materialMan.vue
View file @
4cbf4509
...
...
@@ -550,15 +550,7 @@
spinner
:
'el-icon-loading'
,
background
:
'rgba(0, 0, 0, 0.7)'
});
// this.UploadSelfFile(this.FileType().Video, file.file, res => {
// if (res.resultCode == 1) {
// that.addpageMsg.Image = res.VideoCoverImg;
// that.addpageMsg.Path = res.FileUrl;
// that.addpageMsg.Name = res.FileName;
// that.addPageList();
// that.$forceUpdate();
// }
// })
this
.
UploadFileToTencent
(
this
.
FileType
().
Video
,
file
.
file
,
res
=>
{
if
(
res
.
resultCode
==
1
)
{
if
(
that
.
addpageMsg
.
Type
==
2
)
{
...
...
src/components/coffeeManage/orderList.vue
View file @
4cbf4509
...
...
@@ -2,11 +2,7 @@
<div
class=
"orderList"
>
<div
class=
"head-title"
>
订单列表
<!--
<el-upload
class=
"upload-demo"
ref=
"upload"
:action=
"importFileUrl"
:multiple=
"true"
:on-success=
"successUpload"
:show-file-list=
"false"
accept=
".csv"
>
<el-button
:loading=
"btnLoad"
size=
"small"
type=
"primary"
>
赞羊导入
</el-button>
</el-upload>
-->
<el-button
@
click=
"dialogVisible = true"
style=
"float: right; margin-top: -5px"
size=
"small"
type=
"primary"
>
批量导出
</el-button>
<el-button
@
click=
"ClearHsz"
style=
"float: right; margin-top: -5px; margin-right: 20px"
size=
"small"
...
...
@@ -19,21 +15,7 @@
<el-date-picker
v-model=
"dateList"
@
change=
"(msg.pageIndex = 1), getList()"
size=
"small"
type=
"datetimerange"
range-separator=
"至"
value-format=
"yyyy-MM-dd HH:mm:ss"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
>
</el-date-picker>
<!--
<span
style=
"margin-left: 15px;font-size:14px"
>
所属平台:
</span>
<el-select
class=
"w120"
@
change=
"(msg.pageIndex = 1), getList()"
v-model=
"msg.OrderSource"
size=
"small"
placeholder=
"请选择"
>
<el-option
label=
"全部平台"
:value=
"0"
></el-option>
<el-option
v-for=
"item in platList"
:key=
"item.Id"
:label=
"item.Name"
:value=
"item.Id"
>
</el-option>
</el-select>
-->
<!--
<span
style=
"margin-left: 15px;font-size:14px"
>
订单类型:
</span>
<el-select
class=
"w120"
@
change=
"(msg.pageIndex = 1), getList()"
v-model=
"msg.OrderType"
size=
"small"
placeholder=
"请选择"
>
<el-option
label=
"全部订单"
:value=
"0"
></el-option>
<el-option
v-for=
"item in orderTypeList"
:key=
"item.Id"
:label=
"item.Name"
:value=
"item.Id"
>
</el-option>
</el-select>
-->
<span
style=
"margin-left: 15px;font-size:14px"
>
配送方式:
</span>
<el-select
class=
"w120"
@
change=
"(msg.pageIndex = 1), getList()"
v-model=
"msg.DeliveryMethod"
size=
"small"
placeholder=
"请选择"
>
...
...
src/components/global/Choosevideo.vue
View file @
4cbf4509
...
...
@@ -262,15 +262,6 @@
//上传视频
UploadVideo
(
file
)
{
var
that
=
this
;
// this.UploadSelfFile(this.FileType().Video, file.file, res => {
// if (res.resultCode == 1) {
// that.addpageMsg.Image = res.VideoCoverImg;
// that.addpageMsg.Path = res.FileUrl;
// that.addpageMsg.Name = res.FileName;
// that.addPageList();
// that.$forceUpdate();
// }
// })
that
.
uploadLoadingObj
=
this
.
$loading
({
lock
:
true
,
text
:
'正在上传视频,请稍后...'
,
...
...
@@ -285,7 +276,6 @@
that
.
addpageMsg
.
Path
=
res
.
FileUrl
;
that
.
addpageMsg
.
Name
=
res
.
FileName
;
that
.
cutPicture
(
res
.
FileUrl
);
//that.addPageList();
}
})
},
...
...
src/components/tradePavilion/prizeMange.vue
View file @
4cbf4509
This diff is collapsed.
Click to expand it.
src/plug/index.js
View file @
4cbf4509
...
...
@@ -200,11 +200,10 @@ export default {
if
(
upInfo
.
StoreType
==
1
)
{
var
cachaInfo
=
that
.
getLocalStorage
();
if
(
cachaInfo
&&
cachaInfo
.
TenantId
==
29
)
{
that
.
uploadStar
t
(
path
,
fileObj
,
callback
)
that
.
RealUploadToTencen
t
(
path
,
fileObj
,
callback
)
}
else
{
that
.
uploadStar
t
(
path
,
newFile
,
callback
)
that
.
RealUploadToTencen
t
(
path
,
newFile
,
callback
)
}
console
.
log
(
"cachaInfo"
,
cachaInfo
)
}
if
(
upInfo
.
StoreType
==
2
)
{
that
.
uploadToAli
(
path
,
newFile
,
callback
)
...
...
@@ -215,7 +214,7 @@ export default {
}).
catch
(
function
(
error
)
{
if
(
upInfo
&&
upInfo
.
IsDefault
==
1
)
{
if
(
upInfo
.
StoreType
==
1
)
{
that
.
uploadStar
t
(
path
,
fileObj
,
callback
)
that
.
RealUploadToTencen
t
(
path
,
fileObj
,
callback
)
}
if
(
upInfo
.
StoreType
==
2
)
{
that
.
uploadToAli
(
path
,
fileObj
,
callback
)
...
...
@@ -229,7 +228,7 @@ export default {
}
else
{
if
(
upInfo
&&
upInfo
.
IsDefault
==
1
)
{
if
(
upInfo
.
StoreType
==
1
)
{
this
.
uploadStar
t
(
path
,
fileObj
,
callback
)
this
.
RealUploadToTencen
t
(
path
,
fileObj
,
callback
)
}
if
(
upInfo
.
StoreType
==
2
)
{
this
.
uploadToAli
(
path
,
fileObj
,
callback
)
...
...
@@ -239,66 +238,46 @@ export default {
}
}
},
Vue
.
prototype
.
uploadStart
=
function
(
path
,
fileObj
,
callback
)
{
var
upInfo
=
JSON
.
parse
(
localStorage
.
uploadInfo
);
//获取文件扩展名
var
filename
=
fileObj
.
name
;
var
index
=
filename
.
lastIndexOf
(
"."
);
var
suffix
=
filename
.
substr
(
index
);
var
timestamp1
=
Date
.
parse
(
new
Date
())
+
"_"
+
(
Math
.
ceil
(
Math
.
random
()
*
1000
));
Vue
.
prototype
.
RealUploadToTencent
=
function
(
path
,
fileObj
,
callback
)
{
var
that
=
this
;
let
str
=
''
;
if
(
this
.
isOnline
())
{
str
=
"/
Test
"
if
(
!
this
.
isOnline
())
{
str
=
"/
2024
"
}
var
newFileName
=
str
+
'/Upload/'
+
path
+
"/"
+
timestamp1
+
""
+
suffix
;
var
uploadMsg
=
{
Bucket
:
upInfo
.
Bucket
,
Region
:
upInfo
.
Region
,
SecretId
:
upInfo
.
SecretId
,
SecretKey
:
upInfo
.
SecretKey
,
};
var
COS
=
require
(
'cos-js-sdk-v5'
);
var
cos
=
new
COS
({
SecretId
:
uploadMsg
.
SecretId
,
SecretKey
:
uploadMsg
.
SecretKey
,
});
cos
.
putObject
({
Bucket
:
uploadMsg
.
Bucket
,
Region
:
uploadMsg
.
Region
,
//存储桶所在地域,必须字段
Key
:
newFileName
,
//文件名
StorageClass
:
'STANDARD'
,
Body
:
fileObj
,
// 上传文件对象
onProgress
:
function
(
progressData
)
{}
},
function
(
err
,
data
)
{
if
(
data
&&
data
.
statusCode
==
200
)
{
var
uploadResult
=
{
resultCode
:
1
,
FileName
:
fileObj
.
name
,
FileUrl
:
"https://"
+
data
.
Location
}
if
(
callback
)
{
callback
(
uploadResult
);
var
newFileName
=
str
+
'/Upload/'
+
path
;
var
uploadUrl
=
that
.
domainManager
().
VTUploadUrl
+
"/Upload/UploadToTecent?isDomain=1&filePath="
+
newFileName
;
var
formData
=
new
FormData
();
formData
.
append
(
"myfile"
,
fileObj
);
that
.
$http
.
post
(
uploadUrl
,
formData
,
{})
.
then
(
res
=>
{
if
(
res
&&
res
.
data
.
StatusCode
==
1
&&
res
.
data
.
FilePath
)
{
var
uploadResult
=
{
resultCode
:
1
,
FileName
:
fileObj
.
name
,
FileUrl
:
res
.
data
.
FilePath
,
VideoCoverImg
:
that
.
domainManager
().
VTViewUrl
+
res
.
data
.
VideoCoverImg
}
if
(
callback
)
{
callback
(
uploadResult
);
}
}
}
else
{
/*上传文件异常*/
console
.
log
(
err
||
data
);
}
});
}).
catch
(
function
(
reason
)
{
console
.
log
(
reason
)
});
},
//上传至阿里云【2024-05-20转为后台上传】
Vue
.
prototype
.
uploadToAli
=
function
(
path
,
fileObj
,
successCall
)
{
var
that
=
this
;
let
str
=
''
;
if
(
this
.
isOnline
())
{
if
(
!
this
.
isOnline
())
{
str
=
"/2024"
}
var
newFileName
=
str
+
'/Upload/'
+
path
+
"/"
;
var
uploadUrl
=
that
.
domainManager
().
VTUploadUrl
+
"/Upload/UploadToALiOSS?filePath="
+
newFileName
;
var
newFileName
=
str
+
'/Upload/'
+
path
;
var
uploadUrl
=
that
.
domainManager
().
VTUploadUrl
+
"/Upload/UploadToALiOSS?
isDomain=1&
filePath="
+
newFileName
;
var
formData
=
new
FormData
();
formData
.
append
(
"myfile"
,
fileObj
);
that
.
$http
.
post
(
uploadUrl
,
formData
,
{})
.
then
(
res
=>
{
console
.
log
(
"ali_res"
,
res
);
if
(
res
&&
res
.
data
.
StatusCode
==
1
&&
res
.
data
.
FilePath
)
{
var
uploadResult
=
{
resultCode
:
1
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment