Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-life-system
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit cfc17c9a
authored
Jul 23, 2024
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
v4.43版本部分功能代码提交
1 parent
18a791fa
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
622 additions
and
1 deletions
public/menuIcon/staffMassSending.png
src/api/contentManager.js
src/common/constants.js
src/router/modules/913_contentManager.js
src/views/contentManager/staffMassSending/index.vue
src/views/contentManager/staffMassSending/statisticsPage.vue
public/menuIcon/staffMassSending.png
0 → 100644
View file @
cfc17c9
528 Bytes
src/api/contentManager.js
View file @
cfc17c9
...
@@ -65,3 +65,21 @@ export function getBrandList(data) {
...
@@ -65,3 +65,21 @@ export function getBrandList(data) {
data
.
method
=
`dj.api.smartcarlife.common.car.brand.page`
data
.
method
=
`dj.api.smartcarlife.common.car.brand.page`
return
request
(
data
)
return
request
(
data
)
}
}
// 员工群发-分页查询列表
export
function
contentManagerTaskPage
(
data
)
{
data
.
method
=
`dj.api.smartcarlife.contentManagerTask.page`
return
request
(
data
,
"POST"
)
}
// 员工群发-删除记录
export
function
deleteTaskById
(
data
)
{
data
.
method
=
`dj.api.smartcarlife.contentManagerTask.deleteById`
return
request
(
data
,
"POST"
)
}
// 员工群发-分页查询内容管理统计信息
export
function
getStatisticPage
(
data
)
{
data
.
method
=
`dj.api.smartcarlife.contentManagerTask.statistic.page`
return
request
(
data
,
"POST"
)
}
src/common/constants.js
View file @
cfc17c9
...
@@ -894,3 +894,17 @@ export const subBusinessList = [
...
@@ -894,3 +894,17 @@ export const subBusinessList = [
{
confId
:
"0"
,
confValue
:
"权益"
},
{
confId
:
"0"
,
confValue
:
"权益"
},
{
confId
:
"1"
,
confValue
:
"延保"
}
{
confId
:
"1"
,
confValue
:
"延保"
}
]
]
// 内容管理-员工群发-内容类型
export
const
contentTypeList
=
[
{
confId
:
1
,
confValue
:
"图文"
},
{
confId
:
2
,
confValue
:
"视频"
},
{
confId
:
3
,
confValue
:
"pdf"
}
]
// 内容管理-员工群发-发送状态
export
const
sendStatusList
=
[
{
confId
:
1
,
confValue
:
"草稿"
},
{
confId
:
2
,
confValue
:
"待发送"
},
{
confId
:
3
,
confValue
:
"已发送"
}
]
src/router/modules/913_contentManager.js
View file @
cfc17c9
...
@@ -106,7 +106,7 @@ export const routerName = {
...
@@ -106,7 +106,7 @@ export const routerName = {
1
:
"停用"
1
:
"停用"
}
}
}
}
}
,
}
],
],
component
:
_import
(
"contentManager/contentManagerList"
)
component
:
_import
(
"contentManager/contentManagerList"
)
},
},
...
@@ -154,5 +154,82 @@ export const routerName = {
...
@@ -154,5 +154,82 @@ export const routerName = {
}
}
],
],
component
:
_import
(
"contentManager/statisticsList"
)
component
:
_import
(
"contentManager/statisticsList"
)
},
91305
:
{
path
:
"/staffMassSending"
,
name
:
"staffMassSending"
,
meta
:
{
title
:
"员工群发"
,
authId
:
"91305"
,
parentId
:
"913"
,
cache
:
false
},
auth
:
[
{
authId
:
"9130501"
,
parentId
:
"91305"
,
label
:
"新增群发"
,
icon
:
"plus"
,
category
:
"Button"
,
type
:
"primary"
,
handle
:
"handleAdd"
},
{
authId
:
"9130502"
,
parentId
:
"91305"
,
label
:
"查看"
,
handle
:
"handleDetail"
},
{
authId
:
"9130503"
,
parentId
:
"91305"
,
label
:
"编辑"
,
handle
:
"handleAdd"
},
{
authId
:
"9130504"
,
parentId
:
"91305"
,
label
:
"统计"
,
handle
:
"goStatisticsPage"
,
addRoutePath
:
[
{
authId
:
"9130506"
,
name
:
"统计"
,
parentId
:
"91305"
}
]
},
{
authId
:
"9130505"
,
parentId
:
"91305"
,
label
:
"删除"
,
handle
:
"handleDel"
}
],
component
:
_import
(
"contentManager/staffMassSending/index"
)
},
9130506
:
{
path
:
"/statisticsPage"
,
name
:
"statisticsPage"
,
meta
:
{
title
:
"统计"
,
authId
:
"9130506"
,
parentId
:
"91305"
,
cache
:
false
,
activePath
:
"/statisticsPage"
},
auth
:
[
{
authId
:
"913050601"
,
parentId
:
"9130506"
,
label
:
"导出"
,
category
:
"Button"
,
type
:
"primary"
,
handle
:
"handleExport"
}
],
component
:
_import
(
"contentManager/staffMassSending/statisticsPage"
)
}
}
}
}
src/views/contentManager/staffMassSending/index.vue
0 → 100644
View file @
cfc17c9
<!-- 员工群发 - 列表 -->
<
template
>
<div>
<!-- class="order-detail" -->
<d2-container>
<!--
<div
class=
"offline-account"
>
-->
<div
class=
"header"
slot=
"header"
style=
"padding: 10px 20px;"
>
<d2-search
ref=
"showSearch"
class=
"show-search"
:search-form=
"searchForm"
:label-width=
"labelWidth"
:form-data=
"showFormData"
/>
<div
class=
"up-btns"
>
<el-button
@
click=
"handleSearch"
size=
"small"
type=
"primary"
>
查询
</el-button>
<el-button
size=
"small"
@
click=
"handleReset"
>
重置
</el-button>
</div>
</div>
<!--
</d2-container>
<d2-container>
-->
<div
class=
"d2-container-content"
>
<d2-table-header>
<auth-button
category=
"Button"
/>
</d2-table-header>
<d2-table
ref=
"recordTable"
:get-list-api=
"getListApi"
:search-form=
"searchFormSearch"
:table-params=
"tableParams"
:before-search-fn=
"beforeSearchFn"
>
<div
slot=
"auth-button"
slot-scope=
"scope"
>
<span
style=
"margin-right: 10px;"
>
<auth-button
:data=
"scope.scope"
:show-btn-ids=
"['9130502']"
/>
</span>
<span
style=
"margin-right: 10px;"
v-if=
"scope.scope.sendStatus == 1 || scope.scope.sendStatus == 2"
>
<auth-button
:data=
"scope.scope"
:show-btn-ids=
"['9130503']"
/>
</span>
<span
style=
"margin-right: 10px;"
v-if=
"scope.scope.sendStatus == 3"
>
<auth-button
:data=
"scope.scope"
:show-btn-ids=
"['9130504']"
/>
</span>
<span
style=
"margin-right: 10px;"
v-if=
"scope.scope.sendStatus == 1 || scope.scope.sendStatus == 2"
>
<auth-button
:data=
"scope.scope"
:show-btn-ids=
"['9130505']"
/>
</span>
</div>
</d2-table>
</div>
</d2-container>
<!-- 新增提现 -->
<!--
<add-dialog
:add-visible=
"addVisible"
v-if=
"addVisible"
@
dialogClose=
"addDialogClose"
/>
-->
</div>
</
template
>
<
script
>
import
{
Util
,
deepClone
}
from
'@/common/util'
import
{
mapActions
,
mapState
}
from
'vuex'
import
{
contentTypeList
,
sendStatusList
}
from
'@/common/constants.js'
// import { rewithdraw } from '@api/withdrawalManage'
import
{
contentManagerTaskPage
,
deleteTaskById
}
from
"@api/contentManager"
// import addDialog from './components/addDialog'
export
default
{
name
:
'StaffMassSendingIndex'
,
components
:
{
// addDialog
},
data
()
{
return
{
userInfo
:
this
.
$store
.
state
.
d2admin
.
user
.
info
,
labelWidth
:
'100px'
,
searchForm
:
{
title
:
''
,
contentType
:
''
,
sendStatus
:
''
},
searchFormSearch
:
{},
showFormData
:
[{
label
:
'标题'
,
name
:
'title'
,
type
:
'input'
,
maxlength
:
'20'
,
isClear
:
true
},
{
label
:
'类型'
,
name
:
'contentType'
,
type
:
'select'
,
optionList
:
[],
optionId
:
'confId'
,
optionLabel
:
'confValue'
,
optionsName
:
'contentTypeList'
},
{
label
:
'状态'
,
name
:
'sendStatus'
,
type
:
'select'
,
optionList
:
[],
optionId
:
'confId'
,
optionLabel
:
'confValue'
,
optionsName
:
'sendStatusList'
}],
getListApi
:
contentManagerTaskPage
,
tableParams
:
{
btnId
:
new
Date
().
getTime
()
+
parseInt
(
Math
.
random
()
*
1000
),
listName
:
'list'
,
// tableOption: { width: '200px' },
tableOption
:
true
,
tableColumns
:
[{
label
:
'标题'
,
prop
:
'title'
// width: '200px'
},
{
label
:
'类型'
,
prop
:
'contentType'
,
width
:
'100px'
,
formatter
:
(
cellValue
)
=>
{
return
this
.
baseData
.
contentTypeList
.
find
(
item
=>
item
.
confId
===
cellValue
.
contentType
)?.
confValue
}
},
{
label
:
'发送时间'
,
prop
:
'sendTime'
,
width
:
'150px'
,
formatter
:
(
cellValue
)
=>
{
if
(
cellValue
.
sendType
==
1
)
{
// 发送方式(1.即时推送,2:定时推送)
return
'立即发送'
}
else
{
return
cellValue
.
sendTime
?
Util
.
dateFormate
(
cellValue
.
sendTime
,
'YYYY-MM-DD HH:mm:ss'
)
:
'--'
}
}
},
{
label
:
'发送员工'
,
prop
:
'sendTotal'
,
width
:
'100px'
},
{
label
:
'状态'
,
prop
:
'sendStatus'
,
width
:
'100px'
,
formatter
:
(
cellValue
)
=>
{
return
this
.
baseData
.
sendStatusList
.
find
(
item
=>
item
.
confId
===
cellValue
.
sendStatus
)?.
confValue
}
},
{
label
:
'创建时间'
,
prop
:
'createdDate'
,
width
:
'150px'
,
formatter
:
(
cellValue
)
=>
{
return
cellValue
.
createdDate
?
Util
.
dateFormate
(
cellValue
.
createdDate
,
'YYYY-MM-DD HH:mm:ss'
)
:
'--'
}
}
]
},
baseData
:
{
contentTypeList
:
deepClone
(
contentTypeList
),
sendStatusList
:
deepClone
(
sendStatusList
)
},
infos
:
[],
recordInfo
:
null
,
addVisible
:
false
}
},
computed
:
{
...
mapState
({
dowloadList
:
(
state
)
=>
state
.
d2admin
.
user
.
dowloadList
})
},
mounted
()
{
this
.
getBaseData
()
},
methods
:
{
...
mapActions
({
get
:
'd2admin/base/get'
,
close
:
'd2admin/page/close'
}),
...
mapActions
(
'd2admin/user'
,
[
'actionSetDownloadList'
]),
async
getBaseData
()
{
this
.
getOptionsList
()
},
beforeSearchFn
()
{
return
new
Promise
(
resolve
=>
{
this
.
searchFormSearch
=
deepClone
(
this
.
searchForm
)
resolve
()
})
},
getOptionsList
()
{
this
.
showFormData
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
type
===
'select'
)
{
if
(
this
.
baseData
[
item
.
optionsName
].
length
&&
this
.
baseData
[
item
.
optionsName
][
0
][
this
.
showFormData
[
index
].
optionLabel
]
!==
'全部'
)
{
const
temp
=
{}
temp
[
this
.
showFormData
[
index
].
optionId
]
=
''
temp
[
this
.
showFormData
[
index
].
optionLabel
]
=
'全部'
this
.
baseData
[
item
.
optionsName
].
unshift
(
temp
)
}
this
.
$set
(
this
.
showFormData
[
index
],
'optionList'
,
this
.
baseData
[
item
.
optionsName
])
}
})
},
handleSearch
()
{
this
.
$refs
.
recordTable
.
refreshTable
(
false
,
true
)
},
handleReset
()
{
this
.
searchForm
=
{
title
:
''
,
contentType
:
''
,
sendStatus
:
''
}
this
.
$refs
.
recordTable
.
refreshTable
(
false
,
true
)
},
handleAdd
()
{
this
.
addVisible
=
!
this
.
addVisible
},
addDialogClose
(
obj
)
{
this
[
obj
.
attrName
]
=
!
this
[
obj
.
attrName
]
if
(
obj
.
flag
)
{
this
.
$refs
.
recordTable
.
refreshTable
()
}
},
// 删除
handleDel
(
row
)
{
this
.
$confirm
(
'删除后不可恢复,是否确定删除?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
closeOnClickModal
:
false
}).
then
(()
=>
{
deleteTaskById
({
id
:
row
.
id
}).
then
(
res
=>
{
this
.
notice
.
okTips
()
this
.
$refs
.
recordTable
.
refreshTable
()
})
}).
catch
(
err
=>
{
console
.
log
(
err
)
})
},
goStatisticsPage
(
row
)
{
this
.
$router
.
push
({
name
:
"statisticsPage"
,
query
:
{
id
:
row
.
id
,
title
:
row
.
title
}
})
}
}
}
</
script
>
<
style
scoped
>
.count-txt
{
font-weight
:
700
;
color
:
#2a58ad
;
margin
:
0
2px
;
}
.leftSpan
{
display
:
inline-block
;
box-sizing
:
border-box
;
margin-right
:
10px
;
}
</
style
>
src/views/contentManager/staffMassSending/statisticsPage.vue
0 → 100644
View file @
cfc17c9
<!-- 员工群发 - 统计列表 -->
<
template
>
<div>
<!-- class="order-detail" -->
<d2-container>
<!--
<div
class=
"offline-account"
>
-->
<div
class=
"header"
slot=
"header"
style=
"padding: 10px 20px;"
>
<h3>
{{
title
}}
</h3>
<d2-search
ref=
"showSearch"
class=
"show-search"
:search-form=
"searchForm"
:label-width=
"labelWidth"
:form-data=
"showFormData"
/>
<div
class=
"up-btns"
>
<el-button
@
click=
"handleSearch"
size=
"small"
type=
"primary"
>
查询
</el-button>
<el-button
size=
"small"
@
click=
"handleReset"
>
重置
</el-button>
<el-button
size=
"small"
@
click=
"handleRecord"
>
返回
</el-button>
</div>
</div>
<!--
</d2-container>
<d2-container>
-->
<div
class=
"d2-container-content"
>
<d2-table-header>
<auth-button
category=
"Button"
/>
</d2-table-header>
<d2-table
ref=
"recordTable"
:get-list-api=
"getListApi"
:search-form=
"searchFormSearch"
:table-params=
"tableParams"
:before-search-fn=
"beforeSearchFn"
>
</d2-table>
</div>
</d2-container>
</div>
</
template
>
<
script
>
import
{
Util
,
deepClone
}
from
'@/common/util'
import
{
mapActions
,
mapState
}
from
'vuex'
import
{
getStatisticPage
}
from
"@api/contentManager"
export
default
{
name
:
'StatisticPage'
,
data
()
{
return
{
userInfo
:
this
.
$store
.
state
.
d2admin
.
user
.
info
,
labelWidth
:
'100px'
,
searchForm
:
{
staffName
:
''
,
phoneNumber
:
''
,
lookDate
:
''
},
searchFormSearch
:
{},
showFormData
:
[{
label
:
'员工姓名'
,
name
:
'staffName'
,
type
:
'input'
,
maxlength
:
'20'
,
isClear
:
true
},
{
label
:
'手机号'
,
name
:
'phoneNumber'
,
type
:
'input'
,
inputType
:
"number"
,
maxlength
:
'11'
,
isClear
:
true
},
{
label
:
'查看时间'
,
name
:
'lookDate'
,
type
:
'datePicker'
,
isClear
:
true
,
pickerOptions
:
'rangePickerOptions'
}],
getListApi
:
getStatisticPage
,
tableParams
:
{
btnId
:
new
Date
().
getTime
()
+
parseInt
(
Math
.
random
()
*
1000
),
listName
:
'list'
,
tableOption
:
false
,
tableColumns
:
[{
label
:
'员工姓名'
,
prop
:
'staffName'
// width: '200px'
},
{
label
:
'员工手机号'
,
prop
:
'phoneNumber'
,
width
:
'150px'
},
{
label
:
'发送时间'
,
prop
:
'sendTime'
,
width
:
'150px'
,
formatter
:
(
cellValue
)
=>
{
return
cellValue
.
sendTime
?
Util
.
dateFormate
(
cellValue
.
sendTime
,
'YYYY-MM-DD HH:mm:ss'
)
:
'--'
}
},
{
label
:
'首次查看时间'
,
prop
:
'firstViewTime'
,
width
:
'150px'
,
formatter
:
(
cellValue
)
=>
{
return
cellValue
.
firstViewTime
?
Util
.
dateFormate
(
cellValue
.
firstViewTime
,
'YYYY-MM-DD HH:mm:ss'
)
:
'--'
}
},
{
label
:
'总浏览时长'
,
prop
:
'totalViewTime'
,
width
:
'100px'
}
]
},
baseData
:
{
},
title
:
''
}
},
computed
:
{
...
mapState
({
dowloadList
:
(
state
)
=>
state
.
d2admin
.
user
.
dowloadList
})
},
mounted
()
{
this
.
title
=
this
.
$route
.
query
.
title
this
.
getBaseData
()
},
methods
:
{
...
mapActions
({
get
:
'd2admin/base/get'
,
close
:
'd2admin/page/close'
}),
...
mapActions
(
'd2admin/user'
,
[
'actionSetDownloadList'
]),
async
getBaseData
()
{
this
.
getOptionsList
()
},
beforeSearchFn
()
{
return
new
Promise
(
resolve
=>
{
this
.
searchFormSearch
=
deepClone
(
this
.
searchForm
)
if
(
this
.
searchFormSearch
.
lookDate
)
{
this
.
searchFormSearch
.
startDate
=
Util
.
dateFormate
(
this
.
searchFormSearch
.
lookDate
[
0
],
'YYYY-MM-DD'
)
this
.
searchFormSearch
.
endDate
=
Util
.
dateFormate
(
this
.
searchFormSearch
.
lookDate
[
1
],
'YYYY-MM-DD'
)
delete
this
.
searchFormSearch
.
lookDate
}
this
.
searchFormSearch
.
taskId
=
this
.
$route
.
query
.
id
resolve
()
})
},
getOptionsList
()
{
this
.
showFormData
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
type
===
'select'
)
{
if
(
this
.
baseData
[
item
.
optionsName
].
length
&&
this
.
baseData
[
item
.
optionsName
][
0
][
this
.
showFormData
[
index
].
optionLabel
]
!==
'全部'
)
{
const
temp
=
{}
temp
[
this
.
showFormData
[
index
].
optionId
]
=
''
temp
[
this
.
showFormData
[
index
].
optionLabel
]
=
'全部'
this
.
baseData
[
item
.
optionsName
].
unshift
(
temp
)
}
this
.
$set
(
this
.
showFormData
[
index
],
'optionList'
,
this
.
baseData
[
item
.
optionsName
])
}
})
},
handleSearch
()
{
this
.
$refs
.
recordTable
.
refreshTable
(
false
,
true
)
},
handleReset
()
{
this
.
searchForm
=
{
staffName
:
''
,
phoneNumber
:
''
,
lookDate
:
''
}
this
.
$refs
.
recordTable
.
refreshTable
(
false
,
true
)
},
handleExport
()
{
var
params
=
this
.
searchFormSearch
// 去除为null的值
for
(
const
key
in
params
)
{
if
(
params
[
key
]
===
null
||
params
[
key
]
===
''
||
params
[
key
].
length
==
0
)
{
delete
params
[
key
]
}
}
// 内容管理统计信息导出
params
.
method
=
'dj.api.smartcarlife.contentManagerTask.statistic.export.async'
const
list
=
[
...
this
.
dowloadList
,
{
name
:
'统计信息'
,
exportParam
:
JSON
.
stringify
(
params
),
status
:
'waiting'
,
timeid
:
new
Date
().
getTime
()
}
]
this
.
actionSetDownloadList
({
list
,
type
:
'dowloadList'
})
},
handleRecord
()
{
this
.
$router
.
push
({
name
:
'staffMassSending'
})
}
}
}
</
script
>
<
style
scoped
>
.count-txt
{
font-weight
:
700
;
color
:
#2a58ad
;
margin
:
0
2px
;
}
.leftSpan
{
display
:
inline-block
;
box-sizing
:
border-box
;
margin-right
:
10px
;
}
</
style
>
Write
Preview
Markdown
is supported
Attach a file
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 post a comment