docs: Update all files JSDoc.
This commit is contained in:
@@ -6,7 +6,6 @@
|
||||
@tailwind utilities;
|
||||
|
||||
@layer tailwind-base, primevue;
|
||||
/* @layer tailwind-base, primevue, tailwind-utilities; */
|
||||
|
||||
@layer tailwind-base {
|
||||
@tailwind base;
|
||||
|
||||
@@ -71,7 +71,6 @@
|
||||
@apply !h-1
|
||||
}
|
||||
/* radio */
|
||||
/* inline-block h-4 w-4 m-2 cursor-pointer rounded-full ring-2 ring-neutral-300 shadow-sm peer-checked:ring-2 peer-checked:ring-primary peer-checked:ring-offset-2 peer-checked:bg-primary */
|
||||
/* p-radiobutton
|
||||
p-radiobutton-box
|
||||
p-radiobutton-icon */
|
||||
@@ -95,11 +94,6 @@ p-radiobutton-icon */
|
||||
@apply !p-0
|
||||
}
|
||||
/* DataTable */
|
||||
/* .p-datatable table {
|
||||
border-collapse: collapse;
|
||||
min-width: 100%;
|
||||
table-layout: fixed;
|
||||
} */
|
||||
.p-datatable-resizable > .p-datatable-wrapper {
|
||||
@apply !overflow-x-visible
|
||||
}
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
<Sidebar :visible="sidebarState" :closeIcon="'pi pi-angle-right'" :modal="false" position="right" :dismissable="false" class="!w-[440px]" @hide="hide" @show="show">
|
||||
<template #header>
|
||||
<p class="pl-2 text-base font-bold text-neutral-900">Summary</p>
|
||||
<!-- <ul class=" pl-4">
|
||||
<li class="h1 text-neutral-900">Summary</li>
|
||||
</ul> -->
|
||||
</template>
|
||||
<!-- header: summary -->
|
||||
<div class="flex justify-start items-start">
|
||||
@@ -183,7 +180,7 @@ export default {
|
||||
methods: {
|
||||
/**
|
||||
* Number to percentage
|
||||
* @param {number} val
|
||||
* @param {number} val 原始數字
|
||||
* @returns {string} 轉換完成的百分比字串
|
||||
*/
|
||||
getPercentLabel(val){
|
||||
@@ -194,7 +191,7 @@ export default {
|
||||
* setting stats data
|
||||
* @param { object } data fetch API stats data
|
||||
* @param { string } fileName file Name
|
||||
* @returns { object } primaryStatData | secondaryStatData
|
||||
* @returns { object } primaryStatData | secondaryStatData,回傳 primaryStatData 或 secondaryStatData
|
||||
*/
|
||||
getStatData(data, fileName) {
|
||||
return {
|
||||
@@ -269,7 +266,6 @@ export default {
|
||||
const secondaryFileName = await this.compareStore.getFileName(secondaryId)
|
||||
this.primaryStatData = await this.getStatData(primaryData, primaryFileName);
|
||||
this.secondaryStatData = await this.getStatData(secondaryData, secondaryFileName);
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -284,7 +284,7 @@ export default {
|
||||
methods: {
|
||||
/**
|
||||
* set progress bar width
|
||||
* @param {number} value
|
||||
* @param {number} value 百分比數字
|
||||
* @returns {string} 樣式的寬度設定
|
||||
*/
|
||||
progressWidth(value){
|
||||
@@ -292,7 +292,7 @@ export default {
|
||||
},
|
||||
/**
|
||||
* Number to percentage
|
||||
* @param {number} val
|
||||
* @param {number} val 原始數字
|
||||
* @returns {string} 轉換完成的百分比字串
|
||||
*/
|
||||
getPercentLabel(val){
|
||||
@@ -301,7 +301,7 @@ export default {
|
||||
},
|
||||
/**
|
||||
* Convert seconds to days
|
||||
* @param {number} sec
|
||||
* @param {number} sec 秒數
|
||||
* @returns {number} day
|
||||
*/
|
||||
convertSecToDay(sec) {
|
||||
@@ -309,7 +309,7 @@ export default {
|
||||
},
|
||||
/**
|
||||
* Open Issues Modal.
|
||||
* @param {number} no trace no
|
||||
* @param {number} no trace 編號
|
||||
*/
|
||||
async openMore(no) {
|
||||
// async await 解決非同步資料延遲傳遞導致未讀取到而出錯的問題
|
||||
@@ -321,7 +321,7 @@ export default {
|
||||
},
|
||||
/**
|
||||
* Open Loop Modal.
|
||||
* @param {number} no trace no
|
||||
* @param {number} no trace 編號
|
||||
*/
|
||||
async openLoopMore(no) {
|
||||
// async await 解決非同步資料延遲傳遞導致未讀取到而出錯的問題
|
||||
@@ -333,7 +333,7 @@ export default {
|
||||
},
|
||||
/**
|
||||
* set conformance report data
|
||||
* @param {object} data new watch's value
|
||||
* @param {object} data new watch's value 監聽到後端傳來的報告 data
|
||||
*/
|
||||
setConformanceTempReportData(data){
|
||||
let total = getNumberLabel(Object.values(data.counts).reduce((acc, val) => acc + val, 0));
|
||||
|
||||
@@ -691,14 +691,14 @@ export default {
|
||||
methods: {
|
||||
/**
|
||||
* get min total seconds
|
||||
* @param {Number} e
|
||||
* @param {Number} e 最小值總秒數
|
||||
*/
|
||||
minTotalSeconds(e) {
|
||||
this.selectTimeRangeMin = e;
|
||||
},
|
||||
/**
|
||||
* get min total seconds
|
||||
* @param {Number} e
|
||||
* @param {Number} e 最大值總秒數
|
||||
*/
|
||||
maxTotalSeconds(e) {
|
||||
this.selectTimeRangeMax = e;
|
||||
@@ -784,7 +784,7 @@ export default {
|
||||
this.isSubmitTimeCfmCtEteSE = { base: {}, rule: {}};
|
||||
},
|
||||
/**
|
||||
* @param {boolean} massage true | false 清空選單選項, 選擇的結果
|
||||
* 清空選單的行為
|
||||
*/
|
||||
reset() {
|
||||
// Results page Cover Plate(遮罩為 ture)
|
||||
@@ -825,7 +825,6 @@ export default {
|
||||
isEndSelected: true
|
||||
};
|
||||
}
|
||||
|
||||
},
|
||||
/**
|
||||
* Apply button 發送選項,取得 Check Id.
|
||||
|
||||
@@ -32,6 +32,9 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 將選取的 Activities 傳出去
|
||||
*/
|
||||
actListData() {
|
||||
this.$emitter.emit('actListData', this.actList);
|
||||
}
|
||||
|
||||
@@ -33,6 +33,9 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 將選取的 Activity 傳出去
|
||||
*/
|
||||
actRadioData() {
|
||||
this.localSelect = null;
|
||||
this.$emitter.emit('actRadioData', {
|
||||
|
||||
@@ -40,7 +40,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
<script>
|
||||
import { sortNumEngZhtw } from '@/module/sortNumEngZhtw.js';
|
||||
|
||||
@@ -99,6 +99,9 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 切換 Rule Type 的選項時的行為
|
||||
*/
|
||||
changeRadio() {
|
||||
this.selectedActivitySequence = 'Start & End';
|
||||
this.selectedMode = 'Directly follows';
|
||||
@@ -107,15 +110,27 @@ export default {
|
||||
this.selectedActSeqFromTo = 'From';
|
||||
this.$emitter.emit('isRadioChange', true); // Radio 切換時,資料要清空
|
||||
},
|
||||
/**
|
||||
* 切換 Activity sequence 的選項時的行為
|
||||
*/
|
||||
changeRadioSeq() {
|
||||
this.$emitter.emit('isRadioSeqChange',true);
|
||||
},
|
||||
/**
|
||||
* 切換 Processing time 的選項時的行為
|
||||
*/
|
||||
changeRadioProcessScope() {
|
||||
this.$emitter.emit('isRadioProcessScopeChange', true);
|
||||
},
|
||||
/**
|
||||
* 切換 Process Scope 的選項時的行為
|
||||
*/
|
||||
changeRadioActSeqMore() {
|
||||
this.$emitter.emit('isRadioActSeqMoreChange', true);
|
||||
},
|
||||
/**
|
||||
* 切換 Activity Sequence 的選項時的行為
|
||||
*/
|
||||
changeRadioActSeqFromTo() {
|
||||
this.$emitter.emit('isRadioActSeqFromToChange', true);
|
||||
},
|
||||
|
||||
@@ -143,28 +143,6 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* set Time Result Data
|
||||
* @param {array} data
|
||||
* @returns {array}
|
||||
* timeResultData: [
|
||||
* {
|
||||
* id: 1,
|
||||
* category: 'start', start|end|from|to
|
||||
* task: '到院'
|
||||
* },
|
||||
* ]
|
||||
*/
|
||||
setTimeResultData(data) {
|
||||
let result = data.map((item, index) => {
|
||||
return {
|
||||
id: index + 1,
|
||||
category: item.category.replace(/^./, item.category[0].toUpperCase()),
|
||||
task: item.task
|
||||
}
|
||||
});
|
||||
return result;
|
||||
},
|
||||
/**
|
||||
* All reset
|
||||
*/
|
||||
|
||||
@@ -202,8 +202,8 @@ export default {
|
||||
methods: {
|
||||
/**
|
||||
* 設定 start and end 的 Radio Data
|
||||
* @param {object} data cfmSeqStart | cfmSeqEnd | cfmPtEteSE | cfmPtPSE | cfmWtEteSE | cfmWtPSE | cfmCtEteSE
|
||||
* @param {string} category start | end
|
||||
* @param {object} data cfmSeqStart | cfmSeqEnd | cfmPtEteSE | cfmPtPSE | cfmWtEteSE | cfmWtPSE | cfmCtEteSE,傳入以上任一後端接到的 Activities 列表 Data。
|
||||
* @param {string} category 'start' | 'end',傳入 'start' 或 'end'。
|
||||
* @returns {array}
|
||||
*/
|
||||
setTaskData(data, category) {
|
||||
@@ -213,9 +213,9 @@ export default {
|
||||
},
|
||||
/**
|
||||
* 重新設定連動的 start and end 的 Radio Data
|
||||
* @param {object} data cfmPtEteSE | cfmPtPSE | cfmWtEteSE | cfmWtPSE | cfmCtEteSE
|
||||
* @param {string} category start | end
|
||||
* @param {string} task task
|
||||
* @param {object} data cfmPtEteSE | cfmPtPSE | cfmWtEteSE | cfmWtPSE | cfmCtEteSE,傳入以上任一後端接到的 Activities 列表 Data。
|
||||
* @param {string} category 'start' | 'end',傳入 'start' 或 'end'。
|
||||
* @param {string} task 已選擇的 Activity task
|
||||
* @returns {array}
|
||||
*/
|
||||
setStartAndEndData(data, category, task) {
|
||||
@@ -227,9 +227,9 @@ export default {
|
||||
},
|
||||
/**
|
||||
* 重新設定 Activity sequence 連動的 start and end 的 Radio Data
|
||||
* @param {object} data cfmSeqStart | cfmSeqEnd
|
||||
* @param {string} category sources | sinks
|
||||
* @param {string} task task
|
||||
* @param {object} data cfmSeqStart | cfmSeqEnd,傳入以上任一後端接到的 Activities 列表 Data。
|
||||
* @param {string} category 'sources' | 'sinks',傳入 'sources' 或 'sinks'。
|
||||
* @param {string} task 已選擇的 Activity task
|
||||
* @returns {array}
|
||||
*/
|
||||
setSeqStartAndEndData(data, category, task) {
|
||||
@@ -239,7 +239,7 @@ export default {
|
||||
},
|
||||
/**
|
||||
* select start list's task
|
||||
* @param {event} e
|
||||
* @param {event} e 觸發 input 的詳細事件
|
||||
*/
|
||||
selectStart(e) {
|
||||
this.taskStart = e;
|
||||
@@ -256,7 +256,7 @@ export default {
|
||||
},
|
||||
/**
|
||||
* select End list's task
|
||||
* @param {event} e
|
||||
* @param {event} e 觸發 input 的詳細事件
|
||||
*/
|
||||
selectEnd(e) {
|
||||
this.taskEnd = e;
|
||||
@@ -283,7 +283,7 @@ export default {
|
||||
},
|
||||
/**
|
||||
* Radio 切換時,Start & End Data 連動改變
|
||||
* @param {boolean} data true | false
|
||||
* @param {boolean} data true | false,傳入 true 或 false
|
||||
*/
|
||||
setResetData(data) {
|
||||
if(data) {
|
||||
|
||||
@@ -84,22 +84,22 @@ export default {
|
||||
methods: {
|
||||
/**
|
||||
* get min total seconds
|
||||
* @param {Number} e
|
||||
* @param {Number} e 最小值總秒數
|
||||
*/
|
||||
minTotalSeconds(e) {
|
||||
this.$emit('min-total-seconds', e);
|
||||
},
|
||||
/**
|
||||
* get min total seconds
|
||||
* @param {Number} e
|
||||
* @param {Number} e 最大值總秒數
|
||||
*/
|
||||
maxTotalSeconds(e) {
|
||||
this.$emit('max-total-seconds', e);
|
||||
},
|
||||
/**
|
||||
* get Time Range(duration)
|
||||
* @param {array} data API data
|
||||
* @param {string} category act | single | double
|
||||
* @param {array} data API data,Activity 列表
|
||||
* @param {string} category 'act' | 'single' | 'double',傳入以上任一值。
|
||||
* @param {string} task select Radio task or start
|
||||
* @param {string} taskTwo end
|
||||
* @returns {object} {min:12, max:345}
|
||||
|
||||
@@ -12,18 +12,5 @@
|
||||
export default {
|
||||
name: 'ResultArrow',
|
||||
props:['data', 'select'],
|
||||
// data() {
|
||||
// return {
|
||||
// datadata: []
|
||||
// }
|
||||
// },
|
||||
// watch: {
|
||||
// data: function(newValue) {
|
||||
// this.datadata = newValue;
|
||||
// },
|
||||
// select: function(newValue) {
|
||||
// this.datadata = newValue;
|
||||
// }
|
||||
// }
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -68,16 +68,16 @@ export default {
|
||||
},
|
||||
/**
|
||||
* get min total seconds
|
||||
* @param {Number} e
|
||||
* @param {Number} e 元件傳來的最小值總秒數
|
||||
*/
|
||||
minTotalSeconds(e) {
|
||||
minTotalSeconds(e) {
|
||||
this.timeRangeMin = e;
|
||||
this.updateMin = e;
|
||||
this.$emit('min-total-seconds', e);
|
||||
},
|
||||
/**
|
||||
* get min total seconds
|
||||
* @param {Number} e
|
||||
* @param {Number} e 元件傳來的最大值總秒數
|
||||
*/
|
||||
maxTotalSeconds(e) {
|
||||
this.timeRangeMax = e;
|
||||
|
||||
@@ -160,7 +160,7 @@ export default {
|
||||
methods: {
|
||||
/**
|
||||
* Number to percentage
|
||||
* @param {number} val
|
||||
* @param {number} val 原始數字
|
||||
* @returns {string} 轉換完成的百分比字串
|
||||
*/
|
||||
getPercentLabel(val){
|
||||
@@ -169,7 +169,7 @@ export default {
|
||||
},
|
||||
/**
|
||||
* set progress bar width
|
||||
* @param {number} value
|
||||
* @param {number} value 百分比數字
|
||||
* @returns {string} 樣式的寬度設定
|
||||
*/
|
||||
progressWidth(value){
|
||||
@@ -177,7 +177,7 @@ export default {
|
||||
},
|
||||
/**
|
||||
* switch case data
|
||||
* @param {number} id
|
||||
* @param {number} id case id
|
||||
*/
|
||||
async switchCaseData(id) {
|
||||
if(id == this.showTraceId) return;
|
||||
@@ -262,7 +262,7 @@ export default {
|
||||
},
|
||||
/**
|
||||
* 無限滾動: 監聽 scroll 有沒有滾到底部
|
||||
* @param {element} event
|
||||
* @param {element} event 監聽時回傳的事件
|
||||
*/
|
||||
handleScroll(event) {
|
||||
if(this.maxItems || this.infiniteData.length < 20 || this.infiniteFinish === false) return;
|
||||
|
||||
@@ -124,6 +124,7 @@ export default {
|
||||
},
|
||||
/**
|
||||
* Element dragging started
|
||||
* @param {event} evt input 傳入的事件
|
||||
*/
|
||||
onStart(evt) {
|
||||
const lastChild = evt.to.lastChild.lastChild;
|
||||
@@ -137,6 +138,7 @@ export default {
|
||||
},
|
||||
/**
|
||||
* Element dragging ended
|
||||
* @param {event} evt input 傳入的事件
|
||||
*/
|
||||
onEnd(evt) {
|
||||
// 顯示拖曳元素
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Search from '@/components/Search.vue';
|
||||
|
||||
@@ -68,6 +67,10 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 將選取的 row 傳到父層
|
||||
* @param {event} e input 傳入的事件
|
||||
*/
|
||||
onRowSelect(e) {
|
||||
this.$emit('on-row-select', e)
|
||||
}
|
||||
|
||||
@@ -61,16 +61,30 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 選擇 Row 的行為
|
||||
*/
|
||||
onRowSelect() {
|
||||
this.$emit('on-row-select', this.select);
|
||||
},
|
||||
/**
|
||||
* 取消選取 Row 的行為
|
||||
*/
|
||||
onRowUnselect() {
|
||||
this.$emit('on-row-select', this.select);
|
||||
},
|
||||
/**
|
||||
* 全選 Row 的行為
|
||||
* @param {event} e input 傳入的事件
|
||||
*/
|
||||
onRowSelectAll(e) {
|
||||
this.select = e.data;
|
||||
this.$emit('on-row-select', this.select);
|
||||
},
|
||||
/**
|
||||
* 取消全選 Row 的行為
|
||||
* @param {event} e input 傳入的事件
|
||||
*/
|
||||
onRowUnelectAll(e) {
|
||||
this.select = null;
|
||||
this.$emit('on-row-select', this.select)
|
||||
|
||||
@@ -327,7 +327,7 @@ export default {
|
||||
},
|
||||
/**
|
||||
* 選取類別型 table 的全選項
|
||||
* @param {event} e
|
||||
* @param {event} e input 傳入的事件
|
||||
*/
|
||||
onRowSelectAll(e) {
|
||||
this.selectedAttRange = e.data;
|
||||
@@ -352,7 +352,7 @@ export default {
|
||||
},
|
||||
/**
|
||||
* 切換 Attribute Name Radio
|
||||
* @param {event} e
|
||||
* @param {event} e input 傳入的事件
|
||||
*/
|
||||
switchAttNameRadio(e) {
|
||||
this.selectedAttRange = null;
|
||||
@@ -401,7 +401,7 @@ export default {
|
||||
},
|
||||
/**
|
||||
* set progress bar width
|
||||
* @param {number} value
|
||||
* @param {number} value 百分比數字
|
||||
* @returns {string} 樣式的寬度設定
|
||||
*/
|
||||
progressWidth(value){
|
||||
@@ -409,7 +409,7 @@ export default {
|
||||
},
|
||||
/**
|
||||
* Number to percentage
|
||||
* @param {number} val
|
||||
* @param {number} val 原始數字
|
||||
* @returns {string} 轉換完成的百分比字串
|
||||
*/
|
||||
getPercentLabel(val){
|
||||
@@ -429,7 +429,6 @@ export default {
|
||||
/**
|
||||
* 調整左邊遮罩大小
|
||||
* @param {object} chart 取得 chart.js 資料
|
||||
* @param {number} chart 取得 chart.js 資料
|
||||
*/
|
||||
resizeLeftMask(chart, from) {
|
||||
const canvas = document.querySelector('#chartCanvasId canvas');
|
||||
@@ -440,7 +439,7 @@ export default {
|
||||
mask.style.height = `${chart.chartArea.height}px`;
|
||||
},
|
||||
/**
|
||||
* 調整又邊遮罩大小
|
||||
* 調整右邊遮罩大小
|
||||
* @param {object} chart 取得 chart.js 資料
|
||||
*/
|
||||
resizeRightMask(chart, to) {
|
||||
@@ -453,7 +452,6 @@ export default {
|
||||
},
|
||||
/**
|
||||
* create chart
|
||||
* @param {object} valueData 選取的 Attribute,包含後端原始數據的 type、key
|
||||
*/
|
||||
createChart() {
|
||||
const valueData = this.valueData;
|
||||
|
||||
@@ -54,7 +54,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* @param {boolean} e ture | false
|
||||
* @param {boolean} e ture | false,可選 ture 或 false
|
||||
* @param {numble} index rule's index
|
||||
*/
|
||||
isRule(e, index){
|
||||
@@ -66,6 +66,7 @@ export default {
|
||||
},
|
||||
/**
|
||||
* header:Funnel 刪除全部的 Funnel
|
||||
* @param {numble|string} index rule's index 或 全部
|
||||
*/
|
||||
async deleteRule(index) {
|
||||
if(index === 'all') {
|
||||
|
||||
@@ -152,6 +152,10 @@ export default{
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 調整遮罩大小
|
||||
* @param {object} chart 取得 chart.js 資料
|
||||
*/
|
||||
resizeMask(chart) {
|
||||
let from = (this.selectArea[0] * 0.01) / (this.selectRange * 0.01);
|
||||
let to = (this.selectArea[1] * 0.01) / (this.selectRange * 0.01);
|
||||
@@ -160,6 +164,10 @@ export default{
|
||||
this.resizeRightMask(chart, to);
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 調整左邊遮罩大小
|
||||
* @param {object} chart 取得 chart.js 資料
|
||||
*/
|
||||
resizeLeftMask(chart, from) {
|
||||
const canvas = document.getElementById("chartCanvasId");
|
||||
const mask = document.getElementById("chart-mask-left");
|
||||
@@ -168,6 +176,10 @@ export default{
|
||||
mask.style.top = `${canvas.offsetTop + chart.chartArea.top}px`;
|
||||
mask.style.height = `${chart.chartArea.height}px`;
|
||||
},
|
||||
/**
|
||||
* 調整右邊遮罩大小
|
||||
* @param {object} chart 取得 chart.js 資料
|
||||
*/
|
||||
resizeRightMask(chart, to) {
|
||||
const canvas = document.getElementById("chartCanvasId");
|
||||
const mask = document.getElementById("chart-mask-right");
|
||||
@@ -176,6 +188,9 @@ export default{
|
||||
mask.style.top = `${canvas.offsetTop + chart.chartArea.top}px`;
|
||||
mask.style.height = `${chart.chartArea.height}px`;
|
||||
},
|
||||
/**
|
||||
* create chart
|
||||
*/
|
||||
createChart() {
|
||||
const max = this.filterTimeframe.y_axis.max * 1.1;
|
||||
const minX = this.timeFrameData[0]?.x;
|
||||
|
||||
@@ -233,7 +233,7 @@ export default {
|
||||
},
|
||||
/**
|
||||
* Number to percentage
|
||||
* @param {number} val
|
||||
* @param {number} val 原始數字
|
||||
* @returns {string} 轉換完成的百分比字串
|
||||
*/
|
||||
getPercentLabel(val){
|
||||
@@ -242,7 +242,7 @@ export default {
|
||||
},
|
||||
/**
|
||||
* set progress bar width
|
||||
* @param {number} value
|
||||
* @param {number} value 百分比數字
|
||||
* @returns {string} 樣式的寬度設定
|
||||
*/
|
||||
progressWidth(value){
|
||||
@@ -250,7 +250,8 @@ export default {
|
||||
},
|
||||
/**
|
||||
* switch case data
|
||||
* @param {number} id
|
||||
* @param {number} id case id
|
||||
* @param {number} count 所有的 case 數量
|
||||
*/
|
||||
async switchCaseData(id, count) {
|
||||
// 點同一筆 id 不要有動作
|
||||
@@ -317,7 +318,7 @@ export default {
|
||||
},
|
||||
/**
|
||||
* 無限滾動: 監聽 scroll 有沒有滾到底部
|
||||
* @param {element} event
|
||||
* @param {element} event 滾動傳入的事件
|
||||
*/
|
||||
handleScroll(event) {
|
||||
if(this.infinitMaxItems || this.baseCases.length < 20 || this.infiniteFinish === false) return;
|
||||
|
||||
@@ -300,7 +300,7 @@ export default {
|
||||
},
|
||||
/**
|
||||
* Number to percentage
|
||||
* @param {number} val
|
||||
* @param {number} val 原始數字
|
||||
* @returns {string} 轉換完成的百分比字串
|
||||
*/
|
||||
getPercentLabel(val){
|
||||
@@ -309,7 +309,7 @@ export default {
|
||||
},
|
||||
/**
|
||||
* set progress bar width
|
||||
* @param {number} value
|
||||
* @param {number} value 百分比數字
|
||||
* @returns {string} 樣式的寬度設定
|
||||
*/
|
||||
progressWidth(value){
|
||||
@@ -336,7 +336,7 @@ export default {
|
||||
},
|
||||
// 調整 filterStartData / filterEndData / filterStartToEndData / filterEndToStartData 的內容
|
||||
/**
|
||||
* @param {array} array filterStartToEnd / filterEndToStart
|
||||
* @param {array} array filterStartToEnd / filterEndToStart,可傳入以上任一。
|
||||
*/
|
||||
setActData(array) {
|
||||
let list = [];
|
||||
@@ -379,7 +379,7 @@ export default {
|
||||
this.selectFilterEnd = e.data;
|
||||
},
|
||||
/**
|
||||
* @param {array} e Update List Seq
|
||||
* @param {array} listSeq Update List Seq
|
||||
*/
|
||||
onUpdateListSeq(listSeq) {
|
||||
this.listSeq = listSeq;
|
||||
@@ -397,6 +397,9 @@ export default {
|
||||
this.rowData = e.data;
|
||||
}
|
||||
},
|
||||
/**
|
||||
* @param {object} e object contains selected row's data
|
||||
*/
|
||||
endRow(e) {
|
||||
this.selectFilterEndToStart = e.data;
|
||||
if(this.isEndSelected === null || this.isEndSelected === true){
|
||||
@@ -500,7 +503,7 @@ export default {
|
||||
};
|
||||
},
|
||||
/**
|
||||
* @param {boolean} massage true | false 清空選項
|
||||
* @param {boolean} massage true | false 清空選項,可選以上任一。
|
||||
*/
|
||||
reset(massage) {
|
||||
// Sequence
|
||||
@@ -527,7 +530,9 @@ export default {
|
||||
// 成功訊息
|
||||
massage ? this.$toast.success('Filter cleared.') : null;
|
||||
},
|
||||
// header:Filter 發送選取的資料
|
||||
/**
|
||||
* header:Filter 發送選取的資料
|
||||
*/
|
||||
async submit(){
|
||||
this.isLoading = true;
|
||||
let data;
|
||||
|
||||
@@ -255,7 +255,7 @@ export default {
|
||||
},
|
||||
/**
|
||||
* Number to percentage
|
||||
* @param {number} val
|
||||
* @param {number} val 原始數字
|
||||
* @returns {string} 轉換完成的百分比字串
|
||||
*/
|
||||
getPercentLabel(val){
|
||||
|
||||
@@ -152,7 +152,7 @@ export default {
|
||||
methods: {
|
||||
/**
|
||||
* Number to percentage
|
||||
* @param {number} val
|
||||
* @param {number} val 原始數字
|
||||
* @returns {string} 轉換完成的百分比字串
|
||||
*/
|
||||
getPercentLabel(val){
|
||||
@@ -161,7 +161,7 @@ export default {
|
||||
},
|
||||
/**
|
||||
* set progress bar width
|
||||
* @param {number} value
|
||||
* @param {number} value 百分比數字
|
||||
* @returns {string} 樣式的寬度設定
|
||||
*/
|
||||
progressWidth(value){
|
||||
@@ -169,7 +169,8 @@ export default {
|
||||
},
|
||||
/**
|
||||
* switch case data
|
||||
* @param {number} id
|
||||
* @param {number} id case id
|
||||
* @param {number} count 總 case 數量
|
||||
*/
|
||||
async switchCaseData(id, count) {
|
||||
// 點同一筆 id 不要有動作
|
||||
@@ -246,7 +247,7 @@ export default {
|
||||
},
|
||||
/**
|
||||
* 無限滾動: 監聽 scroll 有沒有滾到底部
|
||||
* @param {element} event
|
||||
* @param {element} event 滾動傳入的事件
|
||||
*/
|
||||
handleScroll(event) {
|
||||
if(this.infinitMaxItems || this.cases.length < 20 || this.infiniteFinish === false) return;
|
||||
|
||||
@@ -108,7 +108,7 @@ export default {
|
||||
methods: {
|
||||
/**
|
||||
* switch map type
|
||||
* @param {string} type processMap | bpmn
|
||||
* @param {string} type 'processMap' | 'bpmn',可傳入以上任一。
|
||||
*/
|
||||
switchMapType(type) {
|
||||
this.mapType = type;
|
||||
@@ -116,7 +116,7 @@ export default {
|
||||
},
|
||||
/**
|
||||
* switch curve style
|
||||
* @param {string} style 直角 unbundled-bezier | taxi
|
||||
* @param {string} style 直角 'unbundled-bezier' | 'taxi',可傳入以上任一。
|
||||
*/
|
||||
switchCurveStyles(style) {
|
||||
this.curveStyle = style;
|
||||
@@ -124,7 +124,7 @@ export default {
|
||||
},
|
||||
/**
|
||||
* switch rank
|
||||
* @param {string} rank 直向 TB | 橫向 LR
|
||||
* @param {string} rank 直向 'TB' | 橫向 'LR',可傳入以上任一。
|
||||
*/
|
||||
switchRank(rank) {
|
||||
this.rank = rank;
|
||||
@@ -132,8 +132,8 @@ export default {
|
||||
},
|
||||
/**
|
||||
* switch Data Layoer Type or Option.
|
||||
* @param {string} e
|
||||
* @param {string} type freq | duration
|
||||
* @param {string} e 切換時傳入的選項
|
||||
* @param {string} type 'freq' | 'duration',可傳入以上任一。
|
||||
*/
|
||||
switchDataLayerType(e, type){
|
||||
let value = '';
|
||||
|
||||
@@ -104,7 +104,7 @@ export default {
|
||||
methods: {
|
||||
/**
|
||||
* Number to percentage
|
||||
* @param {number} val
|
||||
* @param {number} val 原始數字
|
||||
* @returns {string} 轉換完成的百分比字串
|
||||
*/
|
||||
getPercentLabel(val){
|
||||
|
||||
@@ -37,6 +37,10 @@ export default {
|
||||
IconUploarding,
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 上傳的行為
|
||||
* @param {event} event input 傳入的事件
|
||||
*/
|
||||
async upload(event) {
|
||||
const fileInput = document.getElementById('uploadFiles');
|
||||
const target = event.target;
|
||||
|
||||
@@ -48,6 +48,9 @@ export default {
|
||||
IconMember
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 登出的行為
|
||||
*/
|
||||
logOutButton() {
|
||||
if ((this.$route.name === 'Map' || this.$route.name === 'CheckMap') && this.tempFilterId) {
|
||||
// 傳給 Map,通知 Sidebar 要關閉。
|
||||
|
||||
@@ -82,11 +82,11 @@ export default {
|
||||
showNavbarBreadcrumb: false,
|
||||
navViewData:
|
||||
{
|
||||
// FILES: ['ALL', 'DISCOVER', 'COMPARE', 'DESIGN', 'SIMULATION'],
|
||||
// 舉例:FILES: ['ALL', 'DISCOVER', 'COMPARE', 'DESIGN', 'SIMULATION'],
|
||||
FILES: ['ALL', 'DISCOVER', 'COMPARE'],
|
||||
// DISCOVER: ['MAP', 'CONFORMANCE', 'PERFORMANCE', 'DATA']
|
||||
// 舉例:DISCOVER: ['MAP', 'CONFORMANCE', 'PERFORMANCE', 'DATA']
|
||||
DISCOVER: ['MAP', 'CONFORMANCE', 'PERFORMANCE'],
|
||||
// COMPARE: ['PROCESS MAP', 'DASHBOARD']
|
||||
// 舉例:COMPARE: ['PROCESS MAP', 'DASHBOARD']
|
||||
COMPARE: ['DASHBOARD']
|
||||
},
|
||||
navViewName: 'FILES',
|
||||
@@ -130,6 +130,7 @@ export default {
|
||||
methods: {
|
||||
/**
|
||||
* switch navbar item
|
||||
* @param {event} event 選取 Navbar 選項後傳入的值
|
||||
*/
|
||||
switchNavItem(event) {
|
||||
let type;
|
||||
|
||||
@@ -148,12 +148,15 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 關閉選單視窗
|
||||
*/
|
||||
onClose () {
|
||||
this.openTimeSelect = false;
|
||||
},
|
||||
/**
|
||||
* get focus element
|
||||
* @param {event} event
|
||||
* @param {event} event input 傳入的事件
|
||||
*/
|
||||
onFocus(event) {
|
||||
this.lastInput = event.target;
|
||||
@@ -161,7 +164,7 @@ export default {
|
||||
},
|
||||
/**
|
||||
* when blur update input value and show number
|
||||
* @param {event} event
|
||||
* @param {event} event input 傳入的事件
|
||||
*/
|
||||
onBlur(event) {
|
||||
let baseInputValue = event.target.value;
|
||||
@@ -202,7 +205,7 @@ export default {
|
||||
},
|
||||
/**
|
||||
* 上下箭頭時的行為
|
||||
* @param {event} event
|
||||
* @param {event} event input 傳入的事件
|
||||
*/
|
||||
onKeyUp(event) {
|
||||
event.target.value = event.target.value.replace(/\D/g, '');
|
||||
@@ -213,9 +216,9 @@ export default {
|
||||
},
|
||||
/**
|
||||
* 上下箭頭時的行為
|
||||
* @param {element} input
|
||||
* @param {number} goUp
|
||||
* @param {boolean} selectIt
|
||||
* @param {element} input input 傳入的事件
|
||||
* @param {number} goUp 上箭頭的鍵盤代號
|
||||
* @param {boolean} selectIt 是否已執行
|
||||
*/
|
||||
actionUpDown(input, goUp, selectIt = false) {
|
||||
const tUnit = input.dataset.tunit;
|
||||
@@ -291,8 +294,8 @@ export default {
|
||||
},
|
||||
/**
|
||||
* 設定 dhms 的數值
|
||||
* @param {number} totalSeconds
|
||||
* @param {string} size
|
||||
* @param {number} totalSeconds 總秒數
|
||||
* @param {string} size 'min' | 'max',可選以上任一,最大值或最小值
|
||||
*/
|
||||
secondToDate(totalSeconds, size) {
|
||||
totalSeconds = parseInt(totalSeconds);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* 將數字轉換成簡寫的形式,設定 dhms 的數值
|
||||
* @param {number} totalSeconds
|
||||
* @param {number} totalSeconds 總秒數
|
||||
* @returns {string}
|
||||
*/
|
||||
export default function abbreviateNumber(totalSeconds) {
|
||||
|
||||
@@ -16,7 +16,7 @@ const customClass = {
|
||||
};
|
||||
/**
|
||||
* Map Saved
|
||||
* @param { function } addFilterId
|
||||
* @param { function } addFilterId 後端 API
|
||||
*/
|
||||
export async function saveFilter(addFilterId) {
|
||||
let fileName = '';
|
||||
@@ -55,7 +55,7 @@ export async function saveFilter(addFilterId) {
|
||||
}
|
||||
/**
|
||||
* Saved Success
|
||||
* @param { string } value
|
||||
* @param { string } value File's name
|
||||
*/
|
||||
export async function savedSuccessfully(value) {
|
||||
value = value ? value : '';
|
||||
@@ -71,10 +71,10 @@ export async function savedSuccessfully(value) {
|
||||
};
|
||||
/**
|
||||
* leave Map page
|
||||
* @param { function } next
|
||||
* @param { function } addFilterId
|
||||
* @param { string } toPath
|
||||
* @param { function } logOut
|
||||
* @param { function } next 執行完函式後的步驟
|
||||
* @param { function } addFilterId 後端 API
|
||||
* @param { string } toPath route path
|
||||
* @param { function } logOut 登出函式
|
||||
*/
|
||||
export async function leaveFilter(next, addFilterId, toPath, logOut) {
|
||||
const allMapDataStore = AllMapDataStore();
|
||||
@@ -108,7 +108,7 @@ export async function leaveFilter(next, addFilterId, toPath, logOut) {
|
||||
};
|
||||
/**
|
||||
* Conformance Saved
|
||||
* @param { function } addConformanceCreateCheckId
|
||||
* @param { function } addConformanceCreateCheckId 後端 API
|
||||
*/
|
||||
export async function saveConformance(addConformanceCreateCheckId) {
|
||||
let fileName = '';
|
||||
@@ -147,10 +147,10 @@ export async function saveConformance(addConformanceCreateCheckId) {
|
||||
}
|
||||
/**
|
||||
* leave Conformance page
|
||||
* @param { function } next
|
||||
* @param { function } addConformanceCreateCheckId
|
||||
* @param { string } toPath
|
||||
* @param { function } logOut
|
||||
* @param { function } next 執行完函式後的步驟
|
||||
* @param { function } addConformanceCreateCheckId 後端 API
|
||||
* @param { string } toPath route path
|
||||
* @param { function } logOut 登出函式
|
||||
*/
|
||||
export async function leaveConformance(next, addConformanceCreateCheckId, toPath, logOut) {
|
||||
const conformanceStore = ConformanceStore();
|
||||
@@ -184,8 +184,8 @@ export async function leaveConformance(next, addConformanceCreateCheckId, toPath
|
||||
};
|
||||
/**
|
||||
* Upload failde First
|
||||
* @param { string } failureType
|
||||
* @param { string } failureMsg
|
||||
* @param { string } failureType 後端檔案錯誤類型
|
||||
* @param { string } failureMsg 後端檔案錯誤訊息
|
||||
*/
|
||||
export async function uploadFailedFirst(failureType, failureMsg, failureLoc) {
|
||||
// msg: 'not in UTF-8' | 'insufficient columns' | 'the csv file is empty' | 'the filename does not ends with .csv' | 'not a CSV file'
|
||||
@@ -224,7 +224,7 @@ export async function uploadFailedFirst(failureType, failureMsg, failureLoc) {
|
||||
};
|
||||
/**
|
||||
* Upload failde Second
|
||||
* @param { array } detail
|
||||
* @param { array } detail 後端回傳的失敗訊息
|
||||
*/
|
||||
export async function uploadFailedSecond(detail) {
|
||||
let srt = '';
|
||||
@@ -284,7 +284,7 @@ export async function uploadFailedSecond(detail) {
|
||||
};
|
||||
/**
|
||||
* Upload Success
|
||||
* @param { string } value
|
||||
* @param { string } value File's name
|
||||
*/
|
||||
export async function uploadSuccess() {
|
||||
await Swal.fire({
|
||||
@@ -298,7 +298,7 @@ export async function uploadSuccess() {
|
||||
};
|
||||
/**
|
||||
* Confirm whether to upload the file
|
||||
* @param { object } fetchData
|
||||
* @param { object } fetchData 後端 API POST data
|
||||
*/
|
||||
export async function uploadConfirm(fetchData) {
|
||||
const filesStore = FilesStore();
|
||||
@@ -333,10 +333,10 @@ export async function uploadloader() {
|
||||
};
|
||||
/**
|
||||
* Rename Modal
|
||||
* @param { function } rename
|
||||
* @param { string } type
|
||||
* @param { number } id
|
||||
* @param { string } baseName
|
||||
* @param { function } rename 後端 API
|
||||
* @param { string } type File 檔案類型
|
||||
* @param { number } id File ID
|
||||
* @param { string } baseName 改名前的檔名
|
||||
*/
|
||||
export async function renameModal(rename, type, id, baseName) {
|
||||
let fileName = baseName;
|
||||
@@ -379,8 +379,8 @@ export async function renameModal(rename, type, id, baseName) {
|
||||
/**
|
||||
* Delete File
|
||||
* @param { string } files 有關連的檔案
|
||||
* @param { string } type
|
||||
* @param { number } id
|
||||
* @param { string } type File 檔案類型
|
||||
* @param { number } id File ID
|
||||
* @param { string } name 原本的檔案
|
||||
*/
|
||||
export async function deleteFileModal(files, type, id, name) {
|
||||
|
||||
@@ -12,8 +12,8 @@ const delay = (s = 0) => new Promise((resolve, reject) => setTimeout(resolve, s
|
||||
|
||||
/**
|
||||
* API catch error function
|
||||
* @param {object} Error
|
||||
* @param {string} toastMessage
|
||||
* @param {object} Error 後端 ERROR
|
||||
* @param {string} toastMessage Toast 的提示文字
|
||||
* @returns {string} Error HTTP Status
|
||||
*/
|
||||
export default async function apiError(error, toastMessage) {
|
||||
|
||||
@@ -8,7 +8,7 @@ import { getTimeLabel } from '@/module/timeLabel.js'; // 時間格式轉換器
|
||||
cytoscape.use( dagre );
|
||||
|
||||
/**
|
||||
* @param {object} mapData processMapData | bpmnData
|
||||
* @param {object} mapData processMapData | bpmnData,可選以上任一。
|
||||
* mapData:{
|
||||
* startId: 0,
|
||||
* endId: 1,
|
||||
|
||||
@@ -18,7 +18,7 @@ cytoscape.use( dagre );
|
||||
* width: number
|
||||
* }
|
||||
* @param {array} edges it's similar to nodes
|
||||
* @param {string} graphId
|
||||
* @param {string} graphId graph Id
|
||||
*/
|
||||
export default function cytoscapeMapTrace(nodes, edges, graphId) {
|
||||
// create Cytoscape
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* 將數字轉換成帶有逗號格式(ex: 1000 -> 1,000)
|
||||
* 也可以改用原生 JS 方法 `.toLocaleString('en-US')`
|
||||
* @param {number} num
|
||||
* @param {number} num 數字
|
||||
* @returns
|
||||
*/
|
||||
export default function numberLabel(num) {
|
||||
|
||||
@@ -153,8 +153,8 @@ export function getXIndex(data, xValue) {
|
||||
return closestIndex;
|
||||
};
|
||||
/**
|
||||
*
|
||||
* @param {number} seconds
|
||||
* 有 dhms 表達的時間單位
|
||||
* @param {number} seconds 總秒數
|
||||
* @returns {string}
|
||||
*/
|
||||
export function formatTime(seconds) {
|
||||
@@ -180,8 +180,8 @@ export function formatTime(seconds) {
|
||||
} else return null;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param {array} times
|
||||
* 只顯示最大的兩個單位
|
||||
* @param {array} times 時間
|
||||
* @returns {array}
|
||||
*/
|
||||
export function formatMaxTwo(times) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* 數量單位轉換,輸出 k m b t 數值。
|
||||
* @param {number} number
|
||||
* @param {number} number 總秒數
|
||||
* @returns {string}
|
||||
*/
|
||||
export default function shortScaleNumber(number) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* 數字、英文、中文,排序
|
||||
* @param {array} data
|
||||
* @param {array} data List
|
||||
* @returns
|
||||
*/
|
||||
export function sortNumEngZhtw(data) {
|
||||
|
||||
@@ -2,7 +2,7 @@ import moment from 'moment';
|
||||
|
||||
/**
|
||||
* 將秒數轉換成帶有時間單位的格式
|
||||
* @param {number} second
|
||||
* @param {number} second 總秒數
|
||||
* @param {number} fixedNumber 小數點後幾位
|
||||
* @returns {string} 轉換完的格式(ex: 1 day, 6.8 hrs)
|
||||
*/
|
||||
@@ -30,7 +30,7 @@ export function getTimeLabel(second, fixedNumber = 0) {
|
||||
}
|
||||
/**
|
||||
* 將秒數轉換成帶有縮寫時間單位的格式
|
||||
* @param {number} second
|
||||
* @param {number} second 總秒數
|
||||
* @param {number} fixedNumber 小數點後幾位
|
||||
* @returns {string} 轉換完的格式(ex: 1 d, 6.8 h)
|
||||
*/
|
||||
|
||||
@@ -57,28 +57,28 @@ const routes = [
|
||||
name: "Discover",
|
||||
children: [
|
||||
{
|
||||
// type: log | filter
|
||||
// fileId: log_id | filter_id
|
||||
// type: log | filter,參數會有以上任一。
|
||||
// fileId: log_id | filter_id,參數會有以上任一。
|
||||
path: "/discover/:type/:fileId/map",
|
||||
name: "Map",
|
||||
component: Map,
|
||||
},
|
||||
{
|
||||
// type: log | filter
|
||||
// fileId: log_id | filter_id
|
||||
// type: log | filter,參數會有以上任一。
|
||||
// fileId: log_id | filter_id,參數會有以上任一。
|
||||
path: "/discover/:type/:fileId/conformance",
|
||||
name: "Conformance",
|
||||
component: Conformance,
|
||||
},
|
||||
{
|
||||
// type: log | filter
|
||||
// fileId: log_id | filter_id
|
||||
// type: log | filter,參數會有以上任一。
|
||||
// fileId: log_id | filter_id,參數會有以上任一。
|
||||
path: "/discover/:type/:fileId/performance",
|
||||
name: "Performance",
|
||||
component: Performance,
|
||||
},
|
||||
{
|
||||
// type: log | filter
|
||||
// type: log | filter,參數會有以上任一。
|
||||
// fileId: check_id,透過 `/log-checks/{check_id}` 取得 parent data
|
||||
path: "/discover/conformance/:type/:fileId/map",
|
||||
name: "CheckMap",
|
||||
@@ -88,7 +88,7 @@ const routes = [
|
||||
}
|
||||
},
|
||||
{
|
||||
// type: log | filter
|
||||
// type: log | filter,參數會有以上任一。
|
||||
// fileId: check_id,透過 `/log-checks/{check_id}` 取得 parent data
|
||||
path: "/discover/conformance/:type/:fileId/conformance",
|
||||
name: "CheckConformance",
|
||||
@@ -98,7 +98,7 @@ const routes = [
|
||||
}
|
||||
},
|
||||
{
|
||||
// type: log | filter
|
||||
// type: log | filter,參數會有以上任一。
|
||||
// fileId: check_id,透過 `/log-checks/{check_id}` 取得 parent data
|
||||
path: "/discover/conformance/:type/:fileId/performance",
|
||||
name: "CheckPerformance",
|
||||
|
||||
@@ -306,6 +306,7 @@ export default defineStore('allMapDataStore', {
|
||||
},
|
||||
/**
|
||||
* Add a New Filter
|
||||
* @param {string} value file's name
|
||||
*/
|
||||
async addFilterId(value) {
|
||||
let logId = this.logId;
|
||||
@@ -325,6 +326,7 @@ export default defineStore('allMapDataStore', {
|
||||
},
|
||||
/**
|
||||
* Get Filter Detail
|
||||
* @param {namber} createfilterId filter type ID
|
||||
*/
|
||||
async fetchFunnel(createfilterId) {
|
||||
const api = `/api/filters/${createfilterId}`;
|
||||
|
||||
@@ -29,6 +29,8 @@ export default defineStore('compareStore', {
|
||||
},
|
||||
/**
|
||||
* fetch discover api, get stats.
|
||||
* @param {string} type 'log' | 'filter',可傳入 'log' 或 'filter'
|
||||
* @param {number} id log or filter ID
|
||||
*/
|
||||
async getStateData(type, id) {
|
||||
let api = '';
|
||||
@@ -51,6 +53,7 @@ export default defineStore('compareStore', {
|
||||
},
|
||||
/**
|
||||
* Get file's name
|
||||
* @param {number} id log or filter ID
|
||||
*/
|
||||
async getFileName(id) {
|
||||
id = Number(id)
|
||||
|
||||
@@ -210,6 +210,7 @@ export default defineStore('conformanceStore', {
|
||||
},
|
||||
/**
|
||||
* Creates a new temporary check for a log.
|
||||
* @param {object} data 送給後端的 data
|
||||
*/
|
||||
async addConformanceCheckId(data) {
|
||||
let logId = this.conformanceLogId;
|
||||
@@ -254,6 +255,7 @@ export default defineStore('conformanceStore', {
|
||||
},
|
||||
/**
|
||||
* Get the detail of a temporary log conformance issue.
|
||||
* @param {number} issueNo Issues 編號
|
||||
*/
|
||||
async getConformanceIssue(issueNo) {
|
||||
let logTempCheckId = this.conformanceLogTempCheckId;
|
||||
@@ -277,6 +279,9 @@ export default defineStore('conformanceStore', {
|
||||
},
|
||||
/**
|
||||
* Get the Trace Details of a Temporary Log Conformance lssue.
|
||||
* @param {number} issueNo Issues 編號
|
||||
* @param {number} traceId, Trace 編號
|
||||
* @param {number} start Trace 要從哪個編號開始載入
|
||||
*/
|
||||
async getConformanceTraceDetail(issueNo, traceId, start) {
|
||||
let logTempCheckId = this.conformanceLogTempCheckId;
|
||||
@@ -303,6 +308,7 @@ export default defineStore('conformanceStore', {
|
||||
},
|
||||
/**
|
||||
* Get the Details of a Temporary Log Conformance Loop.
|
||||
* @param {number} loopNo loop 編號
|
||||
*/
|
||||
async getConformanceLoop(loopNo) {
|
||||
let logTempCheckId = this.conformanceLogTempCheckId;
|
||||
@@ -326,6 +332,9 @@ export default defineStore('conformanceStore', {
|
||||
},
|
||||
/**
|
||||
* Get the Trace Details of a Temporary Log Conformance Loops.
|
||||
* @param {number} loopNo loop 編號
|
||||
* @param {number} traceId, Trace 編號
|
||||
* @param {number} start Trace 要從哪個編號開始載入
|
||||
*/
|
||||
async getConformanceLoopsTraceDetail(loopNo, traceId, start) {
|
||||
let logTempCheckId = this.conformanceLogTempCheckId;
|
||||
@@ -352,6 +361,7 @@ export default defineStore('conformanceStore', {
|
||||
},
|
||||
/**
|
||||
* Add a New Log Conformance Check, Save the log file.
|
||||
* @param {string} value file's name
|
||||
*/
|
||||
async addConformanceCreateCheckId(value) {
|
||||
let logId = this.conformanceLogId;
|
||||
|
||||
@@ -109,7 +109,7 @@ export default defineStore('filesStore', {
|
||||
},
|
||||
/**
|
||||
* Uploads a CSV log file. 第一階段上傳
|
||||
* @param {Object} fromData
|
||||
* @param {Object} fromData 傳給後端的 Data
|
||||
*/
|
||||
async upload(fromData) {
|
||||
const api = '/api/logs/csv-uploads';
|
||||
@@ -156,7 +156,7 @@ export default defineStore('filesStore', {
|
||||
},
|
||||
/**
|
||||
* Add a Log from an Uploaded CSV Log File. 第二階段上傳
|
||||
* @param {Object} data
|
||||
* @param {Object} data 傳給後端的 Data
|
||||
*/
|
||||
async uploadLog(data) {
|
||||
const uploadId = this.uploadId;
|
||||
@@ -184,9 +184,9 @@ export default defineStore('filesStore', {
|
||||
},
|
||||
/**
|
||||
* Rename a Log
|
||||
* @param { string } type log | filter | log-check | filter-check
|
||||
* @param { number } id
|
||||
* @param { string } name
|
||||
* @param { string } type log | filter | log-check | filter-check,傳入以上任一個。
|
||||
* @param { number } id 檔案 ID
|
||||
* @param { string } name file's name
|
||||
*/
|
||||
async rename(type, id, fileName) {
|
||||
// 先判斷有沒有 uploadLogId,有就設定 id 和 type;再判斷檔案型別。
|
||||
@@ -224,7 +224,7 @@ export default defineStore('filesStore', {
|
||||
/**
|
||||
* Get the Dependents of the files
|
||||
* @param { string } type log | filter | log-check | filter-check
|
||||
* @param { number } id
|
||||
* @param { number } id 檔案 ID
|
||||
*/
|
||||
async getDependents(type, id) {
|
||||
let api;
|
||||
@@ -253,7 +253,7 @@ export default defineStore('filesStore', {
|
||||
/**
|
||||
* Delete file
|
||||
* @param { string } type log | filter | log-check | filter-check
|
||||
* @param { number } id
|
||||
* @param { number } id 檔案 ID
|
||||
*/
|
||||
async deleteFile(type, id) {
|
||||
let api;
|
||||
@@ -288,6 +288,7 @@ export default defineStore('filesStore', {
|
||||
},
|
||||
/**
|
||||
* Remove a Deletion Record,真刪除被 Admin 或被其他帳號刪除的檔案
|
||||
* @param {number} id 檔案 ID
|
||||
*/
|
||||
async deletionRecord(id) {
|
||||
let api = '';
|
||||
@@ -305,8 +306,8 @@ export default defineStore('filesStore', {
|
||||
/**
|
||||
* Download file as CSV
|
||||
* @param { string } type log | filter | log-check | filter-check
|
||||
* @param { number } id
|
||||
* @param { string } fileName
|
||||
* @param { number } id 檔案 ID
|
||||
* @param { string } fileName file's name
|
||||
*/
|
||||
async downloadFileCSV(type, id, fileName) {
|
||||
let api;
|
||||
|
||||
@@ -44,7 +44,7 @@ export default defineStore('loginStore', {
|
||||
};
|
||||
},
|
||||
/**
|
||||
* Refresh Token
|
||||
* Refresh Token (暫時沒做)
|
||||
*/
|
||||
async refreshTokenLogin() {
|
||||
const api = '/api/oauth/token';
|
||||
|
||||
@@ -13,6 +13,8 @@ export default defineStore('performanceStore', {
|
||||
actions: {
|
||||
/**
|
||||
* Get Performance
|
||||
* @param {string} type 'log' | 'filter',可傳入以上任一。
|
||||
* @param {*} id 檔案 ID
|
||||
*/
|
||||
async getPerformance(type, id) {
|
||||
let api = '';
|
||||
|
||||
@@ -216,8 +216,8 @@ export default {
|
||||
/**
|
||||
* 建立折線圖
|
||||
* @param { object } chartData chart data
|
||||
* @param { object } content titels
|
||||
* @param { string } yUnit y 軸單位 date | count
|
||||
* @param { object } content titels 標題文字
|
||||
* @param { string } yUnit y 軸單位 'date' | 'count',可傳入以上任一。
|
||||
*/
|
||||
getLineChart(chartData, content, yUnit) {
|
||||
let datasetsPrimary;
|
||||
@@ -391,7 +391,7 @@ export default {
|
||||
/**
|
||||
* 建立長條圖
|
||||
* @param { object } chartData chart data
|
||||
* @param { object } content titels
|
||||
* @param { object } content titels 文字標題
|
||||
*/
|
||||
getBarChart(chartData, content) {
|
||||
const maxX = chartData.x_axis.max;
|
||||
@@ -540,9 +540,9 @@ export default {
|
||||
/**
|
||||
* 建立水平長條圖
|
||||
* @param { object } chartData chart data
|
||||
* @param { object } content titels
|
||||
* @param { object } content titels 標題的文字
|
||||
* @param { boolean } isSingle 單個或雙數 activity
|
||||
* @param { string } xUnit x 軸單位 date | count
|
||||
* @param { string } xUnit x 軸單位 'date' | 'count',可傳入以上任一。
|
||||
*/
|
||||
getHorizontalBarChart(chartData, content, isSingle, xUnit) {
|
||||
const maxY = chartData.y_axis.max;
|
||||
|
||||
@@ -176,7 +176,7 @@ export default {
|
||||
methods: {
|
||||
/**
|
||||
* switch map type
|
||||
* @param {string} type processMap | bpmn
|
||||
* @param {string} type 'processMap' | 'bpmn',可傳入以上任一。
|
||||
*/
|
||||
switchMapType(type) {
|
||||
this.mapType = type;
|
||||
@@ -184,7 +184,7 @@ export default {
|
||||
},
|
||||
/**
|
||||
* switch curve style
|
||||
* @param {string} style 直角 unbundled-bezier | taxi
|
||||
* @param {string} style 直角 'unbundled-bezier' | 'taxi',可傳入以上任一。
|
||||
*/
|
||||
switchCurveStyles(style) {
|
||||
this.curveStyle = style;
|
||||
@@ -192,7 +192,7 @@ export default {
|
||||
},
|
||||
/**
|
||||
* switch rank
|
||||
* @param {string} rank 直向 TB | 橫向 LR
|
||||
* @param {string} rank 直向 'TB' | 橫向 'LR',可傳入以上任一。
|
||||
*/
|
||||
switchRank(rank) {
|
||||
this.rank = rank;
|
||||
@@ -200,8 +200,8 @@ export default {
|
||||
},
|
||||
/**
|
||||
* switch Data Layoer Type or Option.
|
||||
* @param {string} e
|
||||
* @param {string} type freq | duration
|
||||
* @param {string} option 下拉選單中的選項
|
||||
*/
|
||||
switchDataLayerType(type, option){
|
||||
this.dataLayerType = type;
|
||||
@@ -210,7 +210,7 @@ export default {
|
||||
},
|
||||
/**
|
||||
* switch trace id and data
|
||||
* @param {string} id
|
||||
* @param {event} e input 傳入的事件
|
||||
*/
|
||||
async switchTraceId(e) {
|
||||
if(e.id == this.traceId) return;
|
||||
@@ -223,7 +223,7 @@ export default {
|
||||
},
|
||||
/**
|
||||
* 將 element nodes 資料彙整
|
||||
* @param {object} type processMapData | bpmnData
|
||||
* @param {object} type 'processMapData' | 'bpmnData',可傳入以上任一。
|
||||
*/
|
||||
setNodesData(mapData) {
|
||||
let mapType = this.mapType;
|
||||
@@ -315,7 +315,7 @@ export default {
|
||||
},
|
||||
/**
|
||||
* 將 element edges 資料彙整
|
||||
* @param {object} type processMapData | bpmnData
|
||||
* @param {object} type 'processMapData' | 'bpmnData',可傳入以上任一。
|
||||
*/
|
||||
setEdgesData(mapData) {
|
||||
let mapType = this.mapType;
|
||||
@@ -346,7 +346,7 @@ export default {
|
||||
},
|
||||
/**
|
||||
* create cytoscape's map
|
||||
* @param {string} type this.mapType processMap | bpmn
|
||||
* @param {string} type this.mapType 'processMap' | 'bpmn',可傳入以上任一。
|
||||
*/
|
||||
createCy(type) {
|
||||
let graphId = document.getElementById('cy');
|
||||
|
||||
@@ -213,8 +213,8 @@ export default {
|
||||
/**
|
||||
* 建立折線圖
|
||||
* @param { object } chartData chart data
|
||||
* @param { object } content titels
|
||||
* @param { string } yUnit y 軸單位 date | count
|
||||
* @param { object } content titels 標題文字
|
||||
* @param { string } yUnit y 軸單位 'date' | 'count'
|
||||
*/
|
||||
getLineChart(chartData, content, yUnit) {
|
||||
let datasets;
|
||||
@@ -357,7 +357,7 @@ export default {
|
||||
/**
|
||||
* 建立長條圖
|
||||
* @param { object } chartData chart data
|
||||
* @param { object } content titels
|
||||
* @param { object } content titels 標題文字
|
||||
*/
|
||||
getBarChart(chartData, content) {
|
||||
const maxX = chartData.x_axis.max;
|
||||
@@ -471,9 +471,9 @@ export default {
|
||||
/**
|
||||
* 建立水平長條圖
|
||||
* @param { object } chartData chart data
|
||||
* @param { object } content titels
|
||||
* @param { object } content titels 標題文字
|
||||
* @param { boolean } isSingle 單個或雙數 activity
|
||||
* @param { string } xUnit x 軸單位 date | count
|
||||
* @param { string } xUnit x 軸單位 'date' | 'count',可傳入以上任一。
|
||||
*/
|
||||
getHorizontalBarChart(chartData, content, isSingle, xUnit) {
|
||||
const maxY = chartData.y_axis.max;
|
||||
|
||||
@@ -369,7 +369,7 @@
|
||||
},
|
||||
/**
|
||||
* 選擇該 files 進入 Discover/Compare/Design 頁面
|
||||
* @param {object} file
|
||||
* @param {object} file 該 file 的詳細資料
|
||||
*/
|
||||
enterDiscover(file){
|
||||
let type;
|
||||
@@ -409,8 +409,8 @@
|
||||
},
|
||||
/**
|
||||
* Right Click DOM Event
|
||||
* @param {event} event
|
||||
* @param {string} file
|
||||
* @param {event} event 該 file 的詳細資料
|
||||
* @param {string} file file's name
|
||||
*/
|
||||
onRightClick(event, file) {
|
||||
this.selectedType = file.type;
|
||||
@@ -420,7 +420,7 @@
|
||||
},
|
||||
/**
|
||||
* Right Click Table DOM Event
|
||||
* @param {event} event
|
||||
* @param {event} event 該 file 的詳細資料
|
||||
*/
|
||||
onRightClickTable(event) {
|
||||
this.selectedType = event.data.type;
|
||||
@@ -430,8 +430,8 @@
|
||||
},
|
||||
/**
|
||||
* Right Click Gride Card DOM Event
|
||||
* @param {event} event
|
||||
* @param {number} index
|
||||
* @param {event} event 該 file 的詳細資料
|
||||
* @param {number} index 該 file 的 index
|
||||
*/
|
||||
onGridCardClick(file, index) {
|
||||
this.selectedType = file.type;
|
||||
@@ -441,10 +441,10 @@
|
||||
},
|
||||
/**
|
||||
* File's Rename
|
||||
* @param {string} type
|
||||
* @param {number} id
|
||||
* @param {string} source hover icon
|
||||
* @param {string} fileName
|
||||
* @param {string} type 該檔案的 type
|
||||
* @param {number} id 該檔案的 id
|
||||
* @param {string} source hover icon 該檔案的 icon
|
||||
* @param {string} fileName file's name
|
||||
*/
|
||||
rename(type, id, source, fileName) {
|
||||
if(type && id && source === 'list-hover') {
|
||||
@@ -456,9 +456,9 @@
|
||||
},
|
||||
/**
|
||||
* Delete file
|
||||
* @param {string} type
|
||||
* @param {number} id
|
||||
* @param {string} source hover icon
|
||||
* @param {string} type 該檔案的 type
|
||||
* @param {number} id 該檔案的 id
|
||||
* @param {string} source hover icon 該檔案的 icon
|
||||
*/
|
||||
async deleteFile(type, id, name, source) {
|
||||
let srt = '';
|
||||
@@ -516,9 +516,9 @@
|
||||
},
|
||||
/**
|
||||
* Download file as CSV
|
||||
* @param {string} type
|
||||
* @param {number} id
|
||||
* @param {string} source hover icon
|
||||
* @param {string} type 該檔案的 type
|
||||
* @param {number} id 該檔案的 id
|
||||
* @param {string} source hover icon 該檔案的 icon
|
||||
*/
|
||||
download(type, id, source, name) {
|
||||
if(type && id && source === 'list-hover' && name) {
|
||||
@@ -555,7 +555,7 @@
|
||||
this.$router.push({name: 'CompareDashboard', params: params});
|
||||
},
|
||||
/**
|
||||
*
|
||||
* Grid 模板時的篩選器
|
||||
* @param {event} event choose columnType item
|
||||
*/
|
||||
getGridSortData(event) {
|
||||
|
||||
@@ -85,6 +85,7 @@ export default {
|
||||
methods: {
|
||||
/**
|
||||
* when input onChange value , isInvalid === false.
|
||||
* @param {event} event input 傳入的事件
|
||||
*/
|
||||
changeHandler(event) {
|
||||
let inputValue = event.target.value;
|
||||
|
||||
@@ -25,8 +25,6 @@ export default {
|
||||
getUserData,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
},
|
||||
mounted() {
|
||||
this.getUserData();
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ export default {
|
||||
uploadConfirm,
|
||||
/**
|
||||
* Rename 離開 input 的行為
|
||||
* @param {Event} e
|
||||
* @param {Event} e input 傳入的事件
|
||||
*/
|
||||
onBlur(e) {
|
||||
const baseWidth = 20;
|
||||
@@ -160,7 +160,7 @@ export default {
|
||||
},
|
||||
/**
|
||||
* Rename 輸入 input 的行為
|
||||
* @param {Event} e
|
||||
* @param {Event} e input 傳入的事件
|
||||
*/
|
||||
onInput(e) {
|
||||
const baseWidth = 20;
|
||||
@@ -170,8 +170,8 @@ export default {
|
||||
},
|
||||
/**
|
||||
* input 寬度隨著 value 響應式改變
|
||||
* @param {String} text
|
||||
* @param {Event} e
|
||||
* @param {String} text file's name
|
||||
* @param {Event} e input 傳入的事件
|
||||
*/
|
||||
getTextWidth(text, e) {
|
||||
// 替換空格為不斷行的空格
|
||||
@@ -190,7 +190,7 @@ export default {
|
||||
},
|
||||
/**
|
||||
* 驗證,根據新的 selectedColumns 更新 informData 和 repeatedData
|
||||
* @param {Array} data
|
||||
* @param {Array} data 已選擇的 type 的 data
|
||||
*/
|
||||
updateValidationData(data) {
|
||||
const nameOccurrences = {};
|
||||
|
||||
Reference in New Issue
Block a user