From ffbfeb3709556b0cae5c23db192feeed9a04ac33 Mon Sep 17 00:00:00 2001 From: OrangeM21 Date: Thu, 7 May 2020 11:28:19 +0800 Subject: [PATCH] =?UTF-8?q?[update]=E6=B7=BB=E5=8A=A0CodeMirror=E6=8F=92?= =?UTF-8?q?=E4=BB=B6=E5=92=8Cxterm=E6=8F=92=E4=BB=B6,=E5=AE=8C=E5=96=84?= =?UTF-8?q?=E5=91=BD=E4=BB=A4=E6=89=A7=E8=A1=8C=E9=A1=B5=E9=9D=A2=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 3 + src/components/CodeMirror/index.vue | 20 ++++ src/components/Term/index.vue | 52 ++++++++++ .../TreeTable/components/AssetTree.vue | 17 ++++ src/components/TreeTable/index.vue | 13 ++- src/views/jobcenter/CommandExecution.vue | 95 ++++++++++++++----- yarn.lock | 22 +++++ 7 files changed, 198 insertions(+), 24 deletions(-) create mode 100644 src/components/CodeMirror/index.vue create mode 100644 src/components/Term/index.vue create mode 100644 src/components/TreeTable/components/AssetTree.vue diff --git a/package.json b/package.json index 4b09dfe86..053833fbb 100644 --- a/package.json +++ b/package.json @@ -40,12 +40,15 @@ "nprogress": "0.2.0", "path-to-regexp": "2.4.0", "vue": "2.6.10", + "vue-codemirror-lite": "^1.0.4", "vue-cookie": "^1.1.4", "vue-i18n": "^8.15.5", "vue-router": "3.0.6", "vue-select": "^3.9.5", "vuejs-logger": "^1.5.4", "vuex": "3.1.0", + "xterm": "^4.5.0", + "xterm-addon-fit": "^0.3.0", "ztree": "^3.5.24" }, "devDependencies": { diff --git a/src/components/CodeMirror/index.vue b/src/components/CodeMirror/index.vue new file mode 100644 index 000000000..a24a9cd01 --- /dev/null +++ b/src/components/CodeMirror/index.vue @@ -0,0 +1,20 @@ + + + + + diff --git a/src/components/Term/index.vue b/src/components/Term/index.vue new file mode 100644 index 000000000..7370e5c58 --- /dev/null +++ b/src/components/Term/index.vue @@ -0,0 +1,52 @@ + + + diff --git a/src/components/TreeTable/components/AssetTree.vue b/src/components/TreeTable/components/AssetTree.vue new file mode 100644 index 000000000..0746029d9 --- /dev/null +++ b/src/components/TreeTable/components/AssetTree.vue @@ -0,0 +1,17 @@ + + + + + diff --git a/src/components/TreeTable/index.vue b/src/components/TreeTable/index.vue index a5fc66b5c..bce82d918 100644 --- a/src/components/TreeTable/index.vue +++ b/src/components/TreeTable/index.vue @@ -2,7 +2,13 @@
- + +
@@ -38,6 +44,11 @@ export default { showTree: { type: Boolean, default: true + }, + // 默认引用的Tree组件 + component: { + type: String, + default: () => 'AutoDataZTree' } }, data() { diff --git a/src/views/jobcenter/CommandExecution.vue b/src/views/jobcenter/CommandExecution.vue index 8e14bfe30..59770ed66 100644 --- a/src/views/jobcenter/CommandExecution.vue +++ b/src/views/jobcenter/CommandExecution.vue @@ -1,39 +1,84 @@