Skip to content

Commit

Permalink
feat: 2.1
Browse files Browse the repository at this point in the history
* feat: 优化物模型单个拷贝、新增编辑逻辑

* fix: 修改bug

* fix: 应用管理赋权接口报错

* fix: 修改登录后跳转方式

* fix: 修改物模型的其他配置按照类型配置

* feat: 登录密码加密

* fix: 应用管理赋权接口报错

* feat: 优化物模型-标签去掉详情

* fix: 修改bug

* fix: 修改bug

* fix: 修复权限导入无法编辑问题

* fix: 修复物模型-功能无法编辑问题

* fix: 修复物模型-功能详情

* fix: 修改ui

* fix: 修改bug

* fix: 修复物模型-编辑表格

* fix: 优化物模型-编辑表格-时间、枚举

* fix: 修改bug

* fix: 优化物模型必填校验

* fix: 修改bug

* fix: 修改bug

* fix: 物模型映射搜索

* fix: 优化物模型-详情

* fix: 优化物模型-规则

* fix: 修改bug

* fix: 优化物模型-功能定义

* fix: 修改bug

* fix: 修改bug

* fix: 优化物模型-功能定义(输入、输出)

* fix: 优化物模型-功能定义(输入、输出)

* fix: 修改bug

* fix: 优化物模型-功能定义-输入

* fix: 优化物模型-事件定义

* fix: 修改bug

* fix: 优化物模型-功能定义-输出

* fix: 修改bug

* fix: 修改bug

* fix: 修改bug

* fix: 优化物模型-功能定义-输出

* fix: 优化物模型-功能定义-(输入、输出)

* fix: 修改bug

* fix: 优化物模型-编辑表格标识校验

* fix: 优化物模型-标签定义

* fix: 优化设备物模型

* fix: 修改bug

* fix: allow-scripts

* fix: 优化设备物模型

* fix: 修改bug

* fix: 修改bug

* fix: 修改message

* fix: bug#16085、16024、15967、15924、16072、16070、16067

* fix: 修改bug

* fix: 优化产品物模型编辑状态

* fix: bug#15155

* fix: bug#15531

* fix: bug#16173、16172、16138、15092

* fix: 修改bug

* fix: 去掉cancelSelect

* fix: bug#16110

* fix: 10080

* fix: bug#10080

* fix: 修改bug

* fix: bug#11210

* fix: bug#15718

* fix: 撤销bug#11210修改

* feat: 更新README

* feat: 更改顶部以及侧边菜单配置到store\system.ts

* feat: 新增README 更改配置 内容

* feat: 新增README 新增/编辑菜单

* feat: 新增README 去掉导航栏右上角jetlinks文档

* fix: 修复边缘端映射bug

* fix: 修改登录后跳转方式

* fix: 修改物模型的其他配置按照类型配置

* feat: 登录密码加密

* fix: 应用管理赋权接口报错

* fix: 修复边缘端映射bug

* fix: 修改bug

* fix: bug#16191、16070、16087、15717、15420

* fix: bug#10551

* fix: bug#16097

* fix: 修改bug

* fix: bug#16195

* fix: bug#10750

* fix: bug#11076

* fix: 边缘网关绑定子设备

* fix: bug#11093

* fix: bug#15420、16072、16195、16208、16218、16220、16222

* fix: bug#16077

* fix: bug#16212、16217、16223

* fix: 修改dueros

* fix: bug#16092

* fix: bug#16233

* fix: bug#15649

* fix: bug#15933

* fix: 优化物模型属性-指标值

* fix: bug#15649、16087、16231、16254

* fix: 优化设备物模型属性保存

* fix: 修改bug

* fix: 删除多余showSizeChanger

* fix: 修改bug

* fix: 修改bug

* fix: 修改bug

* fix: bug#16210

* fix: bug#16267

* fix: 修改bug

* fix: bug#16277、16265

* fix: 修复物模型无法新增

* fix: 修改bug

* fix: bug#16275、16087

* fix: 角色管理编辑时新增用户表格增加筛选条件,过滤超级管理员

* fix: bug#16232

* fix: bug#16280

* fix: bug#16312

* fix: 优化视频回放进度无法显示

* fix: bug#16315

* fix: 修改bug

* fix: bug#15871、#16254、#16317

* fix: 优化物模型保存多次提交

* fix: bug#16329、16310、16287、16234、16135

* fix: bug#16316、#16314

* fix: bug#16263

* fix: 根据协议列表展示数据采集菜单

* fix: bug#16333

* fix: bug#16279

* fix: 协议列表提出公共变量

* fix: bug#16337、16338

* fix: bug#16325

* fix: bug

* fix: 修改bug

* fix: bug#16301

* fix: bug#16301

* fix: 修改调试

* fix: bug#16364

* fix: bug#16329

* fix: 修改bug

* fix: 修复物模型属性-规则窗口回显

* fix: 修改bug

* fix: bug#16356

* fix: bug#16279

* fix: 数据采集

* fix: bug#16356

* fix: bug#16365

* fix: bug#16365

* fix: bug#16362

* fix: bug#16358、16366、16374、16375、16379、16385

* fix: 修改bug

* fix: bug#16382

* fix: bug#16386

* fix: bug#16373

* fix: 修复bug

* fix: bug#16322

* fix: 修改bug

* fix: 修改bug

* fix: bug#16355、16323、16349

* fix: 优化物模型重置

* fix: bug#10823

* fix: bug#16404

* fix: 修改bug

* fix: 修改bug

* fix: 修改bug

* fix: bug#16395

* fix: bug#16326

* fix: bug#16382、16381、16384

* fix: 修改bug

* fix: bug#16351

* fix: 修改bug

* fix: 修改bug

* fix: bug#16417

* fix: bug#16423

* fix: bug#16325

* fix: 修改bug

* fix: 修改bug

* fix: bug#16114

* fix: 修复bug

* fix: 修改bug

* fix: bug#16114

* fix: bug#16430

* fix: bug#15968

* fix: bug#16325

* fix: 修改bug

* fix: 修改bug

* fix: bug#16179

* fix: bug#16434

* fix: 修改bug

* feat: 新增异步新建script标签

* fix: bug#16434

* fix: bug#16436

* fix: 修改bug

* fix: 微信登录

* fix: bug#16436

* fix: bug#16441

* fix: 修复TSL不展示虚拟属性

* fix: 修改bug

* fix: bug#16436

* fix: bug#16436

* fix: 修改微信

* fix: 修复登录页动态显示可视化
  • Loading branch information
XieYongHong authored Jul 17, 2023
1 parent f7a29fc commit 4561e03
Show file tree
Hide file tree
Showing 408 changed files with 19,903 additions and 5,785 deletions.
212 changes: 211 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,214 @@ yarn dev:force
### 备注

* 项目在开发模式下,首页加载慢属于正常现象;
* 打开F12后页面卡顿是`vuetools`引起,[https://github.com/vuejs/devtools/issues/1987](https://github.com/vuejs/devtools/issues/1987)
* 打开F12后页面卡顿是`vuetools`引起,[https://github.com/vuejs/devtools/issues/1987](https://github.com/vuejs/devtools/issues/1987)

## 更改配置

### 默认图标以及系统名称

#### 1.基础配置

首先启动项目,找到顶部菜单的 系统管理 -> 基础配置

此处可以更改系统名称、主题色、系统logo、浏览器页签等

#### 2.默认配置

在代码根目录找到`config\config.ts`文件

> 默认图标以及系统名称优先使用基础配置的数据!
```javascript
export default {
...
logo: '/favicon.ico', // 浏览器标签页logo(不要修改,如需修改默认图标请在根目录public\favicon.ico替换此文件)
title: 'Jetlinks', // 浏览器标签页title(刷新状态时浏览器标签页名称)
layout: {
title: '物联网平台', // 平台title(默认配置不生效,优先使用基础配置的数据)
logo: '/logo.png', // 平台logo(不要修改,如需修改默认logo请在根目录public\logo.png替换此文件)
...
}
}
```

### 去掉或修改备案信息

#### 修改备案信息

`src\views\user\Login\index.vue`文件

在第16行左右,修改以下代码`备案: xxx(自己的备案信息)`
```javascript
<a
href="https://beian.miit.gov.cn/#/Integrated/index"
target="_blank"
rel="noopener noreferrer"
class="records"
>
备案: xxx(自己的备案信息)
</a>
```

### 去掉导航栏右上角jetlinks文档

`src\components\Layout\BasicLayoutPage.vue`文件
在第23行左右,注释以下代码

```javascript
<!-- <AIcon type="QuestionCircleOutlined" @click="toDoc" /> -->
```

### 新增菜单

新增或者修改菜单有两种方式,第一个是代码内的初始化菜单,第二个系统管理的菜单管理

* 初始化菜单
初始化菜单是默认的菜单,在进行系统初始化会使用到。
> 在进行菜单初始化时,如果只在菜单管理新增或修改,但是没有在初始化菜单里新增或者修改,则只会保留初始化菜单!
* 菜单管理
菜单管理是 系统管理 -> 菜单管理 的菜单,可以动态修改,新增或者更改
> 如果需要系统初始化时不丢失,请在`src\views\init-home\data\baseMenu.ts`文件下新增或者修改初始化菜单

**新增或者修改菜单之前,确保`src\views`文件夹下有对应的文件夹以及index.vue入口文件**

#### 1.菜单管理

新建文件夹以及文件`src\views\test\Home\index.vue`

##### 新增顶部菜单 test菜单

1. 启动项目,找到顶部菜单的 系统管理 -> 菜单管理,点击菜单配置旁边的新增按钮。

2. 完成菜单图标、名称、编码、页面地址、权限配置等
> 编码是唯一的,必须和文件路径一致此处是顶级菜单编码填入: test
> 页面地址建议和文件路径保持一致: /test
3. 点击保存,刷新页面后生效

4. 按钮权限 顶级菜单没有页面可以不用添加按钮权限

##### 新增子菜单

1. 在菜单管理 test菜单 新增子菜单

2. 完成菜单图标、名称、编码、页面地址、权限配置等
> 编码是唯一的,必须和文件路径一致此处是test菜单下的二级菜单编码填入: test/Home
> 页面地址建议和文件路径保持一致: /test/Home
4. 点击保存,刷新页面后生效

5. 按钮权限 如果有权限控制可以添加对应权限


#### 2.初始化菜单

建议在菜单管理新增或修改菜单之后,再来新增或修改初始化菜单

##### 新增顶部菜单test以及子菜单

**确定有对应的文件夹以及文件`src\views\test\Home\index.vue`**

1. 启动项目,找到顶部菜单的 系统管理 -> 菜单管理
打开控制台(F12),选中网络(Network),点击菜单管理的搜索或者重置,直到有 tree 的接口请求。
点击接口请求 tree , 并选中响应或者预览选项,找到刚刚新增code为test的数据,复制test菜单的数据

2.`src\views\init-home\data\baseMenu.ts`文件中添加配置

把第一步test菜单的数据复制到对应位置即可

```javascript
export default [
// 物联网
...
// 视频中心
...
// 系统管理
...
// 物联卡
...

// test菜单
{
"id": "eb2858ec8dc6d12645a19ee0ed6aba36",
"parentId": "",
"path": "FwY9",
"sortIndex": 5,
"level": 1,
"owner": "iot",
"name": "test菜单",
"code": "test",
"describe": "",
"url": "/test",
"icon": "StepForwardOutlined",
"status": 1,
"permissions": [],
"accessSupport": {
"text": "不支持",
"value": "unsupported"
},
"indirectMenus": [],
"children": [
{
"id": "1995dcd016aaad7c5515f8ead14ca617",
"parentId": "eb2858ec8dc6d12645a19ee0ed6aba36",
"path": "FwY9-T6lF",
"sortIndex": 1,
"level": 2,
"owner": "iot",
"name": "首页",
"code": "test/Home",
"describe": "",
"url": "/test/Home",
"icon": "HeatMapOutlined",
"status": 1,
"permissions": [],
"accessSupport": {
"text": "不支持",
"value": "unsupported"
},
"indirectMenus": [],
"buttons": [
{
"id": "add",
"name": "新增",
"permissions": [
{
"permission": "role",
"actions": [
"query",
"save",
"delete"
]
}
]
}
],
"creatorId": "1199596756811550720",
"createTime": 1688032521555,
"supportDataAccess": false
}
],
"creatorId": "1199596756811550720",
"createTime": 1688032467222,
"supportDataAccess": false
}
]
```

> 新增初始化菜单之后需要进行系统初始化才能生效
##### 修改初始化菜单

同上,在菜单管理修改对应的数据,复制对应的菜单数据,然后替换掉`baseMenu.ts`对应数据即可。

> 修改初始化菜单之后需要进行菜单初始化才能生效
##### 系统初始化

在浏览器顶部修改页面路径,`/#/`后边输入`init-home`,回车进入系统初始化页面
例如: `http://localhost:5174/#/init-home`

填写好基本信息,角色初始化等,点击确定
4 changes: 2 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env bash
docker build -t registry.cn-shenzhen.aliyuncs.com/jetlinks/jetlinks-ui-vue:2.1.0-SNAPSHOT .
docker push registry.cn-shenzhen.aliyuncs.com/jetlinks/jetlinks-ui-vue:2.1.0-SNAPSHOT
docker build -t registry.cn-shenzhen.aliyuncs.com/jetlinks/jetlinks-ui-vue:2.1.0-TEST .
docker push registry.cn-shenzhen.aliyuncs.com/jetlinks/jetlinks-ui-vue:2.1.0-TEST
3 changes: 0 additions & 3 deletions config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ export default {
layout: {
title: '物联网平台', // 平台title
logo: '/logo.png', // 平台logo
siderWidth: 208, // 左侧菜单栏宽度
headerHeight: 48, // 头部高度
collapsedWidth: 48,
mode: 'inline',
theme: 'light', // 'dark' 'light'
}
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@
"event-source-polyfill": "^1.0.31",
"global": "^4.4.0",
"jetlinks-store": "^0.0.3",
"jetlinks-ui-components": "^1.0.21",
"jetlinks-ui-components": "^1.0.24",
"js-cookie": "^3.0.1",
"jsencrypt": "^3.3.2",
"less": "^4.1.3",
"less-loader": "^11.1.0",
"lodash-es": "^4.17.21",
Expand All @@ -41,6 +42,7 @@
"v-clipboard3": "^0.1.4",
"vite-plugin-monaco-editor": "^1.1.0",
"vue": "^3.2.45",
"vue-cropper": "^1.0.9",
"vue-json-viewer": "^3.0.4",
"vue-router": "^4.1.6",
"vue3-json-viewer": "^2.2.2",
Expand Down
30 changes: 27 additions & 3 deletions plugin/jetlinks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ const matchComponents: IMatcher[] = [
},

{
pattern: /^Select/,
pattern: /^Select|^SelectBoolean/,
styleDir: 'Select'
},
{
Expand Down Expand Up @@ -204,6 +204,10 @@ const matchComponents: IMatcher[] = [
pattern: /^Empty/,
styleDir: 'Empty'
},
{
pattern: /^PopconfirmModal/,
styleDir: 'PopconfirmModal'
},
{
pattern: /^Popconfirm/,
styleDir: 'Popconfirm'
Expand All @@ -215,7 +219,15 @@ const matchComponents: IMatcher[] = [
{
pattern: /^Notification/,
styleDir: 'Notification'
}
},
{
pattern: /^DataTable/,
styleDir: 'DataTable'
},
{
pattern: /^CheckButton/,
styleDir: 'CheckButton'
},
]

export interface JetlinksVueResolverOptions {
Expand Down Expand Up @@ -294,7 +306,19 @@ function getSideEffects(compName: string, options: JetlinksVueResolverOptions, _
}

const filterName = ['message', 'Notification']
const primitiveNames = ['AIcon','Affix', 'Anchor', 'AnchorLink', 'message', 'Notification', 'AutoComplete', 'AutoCompleteOptGroup', 'AutoCompleteOption', 'Alert', 'Avatar', 'AvatarGroup', 'BackTop', 'Badge', 'BadgeRibbon', 'Breadcrumb', 'BreadcrumbItem', 'BreadcrumbSeparator', 'Button', 'ButtonGroup', 'Calendar', 'Card', 'CardGrid', 'CardMeta', 'Collapse', 'CollapsePanel', 'Carousel', 'Cascader', 'Checkbox', 'CheckboxGroup', 'Col', 'Comment', 'ConfigProvider', 'DatePicker', 'MonthPicker', 'WeekPicker', 'RangePicker', 'QuarterPicker', 'Descriptions', 'DescriptionsItem', 'Divider', 'Dropdown', 'DropdownButton', 'Drawer', 'Empty', 'Form', 'FormItem', 'FormItemRest', 'Grid', 'Input', 'InputGroup', 'InputPassword', 'InputSearch', 'Textarea', 'Image', 'ImagePreviewGroup', 'InputNumber', 'Layout', 'LayoutHeader', 'LayoutSider', 'LayoutFooter', 'LayoutContent', 'List', 'ListItem', 'ListItemMeta', 'Menu', 'MenuDivider', 'MenuItem', 'MenuItemGroup', 'SubMenu', 'Mentions', 'MentionsOption', 'Modal', 'Statistic', 'StatisticCountdown', 'PageHeader', 'Pagination', 'Popconfirm', 'Popover', 'Progress', 'Radio', 'RadioButton', 'RadioGroup', 'Rate', 'Result', 'Row', 'Select', 'SelectOptGroup', 'SelectOption', 'Skeleton', 'SkeletonButton', 'SkeletonAvatar', 'SkeletonInput', 'SkeletonImage', 'Slider', 'Space', 'Spin', 'Steps', 'Step', 'Switch', 'Table', 'TableColumn', 'TableColumnGroup', 'TableSummary', 'TableSummaryRow', 'TableSummaryCell', 'Transfer', 'Tree', 'TreeNode', 'DirectoryTree', 'TreeSelect', 'TreeSelectNode', 'Tabs', 'TabPane', 'Tag', 'CheckableTag', 'TimePicker', 'TimeRangePicker', 'Timeline', 'TimelineItem', 'Tooltip', 'Typography', 'TypographyLink', 'TypographyParagraph', 'TypographyText', 'TypographyTitle', 'Upload', 'UploadDragger', 'LocaleProvider', 'ProTable', 'Search', 'AdvancedSearch', 'Ellipsis', 'MonacoEditor', 'ProLayout', 'ScrollTable', 'TableCard', 'Scrollbar', 'CardSelect', 'ColorPicker']
const primitiveNames = ['AIcon','Affix', 'Anchor', 'AnchorLink', 'message', 'Notification', 'AutoComplete', 'AutoCompleteOptGroup', 'AutoCompleteOption', 'Alert', 'Avatar', 'AvatarGroup', 'BackTop', 'Badge', 'BadgeRibbon', 'Breadcrumb', 'BreadcrumbItem', 'BreadcrumbSeparator', 'Button', 'ButtonGroup', 'Calendar', 'Card', 'CardGrid', 'CardMeta', 'Collapse', 'CollapsePanel', 'Carousel', 'Cascader', 'Checkbox', 'CheckboxGroup', 'Col', 'Comment', 'ConfigProvider', 'DatePicker', 'MonthPicker', 'WeekPicker', 'RangePicker', 'QuarterPicker', 'Descriptions', 'DescriptionsItem', 'Divider', 'Dropdown', 'DropdownButton', 'Drawer', 'Empty', 'Form', 'FormItem', 'FormItemRest', 'Grid', 'Input', 'InputGroup', 'InputPassword', 'InputSearch', 'Textarea', 'Image', 'ImagePreviewGroup', 'InputNumber', 'Layout', 'LayoutHeader', 'LayoutSider', 'LayoutFooter', 'LayoutContent', 'List', 'ListItem', 'ListItemMeta', 'Menu', 'MenuDivider', 'MenuItem', 'MenuItemGroup', 'SubMenu', 'Mentions', 'MentionsOption', 'Modal', 'Statistic', 'StatisticCountdown', 'PageHeader', 'Pagination', 'Popconfirm', 'Popover', 'Progress', 'Radio', 'RadioButton', 'RadioGroup', 'Rate', 'Result', 'Row', 'Select', 'SelectOptGroup', 'SelectOption', 'SelectBoolean', 'Skeleton', 'SkeletonButton', 'SkeletonAvatar', 'SkeletonInput', 'SkeletonImage', 'Slider', 'Space', 'Spin', 'Steps', 'Step', 'Switch', 'Table', 'TableColumn', 'TableColumnGroup', 'TableSummary', 'TableSummaryRow', 'TableSummaryCell', 'Transfer', 'Tree', 'TreeNode', 'DirectoryTree', 'TreeSelect', 'TreeSelectNode', 'Tabs', 'TabPane', 'Tag', 'CheckableTag', 'TimePicker', 'TimeRangePicker', 'Timeline', 'TimelineItem', 'Tooltip', 'Typography', 'TypographyLink', 'TypographyParagraph', 'TypographyText', 'TypographyTitle', 'Upload', 'UploadDragger', 'LocaleProvider', 'ProTable', 'Search', 'AdvancedSearch', 'Ellipsis', 'MonacoEditor', 'ProLayout', 'ScrollTable', 'TableCard', 'Scrollbar', 'CardSelect', 'ColorPicker', 'PopconfirmModal', 'DataTable',
'DataTableArray',
'DataTableString',
'DataTableInteger',
'DataTableDouble',
'DataTableBoolean',
'DataTableEnum',
'DataTableFile',
'DataTableDate',
'DataTableTypeSelect',
'DataTableObject',
'CheckButton',
]
const prefix = 'J'

let jetlinksNames: Set<string>
Expand Down
Binary file modified public/images/apply/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/apply/4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/apply/6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/apply/dingtalk-ent-app.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/apply/internal-integrated.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/apply/internal-standalone.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/images/apply/provider1.png
Binary file not shown.
Binary file removed public/images/apply/provider2.png
Binary file not shown.
Binary file removed public/images/apply/provider3.png
Binary file not shown.
Binary file removed public/images/apply/provider4.png
Binary file not shown.
Binary file removed public/images/apply/provider5.png
Binary file not shown.
Binary file added public/images/apply/third-party.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/apply/wechat-miniapp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/apply/wechat-webapp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/bind/Vector.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/device/matadataMap.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/home/home-view/comprehensive.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/home/home-view/device-active.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/home/home-view/device.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/home/home-view/ops-active.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/home/home-view/ops.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/notice-rule/dingtalk.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/notice-rule/email.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/notice-rule/inside-mail.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/notice-rule/sms.png
Binary file added public/images/notice-rule/voice.png
Binary file added public/images/notice-rule/wechat.png
Binary file added public/images/notice/inside-mail.png
5 changes: 5 additions & 0 deletions src/api/account/center.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,8 @@ export const checkOldPassword_api = (password:string) => server.post(`/user/me/p
'Content-Type': 'text/plain'
}
});

// 我的订阅
// 查询当前用户可访问的通道配置
export const getAllNotice = () => server.get(`/notify/channel/all`);

35 changes: 20 additions & 15 deletions src/api/account/notificationRecord.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,29 @@
import server from '@/utils/request'

// 获取记录列表
export const getList_api = (data: object): any => server.post(`/notifications/_query`, data)
export const getList_api = (data: any): any => server.post(`/notifications/_query`, data)
// 获取未读记录列表
export const getListByUnRead_api = (data: object): any => server.post(`/notifications/_query`, data)
// export const getListByUnRead_api = (data: any): any => server.post(`/notifications/_query`, data)
// 修改记录状态
export const changeStatus_api = (type: '_read' | '_unread', data: string[]): any => server.post(`/notifications/${type}`, data)

export const changeAllStatus = (type: '_read' | '_unread', data: string[]): any => server.post(`/notifications/${type}/provider`, data)

const encodeParams = (params: Record<string, any>) => {
let result = {}
for (const key in params) {
if (Object.prototype.hasOwnProperty.call(params, key)) {
const value = params[key];
if (key === 'terms') {
result['terms[0].column:'] = 0
result['terms[0].value'] = JSON.stringify(value[0])
} else result[key] = value
}
}

return result
};
// 查询告警记录详情
export const getDetail = (id: string): any => server.get(`/alarm/record/${id}`)

// const encodeParams = (params: Record<string, any>) => {
// let result = {}
// for (const key in params) {
// if (Object.prototype.hasOwnProperty.call(params, key)) {
// const value = params[key];
// if (key === 'terms') {
// result['terms[0].column:'] = 0
// result['terms[0].value'] = JSON.stringify(value[0])
// } else result[key] = value
// }
// }

// return result
// };
19 changes: 19 additions & 0 deletions src/api/account/notificationSubscription.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,22 @@ export const getAlarmList_api = () => server.post(`/alarm/config/_query/no-pagin
sorts: [{ name: 'createTime', order: 'desc' }],
paging: false,
});

// 判断获取当前用户绑定信
export const getIsBindThird = () => server.get(`/user/third-party/me`);

// 生成OAuth2授权URL
export const getWechatOAuth2 = (configId: string, templateId: string, url: string) => server.get(`/notifier/wechat/corp/${configId}/${templateId}/oauth2/binding-user-url?redirectUri=${url}`);

export const getDingTalkOAuth2 = (configId: string, url: string) => server.get(`/notifier/dingtalk/corp/${configId}/oauth2/binding-user-url?authCode=${url}`);

// 获取oauth2授权的用户绑定码

export const getUserBind = (type: 'wechat' | 'dingtalk', params: any) => server.get(`/notifier/${type}/corp/oauth2/user-bind-code`, params);

// 根据绑定码绑定当前用户
export const bindThirdParty = (type: string, provider: string, bindCode: string) => server.post(`/user/third-party/me/${type}/${provider}/${bindCode}/_bind`);




4 changes: 3 additions & 1 deletion src/api/comm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,6 @@ export const systemVersion = () => server.get<{edition?: string}>('/system/versi
* @param data
* @returns
*/
export const queryDashboard = (data: Record<string, any>) => server.post(`/dashboard/_multi`, data)
export const queryDashboard = (data: Record<string, any>) => server.post(`/dashboard/_multi`, data)

export const fileUpload = (data: any) => server.post('/file/static', data)
Loading

0 comments on commit 4561e03

Please sign in to comment.