|
@@ -9,8 +9,8 @@
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="是否拍照" v-if="!editRowData.is_system">
|
|
<el-form-item label="是否拍照" v-if="!editRowData.is_system">
|
|
|
<el-radio-group v-model="editRowData.take_picture">
|
|
<el-radio-group v-model="editRowData.take_picture">
|
|
|
- <el-radio :label="true">拍照</el-radio>
|
|
|
|
|
- <el-radio :label="false">不拍照</el-radio>
|
|
|
|
|
|
|
+ <el-radio :label="1">拍照</el-radio>
|
|
|
|
|
+ <el-radio :label="0">不拍照</el-radio>
|
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="相机高度(mm)">
|
|
<el-form-item label="相机高度(mm)">
|
|
@@ -36,16 +36,16 @@
|
|
|
<el-form-item label="鞋子翻转">
|
|
<el-form-item label="鞋子翻转">
|
|
|
<div class="flex-row">
|
|
<div class="flex-row">
|
|
|
<el-radio-group v-model="editRowData.shoe_upturn">
|
|
<el-radio-group v-model="editRowData.shoe_upturn">
|
|
|
- <el-radio :label="true">翻转</el-radio>
|
|
|
|
|
- <el-radio :label="false">不翻转</el-radio>
|
|
|
|
|
|
|
+ <el-radio :label="1">翻转</el-radio>
|
|
|
|
|
+ <el-radio :label="0">不翻转</el-radio>
|
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
|
<a class="cursor-pointer" @click="changeNum('overturn_steering')" v-log="{ describe: { action: '点击测试翻转' } }">测试翻转</a>
|
|
<a class="cursor-pointer" @click="changeNum('overturn_steering')" v-log="{ describe: { action: '点击测试翻转' } }">测试翻转</a>
|
|
|
</div>
|
|
</div>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="LED灯光开光" @change="changeNum('laser_position')">
|
|
<el-form-item label="LED灯光开光" @change="changeNum('laser_position')">
|
|
|
<el-radio-group v-model="editRowData.led_switch">
|
|
<el-radio-group v-model="editRowData.led_switch">
|
|
|
- <el-radio :label="false">关闭</el-radio>
|
|
|
|
|
- <el-radio :label="true">开启</el-radio>
|
|
|
|
|
|
|
+ <el-radio :label="0">关闭</el-radio>
|
|
|
|
|
+ <el-radio :label="1">开启</el-radio>
|
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="对焦次数">
|
|
<el-form-item label="对焦次数">
|
|
@@ -78,6 +78,7 @@ import { ref, defineProps, defineEmits , watch, onMounted } from 'vue'
|
|
|
import icpList from '@/utils/ipc';
|
|
import icpList from '@/utils/ipc';
|
|
|
import { digiCamControlWEB } from '@/utils/appconfig'
|
|
import { digiCamControlWEB } from '@/utils/appconfig'
|
|
|
import {ElMessage} from "element-plus";
|
|
import {ElMessage} from "element-plus";
|
|
|
|
|
+import { getDeviceConfigDetail,getDeviceConfigDetailQuery,saveDeviceConfig } from '@/apis/setting'
|
|
|
import client from "@/stores/modules/client";
|
|
import client from "@/stores/modules/client";
|
|
|
const clientStore = client();
|
|
const clientStore = client();
|
|
|
import socket from "@/stores/modules/socket";
|
|
import socket from "@/stores/modules/socket";
|
|
@@ -100,7 +101,7 @@ const props = defineProps({
|
|
|
const initStatus = ref(false)
|
|
const initStatus = ref(false)
|
|
|
const isDefault = ref(true); // 是否为默认配置
|
|
const isDefault = ref(true); // 是否为默认配置
|
|
|
const editRowData = ref({}); // 当前编辑行的数据
|
|
const editRowData = ref({}); // 当前编辑行的数据
|
|
|
-onMounted(()=>{
|
|
|
|
|
|
|
+onMounted(async ()=>{
|
|
|
console.log('editrow')
|
|
console.log('editrow')
|
|
|
if(props.addRowData.mode_type){
|
|
if(props.addRowData.mode_type){
|
|
|
console.log(props.addRowData);
|
|
console.log(props.addRowData);
|
|
@@ -109,29 +110,27 @@ onMounted(()=>{
|
|
|
testShoesFlip()
|
|
testShoesFlip()
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
|
|
+ let fun = getDeviceConfigDetail;
|
|
|
let params = {
|
|
let params = {
|
|
|
id: props.id
|
|
id: props.id
|
|
|
}
|
|
}
|
|
|
- if(!props.id) params = {
|
|
|
|
|
- mode_type:"执行左脚程序",
|
|
|
|
|
- action_name:"侧视",
|
|
|
|
|
|
|
+ if(!props.id){
|
|
|
|
|
+ params = {
|
|
|
|
|
+ mode_type:"执行左脚程序",
|
|
|
|
|
+ action_name:"侧视",
|
|
|
|
|
+ }
|
|
|
|
|
+ fun = getDeviceConfigDetailQuery
|
|
|
}
|
|
}
|
|
|
- clientStore.ipc.removeAllListeners(icpList.setting.getDeviceConfigDetail);
|
|
|
|
|
- clientStore.ipc.send(icpList.setting.getDeviceConfigDetail, params);
|
|
|
|
|
- clientStore.ipc.on(icpList.setting.getDeviceConfigDetail, (event, result) => {
|
|
|
|
|
|
|
|
|
|
- console.log('getDeviceConfigDetail')
|
|
|
|
|
- console.log(result)
|
|
|
|
|
- if(result.code == 0 && result.data){
|
|
|
|
|
|
|
|
|
|
- editRowData.value = result.data;
|
|
|
|
|
- clientStore.ipc.removeAllListeners(icpList.setting.getDeviceConfigDetail);
|
|
|
|
|
- initStatus.value = true;
|
|
|
|
|
- testShoesFlip()
|
|
|
|
|
- }else if(result.msg){
|
|
|
|
|
- ElMessage.error(result.msg)
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
|
|
+
|
|
|
|
|
+ const result = await fun(params)
|
|
|
|
|
+
|
|
|
|
|
+ if(result.code == 0 && result.data){
|
|
|
|
|
+ editRowData.value = result.data;
|
|
|
|
|
+ initStatus.value = true;
|
|
|
|
|
+ testShoesFlip()
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
})
|
|
})
|
|
|
|
|
|
|
@@ -222,25 +221,24 @@ const close = ()=>{
|
|
|
/**
|
|
/**
|
|
|
* 保存当前编辑的配置。
|
|
* 保存当前编辑的配置。
|
|
|
*/
|
|
*/
|
|
|
-const saveRow = () => {
|
|
|
|
|
|
|
+const saveRow = async () => {
|
|
|
|
|
+
|
|
|
if(!editRowData.value.action_name){
|
|
if(!editRowData.value.action_name){
|
|
|
ElMessage.error('请输入动作名称')
|
|
ElMessage.error('请输入动作名称')
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
- clientStore.ipc.send(icpList.setting.saveDeviceConfig, {
|
|
|
|
|
|
|
+
|
|
|
|
|
+ const result = await saveDeviceConfig({
|
|
|
...editRowData.value
|
|
...editRowData.value
|
|
|
- });
|
|
|
|
|
- clientStore.ipc.on(icpList.setting.saveDeviceConfig, (event, result) => {
|
|
|
|
|
- console.log('saveDeviceConfig');
|
|
|
|
|
- console.log(editRowData.value);
|
|
|
|
|
- if (result.code == 0) {
|
|
|
|
|
- emit('confirm')
|
|
|
|
|
- ElMessage.success('保存成功');
|
|
|
|
|
- clientStore.ipc.removeAllListeners(icpList.setting.saveDeviceConfig);
|
|
|
|
|
- } else {
|
|
|
|
|
- ElMessage.error('保存失败');
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ })
|
|
|
|
|
+ if (result.code == 0) {
|
|
|
|
|
+ emit('confirm')
|
|
|
|
|
+ ElMessage.success('保存成功');
|
|
|
|
|
+ clientStore.ipc.removeAllListeners(icpList.setting.saveDeviceConfig);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
// 暴露给父组件
|
|
// 暴露给父组件
|