hinton-web
v1.0.3
Published
一号工程-辛顿前端
Readme
hinton-web
辛顿一号工程
开始
$ pnpm install
$ pnpm dev通用组件
src/components/header // 智能体头部组件
src/components/navigate // 侧边导航栏组件
src/components/step // 步骤组件
src/components/tab // 选项卡组件
src/components/upload // 上传文件组件
场景组件
在各自页面文件夹下新建components
例如:
├─agent-list
│ └─components
│ └─agent-card
此处agent-card为agent-list下独有的,其他地方没有使用场景
文件资源管理
对应页面的资源新建对应目录存放
├─assets
│ └─images
│ ├─agent-layout
│ └─agent-list
页面
// 智能体页面框架
src/layouts/agent-layout
// 所有智能体列表
src/pages/agent-list
// 各智能体页面
src/pages/agents/hinton
src/pages/agents/guanzhong
...
路由
{
path: '/agent',
name: 'agent',
component: () => import('@/pages/agent-layout/index.vue'),
meta: {
title: '智能体',
root: true,
noAuth: true,
},
children: [
{
path: 'hinton',
name: 'hinton',
component: () => import('@/pages/agents/hinton/index.vue'),
meta: {
title: 'hinton',
},
children: [
{
path: 'run',
name: 'hinton_run',
component: () => import('@/pages/agents/hinton/run/index.vue'),
meta: {
title: 'hinton',
},
children: [
{
path: 'review',
name: 'hinton_run_review',
component: () => import('@/pages/agents/hinton/run/review/index.vue'),
title: 'hinton',
},
{
path: 'contract',
name: 'hinton_run_contract',
component: () => import('@/pages/agents/hinton/run/contract/index.vue'),
title: 'hinton',
},
{
path: 'decision',
name: 'hinton_run_decision',
component: () => import('@/pages/agents/hinton/run/decision/index.vue'),
title: 'hinton',
},
{
path: 'data',
name: 'hinton_run_data',
component: () => import('@/pages/agents/hinton/run/data/index.vue'),
title: 'hinton',
},
{
path: 'estimate',
name: 'hinton_run_estimate',
component: () => import('@/pages/agents/hinton/run/estimate/index.vue'),
title: 'hinton',
},
],
},
{
path: 'history',
name: 'hinton_history',
component: () => import('@/pages/agents/hinton/history/index.vue'),
meta: {
title: 'hinton',
},
},
{
path: 'feedback',
name: 'hinton_feedback',
component: () => import('@/pages/agents/hinton/feedback/index.vue'),
meta: {
title: 'hinton',
},
},
{
path: 'knowledge',
name: 'hinton_knowledge',
component: () => import('@/pages/agents/hinton/knowledge/index.vue'),
meta: {
title: 'hinton',
},
},
],
},
],
}样例
参考src/pages/agents/hinton
目录结构
├─feedback
├─history
├─knowledge
└─run
├─contract
├─data
├─decision
├─estimate
└─review
└─components
├─feedback
└─form
说明
run
history
feedback
knowledge
表示顶部tab切换对应的四个页面
run页面下有侧边导航栏
review
contract
decision
data
review
表示导航栏对应的页面
他们在页面中均使用router-view进行路由嵌套
权限
系统管理 -> 菜单管理 -> 智能体列表下新建对应智能体权限(类型按钮) 系统管理 -> 角色管理 -> 创建对应智能体角色,并勾选对应绑定菜单及用户
注意
页面尽量进行组件拆分,避免一个文件代码量过多,方便未来维护
分支管理
分支
main // 主分支,用于发布
dev // 开发分支,用于开发
feature/xxx // 功能分支,用于开发新功能
注意
功能分支统一从main分支切出来,禁止从dev分支拉取
合并发布
测试环境:功能分支统一合并到dev分支,发布测试环境验证
生产环境:需要发布的功能分支,在测试环境得到验证后,再将功能分支合并到main分支,发布生产环境
注意
禁止将dev分支合并到main分支
