docs: Update all files JSDoc.

This commit is contained in:
chiayin
2024-03-29 15:49:05 +08:00
parent 4ba71d1193
commit e391c9a237
55 changed files with 260 additions and 219 deletions

View File

@@ -6,7 +6,6 @@
@tailwind utilities; @tailwind utilities;
@layer tailwind-base, primevue; @layer tailwind-base, primevue;
/* @layer tailwind-base, primevue, tailwind-utilities; */
@layer tailwind-base { @layer tailwind-base {
@tailwind base; @tailwind base;

View File

@@ -71,7 +71,6 @@
@apply !h-1 @apply !h-1
} }
/* radio */ /* 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
p-radiobutton-box p-radiobutton-box
p-radiobutton-icon */ p-radiobutton-icon */
@@ -95,11 +94,6 @@ p-radiobutton-icon */
@apply !p-0 @apply !p-0
} }
/* DataTable */ /* DataTable */
/* .p-datatable table {
border-collapse: collapse;
min-width: 100%;
table-layout: fixed;
} */
.p-datatable-resizable > .p-datatable-wrapper { .p-datatable-resizable > .p-datatable-wrapper {
@apply !overflow-x-visible @apply !overflow-x-visible
} }

View File

@@ -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"> <Sidebar :visible="sidebarState" :closeIcon="'pi pi-angle-right'" :modal="false" position="right" :dismissable="false" class="!w-[440px]" @hide="hide" @show="show">
<template #header> <template #header>
<p class="pl-2 text-base font-bold text-neutral-900">Summary</p> <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> </template>
<!-- header: summary --> <!-- header: summary -->
<div class="flex justify-start items-start"> <div class="flex justify-start items-start">
@@ -183,7 +180,7 @@ export default {
methods: { methods: {
/** /**
* Number to percentage * Number to percentage
* @param {number} val * @param {number} val 原始數字
* @returns {string} 轉換完成的百分比字串 * @returns {string} 轉換完成的百分比字串
*/ */
getPercentLabel(val){ getPercentLabel(val){
@@ -194,7 +191,7 @@ export default {
* setting stats data * setting stats data
* @param { object } data fetch API stats data * @param { object } data fetch API stats data
* @param { string } fileName file Name * @param { string } fileName file Name
* @returns { object } primaryStatData | secondaryStatData * @returns { object } primaryStatData | secondaryStatData回傳 primaryStatData 或 secondaryStatData
*/ */
getStatData(data, fileName) { getStatData(data, fileName) {
return { return {
@@ -269,7 +266,6 @@ export default {
const secondaryFileName = await this.compareStore.getFileName(secondaryId) const secondaryFileName = await this.compareStore.getFileName(secondaryId)
this.primaryStatData = await this.getStatData(primaryData, primaryFileName); this.primaryStatData = await this.getStatData(primaryData, primaryFileName);
this.secondaryStatData = await this.getStatData(secondaryData, secondaryFileName); this.secondaryStatData = await this.getStatData(secondaryData, secondaryFileName);
} }
} }
</script> </script>

View File

@@ -284,7 +284,7 @@ export default {
methods: { methods: {
/** /**
* set progress bar width * set progress bar width
* @param {number} value * @param {number} value 百分比數字
* @returns {string} 樣式的寬度設定 * @returns {string} 樣式的寬度設定
*/ */
progressWidth(value){ progressWidth(value){
@@ -292,7 +292,7 @@ export default {
}, },
/** /**
* Number to percentage * Number to percentage
* @param {number} val * @param {number} val 原始數字
* @returns {string} 轉換完成的百分比字串 * @returns {string} 轉換完成的百分比字串
*/ */
getPercentLabel(val){ getPercentLabel(val){
@@ -301,7 +301,7 @@ export default {
}, },
/** /**
* Convert seconds to days * Convert seconds to days
* @param {number} sec * @param {number} sec 秒數
* @returns {number} day * @returns {number} day
*/ */
convertSecToDay(sec) { convertSecToDay(sec) {
@@ -309,7 +309,7 @@ export default {
}, },
/** /**
* Open Issues Modal. * Open Issues Modal.
* @param {number} no trace no * @param {number} no trace 編號
*/ */
async openMore(no) { async openMore(no) {
// async await 解決非同步資料延遲傳遞導致未讀取到而出錯的問題 // async await 解決非同步資料延遲傳遞導致未讀取到而出錯的問題
@@ -321,7 +321,7 @@ export default {
}, },
/** /**
* Open Loop Modal. * Open Loop Modal.
* @param {number} no trace no * @param {number} no trace 編號
*/ */
async openLoopMore(no) { async openLoopMore(no) {
// async await 解決非同步資料延遲傳遞導致未讀取到而出錯的問題 // async await 解決非同步資料延遲傳遞導致未讀取到而出錯的問題
@@ -333,7 +333,7 @@ export default {
}, },
/** /**
* set conformance report data * set conformance report data
* @param {object} data new watch's value * @param {object} data new watch's value 監聽到後端傳來的報告 data
*/ */
setConformanceTempReportData(data){ setConformanceTempReportData(data){
let total = getNumberLabel(Object.values(data.counts).reduce((acc, val) => acc + val, 0)); let total = getNumberLabel(Object.values(data.counts).reduce((acc, val) => acc + val, 0));

View File

@@ -691,14 +691,14 @@ export default {
methods: { methods: {
/** /**
* get min total seconds * get min total seconds
* @param {Number} e * @param {Number} e 最小值總秒數
*/ */
minTotalSeconds(e) { minTotalSeconds(e) {
this.selectTimeRangeMin = e; this.selectTimeRangeMin = e;
}, },
/** /**
* get min total seconds * get min total seconds
* @param {Number} e * @param {Number} e 最大值總秒數
*/ */
maxTotalSeconds(e) { maxTotalSeconds(e) {
this.selectTimeRangeMax = e; this.selectTimeRangeMax = e;
@@ -784,7 +784,7 @@ export default {
this.isSubmitTimeCfmCtEteSE = { base: {}, rule: {}}; this.isSubmitTimeCfmCtEteSE = { base: {}, rule: {}};
}, },
/** /**
* @param {boolean} massage true | false 清空選單選項, 選擇的結果 * 清空選單的行為
*/ */
reset() { reset() {
// Results page Cover Plate(遮罩為 ture) // Results page Cover Plate(遮罩為 ture)
@@ -825,7 +825,6 @@ export default {
isEndSelected: true isEndSelected: true
}; };
} }
}, },
/** /**
* Apply button 發送選項,取得 Check Id. * Apply button 發送選項,取得 Check Id.

View File

@@ -32,6 +32,9 @@ export default {
} }
}, },
methods: { methods: {
/**
* 將選取的 Activities 傳出去
*/
actListData() { actListData() {
this.$emitter.emit('actListData', this.actList); this.$emitter.emit('actListData', this.actList);
} }

View File

@@ -33,6 +33,9 @@ export default {
}, },
}, },
methods: { methods: {
/**
* 將選取的 Activity 傳出去
*/
actRadioData() { actRadioData() {
this.localSelect = null; this.localSelect = null;
this.$emitter.emit('actRadioData', { this.$emitter.emit('actRadioData', {

View File

@@ -40,7 +40,6 @@
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { sortNumEngZhtw } from '@/module/sortNumEngZhtw.js'; import { sortNumEngZhtw } from '@/module/sortNumEngZhtw.js';

View File

@@ -99,6 +99,9 @@ export default {
} }
}, },
methods: { methods: {
/**
* 切換 Rule Type 的選項時的行為
*/
changeRadio() { changeRadio() {
this.selectedActivitySequence = 'Start & End'; this.selectedActivitySequence = 'Start & End';
this.selectedMode = 'Directly follows'; this.selectedMode = 'Directly follows';
@@ -107,15 +110,27 @@ export default {
this.selectedActSeqFromTo = 'From'; this.selectedActSeqFromTo = 'From';
this.$emitter.emit('isRadioChange', true); // Radio 切換時,資料要清空 this.$emitter.emit('isRadioChange', true); // Radio 切換時,資料要清空
}, },
/**
* 切換 Activity sequence 的選項時的行為
*/
changeRadioSeq() { changeRadioSeq() {
this.$emitter.emit('isRadioSeqChange',true); this.$emitter.emit('isRadioSeqChange',true);
}, },
/**
* 切換 Processing time 的選項時的行為
*/
changeRadioProcessScope() { changeRadioProcessScope() {
this.$emitter.emit('isRadioProcessScopeChange', true); this.$emitter.emit('isRadioProcessScopeChange', true);
}, },
/**
* 切換 Process Scope 的選項時的行為
*/
changeRadioActSeqMore() { changeRadioActSeqMore() {
this.$emitter.emit('isRadioActSeqMoreChange', true); this.$emitter.emit('isRadioActSeqMoreChange', true);
}, },
/**
* 切換 Activity Sequence 的選項時的行為
*/
changeRadioActSeqFromTo() { changeRadioActSeqFromTo() {
this.$emitter.emit('isRadioActSeqFromToChange', true); this.$emitter.emit('isRadioActSeqFromToChange', true);
}, },

View File

@@ -143,28 +143,6 @@ export default {
}, },
}, },
methods: { 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 * All reset
*/ */

View File

@@ -202,8 +202,8 @@ export default {
methods: { methods: {
/** /**
* 設定 start and end 的 Radio Data * 設定 start and end 的 Radio Data
* @param {object} data cfmSeqStart | cfmSeqEnd | cfmPtEteSE | cfmPtPSE | cfmWtEteSE | cfmWtPSE | cfmCtEteSE * @param {object} data cfmSeqStart | cfmSeqEnd | cfmPtEteSE | cfmPtPSE | cfmWtEteSE | cfmWtPSE | cfmCtEteSE,傳入以上任一後端接到的 Activities 列表 Data。
* @param {string} category start | end * @param {string} category 'start' | 'end',傳入 'start' 或 'end'。
* @returns {array} * @returns {array}
*/ */
setTaskData(data, category) { setTaskData(data, category) {
@@ -213,9 +213,9 @@ export default {
}, },
/** /**
* 重新設定連動的 start and end 的 Radio Data * 重新設定連動的 start and end 的 Radio Data
* @param {object} data cfmPtEteSE | cfmPtPSE | cfmWtEteSE | cfmWtPSE | cfmCtEteSE * @param {object} data cfmPtEteSE | cfmPtPSE | cfmWtEteSE | cfmWtPSE | cfmCtEteSE,傳入以上任一後端接到的 Activities 列表 Data。
* @param {string} category start | end * @param {string} category 'start' | 'end',傳入 'start' 或 'end'。
* @param {string} task task * @param {string} task 已選擇的 Activity task
* @returns {array} * @returns {array}
*/ */
setStartAndEndData(data, category, task) { setStartAndEndData(data, category, task) {
@@ -227,9 +227,9 @@ export default {
}, },
/** /**
* 重新設定 Activity sequence 連動的 start and end 的 Radio Data * 重新設定 Activity sequence 連動的 start and end 的 Radio Data
* @param {object} data cfmSeqStart | cfmSeqEnd * @param {object} data cfmSeqStart | cfmSeqEnd,傳入以上任一後端接到的 Activities 列表 Data。
* @param {string} category sources | sinks * @param {string} category 'sources' | 'sinks',傳入 'sources' 或 'sinks'。
* @param {string} task task * @param {string} task 已選擇的 Activity task
* @returns {array} * @returns {array}
*/ */
setSeqStartAndEndData(data, category, task) { setSeqStartAndEndData(data, category, task) {
@@ -239,7 +239,7 @@ export default {
}, },
/** /**
* select start list's task * select start list's task
* @param {event} e * @param {event} e 觸發 input 的詳細事件
*/ */
selectStart(e) { selectStart(e) {
this.taskStart = e; this.taskStart = e;
@@ -256,7 +256,7 @@ export default {
}, },
/** /**
* select End list's task * select End list's task
* @param {event} e * @param {event} e 觸發 input 的詳細事件
*/ */
selectEnd(e) { selectEnd(e) {
this.taskEnd = e; this.taskEnd = e;
@@ -283,7 +283,7 @@ export default {
}, },
/** /**
* Radio 切換時Start & End Data 連動改變 * Radio 切換時Start & End Data 連動改變
* @param {boolean} data true | false * @param {boolean} data true | false傳入 true 或 false
*/ */
setResetData(data) { setResetData(data) {
if(data) { if(data) {

View File

@@ -84,22 +84,22 @@ export default {
methods: { methods: {
/** /**
* get min total seconds * get min total seconds
* @param {Number} e * @param {Number} e 最小值總秒數
*/ */
minTotalSeconds(e) { minTotalSeconds(e) {
this.$emit('min-total-seconds', e); this.$emit('min-total-seconds', e);
}, },
/** /**
* get min total seconds * get min total seconds
* @param {Number} e * @param {Number} e 最大值總秒數
*/ */
maxTotalSeconds(e) { maxTotalSeconds(e) {
this.$emit('max-total-seconds', e); this.$emit('max-total-seconds', e);
}, },
/** /**
* get Time Range(duration) * get Time Range(duration)
* @param {array} data API data * @param {array} data API dataActivity 列表
* @param {string} category act | single | double * @param {string} category 'act' | 'single' | 'double',傳入以上任一值。
* @param {string} task select Radio task or start * @param {string} task select Radio task or start
* @param {string} taskTwo end * @param {string} taskTwo end
* @returns {object} {min:12, max:345} * @returns {object} {min:12, max:345}

View File

@@ -12,18 +12,5 @@
export default { export default {
name: 'ResultArrow', name: 'ResultArrow',
props:['data', 'select'], props:['data', 'select'],
// data() {
// return {
// datadata: []
// }
// },
// watch: {
// data: function(newValue) {
// this.datadata = newValue;
// },
// select: function(newValue) {
// this.datadata = newValue;
// }
// }
} }
</script> </script>

View File

@@ -68,16 +68,16 @@ export default {
}, },
/** /**
* get min total seconds * get min total seconds
* @param {Number} e * @param {Number} e 元件傳來的最小值總秒數
*/ */
minTotalSeconds(e) { minTotalSeconds(e) {
this.timeRangeMin = e; this.timeRangeMin = e;
this.updateMin = e; this.updateMin = e;
this.$emit('min-total-seconds', e); this.$emit('min-total-seconds', e);
}, },
/** /**
* get min total seconds * get min total seconds
* @param {Number} e * @param {Number} e 元件傳來的最大值總秒數
*/ */
maxTotalSeconds(e) { maxTotalSeconds(e) {
this.timeRangeMax = e; this.timeRangeMax = e;

View File

@@ -160,7 +160,7 @@ export default {
methods: { methods: {
/** /**
* Number to percentage * Number to percentage
* @param {number} val * @param {number} val 原始數字
* @returns {string} 轉換完成的百分比字串 * @returns {string} 轉換完成的百分比字串
*/ */
getPercentLabel(val){ getPercentLabel(val){
@@ -169,7 +169,7 @@ export default {
}, },
/** /**
* set progress bar width * set progress bar width
* @param {number} value * @param {number} value 百分比數字
* @returns {string} 樣式的寬度設定 * @returns {string} 樣式的寬度設定
*/ */
progressWidth(value){ progressWidth(value){
@@ -177,7 +177,7 @@ export default {
}, },
/** /**
* switch case data * switch case data
* @param {number} id * @param {number} id case id
*/ */
async switchCaseData(id) { async switchCaseData(id) {
if(id == this.showTraceId) return; if(id == this.showTraceId) return;
@@ -262,7 +262,7 @@ export default {
}, },
/** /**
* 無限滾動: 監聽 scroll 有沒有滾到底部 * 無限滾動: 監聽 scroll 有沒有滾到底部
* @param {element} event * @param {element} event 監聽時回傳的事件
*/ */
handleScroll(event) { handleScroll(event) {
if(this.maxItems || this.infiniteData.length < 20 || this.infiniteFinish === false) return; if(this.maxItems || this.infiniteData.length < 20 || this.infiniteFinish === false) return;

View File

@@ -124,6 +124,7 @@ export default {
}, },
/** /**
* Element dragging started * Element dragging started
* @param {event} evt input 傳入的事件
*/ */
onStart(evt) { onStart(evt) {
const lastChild = evt.to.lastChild.lastChild; const lastChild = evt.to.lastChild.lastChild;
@@ -137,6 +138,7 @@ export default {
}, },
/** /**
* Element dragging ended * Element dragging ended
* @param {event} evt input 傳入的事件
*/ */
onEnd(evt) { onEnd(evt) {
// 顯示拖曳元素 // 顯示拖曳元素

View File

@@ -30,7 +30,6 @@
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import Search from '@/components/Search.vue'; import Search from '@/components/Search.vue';
@@ -68,6 +67,10 @@ export default {
} }
}, },
methods: { methods: {
/**
* 將選取的 row 傳到父層
* @param {event} e input 傳入的事件
*/
onRowSelect(e) { onRowSelect(e) {
this.$emit('on-row-select', e) this.$emit('on-row-select', e)
} }

View File

@@ -61,16 +61,30 @@ export default {
} }
}, },
methods: { methods: {
/**
* 選擇 Row 的行為
*/
onRowSelect() { onRowSelect() {
this.$emit('on-row-select', this.select); this.$emit('on-row-select', this.select);
}, },
/**
* 取消選取 Row 的行為
*/
onRowUnselect() { onRowUnselect() {
this.$emit('on-row-select', this.select); this.$emit('on-row-select', this.select);
}, },
/**
* 全選 Row 的行為
* @param {event} e input 傳入的事件
*/
onRowSelectAll(e) { onRowSelectAll(e) {
this.select = e.data; this.select = e.data;
this.$emit('on-row-select', this.select); this.$emit('on-row-select', this.select);
}, },
/**
* 取消全選 Row 的行為
* @param {event} e input 傳入的事件
*/
onRowUnelectAll(e) { onRowUnelectAll(e) {
this.select = null; this.select = null;
this.$emit('on-row-select', this.select) this.$emit('on-row-select', this.select)

View File

@@ -327,7 +327,7 @@ export default {
}, },
/** /**
* 選取類別型 table 的全選項 * 選取類別型 table 的全選項
* @param {event} e * @param {event} e input 傳入的事件
*/ */
onRowSelectAll(e) { onRowSelectAll(e) {
this.selectedAttRange = e.data; this.selectedAttRange = e.data;
@@ -352,7 +352,7 @@ export default {
}, },
/** /**
* 切換 Attribute Name Radio * 切換 Attribute Name Radio
* @param {event} e * @param {event} e input 傳入的事件
*/ */
switchAttNameRadio(e) { switchAttNameRadio(e) {
this.selectedAttRange = null; this.selectedAttRange = null;
@@ -401,7 +401,7 @@ export default {
}, },
/** /**
* set progress bar width * set progress bar width
* @param {number} value * @param {number} value 百分比數字
* @returns {string} 樣式的寬度設定 * @returns {string} 樣式的寬度設定
*/ */
progressWidth(value){ progressWidth(value){
@@ -409,7 +409,7 @@ export default {
}, },
/** /**
* Number to percentage * Number to percentage
* @param {number} val * @param {number} val 原始數字
* @returns {string} 轉換完成的百分比字串 * @returns {string} 轉換完成的百分比字串
*/ */
getPercentLabel(val){ getPercentLabel(val){
@@ -429,7 +429,6 @@ export default {
/** /**
* 調整左邊遮罩大小 * 調整左邊遮罩大小
* @param {object} chart 取得 chart.js 資料 * @param {object} chart 取得 chart.js 資料
* @param {number} chart 取得 chart.js 資料
*/ */
resizeLeftMask(chart, from) { resizeLeftMask(chart, from) {
const canvas = document.querySelector('#chartCanvasId canvas'); const canvas = document.querySelector('#chartCanvasId canvas');
@@ -440,7 +439,7 @@ export default {
mask.style.height = `${chart.chartArea.height}px`; mask.style.height = `${chart.chartArea.height}px`;
}, },
/** /**
* 調整邊遮罩大小 * 調整邊遮罩大小
* @param {object} chart 取得 chart.js 資料 * @param {object} chart 取得 chart.js 資料
*/ */
resizeRightMask(chart, to) { resizeRightMask(chart, to) {
@@ -453,7 +452,6 @@ export default {
}, },
/** /**
* create chart * create chart
* @param {object} valueData 選取的 Attribute包含後端原始數據的 type、key
*/ */
createChart() { createChart() {
const valueData = this.valueData; const valueData = this.valueData;

View File

@@ -54,7 +54,7 @@ export default {
}, },
methods: { methods: {
/** /**
* @param {boolean} e ture | false * @param {boolean} e ture | false可選 ture 或 false
* @param {numble} index rule's index * @param {numble} index rule's index
*/ */
isRule(e, index){ isRule(e, index){
@@ -66,6 +66,7 @@ export default {
}, },
/** /**
* header:Funnel 刪除全部的 Funnel * header:Funnel 刪除全部的 Funnel
* @param {numble|string} index rule's index 或 全部
*/ */
async deleteRule(index) { async deleteRule(index) {
if(index === 'all') { if(index === 'all') {

View File

@@ -152,6 +152,10 @@ export default{
}, },
}, },
methods: { methods: {
/**
* 調整遮罩大小
* @param {object} chart 取得 chart.js 資料
*/
resizeMask(chart) { resizeMask(chart) {
let from = (this.selectArea[0] * 0.01) / (this.selectRange * 0.01); let from = (this.selectArea[0] * 0.01) / (this.selectRange * 0.01);
let to = (this.selectArea[1] * 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); this.resizeRightMask(chart, to);
} }
}, },
/**
* 調整左邊遮罩大小
* @param {object} chart 取得 chart.js 資料
*/
resizeLeftMask(chart, from) { resizeLeftMask(chart, from) {
const canvas = document.getElementById("chartCanvasId"); const canvas = document.getElementById("chartCanvasId");
const mask = document.getElementById("chart-mask-left"); const mask = document.getElementById("chart-mask-left");
@@ -168,6 +176,10 @@ export default{
mask.style.top = `${canvas.offsetTop + chart.chartArea.top}px`; mask.style.top = `${canvas.offsetTop + chart.chartArea.top}px`;
mask.style.height = `${chart.chartArea.height}px`; mask.style.height = `${chart.chartArea.height}px`;
}, },
/**
* 調整右邊遮罩大小
* @param {object} chart 取得 chart.js 資料
*/
resizeRightMask(chart, to) { resizeRightMask(chart, to) {
const canvas = document.getElementById("chartCanvasId"); const canvas = document.getElementById("chartCanvasId");
const mask = document.getElementById("chart-mask-right"); const mask = document.getElementById("chart-mask-right");
@@ -176,6 +188,9 @@ export default{
mask.style.top = `${canvas.offsetTop + chart.chartArea.top}px`; mask.style.top = `${canvas.offsetTop + chart.chartArea.top}px`;
mask.style.height = `${chart.chartArea.height}px`; mask.style.height = `${chart.chartArea.height}px`;
}, },
/**
* create chart
*/
createChart() { createChart() {
const max = this.filterTimeframe.y_axis.max * 1.1; const max = this.filterTimeframe.y_axis.max * 1.1;
const minX = this.timeFrameData[0]?.x; const minX = this.timeFrameData[0]?.x;

View File

@@ -233,7 +233,7 @@ export default {
}, },
/** /**
* Number to percentage * Number to percentage
* @param {number} val * @param {number} val 原始數字
* @returns {string} 轉換完成的百分比字串 * @returns {string} 轉換完成的百分比字串
*/ */
getPercentLabel(val){ getPercentLabel(val){
@@ -242,7 +242,7 @@ export default {
}, },
/** /**
* set progress bar width * set progress bar width
* @param {number} value * @param {number} value 百分比數字
* @returns {string} 樣式的寬度設定 * @returns {string} 樣式的寬度設定
*/ */
progressWidth(value){ progressWidth(value){
@@ -250,7 +250,8 @@ export default {
}, },
/** /**
* switch case data * switch case data
* @param {number} id * @param {number} id case id
* @param {number} count 所有的 case 數量
*/ */
async switchCaseData(id, count) { async switchCaseData(id, count) {
// 點同一筆 id 不要有動作 // 點同一筆 id 不要有動作
@@ -317,7 +318,7 @@ export default {
}, },
/** /**
* 無限滾動: 監聽 scroll 有沒有滾到底部 * 無限滾動: 監聽 scroll 有沒有滾到底部
* @param {element} event * @param {element} event 滾動傳入的事件
*/ */
handleScroll(event) { handleScroll(event) {
if(this.infinitMaxItems || this.baseCases.length < 20 || this.infiniteFinish === false) return; if(this.infinitMaxItems || this.baseCases.length < 20 || this.infiniteFinish === false) return;

View File

@@ -300,7 +300,7 @@ export default {
}, },
/** /**
* Number to percentage * Number to percentage
* @param {number} val * @param {number} val 原始數字
* @returns {string} 轉換完成的百分比字串 * @returns {string} 轉換完成的百分比字串
*/ */
getPercentLabel(val){ getPercentLabel(val){
@@ -309,7 +309,7 @@ export default {
}, },
/** /**
* set progress bar width * set progress bar width
* @param {number} value * @param {number} value 百分比數字
* @returns {string} 樣式的寬度設定 * @returns {string} 樣式的寬度設定
*/ */
progressWidth(value){ progressWidth(value){
@@ -336,7 +336,7 @@ export default {
}, },
// 調整 filterStartData / filterEndData / filterStartToEndData / filterEndToStartData 的內容 // 調整 filterStartData / filterEndData / filterStartToEndData / filterEndToStartData 的內容
/** /**
* @param {array} array filterStartToEnd / filterEndToStart * @param {array} array filterStartToEnd / filterEndToStart,可傳入以上任一。
*/ */
setActData(array) { setActData(array) {
let list = []; let list = [];
@@ -379,7 +379,7 @@ export default {
this.selectFilterEnd = e.data; this.selectFilterEnd = e.data;
}, },
/** /**
* @param {array} e Update List Seq * @param {array} listSeq Update List Seq
*/ */
onUpdateListSeq(listSeq) { onUpdateListSeq(listSeq) {
this.listSeq = listSeq; this.listSeq = listSeq;
@@ -397,6 +397,9 @@ export default {
this.rowData = e.data; this.rowData = e.data;
} }
}, },
/**
* @param {object} e object contains selected row's data
*/
endRow(e) { endRow(e) {
this.selectFilterEndToStart = e.data; this.selectFilterEndToStart = e.data;
if(this.isEndSelected === null || this.isEndSelected === true){ 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) { reset(massage) {
// Sequence // Sequence
@@ -527,7 +530,9 @@ export default {
// 成功訊息 // 成功訊息
massage ? this.$toast.success('Filter cleared.') : null; massage ? this.$toast.success('Filter cleared.') : null;
}, },
// header:Filter 發送選取的資料 /**
* header:Filter 發送選取的資料
*/
async submit(){ async submit(){
this.isLoading = true; this.isLoading = true;
let data; let data;

View File

@@ -255,7 +255,7 @@ export default {
}, },
/** /**
* Number to percentage * Number to percentage
* @param {number} val * @param {number} val 原始數字
* @returns {string} 轉換完成的百分比字串 * @returns {string} 轉換完成的百分比字串
*/ */
getPercentLabel(val){ getPercentLabel(val){

View File

@@ -152,7 +152,7 @@ export default {
methods: { methods: {
/** /**
* Number to percentage * Number to percentage
* @param {number} val * @param {number} val 原始數字
* @returns {string} 轉換完成的百分比字串 * @returns {string} 轉換完成的百分比字串
*/ */
getPercentLabel(val){ getPercentLabel(val){
@@ -161,7 +161,7 @@ export default {
}, },
/** /**
* set progress bar width * set progress bar width
* @param {number} value * @param {number} value 百分比數字
* @returns {string} 樣式的寬度設定 * @returns {string} 樣式的寬度設定
*/ */
progressWidth(value){ progressWidth(value){
@@ -169,7 +169,8 @@ export default {
}, },
/** /**
* switch case data * switch case data
* @param {number} id * @param {number} id case id
* @param {number} count 總 case 數量
*/ */
async switchCaseData(id, count) { async switchCaseData(id, count) {
// 點同一筆 id 不要有動作 // 點同一筆 id 不要有動作
@@ -246,7 +247,7 @@ export default {
}, },
/** /**
* 無限滾動: 監聽 scroll 有沒有滾到底部 * 無限滾動: 監聽 scroll 有沒有滾到底部
* @param {element} event * @param {element} event 滾動傳入的事件
*/ */
handleScroll(event) { handleScroll(event) {
if(this.infinitMaxItems || this.cases.length < 20 || this.infiniteFinish === false) return; if(this.infinitMaxItems || this.cases.length < 20 || this.infiniteFinish === false) return;

View File

@@ -108,7 +108,7 @@ export default {
methods: { methods: {
/** /**
* switch map type * switch map type
* @param {string} type processMap | bpmn * @param {string} type 'processMap' | 'bpmn',可傳入以上任一。
*/ */
switchMapType(type) { switchMapType(type) {
this.mapType = type; this.mapType = type;
@@ -116,7 +116,7 @@ export default {
}, },
/** /**
* switch curve style * switch curve style
* @param {string} style 直角 unbundled-bezier | taxi * @param {string} style 直角 'unbundled-bezier' | 'taxi',可傳入以上任一。
*/ */
switchCurveStyles(style) { switchCurveStyles(style) {
this.curveStyle = style; this.curveStyle = style;
@@ -124,7 +124,7 @@ export default {
}, },
/** /**
* switch rank * switch rank
* @param {string} rank 直向 TB | 橫向 LR * @param {string} rank 直向 'TB' | 橫向 'LR',可傳入以上任一。
*/ */
switchRank(rank) { switchRank(rank) {
this.rank = rank; this.rank = rank;
@@ -132,8 +132,8 @@ export default {
}, },
/** /**
* switch Data Layoer Type or Option. * switch Data Layoer Type or Option.
* @param {string} e * @param {string} e 切換時傳入的選項
* @param {string} type freq | duration * @param {string} type 'freq' | 'duration',可傳入以上任一。
*/ */
switchDataLayerType(e, type){ switchDataLayerType(e, type){
let value = ''; let value = '';

View File

@@ -104,7 +104,7 @@ export default {
methods: { methods: {
/** /**
* Number to percentage * Number to percentage
* @param {number} val * @param {number} val 原始數字
* @returns {string} 轉換完成的百分比字串 * @returns {string} 轉換完成的百分比字串
*/ */
getPercentLabel(val){ getPercentLabel(val){

View File

@@ -37,6 +37,10 @@ export default {
IconUploarding, IconUploarding,
}, },
methods: { methods: {
/**
* 上傳的行為
* @param {event} event input 傳入的事件
*/
async upload(event) { async upload(event) {
const fileInput = document.getElementById('uploadFiles'); const fileInput = document.getElementById('uploadFiles');
const target = event.target; const target = event.target;

View File

@@ -48,6 +48,9 @@ export default {
IconMember IconMember
}, },
methods: { methods: {
/**
* 登出的行為
*/
logOutButton() { logOutButton() {
if ((this.$route.name === 'Map' || this.$route.name === 'CheckMap') && this.tempFilterId) { if ((this.$route.name === 'Map' || this.$route.name === 'CheckMap') && this.tempFilterId) {
// 傳給 Map通知 Sidebar 要關閉。 // 傳給 Map通知 Sidebar 要關閉。

View File

@@ -82,11 +82,11 @@ export default {
showNavbarBreadcrumb: false, showNavbarBreadcrumb: false,
navViewData: navViewData:
{ {
// FILES: ['ALL', 'DISCOVER', 'COMPARE', 'DESIGN', 'SIMULATION'], // 舉例:FILES: ['ALL', 'DISCOVER', 'COMPARE', 'DESIGN', 'SIMULATION'],
FILES: ['ALL', 'DISCOVER', 'COMPARE'], FILES: ['ALL', 'DISCOVER', 'COMPARE'],
// DISCOVER: ['MAP', 'CONFORMANCE', 'PERFORMANCE', 'DATA'] // 舉例:DISCOVER: ['MAP', 'CONFORMANCE', 'PERFORMANCE', 'DATA']
DISCOVER: ['MAP', 'CONFORMANCE', 'PERFORMANCE'], DISCOVER: ['MAP', 'CONFORMANCE', 'PERFORMANCE'],
// COMPARE: ['PROCESS MAP', 'DASHBOARD'] // 舉例:COMPARE: ['PROCESS MAP', 'DASHBOARD']
COMPARE: ['DASHBOARD'] COMPARE: ['DASHBOARD']
}, },
navViewName: 'FILES', navViewName: 'FILES',
@@ -130,6 +130,7 @@ export default {
methods: { methods: {
/** /**
* switch navbar item * switch navbar item
* @param {event} event 選取 Navbar 選項後傳入的值
*/ */
switchNavItem(event) { switchNavItem(event) {
let type; let type;

View File

@@ -148,12 +148,15 @@ export default {
}, },
}, },
methods: { methods: {
/**
* 關閉選單視窗
*/
onClose () { onClose () {
this.openTimeSelect = false; this.openTimeSelect = false;
}, },
/** /**
* get focus element * get focus element
* @param {event} event * @param {event} event input 傳入的事件
*/ */
onFocus(event) { onFocus(event) {
this.lastInput = event.target; this.lastInput = event.target;
@@ -161,7 +164,7 @@ export default {
}, },
/** /**
* when blur update input value and show number * when blur update input value and show number
* @param {event} event * @param {event} event input 傳入的事件
*/ */
onBlur(event) { onBlur(event) {
let baseInputValue = event.target.value; let baseInputValue = event.target.value;
@@ -202,7 +205,7 @@ export default {
}, },
/** /**
* 上下箭頭時的行為 * 上下箭頭時的行為
* @param {event} event * @param {event} event input 傳入的事件
*/ */
onKeyUp(event) { onKeyUp(event) {
event.target.value = event.target.value.replace(/\D/g, ''); event.target.value = event.target.value.replace(/\D/g, '');
@@ -213,9 +216,9 @@ export default {
}, },
/** /**
* 上下箭頭時的行為 * 上下箭頭時的行為
* @param {element} input * @param {element} input input 傳入的事件
* @param {number} goUp * @param {number} goUp 上箭頭的鍵盤代號
* @param {boolean} selectIt * @param {boolean} selectIt 是否已執行
*/ */
actionUpDown(input, goUp, selectIt = false) { actionUpDown(input, goUp, selectIt = false) {
const tUnit = input.dataset.tunit; const tUnit = input.dataset.tunit;
@@ -291,8 +294,8 @@ export default {
}, },
/** /**
* 設定 dhms 的數值 * 設定 dhms 的數值
* @param {number} totalSeconds * @param {number} totalSeconds 總秒數
* @param {string} size * @param {string} size 'min' | 'max',可選以上任一,最大值或最小值
*/ */
secondToDate(totalSeconds, size) { secondToDate(totalSeconds, size) {
totalSeconds = parseInt(totalSeconds); totalSeconds = parseInt(totalSeconds);

View File

@@ -1,6 +1,6 @@
/** /**
* 將數字轉換成簡寫的形式,設定 dhms 的數值 * 將數字轉換成簡寫的形式,設定 dhms 的數值
* @param {number} totalSeconds * @param {number} totalSeconds 總秒數
* @returns {string} * @returns {string}
*/ */
export default function abbreviateNumber(totalSeconds) { export default function abbreviateNumber(totalSeconds) {

View File

@@ -16,7 +16,7 @@ const customClass = {
}; };
/** /**
* Map Saved * Map Saved
* @param { function } addFilterId * @param { function } addFilterId 後端 API
*/ */
export async function saveFilter(addFilterId) { export async function saveFilter(addFilterId) {
let fileName = ''; let fileName = '';
@@ -55,7 +55,7 @@ export async function saveFilter(addFilterId) {
} }
/** /**
* Saved Success * Saved Success
* @param { string } value * @param { string } value File's name
*/ */
export async function savedSuccessfully(value) { export async function savedSuccessfully(value) {
value = value ? value : ''; value = value ? value : '';
@@ -71,10 +71,10 @@ export async function savedSuccessfully(value) {
}; };
/** /**
* leave Map page * leave Map page
* @param { function } next * @param { function } next 執行完函式後的步驟
* @param { function } addFilterId * @param { function } addFilterId 後端 API
* @param { string } toPath * @param { string } toPath route path
* @param { function } logOut * @param { function } logOut 登出函式
*/ */
export async function leaveFilter(next, addFilterId, toPath, logOut) { export async function leaveFilter(next, addFilterId, toPath, logOut) {
const allMapDataStore = AllMapDataStore(); const allMapDataStore = AllMapDataStore();
@@ -108,7 +108,7 @@ export async function leaveFilter(next, addFilterId, toPath, logOut) {
}; };
/** /**
* Conformance Saved * Conformance Saved
* @param { function } addConformanceCreateCheckId * @param { function } addConformanceCreateCheckId 後端 API
*/ */
export async function saveConformance(addConformanceCreateCheckId) { export async function saveConformance(addConformanceCreateCheckId) {
let fileName = ''; let fileName = '';
@@ -147,10 +147,10 @@ export async function saveConformance(addConformanceCreateCheckId) {
} }
/** /**
* leave Conformance page * leave Conformance page
* @param { function } next * @param { function } next 執行完函式後的步驟
* @param { function } addConformanceCreateCheckId * @param { function } addConformanceCreateCheckId 後端 API
* @param { string } toPath * @param { string } toPath route path
* @param { function } logOut * @param { function } logOut 登出函式
*/ */
export async function leaveConformance(next, addConformanceCreateCheckId, toPath, logOut) { export async function leaveConformance(next, addConformanceCreateCheckId, toPath, logOut) {
const conformanceStore = ConformanceStore(); const conformanceStore = ConformanceStore();
@@ -184,8 +184,8 @@ export async function leaveConformance(next, addConformanceCreateCheckId, toPath
}; };
/** /**
* Upload failde First * Upload failde First
* @param { string } failureType * @param { string } failureType 後端檔案錯誤類型
* @param { string } failureMsg * @param { string } failureMsg 後端檔案錯誤訊息
*/ */
export async function uploadFailedFirst(failureType, failureMsg, failureLoc) { 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' // 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 * Upload failde Second
* @param { array } detail * @param { array } detail 後端回傳的失敗訊息
*/ */
export async function uploadFailedSecond(detail) { export async function uploadFailedSecond(detail) {
let srt = ''; let srt = '';
@@ -284,7 +284,7 @@ export async function uploadFailedSecond(detail) {
}; };
/** /**
* Upload Success * Upload Success
* @param { string } value * @param { string } value File's name
*/ */
export async function uploadSuccess() { export async function uploadSuccess() {
await Swal.fire({ await Swal.fire({
@@ -298,7 +298,7 @@ export async function uploadSuccess() {
}; };
/** /**
* Confirm whether to upload the file * Confirm whether to upload the file
* @param { object } fetchData * @param { object } fetchData 後端 API POST data
*/ */
export async function uploadConfirm(fetchData) { export async function uploadConfirm(fetchData) {
const filesStore = FilesStore(); const filesStore = FilesStore();
@@ -333,10 +333,10 @@ export async function uploadloader() {
}; };
/** /**
* Rename Modal * Rename Modal
* @param { function } rename * @param { function } rename 後端 API
* @param { string } type * @param { string } type File 檔案類型
* @param { number } id * @param { number } id File ID
* @param { string } baseName * @param { string } baseName 改名前的檔名
*/ */
export async function renameModal(rename, type, id, baseName) { export async function renameModal(rename, type, id, baseName) {
let fileName = baseName; let fileName = baseName;
@@ -379,8 +379,8 @@ export async function renameModal(rename, type, id, baseName) {
/** /**
* Delete File * Delete File
* @param { string } files 有關連的檔案 * @param { string } files 有關連的檔案
* @param { string } type * @param { string } type File 檔案類型
* @param { number } id * @param { number } id File ID
* @param { string } name 原本的檔案 * @param { string } name 原本的檔案
*/ */
export async function deleteFileModal(files, type, id, name) { export async function deleteFileModal(files, type, id, name) {

View File

@@ -12,8 +12,8 @@ const delay = (s = 0) => new Promise((resolve, reject) => setTimeout(resolve, s
/** /**
* API catch error function * API catch error function
* @param {object} Error * @param {object} Error 後端 ERROR
* @param {string} toastMessage * @param {string} toastMessage Toast 的提示文字
* @returns {string} Error HTTP Status * @returns {string} Error HTTP Status
*/ */
export default async function apiError(error, toastMessage) { export default async function apiError(error, toastMessage) {

View File

@@ -8,7 +8,7 @@ import { getTimeLabel } from '@/module/timeLabel.js'; // 時間格式轉換器
cytoscape.use( dagre ); cytoscape.use( dagre );
/** /**
* @param {object} mapData processMapData | bpmnData * @param {object} mapData processMapData | bpmnData,可選以上任一。
* mapData:{ * mapData:{
* startId: 0, * startId: 0,
* endId: 1, * endId: 1,

View File

@@ -18,7 +18,7 @@ cytoscape.use( dagre );
* width: number * width: number
* } * }
* @param {array} edges it's similar to nodes * @param {array} edges it's similar to nodes
* @param {string} graphId * @param {string} graphId graph Id
*/ */
export default function cytoscapeMapTrace(nodes, edges, graphId) { export default function cytoscapeMapTrace(nodes, edges, graphId) {
// create Cytoscape // create Cytoscape

View File

@@ -1,7 +1,7 @@
/** /**
* 將數字轉換成帶有逗號格式(ex: 1000 -> 1,000) * 將數字轉換成帶有逗號格式(ex: 1000 -> 1,000)
* 也可以改用原生 JS 方法 `.toLocaleString('en-US')` * 也可以改用原生 JS 方法 `.toLocaleString('en-US')`
* @param {number} num * @param {number} num 數字
* @returns * @returns
*/ */
export default function numberLabel(num) { export default function numberLabel(num) {

View File

@@ -153,8 +153,8 @@ export function getXIndex(data, xValue) {
return closestIndex; return closestIndex;
}; };
/** /**
* * 有 dhms 表達的時間單位
* @param {number} seconds * @param {number} seconds 總秒數
* @returns {string} * @returns {string}
*/ */
export function formatTime(seconds) { export function formatTime(seconds) {
@@ -180,8 +180,8 @@ export function formatTime(seconds) {
} else return null; } else return null;
} }
/** /**
* * 只顯示最大的兩個單位
* @param {array} times * @param {array} times 時間
* @returns {array} * @returns {array}
*/ */
export function formatMaxTwo(times) { export function formatMaxTwo(times) {

View File

@@ -1,6 +1,6 @@
/** /**
* 數量單位轉換,輸出 k m b t 數值。 * 數量單位轉換,輸出 k m b t 數值。
* @param {number} number * @param {number} number 總秒數
* @returns {string} * @returns {string}
*/ */
export default function shortScaleNumber(number) { export default function shortScaleNumber(number) {

View File

@@ -1,6 +1,6 @@
/** /**
* 數字、英文、中文,排序 * 數字、英文、中文,排序
* @param {array} data * @param {array} data List
* @returns * @returns
*/ */
export function sortNumEngZhtw(data) { export function sortNumEngZhtw(data) {

View File

@@ -2,7 +2,7 @@ import moment from 'moment';
/** /**
* 將秒數轉換成帶有時間單位的格式 * 將秒數轉換成帶有時間單位的格式
* @param {number} second * @param {number} second 總秒數
* @param {number} fixedNumber 小數點後幾位 * @param {number} fixedNumber 小數點後幾位
* @returns {string} 轉換完的格式(ex: 1 day, 6.8 hrs) * @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 小數點後幾位 * @param {number} fixedNumber 小數點後幾位
* @returns {string} 轉換完的格式(ex: 1 d, 6.8 h) * @returns {string} 轉換完的格式(ex: 1 d, 6.8 h)
*/ */

View File

@@ -57,28 +57,28 @@ const routes = [
name: "Discover", name: "Discover",
children: [ children: [
{ {
// type: log | filter // type: log | filter,參數會有以上任一。
// fileId: log_id | filter_id // fileId: log_id | filter_id,參數會有以上任一。
path: "/discover/:type/:fileId/map", path: "/discover/:type/:fileId/map",
name: "Map", name: "Map",
component: Map, component: Map,
}, },
{ {
// type: log | filter // type: log | filter,參數會有以上任一。
// fileId: log_id | filter_id // fileId: log_id | filter_id,參數會有以上任一。
path: "/discover/:type/:fileId/conformance", path: "/discover/:type/:fileId/conformance",
name: "Conformance", name: "Conformance",
component: Conformance, component: Conformance,
}, },
{ {
// type: log | filter // type: log | filter,參數會有以上任一。
// fileId: log_id | filter_id // fileId: log_id | filter_id,參數會有以上任一。
path: "/discover/:type/:fileId/performance", path: "/discover/:type/:fileId/performance",
name: "Performance", name: "Performance",
component: Performance, component: Performance,
}, },
{ {
// type: log | filter // type: log | filter,參數會有以上任一。
// fileId: check_id透過 `/log-checks/{check_id}` 取得 parent data // fileId: check_id透過 `/log-checks/{check_id}` 取得 parent data
path: "/discover/conformance/:type/:fileId/map", path: "/discover/conformance/:type/:fileId/map",
name: "CheckMap", name: "CheckMap",
@@ -88,7 +88,7 @@ const routes = [
} }
}, },
{ {
// type: log | filter // type: log | filter,參數會有以上任一。
// fileId: check_id透過 `/log-checks/{check_id}` 取得 parent data // fileId: check_id透過 `/log-checks/{check_id}` 取得 parent data
path: "/discover/conformance/:type/:fileId/conformance", path: "/discover/conformance/:type/:fileId/conformance",
name: "CheckConformance", name: "CheckConformance",
@@ -98,7 +98,7 @@ const routes = [
} }
}, },
{ {
// type: log | filter // type: log | filter,參數會有以上任一。
// fileId: check_id透過 `/log-checks/{check_id}` 取得 parent data // fileId: check_id透過 `/log-checks/{check_id}` 取得 parent data
path: "/discover/conformance/:type/:fileId/performance", path: "/discover/conformance/:type/:fileId/performance",
name: "CheckPerformance", name: "CheckPerformance",

View File

@@ -306,6 +306,7 @@ export default defineStore('allMapDataStore', {
}, },
/** /**
* Add a New Filter * Add a New Filter
* @param {string} value file's name
*/ */
async addFilterId(value) { async addFilterId(value) {
let logId = this.logId; let logId = this.logId;
@@ -325,6 +326,7 @@ export default defineStore('allMapDataStore', {
}, },
/** /**
* Get Filter Detail * Get Filter Detail
* @param {namber} createfilterId filter type ID
*/ */
async fetchFunnel(createfilterId) { async fetchFunnel(createfilterId) {
const api = `/api/filters/${createfilterId}`; const api = `/api/filters/${createfilterId}`;

View File

@@ -29,6 +29,8 @@ export default defineStore('compareStore', {
}, },
/** /**
* fetch discover api, get stats. * fetch discover api, get stats.
* @param {string} type 'log' | 'filter',可傳入 'log' 或 'filter'
* @param {number} id log or filter ID
*/ */
async getStateData(type, id) { async getStateData(type, id) {
let api = ''; let api = '';
@@ -51,6 +53,7 @@ export default defineStore('compareStore', {
}, },
/** /**
* Get file's name * Get file's name
* @param {number} id log or filter ID
*/ */
async getFileName(id) { async getFileName(id) {
id = Number(id) id = Number(id)

View File

@@ -210,6 +210,7 @@ export default defineStore('conformanceStore', {
}, },
/** /**
* Creates a new temporary check for a log. * Creates a new temporary check for a log.
* @param {object} data 送給後端的 data
*/ */
async addConformanceCheckId(data) { async addConformanceCheckId(data) {
let logId = this.conformanceLogId; let logId = this.conformanceLogId;
@@ -254,6 +255,7 @@ export default defineStore('conformanceStore', {
}, },
/** /**
* Get the detail of a temporary log conformance issue. * Get the detail of a temporary log conformance issue.
* @param {number} issueNo Issues 編號
*/ */
async getConformanceIssue(issueNo) { async getConformanceIssue(issueNo) {
let logTempCheckId = this.conformanceLogTempCheckId; let logTempCheckId = this.conformanceLogTempCheckId;
@@ -277,6 +279,9 @@ export default defineStore('conformanceStore', {
}, },
/** /**
* Get the Trace Details of a Temporary Log Conformance lssue. * 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) { async getConformanceTraceDetail(issueNo, traceId, start) {
let logTempCheckId = this.conformanceLogTempCheckId; let logTempCheckId = this.conformanceLogTempCheckId;
@@ -303,6 +308,7 @@ export default defineStore('conformanceStore', {
}, },
/** /**
* Get the Details of a Temporary Log Conformance Loop. * Get the Details of a Temporary Log Conformance Loop.
* @param {number} loopNo loop 編號
*/ */
async getConformanceLoop(loopNo) { async getConformanceLoop(loopNo) {
let logTempCheckId = this.conformanceLogTempCheckId; let logTempCheckId = this.conformanceLogTempCheckId;
@@ -326,6 +332,9 @@ export default defineStore('conformanceStore', {
}, },
/** /**
* Get the Trace Details of a Temporary Log Conformance Loops. * 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) { async getConformanceLoopsTraceDetail(loopNo, traceId, start) {
let logTempCheckId = this.conformanceLogTempCheckId; let logTempCheckId = this.conformanceLogTempCheckId;
@@ -352,6 +361,7 @@ export default defineStore('conformanceStore', {
}, },
/** /**
* Add a New Log Conformance Check, Save the log file. * Add a New Log Conformance Check, Save the log file.
* @param {string} value file's name
*/ */
async addConformanceCreateCheckId(value) { async addConformanceCreateCheckId(value) {
let logId = this.conformanceLogId; let logId = this.conformanceLogId;

View File

@@ -109,7 +109,7 @@ export default defineStore('filesStore', {
}, },
/** /**
* Uploads a CSV log file. 第一階段上傳 * Uploads a CSV log file. 第一階段上傳
* @param {Object} fromData * @param {Object} fromData 傳給後端的 Data
*/ */
async upload(fromData) { async upload(fromData) {
const api = '/api/logs/csv-uploads'; const api = '/api/logs/csv-uploads';
@@ -156,7 +156,7 @@ export default defineStore('filesStore', {
}, },
/** /**
* Add a Log from an Uploaded CSV Log File. 第二階段上傳 * Add a Log from an Uploaded CSV Log File. 第二階段上傳
* @param {Object} data * @param {Object} data 傳給後端的 Data
*/ */
async uploadLog(data) { async uploadLog(data) {
const uploadId = this.uploadId; const uploadId = this.uploadId;
@@ -184,9 +184,9 @@ export default defineStore('filesStore', {
}, },
/** /**
* Rename a Log * Rename a Log
* @param { string } type log | filter | log-check | filter-check * @param { string } type log | filter | log-check | filter-check,傳入以上任一個。
* @param { number } id * @param { number } id 檔案 ID
* @param { string } name * @param { string } name file's name
*/ */
async rename(type, id, fileName) { async rename(type, id, fileName) {
// 先判斷有沒有 uploadLogId有就設定 id 和 type再判斷檔案型別。 // 先判斷有沒有 uploadLogId有就設定 id 和 type再判斷檔案型別。
@@ -224,7 +224,7 @@ export default defineStore('filesStore', {
/** /**
* Get the Dependents of the files * Get the Dependents of the files
* @param { string } type log | filter | log-check | filter-check * @param { string } type log | filter | log-check | filter-check
* @param { number } id * @param { number } id 檔案 ID
*/ */
async getDependents(type, id) { async getDependents(type, id) {
let api; let api;
@@ -253,7 +253,7 @@ export default defineStore('filesStore', {
/** /**
* Delete file * Delete file
* @param { string } type log | filter | log-check | filter-check * @param { string } type log | filter | log-check | filter-check
* @param { number } id * @param { number } id 檔案 ID
*/ */
async deleteFile(type, id) { async deleteFile(type, id) {
let api; let api;
@@ -288,6 +288,7 @@ export default defineStore('filesStore', {
}, },
/** /**
* Remove a Deletion Record真刪除被 Admin 或被其他帳號刪除的檔案 * Remove a Deletion Record真刪除被 Admin 或被其他帳號刪除的檔案
* @param {number} id 檔案 ID
*/ */
async deletionRecord(id) { async deletionRecord(id) {
let api = ''; let api = '';
@@ -305,8 +306,8 @@ export default defineStore('filesStore', {
/** /**
* Download file as CSV * Download file as CSV
* @param { string } type log | filter | log-check | filter-check * @param { string } type log | filter | log-check | filter-check
* @param { number } id * @param { number } id 檔案 ID
* @param { string } fileName * @param { string } fileName file's name
*/ */
async downloadFileCSV(type, id, fileName) { async downloadFileCSV(type, id, fileName) {
let api; let api;

View File

@@ -44,7 +44,7 @@ export default defineStore('loginStore', {
}; };
}, },
/** /**
* Refresh Token * Refresh Token (暫時沒做)
*/ */
async refreshTokenLogin() { async refreshTokenLogin() {
const api = '/api/oauth/token'; const api = '/api/oauth/token';

View File

@@ -13,6 +13,8 @@ export default defineStore('performanceStore', {
actions: { actions: {
/** /**
* Get Performance * Get Performance
* @param {string} type 'log' | 'filter',可傳入以上任一。
* @param {*} id 檔案 ID
*/ */
async getPerformance(type, id) { async getPerformance(type, id) {
let api = ''; let api = '';

View File

@@ -216,8 +216,8 @@ export default {
/** /**
* 建立折線圖 * 建立折線圖
* @param { object } chartData chart data * @param { object } chartData chart data
* @param { object } content titels * @param { object } content titels 標題文字
* @param { string } yUnit y 軸單位 date | count * @param { string } yUnit y 軸單位 'date' | 'count',可傳入以上任一。
*/ */
getLineChart(chartData, content, yUnit) { getLineChart(chartData, content, yUnit) {
let datasetsPrimary; let datasetsPrimary;
@@ -391,7 +391,7 @@ export default {
/** /**
* 建立長條圖 * 建立長條圖
* @param { object } chartData chart data * @param { object } chartData chart data
* @param { object } content titels * @param { object } content titels 文字標題
*/ */
getBarChart(chartData, content) { getBarChart(chartData, content) {
const maxX = chartData.x_axis.max; const maxX = chartData.x_axis.max;
@@ -540,9 +540,9 @@ export default {
/** /**
* 建立水平長條圖 * 建立水平長條圖
* @param { object } chartData chart data * @param { object } chartData chart data
* @param { object } content titels * @param { object } content titels 標題的文字
* @param { boolean } isSingle 單個或雙數 activity * @param { boolean } isSingle 單個或雙數 activity
* @param { string } xUnit x 軸單位 date | count * @param { string } xUnit x 軸單位 'date' | 'count',可傳入以上任一。
*/ */
getHorizontalBarChart(chartData, content, isSingle, xUnit) { getHorizontalBarChart(chartData, content, isSingle, xUnit) {
const maxY = chartData.y_axis.max; const maxY = chartData.y_axis.max;

View File

@@ -176,7 +176,7 @@ export default {
methods: { methods: {
/** /**
* switch map type * switch map type
* @param {string} type processMap | bpmn * @param {string} type 'processMap' | 'bpmn',可傳入以上任一。
*/ */
switchMapType(type) { switchMapType(type) {
this.mapType = type; this.mapType = type;
@@ -184,7 +184,7 @@ export default {
}, },
/** /**
* switch curve style * switch curve style
* @param {string} style 直角 unbundled-bezier | taxi * @param {string} style 直角 'unbundled-bezier' | 'taxi',可傳入以上任一。
*/ */
switchCurveStyles(style) { switchCurveStyles(style) {
this.curveStyle = style; this.curveStyle = style;
@@ -192,7 +192,7 @@ export default {
}, },
/** /**
* switch rank * switch rank
* @param {string} rank 直向 TB | 橫向 LR * @param {string} rank 直向 'TB' | 橫向 'LR',可傳入以上任一。
*/ */
switchRank(rank) { switchRank(rank) {
this.rank = rank; this.rank = rank;
@@ -200,8 +200,8 @@ export default {
}, },
/** /**
* switch Data Layoer Type or Option. * switch Data Layoer Type or Option.
* @param {string} e
* @param {string} type freq | duration * @param {string} type freq | duration
* @param {string} option 下拉選單中的選項
*/ */
switchDataLayerType(type, option){ switchDataLayerType(type, option){
this.dataLayerType = type; this.dataLayerType = type;
@@ -210,7 +210,7 @@ export default {
}, },
/** /**
* switch trace id and data * switch trace id and data
* @param {string} id * @param {event} e input 傳入的事件
*/ */
async switchTraceId(e) { async switchTraceId(e) {
if(e.id == this.traceId) return; if(e.id == this.traceId) return;
@@ -223,7 +223,7 @@ export default {
}, },
/** /**
* 將 element nodes 資料彙整 * 將 element nodes 資料彙整
* @param {object} type processMapData | bpmnData * @param {object} type 'processMapData' | 'bpmnData',可傳入以上任一。
*/ */
setNodesData(mapData) { setNodesData(mapData) {
let mapType = this.mapType; let mapType = this.mapType;
@@ -315,7 +315,7 @@ export default {
}, },
/** /**
* 將 element edges 資料彙整 * 將 element edges 資料彙整
* @param {object} type processMapData | bpmnData * @param {object} type 'processMapData' | 'bpmnData',可傳入以上任一。
*/ */
setEdgesData(mapData) { setEdgesData(mapData) {
let mapType = this.mapType; let mapType = this.mapType;
@@ -346,7 +346,7 @@ export default {
}, },
/** /**
* create cytoscape's map * create cytoscape's map
* @param {string} type this.mapType processMap | bpmn * @param {string} type this.mapType 'processMap' | 'bpmn',可傳入以上任一。
*/ */
createCy(type) { createCy(type) {
let graphId = document.getElementById('cy'); let graphId = document.getElementById('cy');

View File

@@ -213,8 +213,8 @@ export default {
/** /**
* 建立折線圖 * 建立折線圖
* @param { object } chartData chart data * @param { object } chartData chart data
* @param { object } content titels * @param { object } content titels 標題文字
* @param { string } yUnit y 軸單位 date | count * @param { string } yUnit y 軸單位 'date' | 'count'
*/ */
getLineChart(chartData, content, yUnit) { getLineChart(chartData, content, yUnit) {
let datasets; let datasets;
@@ -357,7 +357,7 @@ export default {
/** /**
* 建立長條圖 * 建立長條圖
* @param { object } chartData chart data * @param { object } chartData chart data
* @param { object } content titels * @param { object } content titels 標題文字
*/ */
getBarChart(chartData, content) { getBarChart(chartData, content) {
const maxX = chartData.x_axis.max; const maxX = chartData.x_axis.max;
@@ -471,9 +471,9 @@ export default {
/** /**
* 建立水平長條圖 * 建立水平長條圖
* @param { object } chartData chart data * @param { object } chartData chart data
* @param { object } content titels * @param { object } content titels 標題文字
* @param { boolean } isSingle 單個或雙數 activity * @param { boolean } isSingle 單個或雙數 activity
* @param { string } xUnit x 軸單位 date | count * @param { string } xUnit x 軸單位 'date' | 'count',可傳入以上任一。
*/ */
getHorizontalBarChart(chartData, content, isSingle, xUnit) { getHorizontalBarChart(chartData, content, isSingle, xUnit) {
const maxY = chartData.y_axis.max; const maxY = chartData.y_axis.max;

View File

@@ -369,7 +369,7 @@
}, },
/** /**
* 選擇該 files 進入 Discover/Compare/Design 頁面 * 選擇該 files 進入 Discover/Compare/Design 頁面
* @param {object} file * @param {object} file 該 file 的詳細資料
*/ */
enterDiscover(file){ enterDiscover(file){
let type; let type;
@@ -409,8 +409,8 @@
}, },
/** /**
* Right Click DOM Event * Right Click DOM Event
* @param {event} event * @param {event} event 該 file 的詳細資料
* @param {string} file * @param {string} file file's name
*/ */
onRightClick(event, file) { onRightClick(event, file) {
this.selectedType = file.type; this.selectedType = file.type;
@@ -420,7 +420,7 @@
}, },
/** /**
* Right Click Table DOM Event * Right Click Table DOM Event
* @param {event} event * @param {event} event 該 file 的詳細資料
*/ */
onRightClickTable(event) { onRightClickTable(event) {
this.selectedType = event.data.type; this.selectedType = event.data.type;
@@ -430,8 +430,8 @@
}, },
/** /**
* Right Click Gride Card DOM Event * Right Click Gride Card DOM Event
* @param {event} event * @param {event} event 該 file 的詳細資料
* @param {number} index * @param {number} index 該 file 的 index
*/ */
onGridCardClick(file, index) { onGridCardClick(file, index) {
this.selectedType = file.type; this.selectedType = file.type;
@@ -441,10 +441,10 @@
}, },
/** /**
* File's Rename * File's Rename
* @param {string} type * @param {string} type 該檔案的 type
* @param {number} id * @param {number} id 該檔案的 id
* @param {string} source hover icon * @param {string} source hover icon 該檔案的 icon
* @param {string} fileName * @param {string} fileName file's name
*/ */
rename(type, id, source, fileName) { rename(type, id, source, fileName) {
if(type && id && source === 'list-hover') { if(type && id && source === 'list-hover') {
@@ -456,9 +456,9 @@
}, },
/** /**
* Delete file * Delete file
* @param {string} type * @param {string} type 該檔案的 type
* @param {number} id * @param {number} id 該檔案的 id
* @param {string} source hover icon * @param {string} source hover icon 該檔案的 icon
*/ */
async deleteFile(type, id, name, source) { async deleteFile(type, id, name, source) {
let srt = ''; let srt = '';
@@ -516,9 +516,9 @@
}, },
/** /**
* Download file as CSV * Download file as CSV
* @param {string} type * @param {string} type 該檔案的 type
* @param {number} id * @param {number} id 該檔案的 id
* @param {string} source hover icon * @param {string} source hover icon 該檔案的 icon
*/ */
download(type, id, source, name) { download(type, id, source, name) {
if(type && id && source === 'list-hover' && name) { if(type && id && source === 'list-hover' && name) {
@@ -555,7 +555,7 @@
this.$router.push({name: 'CompareDashboard', params: params}); this.$router.push({name: 'CompareDashboard', params: params});
}, },
/** /**
* * Grid 模板時的篩選器
* @param {event} event choose columnType item * @param {event} event choose columnType item
*/ */
getGridSortData(event) { getGridSortData(event) {

View File

@@ -85,6 +85,7 @@ export default {
methods: { methods: {
/** /**
* when input onChange value , isInvalid === false. * when input onChange value , isInvalid === false.
* @param {event} event input 傳入的事件
*/ */
changeHandler(event) { changeHandler(event) {
let inputValue = event.target.value; let inputValue = event.target.value;

View File

@@ -25,8 +25,6 @@ export default {
getUserData, getUserData,
} }
}, },
methods: {
},
mounted() { mounted() {
this.getUserData(); this.getUserData();
} }

View File

@@ -143,7 +143,7 @@ export default {
uploadConfirm, uploadConfirm,
/** /**
* Rename 離開 input 的行為 * Rename 離開 input 的行為
* @param {Event} e * @param {Event} e input 傳入的事件
*/ */
onBlur(e) { onBlur(e) {
const baseWidth = 20; const baseWidth = 20;
@@ -160,7 +160,7 @@ export default {
}, },
/** /**
* Rename 輸入 input 的行為 * Rename 輸入 input 的行為
* @param {Event} e * @param {Event} e input 傳入的事件
*/ */
onInput(e) { onInput(e) {
const baseWidth = 20; const baseWidth = 20;
@@ -170,8 +170,8 @@ export default {
}, },
/** /**
* input 寬度隨著 value 響應式改變 * input 寬度隨著 value 響應式改變
* @param {String} text * @param {String} text file's name
* @param {Event} e * @param {Event} e input 傳入的事件
*/ */
getTextWidth(text, e) { getTextWidth(text, e) {
// 替換空格為不斷行的空格 // 替換空格為不斷行的空格
@@ -190,7 +190,7 @@ export default {
}, },
/** /**
* 驗證,根據新的 selectedColumns 更新 informData 和 repeatedData * 驗證,根據新的 selectedColumns 更新 informData 和 repeatedData
* @param {Array} data * @param {Array} data 已選擇的 type 的 data
*/ */
updateValidationData(data) { updateValidationData(data) {
const nameOccurrences = {}; const nameOccurrences = {};