@zgfe/modules-settings 2.0.0-zhongyuan.13 → 2.0.0-zhongyuan.15
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/es/constants/api.js
CHANGED
|
@@ -16,8 +16,8 @@ var apis = {
|
|
|
16
16
|
editVirtualSourceApp: '/user/editSourceApp.jsp' // 修改虚拟应用的来源应用配置
|
|
17
17
|
},
|
|
18
18
|
setting: {
|
|
19
|
-
queryRealTimeData: 'zg/web/v2/newapp/delay',
|
|
20
|
-
updateStatus: 'zg/web/v2/
|
|
19
|
+
queryRealTimeData: '/zg/web/v2/newapp/delay',
|
|
20
|
+
updateStatus: '/zg/web/v2/newapp/status',
|
|
21
21
|
updateCompanyName: '/company/v2updateInfo.jsp',
|
|
22
22
|
updateLicense: apiPrefix + '/system/license',
|
|
23
23
|
groupInfos: '/auth/groupInfos.jsp',
|
|
@@ -11,10 +11,12 @@ export interface ApplicationItem {
|
|
|
11
11
|
status?: number;
|
|
12
12
|
joinDatabaseDelay: string;
|
|
13
13
|
realTimeDelay: string;
|
|
14
|
+
startTime: string;
|
|
15
|
+
stopTime: string;
|
|
14
16
|
}
|
|
15
17
|
export interface ApplicationListChildren {
|
|
16
18
|
label: string;
|
|
17
|
-
key: 'appVersionName' | 'name' | 'platform' | 'status' | 'realTimeDelay' | 'joinDatabaseDelay';
|
|
19
|
+
key: 'appVersionName' | 'name' | 'platform' | 'status' | 'realTimeDelay' | 'joinDatabaseDelay' | 'startTime' | 'stopTime';
|
|
18
20
|
type: string;
|
|
19
21
|
style?: any;
|
|
20
22
|
list?: number[];
|
|
@@ -64,7 +64,7 @@ var Application = function Application(_ref) {
|
|
|
64
64
|
var settingRef = useRef();
|
|
65
65
|
var handleQueryList = /*#__PURE__*/function () {
|
|
66
66
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
67
|
-
var _res$data, _res$data2, _res$data5, _res$data6, res, _res$data3, _res$data4;
|
|
67
|
+
var _res$data, _res$data2, _res$data5, _res$data6, _res$data7, res, _res$data3, _res$data4;
|
|
68
68
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
69
69
|
while (1) switch (_context.prev = _context.next) {
|
|
70
70
|
case 0:
|
|
@@ -101,7 +101,7 @@ var Application = function Application(_ref) {
|
|
|
101
101
|
fontWeight: 'bold',
|
|
102
102
|
fontSize: '14px',
|
|
103
103
|
color: '#000000',
|
|
104
|
-
|
|
104
|
+
minWidth: '100px'
|
|
105
105
|
}
|
|
106
106
|
}, {
|
|
107
107
|
label: '实时数据延迟',
|
|
@@ -115,11 +115,15 @@ var Application = function Application(_ref) {
|
|
|
115
115
|
label: '接入平台',
|
|
116
116
|
key: 'platform',
|
|
117
117
|
type: 'icon',
|
|
118
|
-
list: item.platform
|
|
118
|
+
list: item.platform || []
|
|
119
119
|
}, {
|
|
120
120
|
label: '版本',
|
|
121
121
|
key: 'appVersionName',
|
|
122
122
|
type: 'text'
|
|
123
|
+
}, {
|
|
124
|
+
label: item.status ? '开始时间' : '停止时间 ',
|
|
125
|
+
key: item.status ? 'startTime' : 'stopTime',
|
|
126
|
+
type: 'text'
|
|
123
127
|
}, {
|
|
124
128
|
label: '状态',
|
|
125
129
|
key: 'status',
|
|
@@ -133,7 +137,7 @@ var Application = function Application(_ref) {
|
|
|
133
137
|
handleAddClick();
|
|
134
138
|
}
|
|
135
139
|
//对实时渲染数据进行处理
|
|
136
|
-
getRealTimeData();
|
|
140
|
+
getRealTimeData((res === null || res === void 0 ? void 0 : (_res$data7 = res.data) === null || _res$data7 === void 0 ? void 0 : _res$data7.list) || []);
|
|
137
141
|
_context.next = 18;
|
|
138
142
|
break;
|
|
139
143
|
case 14:
|
|
@@ -167,7 +171,7 @@ var Application = function Application(_ref) {
|
|
|
167
171
|
onCancel: function onCancel() {},
|
|
168
172
|
onOk: function () {
|
|
169
173
|
var _onOk = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
170
|
-
var _formRef$current, _formRef$current2, _res$
|
|
174
|
+
var _formRef$current, _formRef$current2, _res$data8, data, res;
|
|
171
175
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
172
176
|
while (1) switch (_context2.prev = _context2.next) {
|
|
173
177
|
case 0:
|
|
@@ -197,7 +201,7 @@ var Application = function Application(_ref) {
|
|
|
197
201
|
message.success('创建成功');
|
|
198
202
|
handleQueryList();
|
|
199
203
|
settingCallback && settingCallback('settingAddApplicationCallback', {
|
|
200
|
-
id: res === null || res === void 0 ? void 0 : (_res$
|
|
204
|
+
id: res === null || res === void 0 ? void 0 : (_res$data8 = res.data) === null || _res$data8 === void 0 ? void 0 : _res$data8.appId
|
|
201
205
|
});
|
|
202
206
|
_context2.next = 19;
|
|
203
207
|
break;
|
|
@@ -309,8 +313,8 @@ var Application = function Application(_ref) {
|
|
|
309
313
|
// 主体开关关闭时,设置的是默认主体
|
|
310
314
|
var handleSettingClick = /*#__PURE__*/function () {
|
|
311
315
|
var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(record) {
|
|
312
|
-
var _res$
|
|
313
|
-
var res, _res$
|
|
316
|
+
var _res$data9, _res$data10, _res$data10$results;
|
|
317
|
+
var res, _res$data11, mainPart;
|
|
314
318
|
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
315
319
|
while (1) switch (_context6.prev = _context6.next) {
|
|
316
320
|
case 0:
|
|
@@ -324,8 +328,8 @@ var Application = function Application(_ref) {
|
|
|
324
328
|
});
|
|
325
329
|
case 2:
|
|
326
330
|
res = _context6.sent;
|
|
327
|
-
if ((res === null || res === void 0 ? void 0 : (_res$
|
|
328
|
-
mainPart = res === null || res === void 0 ? void 0 : (_res$
|
|
331
|
+
if ((res === null || res === void 0 ? void 0 : (_res$data9 = res.data) === null || _res$data9 === void 0 ? void 0 : _res$data9.results) && (res === null || res === void 0 ? void 0 : (_res$data10 = res.data) === null || _res$data10 === void 0 ? void 0 : (_res$data10$results = _res$data10.results) === null || _res$data10$results === void 0 ? void 0 : _res$data10$results.length) > 0) {
|
|
332
|
+
mainPart = res === null || res === void 0 ? void 0 : (_res$data11 = res.data) === null || _res$data11 === void 0 ? void 0 : _res$data11.results[0];
|
|
329
333
|
setProfile(mainPart);
|
|
330
334
|
setShowSetting(true);
|
|
331
335
|
}
|
|
@@ -545,8 +549,8 @@ var Application = function Application(_ref) {
|
|
|
545
549
|
}();
|
|
546
550
|
// 获取实时渲染数据
|
|
547
551
|
var getRealTimeData = /*#__PURE__*/function () {
|
|
548
|
-
var _ref9 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
|
|
549
|
-
var res,
|
|
552
|
+
var _ref9 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee12(list) {
|
|
553
|
+
var res, newList;
|
|
550
554
|
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
|
|
551
555
|
while (1) switch (_context12.prev = _context12.next) {
|
|
552
556
|
case 0:
|
|
@@ -565,18 +569,18 @@ var Application = function Application(_ref) {
|
|
|
565
569
|
return _context12.abrupt("return", Promise.reject());
|
|
566
570
|
case 6:
|
|
567
571
|
if (res === null || res === void 0 ? void 0 : res.data) {
|
|
568
|
-
|
|
572
|
+
newList = list.map(function (item) {
|
|
569
573
|
var obj = item;
|
|
570
574
|
//对相关数据进行合并
|
|
571
575
|
res.data.forEach(function (resItem) {
|
|
572
|
-
if (item.id === resItem.
|
|
576
|
+
if (item.id === resItem.appId) {
|
|
573
577
|
obj = Object.assign(item, resItem);
|
|
574
578
|
return;
|
|
575
579
|
}
|
|
576
580
|
});
|
|
577
581
|
return obj;
|
|
578
582
|
});
|
|
579
|
-
setList(
|
|
583
|
+
setList(newList);
|
|
580
584
|
}
|
|
581
585
|
_context12.next = 12;
|
|
582
586
|
break;
|
|
@@ -590,7 +594,7 @@ var Application = function Application(_ref) {
|
|
|
590
594
|
}
|
|
591
595
|
}, _callee12, null, [[0, 9]]);
|
|
592
596
|
}));
|
|
593
|
-
return function getRealTimeData() {
|
|
597
|
+
return function getRealTimeData(_x5) {
|
|
594
598
|
return _ref9.apply(this, arguments);
|
|
595
599
|
};
|
|
596
600
|
}();
|
|
@@ -617,7 +621,7 @@ var Application = function Application(_ref) {
|
|
|
617
621
|
var content = /*#__PURE__*/React.createElement("div", {
|
|
618
622
|
className: "".concat(classPrefix, "-contentList")
|
|
619
623
|
}, item.children && item.children.length > 0 && item.children.map(function (child) {
|
|
620
|
-
var _child$list, _child$list2;
|
|
624
|
+
var _child$list, _child$list2, _child$list3;
|
|
621
625
|
return /*#__PURE__*/React.createElement("div", {
|
|
622
626
|
className: "".concat(classPrefix, "-contentList-item")
|
|
623
627
|
}, child.label && (/*#__PURE__*/React.createElement("div", {
|
|
@@ -632,13 +636,15 @@ var Application = function Application(_ref) {
|
|
|
632
636
|
key: plat,
|
|
633
637
|
className: "icon-".concat(getPlatIcon(plat))
|
|
634
638
|
}));
|
|
635
|
-
})), child.type === '
|
|
639
|
+
})), child.type === 'icon' && ((_child$list3 = child.list) === null || _child$list3 === void 0 ? void 0 : _child$list3.length) === 0 && (/*#__PURE__*/React.createElement("span", {
|
|
640
|
+
className: "".concat(classPrefix, "-contentList-item-label-text")
|
|
641
|
+
}, "\u672A\u63A5\u5165\u5E73\u53F0")), child.type === 'text' && (/*#__PURE__*/React.createElement(Tooltip, {
|
|
636
642
|
title: item[child.key],
|
|
637
643
|
placement: "top"
|
|
638
644
|
}, /*#__PURE__*/React.createElement("span", {
|
|
639
645
|
className: "".concat(classPrefix, "-contentList-item-label-text"),
|
|
640
646
|
style: child.style
|
|
641
|
-
}, item[child.key]))), child.type === 'status' && (/*#__PURE__*/React.createElement("span", {
|
|
647
|
+
}, item[child.key] || '-'))), child.type === 'status' && (/*#__PURE__*/React.createElement("span", {
|
|
642
648
|
className: "".concat(classPrefix, "-contentList-item-status")
|
|
643
649
|
}, /*#__PURE__*/React.createElement("span", {
|
|
644
650
|
className: "".concat(classPrefix, "-contentList-item-status-icon").concat(item[child.key] || 0)
|
|
@@ -652,7 +658,7 @@ var Application = function Application(_ref) {
|
|
|
652
658
|
},
|
|
653
659
|
disabled: !authority[1716284934],
|
|
654
660
|
onClick: function onClick() {
|
|
655
|
-
return
|
|
661
|
+
return authority[1716284934] && landleStatusClick(item);
|
|
656
662
|
}
|
|
657
663
|
}, item.status ? '关闭' : '开启'), /*#__PURE__*/React.createElement(Button, {
|
|
658
664
|
type: "link",
|
|
@@ -688,7 +694,7 @@ var Application = function Application(_ref) {
|
|
|
688
694
|
},
|
|
689
695
|
disabled: !authority[1716284934],
|
|
690
696
|
onClick: function onClick() {
|
|
691
|
-
return openMainPart && openMainPart(item.id, item.name);
|
|
697
|
+
return authority[1716284934] && openMainPart && openMainPart(item.id, item.name);
|
|
692
698
|
}
|
|
693
699
|
}, "\u4E3B\u4F53\u7BA1\u7406"))));
|
|
694
700
|
return /*#__PURE__*/React.createElement(Col, {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
.application {
|
|
2
|
+
height: 100%;
|
|
2
3
|
min-height: 400px;
|
|
3
4
|
overflow-x: hidden;
|
|
4
5
|
overflow-y: auto;
|
|
@@ -110,11 +111,12 @@
|
|
|
110
111
|
height: 120px;
|
|
111
112
|
}
|
|
112
113
|
&-rowContent {
|
|
114
|
+
height: calc(100vh - 254px);
|
|
113
115
|
overflow: auto;
|
|
114
116
|
}
|
|
115
117
|
&-contentList {
|
|
116
118
|
display: grid;
|
|
117
|
-
grid-template-columns:
|
|
119
|
+
grid-template-columns: 230px repeat(4, minmax(90px, 1fr)) 135px 90px 260px;
|
|
118
120
|
align-items: center;
|
|
119
121
|
&-item {
|
|
120
122
|
flex: 1;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/modules-settings",
|
|
3
|
-
"version": "2.0.0-zhongyuan.
|
|
3
|
+
"version": "2.0.0-zhongyuan.15",
|
|
4
4
|
"private": false,
|
|
5
5
|
"module": "es/index.js",
|
|
6
6
|
"typings": "es/index.d.ts",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"publishConfig": {
|
|
68
68
|
"access": "public"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "73daa4832ed6af7a6dff89949855e0b53b72041b",
|
|
71
71
|
"gitHooks": {
|
|
72
72
|
"pre-commit": "lint-staged"
|
|
73
73
|
}
|