Merge remote-tracking branch 'origin/10-test' into dev/file_modal
This commit is contained in:
@@ -4,13 +4,28 @@
|
||||
<va-card-content>
|
||||
<va-select
|
||||
v-model="simpleSelectModel"
|
||||
:label="'Filter'"
|
||||
:label="'Filter Mode'"
|
||||
text-by="description"
|
||||
track-by="id"
|
||||
:options="simpleOptions"
|
||||
/>
|
||||
<va-card-content>
|
||||
<div v-if="simpleSelectModel.id === 1">
|
||||
<va-slider v-model="VTModeModel" label="percentage(%)" track-label-visible :min="0" :max="50" />
|
||||
</div>
|
||||
<div v-else-if="simpleSelectModel.id === 2">
|
||||
<va-slider v-model="slopModeModel" label="1D window" track-label-visible :min="1" :max="50" />
|
||||
</div>
|
||||
<div v-else></div>
|
||||
<div>
|
||||
<p>{{ channel.xAxis }}</p>
|
||||
<p>{{ channel.yAxis }}</p>
|
||||
<p>{{ fileView.filesSelected }}</p>
|
||||
</div>
|
||||
</va-card-content>
|
||||
|
||||
<va-button class="mt-2" @click="filterData">Start</va-button>
|
||||
<!-- <div v-if="simpleSelectModel.id === 1">
|
||||
<!-- <div v-if="simpleSelectModel.id === 1">
|
||||
<va-button>test</va-button>
|
||||
<va-input></va-input>
|
||||
</div> -->
|
||||
@@ -19,20 +34,26 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { useChannelStore } from '@/stores/data-analysis/channel'
|
||||
import { useFileViewStore } from '@/stores/data-analysis/file-view'
|
||||
import { ref } from 'vue'
|
||||
|
||||
export default {
|
||||
emits: ['filter-data'],
|
||||
setup(props, { emit }) {
|
||||
const channel = useChannelStore()
|
||||
const fileView = useFileViewStore()
|
||||
const VTModeModel = ref(10)
|
||||
const slopModeModel = ref(20)
|
||||
const simpleSelectModel = ref({})
|
||||
const simpleOptions = ref([
|
||||
{
|
||||
id: 1,
|
||||
description: 'First option',
|
||||
description: 'V-T Mode',
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
description: 'Second option',
|
||||
description: '1st Order Differential',
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
@@ -40,10 +61,24 @@
|
||||
},
|
||||
])
|
||||
const filterData = function () {
|
||||
emit('filter-data')
|
||||
console.log(VTModeModel.value)
|
||||
// switch(simpleSelectModel.value.id) {
|
||||
// case 1:
|
||||
// const return_data = { mode: 1, data_id: 166, data: { persentage: 0 } };
|
||||
// case 2:
|
||||
// const return_data = { mode: 2, data_id: 166, data: { persentage: 0 } };
|
||||
// default:
|
||||
// }
|
||||
// console.log(return_data)
|
||||
emit('filter-data', {
|
||||
mode: simpleSelectModel.value.id,
|
||||
data_id: fileView.filesSelected,
|
||||
data_channel: [channel.xAxis.id, channel.yAxis.id],
|
||||
data: { persentage: VTModeModel.value, window: slopModeModel.value },
|
||||
})
|
||||
}
|
||||
|
||||
return { props, simpleSelectModel, simpleOptions, filterData }
|
||||
return { channel, fileView, props, simpleSelectModel, simpleOptions, VTModeModel, slopModeModel, filterData }
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user