@ -29,7 +29,8 @@ export default {
addTotemplate: 'wxwholesaler/addTotemplate',
qrcode: 'wxwholesaler/qrcode',
commit: 'wxwholesaler/commit',
auditOne: 'wxwholesaler/commitOne',
commitOne: 'wxwholesaler/commitOne',
auditOne: 'wxwholesaler/auditOne',
getVersion: 'wxwholesaler/getVersion',
auditBeforeCheck: 'wxwholesaler/auditBeforeCheck',
audit: 'wxwholesaler/audit',
@ -45,6 +45,14 @@ export function commit (params) {
params
})
}
export function commitOne (params) {
return axios({
url: api.store.commitOne,
method: 'get',
/**
* 获取列表
* @param {*} params
@ -208,7 +208,7 @@ export default {
this.$refs.qrcode.show()
},
handleCommit (appid) {
this.$refs.commit.show(appid)
this.$refs.commit.show(appid, 1)
handleBatchTest () {
const appids = this.selectedRowKeys.join(',')
@ -216,7 +216,7 @@ export default {
this.$message.error('请选择需要提交的APPID')
return false
this.$refs.commit.show(appids)
this.$refs.commit.show(appids, 0)
handleBatch () {
@ -43,6 +43,7 @@ export default {
// modal(对话框)确定按钮 loading
confirmLoading: false,
templateList: [],
type: 0,
// 当前表单元素
form: {
template_id: '',
@ -54,7 +55,8 @@ export default {
* 显示对话框
*/
show (appid) {
show (appid, type) {
this.type = type
this.form.appid = appid
this.visible = true
this.getTemplatelist()
@ -78,6 +80,7 @@ export default {
handleSubmit (values) {
this.confirmLoading = true
if (this.type === 0) {
Api.commit(this.form)
.then((result) => {
// 显示成功提示
@ -90,6 +93,20 @@ export default {
.finally((result) => {
this.confirmLoading = false
} else {
Api.commitOne(this.form)
this.$message.success(result.message, 1.2)
// 关闭对话框
this.handleCancel()
// 通知父端组件提交完成了
this.$emit('handleSubmit', values)