Browse Source

积分埋点 接口拆分

feature/syp_points
songyunpeng 6 years ago
parent
commit
46d99b8432
  1. 68
      src/views/modules/events/issue-process-detail-view.vue
  2. 51
      src/views/modules/events/issue-review-detail-view.vue
  3. 110
      src/views/modules/events/item-deal-detail-view.vue
  4. 78
      src/views/modules/group/group-approve.vue

68
src/views/modules/events/issue-process-detail-view.vue

@ -263,22 +263,60 @@ export default {
if (this.dataForm.id) { if (this.dataForm.id) {
this.dataForm.images = [] this.dataForm.images = []
} }
this.$http['post']('/events/issue/issueWaitHandleSubmit', this.dataForm).then(({ data: res }) => { if (this.dataForm.state === '1') {
this.isAble = false this.$http['post']('/events/issue/response', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) { this.isAble = false
return this.$message.error(res.msg) if (res.code !== 0) {
} return this.$message.error(res.msg)
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
} }
}) this.$message({
this.$parent.selectComponent = 'IssueProcessList' message: this.$t('prompt.success'),
}).catch(() => { }) type: 'success',
duration: 500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
this.$parent.selectComponent = 'IssueProcessList'
}).catch(() => { })
}
if (this.dataForm.state === '2') {
this.$http['post']('/events/issue/close', this.dataForm).then(({ data: res }) => {
this.isAble = false
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
this.$parent.selectComponent = 'IssueProcessList'
}).catch(() => { })
}
if (this.dataForm.state === '4') {
this.$http['post']('/events/issue/toItem', this.dataForm).then(({ data: res }) => {
this.isAble = false
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
this.$parent.selectComponent = 'IssueProcessList'
}).catch(() => { })
}
}) })
}, 1000, { 'leading': true, 'trailing': false }) }, 1000, { 'leading': true, 'trailing': false })
} }

51
src/views/modules/events/issue-review-detail-view.vue

@ -174,7 +174,6 @@ export default {
// //
dataFormSubmitHandle: debounce(function () { dataFormSubmitHandle: debounce(function () {
this.dataForm.categoryId = this.categoryIds[this.categoryIds.length - 1] this.dataForm.categoryId = this.categoryIds[this.categoryIds.length - 1]
console.log(this.dataForm.categoryId)
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (!valid) { if (!valid) {
return false return false
@ -183,22 +182,42 @@ export default {
return this.$message.error('处理意见不超过500字') return this.$message.error('处理意见不超过500字')
} }
this.isAble = true this.isAble = true
this.$http['post']('/events/epdcevents/review', this.dataForm).then(({ data: res }) => { if (this.dataForm.eventState === '4') {
this.isAble = false this.$http['post']('/events/epdcevents/reviewPass', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) { this.isAble = false
return this.$message.error(res.msg) if (res.code !== 0) {
} return this.$message.error(res.msg)
this.$message({ }
message: this.$t('prompt.success'), this.$message({
type: 'success', message: this.$t('prompt.success'),
duration: 500, type: 'success',
onClose: () => { duration: 500,
this.visible = false onClose: () => {
this.$parent.selectComponent = 'IssueReviewList' this.visible = false
this.$emit('refreshDataList') this.$parent.selectComponent = 'IssueReviewList'
this.$emit('refreshDataList')
}
})
}).catch(() => {})
}
if (this.dataForm.eventState === '2') {
this.$http['post']('/events/epdcevents/reviewNopass', this.dataForm).then(({ data: res }) => {
this.isAble = false
if (res.code !== 0) {
return this.$message.error(res.msg)
} }
}) this.$message({
}).catch(() => {}) message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
this.$parent.selectComponent = 'IssueReviewList'
this.$emit('refreshDataList')
}
})
}).catch(() => {})
}
}) })
}, 1000, { 'leading': true, 'trailing': false }) }, 1000, { 'leading': true, 'trailing': false })
} }

110
src/views/modules/events/item-deal-detail-view.vue

@ -268,7 +268,8 @@ export default {
outHandleAdvice: '', outHandleAdvice: '',
handleCategory: '', handleCategory: '',
deptResultDTOS: [], deptResultDTOS: [],
evaluateDeptDTOS: [] evaluateDeptDTOS: [],
userId: ''
}, },
deptResultDTOSVisible: false, deptResultDTOSVisible: false,
evaluateDeptDTOSVisible: false, evaluateDeptDTOSVisible: false,
@ -529,23 +530,98 @@ export default {
this.postDataForm.evaluateDeptDTOS = [] this.postDataForm.evaluateDeptDTOS = []
} }
this.isAble = true this.isAble = true
this.$http['post']( this.postDataForm.userId = this.dataForm.userId
'/events/item/itemHandleSubmit', this.postDataForm).then(({ data: res }) => { if (this.postDataForm.handleCategory === 0) {
this.isAble = false this.$http['post'](
if (res.code !== 0) { '/events/item/response', this.postDataForm).then(({ data: res }) => {
return this.$message.error(res.msg) this.isAble = false
} if (res.code !== 0) {
this.$message({ return this.$message.error(res.msg)
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
} }
}) this.$message({
this.$parent.selectComponent = 'ItemDeal' message: this.$t('prompt.success'),
}).catch(() => { }) type: 'success',
duration: 500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
this.$parent.selectComponent = 'ItemDeal'
}).catch(() => { })
} else if (this.postDataForm.handleCategory === 1) {
this.$http['post'](
'/events/item/whistle', this.postDataForm).then(({ data: res }) => {
this.isAble = false
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
this.$parent.selectComponent = 'ItemDeal'
}).catch(() => { })
} else if (this.postDataForm.handleCategory === 5) {
this.$http['post'](
'/events/item/close', this.postDataForm).then(({ data: res }) => {
this.isAble = false
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
this.$parent.selectComponent = 'ItemDeal'
}).catch(() => { })
} else if (this.postDataForm.handleCategory === 10) {
this.$http['post'](
'/events/item/closeCase', this.postDataForm).then(({ data: res }) => {
this.isAble = false
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
this.$parent.selectComponent = 'ItemDeal'
}).catch(() => { })
} else {
this.$http['post'](
'/events/item/itemHandleSubmit', this.postDataForm).then(({ data: res }) => {
this.isAble = false
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
this.$parent.selectComponent = 'ItemDeal'
}).catch(() => { })
}
}, 1000, { 'leading': true, 'trailing': false }) }, 1000, { 'leading': true, 'trailing': false })
} }

78
src/views/modules/group/group-approve.vue

@ -99,21 +99,71 @@ export default {
return this.$message.error('处理意见不能超过500字') return this.$message.error('处理意见不能超过500字')
} }
} }
this.$http['post']( if (this.dataForm.state === '10') {
'/group/group/operate', this.dataForm).then(({ data: res }) => { this.$http['post'](
if (res.code !== 0) { '/group/group/pass', this.dataForm).then(({ data: res }) => {
return this.$message.error(res.msg) if (res.code !== 0) {
} return this.$message.error(res.msg)
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
} }
}) this.$message({
}).catch(() => {}) message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
}).catch(() => {})
} else if (this.dataForm.state === '5') {
this.$http['post'](
'/group/group/noPass', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
}).catch(() => {})
} else if (this.dataForm.state === '20') {
this.$http['post'](
'/group/group/noPass', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
}).catch(() => {})
} else {
this.$http['post'](
'/group/group/operate', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
}).catch(() => {})
}
}, 1000, { 'leading': true, 'trailing': false }) }, 1000, { 'leading': true, 'trailing': false })
} }
} }

Loading…
Cancel
Save