2019-09-22 00:14:12 +03:00
|
|
|
<template>
|
2020-06-26 04:39:14 -07:00
|
|
|
<div>
|
|
|
|
|
<CVselect
|
|
|
|
|
v-model="value.sortMode"
|
|
|
|
|
name="Sort Mode"
|
|
|
|
|
:list="['Largest','Smallest','Highest','Lowest','Rightmost','Leftmost','Centermost']"
|
|
|
|
|
@input="handleData('sortMode')"
|
|
|
|
|
@rollback="rollback('sortMode',e)"
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
<CVselect
|
|
|
|
|
v-model="value.targetRegion"
|
|
|
|
|
name="Target Region"
|
|
|
|
|
:list="['Center','Top','Bottom','Left','Right']"
|
|
|
|
|
@input="handleData('targetRegion')"
|
|
|
|
|
@rollback="e=> rollback('targetRegion',e)"
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
<CVselect
|
|
|
|
|
v-model="value.targetOrientation"
|
|
|
|
|
name="Target Orientation"
|
|
|
|
|
:list="['Portrait', 'Landscape']"
|
|
|
|
|
@input="handleData('targetOrientation')"
|
|
|
|
|
@rollback="e=> rollback('targetOrientation',e)"
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
<CVswitch
|
|
|
|
|
v-model="value.multiple"
|
|
|
|
|
name="Output multiple"
|
|
|
|
|
@input="handleData('multiple')"
|
|
|
|
|
@rollback="e=> rollback('multiple',e)"
|
|
|
|
|
/>
|
|
|
|
|
<span>Calibrate:</span>
|
|
|
|
|
<v-divider
|
|
|
|
|
dark
|
|
|
|
|
color="white"
|
|
|
|
|
/>
|
|
|
|
|
<CVselect
|
|
|
|
|
v-model="value.calibrationMode"
|
|
|
|
|
name="Calibration Mode"
|
|
|
|
|
:list="['None','Single point','Dual point']"
|
|
|
|
|
@input="handleData('calibrationMode')"
|
|
|
|
|
@rollback="e=> rollback('calibrationMode',e)"
|
|
|
|
|
/>
|
|
|
|
|
<component
|
|
|
|
|
:is="selectedComponent"
|
|
|
|
|
:raw-point="rawPoint"
|
|
|
|
|
@update="doUpdate"
|
|
|
|
|
@snackbar="showSnackbar"
|
|
|
|
|
/>
|
|
|
|
|
<v-snackbar
|
|
|
|
|
v-model="snackbar"
|
|
|
|
|
:timeout="3000"
|
|
|
|
|
top
|
|
|
|
|
color="error"
|
|
|
|
|
>
|
|
|
|
|
<span style="color:#000">{{ snackbarText }}</span>
|
|
|
|
|
<v-btn
|
|
|
|
|
color="black"
|
|
|
|
|
text
|
|
|
|
|
@click="snackbar = false"
|
|
|
|
|
>
|
|
|
|
|
Close
|
|
|
|
|
</v-btn>
|
|
|
|
|
</v-snackbar>
|
|
|
|
|
</div>
|
2019-09-22 00:14:12 +03:00
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
2020-05-25 22:46:44 +03:00
|
|
|
import CVselect from '../../components/common/cv-select'
|
|
|
|
|
import CVswitch from '../../components/common/cv-switch'
|
|
|
|
|
import DualCalibration from "../../components/pipeline/OutputTab/DualCalibration";
|
|
|
|
|
import SingleCalibration from "../../components/pipeline/OutputTab/SingleCalibration";
|
2019-10-29 23:58:06 +02:00
|
|
|
|
2019-11-29 16:50:16 +02:00
|
|
|
|
2019-09-22 00:14:12 +03:00
|
|
|
export default {
|
2019-09-28 18:27:17 +03:00
|
|
|
name: 'Output',
|
2019-10-29 23:58:06 +02:00
|
|
|
components: {
|
2019-10-26 23:41:45 +03:00
|
|
|
CVselect,
|
2019-11-29 16:50:16 +02:00
|
|
|
CVswitch,
|
2019-10-26 23:41:45 +03:00
|
|
|
SingleCalibration,
|
|
|
|
|
DualCalibration,
|
|
|
|
|
|
2019-09-28 18:27:17 +03:00
|
|
|
},
|
2020-06-26 04:39:14 -07:00
|
|
|
props: ['value'],
|
2019-10-11 15:48:16 +03:00
|
|
|
|
2019-09-22 00:14:12 +03:00
|
|
|
data() {
|
|
|
|
|
return {
|
2019-10-11 15:48:16 +03:00
|
|
|
snackbar: false,
|
2020-01-08 00:11:34 -08:00
|
|
|
snackbarText: ""
|
2019-10-11 15:48:16 +03:00
|
|
|
}
|
|
|
|
|
},
|
2019-10-29 23:58:06 +02:00
|
|
|
computed: {
|
|
|
|
|
selectedComponent: {
|
|
|
|
|
get() {
|
2019-10-26 23:41:45 +03:00
|
|
|
switch (this.value.calibrationMode) {
|
|
|
|
|
case 0:
|
2019-10-28 20:16:18 +02:00
|
|
|
return "";
|
2019-10-26 23:41:45 +03:00
|
|
|
case 1:
|
2019-10-28 20:16:18 +02:00
|
|
|
return "SingleCalibration";
|
|
|
|
|
case 2:
|
2019-10-26 23:41:45 +03:00
|
|
|
return "DualCalibration"
|
|
|
|
|
}
|
|
|
|
|
return ""
|
|
|
|
|
}
|
|
|
|
|
},
|
2019-10-29 23:58:06 +02:00
|
|
|
rawPoint: {
|
|
|
|
|
get() {
|
2019-10-16 14:13:12 +03:00
|
|
|
return this.$store.state.point.rawPoint;
|
2019-10-11 15:48:16 +03:00
|
|
|
}
|
2019-09-22 00:14:12 +03:00
|
|
|
}
|
2020-06-26 04:39:14 -07:00
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
doUpdate() {
|
|
|
|
|
this.$emit('update')
|
|
|
|
|
},
|
|
|
|
|
showSnackbar(message) {
|
|
|
|
|
this.snackbarText = message;
|
|
|
|
|
this.snackbar = true;
|
|
|
|
|
},
|
2019-09-22 00:14:12 +03:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
2019-09-28 18:27:17 +03:00
|
|
|
<style scoped>
|
2019-09-22 00:14:12 +03:00
|
|
|
</style>
|