From ec99bc5b11d3e1ac0bffaf070f416650fad0345e Mon Sep 17 00:00:00 2001 From: maxmon <541182180@qq.com> Date: Wed, 14 Jul 2021 23:39:53 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E9=A1=B9=E7=9B=AE=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fe/src/components/home/index.vue | 38 ++++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/fe/src/components/home/index.vue b/fe/src/components/home/index.vue index d2a40d2..5d4ba7a 100644 --- a/fe/src/components/home/index.vue +++ b/fe/src/components/home/index.vue @@ -52,6 +52,7 @@
(请选择包含文本文件的zip、tar文件)
+
@@ -122,6 +123,30 @@ export default { setType (ev) { this.projectType = ev.target.value }, + del () { + // 删除项目 + const that = this + if (prompt(`请输入${this.projectName}来确认删除。`) === this.projectName) { + get(`/v1/project/delete_program?projectName=${this.projectName}`, function () { + that.init() + }) + } else { + alert('输入错误,删除失败') + } + }, + init () { + // 初始化主页列表 + const that = this + that.type = '' + that.projectName = '' + // 查询项目信息 + get('/v1/index', function (info) { + that.$set(that, 'projects', info) + that.projectName = '' + that.projectType = '' + that.page = 'list' + }) + }, submit () { const that = this const newEntityTypes = that.typeList.map((type) => { @@ -136,15 +161,7 @@ export default { projectType: that.projectType, entityTypes: JSON.stringify(newEntityTypes) }, function () { - that.type = '' - that.projectName = '' - // 查询项目信息 - get('/v1/index', function (info) { - that.$set(that, 'projects', info) - that.projectName = '' - that.projectType = '' - that.page = 'list' - }) + that.init() // 如果有上传文件就更新文件 const fileInputElement = document.getElementById('file-input') if (fileInputElement.files[0]) { @@ -281,6 +298,9 @@ export default { border: 1px solid #ccc; padding: 5px 10px; } +.button.danger { + background-color: #ff0000; +} .project-box-titile { margin: auto; width: 500px; From d7f546d5ddc142b5f740afddaf943c7805f6cd2b Mon Sep 17 00:00:00 2001 From: maxmon <541182180@qq.com> Date: Wed, 14 Jul 2021 23:41:10 +0800 Subject: [PATCH 2/2] =?UTF-8?q?chore:=20=E6=89=93=E5=8C=85=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fe/dist/index.html | 4 ++-- .../static/css/app.d140c1d5484a4a2b13d1720714911ed6.css.map | 1 - ...714911ed6.css => app.fc08e6136465026a3172f6f4dc0757c7.css} | 4 ++-- .../static/css/app.fc08e6136465026a3172f6f4dc0757c7.css.map | 1 + fe/dist/static/js/app.9aa3a765ebe27e5e1dc6.js | 2 ++ fe/dist/static/js/app.9aa3a765ebe27e5e1dc6.js.map | 1 + fe/dist/static/js/app.c5c2d7456a83abd9991a.js | 2 -- fe/dist/static/js/app.c5c2d7456a83abd9991a.js.map | 1 - fe/dist/static/js/manifest.2ae2e69a05c33dfc65f8.js.map | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) delete mode 100644 fe/dist/static/css/app.d140c1d5484a4a2b13d1720714911ed6.css.map rename fe/dist/static/css/{app.d140c1d5484a4a2b13d1720714911ed6.css => app.fc08e6136465026a3172f6f4dc0757c7.css} (67%) create mode 100644 fe/dist/static/css/app.fc08e6136465026a3172f6f4dc0757c7.css.map create mode 100644 fe/dist/static/js/app.9aa3a765ebe27e5e1dc6.js create mode 100644 fe/dist/static/js/app.9aa3a765ebe27e5e1dc6.js.map delete mode 100644 fe/dist/static/js/app.c5c2d7456a83abd9991a.js delete mode 100644 fe/dist/static/js/app.c5c2d7456a83abd9991a.js.map diff --git a/fe/dist/index.html b/fe/dist/index.html index a83cc27..7485d31 100644 --- a/fe/dist/index.html +++ b/fe/dist/index.html @@ -1,6 +1,6 @@ -