基本信息
- 目录:默认添加在顶级
-
菜单:
-
按钮:
+ 目录:一级菜单,默认添加在顶级
+
+ 菜单:二级菜单
+
+ 按钮:菜单中对应到接口的功能
>
}
rules={[{ required: true, message: '请选择菜单类型' }]}
>
- this.onTypeChange(e)}>
- {
- this.state.codes.menuType.map(item => {
- return (
- {item.value}
- )
- })
- }
+ this.onTypeChange(e)}>
+ {codes.menuType.map(item => {
+ return (
+
+ {item.value}
+
+ )
+ })}
-
+
-
-
扩展信息
- {
- this.state.type == 1 &&
+ {type == 1 && (
- this.onOpenTypeChange(e)}>
- {
- this.state.codes.openType.map(item => {
- return (
- {item.value}
- )
- })
- }
+ this.onOpenTypeChange(e)}>
+ {codes.openType.map(item => {
+ return (
+
+ {item.value}
+
+ )
+ })}
- }
- {
- this.state.type == 1 && this.state.openType == 1 &&
-
+ )}
+ {type == 1 && openType == 1 && (
+
- }
- {
- this.state.type == 1 && this.state.openType == 2 &&
-
+ )}
+ {type == 1 && openType == 2 && (
+
- }
- {
- this.state.type == 1 && this.state.openType == 3 &&
-
+ )}
+ {type == 1 && openType == 3 && (
+
- }
- {
- this.state.type == 2 &&
-
+ )}
+ {type == 2 && (
+
- }
- {
- this.state.type == 2 &&
-
+ )}
+ {type == 2 && (
+
- }
+ )}
- {
- this.state.type != 2 &&
+ {type != 2 && (
- }
+ addonBefore={icon && }
addonAfter={
- this
- .iconSelector
- .current
- .open(this.form.current.getFieldValue('icon'))
+ this.iconSelector.current.open(
+ this.form.current.getFieldValue('icon')
+ )
}
/>
}
/>
- }
+ )}
- this.onSelectIcon(icon)} />
+ this.onSelectIcon(icon)} />
)
}
diff --git a/web-react/src/pages/system/menu/index.jsx b/web-react/src/pages/system/menu/index.jsx
index c4f44d8..a7566f3 100644
--- a/web-react/src/pages/system/menu/index.jsx
+++ b/web-react/src/pages/system/menu/index.jsx
@@ -1,5 +1,5 @@
import React, { Component } from 'react'
-import { Button, Table, Card, Form, Input, Popconfirm, message as Message, Tag } from 'antd'
+import { Button, Table, Card, Popconfirm, message as Message, Row, Col, Tooltip, Tag } from 'antd'
import { isEqual } from 'lodash'
import { AntIcon, Auth, Container, ModalForm, QueryTable, QueryTableActions } from 'components'
import { api } from 'common/api'
@@ -24,6 +24,7 @@ export default class index extends Component {
codes: {
menuType: [],
menuWeight: [],
+ openType: [],
},
}
@@ -55,16 +56,36 @@ export default class index extends Component {
render: text => text && ,
},
{
- title: '前端组件',
+ title: '连接',
width: 220,
- dataIndex: 'component',
- ellipsis: true,
- },
- {
- title: '权限标识',
- width: 220,
- dataIndex: 'permission',
- ellipsis: true,
+ dataIndex: 'openType',
+ render: (text, record) => {
+ switch (text) {
+ case 1:
+ return (
+ <>
+ {this.bindCodeValue(text, 'open_type')}{' '}
+ {record.component}
+ >
+ )
+ case 2:
+ return (
+ <>
+ {this.bindCodeValue(text, 'open_type')}{' '}
+ {record.link}
+ >
+ )
+ case 3:
+ return (
+ <>
+ {this.bindCodeValue(text, 'open_type')}{' '}
+ {record.redirect}
+ >
+ )
+ default:
+ return ''
+ }
+ },
},
{
title: '排序',
@@ -85,19 +106,14 @@ export default class index extends Component {
if (flag) {
this.columns.push({
title: '操作',
- width: 150,
+ width: 220,
dataIndex: 'actions',
render: (text, record) => (
- {record.type < 2 && (
-
- this.onOpen(this.addForm, record, true)}>
- 新增子菜单
-
-
- )}
- this.onOpen(this.editForm, record)}>编辑
+ this.onOpen({ modal: this.editForm, record })}>
+ 编辑
+
删除
+ {record.type < 2 && (
+
+
+ this.onOpen({
+ modal: this.addForm,
+ record,
+ isParent: true,
+ addType: record.type == 0 ? [1] : [2],
+ })
+ }
+ >
+ {record.type == 0 ? '新增子菜单' : '新增功能'}
+
+
+ )}
),
})
@@ -132,7 +164,7 @@ export default class index extends Component {
*/
componentDidMount() {
this.table.current.onLoading()
- getDictData('menu_type', 'menu_weight').then(res => {
+ getDictData('menu_type', 'menu_weight', 'open_type').then(res => {
this.setState(
{
codes: res,
@@ -156,27 +188,8 @@ export default class index extends Component {
...params,
...query,
})
- return this.onfilterdata(data)
- //return data
- }
-
- onfilterdata(data) {
- this.findlastChildren(data)
return data
}
- findlastChildren(data) {
- data.forEach(s => {
- if (s.children && s.children.length > 0) {
- s.rowExpandable = true
- s.children.forEach(p => {
- if (p.children && p.children.length === 0) {
- p.rowExpandable = false
- }
- })
- this.findlastChildren(s.children)
- }
- })
- }
/**
* 绑定字典数据
@@ -188,7 +201,7 @@ export default class index extends Component {
name = toCamelCase(name)
const codes = this.state.codes[name]
if (codes) {
- const c = codes.find(p => p.code === code)
+ const c = codes.find(p => p.code == code)
if (c) {
return c.value
}
@@ -201,15 +214,17 @@ export default class index extends Component {
* @param {*} modal
* @param {*} record
*/
- onOpen(modal, record, isParent = false) {
+ onOpen({ modal, record, isParent = false, addType = [] }) {
const params = isParent
? {
parent: record,
isParent,
+ addType,
}
: {
record,
isParent,
+ addType,
}
modal.current.open(params)
@@ -240,64 +255,106 @@ export default class index extends Component {
this.onAction(apiAction.delete(record), '删除成功')
}
+ //#region 自定义方法
/**
* 绘制新的扩展行
* @param {*} record
*/
onRowRender(record) {
- var arr = []
- var istag = false
- record.children.map(s => {
- if (!s.rowExpandable && s.type == 2) {
- istag = true
- var temp = (
-
- {s.name} |{' '}
-
- this.onOpen(this.editForm, s)}>编辑
- {' '}
- |{' '}
-
- this.onDelete(s)}
- >
- 删除
-
-
-
+ const grids = []
+ let isFunction = false
+ record.children.map(item => {
+ if (!(item.children && item.children.length) && item.type == 2) {
+ isFunction = true
+ const grid = (
+
+
+ {item.visibleParent && (
+
+
+
+ )}
+ {item.name}
+
+ {item.permission}
+
+
)
- arr.push(temp)
- } else if (s.rowExpandable || (!s.rowExpandable && s.type == 1)) {
- arr.push(s)
+ grids.push(grid)
+ } else if (
+ (item.children && item.children.length) ||
+ (!(item.children && item.children.length) && item.type == 1)
+ ) {
+ grids.push(item)
}
})
- if (istag) {
- return arr
+ if (isFunction) {
+ grids.push(
+
+ this.onOpen({ modal: this.addForm, record, isParent: true, addType: [2] })
+ }
+ >
+
+ 新增功能
+
+ )
+ return {grids}
} else {
return (
record.id}
expandable={{
expandedRowRender: record => this.onRowRender(record),
- rowExpandable: record => record.rowExpandable === true,
+ rowExpandable: record => record.children && record.children.length,
}}
- childrenColumnName="11"
+ childrenColumnName="none"
bordered={true}
pagination={false}
/>
)
}
}
-
- //#region 自定义方法
- async onSetDefault(record) {
- this.onAction(apiAction.setDefault(record), '设置成功')
- }
//#endregion
render() {
@@ -306,23 +363,25 @@ export default class index extends Component {
this.onRowRender(record),
- rowExpandable: record => record.rowExpandable === true,
+ rowExpandable: record => record.children && record.children.length,
}}
operator={
}
- onClick={() => this.onOpen(this.addForm)}
+ onClick={() =>
+ this.onOpen({ modal: this.addForm, addType: [0, 1] })
+ }
>
- 新增{name}
+ 新增目录/菜单
}
diff --git a/web-react/src/pages/system/org/index.jsx b/web-react/src/pages/system/org/index.jsx
index ad00a84..431e063 100644
--- a/web-react/src/pages/system/org/index.jsx
+++ b/web-react/src/pages/system/org/index.jsx
@@ -1,6 +1,14 @@
import React, { Component } from 'react'
import { Button, Card, Form, Input, message as Message, Popconfirm } from 'antd'
-import { AntIcon, Auth, Container, ModalForm, QueryTable, QueryTableActions, QueryTreeLayout } from 'components'
+import {
+ AntIcon,
+ Auth,
+ Container,
+ ModalForm,
+ QueryTable,
+ QueryTableActions,
+ QueryTreeLayout,
+} from 'components'
import { api } from 'common/api'
import auth from 'components/authorized/handler'
import { toCamelCase } from 'util/format'
@@ -13,17 +21,16 @@ const apiAction = {
page: api.getOrgPage,
add: api.sysOrgAdd,
edit: api.sysOrgEdit,
- delete: api.sysOrgDelete
+ delete: api.sysOrgDelete,
}
const name = '机构'
export default class index extends Component {
-
state = {
codes: {
- orgType: []
- }
+ orgType: [],
+ },
}
// 树框架实例
@@ -44,13 +51,13 @@ export default class index extends Component {
columns = [
{
title: '机构名称',
- width: '400px',
+ width: 400,
dataIndex: 'name',
sorter: true,
},
{
title: '唯一编码',
- width: '200px',
+ width: 200,
dataIndex: 'code',
sorter: true,
},
@@ -58,24 +65,26 @@ export default class index extends Component {
title: '机构类型',
dataIndex: 'type',
sorter: true,
- render: text => (<>{this.bindCodeValue(text, 'org_type')}>)
+ render: text => <>{this.bindCodeValue(text, 'org_type')}>,
},
{
title: '排序',
- width: '80px',
+ width: 80,
dataIndex: 'sort',
sorter: true,
+ defaultSortOrder: 'ascend',
},
{
title: '备注',
dataIndex: 'remark',
+ width: 400,
sorter: true,
},
]
/**
* 构造函数,在渲染前动态添加操作字段等
- * @param {*} props
+ * @param {*} props
*/
constructor(props) {
super(props)
@@ -87,20 +96,22 @@ export default class index extends Component {
title: '操作',
width: 150,
dataIndex: 'actions',
- render: (text, record) => (
-
- this.onOpen(this.editForm, record)}>编辑
-
-
- this.onDelete(record)}
- >
- 删除
-
-
- )
+ render: (text, record) => (
+
+
+ this.onOpen(this.editForm, record)}>编辑
+
+
+ this.onDelete(record)}
+ >
+ 删除
+
+
+
+ ),
})
}
}
@@ -109,9 +120,9 @@ export default class index extends Component {
* 阻止外部组件引发的渲染,提升性能
* 可自行添加渲染条件
* [必要]
- * @param {*} props
- * @param {*} state
- * @returns
+ * @param {*} props
+ * @param {*} state
+ * @returns
*/
shouldComponentUpdate(props, state) {
return !isEqual(this.state, state)
@@ -124,26 +135,28 @@ export default class index extends Component {
componentDidMount() {
this.table.current.onLoading()
getDictData('org_type').then(res => {
- this.setState({
- codes: res
- }, () => {
- this.table.current.onLoadData()
- })
+ this.setState(
+ {
+ codes: res,
+ },
+ () => {
+ this.table.current.onLoadData()
+ }
+ )
})
}
/**
* 调用加载数据接口,可在调用前对query进行处理
* [异步,必要]
- * @param {*} params
- * @param {*} query
- * @returns
+ * @param {*} params
+ * @param {*} query
+ * @returns
*/
loadData = async (params, query) => {
-
query = {
...query,
- pid: this.selectId
+ pid: this.selectId,
}
const { data } = await apiAction.page({
@@ -166,7 +179,7 @@ export default class index extends Component {
/**
* 树节点选中事件
* [必要]
- * @param {*} id
+ * @param {*} id
*/
onSelectTree(id) {
this.selectId = id
@@ -175,15 +188,15 @@ export default class index extends Component {
/**
* 绑定字典数据
- * @param {*} code
- * @param {*} name
- * @returns
+ * @param {*} code
+ * @param {*} name
+ * @returns
*/
bindCodeValue(code, name) {
name = toCamelCase(name)
const codes = this.state.codes[name]
if (codes) {
- const c = codes.find((p) => p.code === code)
+ const c = codes.find(p => p.code == code)
if (c) {
return c.value
}
@@ -193,21 +206,21 @@ export default class index extends Component {
/**
* 打开新增/编辑弹窗
- * @param {*} modal
- * @param {*} record
+ * @param {*} modal
+ * @param {*} record
*/
onOpen(modal, record) {
modal.current.open({
orgId: this.selectId,
- record
+ record,
})
}
/**
* 对表格上的操作进行统一处理
* [异步]
- * @param {*} action
- * @param {*} successMessage
+ * @param {*} action
+ * @param {*} successMessage
*/
async onAction(action, successMessage) {
this.table.current.onLoading()
@@ -227,13 +240,10 @@ export default class index extends Component {
/**
* 删除
- * @param {*} record
+ * @param {*} record
*/
onDelete(record) {
- this.onAction(
- apiAction.delete(record),
- '删除成功'
- )
+ this.onAction(apiAction.delete(record), '删除成功')
}
//#region 自定义方法
@@ -245,7 +255,7 @@ export default class index extends Component {
ref={this.treeLayout}
loadData={this.loadTreeData}
defaultExpanded={true}
- onSelect={(key) => this.onSelectTree(key)}
+ onSelect={key => this.onSelectTree(key)}
>
@@ -265,7 +275,9 @@ export default class index extends Component {
}
onClick={() => this.onOpen(this.addForm)}
- >新增{name}
+ >
+ 新增{name}
+
}
/>
diff --git a/web-react/src/pages/system/pos/index.jsx b/web-react/src/pages/system/pos/index.jsx
index c12f74c..e59dda6 100644
--- a/web-react/src/pages/system/pos/index.jsx
+++ b/web-react/src/pages/system/pos/index.jsx
@@ -2,24 +2,22 @@ import React, { Component } from 'react'
import { Button, Card, Form, Input, Popconfirm, message as Message } from 'antd'
import { isEqual } from 'lodash'
import { AntIcon, Auth, Container, ModalForm, QueryTable, QueryTableActions } from 'components'
-import { api } from "common/api"
+import { api } from 'common/api'
import auth from 'components/authorized/handler'
import FormBody from './form'
-
// 配置页面所需接口函数
const apiAction = {
page: api.sysPosPage,
add: api.sysPosAdd,
edit: api.sysPosEdit,
- delete: api.sysPosDelete
+ delete: api.sysPosDelete,
}
// 用于弹窗标题
const name = '职位'
export default class index extends Component {
-
// 表格实例
table = React.createRef()
@@ -32,29 +30,34 @@ export default class index extends Component {
{
title: '职位名称',
dataIndex: 'name',
+ width: 400,
sorter: true,
},
{
title: '唯一编码',
dataIndex: 'code',
+ width: 400,
sorter: true,
},
{
title: '排序',
dataIndex: 'sort',
+ width: 80,
sorter: true,
+ defaultSortOrder: 'ascend',
},
{
title: '备注',
dataIndex: 'remark',
+ width: 400,
sorter: true,
},
]
/**
- * 构造函数,在渲染前动态添加操作字段等
- * @param {*} props
- */
+ * 构造函数,在渲染前动态添加操作字段等
+ * @param {*} props
+ */
constructor(props) {
super(props)
@@ -65,20 +68,22 @@ export default class index extends Component {
title: '操作',
width: 150,
dataIndex: 'actions',
- render: (text, record) => (
-
- this.onOpen(this.editForm, record)}>编辑
-
-
- this.onDelete(record)}
- >
- 删除
-
-
- )
+ render: (text, record) => (
+
+
+ this.onOpen(this.editForm, record)}>编辑
+
+
+ this.onDelete(record)}
+ >
+ 删除
+
+
+
+ ),
})
}
}
@@ -87,9 +92,9 @@ export default class index extends Component {
* 阻止外部组件引发的渲染,提升性能
* 可自行添加渲染条件
* [必要]
- * @param {*} props
- * @param {*} state
- * @returns
+ * @param {*} props
+ * @param {*} state
+ * @returns
*/
shouldComponentUpdate(props, state) {
return !isEqual(this.state, state)
@@ -98,9 +103,9 @@ export default class index extends Component {
/**
* 调用加载数据接口,可在调用前对query进行处理
* [异步,必要]
- * @param {*} params
- * @param {*} query
- * @returns
+ * @param {*} params
+ * @param {*} query
+ * @returns
*/
loadData = async (params, query) => {
const { data } = await apiAction.page({
@@ -111,21 +116,21 @@ export default class index extends Component {
}
/**
- * 打开新增/编辑弹窗
- * @param {*} modal
- * @param {*} record
- */
+ * 打开新增/编辑弹窗
+ * @param {*} modal
+ * @param {*} record
+ */
onOpen(modal, record) {
modal.current.open({
- record
+ record,
})
}
/**
* 对表格上的操作进行统一处理
* [异步]
- * @param {*} action
- * @param {*} successMessage
+ * @param {*} action
+ * @param {*} successMessage
*/
async onAction(action, successMessage) {
this.table.current.onLoading()
@@ -140,13 +145,10 @@ export default class index extends Component {
/**
* 删除
- * @param {*} record
+ * @param {*} record
*/
onDelete(record) {
- this.onAction(
- apiAction.delete(record),
- '删除成功'
- )
+ this.onAction(apiAction.delete(record), '删除成功')
}
render() {
@@ -172,11 +174,11 @@ export default class index extends Component {
}
onClick={() => this.onOpen(this.addForm)}
- >新增{name}
+ >
+ 新增{name}
+
}
- >
-
-
+ >
)
}
-}
\ No newline at end of file
+}
diff --git a/web-react/src/pages/system/role/data.jsx b/web-react/src/pages/system/role/data.jsx
index 74a094d..d6c08ec 100644
--- a/web-react/src/pages/system/role/data.jsx
+++ b/web-react/src/pages/system/role/data.jsx
@@ -10,7 +10,6 @@ const { SHOW_PARENT } = TreeSelect
const initialValues = {}
export default class data extends Component {
-
state = {
// 加载状态
loading: true,
@@ -19,7 +18,7 @@ export default class data extends Component {
arerTreeData: [],
orgCheckedKeys: [],
- isDefine: false
+ isDefine: false,
}
// 表单实例
@@ -39,10 +38,9 @@ export default class data extends Component {
* 填充数据
* 可以在设置this.record之后对其作出数据结构调整
* [异步,必要]
- * @param {*} params
+ * @param {*} params
*/
async fillData(params) {
-
this.record = cloneDeep(params.record)
//#region 从后端转换成前段所需格式
const { dataScopeType } = await getDictData('data_scope_type')
@@ -53,17 +51,17 @@ export default class data extends Component {
dataScopeType,
orgTreeData,
arerTreeData,
- orgCheckedKeys
+ orgCheckedKeys,
})
//#endregion
this.form.current.setFieldsValue({
- dataScopeType: this.record.dataScopeType.toString()
+ dataScopeType: this.record.dataScopeType.toString(),
})
this.onChange(this.record.dataScopeType)
this.setState({
- loading: false
+ loading: false,
})
}
@@ -71,7 +69,7 @@ export default class data extends Component {
* 获取数据
* 可以对postData进行数据结构调整
* [异步,必要]
- * @returns
+ * @returns
*/
async getData() {
const form = this.form.current
@@ -107,11 +105,11 @@ export default class data extends Component {
onChange(value) {
if (value == 5) {
this.setState({
- isDefine: true
+ isDefine: true,
})
} else {
this.setState({
- isDefine: false
+ isDefine: false,
})
}
}
@@ -119,29 +117,24 @@ export default class data extends Component {
render() {
return (
-
diff --git a/web-react/src/pages/system/role/index.jsx b/web-react/src/pages/system/role/index.jsx
index e9edb04..865db78 100644
--- a/web-react/src/pages/system/role/index.jsx
+++ b/web-react/src/pages/system/role/index.jsx
@@ -16,14 +16,13 @@ const apiAction = {
delete: api.sysRoleDelete,
grantMenu: api.sysRoleGrantMenu,
- grantData: api.sysRoleGrantData
+ grantData: api.sysRoleGrantData,
}
// 用于弹窗标题
const name = '角色'
export default class index extends Component {
-
// 表格实例
table = React.createRef()
@@ -39,23 +38,27 @@ export default class index extends Component {
{
title: '角色名',
dataIndex: 'name',
+ width: 400,
sorter: true,
},
{
title: '唯一编码',
dataIndex: 'code',
+ width: 400,
sorter: true,
},
{
title: '排序',
dataIndex: 'sort',
+ width: 80,
sorter: true,
- }
+ defaultSortOrder: 'ascend',
+ },
]
/**
* 构造函数,在渲染前动态添加操作字段等
- * @param {*} props
+ * @param {*} props
*/
constructor(props) {
super(props)
@@ -67,44 +70,58 @@ export default class index extends Component {
title: '操作',
width: 150,
dataIndex: 'actions',
- render: (text, record) => (
-
- this.onOpen(this.editForm, record)}>编辑
-
-
- this.onDelete(record)}
- >
- 删除
-
-
-
-
-
-
- this.onOpen(this.menuForm, record)}>授权菜单
-
-
-
-
- this.onOpen(this.dataForm, record)}>授权数据
-
-
-
- }
- >
-
- 授权
-
-
-
-
- )
+ render: (text, record) => (
+
+
+ this.onOpen(this.editForm, record)}>编辑
+
+
+ this.onDelete(record)}
+ >
+ 删除
+
+
+
+
+
+
+
+ this.onOpen(this.menuForm, record)
+ }
+ >
+ 授权菜单
+
+
+
+
+
+
+ this.onOpen(this.dataForm, record)
+ }
+ >
+ 授权数据
+
+
+
+
+ }
+ >
+
+ 授权
+
+
+
+
+
+ ),
})
}
}
@@ -113,9 +130,9 @@ export default class index extends Component {
* 阻止外部组件引发的渲染,提升性能
* 可自行添加渲染条件
* [必要]
- * @param {*} props
- * @param {*} state
- * @returns
+ * @param {*} props
+ * @param {*} state
+ * @returns
*/
shouldComponentUpdate(props, state) {
return !isEqual(this.state, state)
@@ -124,9 +141,9 @@ export default class index extends Component {
/**
* 调用加载数据接口,可在调用前对query进行处理
* [异步,必要]
- * @param {*} params
- * @param {*} query
- * @returns
+ * @param {*} params
+ * @param {*} query
+ * @returns
*/
loadData = async (params, query) => {
const { data } = await apiAction.page({
@@ -138,20 +155,20 @@ export default class index extends Component {
/**
* 打开新增/编辑弹窗
- * @param {*} modal
- * @param {*} record
+ * @param {*} modal
+ * @param {*} record
*/
onOpen(modal, record) {
modal.current.open({
- record
+ record,
})
}
/**
* 对表格上的操作进行统一处理
* [异步]
- * @param {*} action
- * @param {*} successMessage
+ * @param {*} action
+ * @param {*} successMessage
*/
async onAction(action, successMessage) {
this.table.current.onLoading()
@@ -166,13 +183,10 @@ export default class index extends Component {
/**
* 删除
- * @param {*} record
+ * @param {*} record
*/
onDelete(record) {
- this.onAction(
- apiAction.delete(record),
- '删除成功'
- )
+ this.onAction(apiAction.delete(record), '删除成功')
}
//#region 自定义方法
@@ -202,7 +216,9 @@ export default class index extends Component {
}
onClick={() => this.onOpen(this.addForm)}
- >新增{name}
+ >
+ 新增{name}
+
}
/>
diff --git a/web-react/src/pages/system/user/data.jsx b/web-react/src/pages/system/user/data.jsx
new file mode 100644
index 0000000..2e5d0b7
--- /dev/null
+++ b/web-react/src/pages/system/user/data.jsx
@@ -0,0 +1,115 @@
+import React, { Component } from 'react'
+import { Form, Spin, TreeSelect } from 'antd'
+import { AntIcon } from 'components'
+import { cloneDeep } from 'lodash'
+import { api } from 'common/api'
+
+export default class data extends Component {
+ state = {
+ // 加载状态
+ loading: true,
+
+ options: {
+ orgData: [],
+ areaData: [],
+ orgCheckedKeys: [],
+ },
+ }
+
+ // 表单实例
+ form = React.createRef()
+
+ // 初始化数据
+ id = ''
+
+ /**
+ * mount后回调
+ */
+ componentDidMount() {
+ this.props.created && this.props.created(this)
+ }
+ async fillData(params) {
+ this.id = params.id
+ //#region 从后端转换成前段所需格式
+ const orgData = await this.loadOrgData()
+ const areaData = await this.loadAreaData()
+ const orgCheckedKeys = await this.loadMemberOwn(this.id)
+ this.setState({
+ options: {
+ orgData,
+ areaData,
+ orgCheckedKeys,
+ },
+ })
+ this.form.current.setFieldsValue({
+ id: this.id,
+ grantOrgIdList: orgCheckedKeys,
+ grantAreaCodeList: [],
+ })
+
+ this.setState({
+ loading: false,
+ })
+ }
+ /**
+ * 获取数据
+ * 可以对postData进行数据结构调整
+ * [异步,必要]
+ * @returns
+ */
+ async getData() {
+ const form = this.form.current
+
+ const valid = await form.validateFields()
+ if (valid) {
+ const postData = form.getFieldsValue()
+ if (this.id) {
+ postData.id = this.id
+ }
+ //#region 从前段转换后端所需格式
+ //#endregion
+ return postData
+ }
+ }
+
+ //#region 自定义方法
+ async loadOrgData() {
+ const { data } = await api.getOrgTree()
+ return data
+ }
+
+ async loadAreaData() {
+ const { data } = await api.getAreaTree()
+ return data
+ }
+ async loadMemberOwn(id) {
+ const { data } = await api.sysUserOwnData({ id })
+ return data
+ }
+ render() {
+ return (
+
+ )
+ }
+}
diff --git a/web-react/src/pages/system/user/form.jsx b/web-react/src/pages/system/user/form.jsx
index b8eed13..204c88a 100644
--- a/web-react/src/pages/system/user/form.jsx
+++ b/web-react/src/pages/system/user/form.jsx
@@ -1,5 +1,17 @@
import React, { Component } from 'react'
-import { Button, Row, Col, Form, Input, DatePicker, Radio, Table, Select, Spin, TreeSelect } from 'antd'
+import {
+ Button,
+ Row,
+ Col,
+ Form,
+ Input,
+ DatePicker,
+ Radio,
+ Table,
+ Select,
+ Spin,
+ TreeSelect,
+} from 'antd'
import { AntIcon } from 'components'
import { cloneDeep } from 'lodash'
import getDictData from 'util/dic'
@@ -9,25 +21,24 @@ import moment from 'moment'
const initialValues = {
sex: 0,
- sysEmpParam: {}
+ sysEmpParam: {},
}
export default class form extends Component {
-
state = {
// 加载状态
loading: true,
codes: {
- orgType: []
+ orgType: [],
},
options: {
orgData: [],
- posData: []
+ posData: [],
},
sysEmpParam: {
- extIds: []
- }
+ extIds: [],
+ },
}
extColumns = [
{
@@ -45,7 +56,7 @@ export default class form extends Component {
placeholder="请选择附加组织机构"
/>
- )
+ ),
},
{
title: '附属岗位',
@@ -56,33 +67,28 @@ export default class form extends Component {
- {
- this.state.options.posData.map(item => {
- return
- {item.name}
- })
- }
+ placeholder="请选择附加职位信息"
+ >
+ {this.state.options.posData.map(item => {
+ return (
+
+ {item.name}
+
+ )
+ })}
- )
+ ),
},
{
title: '操作',
key: 'action',
width: '70px',
render: (text, record) => (
-
- }
- >
-
+ rowKey={record => record.key}
+ footer={() => (
+ }
+ type="dashed"
+ onClick={() => this.onAddExtData()}
+ >
+ 新增一项
+
+ )}
+ >
)
}
render() {
return (
-
+ rules={[{ required: true, message: '所属组织机构' }]}
+ >
-
-
+
+
-
- {
- this.state.options.posData.map(item => {
- return
- {item.name}
- })
- }
+
+ {this.state.options.posData.map(item => {
+ return (
+
+ {item.name}
+
+ )
+ })}
diff --git a/web-react/src/pages/system/user/index.jsx b/web-react/src/pages/system/user/index.jsx
index 24dd2c7..080b4e0 100644
--- a/web-react/src/pages/system/user/index.jsx
+++ b/web-react/src/pages/system/user/index.jsx
@@ -1,11 +1,27 @@
import React, { Component } from 'react'
-import { Button, Card, Descriptions, Form, Input, List, message as Message, Popconfirm, Select, Switch } from 'antd'
+import {
+ Button,
+ Card,
+ Descriptions,
+ Form,
+ Input,
+ List,
+ message as Message,
+ Popconfirm,
+ Select,
+ Switch,
+ Dropdown,
+ Menu,
+} from 'antd'
import { AntIcon, Auth, Container, Image, ModalForm, QueryList, QueryTreeLayout } from 'components'
import { api } from 'common/api'
import { toCamelCase } from 'util/format'
import { isEqual } from 'lodash'
import getDictData from 'util/dic'
import FormBody from './form'
+import RoleForm from './role'
+import DataForm from './data'
+import auth from 'components/authorized/handler'
// 配置页面所需接口函数
const apiAction = {
@@ -16,19 +32,21 @@ const apiAction = {
delete: api.sysUserDelete,
changeStatus: api.sysUserChangeStatus,
- resetPwd: api.sysUserResetPwd
+ resetPwd: api.sysUserResetPwd,
+
+ grantRole: api.sysUserGrantRole,
+ grantData: api.sysUserGrantData,
}
// 用于弹窗标题
const name = '用户'
export default class index extends Component {
-
state = {
codes: {
sex: [],
- commonStatus: []
- }
+ commonStatus: [],
+ },
}
// 表格实例
@@ -39,6 +57,8 @@ export default class index extends Component {
// 编辑窗口实例
editForm = React.createRef()
+ roleForm = React.createRef()
+ dataForm = React.createRef()
// 树选中节点
selectId = undefined
@@ -46,9 +66,9 @@ export default class index extends Component {
* 阻止外部组件引发的渲染,提升性能
* 可自行添加渲染条件
* [必要]
- * @param {*} props
- * @param {*} state
- * @returns
+ * @param {*} props
+ * @param {*} state
+ * @returns
*/
shouldComponentUpdate(props, state) {
return !isEqual(this.state, state)
@@ -61,28 +81,30 @@ export default class index extends Component {
componentDidMount() {
this.list.current.onLoading()
getDictData('sex', 'common_status').then(res => {
- this.setState({
- codes: res
- }, () => {
- this.list.current.onLoadData()
- })
+ this.setState(
+ {
+ codes: res,
+ },
+ () => {
+ this.list.current.onLoadData()
+ }
+ )
})
}
/**
* 调用加载数据接口,可在调用前对query进行处理
* [异步,必要]
- * @param {*} params
- * @param {*} query
- * @returns
+ * @param {*} params
+ * @param {*} query
+ * @returns
*/
loadData = async (params, query) => {
-
query = {
...query,
sysEmpParam: {
- orgId: this.selectId
- }
+ orgId: this.selectId,
+ },
}
const { data } = await apiAction.page({
@@ -105,7 +127,7 @@ export default class index extends Component {
/**
* 树节点选中事件
* [必要]
- * @param {*} id
+ * @param {*} id
*/
onSelectTree(id) {
this.selectId = id
@@ -114,15 +136,15 @@ export default class index extends Component {
/**
* 绑定字典数据
- * @param {*} code
- * @param {*} name
- * @returns
+ * @param {*} code
+ * @param {*} name
+ * @returns
*/
bindCodeValue(code, name) {
name = toCamelCase(name)
const codes = this.state.codes[name]
if (codes) {
- const c = codes.find((p) => p.code == code)
+ const c = codes.find(p => p.code == code)
if (c) {
return c.value
}
@@ -132,21 +154,21 @@ export default class index extends Component {
/**
* 打开新增/编辑弹窗
- * @param {*} modal
- * @param {*} record
+ * @param {*} modal
+ * @param {*} id
*/
- onOpen(modal, record) {
+ onOpen(modal, id) {
modal.current.open({
orgId: this.selectId,
- record
+ id,
})
}
/**
* 对表格上的操作进行统一处理
* [异步]
- * @param {*} action
- * @param {*} successMessage
+ * @param {*} action
+ * @param {*} successMessage
*/
async onAction(action, successMessage) {
this.list.current.onLoading()
@@ -161,39 +183,63 @@ export default class index extends Component {
/**
* 删除
- * @param {*} record
+ * @param {*} record
*/
onDelete(record) {
- this.onAction(
- apiAction.delete(record),
- '删除成功'
- )
+ this.onAction(apiAction.delete(record), '删除成功')
}
//#region 自定义方法
renderItem(record) {
+ const { id, account, name, nickName, avatar, sex, phone, email, status } = record
return (
- this.onOpen(this.editForm, record)}>编辑
- ,
-
- this.onDelete(record)}
- >
- 删除
-
- ,
-
- this.onResetPassword(record)}>重置密码
-
- ]
- }
+ key={id}
+ actions={[
+
+ this.onOpen(this.editForm, id)}>编辑
+ ,
+
+ this.onDelete(id)}
+ >
+ 删除
+
+ ,
+
+ this.onResetPassword(id)}>重置密码
+ ,
+
+
+ {auth('sysUser:grantRole') && (
+
+ this.onOpen(this.roleForm, id)}>
+ 授权角色
+
+
+ )}
+ {auth('sysUser:grantData') && (
+
+ this.onOpen(this.dataForm, id)}>
+ 授权额外数据
+
+
+ )}
+
+ }
+ >
+
+ 授权
+
+
+
+ ,
+ ]}
>
}
/>
}
- title={record.nickName || record.name}
- description={record.account}
+ title={nickName || name}
+ description={account}
/>
- {this.bindCodeValue(record.sex, 'sex')}
- {record.phone || '未设置'}
- {record.email || '未设置'}
+
+ {this.bindCodeValue(sex, 'sex')}
+
+ {phone || '未设置'}
+ {email || '未设置'}
this.onSetUserStatus(record, checked)}
+ onChange={checked => this.onSetUserStatus(id, checked)}
/>
)
-
}
- onSetUserStatus(record, checked) {
- this.onAction(
- apiAction.changeStatus({ id: record.id, status: +!checked }),
- '设置成功'
- )
+ onSetUserStatus(id, checked) {
+ this.onAction(apiAction.changeStatus({ id, status: +!checked }), '设置成功')
}
- onResetPassword(record) {
- this.onAction(
- apiAction.resetPwd(record),
- '重置成功'
- )
+ onResetPassword(id) {
+ this.onAction(apiAction.resetPwd({ id }), '重置成功')
}
//#endregion
@@ -251,7 +291,7 @@ export default class index extends Component {
this.onSelectTree(key)}
+ onSelect={key => this.onSelectTree(key)}
>
@@ -273,14 +313,13 @@ export default class index extends Component {
placeholder="请选择状态"
className="w-200"
>
- {
- this.state.codes.commonStatus.map(item => {
- return {item.value}
- })
- }
+ {this.state.codes.commonStatus.map(item => {
+ return (
+
+ {item.value}
+
+ )
+ })}
@@ -289,9 +328,11 @@ export default class index extends Component {
}
onClick={() => this.onOpen(this.addForm)}
- >新增{name}
+ >
+ 新增{name}
+
}
- renderItem={(record) => this.renderItem(record)}
+ renderItem={record => this.renderItem(record)}
/>
@@ -313,6 +354,24 @@ export default class index extends Component {
>
+
+ this.list.current.onReloadData()}
+ >
+
+
+
+ this.list.current.onReloadData()}
+ >
+
+
)
}
diff --git a/web-react/src/pages/system/user/role.jsx b/web-react/src/pages/system/user/role.jsx
new file mode 100644
index 0000000..131cc68
--- /dev/null
+++ b/web-react/src/pages/system/user/role.jsx
@@ -0,0 +1,99 @@
+import React, { Component } from 'react'
+import { Form, Spin, Select } from 'antd'
+import { AntIcon } from 'components'
+import { cloneDeep } from 'lodash'
+import { api } from 'common/api'
+
+export default class role extends Component {
+ state = {
+ // 加载状态
+ loading: true,
+
+ options: {
+ roleData: [],
+ },
+ roles: [],
+ }
+
+ // 表单实例
+ form = React.createRef()
+
+ // 初始化数据
+ id = ''
+
+ /**
+ * mount后回调
+ */
+ componentDidMount() {
+ this.props.created && this.props.created(this)
+ }
+ async fillData(params) {
+ this.id = params.id
+ //#region 从后端转换成前段所需格式
+ const roleData = await this.loadRoleData()
+ const roles = await this.loadRole(this.id)
+ this.setState({
+ options: {
+ roleData,
+ },
+ roles,
+ })
+ this.form.current.setFieldsValue({
+ id: this.id,
+ grantRoleIdList: roles,
+ })
+
+ this.setState({
+ loading: false,
+ })
+ }
+ /**
+ * 获取数据
+ * 可以对postData进行数据结构调整
+ * [异步,必要]
+ * @returns
+ */
+ async getData() {
+ const form = this.form.current
+
+ const valid = await form.validateFields()
+ if (valid) {
+ const postData = form.getFieldsValue()
+ if (this.id) {
+ postData.id = this.id
+ }
+ //#region 从前段转换后端所需格式
+ //#endregion
+ return postData
+ }
+ }
+ async loadRoleData() {
+ const { data } = await api.getRolePage()
+ return data.items
+ }
+ async loadRole(id) {
+ const { data } = await api.sysUserOwnRole({ id })
+ return data
+ }
+ render() {
+ return (
+
+ )
+ }
+}
diff --git a/web-react/src/store/reducer/layout.js b/web-react/src/store/reducer/layout.js
index 7f2fa41..1441e84 100644
--- a/web-react/src/store/reducer/layout.js
+++ b/web-react/src/store/reducer/layout.js
@@ -1,6 +1,21 @@
-const layout = (state = {
- siderCollapsed: false
-}, action) => {
+import { SETTING_KEY } from "common/storage"
+import { SIDER_BREAK_POINT } from "util/global"
+
+const defaultState = {
+ siderCollapsed: false,
+ allowSiderCollapsed: true
+}
+
+const localStorageState = () => {
+ return JSON.parse(window.localStorage.getItem(SETTING_KEY)) || {}
+}
+
+const mergeState = {
+ ...defaultState,
+ ...localStorageState()
+}
+
+const layout = (state = mergeState, action) => {
switch (action.type) {
// 打开窗口
case 'OPEN_WINDOW':
@@ -13,8 +28,23 @@ const layout = (state = {
return state
// 侧边收起状态
case 'TOGGLE_COLLAPSED':
- const _state = { ...state, siderCollapsed: action.siderCollapsed }
- return _state
+ {
+ if (window.innerWidth <= SIDER_BREAK_POINT) {
+ return state
+ }
+ const _state = { ...state, siderCollapsed: action.siderCollapsed }
+ window.localStorage.setItem(SETTING_KEY, JSON.stringify(_state))
+ return _state
+ }
+ case 'AUTO_TOGGLE_COLLAPSED':
+ {
+ const _state = {
+ ...state,
+ siderCollapsed: localStorageState().siderCollapsed || action.siderCollapsed,
+ allowSiderCollapsed: !action.siderCollapsed
+ }
+ return _state
+ }
default:
return state
}
diff --git a/web-react/src/util/global/index.js b/web-react/src/util/global/index.js
index 2543e20..374ca42 100644
--- a/web-react/src/util/global/index.js
+++ b/web-react/src/util/global/index.js
@@ -36,4 +36,9 @@ export const RSA_PUBLIC_KEY = '-----BEGIN PUBLIC KEY-----MIGfMA0GCSqGSIb3DQEBAQU
/**
* 城市名称
*/
-export const CITY = '黄石市'
\ No newline at end of file
+export const CITY = '黄石市'
+
+/**
+ * 响应式响应宽度
+ */
+export const SIDER_BREAK_POINT = 1366
\ No newline at end of file
diff --git a/web-react/src/util/query/index.js b/web-react/src/util/query/index.js
index 51d312f..2aa58ae 100644
--- a/web-react/src/util/query/index.js
+++ b/web-react/src/util/query/index.js
@@ -1,3 +1,41 @@
+import moment from 'moment'
+
+/**
+ * 从键值对的query类型转换成数组类型
+ * 键:自动作为field值
+ * 值:得到一个数组作为value的值
+ * queryType:一个json类型,已query的键为键,QueryType为值. 如果是一个QueryType的数组,则自动对应到value中的各个值
+ * 示例:
+ *
+ getSearchInfo({
+ query: {
+ value: '123',
+ text: '123',
+ code: 'abc',
+ check: ['1', '2', '3'],
+ range: [1, 10]
+ },
+ queryType: {
+ text: QueryType.Equal,
+ code: QueryType.Like,
+ check: QueryType.Equal,
+ range: [QueryType.GreaterThanOrEqual, QueryType.LessThan]
+ }
+ })
+
+ =>
+
+ [
+ { field: 'value', value: ['123'] },
+ { field: 'text', value: ['123'], type: '=' },
+ { field: 'code', value: ['abc'], type: 'like' },
+ { field: 'check', value: ['1', '2', '3'], type: '=' },
+ { field: 'range', value: [1], type: '>=' },
+ { field: 'range', value: [10], type: '<' }
+ ]
+ * @param {*} param0
+ * @returns [{ field: '', value: [], type: '' } ...]
+ */
export const getSearchInfo = ({ query, queryType }) => {
const searchInfo = []
Object.keys(query).forEach((p) => {
@@ -38,4 +76,32 @@ export const getSearchInfo = ({ query, queryType }) => {
})
return searchInfo
+}
+
+/**
+ * 获取查询用时间范围数组
+ * 在这里会自动将第二个时间增加1天
+ * 如果选择的日期范围为2021-01-01~2021-01-10,最终需要取得 >=2021-01-01 and <2021-01-11 的结果
+ * @param {*} range 时间范围数组
+ * @param {*} format 格式化
+ * @returns
+ */
+export const getSearchDateRange = (range, format = 'YYYY-MM-DD', unit = 'days') => {
+ if (Array.isArray(range) && range.length === 2) {
+ range[1] = moment(range[1]).add(1, unit)
+ range = range.map(p => moment(p).format(format))
+ }
+ return range
+}
+
+/**
+ * 查询条件类型
+ */
+export const QueryType = {
+ GreaterThan: '>',
+ GreaterThanOrEqual: '>=',
+ LessThan: '<',
+ LessThanOrEqual: '<=',
+ Like: 'LIKE',
+ Equal: '='
}
\ No newline at end of file
diff --git a/web-react/src/views/main/_layout/content/index.jsx b/web-react/src/views/main/_layout/content/index.jsx
index f9aadc7..e52b045 100644
--- a/web-react/src/views/main/_layout/content/index.jsx
+++ b/web-react/src/views/main/_layout/content/index.jsx
@@ -20,7 +20,6 @@ class ComponentDynamic extends Component {
if (this.props.onRef) {
this.props.onRef(this)
}
-
return true
}
@@ -73,6 +72,40 @@ class ComponentDynamic extends Component {
}
}
+class Iframe extends Component {
+ shouldComponentUpdate() {
+ if (this.props.onRef) {
+ this.props.onRef(this)
+ }
+ return true
+ }
+
+ componentDidMount() {
+ if (this.props.onRef) {
+ this.props.onRef(this)
+ }
+ this.loadComponent()
+ }
+
+ loadComponent() {
+ NProgress.start()
+ const iframe = this.refs.content
+ iframe.onload = () => {
+ NProgress.done()
+ }
+ iframe.onerror = () => {
+ NProgress.done()
+ }
+ iframe.src = this.props.src
+ }
+
+ render() {
+ const { title } = this.props
+
+ return
+ }
+}
+
export default class index extends Component {
state = {
actived: '',
@@ -113,13 +146,15 @@ export default class index extends Component {
render() {
this.panes = []
+ const { actived } = this.state
+
return (
this.onChange(activeKey)}
onEdit={(targetKey, action) => this.onClose(targetKey, action)}
>
@@ -183,19 +218,29 @@ export default class index extends Component {
- this.panes.push(p)}
- />
+ {pane.openType === 1 ? (
+ this.panes.push(p)}
+ />
+ ) : pane.openType === 2 ? (
+
)
})}
diff --git a/web-react/src/views/main/_layout/header/index.jsx b/web-react/src/views/main/_layout/header/index.jsx
index c0e0b01..ccf9f9d 100644
--- a/web-react/src/views/main/_layout/header/index.jsx
+++ b/web-react/src/views/main/_layout/header/index.jsx
@@ -33,13 +33,20 @@ export default class index extends Component {
}
render() {
+ const { allowSiderCollapsed } = this.state
+
return (
-
this.onCollapsed()}>
-
-
+ {allowSiderCollapsed && (
+
this.onCollapsed()}
+ >
+
+
+ )}
diff --git a/web-react/src/views/main/_layout/header/search.jsx b/web-react/src/views/main/_layout/header/search.jsx
index 6849851..f8aba8d 100644
--- a/web-react/src/views/main/_layout/header/search.jsx
+++ b/web-react/src/views/main/_layout/header/search.jsx
@@ -78,7 +78,7 @@ export default class search extends Component {
}
onSelect(value, option) {
- const { id, meta, component } = option.menu
+ const { id, meta, component, link, redirect, openType } = option.menu
// 选中时清空输入框内容,并失去焦点
this.setState({ searchValue: '' })
@@ -88,7 +88,19 @@ export default class search extends Component {
key: id,
title: meta.title,
icon: meta.icon,
- path: component,
+ path: (() => {
+ switch (openType) {
+ case 1:
+ return component
+ case 2:
+ return link
+ case 3:
+ return redirect
+ default:
+ return null
+ }
+ })(),
+ openType,
})
}
diff --git a/web-react/src/views/main/_layout/header/user.jsx b/web-react/src/views/main/_layout/header/user.jsx
index cca8939..083aafa 100644
--- a/web-react/src/views/main/_layout/header/user.jsx
+++ b/web-react/src/views/main/_layout/header/user.jsx
@@ -83,7 +83,7 @@ class User extends Component {
)}
{user.roles &&
user.roles.map(role => (
-
+
{role.name}
))}
diff --git a/web-react/src/views/main/_layout/sider/index.jsx b/web-react/src/views/main/_layout/sider/index.jsx
index 6a15f53..44b247a 100644
--- a/web-react/src/views/main/_layout/sider/index.jsx
+++ b/web-react/src/views/main/_layout/sider/index.jsx
@@ -9,8 +9,7 @@ Swiper.use([Mousewheel, Scrollbar])
const { getState, subscribe } = store
-let timer,
- swiper
+let timer, swiper
const siderSwiperOptions = {
direction: 'vertical',
@@ -31,17 +30,15 @@ const UpdateSwiper = () => {
}, 300)
}
-
export default class index extends Component {
-
state = {
- ...getState('layout')
+ ...getState('layout'),
}
constructor(props) {
super(props)
- this.unsubscribe = subscribe('layout', (state) => {
+ this.unsubscribe = subscribe('layout', state => {
this.setState(state)
})
}
@@ -78,7 +75,10 @@ export default class index extends Component {
diff --git a/web-react/src/views/main/_layout/sider/menu.jsx b/web-react/src/views/main/_layout/sider/menu.jsx
index 4d91304..cbd3a5e 100644
--- a/web-react/src/views/main/_layout/sider/menu.jsx
+++ b/web-react/src/views/main/_layout/sider/menu.jsx
@@ -6,9 +6,8 @@ import store from 'store'
const { getState, subscribe } = store
export default class index extends Component {
-
state = {
- ...getState('nav')
+ ...getState('nav'),
}
constructor(props) {
@@ -23,21 +22,25 @@ export default class index extends Component {
this.unsubscribe()
}
- renderMenu = (menu) => {
- return menu.map((p) => {
+ renderMenu = menu => {
+ return menu.map(p => {
return p.children ? this.renderSubMenu(p) : this.renderMenuItem(p)
})
}
- renderSubMenu = (menu) => {
+ renderSubMenu = menu => {
return (
-
}>
+
}
+ >
{this.renderMenu(menu.children)}
)
}
- renderMenuItem = (menu) => {
+ renderMenuItem = menu => {
return (
this.onOpenContentWindow(menu)}>
{menu.meta.icon && }
@@ -46,12 +49,26 @@ export default class index extends Component {
)
}
- onOpenContentWindow = (menu) => {
+ onOpenContentWindow = menu => {
+ const { id, meta, component, link, redirect, openType } = menu
+
window.openContentWindow({
- key: menu.id,
- title: menu.meta.title,
- icon: menu.meta.icon,
- path: menu.component
+ key: id,
+ title: meta.title,
+ icon: meta.icon,
+ path: (() => {
+ switch (openType) {
+ case 1:
+ return component
+ case 2:
+ return link
+ case 3:
+ return redirect
+ default:
+ return null
+ }
+ })(),
+ openType,
})
}
@@ -60,12 +77,11 @@ export default class index extends Component {
}
render() {
-
const props = {
mode: 'inline',
selectable: false,
style: this.props.menuStyle,
- theme: 'light'
+ theme: 'light',
}
const on = {
@@ -74,16 +90,20 @@ export default class index extends Component {
return (
<>
- {
- this.state.nav.map((item, i) => {
+ {this.state.nav.map((item, i) => {
+ if (item.menu.length) {
return (
{item.app.name}
-
+
)
- })
- }
+ } else {
+ return false
+ }
+ })}
>
)
}
diff --git a/web-react/src/views/main/index.jsx b/web-react/src/views/main/index.jsx
index 665c59f..d848dfd 100644
--- a/web-react/src/views/main/index.jsx
+++ b/web-react/src/views/main/index.jsx
@@ -1,10 +1,9 @@
import React, { Component } from 'react'
import { Spin, Layout } from 'antd'
-import { LoadingOutlined } from '@ant-design/icons'
import { api } from 'common/api'
import { cloneDeep, groupBy, findIndex, last } from 'lodash'
import store from 'store'
-import { EMPTY_ID } from 'util/global'
+import { EMPTY_ID, SIDER_BREAK_POINT } from 'util/global'
import Header from './_layout/header'
import Sider from './_layout/sider'
@@ -83,6 +82,9 @@ export default class index extends Component {
})
})
})
+
+ window.addEventListener('resize', this.onResizeSider)
+ this.onResizeSider()
}
/**
@@ -103,7 +105,31 @@ export default class index extends Component {
return
}
- const path = settings.path.startsWith('/') ? settings.path : `/${settings.path}`
+ let path = (p => {
+ if (p.startsWith('http')) return p
+ if (p.startsWith('/')) return p
+ else return `/${p}`
+ })(settings.path)
+
+ if ([2, 3].includes(settings.openType)) {
+ const param = (p => {
+ const arr = []
+ if (p && p.constructor === Object) {
+ Object.keys(p).forEach(key => {
+ arr.push(`${key}=${(p[key] || '').toString()}`)
+ })
+ }
+ return arr.join('&')
+ })(settings.param)
+
+ path += param ? `?${param}` : ''
+
+ if (settings.openType === 3) {
+ // 打开新的浏览器窗口
+ window.open(path)
+ return
+ }
+ }
/**
* 向标签页队列中添加一个新的标签页
@@ -118,7 +144,9 @@ export default class index extends Component {
path,
param: settings.param,
loaded: false,
+ openType: settings.openType || 1,
}
+
this.setState({
panes: [...this.state.panes, newPane],
})
@@ -231,6 +259,13 @@ export default class index extends Component {
})
}
+ onResizeSider = () => {
+ dispatch({
+ type: 'AUTO_TOGGLE_COLLAPSED',
+ siderCollapsed: window.innerWidth <= SIDER_BREAK_POINT,
+ })
+ }
+
render() {
const { loading, panes, actived } = this.state
diff --git a/web-react/yarn.lock b/web-react/yarn.lock
index c0cf4a2..1bb675f 100644
--- a/web-react/yarn.lock
+++ b/web-react/yarn.lock
@@ -1315,6 +1315,11 @@
dependencies:
"@hapi/hoek" "^8.3.0"
+"@icons/material@^0.2.4":
+ version "0.2.4"
+ resolved "https://registry.nlark.com/@icons/material/download/@icons/material-0.2.4.tgz#e90c9f71768b3736e76d7dd6783fc6c2afa88bc8"
+ integrity sha1-6QyfcXaLNzbnbX3WeD/Gwq+oi8g=
+
"@istanbuljs/load-nyc-config@^1.0.0":
version "1.1.0"
resolved "https://registry.nlark.com/@istanbuljs/load-nyc-config/download/@istanbuljs/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced"
@@ -2554,7 +2559,7 @@ arrify@^2.0.1:
resolved "https://registry.nlark.com/arrify/download/arrify-2.0.1.tgz?cache=0&sync_timestamp=1619599497996&other_urls=https%3A%2F%2Fregistry.nlark.com%2Farrify%2Fdownload%2Farrify-2.0.1.tgz#c9655e9331e0abcd588d2a7cad7e9956f66701fa"
integrity sha1-yWVekzHgq81YjSp8rX6ZVvZnAfo=
-asap@~2.0.6:
+asap@~2.0.3, asap@~2.0.6:
version "2.0.6"
resolved "https://registry.nlark.com/asap/download/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46"
integrity sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=
@@ -2852,6 +2857,11 @@ balanced-match@^1.0.0:
resolved "https://registry.npm.taobao.org/balanced-match/download/balanced-match-1.0.2.tgz?cache=0&sync_timestamp=1617714233441&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbalanced-match%2Fdownload%2Fbalanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
integrity sha1-6D46fj8wCzTLnYf2FfoMvzV2kO4=
+base16@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.npm.taobao.org/base16/download/base16-1.0.0.tgz#e297f60d7ec1014a7a971a39ebc8a98c0b681e70"
+ integrity sha1-4pf2DX7BAUp6lxo568ipjAtoHnA=
+
base64-js@^1.0.2:
version "1.5.1"
resolved "https://registry.nlark.com/base64-js/download/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a"
@@ -3752,6 +3762,13 @@ create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7:
safe-buffer "^5.0.1"
sha.js "^2.4.8"
+cross-fetch@^3.0.4:
+ version "3.1.4"
+ resolved "https://registry.npm.taobao.org/cross-fetch/download/cross-fetch-3.1.4.tgz#9723f3a3a247bf8b89039f3a380a9244e8fa2f39"
+ integrity sha1-lyPzo6JHv4uJA586OAqSROj6Lzk=
+ dependencies:
+ node-fetch "2.6.1"
+
cross-spawn@7.0.3, cross-spawn@^7.0.0, cross-spawn@^7.0.2:
version "7.0.3"
resolved "https://registry.npm.taobao.org/cross-spawn/download/cross-spawn-7.0.3.tgz?cache=0&sync_timestamp=1606748073153&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcross-spawn%2Fdownload%2Fcross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6"
@@ -5086,6 +5103,31 @@ fb-watchman@^2.0.0:
dependencies:
bser "2.1.1"
+fbemitter@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.npm.taobao.org/fbemitter/download/fbemitter-3.0.0.tgz#00b2a1af5411254aab416cd75f9e6289bee4bff3"
+ integrity sha1-ALKhr1QRJUqrQWzXX55iib7kv/M=
+ dependencies:
+ fbjs "^3.0.0"
+
+fbjs-css-vars@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.npm.taobao.org/fbjs-css-vars/download/fbjs-css-vars-1.0.2.tgz#216551136ae02fe255932c3ec8775f18e2c078b8"
+ integrity sha1-IWVRE2rgL+JVkyw+yHdfGOLAeLg=
+
+fbjs@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.npm.taobao.org/fbjs/download/fbjs-3.0.0.tgz?cache=0&sync_timestamp=1602048886093&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffbjs%2Fdownload%2Ffbjs-3.0.0.tgz#0907067fb3f57a78f45d95f1eacffcacd623c165"
+ integrity sha1-CQcGf7P1enj0XZXx6s/8rNYjwWU=
+ dependencies:
+ cross-fetch "^3.0.4"
+ fbjs-css-vars "^1.0.0"
+ loose-envify "^1.0.0"
+ object-assign "^4.1.0"
+ promise "^7.1.1"
+ setimmediate "^1.0.5"
+ ua-parser-js "^0.7.18"
+
figgy-pudding@^3.5.1:
version "3.5.2"
resolved "https://registry.nlark.com/figgy-pudding/download/figgy-pudding-3.5.2.tgz#b4eee8148abb01dcf1d1ac34367d59e12fa61d6e"
@@ -5212,6 +5254,14 @@ flush-write-stream@^1.0.0:
inherits "^2.0.3"
readable-stream "^2.3.6"
+flux@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.npm.taobao.org/flux/download/flux-4.0.1.tgz#7843502b02841d4aaa534af0b373034a1f75ee5c"
+ integrity sha1-eENQKwKEHUqqU0rws3MDSh917lw=
+ dependencies:
+ fbemitter "^3.0.0"
+ fbjs "^3.0.0"
+
follow-redirects@^1.0.0, follow-redirects@^1.10.0:
version "1.14.1"
resolved "https://registry.nlark.com/follow-redirects/download/follow-redirects-1.14.1.tgz#d9114ded0a1cfdd334e164e6662ad02bfd91ff43"
@@ -7127,6 +7177,11 @@ locate-path@^5.0.0:
dependencies:
p-locate "^4.1.0"
+lodash-es@^4.17.15:
+ version "4.17.21"
+ resolved "https://registry.npm.taobao.org/lodash-es/download/lodash-es-4.17.21.tgz?cache=0&sync_timestamp=1613836185353&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flodash-es%2Fdownload%2Flodash-es-4.17.21.tgz#43e626c46e6591b7750beb2b50117390c609e3ee"
+ integrity sha1-Q+YmxG5lkbd1C+srUBFzkMYJ4+4=
+
lodash._reinterpolate@^3.0.0:
version "3.0.0"
resolved "https://registry.nlark.com/lodash._reinterpolate/download/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d"
@@ -7137,11 +7192,21 @@ lodash.clonedeep@^4.5.0:
resolved "https://registry.nlark.com/lodash.clonedeep/download/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef"
integrity sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=
+lodash.curry@^4.0.1:
+ version "4.1.1"
+ resolved "https://registry.npm.taobao.org/lodash.curry/download/lodash.curry-4.1.1.tgz#248e36072ede906501d75966200a86dab8b23170"
+ integrity sha1-JI42By7ekGUB11lmIAqG2riyMXA=
+
lodash.debounce@^4.0.8:
version "4.0.8"
resolved "https://registry.npm.taobao.org/lodash.debounce/download/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af"
integrity sha1-gteb/zCmfEAF/9XiUVMArZyk168=
+lodash.flow@^3.3.0:
+ version "3.5.0"
+ resolved "https://registry.npm.taobao.org/lodash.flow/download/lodash.flow-3.5.0.tgz#87bf40292b8cf83e4e8ce1a3ae4209e20071675a"
+ integrity sha1-h79AKSuM+D5OjOGjrkIJ4gBxZ1o=
+
lodash.memoize@^4.1.2:
version "4.1.2"
resolved "https://registry.nlark.com/lodash.memoize/download/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe"
@@ -7177,7 +7242,7 @@ lodash.uniq@^4.5.0:
resolved "https://registry.npm.taobao.org/lodash.uniq/download/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773"
integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=
-"lodash@>=3.5 <5", lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.5, lodash@^4.7.0:
+"lodash@>=3.5 <5", lodash@^4.0.1, lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.5, lodash@^4.7.0:
version "4.17.21"
resolved "https://registry.nlark.com/lodash/download/lodash-4.17.21.tgz?cache=0&sync_timestamp=1618847150612&other_urls=https%3A%2F%2Fregistry.nlark.com%2Flodash%2Fdownload%2Flodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
integrity sha1-Z5WRxWTDv/quhFTPCz3zcMPWkRw=
@@ -7261,6 +7326,11 @@ map-visit@^1.0.0:
dependencies:
object-visit "^1.0.0"
+material-colors@^1.2.1:
+ version "1.2.6"
+ resolved "https://registry.npm.taobao.org/material-colors/download/material-colors-1.2.6.tgz#6d1958871126992ceecc72f4bcc4d8f010865f46"
+ integrity sha1-bRlYhxEmmSzuzHL0vMTY8BCGX0Y=
+
md5.js@^1.3.4:
version "1.3.5"
resolved "https://registry.npm.taobao.org/md5.js/download/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f"
@@ -7639,6 +7709,11 @@ no-case@^3.0.4:
lower-case "^2.0.2"
tslib "^2.0.3"
+node-fetch@2.6.1:
+ version "2.6.1"
+ resolved "https://registry.nlark.com/node-fetch/download/node-fetch-2.6.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fnode-fetch%2Fdownload%2Fnode-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052"
+ integrity sha1-BFvTI2Mfdu0uK1VXM5RBa2OaAFI=
+
node-forge@^0.10.0:
version "0.10.0"
resolved "https://registry.npm.taobao.org/node-forge/download/node-forge-0.10.0.tgz?cache=0&sync_timestamp=1599010726129&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnode-forge%2Fdownload%2Fnode-forge-0.10.0.tgz#32dea2afb3e9926f02ee5ce8794902691a676bf3"
@@ -9040,6 +9115,13 @@ promise-inflight@^1.0.1:
resolved "https://registry.nlark.com/promise-inflight/download/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3"
integrity sha1-mEcocL8igTL8vdhoEputEsPAKeM=
+promise@^7.1.1:
+ version "7.3.1"
+ resolved "https://registry.npm.taobao.org/promise/download/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf"
+ integrity sha1-BktyYCsY+Q8pGSuLG8QY/9Hr078=
+ dependencies:
+ asap "~2.0.3"
+
promise@^8.1.0:
version "8.1.0"
resolved "https://registry.npm.taobao.org/promise/download/promise-8.1.0.tgz#697c25c3dfe7435dd79fcd58c38a135888eaf05e"
@@ -9063,7 +9145,7 @@ prompts@^2.0.1:
kleur "^3.0.3"
sisteransi "^1.0.5"
-prop-types@^15.6.2, prop-types@^15.7.2:
+prop-types@^15.5.10, prop-types@^15.6.2, prop-types@^15.7.2:
version "15.7.2"
resolved "https://registry.npm.taobao.org/prop-types/download/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5"
integrity sha1-UsQedbjIfnK52TYOAga5ncv/psU=
@@ -9142,6 +9224,11 @@ punycode@^2.1.0, punycode@^2.1.1:
resolved "https://registry.nlark.com/punycode/download/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec"
integrity sha1-tYsBCsQMIsVldhbI0sLALHv0eew=
+pure-color@^1.2.0:
+ version "1.3.0"
+ resolved "https://registry.npm.taobao.org/pure-color/download/pure-color-1.3.0.tgz#1fe064fb0ac851f0de61320a8bf796836422f33e"
+ integrity sha1-H+Bk+wrIUfDeYTIKi/eWg2Qi8z4=
+
q@^1.1.2:
version "1.5.1"
resolved "https://registry.nlark.com/q/download/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7"
@@ -9576,6 +9663,29 @@ react-app-polyfill@^2.0.0:
regenerator-runtime "^0.13.7"
whatwg-fetch "^3.4.1"
+react-base16-styling@^0.6.0:
+ version "0.6.0"
+ resolved "https://registry.npm.taobao.org/react-base16-styling/download/react-base16-styling-0.6.0.tgz#ef2156d66cf4139695c8a167886cb69ea660792c"
+ integrity sha1-7yFW1mz0E5aVyKFniGy2nqZgeSw=
+ dependencies:
+ base16 "^1.0.0"
+ lodash.curry "^4.0.1"
+ lodash.flow "^3.3.0"
+ pure-color "^1.2.0"
+
+react-color@^2.19.3:
+ version "2.19.3"
+ resolved "https://registry.npm.taobao.org/react-color/download/react-color-2.19.3.tgz#ec6c6b4568312a3c6a18420ab0472e146aa5683d"
+ integrity sha1-7GxrRWgxKjxqGEIKsEcuFGqlaD0=
+ dependencies:
+ "@icons/material" "^0.2.4"
+ lodash "^4.17.15"
+ lodash-es "^4.17.15"
+ material-colors "^1.2.1"
+ prop-types "^15.5.10"
+ reactcss "^1.2.0"
+ tinycolor2 "^1.4.1"
+
react-dev-utils@^11.0.3:
version "11.0.4"
resolved "https://registry.npm.taobao.org/react-dev-utils/download/react-dev-utils-11.0.4.tgz?cache=0&sync_timestamp=1615231838520&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Freact-dev-utils%2Fdownload%2Freact-dev-utils-11.0.4.tgz#a7ccb60257a1ca2e0efe7a83e38e6700d17aa37a"
@@ -9630,6 +9740,21 @@ react-is@^17.0.1:
resolved "https://registry.nlark.com/react-is/download/react-is-17.0.2.tgz?cache=0&sync_timestamp=1623273254569&other_urls=https%3A%2F%2Fregistry.nlark.com%2Freact-is%2Fdownload%2Freact-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0"
integrity sha1-5pHUqOnHiTZWVVOas3J2Kw77VPA=
+react-json-view@^1.21.3:
+ version "1.21.3"
+ resolved "https://registry.npm.taobao.org/react-json-view/download/react-json-view-1.21.3.tgz#f184209ee8f1bf374fb0c41b0813cff54549c475"
+ integrity sha1-8YQgnujxvzdPsMQbCBPP9UVJxHU=
+ dependencies:
+ flux "^4.0.1"
+ react-base16-styling "^0.6.0"
+ react-lifecycles-compat "^3.0.4"
+ react-textarea-autosize "^8.3.2"
+
+react-lifecycles-compat@^3.0.4:
+ version "3.0.4"
+ resolved "https://registry.npm.taobao.org/react-lifecycles-compat/download/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362"
+ integrity sha1-TxonOv38jzSIqMUWv9p4+HI1I2I=
+
react-monaco-editor@^0.43.0:
version "0.43.0"
resolved "https://registry.npm.taobao.org/react-monaco-editor/download/react-monaco-editor-0.43.0.tgz#495578470db7b27ab306af813b31f206a6bf9d1c"
@@ -9738,6 +9863,15 @@ react-scripts@4.0.3:
optionalDependencies:
fsevents "^2.1.3"
+react-textarea-autosize@^8.3.2:
+ version "8.3.3"
+ resolved "https://registry.nlark.com/react-textarea-autosize/download/react-textarea-autosize-8.3.3.tgz?cache=0&sync_timestamp=1622628433420&other_urls=https%3A%2F%2Fregistry.nlark.com%2Freact-textarea-autosize%2Fdownload%2Freact-textarea-autosize-8.3.3.tgz#f70913945369da453fd554c168f6baacd1fa04d8"
+ integrity sha1-9wkTlFNp2kU/1VTBaPa6rNH6BNg=
+ dependencies:
+ "@babel/runtime" "^7.10.2"
+ use-composed-ref "^1.0.0"
+ use-latest "^1.0.0"
+
react@^17.0.2:
version "17.0.2"
resolved "https://registry.nlark.com/react/download/react-17.0.2.tgz?cache=0&sync_timestamp=1623272232595&other_urls=https%3A%2F%2Fregistry.nlark.com%2Freact%2Fdownload%2Freact-17.0.2.tgz#d0b5cc516d29eb3eee383f75b62864cfb6800037"
@@ -9746,6 +9880,13 @@ react@^17.0.2:
loose-envify "^1.1.0"
object-assign "^4.1.1"
+reactcss@^1.2.0:
+ version "1.2.3"
+ resolved "https://registry.npm.taobao.org/reactcss/download/reactcss-1.2.3.tgz#c00013875e557b1cf0dfd9a368a1c3dab3b548dd"
+ integrity sha1-wAATh15Vexzw39mjaKHD2rO1SN0=
+ dependencies:
+ lodash "^4.0.1"
+
read-pkg-up@^3.0.0:
version "3.0.0"
resolved "https://registry.nlark.com/read-pkg-up/download/read-pkg-up-3.0.0.tgz?cache=0&sync_timestamp=1618846971516&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fread-pkg-up%2Fdownload%2Fread-pkg-up-3.0.0.tgz#3ed496685dba0f8fe118d0691dc51f4a1ff96f07"
@@ -10387,7 +10528,7 @@ set-value@^2.0.0, set-value@^2.0.1:
is-plain-object "^2.0.3"
split-string "^3.0.1"
-setimmediate@^1.0.4:
+setimmediate@^1.0.4, setimmediate@^1.0.5:
version "1.0.5"
resolved "https://registry.nlark.com/setimmediate/download/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285"
integrity sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=
@@ -11142,6 +11283,11 @@ tiny-warning@^1.0.0, tiny-warning@^1.0.3:
resolved "https://registry.npm.taobao.org/tiny-warning/download/tiny-warning-1.0.3.tgz#94a30db453df4c643d0fd566060d60a875d84754"
integrity sha1-lKMNtFPfTGQ9D9VmBg1gqHXYR1Q=
+tinycolor2@^1.4.1:
+ version "1.4.2"
+ resolved "https://registry.nlark.com/tinycolor2/download/tinycolor2-1.4.2.tgz#3f6a4d1071ad07676d7fa472e1fac40a719d8803"
+ integrity sha1-P2pNEHGtB2dtf6Ry4frECnGdiAM=
+
tmpl@1.0.x:
version "1.0.4"
resolved "https://registry.npm.taobao.org/tmpl/download/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1"
@@ -11220,6 +11366,11 @@ tryer@^1.0.1:
resolved "https://registry.npm.taobao.org/tryer/download/tryer-1.0.1.tgz#f2c85406800b9b0f74c9f7465b81eaad241252f8"
integrity sha1-8shUBoALmw90yfdGW4HqrSQSUvg=
+ts-essentials@^2.0.3:
+ version "2.0.12"
+ resolved "https://registry.nlark.com/ts-essentials/download/ts-essentials-2.0.12.tgz#c9303f3d74f75fa7528c3d49b80e089ab09d8745"
+ integrity sha1-yTA/PXT3X6dSjD1JuA4ImrCdh0U=
+
ts-pnp@1.2.0, ts-pnp@^1.1.6:
version "1.2.0"
resolved "https://registry.npm.taobao.org/ts-pnp/download/ts-pnp-1.2.0.tgz#a500ad084b0798f1c3071af391e65912c86bca92"
@@ -11336,6 +11487,11 @@ typedarray@^0.0.6:
resolved "https://registry.nlark.com/typedarray/download/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=
+ua-parser-js@^0.7.18:
+ version "0.7.28"
+ resolved "https://registry.nlark.com/ua-parser-js/download/ua-parser-js-0.7.28.tgz#8ba04e653f35ce210239c64661685bf9121dec31"
+ integrity sha1-i6BOZT81ziECOcZGYWhb+RId7DE=
+
unbox-primitive@^1.0.1:
version "1.0.1"
resolved "https://registry.npm.taobao.org/unbox-primitive/download/unbox-primitive-1.0.1.tgz?cache=0&sync_timestamp=1616706302651&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Funbox-primitive%2Fdownload%2Funbox-primitive-1.0.1.tgz#085e215625ec3162574dc8859abee78a59b14471"
@@ -11480,6 +11636,25 @@ url@^0.11.0:
punycode "1.3.2"
querystring "0.2.0"
+use-composed-ref@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.npm.taobao.org/use-composed-ref/download/use-composed-ref-1.1.0.tgz#9220e4e94a97b7b02d7d27eaeab0b37034438bbc"
+ integrity sha1-kiDk6UqXt7AtfSfq6rCzcDRDi7w=
+ dependencies:
+ ts-essentials "^2.0.3"
+
+use-isomorphic-layout-effect@^1.0.0:
+ version "1.1.1"
+ resolved "https://registry.npm.taobao.org/use-isomorphic-layout-effect/download/use-isomorphic-layout-effect-1.1.1.tgz#7bb6589170cd2987a152042f9084f9effb75c225"
+ integrity sha1-e7ZYkXDNKYehUgQvkIT57/t1wiU=
+
+use-latest@^1.0.0:
+ version "1.2.0"
+ resolved "https://registry.npm.taobao.org/use-latest/download/use-latest-1.2.0.tgz#a44f6572b8288e0972ec411bdd0840ada366f232"
+ integrity sha1-pE9lcrgojgly7EEb3QhAraNm8jI=
+ dependencies:
+ use-isomorphic-layout-effect "^1.0.0"
+
use@^3.1.0:
version "3.1.1"
resolved "https://registry.nlark.com/use/download/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f"