diff --git a/.env b/.env new file mode 100644 index 0000000..873997e --- /dev/null +++ b/.env @@ -0,0 +1,7 @@ +# port +VITE_PORT =8848 +VITE_SYS_NAME =心理测评系统后台管理 + +VITE_BASE_API = '/api' +VITE_ADMIN_API = '/admin-api' + diff --git a/.env.development b/.env.development new file mode 100644 index 0000000..91924b9 --- /dev/null +++ b/.env.development @@ -0,0 +1,9 @@ +# 本地环境 +NODE_ENV = 'development' + +# 本地环境接口地址 + +VITE_BASE_ENV = 'stage' +VITE_BASE_PATH = '' +VITE_BASE_PORT = '9012' +VITE_DG_PROJECT_SYSTEM = 'http://localhost:8091' diff --git a/.env.production b/.env.production new file mode 100644 index 0000000..72fadc6 --- /dev/null +++ b/.env.production @@ -0,0 +1,9 @@ +# 线上环境 +NODE_ENV = "production" + +# 线上环境接口地址 +VITE_BASE_ENV = 'prod' +VITE_BASE_PATH = '' +VITE_BASE_PORT = '9015' +VITE_DG_PROJECT_SYSTEM = 'https://nk.cqdg.xyz:9086' + diff --git a/.env.stage b/.env.stage new file mode 100644 index 0000000..78b3ff4 --- /dev/null +++ b/.env.stage @@ -0,0 +1,9 @@ +# 测试环境 +NODE_ENV = "test" + + +# 测试环境接口地址 +VITE_BASE_ENV = 'stage' +VITE_BASE_PATH = '' +VITE_BASE_PORT = '9012' +VITE_DG_PROJECT_SYSTEM = 'http://222.179.96.190:8091' diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..348631b --- /dev/null +++ b/.eslintignore @@ -0,0 +1,15 @@ + +*.sh +node_modules +*.md +*.woff +*.ttf +.vscode +.idea +dist +/public +/docs +.husky +.local +/bin +Dockerfile diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..aacc9af --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,25 @@ +module.exports = { + "env": { + "browser": true, + "es2021": true, + "node": true + }, + "extends": [ + "eslint:recommended", + "plugin:vue/vue3-essential", + "plugin:@typescript-eslint/recommended", + 'plugin:prettier/recommended' + ], + "parser": "vue-eslint-parser", + "parserOptions": { + "ecmaVersion": "latest", + "parser": "@typescript-eslint/parser", + "sourceType": "module" + }, + "plugins": [ + "vue", + "@typescript-eslint" + ], + "rules": { + } +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..82b8b1b --- /dev/null +++ b/.gitignore @@ -0,0 +1,25 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist-ssr +dist +*.local +package-lock.json + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..f7e39e6 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,9 @@ +/dist/* +.local +.output.js +/node_modules/** + +**/*.svg +**/*.sh + +/public/* diff --git a/README.md b/README.md new file mode 100644 index 0000000..637a5cf --- /dev/null +++ b/README.md @@ -0,0 +1,42 @@ +## 简介 +本项目是基于Vue3 + Vite + TS 的多页面大型MPA项目, 他目前提供了pc用户端模块和后台管理模块的开发编译和打包。 +项目支持模块的扩展、支持单独模块运行和打包、也支持全部模块一起运行和打包。 + +## 技术栈 +- [Vue](https://cn.vuejs.org/guide/introduction.html) 现代前端框架,使应用界面开发简单高效,提供流畅的用户体验。 +- [Vite](https://cn.vitejs.dev/) 快速构建工具,为项目带来更快的开发速度和响应性能。 +- [Typescript](https://github.com/microsoft/TypeScript) 静态类型的JavaScript超集,确保代码质量和可维护性,减少潜在错误。 +- [Element-plus](https://element-plus.gitee.io/zh-CN/component/button.html) 基于Vue的精美UI组件库,提供漂亮、功能丰富的界面元素,加速开发进度,让项目外观更专业。 +- [Tailwind CSS](https://www.tailwindcss.cn/docs/installation) 强大的CSS框架,提供丰富的可定制样式,快速构建独特的现代界面。 +- [Pinia](https://pinia.vuejs.org/zh/introduction.html) 现代化的Vue状态管理库,简单易用,让应用状态管理更高效可靠。 +- [Axios](https://github.com/axios/axios) 流行的HTTP客户端,使数据交互更简单,提供稳定的网络请求和响应处理。 + + +## 开发运行 + +```bash + # 安装依赖 + npm run install + + # 本地开发 开启所有模块服务 + npm run dev + + # 本地开发 开启单个模块服务 + npm run dev --page=admin + + # 测试环境打包 + npm run build:stage + # 单个模块打包 + npm run build:stage --page=admin + + # 生产环境打包 + npm run build:prod + # 单个模块打包 + npm run build:prod --page=admin + + # 创建新模块 + npm run new:page + +``` + + diff --git a/commitlint.config.js b/commitlint.config.js new file mode 100644 index 0000000..171d0c3 --- /dev/null +++ b/commitlint.config.js @@ -0,0 +1,81 @@ +// 文档参考:https://cz-git.qbb.sh/zh/config/ +// cz.config.js kk +/** @type {import('cz-git').CommitizenGitOptions} */ +module.exports = { + ignores: [commit => commit.includes("init")], + extends: ["@commitlint/config-conventional"], + // alias: { fd: 'docs: fix typos' }, + // messages: { + // type: 'Select the type of change that you\'re committing:', + // scope: 'Denote the SCOPE of this change (optional):', + // customScope: 'Denote the SCOPE of this chang e:', + // subject: 'Write a SHORT, IMPERATIVE tense description of the change:\n', + // body: 'Provide a LONGER description of the change (optional). Use "|" to break new line:\n', + // breaking: 'List any BREAKING CHANGES (optional). Use "|" to break new line:\n', + // footerPrefixsSelect: 'Select the ISSUES type of changeList by this change (optional):', + // customFooterPrefixs: 'Input ISSUES prefix:', + // footer: 'List any ISSUES by this change. E.g.: #31, #34:\n', + // confirmCommit: 'Are you sure you want to proceed with the commit above?' + // }, + prompt: { + // 中英文对照版 + messages: { + type: '选择你要提交的类型 :', + scope: '选择一个提交范围(可选):', + customScope: '请输入自定义的提交范围 :', + subject: '填写简短精炼的变更描述 :\n', + body: '填写更加详细的变更描述(可选)。使用 "|" 换行 :\n', + breaking: '列举非兼容性重大的变更(可选)。使用 "|" 换行 :\n', + footerPrefixesSelect: '选择关联issue前缀(可选):', + customFooterPrefix: '输入自定义issue前缀 :', + footer: '列举关联issue (可选) 例如: #31, #I3244 :\n', + confirmCommit: '是否提交或修改commit ?' + }, + types: [ + { value: '特性', name: '特性: 新增功能' }, + { value: '修复', name: '修复: 修复缺陷' }, + { value: '文档', name: '文档: 文档变更' }, + { value: '格式', name: '格式: 代码格式(不影响功能,例如空格、分号等格式修正)' }, + { value: '重构', name: '重构: 代码重构(不包括 bug 修复、功能新增)' }, + { value: '性能', name: '性能: 性能优化' }, + { value: '测试', name: '测试: 添加疏漏测试或已有测试改动' }, + { value: '构建', name: '构建: 构建流程、外部依赖变更(如升级 npm 包、修改 webpack 配置等)' }, + { value: '集成', name: '集成: 修改 CI 配置、脚本' }, + { value: '回退', name: '回退: 回滚 commit' }, + { value: '其他', name: '其他: 对构建过程或辅助工具和库的更改(不影响源文件、测试用例)' }, + ], + // emptyScopesAlias: 'empty: 不填写', + // customScopesAlias: 'custom: 自定义', + + useEmoji: true, + // emojiAlign: 'center', + themeColorCode: '', + scopes: [], + allowCustomScopes: true, + allowEmptyScopes: true, + customScopesAlign: 'bottom', + customScopesAlias: 'custom', + emptyScopesAlias: 'empty', + upperCaseSubject: false, + markBreakingChangeMode: false, + allowBreakingChanges: ['feat', 'fix'], + breaklineNumber: 100, + breaklineChar: '|', + skipQuestions: [], + issuePrefixs: [{ value: 'closed', name: 'closed: ISSUES has been processed' }], + customIssuePrefixsAlign: 'top', + emptyIssuePrefixsAlias: 'skip', + customIssuePrefixsAlias: 'custom', + allowCustomIssuePrefixs: true, + allowEmptyIssuePrefixs: true, + confirmColorize: true, + maxHeaderLength: Infinity, + maxSubjectLength: Infinity, + minSubjectLength: 0, + scopeOverrides: undefined, + defaultBody: '', + defaultIssues: '', + defaultScope: '', + defaultSubject: '' + } +} diff --git a/index.html b/index.html new file mode 100644 index 0000000..0acb9bd --- /dev/null +++ b/index.html @@ -0,0 +1,127 @@ + + + + + + + + %VITE_SYS_NAME% + + + +
+ +
+
+
+ + + + + + +
+
+
+
+ + + + \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..0508492 --- /dev/null +++ b/package.json @@ -0,0 +1,96 @@ +{ + "name": "dg-project", + "private": true, + "version": "1.0.1", + "author": "dangc", + "scripts": { + "dev": "vite", + "build:dev": "vite build --mode development", + "build:stage": "vite build --mode stage", + "build:prod": "vite build --mode production", + "commit": "git add -A && czg ", + "build": "vite build", + "preview": "vite preview", + "build:ts": "vue-tsc --noEmit --skipLibCheck && vite build", + "new:page": "node ./scripts/index.mjs", + "lint": "eslint . --ext .vue,.js,.ts,.jsx,.tsx --fix", + "lint:prettier": "prettier --write \"src/**/*.{js,json,tsx,css,less,scss,vue,html,md}\"" + }, + "dependencies": { + "@better-scroll/core": "^2.4.2", + "@vueuse/core": "^9.1.1", + "@wangeditor/editor": "^5.1.14", + "@wangeditor/editor-for-vue": "^5.1.12", + "await-to-js": "^3.0.0", + "axios": "^0.27.2", + "clipboard": "^2.0.10", + "core-js": "^3.6.5", + "crypto-js": "^4.1.1", + "dayjs": "^1.11.4", + "echarts": "^5.3.1", + "element-plus": "^2.2.28", + "file-saver": "^2.0.5", + "fuse.js": "^6.6.2", + "highlight.js": "^9.18.5", + "js-cookie": "^3.0.5", + "nprogress": "^0.2.0", + "path-browserify": "^1.0.1", + "path-to-regexp": "^6.2.0", + "pinia": "^2.0.21", + "pinia-plugin-persistedstate": "^2.1.1", + "raf": "^3.4.1", + "resize-observer-polyfill": "^1.5.1", + "sass": "^1.54.0", + "svg-sprite-loader": "^6.0.11", + "vkbeautify": "^0.99.3", + "vue": "^3.2.39", + "vue-cropper": "^1.0.3", + "vue-cropperjs": "^5.0.0", + "vue-fuse": "^4.1.1", + "vue-qr": "^4.0.6", + "vue-router": "^4.1.6", + "workflow-bpmn-modeler": "^0.2.8" + }, + "devDependencies": { + "@commitlint/cli": "^17.3.0", + "@commitlint/config-conventional": "^17.3.0", + "@tailwindcss/typography": "^0.5.9", + "@types/chalk": "^2.2.0", + "@types/crypto-js": "^4.1.1", + "@types/file-saver": "^2.0.5", + "@types/js-cookie": "^3.0.3", + "@typescript-eslint/eslint-plugin": "^5.32.0", + "@typescript-eslint/parser": "^5.32.0", + "@vitejs/plugin-vue": "^3.0.0", + "autoprefixer": "^10.4.14", + "commitizen": "^4.2.5", + "consola": "^2.15.3", + "cz-git": "^1.3.12", + "czg": "^1.3.12", + "dart-sass": "^1.25.0", + "dotenv": "^16.3.1", + "eslint": "^8.21.0", + "eslint-config-prettier": "^8.5.0", + "eslint-plugin-prettier": "^4.2.1", + "eslint-plugin-vue": "^9.3.0", + "fast-glob": "^3.2.11", + "postcss": "^8.4.23", + "prettier": "^2.7.1", + "tailwindcss": "^3.3.2", + "typescript": "^4.6.4", + "unplugin-auto-import": "^0.10.3", + "unplugin-vue-components": "^0.21.2", + "unplugin-vue-define-options": "^0.7.3", + "vite": "^4.3.8", + "vite-plugin-compression": "^0.5.1", + "vite-plugin-style-import": "^2.0.0", + "vite-plugin-svg-icons": "^2.0.1", + "vite-plugin-vue-setup-extend": "^0.4.0", + "vue-tsc": "^1.6.5" + }, + "config": { + "commitizen": { + "path": "node_modules/cz-git" + } + } +} diff --git a/postcss.config.js b/postcss.config.js new file mode 100644 index 0000000..33ad091 --- /dev/null +++ b/postcss.config.js @@ -0,0 +1,6 @@ +module.exports = { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +} diff --git a/prettier.config.js b/prettier.config.js new file mode 100644 index 0000000..fe640cd --- /dev/null +++ b/prettier.config.js @@ -0,0 +1,14 @@ +module.exports = { + // 一行的字符数,如果超过会进行换行,默认为80 + printWidth: 150, + // 行位是否使用分号,默认为true + semi: false, + vueIndentScriptAndStyle: true, + // 字符串是否使用单引号,默认为false,使用双引号 + singleQuote: true, + // 是否使用尾逗号,有三个可选值"" + trailingComma: 'all', + proseWrap: 'never', + htmlWhitespaceSensitivity: 'strict', + endOfLine: 'auto', +}; diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000..54e49ae Binary files /dev/null and b/public/favicon.ico differ diff --git a/public/log.png b/public/log.png new file mode 100644 index 0000000..1f20ee0 Binary files /dev/null and b/public/log.png differ diff --git a/public/static/screen/bg.jpg b/public/static/screen/bg.jpg new file mode 100644 index 0000000..164d641 Binary files /dev/null and b/public/static/screen/bg.jpg differ diff --git a/public/static/screen/bg.png b/public/static/screen/bg.png new file mode 100644 index 0000000..4d00e1a Binary files /dev/null and b/public/static/screen/bg.png differ diff --git a/public/static/screen/footer2.png b/public/static/screen/footer2.png new file mode 100644 index 0000000..8bb531b Binary files /dev/null and b/public/static/screen/footer2.png differ diff --git a/public/static/screen/header-bg.png b/public/static/screen/header-bg.png new file mode 100644 index 0000000..7ae3251 Binary files /dev/null and b/public/static/screen/header-bg.png differ diff --git a/public/static/screen/server-bg.png b/public/static/screen/server-bg.png new file mode 100644 index 0000000..a0a8963 Binary files /dev/null and b/public/static/screen/server-bg.png differ diff --git a/scripts/index.mjs b/scripts/index.mjs new file mode 100644 index 0000000..b8e19ac --- /dev/null +++ b/scripts/index.mjs @@ -0,0 +1,64 @@ +import chalk from 'chalk' +import path from 'path' +import fs from 'fs' + +const resolve = (__dirname, ...file) => path.resolve(__dirname, ...file) +const log = (message) => console.log(chalk.green(`${message}`)) +const successLog = (message) => console.log(chalk.blue(`${message}`)) +const errorLog = (error) => console.log(chalk.red(`${error}`)) +log('请输入要生成的"模块名称"、会生成在 /src/modules 目录下') +process.stdin.on('data', async (chunk) => { + const pagePath = 'src/modules' + const pages = fs.readdirSync(path.resolve('./src/modules')) + // 获取输入的信息 + const projectName = String(chunk).trim().toString() + + + if(!projectName || pages.includes(projectName)){ + errorLog('模块已经存在,请重新输入') + return + } + successLog(`将在 /src/modules 目录下创建 ${projectName} 文件夹`) + const targetPath = resolve('./src/modules', projectName) + fs.mkdirSync(targetPath) + copyFile('./scripts/template', targetPath) + setFile() + async function setFile() { + // 修改项目中/router/inbex.ts的文件内容 + const routerPath = resolve(targetPath, './router/index.ts') + const data = await fs.promises.readFile(routerPath, 'utf8'); + const modifiedData = data.replace(/\${pagaPath}/, `/${projectName}`); + await fs.promises.writeFile(routerPath, modifiedData, 'utf8'); + + successLog(`${projectName}模块已创建`); + process.stdin.emit('end') + } +}) + +process.stdin.on('end', () => { + process.exit() +}) + + +// 判断文件夹是否存在,不存在创建一个 +const isExist = (path) => { + if (!fs.existsSync(path)) { + fs.mkdirSync(path) + } +} +//递归复制模版文件夹内的文件 +const copyFile = (sourcePath, targetPath) => { + const sourceFile = fs.readdirSync(sourcePath, { withFileTypes: true }) + + sourceFile.forEach((file) => { + const newSourcePath = path.resolve(sourcePath, file.name) + const newTargetPath = path.resolve(targetPath, file.name) + //isDirectory() 判断这个文件是否是文件夹,是就继续递归复制其内容 + if (file.isDirectory()) { + isExist(newTargetPath) + copyFile(newSourcePath, newTargetPath) + } else { + fs.copyFileSync(newSourcePath, newTargetPath) + } + }) +} diff --git a/scripts/template/App.vue b/scripts/template/App.vue new file mode 100644 index 0000000..8484259 --- /dev/null +++ b/scripts/template/App.vue @@ -0,0 +1,18 @@ + + + + + diff --git a/scripts/template/index.html b/scripts/template/index.html new file mode 100644 index 0000000..9a39a7f --- /dev/null +++ b/scripts/template/index.html @@ -0,0 +1,13 @@ + + + + + + + + + +
+ + + diff --git a/scripts/template/main.ts b/scripts/template/main.ts new file mode 100644 index 0000000..b184618 --- /dev/null +++ b/scripts/template/main.ts @@ -0,0 +1,6 @@ +import { createApp } from 'vue' +import App from './App.vue' +import router from './router' + +const app = createApp(App) +app.use(router).mount('#app') diff --git a/scripts/template/router/index.ts b/scripts/template/router/index.ts new file mode 100644 index 0000000..3d153ab --- /dev/null +++ b/scripts/template/router/index.ts @@ -0,0 +1,24 @@ +import { createRouter, createWebHistory, createWebHashHistory } from "vue-router"; + + +const routes: any = [ + { + path: '/', + redirect: '/home' + }, + { + path: '/home', + component: () => import("../views/index.vue") + }, +] + +const router = createRouter({ + history: createWebHistory('${pagaPath}'), + routes: [...routes], +}); + +router.beforeEach((to, from, next) => { + (document as any).title = to.meta.title || "德工建设"; + next(); +}); +export default router; \ No newline at end of file diff --git a/scripts/template/views/index.vue b/scripts/template/views/index.vue new file mode 100644 index 0000000..095db3d --- /dev/null +++ b/scripts/template/views/index.vue @@ -0,0 +1,9 @@ + + + diff --git a/src/App.vue b/src/App.vue new file mode 100644 index 0000000..fb1433a --- /dev/null +++ b/src/App.vue @@ -0,0 +1,31 @@ + + + + + diff --git a/src/libs/components/icons/SvgIcon/index.vue b/src/libs/components/icons/SvgIcon/index.vue new file mode 100644 index 0000000..72813f7 --- /dev/null +++ b/src/libs/components/icons/SvgIcon/index.vue @@ -0,0 +1,35 @@ + + + + + diff --git a/src/libs/icons/element/iconNames.json b/src/libs/icons/element/iconNames.json new file mode 100644 index 0000000..019a7cf --- /dev/null +++ b/src/libs/icons/element/iconNames.json @@ -0,0 +1,349 @@ +[ + { + "code": "System", + "name": "系统", + "icons": [ + "Plus", + "Minus", + "CirclePlus", + "Search", + "Female", + "Male", + "Aim", + "House", + "FullScreen", + "Loading", + "Link", + "Service", + "Pointer", + "Star", + "Notification", + "Connection", + "ChatDotRound", + "Setting", + "Clock", + "Position", + "Discount", + "Odometer", + "ChatSquare", + "ChatRound", + "ChatLineRound", + "ChatLineSquare", + "ChatDotSquare", + "View", + "Hide", + "Unlock", + "Lock", + "RefreshRight", + "RefreshLeft", + "Refresh", + "Bell", + "MuteNotification", + "User", + "Check", + "CircleCheck", + "Warning", + "CircleClose", + "Close", + "PieChart", + "More", + "Compass", + "Filter", + "Switch", + "Select", + "SemiSelect", + "CloseBold", + "EditPen", + "Edit", + "Message", + "MessageBox", + "TurnOff", + "Finished", + "Delete", + "Crop", + "SwitchButton", + "Operation", + "Open", + "Remove", + "ZoomOut", + "ZoomIn", + "InfoFilled", + "CircleCheckFilled", + "SuccessFilled", + "WarningFilled", + "CircleCloseFilled", + "QuestionFilled", + "WarnTriangleFilled", + "UserFilled", + "MoreFilled", + "Tools", + "HomeFilled", + "UploadFilled", + "Avatar", + "HelpFilled", + "menuIcon", + "Share", + "StarFilled", + "Comment", + "Histogram", + "Grid", + "Promotion", + "DeleteFilled", + "RemoveFilled", + "CirclePlusFilled" + ] + }, + { + "code": "Arrow", + "name": "箭头", + "icons": [ + "ArrowLeft", + "ArrowUp", + "ArrowRight", + "ArrowDown", + "ArrowLeftBold", + "ArrowUpBold", + "ArrowRightBold", + "ArrowDownBold", + "DArrowRight", + "DArrowLeft", + "Download", + "Upload", + "Top", + "Bottom", + "Back", + "Right", + "TopRight", + "TopLeft", + "BottomRight", + "BottomLeft", + "Sort", + "SortUp", + "SortDown", + "Rank", + "CaretLeft", + "CaretTop", + "CaretRight", + "CaretBottom", + "DCaret", + "Expand", + "Fold" + ] + }, + { + "code": "Document", + "name": "文档", + "icons": [ + "DocumentAdd", + "Document", + "Notebook", + "Tickets", + "Memo", + "Collection", + "Postcard", + "ScaleToOriginal", + "SetUp", + "DocumentDelete", + "DocumentChecked", + "DataBoard", + "DataAnalysis", + "CopyDocument", + "FolderChecked", + "Files", + "Folder", + "FolderDelete", + "FolderRemove", + "FolderOpened", + "DocumentCopy", + "DocumentRemove", + "FolderAdd", + "FirstAidKit", + "Reading", + "DataLine", + "Management", + "Checked", + "Ticket", + "Failed", + "TrendCharts", + "List" + ] + }, + { + "code": "Media", + "name": "媒体", + "icons": [ + "Microphone", + "Mute", + "Mic", + "VideoPause", + "VideoCamera", + "VideoPlay", + "Headset", + "Monitor", + "Film", + "Camera", + "Picture", + "PictureRounded", + "Iphone", + "Cellphone", + "VideoCameraFilled", + "PictureFilled", + "Platform", + "CameraFilled", + "BellFilled" + ] + }, + { + "code": "Traffic", + "name": "交通", + "icons": [ + "Location", + "LocationInformation", + "DeleteLocation", + "Coordinate", + "Bicycle", + "OfficeBuilding", + "School", + "Guide", + "AddLocation", + "MapLocation", + "Place", + "LocationFilled", + "Van" + ] + }, + { + "code": "Food", + "name": "食物", + "icons": [ + "Watermelon", + "Pear", + "NoSmoking", + "Smoking", + "Mug", + "GobletSquareFull", + "GobletFull", + "KnifeFork", + "Sugar", + "Bowl", + "MilkTea", + "Lollipop", + "Coffee", + "Chicken", + "Dish", + "IceTea", + "ColdDrink", + "CoffeeCup", + "DishDot", + "IceDrink", + "IceCream", + "Dessert", + "IceCreamSquare", + "ForkSpoon", + "IceCreamRound", + "Food", + "HotWater", + "Grape", + "Fries", + "Apple", + "Burger", + "Goblet", + "GobletSquare", + "Orange", + "Cherry" + ] + }, + { + "code": "Items", + "name": "项目", + "icons": [ + "Printer", + "Calendar", + "CreditCard", + "Box", + "Money", + "Refrigerator", + "Cpu", + "Football", + "Brush", + "Suitcase", + "SuitcaseLine", + "Umbrella", + "AlarmClock", + "Medal", + "GoldMedal", + "Present", + "Mouse", + "Watch", + "QuartzWatch", + "Magnet", + "Help", + "Soccer", + "ToiletPaper", + "ReadingLamp", + "Paperclip", + "MagicStick", + "Basketball", + "Baseball", + "Coin", + "Goods", + "Sell", + "SoldOut", + "Key", + "ShoppingCart", + "ShoppingCartFull", + "ShoppingTrolley", + "Phone", + "Scissor", + "Handbag", + "ShoppingBag", + "Trophy", + "TrophyBase", + "Stopwatch", + "Timer", + "CollectionTag", + "TakeawayBox", + "PriceTag", + "Wallet", + "Opportunity", + "PhoneFilled", + "WalletFilled", + "GoodsFilled", + "Flag", + "BrushFilled", + "Briefcase", + "Stamp" + ] + }, + { + "code": "Weather", + "name": "天气", + "icons": [ + "Sunrise", + "Sunny", + "Ship", + "MostlyCloudy", + "PartlyCloudy", + "Sunset", + "Drizzling", + "Pouring", + "Cloudy", + "Moon", + "MoonNight", + "Lightning" + ] + }, + { + "code": "Other", + "name": "其他", + "icons": [ + "ChromeFilled", + "Eleme", + "ElemeFilled", + "ElementPlus", + "Shop", + "SwitchFilled", + "WindPower" + ] + } +] \ No newline at end of file diff --git a/src/libs/icons/index.js b/src/libs/icons/index.js new file mode 100644 index 0000000..175c6da --- /dev/null +++ b/src/libs/icons/index.js @@ -0,0 +1,11 @@ +import Vue from 'vue' +import SvgIcon from '@lib/components/icons/SvgIcon' // svg component + + +// const req = require.context('./svg', false, /\.svg$/) +const req = import.meta.globEager('./svg/*.svg') + +const requireAll = (requireContext) => requireContext.keys().map(requireContext) +requireAll(req) + +export default SvgIcon diff --git a/src/libs/icons/svg/404.svg b/src/libs/icons/svg/404.svg new file mode 100644 index 0000000..6df5019 --- /dev/null +++ b/src/libs/icons/svg/404.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/borrow.svg b/src/libs/icons/svg/borrow.svg new file mode 100644 index 0000000..81491d4 --- /dev/null +++ b/src/libs/icons/svg/borrow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/bug.svg b/src/libs/icons/svg/bug.svg new file mode 100644 index 0000000..05a150d --- /dev/null +++ b/src/libs/icons/svg/bug.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/build.svg b/src/libs/icons/svg/build.svg new file mode 100644 index 0000000..97c4688 --- /dev/null +++ b/src/libs/icons/svg/build.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/button.svg b/src/libs/icons/svg/button.svg new file mode 100644 index 0000000..904fddc --- /dev/null +++ b/src/libs/icons/svg/button.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/cascader.svg b/src/libs/icons/svg/cascader.svg new file mode 100644 index 0000000..e256024 --- /dev/null +++ b/src/libs/icons/svg/cascader.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/chart.svg b/src/libs/icons/svg/chart.svg new file mode 100644 index 0000000..27728fb --- /dev/null +++ b/src/libs/icons/svg/chart.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/checkbox.svg b/src/libs/icons/svg/checkbox.svg new file mode 100644 index 0000000..013fd3a --- /dev/null +++ b/src/libs/icons/svg/checkbox.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/clipboard.svg b/src/libs/icons/svg/clipboard.svg new file mode 100644 index 0000000..90923ff --- /dev/null +++ b/src/libs/icons/svg/clipboard.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/code.svg b/src/libs/icons/svg/code.svg new file mode 100644 index 0000000..5f9c5ab --- /dev/null +++ b/src/libs/icons/svg/code.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/color.svg b/src/libs/icons/svg/color.svg new file mode 100644 index 0000000..44a81aa --- /dev/null +++ b/src/libs/icons/svg/color.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/compass.svg b/src/libs/icons/svg/compass.svg new file mode 100644 index 0000000..701c845 --- /dev/null +++ b/src/libs/icons/svg/compass.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/component.svg b/src/libs/icons/svg/component.svg new file mode 100644 index 0000000..29c3458 --- /dev/null +++ b/src/libs/icons/svg/component.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/dashboard.svg b/src/libs/icons/svg/dashboard.svg new file mode 100644 index 0000000..5317d37 --- /dev/null +++ b/src/libs/icons/svg/dashboard.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/date-range.svg b/src/libs/icons/svg/date-range.svg new file mode 100644 index 0000000..fda571e --- /dev/null +++ b/src/libs/icons/svg/date-range.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/date.svg b/src/libs/icons/svg/date.svg new file mode 100644 index 0000000..52dc73e --- /dev/null +++ b/src/libs/icons/svg/date.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/dict.svg b/src/libs/icons/svg/dict.svg new file mode 100644 index 0000000..4849377 --- /dev/null +++ b/src/libs/icons/svg/dict.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/documentation.svg b/src/libs/icons/svg/documentation.svg new file mode 100644 index 0000000..7043122 --- /dev/null +++ b/src/libs/icons/svg/documentation.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/download.svg b/src/libs/icons/svg/download.svg new file mode 100644 index 0000000..c896951 --- /dev/null +++ b/src/libs/icons/svg/download.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/drag.svg b/src/libs/icons/svg/drag.svg new file mode 100644 index 0000000..4185d3c --- /dev/null +++ b/src/libs/icons/svg/drag.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/druid.svg b/src/libs/icons/svg/druid.svg new file mode 100644 index 0000000..a2b4b4e --- /dev/null +++ b/src/libs/icons/svg/druid.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/edit.svg b/src/libs/icons/svg/edit.svg new file mode 100644 index 0000000..d26101f --- /dev/null +++ b/src/libs/icons/svg/edit.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/education.svg b/src/libs/icons/svg/education.svg new file mode 100644 index 0000000..7bfb01d --- /dev/null +++ b/src/libs/icons/svg/education.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/email.svg b/src/libs/icons/svg/email.svg new file mode 100644 index 0000000..74d25e2 --- /dev/null +++ b/src/libs/icons/svg/email.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/entrust.svg b/src/libs/icons/svg/entrust.svg new file mode 100644 index 0000000..4f4ce41 --- /dev/null +++ b/src/libs/icons/svg/entrust.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/example.svg b/src/libs/icons/svg/example.svg new file mode 100644 index 0000000..46f42b5 --- /dev/null +++ b/src/libs/icons/svg/example.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/excel.svg b/src/libs/icons/svg/excel.svg new file mode 100644 index 0000000..74d97b8 --- /dev/null +++ b/src/libs/icons/svg/excel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/exit-fullscreen.svg b/src/libs/icons/svg/exit-fullscreen.svg new file mode 100644 index 0000000..485c128 --- /dev/null +++ b/src/libs/icons/svg/exit-fullscreen.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/eye-open.svg b/src/libs/icons/svg/eye-open.svg new file mode 100644 index 0000000..88dcc98 --- /dev/null +++ b/src/libs/icons/svg/eye-open.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/eye.svg b/src/libs/icons/svg/eye.svg new file mode 100644 index 0000000..16ed2d8 --- /dev/null +++ b/src/libs/icons/svg/eye.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/form.svg b/src/libs/icons/svg/form.svg new file mode 100644 index 0000000..dcbaa18 --- /dev/null +++ b/src/libs/icons/svg/form.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/fullscreen.svg b/src/libs/icons/svg/fullscreen.svg new file mode 100644 index 0000000..0e86b6f --- /dev/null +++ b/src/libs/icons/svg/fullscreen.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/github.svg b/src/libs/icons/svg/github.svg new file mode 100644 index 0000000..db0a0d4 --- /dev/null +++ b/src/libs/icons/svg/github.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/go-out.svg b/src/libs/icons/svg/go-out.svg new file mode 100644 index 0000000..d733ebe --- /dev/null +++ b/src/libs/icons/svg/go-out.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/guide.svg b/src/libs/icons/svg/guide.svg new file mode 100644 index 0000000..b271001 --- /dev/null +++ b/src/libs/icons/svg/guide.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/home.svg b/src/libs/icons/svg/home.svg new file mode 100644 index 0000000..9515f19 --- /dev/null +++ b/src/libs/icons/svg/home.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/horn.svg b/src/libs/icons/svg/horn.svg new file mode 100644 index 0000000..f13708a --- /dev/null +++ b/src/libs/icons/svg/horn.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/icon.svg b/src/libs/icons/svg/icon.svg new file mode 100644 index 0000000..82be8ee --- /dev/null +++ b/src/libs/icons/svg/icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/input.svg b/src/libs/icons/svg/input.svg new file mode 100644 index 0000000..ab91381 --- /dev/null +++ b/src/libs/icons/svg/input.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/inquiry.svg b/src/libs/icons/svg/inquiry.svg new file mode 100644 index 0000000..43e2267 --- /dev/null +++ b/src/libs/icons/svg/inquiry.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/international.svg b/src/libs/icons/svg/international.svg new file mode 100644 index 0000000..e9b56ee --- /dev/null +++ b/src/libs/icons/svg/international.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/job.svg b/src/libs/icons/svg/job.svg new file mode 100644 index 0000000..2a93a25 --- /dev/null +++ b/src/libs/icons/svg/job.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/language.svg b/src/libs/icons/svg/language.svg new file mode 100644 index 0000000..0082b57 --- /dev/null +++ b/src/libs/icons/svg/language.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/like.svg b/src/libs/icons/svg/like.svg new file mode 100644 index 0000000..707a30a --- /dev/null +++ b/src/libs/icons/svg/like.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/link.svg b/src/libs/icons/svg/link.svg new file mode 100644 index 0000000..48197ba --- /dev/null +++ b/src/libs/icons/svg/link.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/list.svg b/src/libs/icons/svg/list.svg new file mode 100644 index 0000000..20259ed --- /dev/null +++ b/src/libs/icons/svg/list.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/lock.svg b/src/libs/icons/svg/lock.svg new file mode 100644 index 0000000..74fee54 --- /dev/null +++ b/src/libs/icons/svg/lock.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/log.svg b/src/libs/icons/svg/log.svg new file mode 100644 index 0000000..d879d33 --- /dev/null +++ b/src/libs/icons/svg/log.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/logininfor.svg b/src/libs/icons/svg/logininfor.svg new file mode 100644 index 0000000..267f844 --- /dev/null +++ b/src/libs/icons/svg/logininfor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/message.svg b/src/libs/icons/svg/message.svg new file mode 100644 index 0000000..14ca817 --- /dev/null +++ b/src/libs/icons/svg/message.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/money.svg b/src/libs/icons/svg/money.svg new file mode 100644 index 0000000..c1580de --- /dev/null +++ b/src/libs/icons/svg/money.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/monitor.svg b/src/libs/icons/svg/monitor.svg new file mode 100644 index 0000000..bc308cb --- /dev/null +++ b/src/libs/icons/svg/monitor.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/nested.svg b/src/libs/icons/svg/nested.svg new file mode 100644 index 0000000..06713a8 --- /dev/null +++ b/src/libs/icons/svg/nested.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/notice.svg b/src/libs/icons/svg/notice.svg new file mode 100644 index 0000000..7969d03 --- /dev/null +++ b/src/libs/icons/svg/notice.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/number.svg b/src/libs/icons/svg/number.svg new file mode 100644 index 0000000..ad5ce9a --- /dev/null +++ b/src/libs/icons/svg/number.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/online.svg b/src/libs/icons/svg/online.svg new file mode 100644 index 0000000..330a202 --- /dev/null +++ b/src/libs/icons/svg/online.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/password.svg b/src/libs/icons/svg/password.svg new file mode 100644 index 0000000..6c64def --- /dev/null +++ b/src/libs/icons/svg/password.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/pdf.svg b/src/libs/icons/svg/pdf.svg new file mode 100644 index 0000000..957aa0c --- /dev/null +++ b/src/libs/icons/svg/pdf.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/people.svg b/src/libs/icons/svg/people.svg new file mode 100644 index 0000000..2bd54ae --- /dev/null +++ b/src/libs/icons/svg/people.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/peoples.svg b/src/libs/icons/svg/peoples.svg new file mode 100644 index 0000000..aab852e --- /dev/null +++ b/src/libs/icons/svg/peoples.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/phone.svg b/src/libs/icons/svg/phone.svg new file mode 100644 index 0000000..ab8e8c4 --- /dev/null +++ b/src/libs/icons/svg/phone.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/post.svg b/src/libs/icons/svg/post.svg new file mode 100644 index 0000000..2922c61 --- /dev/null +++ b/src/libs/icons/svg/post.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/put-in.svg b/src/libs/icons/svg/put-in.svg new file mode 100644 index 0000000..60e4e58 --- /dev/null +++ b/src/libs/icons/svg/put-in.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/qq.svg b/src/libs/icons/svg/qq.svg new file mode 100644 index 0000000..ee13d4e --- /dev/null +++ b/src/libs/icons/svg/qq.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/question.svg b/src/libs/icons/svg/question.svg new file mode 100644 index 0000000..cf75bd4 --- /dev/null +++ b/src/libs/icons/svg/question.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/radio.svg b/src/libs/icons/svg/radio.svg new file mode 100644 index 0000000..0cde345 --- /dev/null +++ b/src/libs/icons/svg/radio.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/rate.svg b/src/libs/icons/svg/rate.svg new file mode 100644 index 0000000..aa3b14d --- /dev/null +++ b/src/libs/icons/svg/rate.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/redis-list.svg b/src/libs/icons/svg/redis-list.svg new file mode 100644 index 0000000..98a15b2 --- /dev/null +++ b/src/libs/icons/svg/redis-list.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/redis.svg b/src/libs/icons/svg/redis.svg new file mode 100644 index 0000000..2f1d62d --- /dev/null +++ b/src/libs/icons/svg/redis.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/report-form.svg b/src/libs/icons/svg/report-form.svg new file mode 100644 index 0000000..206981e --- /dev/null +++ b/src/libs/icons/svg/report-form.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/row.svg b/src/libs/icons/svg/row.svg new file mode 100644 index 0000000..0780992 --- /dev/null +++ b/src/libs/icons/svg/row.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/search.svg b/src/libs/icons/svg/search.svg new file mode 100644 index 0000000..84233dd --- /dev/null +++ b/src/libs/icons/svg/search.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/select.svg b/src/libs/icons/svg/select.svg new file mode 100644 index 0000000..d628382 --- /dev/null +++ b/src/libs/icons/svg/select.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/server.svg b/src/libs/icons/svg/server.svg new file mode 100644 index 0000000..eb287e3 --- /dev/null +++ b/src/libs/icons/svg/server.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/settings.svg b/src/libs/icons/svg/settings.svg new file mode 100644 index 0000000..b93eb6b --- /dev/null +++ b/src/libs/icons/svg/settings.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/shopping.svg b/src/libs/icons/svg/shopping.svg new file mode 100644 index 0000000..87513e7 --- /dev/null +++ b/src/libs/icons/svg/shopping.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/size.svg b/src/libs/icons/svg/size.svg new file mode 100644 index 0000000..ddb25b8 --- /dev/null +++ b/src/libs/icons/svg/size.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/skill.svg b/src/libs/icons/svg/skill.svg new file mode 100644 index 0000000..a3b7312 --- /dev/null +++ b/src/libs/icons/svg/skill.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/slider.svg b/src/libs/icons/svg/slider.svg new file mode 100644 index 0000000..fbe4f39 --- /dev/null +++ b/src/libs/icons/svg/slider.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/star.svg b/src/libs/icons/svg/star.svg new file mode 100644 index 0000000..6cf86e6 --- /dev/null +++ b/src/libs/icons/svg/star.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/swagger.svg b/src/libs/icons/svg/swagger.svg new file mode 100644 index 0000000..05d4e7b --- /dev/null +++ b/src/libs/icons/svg/swagger.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/switch.svg b/src/libs/icons/svg/switch.svg new file mode 100644 index 0000000..0ba61e3 --- /dev/null +++ b/src/libs/icons/svg/switch.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/synchronous.svg b/src/libs/icons/svg/synchronous.svg new file mode 100644 index 0000000..f0b541b --- /dev/null +++ b/src/libs/icons/svg/synchronous.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/system.svg b/src/libs/icons/svg/system.svg new file mode 100644 index 0000000..5992593 --- /dev/null +++ b/src/libs/icons/svg/system.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/tab.svg b/src/libs/icons/svg/tab.svg new file mode 100644 index 0000000..b4b48e4 --- /dev/null +++ b/src/libs/icons/svg/tab.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/table.svg b/src/libs/icons/svg/table.svg new file mode 100644 index 0000000..0e3dc9d --- /dev/null +++ b/src/libs/icons/svg/table.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/take-over.svg b/src/libs/icons/svg/take-over.svg new file mode 100644 index 0000000..f7cff52 --- /dev/null +++ b/src/libs/icons/svg/take-over.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/task.svg b/src/libs/icons/svg/task.svg new file mode 100644 index 0000000..c7ade49 --- /dev/null +++ b/src/libs/icons/svg/task.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/textarea.svg b/src/libs/icons/svg/textarea.svg new file mode 100644 index 0000000..2709f29 --- /dev/null +++ b/src/libs/icons/svg/textarea.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/theme.svg b/src/libs/icons/svg/theme.svg new file mode 100644 index 0000000..5982a2f --- /dev/null +++ b/src/libs/icons/svg/theme.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/theme2.svg b/src/libs/icons/svg/theme2.svg new file mode 100644 index 0000000..8d1c017 --- /dev/null +++ b/src/libs/icons/svg/theme2.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/time-range.svg b/src/libs/icons/svg/time-range.svg new file mode 100644 index 0000000..13c1202 --- /dev/null +++ b/src/libs/icons/svg/time-range.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/time.svg b/src/libs/icons/svg/time.svg new file mode 100644 index 0000000..b376e32 --- /dev/null +++ b/src/libs/icons/svg/time.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/todo.svg b/src/libs/icons/svg/todo.svg new file mode 100644 index 0000000..c07e91b --- /dev/null +++ b/src/libs/icons/svg/todo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/tool.svg b/src/libs/icons/svg/tool.svg new file mode 100644 index 0000000..48e0e35 --- /dev/null +++ b/src/libs/icons/svg/tool.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/tree-table.svg b/src/libs/icons/svg/tree-table.svg new file mode 100644 index 0000000..8aafdb8 --- /dev/null +++ b/src/libs/icons/svg/tree-table.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/tree.svg b/src/libs/icons/svg/tree.svg new file mode 100644 index 0000000..dd4b7dd --- /dev/null +++ b/src/libs/icons/svg/tree.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/update.svg b/src/libs/icons/svg/update.svg new file mode 100644 index 0000000..d540e3a --- /dev/null +++ b/src/libs/icons/svg/update.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/upload.svg b/src/libs/icons/svg/upload.svg new file mode 100644 index 0000000..bae49c0 --- /dev/null +++ b/src/libs/icons/svg/upload.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/user.svg b/src/libs/icons/svg/user.svg new file mode 100644 index 0000000..0ba0716 --- /dev/null +++ b/src/libs/icons/svg/user.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/validCode.svg b/src/libs/icons/svg/validCode.svg new file mode 100644 index 0000000..cfb1021 --- /dev/null +++ b/src/libs/icons/svg/validCode.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/wechat.svg b/src/libs/icons/svg/wechat.svg new file mode 100644 index 0000000..c586e55 --- /dev/null +++ b/src/libs/icons/svg/wechat.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svg/zip.svg b/src/libs/icons/svg/zip.svg new file mode 100644 index 0000000..f806fc4 --- /dev/null +++ b/src/libs/icons/svg/zip.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/libs/icons/svgo.yml b/src/libs/icons/svgo.yml new file mode 100644 index 0000000..d11906a --- /dev/null +++ b/src/libs/icons/svgo.yml @@ -0,0 +1,22 @@ +# replace default config + +# multipass: true +# full: true + +plugins: + + # - name + # + # or: + # - name: false + # - name: true + # + # or: + # - name: + # param1: 1 + # param2: 2 + +- removeAttrs: + attrs: + - 'fill' + - 'fill-rule' diff --git a/src/main.ts b/src/main.ts new file mode 100644 index 0000000..7bed2b4 --- /dev/null +++ b/src/main.ts @@ -0,0 +1,7 @@ +import "@/styles/tailwind/index.scss" +import { createApp } from 'vue' +import App from './App.vue' + +const app = createApp(App) + +app.mount('#app') diff --git a/src/modules/admin/App.vue b/src/modules/admin/App.vue new file mode 100644 index 0000000..49056ca --- /dev/null +++ b/src/modules/admin/App.vue @@ -0,0 +1,39 @@ + + + + + diff --git a/src/modules/admin/api/login/index.ts b/src/modules/admin/api/login/index.ts new file mode 100644 index 0000000..ec3be08 --- /dev/null +++ b/src/modules/admin/api/login/index.ts @@ -0,0 +1,38 @@ +import request from '@admin/utils/request' + +class requests { + static getCodeImg() { + return request({ + url: '/captchaImage', + method: 'get' + }) + } + static login(data) { + return request({ + url: '/login', + method: 'post', + data: data + }) + } + static getInfo(params?) { + return request({ + url: `/getInfo`, + method: 'get', + params + }) + } + static logout() { + return request({ + url: '/logout', + method: 'post' + }) + } + static getRouters() { + return request({ + url: `/getRouters`, + method: 'get', + }) + } +} + +export default requests diff --git a/src/modules/admin/api/monitor/job.ts b/src/modules/admin/api/monitor/job.ts new file mode 100644 index 0000000..a228a4d --- /dev/null +++ b/src/modules/admin/api/monitor/job.ts @@ -0,0 +1,101 @@ +import request from '@admin/utils/request' + +class requests { + // 查询定时任务调度列表 + static listJob(query) { + return request({ + url: '/monitor/job/list', + method: 'get', + params: query + }) + } + + // 查询定时任务调度详细 + static getJob(jobId) { + return request({ + url: '/monitor/job/' + jobId, + method: 'get' + }) + } + + // 新增定时任务调度 + static addJob(data) { + return request({ + url: '/monitor/job', + method: 'post', + data: data + }) + } + + // 修改定时任务调度 + static updateJob(data) { + return request({ + url: '/monitor/job', + method: 'put', + data: data + }) + } + + // 删除定时任务调度 + static delJob(jobId) { + return request({ + url: '/monitor/job/' + jobId, + method: 'delete' + }) + } + + // 任务状态修改 + static changeJobStatus(jobId, status) { + const data = { + jobId, + status + } + return request({ + url: '/monitor/job/changeStatus', + method: 'put', + data: data + }) + } + + + // 定时任务立即执行一次 + static runJob(jobId, jobGroup) { + const data = { + jobId, + jobGroup + } + return request({ + url: '/monitor/job/run', + method: 'put', + data: data + }) + } + + // 查询调度日志列表 + static listJobLog(query) { + return request({ + url: '/monitor/jobLog/list', + method: 'get', + params: query + }) + } + + // 删除调度日志 + static delJobLog(jobLogId) { + return request({ + url: '/monitor/jobLog/' + jobLogId, + method: 'delete' + }) + } + + // 清空调度日志 + static cleanJobLog() { + return request({ + url: '/monitor/jobLog/clean', + method: 'delete' + }) + } + +} + +export default requests diff --git a/src/modules/admin/api/monitor/online.ts b/src/modules/admin/api/monitor/online.ts new file mode 100644 index 0000000..10fc903 --- /dev/null +++ b/src/modules/admin/api/monitor/online.ts @@ -0,0 +1,23 @@ +import request from '@admin/utils/request' + +class requests { + // 查询在线用户列表 + static list(query?: object) { + return request({ + url: '/monitor/online/list', + method: 'get', + params: query + }) + } + + // 强退用户 + static forceLogout(tokenId?: string | number) { + return request({ + url: '/monitor/online/' + tokenId, + method: 'delete' + }) + } + +} + +export default requests diff --git a/src/modules/admin/api/public/index.ts b/src/modules/admin/api/public/index.ts new file mode 100644 index 0000000..fade191 --- /dev/null +++ b/src/modules/admin/api/public/index.ts @@ -0,0 +1,14 @@ +import request from '@admin/utils/request' + +class requests { + /* 流程历史 */ + static getFlowHistory(id: string | number) { + return request({ + url: `/flowable/task/flowRecord?procInsId=${id}`, + method: 'get', + }) + } +} + + +export default requests diff --git a/src/modules/admin/api/system/dept.ts b/src/modules/admin/api/system/dept.ts new file mode 100644 index 0000000..7ec44a3 --- /dev/null +++ b/src/modules/admin/api/system/dept.ts @@ -0,0 +1,56 @@ +import request from '@admin/utils/request' + +class requests { + // 查询部门列表 + static listDept(query?: object): Promise { + return request({ + url: '/system/dept/list', + method: 'get', + params: query + }) + } + + // 查询部门列表(排除节点) + static listDeptExcludeChild(deptId: number | string): Promise { + return request({ + url: '/system/dept/list/exclude/' + deptId, + method: 'get' + }) + } + + // 查询部门详细 + static getDept(deptId: number | string): Promise { + return request({ + url: '/system/dept/detail/' + deptId, + method: 'get' + }) + } + + // 新增部门 + static addDept(data: object): Promise { + return request({ + url: '/system/dept', + method: 'post', + data: data + }) + } + + // 修改部门 + static updateDept(data: object): Promise { + return request({ + url: '/system/dept', + method: 'put', + data: data + }) + } + + // 删除部门 + static delDept(deptId: number | string): Promise { + return request({ + url: '/system/dept/' + deptId, + method: 'delete' + }) + } +} + +export default requests diff --git a/src/modules/admin/api/system/dict.ts b/src/modules/admin/api/system/dict.ts new file mode 100644 index 0000000..c54809b --- /dev/null +++ b/src/modules/admin/api/system/dict.ts @@ -0,0 +1,116 @@ +import request from '@admin/utils/request' + +class requests { + // 查询字典类型列表 + static listType(query) { + return request({ + url: '/system/dict/type/list', + method: 'get', + params: query + }) + } + + // 查询字典类型详细 + static getType(dictId) { + return request({ + url: '/system/dict/type/' + dictId, + method: 'get' + }) + } + + // 新增字典类型 + static addType(data) { + return request({ + url: '/system/dict/type', + method: 'post', + data: data + }) + } + + // 修改字典类型 + static updateType(data) { + return request({ + url: '/system/dict/type', + method: 'put', + data: data + }) + } + + // 删除字典类型 + static delType(dictId) { + return request({ + url: '/system/dict/type/' + dictId, + method: 'delete' + }) + } + + // 刷新字典缓存 + static refreshCache() { + return request({ + url: '/system/dict/type/refreshCache', + method: 'delete' + }) + } + + // 获取字典选择框列表 + static optionselect() { + return request({ + url: '/system/dict/type/optionselect', + method: 'get' + }) + } + + /* 字典数据 */ + // 查询字典数据列表 + static listData(query) { + return request({ + url: '/system/dict/data/list', + method: 'get', + params: query + }) + } + + // 查询字典数据详细 + static getData(dictCode) { + return request({ + url: '/system/dict/data/' + dictCode, + method: 'get' + }) + } + + // 根据字典类型查询字典数据信息 + static getDicts(dictType) { + return request({ + url: '/system/dict/data/type/' + dictType, + method: 'get' + }) + } + + // 新增字典数据 + static addData(data) { + return request({ + url: '/system/dict/data', + method: 'post', + data: data + }) + } + + // 修改字典数据 + static updateData(data) { + return request({ + url: '/system/dict/data', + method: 'put', + data: data + }) + } + + // 删除字典数据 + static delData(dictCode) { + return request({ + url: '/system/dict/data/' + dictCode, + method: 'delete' + }) + } +} + +export default requests diff --git a/src/modules/admin/api/system/log.ts b/src/modules/admin/api/system/log.ts new file mode 100644 index 0000000..ac1f55b --- /dev/null +++ b/src/modules/admin/api/system/log.ts @@ -0,0 +1,64 @@ +import request from '@admin/utils/request' + +class requests { + // 查询操作日志列表 + static operlist(query) { + return request({ + url: '/monitor/operlog/list', + method: 'get', + params: query + }) + } + + // 删除操作日志 + static delOperlog(operId) { + return request({ + url: '/monitor/operlog/' + operId, + method: 'delete' + }) + } + + // 清空操作日志 + static cleanOperlog() { + return request({ + url: '/monitor/operlog/clean', + method: 'delete' + }) + } + + // 查询登录日志列表 + static loginlist(query) { + return request({ + url: '/monitor/logininfor/list', + method: 'get', + params: query + }) + } + + // 删除登录日志 + static delLogininfor(infoId) { + return request({ + url: '/monitor/logininfor/' + infoId, + method: 'delete' + }) + } + + // 解锁用户登录状态 + static unlockLogininfor(userName) { + return request({ + url: '/monitor/logininfor/unlock/' + userName, + method: 'get' + }) + } + + // 清空登录日志 + static cleanLogininfor() { + return request({ + url: '/monitor/logininfor/clean', + method: 'delete' + }) + } + +} + +export default requests diff --git a/src/modules/admin/api/system/menu.ts b/src/modules/admin/api/system/menu.ts new file mode 100644 index 0000000..5989bd6 --- /dev/null +++ b/src/modules/admin/api/system/menu.ts @@ -0,0 +1,64 @@ +import request from '@admin/utils/request' + +class requests { + // 查询菜单列表 + static listMenu(query?) { + return request({ + url: '/system/menu/list', + method: 'get', + params: query + }) + } + + // 查询菜单详细 + static getMenu(menuId) { + return request({ + url: '/system/menu/' + menuId, + method: 'get' + }) + } + + // 查询菜单下拉树结构 + static treeselect() { + return request({ + url: '/system/menu/treeselect', + method: 'get' + }) + } + + // 根据角色ID查询菜单下拉树结构 + static roleMenuTreeselect(roleId) { + return request({ + url: '/system/menu/roleMenuTreeselect/' + roleId, + method: 'get' + }) + } + + // 新增菜单 + static addMenu(data) { + return request({ + url: '/system/menu', + method: 'post', + data: data + }) + } + + // 修改菜单 + static updateMenu(data) { + return request({ + url: '/system/menu', + method: 'put', + data: data + }) + } + + // 删除菜单 + static delMenu(menuId) { + return request({ + url: '/system/menu/' + menuId, + method: 'delete' + }) + } +} + +export default requests diff --git a/src/modules/admin/api/system/post.ts b/src/modules/admin/api/system/post.ts new file mode 100644 index 0000000..2c077ea --- /dev/null +++ b/src/modules/admin/api/system/post.ts @@ -0,0 +1,48 @@ +import request from '@admin/utils/request' + +class requests { + // 查询岗位列表 + static listPost(query: object) { + return request({ + url: '/system/post/list', + method: 'get', + params: query + }) + } + + // 查询岗位详细 + static getPost(postId: number) { + return request({ + url: '/system/post/' + postId, + method: 'get' + }) + } + + // 新增岗位 + static addPost(data: object) { + return request({ + url: '/system/post', + method: 'post', + data: data + }) + } + + // 修改岗位 + static updatePost(data: object) { + return request({ + url: '/system/post', + method: 'put', + data: data + }) + } + + // 删除岗位 + static delPost(postId: number) { + return request({ + url: '/system/post/' + postId, + method: 'delete' + }) + } +} + +export default requests diff --git a/src/modules/admin/api/system/profile.ts b/src/modules/admin/api/system/profile.ts new file mode 100644 index 0000000..e0c6e26 --- /dev/null +++ b/src/modules/admin/api/system/profile.ts @@ -0,0 +1,43 @@ +import request from '@admin/utils/request' + +class requests { + // 查询用户个人信息 + static getUserProfile() { + return request({ + url: '/system/user/profile', + method: 'get' + }) + } + + // 修改用户个人信息 + static updateUserProfile(data) { + return request({ + url: '/system/user/profile', + method: 'put', + data: data + }) + } + + // 用户密码重置 + static updateUserPwd(oldPassword, newPassword) { + const data = { + oldPassword, + newPassword + } + return request({ + url: '/system/user/profile/updatePwd', + method: 'put', + params: data + }) + } + // 用户头像上传 + static uploadAvatar(data) { + return request({ + url: '/system/user/profile/avatar', + method: 'post', + data: data + }) + } +} + +export default requests diff --git a/src/modules/admin/api/system/role.ts b/src/modules/admin/api/system/role.ts new file mode 100644 index 0000000..d8efc98 --- /dev/null +++ b/src/modules/admin/api/system/role.ts @@ -0,0 +1,123 @@ +import request from '@admin/utils/request' + +class requests { + // 查询角色列表 + static listRole(query) { + return request({ + url: '/system/role/list', + method: 'get', + params: query + }) + } + + // 查询角色详细 + static getRole(roleId) { + return request({ + url: '/system/role/' + roleId, + method: 'get' + }) + } + + // 新增角色 + static addRole(data) { + return request({ + url: '/system/role', + method: 'post', + data: data + }) + } + + // 修改角色 + static updateRole(data) { + return request({ + url: '/system/role', + method: 'put', + data: data + }) + } + + // 角色数据权限 + static dataScope(data) { + return request({ + url: '/system/role/dataScope', + method: 'put', + data: data + }) + } + + // 角色状态修改 + static changeRoleStatus(roleId, status) { + const data = { + roleId, + status + } + return request({ + url: '/system/role/changeStatus', + method: 'put', + data: data + }) + } + + // 删除角色 + static delRole(roleId) { + return request({ + url: '/system/role/' + roleId, + method: 'delete' + }) + } + + // 查询角色已授权用户列表 + static allocatedUserList(query) { + return request({ + url: '/system/role/authUser/allocatedList', + method: 'get', + params: query + }) + } + + // 查询角色未授权用户列表 + static unallocatedUserList(query) { + return request({ + url: '/system/role/authUser/unallocatedList', + method: 'get', + params: query + }) + } + + // 取消用户授权角色 + static authUserCancel(data) { + return request({ + url: '/system/role/authUser/cancel', + method: 'put', + data: data + }) + } + + // 批量取消用户授权角色 + static authUserCancelAll(data) { + return request({ + url: '/system/role/authUser/cancelAll', + method: 'put', + params: data + }) + } + + // 授权用户选择 + static authUserSelectAll(data) { + return request({ + url: '/system/role/authUser/selectAll', + method: 'put', + params: data + }) + } + + // 根据角色ID查询部门树结构 + static deptTreeSelect(roleId) { + return request({ + url: '/system/role/deptTree/' + roleId, + method: 'get' + }) + } +} + +export default requests diff --git a/src/modules/admin/api/system/user.ts b/src/modules/admin/api/system/user.ts new file mode 100644 index 0000000..273181e --- /dev/null +++ b/src/modules/admin/api/system/user.ts @@ -0,0 +1,86 @@ +import request from '@admin/utils/request' +import { Static } from 'vue' + +class requests { + static getUserList(params?) { + return request({ + url: '/system/user/list', + method: 'get', + params + }) + } + // 根据字典类型查询字典数据信息 + static getDicts(type: string) { + return request({ + url: '/system/dict/data/type/' + type, + method: 'get' + }) + } + static getTreeData() { + return request({ + url: '/system/user/deptTree', + method: 'get' + }) + } + static getUserInfo(userId: string | number) { + return request({ + url: '/system/user/' + userId, + method: 'get' + }) + } + // 查询部门下拉树结构 + static treeselect() { + return request({ + url: '/system/dept/treeselect', + method: 'get' + }) + } + // 新增用户 + static add(data) { + console.log(data); + return request({ + url: '/system/user', + method: 'post', + data + }) + } + + // 修改用户 + static edit(data) { + return request({ + url: '/system/user', + method: 'put', + data: data + }) + } + + // 删除用户 + static delUser(userId) { + return request({ + url: '/system/user/' + userId, + method: 'delete' + }) + } + + // 用户密码重置 + static resetUserPwd(userId, password) { + const data = { userId, password } + return request({ + url: '/system/user/resetPwd', + method: 'put', + data: data + }) + } + + // 用户状态修改 + static changeUserStatus(userId, status) { + const data = { userId, status } + return request({ + url: '/system/user/changeStatus', + method: 'put', + data: data + }) + } +} + +export default requests diff --git a/src/modules/admin/api/tool/flowable/definition.ts b/src/modules/admin/api/tool/flowable/definition.ts new file mode 100644 index 0000000..bca8bb0 --- /dev/null +++ b/src/modules/admin/api/tool/flowable/definition.ts @@ -0,0 +1,36 @@ +import request from '@admin/utils/request' + +class requests { + static getList(params) { + return request.request({ + url: `/flowable/definition/list`, + method: "GET", + params + }); + } + static flowDelete(id) { + return request.request({ + url: `/flowable/definition/delete/${id}`, + method: "POST" + }); + } + static flowUpdate(id) { + return request.request({ + url: `/flowable/definition/update/${id}`, + method: "POST" + }); + } + static flowReadImage(id) { + return request.request({ + url: `/flowable/definition/readImage/${id}`, + method: "GET" + }); + } + static(id) { + return request.request({ + url: `/flowable/definition/readXml/${id}`, + method: "GET" + }); + } +} +export default requests; \ No newline at end of file diff --git a/src/modules/admin/api/tool/flowable/editor.ts b/src/modules/admin/api/tool/flowable/editor.ts new file mode 100644 index 0000000..ae7c3cd --- /dev/null +++ b/src/modules/admin/api/tool/flowable/editor.ts @@ -0,0 +1,58 @@ +import request from '@admin/utils/request' + +class requests { + static getList(params) { + return request.request({ + url: `/flowable/editor/list`, + method: "GET", + params + }); + } + static getFlowXML(id) { + return request.request({ + url: `/flowable/editor/detail/${id}`, + method: "GET" + }); + } + static editorAdd(data) { + return request.request({ + url: `/flowable/editor/add`, + method: "POST", + data + }); + } + static editorUpdate(data) { + return request.request({ + url: `/flowable/editor/update`, + method: "POST", + data + }); + } + static editorDeploy(id) { + return request.request({ + url: `/flowable/editor/deploy/${id}`, + method: "POST" + }); + } + static editorDelete(id) { + return request.request({ + url: `/flowable/editor/delete/${id}`, + method: "POST" + }); + } + static getRoleList(params) { + return request.request({ + url: `/flowable/editor/roleList`, + method: "GET", + params + }); + } + static getUserList(params) { + return request.request({ + url: `/flowable/editor/userList`, + method: "GET", + params + }); + } +} +export default requests; \ No newline at end of file diff --git a/src/modules/admin/api/tool/flowable/node.ts b/src/modules/admin/api/tool/flowable/node.ts new file mode 100644 index 0000000..3eca6fe --- /dev/null +++ b/src/modules/admin/api/tool/flowable/node.ts @@ -0,0 +1,67 @@ +import request from '@admin/utils/request' + +class requests { + static getList(params) { + return request.request({ + url: `/flowable/node/user/list`, + method: "GET", + params + }); + } + static getFlowList(params) { + return request.request({ + url: `/flowable/node/user/list/flow`, + method: "GET", + params + }); + } + static getFlowNodeList(id) { + return request.request({ + url: `/flowable/node/user/list/node/${id}`, + method: "GET" + }); + } + static getNodeUserDetail(id) { + return request.request({ + url: `/flowable/node/user/detail/${id}`, + method: "GET" + }); + } + static nodeUserDelete(id) { + return request.request({ + url: `/flowable/node/user/delete/${id}`, + method: "POST" + }); + } + static nodeUserUpdate(data) { + return request.request({ + url: `/flowable/node/user/update`, + method: "POST", + data + }); + } + static nodeUserAdd(data) { + return request.request({ + url: `/flowable/node/user/add`, + method: "POST", + data + }); + } + + + static setVersion(params) { + return request.request({ + url: `/flowable/node/user/setVersion`, + method: "POST", + params + }); + } + static copyVersion(params) { + return request.request({ + url: `/flowable/node/user/copyVersion`, + method: "POST", + params + }); + } +} +export default requests; \ No newline at end of file diff --git a/src/modules/admin/assets/403_images/403.png b/src/modules/admin/assets/403_images/403.png new file mode 100644 index 0000000..314caa6 Binary files /dev/null and b/src/modules/admin/assets/403_images/403.png differ diff --git a/src/modules/admin/assets/403_images/403_cloud.png b/src/modules/admin/assets/403_images/403_cloud.png new file mode 100644 index 0000000..c6281d0 Binary files /dev/null and b/src/modules/admin/assets/403_images/403_cloud.png differ diff --git a/src/modules/admin/assets/404_images/404.png b/src/modules/admin/assets/404_images/404.png new file mode 100644 index 0000000..3d8e230 Binary files /dev/null and b/src/modules/admin/assets/404_images/404.png differ diff --git a/src/modules/admin/assets/404_images/404_bg.png b/src/modules/admin/assets/404_images/404_bg.png new file mode 100644 index 0000000..1d34d79 Binary files /dev/null and b/src/modules/admin/assets/404_images/404_bg.png differ diff --git a/src/modules/admin/assets/404_images/404_cloud.png b/src/modules/admin/assets/404_images/404_cloud.png new file mode 100644 index 0000000..c6281d0 Binary files /dev/null and b/src/modules/admin/assets/404_images/404_cloud.png differ diff --git a/src/modules/admin/assets/iconfont/iconfont.css b/src/modules/admin/assets/iconfont/iconfont.css new file mode 100644 index 0000000..57ee5f0 --- /dev/null +++ b/src/modules/admin/assets/iconfont/iconfont.css @@ -0,0 +1,115 @@ +@font-face { + font-family: "iconfont"; /* Project id 3641732 */ + src: url('./iconfont.woff2?t=1663216428515') format('woff2'), + url('./iconfont.woff?t=1663216428515') format('woff'), + url('./iconfont.ttf?t=1663216428515') format('truetype'); +} + +.iconfont { + font-family: "iconfont" !important; + font-size: 16px; + font-style: normal; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.icon-yin:before { + content: "\e6a0"; +} + +.icon-dabaoyu:before { + content: "\e6a7"; +} + +.icon-shuaxin1:before { + content: "\e627"; +} + +.icon-shuaxin:before { + content: "\e629"; +} + +.icon-duoyun-2-copy:before { + content: "\e68d"; +} + +.icon-duoyun-1:before { + content: "\e679"; +} + +.icon-daxue:before { + content: "\e67a"; +} + +.icon-dayu:before { + content: "\e67b"; +} + +.icon-feng:before { + content: "\e67c"; +} + +.icon-duoyun-3:before { + content: "\e67d"; +} + +.icon-duoyun-2:before { + content: "\e67e"; +} + +.icon-leiyujiaojia:before { + content: "\e67f"; +} + +.icon-duoyun:before { + content: "\e680"; +} + +.icon-zhongyu:before { + content: "\e681"; +} + +.icon-wu:before { + content: "\e682"; +} + +.icon-xiaoyu:before { + content: "\e683"; +} + +.icon-xiaoxue:before { + content: "\e684"; +} + +.icon-shandian:before { + content: "\e685"; +} + +.icon-xue:before { + content: "\e686"; +} + +.icon-zhongxue:before { + content: "\e687"; +} + +.icon-yangchen:before { + content: "\e688"; +} + +.icon-yueliang:before { + content: "\e689"; +} + +.icon-yujiaxue:before { + content: "\e68a"; +} + +.icon-qing:before { + content: "\e68b"; +} + +.icon-mai:before { + content: "\e68c"; +} + diff --git a/src/modules/admin/assets/iconfont/iconfont.js b/src/modules/admin/assets/iconfont/iconfont.js new file mode 100644 index 0000000..f94a118 --- /dev/null +++ b/src/modules/admin/assets/iconfont/iconfont.js @@ -0,0 +1 @@ +window._iconfont_svg_string_3641732='',function(l){var c=(c=document.getElementsByTagName("script"))[c.length-1],s=c.getAttribute("data-injectcss"),c=c.getAttribute("data-disable-injectsvg");if(!c){var a,t,i,h,o,e=function(c,s){s.parentNode.insertBefore(c,s)};if(s&&!l.__iconfont__svg__cssinject__){l.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(c){console&&console.log(c)}}a=function(){var c,s=document.createElement("div");s.innerHTML=l._iconfont_svg_string_3641732,(s=s.getElementsByTagName("svg")[0])&&(s.setAttribute("aria-hidden","true"),s.style.position="absolute",s.style.width=0,s.style.height=0,s.style.overflow="hidden",s=s,(c=document.body).firstChild?e(s,c.firstChild):c.appendChild(s))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(a,0):(t=function(){document.removeEventListener("DOMContentLoaded",t,!1),a()},document.addEventListener("DOMContentLoaded",t,!1)):document.attachEvent&&(i=a,h=l.document,o=!1,p(),h.onreadystatechange=function(){"complete"==h.readyState&&(h.onreadystatechange=null,d())})}function d(){o||(o=!0,i())}function p(){try{h.documentElement.doScroll("left")}catch(c){return void setTimeout(p,50)}d()}}(window); \ No newline at end of file diff --git a/src/modules/admin/assets/iconfont/iconfont.json b/src/modules/admin/assets/iconfont/iconfont.json new file mode 100644 index 0000000..55b9a00 --- /dev/null +++ b/src/modules/admin/assets/iconfont/iconfont.json @@ -0,0 +1,184 @@ +{ + "id": "3641732", + "name": "weather", + "font_family": "iconfont", + "css_prefix_text": "icon-", + "description": "", + "glyphs": [ + { + "icon_id": "28557556", + "name": "阴", + "font_class": "yin", + "unicode": "e6a0", + "unicode_decimal": 59040 + }, + { + "icon_id": "28557770", + "name": "大暴雨", + "font_class": "dabaoyu", + "unicode": "e6a7", + "unicode_decimal": 59047 + }, + { + "icon_id": "7724796", + "name": "刷新", + "font_class": "shuaxin1", + "unicode": "e627", + "unicode_decimal": 58919 + }, + { + "icon_id": "6999224", + "name": "刷新", + "font_class": "shuaxin", + "unicode": "e629", + "unicode_decimal": 58921 + }, + { + "icon_id": "31772217", + "name": "多云-2-copy", + "font_class": "duoyun-2-copy", + "unicode": "e68d", + "unicode_decimal": 59021 + }, + { + "icon_id": "29265274", + "name": "多云-1", + "font_class": "duoyun-1", + "unicode": "e679", + "unicode_decimal": 59001 + }, + { + "icon_id": "29265275", + "name": "大雪", + "font_class": "daxue", + "unicode": "e67a", + "unicode_decimal": 59002 + }, + { + "icon_id": "29265276", + "name": "大雨", + "font_class": "dayu", + "unicode": "e67b", + "unicode_decimal": 59003 + }, + { + "icon_id": "29265277", + "name": "风", + "font_class": "feng", + "unicode": "e67c", + "unicode_decimal": 59004 + }, + { + "icon_id": "29265278", + "name": "多云-3", + "font_class": "duoyun-3", + "unicode": "e67d", + "unicode_decimal": 59005 + }, + { + "icon_id": "29265279", + "name": "多云-2", + "font_class": "duoyun-2", + "unicode": "e67e", + "unicode_decimal": 59006 + }, + { + "icon_id": "29265280", + "name": "雷雨交加", + "font_class": "leiyujiaojia", + "unicode": "e67f", + "unicode_decimal": 59007 + }, + { + "icon_id": "29265281", + "name": "多云", + "font_class": "duoyun", + "unicode": "e680", + "unicode_decimal": 59008 + }, + { + "icon_id": "29265282", + "name": "中雨", + "font_class": "zhongyu", + "unicode": "e681", + "unicode_decimal": 59009 + }, + { + "icon_id": "29265283", + "name": "雾", + "font_class": "wu", + "unicode": "e682", + "unicode_decimal": 59010 + }, + { + "icon_id": "29265284", + "name": "小雨", + "font_class": "xiaoyu", + "unicode": "e683", + "unicode_decimal": 59011 + }, + { + "icon_id": "29265285", + "name": "小雪", + "font_class": "xiaoxue", + "unicode": "e684", + "unicode_decimal": 59012 + }, + { + "icon_id": "29265286", + "name": "闪电", + "font_class": "shandian", + "unicode": "e685", + "unicode_decimal": 59013 + }, + { + "icon_id": "29265287", + "name": "雪", + "font_class": "xue", + "unicode": "e686", + "unicode_decimal": 59014 + }, + { + "icon_id": "29265288", + "name": "中雪", + "font_class": "zhongxue", + "unicode": "e687", + "unicode_decimal": 59015 + }, + { + "icon_id": "29265289", + "name": "扬尘", + "font_class": "yangchen", + "unicode": "e688", + "unicode_decimal": 59016 + }, + { + "icon_id": "29265290", + "name": "月亮", + "font_class": "yueliang", + "unicode": "e689", + "unicode_decimal": 59017 + }, + { + "icon_id": "29265291", + "name": "雨夹雪", + "font_class": "yujiaxue", + "unicode": "e68a", + "unicode_decimal": 59018 + }, + { + "icon_id": "29265292", + "name": "晴", + "font_class": "qing", + "unicode": "e68b", + "unicode_decimal": 59019 + }, + { + "icon_id": "29265293", + "name": "霾", + "font_class": "mai", + "unicode": "e68c", + "unicode_decimal": 59020 + } + ] +} diff --git a/src/modules/admin/assets/iconfont/iconfont.ttf b/src/modules/admin/assets/iconfont/iconfont.ttf new file mode 100644 index 0000000..6c6aaf8 Binary files /dev/null and b/src/modules/admin/assets/iconfont/iconfont.ttf differ diff --git a/src/modules/admin/assets/iconfont/iconfont.woff b/src/modules/admin/assets/iconfont/iconfont.woff new file mode 100644 index 0000000..e0ca58d Binary files /dev/null and b/src/modules/admin/assets/iconfont/iconfont.woff differ diff --git a/src/modules/admin/assets/iconfont/iconfont.woff2 b/src/modules/admin/assets/iconfont/iconfont.woff2 new file mode 100644 index 0000000..4ed68d8 Binary files /dev/null and b/src/modules/admin/assets/iconfont/iconfont.woff2 differ diff --git a/src/modules/admin/assets/image/avatar.png b/src/modules/admin/assets/image/avatar.png new file mode 100644 index 0000000..30a870a Binary files /dev/null and b/src/modules/admin/assets/image/avatar.png differ diff --git a/src/modules/admin/assets/image/log.png b/src/modules/admin/assets/image/log.png new file mode 100644 index 0000000..1f20ee0 Binary files /dev/null and b/src/modules/admin/assets/image/log.png differ diff --git a/src/modules/admin/assets/image/login/side-logo.png b/src/modules/admin/assets/image/login/side-logo.png new file mode 100644 index 0000000..4b19fa6 Binary files /dev/null and b/src/modules/admin/assets/image/login/side-logo.png differ diff --git a/src/modules/admin/assets/image/public/d_loading.gif b/src/modules/admin/assets/image/public/d_loading.gif new file mode 100644 index 0000000..b77f546 Binary files /dev/null and b/src/modules/admin/assets/image/public/d_loading.gif differ diff --git a/src/modules/admin/assets/image/public/d_noData.png b/src/modules/admin/assets/image/public/d_noData.png new file mode 100644 index 0000000..34568cd Binary files /dev/null and b/src/modules/admin/assets/image/public/d_noData.png differ diff --git a/src/modules/admin/assets/image/public/loading.gif b/src/modules/admin/assets/image/public/loading.gif new file mode 100644 index 0000000..ffa121e Binary files /dev/null and b/src/modules/admin/assets/image/public/loading.gif differ diff --git "a/src/modules/admin/assets/image/public/\346\225\254\350\257\267\346\234\237\345\276\205.png" "b/src/modules/admin/assets/image/public/\346\225\254\350\257\267\346\234\237\345\276\205.png" new file mode 100644 index 0000000..3270d25 Binary files /dev/null and "b/src/modules/admin/assets/image/public/\346\225\254\350\257\267\346\234\237\345\276\205.png" differ diff --git "a/src/modules/admin/assets/svg/\346\225\254\350\257\267\346\234\237\345\276\205.svg" "b/src/modules/admin/assets/svg/\346\225\254\350\257\267\346\234\237\345\276\205.svg" new file mode 100644 index 0000000..8642708 --- /dev/null +++ "b/src/modules/admin/assets/svg/\346\225\254\350\257\267\346\234\237\345\276\205.svg" @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/modules/admin/components/Global/common/IconSelect/iconList.vue b/src/modules/admin/components/Global/common/IconSelect/iconList.vue new file mode 100644 index 0000000..6bc5b5a --- /dev/null +++ b/src/modules/admin/components/Global/common/IconSelect/iconList.vue @@ -0,0 +1,144 @@ + + + + + \ No newline at end of file diff --git a/src/modules/admin/components/Global/common/IconSelect/index.vue b/src/modules/admin/components/Global/common/IconSelect/index.vue new file mode 100644 index 0000000..78e9ab6 --- /dev/null +++ b/src/modules/admin/components/Global/common/IconSelect/index.vue @@ -0,0 +1,45 @@ + + + \ No newline at end of file diff --git a/src/modules/admin/components/Global/common/datePicker/dDatePicker.vue b/src/modules/admin/components/Global/common/datePicker/dDatePicker.vue new file mode 100644 index 0000000..8adb78c --- /dev/null +++ b/src/modules/admin/components/Global/common/datePicker/dDatePicker.vue @@ -0,0 +1,76 @@ + + + diff --git a/src/modules/admin/components/Global/common/table/dTable.vue b/src/modules/admin/components/Global/common/table/dTable.vue new file mode 100644 index 0000000..3c8ff94 --- /dev/null +++ b/src/modules/admin/components/Global/common/table/dTable.vue @@ -0,0 +1,142 @@ + + + + diff --git a/src/modules/admin/components/Global/common/upload/dUpload.vue b/src/modules/admin/components/Global/common/upload/dUpload.vue new file mode 100644 index 0000000..2845a42 --- /dev/null +++ b/src/modules/admin/components/Global/common/upload/dUpload.vue @@ -0,0 +1,210 @@ + + + + + \ No newline at end of file diff --git a/src/modules/admin/components/Global/content/WangEdior/index.vue b/src/modules/admin/components/Global/content/WangEdior/index.vue new file mode 100644 index 0000000..27dac69 --- /dev/null +++ b/src/modules/admin/components/Global/content/WangEdior/index.vue @@ -0,0 +1,106 @@ + + + + + diff --git a/src/modules/admin/components/Global/content/approve/dApprove.vue b/src/modules/admin/components/Global/content/approve/dApprove.vue new file mode 100644 index 0000000..6df3938 --- /dev/null +++ b/src/modules/admin/components/Global/content/approve/dApprove.vue @@ -0,0 +1,83 @@ + + + + + diff --git a/src/modules/admin/components/Global/content/flowHistory/index.vue b/src/modules/admin/components/Global/content/flowHistory/index.vue new file mode 100644 index 0000000..ceccab0 --- /dev/null +++ b/src/modules/admin/components/Global/content/flowHistory/index.vue @@ -0,0 +1,74 @@ + + + + + \ No newline at end of file diff --git a/src/modules/admin/components/Global/content/selectUser/dSelectUser.vue b/src/modules/admin/components/Global/content/selectUser/dSelectUser.vue new file mode 100644 index 0000000..c2c990e --- /dev/null +++ b/src/modules/admin/components/Global/content/selectUser/dSelectUser.vue @@ -0,0 +1,127 @@ + + + diff --git a/src/modules/admin/components/Global/content/selectUser/selectUser.vue b/src/modules/admin/components/Global/content/selectUser/selectUser.vue new file mode 100644 index 0000000..f150202 --- /dev/null +++ b/src/modules/admin/components/Global/content/selectUser/selectUser.vue @@ -0,0 +1,288 @@ + + + + + \ No newline at end of file diff --git a/src/modules/admin/components/Global/index.ts b/src/modules/admin/components/Global/index.ts new file mode 100644 index 0000000..4acddad --- /dev/null +++ b/src/modules/admin/components/Global/index.ts @@ -0,0 +1,18 @@ +import { App } from 'vue' +import dtable from './common/table/dTable.vue' +import dDatePicker from './common/datePicker/dDatePicker.vue' +import dIconSelect from './common/IconSelect/index.vue' +import dUpload from './common/upload/dUpload.vue' +import dSelectUser from './content/selectUser/dSelectUser.vue' +import flowHistory from './content/flowHistory/index.vue' +import dApprove from './content/approve/dApprove.vue' + +export default (app: App ) => { + app.component('dTable', dtable) + app.component('dDatePicker', dDatePicker) + app.component('dIconSelect', dIconSelect) + app.component('dSelectUser', dSelectUser) + app.component('flowHistory', flowHistory) + app.component('dUpload', dUpload) + app.component('dApprove', dApprove) +} \ No newline at end of file diff --git a/src/modules/admin/components/Layout/PageWrapLayout/index.scss b/src/modules/admin/components/Layout/PageWrapLayout/index.scss new file mode 100644 index 0000000..95810a3 --- /dev/null +++ b/src/modules/admin/components/Layout/PageWrapLayout/index.scss @@ -0,0 +1,18 @@ +.m-container-layout { + width: 100%; + height: 100%; + display: flex; + padding: 10px 12px; + box-sizing: border-box; + .m-container-layout-inner { + flex: 1; + display: flex; + flex-direction: column; + box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); + background: white; + padding: 20px; + width: 100%; + height: 100%; + box-sizing: border-box; + } +} diff --git a/src/modules/admin/components/Layout/PageWrapLayout/index.vue b/src/modules/admin/components/Layout/PageWrapLayout/index.vue new file mode 100644 index 0000000..eb8f256 --- /dev/null +++ b/src/modules/admin/components/Layout/PageWrapLayout/index.vue @@ -0,0 +1,13 @@ + + + + + diff --git a/src/modules/admin/components/Layout/SwitchDark/index.vue b/src/modules/admin/components/Layout/SwitchDark/index.vue new file mode 100644 index 0000000..cc20c1a --- /dev/null +++ b/src/modules/admin/components/Layout/SwitchDark/index.vue @@ -0,0 +1,29 @@ + + + diff --git a/src/modules/admin/components/Layout/Theme/index.vue b/src/modules/admin/components/Layout/Theme/index.vue new file mode 100644 index 0000000..669e62a --- /dev/null +++ b/src/modules/admin/components/Layout/Theme/index.vue @@ -0,0 +1,219 @@ + + + + + diff --git a/src/modules/admin/components/Ruoyi/Crontab/day.vue b/src/modules/admin/components/Ruoyi/Crontab/day.vue new file mode 100644 index 0000000..956be3a --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Crontab/day.vue @@ -0,0 +1,176 @@ + + + + + \ No newline at end of file diff --git a/src/modules/admin/components/Ruoyi/Crontab/hour.vue b/src/modules/admin/components/Ruoyi/Crontab/hour.vue new file mode 100644 index 0000000..7b03646 --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Crontab/hour.vue @@ -0,0 +1,128 @@ + + + + + \ No newline at end of file diff --git a/src/modules/admin/components/Ruoyi/Crontab/index.vue b/src/modules/admin/components/Ruoyi/Crontab/index.vue new file mode 100644 index 0000000..0f9638f --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Crontab/index.vue @@ -0,0 +1,292 @@ + + + + + \ No newline at end of file diff --git a/src/modules/admin/components/Ruoyi/Crontab/min.vue b/src/modules/admin/components/Ruoyi/Crontab/min.vue new file mode 100644 index 0000000..0f1c20e --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Crontab/min.vue @@ -0,0 +1,128 @@ + + + + + \ No newline at end of file diff --git a/src/modules/admin/components/Ruoyi/Crontab/month.vue b/src/modules/admin/components/Ruoyi/Crontab/month.vue new file mode 100644 index 0000000..093ae57 --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Crontab/month.vue @@ -0,0 +1,142 @@ + + + + + \ No newline at end of file diff --git a/src/modules/admin/components/Ruoyi/Crontab/result.vue b/src/modules/admin/components/Ruoyi/Crontab/result.vue new file mode 100644 index 0000000..6235049 --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Crontab/result.vue @@ -0,0 +1,541 @@ + + + \ No newline at end of file diff --git a/src/modules/admin/components/Ruoyi/Crontab/second.vue b/src/modules/admin/components/Ruoyi/Crontab/second.vue new file mode 100644 index 0000000..0436fbf --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Crontab/second.vue @@ -0,0 +1,130 @@ + + + + + \ No newline at end of file diff --git a/src/modules/admin/components/Ruoyi/Crontab/week.vue b/src/modules/admin/components/Ruoyi/Crontab/week.vue new file mode 100644 index 0000000..17f327e --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Crontab/week.vue @@ -0,0 +1,200 @@ + + + + + \ No newline at end of file diff --git a/src/modules/admin/components/Ruoyi/Crontab/year.vue b/src/modules/admin/components/Ruoyi/Crontab/year.vue new file mode 100644 index 0000000..3119d67 --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Crontab/year.vue @@ -0,0 +1,150 @@ + + + + + \ No newline at end of file diff --git a/src/modules/admin/components/Ruoyi/DictTag.vue b/src/modules/admin/components/Ruoyi/DictTag.vue new file mode 100644 index 0000000..d6b1dc3 --- /dev/null +++ b/src/modules/admin/components/Ruoyi/DictTag.vue @@ -0,0 +1,83 @@ + + + + + \ No newline at end of file diff --git a/src/modules/admin/components/Ruoyi/Process/BpmData.js b/src/modules/admin/components/Ruoyi/Process/BpmData.js new file mode 100644 index 0000000..672ca44 --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Process/BpmData.js @@ -0,0 +1,68 @@ +/** + * 存储流程设计相关参数 + */ +export default class BpmData { + constructor() { + this.controls = [] // 设计器控件 + this.init() + } + + init() { + this.controls = [ + { + action: 'create.start-event', + title: '开始' + }, + { + action: 'create.intermediate-event', + title: '中间' + }, + { + action: 'create.end-event', + title: '结束' + }, + { + action: 'create.exclusive-gateway', + title: '网关' + }, + { + action: 'create.task', + title: '任务' + }, + { + action: 'create.user-task', + title: '用户任务' + }, + { + action: 'create.user-sign-task', + title: '会签任务' + }, + { + action: 'create.subprocess-expanded', + title: '子流程' + }, + { + action: 'create.data-object', + title: '数据对象' + }, + { + action: 'create.data-store', + title: '数据存储' + }, + { + action: 'create.participant-expanded', + title: '扩展流程' + }, + { + action: 'create.group', + title: '分组' + } + ] + } + + // 获取控件配置信息 + getControl(action) { + const result = this.controls.filter(item => item.action === action) + return result[0] || {} + } +} diff --git a/src/modules/admin/components/Ruoyi/Process/PropertyPanel.vue b/src/modules/admin/components/Ruoyi/Process/PropertyPanel.vue new file mode 100644 index 0000000..d5002d1 --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Process/PropertyPanel.vue @@ -0,0 +1,178 @@ + + + + + diff --git a/src/modules/admin/components/Ruoyi/Process/common/customTranslate.js b/src/modules/admin/components/Ruoyi/Process/common/customTranslate.js new file mode 100644 index 0000000..fa05f9d --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Process/common/customTranslate.js @@ -0,0 +1,20 @@ +import translations from '../lang/zh' + +export default function customTranslate(template, replacements) { + replacements = replacements || {} + + // Translate + template = translations[template] || template + + // Replace + return template.replace(/{([^}]+)}/g, function(_, key) { + var str = replacements[key] + if ( + translations[replacements[key]] !== null && + translations[replacements[key]] !== 'undefined' + ) { + str = translations[replacements[key]] + } + return str || '{' + key + '}' + }) +} diff --git a/src/modules/admin/components/Ruoyi/Process/common/mixinExecutionListener.js b/src/modules/admin/components/Ruoyi/Process/common/mixinExecutionListener.js new file mode 100644 index 0000000..23295b0 --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Process/common/mixinExecutionListener.js @@ -0,0 +1,24 @@ + +import executionListenerDialog from '../components/nodePanel/property/executionListener' +export default { + components: { + executionListenerDialog + }, + data() { + return { + executionListenerLength: 0, + dialogName: null + } + }, + methods: { + computedExecutionListenerLength() { + this.executionListenerLength = this.element.businessObject.extensionElements?.values?.length ?? 0 + }, + finishExecutionListener() { + if (this.dialogName === 'executionListenerDialog') { + this.computedExecutionListenerLength() + } + this.dialogName = '' + } + } +} diff --git a/src/modules/admin/components/Ruoyi/Process/common/mixinPanel.js b/src/modules/admin/components/Ruoyi/Process/common/mixinPanel.js new file mode 100644 index 0000000..d8c389d --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Process/common/mixinPanel.js @@ -0,0 +1,76 @@ +// import xcrud from 'xcrud' +// import golbalConfig from 'xcrud/package/common/config' + +import { toRaw } from 'vue'; +import xcrud from '../package/index.js' +import golbalConfig from '../package/common/config.js' +import showConfig from '../flowable/showConfig' +golbalConfig.set({ + input: { + // size: 'mini' + }, + select: { + // size: 'mini' + }, + colorPicker: { + showAlpha: true + }, + xform: { + form: { + labelWidth: 'auto' + // size: 'mini' + } + } +}) +export default { + components: { xForm: xcrud.xForm }, + props: { + modeler: { + type: Object, + required: true + }, + element: { + type: Object, + required: true + }, + categorys: { + type: Array, + default: () => [] + } + }, + watch: { + 'formData.id': function(val) { + this.updateProperties({ id: val }) + }, + 'formData.name': function(val) { + this.updateProperties({ name: val }) + }, + 'formData.documentation': function(val) { + if (!val) { + this.updateProperties({ documentation: [] }) + return + } + const documentationElement = this.modeler.get('moddle').create('bpmn:Documentation', { text: val }) + this.updateProperties({ documentation: [documentationElement] }) + } + }, + methods: { + updateProperties(properties) { + const modeling = this.modeler.get('modeling') + const element_x = toRaw(this.element) + modeling.updateProperties(element_x, properties) + + } + }, + computed: { + elementType() { + const bizObj = this.element.businessObject + return bizObj.eventDefinitions + ? bizObj.eventDefinitions[0].$type + : bizObj.$type + }, + showConfig() { + return showConfig[this.elementType] || {} + } + } +} diff --git a/src/modules/admin/components/Ruoyi/Process/common/mixinXcrud.js b/src/modules/admin/components/Ruoyi/Process/common/mixinXcrud.js new file mode 100644 index 0000000..72abe35 --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Process/common/mixinXcrud.js @@ -0,0 +1,30 @@ +// import xcrud from 'xcrud' +// import golbalConfig from 'xcrud/package/common/config' + + + +import xcrud from '../package/index.js' +import golbalConfig from '../package/common/config.js' +console.log(xcrud); +golbalConfig.set({ + input: { + // size: 'mini' + }, + select: { + // size: 'mini' + }, + colorPicker: { + showAlpha: true + }, + xform: { + form: { + labelWidth: 'auto' + // size: 'mini' + } + } +}) + +export default { + components: { xForm: xcrud.xForm } + +} diff --git a/src/modules/admin/components/Ruoyi/Process/common/parseElement.js b/src/modules/admin/components/Ruoyi/Process/common/parseElement.js new file mode 100644 index 0000000..63cf336 --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Process/common/parseElement.js @@ -0,0 +1,53 @@ +export function commonParse(element) { + const result = { + ...element.businessObject, + ...element.businessObject.$attrs + } + return formatJsonKeyValue(result) +} + +export function formatJsonKeyValue(result) { + // 移除flowable前缀,格式化数组 + for (const key in result) { + if (key.indexOf('flowable:') === 0) { + const newKey = key.replace('flowable:', '') + result[newKey] = result[key] + delete result[key] + } + } + result = documentationParse(result) + return result +} + +export function documentationParse(obj) { + if ('documentation' in obj) { + let str = '' + obj.documentation.forEach(item => { + str += item.text + }) + obj.documentation = str + } + return obj +} + +export function conditionExpressionParse(obj) { + if ('conditionExpression' in obj) { + obj.conditionExpression = obj.conditionExpression.body + } + return obj +} + +export function userTaskParse(obj) { + for (const key in obj) { + if (key === 'candidateUsers') { + obj.userType = 'candidateUsers' + obj[key] = obj[key]?.split(',') || [] + } else if (key === 'candidateGroups') { + obj.userType = 'candidateGroups' + obj[key] = obj[key]?.split(',') || [] + } else if (key === 'assignee') { + obj.userType = 'assignee' + } + } + return obj +} diff --git a/src/modules/admin/components/Ruoyi/Process/components/custom/customContextPad.vue b/src/modules/admin/components/Ruoyi/Process/components/custom/customContextPad.vue new file mode 100644 index 0000000..89c2f68 --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Process/components/custom/customContextPad.vue @@ -0,0 +1,24 @@ +export default class CustomContextPad { + constructor(config, contextPad, create, elementFactory, injector, translate) { + this.create = create; + this.elementFactory = elementFactory; + this.translate = translate; + + if (config.autoPlace !== false) { + this.autoPlace = injector.get('autoPlace', false); + } + + contextPad.registerProvider(this); // 定义这是一个contextPad + } + + getContextPadEntries(element) {} +} + +CustomContextPad.$inject = [ + 'config', + 'contextPad', + 'create', + 'elementFactory', + 'injector', + 'translate' +]; diff --git a/src/modules/admin/components/Ruoyi/Process/components/nodePanel/gateway.vue b/src/modules/admin/components/Ruoyi/Process/components/nodePanel/gateway.vue new file mode 100644 index 0000000..db18153 --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Process/components/nodePanel/gateway.vue @@ -0,0 +1,81 @@ + + + + + diff --git a/src/modules/admin/components/Ruoyi/Process/components/nodePanel/process.vue b/src/modules/admin/components/Ruoyi/Process/components/nodePanel/process.vue new file mode 100644 index 0000000..6946f1e --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Process/components/nodePanel/process.vue @@ -0,0 +1,113 @@ + + + + + diff --git a/src/modules/admin/components/Ruoyi/Process/components/nodePanel/property/executionListener.vue b/src/modules/admin/components/Ruoyi/Process/components/nodePanel/property/executionListener.vue new file mode 100644 index 0000000..1a15b8a --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Process/components/nodePanel/property/executionListener.vue @@ -0,0 +1,194 @@ + + + + + diff --git a/src/modules/admin/components/Ruoyi/Process/components/nodePanel/property/listenerParam.vue b/src/modules/admin/components/Ruoyi/Process/components/nodePanel/property/listenerParam.vue new file mode 100644 index 0000000..dd8ace1 --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Process/components/nodePanel/property/listenerParam.vue @@ -0,0 +1,96 @@ + + + + + diff --git a/src/modules/admin/components/Ruoyi/Process/components/nodePanel/property/multiInstance.vue b/src/modules/admin/components/Ruoyi/Process/components/nodePanel/property/multiInstance.vue new file mode 100644 index 0000000..357b716 --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Process/components/nodePanel/property/multiInstance.vue @@ -0,0 +1,117 @@ + + + + + diff --git a/src/modules/admin/components/Ruoyi/Process/components/nodePanel/property/signal.vue b/src/modules/admin/components/Ruoyi/Process/components/nodePanel/property/signal.vue new file mode 100644 index 0000000..2c29d73 --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Process/components/nodePanel/property/signal.vue @@ -0,0 +1,124 @@ + + + + + diff --git a/src/modules/admin/components/Ruoyi/Process/components/nodePanel/property/taskListener.vue b/src/modules/admin/components/Ruoyi/Process/components/nodePanel/property/taskListener.vue new file mode 100644 index 0000000..0f72a89 --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Process/components/nodePanel/property/taskListener.vue @@ -0,0 +1,196 @@ + + + + + diff --git a/src/modules/admin/components/Ruoyi/Process/components/nodePanel/sequenceFlow.vue b/src/modules/admin/components/Ruoyi/Process/components/nodePanel/sequenceFlow.vue new file mode 100644 index 0000000..178cd7d --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Process/components/nodePanel/sequenceFlow.vue @@ -0,0 +1,92 @@ + + + + + diff --git a/src/modules/admin/components/Ruoyi/Process/components/nodePanel/startEnd.vue b/src/modules/admin/components/Ruoyi/Process/components/nodePanel/startEnd.vue new file mode 100644 index 0000000..ccbd676 --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Process/components/nodePanel/startEnd.vue @@ -0,0 +1,99 @@ + + + + + diff --git a/src/modules/admin/components/Ruoyi/Process/components/nodePanel/task.vue b/src/modules/admin/components/Ruoyi/Process/components/nodePanel/task.vue new file mode 100644 index 0000000..dae7e30 --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Process/components/nodePanel/task.vue @@ -0,0 +1,426 @@ + + + + + diff --git a/src/modules/admin/components/Ruoyi/Process/flowable/flowable.json b/src/modules/admin/components/Ruoyi/Process/flowable/flowable.json new file mode 100644 index 0000000..bffad65 --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Process/flowable/flowable.json @@ -0,0 +1,1194 @@ +{ + "name": "Flowable", + "uri": "http://flowable.org/bpmn", + "prefix": "flowable", + "xml": { + "tagAlias": "lowerCase" + }, + "associations": [], + "types": [ + { + "name": "InOutBinding", + "superClass": ["Element"], + "isAbstract": true, + "properties": [ + { + "name": "source", + "isAttr": true, + "type": "String" + }, + { + "name": "sourceExpression", + "isAttr": true, + "type": "String" + }, + { + "name": "target", + "isAttr": true, + "type": "String" + }, + { + "name": "businessKey", + "isAttr": true, + "type": "String" + }, + { + "name": "local", + "isAttr": true, + "type": "Boolean", + "default": false + }, + { + "name": "variables", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "In", + "superClass": ["InOutBinding"], + "meta": { + "allowedIn": ["bpmn:CallActivity"] + } + }, + { + "name": "Out", + "superClass": ["InOutBinding"], + "meta": { + "allowedIn": ["bpmn:CallActivity"] + } + }, + { + "name": "AsyncCapable", + "isAbstract": true, + "extends": ["bpmn:Activity", "bpmn:Gateway", "bpmn:Event"], + "properties": [ + { + "name": "async", + "isAttr": true, + "type": "Boolean", + "default": false + }, + { + "name": "asyncBefore", + "isAttr": true, + "type": "Boolean", + "default": false + }, + { + "name": "asyncAfter", + "isAttr": true, + "type": "Boolean", + "default": false + }, + { + "name": "exclusive", + "isAttr": true, + "type": "Boolean", + "default": true + } + ] + }, + { + "name": "flowable:in", + "superClass": ["Element"], + "properties": [ + { + "name": "source", + "type": "string", + "isAttr": true + }, + { + "name": "target", + "type": "string", + "isAttr": true + } + ] + }, + { + "name": "flowable:out", + "superClass": ["Element"], + "properties": [ + { + "name": "source", + "type": "string", + "isAttr": true + }, + { + "name": "target", + "type": "string", + "isAttr": true + } + ] + }, + { + "name": "BoundaryEvent", + "superClass": ["CatchEvent"], + "properties": [ + { + "name": "cancelActivity", + "default": true, + "isAttr": true, + "type": "Boolean" + }, + { + "name": "attachedToRef", + "type": "Activity", + "isAttr": true, + "isReference": true + } + ] + }, + { + "name": "JobPriorized", + "isAbstract": true, + "extends": ["bpmn:Process", "flowable:AsyncCapable"], + "properties": [ + { + "name": "jobPriority", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "SignalEventDefinition", + "isAbstract": true, + "extends": ["bpmn:SignalEventDefinition"], + "properties": [ + { + "name": "async", + "isAttr": true, + "type": "Boolean", + "default": false + } + ] + }, + { + "name": "ErrorEventDefinition", + "isAbstract": true, + "extends": ["bpmn:ErrorEventDefinition"], + "properties": [ + { + "name": "errorCodeVariable", + "isAttr": true, + "type": "String" + }, + { + "name": "errorMessageVariable", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Error", + "isAbstract": true, + "extends": ["bpmn:Error"], + "properties": [ + { + "name": "flowable:errorMessage", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "PotentialStarter", + "superClass": ["Element"], + "properties": [ + { + "name": "resourceAssignmentExpression", + "type": "bpmn:ResourceAssignmentExpression" + } + ] + }, + { + "name": "UserTask", + "isAbstract": true, + "extends": ["bpmn:UserTask"], + "properties": [ + { + "name": "timerEventDefinition", + "type": "Expression" + }, + { + "name": "multiInstanceLoopCharacteristics", + "type": "MultiInstanceLoopCharacteristics" + } + ] + }, + { + "name": "StartEvent", + "isAbstract": true, + "extends": ["bpmn:StartEvent"], + "properties": [ + { + "name": "timerEventDefinition", + "type": "Expression" + } + ] + }, + { + "name": "FormSupported", + "isAbstract": true, + "extends": ["bpmn:StartEvent", "bpmn:UserTask"], + "properties": [ + { + "name": "formHandlerClass", + "isAttr": true, + "type": "String" + }, + { + "name": "formKey", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "TemplateSupported", + "isAbstract": true, + "extends": ["bpmn:Process", "bpmn:FlowElement"], + "properties": [ + { + "name": "modelerTemplate", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Initiator", + "isAbstract": true, + "extends": ["bpmn:StartEvent"], + "properties": [ + { + "name": "initiator", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "ScriptTask", + "isAbstract": true, + "extends": ["bpmn:ScriptTask"], + "properties": [ + { + "name": "resultVariable", + "isAttr": true, + "type": "String" + }, + { + "name": "resource", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Process", + "isAbstract": true, + "extends": ["bpmn:Process"], + "properties": [ + { + "name": "candidateStarterGroups", + "isAttr": true, + "type": "String" + }, + { + "name": "candidateStarterUsers", + "isAttr": true, + "type": "String" + }, + { + "name": "versionTag", + "isAttr": true, + "type": "String" + }, + { + "name": "historyTimeToLive", + "isAttr": true, + "type": "String" + }, + { + "name": "isStartableInTasklist", + "isAttr": true, + "type": "Boolean", + "default": true + } + ] + }, + { + "name": "EscalationEventDefinition", + "isAbstract": true, + "extends": ["bpmn:EscalationEventDefinition"], + "properties": [ + { + "name": "escalationCodeVariable", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "FormalExpression", + "isAbstract": true, + "extends": ["bpmn:FormalExpression"], + "properties": [ + { + "name": "resource", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Assignable", + "extends": ["bpmn:UserTask"], + "properties": [ + { + "name": "candidateGroups", + "isAttr": true, + "type": "String" + }, + { + "name": "dueDate", + "isAttr": true, + "type": "String" + }, + { + "name": "followUpDate", + "isAttr": true, + "type": "String" + }, + { + "name": "priority", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "CallActivity", + "extends": ["bpmn:CallActivity"], + "properties": [ + { + "name": "calledElementBinding", + "isAttr": true, + "type": "String", + "default": "latest" + }, + { + "name": "calledElementVersion", + "isAttr": true, + "type": "String" + }, + { + "name": "calledElementVersionTag", + "isAttr": true, + "type": "String" + }, + { + "name": "calledElementTenantId", + "isAttr": true, + "type": "String" + }, + { + "name": "caseRef", + "isAttr": true, + "type": "String" + }, + { + "name": "caseBinding", + "isAttr": true, + "type": "String", + "default": "latest" + }, + { + "name": "caseVersion", + "isAttr": true, + "type": "String" + }, + { + "name": "caseTenantId", + "isAttr": true, + "type": "String" + }, + { + "name": "variableMappingClass", + "isAttr": true, + "type": "String" + }, + { + "name": "variableMappingDelegateExpression", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "ServiceTaskLike", + "extends": [ + "bpmn:ServiceTask", + "bpmn:BusinessRuleTask", + "bpmn:SendTask", + "bpmn:MessageEventDefinition" + ], + "properties": [ + { + "name": "expression", + "isAttr": true, + "type": "String" + }, + { + "name": "class", + "isAttr": true, + "type": "String" + }, + { + "name": "delegateExpression", + "isAttr": true, + "type": "String" + }, + { + "name": "resultVariable", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "ExclusiveGateway", + "isAbstract": true, + "extends": ["bpmn:ExclusiveGateway"], + "properties": [ + { + "name": "serviceClass", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "DmnCapable", + "extends": ["bpmn:BusinessRuleTask"], + "properties": [ + { + "name": "decisionRef", + "isAttr": true, + "type": "String" + }, + { + "name": "decisionRefBinding", + "isAttr": true, + "type": "String", + "default": "latest" + }, + { + "name": "decisionRefVersion", + "isAttr": true, + "type": "String" + }, + { + "name": "mapDecisionResult", + "isAttr": true, + "type": "String", + "default": "resultList" + }, + { + "name": "decisionRefTenantId", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "ExternalCapable", + "extends": ["flowable:ServiceTaskLike"], + "properties": [ + { + "name": "type", + "isAttr": true, + "type": "String" + }, + { + "name": "topic", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "TaskPriorized", + "extends": ["bpmn:Process", "flowable:ExternalCapable"], + "properties": [ + { + "name": "taskPriority", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Properties", + "superClass": ["Element"], + "meta": { + "allowedIn": ["*"] + }, + "properties": [ + { + "name": "values", + "type": "Property", + "isMany": true + } + ] + }, + { + "name": "Property", + "superClass": ["Element"], + "properties": [ + { + "name": "id", + "type": "String", + "isAttr": true + }, + { + "name": "name", + "type": "String", + "isAttr": true + }, + { + "name": "value", + "type": "String", + "isAttr": true + } + ] + }, + { + "name": "Connector", + "superClass": ["Element"], + "meta": { + "allowedIn": ["flowable:ServiceTaskLike"] + }, + "properties": [ + { + "name": "inputOutput", + "type": "InputOutput" + }, + { + "name": "connectorId", + "type": "String" + } + ] + }, + { + "name": "InputOutput", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:FlowNode", "flowable:Connector"] + }, + "properties": [ + { + "name": "inputOutput", + "type": "InputOutput" + }, + { + "name": "connectorId", + "type": "String" + }, + { + "name": "inputParameters", + "isMany": true, + "type": "InputParameter" + }, + { + "name": "outputParameters", + "isMany": true, + "type": "OutputParameter" + } + ] + }, + { + "name": "InputOutputParameter", + "properties": [ + { + "name": "name", + "isAttr": true, + "type": "String" + }, + { + "name": "value", + "isBody": true, + "type": "String" + }, + { + "name": "definition", + "type": "InputOutputParameterDefinition" + } + ] + }, + { + "name": "InputOutputParameterDefinition", + "isAbstract": true + }, + { + "name": "List", + "superClass": ["InputOutputParameterDefinition"], + "properties": [ + { + "name": "items", + "isMany": true, + "type": "InputOutputParameterDefinition" + } + ] + }, + { + "name": "Map", + "superClass": ["InputOutputParameterDefinition"], + "properties": [ + { + "name": "entries", + "isMany": true, + "type": "Entry" + } + ] + }, + { + "name": "Entry", + "properties": [ + { + "name": "key", + "isAttr": true, + "type": "String" + }, + { + "name": "value", + "isBody": true, + "type": "String" + }, + { + "name": "definition", + "type": "InputOutputParameterDefinition" + } + ] + }, + { + "name": "Value", + "superClass": ["InputOutputParameterDefinition"], + "properties": [ + { + "name": "id", + "isAttr": true, + "type": "String" + }, + { + "name": "name", + "isAttr": true, + "type": "String" + }, + { + "name": "value", + "isBody": true, + "type": "String" + } + ] + }, + { + "name": "Script", + "superClass": ["InputOutputParameterDefinition"], + "properties": [ + { + "name": "scriptFormat", + "isAttr": true, + "type": "String" + }, + { + "name": "resource", + "isAttr": true, + "type": "String" + }, + { + "name": "value", + "isBody": true, + "type": "String" + } + ] + }, + { + "name": "Field", + "superClass": ["Element"], + "meta": { + "allowedIn": [ + "flowable:ServiceTaskLike", + "flowable:ExecutionListener", + "flowable:TaskListener" + ] + }, + "properties": [ + { + "name": "name", + "isAttr": true, + "type": "String" + }, + { + "name": "expression", + "isAttr": true, + "type": "expression" + }, + { + "name": "string", + "type": "string" + }, + { + "name": "stringValue", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "string", + "superClass": ["Element"], + "meta": { + "allowedIn": [ + "flowable:Field" + ] + }, + "properties": [ + { + "name": "body", + "isBody": true, + "type": "String" + } + ] + }, + { + "name": "expression", + "superClass": ["Element"], + "meta": { + "allowedIn": [ + "flowable:Field" + ] + }, + "properties": [ + { + "name": "body", + "isBody": true, + "type": "String" + } + ] + }, + { + "name": "InputParameter", + "superClass": ["InputOutputParameter"] + }, + { + "name": "OutputParameter", + "superClass": ["InputOutputParameter"] + }, + { + "name": "Collectable", + "isAbstract": true, + "extends": ["bpmn:MultiInstanceLoopCharacteristics"], + "superClass": ["flowable:AsyncCapable"], + "properties": [ + { + "name": "collection", + "isAttr": true, + "type": "String" + }, + { + "name": "elementVariable", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "SequenceFlow", + "superClass": ["FlowElement"], + "properties": [ + { + "name": "isImmediate", + "isAttr": true, + "type": "Boolean" + }, + { + "name": "conditionExpression", + "type": "Expression" + }, + { + "name": "sourceRef", + "type": "FlowNode", + "isAttr": true, + "isReference": true + }, + { + "name": "targetRef", + "type": "FlowNode", + "isAttr": true, + "isReference": true + } + ] + }, + { + "name": "MultiInstanceLoopCharacteristics", + "superClass": ["LoopCharacteristics"], + "properties": [ + { + "name": "isSequential", + "default": false, + "isAttr": true, + "type": "Boolean" + }, + { + "name": "behavior", + "type": "MultiInstanceBehavior", + "default": "All", + "isAttr": true + }, + { + "name": "loopCardinality", + "type": "Expression", + "xml": { + "serialize": "xsi:type" + } + }, + { + "name": "loopDataInputRef", + "type": "ItemAwareElement", + "isReference": true + }, + { + "name": "loopDataOutputRef", + "type": "ItemAwareElement", + "isReference": true + }, + { + "name": "inputDataItem", + "type": "DataInput", + "xml": { + "serialize": "property" + } + }, + { + "name": "outputDataItem", + "type": "DataOutput", + "xml": { + "serialize": "property" + } + }, + { + "name": "complexBehaviorDefinition", + "type": "ComplexBehaviorDefinition", + "isMany": true + }, + { + "name": "completionCondition", + "type": "Expression", + "xml": { + "serialize": "xsi:type" + } + }, + { + "name": "oneBehaviorEventRef", + "type": "EventDefinition", + "isAttr": true, + "isReference": true + }, + { + "name": "noneBehaviorEventRef", + "type": "EventDefinition", + "isAttr": true, + "isReference": true + } + ] + }, + { + "name": "FailedJobRetryTimeCycle", + "superClass": ["Element"], + "meta": { + "allowedIn": ["flowable:AsyncCapable", "bpmn:MultiInstanceLoopCharacteristics"] + }, + "properties": [ + { + "name": "body", + "isBody": true, + "type": "String" + } + ] + }, + { + "name": "ExecutionListener", + "superClass": ["Element"], + "meta": { + "allowedIn": [ + "bpmn:Task", + "bpmn:ServiceTask", + "bpmn:UserTask", + "bpmn:BusinessRuleTask", + "bpmn:ScriptTask", + "bpmn:ReceiveTask", + "bpmn:ManualTask", + "bpmn:ExclusiveGateway", + "bpmn:SequenceFlow", + "bpmn:ParallelGateway", + "bpmn:InclusiveGateway", + "bpmn:EventBasedGateway", + "bpmn:StartEvent", + "bpmn:IntermediateCatchEvent", + "bpmn:IntermediateThrowEvent", + "bpmn:EndEvent", + "bpmn:BoundaryEvent", + "bpmn:CallActivity", + "bpmn:SubProcess", + "bpmn:Process" + ] + }, + "properties": [ + { + "name": "expression", + "isAttr": true, + "type": "String" + }, + { + "name": "class", + "isAttr": true, + "type": "String" + }, + { + "name": "delegateExpression", + "isAttr": true, + "type": "String" + }, + { + "name": "event", + "isAttr": true, + "type": "String" + }, + { + "name": "script", + "type": "Script" + }, + { + "name": "fields", + "type": "Field", + "isMany": true + } + ] + }, + { + "name": "TaskListener", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:UserTask"] + }, + "properties": [ + { + "name": "expression", + "isAttr": true, + "type": "String" + }, + { + "name": "class", + "isAttr": true, + "type": "String" + }, + { + "name": "delegateExpression", + "isAttr": true, + "type": "String" + }, + { + "name": "event", + "isAttr": true, + "type": "String" + }, + { + "name": "script", + "type": "Script" + }, + { + "name": "fields", + "type": "Field", + "isMany": true + } + ] + }, + { + "name": "FormProperty", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:StartEvent", "bpmn:UserTask"] + }, + "properties": [ + { + "name": "id", + "type": "String", + "isAttr": true + }, + { + "name": "name", + "type": "String", + "isAttr": true + }, + { + "name": "type", + "type": "String", + "isAttr": true + }, + { + "name": "required", + "type": "String", + "isAttr": true + }, + { + "name": "readable", + "type": "String", + "isAttr": true + }, + { + "name": "writable", + "type": "String", + "isAttr": true + }, + { + "name": "variable", + "type": "String", + "isAttr": true + }, + { + "name": "expression", + "type": "String", + "isAttr": true + }, + { + "name": "datePattern", + "type": "String", + "isAttr": true + }, + { + "name": "default", + "type": "String", + "isAttr": true + }, + { + "name": "values", + "type": "Value", + "isMany": true + } + ] + }, + { + "name": "FormData", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:StartEvent", "bpmn:UserTask"] + }, + "properties": [ + { + "name": "fields", + "type": "FormField", + "isMany": true + }, + { + "name": "businessKey", + "type": "String", + "isAttr": true + } + ] + }, + { + "name": "FormField", + "superClass": ["Element"], + "properties": [ + { + "name": "id", + "type": "String", + "isAttr": true + }, + { + "name": "label", + "type": "String", + "isAttr": true + }, + { + "name": "type", + "type": "String", + "isAttr": true + }, + { + "name": "datePattern", + "type": "String", + "isAttr": true + }, + { + "name": "defaultValue", + "type": "String", + "isAttr": true + }, + { + "name": "properties", + "type": "Properties" + }, + { + "name": "validation", + "type": "Validation" + }, + { + "name": "values", + "type": "Value", + "isMany": true + } + ] + }, + { + "name": "Validation", + "superClass": ["Element"], + "properties": [ + { + "name": "constraints", + "type": "Constraint", + "isMany": true + } + ] + }, + { + "name": "Constraint", + "superClass": ["Element"], + "properties": [ + { + "name": "name", + "type": "String", + "isAttr": true + }, + { + "name": "config", + "type": "String", + "isAttr": true + } + ] + }, + { + "name": "ConditionalEventDefinition", + "isAbstract": true, + "extends": ["bpmn:ConditionalEventDefinition"], + "properties": [ + { + "name": "variableName", + "isAttr": true, + "type": "String" + }, + { + "name": "variableEvent", + "isAttr": true, + "type": "String" + } + ] + } + ], + "emumerations": [] + } \ No newline at end of file diff --git a/src/modules/admin/components/Ruoyi/Process/flowable/init.js b/src/modules/admin/components/Ruoyi/Process/flowable/init.js new file mode 100644 index 0000000..ec9e282 --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Process/flowable/init.js @@ -0,0 +1,24 @@ + +function randomStr() { + return Math.random().toString(36).slice(-8) +} + +export default function() { + return ` + + + + + + + + + + + + + + + + ` +} diff --git a/src/modules/admin/components/Ruoyi/Process/flowable/showConfig.js b/src/modules/admin/components/Ruoyi/Process/flowable/showConfig.js new file mode 100644 index 0000000..69ba83e --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Process/flowable/showConfig.js @@ -0,0 +1,55 @@ +export default { + 'bpmn:EndEvent': {}, + 'bpmn:StartEvent': { + initiator: true, + formKey: true + }, + 'bpmn:UserTask': { + userType: true, + dataType: true, + assignee: true, + candidateUsers: true, + candidateGroups: true, + // assigneeFixed: true, + // candidateUsersFixed: true, + // candidateGroupsFixed: true, + async: true, + priority: true, + formKey: true, + skipExpression: true, + dueDate: true, + taskListener: true + }, + 'bpmn:ServiceTask': { + async: true, + skipExpression: true, + isForCompensation: true, + triggerable: true, + class: true + }, + 'bpmn:ScriptTask': { + async: true, + isForCompensation: true, + autoStoreVariables: true + }, + 'bpmn:ManualTask': { + async: true, + isForCompensation: true + }, + 'bpmn:ReceiveTask': { + async: true, + isForCompensation: true + }, + 'bpmn:SendTask': { + async: true, + isForCompensation: true + }, + 'bpmn:BusinessRuleTask': { + async: true, + isForCompensation: true, + ruleVariablesInput: true, + rules: true, + resultVariable: true, + exclude: true + } +} diff --git a/src/modules/admin/components/Ruoyi/Process/index.js b/src/modules/admin/components/Ruoyi/Process/index.js new file mode 100644 index 0000000..f78489d --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Process/index.js @@ -0,0 +1,5 @@ +import workflowBpmnModeler from './index.vue' + +workflowBpmnModeler.install = Vue => Vue.component(workflowBpmnModeler.name, workflowBpmnModeler) // 给组件配置install方法 + +export default workflowBpmnModeler diff --git a/src/modules/admin/components/Ruoyi/Process/index.vue b/src/modules/admin/components/Ruoyi/Process/index.vue new file mode 100644 index 0000000..38c42de --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Process/index.vue @@ -0,0 +1,467 @@ + + + + + diff --git a/src/modules/admin/components/Ruoyi/Process/lang/zh.js b/src/modules/admin/components/Ruoyi/Process/lang/zh.js new file mode 100644 index 0000000..003c0cc --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Process/lang/zh.js @@ -0,0 +1,227 @@ +export default { + // Labels + 'Activate the global connect tool': '激活全局连接工具', + 'Append {type}': '添加 {type}', + 'Add Lane above': '在上面添加道', + 'Divide into two Lanes': '分割成两个道', + 'Divide into three Lanes': '分割成三个道', + 'Add Lane below': '在下面添加道', + 'Append compensation activity': '追加补偿活动', + 'Change type': '修改类型', + 'Connect using Association': '使用关联连接', + 'Connect using Sequence/MessageFlow or Association': '使用顺序/消息流或者关联连接', + 'Connect using DataInputAssociation': '使用数据输入关联连接', + 'Remove': '移除', + 'Activate the hand tool': '激活抓手工具', + 'Activate the lasso tool': '激活套索工具', + 'Activate the create/remove space tool': '激活创建/删除空间工具', + 'Create expanded SubProcess': '创建扩展子过程', + 'Create IntermediateThrowEvent/BoundaryEvent': '创建中间抛出事件/边界事件', + 'Create Pool/Participant': '创建池/参与者', + 'Parallel Multi Instance': '并行多重事件', + 'Sequential Multi Instance': '时序多重事件', + 'DataObjectReference': '数据对象参考', + 'DataStoreReference': '数据存储参考', + 'Loop': '循环', + 'Ad-hoc': '即席', + 'Create {type}': '创建 {type}', + 'Task': '任务', + 'Send Task': '发送任务', + 'Receive Task': '接收任务', + 'User Task': '用户任务', + 'Manual Task': '手工任务', + 'Business Rule Task': '业务规则任务', + 'Service Task': '服务任务', + 'Script Task': '脚本任务', + 'Call Activity': '调用活动', + 'Sub Process (collapsed)': '子流程(折叠的)', + 'Sub Process (expanded)': '子流程(展开的)', + 'Start Event': '开始事件', + 'StartEvent': '开始事件', + 'Intermediate Throw Event': '中间事件', + 'End Event': '结束事件', + 'EndEvent': '结束事件', + 'Create Gateway': '创建网关', + 'Create Intermediate/Boundary Event': '创建中间/边界事件', + 'Message Start Event': '消息开始事件', + 'Timer Start Event': '定时开始事件', + 'Conditional Start Event': '条件开始事件', + 'Signal Start Event': '信号开始事件', + 'Error Start Event': '错误开始事件', + 'Escalation Start Event': '升级开始事件', + 'Compensation Start Event': '补偿开始事件', + 'Message Start Event (non-interrupting)': '消息开始事件(非中断)', + 'Timer Start Event (non-interrupting)': '定时开始事件(非中断)', + 'Conditional Start Event (non-interrupting)': '条件开始事件(非中断)', + 'Signal Start Event (non-interrupting)': '信号开始事件(非中断)', + 'Escalation Start Event (non-interrupting)': '升级开始事件(非中断)', + 'Message Intermediate Catch Event': '消息中间捕获事件', + 'Message Intermediate Throw Event': '消息中间抛出事件', + 'Timer Intermediate Catch Event': '定时中间捕获事件', + 'Escalation Intermediate Throw Event': '升级中间抛出事件', + 'Conditional Intermediate Catch Event': '条件中间捕获事件', + 'Link Intermediate Catch Event': '链接中间捕获事件', + 'Link Intermediate Throw Event': '链接中间抛出事件', + 'Compensation Intermediate Throw Event': '补偿中间抛出事件', + 'Signal Intermediate Catch Event': '信号中间捕获事件', + 'Signal Intermediate Throw Event': '信号中间抛出事件', + 'Message End Event': '消息结束事件', + 'Escalation End Event': '定时结束事件', + 'Error End Event': '错误结束事件', + 'Cancel End Event': '取消结束事件', + 'Compensation End Event': '补偿结束事件', + 'Signal End Event': '信号结束事件', + 'Terminate End Event': '终止结束事件', + 'Message Boundary Event': '消息边界事件', + 'Message Boundary Event (non-interrupting)': '消息边界事件(非中断)', + 'Timer Boundary Event': '定时边界事件', + 'Timer Boundary Event (non-interrupting)': '定时边界事件(非中断)', + 'Escalation Boundary Event': '升级边界事件', + 'Escalation Boundary Event (non-interrupting)': '升级边界事件(非中断)', + 'Conditional Boundary Event': '条件边界事件', + 'Conditional Boundary Event (non-interrupting)': '条件边界事件(非中断)', + 'Error Boundary Event': '错误边界事件', + 'Cancel Boundary Event': '取消边界事件', + 'Signal Boundary Event': '信号边界事件', + 'Signal Boundary Event (non-interrupting)': '信号边界事件(非中断)', + 'Compensation Boundary Event': '补偿边界事件', + 'Exclusive Gateway': '互斥网关', + 'Parallel Gateway': '并行网关', + 'Inclusive Gateway': '相容网关', + 'Complex Gateway': '复杂网关', + 'Event based Gateway': '事件网关', + 'Transaction': '转运', + 'Sub Process': '子流程', + 'Event Sub Process': '事件子流程', + 'Collapsed Pool': '折叠池', + 'Expanded Pool': '展开池', + // Errors + 'no parent for {element} in {parent}': '在{parent}里,{element}没有父类', + 'no shape type specified': '没有指定的形状类型', + 'flow elements must be children of pools/participants': '流元素必须是池/参与者的子类', + 'out of bounds release': 'out of bounds release', + 'more than {count} child lanes': '子道大于{count} ', + 'element required': '元素不能为空', + 'diagram not part of bpmn:Definitions': '流程图不符合bpmn规范', + 'no diagram to display': '没有可展示的流程图', + 'no process or collaboration to display': '没有可展示的流程/协作', + 'element {element} referenced by {referenced}#{property} not yet drawn': '由{referenced}#{property}引用的{element}元素仍未绘制', + 'already rendered {element}': '{element} 已被渲染', + 'failed to import {element}': '导入{element}失败', + // 属性面板的参数 + 'Id': '标识', + 'Name': '名称', + 'General': '常规', + 'Details': '详情', + 'Message Name': '消息名称', + 'Message': '消息', + 'Initiator': '创建者', + 'Asynchronous Continuations': '持续异步', + 'Asynchronous Before': '异步前', + 'Asynchronous After': '异步后', + 'Job Configuration': '工作配置', + 'Exclusive': '排除', + 'Job Priority': '工作优先级', + 'Retry Time Cycle': '重试时间周期', + 'Documentation': '文档', + 'Element Documentation': '元素文档', + 'History Configuration': '历史配置', + 'History Time To Live': '历史的生存时间', + 'Forms': '表单', + 'Form Key': '表单key', + 'Form Fields': '表单字段', + 'Business Key': '业务key', + 'Form Field': '表单字段', + 'ID': '编号', + 'Type': '类型', + 'Label': '名称', + 'Default Value': '默认值', + 'Validation': '校验', + 'Add Constraint': '添加约束', + 'Config': '配置', + 'Properties': '属性', + 'Add Property': '添加属性', + 'Value': '值', + 'Listeners': '监听器', + 'Execution Listener': '执行监听', + 'Event Type': '事件类型', + 'Listener Type': '监听器类型', + 'Java Class': 'Java类', + 'Expression': '表达式', + 'Must provide a value': '必须提供一个值', + 'Delegate Expression': '代理表达式', + 'Script': '脚本', + 'Script Format': '脚本格式', + 'Script Type': '脚本类型', + 'Inline Script': '内联脚本', + 'External Script': '外部脚本', + 'Resource': '资源', + 'Field Injection': '字段注入', + 'Extensions': '扩展', + 'Input/Output': '输入/输出', + 'Input Parameters': '输入参数', + 'Output Parameters': '输出参数', + 'Parameters': '参数', + 'Output Parameter': '输出参数', + 'Timer Definition Type': '定时器定义类型', + 'Timer Definition': '定时器定义', + 'Date': '日期', + 'Duration': '持续', + 'Cycle': '循环', + 'Signal': '信号', + 'Signal Name': '信号名称', + 'Escalation': '升级', + 'Error': '错误', + 'Link Name': '链接名称', + 'Condition': '条件名称', + 'Variable Name': '变量名称', + 'Variable Event': '变量事件', + 'Specify more than one variable change event as a comma separated list.': '多个变量事件以逗号隔开', + 'Wait for Completion': '等待完成', + 'Activity Ref': '活动参考', + 'Version Tag': '版本标签', + 'Executable': '可执行文件', + 'External Task Configuration': '扩展任务配置', + 'Task Priority': '任务优先级', + 'External': '外部', + 'Connector': '连接器', + 'Must configure Connector': '必须配置连接器', + 'Connector Id': '连接器编号', + 'Implementation': '实现方式', + 'Field Injections': '字段注入', + 'Fields': '字段', + 'Result Variable': '结果变量', + 'Topic': '主题', + 'Configure Connector': '配置连接器', + 'Input Parameter': '输入参数', + 'Assignee': '代理人', + 'Candidate Users': '候选用户', + 'Candidate Groups': '候选组', + 'Due Date': '到期时间', + 'Follow Up Date': '跟踪日期', + 'Priority': '优先级', + 'The follow up date as an EL expression (e.g. ${someDate} or an ISO date (e.g. 2015-06-26T09:54:00)': '跟踪日期必须符合EL表达式,如: ${someDate} ,或者一个ISO标准日期,如:2015-06-26T09:54:00', + 'The due date as an EL expression (e.g. ${someDate} or an ISO date (e.g. 2015-06-26T09:54:00)': '跟踪日期必须符合EL表达式,如: ${someDate} ,或者一个ISO标准日期,如:2015-06-26T09:54:00', + 'Variables': '变量' +} + +export const NodeName = { + 'bpmn:Process': '流程', + 'bpmn:StartEvent': '开始事件', + 'bpmn:IntermediateThrowEvent': '中间事件', + 'bpmn:Task': '任务', + 'bpmn:SendTask': '发送任务', + 'bpmn:ReceiveTask': '接收任务', + 'bpmn:UserTask': '用户任务', + 'bpmn:ManualTask': '手工任务', + 'bpmn:BusinessRuleTask': '业务规则任务', + 'bpmn:ServiceTask': '服务任务', + 'bpmn:ScriptTask': '脚本任务', + 'bpmn:EndEvent': '结束事件', + 'bpmn:SequenceFlow': '流程线', + 'bpmn:ExclusiveGateway': '互斥网关', + 'bpmn:ParallelGateway': '并行网关', + 'bpmn:InclusiveGateway': '相容网关', + 'bpmn:ComplexGateway': '复杂网关', + 'bpmn:EventBasedGateway': '事件网关' +} diff --git a/src/modules/admin/components/Ruoyi/Process/package/common/config.js b/src/modules/admin/components/Ruoyi/Process/package/common/config.js new file mode 100644 index 0000000..881c90b --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Process/package/common/config.js @@ -0,0 +1,495 @@ +import merge from 'lodash.merge' +const golbalConfig = { + input: { + disabled: false, + type: 'text', + valueKey: 'value', + debounce: 300, + placement: 'bottom-start', + triggerOnFocus: true, + selectWhenUnmatched: false, + maxlength: null, + minlength: null, + showWordLimit: false, + placeholder: null, + clearable: false, + size: 'medium', + rows: 3, + autosize: false, + autocomplete: 'off', + resize: 'none', + validateEvent: true, + hideLoading: false, + popperAppendToBody: true, + highlightFirstItem: false + }, + autocomplete: { + disabled: false, + placeholder: null, + valueKey: 'value', + debounce: 300, + placement: 'bottom-start', + fetchSuggestions: null, + popperClass: null, + triggerOnFocus: true, + name: null, + selectWhenUnmatched: false, + label: null, + prefixIcon: null, + suffixIcon: null, + hideLoading: false, + popperAppendToBody: true, + highlightFirstItem: false, + maxlength: null, + minlength: null, + clearable: false, + size: 'medium', + rows: 3, + autosize: false, + autocomplete: 'off', + resize: 'none', + validateEvent: true + }, + select: { + disabled: false, + multiple: false, + valueKey: 'value', + size: 'medium', + clearable: false, + collapseTags: false, + multipleLimit: 0, + autocomplete: 'off', + placeholder: '请选择', + filterable: false, + allowCreate: false, + remote: false, + loading: false, + loadingText: '加载中', + noMatchText: '无匹配数据', + noDataText: '无数据', + reserveKeyword: false, + defaultFirstOption: false, + popperAppendToBody: true, + automaticDropdown: false + }, + datePicker: { + disabled: false, + readonly: false, + editable: true, + clearable: true, + size: '', + placeholder: '请选择日期', + startPlaceholder: '开始时间', + endPlaceholder: '结束时间', + type: 'date', + format: '', + align: 'left', + pickerOptions: {}, + rangeSeparator: ':', + valueFormat: '', + unlinkPanels: false, + prefixIcon: 'el-icon-date', + clearIcon: 'el-icon-circle-close', + validateEvent: true + }, + checkbox: { + disabled: false, + size: 'medium', + min: undefined, + max: undefined, + textColor: '#ffffff', + fill: '#409EFF', + border: false + }, + radio: { + disabled: false, + border: false, + size: 'medium', + textColor: '#ffffff', + fill: '#409EFF' + }, + cascader: { + disabled: false, + size: 'medium', + placeholder: '请选择', + clearable: false, + showAllLevels: true, + collapseTags: false, + separator: ' / ', + debounce: 300 + }, + switch: { + disabled: false, + width: 40, + activeValue: true, + inactiveValue: false, + activeColor: '#409EFF', + inactiveColor: '#C0CCDA', + validateEvent: true + }, + inputNumber: { + disabled: false, + min: '-Infinity', + max: 'Infinity', + step: 1, + stepStrictly: false, + precision: null, + size: 'medium', + controls: true, + controlsPosition: null, + placeholder: null + }, + slider: { + disabled: false, + min: 0, + max: 100, + step: 1, + showInput: false, + showInputControls: true, + inputSize: 'small', + showStops: false, + showTooltip: true, + range: false, + vertical: false, + height: null, + label: null, + debounce: 300, + marks: null + }, + timePicker: { + disabled: false, + editable: true, + clearable: true, + size: 'medium', + placeholder: '', + align: 'left', + startPlaceholder: '', + endPlaceholder: '', + isRange: false, + arrowControl: false, + pickerOptions: {}, + rangeSeparator: ':', + valueFormat: '', + prefixIcon: 'el-icon-time', + clearIcon: 'el-icon-circle-close', + + selectableRange: null, + format: 'HH:mm:ss' + }, + timeSelect: { + disabled: false, + editable: true, + clearable: true, + size: 'medium', + placeholder: '', + align: 'left', + startPlaceholder: '', + endPlaceholder: '', + isRange: false, + arrowControl: false, + pickerOptions: {}, + rangeSeparator: ':', + valueFormat: '', + prefixIcon: 'el-icon-time', + clearIcon: 'el-icon-circle-close', + + start: '09:00', + end: '18:00', + step: '00:30', + minTime: '00:00', + maxTime: null + }, + rate: { + disabled: false, + max: 5, + texts: ['极差', '失望', '一般', '满意', '惊喜'], + colors: ['#F7BA2A', '#F7BA2A', '#F7BA2A'], + allowHalf: false, + lowThreshold: 2, + highThreshold: 4, + voidColor: '#C6D1DE', + iconClasses: ['el-icon-star-on', 'el-icon-star-on', 'el-icon-star-on'], + showText: false, + showScore: false, + textColor: '#1F2D3D', + scoreTemplate: '{value}', + disabledVoidColor: '#EFF2F7', + voidIconClass: 'el-icon-star-off', + disabledVoidIconClass: 'el-icon-star-on' + }, + colorPicker: { + disabled: false, + size: 'medium', + predefine: null, + showAlpha: false, + colorFormat: 'hex' + }, + transfer: { + disabled: false, + filterable: false, + filterPlaceholder: '请输入搜索内容', + targetOrder: 'original', + titles: ['列表 1', '列表 2'], + buttonTexts: [], + format: { noChecked: '${checked}/${total}', hasChecked: '${checked}/${total}' }, + props: null + }, + xtable: { + table: { + height: null, + maxHeight: null, + stripe: false, + border: false, + size: 'medium', + fit: true, + showHeader: true, + highlightCurrentRow: false, + rowClassName: null, + rowStyle: null, + cellClassName: null, + cellStyle: null, + headerRowClassName: null, + headerRowStyle: null, + headerCellClassName: null, + headerCellStyle: null, + emptyText: '暂无数据', + defaultExpandAll: false, + defaultSort: { order: 'ascending' }, + tooltipEffect: 'dark', + showSummary: false, + sumText: '合计', + selectOnIndeterminate: true, + indent: 16, + treeProps: { hasChildren: 'hasChildren', children: 'children' } + }, + column: { + width: null, + minWidth: null, + fixed: false, + sortable: false, + sortOrders: ['ascending', 'descending', null], + resizable: true, + showOverflowTooltip: false, + align: 'center', + headerAlign: 'center', + className: null, + labelClassName: null, + reserveSelection: false, + filterPlacement: null, + filterMultiple: true + }, + search: { + form: { + inline: true, + labelPosition: 'right', + labelWidth: 'auto', + labelSuffix: undefined, + hideRequiredAsterisk: false, + showMessage: true, + inlineMessage: false, + statusIcon: false, + validateOnRuleChange: true, + size: 'medium', + disabled: false, + itemStyle: 'width: 200px;' + }, + btn: { + size: 'medium', + type: 'primary', + plain: false, + round: false, + circle: false, + loading: false, + disabled: false, + icon: null, + autofocus: false, + nativeType: 'button', + searchBtn: { + // circle: false, + // round: false, + // plain: false, + // type: 'primary', + show: true, + text: '搜索', + icon: 'el-icon-search' + }, + resetBtn: { + // circle: false, + // round: false, + // plain: false, + // type: 'primary', + show: true, + text: '重置', + icon: 'el-icon-refresh-right' + } + } + }, + operate: { + column: { + label: '操作' + // width: null, + // minWidth: null, + // fixed: false + // renderHeader: null, + // resizable: null, + // align: null, + // headerAlign: null, + // className: null, + // labelClassName: null + }, + btn: { + size: 'medium', + type: 'primary', + plain: false, + round: false, + circle: false, + loading: false, + disabled: false, + icon: null, + autofocus: false, + nativeType: 'button' + }, + dropdown: { + className: '', + text: '更多', + placement: 'bottom-end', + trigger: 'hover', + hideOnClick: true, + showTimeout: 250, + hideTimeout: 150, + tabindex: 0, + divided: false + } + } + }, + xform: { + form: { + inline: false, + labelPosition: 'right', + labelWidth: '120px', + labelSuffix: undefined, + hideRequiredAsterisk: false, + showMessage: true, + inlineMessage: false, + statusIcon: false, + validateOnRuleChange: true, + size: 'medium', + disabled: false, + itemStyle: 'max-width: 300px; width: 100%;', + tooltip: { + effect: 'dark', + placement: 'top-start', + iconName: 'el-icon-info', + iconStyle: 'color: #409EFF' + }, + tabs: { + type: 'border-card', + closable: false, + addable: false, + editable: false, + tabPosition: 'top', + stretch: false, + table: { + height: null, + maxHeight: null, + stripe: false, + border: true, + size: 'medium', + fit: true, + showHeader: true, + highlightCurrentRow: false, + rowClassName: null, + rowStyle: null, + cellClassName: null, + cellStyle: null, + headerRowClassName: null, + headerRowStyle: null, + headerCellClassName: null, + headerCellStyle: null, + emptyText: '暂无数据', + defaultExpandAll: false, + defaultSort: { order: 'ascending' }, + tooltipEffect: 'dark', + showSummary: false, + sumText: '合计', + selectOnIndeterminate: true, + indent: 16, + treeProps: { hasChildren: 'hasChildren', children: 'children' }, + column: { + width: null, + minWidth: null, + showOverflowTooltip: false, + align: 'center', + headerAlign: 'center', + className: null, + // input的宽度100% + style: 'width: 100%' + }, + addConfig: { + show: true, + type: 'primary', + icon: '', + text: '新增', + size: 'mini', + circle: false, + style: 'margin-bottom:14px;', + className: '', + click: (fun, arr) => { + if (fun) { + fun(arr) + return + } + arr.splice(arr.length, 0, {}) + } + }, + operate: { + show: true, + label: '操作', + width: '60px', + headerAlign: 'center', + align: 'center', + btn: [ + { + type: 'danger', + icon: 'el-icon-close', + text: '', + size: 'mini', + circle: true, + style: '', + className: '', + click: (arr, index, fun) => { + if (fun) { + fun(arr, index) + return + } + arr.splice(index, 1) + } + } + ] + } + } + } + }, + operate: { + btn: { + size: 'medium', + type: 'primary', + plain: false, + round: false, + circle: false, + loading: false, + disabled: false, + icon: null, + autofocus: false, + nativeType: 'button' + } + } + } +} + +export default { + get: () => golbalConfig, + set: item => { + merge(golbalConfig, item) + } +} diff --git a/src/modules/admin/components/Ruoyi/Process/package/common/filterDic.js b/src/modules/admin/components/Ruoyi/Process/package/common/filterDic.js new file mode 100644 index 0000000..85faf0c --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Process/package/common/filterDic.js @@ -0,0 +1,15 @@ +export function filterDic(dic, value) { + let labelName = 'label' + let valueName = 'value' + if (dic.data || dic.label || dic.value) { + if (dic.label) labelName = dic.label + if (dic.value) valueName = dic.value + dic = dic.data + } + if (dic) { + for (let i = 0; i < dic.length; i++) { + if (dic[i][valueName] === value) return dic[i][labelName] + } + } + return '' +} diff --git a/src/modules/admin/components/Ruoyi/Process/package/common/util.js b/src/modules/admin/components/Ruoyi/Process/package/common/util.js new file mode 100644 index 0000000..2ce20fd --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Process/package/common/util.js @@ -0,0 +1,42 @@ +// 获取动态组件类型 +export function getComponentType(configItem) { + const xType = configItem.xType + const type = configItem.type + + if (xType === 'slot') { + return 'slot' + } else if (xType === 'cascader') { + return 'xCascader' + } else if (xType === 'checkbox') { + return 'xCheckbox' + } else if (xType === 'colorPicker') { + return 'xColorPicker' + } else if (xType === 'datePicker') { + return 'xDatePicker' + } else if (xType === 'input') { + return 'xInput' + } else if (xType === 'autocomplete') { + return 'xAutocomplete' + } else if (xType === 'inputNumber') { + return 'xInputNumber' + } else if (xType === 'radio') { + return 'xRadio' + } else if (xType === 'rate') { + return 'xRate' + } else if (xType === 'select') { + if (type === 'tree') { + return 'xTree' + } + return 'xSelect' + } else if (xType === 'slider') { + return 'xSlider' + } else if (xType === 'switch') { + return 'xSwitch' + } else if (xType === 'timePicker') { + return 'xTimePicker' + } else if (xType === 'timeSelect') { + return 'xTimeSelect' + } else if (xType === 'transfer') { + return 'xTransfer' + } +} diff --git a/src/modules/admin/components/Ruoyi/Process/package/common/xMixin.js b/src/modules/admin/components/Ruoyi/Process/package/common/xMixin.js new file mode 100644 index 0000000..3a04292 --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Process/package/common/xMixin.js @@ -0,0 +1,114 @@ +import golbalConfig from './config' + +export default function() { + return { + model: { + prop: 'modelValue', + event: 'input' + }, + props: { + config: { + type: Object, + default: {}, + required: true + }, + modelValue: { + default: undefined + } + }, + data() { + return { + formData: this.modelValue, + golbalConfig: golbalConfig.get() + } + }, + methods: { + /** + * 计算出布尔值,并且可以配置默认值 + */ + computeBoolen(value, defaultValue) { + if (this.isBoolen(value)) return value + if (this.isEmpty(value)) { + if (defaultValue) { + return defaultValue + } else { + return false + } + } + return true + }, + /** + * 如果给属性配置默认值 + */ + // computeData(value, defaultValue) { + // if (value !== null || value !== undefined) { + // return value + // } + // return defaultValue + // }, + /** + * 计算出布尔值,并且可以配置默认值 + */ + computeFunction(fun, ...data) { + if (fun) { + fun(...data) + } else { + return false + } + }, + /** + * 判断是否是 空指针,如果是,默认返回 {} + */ + // isDisabled(hasNullPoint, )) { + // if(this.isBoolen(value)) return value; + // if(this.isEmpty(value)) return false; + // if(value == "disabled") return true; + // return false; + // }, + /** + * 判断是否是 空 + */ + + isEmpty(value) { + if ( + value === 'null' || + value == null || + value === 'undefined' || + value === undefined || + value === '' + ) { + return true + } else { + return false + } + }, + /** + * 判断是否是 boolean + */ + isBoolen(value) { + return typeof value === 'boolean' + }, + /** + * 判断是否是 对象 + */ + isObject(value) { + return typeof value === 'object' + } + }, + watch: { + formData: { + handler(val) { + this.$emit('input', val) + this.$emit('change', val) + }, + deep: true + }, + modelValue: { + handler(val) { + this.formData = val + }, + deep: true + } + } + } +} diff --git a/src/modules/admin/components/Ruoyi/Process/package/index.js b/src/modules/admin/components/Ruoyi/Process/package/index.js new file mode 100644 index 0000000..389334e --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Process/package/index.js @@ -0,0 +1,20 @@ +import xForm from './xForm/' +import xTable from './xTable/' +import golbalConfig from './common/config' +const components = [ + xForm, + xTable +] + +function install(Vue, opts = {}) { + golbalConfig.set(opts) + components.map(component => { + Vue.component(component.name, component) + }) +} + +export default { + install, + xForm, + xTable +} diff --git a/src/modules/admin/components/Ruoyi/Process/package/xForm/components/xColumn.vue b/src/modules/admin/components/Ruoyi/Process/package/xForm/components/xColumn.vue new file mode 100644 index 0000000..c9e0dee --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Process/package/xForm/components/xColumn.vue @@ -0,0 +1,126 @@ + + + + + diff --git a/src/modules/admin/components/Ruoyi/Process/package/xForm/index.js b/src/modules/admin/components/Ruoyi/Process/package/xForm/index.js new file mode 100644 index 0000000..41a8528 --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Process/package/xForm/index.js @@ -0,0 +1,7 @@ +import xForm from './src/xForm' + +xForm.install = function(Vue) { + Vue.component(xForm.name, xForm) +} + +export default xForm diff --git a/src/modules/admin/components/Ruoyi/Process/package/xForm/src/xAutocomplete.vue b/src/modules/admin/components/Ruoyi/Process/package/xForm/src/xAutocomplete.vue new file mode 100644 index 0000000..ad062fe --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Process/package/xForm/src/xAutocomplete.vue @@ -0,0 +1,74 @@ + + + + diff --git a/src/modules/admin/components/Ruoyi/Process/package/xForm/src/xCascader.vue b/src/modules/admin/components/Ruoyi/Process/package/xForm/src/xCascader.vue new file mode 100644 index 0000000..ead91a8 --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Process/package/xForm/src/xCascader.vue @@ -0,0 +1,47 @@ + + + + diff --git a/src/modules/admin/components/Ruoyi/Process/package/xForm/src/xCheckbox.vue b/src/modules/admin/components/Ruoyi/Process/package/xForm/src/xCheckbox.vue new file mode 100644 index 0000000..823b00e --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Process/package/xForm/src/xCheckbox.vue @@ -0,0 +1,56 @@ + + + + diff --git a/src/modules/admin/components/Ruoyi/Process/package/xForm/src/xColorPicker.vue b/src/modules/admin/components/Ruoyi/Process/package/xForm/src/xColorPicker.vue new file mode 100644 index 0000000..6e80aac --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Process/package/xForm/src/xColorPicker.vue @@ -0,0 +1,35 @@ + + + + diff --git a/src/modules/admin/components/Ruoyi/Process/package/xForm/src/xDatePicker.vue b/src/modules/admin/components/Ruoyi/Process/package/xForm/src/xDatePicker.vue new file mode 100644 index 0000000..0f22355 --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Process/package/xForm/src/xDatePicker.vue @@ -0,0 +1,52 @@ + + + + diff --git a/src/modules/admin/components/Ruoyi/Process/package/xForm/src/xForm.vue b/src/modules/admin/components/Ruoyi/Process/package/xForm/src/xForm.vue new file mode 100644 index 0000000..7a48a39 --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Process/package/xForm/src/xForm.vue @@ -0,0 +1,367 @@ + + + + + diff --git a/src/modules/admin/components/Ruoyi/Process/package/xForm/src/xInput.vue b/src/modules/admin/components/Ruoyi/Process/package/xForm/src/xInput.vue new file mode 100644 index 0000000..8bf281f --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Process/package/xForm/src/xInput.vue @@ -0,0 +1,64 @@ + + + + diff --git a/src/modules/admin/components/Ruoyi/Process/package/xForm/src/xInputNumber.vue b/src/modules/admin/components/Ruoyi/Process/package/xForm/src/xInputNumber.vue new file mode 100644 index 0000000..7433851 --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Process/package/xForm/src/xInputNumber.vue @@ -0,0 +1,43 @@ + + + + diff --git a/src/modules/admin/components/Ruoyi/Process/package/xForm/src/xRadio.vue b/src/modules/admin/components/Ruoyi/Process/package/xForm/src/xRadio.vue new file mode 100644 index 0000000..0240cb4 --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Process/package/xForm/src/xRadio.vue @@ -0,0 +1,39 @@ + + + + diff --git a/src/modules/admin/components/Ruoyi/Process/package/xForm/src/xRate.vue b/src/modules/admin/components/Ruoyi/Process/package/xForm/src/xRate.vue new file mode 100644 index 0000000..314c830 --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Process/package/xForm/src/xRate.vue @@ -0,0 +1,44 @@ + + + + diff --git a/src/modules/admin/components/Ruoyi/Process/package/xForm/src/xSelect.vue b/src/modules/admin/components/Ruoyi/Process/package/xForm/src/xSelect.vue new file mode 100644 index 0000000..6ab261e --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Process/package/xForm/src/xSelect.vue @@ -0,0 +1,75 @@ + + + + diff --git a/src/modules/admin/components/Ruoyi/Process/package/xForm/src/xSlider.vue b/src/modules/admin/components/Ruoyi/Process/package/xForm/src/xSlider.vue new file mode 100644 index 0000000..9836b7d --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Process/package/xForm/src/xSlider.vue @@ -0,0 +1,46 @@ + + + + diff --git a/src/modules/admin/components/Ruoyi/Process/package/xForm/src/xSwitch.vue b/src/modules/admin/components/Ruoyi/Process/package/xForm/src/xSwitch.vue new file mode 100644 index 0000000..4f35065 --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Process/package/xForm/src/xSwitch.vue @@ -0,0 +1,40 @@ + + + + diff --git a/src/modules/admin/components/Ruoyi/Process/package/xForm/src/xTimePicker.vue b/src/modules/admin/components/Ruoyi/Process/package/xForm/src/xTimePicker.vue new file mode 100644 index 0000000..996340f --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Process/package/xForm/src/xTimePicker.vue @@ -0,0 +1,52 @@ + + + + diff --git a/src/modules/admin/components/Ruoyi/Process/package/xForm/src/xTimeSelect.vue b/src/modules/admin/components/Ruoyi/Process/package/xForm/src/xTimeSelect.vue new file mode 100644 index 0000000..fbfa451 --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Process/package/xForm/src/xTimeSelect.vue @@ -0,0 +1,55 @@ + + + + diff --git a/src/modules/admin/components/Ruoyi/Process/package/xForm/src/xTransfer.vue b/src/modules/admin/components/Ruoyi/Process/package/xForm/src/xTransfer.vue new file mode 100644 index 0000000..f17ea0e --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Process/package/xForm/src/xTransfer.vue @@ -0,0 +1,43 @@ + + + + diff --git a/src/modules/admin/components/Ruoyi/Process/package/xForm/src/xTree.vue b/src/modules/admin/components/Ruoyi/Process/package/xForm/src/xTree.vue new file mode 100644 index 0000000..4072dfe --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Process/package/xForm/src/xTree.vue @@ -0,0 +1,169 @@ + + + + diff --git a/src/modules/admin/components/Ruoyi/Process/package/xTable/index.js b/src/modules/admin/components/Ruoyi/Process/package/xTable/index.js new file mode 100644 index 0000000..b90df36 --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Process/package/xTable/index.js @@ -0,0 +1,7 @@ +import xTable from './src/xTable' + +xTable.install = function(Vue) { + Vue.component(xTable.name, xTable) +} + +export default xTable diff --git a/src/modules/admin/components/Ruoyi/Process/package/xTable/src/xColumn.vue b/src/modules/admin/components/Ruoyi/Process/package/xTable/src/xColumn.vue new file mode 100644 index 0000000..f829164 --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Process/package/xTable/src/xColumn.vue @@ -0,0 +1,80 @@ + + + + + diff --git a/src/modules/admin/components/Ruoyi/Process/package/xTable/src/xTable.vue b/src/modules/admin/components/Ruoyi/Process/package/xTable/src/xTable.vue new file mode 100644 index 0000000..8a88a30 --- /dev/null +++ b/src/modules/admin/components/Ruoyi/Process/package/xTable/src/xTable.vue @@ -0,0 +1,330 @@ + + + + + diff --git a/src/modules/admin/components/Ruoyi/iFrame/index.vue b/src/modules/admin/components/Ruoyi/iFrame/index.vue new file mode 100644 index 0000000..173b197 --- /dev/null +++ b/src/modules/admin/components/Ruoyi/iFrame/index.vue @@ -0,0 +1,32 @@ +