diff --git a/src/components/durationjs.vue b/src/components/durationjs.vue
index 3a9d46c..c6b03e3 100644
--- a/src/components/durationjs.vue
+++ b/src/components/durationjs.vue
@@ -19,6 +19,7 @@
v-closable="{id: size, handler: onClose}">
-
+
diff --git a/src/module/alertModal.js b/src/module/alertModal.js
index 6c2ec58..9ffdc87 100644
--- a/src/module/alertModal.js
+++ b/src/module/alertModal.js
@@ -266,7 +266,7 @@ export async function uploadFailedSecond(detail) {
detail.forEach(i => {
let content = '';
-
+ let key = '';
switch (i.type) {
case 'too_many':
manySrt = 'There are more errors.';
@@ -277,9 +277,7 @@ export async function uploadFailedSecond(detail) {
case 'malformed':
content = `Data malformed in Timestamp Column: (Row #${i.loc[1]}, "${i.input}")`;
break;
- case 'missing':
- let key = '';
-
+ case 'missing':
switch (i.loc[2]) {
case 'case id':
key = 'Case ID';
diff --git a/src/module/cytoscapeMap.js b/src/module/cytoscapeMap.js
index b4398ba..8e882fb 100644
--- a/src/module/cytoscapeMap.js
+++ b/src/module/cytoscapeMap.js
@@ -113,10 +113,17 @@ export default function cytoscapeMap(mapData, dataLayerType, dataLayerOption, cu
// 可使用 parseInt(整數) parseFloat(浮點數) 將字串轉為數字
// Relative 要轉為百分比 %
if(node.data('type') === 'activity') {
+ let textInt;
+ let textFloat;
+ let textDurRel;
+ let timeLabelInt;
+ let timeLabelFloat;
+ let textTimeLabel;
+
switch(dataLayerType) {
case 'freq': // Frequency
- let textInt = dataLayerOption === 'rel_freq' ? text + optionValue * 100 + "%" : text + optionValue;
- let textFloat = dataLayerOption === 'rel_freq'? text + (optionValue * 100).toFixed(2) + "%" : text + optionValue.toFixed(2);
+ textInt = dataLayerOption === 'rel_freq' ? text + optionValue * 100 + "%" : text + optionValue;
+ textFloat = dataLayerOption === 'rel_freq'? text + (optionValue * 100).toFixed(2) + "%" : text + optionValue.toFixed(2);
// 判斷是否為整數,若非整數要取小數點後面兩個值。
text = Math.trunc(optionValue) === optionValue ? textInt : textFloat;
@@ -124,13 +131,13 @@ export default function cytoscapeMap(mapData, dataLayerType, dataLayerOption, cu
case 'duration': // Duration 除了 Relative 為百分比 % ,其他要轉變時間單位。
// Relative %
- let textDurRel = text + (optionValue * 100).toFixed(2) + "%";
+ textDurRel = text + (optionValue * 100).toFixed(2) + "%";
// Timelabel
- let timeLabelInt = text + getTimeLabel(optionValue);
- let timeLabelFloat = text + getTimeLabel(optionValue.toFixed(2));
+ timeLabelInt = text + getTimeLabel(optionValue);
+ timeLabelFloat = text + getTimeLabel(optionValue.toFixed(2));
// 判斷是否為整數,若非整數要取小數點後面兩個值。
- let textTimeLabel = Math.trunc(optionValue) === optionValue ? timeLabelInt : timeLabelFloat;
+ textTimeLabel = Math.trunc(optionValue) === optionValue ? timeLabelInt : timeLabelFloat;
text = dataLayerOption === 'rel_duration' ? textDurRel : textTimeLabel;
break;
@@ -169,13 +176,18 @@ export default function cytoscapeMap(mapData, dataLayerType, dataLayerOption, cu
'content': function(edge) { // 關係線顯示的文字
let optionValue = edge.data(`${dataLayerType}.${dataLayerOption}`);
let result = '';
-
+ let edgeInt;
+ let edgeFloat;
+ let edgeDurRel;
+ let timeLabelInt;
+ let timeLabelFloat;
+ let edgeTimeLabel;
if(optionValue === '') return optionValue;
switch(dataLayerType) {
case 'freq':
- let edgeInt = dataLayerOption === 'rel_freq' ? optionValue * 100 + "%" : optionValue;
- let edgeFloat = dataLayerOption === 'rel_freq' ? (optionValue * 100).toFixed(2) + "%" : optionValue.toFixed(2);
+ edgeInt = dataLayerOption === 'rel_freq' ? optionValue * 100 + "%" : optionValue;
+ edgeFloat = dataLayerOption === 'rel_freq' ? (optionValue * 100).toFixed(2) + "%" : optionValue.toFixed(2);
// 判斷是否為整數,若非整數要取小數點後面兩個值。
result = Math.trunc(optionValue) === optionValue ? edgeInt : edgeFloat;
@@ -183,11 +195,11 @@ export default function cytoscapeMap(mapData, dataLayerType, dataLayerOption, cu
case 'duration': // Duration 除了 Relative 為百分比 % ,其他要轉變時間單位。
// Relative %
- let edgeDurRel = (optionValue * 100).toFixed(2) + "%";
+ edgeDurRel = (optionValue * 100).toFixed(2) + "%";
// Timelabel
- let timeLabelInt = getTimeLabel(optionValue);
- let timeLabelFloat = getTimeLabel(optionValue.toFixed(2));
- let edgeTimeLabel = Math.trunc(optionValue) === optionValue ? timeLabelInt : timeLabelFloat;
+ timeLabelInt = getTimeLabel(optionValue);
+ timeLabelFloat = getTimeLabel(optionValue.toFixed(2));
+ edgeTimeLabel = Math.trunc(optionValue) === optionValue ? timeLabelInt : timeLabelFloat;
result = dataLayerOption === 'rel_duration' ? edgeDurRel : edgeTimeLabel;
break;
diff --git a/src/views/Discover/Conformance/index.vue b/src/views/Discover/Conformance/index.vue
index b0169b5..8900fb0 100644
--- a/src/views/Discover/Conformance/index.vue
+++ b/src/views/Discover/Conformance/index.vue
@@ -99,7 +99,7 @@ export default {
// .*$:匹配剩餘的字符,確保完整的提取。
// |^.*$:在找不到 "luciaToken" 的情況下,匹配整個字符串。
// 實際應用
- const token = document.cookie.replace(/(?:(?:^|.*;\s*)luciaToken\s*\=\s*([^;]*).*$)|^.*$/, "$1");
+ const token = document.cookie.replace(/(?:(?:^|.*;\s*)luciaToken\s*=\s*([^;]*).*$)|^.*$/, "$1");
axios.defaults.headers.common['Authorization'] = `Bearer ${token}`;
switch (to.params.type) {
diff --git a/src/views/Discover/Map/Map.vue b/src/views/Discover/Map/Map.vue
index 4f535dc..9fa46cc 100644
--- a/src/views/Discover/Map/Map.vue
+++ b/src/views/Discover/Map/Map.vue
@@ -468,7 +468,7 @@ export default {
if (isCheckPage) {
const conformanceStore = ConformanceStore();
// Save token in Headers.
- const token = document.cookie.replace(/(?:(?:^|.*;\s*)luciaToken\s*\=\s*([^;]*).*$)|^.*$/, "$1");
+ const token = document.cookie.replace(/(?:(?:^|.*;\s*)luciaToken\s*=\s*([^;]*).*$)|^.*$/, "$1");
axios.defaults.headers.common['Authorization'] = `Bearer ${token}`;
switch (to.params.type) {
diff --git a/src/views/Discover/Performance/index.vue b/src/views/Discover/Performance/index.vue
index eecd207..68b450d 100644
--- a/src/views/Discover/Performance/index.vue
+++ b/src/views/Discover/Performance/index.vue
@@ -912,7 +912,7 @@ export default {
if (isCheckPage) {
const conformanceStore = ConformanceStore();
// Save token in Headers.
- const token = document.cookie.replace(/(?:(?:^|.*;\s*)luciaToken\s*\=\s*([^;]*).*$)|^.*$/, "$1");
+ const token = document.cookie.replace(/(?:(?:^|.*;\s*)luciaToken\s*=\s*([^;]*).*$)|^.*$/, "$1");
axios.defaults.headers.common['Authorization'] = `Bearer ${token}`;
switch (to.params.type) {
diff --git a/src/views/Upload/index.vue b/src/views/Upload/index.vue
index 35193a0..9ae0763 100644
--- a/src/views/Upload/index.vue
+++ b/src/views/Upload/index.vue
@@ -36,6 +36,7 @@