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
931d1f05
Commit
931d1f05
authored
Sep 13, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
0d596fed
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
151 additions
and
12 deletions
+151
-12
App.vue
src/App.vue
+67
-0
billboardList.vue
src/components/tradePavilion/billboardList.vue
+78
-11
main.js
src/main.js
+6
-1
No files found.
src/App.vue
View file @
931d1f05
...
@@ -7,6 +7,73 @@
...
@@ -7,6 +7,73 @@
<
script
>
<
script
>
export
default
{
export
default
{
name
:
"App"
,
name
:
"App"
,
methods
:
{
handle
(
tag
)
{
this
.
apipost
(
"/api/Trade/GetFirstShopEnrollResultUrl"
,
{
UserFlag
:
tag
,
},
(
res
)
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
if
(
res
.
data
.
data
)
{
localStorage
.
removeItem
(
"fujianTag"
);
clearInterval
(
this
.
timer
);
this
.
$confirm
(
"有下载文件准备完成, 前往下载?"
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"info"
,
}).
then
(()
=>
{
this
.
$router
.
push
(
"/billboardList"
);
this
.
downloadFujian
(
res
.
data
.
data
);
});
}
}
else
{
this
.
$message
.
error
(
res
.
data
.
message
);
}
}
);
},
downloadFujian
(
url
)
{
let
a
=
document
.
createElement
(
"a"
);
a
.
href
=
this
.
domainManager
().
DomainUrl
+
url
;
a
.
download
=
"榜单附件.zip"
;
a
.
click
();
setTimeout
(()
=>
{
this
.
delDownloadMultiplefujian
(
url
);
},
2000
);
},
//删除附件
delDownloadMultiplefujian
(
url
)
{
this
.
apipost
(
"/api/Trade/DelFirstShopEnrollZipExport"
,
{
Url
:
url
,
},
(
res
)
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
}
else
{
this
.
$message
.
error
(
res
.
data
.
message
);
}
}
);
},
},
mounted
()
{
let
tag
=
localStorage
.
getItem
(
"fujianTag"
);
let
that
=
this
;
if
(
tag
)
{
this
.
timer
=
setInterval
(()
=>
{
setTimeout
(()
=>
{
that
.
handle
(
tag
);
},
0
);
},
5000
);
}
},
destroyed
()
{
clearInterval
(
this
.
timer
);
},
};
};
</
script
>
</
script
>
...
...
src/components/tradePavilion/billboardList.vue
View file @
931d1f05
...
@@ -23,9 +23,17 @@
...
@@ -23,9 +23,17 @@
size=
"small"
size=
"small"
type=
"primary"
type=
"primary"
:disabled=
"multipleSelection.length === 0"
:disabled=
"multipleSelection.length === 0"
@
click=
"
downloadMultiplefujian
"
@
click=
"
getDownloadMultiplefujianTag
"
:loading=
"fujianLoading"
:loading=
"fujianLoading"
>
榜单附件导出
>
{{
fujianText
}}
</el-button>
<el-button
style=
"float: right; margin-top: -5px; margin-right: 10px"
size=
"small"
type=
"primary"
@
click=
"downloadFujian(fujianUrl)"
v-if=
"showfujianbtn"
>
下载附件
</el-button>
</el-button>
</div>
</div>
</div>
</div>
...
@@ -333,9 +341,18 @@ export default {
...
@@ -333,9 +341,18 @@ export default {
ListObjectType
:
[],
//面向群体 枚举
ListObjectType
:
[],
//面向群体 枚举
multipleSelection
:
[],
//多选
multipleSelection
:
[],
//多选
fujianLoading
:
false
,
fujianLoading
:
false
,
fujianText
:
"榜单附件导出"
,
fujianUrl
:
""
,
timer
:
null
,
showfujianbtn
:
false
,
};
};
},
},
created
()
{
created
()
{
let
tag
=
localStorage
.
getItem
(
"fujianTag"
);
if
(
tag
)
{
this
.
fujianLoading
=
true
;
this
.
fujianText
=
"附件准备中,请等待"
;
}
this
.
getListType
();
//榜单类型 枚举
this
.
getListType
();
//榜单类型 枚举
this
.
getListState
();
//榜单状态 枚举
this
.
getListState
();
//榜单状态 枚举
this
.
getListObject
();
//面向群体 枚举
this
.
getListObject
();
//面向群体 枚举
...
@@ -487,23 +504,29 @@ export default {
...
@@ -487,23 +504,29 @@ export default {
"批量下载榜单报名列表.xls"
"批量下载榜单报名列表.xls"
);
);
},
},
// 导出榜单附件
// 导出榜单附件准备
downloadMultiplefujian
()
{
getDownloadMultiplefujianTag
()
{
let
that
=
this
;
this
.
fujianLoading
=
true
;
this
.
fujianLoading
=
true
;
let
ids
=
this
.
multipleSelection
.
map
((
e
)
=>
e
.
Id
).
toString
();
let
ids
=
this
.
multipleSelection
.
map
((
e
)
=>
e
.
Id
).
toString
();
this
.
apipost
(
this
.
apipost
(
"/api/Trade/GetFirstShopEnrollZipExport"
,
"/api/Trade/Get
New
FirstShopEnrollZipExport"
,
{
{
ListIds
:
ids
,
ListIds
:
ids
,
},
},
(
res
)
=>
{
(
res
)
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
fujianLoading
=
false
;
this
.
fujianText
=
"附件准备中,请等待"
;
let
a
=
document
.
createElement
(
"a"
);
localStorage
.
setItem
(
"fujianTag"
,
res
.
data
.
data
);
a
.
href
=
this
.
domainManager
().
DomainUrl
+
res
.
data
.
data
;
that
.
downloadMultiplefujian
(
res
.
data
.
data
);
a
.
download
=
"榜单附件.zip"
;
clearInterval
(
this
.
timer
);
a
.
click
();
this
.
timer
=
setInterval
(()
=>
{
// this.delDownloadMultiplefujian(res.data.data);
setTimeout
(()
=>
{
console
.
log
(
"轮询中"
);
that
.
downloadMultiplefujian
(
res
.
data
.
data
);
},
0
);
},
10000
);
this
.
$bus
.
$emit
(
"startLoad"
,
this
.
downloadMultiplefujian
);
}
else
{
}
else
{
this
.
fujianLoading
=
false
;
this
.
fujianLoading
=
false
;
this
.
$message
.
error
(
res
.
data
.
message
);
this
.
$message
.
error
(
res
.
data
.
message
);
...
@@ -511,6 +534,50 @@ export default {
...
@@ -511,6 +534,50 @@ export default {
}
}
);
);
},
},
// 获取附件url
downloadMultiplefujian
(
tag
)
{
this
.
apipost
(
"/api/Trade/GetFirstShopEnrollResultUrl"
,
{
UserFlag
:
tag
,
},
(
res
)
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
if
(
res
.
data
.
data
)
{
this
.
fujianLoading
=
false
;
this
.
fujianText
=
"榜单附件导出"
;
localStorage
.
removeItem
(
"fujianTag"
);
clearInterval
(
this
.
timer
);
this
.
fujianUrl
=
res
.
data
.
data
;
if
(
this
.
$route
.
path
==
"/billboardList"
)
{
this
.
downloadFujian
(
res
.
data
.
data
);
}
else
{
this
.
$confirm
(
"有下载文件准备完成, 前往下载?"
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"info"
,
}).
then
(()
=>
{
this
.
$router
.
push
(
"/billboardList"
);
this
.
downloadFujian
(
this
.
fujianUrl
);
});
}
}
}
else
{
this
.
$message
.
error
(
res
.
data
.
message
);
}
}
);
},
downloadFujian
(
url
)
{
let
a
=
document
.
createElement
(
"a"
);
a
.
href
=
this
.
domainManager
().
DomainUrl
+
url
;
a
.
download
=
"榜单附件.zip"
;
a
.
click
();
setTimeout
(()
=>
{
this
.
delDownloadMultiplefujian
(
url
);
},
2000
);
},
//删除附件
//删除附件
delDownloadMultiplefujian
(
url
)
{
delDownloadMultiplefujian
(
url
)
{
this
.
apipost
(
this
.
apipost
(
...
...
src/main.js
View file @
931d1f05
...
@@ -15,8 +15,13 @@ import '../static/UE/ueditor.all.js'
...
@@ -15,8 +15,13 @@ import '../static/UE/ueditor.all.js'
import
'../static/UE/lang/zh-cn/zh-cn.js'
import
'../static/UE/lang/zh-cn/zh-cn.js'
import
'../static/UE/ueditor.parse.min.js'
import
'../static/UE/ueditor.parse.min.js'
import
Bus
from
"./plug/bus"
;
Vue
.
use
(
ElementUI
);
Vue
.
use
(
ElementUI
);
Vue
.
use
(
Bus
);
// 让插件可以使用vue
import
commonUtils
from
'./assets/utils/commonUtils'
import
commonUtils
from
'./assets/utils/commonUtils'
Vue
.
commonUtils
=
Vue
.
prototype
.
$commonUtils
=
commonUtils
Vue
.
commonUtils
=
Vue
.
prototype
.
$commonUtils
=
commonUtils
...
@@ -25,7 +30,7 @@ Vue.http = Vue.prototype.$http = axios
...
@@ -25,7 +30,7 @@ Vue.http = Vue.prototype.$http = axios
Vue
.
prototype
.
$echarts
=
echarts
Vue
.
prototype
.
$echarts
=
echarts
Vue
.
use
(
ajaxPlug
)
Vue
.
use
(
ajaxPlug
)
/* eslint-disable no-new */
/* eslint-disable no-new */
new
Vue
({
new
Vue
({
el
:
'#app'
,
el
:
'#app'
,
router
,
router
,
...
...
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