修复微调bug

This commit is contained in:
shefengchun 2023-01-14 19:34:21 +08:00
parent 066d97efb1
commit bc64cbceff
1 changed files with 9 additions and 9 deletions

View File

@ -93,26 +93,26 @@
<p class="text-center">{{ $t("Set Fusion Band Parameters") }}</p> <p class="text-center">{{ $t("Set Fusion Band Parameters") }}</p>
<div style="display: flex; justify-content: space-evenly"> <div style="display: flex; justify-content: space-evenly">
<div> <div>
<div><q-icon size="1.5rem" name="arrow_upward" @click="add('alpha')"></q-icon></div> <div><q-btn color="white" @click="add('alpha')" text-color="black" label="↑" /></div>
<q-slider v-model="array[group].alpha" :min="0.0" @change="chang('alpha')" :max="1" :step="0.01" color="green" <q-slider v-model="array[group].alpha" :min="0.0" @change="chang('alpha')" :max="1" :step="0.01" color="green"
vertical reverse label-always /> vertical reverse label-always />
<div><q-icon size="1.5rem" name="south" @click="reduce('alpha')"></q-icon></div> <div><q-btn color="white" @click="reduce('alpha')" text-color="black" label="↓" /></div>
<p class="text-center">alpha</p> <p class="text-center">alpha</p>
</div> </div>
<div> <div>
<div><q-icon size="1.5rem" name="arrow_upward" @click="add('p')"></q-icon></div> <div><q-btn color="white" @click="add('p')" text-color="black" label="↑" /></div>
<q-slider v-model="array[group].p" :min="0" @change="chang('p')" :max="2.5" :step="0.01" color="green" <q-slider v-model="array[group].p" :min="0" @change="chang('p')" :max="2.5" :step="0.01" color="green"
vertical reverse label-always /> vertical reverse label-always />
<div><q-icon size="1.5rem" name="south" @click="reduce('p')"></q-icon></div> <div><q-btn color="white" @click="reduce('p')" text-color="black" label="↓" /></div>
<p class="text-center">p</p> <p class="text-center">p</p>
</div> </div>
<div> <div>
<div><q-icon size="1.5rem" name="arrow_upward" @click="add('gamma')" ></q-icon></div> <div><q-btn color="white" @click="add('gamma')" text-color="black" label="↑" /></div>
<q-slider v-model="array[group].gamma" :min="0" @change="chang('gamma')" :max="2.5" :step="0.01" color="green" <q-slider v-model="array[group].gamma" :min="0" @change="chang('gamma')" :max="2.5" :step="0.01" color="green"
vertical reverse label-always /> vertical reverse label-always />
<div><q-icon size="1.5rem" name="south" @click="reduce('gamma')"></q-icon></div> <div><q-btn color="white" @click="reduce('gamma')" text-color="black" label="↓" /></div>
<p class="text-center">gamma</p> <p class="text-center">gamma</p>
</div> </div>
</div> </div>
@ -345,9 +345,9 @@ export default defineComponent({
}; };
const use_server_config = () => { const use_server_config = () => {
for (let index = 0; index < array.length - 1; index++) { for (let index = 0; index < array.length - 1; index++) {
array[arr[index]].gamma = config.params[index].gamma.toFixed(2); array[arr[index]].gamma = Number(config.params[index].gamma.toFixed(2));
array[arr[index]].alpha = config.params[index].alpha.toFixed(2); array[arr[index]].alpha = Number(config.params[index].alpha.toFixed(2));
array[arr[index]].p = config.params[index].power.toFixed(2); array[arr[index]].p = Number(config.params[index].power.toFixed(2));
array[arr[index]].isshow = config.params[index].enable; array[arr[index]].isshow = config.params[index].enable;
array[arr[index]].value = Number(config.params[index].size); array[arr[index]].value = Number(config.params[index].size);
} }