From 4059a9679f8322ab31eafb1f87ee50e85b578bde Mon Sep 17 00:00:00 2001 From: yunuo970428 <405378304@qq.com> Date: Wed, 9 Nov 2022 11:40:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E7=A7=BB=E5=8A=A8=E7=AB=AF?= =?UTF-8?q?=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/uploadFile/upload_apk.vue | 8 +++++--- .../components/uploadFile/upload_frameApk.vue | 5 +++-- .../components/uploadFile/upload_updateApk.vue | 5 +++-- .../src/views/mobileterminal/frame.vue | 15 +++++++++++++-- .../src/views/mobileterminal/plugin.vue | 16 ++++++++++++++-- .../src/views/mobileterminal/updatePlugin.vue | 13 +++++++++++-- 6 files changed, 49 insertions(+), 13 deletions(-) diff --git a/anrui-system-ui/src/components/uploadFile/upload_apk.vue b/anrui-system-ui/src/components/uploadFile/upload_apk.vue index 2611f9d18e..3aa8dc8fa3 100644 --- a/anrui-system-ui/src/components/uploadFile/upload_apk.vue +++ b/anrui-system-ui/src/components/uploadFile/upload_apk.vue @@ -5,7 +5,7 @@ :action="uploadFile" :on-preview="handlePreview" :on-remove="handleRemove" - :on-progress="handleSuccess" + :on-success="handleSuccess" :file-list="fileList" :limit="1" name="multipartFile" @@ -21,7 +21,8 @@ import { uploadFile } from '@/api/Common/Upload' export default { props: { fileInfo: { - type: Object + type: Object, + default: {} } }, data() { @@ -36,7 +37,8 @@ export default { }, methods: { handleSuccess(event, file, fileList) { - console.log(file, fileList) + console.log(file) + this.$emit('change', file) }, handleRemove(file, fileList) { console.log(file, fileList) diff --git a/anrui-system-ui/src/components/uploadFile/upload_frameApk.vue b/anrui-system-ui/src/components/uploadFile/upload_frameApk.vue index e251f115d0..b3791455ba 100644 --- a/anrui-system-ui/src/components/uploadFile/upload_frameApk.vue +++ b/anrui-system-ui/src/components/uploadFile/upload_frameApk.vue @@ -5,7 +5,7 @@ :action="uploadFile" :on-preview="handlePreview" :on-remove="handleRemove" - :on-progress="handleSuccess" + :on-success="handleSuccess" :file-list="fileList" :limit="1" name="file" @@ -36,7 +36,8 @@ export default { }, methods: { handleSuccess(event, file, fileList) { - console.log(file, fileList) + console.log(file) + this.$emit('change', file) }, handleRemove(file, fileList) { console.log(file, fileList) diff --git a/anrui-system-ui/src/components/uploadFile/upload_updateApk.vue b/anrui-system-ui/src/components/uploadFile/upload_updateApk.vue index cf904aa2df..266fa23dba 100644 --- a/anrui-system-ui/src/components/uploadFile/upload_updateApk.vue +++ b/anrui-system-ui/src/components/uploadFile/upload_updateApk.vue @@ -5,7 +5,7 @@ :action="uploadFile" :on-preview="handlePreview" :on-remove="handleRemove" - :on-progress="handleSuccess" + :on-success="handleSuccess" :file-list="fileList" :limit="1" name="multipartFile" @@ -36,7 +36,8 @@ export default { }, methods: { handleSuccess(event, file, fileList) { - console.log(file, fileList) + console.log(file) + this.$emit('change', file) }, handleRemove(file, fileList) { console.log(file, fileList) diff --git a/anrui-system-ui/src/views/mobileterminal/frame.vue b/anrui-system-ui/src/views/mobileterminal/frame.vue index 0857baf9b3..02cdd798de 100644 --- a/anrui-system-ui/src/views/mobileterminal/frame.vue +++ b/anrui-system-ui/src/views/mobileterminal/frame.vue @@ -17,7 +17,7 @@ - + @@ -71,6 +71,9 @@ export default { }, methods: { showAdd() { + this.$nextTick(() => { + this.$refs['form_obj'].clearValidate() + }) this.dialogStatus = 'add' this.viewTitle = '更新框架' }, @@ -78,12 +81,20 @@ export default { this.$refs['form_obj'].validate(valid => { if (valid) { this.$refs.uploadMoreImg.submitUpload() - this.handleReturn('true') } else { return false } }) }, + change(value) { + console.log(value, 65656) + if (value.response.success) { + this.$message({ showClose: true, type: 'success', message: '保存成功' }) + this.handleReturn('true') + } else { + this.$message({ showClose: true, type: 'error', message: value.response.msg }) + } + }, backIcon(val) { if (val.length > 0) { this.formobj.iconUrl = val[0].url diff --git a/anrui-system-ui/src/views/mobileterminal/plugin.vue b/anrui-system-ui/src/views/mobileterminal/plugin.vue index 989a051bca..bc922606e0 100644 --- a/anrui-system-ui/src/views/mobileterminal/plugin.vue +++ b/anrui-system-ui/src/views/mobileterminal/plugin.vue @@ -65,7 +65,7 @@ - + @@ -146,6 +146,9 @@ export default { methods: { init() {}, showAdd() { + this.$nextTick(() => { + this.$refs['form_obj'].clearValidate() + }) this.init() this.dialogStatus = 'add' this.viewTitle = '新增插件' @@ -163,12 +166,20 @@ export default { }) this.formobj.type = bb.key this.$refs.uploadMoreImg.submitUpload() - this.handleReturn('true') } else { return false } }) }, + change(value) { + console.log(value, 65656) + if (value.response.success) { + this.$message({ showClose: true, type: 'success', message: '保存成功' }) + this.handleReturn('true') + } else { + this.$message({ showClose: true, type: 'error', message: value.response.msg }) + } + }, backIcon(val) { if (val.length > 0) { this.formobj.iconUrl = val[0].url @@ -189,6 +200,7 @@ export default { modulePluginName: '', sortNo: '' } + this.imgList = [] this.list = [] this.$emit('doback') } diff --git a/anrui-system-ui/src/views/mobileterminal/updatePlugin.vue b/anrui-system-ui/src/views/mobileterminal/updatePlugin.vue index 398072397c..95e72cb57d 100644 --- a/anrui-system-ui/src/views/mobileterminal/updatePlugin.vue +++ b/anrui-system-ui/src/views/mobileterminal/updatePlugin.vue @@ -71,7 +71,7 @@ - + @@ -192,12 +192,20 @@ export default { }) this.formobj.type = bb.key this.$refs.uploadMoreImg.submitUpload() - this.handleReturn('true') } else { return false } }) }, + change(value) { + console.log(value, 65656) + if (value.response.success) { + this.$message({ showClose: true, type: 'success', message: '保存成功' }) + this.handleReturn('true') + } else { + this.$message({ showClose: true, type: 'error', message: value.response.msg }) + } + }, backIcon(val) { if (val.length > 0) { this.formobj.iconUrl = val[0].url @@ -219,6 +227,7 @@ export default { sortNo: '' } this.list = [] + this.imgList = [] this.$emit('doback') } }