|
@@ -85,7 +85,7 @@
|
|
|
/>
|
|
/>
|
|
|
</template>
|
|
</template>
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
-import {watchEffect, ref, reactive, defineEmits, defineProps, computed, onBeforeUnmount, onMounted} from 'vue'
|
|
|
|
|
|
|
+import {watchEffect, ref, defineEmits, defineProps, computed, onBeforeUnmount, onMounted} from 'vue'
|
|
|
import client from "@/stores/modules/client";
|
|
import client from "@/stores/modules/client";
|
|
|
import socket from "@/stores/modules/socket";
|
|
import socket from "@/stores/modules/socket";
|
|
|
import icpList from '@/utils/ipc'
|
|
import icpList from '@/utils/ipc'
|
|
@@ -100,6 +100,7 @@ const emit = defineEmits([ 'confirm','onClose']);
|
|
|
|
|
|
|
|
import configInfo from '@/stores/modules/config';
|
|
import configInfo from '@/stores/modules/config';
|
|
|
const configInfoStore = configInfo();
|
|
const configInfoStore = configInfo();
|
|
|
|
|
+const useUserInfoStore = useUserInfo();
|
|
|
|
|
|
|
|
const confirm = async () => {
|
|
const confirm = async () => {
|
|
|
console.log('confirm');
|
|
console.log('confirm');
|
|
@@ -128,19 +129,19 @@ const props = defineProps({
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
-const menu = reactive([])
|
|
|
|
|
|
|
+
|
|
|
const show = ref(true)
|
|
const show = ref(true)
|
|
|
|
|
|
|
|
|
|
+const previewKey = ref(0)
|
|
|
|
|
+
|
|
|
const isSetting = computed(()=>{
|
|
const isSetting = computed(()=>{
|
|
|
return props.id || props.addRowData.mode_type
|
|
return props.id || props.addRowData.mode_type
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
-const useUserInfoStore = useUserInfo()
|
|
|
|
|
import HardwareCheck from '@/components/check/index.vue'
|
|
import HardwareCheck from '@/components/check/index.vue'
|
|
|
import { digiCamControlWEB } from '@/utils/appconfig'
|
|
import { digiCamControlWEB } from '@/utils/appconfig'
|
|
|
import { getFilePath } from '@/utils/appfun'
|
|
import { getFilePath } from '@/utils/appfun'
|
|
|
import {ElMessage} from "element-plus";
|
|
import {ElMessage} from "element-plus";
|
|
|
-const previewKey = ref(0)
|
|
|
|
|
|
|
|
|
|
const preview = ref(digiCamControlWEB+'liveview.jpg')
|
|
const preview = ref(digiCamControlWEB+'liveview.jpg')
|
|
|
|
|
|
|
@@ -153,30 +154,82 @@ const previewSrc = computed(()=>{
|
|
|
const step = ref(1)
|
|
const step = ref(1)
|
|
|
async function checkConfirm(init){
|
|
async function checkConfirm(init){
|
|
|
step.value =1
|
|
step.value =1
|
|
|
- if(menu.length === 0){
|
|
|
|
|
- menu.push({
|
|
|
|
|
- type:'developer'
|
|
|
|
|
- })
|
|
|
|
|
-/* menu.push({
|
|
|
|
|
- type:'toggleModel'
|
|
|
|
|
- })*/
|
|
|
|
|
-
|
|
|
|
|
- menu.push({
|
|
|
|
|
- type:'setting'
|
|
|
|
|
- })
|
|
|
|
|
-
|
|
|
|
|
- menu.push({
|
|
|
|
|
- type:'OneClickRelease'
|
|
|
|
|
- })
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
if(!init) previewKey.value++;
|
|
if(!init) previewKey.value++;
|
|
|
|
|
|
|
|
showrEditRow.value = true
|
|
showrEditRow.value = true
|
|
|
loading.value = false;
|
|
loading.value = false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+// 打开输出目录:appConfig.appPath + '/build/extraResources/py/output'
|
|
|
|
|
+const openOutputDir = () => {
|
|
|
|
|
+ try {
|
|
|
|
|
+ const appPath = configInfoStore?.appConfig?.appPath || ''
|
|
|
|
|
+ if (!appPath) {
|
|
|
|
|
+ ElMessage.error('未获取到应用目录 appPath')
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ const fullPath = `${appPath}\\output`
|
|
|
|
|
+ clientStore.ipc.removeAllListeners(icpList.utils.shellFun);
|
|
|
|
|
+ clientStore.ipc.send(icpList.utils.shellFun, {
|
|
|
|
|
+ action: 'openMkPath',
|
|
|
|
|
+ params: fullPath.replace(/\//g, '\\')
|
|
|
|
|
+ });
|
|
|
|
|
+ } catch (e) {
|
|
|
|
|
+ console.error(e)
|
|
|
|
|
+ ElMessage.error('打开目录失败')
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+// 快捷操作菜单子项
|
|
|
|
|
+const quickActionsChildren = [
|
|
|
|
|
+ {
|
|
|
|
|
+ name: '生成图目录',
|
|
|
|
|
+ click() {
|
|
|
|
|
+ openOutputDir()
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ type: 'OneClickRelease'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ type: 'OneKeyDown'
|
|
|
|
|
+ }
|
|
|
|
|
+]
|
|
|
|
|
+
|
|
|
|
|
+// 重构 menu 为带快捷操作和开发工具的下拉菜单结构
|
|
|
|
|
+const menu = computed(() => {
|
|
|
|
|
+ // 一级导航:设置 + 快捷操作下拉(含一键释放/一键回落/生成图目录)
|
|
|
|
|
+ if (useUserInfoStore.userInfo.brand_company_code === '1300' || configInfoStore.appConfig.debug) {
|
|
|
|
|
+ return [
|
|
|
|
|
+ {
|
|
|
|
|
+ type: 'setting'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ name: '快捷操作',
|
|
|
|
|
+ children: quickActionsChildren
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ name: '开发工具',
|
|
|
|
|
+ children: [
|
|
|
|
|
+ {
|
|
|
|
|
+ type: 'developer'
|
|
|
|
|
+ }
|
|
|
|
|
+ ]
|
|
|
|
|
+ }
|
|
|
|
|
+ ]
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return [
|
|
|
|
|
+ {
|
|
|
|
|
+ type: 'setting'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ name: '快捷操作',
|
|
|
|
|
+ children: quickActionsChildren
|
|
|
|
|
+ }
|
|
|
|
|
+ ]
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
// editRow 数据加载完成后调用,仅记录点位,首次不打开预览
|
|
// editRow 数据加载完成后调用,仅记录点位,首次不打开预览
|
|
|
function onEditRowReady(point_name) {
|
|
function onEditRowReady(point_name) {
|
|
|
console.log('onEditRowReady,记录点位:' + point_name)
|
|
console.log('onEditRowReady,记录点位:' + point_name)
|