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

View File

@@ -22,7 +22,7 @@
</div> </div>
<!-- Have Data --> <!-- Have Data -->
<div class="m-auto w-full h-[calc(100%_-_56px)]"> <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()"> <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 }"> <template #item="{ element, index }">
<div> <div>
@@ -64,10 +64,6 @@ export default {
}, },
}, },
methods: { methods: {
getIsSelect(element = 'a') {
let result = this.listSequence.includes(element);
return result
},
/** /**
* double click Activity List * double click Activity List
* @param {number} index data item index * @param {number} index data item index
@@ -131,14 +127,12 @@ export default {
}, },
}, },
created() { created() {
let newlist = JSON.parse(JSON.stringify(this.listSeq));
this.isSubmit ? this.listSequence = newlist : this.listSequence = [];
this.$emitter.on('reset', (data) => { this.$emitter.on('reset', (data) => {
this.listSequence = []; this.listSequence = [];
}); });
}, },
mounted() {
let newlist = JSON.parse(JSON.stringify(this.listSeq));
this.isSubmit ? this.listSequence = newlist : this.listSequence = [];
},
} }
</script> </script>
<style scoped> <style scoped>