|
|
@ -48,7 +48,6 @@ |
|
|
|
v-model="simulation_brightness" |
|
|
|
:min="0" |
|
|
|
:max="65535" |
|
|
|
:disabled="!isCameraOpen" |
|
|
|
@change="handleSimulationBrightness" |
|
|
|
/> |
|
|
|
<p class="number">{{ simulation_brightness }}</p> |
|
|
@ -57,7 +56,6 @@ |
|
|
|
<p class="title">曝光时间</p> |
|
|
|
<t-slider |
|
|
|
v-model="exposure" |
|
|
|
:disabled="!isCameraOpen" |
|
|
|
:min="0" |
|
|
|
:max="100000" |
|
|
|
@change="handleExposureTime" |
|
|
@ -93,6 +91,7 @@ |
|
|
|
{{ item.name }} |
|
|
|
</t-option> |
|
|
|
</t-select> |
|
|
|
<t-button class="save_btn" @click="onSubmit">保存</t-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -144,6 +143,7 @@ import { |
|
|
|
} from '@/command' |
|
|
|
import { coreListApi } from '@/api/info' |
|
|
|
import { MessagePlugin } from 'tdesign-vue-next' |
|
|
|
import { addCameraConfig } from '@/api/camera' |
|
|
|
|
|
|
|
const photoUrl = ref('') |
|
|
|
const recognitionResult = ref('') |
|
|
@ -158,6 +158,24 @@ onMounted(async () => { |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
const onSubmit = async () => { |
|
|
|
if (!station_core_id.value) { |
|
|
|
MessagePlugin('error', { content: '请选择堆芯' }) |
|
|
|
return |
|
|
|
} |
|
|
|
// 保存当前相机参数到相应的堆芯 |
|
|
|
const data = { |
|
|
|
station_core_id: station_core_id.value, |
|
|
|
simulation_brightness: simulation_brightness.value, |
|
|
|
exposure: exposure.value, |
|
|
|
} |
|
|
|
const res = await addCameraConfig(data) |
|
|
|
console.log(res) |
|
|
|
if (res?.code == 200) { |
|
|
|
MessagePlugin('success', { content: '保存成功' }) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
setInterval( |
|
|
|
() => { |
|
|
|
photoUrl.value = `${ |
|
|
@ -490,6 +508,9 @@ onUnmounted(() => { |
|
|
|
} |
|
|
|
.save_form { |
|
|
|
flex: 1; |
|
|
|
.save_btn { |
|
|
|
margin-top: 14px; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|