Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
intel_promotion_manage
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
张伯涛
intel_promotion_manage
Commits
16d69ca8
Commit
16d69ca8
authored
Jul 05, 2024
by
张伯涛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
下载模板
parent
e9f18a28
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
6 deletions
+34
-6
clickManagement.js
src/api/clickManagement.js
+8
-0
index.vue
src/views/contentManagement/clickManagement/index.vue
+19
-2
index.vue
src/views/dashboard/index/index.vue
+7
-4
No files found.
src/api/clickManagement.js
View file @
16d69ca8
...
...
@@ -14,3 +14,11 @@ export function handleAddForm(data) {
data
})
}
export
function
handleImportTemplate
(
params
)
{
return
request
({
url
:
'/cmspriceclick/exportTemplate'
,
method
:
'get'
,
responseType
:
'blob'
,
params
})
}
src/views/contentManagement/clickManagement/index.vue
View file @
16d69ca8
...
...
@@ -838,6 +838,9 @@
>
<i
class=
"el-icon-upload"
/>
<div
class=
"el-upload__text"
>
将文件拖到此处,或
<em>
点击上传
</em></div>
<div
slot=
"tip"
class=
"el-upload__tip"
>
<el-link
type=
"info"
style=
"font-size:12px"
@
click=
"importTemplate"
>
下载模板
</el-link>
</div>
<div
slot=
"tip"
class=
"el-upload__tip"
>
只能上传 .xls和.xlsx 格式的文件!
</div>
</el-upload>
</el-form-item>
...
...
@@ -866,7 +869,7 @@ import {
}
from
'@/api/try/teaTrialCourse'
import
{
getDict
}
from
'@/api/system/dict/data'
import
{
validOpenCourse
}
from
'@/api/classManagement'
import
{
importSpokesmanExcel
,
importSysUserExcel
,
importTemplateSysuser
,
listByIdentity
}
from
'@/api/system/user'
import
{
importSpokesmanExcel
,
listByIdentity
}
from
'@/api/system/user'
import
{
listAllShop
,
listCourseAll
}
from
'@/api/sysUnit'
import
{
mapGetters
}
from
'vuex'
import
{
...
...
@@ -875,7 +878,7 @@ import {
cmspriceclickUpdate
}
from
'@/api/contentManagement/sysContentVideoInformation'
import
{
getToken
}
from
'@/utils/auth'
import
{
listAllByUnitIdType
,
handleAddForm
}
from
'@/api/clickManagement'
import
{
listAllByUnitIdType
,
handleAddForm
,
handleImportTemplate
}
from
'@/api/clickManagement'
export
default
{
name
:
'Index'
,
data
()
{
...
...
@@ -1155,6 +1158,20 @@ export default {
this
.
formModel
.
file
=
''
this
.
$refs
[
'formModel'
].
validateField
(
'file'
)
},
/** 下载模板*/
importTemplate
()
{
handleImportTemplate
().
then
(
response
=>
{
const
blob
=
new
Blob
([
response
])
const
downloadElement
=
document
.
createElement
(
'a'
)
const
href
=
window
.
URL
.
createObjectURL
(
blob
)
// 创建下载的链接
downloadElement
.
href
=
href
downloadElement
.
download
=
'推广次数导入模板'
+
'.xls'
// 下载后文件名
document
.
body
.
appendChild
(
downloadElement
)
downloadElement
.
click
()
// 点击下载
document
.
body
.
removeChild
(
downloadElement
)
// 下载完成移除元素
window
.
URL
.
revokeObjectURL
(
href
)
// 释放掉blob对象
})
},
// 表单重置
reset
()
{
this
.
formModel
=
{
...
...
src/views/dashboard/index/index.vue
View file @
16d69ca8
...
...
@@ -267,9 +267,10 @@ export default {
queryParams
:
{
page
:
1
,
rows
:
10
,
newVideoId
:
''
,
new
s
VideoId
:
''
,
startTime
:
''
,
endTime
:
''
endTime
:
''
,
unitId
:
''
},
total
:
0
,
tableData
:
[],
...
...
@@ -542,9 +543,10 @@ export default {
console
.
log
(
'params'
,
params
)
this
.
echartsOpen
=
true
this
.
echartsTitle
=
'文章'
this
.
queryParams
.
newVideoId
=
params
.
data
.
id
this
.
queryParams
.
new
s
VideoId
=
params
.
data
.
id
this
.
queryParams
.
page
=
1
this
.
queryParams
.
rows
=
10
this
.
queryParams
.
unitId
=
this
.
company
if
(
this
.
timeFrame
&&
this
.
timeFrame
.
length
>
0
)
{
this
.
queryParams
.
startTime
=
this
.
timeFrame
[
0
]
+
' 00:00:00'
this
.
queryParams
.
endTime
=
this
.
timeFrame
[
1
]
+
' 23:59:59'
...
...
@@ -620,9 +622,10 @@ export default {
console
.
log
(
'params'
,
params
)
this
.
echartsOpen
=
true
this
.
echartsTitle
=
'视频'
this
.
queryParams
.
newVideoId
=
params
.
data
.
id
this
.
queryParams
.
new
s
VideoId
=
params
.
data
.
id
this
.
queryParams
.
page
=
1
this
.
queryParams
.
rows
=
10
this
.
queryParams
.
unitId
=
this
.
company
if
(
this
.
timeFrame
&&
this
.
timeFrame
.
length
>
0
)
{
this
.
queryParams
.
startTime
=
this
.
timeFrame
[
0
]
+
' 00:00:00'
this
.
queryParams
.
endTime
=
this
.
timeFrame
[
1
]
+
' 23:59:59'
...
...
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