You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
92 lines
3.3 KiB
92 lines
3.3 KiB
<template>
|
|
<w-dialog ref="dialogRef" width="600px" height="400px" :title="$t('io.sc.engine.mv.executorDialog.title')" :can-maximize="false" :maximized="false">
|
|
<div class="px-10">
|
|
<w-form
|
|
ref="formRef"
|
|
:cols-num="1"
|
|
:cols-y-gap="10"
|
|
:fields="[
|
|
{ name: 'rateStartDateFrom', label: $t('io.sc.engine.mv.executorDialog.form.entity.rateStartDateFrom'), type: 'w-text' },
|
|
{ name: 'rateStartDateTo', label: $t('io.sc.engine.mv.executorDialog.form.entity.rateStartDateTo'), type: 'w-text' },
|
|
{ name: 'performPeriod', label: $t('io.sc.engine.mv.executorDialog.form.entity.performPeriod'), type: 'w-text', defaultValue: '18' },
|
|
{
|
|
name: 'binomialSignificanceLevel',
|
|
label: $t('io.sc.engine.mv.executorDialog.form.entity.binomialSignificanceLevel'),
|
|
type: 'w-select',
|
|
options: binomialSignificanceLevelOptionsRef,
|
|
defaultValue: 0.01,
|
|
},
|
|
{
|
|
name: 'chiSquareSignificanceLevel',
|
|
label: $t('io.sc.engine.mv.executorDialog.form.entity.chiSquareSignificanceLevel'),
|
|
type: 'w-select',
|
|
options: chiSquareSignificanceLevelOptionsRef,
|
|
defaultValue: 0.01,
|
|
},
|
|
]"
|
|
>
|
|
</w-form>
|
|
<div style="height: 20px"></div>
|
|
<div class="row justify-center">
|
|
<q-btn :label="$t('io.sc.engine.mv.executorDialog.form.action.execute')" color="primary" @click="execute"></q-btn>
|
|
</div>
|
|
</div>
|
|
</w-dialog>
|
|
</template>
|
|
<script setup lang="ts">
|
|
import { ref, nextTick } from 'vue';
|
|
import { axios, Environment } from 'platform-core';
|
|
|
|
const emit = defineEmits(['afterStartExecute']);
|
|
|
|
const dialogRef = ref();
|
|
const formRef = ref();
|
|
const binomialSignificanceLevelOptionsRef = ref([]);
|
|
const chiSquareSignificanceLevelOptionsRef = ref([]);
|
|
|
|
const open = () => {
|
|
dialogRef.value.show();
|
|
nextTick(() => {
|
|
axios.get(Environment.apiContextPath('/api/mv/configure/binomial/significanceLevels')).then((response) => {
|
|
const binomialSignificanceLevelOptions = [];
|
|
for (let item of response.data) {
|
|
binomialSignificanceLevelOptions.push({ label: item, value: item });
|
|
}
|
|
binomialSignificanceLevelOptionsRef.value = binomialSignificanceLevelOptions;
|
|
});
|
|
|
|
axios.get(Environment.apiContextPath('/api/mv/configure/chiSquare/significanceLevels')).then((response) => {
|
|
const chiSquareSignificanceLevelOptions = [];
|
|
for (let item of response.data) {
|
|
chiSquareSignificanceLevelOptions.push({ label: item, value: item });
|
|
}
|
|
chiSquareSignificanceLevelOptionsRef.value = chiSquareSignificanceLevelOptions;
|
|
});
|
|
});
|
|
};
|
|
|
|
const close = () => {
|
|
dialogRef.value.hide();
|
|
};
|
|
|
|
const execute = () => {
|
|
axios
|
|
.post(Environment.apiContextPath('/api/mv/execute'), {
|
|
executeMode: 'MANUAL',
|
|
rateStartDateFrom: formRef.value.getFieldValue('rateStartDateFrom'),
|
|
rateStartDateTo: formRef.value.getFieldValue('rateStartDateTo'),
|
|
performPeriod: formRef.value.getFieldValue('performPeriod'),
|
|
binomialSignificanceLevel: formRef.value.getFieldValue('binomialSignificanceLevel'),
|
|
chiSquareSignificanceLevel: formRef.value.getFieldValue('chiSquareSignificanceLevel'),
|
|
})
|
|
.then(() => {
|
|
emit('afterStartExecute');
|
|
close();
|
|
});
|
|
};
|
|
|
|
defineExpose({
|
|
open,
|
|
close,
|
|
});
|
|
</script>
|
|
|