Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-web
/
glsx-oss-notice
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 9b8da1b0
authored
Apr 20, 2019
by
wangql
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交代码
1 parent
81b4c446
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
367 additions
and
163 deletions
src/api/index.js
src/api/noticeCenter.js
src/api/sign.js
src/views/noticeCenter/DetailDialog.vue
src/views/noticeCenter/index.vue
src/views/noticeManage/AddDialog.vue
src/views/noticeManage/DetailDialog.vue
src/views/noticeManage/Editor.vue
src/views/noticeManage/index.vue
src/api/index.js
View file @
9b8da1b
import
{
GlAxios
}
from
'glsx-vue-common'
}
from
'
../../node_modules/glsx-vue-common/dist/
glsx-vue-common'
import
{
sign
}
from
'./sign'
import
{
methods
as
nmMethods
...
...
src/api/noticeCenter.js
View file @
9b8da1b
...
...
@@ -2,8 +2,10 @@ const path = 'glsx.accounts.admin.bulletin'
const
path2
=
'glsx.accounts.bulletin'
const
methods
=
{
Search
:
`
${
path
}
.complete.search`
,
Detail
:
`
${
path2
}
.message.detail`
,
GetAllMerchant
:
`glsx.accounts.admin.merchant.getall`
Detail
:
`
${
path2
}
.detail`
,
GetAllMerchant
:
`glsx.accounts.admin.merchant.getall`
,
GetMerchantChilds
:
`
${
path2
}
.inner.merchant.childs`
,
GetPersonalType
:
`glsx.accounts.admin.merchant.personal.type`
}
export
{
methods
...
...
src/api/sign.js
View file @
9b8da1b
import
MD5
from
'
js-
md5'
import
MD5
from
'
../../node_modules/js-md5/src/
md5'
const
sign
=
params
=>
{
delete
params
.
sign
const
secret
=
'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b'
...
...
src/views/noticeCenter/DetailDialog.vue
0 → 100644
View file @
9b8da1b
<!-- 详情弹框 -->
<
template
>
<div
class=
"detail"
>
<gl-dialog
:title=
"title"
:visible
.
sync=
"isVisible"
:before-close=
"handleClose"
:width=
"diaWidth"
:close-on-click-modal=
"false"
>
<gl-form
label-width=
"120px"
:model=
"detail"
>
<gl-form-item
label=
"标题:"
prop=
"title"
>
<gl-input
readonly=
"readonly"
v-model=
"detail.titile"
></gl-input>
</gl-form-item>
<gl-form-item
label=
"内容详情:"
prop=
"context"
>
<div
v-html=
"detail.context"
>
</div>
</gl-form-item>
<gl-form-item
label=
"发送商户:"
prop=
"sendMerchants"
>
<gl-table
class=
"m-b10"
:table=
"tableData_sendMerchants"
>
</gl-table>
<!--
<gl-pagination
background
:current-page=
"pageNum_sendMerchants"
:page-sizes=
"[10,20,30,40]"
:page-size=
"pageSize_sendMerchants"
layout=
"total, sizes, ->, prev, pager, next, jumper"
:total=
"total_sendMerchants"
></gl-pagination>
-->
</gl-form-item>
<gl-form-item
label=
"发送员工:"
prop=
"sendObj"
>
<gl-checkbox-group
v-model=
"detail.personTypes"
>
<gl-checkbox
v-for=
"item in sendObjList"
:label=
"item.confId"
:key=
"item.confId"
disabled
>
{{
item
.
confKey
}}
</gl-checkbox>
</gl-checkbox-group>
</gl-form-item>
<gl-form-item
label=
"上传附件:"
prop=
"attachment"
class=
"download"
>
<!--
<a
href=
"http://down8.5156edu.com/showzipdown4.php?f_type1=2&id=96098"
>
下载附件
</a>
-->
<!--
<a
href=
"https://cdn.shopify.com/s/files/1/1545/3617/files/SH01_User_Manaul.pdf"
download=
"SH01_User_Manaul.pdf"
>
下载附件
</a>
-->
<a
:href=
"detail.attachment"
v-show=
"detail.attachment"
>
下载附件
</a>
</gl-form-item>
<gl-form-item
label=
"展示方式:"
prop=
"showType"
>
<gl-radio-group
v-model=
"detail.showType"
disabled
>
<gl-radio
v-for=
"item in showTypeList"
:label=
"item.value"
:key=
"item.value"
>
{{
item
.
label
}}
</gl-radio>
</gl-radio-group>
</gl-form-item>
</gl-form>
</gl-dialog>
</div>
</
template
>
<
script
>
import
{
ctMethods
,
request
}
from
'@/api'
export
default
{
name
:
'DetailDialog'
,
components
:
{
},
data
()
{
return
{
readonly
:
true
,
isEditable
:
false
,
title
:
'通知详情'
,
sendObjList
:
[],
checkList
:
[],
// // 发送商户列表分页参数
// pageNum_sendMerchants: 1,
// pageSize_sendMerchants: 10,
// total_sendMerchants: 10,
showTypeList
:
[{
label
:
'弹出框'
,
value
:
1
},
{
label
:
'置顶消息'
,
value
:
2
}],
tableData_sendMerchants
:
{
border
:
true
,
stripe
:
true
,
align
:
'center'
,
height
:
200
,
data
:
[],
number
:
{
label
:
'序号'
,
width
:
'50px'
,
index
:
index
=>
{
++
index
return
index
<
10
&&
index
>
0
?
'0'
+
index
:
index
}
},
column
:
[
{
label
:
'商户名称'
,
prop
:
'merchantName'
,
width
:
'250px'
},
{
label
:
'大区'
,
prop
:
'regionName'
},
{
label
:
'省份'
,
prop
:
'provinceName'
},
{
label
:
'城市'
,
prop
:
'cityName'
}
],
console
:
{
}
}
}
},
props
:
{
isVisible
:
{
type
:
Boolean
,
default
:
false
},
diaWidth
:
{
type
:
String
,
default
:
'870px'
},
detail
:
Object
},
watch
:
{
isVisible
(
val
)
{
if
(
val
)
{
this
.
getPersonalType
()
if
(
this
.
detail
.
merchants
&&
this
.
detail
.
merchants
.
length
>
0
)
{
// this.total_sendMerchants = this.detail.merchants.length
this
.
tableData_sendMerchants
.
data
=
this
.
detail
.
merchants
}
}
}
},
mounted
()
{
},
methods
:
{
getPersonalType
()
{
const
params
=
{}
params
.
method
=
ctMethods
.
GetPersonalType
request
.
req
(
params
)
.
then
(
res
=>
{
this
.
sendObjList
=
res
.
merchantDictList
})
.
catch
(
err
=>
{
console
.
log
(
err
)
})
},
handleClose
()
{
this
.
$emit
(
'hideDialog'
)
}
}
}
</
script
>
<
style
>
.detail
.el-dialog__body
{
padding
:
0
20px
;
}
.detail
.el-select
{
width
:
100%
;
}
.detail
.el-checkbox-group
{
display
:
flex
;
overflow-x
:
auto
;
}
.detail
.download
a
{
color
:
#409eff
;
text-decoration
:
underline
;
}
.detail
.el-checkbox__input.is-disabled
+
span
.el-checkbox__label
,
.detail
.el-radio__input.is-disabled
+
span
.el-radio__label
{
color
:
#606266
;
}
.detail
.el-checkbox__input.is-disabled.is-checked
.el-checkbox__inner
,
.detail
.el-radio__input.is-disabled.is-checked
.el-radio__inner
{
border-color
:
#409eff
;
background
:
#409eff
;
}
.detail
.el-checkbox__input.is-disabled.is-checked
.el-checkbox__inner
::after
{
border-color
:
#fff
;
}
.detail
.el-radio__input.is-disabled.is-checked
.el-radio__inner
::after
{
background-color
:
#fff
;
}
.detail
.el-radio
:focus:not
(
.is-focus
)
:not
(
:active
)
.el-radio__inner
{
box-shadow
:
0
0
;
}
</
style
>
\ No newline at end of file
src/views/noticeCenter/index.vue
View file @
9b8da1b
...
...
@@ -158,23 +158,23 @@
<!-- 推送列表弹出框 start -->
<gl-dialog
title=
"推送列表"
width=
"
4
0%"
width=
"
5
0%"
:visible
.
sync=
"dialogVisible_pushList"
:before-close=
"handleClose_pushList"
>
<gl-form
:model=
"searchPushParams"
ref=
"searchPushParams"
:inline=
"true"
>
<gl-form-item
label=
"
分组
:"
>
<gl-form-item
label=
"
商户
:"
>
<gl-select
v-model=
"searchPushParams.
group
Id"
v-model=
"searchPushParams.
merchant
Id"
placeholder=
"请选择"
>
<gl-option
label=
"全部"
value=
""
></gl-option>
<gl-option
v-for=
"item in
group
List"
:key=
"item.
i
d"
:label=
"item.
group
Name"
:value=
"item.
i
d"
>
v-for=
"item in
merchantChilds
List"
:key=
"item.
merchantI
d"
:label=
"item.
merchant
Name"
:value=
"item.
merchantI
d"
>
</gl-option>
</gl-select>
</gl-form-item>
...
...
@@ -214,34 +214,24 @@
<!-- 推送列表弹出框 end -->
<!-- 详情弹出框 start -->
<gl-dialog
title=
"通知详情"
width=
"525px"
:visible
.
sync=
"dialogVisible_detail"
:before-close=
"handleClose_detail"
>
<div
class=
"inmodal"
>
<div
class=
"modal-body ofy-visible"
>
<div
class=
"detail_title"
>
{{detail.titile}}
</div>
<div>
<span
class=
"subTitle"
>
发布时间:{{detail.publishTime}}
</span>
<span
class=
"subTitle f-r"
>
消息来自:{{detail.merchantName}}
</span>
</div>
<div
class=
"content"
ng-bind-html=
"content | htmlTrusted"
>
{{detail.context}}
</div>
<div>
附件:
<a
class=
"btn btn-link text-info btn-xs"
:href=
"detail.attachment"
>
点击下载资料
</a></div>
</div>
</div>
</gl-dialog>
<detail-dialog
:isVisible=
"detailVisible"
:detail=
"detail"
@
hideDialog=
"handleDetailHide"
>
</detail-dialog>
<!-- 详情弹出框 end -->
</div>
</template>
<
script
>
import
{
ctMethods
,
nmMethods
,
request
}
from
'@/api'
// import { getNMList } from '@/api
'
// import notice from '@/common/notice
'
import
notice
from
'@/common/notice
'
import
DetailDialog
from
'./DetailDialog
'
export
default
{
name
:
'noticeCenter'
,
components
:
{
DetailDialog
},
watch
:
{
dialogVisible_pushList
(
val
)
{
...
...
@@ -261,6 +251,7 @@ export default {
itemShow
:
1
,
// 控制上方查询条件的显示与隐藏
fileUrl
:
''
,
merchantList
:
[],
merchantChildsList
:
[],
searchParams
:
{
bulletinType
:
'1'
,
personalCode
:
''
,
...
...
@@ -276,22 +267,7 @@ export default {
groupId
:
''
,
viewStatus
:
''
},
detail
:
{
publishTime
:
''
,
titile
:
''
,
attachment
:
''
,
context
:
''
,
merchantName
:
''
},
// rules: {
// groupName: [
// { required: true, message: '请输入分组名称', trigger: 'blur' },
// { max: 10, message: '长度最多10个字符', trigger: 'blur' }
// ],
// businessCode: [
// { required: true, message: '请选择业务类型', trigger: 'change' }
// ]
// },
detail
:
{},
times
:
[],
// 公告管理列表分页参数
pageNum
:
1
,
...
...
@@ -306,13 +282,13 @@ export default {
addLoading
:
false
,
dialogVisible_pushList
:
false
,
dialogVisible_detail
:
false
,
groupList
:
[]
,
detailVisible
:
false
,
columnMap
:
{
'1'
:
[
{
label
:
'标题'
,
prop
:
'titile'
,
width
:
'2
0
0'
width
:
'2
5
0'
},
{
label
:
'展示方式'
,
...
...
@@ -349,10 +325,12 @@ export default {
},
{
label
:
'分组'
,
width
:
'200'
,
prop
:
'groupName'
},
{
label
:
'发布商户'
,
width
:
'200'
,
prop
:
'merchantName'
},
{
...
...
@@ -384,10 +362,11 @@ export default {
{
label
:
'标题'
,
prop
:
'titile'
,
width
:
'2
0
0'
width
:
'2
5
0'
},
{
label
:
'内容分类'
,
width
:
'150'
,
prop
:
'personalCodeValue'
},
{
...
...
@@ -418,7 +397,7 @@ export default {
{
label
:
'活动时间'
,
prop
:
'activityTime'
,
width
:
'
25
0'
width
:
'
30
0'
},
{
label
:
'活动状态'
,
...
...
@@ -483,7 +462,7 @@ export default {
{
label
:
'标题'
,
prop
:
'titile'
,
width
:
'2
0
0px'
width
:
'2
5
0px'
},
{
label
:
'封面'
,
...
...
@@ -492,6 +471,7 @@ export default {
},
{
label
:
'内容分类'
,
width
:
'150'
,
prop
:
'personalCodeValue'
},
{
...
...
@@ -542,6 +522,7 @@ export default {
},
{
label
:
'发布商户'
,
width
:
'200'
,
prop
:
'merchantName'
},
{
...
...
@@ -574,7 +555,7 @@ export default {
border
:
true
,
stripe
:
true
,
align
:
'center'
,
height
:
parseInt
(
this
.
$client_height
()
-
14
0
),
height
:
parseInt
(
this
.
$client_height
()
-
25
0
),
data
:
[],
number
:
{
label
:
'序号'
,
...
...
@@ -589,7 +570,7 @@ export default {
{
label
:
'标题'
,
prop
:
'titile'
,
width
:
'2
0
0px'
width
:
'2
5
0px'
},
{
label
:
'展示方式'
,
...
...
@@ -626,10 +607,12 @@ export default {
},
{
label
:
'分组'
,
width
:
'200'
,
prop
:
'groupName'
},
{
label
:
'发布商户'
,
width
:
'200'
,
prop
:
'merchantName'
},
{
...
...
@@ -661,6 +644,7 @@ export default {
show
:
true
,
label
:
'操作'
,
prop
:
'options'
,
width
:
'150'
,
fixed
:
'right'
,
button
:
[
{
...
...
@@ -674,10 +658,14 @@ export default {
label
:
'下载附件'
,
type
:
'text'
,
formatter
(
row
)
{
return
row
.
publishStatus
===
2
?
null
:
'下载附件'
return
row
.
publishStatus
===
3
?
null
:
'下载附件'
},
callback
:
(
index
,
row
)
=>
{
location
.
href
=
row
[
index
].
attachment
if
(
row
[
index
].
attachment
)
{
location
.
href
=
row
[
index
].
attachment
}
else
{
notice
.
errorTips
(
'附件为空'
)
}
// this.fileUrl = 'https://dz.80txt.com/57199/极品全能学生.zip'
// this.$refs['fileA'].click()
// this.$confirm('下载附件', '', {
...
...
@@ -708,14 +696,9 @@ export default {
},
column
:
[
{
label
:
'分组'
,
prop
:
'groupName'
,
width
:
'150px'
},
{
label
:
'商户名称'
,
prop
:
'merchantName'
,
width
:
'
10
0px'
width
:
'
25
0px'
},
{
label
:
'所属区域'
,
...
...
@@ -736,7 +719,7 @@ export default {
},
mounted
()
{
this
.
loadingGetList
()
this
.
getGroupList
()
//
this.getGroupList()
this
.
getAllMerchant
()
},
methods
:
{
...
...
@@ -779,7 +762,7 @@ export default {
.
req
(
params
)
.
then
(
res
=>
{
res
.
pagination
&&
(
this
.
total
=
res
.
pagination
.
totalCount
)
this
.
tableData
.
data
=
res
.
bulletins
this
.
tableData
.
data
=
res
.
bulletin
Message
s
this
.
tableLoading
=
false
})
.
catch
(
err
=>
{
...
...
@@ -795,16 +778,14 @@ export default {
this
.
pageNum
=
val
this
.
loadingGetList
()
},
// 获取分组列表
getGroupList
()
{
const
params
=
{}
params
.
pageCount
=
1000
params
.
pageSize
=
1
params
.
method
=
nmMethods
.
MerchantGroup
// 当前公告商户列表
getMerchantChilds
(
recordId
)
{
const
params
=
{
'recordId'
:
recordId
}
params
.
method
=
ctMethods
.
GetMerchantChilds
request
.
req
(
params
)
.
then
(
res
=>
{
this
.
groupList
=
res
.
groupDic
ts
this
.
merchantChildsList
=
res
.
merchan
ts
})
.
catch
(
err
=>
{
this
.
tableLoading
=
false
...
...
@@ -828,7 +809,7 @@ export default {
request
.
req
(
params
)
.
then
(
res
=>
{
res
.
pagination
&&
(
this
.
total
=
res
.
pagination
.
totalCount
)
res
.
pagination
&&
(
this
.
total
_pushList
=
res
.
pagination
.
totalCount
)
this
.
tableData_pushList
.
data
=
res
.
bulletinPushes
this
.
tableLoading
=
false
})
...
...
@@ -845,13 +826,14 @@ export default {
this
.
dialogVisible_pushList
=
!
this
.
dialogVisible_pushList
this
.
searchPushParams
.
recordId
=
id
this
.
loadingGetPushList
()
this
.
getMerchantChilds
(
id
)
},
handleSizeChange_pushList
(
val
)
{
this
.
pageSize
=
val
this
.
pageSize
_pushList
=
val
this
.
loadingGetPushList
()
},
handleCurrentChange_pushList
(
val
)
{
this
.
pageNum
=
val
this
.
pageNum
_pushList
=
val
this
.
loadingGetPushList
()
},
// 关闭推送列表弹出框
...
...
@@ -860,22 +842,25 @@ export default {
},
// 打开详情弹出框
openDetailDialog
(
id
)
{
this
.
dialogVisible_detail
=
!
this
.
dialogVisible_detail
const
params
=
{
'bulletinId'
:
id
}
const
params
=
{
'recordId'
:
id
}
params
.
method
=
ctMethods
.
Detail
request
.
req
(
params
)
.
then
(
res
=>
{
this
.
detail
=
res
this
.
handleDetail
()
})
.
catch
(
err
=>
{
this
.
tableLoading
=
false
console
.
log
(
err
)
})
},
// 关闭详情弹出框
handleClose_detail
()
{
this
.
dialogVisible_detail
=
!
this
.
dialogVisible_detail
// 通知详情
handleDetail
()
{
this
.
detailVisible
=
!
this
.
detailVisible
},
handleDetailHide
()
{
this
.
detailVisible
=
!
this
.
detailVisible
}
}
}
...
...
src/views/noticeManage/AddDialog.vue
View file @
9b8da1b
...
...
@@ -57,7 +57,7 @@
prop=
"sendObj"
>
<gl-checkbox-group
v-model=
"noticeForm.
targetId
s"
v-model=
"noticeForm.
merchant
s"
name=
"sendObj"
data-vv-as=
"发送对象"
v-validate=
"'required'"
...
...
@@ -82,7 +82,7 @@
<gl-upload
class=
"upload-demo"
name=
"file"
action=
"http://192.168.2.89:8091/gps/common/uploadFile
"
:action=
"uploadAction
"
:limit=
"2"
:before-upload=
"beforeUpload"
:on-success=
"handleSuccess"
...
...
@@ -152,24 +152,8 @@ export default {
isClear
:
false
,
title
:
'创建通知'
,
fileList
:
[],
sendObjList
:
[
// {
// label: '爱车保镖分组',
// value: '1'
// }, {
// label: '虎哥E盾分组',
// value: '2'
// }, {
// label: '嘀加系统(TSP版)',
// value: '3'
// }, {
// label: '嘀加系统(aaa版)',
// value: '4'
// }, {
// label: '嘀加系统(bbb版)',
// value: '5'
// }
],
uploadAction
:
''
,
sendObjList
:
[],
showTypeList
:
[{
label
:
'弹出框'
,
value
:
1
...
...
@@ -207,13 +191,15 @@ export default {
},
isVisible
(
val
)
{
!
val
&&
(
this
.
fileList
=
[])
console
.
log
(
this
.
noticeForm
.
recordId
)
this
.
noticeForm
.
recordId
&&
(
this
.
title
=
'编辑通知'
)
this
.
$validator
.
errors
.
clear
()
}
},
mounted
()
{
this
.
getGroupList
()
this
.
uploadAction
=
`
${
this
.
$get_session_common_config
().
axios
.
fileUploadURL
}
/gps/
common
/
uploadFile
`
},
methods: {
// 获取分组列表
...
...
@@ -239,9 +225,6 @@ export default {
return isLT20M
},
handleSuccess(res, file, fileList) {
// console.log(res)
// console.log(file)
// console.log(fileList)
this.fileList = [{ name: file.name, url: file.response.data }]
this.noticeForm.attachment = file.response.data
// this.noticeForm.attachment = 'https://dz.80txt.com/57199/极品全能学生.zip'
...
...
@@ -257,7 +240,6 @@ export default {
// this.$validator.validate('attachment', this.noticeForm.attachment)
},
handleClose() {
console
.
log
(
this
.
noticeForm
)
this.$emit('hideDialog')
},
// 保存草稿
...
...
@@ -265,7 +247,7 @@ export default {
if (this.noticeForm.titile !== '') {
this.noticeForm.bulletinType = 1 // 通知
this.noticeForm.publishStatus = 1 // 仅保存
this
.
noticeForm
.
checkStatus
=
1
// 未审核
this.noticeForm.checkStatus =
0 // 草稿
this.$emit('handleAddComfirm')
} else {
// 添加验证
...
...
@@ -274,12 +256,12 @@ export default {
},
// 审核并发布
handleComfrim() {
// this.noticeForm.publishStatus = 2 // 仅保存
console
.
log
(
this
.
noticeForm
)
// this.$emit('handleAddComfirm')
this.$validator.validateAll().then((result) => {
if (result) {
console.log(this.$validator)
this.noticeForm.bulletinType = 1 // 通知
this.noticeForm.publishStatus = 2 // 已发布
this.noticeForm.checkStatus = 2 // 已审核
this.$emit('handleAddComfirm', true)
}
})
...
...
src/views/noticeManage/DetailDialog.vue
View file @
9b8da1b
...
...
@@ -37,7 +37,7 @@
label=
"发送对象:"
prop=
"sendObj"
>
<gl-checkbox-group
v-model=
"noticeForm.
targetId
s"
>
<gl-checkbox-group
v-model=
"noticeForm.
merchant
s"
>
<gl-checkbox
v-for=
"item in sendObjList"
:label=
"item.id"
...
...
@@ -53,7 +53,7 @@
>
<!--
<a
href=
"http://down8.5156edu.com/showzipdown4.php?f_type1=2&id=96098"
>
下载附件
</a>
-->
<!--
<a
href=
"https://cdn.shopify.com/s/files/1/1545/3617/files/SH01_User_Manaul.pdf"
download=
"SH01_User_Manaul.pdf"
>
下载附件
</a>
-->
<a
:href=
"noticeForm.attachment"
>
下载附件
</a>
<a
:href=
"noticeForm.attachment"
v-show=
"noticeForm.attachment"
>
下载附件
</a>
</gl-form-item>
<gl-form-item
label=
"展示方式:"
...
...
@@ -72,10 +72,10 @@
</gl-form-item>
</gl-form>
<span
slot=
"footer"
v-show=
"noticeForm.publishStatus === 1 || noticeForm.publishStatus === 3"
>
<
!--
<
el-button
<el-button
type=
"primary"
@
click=
"handleComfrim"
>
审核并发布
</el-button>
-->
@
click=
"handleComfrim"
v-show=
"noticeForm.publishStatus === 3"
>
审核并发布
</el-button>
<el-button
type=
"primary"
@
click=
"gotoEdit"
...
...
@@ -99,18 +99,7 @@ export default {
readonly
:
true
,
isEditable
:
false
,
title
:
'通知详情'
,
sendObjList
:
[
// {
// label: '爱车保镖分组',
// value: '1'
// }, {
// label: '虎哥E盾分组',
// value: '2'
// }, {
// label: '嘀加系统(TSP版)',
// value: '3'
// }
],
sendObjList
:
[],
checkList
:
[],
showTypeList
:
[{
label
:
'弹出框'
,
...
...
@@ -139,17 +128,17 @@ export default {
noticeForm
:
Object
},
watch
:
{
'noticeForm.context'
(
val
)
{
if
(
val
===
'<p><br></p>'
)
{
this
.
noticeForm
.
context
=
''
this
.
$validator
.
validate
(
'context'
,
this
.
noticeForm
.
context
)
}
else
{
this
.
errorBags
.
remove
(
'context'
)
}
},
isVisible
(
val
)
{
this
.
$validator
.
errors
.
clear
()
}
//
'noticeForm.context'(val) {
//
if (val === '<p><br></p>') {
//
this.noticeForm.context = ''
//
this.$validator.validate('context', this.noticeForm.context)
//
} else {
//
this.errorBags.remove('context')
//
}
//
},
//
isVisible(val) {
//
this.$validator.errors.clear()
//
}
},
mounted
()
{
this
.
getGroupList
()
...
...
@@ -164,15 +153,6 @@ export default {
.
req
(
params
)
.
then
(
res
=>
{
this
.
sendObjList
=
res
.
groupDicts
// this.sendObjList.forEach((allItem, index) => {
// console.log(allItem)
// this.noticeForm.targetIds.forEach((i) => {
// console.log(i)
// if (allItem.id === i) {
// this.checkList.push(allItem.groupName)
// }
// })
// })
})
.
catch
(
err
=>
{
this
.
tableLoading
=
false
...
...
@@ -185,6 +165,9 @@ export default {
},
gotoEdit
()
{
this
.
$emit
(
'gotoEdit'
)
},
handleComfrim
()
{
this
.
$emit
(
'handleComfrim'
)
}
}
}
...
...
src/views/noticeManage/Editor.vue
View file @
9b8da1b
...
...
@@ -63,7 +63,7 @@ export default {
this
.
editor
=
new
E
(
this
.
$refs
.
toolbar
,
this
.
$refs
.
editor
)
this
.
editor
.
customConfig
.
uploadImgShowBase64
=
true
// base 64 存储图片
// this.editor.customConfig.uploadImgServer = uploadPath// 配置服务器端地址
this
.
editor
.
customConfig
.
uploadImgServer
=
'http://192.168.2.89:8091/gps/common/uploadImage'
// 配置服务器端地址
this
.
editor
.
customConfig
.
uploadImgServer
=
`
${
this
.
$get_session_common_config
().
axios
.
fileUploadURL
}
/gps/common/uploadImage`
// 配置服务器端地址
this
.
editor
.
customConfig
.
uploadImgHeaders
=
{
}
// 自定义 header
this
.
editor
.
customConfig
.
uploadFileName
=
'file'
// 后端接受上传文件的参数名
this
.
editor
.
customConfig
.
uploadImgMaxSize
=
2
*
1024
*
1024
// 将图片大小限制为 2M
...
...
src/views/noticeManage/index.vue
View file @
9b8da1b
...
...
@@ -105,7 +105,7 @@
></gl-pagination>
<gl-dialog
title=
"推送列表"
width=
"
4
0%"
width=
"
5
0%"
:visible
.
sync=
"dialogVisible_pushList"
:before-close=
"handleClose_pushList"
>
<gl-form
...
...
@@ -170,6 +170,7 @@
:noticeForm=
"noticeForm"
@
hideDialog=
"handleDetailHide"
@
gotoEdit=
"goEdit"
@
handleComfrim=
"auditAgain"
>
</detail-dialog>
</div>
...
...
@@ -191,7 +192,6 @@ export default {
watch
:
{
dialogVisible_pushList
(
val
)
{
if
(
!
val
)
{
console
.
log
(
val
)
// this.$refs['searchPushParams'].resetFields()
this
.
searchPushParams
.
recordId
=
''
this
.
searchPushParams
.
groupId
=
''
...
...
@@ -201,7 +201,9 @@ export default {
},
data
()
{
return
{
operater
:
null
,
searchParams
:
{
bulletinType
:
1
,
timeLimitType
:
''
,
showType
:
''
,
publishStatus
:
''
,
...
...
@@ -230,7 +232,7 @@ export default {
titile
:
''
,
context
:
''
,
// 发送对象
targetId
s
:
[],
merchant
s
:
[],
attachment
:
''
,
showType
:
''
,
publishStatus
:
''
...
...
@@ -245,7 +247,7 @@ export default {
border
:
true
,
stripe
:
true
,
align
:
'center'
,
height
:
parseInt
(
this
.
$client_height
()
-
1
4
0
),
height
:
parseInt
(
this
.
$client_height
()
-
1
8
0
),
data
:
[],
number
:
{
label
:
'序号'
,
...
...
@@ -259,7 +261,7 @@ export default {
{
label
:
'标题'
,
prop
:
'titile'
,
width
:
'
10
0px'
width
:
'
25
0px'
},
{
label
:
'展示方式'
,
...
...
@@ -314,6 +316,7 @@ export default {
{
label
:
'发布时间'
,
prop
:
'publishTime'
,
width
:
'150'
,
formatter
:
cellValue
=>
{
if
(
cellValue
.
publishTime
)
{
return
new
Date
(
cellValue
.
publishTime
).
format
(
'yyyy/MM/dd HH:mm:ss'
)
...
...
@@ -323,6 +326,7 @@ export default {
{
label
:
'创建时间'
,
prop
:
'createTime'
,
width
:
'150'
,
formatter
:
cellValue
=>
{
if
(
cellValue
.
createTime
)
{
return
new
Date
(
cellValue
.
createTime
).
format
(
'yyyy/MM/dd HH:mm:ss'
)
...
...
@@ -334,6 +338,8 @@ export default {
show
:
true
,
label
:
'操作'
,
prop
:
'options'
,
width
:
'150'
,
fixed
:
'right'
,
button
:
[
{
label
:
'详情'
,
...
...
@@ -346,7 +352,7 @@ export default {
label
:
'取消发布'
,
type
:
'text'
,
formatter
(
row
)
{
return
row
.
publishStatus
===
1
?
'取消发布'
:
null
return
row
.
publishStatus
===
2
?
'取消发布'
:
null
},
callback
:
(
index
,
row
)
=>
{
this
.
$confirm
(
'请确认是否取消发布,取消发布后,消息不再展示'
,
''
,
{
...
...
@@ -363,7 +369,7 @@ export default {
label
:
'编辑'
,
type
:
'text'
,
formatter
(
row
)
{
return
row
.
publishStatus
===
1
?
null
:
'编辑'
return
row
.
publishStatus
===
2
?
null
:
'编辑'
},
callback
:
(
index
,
row
)
=>
{
this
.
noticeDetail
(
row
[
index
].
recordId
,
1
)
...
...
@@ -390,12 +396,12 @@ export default {
{
label
:
'分组'
,
prop
:
'groupName'
,
width
:
'
15
0px'
width
:
'
20
0px'
},
{
label
:
'商户名称'
,
prop
:
'merchantName'
,
width
:
'
10
0px'
width
:
'
25
0px'
},
{
label
:
'所属区域'
,
...
...
@@ -417,6 +423,7 @@ export default {
mounted
()
{
this
.
loadingGetList
()
this
.
getGroupList
()
this
.
operater
=
this
.
$get_session_config
().
user
},
methods
:
{
loadingGetList
()
{
...
...
@@ -446,7 +453,7 @@ export default {
.
req
(
params
)
.
then
(
res
=>
{
res
.
pagination
&&
(
this
.
total
=
res
.
pagination
.
totalCount
)
this
.
tableData
.
data
=
res
.
bulletins
this
.
tableData
.
data
=
res
.
bulletin
Message
s
this
.
tableLoading
=
false
})
.
catch
(
err
=>
{
...
...
@@ -495,7 +502,7 @@ export default {
request
.
req
(
params
)
.
then
(
res
=>
{
res
.
pagination
&&
(
this
.
total
=
res
.
pagination
.
totalCount
)
res
.
pagination
&&
(
this
.
total
_pushList
=
res
.
pagination
.
totalCount
)
this
.
tableData_pushList
.
data
=
res
.
bulletinPushes
this
.
tableLoading
=
false
})
...
...
@@ -514,11 +521,11 @@ export default {
this
.
loadingGetPushList
()
},
handleSizeChange_pushList
(
val
)
{
this
.
pageSize
=
val
this
.
pageSize
_pushList
=
val
this
.
loadingGetPushList
()
},
handleCurrentChange_pushList
(
val
)
{
this
.
pageNum
=
val
this
.
pageNum
_pushList
=
val
this
.
loadingGetPushList
()
},
// 关闭推送列表弹出框
...
...
@@ -532,18 +539,16 @@ export default {
request
.
req
(
params
)
.
then
(
res
=>
{
notice
.
okTips
(
'已取消发布'
)
this
.
loadingGetList
()
notice
.
okTips
()
})
.
catch
(
err
=>
console
.
log
(
err
))
},
// 公告详情
noticeDetail
(
recordId
,
isEdit
=
0
)
{
const
params
=
{
'recordId'
:
recordId
}
console
.
log
(
nmMethods
.
Detail
)
params
.
method
=
nmMethods
.
Detail
request
.
req
(
params
).
then
(
res
=>
{
console
.
log
(
res
)
for
(
var
item
in
this
.
noticeForm
)
{
this
.
noticeForm
[
item
]
=
res
[
item
]
}
...
...
@@ -557,24 +562,32 @@ export default {
createNotice
()
{
const
params
=
this
.
$deep_clone
(
this
.
noticeForm
)
!
params
.
recordId
&&
delete
params
.
recordId
params
.
merchants
=
params
.
merchants
.
join
(
','
)
params
.
operatorId
=
this
.
operater
.
id
params
.
operatorName
=
this
.
operater
.
realname
params
.
method
=
nmMethods
.
Create
request
.
req
(
params
).
then
(
res
=>
{
notice
.
okTips
(
'创建成功'
)
this
.
handleAdd
()
resetSearch
(
this
.
noticeForm
)
this
.
loadingGetList
()
}).
catch
(
err
=>
{
notice
.
errorTips
(
err
)
})
},
// 创建公告+审核发布
createCheckNotice
()
{
createCheckNotice
(
auditAgain
)
{
const
params
=
this
.
$deep_clone
(
this
.
noticeForm
)
!
params
.
recordId
&&
delete
params
.
recordId
params
.
merchants
=
params
.
merchants
.
join
(
','
)
params
.
operatorId
=
this
.
operater
.
id
params
.
operatorName
=
this
.
operater
.
realname
params
.
method
=
nmMethods
.
CreateCheck
request
.
req
(
params
).
then
(
res
=>
{
notice
.
okTips
(
'发布成功'
)
this
.
handleAdd
()
!
auditAgain
&&
this
.
handleAdd
()
// 详情页审核发布时不需要管创建弹出框,创建页的审核发布需要对弹出框做隐藏处理
resetSearch
(
this
.
noticeForm
)
this
.
loadingGetList
()
}).
catch
(
err
=>
{
notice
.
errorTips
(
err
)
})
...
...
@@ -604,8 +617,17 @@ export default {
resetSearch
(
this
.
noticeForm
)
},
goEdit
()
{
console
.
log
(
this
.
noticeForm
)
this
.
detailVisible
=
!
this
.
detailVisible
this
.
addVisible
=
!
this
.
addVisible
},
auditAgain
()
{
this
.
noticeForm
.
bulletinType
=
1
// 通知
this
.
noticeForm
.
publishStatus
=
2
// 已发布
this
.
noticeForm
.
checkStatus
=
2
// 已审核
this
.
detailVisible
=
!
this
.
detailVisible
this
.
noticeForm
.
recordId
=
''
this
.
createCheckNotice
(
true
)
}
}
}
...
...
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