diff --git a/back/src/views/modules/myAgent/demo/ability-resource-shelf.vue b/back/src/views/modules/myAgent/demo/ability-resource-shelf.vue index 2919c269..248d4ef9 100644 --- a/back/src/views/modules/myAgent/demo/ability-resource-shelf.vue +++ b/back/src/views/modules/myAgent/demo/ability-resource-shelf.vue @@ -36,7 +36,9 @@

审批

- + 同意 + 拒绝 +
+ + + + 取 消 + 确 定 + + @@ -81,6 +94,9 @@ export default { }, data () { return { + dialogVisible: false, + dialogType: '', + input: '', flagShow: false, // processVisible: true, visible: false, @@ -135,6 +151,22 @@ export default { } }) }, + showDialog (title) { + this.dialogVisible = true + this.dialogType = title + }, + handleClose (done) { + this.$confirm('确认关闭?') + .then(_ => { + this.input = '' + done() + }) + .catch(_ => {}) + }, + handleClose2 () { + this.dialogVisible = false + this.input = '' + }, methodsThree () { this.$http.get('/category/getCategoryTree').then((res) => { this.insertList = res.data.data @@ -152,73 +184,62 @@ export default { // } }) }, - agreeOrNot: debounce( - function (data) { - console.log(data) - if (this.agreeOrList === '同意') { - console.log('this.dataForm.taskId', this.taskId) - const params = qs.stringify({ - taskId: this.taskId, - comment: this.inputAgree - }) - console.log(params) - this.$http - .post('/act/task/complete?' + params) - .then(({ data: res }) => { - if (res.code !== 0) { - this.$message.error(res.msg) - if (this.callbacks.taskHandleErrorCallback) { - this.callbacks.taskHandleErrorCallback(res) - } - return + // 同意与退回 + agreeOrNot: debounce(function () { + if (this.dialogType === '同意') { + console.log('this.dataForm', this.dataForm) + const params = qs.stringify({ + taskId: this.dataForm.taskId, + comment: this.input + }) + console.log(params) + this.$http.post('/act/task/complete?' + params).then(({ data: res }) => { + if (res.code !== 0) { + this.$message.error(res.msg) + if (this.callbacks.taskHandleErrorCallback) { + this.callbacks.taskHandleErrorCallback(res) + } + return + } + this.$message({ + message: this.$t('prompt.success'), + type: 'success', + duration: 500, + onClose: () => { + this.visible = false + if (this.callbacks.taskHandleSuccessCallback) { + this.callbacks.taskHandleSuccessCallback(res) } - this.$message({ - message: this.$t('prompt.success'), - type: 'success', - duration: 500, - onClose: () => { - this.visible = false - if (this.callbacks.taskHandleSuccessCallback) { - this.callbacks.taskHandleSuccessCallback(res) - } - } - }) - }) - .catch(() => {}) - } else if (this.agreeOrList === '退回') { - console.log('this.dataForm.taskId', this.taskId) - const params = qs.stringify({ - taskId: this.taskId, - comment: this.inputNo + } }) - this.$http - .post('/act/task/backToFirst?', params) - .then(({ data: res }) => { - if (res.code !== 0) { - this.$message.error(res.msg) - if (this.callbacks.taskHandleErrorCallback) { - this.callbacks.taskHandleErrorCallback(res) - } - return + }).catch(() => {}) + } else if (this.dialogType === '拒绝') { + const params = qs.stringify({ + taskId: this.dataForm.taskId, + comment: this.input + }) + this.$http.post('/act/task/backToFirst?', params).then(({ data: res }) => { + if (res.code !== 0) { + this.$message.error(res.msg) + if (this.callbacks.taskHandleErrorCallback) { + this.callbacks.taskHandleErrorCallback(res) + } + return + } + this.$message({ + message: this.$t('prompt.success'), + type: 'success', + duration: 500, + onClose: () => { + this.visible = false + if (this.callbacks.taskHandleSuccessCallback) { + this.callbacks.taskHandleSuccessCallback(res) } - this.$message({ - message: this.$t('prompt.success'), - type: 'success', - duration: 500, - onClose: () => { - this.visible = false - if (this.callbacks.taskHandleSuccessCallback) { - this.callbacks.taskHandleSuccessCallback(res) - } - } - }) - }) - } - this.tabRemoveHandle(data) - }, - 1000, - { leading: true, trailing: false } - ), + } + }) + }) + } + }, 1000, { leading: true, trailing: false }), tabRemoveHandle (tabName) { console.log(tabName, 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') if (tabName === 'home') { diff --git a/back/src/views/modules/myAgent/demo/competency-application.vue b/back/src/views/modules/myAgent/demo/competency-application.vue index 0c29bfbd..78d1d7e8 100644 --- a/back/src/views/modules/myAgent/demo/competency-application.vue +++ b/back/src/views/modules/myAgent/demo/competency-application.vue @@ -2,7 +2,7 @@ * @Author: hisense.liangjunhua * @Date: 2022-06-29 15:59:51 * @LastEditors: hisense.liangjunhua - * @LastEditTime: 2022-07-04 16:17:22 + * @LastEditTime: 2022-07-21 09:39:13 * @Description: 告诉大家这是什么 --> @@ -61,18 +61,31 @@

审批

- - 同意 - 退回 - - + + 同意 + 拒绝 +
+ + + + 取 消 + 确 定 + + @@ -87,6 +100,9 @@ export default { mixins: [processModule], data () { return { + dialogVisible: false, + dialogType: '', + input: '', visible: true, showKey: 0, // 表单属性是否可编辑 @@ -156,6 +172,22 @@ export default { } }) }, + showDialog (title) { + this.dialogVisible = true + this.dialogType = title + }, + handleClose (done) { + this.$confirm('确认关闭?') + .then(_ => { + this.input = '' + done() + }) + .catch(_ => {}) + }, + handleClose2 () { + this.dialogVisible = false + this.input = '' + }, downloadFile2 (url) { console.log(window.SITE_CONFIG.previewUrl) window.open( @@ -228,11 +260,11 @@ export default { }, // 同意与退回 agreeOrNot: debounce(function () { - if (this.agreeOrList === '同意') { + if (this.dialogType === '同意') { console.log('this.dataForm', this.dataForm) const params = qs.stringify({ taskId: this.dataForm.taskId, - comment: this.inputAgree + comment: this.input }) console.log(params) this.$http.post('/act/task/complete?' + params).then(({ data: res }) => { @@ -255,10 +287,10 @@ export default { } }) }).catch(() => {}) - } else if (this.agreeOrList === '退回') { + } else if (this.dialogType === '拒绝') { const params = qs.stringify({ taskId: this.dataForm.taskId, - comment: this.inputNo + comment: this.input }) this.$http.post('/act/task/backToFirst?', params).then(({ data: res }) => { if (res.code !== 0) {