Commit 699e5793 by cwq0219

公告-创建和发布接口

1 parent 10dd3a2e
...@@ -6,6 +6,8 @@ const methods = { ...@@ -6,6 +6,8 @@ const methods = {
UserCountSearch: `${path_push}.push.search`, UserCountSearch: `${path_push}.push.search`,
CancelPublish: `${path_push}.publish.cancel`, CancelPublish: `${path_push}.publish.cancel`,
MerchantGroup: `${path_merchant}.group.dict`, MerchantGroup: `${path_merchant}.group.dict`,
Create: `${path}create`,
CreateCheck: `${path}create.check`,
Detail: `${path_push}.detail` Detail: `${path_push}.detail`
} }
export { export {
......
...@@ -230,26 +230,20 @@ export default { ...@@ -230,26 +230,20 @@ export default {
console.log(this.noticeForm) console.log(this.noticeForm)
this.$emit('hideDialog') this.$emit('hideDialog')
}, },
// 保存草稿
handleDraft() { handleDraft() {
this.$emit('handleAddComfirm') this.$emit('handleAddComfirm')
}, },
// 审核并发布
handleComfrim() { handleComfrim() {
console.log(this.noticeForm) console.log(this.noticeForm)
// this.$emit('handleAddComfirm') // 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.$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 @@ ...@@ -52,7 +52,8 @@
class="download" class="download"
> >
<!-- <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="https://down1.jyrd.com/2010/WPS.Office_ankty.rar">下载附件</a>
</gl-form-item> </gl-form-item>
<gl-form-item <gl-form-item
label="展示方式:" label="展示方式:"
......
...@@ -555,6 +555,32 @@ export default { ...@@ -555,6 +555,32 @@ export default {
notice.errorTips(err) 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) { handleAdd(isCreate) {
isCreate && (this.noticeForm.showType = '1') isCreate && (this.noticeForm.showType = '1')
...@@ -565,12 +591,14 @@ export default { ...@@ -565,12 +591,14 @@ export default {
this.handleAdd() this.handleAdd()
resetSearch(this.noticeForm) resetSearch(this.noticeForm)
}, },
handleAddComfirm(noticeInfo) { // isRelease是否审核发布,默认为仅保存
this.handleAdd() handleAddComfirm(isRelease = false) {
resetSearch(this.noticeForm) isRelease ? this.createCheckNotice() : this.createNotice()
// this.handleAdd()
// resetSearch(this.noticeForm)
}, },
// 通知详情 // 通知详情
handleDetail(recordId) { handleDetail() {
this.detailVisible = !this.detailVisible this.detailVisible = !this.detailVisible
}, },
handleDetailHide() { handleDetailHide() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!