feat: 初始化流程图项目结构

master
donghao 3 weeks ago
parent 917a7daef8
commit f7b5829cd1

@ -0,0 +1,76 @@
{
"globals": {
"Component": true,
"ComponentPublicInstance": true,
"ComputedRef": true,
"DirectiveBinding": true,
"EffectScope": true,
"ExtractDefaultPropTypes": true,
"ExtractPropTypes": true,
"ExtractPublicPropTypes": true,
"InjectionKey": true,
"MaybeRef": true,
"MaybeRefOrGetter": true,
"PropType": true,
"Ref": true,
"Slot": true,
"Slots": true,
"VNode": true,
"WritableComputedRef": true,
"computed": true,
"createApp": true,
"customRef": true,
"defineAsyncComponent": true,
"defineComponent": true,
"effectScope": true,
"getCurrentInstance": true,
"getCurrentScope": true,
"h": true,
"inject": true,
"isProxy": true,
"isReactive": true,
"isReadonly": true,
"isRef": true,
"markRaw": true,
"nextTick": true,
"onActivated": true,
"onBeforeMount": true,
"onBeforeUnmount": true,
"onBeforeUpdate": true,
"onDeactivated": true,
"onErrorCaptured": true,
"onMounted": true,
"onRenderTracked": true,
"onRenderTriggered": true,
"onScopeDispose": true,
"onServerPrefetch": true,
"onUnmounted": true,
"onUpdated": true,
"onWatcherCleanup": true,
"provide": true,
"reactive": true,
"readonly": true,
"ref": true,
"resolveComponent": true,
"shallowReactive": true,
"shallowReadonly": true,
"shallowRef": true,
"toRaw": true,
"toRef": true,
"toRefs": true,
"toValue": true,
"triggerRef": true,
"unref": true,
"useAttrs": true,
"useCssModule": true,
"useCssVars": true,
"useId": true,
"useModel": true,
"useSlots": true,
"useTemplateRef": true,
"watch": true,
"watchEffect": true,
"watchPostEffect": true,
"watchSyncEffect": true
}
}

@ -1,7 +1,17 @@
/*
* @Author: donghao donghao@supervision.ltd
* @Date: 2025-07-02 13:17:44
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2025-07-03 10:00:13
* @FilePath: \electron-project\Robot-Al\Robot-Al-Platform-Web\electron.vite.config.ts
* @Description: ,`customMade`, koroFileHeader : https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AEmpo
*/
import { resolve } from 'path'
import { defineConfig, externalizeDepsPlugin, bytecodePlugin } from 'electron-vite'
import vue from '@vitejs/plugin-vue'
import AutoImport from 'unplugin-auto-import/vite'
import Components from 'unplugin-vue-components/vite'
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
export default defineConfig({
main: {
plugins: [externalizeDepsPlugin(), bytecodePlugin()]
@ -12,12 +22,25 @@ export default defineConfig({
renderer: {
resolve: {
alias: {
'@': resolve('src/renderer/src'),
'@renderer': resolve('src/renderer/src'),
'@views': resolve('src/renderer/src/views'),
'@router': resolve('src/renderer/src/router')
}
},
plugins: [vue()],
plugins: [
vue(),
AutoImport({
imports: ['vue'],
eslintrc: {
enabled: true
},
resolvers: [ElementPlusResolver()]
}),
Components({
resolvers: [ElementPlusResolver()]
})
],
build: {
// 核心:指定 Vue 打包输出目录(用于 Web 部署)
outDir: 'dist', // 例如输出到项目根目录的 dist/web 文件夹

2643
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -57,6 +57,7 @@
"@electron-toolkit/preload": "^3.0.0",
"@electron-toolkit/utils": "^3.0.0",
"axios": "^1.10.0",
"element-plus": "^2.10.2",
"pinia": "^3.0.3",
"vue-router": "^4.5.1"
},
@ -65,17 +66,25 @@
"@electron-toolkit/eslint-config-ts": "^1.0.1",
"@electron-toolkit/tsconfig": "^1.0.1",
"@rushstack/eslint-patch": "^1.7.1",
"@tailwindcss/postcss": "^4.1.11",
"@types/node": "^18.19.9",
"@vitejs/plugin-vue": "^5.0.3",
"@vue/eslint-config-prettier": "^9.0.0",
"@vue/eslint-config-typescript": "^12.0.0",
"autoprefixer": "^10.4.21",
"electron": "^28.2.0",
"electron-builder": "^24.9.1",
"electron-vite": "^2.0.0",
"eslint": "^8.56.0",
"eslint-plugin-vue": "^9.20.1",
"postcss": "^8.5.6",
"postcss-scss": "^4.0.9",
"prettier": "^3.2.4",
"sass": "^1.89.2",
"tailwindcss": "^3.4.17",
"typescript": "^5.3.3",
"unplugin-auto-import": "^19.3.0",
"unplugin-vue-components": "^28.8.0",
"vite": "^5.0.12",
"vue": "^3.4.15",
"vue-tsc": "^1.8.27"

@ -0,0 +1,14 @@
/*
* @Author: donghao donghao@supervision.ltd
* @Date: 2025-07-03 10:03:20
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2025-07-03 10:07:48
* @FilePath: \electron-project\Robot-Al\Robot-Al-Platform-Web\postcss.config.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
}
}

@ -1,18 +1,26 @@
/*
* @Author: donghao donghao@supervision.ltd
* @Date: 2025-07-02 14:08:28
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2025-07-02 16:20:34
* @FilePath: \electron-project\Robot-Al\Robot-Al-Platform-Web\src\main\frame\MainFrame.ts
* @Description: ,`customMade`, koroFileHeader : https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import { shell, BrowserWindow } from 'electron'
import { join } from 'path'
import icon from '../../../resources/icon.png?asset'
import { is } from '@electron-toolkit/utils'
export default class MainFrame {
#frame: any = null
#width = 1920
#height = 1080
#width = 3840
#height = 2160
create() {
this.#frame = new BrowserWindow({
width: this.#width,
height: this.#height,
show: false,
// titleBarStyle:'hidden',
frame: true, //无边框窗口
frame: false, //无边框窗口
resizable: false,
autoHideMenuBar: true,
...(process.platform === 'linux' ? { icon } : {}),

@ -0,0 +1,71 @@
/* eslint-disable */
/* prettier-ignore */
// @ts-nocheck
// noinspection JSUnusedGlobalSymbols
// Generated by unplugin-auto-import
// biome-ignore lint: disable
export {}
declare global {
const EffectScope: typeof import('vue')['EffectScope']
const computed: typeof import('vue')['computed']
const createApp: typeof import('vue')['createApp']
const customRef: typeof import('vue')['customRef']
const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
const defineComponent: typeof import('vue')['defineComponent']
const effectScope: typeof import('vue')['effectScope']
const getCurrentInstance: typeof import('vue')['getCurrentInstance']
const getCurrentScope: typeof import('vue')['getCurrentScope']
const h: typeof import('vue')['h']
const inject: typeof import('vue')['inject']
const isProxy: typeof import('vue')['isProxy']
const isReactive: typeof import('vue')['isReactive']
const isReadonly: typeof import('vue')['isReadonly']
const isRef: typeof import('vue')['isRef']
const markRaw: typeof import('vue')['markRaw']
const nextTick: typeof import('vue')['nextTick']
const onActivated: typeof import('vue')['onActivated']
const onBeforeMount: typeof import('vue')['onBeforeMount']
const onBeforeUnmount: typeof import('vue')['onBeforeUnmount']
const onBeforeUpdate: typeof import('vue')['onBeforeUpdate']
const onDeactivated: typeof import('vue')['onDeactivated']
const onErrorCaptured: typeof import('vue')['onErrorCaptured']
const onMounted: typeof import('vue')['onMounted']
const onRenderTracked: typeof import('vue')['onRenderTracked']
const onRenderTriggered: typeof import('vue')['onRenderTriggered']
const onScopeDispose: typeof import('vue')['onScopeDispose']
const onServerPrefetch: typeof import('vue')['onServerPrefetch']
const onUnmounted: typeof import('vue')['onUnmounted']
const onUpdated: typeof import('vue')['onUpdated']
const onWatcherCleanup: typeof import('vue')['onWatcherCleanup']
const provide: typeof import('vue')['provide']
const reactive: typeof import('vue')['reactive']
const readonly: typeof import('vue')['readonly']
const ref: typeof import('vue')['ref']
const resolveComponent: typeof import('vue')['resolveComponent']
const shallowReactive: typeof import('vue')['shallowReactive']
const shallowReadonly: typeof import('vue')['shallowReadonly']
const shallowRef: typeof import('vue')['shallowRef']
const toRaw: typeof import('vue')['toRaw']
const toRef: typeof import('vue')['toRef']
const toRefs: typeof import('vue')['toRefs']
const toValue: typeof import('vue')['toValue']
const triggerRef: typeof import('vue')['triggerRef']
const unref: typeof import('vue')['unref']
const useAttrs: typeof import('vue')['useAttrs']
const useCssModule: typeof import('vue')['useCssModule']
const useCssVars: typeof import('vue')['useCssVars']
const useId: typeof import('vue')['useId']
const useModel: typeof import('vue')['useModel']
const useSlots: typeof import('vue')['useSlots']
const useTemplateRef: typeof import('vue')['useTemplateRef']
const watch: typeof import('vue')['watch']
const watchEffect: typeof import('vue')['watchEffect']
const watchPostEffect: typeof import('vue')['watchPostEffect']
const watchSyncEffect: typeof import('vue')['watchSyncEffect']
}
// for type re-export
declare global {
// @ts-ignore
export type { Component, Slot, Slots, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue'
import('vue')
}

@ -0,0 +1,17 @@
/* eslint-disable */
// @ts-nocheck
// Generated by unplugin-vue-components
// Read more: https://github.com/vuejs/core/pull/3399
// biome-ignore lint: disable
export {}
/* prettier-ignore */
declare module 'vue' {
export interface GlobalComponents {
ElButton: typeof import('element-plus/es')['ElButton']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
SvgIcon: typeof import('./src/components/SvgIcon/index.vue')['default']
Versions: typeof import('./src/components/Versions.vue')['default']
}
}

@ -1,5 +1,12 @@
<script setup lang="ts">
</script>
<!--
* @Author: donghao donghao@supervision.ltd
* @Date: 2025-07-02 13:17:44
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2025-07-02 16:29:18
* @FilePath: \electron-project\Robot-Al\Robot-Al-Platform-Web\src\renderer\src\App.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<script setup lang="ts"></script>
<template>
<router-view></router-view>

@ -1,5 +1,3 @@
@import './base.css';
body {
display: flex;
align-items: center;

@ -0,0 +1,61 @@
<template>
<svg :class="svgClass" aria-hidden="true" v-if="iconType == 'svg'">
<use :xlink:href="iconName" :fill="color" />
</svg>
</template>
<script lang="ts">
import { computed, defineComponent } from "vue";
export default defineComponent({
props: {
iconClass: {
type: String,
required: false,
},
className: {
type: String,
default: "",
},
color: {
type: String,
default: "",
},
},
setup(props) {
return {
iconName: computed(() => `#icon-${props.iconClass}`),
iconType: computed(() => {
return "svg";
}),
svgClass: computed(() => {
if (props.className) {
return `svg-icon ${props.className}`;
}
return "svg-icon";
}),
};
},
mounted() {
// console.log(this.iconName);
},
});
</script>
<style scope lang="scss">
.sub-el-icon,
.nav-icon {
display: inline-block;
font-size: 15px;
margin-right: 12px;
position: relative;
}
.svg-icon {
width: 1em;
height: 1em;
position: relative;
fill: currentColor;
vertical-align: -2px !important;
}
</style>

@ -1,8 +1,25 @@
import './assets/main.css'
/*
* @Author: donghao donghao@supervision.ltd
* @Date: 2025-07-02 13:17:44
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2025-07-03 09:54:52
* @FilePath: \electron-project\Robot-Al\Robot-Al-Platform-Web\src\renderer\src\main.ts
* @Description:
*/
import ElementPlus from "element-plus";
// import "@/styles/tailwind.scss";
import "element-plus/dist/index.css";
import "element-plus/theme-chalk/dark/css-vars.css"; // 暗黑主题
import "./styles/tailwind.scss";
import "./styles/main.scss"
import { createApp } from 'vue'
import App from './App.vue'
import router from '@router'
import { createPinia } from 'pinia'
import zhCn from "@/plugins/zhCnElement"; // 引入中文语言包
createApp(App).use(router).use(createPinia()).mount('#app')
createApp(App).use(router).use(createPinia()).use(ElementPlus, {
locale: zhCn,
size: "large", // 全局组件尺寸
zIndex: 3000, // 全局z-index
}).mount('#app')

@ -0,0 +1,20 @@
/*
* @Author: donghao donghao@supervision.ltd
* @Date: 2025-03-11 11:09:39
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2025-06-12 17:54:08
* @FilePath: \5G-Loading-Bay-Web\src\plugins\zhCn.ts
* @Description: element-plus
*/
import zhCn from "element-plus/es/locale/lang/zh-cn";
// 自定义分页器文案
zhCn.el.pagination = {
goto: "跳至",
pageClassifier: "",
pagesize: "条/页",
total: ""
// total: "共 {total} 条"
};
export default zhCn;

@ -1,6 +1,7 @@
import { createRouter, createWebHashHistory } from 'vue-router'
import Home from '@views/Home/index.vue'
import Design from '@views/Design/index.vue'
export default createRouter({
history: createWebHashHistory(), //hash模式
routes: [{ path: '/', component: Home }] //路由配置规则数组
routes: [{ path: '/', component: Design }] //路由配置规则数组
})

@ -0,0 +1,22 @@
.design-wrap {
.design-header {
background-color: orange;
height: 80px;
}
.design-content {
background-color: red;
height: calc(100vh - 80px);
.design-panel-box {
background-color: deeppink;
width: 64px;
}
.design-logic-flow-box {
background-color: greenyellow;
width: calc((100% - 64px) * 0.4745);
}
.design-content-right {
background-color: blue;
width: calc((100% - 64px) * 0.5255);
}
}
}

@ -0,0 +1,3 @@
@import url("./base.scss");
@import url("./design.scss");

@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

@ -0,0 +1,21 @@
<!--
* @Author: donghao donghao@supervision.ltd
* @Date: 2025-07-03 10:37:10
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2025-07-03 10:41:34
* @FilePath: \electron-project\Robot-Al\Robot-Al-Platform-Web\src\renderer\src\views\Design\Controls\headCtrl.vue
* @Description: 顶部栏
-->
<template>
<div class="head-controls-wrap">
<ul class="flex">
<li
v-for="(v, k) in ['文件', '编辑', '视图', '工具', '窗口', '帮助']"
:key="k"
class="flex flex-center"
>
{{ v }}
</li>
</ul>
</div>
</template>

@ -0,0 +1,9 @@
<template>
<div class="nav-controls-wrap">
<ul class="flex">
<li v-for="(v, k) in ['保存', '上一步', '下一步', '退出']" :key="k" class="flex flex-center">
{{ v }}
</li>
</ul>
</div>
</template>

@ -0,0 +1,3 @@
<template>
<div>123</div>
</template>

@ -0,0 +1,13 @@
<!--
* @Author: donghao donghao@supervision.ltd
* @Date: 2025-07-03 11:12:04
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2025-07-03 11:12:10
* @FilePath: \electron-project\Robot-Al\Robot-Al-Platform-Web\src\renderer\src\views\Design\Settings\setPermissions.vue
* @Description: 设置权限
-->
<template>
<div>
<h1>设置权限</h1>
</div>
</template>

@ -0,0 +1,11 @@
<!--
* @Author: donghao donghao@supervision.ltd
* @Date: 2025-07-03 10:27:47
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2025-07-03 13:44:43
* @FilePath: \electron-project\Robot-Al\Robot-Al-Platform-Web\src\renderer\src\views\Design\Workflow\logicFlowView.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="h-full logic-flow-view-wrap">画布</div>
</template>

@ -0,0 +1,3 @@
<template>
<div class="output-view-wrap">输出结果</div>
</template>

@ -0,0 +1,11 @@
<!--
* @Author: donghao donghao@supervision.ltd
* @Date: 2025-07-03 10:29:49
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2025-07-03 13:45:08
* @FilePath: \Robot-Al-Platform-Web\src\renderer\src\views\Design\Workflow\resultsView.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="logic-flow-view-wrap bg-[#242529]">历史结果</div>
</template>

@ -0,0 +1,39 @@
<!--
* @Author: donghao donghao@supervision.ltd
* @Date: 2025-07-02 16:17:29
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2025-07-03 13:49:21
* @FilePath: \electron-project\Robot-Al\Robot-Al-Platform-Web\src\renderer\src\views\Design\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="design-wrap">
<div class="design-header">
<HeadCtrl />
<NavCtrl />
</div>
<div class="flex design-content">
<!-- 侧边栏--流程操作 -->
<PanelCtrl class="design-panel-box" />
<!-- 流程画布 -->
<LogicFlowView class="design-logic-flow-box" />
<div class="design-content-right">
<!-- 输出内容 -->
<OutputView />
<!-- 历史结果 -->
<ResultsView />
</div>
</div>
</div>
</template>
<script setup lang="ts">
import HeadCtrl from './Controls/headCtrl.vue'
import NavCtrl from './Controls/navCtrl.vue'
import PanelCtrl from './Controls/panelCtrl.vue'
import LogicFlowView from './Workflow/logicFlowView.vue'
import OutputView from './Workflow/outputView.vue'
import ResultsView from './Workflow/resultsView.vue'
const count = ref(0)
</script>

@ -1,3 +1,11 @@
<!--
* @Author: donghao donghao@supervision.ltd
* @Date: 2025-07-02 13:17:44
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2025-07-02 16:12:35
* @FilePath: \electron-project\Robot-Al\Robot-Al-Platform-Web\src\renderer\src\views\Home\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div>Home </div>
<div>Home</div>
</template>

@ -0,0 +1,26 @@
module.exports = {
content: [
'./index.html',
'./src/renderer/**/*.{vue,js,ts,jsx,tsx}'
],
theme: {
extend: {
colors: {
primary: {
light: '#409EFF',
DEFAULT: '#3375b9',
dark: '#2a598a'
},
dark: {
800: '#374151',
900: '#1f2937'
}
},
boxShadow: {
'card': '0 4px 6px rgba(0, 0, 0, 0.1)',
'card-hover': '0 10px 15px rgba(0, 0, 0, 0.1)'
}
},
},
plugins: [],
}

@ -2,25 +2,27 @@
"files": [],
"references": [{ "path": "./tsconfig.node.json" }, { "path": "./tsconfig.web.json" }],
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"strict": true,
"jsx": "preserve",
"jsxFactory": "h",
"jsxFragmentFactory": "Fragment",
"moduleResolution": "Node",
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"sourceMap": true,
"baseUrl": ".",
"lib": ["ESNext", "DOM"],
"paths": {
"@renderer": [
"./src/renderer/src"
],
"@views": [
"./src/renderer/src/views"
],
"@components": [
"./src/renderer/src/components"
],
"@router": [
"./src/renderer/src/router"
],
"@store": [
"./src/renderer/src/store"
],
"@utils": [
"./src/renderer/src/utils"
]
}
"@renderer": ["./src/renderer/src"],
"@views": ["./src/renderer/src/views"],
"@components": ["./src/renderer/src/components"],
"@router": ["./src/renderer/src/router"],
"@store": ["./src/renderer/src/store"],
"@utils": ["./src/renderer/src/utils"]
}
},
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"]
}

@ -10,6 +10,9 @@
"composite": true,
"baseUrl": ".",
"paths": {
"@/*": [
"src/*"
],
"@renderer/*": [
"src/renderer/src/*"
],

Loading…
Cancel
Save