@yeeyoon/library 3.6.4 → 3.6.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/CommonModal/FixedVideo/index.jsx +71 -0
- package/lib/components/CommonModal/FixedVideo/styles.less +1933 -0
- package/lib/components/CommonModal/index.js +48 -0
- package/lib/components/CommonModal/styles.less +17 -0
- package/lib/components/Header/components/NewVersion/config.json +240 -0
- package/lib/components/Header/components/NewVersion/index.jsx +63 -0
- package/lib/components/Header/components/NewVersion/styles.less +76 -0
- package/lib/components/Header/index.jsx +48 -14
- package/lib/components/Header/index.less +15 -3
- package/lib/components/Header/utils.js +91 -0
- package/lib/components/Icons/index.jsx +22 -1
- package/lib/components/TenantSelector/index.jsx +1 -1
- package/lib/config/env.js +1 -1
- package/package.json +4 -2
@@ -0,0 +1,91 @@
|
|
1
|
+
/*
|
2
|
+
* @Author: Erlin
|
3
|
+
* @Date: 2022-06-24 11:33:21
|
4
|
+
* @LastEditors: Erlin
|
5
|
+
* @LastEditTime: 2022-06-24 17:34:39
|
6
|
+
* @Description:
|
7
|
+
*/
|
8
|
+
import React from 'react';
|
9
|
+
import { Modal } from 'antd';
|
10
|
+
import lodash from 'lodash';
|
11
|
+
import ls from 'local-storage';
|
12
|
+
import request from '.././../utils/request';
|
13
|
+
import NewVersion from './components/NewVersion';
|
14
|
+
import styles from './components/NewVersion/styles.less';
|
15
|
+
// import config from './components/NewVersion/config.json';
|
16
|
+
|
17
|
+
export const openVersionModal = async (props) => {
|
18
|
+
const { data, toVersionCenter, ...reset } = props;
|
19
|
+
const modal = Modal.warning({
|
20
|
+
centered: true,
|
21
|
+
width: 400,
|
22
|
+
title: null,
|
23
|
+
icon: null,
|
24
|
+
closable: true,
|
25
|
+
keyboard: false,
|
26
|
+
maskClosable: false,
|
27
|
+
okButtonProps: { style: { display: 'none' } },
|
28
|
+
bodyStyle: { padding: 0 },
|
29
|
+
className: styles.modal,
|
30
|
+
content: (
|
31
|
+
<NewVersion
|
32
|
+
modal={modal}
|
33
|
+
data={data}
|
34
|
+
toVersionCenter={toVersionCenter}
|
35
|
+
onClose={() => modal.destroy()}
|
36
|
+
/>
|
37
|
+
),
|
38
|
+
onCancel: () => {
|
39
|
+
// setHasNewVersion(false);
|
40
|
+
ls.set('Yyun-Version', {
|
41
|
+
...(ls.get('Yyun-Version') || {}),
|
42
|
+
hasRead: true,
|
43
|
+
});
|
44
|
+
},
|
45
|
+
...reset,
|
46
|
+
});
|
47
|
+
};
|
48
|
+
|
49
|
+
export const getVersionData = async (productName) => {
|
50
|
+
const systems = ['bpm', 'wms', 'bee'];
|
51
|
+
// let hasRead = false;
|
52
|
+
if (systems.indexOf(productName) > -1) {
|
53
|
+
const oldData = ls.get('Yyun-Version');
|
54
|
+
const res = await request(
|
55
|
+
'https://prod-yeeyoon-oss.oss-cn-zhangjiakou.aliyuncs.com/newbie/version-center.json',
|
56
|
+
{ prefix: '' }
|
57
|
+
);
|
58
|
+
const items = lodash.find(res, (item) => item.key == productName);
|
59
|
+
const newData = items?.content?.[0] || {};
|
60
|
+
if (oldData?.version !== newData?.version) {
|
61
|
+
const data = {
|
62
|
+
version: newData?.version,
|
63
|
+
hasRead: false,
|
64
|
+
isNew: true,
|
65
|
+
};
|
66
|
+
ls.set('Yyun-Version', data);
|
67
|
+
}
|
68
|
+
if (oldData) return [oldData.isNew, newData, oldData.hasRead];
|
69
|
+
return [false, newData, true];
|
70
|
+
}
|
71
|
+
if (productName == 'profile') {
|
72
|
+
const res = await request(
|
73
|
+
'https://prod-yeeyoon-oss.oss-cn-zhangjiakou.aliyuncs.com/newbie/version-center.json',
|
74
|
+
{ prefix: '' }
|
75
|
+
);
|
76
|
+
let oldVersion = ls.get('Yyun-Version');
|
77
|
+
let versionObj = {};
|
78
|
+
let flag = false;
|
79
|
+
res.forEach((data) => {
|
80
|
+
const hasNew =
|
81
|
+
data.content[0].version !== oldVersion?.[data.key]?.version;
|
82
|
+
if (hasNew) flag = true;
|
83
|
+
versionObj[data.key] = {
|
84
|
+
version: data.content[0].version,
|
85
|
+
// hasNew: hasNew,
|
86
|
+
};
|
87
|
+
});
|
88
|
+
return [flag, versionObj, true];
|
89
|
+
}
|
90
|
+
return [false, {}, true];
|
91
|
+
};
|
@@ -4,7 +4,7 @@ import { createFromIconfontCN } from '@ant-design/icons';
|
|
4
4
|
const Icons = createFromIconfontCN({
|
5
5
|
scriptUrl: [
|
6
6
|
'//at.alicdn.com/t/font_3133477_q292mp6e2u.js',
|
7
|
-
'//at.alicdn.com/t/
|
7
|
+
'//at.alicdn.com/t/font_2716486_438w28vpft3.js',
|
8
8
|
'//at.alicdn.com/t/font_2832661_kmrn4o901g.js', //宜云协同iconfont
|
9
9
|
'//at.alicdn.com/t/font_2832313_vjeg45f5qof.js',
|
10
10
|
'//at.alicdn.com/t/font_2965204_9g0wekoduag.js', //租户管理
|
@@ -38,10 +38,30 @@ const IconQunZuGuanLi = (args) => {
|
|
38
38
|
const IconVersion = (args) => {
|
39
39
|
return <Icons type="icon-tag" {...args} />;
|
40
40
|
};
|
41
|
+
const IconPlay = (args) => {
|
42
|
+
return <Icons type="icon-bofang" {...args} />;
|
43
|
+
};
|
44
|
+
const IconNew = () => {
|
45
|
+
return (
|
46
|
+
<svg
|
47
|
+
width="21"
|
48
|
+
height="11"
|
49
|
+
viewBox="0 0 21 11"
|
50
|
+
fill="none"
|
51
|
+
xmlns="http://www.w3.org/2000/svg"
|
52
|
+
>
|
53
|
+
<path
|
54
|
+
d="M19.0908 0.25H1.90908C0.859068 0.25 0 1.10914 0 2.15912V8.8409C0 9.89091 0.859068 10.75 1.90908 10.75H19.0908C20.1409 10.75 21 9.89091 21 8.8409V2.15912C21 1.10914 20.1409 0.25 19.0908 0.25ZM6.68181 7.40909C6.68181 7.60941 6.54817 7.79092 6.35726 7.85789C6.30969 7.87704 6.25243 7.88641 6.20453 7.88641C6.06152 7.88641 5.9182 7.80999 5.82271 7.68609L3.81817 5.03247V7.40913C3.81817 7.66705 3.60814 7.88645 3.34089 7.88645C3.07363 7.88645 2.86365 7.66705 2.86365 7.40913V3.61004C2.86365 3.40979 2.99729 3.22829 3.1882 3.16124C3.38882 3.09457 3.59881 3.16124 3.72275 3.33312C4.39094 4.21459 5.0591 5.09614 5.72729 5.97733V3.61004C5.72729 3.35249 5.93728 3.14217 6.20457 3.14217C6.47186 3.14217 6.68185 3.35249 6.68185 3.61004L6.68181 7.40909ZM10.0227 5.0228C10.29 5.0228 10.5 5.23275 10.5 5.50005C10.5 5.76734 10.29 5.97729 10.0227 5.97729H8.5909V6.93185H10.0227C10.29 6.93185 10.5 7.14187 10.5 7.40913C10.5 7.67642 10.29 7.88645 10.0227 7.88645H8.11362C7.84636 7.88645 7.63634 7.67642 7.63634 7.40913V3.59096C7.63634 3.32371 7.84633 3.11372 8.11362 3.11372H10.0227C10.29 3.11372 10.5 3.32367 10.5 3.59096C10.5 3.85825 10.29 4.06824 10.0227 4.06824H8.5909V5.02284L10.0227 5.0228ZM17.9836 3.7152C17.5126 4.96243 17.0417 6.20971 16.5709 7.45702C16.5379 7.54689 16.4781 7.62443 16.3996 7.67909C16.321 7.73374 16.2275 7.76286 16.1318 7.76247C15.9409 7.76247 15.7597 7.63823 15.6927 7.45702C15.3682 6.59796 15.0436 5.73882 14.7191 4.87945C14.3945 5.73885 14.07 6.59796 13.7455 7.45702C13.6118 7.81974 13.0009 7.81974 12.8673 7.45702C12.3965 6.20971 11.9256 4.96243 11.4545 3.7152C11.3688 3.47639 11.4833 3.2091 11.7315 3.11368C11.9797 3.01823 12.247 3.14213 12.3327 3.39031C12.6572 4.24971 12.9818 5.10881 13.3064 5.96792C13.6309 5.10873 13.9555 4.24953 14.28 3.39031C14.4136 3.0276 15.0245 3.0276 15.1581 3.39031C15.4827 4.24971 15.8073 5.10881 16.1318 5.96792C16.4563 5.10881 16.7809 4.24971 17.1054 3.39031C17.1915 3.14213 17.4681 3.0276 17.7069 3.11368C17.9551 3.19973 18.0791 3.46702 17.9836 3.7152Z"
|
55
|
+
fill="#EA5455"
|
56
|
+
/>
|
57
|
+
</svg>
|
58
|
+
);
|
59
|
+
};
|
41
60
|
|
42
61
|
export {
|
43
62
|
IconBell,
|
44
63
|
IconTodo,
|
64
|
+
IconPlay,
|
45
65
|
IconConsole,
|
46
66
|
IconMore,
|
47
67
|
IconCircle,
|
@@ -49,4 +69,5 @@ export {
|
|
49
69
|
IconTuijianchanpin,
|
50
70
|
IconQunZuGuanLi,
|
51
71
|
IconVersion,
|
72
|
+
IconNew,
|
52
73
|
};
|
@@ -28,7 +28,7 @@ const TenantSelector = (props) => {
|
|
28
28
|
if (appId) {
|
29
29
|
tenants = tenants.filter((item) => {
|
30
30
|
const { applications } = item;
|
31
|
-
return applications
|
31
|
+
return applications?.filter((item) => item.id === appId).length;
|
32
32
|
});
|
33
33
|
}
|
34
34
|
if (!tenants.length) {
|
package/lib/config/env.js
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@yeeyoon/library",
|
3
|
-
"version": "3.6.
|
3
|
+
"version": "3.6.7",
|
4
4
|
"description": "宜云前端组件库和通用服务",
|
5
5
|
"main": "index.js",
|
6
6
|
"repository": {
|
@@ -35,7 +35,9 @@
|
|
35
35
|
"recharts": "^1.8.5",
|
36
36
|
"socket.io-client": "^4.1.2",
|
37
37
|
"umi-request": "^1.3.9",
|
38
|
-
"uuid": "^8.3.2"
|
38
|
+
"uuid": "^8.3.2",
|
39
|
+
"video.js": "^7.15.4",
|
40
|
+
"videojs-flash": "^2.2.1"
|
39
41
|
},
|
40
42
|
"devDependencies": {
|
41
43
|
"babel-eslint": "^9.0.0",
|