Browse Source

标签

master
DIAMOND 2 years ago
parent
commit
a4462f3faf
  1. 26
      src/views/page/Model/LabelEditModel.vue

26
src/views/page/Model/LabelEditModel.vue

@ -1,7 +1,7 @@
<template> <template>
<div class="label-edit-model"> <div class="label-edit-model">
<Draggable></Draggable> <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> <Row>
<Col :span="24" class="label-attribute"> <Col :span="24" class="label-attribute">
<Row> <Row>
@ -13,7 +13,7 @@
<Row> <Row>
<Col :span="4">标签X轴 :</Col> <Col :span="4">标签X轴 :</Col>
<Col :span="8"> <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> </Col>
</Row> </Row>
</Col> </Col>
@ -21,7 +21,7 @@
<Row> <Row>
<Col :span="4">标签Y轴 :</Col> <Col :span="4">标签Y轴 :</Col>
<Col :span="8"> <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> </Col>
</Row> </Row>
</Col> </Col>
@ -44,16 +44,19 @@ import * as markLabelApi from '@/axios/cameraMark/markLabelApi';
interface FormState { interface FormState {
id: string id: string
name: string; name: string;
ip: string; x: string;
y:string;
canvasLeftRatio: string; canvasLeftRatio: string;
canvasTopRatio: string; canvasTopRatio: string;
} }
const formState: UnwrapRef<FormState> = reactive({ const formState: UnwrapRef<FormState> = reactive({
// id: '', // id: '',
name: '', name: '',
ip: '', x: null,
CbCameraParamsId: '', y:null,
userName: '', canvasLeftRatio: null,
canvasTopRatio: null,
}); });
@ -64,8 +67,8 @@ const canvasLeft = ref();
const canvasTop = ref(); const canvasTop = ref();
watch(name, (nv, ov) => { watch(name, (nv, ov) => {
console.log("document.body.offsetWidth ",document.body.offsetWidth ); // console.log("document.body.offsetWidth ",document.body.offsetWidth );
console.log("document.body.clientHeight",document.body.offsetHeight); // console.log("document.body.clientHeight",document.body.offsetHeight);
x.value = document.body.offsetWidth * canvasLeft.value x.value = document.body.offsetWidth * canvasLeft.value
y.value = document.body.offsetHeight * canvasTop.value y.value = document.body.offsetHeight * canvasTop.value
@ -84,6 +87,11 @@ onMounted(()=>{
} }
}) })
//
function reset(){
}
// //
function cancel(){ function cancel(){
notification.close("editLabel"); notification.close("editLabel");

Loading…
Cancel
Save