{"_id":"@codelife_ok/elpis","name":"@codelife_ok/elpis","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@codelife_ok/elpis","version":"1.0.0","description":"## 一个企业级应用框架，通过全栈实现。","main":"index.js","scripts":{"lint":"eslint --quiet --ext js,vue .","test":"_ENV='local' mocha 'test/**/*.js'"},"repository":{"type":"git","url":"https://git.code.tencent.com/coder1001/elips.git"},"author":{"name":"codelife_ok"},"license":"ISC","dependencies":{"@babel/core":"^7.24.0","@babel/runtime":"^7.28.4","@element-plus/icons-vue":"^2.3.2","ajv":"^6.10.2","axios":"^0.19.2","echarts":"^5.5.0","element-plus":"^2.3.7","generate-password":"^1.7.1","glob":"^7.1.4","jsonwebtoken":"^9.0.2","knex":"^0.19.0","koa":"2.7.0","koa-bodyparser":"^4.2.1","koa-nunjucks-2":"^3.0.2","koa-router":"^7.4.0","koa-static":"^5.0.0","koa-useragent":"2.0.0","koa2-cors":"^2.0.6","less":"^3.8.1","lodash":"^4.17.21","log4js":"^6.9.1","md5":"^2.2.1","moment":"^2.29.4","mysql":"^2.18.1","node-schedule":"^2.1.1","nodemon":"^1.19.2","path":"^0.12.7","pinia":"^2.1.6","superagent":"^8.1.2","vue":"^3.3.4","vue-json-viewer":"^3.0.4","vue-router":"^4.2.4","vuex":"^4.1.0","@babel/plugin-transform-runtime":"^7.1.0","@babel/preset-env":"^7.4.5","babel-loader":"^8.0.4","clean-webpack-plugin":"^0.1.19","consoler":"^0.2.0","css-loader":"^0.23.1","css-minimizer-webpack-plugin":"^5.0.1","directory-named-webpack-plugin":"^4.0.1","express":"^4.18.2","file-loader":"^6.2.0","happypack":"^5.0.1","html-webpack-inject-attributes-plugin":"^1.0.1","html-webpack-plugin":"^5.5.3","less-loader":"^11.1.3","mini-css-extract-plugin":"^2.7.6","style-loader":"^0.14.1","terser-webpack-plugin":"^2.3.5","url-loader":"^4.1.1","vue-loader":"^17.2.2","vue-style-loader":"^4.1.2","webpack":"^5.88.1","webpack-dev-middleware":"^6.1.1","webpack-hot-middleware":"^2.25.4","webpack-merge":"^4.2.1"},"devDependencies":{"assert":"^2.0.0","babel-eslint":"^10.0.2","eslint":"^7.32.0","eslint-plugin-import":"^2.28.1","eslint-plugin-vue":"^9.17.0","ghooks":"~1.0.3","mocha":"^6.1.4","supertest":"^4.0.2","validate-commit-msg":"~2.14.0"},"config":{"ghooks":{"commit-msg":"validate-commit-msg","pre-commit":"npm run lint"}},"_id":"@codelife_ok/elpis@1.0.0","gitHead":"897dd882753c42a86fb194db838f314cc1a9cdbd","_nodeVersion":"18.20.8","_npmVersion":"10.8.2","dist":{"integrity":"sha512-GP1Qy+sm0Q09FZZ2ZwaPlrQLvdLYt0ChmabF1/27U4GQo2o22288IwmnPW4hgxAfPyOKueHgnXvp20IEnznIfw==","shasum":"579d727445a5cd25defa0c69850c9742b5d347c6","tarball":"https://registry.npmjs.org/@codelife_ok/elpis/-/elpis-1.0.0.tgz","fileCount":84,"unpackedSize":690929,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIGSDKk8+aRHRZAoY7gZr52YPO7qe52EPApoe5WbGR7umAiEAwYGYO/z0lYNw5ip1VeZ2lrWfyXwl9nlw5IDf0dCj+vw="}]},"_npmUser":{"name":"codelife_ok","email":"znxtps@126.com"},"directories":{},"maintainers":[{"name":"codelife_ok","email":"znxtps@126.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/elpis_1.0.0_1764952595728_0.8118055953532735"},"_hasShrinkwrap":false}},"time":{"created":"2025-12-05T16:36:35.641Z","1.0.0":"2025-12-05T16:36:35.923Z","modified":"2025-12-05T16:36:36.194Z"},"maintainers":[{"name":"codelife_ok","email":"znxtps@126.com"}],"description":"## 一个企业级应用框架，通过全栈实现。","repository":{"type":"git","url":"https://git.code.tencent.com/coder1001/elips.git"},"author":{"name":"codelife_ok"},"license":"ISC","readme":"# elips\n\n## 一个企业级应用框架，通过全栈实现。\n\n### model 配置\n\n```js\n/**\n * dashboard 后台管理系统模型定义 一份模版对应一个模版解析器 一个解析器生成各种模版系统\n * 基于dashboard模板可以建立多个领域模型(基类）(业务维度)\n * 每个模型可以派生出不同的项目 模型衍生出项目  model衍生出project\n */\nconst dashboardModel = {\n  mode: \"dashboard\", // 模板类型 不同类型模板有不一样的数据结构\n  name: \"\", // 模版名称\n  desc: \"\", // 模版描述\n  icon: \"\", // 模版图标\n  homePage: \"\", // 首页路径\n  // 头部菜单配置\n  menu: [\n    {\n      key: \"\", // 菜单唯一描述\n      name: \"\", // 菜单名称\n      menuType: \"\", // 枚举值  group(点击展开子菜单) / module(点击显示模块)\n\n      // 当menuType为group时，可以有子菜单\n      subMenu: [\n        {\n          // 可递归\n        },\n      ],\n      // 当menuType为module时\n      moduleType: \"\", // 枚举值  sider/ iframe / custom / schema\n      // 当moduleType为sider时 侧边导航菜单\n      siderConfig: {\n        menu: [{}],\n      },\n      // 当moduleType为iframe时\n      iframeConfig: {\n        path: \"\", // iframe路径\n      },\n      // 当moduleType为custom时\n      customConfig: {\n        path: \"\", // 自定义路径\n      },\n      // 当moduleType为schema时\n      schemaConfig: {\n        api: \"\", // 接口地址 restful 规范\n        // 板块的数据结构\n        schema: {\n          type: \"object\",\n          properties: {\n            key: {\n              // ...schema // 标准配置\n              type: \"\", // 字段类型\n              lable: \"\", // 字段中文\n              minimum: 0, // 最小值\n              maximum: 1000000, // 最大值\n              // 字段在table中的相关配置\n              tableOption: {\n                elTableColumnConfig: {}, // el-table-column的配置\n                visible: true, // 是否显示\n              },\n              // 字段在search-bar中的相关配置\n              searchOption: {\n                elComponentConfig: {}, // el-component的配置\n                comType: \"\", // 组件类型 input select radio date-range other\n                default: \"\", // 默认值\n                // 当comType为select时，可以有枚举列表\n                enumList: [\n                  {\n                    value: \"\", // 枚举值\n                    label: \"\", // 枚举标签\n                  },\n                ], // 枚举列表\n\n                // 当comType为dynamicSelect时，可以有枚举列表\n                api: \"\",\n              },\n              // 字段在组件中的相关配置\n              comAOption: {},\n              comBOption: {},\n              // 字段在不同动态component中的相关配置 前缀对应 componentConfig中的键值\n              // 如 componentConfig中的createForm 则前缀为 createFormOption\n              // 字段在createForm中对应的配置\n              createFormOption: {\n                // ...elComponentConfig, 标准el-component配置\n                comType: \"\", // 组件类型 input select radio date-range other\n                visible: true, // 是否显示\n                disabled: false, // 是否禁用\n                default: \"\", // 默认值\n\n                // comType === select时\n                enumList: [\n                  {\n                    value: \"\", // 枚举值\n                    label: \"\", // 枚举标签\n                  },\n                ], // 枚举列表\n\n                // comType === dynamicSelect时\n                api: \"\",\n              },\n              // 字段在editForm中对应的配置\n              editFormOption: {\n                // ...elComponentConfig, 标准el-component配置\n                comType: \"\", // 组件类型 input select radio date-range other\n                visible: true, // 是否显示\n                disabled: false, // 是否禁用\n                default: \"\", // 默认值\n              },\n              // 字段在detailPanel中对应的配置\n              detailPanelOption: {\n                // ...elComponentConfig, 标准el-component配置\n                comType: \"\", // 组件类型 input select radio date-range other\n                visible: true, // 是否显示\n              },\n            },\n          },\n          required: [], // 必填字段\n          // additionalProperties: false,\n        },\n        tableConfig: {\n          headerButtons: [\n            {\n              label: \"\", // 按钮文字\n              eventKey: \"\", // 按钮事件key\n              eventOption: {\n                // 当eventKey = showComponent时，\n                comName: \"\", // 组件名称\n              }, // 按钮具体配置\n              // ...elButtonConfig\n            },\n          ],\n          rowButtons: [\n            {\n              label: \"\", // 按钮文字\n              eventKey: \"\", // 按钮事件key\n              eventOption: {\n                // 当eventKey为remove时，可以有params参数\n                params: {\n                  // 参数key 对应的rowValue的key的值 userId: row[userId]\n                  // 当rowValueKey=参数值  当格式为schema:xxx时 到table中找相应的xxx字段\n                  paramsKey: \"rowValueKey\",\n                },\n                // 当eventKey = showComponent时，\n                comName: \"\", // 组件名称\n              }, // 按钮事件具体配置\n              // ...elButtonConfig\n            },\n          ],\n        }, // 表格配置\n        searchConfig: {}, // search-bar搜索配置\n        // 动态组件相关配制\n        componentConfig: {\n          // 新增form为例\n          createForm: {\n            title: \"\", // 表单标题\n            saveBtnText: \"\", // 保存按钮文字\n            cancelBtnText: \"取消\", // 取消按钮文字\n          },\n          // 编辑form为例\n          editForm: {\n            mainKey: \"\", // 主键字段\n            title: \"\", // 表单标题\n            saveBtnText: \"\", // 保存按钮文字\n            cancelBtnText: \"取消\", // 取消按钮文字\n          },\n          detailPanel: {\n            title: \"\", // 面板标题\n            saveBtnText: \"\", // 保存按钮文字\n            cancelBtnText: \"取消\", // 取消按钮文字\n            mainKey: \"\", // 主键字段\n          },\n          comA: {},\n          comB: {},\n        }, // 自定义组件配置\n      },\n    },\n  ],\n};\n\n// schemaConfig\n/**\n * schemaConfig -> 解释器 {\n *   schema-view {\n *    schema-search-bar {\n *      select date-rage other components\n *      schema-table\n *      scheam-table-row\n *    }\n *    schema-form {\n *      input select radio 其它控件\n *    }\n *  }\n * }\n */\nexport default dashboardModel;\n```\n\n### 服务端启动\n\n```js\nconst { serverStart } = require(\"@baseh/hjs\");\n\nconst app = serverStart({});\n```\n\n### 自定义服务端\n\n- router-schema\n- router\n- controller\n- service\n- extend\n- config\n\n### 前端构建\n\n```js\nconst { frontendBuild } = require(\"@codelife_ok/elpis\");\n\nfrontendBuild(process.env._ENV);\n```\n\n### 自定义页面扩展\n\n1. 在 `app/pages/` 目录下写入口 `entry.xxx.js`\n\n### dashboard / custom-view 自定义页面扩展\n\n1. 在 `app/pages/dashboard/xxx` 下写页面\n\n### dashboard / shcema-view / components 动态组件扩展\n\n1. 在 `app/pages/dashboard/complex-view/schema-view/components` 下写组件\n2. 配置到 `app/pages/dashboard/complex-view/schema-view/components/component-config.js`\n\n### schema-form 控件扩展\n\n1. 在 `app/widgets/schema-form/complex-view` 下写控件\n2. 配置到 `app/widgets/schema-form/form-item-config.js`\n\n### schema-search-bar 控件扩展\n\n1. 在 `app/widgets/schema-search-bar/complex-view` 下写控件\n2. 配置到 `app/widgets/schema-search-bar/search-item-config.js`\n","readmeFilename":"README.md","_rev":"1-d19bbbb565fec9293b9fd36f282cd5db"}