|
|
@ -1,7 +1,7 @@ |
|
|
|
<template> |
|
|
|
<div class="label-edit-model"> |
|
|
|
<Draggable></Draggable> |
|
|
|
<!-- <div class="model-head"><Button type="primary" danger>重新调整</Button></div> --> |
|
|
|
<div class="model-head"><Button type="primary" danger @click="reset">重新调整</Button></div> |
|
|
|
<Row> |
|
|
|
<Col :span="24" class="label-attribute"> |
|
|
|
<Row> |
|
|
@ -13,7 +13,7 @@ |
|
|
|
<Row> |
|
|
|
<Col :span="4">标签X轴 :</Col> |
|
|
|
<Col :span="8"> |
|
|
|
<InputNumber size="small" :min="0" :max="1" :step="0.001" v-model:value="x"/> |
|
|
|
<InputNumber size="small" :min="0" :max="10000" :step="0.001" v-model:value="x"/> |
|
|
|
</Col> |
|
|
|
</Row> |
|
|
|
</Col> |
|
|
@ -21,7 +21,7 @@ |
|
|
|
<Row> |
|
|
|
<Col :span="4">标签Y轴 :</Col> |
|
|
|
<Col :span="8"> |
|
|
|
<InputNumber size="small" :min="0" :max="1" :step="0.001" v-model:value="y"/> |
|
|
|
<InputNumber size="small" :min="0" :max="10000" :step="0.001" v-model:value="y"/> |
|
|
|
</Col> |
|
|
|
</Row> |
|
|
|
</Col> |
|
|
@ -44,16 +44,19 @@ import * as markLabelApi from '@/axios/cameraMark/markLabelApi'; |
|
|
|
interface FormState { |
|
|
|
id: string |
|
|
|
name: string; |
|
|
|
ip: string; |
|
|
|
x: string; |
|
|
|
y:string; |
|
|
|
canvasLeftRatio: string; |
|
|
|
canvasTopRatio: string; |
|
|
|
} |
|
|
|
|
|
|
|
const formState: UnwrapRef<FormState> = reactive({ |
|
|
|
// id: '', |
|
|
|
name: '', |
|
|
|
ip: '', |
|
|
|
CbCameraParamsId: '', |
|
|
|
userName: '', |
|
|
|
x: null, |
|
|
|
y:null, |
|
|
|
canvasLeftRatio: null, |
|
|
|
canvasTopRatio: null, |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
@ -64,8 +67,8 @@ const canvasLeft = ref(); |
|
|
|
const canvasTop = ref(); |
|
|
|
|
|
|
|
watch(name, (nv, ov) => { |
|
|
|
console.log("document.body.offsetWidth ",document.body.offsetWidth ); |
|
|
|
console.log("document.body.clientHeight",document.body.offsetHeight); |
|
|
|
// console.log("document.body.offsetWidth ",document.body.offsetWidth ); |
|
|
|
// console.log("document.body.clientHeight",document.body.offsetHeight); |
|
|
|
|
|
|
|
x.value = document.body.offsetWidth * canvasLeft.value |
|
|
|
y.value = document.body.offsetHeight * canvasTop.value |
|
|
@ -84,6 +87,11 @@ onMounted(()=>{ |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
//重新调整位置 |
|
|
|
function reset(){ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//取消 |
|
|
|
function cancel(){ |
|
|
|
notification.close("editLabel"); |
|
|
|