Issue #68: Second point done.

This commit is contained in:
chiayin
2023-09-27 10:17:50 +08:00
parent 442a7168b6
commit 7617af8159
2 changed files with 5 additions and 11 deletions

View File

@@ -580,7 +580,7 @@ export default {
task_seq: this.selectCfmSeqDirectly,
};
this.isSubmitReset();
this.isSubmitCfmSeqDirectly = this.selectCfmSeqDirectly;
this.isSubmitCfmSeqDirectly = JSON.parse(JSON.stringify(this.selectCfmSeqDirectly));
break;
case 'Eventually follows':
data = {
@@ -588,7 +588,7 @@ export default {
task_seq: this.selectCfmSeqEventually,
};
this.isSubmitReset();
this.isSubmitCfmSeqEventually = this.selectCfmSeqEventually;
this.isSubmitCfmSeqEventually = JSON.parse(JSON.stringify(this.selectCfmSeqEventually));
break;
case 'Short loop(s)':
data = {

View File

@@ -22,7 +22,7 @@
</div>
<!-- Have Data -->
<div class="m-auto w-full h-[calc(100%_-_56px)]">
<div class="w-full h-full overflow-y-auto overflow-x-auto scrollbar px-4 text-center listSequence">
<div class="w-full h-full overflow-y-auto overflow-x-auto scrollbar px-4 text-center">
<draggable class="h-full" :group="{name: 'activity', pull: true, put: true }" :list="listSequence" itemKey="name" animation="300" :forceFallback="true" :dragClass="'dragSelected'" :fallbackTolerance="5" @start="onStart" @end="onEnd" :component-data="getComponentData()">
<template #item="{ element, index }">
<div>
@@ -64,10 +64,6 @@ export default {
},
},
methods: {
getIsSelect(element = 'a') {
let result = this.listSequence.includes(element);
return result
},
/**
* double click Activity List
* @param {number} index data item index
@@ -131,14 +127,12 @@ export default {
},
},
created() {
let newlist = JSON.parse(JSON.stringify(this.listSeq));
this.isSubmit ? this.listSequence = newlist : this.listSequence = [];
this.$emitter.on('reset', (data) => {
this.listSequence = [];
});
},
mounted() {
let newlist = JSON.parse(JSON.stringify(this.listSeq));
this.isSubmit ? this.listSequence = newlist : this.listSequence = [];
},
}
</script>
<style scoped>