From de7e6c408b6209158b08991d729c4bcc72055eec Mon Sep 17 00:00:00 2001 From: Ben Lin <maobin001@msn.com> Date: 星期四, 20 六月 2024 00:30:52 +0800 Subject: [PATCH] 产品工艺路线 --- src/api/tigerapi/model/router.ts | 12 src/assets/icons/workshop.svg | 1 src/api/tigerapi/mes/mesApi.ts | 7 src/views/tigerprojects/wms/warehousemodel/RegionModal.vue | 2 src/views/tigerprojects/system/lowcode/detail/index.vue | 8 src/components/TigerTree/src/types/tree.ts | 2 src/assets/icons/line.svg | 2 .vscode/extensions.json | 17 src/assets/icons/rot_action.svg | 1 src/assets/icons/add_01.svg | 1 src/views/tigerprojects/system/lowcode/composition/CustTree.vue | 57 +++ src/assets/icons/position.svg | 1 src/views/tigerprojects/system/lowcode/composition/DeptModal.vue | 4 internal/vite-config/src/plugins/index.ts | 10 src/views/tigerprojects/wms/warehousemodel/WareHouseModal.vue | 2 src/views/tigerprojects/system/lowcode/composition/prodRoute.ts | 35 + src/components/TigerTree/src/components/TreeHeader.vue | 10 src/api/tigerapi/mes/router.ts | 58 ++ src/views/tigerprojects/wms/warehousemodel/ShelfForm.vue | 2 src/views/tigerprojects/wms/warehousemodel/index.vue | 2 .vscode/settings.json | 181 +++++++++ src/api/tigerapi/dept.ts | 8 src/views/tigerprojects/system/lowcode/data.ts | 163 +++++++- src/views/tigerprojects/system/lowcode/high/index.vue | 2 src/assets/icons/node.svg | 1 src/assets/icons/factory.svg | 1 src/assets/icons/route.svg | 1 src/views/tigerprojects/system/lowcode/composition/account.data.ts | 156 ++++++++ src/assets/icons/customer.svg | 1 src/assets/icons/product.svg | 1 src/views/tigerprojects/wms/warehousemodel/ShelfModal.vue | 2 src/views/tigerprojects/wms/warehousemodel/WareHouseTree.vue | 27 src/layouts/default/menu/index.vue | 53 +- src/views/tigerprojects/system/lowcode/composition/index.vue | 268 ++++++++++++-- src/views/tigerprojects/wms/warehousemodel/RegionForm.vue | 2 .env.production | 7 src/views/tigerprojects/wms/warehousemodel/WareHouseForm.vue | 2 src/api/tigerapi/system.ts | 6 src/components/TigerTree/src/TigerTree.vue | 10 39 files changed, 966 insertions(+), 160 deletions(-) diff --git a/.env.production b/.env.production index 42f4563..be2d447 100644 --- a/.env.production +++ b/.env.production @@ -4,7 +4,7 @@ # @version: # @Date: 2024-06-17 14:51:25 # @LastEditors: Ben Lin - # @LastEditTime: 2024-06-18 10:41:08 + # @LastEditTime: 2024-06-18 22:25:27 ### # Whether to open mock VITE_USE_MOCK = false @@ -19,9 +19,6 @@ # Basic interface address SPA -# VITE_GLOB_API_URL=http://172.16.80.40:9527/api -# VITE_GLOB_SYS_API_URL=http://172.16.80.40:9527 -# VITE_GLOB_TSK_API_URL=http://172.16.80.40:9527/api VITE_GLOB_API_URL=http://localhost:9527/api VITE_GLOB_SYS_API_URL=http://localhost:9527 VITE_GLOB_TSK_API_URL=http://localhost:9527/api @@ -30,7 +27,7 @@ # It can be forwarded by nginx or write the actual address directly VITE_GLOB_UPLOAD_URL = /upload # 涓嬭浇鍦板潃 -VITE_GLOB_DOWNLOAD_URL=http://172.16.80.40/files +VITE_GLOB_DOWNLOAD_URL=http://localhost:8800/files # Interface prefix VITE_GLOB_API_URL_PREFIX = diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 6fdde5f..12dc9f2 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,5 +1,14 @@ { - "recommendations": [ - "gamedilong.anes" - ] -} \ No newline at end of file + "recommendations": [ + "vue.volar", + "dbaeumer.vscode-eslint", + "stylelint.vscode-stylelint", + "esbenp.prettier-vscode", + "mrmlnc.vscode-less", + "lokalise.i18n-ally", + "antfu.iconify", + "antfu.unocss", + "mikestead.dotenv", + "warmthsea.vscode-custom-code-color" + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json index 7cba597..e3f166a 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,176 @@ { - "i18n-ally.localesPaths": [ - "src/locales", - "src/locales/lang", - "public/resource/tinymce/langs" - ] -} \ No newline at end of file + "typescript.tsdk": "./node_modules/typescript/lib", + "volar.tsPlugin": true, + "volar.tsPluginStatus": false, + "npm.packageManager": "pnpm", + "editor.tabSize": 2, + "editor.defaultFormatter": "esbenp.prettier-vscode", + "files.eol": "\n", + "search.exclude": { + "**/node_modules": true, + "**/*.log": true, + "**/*.log*": true, + "**/bower_components": true, + "**/dist": true, + "**/elehukouben": true, + "**/.git": true, + "**/.gitignore": true, + "**/.svn": true, + "**/.DS_Store": true, + "**/.idea": true, + "**/.vscode": false, + "**/yarn.lock": true, + "**/tmp": true, + "out": true, + "dist": true, + "node_modules": true, + "CHANGELOG.md": true, + "examples": true, + "res": true, + "screenshots": true, + "yarn-error.log": true, + "**/.yarn": true + }, + "files.exclude": { + "**/.cache": true, + "**/.editorconfig": true, + "**/.eslintcache": true, + "**/bower_components": true, + "**/.idea": true, + "**/tmp": true, + "**/.git": true, + "**/.svn": true, + "**/.hg": true, + "**/CVS": true, + "**/.DS_Store": true + }, + "files.watcherExclude": { + "**/.git/objects/**": true, + "**/.git/subtree-cache/**": true, + "**/.vscode/**": true, + "**/node_modules/**": true, + "**/tmp/**": true, + "**/bower_components/**": true, + "**/dist/**": true, + "**/yarn.lock": true + }, + "stylelint.enable": true, + "stylelint.validate": ["css", "less", "postcss", "scss", "vue", "sass"], + "path-intellisense.mappings": { + "@/": "${workspaceRoot}/src" + }, + "[javascriptreact]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[typescript]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[typescriptreact]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[html]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[css]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[less]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[scss]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[markdown]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "editor.codeActionsOnSave": { + "source.fixAll.eslint": "explicit", + "source.fixAll.stylelint": "explicit" + }, + "[vue]": { + "editor.codeActionsOnSave": { + "source.fixAll.eslint": "explicit", + "source.fixAll.stylelint": "explicit" + }, + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "i18n-ally.localesPaths": ["src/locales/lang"], + "i18n-ally.keystyle": "nested", + "i18n-ally.sortKeys": true, + "i18n-ally.namespace": true, + "i18n-ally.pathMatcher": "{locale}/{namespaces}.{ext}", + "i18n-ally.enabledParsers": ["json", "ts", "js"], + "i18n-ally.sourceLanguage": "zh-CN", + "i18n-ally.displayLanguage": "zh-CN", + "i18n-ally.enabledFrameworks": ["vue", "react"], + "cSpell.words": [ + "antd", + "antv", + "brotli", + "browserslist", + "codemirror", + "commitlint", + "cropperjs", + "echarts", + "esnext", + "esno", + "iconify", + "INTLIFY", + "lintstagedrc", + "logicflow", + "mockjs", + "nprogress", + "pinia", + "pnpm", + "qrcode", + "sider", + "sortablejs", + "stylelint", + "tailwindcss", + "tinymce", + "unocss", + "unref", + "vben", + "vditor", + "Vite", + "vitejs", + "vueuse", + "zxcvbn" + ], + "vetur.format.scriptInitialIndent": true, + "vetur.format.styleInitialIndent": true, + "vetur.validation.script": false, + "MicroPython.executeButton": [ + { + "text": "鈻�", + "tooltip": "杩愯", + "alignment": "left", + "command": "extension.executeFile", + "priority": 3.5 + } + ], + "MicroPython.syncButton": [ + { + "text": "$(sync)", + "tooltip": "鍚屾", + "alignment": "left", + "command": "extension.execute", + "priority": 4 + } + ], + // 鎺у埗鐩稿叧鏂囦欢宓屽灞曠ず + "explorer.fileNesting.enabled": true, + "explorer.fileNesting.expand": false, + "explorer.fileNesting.patterns": { + "*.ts": "$(capture).test.ts, $(capture).test.tsx", + "*.tsx": "$(capture).test.ts, $(capture).test.tsx", + "*.env": "$(capture).env.*", + "CHANGELOG.md": "CHANGELOG*", + "package.json": "pnpm-lock.yaml,pnpm-workspace.yaml,LICENSE,.gitattributes,.gitignore,.gitpod.yml,CNAME,README*,.npmrc,.browserslistrc", + ".eslintrc.cjs": ".eslintignore,.prettierignore,.stylelintignore,.commitlintrc.*,.prettierrc.*,.stylelintrc.*" + }, + "terminal.integrated.scrollback": 10000, + "nuxt.isNuxtApp": false, + "vscodeCustomCodeColor.highlightValue": "v-auth", + "vscodeCustomCodeColor.highlightValueColor": "#6366f1" +} diff --git a/internal/vite-config/src/plugins/index.ts b/internal/vite-config/src/plugins/index.ts index 77b7466..7b38c33 100644 --- a/internal/vite-config/src/plugins/index.ts +++ b/internal/vite-config/src/plugins/index.ts @@ -1,3 +1,11 @@ +/* + * @Description: file content + * @Author: Ben Lin + * @version: + * @Date: 2024-06-18 21:50:22 + * @LastEditors: Ben Lin + * @LastEditTime: 2024-06-18 23:44:19 + */ import vue from '@vitejs/plugin-vue'; import vueJsx from '@vitejs/plugin-vue-jsx'; import { type PluginOption } from 'vite'; @@ -25,7 +33,7 @@ const appConfigPlugin = await createAppConfigPlugin({ root, isBuild }); vitePlugins.push(appConfigPlugin); - vitePlugins.push(DevTools()); + // vitePlugins.push(DevTools()); // vite-plugin-html vitePlugins.push(configHtmlPlugin({ isBuild })); diff --git a/src/api/tigerapi/dept.ts b/src/api/tigerapi/dept.ts index 53c483d..7181c5b 100644 --- a/src/api/tigerapi/dept.ts +++ b/src/api/tigerapi/dept.ts @@ -1,3 +1,11 @@ +/* + * @Description: file content + * @Author: Ben Lin + * @version: + * @Date: 2024-06-18 15:09:47 + * @LastEditors: Ben Lin + * @LastEditTime: 2024-06-19 14:30:04 + */ import { buildUUID } from '../../utils/uuid'; import { ApiActionPage } from '../model/baseModel'; import { DeptListGetResultModel, DeptListItem, DeptPageParams } from './model/systemModel'; diff --git a/src/api/tigerapi/mes/mesApi.ts b/src/api/tigerapi/mes/mesApi.ts index 6b2ed6b..7d5b646 100644 --- a/src/api/tigerapi/mes/mesApi.ts +++ b/src/api/tigerapi/mes/mesApi.ts @@ -3,8 +3,8 @@ * @Author: your name * @version: * @Date: 2024-04-27 15:54:50 - * @LastEditors: your name - * @LastEditTime: 2024-06-12 20:28:14 + * @LastEditors: Ben Lin + * @LastEditTime: 2024-06-19 23:52:56 */ export enum mesApi { GetRoute = '/MES/GetRoute', @@ -17,4 +17,7 @@ SaveMesWs = '/MES/SaveMesWs', DeleteMesWs = '/MES/DeleteMesWs', SaveRouteNodePost = '/MES/SaveRouteNodePost', + GetRoutePTree = '/MES/GetRoutePTree', + RouteToProd = '/MES/RouteToProd', + } diff --git a/src/api/tigerapi/mes/router.ts b/src/api/tigerapi/mes/router.ts index 2a677a0..b231a5b 100644 --- a/src/api/tigerapi/mes/router.ts +++ b/src/api/tigerapi/mes/router.ts @@ -1,10 +1,11 @@ import { ApiAction, ApiActionPage } from '../../model/baseModel'; import { Api, genAction, genActionPage } from '../system'; import { defHttp } from '/@/utils/http/axios'; -import { MES_ROUTE, MES_ROUTE_NODE_POST, RouteData } from '../model/router'; +import { MES_ROUTE, MES_ROUTE_NODE_POST, RouteData, V_MES_ROUTE_PTREE } from '../model/router'; import { mesApi } from './mesApi'; import { useUserStore } from '/@/store/modules/user'; import { RoutePageListGetResultModel, RoutelistPageParams } from '../model/mesModel'; +import { StringLiteral } from 'typescript'; /* * 鑾峰彇宸ヨ壓璺嚎鍒楄〃 @@ -110,13 +111,48 @@ }, ); - export const SaveRouteNodePost = async (params: MES_ROUTE_NODE_POST[]) => { - const data = await defHttp.post( - { url: mesApi.SaveRouteNodePost, params: genAction('MES_ROUTE_NODE_POST', params) }, - { - errorMessageMode: 'none', - isTransformResponse: false, - }, - ); - return data; - }; +export const SaveRouteNodePost = async (params: MES_ROUTE_NODE_POST[]) => { + const data = await defHttp.post( + { url: mesApi.SaveRouteNodePost, params: genAction('MES_ROUTE_NODE_POST', params) }, + { + errorMessageMode: 'none', + isTransformResponse: false, + }, + ); + return data; +}; + +/** + * @description: 鑾峰彇浜у搧宸ヨ壓璺嚎鏍戝舰鏁版嵁 + * @param {string} params + * @return {*} + */ +export async function GetRoutePTree(params?: string) { + const data = await defHttp.get<V_MES_ROUTE_PTREE[]>( + { + url: mesApi.GetRoutePTree, + params: { param: params }, + }, + { + errorMessageMode: 'none', + isTransformResponse: false, + }, + ); + return data; +} + +/** + * @description: 娣诲姞宸ヨ壓绾垮埌浜у搧 + * @param {*} params + * @return {*} + */ +export const RouteToProd = async (params: {}) => { + const data = await defHttp.get( + { url: mesApi.RouteToProd, params: params }, + { + errorMessageMode: 'none', + isTransformResponse: false, + }, + ); + return data; +}; diff --git a/src/api/tigerapi/model/router.ts b/src/api/tigerapi/model/router.ts index 9d18094..72447db 100644 --- a/src/api/tigerapi/model/router.ts +++ b/src/api/tigerapi/model/router.ts @@ -164,3 +164,15 @@ NODE_ID: string; POST_CODE: string; } + +export interface V_MES_ROUTE_PTREE { + pid: string; + id: string; + code: string; + name: string; + type: string; + seq: number; +} + + + diff --git a/src/api/tigerapi/system.ts b/src/api/tigerapi/system.ts index 99980cb..01ccd9d 100644 --- a/src/api/tigerapi/system.ts +++ b/src/api/tigerapi/system.ts @@ -280,9 +280,9 @@ return result; } -export function convertToTree(data: [], parentId: string, id: string, pid?: string) { - const result: any[] = []; - let temp: any[] = []; +export function convertToTree<T>(data: T[], parentId: string, id: string, pid?: string) { + const result: T[] = []; + let temp: T[] = []; const _pid = isNullOrEmpty(pid) ? '' : pid; for (let i = 0; i < data.length; i++) { const currPid = data[i][parentId] == null ? '' : data[i][parentId]; diff --git a/src/assets/icons/add_01.svg b/src/assets/icons/add_01.svg new file mode 100644 index 0000000..4ed6ce9 --- /dev/null +++ b/src/assets/icons/add_01.svg @@ -0,0 +1 @@ +<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1718780808768" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5097" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M939.939489 459.072557 562.339502 459.072557 562.339502 83.519182 462.055494 83.519182 462.055494 459.072557 84.455507 459.072557 84.455507 559.356564 462.055494 559.356564 462.055494 939.003164 562.339502 939.003164 562.339502 559.356564 939.939489 559.356564Z" fill="#272636" p-id="5098"></path></svg> \ No newline at end of file diff --git a/src/assets/icons/customer.svg b/src/assets/icons/customer.svg new file mode 100644 index 0000000..29b5782 --- /dev/null +++ b/src/assets/icons/customer.svg @@ -0,0 +1 @@ +<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1718810837499" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="22871" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M483 508c-59.3 0-115.05-23.09-156.98-65.02C284.09 401.05 261 345.3 261 286s23.09-115.05 65.02-156.98C367.95 87.09 423.7 64 483 64s115.05 23.09 156.98 65.02C681.91 170.95 705 226.7 705 286s-23.09 115.05-65.02 156.98C598.05 484.91 542.3 508 483 508z m0-380c-87.12 0-158 70.88-158 158s70.88 158 158 158 158-70.88 158-158-70.88-158-158-158zM896.24 960H63.78l0.24-32.24c0.42-56.17 11.71-110.64 33.55-161.89 21.11-49.53 51.13-93.98 89.25-132.12 38.15-38.17 82.51-68.14 131.87-89.07C369.82 522.99 424.09 512 480.01 512s110.19 10.99 161.32 32.68c49.35 20.93 93.72 50.9 131.87 89.07 38.12 38.14 68.15 82.59 89.25 132.12 21.84 51.25 33.13 105.72 33.55 161.89l0.24 32.24z m-766.53-64h700.6c-17.55-179.17-168.45-320-350.3-320s-332.74 140.83-350.3 320zM960 672h-96c-17.6 0-32-14.4-32-32s14.4-32 32-32h96v64zM960 512H811c-17.6 0-32-14.4-32-32s14.4-32 32-32h149v64zM960 352H768c-17.6 0-32-14.4-32-32s14.4-32 32-32h192v64z" p-id="22872"></path><path d="M480 895.54L375.56 772.11l104.45-196.22 104.42 196.22L480 895.54z m-27.56-131.65L480 796.46l27.56-32.57L480 712.11l-27.56 51.78z" p-id="22873"></path></svg> \ No newline at end of file diff --git a/src/assets/icons/factory.svg b/src/assets/icons/factory.svg new file mode 100644 index 0000000..83bcddc --- /dev/null +++ b/src/assets/icons/factory.svg @@ -0,0 +1 @@ +<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1718786040142" class="icon" viewBox="0 0 1025 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6289" xmlns:xlink="http://www.w3.org/1999/xlink" width="200.1953125" height="200"><path d="M986.88 949.76h-35.84V296.106667c0-40.32-32.64-72.96-72.96-72.96H658.986667v-149.333334c0-40.32-32.64-72.96-72.96-72.96H148.053333c-40.32 0-72.96 32.64-72.96 72.96v875.733334H38.186667a36.693333 36.693333 0 0 0-33.066667 17.706666c-6.826667 11.52-6.826667 26.026667 0 37.546667s19.626667 18.346667 33.066667 17.706667h948.693333c13.44 0.64 26.026667-6.186667 33.066667-17.706667 6.826667-11.52 6.826667-26.026667 0-37.546667-7.04-11.306667-19.84-18.133333-33.066667-17.493333z m-109.013333-653.653333v652.8H658.986667v-652.8h218.88zM148.053333 73.813333h437.76V948.693333H148.053333V73.813333z m0 0" fill="#707070" p-id="6290"></path><path d="M256.213333 292.053333H476.373333a36.48 36.48 0 1 0 0-72.96H256.213333c-20.266667 0-36.48 16.426667-36.48 36.48 0 20.266667 16.213333 36.48 36.48 36.48z m220.16 146.56H256.213333c-13.653333-0.853333-26.453333 5.973333-33.493333 17.493334-7.04 11.733333-7.04 26.24 0 37.76 7.04 11.733333 20.053333 18.346667 33.493333 17.493333h220.373334c19.2-1.28 34.133333-17.28 34.133333-36.48 0-19.2-14.933333-35.2-34.346667-36.266667z m0 219.093334H256.213333c-19.413333 0.853333-34.986667 16.853333-34.986666 36.48 0 19.626667 15.36 35.626667 34.986666 36.48h220.373334c19.413333-0.853333 34.986667-16.853333 34.986666-36.48-0.213333-19.626667-15.573333-35.626667-35.2-36.48z m0 0" fill="#707070" p-id="6291"></path></svg> \ No newline at end of file diff --git a/src/assets/icons/line.svg b/src/assets/icons/line.svg index b82a5c1..57df5a1 100644 --- a/src/assets/icons/line.svg +++ b/src/assets/icons/line.svg @@ -1 +1 @@ -<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1678098791486" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6912" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="128"><path d="M782.09 905.17H245.83A68.2 68.2 0 0 1 177.7 837V186.91a68.21 68.21 0 0 1 68.13-68.13h536.26a68.22 68.22 0 0 1 68.13 68.13V837a68.21 68.21 0 0 1-68.13 68.17zM245.83 166.78a20.15 20.15 0 0 0-20.13 20.13V837a20.15 20.15 0 0 0 20.13 20.13h536.26A20.15 20.15 0 0 0 802.22 837V186.91a20.15 20.15 0 0 0-20.13-20.13z" p-id="6913"></path><path d="M390.46 437.3a80.15 80.15 0 1 1 80.15-80.15 80.24 80.24 0 0 1-80.15 80.15z m0-112.3a32.15 32.15 0 1 0 32.15 32.15A32.19 32.19 0 0 0 390.46 325zM651.35 748a80.15 80.15 0 1 1 80.16-80.15A80.24 80.24 0 0 1 651.35 748z m0-112.3a32.15 32.15 0 1 0 32.16 32.15 32.19 32.19 0 0 0-32.16-32.15z" p-id="6914"></path><path d="M590.11 697.43H378.35a60.06 60.06 0 0 1-60-60v-89.08a60.06 60.06 0 0 1 60-60h293.16a12 12 0 0 0 12-12v-82.2a12 12 0 0 0-12-12h-224.9v-48h224.9a60.07 60.07 0 0 1 60 60v82.2a60.07 60.07 0 0 1-60 60H378.35a12 12 0 0 0-12 12v89.08a12 12 0 0 0 12 12h211.76z" p-id="6915"></path></svg> \ No newline at end of file +<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1718786174169" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11445" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M38.222507 721.220267c0-40.86784 16.713387-78.01856 43.636053-104.941227s64.07168-43.636053 104.93952-43.636053h634.560853c40.86784 0 78.016853 16.713387 104.93952 43.636053s43.636053 64.073387 43.636054 104.941227c0 40.86784-16.713387 78.016853-43.636054 104.937813-26.922667 26.922667-64.07168 43.636053-104.93952 43.636053H186.79808c-40.86784 0-78.016853-16.713387-104.93952-43.636053-26.922667-26.92096-43.636053-64.069973-43.636053-104.937813z m60.66176-87.91552C76.317013 655.872 62.306987 686.99648 62.306987 721.220267c0 34.223787 14.010027 65.34656 36.57728 87.912106 22.567253 22.567253 53.690027 36.57728 87.913813 36.57728h634.560853c34.223787 0 65.34656-14.010027 87.913814-36.57728 22.567253-22.565547 36.57728-53.68832 36.57728-87.912106 0-34.223787-14.010027-65.348267-36.57728-87.91552-22.567253-22.567253-53.690027-36.57728-87.913814-36.57728H186.79808c-34.223787 0-65.34656 14.010027-87.913813 36.57728z" p-id="11446"></path><path d="M188.88704 785.18784c17.665707 0 33.660587-7.161173 45.2352-18.73408 11.572907-11.574613 18.73408-27.569493 18.73408-45.2352 0-17.665707-7.161173-33.660587-18.73408-45.2352-11.574613-11.572907-27.569493-18.73408-45.2352-18.73408-17.665707 0-33.660587 7.161173-45.2352 18.73408-11.572907 11.574613-18.73408 27.569493-18.73408 45.2352 0 17.665707 7.161173 33.660587 18.73408 45.2352 11.574613 11.572907 27.569493 18.73408 45.2352 18.73408z m79.290027 15.320747c-20.293973 20.292267-48.329387 32.8448-79.290027 32.8448-30.96064 0-58.996053-12.552533-79.290027-32.8448-20.292267-20.293973-32.8448-48.329387-32.8448-79.290027 0-30.96064 12.552533-58.996053 32.8448-79.290027 20.293973-20.292267 48.329387-32.8448 79.290027-32.8448 30.96064 0 58.996053 12.552533 79.290027 32.8448 20.292267 20.293973 32.8448 48.329387 32.8448 79.290027 0 30.96064-12.552533 58.996053-32.8448 79.290027zM821.51424 785.18784c17.665707 0 33.660587-7.161173 45.2352-18.73408 11.572907-11.574613 18.73408-27.569493 18.73408-45.2352 0-17.665707-7.161173-33.660587-18.73408-45.2352-11.574613-11.572907-27.569493-18.73408-45.2352-18.73408-17.665707 0-33.660587 7.161173-45.2352 18.73408-11.572907 11.574613-18.73408 27.569493-18.73408 45.2352 0 17.665707 7.161173 33.660587 18.73408 45.2352 11.574613 11.572907 27.569493 18.73408 45.2352 18.73408z m79.290027 15.320747c-20.293973 20.292267-48.329387 32.8448-79.290027 32.8448-30.96064 0-58.996053-12.552533-79.290027-32.8448-20.292267-20.293973-32.8448-48.329387-32.8448-79.290027 0-30.96064 12.552533-58.996053 32.8448-79.290027 20.293973-20.292267 48.329387-32.8448 79.290027-32.8448 30.96064 0 58.996053 12.552533 79.290027 32.8448 20.292267 20.293973 32.8448 48.329387 32.8448 79.290027 0 30.96064-12.552533 58.996053-32.8448 79.290027zM220.801707 446.206293h38.249813c5.623467 0 10.769067 2.317653 14.5152 6.060374l0.023893-0.023894c3.72224 3.72224 6.03648 8.869547 6.03648 14.539094v81.14688c0 5.669547-2.31424 10.816853-6.03648 14.539093l-0.023893-0.023893c-3.746133 3.74272-8.891733 6.060373-14.5152 6.060373h-38.249813c-5.614933 0-10.74688-2.30912-14.493014-6.03648l-0.04608-0.04608c-3.72736-3.746133-6.03648-8.87808-6.03648-14.493013v-81.14688c0-5.614933 2.30912-10.74688 6.03648-14.493014l0.04608-0.04608c3.746133-3.72736 8.87808-6.03648 14.493014-6.03648z m34.740906 24.08448h-31.232v74.129067h31.232v-74.129067zM357.33504 446.206293h38.249813c5.623467 0 10.769067 2.317653 14.5152 6.060374l0.023894-0.023894c3.72224 3.72224 6.03648 8.869547 6.03648 14.539094v81.14688c0 5.669547-2.31424 10.816853-6.03648 14.539093l-0.023894-0.023893c-3.746133 3.74272-8.891733 6.060373-14.5152 6.060373h-38.249813c-5.614933 0-10.74688-2.30912-14.493013-6.03648l-0.04608-0.04608c-3.72736-3.746133-6.03648-8.87808-6.03648-14.493013v-81.14688c0-5.614933 2.30912-10.74688 6.03648-14.493014l0.04608-0.04608c3.746133-3.72736 8.87808-6.03648 14.493013-6.03648z m34.740907 24.08448h-31.232v74.129067h31.232v-74.129067zM493.868373 446.206293h38.249814c5.623467 0 10.769067 2.317653 14.5152 6.060374l0.023893-0.023894c3.72224 3.72224 6.03648 8.869547 6.03648 14.539094v81.14688c0 5.669547-2.31424 10.816853-6.03648 14.539093l-0.023893-0.023893c-3.746133 3.74272-8.891733 6.060373-14.5152 6.060373h-38.249814c-5.614933 0-10.74688-2.30912-14.493013-6.03648l-0.04608-0.04608c-3.72736-3.746133-6.03648-8.87808-6.03648-14.493013v-81.14688c0-5.614933 2.30912-10.74688 6.03648-14.493014l0.04608-0.04608c3.746133-3.72736 8.87808-6.03648 14.493013-6.03648z m34.740907 24.08448h-31.232v74.129067h31.232v-74.129067zM630.401707 446.206293h38.249813c5.623467 0 10.769067 2.317653 14.5152 6.060374l0.023893-0.023894c3.72224 3.72224 6.03648 8.869547 6.03648 14.539094v81.14688c0 5.669547-2.31424 10.816853-6.03648 14.539093l-0.023893-0.023893c-3.746133 3.74272-8.891733 6.060373-14.5152 6.060373h-38.249813c-5.614933 0-10.74688-2.30912-14.493014-6.03648l-0.04608-0.04608c-3.72736-3.746133-6.03648-8.87808-6.03648-14.493013v-81.14688c0-5.614933 2.30912-10.74688 6.03648-14.493014l0.04608-0.04608c3.746133-3.72736 8.87808-6.03648 14.493014-6.03648z m34.740906 24.08448h-31.232v74.129067h31.232v-74.129067z" p-id="11447"></path><path d="M357.476693 512.718507h38.813014c5.623467 0 10.064213 7.978667 13.810346 9.470293l0.023894-0.01024c3.72224 1.483093 6.03648 3.534507 6.03648 5.794133v32.3328c0 2.259627-2.31424 4.31104-6.03648 5.794134l-0.023894-0.01024c-3.746133 1.491627-8.891733 2.414933-14.5152 2.414933h-38.249813c-5.614933 0-10.74688-0.919893-14.493013-2.404693l-0.04608-0.018774c-3.72736-1.493333-6.03648-3.53792-6.03648-5.77536v-32.3328c0-2.23744 2.30912-4.282027 6.03648-5.77536l0.04608-0.018773c3.746133-1.4848 9.019733-9.460053 14.634666-9.460053z m34.599254 25.402026l-31.232 0.2816v20.5056h31.232v-20.7872zM494.010027 512.718507h38.813013c5.623467 0 10.064213 7.978667 13.810347 9.470293l0.023893-0.01024c3.72224 1.483093 6.03648 3.534507 6.03648 5.794133v32.3328c0 2.259627-2.31424 4.31104-6.03648 5.794134l-0.023893-0.01024c-3.746133 1.491627-8.891733 2.414933-14.5152 2.414933h-38.249814c-5.614933 0-10.74688-0.919893-14.493013-2.404693l-0.04608-0.018774c-3.72736-1.493333-6.03648-3.53792-6.03648-5.77536v-32.3328c0-2.23744 2.30912-4.282027 6.03648-5.77536l0.04608-0.018773c3.746133-1.4848 9.019733-9.460053 14.634667-9.460053z m34.599253 25.402026l-31.232 0.2816v20.5056h31.232v-20.7872zM630.54336 512.718507h38.813013c5.623467 0 10.064213 7.978667 13.810347 9.470293l0.023893-0.01024c3.72224 1.483093 6.03648 3.534507 6.03648 5.794133v32.3328c0 2.259627-2.31424 4.31104-6.03648 5.794134l-0.023893-0.01024c-3.746133 1.491627-8.891733 2.414933-14.5152 2.414933h-38.249813c-5.614933 0-10.74688-0.919893-14.493014-2.404693l-0.04608-0.018774c-3.72736-1.493333-6.03648-3.53792-6.03648-5.77536v-32.3328c0-2.23744 2.30912-4.282027 6.03648-5.77536l0.04608-0.018773c3.746133-1.4848 9.019733-9.460053 14.634667-9.460053z m34.599253 25.402026l-31.232 0.2816v20.5056h31.232v-20.7872zM494.010027 446.206293h38.813013c5.623467 0 10.064213 7.978667 13.810347 9.470294l0.023893-0.01024c3.72224 1.483093 6.03648 3.534507 6.03648 5.794133v32.3328c0 2.259627-2.31424 4.31104-6.03648 5.794133l-0.023893-0.01024c-3.746133 1.491627-8.891733 7.778987-14.5152 7.778987h-38.531414c-5.614933 0-10.46528-6.283947-14.211413-7.768747l-0.04608-0.018773c-3.72736-1.493333-6.03648-3.53792-6.03648-5.77536v-32.3328c0-2.23744 2.30912-4.282027 6.03648-5.77536l0.04608-0.018773c3.746133-1.4848 9.019733-9.460053 14.634667-9.460054z m41.93792 17.360214l-44.77952 1.829546 6.208853 26.999467h31.232l7.338667-28.829013zM630.54336 446.206293h38.813013c5.623467 0 10.064213 7.978667 13.810347 9.470294l0.023893-0.01024c3.72224 1.483093 6.03648 3.534507 6.03648 5.794133v32.3328c0 2.259627-2.31424 4.31104-6.03648 5.794133l-0.023893-0.01024c-3.746133 1.491627-8.891733 7.778987-14.5152 7.778987h-38.531413c-5.614933 0-10.46528-6.283947-14.211414-7.768747l-0.04608-0.018773c-3.72736-1.493333-6.03648-3.53792-6.03648-5.77536v-32.3328c0-2.23744 2.30912-4.282027 6.03648-5.77536l0.04608-0.018773c3.746133-1.4848 9.019733-9.460053 14.634667-9.460054z m41.93792 17.360214l-44.77952 1.829546 6.208853 26.999467h31.232l7.338667-28.829013z" p-id="11448"></path><path d="M620.2112 500.538027l-38.382933-34.996907 4.0448-4.44416 38.382933 34.996907zM675.401387 496.093867l38.382933-34.996907 4.0448 4.44416-38.382933 34.996907zM804.066987 519.558827h25.35936v6.02112h-25.35936z" p-id="11449"></path><path d="M772.230827 519.179947h31.83616v12.25728h-31.83616zM771.928747 539.502933h31.83616v25.541974h-31.83616z" p-id="11450"></path><path d="M773.635413 563.33824h28.724907v-58.24512h-28.724907v58.24512z m30.431574 3.413333h-33.844907v-65.071786h35.551573v65.071786h-1.706666z" p-id="11451"></path><path d="M746.359467 519.558827h25.35936v6.02112H746.359467z" p-id="11452"></path></svg> \ No newline at end of file diff --git a/src/assets/icons/node.svg b/src/assets/icons/node.svg new file mode 100644 index 0000000..b5cbfbd --- /dev/null +++ b/src/assets/icons/node.svg @@ -0,0 +1 @@ +<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1718810879147" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="24744" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M458.2 371H112.6C86.9 371 66 350.1 66 324.5V164.9c0-25.7 20.9-46.5 46.5-46.5h345.6c25.7 0 46.5 20.9 46.5 46.5v159.5c0.1 25.7-20.8 46.6-46.4 46.6zM112.6 158.3c-3.6 0-6.6 3-6.6 6.6v159.5c0 3.6 3 6.6 6.6 6.6h345.6c3.6 0 6.6-3 6.6-6.6V164.9c0-3.6-3-6.6-6.6-6.6H112.6zM910.1 908H258.8c-25.7 0-46.5-20.9-46.5-46.5V515.9c0-25.7 20.9-46.5 46.5-46.5h651.3c25.7 0 46.5 20.9 46.5 46.5v345.6c0 25.7-20.8 46.5-46.5 46.5zM258.8 509.2c-3.6 0-6.6 3-6.6 6.6v345.6c0 3.6 3 6.6 6.6 6.6h651.3c3.6 0 6.6-3 6.6-6.6V515.9c0-3.6-3-6.6-6.6-6.6H258.8z" fill="#4F4F4F" p-id="24745"></path><path d="M225.5 695.3h-59.3c-18.3 0-33.2-14.9-33.2-33.1l-0.5-305.8c0-11 8.9-20 19.9-20 11 0 19.9 8.9 19.9 19.9l0.5 299.1h52.7c11 0 19.9 8.9 19.9 19.9s-8.8 20-19.9 20z" fill="#4F4F4F" p-id="24746"></path></svg> \ No newline at end of file diff --git a/src/assets/icons/position.svg b/src/assets/icons/position.svg new file mode 100644 index 0000000..7f22a0d --- /dev/null +++ b/src/assets/icons/position.svg @@ -0,0 +1 @@ +<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1718786196365" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="12477" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M128 194.474667A108.714667 108.714667 0 0 1 236.288 85.333333h551.424A108.714667 108.714667 0 0 1 896 194.474667v635.050666A108.714667 108.714667 0 0 1 787.712 938.666667H236.288A108.714667 108.714667 0 0 1 128 829.525333V194.474667z m108.288-49.621334c-27.178667 0-49.194667 22.229333-49.194667 49.621334v635.050666c0 27.392 22.016 49.621333 49.194667 49.621334h551.424c27.178667 0 49.194667-22.186667 49.194667-49.621334V194.474667c0-27.392-22.016-49.621333-49.194667-49.621334H236.288z m186.197333 190.677334c-14.890667-44.970667 18.346667-91.434667 65.408-91.434667h48.213334c47.061333 0 80.298667 46.464 65.408 91.434667l-18.986667 57.386666 67.968 205.482667c8.234667 24.96 1.792 52.48-16.64 71.082667l-73.130667 73.642666a68.565333 68.565333 0 0 1-97.450666 0l-73.088-73.642666a69.845333 69.845333 0 0 1-16.64-71.082667l67.925333-205.482667-18.986667-57.386666z m71.424 87.168l-64.341333 194.517333a9.984 9.984 0 0 0 2.389333 10.154667l73.088 73.642666c3.84 3.882667 10.069333 3.882667 13.909334 0l73.088-73.642666a9.984 9.984 0 0 0 2.389333-10.154667l-64.341333-194.517333h-36.181334z m36.181334-59.52l15.36-46.506667a9.898667 9.898667 0 0 0-9.344-13.056h-48.213334a9.898667 9.898667 0 0 0-9.386666 13.056l15.36 46.506667h36.266666z" fill="#000000" fill-opacity=".65" p-id="12478"></path></svg> \ No newline at end of file diff --git a/src/assets/icons/product.svg b/src/assets/icons/product.svg new file mode 100644 index 0000000..539ebf4 --- /dev/null +++ b/src/assets/icons/product.svg @@ -0,0 +1 @@ +<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1718810813446" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="21858" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M341.333333 405.333333h341.333334v42.666667H341.333333z" p-id="21859"></path><path d="M682.666667 554.666667H341.333333c-12.8 0-21.333333-8.533333-21.333333-21.333334V64c0-12.8 8.533333-21.333333 21.333333-21.333333h341.333334c12.8 0 21.333333 8.533333 21.333333 21.333333v469.333333c0 12.8-8.533333 21.333333-21.333333 21.333334z m-320-42.666667h298.666666V85.333333H362.666667v426.666667z" p-id="21860"></path><path d="M917.333333 981.333333H106.666667c-59.733333 0-106.666667-46.933333-106.666667-106.666666V64c0-12.8 8.533333-21.333333 21.333333-21.333333h981.333334c12.8 0 21.333333 8.533333 21.333333 21.333333v810.666667c0 59.733333-46.933333 106.666667-106.666667 106.666666zM42.666667 85.333333v789.333334c0 36.266667 27.733333 64 64 64h810.666666c36.266667 0 64-27.733333 64-64V85.333333H42.666667z" p-id="21861"></path><path d="M277.333333 853.333333H149.333333c-12.8 0-21.333333-8.533333-21.333333-21.333333v-128c0-12.8 8.533333-21.333333 21.333333-21.333333h128c12.8 0 21.333333 8.533333 21.333334 21.333333v128c0 12.8-8.533333 21.333333-21.333334 21.333333z m-106.666666-42.666666h85.333333v-85.333334H170.666667v85.333334zM341.333333 704h298.666667v42.666667H341.333333zM341.333333 789.333333h42.666667v42.666667h-42.666667zM426.666667 789.333333h42.666666v42.666667h-42.666666zM21.333333 149.333333h256v42.666667H21.333333zM746.666667 149.333333h256v42.666667H746.666667z" p-id="21862"></path></svg> \ No newline at end of file diff --git a/src/assets/icons/rot_action.svg b/src/assets/icons/rot_action.svg new file mode 100644 index 0000000..21b4877 --- /dev/null +++ b/src/assets/icons/rot_action.svg @@ -0,0 +1 @@ +<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1718810973656" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="31973" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M428.4928 533.3504l-83.0464-81.92a16.7936 16.7936 0 0 0-23.4496 0L261.7344 510.976a16.1792 16.1792 0 0 0 0 23.0912l83.0464 81.92a16.64 16.64 0 0 0 23.3472 0l60.3136-59.4944a16.1792 16.1792 0 0 0 0.0512-23.1424zM645.9392 296.96a62.4128 62.4128 0 1 0-61.44-62.4128 61.952 61.952 0 0 0 61.44 62.4128z m87.04 113.1008c-22.1184-19.456-43.4688-45.6704-52.736-65.4336-15.0528-32.1536-65.536-40.2944-95.8976-40.2944S460.8 368.64 460.8 368.64c-20.48 18.4832-76.8 86.528-70.2464 99.4304s17.7152 8.2944 22.8864 6.8096c20.48-6.0928 40.96-31.488 60.3648-60.5696 14.336-21.5552 82.7904-45.6704 82.7904-45.6704s3.6352 45.7216-7.3216 71.68c-6.8608 16.384-24.5248 103.0656-26.6752 125.7984-6.0928 61.7472-29.184 57.0368-69.2736 105.2672s-10.9568 56.32 7.2192 53.6064 102.4-84.0192 112.3328-109.9264 11.6736-74.6496 16.4864-74.6496 11.008 9.8304 51.2 44.4416 27.4432 66.56 39.5776 124.8256c4.8128 23.04 13.1584 27.648 21.4016 28.3136 12.6976 1.0752 25.6-12.6464 25.6-28.3136 0-25.9072 5.12-101.2224-18.2784-130.9184s-68.096-64.256-68.096-97.6384 24.5248-78.7456 24.5248-78.7456c15.0528 31.2832 51.2 51.2 75.4688 57.6512s65.28-7.7312 48.2304-32.7168c-7.5264-10.496-42.24-4.864-56.2688-17.152zM757.76 936.1408H266.24a35.1232 35.1232 0 0 0 0 70.1952h491.52a35.1232 35.1232 0 0 0 0-70.1952zM851.6096 23.3472H168.1408A149.76 149.76 0 0 0 18.3296 173.1072v542.976a149.8624 149.8624 0 0 0 149.8624 149.8112h683.4176a149.8112 149.8112 0 0 0 149.76-149.8112v-542.72a149.8112 149.8112 0 0 0-149.76-150.016zM926.72 716.0832a74.9056 74.9056 0 0 1-74.8544 74.9568H168.192a74.9056 74.9056 0 0 1-74.9056-74.9568v-542.72a74.9056 74.9056 0 0 1 74.9056-75.1104h683.4176A74.8544 74.8544 0 0 1 926.72 173.1072z" fill="#232632" p-id="31974"></path></svg> \ No newline at end of file diff --git a/src/assets/icons/route.svg b/src/assets/icons/route.svg new file mode 100644 index 0000000..25b9b5f --- /dev/null +++ b/src/assets/icons/route.svg @@ -0,0 +1 @@ +<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1718814195332" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="34036" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M973.134519 70.657931H289.219096V33.53186c0-10.840544-5.241459-21.01054-14.070356-27.302526-8.828897-6.291986-20.150002-7.934832-30.398228-4.392096L39.931276 72.490766C26.408535 77.162258 17.33377 89.891516 17.33377 104.185389v815.62245c0 14.305048 9.074765 27.034306 22.597506 31.694623l204.830412 70.653528c3.565086 1.22934 7.253107 1.832834 10.929951 1.832834a33.525222 33.525222 0 0 0 33.538633-33.527457v-37.126071h683.904247c18.518332 0 33.527457-15.009125 33.527457-33.527457V104.185389c0-18.518332-15.009125-33.527457-33.527457-33.527458zM222.164182 943.43352L84.388684 895.902762V128.090465l137.775498-47.530758v862.873813z m717.454055-57.153138H289.219096V137.712846h650.387966v748.567536z m-288.224373-192.224088h-79.918282c-14.159763-43.574518-55.152667-75.157383-103.387502-75.157383-59.935918 0-108.68484 48.760099-108.68484 108.68484s48.760099 108.68484 108.68484 108.684841c48.234835 0 89.227739-31.582865 103.387502-75.157384h79.918282c77.034921 0 139.72009-62.673993 139.72009-139.720089s-62.673993-139.72009-139.72009-139.72009H525.542966c-40.065311 0-72.665175-32.599864-72.665176-72.665176v-2.536911c0-40.065311 32.599864-72.665175 72.665176-72.665175h115.71443c14.159763 43.574518 55.152667 75.157383 103.387502 75.157383 59.935918 0 108.68484-48.760099 108.68484-108.68484s-48.760099-108.68484-108.68484-108.684841c-48.234835 0-89.227739 31.582865-103.387502 75.157383H525.542966c-77.034921 0-139.72009 62.673993-139.72009 139.72009v2.536911c0 77.034921 62.673993 139.72009 139.72009 139.72009h125.850898c40.065311 0 72.665175 32.599864 72.665175 72.665176s-32.599864 72.665175-72.665175 72.665175z m-183.31696 75.157383c-22.955132 0-41.629926-18.674794-41.629926-41.629926s18.674794-41.629926 41.629926-41.629926 41.629926 18.674794 41.629926 41.629926-18.674794 41.629926-41.629926 41.629926z m276.567994-510.556118c22.955132 0 41.629926 18.674794 41.629926 41.629926s-18.674794 41.629926-41.629926 41.629926-41.629926-18.674794-41.629926-41.629926 18.674794-41.629926 41.629926-41.629926z" p-id="34037"></path></svg> \ No newline at end of file diff --git a/src/assets/icons/workshop.svg b/src/assets/icons/workshop.svg new file mode 100644 index 0000000..aae28b8 --- /dev/null +++ b/src/assets/icons/workshop.svg @@ -0,0 +1 @@ +<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1718786260121" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="13657" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M739.84 673.216a239.84 239.84 0 0 0-325.984-328.096l47.744 47.776 105.792 105.76-90.496 90.528-105.92-105.92-47.744-47.712a236.8 236.8 0 0 0-25.216 65.28 241.312 241.312 0 0 0-6.048 52.928 239.744 239.744 0 0 0 359.488 207.968l188.48 230.72a82.464 82.464 0 0 0 59.424 30.496c1.344 0.064 2.656 0.096 4 0.096a72.224 72.224 0 0 0 51.712-21.152l24.992-25.024a72.576 72.576 0 0 0 21.056-55.68 82.56 82.56 0 0 0-30.464-59.424z m-83.424 4.992a175.52 175.52 0 0 1-299.904-118.88l93.888 93.888a37.312 37.312 0 0 0 52.864 0.064l128.32-128.288a37.504 37.504 0 0 0-0.064-52.704L537.6 378.4a175.424 175.424 0 0 1 118.784 299.84z m278.4 253.44l-24.992 24.96a9.792 9.792 0 0 1-7.264 2.4 18.624 18.624 0 0 1-13.024-7.04L708.16 729.92l222.016 181.344a18.72 18.72 0 0 1 7.04 13.088 9.472 9.472 0 0 1-2.4 7.232z" fill="#575869" p-id="13658"></path><path d="M1007.296 331.52l-207.36-141.92V55.68h-64v90.144L531.456 5.952a31.072 31.072 0 0 0-14.88-4.992 447.104 447.104 0 0 0-9.216 0 31.104 31.104 0 0 0-14.88 4.992L16.704 331.488a32 32 0 1 0 36.128 52.8l45.792-31.328v638.208a32 32 0 0 0 32 32l0.48-0.096 0.448 0.096h500.48v-64H162.624V309.184L512 70.144l347.2 237.536v285.952h64v-242.176l48 32.864a32 32 0 1 0 36.096-52.8z" fill="#575869" p-id="13659"></path></svg> \ No newline at end of file diff --git a/src/components/TigerTree/src/TigerTree.vue b/src/components/TigerTree/src/TigerTree.vue index d409331..e889e42 100644 --- a/src/components/TigerTree/src/TigerTree.vue +++ b/src/components/TigerTree/src/TigerTree.vue @@ -193,8 +193,8 @@ state.expandedKeys = expandAll ? getAllKeys() : ([] as KeyType[]); } - function addHouse(add: boolean) { - emit('addHouse', add); + function handleAdd(add: boolean) { + emit('handleAdd', add); } function onStrictlyChange(strictly: boolean) { @@ -353,7 +353,7 @@ getNodeById, checkAll, expandAll, - addHouse, + handleAdd, filterByLevel: (level: number) => { state.expandedKeys = filterByLevel(level); }, @@ -448,7 +448,7 @@ checkable={checkable} checkAll={checkAll} expandAll={expandAll} - addHouse = {addHouse} + onHandleAdd = {handleAdd} title={title} search={search} toolbar={toolbar} @@ -461,7 +461,6 @@ {extendSlots(slots)} </TreeHeader> )} - <div style='height:777px;overflow-y: scroll;'> <Spin wrapperClassName={unref(props.treeWrapperClassName)} spinning={unref(props.loading)} @@ -476,7 +475,6 @@ class="!mt-4" /> </Spin> - </div> </div> ); }; diff --git a/src/components/TigerTree/src/components/TreeHeader.vue b/src/components/TigerTree/src/components/TreeHeader.vue index 96f7c80..f7e5223 100644 --- a/src/components/TigerTree/src/components/TreeHeader.vue +++ b/src/components/TigerTree/src/components/TreeHeader.vue @@ -2,7 +2,7 @@ <div :class="bem()" class="flex px-2 py-1.5 items-center"> <slot name="headerTitle" v-if="slots.headerTitle"></slot> <button type="primary" v-if="add" style="background-color: transparent;" @click="Add"> - <Icon icon="add|svg" /> + <Icon icon="add_01|svg" /> </button> <BasicTitle :helpMessage="helpMessage" v-if="!slots.headerTitle && title"> {{ title }} @@ -86,12 +86,8 @@ type: Function, default: undefined, }, - addHouse: { - type: Function, - default: undefined, - }, } as const); - const emit = defineEmits(['strictly-change', 'search']); + const emit = defineEmits(['strictly-change', 'search', 'handleAdd']); const slots = useSlots(); const { t } = useI18n(); @@ -159,7 +155,7 @@ function Add(e: { key: ToolbarEnum }) { // alert(999) - props.addHouse?.(false); + emit('handleAdd'); } function emitChange(value?: string): void { diff --git a/src/components/TigerTree/src/types/tree.ts b/src/components/TigerTree/src/types/tree.ts index 0d6ab48..1371641 100644 --- a/src/components/TigerTree/src/types/tree.ts +++ b/src/components/TigerTree/src/types/tree.ts @@ -20,7 +20,7 @@ 'check', 'update:searchValue', 'gethalfCheckedKeys', - 'addHouse' + 'handleAdd' ]; export interface TreeState { diff --git a/src/layouts/default/menu/index.vue b/src/layouts/default/menu/index.vue index 259b133..e7359eb 100644 --- a/src/layouts/default/menu/index.vue +++ b/src/layouts/default/menu/index.vue @@ -19,7 +19,7 @@ import { useRootSetting } from '@/hooks/setting/useRootSetting'; import { useAppInject } from '@/hooks/web/useAppInject'; import { useDesign } from '@/hooks/web/useDesign'; -import { getEntity } from '/@/api/tigerapi/system'; + import { getEntity } from '/@/api/tigerapi/system'; export default defineComponent({ name: 'LayoutMenu', @@ -113,34 +113,37 @@ function handleMenuClick(path: string) { if (path.split('/').length > 2 && path.split('/')[2] == 'LC') { - getEntity({ - sqlcmd: `ASSEMBLY_NAME ='${path.split('/')[1]}'`, - entityName: 'SYS_LOW_CODE', - }).then((data) => { - var searchForms = JSON.parse(data.Data.Items[0].SEARCH_FORM_JSON); - let colSlots = [] as string[]; - for (const i in searchForms) { - if (!isNullOrUnDef(searchForms[i]['colSlot'])) { - colSlots.push('form-' + searchForms[i]['colSlot']); + getEntity({ + sqlcmd: `ASSEMBLY_NAME ='${path.split('/')[1]}'`, + entityName: 'SYS_LOW_CODE', + }).then((data) => { + var searchForms = JSON.parse(data.Data.Items[0].SEARCH_FORM_JSON); + let colSlots = [] as string[]; + for (const i in searchForms) { + if (!isNullOrUnDef(searchForms[i]['colSlot'])) { + colSlots.push('form-' + searchForms[i]['colSlot']); + } } - } - var _cruds = JSON.parse(data.Data.Items[0].FORM_JSON); - let crudColSlots = [] as string[]; - for (const i in _cruds) { - if (!isNullOrUnDef(_cruds[i]['colSlot'])) { - crudColSlots.push(_cruds[i]['colSlot']); + var _cruds = JSON.parse(data.Data.Items[0].FORM_JSON); + let crudColSlots = [] as string[]; + for (const i in _cruds) { + if (!isNullOrUnDef(_cruds[i]['colSlot'])) { + crudColSlots.push(_cruds[i]['colSlot']); + } } - } - const id = { ID: path.split('/')[1], colSlots: colSlots, crudColSlots: crudColSlots }; + const id = { ID: path.split('/')[1], colSlots: colSlots, crudColSlots: crudColSlots }; + go(`/${path.split('/')[1]}/${path.split('/')[2]}/${encodeURI(JSON.stringify(id))}`); + }); + } else if ( + (path.split('/').length > 2 && path.split('/')[2] == 'High') || + path.split('/')[2] == 'CP' + ) { + const id = { Name: path.split('/')[1] }; go(`/${path.split('/')[1]}/${path.split('/')[2]}/${encodeURI(JSON.stringify(id))}`); - }); - } else if (path.split('/').length > 2 && path.split('/')[2] == 'High') { - const id = { Name: path.split('/')[1] }; - go(`/${path.split('/')[1]}/${path.split('/')[2]}/${encodeURI(JSON.stringify(id))}`); - } else { - go(path); - } + } else { + go(path); + } } /** diff --git a/src/views/tigerprojects/system/lowcode/composition/CustTree.vue b/src/views/tigerprojects/system/lowcode/composition/CustTree.vue new file mode 100644 index 0000000..5ab9d42 --- /dev/null +++ b/src/views/tigerprojects/system/lowcode/composition/CustTree.vue @@ -0,0 +1,57 @@ +<!-- + * @Description: 閫氱敤Tree缁勪欢 + * @Author: Ben Lin + * @version: + * @Date: 2024-06-19 11:07:21 + * @LastEditors: Ben Lin + * @LastEditTime: 2024-06-19 23:09:39 +--> +<template> + <div class="m-4 mr-0 overflow-hidden bg-white"> + <TigerTree + :title="title" + toolbar + search + :add="add" + treeWrapperClassName="h-[calc(100%-35px)] overflow-auto" + :clickRowToExpand="false" + :treeData="treeData" + :renderIcon="createIcon" + :fieldNames="fieldNames" + @select="handleSelect" + @handleAdd="handleAdd" + /> + </div> +</template> +<script lang="ts" setup> + import { onMounted, ref } from 'vue'; + import { FieldNames, TigerTree, TreeItem } from '/@/components/TigerTree' + + defineOptions({ name: 'CustTree' }); + + const emit = defineEmits(['select', 'handleAdd']); + const props = defineProps({ + title: { + // type: [Function, String] as PropType<string | ((data) => string)>, + type: String, + }, + treeData: { + type: Array as PropType<TreeItem[]>, + }, + createIcon: { + type: Function as PropType<(params: Recordable<any>) => string>, + }, + add: {type: Boolean,}, + fieldNames: {type: Object as PropType<FieldNames>}, + }); + + function handleSelect(keys) { + emit('select', keys[0]); + } + + function handleAdd() { + emit('handleAdd'); + } + + onMounted(() => {}); +</script> diff --git a/src/views/tigerprojects/system/lowcode/composition/DeptModal.vue b/src/views/tigerprojects/system/lowcode/composition/DeptModal.vue index 198b94d..71b2d85 100644 --- a/src/views/tigerprojects/system/lowcode/composition/DeptModal.vue +++ b/src/views/tigerprojects/system/lowcode/composition/DeptModal.vue @@ -9,7 +9,7 @@ import { BasicForm, useForm } from '@/components/Form'; import { formSchema } from './dept.data'; - import { getDeptList } from '@/api/demo/system'; + import { getTreeList } from '@/api/tigerapi/dept'; defineOptions({ name: 'DeptModal' }); @@ -34,7 +34,7 @@ ...data.record, }); } - const treeData = await getDeptList(); + const treeData = await getTreeList(); updateSchema({ field: 'parentDept', componentProps: { treeData }, diff --git a/src/views/tigerprojects/system/lowcode/composition/account.data.ts b/src/views/tigerprojects/system/lowcode/composition/account.data.ts new file mode 100644 index 0000000..9a24fad --- /dev/null +++ b/src/views/tigerprojects/system/lowcode/composition/account.data.ts @@ -0,0 +1,156 @@ +import { getAllRoleList, isAccountExist } from '@/api/demo/system'; +import { BasicColumn, FormSchema } from '@/components/Table'; + +/** + * transform mock data + * { + * 0: '鍗庝笢鍒嗛儴', + * '0-0': '鍗庝笢鍒嗛儴-鐮斿彂閮�' + * '0-1': '鍗庝笢鍒嗛儴-甯傚満閮�', + * ... + * } + */ +export const deptMap = (() => { + const pDept = ['鍗庝笢鍒嗛儴', '鍗庡崡鍒嗛儴', '瑗垮寳鍒嗛儴']; + const cDept = ['鐮斿彂閮�', '甯傚満閮�', '鍟嗗姟閮�', '璐㈠姟閮�']; + + return pDept.reduce((map, p, pIdx) => { + map[pIdx] = p; + + cDept.forEach((c, cIndex) => (map[`${pIdx}-${cIndex}`] = `${p}-${c}`)); + + return map; + }, {}); +})(); + +export const columns: BasicColumn[] = [ + { + title: '鐢ㄦ埛鍚�', + dataIndex: 'account', + width: 120, + }, + { + title: '鏄电О', + dataIndex: 'nickname', + width: 120, + }, + { + title: '閭', + dataIndex: 'email', + width: 120, + }, + { + title: '鍒涘缓鏃堕棿', + dataIndex: 'createTime', + width: 180, + }, + { + title: '瑙掕壊', + dataIndex: 'role', + width: 200, + }, + { + title: '鎵�灞為儴闂�', + dataIndex: 'dept', + customRender: ({ value }) => { + return deptMap[value]; + }, + }, + { + title: '澶囨敞', + dataIndex: 'remark', + }, +]; + +export const searchFormSchema: FormSchema[] = [ + { + field: 'account', + label: '鐢ㄦ埛鍚�', + component: 'Input', + colProps: { span: 8 }, + }, + { + field: 'nickname', + label: '鏄电О', + component: 'Input', + colProps: { span: 8 }, + }, +]; + +export const accountFormSchema: FormSchema[] = [ + { + field: 'account', + label: '鐢ㄦ埛鍚�', + component: 'Input', + helpMessage: ['鏈瓧娈垫紨绀哄紓姝ラ獙璇�', '涓嶈兘杈撳叆甯︽湁admin鐨勭敤鎴峰悕'], + rules: [ + { + required: true, + message: '璇疯緭鍏ョ敤鎴峰悕', + }, + { + trigger: 'blur', + validator(_, value) { + return new Promise((resolve, reject) => { + if (!value) return resolve(); + isAccountExist(value) + .then(resolve) + .catch((err) => { + reject(err.message || '楠岃瘉澶辫触'); + }); + }); + }, + }, + ], + }, + { + field: 'pwd', + label: '瀵嗙爜', + component: 'InputPassword', + required: true, + ifShow: false, + }, + { + label: '瑙掕壊', + field: 'role', + component: 'ApiSelect', + componentProps: { + api: getAllRoleList, + labelField: 'roleName', + valueField: 'roleValue', + }, + required: true, + }, + { + field: 'dept', + label: '鎵�灞為儴闂�', + component: 'TreeSelect', + componentProps: { + fieldNames: { + label: 'deptName', + value: 'id', + }, + getPopupContainer: () => document.body, + }, + required: true, + }, + { + field: 'nickname', + label: '鏄电О', + component: 'Input', + required: true, + }, + + { + label: '閭', + field: 'email', + component: 'Input', + required: true, + }, + + { + label: '澶囨敞', + field: 'remark', + component: 'InputTextArea', + }, +]; diff --git a/src/views/tigerprojects/system/lowcode/composition/index.vue b/src/views/tigerprojects/system/lowcode/composition/index.vue index 0b30ee7..079bbf6 100644 --- a/src/views/tigerprojects/system/lowcode/composition/index.vue +++ b/src/views/tigerprojects/system/lowcode/composition/index.vue @@ -1,49 +1,106 @@ <template> - <div> - <BasicTable @register="registerTable"> + <PageWrapper dense contentFullHeight fixedHeight contentClass="flex"> + <CustTree + class="w-1/4 xl:w-1/5" + @select="handleSelect" + :title="title" + :treeData="treeData" + :create-icon="createIcon" + :fieldNames="fieldNames" + /><!-- + add + @handle-add="handleAdd" --> + <BasicTable class="w-3/4 xl:w-4/5" @register="registerTable"> <template #toolbar> - <a-button type="primary" @click="handleCreate"> 鏂板閮ㄩ棬 </a-button> + <a-button type="primary" @click="handleCreate" preIcon="add_02|svg"> 鏂板 </a-button> </template> <template #bodyCell="{ column, record }"> <template v-if="column.key === 'action'"> - <TableAction - :actions="[ - { - icon: 'clarity:note-edit-line', - onClick: handleEdit.bind(null, record), - }, - { - icon: 'ant-design:delete-outlined', - color: 'error', - popConfirm: { - title: '鏄惁纭鍒犻櫎', - placement: 'left', - confirm: handleDelete.bind(null, record), - }, - }, - ]" - /> + <TableAction :actions="createActions(record)" /> </template> </template> </BasicTable> - <DeptModal @register="registerModal" @success="handleSuccess" /> - </div> + <normalDrawer @register="registerDrawer" @success="handleSuccess" /> + <CustModal + @register="registerCust" + @success="custSuccess" + :type="cType" + :detailSlots="dtlSlots" + > + <!-- 鐢ㄦ彃妲借嚜瀹氫箟澶氳〃鍗� --> + <template #[item.name] v-for="item in dtlSlots" :key="item.name"> + <BasicForm @register="useFormData[item.name][0]" v-if="useFormData[item.name]"> + <!-- 鐢ㄦ彃妲借嚜瀹氫箟寮瑰嚭閫夋嫨妗� --> + <template #[name]="{ field }" v-for="name in item.slots" :key="name"> + <a-button + class="mt-1 ml-1" + size="small" + @click="handleCustClick(field)" + :preIcon="item.preIcons[name]" + /> + <NormalModal + @register="useModalData[name][0]" + @success="(d, u) => handleEntSuccess(d, u, item.name)" + /> + </template> + </BasicForm> + <!-- 鑷畾涔夊唴瀹� --> + </template> + </CustModal> + </PageWrapper> </template> <script lang="ts" setup> import { BasicTable, useTable, TableAction } from '@/components/Table'; - import { getDeptList } from '@/api/demo/system'; - + import { getEntity, getRoleListByPage, convertToTree } from '@/api/tigerapi/system'; + import { PageWrapper } from '@/components/Page'; + import CustTree from './CustTree.vue'; import { useModal } from '@/components/Modal'; - import DeptModal from './DeptModal.vue'; - + import normalDrawer from '../normalDrawer.vue'; + import NormalModal from '/@/views/components/NormalModal.vue'; + import CustModal from '/@/views/components/CustModal.vue'; import { columns, searchFormSchema } from './dept.data'; + import { + GetActionsData, + GetSelectSuccess, + OpenCustModal, + fetchTreeData, + getFormSchema, + getOthersValues, + } from '../data'; + import { onMounted, reactive, ref } from 'vue'; + import { useRoute } from 'vue-router'; + import { useDrawer } from '/@/components/Drawer'; + import { BasicForm, useForm } from '/@/components/Form/index'; + import { TreeItem } from '/@/components/TigerTree'; + import { createIconByType } from '../data'; +import { RouteToProd } from '/@/api/tigerapi/mes/router'; defineOptions({ name: 'DeptManagement' }); - const [registerModal, { openModal }] = useModal(); + const route = useRoute(); + const objParams = ref(JSON.parse(decodeURI(route.params?.id as string))); + const entityName = ref(objParams.value.Name); + const formSchemas = ref({}); //寮瑰嚭妗嗘垨楂樼骇椤甸潰澶氳〃鍗曠粨鏋� + const useModalData = ref({}); //琛ㄥ崟涓彃妲芥覆鏌撴寜閽墦寮�妯℃�佹useModal鏂规硶 + const useFormData = ref({}); + const colSlots = ref<any>(objParams.value.colSlots); //鎸夐挳鎻掓Ы + const crudColSlots = ref<any>(objParams.value.crudColSlots); + const cType = ref(''); + const dtlSlots = ref([] as any[]); + const selectVals = ref({}); + const baseCards = ref([] as any[]); + const otherCards = ref([] as any[]); + const searchInfo = reactive<Recordable>({}); + const treeData = ref<TreeItem[]>([]); + const title = ref(''); + const fieldNames = ref({}); + const others = ref(getOthersValues(entityName.value, objParams.value.CODE, objParams.value.ID)); + const [registerCust, { openModal: openCustomModal, closeModal }] = useModal(); + const [registerItemAdd, { openModal: openItemModal }] = useModal(); + const [registerDrawer, { openDrawer }] = useDrawer(); const [registerTable, { reload }] = useTable({ - title: '閮ㄩ棬鍒楄〃', - api: getDeptList, + title: '鍒楄〃淇℃伅', + api: getRoleListByPage, columns, formConfig: { labelWidth: 120, @@ -65,24 +122,157 @@ }, }); + /** + * @description: 鑾峰彇鏍戝舰鏁版嵁 + * @param {*} type + * @return {*} + */ + async function fetch(type: string) { + //鏍规嵁type鑾峰彇鏍戝舰鏁版嵁 + const data = await fetchTreeData(type); + title.value = data.title; + treeData.value = data.treeData; + fieldNames.value = data.fieldNames; + } + + // function handleAdd(){ + // console.log('handleAdd'); + // } + + /** + * @description: 鏍戝舰鑺傜偣鍥炬爣 + * @param {*} params + * @param {*} type + * @return {*} + */ + function createIcon(params: Recordable<any>) { + return createIconByType(params, entityName.value); + } + + onMounted(() => { + fetch(entityName.value); + }); + + /** + * @description: 鐢熸垚鍒楄〃涓搷浣滈」鐨勬寜閽� + * @param {*} record + * @return {*} + */ + function createActions(record) { + return GetActionsData( + { + record, + isUpdate: true, + ifSave: true, + entityName: entityName.value, + formJson: getFormSchema(`${entityName.value}_Crud`), + cType, + dtlSlots, + useModalData, + useFormData, + crudColSlots, + }, + openDrawer, + reload, + openCustomModal, + useForm, + useModal, + ); + } + + /** + * @description: 楠岃瘉琛ㄥ崟 + * @return {*} + */ + async function validate() { + let validates = {}; + const Keys = Object.getOwnPropertyNames(useFormData.value); + let i; + for (i = 0; i < Keys.length; i++) { + validates[Keys[i]] = await useFormData.value[Keys[i]][1].validate(); + } + return validates; + } + function handleCreate() { - openModal(true, { - isUpdate: false, + // validate().then((res) => { + // const Keys = Object.getOwnPropertyNames(useFormData.value); + // let i; + // for (i = 0; i < Keys.length; i++) { + // others.value[objParams.value.pCode] = objParams.value.IsID + // ? res[Keys[i]]['ID'] + // : res[Keys[i]][objParams.value.pCode]; + // } + // openDrawer(true, { + // isUpdate: false, + // ifSave: true, + // entityName: entityName.value, + // formJson: getFormSchema(`${entityName.value}_Crud`), + // crudColSlots, + // others: others.value, + // }); + // }); + RouteToProd({rotId: 'e4712192f75b465585107fdcd13d8003', prodCode: 'K5019AA013517'}).then(() => { + }); } - function handleEdit(record: Recordable) { - openModal(true, { - record, - isUpdate: true, - }); - } + // function handleEdit(record: Recordable) { + // openModal(true, { + // record, + // isUpdate: true, + // }); + // } - function handleDelete(record: Recordable) { - console.log(record); + // function handleDelete(record: Recordable) { + // console.log(record); + // } + + function handleSelect(deptId = '') { + searchInfo.deptId = deptId; + reload(); } function handleSuccess() { reload(); } + + /** + * @description: 寮瑰嚭妗嗙‘瀹氳繑鍥� + * @param {*} d + * @return {*} + */ + function custSuccess(d) { + reload(); + } + + /** + * @description: 鍚勮〃鍗曞唴寮瑰嚭閫夋嫨妗嗛�夋嫨鎴愬姛鍚庢柟娉� + * @param {*} d + * @param {*} u + * @param {*} item + * @return {*} + */ + function handleEntSuccess(d, u, item) { + var values = GetSelectSuccess(d, u, cType.value); + selectVals.value = values; //淇濆瓨寮瑰嚭妗嗛�夋嫨鐨勭粨鏋� + let _val = {}; + _val[d.returnFieldName] = values[d.returnFieldName]; + useFormData.value[item][1].setFieldsValue(_val); + } + + /** + * @description: 鎵撳紑鑷畾涔夋ā鎬佹 + * @param {*} item + * @return {*} + */ + function handleCustClick(item) { + OpenCustModal( + useModalData.value[item][1].openModal, //甯﹀叆openModal鏂规硶 + cType.value, + item, + [], + // selectVals.value['ROUTE_CODE'], + ); //[openRvModal], selectVals.value['ID']杩欐槸鑷畾涔夊弬鏁帮紝鎸夊疄闄呴渶姹� + } </script> diff --git a/src/views/tigerprojects/system/lowcode/composition/prodRoute.ts b/src/views/tigerprojects/system/lowcode/composition/prodRoute.ts new file mode 100644 index 0000000..a4fb749 --- /dev/null +++ b/src/views/tigerprojects/system/lowcode/composition/prodRoute.ts @@ -0,0 +1,35 @@ +/* + * @Description: 浜у搧宸ヨ壓璺嚎鐩稿叧 + * @Author: Ben Lin + * @version: + * @Date: 2024-06-19 20:34:27 + * @LastEditors: Ben Lin + * @LastEditTime: 2024-06-20 00:24:28 + */ + +/** + * @description: 鑾峰彇鏍戝舰鍥炬爣 + * @param {Recordable} params + * @return {*} + */ +export function prodRouteCreateIcon(params: Recordable<any>) { + let icon = ''; + switch (params['type']) { + case 'Product': + icon = 'product|svg'; + break; + case 'Route': + icon = 'route|svg'; + break; + case 'Node': + icon = 'node|svg'; + break; + case 'Action': + icon = 'rot_action|svg'; + break; + case 'Customer': + icon = 'customer|svg'; + break; + } + return icon; +} diff --git a/src/views/tigerprojects/system/lowcode/data.ts b/src/views/tigerprojects/system/lowcode/data.ts index 93d9f2e..a398732 100644 --- a/src/views/tigerprojects/system/lowcode/data.ts +++ b/src/views/tigerprojects/system/lowcode/data.ts @@ -18,15 +18,14 @@ * //.-~~~-~_--~- |-------~~~~~~~~ * //.-~~~--\ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * + * * 绁炲吔淇濅綉 姘告棤BUG */ - /* * @Description: 閫氱敤浣庝唬鐮佸憟鐜伴〉闈富鏁版嵁 * @Author: Ben Lin - * @version: + * @version: * @Date: 2024-06-02 17:52:35 * @LastEditors: Ben Lin * @LastEditTime: 2024-06-14 09:08:11 @@ -44,18 +43,44 @@ DftGrpDel, dftEditeOperation, } from './normal/basDefectGrp'; -import { onChangeFns, rsnGrpEdit, rsGrpGetSelectSuccess, rsGrpOpenSelectItem, rsnBaseSchema, rsnCrudSchema, rsnSearchSchema, rsnBaseColumn, rsnGrpDel, rsnEditeOperation } from './normal/basReasonGrp'; -import { DeleteEntity } from '/@/api/tigerapi/system'; +import { + onChangeFns, + rsnGrpEdit, + rsGrpGetSelectSuccess, + rsGrpOpenSelectItem, + rsnBaseSchema, + rsnCrudSchema, + rsnSearchSchema, + rsnBaseColumn, + rsnGrpDel, + rsnEditeOperation, +} from './normal/basReasonGrp'; +import { DeleteEntity, convertToTree, getEntity } from '/@/api/tigerapi/system'; import { ActionItem, BasicColumn, FormSchema } from '/@/components/Table'; import { useI18n } from '/@/hooks/web/useI18n'; import { isNullOrEmpty } from '/@/utils/is'; import { woCustFn, woformSchema } from '/@/views/components/bizMesWo'; import { useModal } from '/@/components/Modal'; -import { goDetail, labelActionItem, labelGetSelectSuccess, labelOpenSelectItem } from './detail/basLabelVar'; +import { + goDetail, + labelActionItem, + labelGetSelectSuccess, + labelOpenSelectItem, +} from './detail/basLabelVar'; import { buildUUID } from '/@/utils/uuid'; import { Tag } from 'ant-design-vue'; import { Ref, h } from 'vue'; -import { pkgBaseColumn, pkgBaseSchema, pkgCrudSchema, pkgEditeOperation, pkgGrpEdit, pkgSearchSchema } from './basPkgrule'; +import { + pkgBaseColumn, + pkgBaseSchema, + pkgCrudSchema, + pkgEditeOperation, + pkgGrpEdit, + pkgSearchSchema, +} from './basPkgrule'; +import { GetRoutePTree } from '/@/api/tigerapi/mes/router'; +import { V_MES_ROUTE_PTREE } from '/@/api/tigerapi/model/router'; +import { prodRouteCreateIcon } from './composition/prodRoute'; const { t } = useI18n(); @@ -117,13 +142,12 @@ /* 鏍囩妯℃澘 */ case 'BAS_LABEL_TEMP': const _data = labelActionItem; - _data[0].onClick = goDetail.bind(null, args[5], params['record']) + _data[0].onClick = goDetail.bind(null, args[5], params['record']); data = [...data, ..._data]; break; } return data; } - /** * @description: 鑷畾涔夊垹闄ゆ柟娉� @@ -158,7 +182,7 @@ export function EditOperation(type: string, data: Ref<any[]>, d, u) { switch (type) { case 'BAS_PKG_DTL': - return pkgEditeOperation(data, d, u); + return pkgEditeOperation(data, d, u); break; case 'BAS_REASON': return rsnEditeOperation(data, d, u); @@ -178,17 +202,38 @@ case 'BAS_DEFECT_GRP': data.action = 'go'; data.url = 'BAS_DEFECT/High'; - data.params = { CODE: '0', ID: buildUUID(), Name: 'BAS_DEFECT', Title: '鏂板涓嶈壇浠g爜缁�', pCode: 'DFTG_CODE', IsID: false }; + data.params = { + CODE: '0', + ID: buildUUID(), + Name: 'BAS_DEFECT', + Title: '鏂板涓嶈壇浠g爜缁�', + pCode: 'DFTG_CODE', + IsID: false, + }; break; case 'BAS_REASON_GRP': data.action = 'go'; data.url = 'BAS_REASON/High'; - data.params = { CODE: '0', ID: buildUUID(), Name: 'BAS_REASON', Title: '鏂板涓嶈壇鍘熷洜缁�', pCode: 'RSNG_CODE', IsID: false }; + data.params = { + CODE: '0', + ID: buildUUID(), + Name: 'BAS_REASON', + Title: '鏂板涓嶈壇鍘熷洜缁�', + pCode: 'RSNG_CODE', + IsID: false, + }; break; case 'BAS_PKG_RULE': data.action = 'go'; data.url = 'BAS_PKG_DTL/High'; - data.params = { CODE: '0', ID: buildUUID(), Name: 'BAS_PKG_DTL', Title: '鏂板鍖呰瑙勫垯', pCode: 'PKG_RULE_ID', IsID: true }; + data.params = { + CODE: '0', + ID: buildUUID(), + Name: 'BAS_PKG_DTL', + Title: '鏂板鍖呰瑙勫垯', + pCode: 'PKG_RULE_ID', + IsID: true, + }; break; } return data; @@ -344,7 +389,7 @@ ], tableName: 'BAS_ITEM', rowKey: 'ITEM_CODE', - searchInfo: {TABLE_NAME: 'BAS_ITEM'} + searchInfo: { TABLE_NAME: 'BAS_ITEM' }, }); break; } @@ -365,10 +410,10 @@ break; default: break; - (e) => { }; + (e) => {}; } } else { - (e) => { }; + (e) => {}; } } @@ -419,7 +464,7 @@ ], tableName: 'BAS_ITEM', rowKey: 'ITEM_CODE', - searchInfo: {TABLE_NAME: 'BAS_ITEM'} + searchInfo: { TABLE_NAME: 'BAS_ITEM' }, }); break; } @@ -492,7 +537,13 @@ }), }; args[2].value = [ - { name: 'BaseForm', slots: [], preIcons: {}, title: '涓嶈壇浠g爜缁勪俊鎭�', entityName: 'BAS_DEFECT_GRP' }, + { + name: 'BaseForm', + slots: [], + preIcons: {}, + title: '涓嶈壇浠g爜缁勪俊鎭�', + entityName: 'BAS_DEFECT_GRP', + }, // { // name: 'prodinfo', // slots: ['addRot', 'setRot'], @@ -516,7 +567,13 @@ }), }; args[2].value = [ - { name: 'BaseForm', slots: [], preIcons: {}, title: '涓嶈壇鍘熷洜缁勪俊鎭�', entityName: 'BAS_REASON_GRP' }, + { + name: 'BaseForm', + slots: [], + preIcons: {}, + title: '涓嶈壇鍘熷洜缁勪俊鎭�', + entityName: 'BAS_REASON_GRP', + }, ]; break; case 'BAS_PKG_DTL': @@ -533,7 +590,13 @@ }), }; args[2].value = [ - { name: 'BaseForm', slots: [], preIcons: {}, title: '鍖呰淇℃伅', entityName: 'BAS_PKG_RULE' }, + { + name: 'BaseForm', + slots: [], + preIcons: {}, + title: '鍖呰淇℃伅', + entityName: 'BAS_PKG_RULE', + }, ]; break; default: @@ -560,9 +623,9 @@ case 'BAS_PKG_DTL': url = `/BAS_PKG_RULE/LC/${encodeURI(JSON.stringify({ ID: 'BAS_PKG_RULE', colSlots: [], crudColSlots: [] }))}`; break; - case 'BAS_LABEL_VAR': - url = `/BAS_LABEL_TEMP/LC/${encodeURI(JSON.stringify({ ID: 'BAS_LABEL_TEMP', colSlots: [], crudColSlots: [] }))}`; - break; + case 'BAS_LABEL_VAR': + url = `/BAS_LABEL_TEMP/LC/${encodeURI(JSON.stringify({ ID: 'BAS_LABEL_TEMP', colSlots: [], crudColSlots: [] }))}`; + break; default: break; } @@ -578,13 +641,25 @@ let title = {}; switch (type) { case 'BAS_DEFECT': - title = { pageTitle: '涓嶈壇浠g爜缁勭鐞�', pageContent: '杩欓噷鍙互娣诲姞鍜屼慨鏀逛笉鑹唬鐮佺粍鍜屼笉鑹唬鐮併��', baseTableTitle: '涓嶈壇浠g爜绠$悊' }; + title = { + pageTitle: '涓嶈壇浠g爜缁勭鐞�', + pageContent: '杩欓噷鍙互娣诲姞鍜屼慨鏀逛笉鑹唬鐮佺粍鍜屼笉鑹唬鐮併��', + baseTableTitle: '涓嶈壇浠g爜绠$悊', + }; break; case 'BAS_REASON': - title = { pageTitle: '涓嶈壇鍘熷洜缁勭鐞�', pageContent: '杩欓噷鍙互娣诲姞鍜屼慨鏀逛笉鑹師鍥犵粍鍜屼笉鑹唬鐮併��', baseTableTitle: '涓嶈壇鍘熷洜绠$悊' }; + title = { + pageTitle: '涓嶈壇鍘熷洜缁勭鐞�', + pageContent: '杩欓噷鍙互娣诲姞鍜屼慨鏀逛笉鑹師鍥犵粍鍜屼笉鑹唬鐮併��', + baseTableTitle: '涓嶈壇鍘熷洜绠$悊', + }; break; case 'BAS_PKG_DTL': - title = { pageTitle: '鍖呰瑙勫垯绠$悊', pageContent: '杩欓噷鍙互娣诲姞鍜屼慨鏀瑰寘瑁呰鍒欏拰鍖呰淇℃伅銆�', baseTableTitle: '鍖呰淇℃伅绠$悊' }; + title = { + pageTitle: '鍖呰瑙勫垯绠$悊', + pageContent: '杩欓噷鍙互娣诲姞鍜屼慨鏀瑰寘瑁呰鍒欏拰鍖呰淇℃伅銆�', + baseTableTitle: '鍖呰淇℃伅绠$悊', + }; break; default: break; @@ -616,4 +691,40 @@ return Values; } +/** + * @description: 鑾峰彇鏍戝舰鏁版嵁 + * @param {string} type + * @return {*} + */ +export async function fetchTreeData(type: string) { + let data = { title: '', treeData: [] as any[], fieldNames: {} }; + switch (type) { + case 'Customer': + let prodTreeData = await GetRoutePTree('K5019AA013517'); + data.treeData = convertToTree(prodTreeData, 'pid', 'id', 'root'); + data.title = '宸ヨ壓璺嚎'; + data.fieldNames = { key: 'id', title: 'name' } + break; + case 'BAS_PKG_DTL': + break; + default: + break; + } + return data; +} +/** + * @description: 鏍规嵁type鑾峰彇鍥炬爣 + * @param {Recordable} params + * @param {string} type + * @return {*} + */ +export function createIconByType(params: Recordable<any>, type: string) { + let icon = ''; + switch (type) { + case 'Customer': + icon = prodRouteCreateIcon(params); + break; + } + return icon; +} diff --git a/src/views/tigerprojects/system/lowcode/detail/index.vue b/src/views/tigerprojects/system/lowcode/detail/index.vue index 539aaff..3b75000 100644 --- a/src/views/tigerprojects/system/lowcode/detail/index.vue +++ b/src/views/tigerprojects/system/lowcode/detail/index.vue @@ -1,4 +1,12 @@ <!-- + * @Description: file content + * @Author: Ben Lin + * @version: + * @Date: 2024-06-18 15:09:48 + * @LastEditors: Ben Lin + * @LastEditTime: 2024-06-19 10:49:35 +--> +<!-- * @Description: 浣庝唬鐮佽鎯呭憟鐜伴〉闈� * @Author: Ben Lin * @version: diff --git a/src/views/tigerprojects/system/lowcode/high/index.vue b/src/views/tigerprojects/system/lowcode/high/index.vue index 44cdb75..97e8611 100644 --- a/src/views/tigerprojects/system/lowcode/high/index.vue +++ b/src/views/tigerprojects/system/lowcode/high/index.vue @@ -157,7 +157,7 @@ const others = ref(getOthersValues(entityName.value, objParams.value.CODE, objParams.value.ID)); //鑾峰彇琛ㄦ牸鍒椾俊鎭苟鍒濆鍖栦竴浜涙暟鎹紝濡傦細formSchemas(寮瑰嚭妗嗘垨楂樼骇椤甸潰澶氳〃鍗曠粨鏋�), useFormData(琛ㄥ崟涓彃妲芥覆鏌撴寜閽墦寮�妯℃�佹useModal鏂规硶)...绛� const _columns = GetBasicColumnAndInit(entityName.value, formSchemas, useFormData, baseCards, otherCards, useForm); -const data = ref([] as BAS_DEFECT[]); +const data = ref([]); const [registerCust, { openModal: openCustomModal, closeModal }] = useModal(); const [registerItemAdd, { openModal: openItemModal }] = useModal(); const [registerDrawer, { openDrawer }] = useDrawer(); diff --git a/src/views/tigerprojects/wms/warehousemodel/RegionForm.vue b/src/views/tigerprojects/wms/warehousemodel/RegionForm.vue index c18774e..04a3180 100644 --- a/src/views/tigerprojects/wms/warehousemodel/RegionForm.vue +++ b/src/views/tigerprojects/wms/warehousemodel/RegionForm.vue @@ -13,7 +13,7 @@ import { PageWrapper } from '/@/components/Page'; import { SaveRegion } from '/@/api/tigerapi/wms/house'; import { useI18n } from '/@/hooks/web/useI18n'; -const { t } = useI18n('WMS.WareHouse'); +const { t } = useI18n(); const schemas: FormSchema[] = [ { field: 'CREATE_TIME', diff --git a/src/views/tigerprojects/wms/warehousemodel/RegionModal.vue b/src/views/tigerprojects/wms/warehousemodel/RegionModal.vue index 95c5229..a0a74f1 100644 --- a/src/views/tigerprojects/wms/warehousemodel/RegionModal.vue +++ b/src/views/tigerprojects/wms/warehousemodel/RegionModal.vue @@ -19,7 +19,7 @@ import { useMessage } from '/@/hooks/web/useMessage'; import { useI18n } from '/@/hooks/web/useI18n'; - const { t } = useI18n('WMS.WareHouse'); + const { t } = useI18n(); const schemas: FormSchema[] = [ { diff --git a/src/views/tigerprojects/wms/warehousemodel/ShelfForm.vue b/src/views/tigerprojects/wms/warehousemodel/ShelfForm.vue index 1134f1d..2fe57f5 100644 --- a/src/views/tigerprojects/wms/warehousemodel/ShelfForm.vue +++ b/src/views/tigerprojects/wms/warehousemodel/ShelfForm.vue @@ -62,7 +62,7 @@ emit: ['success', 'register'], setup(props, { emit }) { const [registerLocation, { openModal: openLocationModal }] = useModal(); - const { t } = useI18n('WMS.WareHouse'); + const { t } = useI18n(); var CENLength=ref(0); var NOLength=ref(0); const schemas: FormSchema[] = [ diff --git a/src/views/tigerprojects/wms/warehousemodel/ShelfModal.vue b/src/views/tigerprojects/wms/warehousemodel/ShelfModal.vue index d8838cd..24f6abf 100644 --- a/src/views/tigerprojects/wms/warehousemodel/ShelfModal.vue +++ b/src/views/tigerprojects/wms/warehousemodel/ShelfModal.vue @@ -13,7 +13,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; import { useMessage } from '/@/hooks/web/useMessage'; -const { t } = useI18n('WMS.WareHouse'); +const { t } = useI18n(); const { createMessage } = useMessage(); const schemas: FormSchema[] = [ { diff --git a/src/views/tigerprojects/wms/warehousemodel/WareHouseForm.vue b/src/views/tigerprojects/wms/warehousemodel/WareHouseForm.vue index aafba07..7988c0a 100644 --- a/src/views/tigerprojects/wms/warehousemodel/WareHouseForm.vue +++ b/src/views/tigerprojects/wms/warehousemodel/WareHouseForm.vue @@ -15,7 +15,7 @@ import { getTreeList } from '/@/api/tigerapi/dept'; //import WhListItem from '@/api/model/warehoueseModel'; import { useI18n } from '/@/hooks/web/useI18n'; -const { t } = useI18n('WMS.WareHouse'); +const { t } = useI18n(); const schemas: FormSchema[] = [ { field: 'CREATE_TIME', diff --git a/src/views/tigerprojects/wms/warehousemodel/WareHouseModal.vue b/src/views/tigerprojects/wms/warehousemodel/WareHouseModal.vue index 51a6009..27ec3d6 100644 --- a/src/views/tigerprojects/wms/warehousemodel/WareHouseModal.vue +++ b/src/views/tigerprojects/wms/warehousemodel/WareHouseModal.vue @@ -14,7 +14,7 @@ import { useI18n } from '/@/hooks/web/useI18n'; import { useMessage } from '/@/hooks/web/useMessage'; - const { t } = useI18n('WMS.WareHouse'); + const { t } = useI18n(); const schemas: FormSchema[] = [ { field: 'CREATE_TIME', diff --git a/src/views/tigerprojects/wms/warehousemodel/WareHouseTree.vue b/src/views/tigerprojects/wms/warehousemodel/WareHouseTree.vue index d49b1fe..b509cee 100644 --- a/src/views/tigerprojects/wms/warehousemodel/WareHouseTree.vue +++ b/src/views/tigerprojects/wms/warehousemodel/WareHouseTree.vue @@ -1,5 +1,5 @@ <template> - <div class="m-4 mr-0 overflow-hidden bg-white" > + <div class="m-4 mr-0 overflow-hidden bg-white"> <TigerTree :title="t('浠撳簱')" toolbar @@ -11,7 +11,7 @@ :fieldNames="{ key: 'id', title: 'houseName' }" :beforeRightClick="getRightMenuList" @select="handleSelect" - @addHouse="addHouse" + @handleAdd="addHouse" /> <!-- <button :onClick="aa" style=" position: absolute; @@ -35,13 +35,13 @@ import { getTreeList, DeleteWareHouse, getWHList } from '/@/api/tigerapi/wms/house'; import { useMessage } from '/@/hooks/web/useMessage'; import { useI18n } from '/@/hooks/web/useI18n'; - const { t } = useI18n('WMS.WareHouse'); + const { t } = useI18n(); export default defineComponent({ name: 'HouseTree', components: { TigerTree, RegionModal, WareHouseModal, ShelfModal }, - emits: ['select', 'success','delete'], + emits: ['select', 'success', 'delete'], setup(_, { emit }) { const treeData = ref<TreeItem[]>(); const [registerWareHouse, { openModal: openWareHouseModal }] = useModal(); @@ -63,7 +63,7 @@ // regions.children.forEach(shelf => { // createIcon(shelf.houseType) // }); - // }else{ + // }else{ // createIcon(regions.houseType); // } // }); @@ -88,7 +88,7 @@ fetch(); } - async function getRightMenuList(node: any): Promise<ContextMenuItem[]> { + function getRightMenuList(node: any): ContextMenuItem[] { var name = node.houseType === 'Warehouse' ? t('鏂板鍌ㄥ尯') : t('鏂板璐ф灦'); if (node.houseType === 'Shelf') { @@ -154,18 +154,19 @@ ]; } } - async function GetORG_CODE(params: string) { - var org = await getWHList(params); - return org[0].AUTH_ORG; + function GetORG_CODE(params: string) { + getWHList(params).then((org) => { + return org[0].AUTH_ORG; + }); } - function createIcon({ houseType }) { - if (houseType === 'Warehouse') { + function createIcon(params: Recordable) { + if (params['houseType'] === 'Warehouse') { return 'warehouse|svg'; } - if (houseType === 'Region') { + if (params['houseType'] === 'Region') { return 'Region|svg'; } - if (houseType === 'Shelf') { + if (params['houseType'] === 'Shelf') { return 'Shelf|svg'; } return ''; diff --git a/src/views/tigerprojects/wms/warehousemodel/index.vue b/src/views/tigerprojects/wms/warehousemodel/index.vue index 5539218..5e9e194 100644 --- a/src/views/tigerprojects/wms/warehousemodel/index.vue +++ b/src/views/tigerprojects/wms/warehousemodel/index.vue @@ -21,7 +21,7 @@ import { getWHList } from '/@/api/tigerapi/wms/house'; import { useI18n } from '/@/hooks/web/useI18n'; -const { t } = useI18n('WMS.WareHouse'); +const { t } = useI18n(); //import { WhListItem, RegionListItem, ShelfListItem } from '@/api/model/warehoueseModel'; export default defineComponent({ -- Gitblit v1.9.3