From 06832303035f10c73cb88c03646db245f35dab59 Mon Sep 17 00:00:00 2001
From: Peng-YM <1048217874pengym@gmail.com>
Date: Fri, 4 Sep 2020 18:30:38 +0800
Subject: [PATCH] Add scripts
---
backend/.idea/workspace.xml | 116 +++++++++++++++++-------------
scripts/handle-duplicate.js | 8 +++
web/src/components/TopToolbar.vue | 1 +
web/src/views/SubEditor.vue | 8 +--
4 files changed, 79 insertions(+), 54 deletions(-)
create mode 100644 scripts/handle-duplicate.js
diff --git a/backend/.idea/workspace.xml b/backend/.idea/workspace.xml
index b26a8fc..6338769 100644
--- a/backend/.idea/workspace.xml
+++ b/backend/.idea/workspace.xml
@@ -21,8 +21,6 @@
-
-
@@ -105,6 +103,8 @@
+
+
@@ -124,8 +124,8 @@
-
-
+
+
@@ -134,10 +134,11 @@
+
-
-
-
+
+
+
@@ -146,10 +147,11 @@
+
-
-
-
+
+
+
@@ -158,10 +160,11 @@
+
-
-
-
+
+
+
@@ -170,10 +173,11 @@
+
-
-
-
+
+
+
@@ -182,10 +186,11 @@
+
-
-
-
+
+
+
@@ -194,10 +199,11 @@
+
-
-
-
+
+
+
@@ -206,10 +212,11 @@
+
-
-
-
+
+
+
@@ -218,10 +225,11 @@
+
-
-
-
+
+
+
@@ -230,10 +238,11 @@
+
-
-
-
+
+
+
@@ -242,10 +251,11 @@
+
-
-
-
+
+
+
@@ -254,10 +264,11 @@
+
-
-
-
+
+
+
@@ -266,10 +277,11 @@
+
-
-
-
+
+
+
@@ -278,10 +290,11 @@
+
-
-
-
+
+
+
@@ -290,10 +303,11 @@
+
-
-
-
+
+
+
@@ -302,10 +316,11 @@
+
-
-
-
+
+
+
@@ -314,8 +329,9 @@
+
-
+
diff --git a/scripts/handle-duplicate.js b/scripts/handle-duplicate.js
new file mode 100644
index 0000000..c901c78
--- /dev/null
+++ b/scripts/handle-duplicate.js
@@ -0,0 +1,8 @@
+function operator(proxies) {
+ const counter = {};
+ return proxies.map(p => {
+ if (!counter[p.name]) counter[p.name] = 0;
+ p.name = p.name + " " + (++counter[p.name]).toString();
+ return p;
+ });
+}
\ No newline at end of file
diff --git a/web/src/components/TopToolbar.vue b/web/src/components/TopToolbar.vue
index ccf0262..071fb57 100644
--- a/web/src/components/TopToolbar.vue
+++ b/web/src/components/TopToolbar.vue
@@ -30,6 +30,7 @@
color="primary"
dark
fixed
+ :mini-variant="false" :clipped="true"
>
diff --git a/web/src/views/SubEditor.vue b/web/src/views/SubEditor.vue
index 105404e..775bc18 100644
--- a/web/src/views/SubEditor.vue
+++ b/web/src/views/SubEditor.vue
@@ -314,8 +314,8 @@ export default {
dataChanged(content) {
let index = 0;
- for (; index < this.process[index].length; index++) {
- if (this.process.id === content.idx) {
+ for (; index < this.process.length; index++) {
+ if (this.process[index].id === content.idx) {
break;
}
}
@@ -329,8 +329,8 @@ export default {
deleteProcess(id) {
let index = 0;
- for (; index < this.process[index].length; index++) {
- if (this.process.id === id) {
+ for (; index < this.process.length; index++) {
+ if (this.process[index].id === id) {
break;
}
}