dcim-topology2d 2.0.8 → 2.1.0
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/chart-diagram/src/utils/changeOptions.d.ts +1 -0
- package/chart-diagram/src/utils/changeOptions.js +41 -35
- package/chart-diagram/src/utils/conversion.js +140 -13
- package/chart-diagram/src/utils/formatter.d.ts +1 -1
- package/chart-diagram/src/utils/formatter.js +51 -15
- package/chart-diagram/src/utils/index.d.ts +1 -0
- package/chart-diagram/src/utils/index.js +1 -0
- package/chart-diagram/src/utils/render.js +43 -52
- package/chart-diagram/src/utils/surfaceParametricConversion.d.ts +3 -0
- package/chart-diagram/src/utils/surfaceParametricConversion.js +252 -0
- package/core/src/common.js +13 -5
- package/core/src/core.d.ts +2 -0
- package/core/src/core.js +61 -23
- package/core/src/element/common.d.ts +2 -1
- package/core/src/element/common.js +15 -15
- package/core/src/element/datePicker.d.ts +3 -0
- package/core/src/element/datePicker.js +47 -0
- package/core/src/element/index.d.ts +2 -1
- package/core/src/element/index.js +3 -1
- package/core/src/element/select.js +14 -2
- package/core/src/element/tab.js +8 -6
- package/core/src/element/time.d.ts +3 -0
- package/core/src/element/time.js +44 -0
- package/core/src/middles/default.js +8 -2
- package/core/src/middles/nodes/formDatePicker.d.ts +2 -0
- package/core/src/middles/nodes/formDatePicker.js +66 -0
- package/core/src/middles/nodes/formselect.js +7 -0
- package/core/src/middles/nodes/index.d.ts +3 -1
- package/core/src/middles/nodes/index.js +3 -0
- package/core/src/middles/nodes/time.d.ts +2 -0
- package/core/src/middles/nodes/time.js +98 -0
- package/core/src/models/node.js +12 -0
- package/core/src/preview.d.ts +1 -0
- package/core/src/preview.js +29 -5
- package/core/src/store/data.d.ts +5 -0
- package/core/src/store/data.js +9 -2
- package/core/src/utils/assignment.d.ts +2 -1
- package/core/src/utils/assignment.js +23 -11
- package/core/src/utils/conversion.d.ts +2 -0
- package/core/src/utils/conversion.js +43 -1
- package/core/src/utils/params.js +5 -0
- package/package.json +1 -1
- package/style/common.css +0 -3
- package/style/datePicker.css +44 -0
- package/style/editor.css +3 -0
- package/style/index.css +1 -0
@@ -1,7 +1,40 @@
|
|
1
1
|
import {commonStore} from '../store';
|
2
2
|
import {setElementSwitchTabState} from '../element';
|
3
3
|
import {echartsStaticType} from '../utils';
|
4
|
-
|
4
|
+
// tab切换页签删除数据处理
|
5
|
+
export function getTabConnectSHConf(node) {
|
6
|
+
const switchTabType = node.tags.find((t) => {
|
7
|
+
return t.includes('switchTabType');
|
8
|
+
}); // 获取按钮组类型
|
9
|
+
const topologyChangeData = commonStore[node.TID].switchTabDataPool;
|
10
|
+
const tabAreaData = topologyChangeData[`${switchTabType}AreaData`];
|
11
|
+
const bindConfIds = node.bindStaticId.split(','); // tab元件绑定的元件id
|
12
|
+
const currentNode = [{...node}]; // 需要删除的关联元件数据
|
13
|
+
for (let i = 0; i < bindConfIds.length; i++) {
|
14
|
+
const id = bindConfIds[i];
|
15
|
+
if(tabAreaData[id]) {
|
16
|
+
currentNode.push(tabAreaData[id]);
|
17
|
+
delete tabAreaData[id];
|
18
|
+
}
|
19
|
+
}
|
20
|
+
const changeData = topologyChangeData[`${switchTabType}Data`];
|
21
|
+
delete changeData[node.id];
|
22
|
+
if(Object.keys(changeData).length) {
|
23
|
+
// 第一个页签设置选中效果
|
24
|
+
const firstNode = Object.values(changeData)[0];
|
25
|
+
firstNode.activeImgeIndex = false;
|
26
|
+
const firstNodeBindConfIds = firstNode.bindStaticId.split(','); // tab元件绑定的元件id
|
27
|
+
// 为绑定的每个元件设置可见
|
28
|
+
for (let i = 0; i < firstNodeBindConfIds.length; i++) {
|
29
|
+
const tabAreaNode = tabAreaData[firstNodeBindConfIds[i]];
|
30
|
+
if(tabAreaNode) {
|
31
|
+
tabAreaNode.visible = true;
|
32
|
+
tabAreaNode.visibleSwitch = true;
|
33
|
+
}
|
34
|
+
}
|
35
|
+
}
|
36
|
+
return currentNode;
|
37
|
+
}
|
5
38
|
/**
|
6
39
|
* Tab 数据统计
|
7
40
|
* @param type 统计类型
|
@@ -155,6 +188,15 @@ export function setVarValueData(data) {
|
|
155
188
|
"value": data.name
|
156
189
|
}];
|
157
190
|
}
|
191
|
+
export function setBranchAddressData(data) {
|
192
|
+
return [{
|
193
|
+
"key": "branchVal",
|
194
|
+
"value": data.value
|
195
|
+
}, {
|
196
|
+
"key": "支路地址Key",
|
197
|
+
"value": data.key
|
198
|
+
}];
|
199
|
+
}
|
158
200
|
export function setThreeCategoryIdData(pen, data) {
|
159
201
|
let params = [];
|
160
202
|
const hasThreeCategoryId = pen.data.find((tc) => {
|
package/core/src/utils/params.js
CHANGED
@@ -20,6 +20,7 @@ export function filterParams(id, node) {
|
|
20
20
|
let tagEcharts = [];
|
21
21
|
let echartData = [];
|
22
22
|
let varVaule = [];
|
23
|
+
let branchValue = [];
|
23
24
|
let doorIds = [];
|
24
25
|
let isMqttEventType = false;
|
25
26
|
node.events.map((ev) => {
|
@@ -45,6 +46,9 @@ export function filterParams(id, node) {
|
|
45
46
|
if (item.key.includes('varValue')) {
|
46
47
|
varVaule.push(item.value);
|
47
48
|
}
|
49
|
+
if (item.key === 'branchVal') {
|
50
|
+
branchValue.push(item.value);
|
51
|
+
}
|
48
52
|
})
|
49
53
|
}
|
50
54
|
if (node.data && Object.prototype.toString.call(node.data) === '[object Object]' && node.data.params && node.data.params.id) {
|
@@ -55,6 +59,7 @@ export function filterParams(id, node) {
|
|
55
59
|
commonStore[id].mqttParams.assetIds = [...commonStore[id].mqttParams.assetIds, ...assetIds];
|
56
60
|
commonStore[id].mqttParams.areaIds = [...commonStore[id].mqttParams.areaIds, ...areaIds];
|
57
61
|
commonStore[id].mqttParams.varVaule = [...commonStore[id].mqttParams.varVaule, ...varVaule];
|
62
|
+
commonStore[id].mqttParams.branchValue = [...commonStore[id].mqttParams.branchValue, ...branchValue];
|
58
63
|
commonStore[id].mqttParams.tagEcharts = [...commonStore[id].mqttParams.tagEcharts, ...tagEcharts];
|
59
64
|
commonStore[id].mqttParams.echartData = [...commonStore[id].mqttParams.echartData, ...echartData];
|
60
65
|
}
|
package/package.json
CHANGED
package/style/common.css
CHANGED
@@ -0,0 +1,44 @@
|
|
1
|
+
.topology-datePicker{
|
2
|
+
position: relative;
|
3
|
+
box-sizing: border-box;
|
4
|
+
}
|
5
|
+
.topology-datePicker i{
|
6
|
+
display: inline-block;
|
7
|
+
}
|
8
|
+
.topology-datePicker input{
|
9
|
+
width: 100%;
|
10
|
+
height: 100%;
|
11
|
+
line-height: 100%;
|
12
|
+
border: none;
|
13
|
+
background: transparent;
|
14
|
+
vertical-align: top;
|
15
|
+
}
|
16
|
+
.topology-datePicker input::placeholder{
|
17
|
+
font-weight: normal;
|
18
|
+
color: rgb(220, 223, 230);
|
19
|
+
}
|
20
|
+
.topology-datePicker input:active,
|
21
|
+
.topology-datePicker input:focus{
|
22
|
+
outline: none;
|
23
|
+
}
|
24
|
+
.topology-datePicker .icon-date,
|
25
|
+
.topology-datePicker .icon-arrow{
|
26
|
+
position: absolute;
|
27
|
+
top: 50%;
|
28
|
+
transform: translateY(-50%);
|
29
|
+
}
|
30
|
+
.layui-laydate-main{
|
31
|
+
width: 322px !important;
|
32
|
+
}
|
33
|
+
.layui-laydate-main table{
|
34
|
+
width: 100%;
|
35
|
+
}
|
36
|
+
.layui-laydate-header i{
|
37
|
+
font-size: 14px !important;
|
38
|
+
}
|
39
|
+
.laydate-set-ym {
|
40
|
+
font-size: 16px;
|
41
|
+
}
|
42
|
+
.layui-laydate-footer span.layui-laydate-preview{
|
43
|
+
font-size: 14px;
|
44
|
+
}
|
package/style/editor.css
CHANGED