|
@@ -1,22 +1,32 @@
|
|
|
<template>
|
|
|
<div class="row items-baseline">
|
|
|
- <div class="col-xs-12 col-sm-auto text-weight-bold text-center q-px-md q-py-sm">
|
|
|
- <div :style="flexRowTitleStyle">
|
|
|
- Host media
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="col-xs-grow col-sm">
|
|
|
- <div class="row justify-xs-center justify-sm-start items-center">
|
|
|
-
|
|
|
- <div class="col-auto" ><input-with-units
|
|
|
- v-model:input-result="hostIndex"
|
|
|
- v-model:is-showing-help="isShowingHelpForInputWithUnits"
|
|
|
- :initial-expression="hostIndex.toString()"
|
|
|
- title="Re(n)"
|
|
|
- units=""
|
|
|
- /></div>
|
|
|
-
|
|
|
- </div>
|
|
|
+ <div class="col-xs-grow col-sm-auto q-px-sm">
|
|
|
+ <q-table
|
|
|
+ title="Activated materials"
|
|
|
+ title-class="text-h6"
|
|
|
+ :rows="rowsQ"
|
|
|
+ :columns="columnsQ"
|
|
|
+ hide-bottom
|
|
|
+ dense
|
|
|
+ flat
|
|
|
+ row-key="name"
|
|
|
+ >
|
|
|
+ <template #body="props">
|
|
|
+ <q-tr :props="props">
|
|
|
+ <q-th key="name" :props="props">
|
|
|
+ {{ props.row.name }}
|
|
|
+ </q-th>
|
|
|
+ <template v-for="(val, index) in props.row" :key="index" :props="props">
|
|
|
+ <q-td v-if="index!='name'">
|
|
|
+ <q-checkbox
|
|
|
+ v-model="props.row[index]"
|
|
|
+ dense
|
|
|
+ />
|
|
|
+ </q-td>
|
|
|
+ </template>
|
|
|
+ </q-tr>
|
|
|
+ </template>
|
|
|
+ </q-table>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -27,28 +37,27 @@ import {
|
|
|
computed,
|
|
|
} from 'vue'
|
|
|
import { useStore } from 'src/store'
|
|
|
-import InputWithUnits from 'components/InputWithUnits.vue'
|
|
|
-import { flexRowTitleStyle } from 'components/config'
|
|
|
|
|
|
export default defineComponent({
|
|
|
|
|
|
- name: 'GetHostIndex',
|
|
|
- components: {InputWithUnits,},
|
|
|
+ name: 'MaterialsSelector',
|
|
|
+ components: {},
|
|
|
|
|
|
setup() {
|
|
|
const $store = useStore()
|
|
|
|
|
|
- const isShowingHelpForInputWithUnits = computed({
|
|
|
- get: () => $store.state.guiRuntime.isShowingHelpForInputWithUnits,
|
|
|
- set: val => $store.commit('guiRuntime/setIsShowingHelpForInputWithUnits', val)
|
|
|
+ const activatedMaterials = computed(() => $store.state.guiRuntime.activatedMaterials)
|
|
|
+ const columnsQ = computed(()=>{
|
|
|
+ return [
|
|
|
+ { name: 'name', label: '', align: 'left', field: 'name', headerStyle:''},
|
|
|
+ { name: 'Qsca', label: 'Qsca', align: 'left', field: 'Qsca', headerStyle:''},
|
|
|
+ { name: 'Qabs', label: 'Qabs', align: 'left', field: 'Qabs', headerStyle:''},
|
|
|
+ { name: 'Qext', label: 'Qext', align: 'left', field: 'Qext', headerStyle:''},
|
|
|
+ ]
|
|
|
})
|
|
|
|
|
|
- const hostIndex = computed({
|
|
|
- get: () => $store.state.simulationSetup.gui.hostIndex,
|
|
|
- set: val => $store.commit('simulationSetup/setHostIndex', val)
|
|
|
- })
|
|
|
|
|
|
- return { hostIndex, isShowingHelpForInputWithUnits, flexRowTitleStyle}
|
|
|
+ return { }
|
|
|
},
|
|
|
})
|
|
|
</script>
|