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
{
import
{
GlAxios
GlAxios
}
from
'glsx-vue-common'
}
from
'
../../node_modules/glsx-vue-common/dist/
glsx-vue-common'
import
{
sign
}
from
'./sign'
import
{
sign
}
from
'./sign'
import
{
import
{
methods
as
nmMethods
methods
as
nmMethods
...
...
src/api/noticeCenter.js
View file @
9b8da1b
...
@@ -2,8 +2,10 @@ const path = 'glsx.accounts.admin.bulletin'
...
@@ -2,8 +2,10 @@ const path = 'glsx.accounts.admin.bulletin'
const
path2
=
'glsx.accounts.bulletin'
const
path2
=
'glsx.accounts.bulletin'
const
methods
=
{
const
methods
=
{
Search
:
`
${
path
}
.complete.search`
,
Search
:
`
${
path
}
.complete.search`
,
Detail
:
`
${
path2
}
.message.detail`
,
Detail
:
`
${
path2
}
.detail`
,
GetAllMerchant
:
`glsx.accounts.admin.merchant.getall`
GetAllMerchant
:
`glsx.accounts.admin.merchant.getall`
,
GetMerchantChilds
:
`
${
path2
}
.inner.merchant.childs`
,
GetPersonalType
:
`glsx.accounts.admin.merchant.personal.type`
}
}
export
{
export
{
methods
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
=>
{
const
sign
=
params
=>
{
delete
params
.
sign
delete
params
.
sign
const
secret
=
'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b'
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
\ No newline at end of file
src/views/noticeCenter/index.vue
View file @
9b8da1b
...
@@ -158,23 +158,23 @@
...
@@ -158,23 +158,23 @@
<!-- 推送列表弹出框 start -->
<!-- 推送列表弹出框 start -->
<gl-dialog
<gl-dialog
title=
"推送列表"
title=
"推送列表"
width=
"
4
0%"
width=
"
5
0%"
:visible
.
sync=
"dialogVisible_pushList"
:visible
.
sync=
"dialogVisible_pushList"
:before-close=
"handleClose_pushList"
>
:before-close=
"handleClose_pushList"
>
<gl-form
<gl-form
:model=
"searchPushParams"
:model=
"searchPushParams"
ref=
"searchPushParams"
ref=
"searchPushParams"
:inline=
"true"
>
:inline=
"true"
>
<gl-form-item
label=
"
分组
:"
>
<gl-form-item
label=
"
商户
:"
>
<gl-select
<gl-select
v-model=
"searchPushParams.
group
Id"
v-model=
"searchPushParams.
merchant
Id"
placeholder=
"请选择"
>
placeholder=
"请选择"
>
<gl-option
label=
"全部"
value=
""
></gl-option>
<gl-option
label=
"全部"
value=
""
></gl-option>
<gl-option
<gl-option
v-for=
"item in
group
List"
v-for=
"item in
merchantChilds
List"
:key=
"item.
i
d"
:key=
"item.
merchantI
d"
:label=
"item.
group
Name"
:label=
"item.
merchant
Name"
:value=
"item.
i
d"
>
:value=
"item.
merchantI
d"
>
</gl-option>
</gl-option>
</gl-select>
</gl-select>
</gl-form-item>
</gl-form-item>
...
@@ -214,34 +214,24 @@
...
@@ -214,34 +214,24 @@
<!-- 推送列表弹出框 end -->
<!-- 推送列表弹出框 end -->
<!-- 详情弹出框 start -->
<!-- 详情弹出框 start -->
<gl-dialog
<detail-dialog
title=
"通知详情"
:isVisible=
"detailVisible"
width=
"525px"
:detail=
"detail"
:visible
.
sync=
"dialogVisible_detail"
@
hideDialog=
"handleDetailHide"
:before-close=
"handleClose_detail"
>
>
<div
class=
"inmodal"
>
</detail-dialog>
<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>
<!-- 详情弹出框 end -->
<!-- 详情弹出框 end -->
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
ctMethods
,
nmMethods
,
request
}
from
'@/api'
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
{
export
default
{
name
:
'noticeCenter'
,
name
:
'noticeCenter'
,
components
:
{
components
:
{
DetailDialog
},
},
watch
:
{
watch
:
{
dialogVisible_pushList
(
val
)
{
dialogVisible_pushList
(
val
)
{
...
@@ -261,6 +251,7 @@ export default {
...
@@ -261,6 +251,7 @@ export default {
itemShow
:
1
,
// 控制上方查询条件的显示与隐藏
itemShow
:
1
,
// 控制上方查询条件的显示与隐藏
fileUrl
:
''
,
fileUrl
:
''
,
merchantList
:
[],
merchantList
:
[],
merchantChildsList
:
[],
searchParams
:
{
searchParams
:
{
bulletinType
:
'1'
,
bulletinType
:
'1'
,
personalCode
:
''
,
personalCode
:
''
,
...
@@ -276,22 +267,7 @@ export default {
...
@@ -276,22 +267,7 @@ export default {
groupId
:
''
,
groupId
:
''
,
viewStatus
:
''
viewStatus
:
''
},
},
detail
:
{
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' }
// ]
// },
times
:
[],
times
:
[],
// 公告管理列表分页参数
// 公告管理列表分页参数
pageNum
:
1
,
pageNum
:
1
,
...
@@ -306,13 +282,13 @@ export default {
...
@@ -306,13 +282,13 @@ export default {
addLoading
:
false
,
addLoading
:
false
,
dialogVisible_pushList
:
false
,
dialogVisible_pushList
:
false
,
dialogVisible_detail
:
false
,
dialogVisible_detail
:
false
,
groupList
:
[]
,
detailVisible
:
false
,
columnMap
:
{
columnMap
:
{
'1'
:
[
'1'
:
[
{
{
label
:
'标题'
,
label
:
'标题'
,
prop
:
'titile'
,
prop
:
'titile'
,
width
:
'2
0
0'
width
:
'2
5
0'
},
},
{
{
label
:
'展示方式'
,
label
:
'展示方式'
,
...
@@ -349,10 +325,12 @@ export default {
...
@@ -349,10 +325,12 @@ export default {
},
},
{
{
label
:
'分组'
,
label
:
'分组'
,
width
:
'200'
,
prop
:
'groupName'
prop
:
'groupName'
},
},
{
{
label
:
'发布商户'
,
label
:
'发布商户'
,
width
:
'200'
,
prop
:
'merchantName'
prop
:
'merchantName'
},
},
{
{
...
@@ -384,10 +362,11 @@ export default {
...
@@ -384,10 +362,11 @@ export default {
{
{
label
:
'标题'
,
label
:
'标题'
,
prop
:
'titile'
,
prop
:
'titile'
,
width
:
'2
0
0'
width
:
'2
5
0'
},
},
{
{
label
:
'内容分类'
,
label
:
'内容分类'
,
width
:
'150'
,
prop
:
'personalCodeValue'
prop
:
'personalCodeValue'
},
},
{
{
...
@@ -418,7 +397,7 @@ export default {
...
@@ -418,7 +397,7 @@ export default {
{
{
label
:
'活动时间'
,
label
:
'活动时间'
,
prop
:
'activityTime'
,
prop
:
'activityTime'
,
width
:
'
25
0'
width
:
'
30
0'
},
},
{
{
label
:
'活动状态'
,
label
:
'活动状态'
,
...
@@ -483,7 +462,7 @@ export default {
...
@@ -483,7 +462,7 @@ export default {
{
{
label
:
'标题'
,
label
:
'标题'
,
prop
:
'titile'
,
prop
:
'titile'
,
width
:
'2
0
0px'
width
:
'2
5
0px'
},
},
{
{
label
:
'封面'
,
label
:
'封面'
,
...
@@ -492,6 +471,7 @@ export default {
...
@@ -492,6 +471,7 @@ export default {
},
},
{
{
label
:
'内容分类'
,
label
:
'内容分类'
,
width
:
'150'
,
prop
:
'personalCodeValue'
prop
:
'personalCodeValue'
},
},
{
{
...
@@ -542,6 +522,7 @@ export default {
...
@@ -542,6 +522,7 @@ export default {
},
},
{
{
label
:
'发布商户'
,
label
:
'发布商户'
,
width
:
'200'
,
prop
:
'merchantName'
prop
:
'merchantName'
},
},
{
{
...
@@ -574,7 +555,7 @@ export default {
...
@@ -574,7 +555,7 @@ export default {
border
:
true
,
border
:
true
,
stripe
:
true
,
stripe
:
true
,
align
:
'center'
,
align
:
'center'
,
height
:
parseInt
(
this
.
$client_height
()
-
14
0
),
height
:
parseInt
(
this
.
$client_height
()
-
25
0
),
data
:
[],
data
:
[],
number
:
{
number
:
{
label
:
'序号'
,
label
:
'序号'
,
...
@@ -589,7 +570,7 @@ export default {
...
@@ -589,7 +570,7 @@ export default {
{
{
label
:
'标题'
,
label
:
'标题'
,
prop
:
'titile'
,
prop
:
'titile'
,
width
:
'2
0
0px'
width
:
'2
5
0px'
},
},
{
{
label
:
'展示方式'
,
label
:
'展示方式'
,
...
@@ -626,10 +607,12 @@ export default {
...
@@ -626,10 +607,12 @@ export default {
},
},
{
{
label
:
'分组'
,
label
:
'分组'
,
width
:
'200'
,
prop
:
'groupName'
prop
:
'groupName'
},
},
{
{
label
:
'发布商户'
,
label
:
'发布商户'
,
width
:
'200'
,
prop
:
'merchantName'
prop
:
'merchantName'
},
},
{
{
...
@@ -661,6 +644,7 @@ export default {
...
@@ -661,6 +644,7 @@ export default {
show
:
true
,
show
:
true
,
label
:
'操作'
,
label
:
'操作'
,
prop
:
'options'
,
prop
:
'options'
,
width
:
'150'
,
fixed
:
'right'
,
fixed
:
'right'
,
button
:
[
button
:
[
{
{
...
@@ -674,10 +658,14 @@ export default {
...
@@ -674,10 +658,14 @@ export default {
label
:
'下载附件'
,
label
:
'下载附件'
,
type
:
'text'
,
type
:
'text'
,
formatter
(
row
)
{
formatter
(
row
)
{
return
row
.
publishStatus
===
2
?
null
:
'下载附件'
return
row
.
publishStatus
===
3
?
null
:
'下载附件'
},
},
callback
:
(
index
,
row
)
=>
{
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.fileUrl = 'https://dz.80txt.com/57199/极品全能学生.zip'
// this.$refs['fileA'].click()
// this.$refs['fileA'].click()
// this.$confirm('下载附件', '', {
// this.$confirm('下载附件', '', {
...
@@ -708,14 +696,9 @@ export default {
...
@@ -708,14 +696,9 @@ export default {
},
},
column
:
[
column
:
[
{
{
label
:
'分组'
,
prop
:
'groupName'
,
width
:
'150px'
},
{
label
:
'商户名称'
,
label
:
'商户名称'
,
prop
:
'merchantName'
,
prop
:
'merchantName'
,
width
:
'
10
0px'
width
:
'
25
0px'
},
},
{
{
label
:
'所属区域'
,
label
:
'所属区域'
,
...
@@ -736,7 +719,7 @@ export default {
...
@@ -736,7 +719,7 @@ export default {
},
},
mounted
()
{
mounted
()
{
this
.
loadingGetList
()
this
.
loadingGetList
()
this
.
getGroupList
()
//
this.getGroupList()
this
.
getAllMerchant
()
this
.
getAllMerchant
()
},
},
methods
:
{
methods
:
{
...
@@ -779,7 +762,7 @@ export default {
...
@@ -779,7 +762,7 @@ export default {
.
req
(
params
)
.
req
(
params
)
.
then
(
res
=>
{
.
then
(
res
=>
{
res
.
pagination
&&
(
this
.
total
=
res
.
pagination
.
totalCount
)
res
.
pagination
&&
(
this
.
total
=
res
.
pagination
.
totalCount
)
this
.
tableData
.
data
=
res
.
bulletins
this
.
tableData
.
data
=
res
.
bulletin
Message
s
this
.
tableLoading
=
false
this
.
tableLoading
=
false
})
})
.
catch
(
err
=>
{
.
catch
(
err
=>
{
...
@@ -795,16 +778,14 @@ export default {
...
@@ -795,16 +778,14 @@ export default {
this
.
pageNum
=
val
this
.
pageNum
=
val
this
.
loadingGetList
()
this
.
loadingGetList
()
},
},
// 获取分组列表
// 当前公告商户列表
getGroupList
()
{
getMerchantChilds
(
recordId
)
{
const
params
=
{}
const
params
=
{
'recordId'
:
recordId
}
params
.
pageCount
=
1000
params
.
method
=
ctMethods
.
GetMerchantChilds
params
.
pageSize
=
1
params
.
method
=
nmMethods
.
MerchantGroup
request
request
.
req
(
params
)
.
req
(
params
)
.
then
(
res
=>
{
.
then
(
res
=>
{
this
.
groupList
=
res
.
groupDic
ts
this
.
merchantChildsList
=
res
.
merchan
ts
})
})
.
catch
(
err
=>
{
.
catch
(
err
=>
{
this
.
tableLoading
=
false
this
.
tableLoading
=
false
...
@@ -828,7 +809,7 @@ export default {
...
@@ -828,7 +809,7 @@ export default {
request
request
.
req
(
params
)
.
req
(
params
)
.
then
(
res
=>
{
.
then
(
res
=>
{
res
.
pagination
&&
(
this
.
total
=
res
.
pagination
.
totalCount
)
res
.
pagination
&&
(
this
.
total
_pushList
=
res
.
pagination
.
totalCount
)
this
.
tableData_pushList
.
data
=
res
.
bulletinPushes
this
.
tableData_pushList
.
data
=
res
.
bulletinPushes
this
.
tableLoading
=
false
this
.
tableLoading
=
false
})
})
...
@@ -845,13 +826,14 @@ export default {
...
@@ -845,13 +826,14 @@ export default {
this
.
dialogVisible_pushList
=
!
this
.
dialogVisible_pushList
this
.
dialogVisible_pushList
=
!
this
.
dialogVisible_pushList
this
.
searchPushParams
.
recordId
=
id
this
.
searchPushParams
.
recordId
=
id
this
.
loadingGetPushList
()
this
.
loadingGetPushList
()
this
.
getMerchantChilds
(
id
)
},
},
handleSizeChange_pushList
(
val
)
{
handleSizeChange_pushList
(
val
)
{
this
.
pageSize
=
val
this
.
pageSize
_pushList
=
val
this
.
loadingGetPushList
()
this
.
loadingGetPushList
()
},
},
handleCurrentChange_pushList
(
val
)
{
handleCurrentChange_pushList
(
val
)
{
this
.
pageNum
=
val
this
.
pageNum
_pushList
=
val
this
.
loadingGetPushList
()
this
.
loadingGetPushList
()
},
},
// 关闭推送列表弹出框
// 关闭推送列表弹出框
...
@@ -860,22 +842,25 @@ export default {
...
@@ -860,22 +842,25 @@ export default {
},
},
// 打开详情弹出框
// 打开详情弹出框
openDetailDialog
(
id
)
{
openDetailDialog
(
id
)
{
this
.
dialogVisible_detail
=
!
this
.
dialogVisible_detail
const
params
=
{
'recordId'
:
id
}
const
params
=
{
'bulletinId'
:
id
}
params
.
method
=
ctMethods
.
Detail
params
.
method
=
ctMethods
.
Detail
request
request
.
req
(
params
)
.
req
(
params
)
.
then
(
res
=>
{
.
then
(
res
=>
{
this
.
detail
=
res
this
.
detail
=
res
this
.
handleDetail
()
})
})
.
catch
(
err
=>
{
.
catch
(
err
=>
{
this
.
tableLoading
=
false
this
.
tableLoading
=
false
console
.
log
(
err
)
console
.
log
(
err
)
})
})
},
},
// 关闭详情弹出框
// 通知详情
handleClose_detail
()
{
handleDetail
()
{
this
.
dialogVisible_detail
=
!
this
.
dialogVisible_detail
this
.
detailVisible
=
!
this
.
detailVisible
},
handleDetailHide
()
{
this
.
detailVisible
=
!
this
.
detailVisible
}
}
}
}
}
}
...
...
src/views/noticeManage/AddDialog.vue
View file @
9b8da1b
...
@@ -57,7 +57,7 @@
...
@@ -57,7 +57,7 @@
prop=
"sendObj"
prop=
"sendObj"
>
>
<gl-checkbox-group
<gl-checkbox-group
v-model=
"noticeForm.
targetId
s"
v-model=
"noticeForm.
merchant
s"
name=
"sendObj"
name=
"sendObj"
data-vv-as=
"发送对象"
data-vv-as=
"发送对象"
v-validate=
"'required'"
v-validate=
"'required'"
...
@@ -82,7 +82,7 @@
...
@@ -82,7 +82,7 @@
<gl-upload
<gl-upload
class=
"upload-demo"
class=
"upload-demo"
name=
"file"
name=
"file"
action=
"http://192.168.2.89:8091/gps/common/uploadFile
"
:action=
"uploadAction
"
:limit=
"2"
:limit=
"2"
:before-upload=
"beforeUpload"
:before-upload=
"beforeUpload"
:on-success=
"handleSuccess"
:on-success=
"handleSuccess"
...
@@ -152,24 +152,8 @@ export default {
...
@@ -152,24 +152,8 @@ export default {
isClear
:
false
,
isClear
:
false
,
title
:
'创建通知'
,
title
:
'创建通知'
,
fileList
:
[],
fileList
:
[],
sendObjList
:
[
uploadAction
:
''
,
// {
sendObjList
:
[],
// label: '爱车保镖分组',
// value: '1'
// }, {
// label: '虎哥E盾分组',
// value: '2'
// }, {
// label: '嘀加系统(TSP版)',
// value: '3'
// }, {
// label: '嘀加系统(aaa版)',
// value: '4'
// }, {
// label: '嘀加系统(bbb版)',
// value: '5'
// }
],
showTypeList
:
[{
showTypeList
:
[{
label
:
'弹出框'
,
label
:
'弹出框'
,
value
:
1
value
:
1
...
@@ -207,13 +191,15 @@ export default {
...
@@ -207,13 +191,15 @@ export default {
},
},
isVisible
(
val
)
{
isVisible
(
val
)
{
!
val
&&
(
this
.
fileList
=
[])
!
val
&&
(
this
.
fileList
=
[])
console
.
log
(
this
.
noticeForm
.
recordId
)
this
.
noticeForm
.
recordId
&&
(
this
.
title
=
'编辑通知'
)
this
.
noticeForm
.
recordId
&&
(
this
.
title
=
'编辑通知'
)
this
.
$validator
.
errors
.
clear
()
this
.
$validator
.
errors
.
clear
()
}
}
},
},
mounted
()
{
mounted
()
{
this
.
getGroupList
()
this
.
getGroupList
()
this
.
uploadAction
=
`
${
this
.
$get_session_common_config
().
axios
.
fileUploadURL
}
/gps/
common
/
uploadFile
`
},
},
methods: {
methods: {
// 获取分组列表
// 获取分组列表
...
@@ -239,9 +225,6 @@ export default {
...
@@ -239,9 +225,6 @@ export default {
return isLT20M
return isLT20M
},
},
handleSuccess(res, file, fileList) {
handleSuccess(res, file, fileList) {
// console.log(res)
// console.log(file)
// console.log(fileList)
this.fileList = [{ name: file.name, url: file.response.data }]
this.fileList = [{ name: file.name, url: file.response.data }]
this.noticeForm.attachment = file.response.data
this.noticeForm.attachment = file.response.data
// this.noticeForm.attachment = 'https://dz.80txt.com/57199/极品全能学生.zip'
// this.noticeForm.attachment = 'https://dz.80txt.com/57199/极品全能学生.zip'
...
@@ -257,7 +240,6 @@ export default {
...
@@ -257,7 +240,6 @@ export default {
// this.$validator.validate('attachment', this.noticeForm.attachment)
// this.$validator.validate('attachment', this.noticeForm.attachment)
},
},
handleClose() {
handleClose() {
console
.
log
(
this
.
noticeForm
)
this.$emit('hideDialog')
this.$emit('hideDialog')
},
},
// 保存草稿
// 保存草稿
...
@@ -265,7 +247,7 @@ export default {
...
@@ -265,7 +247,7 @@ export default {
if (this.noticeForm.titile !== '') {
if (this.noticeForm.titile !== '') {
this.noticeForm.bulletinType = 1 // 通知
this.noticeForm.bulletinType = 1 // 通知
this.noticeForm.publishStatus = 1 // 仅保存
this.noticeForm.publishStatus = 1 // 仅保存
this
.
noticeForm
.
checkStatus
=
1
// 未审核
this.noticeForm.checkStatus =
0 // 草稿
this.$emit('handleAddComfirm')
this.$emit('handleAddComfirm')
} else {
} else {
// 添加验证
// 添加验证
...
@@ -274,12 +256,12 @@ export default {
...
@@ -274,12 +256,12 @@ export default {
},
},
// 审核并发布
// 审核并发布
handleComfrim() {
handleComfrim() {
// this.noticeForm.publishStatus = 2 // 仅保存
console
.
log
(
this
.
noticeForm
)
// this.$emit('handleAddComfirm')
this.$validator.validateAll().then((result) => {
this.$validator.validateAll().then((result) => {
if (result) {
if (result) {
console.log(this.$validator)
console.log(this.$validator)
this.noticeForm.bulletinType = 1 // 通知
this.noticeForm.publishStatus = 2 // 已发布
this.noticeForm.checkStatus = 2 // 已审核
this.$emit('handleAddComfirm', true)
this.$emit('handleAddComfirm', true)
}
}
})
})
...
...
src/views/noticeManage/DetailDialog.vue
View file @
9b8da1b
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
label=
"发送对象:"
label=
"发送对象:"
prop=
"sendObj"
prop=
"sendObj"
>
>
<gl-checkbox-group
v-model=
"noticeForm.
targetId
s"
>
<gl-checkbox-group
v-model=
"noticeForm.
merchant
s"
>
<gl-checkbox
<gl-checkbox
v-for=
"item in sendObjList"
v-for=
"item in sendObjList"
:label=
"item.id"
:label=
"item.id"
...
@@ -53,7 +53,7 @@
...
@@ -53,7 +53,7 @@
>
>
<!--
<a
href=
"http://down8.5156edu.com/showzipdown4.php?f_type1=2&id=96098"
>
下载附件
</a>
-->
<!--
<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=
"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>
<gl-form-item
<gl-form-item
label=
"展示方式:"
label=
"展示方式:"
...
@@ -72,10 +72,10 @@
...
@@ -72,10 +72,10 @@
</gl-form-item>
</gl-form-item>
</gl-form>
</gl-form>
<span
slot=
"footer"
v-show=
"noticeForm.publishStatus === 1 || noticeForm.publishStatus === 3"
>
<span
slot=
"footer"
v-show=
"noticeForm.publishStatus === 1 || noticeForm.publishStatus === 3"
>
<
!--
<
el-button
<el-button
type=
"primary"
type=
"primary"
@
click=
"handleComfrim"
@
click=
"handleComfrim"
v-show=
"noticeForm.publishStatus === 3"
>
审核并发布
</el-button>
-->
>
审核并发布
</el-button>
<el-button
<el-button
type=
"primary"
type=
"primary"
@
click=
"gotoEdit"
@
click=
"gotoEdit"
...
@@ -99,18 +99,7 @@ export default {
...
@@ -99,18 +99,7 @@ export default {
readonly
:
true
,
readonly
:
true
,
isEditable
:
false
,
isEditable
:
false
,
title
:
'通知详情'
,
title
:
'通知详情'
,
sendObjList
:
[
sendObjList
:
[],
// {
// label: '爱车保镖分组',
// value: '1'
// }, {
// label: '虎哥E盾分组',
// value: '2'
// }, {
// label: '嘀加系统(TSP版)',
// value: '3'
// }
],
checkList
:
[],
checkList
:
[],
showTypeList
:
[{
showTypeList
:
[{
label
:
'弹出框'
,
label
:
'弹出框'
,
...
@@ -139,17 +128,17 @@ export default {
...
@@ -139,17 +128,17 @@ export default {
noticeForm
:
Object
noticeForm
:
Object
},
},
watch
:
{
watch
:
{
'noticeForm.context'
(
val
)
{
//
'noticeForm.context'(val) {
if
(
val
===
'<p><br></p>'
)
{
//
if (val === '<p><br></p>') {
this
.
noticeForm
.
context
=
''
//
this.noticeForm.context = ''
this
.
$validator
.
validate
(
'context'
,
this
.
noticeForm
.
context
)
//
this.$validator.validate('context', this.noticeForm.context)
}
else
{
//
} else {
this
.
errorBags
.
remove
(
'context'
)
//
this.errorBags.remove('context')
}
//
}
},
//
},
isVisible
(
val
)
{
//
isVisible(val) {
this
.
$validator
.
errors
.
clear
()
//
this.$validator.errors.clear()
}
//
}
},
},
mounted
()
{
mounted
()
{
this
.
getGroupList
()
this
.
getGroupList
()
...
@@ -164,15 +153,6 @@ export default {
...
@@ -164,15 +153,6 @@ export default {
.
req
(
params
)
.
req
(
params
)
.
then
(
res
=>
{
.
then
(
res
=>
{
this
.
sendObjList
=
res
.
groupDicts
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
=>
{
.
catch
(
err
=>
{
this
.
tableLoading
=
false
this
.
tableLoading
=
false
...
@@ -185,6 +165,9 @@ export default {
...
@@ -185,6 +165,9 @@ export default {
},
},
gotoEdit
()
{
gotoEdit
()
{
this
.
$emit
(
'gotoEdit'
)
this
.
$emit
(
'gotoEdit'
)
},
handleComfrim
()
{
this
.
$emit
(
'handleComfrim'
)
}
}
}
}
}
}
...
...
src/views/noticeManage/Editor.vue
View file @
9b8da1b
...
@@ -63,7 +63,7 @@ export default {
...
@@ -63,7 +63,7 @@ export default {
this
.
editor
=
new
E
(
this
.
$refs
.
toolbar
,
this
.
$refs
.
editor
)
this
.
editor
=
new
E
(
this
.
$refs
.
toolbar
,
this
.
$refs
.
editor
)
this
.
editor
.
customConfig
.
uploadImgShowBase64
=
true
// base 64 存储图片
this
.
editor
.
customConfig
.
uploadImgShowBase64
=
true
// base 64 存储图片
// this.editor.customConfig.uploadImgServer = uploadPath// 配置服务器端地址
// 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
.
uploadImgHeaders
=
{
}
// 自定义 header
this
.
editor
.
customConfig
.
uploadFileName
=
'file'
// 后端接受上传文件的参数名
this
.
editor
.
customConfig
.
uploadFileName
=
'file'
// 后端接受上传文件的参数名
this
.
editor
.
customConfig
.
uploadImgMaxSize
=
2
*
1024
*
1024
// 将图片大小限制为 2M
this
.
editor
.
customConfig
.
uploadImgMaxSize
=
2
*
1024
*
1024
// 将图片大小限制为 2M
...
...
src/views/noticeManage/index.vue
View file @
9b8da1b
...
@@ -105,7 +105,7 @@
...
@@ -105,7 +105,7 @@
></gl-pagination>
></gl-pagination>
<gl-dialog
<gl-dialog
title=
"推送列表"
title=
"推送列表"
width=
"
4
0%"
width=
"
5
0%"
:visible
.
sync=
"dialogVisible_pushList"
:visible
.
sync=
"dialogVisible_pushList"
:before-close=
"handleClose_pushList"
>
:before-close=
"handleClose_pushList"
>
<gl-form
<gl-form
...
@@ -170,6 +170,7 @@
...
@@ -170,6 +170,7 @@
:noticeForm=
"noticeForm"
:noticeForm=
"noticeForm"
@
hideDialog=
"handleDetailHide"
@
hideDialog=
"handleDetailHide"
@
gotoEdit=
"goEdit"
@
gotoEdit=
"goEdit"
@
handleComfrim=
"auditAgain"
>
>
</detail-dialog>
</detail-dialog>
</div>
</div>
...
@@ -191,7 +192,6 @@ export default {
...
@@ -191,7 +192,6 @@ export default {
watch
:
{
watch
:
{
dialogVisible_pushList
(
val
)
{
dialogVisible_pushList
(
val
)
{
if
(
!
val
)
{
if
(
!
val
)
{
console
.
log
(
val
)
// this.$refs['searchPushParams'].resetFields()
// this.$refs['searchPushParams'].resetFields()
this
.
searchPushParams
.
recordId
=
''
this
.
searchPushParams
.
recordId
=
''
this
.
searchPushParams
.
groupId
=
''
this
.
searchPushParams
.
groupId
=
''
...
@@ -201,7 +201,9 @@ export default {
...
@@ -201,7 +201,9 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
operater
:
null
,
searchParams
:
{
searchParams
:
{
bulletinType
:
1
,
timeLimitType
:
''
,
timeLimitType
:
''
,
showType
:
''
,
showType
:
''
,
publishStatus
:
''
,
publishStatus
:
''
,
...
@@ -230,7 +232,7 @@ export default {
...
@@ -230,7 +232,7 @@ export default {
titile
:
''
,
titile
:
''
,
context
:
''
,
context
:
''
,
// 发送对象
// 发送对象
targetId
s
:
[],
merchant
s
:
[],
attachment
:
''
,
attachment
:
''
,
showType
:
''
,
showType
:
''
,
publishStatus
:
''
publishStatus
:
''
...
@@ -245,7 +247,7 @@ export default {
...
@@ -245,7 +247,7 @@ export default {
border
:
true
,
border
:
true
,
stripe
:
true
,
stripe
:
true
,
align
:
'center'
,
align
:
'center'
,
height
:
parseInt
(
this
.
$client_height
()
-
1
4
0
),
height
:
parseInt
(
this
.
$client_height
()
-
1
8
0
),
data
:
[],
data
:
[],
number
:
{
number
:
{
label
:
'序号'
,
label
:
'序号'
,
...
@@ -259,7 +261,7 @@ export default {
...
@@ -259,7 +261,7 @@ export default {
{
{
label
:
'标题'
,
label
:
'标题'
,
prop
:
'titile'
,
prop
:
'titile'
,
width
:
'
10
0px'
width
:
'
25
0px'
},
},
{
{
label
:
'展示方式'
,
label
:
'展示方式'
,
...
@@ -314,6 +316,7 @@ export default {
...
@@ -314,6 +316,7 @@ export default {
{
{
label
:
'发布时间'
,
label
:
'发布时间'
,
prop
:
'publishTime'
,
prop
:
'publishTime'
,
width
:
'150'
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
if
(
cellValue
.
publishTime
)
{
if
(
cellValue
.
publishTime
)
{
return
new
Date
(
cellValue
.
publishTime
).
format
(
'yyyy/MM/dd HH:mm:ss'
)
return
new
Date
(
cellValue
.
publishTime
).
format
(
'yyyy/MM/dd HH:mm:ss'
)
...
@@ -323,6 +326,7 @@ export default {
...
@@ -323,6 +326,7 @@ export default {
{
{
label
:
'创建时间'
,
label
:
'创建时间'
,
prop
:
'createTime'
,
prop
:
'createTime'
,
width
:
'150'
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
if
(
cellValue
.
createTime
)
{
if
(
cellValue
.
createTime
)
{
return
new
Date
(
cellValue
.
createTime
).
format
(
'yyyy/MM/dd HH:mm:ss'
)
return
new
Date
(
cellValue
.
createTime
).
format
(
'yyyy/MM/dd HH:mm:ss'
)
...
@@ -334,6 +338,8 @@ export default {
...
@@ -334,6 +338,8 @@ export default {
show
:
true
,
show
:
true
,
label
:
'操作'
,
label
:
'操作'
,
prop
:
'options'
,
prop
:
'options'
,
width
:
'150'
,
fixed
:
'right'
,
button
:
[
button
:
[
{
{
label
:
'详情'
,
label
:
'详情'
,
...
@@ -346,7 +352,7 @@ export default {
...
@@ -346,7 +352,7 @@ export default {
label
:
'取消发布'
,
label
:
'取消发布'
,
type
:
'text'
,
type
:
'text'
,
formatter
(
row
)
{
formatter
(
row
)
{
return
row
.
publishStatus
===
1
?
'取消发布'
:
null
return
row
.
publishStatus
===
2
?
'取消发布'
:
null
},
},
callback
:
(
index
,
row
)
=>
{
callback
:
(
index
,
row
)
=>
{
this
.
$confirm
(
'请确认是否取消发布,取消发布后,消息不再展示'
,
''
,
{
this
.
$confirm
(
'请确认是否取消发布,取消发布后,消息不再展示'
,
''
,
{
...
@@ -363,7 +369,7 @@ export default {
...
@@ -363,7 +369,7 @@ export default {
label
:
'编辑'
,
label
:
'编辑'
,
type
:
'text'
,
type
:
'text'
,
formatter
(
row
)
{
formatter
(
row
)
{
return
row
.
publishStatus
===
1
?
null
:
'编辑'
return
row
.
publishStatus
===
2
?
null
:
'编辑'
},
},
callback
:
(
index
,
row
)
=>
{
callback
:
(
index
,
row
)
=>
{
this
.
noticeDetail
(
row
[
index
].
recordId
,
1
)
this
.
noticeDetail
(
row
[
index
].
recordId
,
1
)
...
@@ -390,12 +396,12 @@ export default {
...
@@ -390,12 +396,12 @@ export default {
{
{
label
:
'分组'
,
label
:
'分组'
,
prop
:
'groupName'
,
prop
:
'groupName'
,
width
:
'
15
0px'
width
:
'
20
0px'
},
},
{
{
label
:
'商户名称'
,
label
:
'商户名称'
,
prop
:
'merchantName'
,
prop
:
'merchantName'
,
width
:
'
10
0px'
width
:
'
25
0px'
},
},
{
{
label
:
'所属区域'
,
label
:
'所属区域'
,
...
@@ -417,6 +423,7 @@ export default {
...
@@ -417,6 +423,7 @@ export default {
mounted
()
{
mounted
()
{
this
.
loadingGetList
()
this
.
loadingGetList
()
this
.
getGroupList
()
this
.
getGroupList
()
this
.
operater
=
this
.
$get_session_config
().
user
},
},
methods
:
{
methods
:
{
loadingGetList
()
{
loadingGetList
()
{
...
@@ -446,7 +453,7 @@ export default {
...
@@ -446,7 +453,7 @@ export default {
.
req
(
params
)
.
req
(
params
)
.
then
(
res
=>
{
.
then
(
res
=>
{
res
.
pagination
&&
(
this
.
total
=
res
.
pagination
.
totalCount
)
res
.
pagination
&&
(
this
.
total
=
res
.
pagination
.
totalCount
)
this
.
tableData
.
data
=
res
.
bulletins
this
.
tableData
.
data
=
res
.
bulletin
Message
s
this
.
tableLoading
=
false
this
.
tableLoading
=
false
})
})
.
catch
(
err
=>
{
.
catch
(
err
=>
{
...
@@ -495,7 +502,7 @@ export default {
...
@@ -495,7 +502,7 @@ export default {
request
request
.
req
(
params
)
.
req
(
params
)
.
then
(
res
=>
{
.
then
(
res
=>
{
res
.
pagination
&&
(
this
.
total
=
res
.
pagination
.
totalCount
)
res
.
pagination
&&
(
this
.
total
_pushList
=
res
.
pagination
.
totalCount
)
this
.
tableData_pushList
.
data
=
res
.
bulletinPushes
this
.
tableData_pushList
.
data
=
res
.
bulletinPushes
this
.
tableLoading
=
false
this
.
tableLoading
=
false
})
})
...
@@ -514,11 +521,11 @@ export default {
...
@@ -514,11 +521,11 @@ export default {
this
.
loadingGetPushList
()
this
.
loadingGetPushList
()
},
},
handleSizeChange_pushList
(
val
)
{
handleSizeChange_pushList
(
val
)
{
this
.
pageSize
=
val
this
.
pageSize
_pushList
=
val
this
.
loadingGetPushList
()
this
.
loadingGetPushList
()
},
},
handleCurrentChange_pushList
(
val
)
{
handleCurrentChange_pushList
(
val
)
{
this
.
pageNum
=
val
this
.
pageNum
_pushList
=
val
this
.
loadingGetPushList
()
this
.
loadingGetPushList
()
},
},
// 关闭推送列表弹出框
// 关闭推送列表弹出框
...
@@ -532,18 +539,16 @@ export default {
...
@@ -532,18 +539,16 @@ export default {
request
request
.
req
(
params
)
.
req
(
params
)
.
then
(
res
=>
{
.
then
(
res
=>
{
notice
.
okTips
(
'已取消发布'
)
this
.
loadingGetList
()
this
.
loadingGetList
()
notice
.
okTips
()
})
})
.
catch
(
err
=>
console
.
log
(
err
))
.
catch
(
err
=>
console
.
log
(
err
))
},
},
// 公告详情
// 公告详情
noticeDetail
(
recordId
,
isEdit
=
0
)
{
noticeDetail
(
recordId
,
isEdit
=
0
)
{
const
params
=
{
'recordId'
:
recordId
}
const
params
=
{
'recordId'
:
recordId
}
console
.
log
(
nmMethods
.
Detail
)
params
.
method
=
nmMethods
.
Detail
params
.
method
=
nmMethods
.
Detail
request
.
req
(
params
).
then
(
res
=>
{
request
.
req
(
params
).
then
(
res
=>
{
console
.
log
(
res
)
for
(
var
item
in
this
.
noticeForm
)
{
for
(
var
item
in
this
.
noticeForm
)
{
this
.
noticeForm
[
item
]
=
res
[
item
]
this
.
noticeForm
[
item
]
=
res
[
item
]
}
}
...
@@ -557,24 +562,32 @@ export default {
...
@@ -557,24 +562,32 @@ export default {
createNotice
()
{
createNotice
()
{
const
params
=
this
.
$deep_clone
(
this
.
noticeForm
)
const
params
=
this
.
$deep_clone
(
this
.
noticeForm
)
!
params
.
recordId
&&
delete
params
.
recordId
!
params
.
recordId
&&
delete
params
.
recordId
params
.
merchants
=
params
.
merchants
.
join
(
','
)
params
.
operatorId
=
this
.
operater
.
id
params
.
operatorName
=
this
.
operater
.
realname
params
.
method
=
nmMethods
.
Create
params
.
method
=
nmMethods
.
Create
request
.
req
(
params
).
then
(
res
=>
{
request
.
req
(
params
).
then
(
res
=>
{
notice
.
okTips
(
'创建成功'
)
notice
.
okTips
(
'创建成功'
)
this
.
handleAdd
()
this
.
handleAdd
()
resetSearch
(
this
.
noticeForm
)
resetSearch
(
this
.
noticeForm
)
this
.
loadingGetList
()
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
notice
.
errorTips
(
err
)
notice
.
errorTips
(
err
)
})
})
},
},
// 创建公告+审核发布
// 创建公告+审核发布
createCheckNotice
()
{
createCheckNotice
(
auditAgain
)
{
const
params
=
this
.
$deep_clone
(
this
.
noticeForm
)
const
params
=
this
.
$deep_clone
(
this
.
noticeForm
)
!
params
.
recordId
&&
delete
params
.
recordId
!
params
.
recordId
&&
delete
params
.
recordId
params
.
merchants
=
params
.
merchants
.
join
(
','
)
params
.
operatorId
=
this
.
operater
.
id
params
.
operatorName
=
this
.
operater
.
realname
params
.
method
=
nmMethods
.
CreateCheck
params
.
method
=
nmMethods
.
CreateCheck
request
.
req
(
params
).
then
(
res
=>
{
request
.
req
(
params
).
then
(
res
=>
{
notice
.
okTips
(
'发布成功'
)
notice
.
okTips
(
'发布成功'
)
this
.
handleAdd
()
!
auditAgain
&&
this
.
handleAdd
()
// 详情页审核发布时不需要管创建弹出框,创建页的审核发布需要对弹出框做隐藏处理
resetSearch
(
this
.
noticeForm
)
resetSearch
(
this
.
noticeForm
)
this
.
loadingGetList
()
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
notice
.
errorTips
(
err
)
notice
.
errorTips
(
err
)
})
})
...
@@ -604,8 +617,17 @@ export default {
...
@@ -604,8 +617,17 @@ export default {
resetSearch
(
this
.
noticeForm
)
resetSearch
(
this
.
noticeForm
)
},
},
goEdit
()
{
goEdit
()
{
console
.
log
(
this
.
noticeForm
)
this
.
detailVisible
=
!
this
.
detailVisible
this
.
detailVisible
=
!
this
.
detailVisible
this
.
addVisible
=
!
this
.
addVisible
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