From 3d81733d7a587ba4a15ba3e6312847483a1be42f Mon Sep 17 00:00:00 2001 From: "@changcode" Date: Tue, 15 Mar 2022 18:40:13 +0800 Subject: [PATCH] =?UTF-8?q?NEZ-1675=20feat:=20license=E7=AD=BE=E5=8F=91?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/page/config/licenseGen.scss | 2 +- .../src/components/page/config/licenseGen.vue | 21 +++++++++---------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/nezha-fronted/src/assets/css/components/page/config/licenseGen.scss b/nezha-fronted/src/assets/css/components/page/config/licenseGen.scss index a3039a1c7..3d0d7c2a1 100644 --- a/nezha-fronted/src/assets/css/components/page/config/licenseGen.scss +++ b/nezha-fronted/src/assets/css/components/page/config/licenseGen.scss @@ -9,7 +9,7 @@ text-align: center; } .el-textarea__inner { - min-height: 89px; + min-height: 89px !important; } .license-gen-form__upload { height: 150px; diff --git a/nezha-fronted/src/components/page/config/licenseGen.vue b/nezha-fronted/src/components/page/config/licenseGen.vue index 8664db327..7e8b5ec62 100644 --- a/nezha-fronted/src/components/page/config/licenseGen.vue +++ b/nezha-fronted/src/components/page/config/licenseGen.vue @@ -30,6 +30,7 @@ accept=".xml" class="upload-demo" action="" + multiple :auto-upload="false" :on-change="handleChange" :file-list="uploadFileList"> @@ -49,7 +50,7 @@ export default { data () { return { licenseGen: {}, - uploadFile: { fies: '' }, + uploadFile: { file: '' }, uploadList: [], uploadFileList: [], typeList: [ @@ -62,22 +63,20 @@ export default { methods: { handleChange (file, fileList) { if (fileList.length > 0) { - this.uploadFileList = [fileList[fileList.length - 1]] + this.uploadFileList = fileList } - this.uploadFile.fies = this.uploadFileList[0] - this.upload() + this.uploadFile.file = this.uploadFileList }, upload () { const form = new FormData() - form.append('fies', this.uploadFile.fies.raw) - console.log(form) - // const params = { - // ...this.licenseGen, - // - // } + form.append('fies', this.uploadFile.file) + form.append('supportID', this.licenseGen.supportID) + form.append('organization', this.licenseGen.organization) + form.append('type', this.licenseGen.type) + form.append('comment', this.licenseGen.comment) this.$post('/sys/license/gen', form).then(res => { if (res.code == 200) { - this.licenseGetStatus() + return '' } else { this.$message.error(res.msg) }