mirror of https://gitee.com/xiaonuobase/snowy
【优化】优化通知公告前端命名规范问题
parent
53807cb63f
commit
6684bedacf
|
@ -10,27 +10,27 @@ const request = (url, ...arg) => baseRequest(`/biz/notice/` + url, ...arg)
|
||||||
**/
|
**/
|
||||||
export default {
|
export default {
|
||||||
// 获取通知公告分页
|
// 获取通知公告分页
|
||||||
bizNoticePage(data) {
|
noticePage(data) {
|
||||||
return request('page', data, 'get')
|
return request('page', data, 'get')
|
||||||
},
|
},
|
||||||
// 提交通知公告表单 edit为true时为编辑,默认为新增
|
// 提交通知公告表单 edit为true时为编辑,默认为新增
|
||||||
bizNoticeSubmitForm(data, edit = false) {
|
noticeSubmitForm(data, edit = false) {
|
||||||
return request(edit ? 'edit' : 'add', data)
|
return request(edit ? 'edit' : 'add', data)
|
||||||
},
|
},
|
||||||
// 删除通知公告
|
// 删除通知公告
|
||||||
bizNoticeDelete(data) {
|
noticeDelete(data) {
|
||||||
return request('delete', data)
|
return request('delete', data)
|
||||||
},
|
},
|
||||||
// 获取通知公告详情
|
// 获取通知公告详情
|
||||||
bizNoticeDetail(data) {
|
noticeDetail(data) {
|
||||||
return request('detail', data, 'get')
|
return request('detail', data, 'get')
|
||||||
},
|
},
|
||||||
// 禁用通知公告
|
// 禁用通知公告
|
||||||
bizNoticeDisableStatus(data) {
|
noticeDisableStatus(data) {
|
||||||
return request('disableStatus', data)
|
return request('disableStatus', data)
|
||||||
},
|
},
|
||||||
// 启用通知公告
|
// 启用通知公告
|
||||||
bizNoticeEnableStatus(data) {
|
noticeEnableStatus(data) {
|
||||||
return request('enableStatus', data)
|
return request('enableStatus', data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,7 +72,7 @@
|
||||||
const param = {
|
const param = {
|
||||||
id: id
|
id: id
|
||||||
}
|
}
|
||||||
bizNoticeApi.bizNoticeDetail(param).then((data) => {
|
bizNoticeApi.noticeDetail(param).then((data) => {
|
||||||
formData.value = Object.assign({}, data)
|
formData.value = Object.assign({}, data)
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -133,7 +133,7 @@
|
||||||
const formDataParam = cloneDeep(formData.value)
|
const formDataParam = cloneDeep(formData.value)
|
||||||
formDataParam.place = JSON.stringify(formDataParam.place)
|
formDataParam.place = JSON.stringify(formDataParam.place)
|
||||||
bizNoticeApi
|
bizNoticeApi
|
||||||
.bizNoticeSubmitForm(formDataParam, formDataParam.id)
|
.noticeSubmitForm(formDataParam, formDataParam.id)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
onClose()
|
onClose()
|
||||||
emit('successful')
|
emit('successful')
|
||||||
|
|
|
@ -198,7 +198,7 @@
|
||||||
searchFormParam.endCreateTime = searchFormParam.createTime[1]
|
searchFormParam.endCreateTime = searchFormParam.createTime[1]
|
||||||
delete searchFormParam.createTime
|
delete searchFormParam.createTime
|
||||||
}
|
}
|
||||||
return bizNoticeApi.bizNoticePage(Object.assign(parameter, searchFormParam)).then((data) => {
|
return bizNoticeApi.noticePage(Object.assign(parameter, searchFormParam)).then((data) => {
|
||||||
return data
|
return data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -214,13 +214,13 @@
|
||||||
id: record.id
|
id: record.id
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
bizNoticeApi.bizNoticeDelete(params).then(() => {
|
bizNoticeApi.noticeDelete(params).then(() => {
|
||||||
tableRef.value.refresh(true)
|
tableRef.value.refresh(true)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 批量删除
|
// 批量删除
|
||||||
const deleteBatchBizNotice = (params) => {
|
const deleteBatchBizNotice = (params) => {
|
||||||
bizNoticeApi.bizNoticeDelete(params).then(() => {
|
bizNoticeApi.noticeDelete(params).then(() => {
|
||||||
tableRef.value.clearRefreshSelected()
|
tableRef.value.clearRefreshSelected()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -229,7 +229,7 @@
|
||||||
loading.value = true
|
loading.value = true
|
||||||
if (record.status === 'ENABLE') {
|
if (record.status === 'ENABLE') {
|
||||||
bizNoticeApi
|
bizNoticeApi
|
||||||
.bizNoticeDisableStatus(record)
|
.noticeDisableStatus(record)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
tableRef.value.refresh()
|
tableRef.value.refresh()
|
||||||
})
|
})
|
||||||
|
@ -238,7 +238,7 @@
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
bizNoticeApi
|
bizNoticeApi
|
||||||
.bizNoticeEnableStatus(record)
|
.noticeEnableStatus(record)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
tableRef.value.refresh()
|
tableRef.value.refresh()
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue