# 综合短信平台
**Repository Path**: cramzhou/integrated-SMS-platform
## Basic Information
- **Project Name**: 综合短信平台
- **Description**: 西安综合短信平台前端项目
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 1
- **Created**: 2025-03-06
- **Last Updated**: 2026-02-26
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
## 接口文档&产品原型
- 接口文档: `http://172.30.66.94:3000/group/198`, 需要添加权限@马哥
- 一期产品原型: `https://org.modao.cc/app/e2d51c4a5679588ddd479c1904999c5f69c4c4f0?simulator_type=device& sticky#screen=skbyuvmau0z2cuy`, 产品@周亮
## 前端架构
- 技术栈: `CRA` + `Ant Design` + `React Hooks` + `TypeScript/JavaScript` + `GoJS` + `Lodash` + `Moment.js` + `query-string` + `Scss` + `env-cmd` + `socket.io-client` + `uuid`
- `CRA`: React 项目官方脚手架
- `Ant Design`: 组件库
- `GoJS`: 图表库, 用于绘制流程图, 文档: https://gojs.net/latest/intro/react.html
- `Lodash`: 前端工具库, 主要用到了防抖节流深拷贝
- `Moment.js`: 时间格式化工具
- `query-string`: 查询字符串=>对象
- `env-cmd`: CRA 官方推荐工具-打包时切换环境
- `socket.io-client`: 与服务端建立 socket 连接, 接收数据
- `uuid`: 用于生成前端 sessionId
## 开发环境
- npm 操作: https://wywppkd.github.io/2018/05/04/npm%E5%B8%B8%E7%94%A8%E6%93%8D%E4%BD%9C/
- 编辑器: vscode + ESLint(vscode 插件) + Prettier(vscode 插件)
- node.js: 推荐最新的稳定版, 如 12.xx
- mock 数据: `http://rap2.taobao.org/repository/editor?id=263064` 加权限@孙娟
```bash
$ npm i # 安装npm依赖包
# 启动本地服务
$ npm run start:mock # mock环境, 如果没有开发环境可以使用mock环境
$ npm run start:dev # 开发环境
$ npm run start:test # 测试环境
```
## 路由
```bash
"/account": "账户管理",
"/account/company": "企业管理",
"/account/dataPermission": "数据权限管理",
"/account/user": "用户管理",
"/account/role": "角色管理",
"/account/organization": "组织机构管理",
"/task": "任务管理",
"/task/callTask": "外呼任务",
"/ai": "Ai管理",
"/ai/robots": "交互任务管理",
"/ai/robots/version": "版本管理",
"/ai/robots/version/flow": "配置话术流程",
"/client": "客户管理",
"/client/numAttr": "号码属性管理",
"/client/numGroup": "号码组管理",
"/system": "系统配置",
"/system/strategy": "策略项管理",
"/system/voicerecognition": "语音识别厂商管理",
"/system/tts": "TTS厂商管理",
"/system/resourcePool": "资源池管理",
"/system/mainNum": "主叫号码管理"
```
## 打包&部署环境
> 打包部署目前采用 Docker+命令脚本的形式, 不需要前端手动打包
- build 环境: node:12.18
- 安装依赖&打包
```bash
# 安装依赖
$ npm install
# 打包
$ npm run build:dev # 开发环境
$ npm run build:test # 测试环境
```
- 部署环境: nginx:1.18
- `nginx.conf`配置
```bash
location / {
root /app; # 站点目录(无要求)
# 主要是下面两条
index index.html; # 默认首页
try_files $uri $uri/ /index.html; # 兼容history路由
}
```
## 打包部署
- 有问题咨询@马哥
```bash
# 获取项目
rm -rf /home/deploy/ic_web
cd /home/deploy
git clone git@gitlab.19ego.cn:intelligencecall/ic_web.git
cd /home/deploy/ic_web
RELEASE_VERSION=2.0.6
# node编译
docker run -it --rm --name node_build \
-v /home/deploy/ic_web:/usr/src/app \
development.docker.19ego.cn:5000/development1/node:12.18 sh -c 'npm install && npm run build:deploy'
# 去水印,再次执行上一步
# go.js -> home/deploy/ic_web/node_modules/gojs/release
# 打镜像包并推送镜像仓库
docker build -t development.docker.19ego.cn:5000/intelligentcall/ic_web:$RELEASE_VERSION .
docker push development.docker.19ego.cn:5000/intelligentcall/ic_web:$RELEASE_VERSION
# 测试运行
docker rm -f ic_web
docker run -d --name ic_web \
--restart=always \
--ulimit nofile=5000:5000 \
-m 2g \
-p 8081:80 \
-v /logs/intelligentcall/ic_web:/log \
development.docker.19ego.cn:5000/intelligentcall/ic_web:$RELEASE_VERSION
# 部署后台URL
docker exec -it ic_web deploy.sh http://172.30.66.18:5051
# 验证
http://172.30.83.198:8081
```
## gojs 需要调研内容
1. 基本页面展示,上方内容拖拽、右侧面板数据同步
2. 保存时,校验单个右侧表单内容,不符合规则的红框标识
3. 保存时,不符合规则的组件红框显示,并且组件内容红框显示
4. 流程需要根据自动执行到节点的位置进行滚动
5. 流程图自动执行,所进行到的节点蓝框标识
6. 组件之间连线类型:曲线
7. 撤销操作,仅撤销 1)添加或者删除连线 2)添加或者删除组件 3)拖动组件
8. 组件被选中,蓝色显示
9. 开始组件不能删除
10. gojs 去水印方式 https://www.jianshu.com/p/f490ea4a929f
## git message type 说明
### 主要 type
- `feat`增加新功能(feature)
- `fix`修补 bug
### 特殊 type
- `docs`文档上的更改(documentation)
- `style`格式变动(不影响代码运行)
- `refactor`代码重构
- `test`增加测试
- `perf`性能提升
- `chore`构建过程或辅助工具的变动
### 当一次改动包括主要 type 与特殊 type 时,统一采用主要 type。
## 项目权限模块简介
系统内所有模块包括模块下的具体操作,均存在对应的功能权限。权限分为三级,第一级为
- 模块权限,如“账户管理”;第二级为菜单权限,如“用户管理”;第三级为具体操作权限,如“编辑”。以“账户管理-用户管理-编辑”为例,形式如下:
```
"/account/user/modify"
```
- 在开发新的功能时,需要维护“/src/schema/PermissionType.ts”,常用操作命名如“编辑”重复性较高,为了统一的风格,规定常用操作规范如下:
```
新建-create
编辑-modify
详情-detail
删除-delete
```
- 权限模块通过`checkPermission`函数判断一个“模块/菜单/操作”是否被授权
## 项目目录简介 - updated: 2020 年 10 月 15 日
```bash
./src
├── App.scss # 全局样式
├── App.test.tsx
├── App.tsx # 应用入口文件
├── assets # 静态文件-图片
│ ├── close.svg
│ ├── link.svg
│ ├── revert.svg
│ └── save.svg
├── components # 公共业务组件
│ ├── AddWordModel
│ │ ├── index.tsx
│ │ └── style.scss
│ ├── BasicResource
│ │ ├── Interfaces
│ │ │ ├── index.tsx
│ │ │ └── style.scss
│ │ ├── Variables
│ │ │ ├── index.tsx
│ │ │ └── style.scss
│ │ ├── index.tsx
│ │ └── style.scss
│ ├── BasicWordLibrary
│ │ ├── AtomicWord
│ │ │ ├── index.tsx
│ │ │ └── style.scss
│ │ ├── ParentWord
│ │ │ ├── index.tsx
│ │ │ └── style.scss
│ │ ├── SynonymWord
│ │ │ ├── index.tsx
│ │ │ └── style.scss
│ │ ├── index.tsx
│ │ └── style.scss
│ ├── FlowComponent
│ │ ├── ConditionComponent.tsx
│ │ ├── Diagram.css
│ │ ├── DiagramWrapper.tsx
│ │ ├── DiagramWrapperDebug.tsx
│ │ ├── EndComponent.tsx
│ │ ├── GuidedDraggingTool.ts
│ │ ├── InfoCollectionComponent.tsx
│ │ ├── Inspector.css
│ │ ├── InspectorRow.tsx
│ │ ├── IntentComponent.scss
│ │ ├── IntentComponent.tsx
│ │ ├── InterfaceComponent.tsx
│ │ ├── KeyComponent.tsx
│ │ ├── Palette.css
│ │ ├── PaletteWrapper.tsx
│ │ ├── SelectionInspector.tsx
│ │ └── TransferManualServiceComponent.tsx
│ ├── FlowDebug
│ │ └── index.tsx
│ ├── FlowManage
│ │ ├── index.tsx
│ │ └── style.scss
│ ├── IntentionLibrary
│ │ ├── index.tsx
│ │ └── style.scss
│ ├── ModifyWordModel
│ │ ├── index.tsx
│ │ └── style.scss
│ ├── OperateInterface
│ │ └── index.tsx
│ ├── QALibrary
│ │ ├── index.tsx
│ │ └── style.scss
│ └── UILibrary # 项目中需要而现有的ant-design不支持的通用UI组件的集合
│ ├── pageSelect.tsx
│ └── style.scss
├── constants # redux的types
│ └── index.ts
├── index.tsx
├── layouts # 页面布局文件
│ ├── BasicLayout.scss
│ └── BasicLayout.tsx
├── pages # 页面文件
│ ├── Account
│ │ ├── Corporate
│ │ ├── OperationPermission
│ │ ├── Organization
│ │ ├── Role
│ │ └── User
│ ├── Center
│ │ └── Center.tsx
│ ├── Client
│ │ ├── NumProp
│ │ └── NumGroup
│ ├── NoFoundPage.tsx
│ ├── System
│ │ ├── MainNum
│ │ ├── ResourcePool
│ │ ├── Strategy
│ │ ├── TTS
│ │ └── VoiceRecognition
│ ├── Task
│ │ └── CallTask
│ └── ai
│ └── robots
│ ├── robots.scss
│ ├── robots.tsx
│ └── version
│ ├── flow
│ │ ├── actions
│ │ │ ├── index.tsx
│ │ │ └── style.scss
│ │ ├── flow.scss
│ │ ├── flow.tsx
│ │ └── operateQa
│ │ ├── index.scss
│ │ └── index.tsx
│ ├── version.scss
│ └── version.tsx
├── permission # 项目权限管理
│ └── index.ts
├── react-app-env.d.ts
├── routes # 路由配置文件
│ └── index.ts
├── schema # TS声明接口文件-大部分是请求接口的入参/出参
│ ├── BasicResource.ts
│ ├── BasicWord.ts
│ ├── Flow.ts
│ ├── IntentionLibrary.ts
│ ├── PermissionTypes.ts
│ ├── QuestionAnswer.ts
│ ├── Result.ts
│ ├── RobotVersion.ts
│ ├── Robots.ts
│ ├── WebInterface.ts
│ └── WordModel.ts
├── servers # axios请求方法封装 + 接口请求方法
│ ├── baseUrl.ts
│ ├── http.ts # axios二次封装
│ └── servers.ts # 所有接口请求方法
├── serviceWorker.ts
├── setupTests.ts
├── store # redux
│ ├── actions
│ │ ├── tokenActions.ts
│ │ └── userActions.ts
│ ├── index.ts
│ └── reducers
│ ├── tokenReducer.ts
│ └── userReducer.ts
└── utils # 工具函数
├── getSiderBarMenu.js
├── index.ts
└── sleep.ts
35 directories, 92 files
```
## 版本管理说明:
比如:当前版本是 3.9.1
1.准备提测(前端只需要成功部署到开发环境),部署完毕,等待提测通知。 2.提测成功会有群消息通知,即时对提测版本打 tag(如 3.9.1),跟提测版本对应的 version 相同 3.进入下一期开发或 bug 修复前,先拉最新代码,并修改 version(如 3.9.2)
注意事项:
1.tag 请附带描述信息 2.上线后 tag,不允许删除修改
3.version 不能重复,否则无法提测(原因:后端是根据 package 中 version(如 3.9.1)作为提测版本)
## 前端提测版本记录:
...
4.0.0 前端重构优化引入 lazy 懒加载页面(配合后端 springboot 升级改造 api-path)
3.9.23 解决-监听过程中转人工异常问题和人工介入挂断消息消失问题
3.9.14 意图库列表-列宽调整,单个新词学习逻辑优化
3.9.13 【正在接入,请稍候】文字和图标变更,新词学习优化
3.9.12 机器人导入导出类型修改,上传文件类型限制
3.9.11 弹屏和示闲接口拆分,修复 bug 及导入计时器优化
3.9.10 机器人、意图、问题库导入改版
3.9.9 机器人语句去重;列表删除操作优化
3.9.8 api-接口域名和 socket-配置调整
3.9.7 AIREQ-85:电信智能外呼九期需求
...
## 其他注意事项
- master 主分支
- sound_record 山东项目
- dianxin_16 电信项目最新迭代分支
- exam_201 山东考试系统
- ic_web_tc 通创项目(基于电信项目 4.0.0 开发)
## 前端更新记录:
- 5.0.3 替换加密方式国产 SM4 加密
- 5.0.6 登陆时,账号密码验证码输入验证成功,再显示输入手机号获取验证码弹窗,确认登录。
- 5.0.7 vpn 心跳监听异常,退出系统
- 5.0.16 流程管理-节点配置弹窗-关闭失去焦点-自动保存问题修复
- 5.0.17 刷新列表查询会话历史记录(刷新加载全部历史聊天,修复不全聊天记录)
- 5.0.20 24-08-23 新增机器人启动/停用大模型按钮,接口对接
- 5.0.21 24-08-28 新增机器人启动/停用大模型按钮,接口对接,状态调整