Commit 699e5793 by cwq0219

公告-创建和发布接口

1 parent 10dd3a2e
......@@ -6,6 +6,8 @@ const methods = {
UserCountSearch: `${path_push}.push.search`,
CancelPublish: `${path_push}.publish.cancel`,
MerchantGroup: `${path_merchant}.group.dict`,
Create: `${path}create`,
CreateCheck: `${path}create.check`,
Detail: `${path_push}.detail`
}
export {
......
......@@ -230,26 +230,20 @@ export default {
console.log(this.noticeForm)
this.$emit('hideDialog')
},
// 保存草稿
handleDraft() {
this.$emit('handleAddComfirm')
},
// 审核并发布
handleComfrim() {
console.log(this.noticeForm)
// this.$emit('handleAddComfirm')
this.$validator.validateAll().then((result) => {
if (result) {
console.log(this.$validator)
this.$emit('handleAddComfirm', this.areaInfo)
this.$emit('handleAddComfirm', true)
}
})
// Promise.all([
// this.$refs['c'].$validator.validateAll(),
// this.$validator.validateAll()
// ]).then((result) => {
// if (result[0] && result[1]) {
// this.$emit('comfirmDialog', this.areaInfo)
// }
// })
}
}
}
......
......@@ -52,7 +52,8 @@
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="https://cdn.shopify.com/s/files/1/1545/3617/files/SH01_User_Manaul.pdf" download="SH01_User_Manaul.pdf">下载附件</a> -->
<a href="https://down1.jyrd.com/2010/WPS.Office_ankty.rar">下载附件</a>
</gl-form-item>
<gl-form-item
label="展示方式:"
......
......@@ -555,6 +555,32 @@ export default {
notice.errorTips(err)
})
},
// 创建公告
createNotice() {
const params = this.$deep_clone(this.noticeForm)
!params.recordId && delete params.recordId
params.method = nmMethods.Create
request.req(params).then(res => {
notice.okTips('创建成功')
this.handleAdd()
resetSearch(this.noticeForm)
}).catch(err => {
notice.errorTips(err)
})
},
// 创建公告+审核发布
createCheckNotice() {
const params = this.$deep_clone(this.noticeForm)
!params.recordId && delete params.recordId
params.method = nmMethods.CreateCheck
request.req(params).then(res => {
notice.okTips('发布成功')
this.handleAdd()
resetSearch(this.noticeForm)
}).catch(err => {
notice.errorTips(err)
})
},
// 新增公告
handleAdd(isCreate) {
isCreate && (this.noticeForm.showType = '1')
......@@ -565,12 +591,14 @@ export default {
this.handleAdd()
resetSearch(this.noticeForm)
},
handleAddComfirm(noticeInfo) {
this.handleAdd()
resetSearch(this.noticeForm)
// isRelease是否审核发布,默认为仅保存
handleAddComfirm(isRelease = false) {
isRelease ? this.createCheckNotice() : this.createNotice()
// this.handleAdd()
// resetSearch(this.noticeForm)
},
// 通知详情
handleDetail(recordId) {
handleDetail() {
this.detailVisible = !this.detailVisible
},
handleDetailHide() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!