From 7cf7d41c236ac7a6353a79fa89364bd36cc664be Mon Sep 17 00:00:00 2001 From: aixianling Date: Mon, 4 Jul 2022 14:48:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9A=E5=88=B6=E9=A1=B9=E7=9B=AE=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E4=B8=80=E6=B3=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../oms/apps/develop/AppDeployCustom/add.vue | 33 +++++++++++-------- .../oms/apps/develop/AppDeployCustom/list.vue | 33 +++++++++++++++---- 2 files changed, 46 insertions(+), 20 deletions(-) diff --git a/project/oms/apps/develop/AppDeployCustom/add.vue b/project/oms/apps/develop/AppDeployCustom/add.vue index c589e949..d2a3427a 100644 --- a/project/oms/apps/develop/AppDeployCustom/add.vue +++ b/project/oms/apps/develop/AppDeployCustom/add.vue @@ -10,18 +10,29 @@ - - - - - - +
+ + + + + + +
+
+ + + + + + +
@@ -98,12 +109,8 @@ export default { .add { height: 100%; - .half { - width: 50%; - - & + .half { - margin-left: 16px; - } + .mar-l16 { + margin-left: 16px; } } diff --git a/project/oms/apps/develop/AppDeployCustom/list.vue b/project/oms/apps/develop/AppDeployCustom/list.vue index c7778a2b..daa351e1 100644 --- a/project/oms/apps/develop/AppDeployCustom/list.vue +++ b/project/oms/apps/develop/AppDeployCustom/list.vue @@ -17,7 +17,7 @@ @@ -41,9 +41,11 @@ export default { page: {current: 1, size: 10, total: 0}, tableData: [], colConfigs: [ - {prop: "name", label: "项目/系统名称"}, - {prop: "customPath", label: "产品定制内容根路径"}, - {prop: "type", label: "系统类型", dict: 'systemType'} + {prop: "name", label: "项目/系统名称", width: 200}, + {prop: "type", label: "系统类型", dict: 'systemType', width: 120}, + {prop: "version", label: "版本号", width: 120}, + {prop: "customPath", label: "库项目根路径", width: 120}, + {prop: "dist", label: "更新路径"}, ], } }, @@ -73,9 +75,26 @@ export default { }) }).catch(() => 0) }, - handleDownload(id){ - - } + handleDownload(row) { + let {id} = row + this.instance.post("/node/custom/download", null, { + params: {id}, + responseType: "blob" + }).then(res => { + if (res?.code == 1) { + this.$message.error(res.err) + } else { + const link = document.createElement('a') + let blob = new Blob([res], {type: 'application/zip'}) + link.style.display = 'none' + link.href = URL.createObjectURL(blob) + link.setAttribute('download', row.name + '.zip') + document.body.appendChild(link) + link.click() + document.body.removeChild(link) + } + }) + }, }, created() { this.getTableData()