BPMN view: remove radio buttons

This commit is contained in:
Cindy Chang
2024-08-27 11:05:07 +08:00
parent 09237a0759
commit b72d87fb52
4 changed files with 33 additions and 60 deletions

View File

@@ -201,7 +201,8 @@
<input type="radio" name="customRadio" :value="key2" v-model="clickedPathListIndex"
class="hidden peer" @click="onPathOptionClick(key2)"
/>
<span @click="onPathOptionClick(key2)"
<!-- 若為BPMN檢視模式則不允許點亮路徑 -->
<span v-if="!isBPMNOn" @click="onPathOptionClick(key2)"
:class="[
'w-[18px] h-[18px] rounded-full border-2 inline-flex items-center justify-center cursor-pointer bg-[#FFFFFF]',
clickedPathListIndex === key2
@@ -272,19 +273,29 @@ export default {
const activeTrace = ref(0);
const currentMapFile = computed(() => pageAdmin.currentMapFile);
const clickedPathListIndex = ref(undefined);
const isBPMNOn = computed(() => mapPathStore.isBPMNOn);
const onActiveTraceClick = (clickedActiveTraceIndex) => {
if(isBPMNOn.value) {
return;
}
mapPathStore.clearAllHighlight();
activeTrace.value = clickedActiveTraceIndex;
mapPathStore.highlightClickedPath(clickedActiveTraceIndex, clickedPathListIndex.value);
}
const onPathOptionClick = (clickedPath) => {
if(isBPMNOn.value) {
return;
}
clickedPathListIndex.value = clickedPath;
mapPathStore.highlightClickedPath(activeTrace.value, clickedPathListIndex.value);
};
const onResetTraceBtnClick = () => {
if(isBPMNOn.value) {
return;
}
clickedPathListIndex.value = undefined;
}
@@ -297,6 +308,7 @@ export default {
onActiveTraceClick,
onResetTraceBtnClick,
activeTrace,
isBPMNOn,
i18next,
};
},