From cb466d63fbc8e61dd00359d22b260a521feace73 Mon Sep 17 00:00:00 2001 From: liujun Date: Wed, 20 Mar 2024 08:49:47 +0800 Subject: [PATCH] =?UTF-8?q?=E8=82=A1=E4=BB=BD=E7=AB=AF=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=89=BF=E8=AF=BA=E4=B9=A6=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/xgf/flow/components/sendUtil.vue | 61 ++++++++++++++++++---- 1 file changed, 50 insertions(+), 11 deletions(-) diff --git a/src/views/xgf/flow/components/sendUtil.vue b/src/views/xgf/flow/components/sendUtil.vue index 40d7eff..e799dc5 100644 --- a/src/views/xgf/flow/components/sendUtil.vue +++ b/src/views/xgf/flow/components/sendUtil.vue @@ -44,6 +44,17 @@ + + + + + @@ -59,9 +70,11 @@ import vueQr from 'vue-qr' import Treeselect from '@riophae/vue-treeselect' import { requestFN } from '@/utils/request' +import uploadFile from '../../../util/uploadFile/index.vue' +import { upload } from '@/utils/upload' export default { - components: { Treeselect, vueQr }, + components: { uploadFile, Treeselect, vueQr }, props: { appendToBody: { type: Boolean, @@ -80,6 +93,7 @@ export default { APPOINT_DEPARTMENT_NAME: '', APPOINT_USER_ID: null, APPOINT_USER_NAME: '', + APPOINT_ANNEX: null, OPINION: '', STEP: false, LIMIT_END_TIME: '', @@ -87,7 +101,8 @@ export default { tm: new Date().getTime(), list: [], isShow: true, - info: {} + info: {}, + TYPE: null }, rules: { STATUS: [ @@ -127,6 +142,7 @@ export default { this.heirloom = JSON.stringify(e) this.form.list = JSON.stringify(e) this.form.STEP = (e[0].FLOWS_STEP === 2) + this.form.TYEP = e[0].FLOWS_TYPE this.getDepartmentTree() this.loading = false }, @@ -135,16 +151,39 @@ export default { if (!valid) { this.$message.error('请填写完整信息') } else { - requestFN('/xgf/user/approveMax', this.form) - .then((data) => { - this.$message.success('推送成功') - this.visible = false - this.$emit('refresh', '') - this.handleClose() - }) - .catch((e) => { - console.log(e) + if (this.form.TYPE !== '2') { + requestFN('/xgf/user/approveMax', this.form) + .then((data) => { + this.$message.success('推送成功') + this.visible = false + this.$emit('refresh', '') + this.handleClose() + }) + .catch((e) => { + console.log(e) + }) + } else { + const formData = new FormData() + this.form.chengNuoFlag = '1' + Object.keys(this.form).map(key => { + formData.append(key, this.form[key]) }) + if (this.form.APPOINT_ANNEX) { + for (let i = 0; i < this.form.APPOINT_ANNEX.length; i++) { + formData.append('weiTuoShu', this.form.APPOINT_ANNEX[i].raw) + } + } + upload('/xgf/user/approveMax', formData) + .then((data) => { + this.$message.success('推送成功') + this.visible = false + this.$emit('refresh', '') + this.handleClose() + }) + .catch((e) => { + console.log(e) + }) + } } }) },