diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..e6178df
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,14 @@
+.vite-ssg-temp
+
+node_modules
+.DS_Store
+dist
+dist-ssr
+*.local
+
+# lock
+yarn.lock
+package-lock.json
+pnpm-lock.yaml
+
+*.log
diff --git a/.npmrc b/.npmrc
new file mode 100644
index 0000000..cf04042
--- /dev/null
+++ b/.npmrc
@@ -0,0 +1,2 @@
+shamefully-hoist=true
+strict-peer-dependencies=false
diff --git a/.vscode/extensions.json b/.vscode/extensions.json
new file mode 100644
index 0000000..10f88f2
--- /dev/null
+++ b/.vscode/extensions.json
@@ -0,0 +1,4 @@
+
+{
+ "recommendations": ["Vue.volar"]
+}
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..bd0a365
--- /dev/null
+++ b/README.md
@@ -0,0 +1,16 @@
+
+
lowflow-design 低代码流程设计器
+
+
+## 介绍
+lowflow-design是一个基于`Vue3`,`Vite`,`TypeScript`,`Element-Plus`等技术栈开发的,适用于低代码或无代码开发平台的流程设计器。
+让普通人也能通过简单配置快速搭建流程。
+
+## 示例图
+
+
+## 一键转BPMN(暂不开源)
+
+
+## 加微信拉入群聊
+
diff --git a/index.html b/index.html
new file mode 100644
index 0000000..65cd05f
--- /dev/null
+++ b/index.html
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+ lowflow-design
+
+
+
+
+
+
+
+
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..656fdab
--- /dev/null
+++ b/package.json
@@ -0,0 +1,30 @@
+{
+ "name": "lowflow-design",
+ "private": true,
+ "version": "0.1.0",
+ "scripts": {
+ "dev": "vite",
+ "build": "vite build",
+ "generate": "vite-ssg build",
+ "preview": "vite preview",
+ "typecheck": "vue-tsc --noEmit"
+ },
+ "dependencies": {
+ "element-plus": "^2.3.12",
+ "vue": "^3.3.4"
+ },
+ "devDependencies": {
+ "@iconify-json/ep": "^1.1.12",
+ "@types/node": "^20.6.0",
+ "@vitejs/plugin-vue": "^4.3.4",
+ "sass": "^1.66.1",
+ "typescript": "^5.2.2",
+ "unocss": "^0.55.7",
+ "unplugin-vue-components": "^0.25.2",
+ "vite-plugin-vue-setup-extend": "^0.4.0",
+ "vite": "^4.4.9",
+ "vite-ssg": "^0.23.1",
+ "vue-tsc": "^1.8.11"
+ },
+ "license": "MIT"
+}
diff --git a/public/CNAME b/public/CNAME
new file mode 100644
index 0000000..134a589
--- /dev/null
+++ b/public/CNAME
@@ -0,0 +1 @@
+vite-starter.element-plus.org
diff --git a/public/bpmn.png b/public/bpmn.png
new file mode 100644
index 0000000..9501cd2
Binary files /dev/null and b/public/bpmn.png differ
diff --git a/public/dark.png b/public/dark.png
new file mode 100644
index 0000000..16e9a13
Binary files /dev/null and b/public/dark.png differ
diff --git a/public/element-plus-logo-small.svg b/public/element-plus-logo-small.svg
new file mode 100644
index 0000000..d36887c
--- /dev/null
+++ b/public/element-plus-logo-small.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/public/favicon.svg b/public/favicon.svg
new file mode 100644
index 0000000..d36887c
--- /dev/null
+++ b/public/favicon.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/public/flow.png b/public/flow.png
new file mode 100644
index 0000000..31c9ff6
Binary files /dev/null and b/public/flow.png differ
diff --git a/public/penal.png b/public/penal.png
new file mode 100644
index 0000000..0cae9d7
Binary files /dev/null and b/public/penal.png differ
diff --git a/public/vite.svg b/public/vite.svg
new file mode 100644
index 0000000..e7b8dfb
--- /dev/null
+++ b/public/vite.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/public/wx.jpg b/public/wx.jpg
new file mode 100644
index 0000000..2bb3aa3
Binary files /dev/null and b/public/wx.jpg differ
diff --git a/src/App.vue b/src/App.vue
new file mode 100644
index 0000000..ecc2452
--- /dev/null
+++ b/src/App.vue
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/assets/vue.svg b/src/assets/vue.svg
new file mode 100644
index 0000000..ca8129c
--- /dev/null
+++ b/src/assets/vue.svg
@@ -0,0 +1 @@
+
diff --git a/src/components.d.ts b/src/components.d.ts
new file mode 100644
index 0000000..739237f
--- /dev/null
+++ b/src/components.d.ts
@@ -0,0 +1,31 @@
+/* eslint-disable */
+/* prettier-ignore */
+// @ts-nocheck
+// Generated by unplugin-vue-components
+// Read more: https://github.com/vuejs/core/pull/3399
+export {}
+
+declare module 'vue' {
+ export interface GlobalComponents {
+ ElButton: typeof import('element-plus/es')['ElButton']
+ ElCard: typeof import('element-plus/es')['ElCard']
+ ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
+ ElDrawer: typeof import('element-plus/es')['ElDrawer']
+ ElForm: typeof import('element-plus/es')['ElForm']
+ ElFormItem: typeof import('element-plus/es')['ElFormItem']
+ ElIcon: typeof import('element-plus/es')['ElIcon']
+ ElInput: typeof import('element-plus/es')['ElInput']
+ ElLink: typeof import('element-plus/es')['ElLink']
+ ElOption: typeof import('element-plus/es')['ElOption']
+ ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm']
+ ElPopover: typeof import('element-plus/es')['ElPopover']
+ ElRadio: typeof import('element-plus/es')['ElRadio']
+ ElRadioButton: typeof import('element-plus/es')['ElRadioButton']
+ ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
+ ElSelect: typeof import('element-plus/es')['ElSelect']
+ ElTabPane: typeof import('element-plus/es')['ElTabPane']
+ ElTabs: typeof import('element-plus/es')['ElTabs']
+ ElText: typeof import('element-plus/es')['ElText']
+ Segmented: typeof import('./components/Segmented/index.ts')['default']
+ }
+}
diff --git a/src/components/Segmented/index.ts b/src/components/Segmented/index.ts
new file mode 100644
index 0000000..5ca963f
--- /dev/null
+++ b/src/components/Segmented/index.ts
@@ -0,0 +1,5 @@
+import Segmented from './src/index.vue'
+
+export default Segmented
+
+export * from './src/index.vue'
diff --git a/src/components/Segmented/src/index.vue b/src/components/Segmented/src/index.vue
new file mode 100644
index 0000000..849594d
--- /dev/null
+++ b/src/components/Segmented/src/index.vue
@@ -0,0 +1,103 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/composables/dark.ts b/src/composables/dark.ts
new file mode 100644
index 0000000..f8e43a7
--- /dev/null
+++ b/src/composables/dark.ts
@@ -0,0 +1,4 @@
+import { useDark, useToggle } from "@vueuse/core";
+
+export const isDark = useDark();
+export const toggleDark = useToggle(isDark);
diff --git a/src/composables/index.ts b/src/composables/index.ts
new file mode 100644
index 0000000..377c048
--- /dev/null
+++ b/src/composables/index.ts
@@ -0,0 +1 @@
+export * from "./dark";
diff --git a/src/env.d.ts b/src/env.d.ts
new file mode 100644
index 0000000..9b4c650
--- /dev/null
+++ b/src/env.d.ts
@@ -0,0 +1,7 @@
+///
+
+declare module '*.vue' {
+ import { DefineComponent } from 'vue'
+ const component: DefineComponent<{}, {}, any>
+ export default component
+}
diff --git a/src/main.ts b/src/main.ts
new file mode 100644
index 0000000..4ecad4f
--- /dev/null
+++ b/src/main.ts
@@ -0,0 +1,20 @@
+import { createApp } from "vue";
+import App from "./App.vue";
+
+// import "~/styles/element/index.scss";
+
+// import ElementPlus from "element-plus";
+// import all element css, uncommented next line
+// import "element-plus/dist/index.css";
+
+// or use cdn, uncomment cdn link in `index.html`
+
+import "~/styles/index.scss";
+import "uno.css";
+
+// If you want to use ElMessage, import it.
+import "element-plus/theme-chalk/src/message.scss";
+
+const app = createApp(App);
+// app.use(ElementPlus);
+app.mount("#app");
diff --git a/src/styles/element/dark.scss b/src/styles/element/dark.scss
new file mode 100644
index 0000000..05dbe31
--- /dev/null
+++ b/src/styles/element/dark.scss
@@ -0,0 +1,11 @@
+// only scss variables
+
+$--colors: (
+ "primary": (
+ "base": #589ef8,
+ ),
+);
+
+@forward "element-plus/theme-chalk/src/dark/var.scss" with (
+ $colors: $--colors
+);
diff --git a/src/styles/element/index.scss b/src/styles/element/index.scss
new file mode 100644
index 0000000..eb5d975
--- /dev/null
+++ b/src/styles/element/index.scss
@@ -0,0 +1,42 @@
+$--colors: (
+ "primary": (
+ "base": #589ef8,
+ ),
+ "success": (
+ "base": #21ba45,
+ ),
+ "warning": (
+ "base": #f2711c,
+ ),
+ "danger": (
+ "base": #db2828,
+ ),
+ "error": (
+ "base": #db2828,
+ ),
+ "info": (
+ "base": #42b8dd,
+ ),
+);
+
+// we can add this to custom namespace, default is 'el'
+@forward "element-plus/theme-chalk/src/mixins/config.scss" with (
+ $namespace: "el"
+);
+
+// You should use them in scss, because we calculate it by sass.
+// comment next lines to use default color
+@forward "element-plus/theme-chalk/src/common/var.scss" with (
+ // do not use same name, it will override.
+ $colors: $--colors,
+ $button-padding-horizontal: ("default": 50px)
+);
+
+// if you want to import all
+// @use "element-plus/theme-chalk/src/index.scss" as *;
+
+// You can comment it to hide debug info.
+// @debug $--colors;
+
+// custom dark variables
+@use "./dark.scss";
diff --git a/src/styles/index.scss b/src/styles/index.scss
new file mode 100644
index 0000000..063174a
--- /dev/null
+++ b/src/styles/index.scss
@@ -0,0 +1,59 @@
+// import dark theme
+@use "element-plus/theme-chalk/src/dark/css-vars.scss" as *;
+
+:root {
+ .el-segmented {
+ --el-segmented-radius: var(--el-border-radius-base);
+ --el-segmented-padding: 3px;
+ --el-segmented-bg: var(--el-fill-color-light);
+ --el-segmented-height: 28px;
+ --el-segmented-font-size: 14px;
+ --el-segmented-item-padding: 12px;
+ --el-segmented-color: var(--el-text-color-secondary);
+ --el-segmented-active-color: var(--el-text-color-primary);
+ --el-segmented-active-bg: var(--el-bg-color-overlay);
+ --el-segmented-active-shadow: 0 1px 3px 0 rgba(0, 0, 0, .08);
+ --el-segmented-hover-bg: rgba(0, 0, 0, .04);
+ --el-segmented-disabled-color: var(--el-text-color-placeholder);
+ }
+}
+
+// 自定义抽屉样式
+.el-drawer {
+ // 抽屉头部
+ .el-drawer__header {
+ margin-bottom: 0;
+ padding: calc(var(--el-drawer-padding-primary) - 5px) var(--el-drawer-padding-primary) calc(var(--el-drawer-padding-primary) - 6px);
+ border-bottom: 1px var(--el-border-style) var(--el-border-color);
+ justify-content: space-between;
+ // 抽屉标题
+ .el-drawer__title {
+ border-left: 3px solid var(--el-color-primary);
+ padding-left: 5px;
+ }
+ }
+
+ .el-drawer__footer {
+ border-top: var(--el-border);
+ padding: calc(var(--el-drawer-padding-primary) - 5px)
+ }
+}
+
+body {
+ font-family: Inter, system-ui, Avenir, "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB",
+ "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+ margin: 0;
+}
+
+a {
+ color: var(--el-color-primary);
+}
+
+code {
+ border-radius: 2px;
+ padding: 2px 4px;
+ background-color: var(--el-color-primary-light-9);
+ color: var(--el-color-primary);
+}
diff --git a/src/views/flowDesign/hooks/useNode.ts b/src/views/flowDesign/hooks/useNode.ts
new file mode 100644
index 0000000..f3514df
--- /dev/null
+++ b/src/views/flowDesign/hooks/useNode.ts
@@ -0,0 +1,159 @@
+import {FlowNode} from '../nodes/Node/index'
+import {ExclusiveNode} from '../nodes/Exclusive/index'
+import {BranchNode} from '../nodes/Branch/index'
+import {ConditionNode} from '../nodes/Condition/index'
+import {ApprovalNode} from '../nodes/Approval/index'
+import {CcNode} from '../nodes/Cc/index'
+
+const useNode = (node: FlowNode) => {
+ /**
+ * 生成节点id
+ */
+ const generateId = (): string => {
+ return `field-${Math.random().toString(36).substr(5)}`
+ }
+ /**
+ * 添加条件
+ * @param currentNode
+ */
+ const addConnection = (currentNode: FlowNode) => {
+ const exclusive = currentNode as ExclusiveNode
+ exclusive.children.unshift({
+ id: generateId(),
+ pid: currentNode.id,
+ type: 'condition',
+ def: false,
+ name: `条件${exclusive.children.length + 1}`,
+ child: null
+ } as ConditionNode)
+ }
+ /**
+ * 添加审批
+ * @param currentNode
+ */
+ const addApproval = (currentNode: FlowNode) => {
+ const child = currentNode.child
+ const id = generateId()
+ currentNode.child = {
+ id: id,
+ pid: currentNode.id,
+ type: 'approval',
+ name: '审批人',
+ child: child,
+ // 属性
+ assigneeType: 'user',
+ users: [],
+ roles: [],
+ leader: 1,
+ self: false,
+ nobody: 'reject'
+ } as ApprovalNode
+ if (child) {
+ child.pid = id
+ }
+ }
+ /**
+ * 添加抄送
+ * @param currentNode
+ */
+ const addCc = (currentNode: FlowNode) => {
+ const child = currentNode.child
+ const id = generateId()
+ currentNode.child = {
+ id: id,
+ pid: currentNode.id,
+ type: 'cc',
+ name: '抄送人',
+ child: child,
+ users: []
+ } as CcNode
+ if (child) {
+ child.pid = id
+ }
+ }
+ /**
+ * 添加网关
+ * @param currentNode
+ */
+ const addExclusive = (currentNode: FlowNode) => {
+ const child = currentNode.child
+ const id = generateId()
+ const exclusiveNode = {
+ id: id,
+ pid: currentNode.id,
+ type: 'exclusive',
+ name: '独占网关',
+ child: child,
+ children: []
+ } as ExclusiveNode
+ currentNode.child = exclusiveNode
+ if (child) {
+ child.pid = id
+ }
+ addConnection(currentNode.child)
+ addConnection(currentNode.child)
+ if (exclusiveNode.children.length > 0) {
+ const condition = exclusiveNode.children[exclusiveNode.children.length - 1] as ConditionNode
+ condition.def = true
+ condition.name = '默认条件'
+ }
+ }
+
+ const addNodes: Record void> = {
+ condition: addConnection,
+ approval: addApproval,
+ cc: addCc,
+ exclusive: addExclusive
+ }
+
+ const addNode = (type: string, currentNode: FlowNode) => {
+ const fun = addNodes[type]
+ if (fun) {
+ fun(currentNode)
+ }
+ }
+
+ const delNode = (del: FlowNode) => {
+ delNodeNext(node, del)
+ }
+ const delNodeNext = (next: FlowNode, del: FlowNode) => {
+ if (next.id === del.pid) {
+ if ('children' in next && next.child?.id !== del.id) {
+ const branchNode = next as BranchNode
+ const index = branchNode.children.findIndex(item => item.id === del.id)
+ if (index !== -1) {
+ if (branchNode.children.length <= 2) {
+ delNode(branchNode)
+ } else {
+ branchNode.children.splice(index, 1)
+ }
+ }
+ } else {
+ if (del.child && del.child.pid) {
+ del.child.pid = next.id
+ }
+ next.child = del.child
+ }
+ } else {
+ if (next.child) {
+ delNodeNext(next.child, del)
+ }
+ if ('children' in next) {
+ const nextBranch = next as BranchNode
+ if (nextBranch.children && nextBranch.children.length > 0) {
+ nextBranch.children.forEach(item => {
+ delNodeNext(item, del)
+ })
+ }
+ }
+
+ }
+ }
+
+ return {
+ addNode,
+ delNode
+ }
+}
+
+export default useNode
diff --git a/src/views/flowDesign/index.vue b/src/views/flowDesign/index.vue
new file mode 100644
index 0000000..29f1d8a
--- /dev/null
+++ b/src/views/flowDesign/index.vue
@@ -0,0 +1,112 @@
+
+
+
+
+
+
+
+ {{ zoom }}%
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/flowDesign/nodes/Add/index.ts b/src/views/flowDesign/nodes/Add/index.ts
new file mode 100644
index 0000000..9d02353
--- /dev/null
+++ b/src/views/flowDesign/nodes/Add/index.ts
@@ -0,0 +1,4 @@
+import { FlowNode } from '../Node/index'
+export interface AddNode extends FlowNode {
+
+}
diff --git a/src/views/flowDesign/nodes/Add/index.vue b/src/views/flowDesign/nodes/Add/index.vue
new file mode 100644
index 0000000..de52ea0
--- /dev/null
+++ b/src/views/flowDesign/nodes/Add/index.vue
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+
+
+
+
+ 审批人
+
+
+
+
+
+
+ 互斥分支
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/flowDesign/nodes/Approval/content.vue b/src/views/flowDesign/nodes/Approval/content.vue
new file mode 100644
index 0000000..61ec4e2
--- /dev/null
+++ b/src/views/flowDesign/nodes/Approval/content.vue
@@ -0,0 +1,48 @@
+
+
+
+
+ {{ content || node.name }}
+
+
+
+
\ No newline at end of file
diff --git a/src/views/flowDesign/nodes/Approval/index.ts b/src/views/flowDesign/nodes/Approval/index.ts
new file mode 100644
index 0000000..ab98a40
--- /dev/null
+++ b/src/views/flowDesign/nodes/Approval/index.ts
@@ -0,0 +1,16 @@
+import {FlowNode} from '../Node/index'
+
+export interface ApprovalNode extends FlowNode {
+ // 审批方式
+ assigneeType: 'user' | 'role' | 'self_select' | 'self' | 'leader' | 'form_user'
+ // 审批人
+ users: string[]
+ // 审批角色
+ roles: string[]
+ // 主管
+ leader: number
+ // 自选:true-多选,false-单选
+ self: boolean
+ // 审批人为空时处理方式:reject-驳回,admin-管理员,pass-通过
+ nobody: 'reject' | 'pass'
+}
diff --git a/src/views/flowDesign/nodes/Approval/index.vue b/src/views/flowDesign/nodes/Approval/index.vue
new file mode 100644
index 0000000..551c902
--- /dev/null
+++ b/src/views/flowDesign/nodes/Approval/index.vue
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/views/flowDesign/nodes/Branch/index.ts b/src/views/flowDesign/nodes/Branch/index.ts
new file mode 100644
index 0000000..39c3547
--- /dev/null
+++ b/src/views/flowDesign/nodes/Branch/index.ts
@@ -0,0 +1,5 @@
+import {FlowNode} from '../Node/index'
+
+export interface BranchNode extends FlowNode{
+ children: FlowNode[];
+}
diff --git a/src/views/flowDesign/nodes/Branch/index.vue b/src/views/flowDesign/nodes/Branch/index.vue
new file mode 100644
index 0000000..ad40dc1
--- /dev/null
+++ b/src/views/flowDesign/nodes/Branch/index.vue
@@ -0,0 +1,128 @@
+
+
+
+
+
+ addNode(type,node)" class="branch-but"/>
+
+
+
diff --git a/src/views/flowDesign/nodes/Cc/content.vue b/src/views/flowDesign/nodes/Cc/content.vue
new file mode 100644
index 0000000..5d43c62
--- /dev/null
+++ b/src/views/flowDesign/nodes/Cc/content.vue
@@ -0,0 +1,30 @@
+
+
+
+
+ {{ content || node.name }}
+
+
+
+
\ No newline at end of file
diff --git a/src/views/flowDesign/nodes/Cc/index.ts b/src/views/flowDesign/nodes/Cc/index.ts
new file mode 100644
index 0000000..8ac153e
--- /dev/null
+++ b/src/views/flowDesign/nodes/Cc/index.ts
@@ -0,0 +1,4 @@
+import { FlowNode } from '../Node/index'
+export interface CcNode extends FlowNode {
+ users: string[]
+}
\ No newline at end of file
diff --git a/src/views/flowDesign/nodes/Cc/index.vue b/src/views/flowDesign/nodes/Cc/index.vue
new file mode 100644
index 0000000..6bb4f44
--- /dev/null
+++ b/src/views/flowDesign/nodes/Cc/index.vue
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/views/flowDesign/nodes/Condition/content.vue b/src/views/flowDesign/nodes/Condition/content.vue
new file mode 100644
index 0000000..d0acfc6
--- /dev/null
+++ b/src/views/flowDesign/nodes/Condition/content.vue
@@ -0,0 +1,29 @@
+
+
+
+
+ {{ content || node.name }}
+
+
+
+
\ No newline at end of file
diff --git a/src/views/flowDesign/nodes/Condition/index.ts b/src/views/flowDesign/nodes/Condition/index.ts
new file mode 100644
index 0000000..22eb53d
--- /dev/null
+++ b/src/views/flowDesign/nodes/Condition/index.ts
@@ -0,0 +1,4 @@
+import { FlowNode } from '../Node/index'
+export interface ConditionNode extends FlowNode {
+ def: boolean
+}
diff --git a/src/views/flowDesign/nodes/Condition/index.vue b/src/views/flowDesign/nodes/Condition/index.vue
new file mode 100644
index 0000000..bfd1baa
--- /dev/null
+++ b/src/views/flowDesign/nodes/Condition/index.vue
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/flowDesign/nodes/End/index.ts b/src/views/flowDesign/nodes/End/index.ts
new file mode 100644
index 0000000..6b3aa18
--- /dev/null
+++ b/src/views/flowDesign/nodes/End/index.ts
@@ -0,0 +1,4 @@
+import { FlowNode } from '../Node/index'
+export interface EndNode extends FlowNode {
+
+}
diff --git a/src/views/flowDesign/nodes/End/index.vue b/src/views/flowDesign/nodes/End/index.vue
new file mode 100644
index 0000000..77ceb45
--- /dev/null
+++ b/src/views/flowDesign/nodes/End/index.vue
@@ -0,0 +1,35 @@
+
+
+
+
+
+ 结束
+
+
+
+
+
diff --git a/src/views/flowDesign/nodes/Exclusive/index.ts b/src/views/flowDesign/nodes/Exclusive/index.ts
new file mode 100644
index 0000000..1344885
--- /dev/null
+++ b/src/views/flowDesign/nodes/Exclusive/index.ts
@@ -0,0 +1,4 @@
+import {BranchNode} from '../Branch/index'
+export interface ExclusiveNode extends BranchNode {
+
+}
diff --git a/src/views/flowDesign/nodes/Exclusive/index.vue b/src/views/flowDesign/nodes/Exclusive/index.vue
new file mode 100644
index 0000000..1e4265e
--- /dev/null
+++ b/src/views/flowDesign/nodes/Exclusive/index.vue
@@ -0,0 +1,25 @@
+
+
+
+
+ 添加条件
+
+
+
+
\ No newline at end of file
diff --git a/src/views/flowDesign/nodes/Node/index.ts b/src/views/flowDesign/nodes/Node/index.ts
new file mode 100644
index 0000000..f63f3c7
--- /dev/null
+++ b/src/views/flowDesign/nodes/Node/index.ts
@@ -0,0 +1,8 @@
+export interface FlowNode {
+ id: string;
+ pid: string | null;
+ name: string;
+ type: string;
+ child: FlowNode | null;
+ props?: Record;
+}
diff --git a/src/views/flowDesign/nodes/Node/index.vue b/src/views/flowDesign/nodes/Node/index.vue
new file mode 100644
index 0000000..3a5a0e4
--- /dev/null
+++ b/src/views/flowDesign/nodes/Node/index.vue
@@ -0,0 +1,160 @@
+
+
+
+
+
+
+
+
+
+ {{ node.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
addNode(type,node)"/>
+
+
+
+
diff --git a/src/views/flowDesign/nodes/Start/content.vue b/src/views/flowDesign/nodes/Start/content.vue
new file mode 100644
index 0000000..36c42ce
--- /dev/null
+++ b/src/views/flowDesign/nodes/Start/content.vue
@@ -0,0 +1,25 @@
+
+
+
+
+ {{ content || node.name }}
+
+
+
+
\ No newline at end of file
diff --git a/src/views/flowDesign/nodes/Start/index.ts b/src/views/flowDesign/nodes/Start/index.ts
new file mode 100644
index 0000000..01a950a
--- /dev/null
+++ b/src/views/flowDesign/nodes/Start/index.ts
@@ -0,0 +1,4 @@
+import { FlowNode } from '../Node/index'
+export interface StartNode extends FlowNode {
+
+}
diff --git a/src/views/flowDesign/nodes/Start/index.vue b/src/views/flowDesign/nodes/Start/index.vue
new file mode 100644
index 0000000..242581d
--- /dev/null
+++ b/src/views/flowDesign/nodes/Start/index.vue
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/flowDesign/nodes/index.vue b/src/views/flowDesign/nodes/index.vue
new file mode 100644
index 0000000..0cbc631
--- /dev/null
+++ b/src/views/flowDesign/nodes/index.vue
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/views/flowDesign/penal/ApprovalAttr.vue b/src/views/flowDesign/penal/ApprovalAttr.vue
new file mode 100644
index 0000000..b8244a6
--- /dev/null
+++ b/src/views/flowDesign/penal/ApprovalAttr.vue
@@ -0,0 +1,87 @@
+
+
+
+
+
+
+
+
+ 指定人员
+ 指定角色
+ 发起人自选
+ 发起人自己
+ 多级上级
+ 表单内人员
+ 表单内角色
+
+
+
+ 待添加...
+
+
+
+ 单选
+ 多选
+
+
+
+
+ 发起人自己作为审批人进行审批
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 待添加...
+
+
+ 待添加...
+
+
+
+
+ 自动通过
+ 自动驳回
+
+
+
+
+
+ 表单权限设置
+
+
+ 操作权限
+
+
+
+
+
diff --git a/src/views/flowDesign/penal/CcAttr.vue b/src/views/flowDesign/penal/CcAttr.vue
new file mode 100644
index 0000000..e4413fb
--- /dev/null
+++ b/src/views/flowDesign/penal/CcAttr.vue
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+ 待添加...
+
+
+
+
+ 表单权限设置
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/flowDesign/penal/StartAttr.vue b/src/views/flowDesign/penal/StartAttr.vue
new file mode 100644
index 0000000..3c08ae7
--- /dev/null
+++ b/src/views/flowDesign/penal/StartAttr.vue
@@ -0,0 +1,30 @@
+
+
+
+
+
+ 表单权限设置
+
+
+ 操作权限设置
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/flowDesign/penal/index.vue b/src/views/flowDesign/penal/index.vue
new file mode 100644
index 0000000..879b36b
--- /dev/null
+++ b/src/views/flowDesign/penal/index.vue
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+
+
+ {{ flowNode!.name }}
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tsconfig.json b/tsconfig.json
new file mode 100644
index 0000000..f49dd85
--- /dev/null
+++ b/tsconfig.json
@@ -0,0 +1,23 @@
+{
+ "compilerOptions": {
+ "baseUrl": ".",
+ "target": "esnext",
+ "useDefineForClassFields": true,
+ "module": "esnext",
+ "moduleResolution": "node",
+ "strict": true,
+ "jsx": "preserve",
+ "sourceMap": true,
+ "resolveJsonModule": true,
+ "esModuleInterop": true,
+ "lib": ["esnext", "dom"],
+ "paths": {
+ "~/*": ["src/*"]
+ },
+ "skipLibCheck": true
+ },
+ "vueCompilerOptions": {
+ "target": 3
+ },
+ "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"]
+}
diff --git a/vite.config.ts b/vite.config.ts
new file mode 100644
index 0000000..aa36489
--- /dev/null
+++ b/vite.config.ts
@@ -0,0 +1,67 @@
+import path from 'path'
+import { defineConfig } from 'vite'
+import vue from '@vitejs/plugin-vue'
+
+import Components from 'unplugin-vue-components/vite'
+import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
+import VueSetupExtend from 'vite-plugin-vue-setup-extend'
+
+import Unocss from 'unocss/vite'
+import {
+ presetAttributify,
+ presetIcons,
+ presetUno,
+ transformerDirectives,
+ transformerVariantGroup,
+} from 'unocss'
+
+const pathSrc = path.resolve(__dirname, 'src')
+
+// https://vitejs.dev/config/
+export default defineConfig({
+ resolve: {
+ alias: {
+ '~/': `${pathSrc}/`,
+ },
+ },
+ css: {
+ preprocessorOptions: {
+ scss: {
+ additionalData: `@use "~/styles/element/index.scss" as *;`,
+ },
+ },
+ },
+ plugins: [
+ vue(),
+ VueSetupExtend(),
+ Components({
+ // allow auto load markdown components under `./src/components/`
+ extensions: ['ts'],
+ // allow auto import and register components used in markdown
+ include: [/\.vue$/, /\.vue\?vue/, /\.md$/, /\.[tj]sx?$/],
+ resolvers: [
+ ElementPlusResolver({
+ importStyle: 'sass',
+ }),
+ ],
+ dts: 'src/components.d.ts',
+ }),
+
+ // https://github.com/antfu/unocss
+ // see unocss.config.ts for config
+ Unocss({
+ presets: [
+ presetUno(),
+ presetAttributify(),
+ presetIcons({
+ scale: 1.2,
+ warn: true,
+ }),
+ ],
+ transformers: [
+ transformerDirectives(),
+ transformerVariantGroup(),
+ ]
+ }),
+ ],
+})