Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart_gov_platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
smart_gov_platform
Commits
aae016d0
Commit
aae016d0
authored
Mar 06, 2023
by
“yiyousong”
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pref:修改短信报表
parent
b62e2f85
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
138 additions
and
100 deletions
+138
-100
portal-manager-ui/admin/src/views/dataAdmin/components/SMS/SMSRecord.vue
...ui/admin/src/views/dataAdmin/components/SMS/SMSRecord.vue
+138
-100
No files found.
portal-manager-ui/admin/src/views/dataAdmin/components/SMS/SMSRecord.vue
View file @
aae016d0
...
@@ -2,18 +2,30 @@
...
@@ -2,18 +2,30 @@
<div
class=
"callRecord-Container"
>
<div
class=
"callRecord-Container"
>
<div
class=
"header_box"
>
<div
class=
"header_box"
>
<div>
<div>
<a-button
type=
"success"
@
click=
"toexportTable"
>
<a-button
:loading=
"btnLoading"
type=
"success"
@
click=
"handleExportTable"
>
<span>
{{
tableSelectedRows
.
length
?
"
导出
"
:
"
导出全部
"
}}
</span>
<span>
{{
tableSelectedRows
.
length
?
"
导出
"
:
"
导出全部
"
}}
</span>
</a-button>
</a-button>
<b>
累计发送短信量:
<i>
{{
allCount
}}
条
</i></b>
<b
>
累计发送短信量:
<i>
{{
allCount
}}
条
</i></b
>
</div>
</div>
<span>
<span>
<a-space>
<a-space>
<a-select
:value=
"nowSite"
@
change=
"changeSite"
>
<a-select
:value=
"nowSite"
@
change=
"changeSite"
>
<a-select-option
v-for=
"item in siteList"
:key=
"item.value"
:value=
"item.value"
>
{{
item
.
label
}}
</a-select-option>
<a-select-option
v-for=
"item in siteList"
:key=
"item.value"
:value=
"item.value"
>
{{
item
.
label
}}
</a-select-option>
</a-select>
</a-select>
<a-button
type=
"primary"
@
click=
"
togetSMSList()
"
>
搜索
</a-button>
<a-button
type=
"primary"
@
click=
"
handleSearch
"
>
搜索
</a-button>
</a-space>
</a-space>
</span>
</span>
</div>
</div>
...
@@ -33,8 +45,12 @@
...
@@ -33,8 +45,12 @@
:columns="tableHeaders"
:columns="tableHeaders"
:dataSource="tableSourceData"
:dataSource="tableSourceData"
>
>
<!-- 序号 -->
<span
slot=
"index"
slot-scope=
"text, record, index"
>
{{
(
tablePagination
.
current
-
1
)
*
tablePagination
.
pageSize
+
index
+
1
}}
</span>
<template
slot=
"operation"
slot-scope=
"text, record, index"
>
<template
slot=
"operation"
slot-scope=
"text, record, index"
>
<a-button
type=
"link"
@
click=
"gotoSMSSystem
()
"
>
查看明细
</a-button>
<a-button
type=
"link"
@
click=
"gotoSMSSystem"
>
查看明细
</a-button>
</
template
>
</
template
>
</a-table>
</a-table>
</div>
</div>
...
@@ -43,20 +59,22 @@
...
@@ -43,20 +59,22 @@
<
script
>
<
script
>
import
table
from
"
@/mixins/table
"
;
import
table
from
"
@/mixins/table
"
;
import
{
getSMSList
}
from
"
@/api/dataAdmin
"
import
{
export2Excel
}
from
"
@/utils/js/exportExcel
"
;
import
{
getSMSList
}
from
"
@/api/dataAdmin
"
;
export
default
{
export
default
{
mixins
:
[
table
],
mixins
:
[
table
],
name
:
"
PortalAdminVuePickUpRecord
"
,
name
:
"
PortalAdminVuePickUpRecord
"
,
data
()
{
data
()
{
return
{
return
{
btnLoading
:
false
,
tableHeaders
:
[
tableHeaders
:
[
{
{
title
:
"
序号
"
,
title
:
"
序号
"
,
dataIndex
:
"
index
"
,
width
:
"
60px
"
,
width
:
"
60px
"
,
key
:
"
index
"
,
align
:
"
center
"
,
align
:
"
center
"
,
customRender
:
(
text
,
record
,
index
)
=>
`
${
index
+
1
}
`
,
scopedSlots
:
{
customRender
:
"
index
"
,
},
},
},
{
{
title
:
"
月度时间
"
,
title
:
"
月度时间
"
,
...
@@ -86,99 +104,120 @@ export default {
...
@@ -86,99 +104,120 @@ export default {
},
},
],
],
searchName
:
undefined
,
searchName
:
undefined
,
nowSite
:
null
,
nowSite
:
null
,
siteList
:[],
siteList
:
[],
allCount
:
0
allCount
:
0
,
tableSelectedKeys
:
[],
tableSelectedRows
:
[],
tHeader
:
[
// 导出的表头名信息
"
月度时间
"
,
"
发送量
"
,
"
账单生成时间
"
,
],
filterVal
:
[
// 导出的表头字段名,需要导出表格字段名
"
month
"
,
"
send_num
"
,
"
update_time
"
,
],
};
};
},
},
components
:
{},
components
:
{},
mounted
()
{
mounted
()
{
this
.
setMoment
();
this
.
setMoment
();
this
.
getSiteData
()
this
.
getSiteData
()
;
this
.
togetSMSList
()
this
.
togetSMSList
()
;
},
},
methods
:
{
methods
:
{
//导出
gotoSMSSystem
()
{
toexportTable
()
{
window
.
open
(
"
http://sms.wx3.com.cn/admin
"
,
"
_blank
"
);
let
tableData
=
[];
if
(
this
.
tableSelectedRows
.
length
==
0
)
{
// 获取表信息
getSMSList
({
siteid
:
this
.
nowSite
,
page
:
1
,
size
:
-
1
,
}).
then
((
res
)
=>
{
const
{
code
,
data
}
=
res
if
(
code
==
1
){
tableData
=
JSON
.
parse
(
JSON
.
stringify
(
data
.
list
.
data
));
let
tableColumns
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
tableHeaders
));
let
newTableData
=
tableData
.
map
(
item
=>
{
let
obj
=
{};
for
(
let
key
in
item
)
{
obj
[
key
]
=
item
[
key
];
}
return
obj
;
})
let
exprotExcelName
=
`
${
this
.
nowDay
}
/
${
this
.
nowTime
}
/
${
this
.
$route
[
'
meta
'
][
'
title
'
]
||
'
报表信息统计
'
}
`
;
this
.
exportExcel
(
tableColumns
,
newTableData
,
exprotExcelName
);
}
})
}
else
{
tableData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
tableSelectedRows
));
let
tableColumns
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
tableHeaders
));
let
newTableData
=
tableData
.
map
(
item
=>
{
let
obj
=
{};
for
(
let
key
in
item
)
{
obj
[
key
]
=
item
[
key
];
}
return
obj
;
})
let
exprotExcelName
=
`
${
this
.
nowDay
}
/
${
this
.
nowTime
}
/
${
this
.
$route
[
'
meta
'
][
'
title
'
]
||
'
报表信息统计
'
}
`
;
this
.
exportExcel
(
tableColumns
,
newTableData
,
exprotExcelName
);
}
},
gotoSMSSystem
(){
window
.
location
.
href
=
"
http://sms.wx3.com.cn/admin
"
},
},
changeSite
(
e
){
changeSite
(
e
)
{
this
.
nowSite
=
e
this
.
nowSite
=
e
;
},
},
// 获取当前站点和站点列表
// 获取当前站点和站点列表
getSiteData
(){
getSiteData
()
{
this
.
nowSite
=
JSON
.
parse
(
localStorage
.
getItem
(
'
siteId
'
))
this
.
nowSite
=
JSON
.
parse
(
localStorage
.
getItem
(
"
siteId
"
));
this
.
siteList
=
[]
this
.
siteList
=
[]
;
JSON
.
parse
(
localStorage
.
getItem
(
'
siteList
'
)).
forEach
(
item
=>
{
JSON
.
parse
(
localStorage
.
getItem
(
"
siteList
"
)).
forEach
((
item
)
=>
{
this
.
siteList
.
push
({
this
.
siteList
.
push
({
label
:
item
.
siteName
,
label
:
item
.
siteName
,
value
:
item
.
id
value
:
item
.
id
,
})
})
;
});
});
},
},
togetSMSList
(){
// 搜索
handleSearch
()
{
this
.
tablePagination
=
1
;
this
.
tableSelectedKeys
=
[];
this
.
tableSelectedRows
=
[];
this
.
togetSMSList
();
},
togetSMSList
()
{
// 获取表信息
// 获取表信息
getSMSList
({
getSMSList
({
siteid
:
this
.
nowSite
,
siteid
:
this
.
nowSite
,
page
:
this
.
tablePagination
.
current
,
page
:
this
.
tablePagination
.
current
,
size
:
this
.
tablePagination
.
pageSize
,
size
:
this
.
tablePagination
.
pageSize
,
}).
then
((
res
)
=>
{
}).
then
((
res
)
=>
{
const
{
code
,
data
}
=
res
const
{
code
,
data
}
=
res
;
if
(
code
==
1
)
{
if
(
code
==
1
)
{
console
.
log
(
res
);
console
.
log
(
res
);
this
.
tableSourceData
=
data
.
list
.
data
this
.
tableSourceData
=
data
.
list
.
data
;
this
.
allCount
=
data
.
all_num
this
.
allCount
=
data
.
all_num
;
this
.
tablePagination
.
total
=
data
.
list
.
total
this
.
tablePagination
.
total
=
data
.
list
.
total
;
}
}
})
});
}
},
// 选中
onSelectChange
(
keys
,
rows
)
{
this
.
tableSelectedKeys
=
keys
;
const
res
=
new
Map
();
this
.
tableSelectedRows
=
[...
this
.
tableSelectedRows
,
...
rows
]
.
filter
((
v
)
=>
{
return
!
res
.
has
(
v
.
id
)
&&
res
.
set
(
v
.
id
,
1
);
})
.
filter
((
v
)
=>
{
return
this
.
tableSelectedKeys
.
some
((
val
)
=>
v
.
id
==
val
);
});
},
// 导出
async
handleExportTable
()
{
this
.
btnLoading
=
true
;
if
(
this
.
tableSelectedKeys
.
length
&&
this
.
tableSelectedRows
.
length
)
{
export2Excel
(
this
.
tHeader
,
this
.
filterVal
,
this
.
tableSelectedRows
,
"
短信记录报表
"
+
this
.
$moment
().
format
(
"
YYYYMMDDHHmmss
"
)
);
}
else
{
getSMSList
({
siteid
:
this
.
nowSite
,
page
:
1
,
size
:
-
1
,
}).
then
((
res
)
=>
{
const
{
code
,
data
}
=
res
;
if
(
code
==
1
)
{
if
(
!
data
.
list
.
data
.
length
)
return
;
export2Excel
(
this
.
tHeader
,
this
.
filterVal
,
data
.
list
.
data
,
"
短信记录报表
"
+
this
.
$moment
().
format
(
"
YYYYMMDDHHmmss
"
)
);
}
});
}
this
.
btnLoading
=
false
;
},
},
watch
:
{
tablePagination
()
{
this
.
togetSMSList
();
},
},
},
watch
:{
tablePagination
(){
this
.
togetSMSList
()
}
}
};
};
</
script
>
</
script
>
...
@@ -187,29 +226,28 @@ export default {
...
@@ -187,29 +226,28 @@ export default {
display: block;
display: block;
}
}
.header_box {
.header_box {
padding-bottom: 1rem;
padding-bottom: 1rem;
display: flex;
justify-content: space-between;
align-items: center;
& > div {
display: flex;
display: flex;
justify-content:
space-between
;
justify-content:
flex-start
;
align-items: center;
align-items: center;
& > div {
display: flex;
justify-content: flex-start;
align-items: center;
b {
b {
font-style: normal;
font-weight: unset;
font-size: 16px;
margin-left: 20px;
i {
color: #0595fd;
font-style: normal;
font-style: normal;
font-weight: unset;
font-size: 16px;
margin-left: 20px;
i {
color: #0595fd;
font-style: normal;
}
}
}
}
}
}
}
}
</
style
>
</
style
>
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