dcim-topology2d 2.2.0 → 3.0.2
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/activity-diagram/src/final/final.d.ts +1 -1
 - package/activity-diagram/src/final/final.rect.d.ts +1 -1
 - package/activity-diagram/src/final/final.rect.js +1 -1
 - package/activity-diagram/src/fork/fork.anchor.d.ts +1 -1
 - package/activity-diagram/src/fork/fork.anchor.js +1 -1
 - package/activity-diagram/src/fork/fork.d.ts +1 -1
 - package/activity-diagram/src/fork/fork.rect.d.ts +1 -1
 - package/activity-diagram/src/fork/fork.rect.js +1 -1
 - package/activity-diagram/src/register.js +1 -1
 - package/activity-diagram/src/swimlaneH/swimlaneH.d.ts +1 -1
 - package/activity-diagram/src/swimlaneH/swimlaneH.rect.d.ts +1 -1
 - package/activity-diagram/src/swimlaneH/swimlaneH.rect.js +1 -1
 - package/activity-diagram/src/swimlaneV/swimlaneV.d.ts +1 -1
 - package/activity-diagram/src/swimlaneV/swimlaneV.rect.d.ts +1 -1
 - package/activity-diagram/src/swimlaneV/swimlaneV.rect.js +1 -1
 - package/chart-diagram/index.d.ts +1 -3
 - package/chart-diagram/index.js +1 -2
 - package/chart-diagram/src/echarts/index.d.ts +2 -1
 - package/chart-diagram/src/echarts/index.js +104 -112
 - package/chart-diagram/src/register.js +8 -9
 - package/class-diagram/src/class/class.d.ts +1 -1
 - package/class-diagram/src/class/class.rect.d.ts +1 -1
 - package/class-diagram/src/class/class.rect.js +1 -1
 - package/class-diagram/src/register.js +1 -1
 - package/core/index.d.ts +0 -2
 - package/core/index.js +0 -2
 - package/core/src/activeLayer.d.ts +10 -2
 - package/core/src/activeLayer.js +47 -42
 - package/core/src/animateLayer.d.ts +7 -3
 - package/core/src/animateLayer.js +12 -10
 - package/core/src/calling.d.ts +4 -1
 - package/core/src/calling.js +41 -43
 - package/core/src/canvas.d.ts +6 -1
 - package/core/src/canvas.js +21 -22
 - package/core/src/common.d.ts +7 -6
 - package/core/src/common.js +675 -343
 - package/core/src/core.d.ts +4 -5
 - package/core/src/core.js +385 -536
 - package/core/src/divLayer.d.ts +36 -2
 - package/core/src/divLayer.js +305 -33
 - package/core/src/healps/changeData.d.ts +2 -1
 - package/core/src/healps/changeData.js +100 -86
 - package/core/src/hoverLayer.d.ts +9 -2
 - package/core/src/hoverLayer.js +34 -31
 - package/core/src/middles/default.d.ts +3 -1
 - package/core/src/middles/default.js +51 -63
 - package/core/src/middles/index.js +2 -3
 - package/core/src/middles/nodes/arbitrarygraph.js +9 -11
 - package/core/src/middles/nodes/pentagon.rect.js +1 -1
 - package/core/src/middles/nodes/rectangle.rect.js +1 -1
 - package/core/src/models/data.d.ts +26 -0
 - package/core/src/models/data.js +77 -0
 - package/core/src/models/data.js.map +1 -0
 - package/core/src/models/index.d.ts +1 -0
 - package/core/src/models/index.js +1 -0
 - package/core/src/models/line.js +7 -7
 - package/core/src/models/node.d.ts +0 -10
 - package/core/src/models/node.js +101 -148
 - package/core/src/models/pen.js +67 -27
 - package/core/src/models/rect.js +2 -2
 - package/core/src/mqtt.d.ts +14 -0
 - package/core/src/mqtt.js +82 -0
 - package/core/src/mqtt.js.map +1 -0
 - package/core/src/offscreen.d.ts +4 -1
 - package/core/src/offscreen.js +24 -26
 - package/core/src/options.d.ts +1 -3
 - package/core/src/options.js +0 -2
 - package/core/src/poll.js +39 -0
 - package/core/src/preview.d.ts +13 -2
 - package/core/src/preview.js +43 -144
 - package/core/src/renderLayer.d.ts +9 -11
 - package/core/src/renderLayer.js +61 -60
 - package/core/src/socket.d.ts +10 -0
 - package/core/src/socket.js +51 -0
 - package/core/src/socket.js.map +1 -0
 - package/core/src/utils/canvas.js +1 -1
 - package/core/src/utils/construction.d.ts +3 -36
 - package/core/src/utils/construction.js +1 -29
 - package/core/src/utils/conversion.d.ts +0 -15
 - package/core/src/utils/conversion.js +0 -319
 - package/core/src/utils/dom.d.ts +8 -0
 - package/core/src/utils/dom.js +67 -0
 - package/core/src/utils/dom.js.map +1 -0
 - package/core/src/utils/index.d.ts +1 -2
 - package/core/src/utils/index.js +1 -2
 - package/core/src/utils/onmousevent.d.ts +0 -3
 - package/core/src/utils/onmousevent.js +10 -42
 - package/flow-diagram/src/comment/comment.anchor.d.ts +1 -1
 - package/flow-diagram/src/comment/comment.anchor.js +1 -1
 - package/flow-diagram/src/comment/comment.d.ts +1 -1
 - package/flow-diagram/src/data/data.anchor.d.ts +1 -1
 - package/flow-diagram/src/data/data.anchor.js +1 -1
 - package/flow-diagram/src/data/data.d.ts +1 -1
 - package/flow-diagram/src/data/data.rect.d.ts +1 -1
 - package/flow-diagram/src/data/data.rect.js +1 -1
 - package/flow-diagram/src/db/db.d.ts +1 -1
 - package/flow-diagram/src/db/db.rect.d.ts +1 -1
 - package/flow-diagram/src/db/db.rect.js +1 -1
 - package/flow-diagram/src/display/display.anchor.d.ts +1 -1
 - package/flow-diagram/src/display/display.anchor.js +1 -1
 - package/flow-diagram/src/display/display.d.ts +1 -1
 - package/flow-diagram/src/display/display.rect.d.ts +1 -1
 - package/flow-diagram/src/display/display.rect.js +1 -1
 - package/flow-diagram/src/document/document.anchor.d.ts +1 -1
 - package/flow-diagram/src/document/document.anchor.js +1 -1
 - package/flow-diagram/src/document/document.d.ts +1 -1
 - package/flow-diagram/src/document/document.rect.d.ts +1 -1
 - package/flow-diagram/src/document/document.rect.js +1 -1
 - package/flow-diagram/src/externStorage/externStorage.anchor.d.ts +1 -1
 - package/flow-diagram/src/externStorage/externStorage.anchor.js +1 -1
 - package/flow-diagram/src/externStorage/externStorage.d.ts +1 -1
 - package/flow-diagram/src/externStorage/externStorage.rect.d.ts +1 -1
 - package/flow-diagram/src/externStorage/externStorage.rect.js +1 -1
 - package/flow-diagram/src/internalStorage/internalStorage.d.ts +1 -1
 - package/flow-diagram/src/internalStorage/internalStorage.rect.d.ts +1 -1
 - package/flow-diagram/src/internalStorage/internalStorage.rect.js +1 -1
 - package/flow-diagram/src/manually/manually.anchor.d.ts +1 -1
 - package/flow-diagram/src/manually/manually.anchor.js +1 -1
 - package/flow-diagram/src/manually/manually.d.ts +1 -1
 - package/flow-diagram/src/manually/manually.rect.d.ts +1 -1
 - package/flow-diagram/src/manually/manually.rect.js +1 -1
 - package/flow-diagram/src/parallel/parallel.anchor.d.ts +1 -1
 - package/flow-diagram/src/parallel/parallel.anchor.js +1 -1
 - package/flow-diagram/src/parallel/parallel.d.ts +1 -1
 - package/flow-diagram/src/queue/queue.d.ts +1 -1
 - package/flow-diagram/src/queue/queue.rect.d.ts +1 -1
 - package/flow-diagram/src/queue/queue.rect.js +1 -1
 - package/flow-diagram/src/register.js +1 -1
 - package/flow-diagram/src/subprocess/subprocess.d.ts +1 -1
 - package/flow-diagram/src/subprocess/subprocess.rect.d.ts +1 -1
 - package/flow-diagram/src/subprocess/subprocess.rect.js +1 -1
 - package/layout/src/align.d.ts +1 -1
 - package/layout/src/align.js +1 -1
 - package/layout/src/layout.d.ts +1 -1
 - package/layout/src/layout.js +1 -1
 - package/myShape-diagram/{index.js → myShape.js} +1 -4
 - package/package.json +1 -1
 - package/sequence-diagram/src/focus/focus.anchor.d.ts +1 -1
 - package/sequence-diagram/src/focus/focus.anchor.js +1 -1
 - package/sequence-diagram/src/focus/focus.d.ts +1 -1
 - package/sequence-diagram/src/focus/focus.rect.d.ts +1 -1
 - package/sequence-diagram/src/focus/focus.rect.js +1 -1
 - package/sequence-diagram/src/lifeline/lifeline.anchor.d.ts +1 -1
 - package/sequence-diagram/src/lifeline/lifeline.anchor.js +1 -1
 - package/sequence-diagram/src/lifeline/lifeline.d.ts +1 -1
 - package/sequence-diagram/src/lifeline/lifeline.rect.d.ts +1 -1
 - package/sequence-diagram/src/lifeline/lifeline.rect.js +1 -1
 - package/sequence-diagram/src/register.js +1 -1
 - package/chart-diagram/src/utils/changeOptions.d.ts +0 -8
 - package/chart-diagram/src/utils/changeOptions.js +0 -267
 - package/chart-diagram/src/utils/conversion.d.ts +0 -19
 - package/chart-diagram/src/utils/conversion.js +0 -560
 - package/chart-diagram/src/utils/drawGraphic.d.ts +0 -3
 - package/chart-diagram/src/utils/drawGraphic.js +0 -97
 - package/chart-diagram/src/utils/formatter.d.ts +0 -1
 - package/chart-diagram/src/utils/formatter.js +0 -206
 - package/chart-diagram/src/utils/index.d.ts +0 -5
 - package/chart-diagram/src/utils/index.js +0 -5
 - package/chart-diagram/src/utils/render.d.ts +0 -8
 - package/chart-diagram/src/utils/render.js +0 -219
 - package/chart-diagram/src/utils/surfaceParametricConversion.d.ts +0 -3
 - package/chart-diagram/src/utils/surfaceParametricConversion.js +0 -252
 - package/core/src/element/common.d.ts +0 -6
 - package/core/src/element/common.js +0 -63
 - package/core/src/element/datePicker.d.ts +0 -3
 - package/core/src/element/datePicker.js +0 -44
 - package/core/src/element/iframe.d.ts +0 -3
 - package/core/src/element/iframe.js +0 -12
 - package/core/src/element/index.d.ts +0 -5
 - package/core/src/element/index.js +0 -6
 - package/core/src/element/select.d.ts +0 -11
 - package/core/src/element/select.js +0 -273
 - package/core/src/element/tab.d.ts +0 -1
 - package/core/src/element/tab.js +0 -20
 - package/core/src/element/time.d.ts +0 -3
 - package/core/src/element/time.js +0 -44
 - package/core/src/middles/arrows/index.d.ts +0 -4
 - package/core/src/middles/arrows/index.js +0 -5
 - package/core/src/middles/lines/index.d.ts +0 -4
 - package/core/src/middles/lines/index.js +0 -5
 - package/core/src/middles/nodes/formDatePicker.d.ts +0 -2
 - package/core/src/middles/nodes/formDatePicker.js +0 -107
 - package/core/src/middles/nodes/formoverflow.js +0 -61
 - package/core/src/middles/nodes/formselect.d.ts +0 -2
 - package/core/src/middles/nodes/formselect.js +0 -111
 - package/core/src/middles/nodes/iframe.d.ts +0 -2
 - package/core/src/middles/nodes/iframe.js +0 -29
 - package/core/src/middles/nodes/index.d.ts +0 -51
 - package/core/src/middles/nodes/index.js +0 -53
 - package/core/src/middles/nodes/switchs.d.ts +0 -2
 - package/core/src/middles/nodes/switchs.js +0 -46
 - package/core/src/middles/nodes/time.d.ts +0 -2
 - package/core/src/middles/nodes/time.js +0 -98
 - package/core/src/store/common.d.ts +0 -9
 - package/core/src/store/common.js +0 -5
 - package/core/src/store/data.d.ts +0 -196
 - package/core/src/store/data.js +0 -193
 - package/core/src/store/index.d.ts +0 -2
 - package/core/src/store/index.js +0 -2
 - package/core/src/utils/assignment.d.ts +0 -7
 - package/core/src/utils/assignment.js +0 -216
 - package/core/src/utils/params.d.ts +0 -3
 - package/core/src/utils/params.js +0 -136
 - package/static/echartsDefaultData.js +0 -178
 - package/static/element.js +0 -14
 - package/static/form.js +0 -11
 - package/static/index.js +0 -3
 - package/store/actions.js +0 -1
 - package/store/clear.js +0 -10
 - package/store/default.js +0 -22
 - package/store/index.js +0 -3
 - package/style/common.css +0 -15
 - package/style/datePicker.css +0 -44
 - package/style/editor.css +0 -16
 - package/style/index.css +0 -5
 - package/style/select.css +0 -143
 - /package/myShape-diagram/{index.ts → myShape.ts} +0 -0
 
    
        package/core/src/store/index.js
    DELETED
    
    
| 
         @@ -1,7 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            import {Node} from '../models';
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
            export declare function setInitNodeDataValidat(node: any, TID: string, type: string, order: number): void;
         
     | 
| 
       4 
     | 
    
         
            -
            export declare function initDefaultValidat(node: any, retData: any): void;
         
     | 
| 
       5 
     | 
    
         
            -
            export declare function setDefaultNodeValidat(node: any, retData: any): any;
         
     | 
| 
       6 
     | 
    
         
            -
            export declare function setConnectionTagForConf(node: Node): void;
         
     | 
| 
       7 
     | 
    
         
            -
            export declare function setConnectionTabsData(node: Node): void;
         
     | 
| 
         @@ -1,216 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            // 变量赋值操作
         
     | 
| 
       2 
     | 
    
         
            -
            import {commonStore} from '../store';
         
     | 
| 
       3 
     | 
    
         
            -
            import { setConfItemNode } from '../healps';
         
     | 
| 
       4 
     | 
    
         
            -
            import { EventAction } from '../models';
         
     | 
| 
       5 
     | 
    
         
            -
            import {confAssociateDateValueShowType, datePickerValueFormatting} from '../utils';
         
     | 
| 
       6 
     | 
    
         
            -
            /**
         
     | 
| 
       7 
     | 
    
         
            -
             * 在节点注册前初始化node数据
         
     | 
| 
       8 
     | 
    
         
            -
             * @param node 节点数据
         
     | 
| 
       9 
     | 
    
         
            -
             * @param TID 数据键
         
     | 
| 
       10 
     | 
    
         
            -
             * @param type topology类型
         
     | 
| 
       11 
     | 
    
         
            -
             * @param order 节点序列
         
     | 
| 
       12 
     | 
    
         
            -
             */
         
     | 
| 
       13 
     | 
    
         
            -
            export function setInitNodeDataValidat(node, TID, type, order) {
         
     | 
| 
       14 
     | 
    
         
            -
             
     | 
| 
       15 
     | 
    
         
            -
                const syncData = commonStore[TID].mqttData;
         
     | 
| 
       16 
     | 
    
         
            -
             
     | 
| 
       17 
     | 
    
         
            -
                node.TID = TID;
         
     | 
| 
       18 
     | 
    
         
            -
             
     | 
| 
       19 
     | 
    
         
            -
                if(typeof node.visibleSwitch !== 'boolean') {
         
     | 
| 
       20 
     | 
    
         
            -
                    // 兼容旧版显示隐藏属性值设置
         
     | 
| 
       21 
     | 
    
         
            -
                    node.visibleSwitch = type === 'topology';
         
     | 
| 
       22 
     | 
    
         
            -
                }else {
         
     | 
| 
       23 
     | 
    
         
            -
                    node.visibleSwitch = type === 'topology' && node.visibleSwitch;
         
     | 
| 
       24 
     | 
    
         
            -
                }
         
     | 
| 
       25 
     | 
    
         
            -
             
     | 
| 
       26 
     | 
    
         
            -
                if(typeof order === "number") node.order = order;
         
     | 
| 
       27 
     | 
    
         
            -
                if(type !== 'topology') node.selectDropdown = false;
         
     | 
| 
       28 
     | 
    
         
            -
             
     | 
| 
       29 
     | 
    
         
            -
                initDefaultValidat(node, syncData);
         
     | 
| 
       30 
     | 
    
         
            -
             
     | 
| 
       31 
     | 
    
         
            -
                setDefaultNodeValidat(node, syncData);
         
     | 
| 
       32 
     | 
    
         
            -
             
     | 
| 
       33 
     | 
    
         
            -
                if (node.children && node.children.length) {
         
     | 
| 
       34 
     | 
    
         
            -
             
     | 
| 
       35 
     | 
    
         
            -
                    node.children.map((_item) => {
         
     | 
| 
       36 
     | 
    
         
            -
             
     | 
| 
       37 
     | 
    
         
            -
                        setInitNodeDataValidat(_item, TID, type);
         
     | 
| 
       38 
     | 
    
         
            -
             
     | 
| 
       39 
     | 
    
         
            -
                    })
         
     | 
| 
       40 
     | 
    
         
            -
             
     | 
| 
       41 
     | 
    
         
            -
                }
         
     | 
| 
       42 
     | 
    
         
            -
            }
         
     | 
| 
       43 
     | 
    
         
            -
            // 初始化默认节点值
         
     | 
| 
       44 
     | 
    
         
            -
            export function initDefaultValidat(node, retData) {
         
     | 
| 
       45 
     | 
    
         
            -
                node.defaultFillStyle = node.fillStyle;
         
     | 
| 
       46 
     | 
    
         
            -
                node.defaultFontColor = node.font.color;
         
     | 
| 
       47 
     | 
    
         
            -
                if (node.name === 'line') {
         
     | 
| 
       48 
     | 
    
         
            -
                    node.defaultStrokeStyle = node.strokeStyle;
         
     | 
| 
       49 
     | 
    
         
            -
                }
         
     | 
| 
       50 
     | 
    
         
            -
                setPickerDateConnectData(node);
         
     | 
| 
       51 
     | 
    
         
            -
                setVarBranchData(node, retData);
         
     | 
| 
       52 
     | 
    
         
            -
            }
         
     | 
| 
       53 
     | 
    
         
            -
            // 初始化配置日期元件关联的数据
         
     | 
| 
       54 
     | 
    
         
            -
            function setPickerDateConnectData(node) {
         
     | 
| 
       55 
     | 
    
         
            -
                if(node.formData && node.formData.bindDateShowType === confAssociateDateValueShowType.date) {
         
     | 
| 
       56 
     | 
    
         
            -
                    const pickerData = commonStore[node.TID].pickerDataPool;
         
     | 
| 
       57 
     | 
    
         
            -
                    if(!pickerData.bindData) pickerData.bindData = {};
         
     | 
| 
       58 
     | 
    
         
            -
                    pickerData.bindData[node.id] = {
         
     | 
| 
       59 
     | 
    
         
            -
                        order: node.order,
         
     | 
| 
       60 
     | 
    
         
            -
                        dateId: node.formData.dateId
         
     | 
| 
       61 
     | 
    
         
            -
                    };
         
     | 
| 
       62 
     | 
    
         
            -
                    node.text = datePickerValueFormatting({
         
     | 
| 
       63 
     | 
    
         
            -
                        formatType: node.formData.dateFormat,
         
     | 
| 
       64 
     | 
    
         
            -
                        valueType: node.formData.valueType
         
     | 
| 
       65 
     | 
    
         
            -
                    }).dateStr;
         
     | 
| 
       66 
     | 
    
         
            -
                }
         
     | 
| 
       67 
     | 
    
         
            -
            }
         
     | 
| 
       68 
     | 
    
         
            -
            // 设置变量类型和支路地址的异步数据
         
     | 
| 
       69 
     | 
    
         
            -
            function setVarBranchData(node, retData) {
         
     | 
| 
       70 
     | 
    
         
            -
                if(!retData) return;
         
     | 
| 
       71 
     | 
    
         
            -
                const componentData = retData.componentData;
         
     | 
| 
       72 
     | 
    
         
            -
                let varData = null;
         
     | 
| 
       73 
     | 
    
         
            -
                let branchNameData = null;
         
     | 
| 
       74 
     | 
    
         
            -
                if(componentData) {
         
     | 
| 
       75 
     | 
    
         
            -
                    varData = componentData[node.id] || {};
         
     | 
| 
       76 
     | 
    
         
            -
                    branchNameData = componentData[node.id] || {};
         
     | 
| 
       77 
     | 
    
         
            -
                }else {
         
     | 
| 
       78 
     | 
    
         
            -
                    varData = retData.varData;
         
     | 
| 
       79 
     | 
    
         
            -
                    branchNameData = retData.branchNameData;
         
     | 
| 
       80 
     | 
    
         
            -
                }
         
     | 
| 
       81 
     | 
    
         
            -
                const dataDictionary = {...varData, ...branchNameData};
         
     | 
| 
       82 
     | 
    
         
            -
                // 变量类型数据展示,不需要实时更新
         
     | 
| 
       83 
     | 
    
         
            -
                if(Array.isArray(node.data) && Object.keys(dataDictionary).length) {
         
     | 
| 
       84 
     | 
    
         
            -
                    let typeName = '';
         
     | 
| 
       85 
     | 
    
         
            -
                    let imgs = '';
         
     | 
| 
       86 
     | 
    
         
            -
                    const assetId = retData.asset && retData.asset.assetId;
         
     | 
| 
       87 
     | 
    
         
            -
                    node.data.map((vd) => {
         
     | 
| 
       88 
     | 
    
         
            -
                        const varNode = dataDictionary[vd.value] || dataDictionary[`${assetId}_${vd.value}`];
         
     | 
| 
       89 
     | 
    
         
            -
                        if((vd.key.includes('varValue') || vd.key.includes('branchVal')) && varNode){
         
     | 
| 
       90 
     | 
    
         
            -
                            const showType = varNode.showType ? parseInt(varNode.showType) : 1;
         
     | 
| 
       91 
     | 
    
         
            -
                            if(showType === 1 && varNode.value) typeName += typeName ? `,${varNode.value}` : varNode.value;
         
     | 
| 
       92 
     | 
    
         
            -
                            if(showType === 2 && varNode.value) console.log('显示图标>>>');
         
     | 
| 
       93 
     | 
    
         
            -
                            if(showType === 3 && varNode.value) imgs = `/dcim-api${varNode.value}`; //imgs += imgs ? `,${varData.value}` : varData.value;
         
     | 
| 
       94 
     | 
    
         
            -
                        }
         
     | 
| 
       95 
     | 
    
         
            -
                    });
         
     | 
| 
       96 
     | 
    
         
            -
                    if(typeName) node.text = typeName;
         
     | 
| 
       97 
     | 
    
         
            -
                    if(imgs) {
         
     | 
| 
       98 
     | 
    
         
            -
                        node.text = '';
         
     | 
| 
       99 
     | 
    
         
            -
                        node.image = imgs;
         
     | 
| 
       100 
     | 
    
         
            -
                        node.paddingBottom = 0;
         
     | 
| 
       101 
     | 
    
         
            -
                        node.paddingBottomNum = 0;
         
     | 
| 
       102 
     | 
    
         
            -
                        node.paddingLeft = 0;
         
     | 
| 
       103 
     | 
    
         
            -
                        node.paddingLeftNum = 0;
         
     | 
| 
       104 
     | 
    
         
            -
                        node.paddingRight = 0;
         
     | 
| 
       105 
     | 
    
         
            -
                        node.paddingRightNum = 0;
         
     | 
| 
       106 
     | 
    
         
            -
                        node.paddingTop = 0;
         
     | 
| 
       107 
     | 
    
         
            -
                        node.paddingTopNum = 0;
         
     | 
| 
       108 
     | 
    
         
            -
                    }
         
     | 
| 
       109 
     | 
    
         
            -
                }
         
     | 
| 
       110 
     | 
    
         
            -
            }
         
     | 
| 
       111 
     | 
    
         
            -
            // 初始化mqtt实时值
         
     | 
| 
       112 
     | 
    
         
            -
            export function setDefaultNodeValidat(node, retData) {
         
     | 
| 
       113 
     | 
    
         
            -
                //const item = JSON.parse(JSON.stringify(node));
         
     | 
| 
       114 
     | 
    
         
            -
                if (!retData) return;
         
     | 
| 
       115 
     | 
    
         
            -
                //const node = detailData.length > 0 ? detailData : syncData
         
     | 
| 
       116 
     | 
    
         
            -
                const functionData = node.events.filter((ev) => {
         
     | 
| 
       117 
     | 
    
         
            -
                    return ev.action === EventAction.Function
         
     | 
| 
       118 
     | 
    
         
            -
                });
         
     | 
| 
       119 
     | 
    
         
            -
                const dataValue = functionData[0]
         
     | 
| 
       120 
     | 
    
         
            -
                if (functionData.length && dataValue.value && retData) {
         
     | 
| 
       121 
     | 
    
         
            -
                    if(node.data && node.data.length) node.data.map((d) => {
         
     | 
| 
       122 
     | 
    
         
            -
                        const {kpiData, tagData} = retData;
         
     | 
| 
       123 
     | 
    
         
            -
                        const key = d.key;
         
     | 
| 
       124 
     | 
    
         
            -
                        const value = d.value;
         
     | 
| 
       125 
     | 
    
         
            -
                        const _syncItem = key === 'tagId' ? tagData[value] : kpiData[value];
         
     | 
| 
       126 
     | 
    
         
            -
                        if ((key === 'tagId' || key === 'kpiAddr') && _syncItem) {
         
     | 
| 
       127 
     | 
    
         
            -
                            const isControl = parseInt(_syncItem.isControlDis); // 是否可控,0可控,1不可控
         
     | 
| 
       128 
     | 
    
         
            -
                            if (!isControl) {
         
     | 
| 
       129 
     | 
    
         
            -
                                d.tagVal = value
         
     | 
| 
       130 
     | 
    
         
            -
                                d.controlParams = _syncItem
         
     | 
| 
       131 
     | 
    
         
            -
                                // delete _syncItem[value]
         
     | 
| 
       132 
     | 
    
         
            -
                                // Object.assign(d, _syncItem)
         
     | 
| 
       133 
     | 
    
         
            -
                            }
         
     | 
| 
       134 
     | 
    
         
            -
                        }
         
     | 
| 
       135 
     | 
    
         
            -
                    })
         
     | 
| 
       136 
     | 
    
         
            -
                    // console.log('定制函数=====')
         
     | 
| 
       137 
     | 
    
         
            -
                    try {
         
     | 
| 
       138 
     | 
    
         
            -
                        const func = new Function('pen', 'params', dataValue.value);
         
     | 
| 
       139 
     | 
    
         
            -
                        const funcData = func(node, JSON.stringify(retData));
         
     | 
| 
       140 
     | 
    
         
            -
                        /**
         
     | 
| 
       141 
     | 
    
         
            -
                         * 此方式在九所的 服务器状态监测功能中用到
         
     | 
| 
       142 
     | 
    
         
            -
                         * 全局报警标记,代表正在访问的这个topology文件中是否有告警发生
         
     | 
| 
       143 
     | 
    
         
            -
                         * 需要注意:自定义函数中要通过 return {monitorAlarm: boolean}的格式将元件告警状态返回
         
     | 
| 
       144 
     | 
    
         
            -
                         */
         
     | 
| 
       145 
     | 
    
         
            -
                        if(funcData && funcData.monitorAlarm && commonStore[node.TID]) commonStore[node.TID].monitorAlarm = true;
         
     | 
| 
       146 
     | 
    
         
            -
                    }catch (e) {
         
     | 
| 
       147 
     | 
    
         
            -
                        console.log(`自定义函数出错>>>`,);
         
     | 
| 
       148 
     | 
    
         
            -
                        console.log(`目标元件:${node.id}>>>`,);
         
     | 
| 
       149 
     | 
    
         
            -
                        console.log(`目标元件方位:X->${node.rect.x},Y->${node.rect.y}>>>`,);
         
     | 
| 
       150 
     | 
    
         
            -
                    }
         
     | 
| 
       151 
     | 
    
         
            -
                } else {
         
     | 
| 
       152 
     | 
    
         
            -
                    // console.log('默认函数')
         
     | 
| 
       153 
     | 
    
         
            -
                    const newData = setConfItemNode(node, retData);
         
     | 
| 
       154 
     | 
    
         
            -
                    if(newData && newData.monitorAlarm && commonStore[node.TID]) commonStore[node.TID].monitorAlarm = true;
         
     | 
| 
       155 
     | 
    
         
            -
                }
         
     | 
| 
       156 
     | 
    
         
            -
                if (node.animateFrames && node.animateFrames.length) {
         
     | 
| 
       157 
     | 
    
         
            -
                    for (var _a = 0, _af = node.animateFrames; _a < _af.length; _a++) {
         
     | 
| 
       158 
     | 
    
         
            -
                        var ani = _af[_a];
         
     | 
| 
       159 
     | 
    
         
            -
                        ani.state.strokeStyle = node.strokeStyle;
         
     | 
| 
       160 
     | 
    
         
            -
                        ani.state.fillStyle = node.fillStyle;
         
     | 
| 
       161 
     | 
    
         
            -
                    }
         
     | 
| 
       162 
     | 
    
         
            -
                }
         
     | 
| 
       163 
     | 
    
         
            -
                //return node;
         
     | 
| 
       164 
     | 
    
         
            -
            }
         
     | 
| 
       165 
     | 
    
         
            -
             
     | 
| 
       166 
     | 
    
         
            -
            /**
         
     | 
| 
       167 
     | 
    
         
            -
             * 配置与元件关联的tag数据
         
     | 
| 
       168 
     | 
    
         
            -
             * @param node 元件节点数据
         
     | 
| 
       169 
     | 
    
         
            -
             */
         
     | 
| 
       170 
     | 
    
         
            -
            export function setConnectionTagForConf(node) {
         
     | 
| 
       171 
     | 
    
         
            -
                if(!node.tags || node.tags && !node.tags.length) return;
         
     | 
| 
       172 
     | 
    
         
            -
                let setType = '';
         
     | 
| 
       173 
     | 
    
         
            -
                node.tags.map((t) => {
         
     | 
| 
       174 
     | 
    
         
            -
                    if(t === 'statisticType' || t.includes('switchTabType')) setType = 'tab';
         
     | 
| 
       175 
     | 
    
         
            -
                    if(t.includes('selectOption')) setType = 'selectShow';
         
     | 
| 
       176 
     | 
    
         
            -
                });
         
     | 
| 
       177 
     | 
    
         
            -
                if(!setType) console.log('>>>未能找到绑定的标签数据,请检查绑定的Tabs标签是否包含switchTabType前缀>>>');
         
     | 
| 
       178 
     | 
    
         
            -
                if(setType === 'tab'){
         
     | 
| 
       179 
     | 
    
         
            -
                    // tab切换
         
     | 
| 
       180 
     | 
    
         
            -
                    setConnectionTabsData(node);
         
     | 
| 
       181 
     | 
    
         
            -
                }
         
     | 
| 
       182 
     | 
    
         
            -
                if(setType === 'selectShow'){
         
     | 
| 
       183 
     | 
    
         
            -
                    // 下拉显示隐藏
         
     | 
| 
       184 
     | 
    
         
            -
                    const tagData = node.tags[0].split('-');
         
     | 
| 
       185 
     | 
    
         
            -
                    const parentId = tagData[1] && tagData[1].trim();
         
     | 
| 
       186 
     | 
    
         
            -
                    if(!parentId) return console.log('>>>请检查select节点ID是否设置正确【selectOption+其他任意字符-下拉元件ID】>>>');
         
     | 
| 
       187 
     | 
    
         
            -
                    if(parentId) {
         
     | 
| 
       188 
     | 
    
         
            -
                        const params = {
         
     | 
| 
       189 
     | 
    
         
            -
                            TID: node.TID,
         
     | 
| 
       190 
     | 
    
         
            -
                            id: node.id,
         
     | 
| 
       191 
     | 
    
         
            -
                            name: node.name,
         
     | 
| 
       192 
     | 
    
         
            -
                            order: node.order,
         
     | 
| 
       193 
     | 
    
         
            -
                            visible: node.visible,
         
     | 
| 
       194 
     | 
    
         
            -
                            tag: node.tags[0].trim()
         
     | 
| 
       195 
     | 
    
         
            -
                        }
         
     | 
| 
       196 
     | 
    
         
            -
                        if(!commonStore[node.TID].selectTabDataPool[parentId]) commonStore[node.TID].selectTabDataPool[parentId] = new Map();
         
     | 
| 
       197 
     | 
    
         
            -
                        commonStore[node.TID].selectTabDataPool[parentId].set(node.id, params);
         
     | 
| 
       198 
     | 
    
         
            -
                    }
         
     | 
| 
       199 
     | 
    
         
            -
                }
         
     | 
| 
       200 
     | 
    
         
            -
            }
         
     | 
| 
       201 
     | 
    
         
            -
             
     | 
| 
       202 
     | 
    
         
            -
            /**
         
     | 
| 
       203 
     | 
    
         
            -
             * 初始化配置tabs数据
         
     | 
| 
       204 
     | 
    
         
            -
             * @param node
         
     | 
| 
       205 
     | 
    
         
            -
             */
         
     | 
| 
       206 
     | 
    
         
            -
            export function setConnectionTabsData(node) {
         
     | 
| 
       207 
     | 
    
         
            -
                const switchTabType = node.tags.find((t) => {
         
     | 
| 
       208 
     | 
    
         
            -
                    return t.includes('switchTabType');
         
     | 
| 
       209 
     | 
    
         
            -
                }); // 获取按钮组类型
         
     | 
| 
       210 
     | 
    
         
            -
                if(!switchTabType) return;
         
     | 
| 
       211 
     | 
    
         
            -
                const isTabs = node.events && node.events.find((ev) => ev.action === 8);
         
     | 
| 
       212 
     | 
    
         
            -
                let topologyChangeData = commonStore[node.TID].switchTabDataPool;
         
     | 
| 
       213 
     | 
    
         
            -
                let keyName = node.bindStaticId && isTabs ? `${switchTabType}Data` : `${switchTabType}AreaData`;
         
     | 
| 
       214 
     | 
    
         
            -
                if (!topologyChangeData[keyName]) topologyChangeData[keyName] = {};
         
     | 
| 
       215 
     | 
    
         
            -
                topologyChangeData[keyName][node.id] = node;
         
     | 
| 
       216 
     | 
    
         
            -
            }
         
     | 
    
        package/core/src/utils/params.js
    DELETED
    
    | 
         @@ -1,136 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            import {commonStore} from '../store';
         
     | 
| 
       2 
     | 
    
         
            -
            import {datePickerValueFormatting} from "./conversion";
         
     | 
| 
       3 
     | 
    
         
            -
            import {datePickerBindType, confBindValueType} from "./construction";
         
     | 
| 
       4 
     | 
    
         
            -
            const confConfigMap = new Map();
         
     | 
| 
       5 
     | 
    
         
            -
            // 获取绑定数据的参数
         
     | 
| 
       6 
     | 
    
         
            -
            export function getParams(id, data) {
         
     | 
| 
       7 
     | 
    
         
            -
                for (let i = 0, length = data.length; i < length; i++) {
         
     | 
| 
       8 
     | 
    
         
            -
                    const item = data[i];
         
     | 
| 
       9 
     | 
    
         
            -
                    filterParams(id, item);
         
     | 
| 
       10 
     | 
    
         
            -
                    if (item.children && item.children.length) {
         
     | 
| 
       11 
     | 
    
         
            -
                        getParams(id, item.children);
         
     | 
| 
       12 
     | 
    
         
            -
                    }
         
     | 
| 
       13 
     | 
    
         
            -
                    if (item.formData && item.formData.detailPageData && item.formData.detailPageData.pens && item.formData.detailPageData.pens.length) {
         
     | 
| 
       14 
     | 
    
         
            -
                        getParams(id, item.formData.detailPageData.pens);
         
     | 
| 
       15 
     | 
    
         
            -
                    }
         
     | 
| 
       16 
     | 
    
         
            -
                }
         
     | 
| 
       17 
     | 
    
         
            -
                confConfigMap.clear();
         
     | 
| 
       18 
     | 
    
         
            -
            }
         
     | 
| 
       19 
     | 
    
         
            -
            // 过滤出参数
         
     | 
| 
       20 
     | 
    
         
            -
            export function filterParams(id, node) {
         
     | 
| 
       21 
     | 
    
         
            -
                let tagIds = [];
         
     | 
| 
       22 
     | 
    
         
            -
                let kpiAddrs = [];
         
     | 
| 
       23 
     | 
    
         
            -
                let assetIds = [];
         
     | 
| 
       24 
     | 
    
         
            -
                let areaIds = [];
         
     | 
| 
       25 
     | 
    
         
            -
                let tagEcharts = [];
         
     | 
| 
       26 
     | 
    
         
            -
                let echartData = [];
         
     | 
| 
       27 
     | 
    
         
            -
                let varVaule = [];
         
     | 
| 
       28 
     | 
    
         
            -
                let branchValue = [];
         
     | 
| 
       29 
     | 
    
         
            -
                let doorIds = [];
         
     | 
| 
       30 
     | 
    
         
            -
                let isMqttEventType = false;
         
     | 
| 
       31 
     | 
    
         
            -
                let dcimStaticForType = '';
         
     | 
| 
       32 
     | 
    
         
            -
                node.events.map((ev) => {
         
     | 
| 
       33 
     | 
    
         
            -
                    if(ev.value && ev.value === 'entranceGuard') doorIds.push(ev.params); // 门禁参数
         
     | 
| 
       34 
     | 
    
         
            -
                    if(ev.type === 3) isMqttEventType = true;
         
     | 
| 
       35 
     | 
    
         
            -
                    if(ev.type === 4) dcimStaticForType = ev.dcimStaticForType;
         
     | 
| 
       36 
     | 
    
         
            -
                });
         
     | 
| 
       37 
     | 
    
         
            -
                if(doorIds.length) commonStore[id].mqttParams.doorIds = [...commonStore[id].mqttParams.doorIds, ...doorIds];
         
     | 
| 
       38 
     | 
    
         
            -
                if(!isMqttEventType) return;
         
     | 
| 
       39 
     | 
    
         
            -
                if (node.data && Array.isArray(node.data) && node.data.length) {
         
     | 
| 
       40 
     | 
    
         
            -
                    for (let i = 0, length = node.data.length; i < length; i ++) {
         
     | 
| 
       41 
     | 
    
         
            -
                        const item = node.data[i];
         
     | 
| 
       42 
     | 
    
         
            -
                        let type = 0;
         
     | 
| 
       43 
     | 
    
         
            -
                        if (item.key === 'tagId') {
         
     | 
| 
       44 
     | 
    
         
            -
                            tagIds.push(item.value);
         
     | 
| 
       45 
     | 
    
         
            -
                            type = datePickerBindType.tag;
         
     | 
| 
       46 
     | 
    
         
            -
                        }
         
     | 
| 
       47 
     | 
    
         
            -
                        if (item.key === 'kpiAddr') {
         
     | 
| 
       48 
     | 
    
         
            -
                            kpiAddrs.push(item.value);
         
     | 
| 
       49 
     | 
    
         
            -
                            type = datePickerBindType.kpi;
         
     | 
| 
       50 
     | 
    
         
            -
                        }
         
     | 
| 
       51 
     | 
    
         
            -
                        if (item.key === 'assetId') {
         
     | 
| 
       52 
     | 
    
         
            -
                            assetIds.push(item.value);
         
     | 
| 
       53 
     | 
    
         
            -
                            type = datePickerBindType.asset;
         
     | 
| 
       54 
     | 
    
         
            -
                        }
         
     | 
| 
       55 
     | 
    
         
            -
                        if (item.key === 'areaId') {
         
     | 
| 
       56 
     | 
    
         
            -
                            areaIds.push(item.value);
         
     | 
| 
       57 
     | 
    
         
            -
                            type = datePickerBindType.area;
         
     | 
| 
       58 
     | 
    
         
            -
                        }
         
     | 
| 
       59 
     | 
    
         
            -
                        if (item.key.includes('varValue')) {
         
     | 
| 
       60 
     | 
    
         
            -
                            varVaule.push(item.value);
         
     | 
| 
       61 
     | 
    
         
            -
                            type = datePickerBindType.varType;
         
     | 
| 
       62 
     | 
    
         
            -
                        }
         
     | 
| 
       63 
     | 
    
         
            -
                        if (item.key === 'branchVal') {
         
     | 
| 
       64 
     | 
    
         
            -
                            branchValue.push(item.value);
         
     | 
| 
       65 
     | 
    
         
            -
                            type = datePickerBindType.branch;
         
     | 
| 
       66 
     | 
    
         
            -
                        }
         
     | 
| 
       67 
     | 
    
         
            -
                        if(dcimStaticForType && node.formData && type) setConfConfigMap(node.id, id, node.formData, item.value, type);
         
     | 
| 
       68 
     | 
    
         
            -
                    }
         
     | 
| 
       69 
     | 
    
         
            -
                }
         
     | 
| 
       70 
     | 
    
         
            -
                if (node.data && Object.prototype.toString.call(node.data) === '[object Object]' && node.data.params && node.data.params.id) {
         
     | 
| 
       71 
     | 
    
         
            -
                    echartData.push(node.data.params.id);
         
     | 
| 
       72 
     | 
    
         
            -
                    if(dcimStaticForType && node.formData) setConfConfigMap(node.id, id, node.formData, node.data.params.id, 1);
         
     | 
| 
       73 
     | 
    
         
            -
                }
         
     | 
| 
       74 
     | 
    
         
            -
                commonStore[id].mqttParams.tagIds = [...commonStore[id].mqttParams.tagIds, ...tagIds];
         
     | 
| 
       75 
     | 
    
         
            -
                commonStore[id].mqttParams.kpiAddrs = [...commonStore[id].mqttParams.kpiAddrs, ...kpiAddrs];
         
     | 
| 
       76 
     | 
    
         
            -
                commonStore[id].mqttParams.assetIds = [...commonStore[id].mqttParams.assetIds, ...assetIds];
         
     | 
| 
       77 
     | 
    
         
            -
                commonStore[id].mqttParams.areaIds = [...commonStore[id].mqttParams.areaIds, ...areaIds];
         
     | 
| 
       78 
     | 
    
         
            -
                commonStore[id].mqttParams.varVaule = [...commonStore[id].mqttParams.varVaule, ...varVaule];
         
     | 
| 
       79 
     | 
    
         
            -
                commonStore[id].mqttParams.branchValue = [...commonStore[id].mqttParams.branchValue, ...branchValue];
         
     | 
| 
       80 
     | 
    
         
            -
                commonStore[id].mqttParams.tagEcharts = [...commonStore[id].mqttParams.tagEcharts, ...tagEcharts];
         
     | 
| 
       81 
     | 
    
         
            -
                commonStore[id].mqttParams.echartData = [...commonStore[id].mqttParams.echartData, ...echartData];
         
     | 
| 
       82 
     | 
    
         
            -
            }
         
     | 
| 
       83 
     | 
    
         
            -
             
     | 
| 
       84 
     | 
    
         
            -
            /**
         
     | 
| 
       85 
     | 
    
         
            -
             * 设置绑定日期的配置数据
         
     | 
| 
       86 
     | 
    
         
            -
             * @param formData 元件关联的日期数据
         
     | 
| 
       87 
     | 
    
         
            -
             * @param id 当前元件id
         
     | 
| 
       88 
     | 
    
         
            -
             * @param tid
         
     | 
| 
       89 
     | 
    
         
            -
             * @param realData 当前元件绑定的数据
         
     | 
| 
       90 
     | 
    
         
            -
             * @param type 当前元件绑定的数据类型 1:echart   3:测点     6:指标   9:资产  12:变量类型   15:支路地址  21:区域
         
     | 
| 
       91 
     | 
    
         
            -
             */
         
     | 
| 
       92 
     | 
    
         
            -
            function setConfConfigMap(id, tid, formData, realData, type) {
         
     | 
| 
       93 
     | 
    
         
            -
                if(!formData.dateId) return;
         
     | 
| 
       94 
     | 
    
         
            -
                const dateId = formData.dateId;
         
     | 
| 
       95 
     | 
    
         
            -
                let value = null;
         
     | 
| 
       96 
     | 
    
         
            -
                let valueStr = '';
         
     | 
| 
       97 
     | 
    
         
            -
                if(confConfigMap.has(dateId)) {
         
     | 
| 
       98 
     | 
    
         
            -
             
     | 
| 
       99 
     | 
    
         
            -
                     const {date, dateStr} = confConfigMap.get(dateId);
         
     | 
| 
       100 
     | 
    
         
            -
             
     | 
| 
       101 
     | 
    
         
            -
                    value = date;
         
     | 
| 
       102 
     | 
    
         
            -
             
     | 
| 
       103 
     | 
    
         
            -
                    valueStr = dateStr;
         
     | 
| 
       104 
     | 
    
         
            -
             
     | 
| 
       105 
     | 
    
         
            -
                }else {
         
     | 
| 
       106 
     | 
    
         
            -
             
     | 
| 
       107 
     | 
    
         
            -
                    const {date, dateStr} = datePickerValueFormatting({
         
     | 
| 
       108 
     | 
    
         
            -
                        formatType: formData.dateFormat,
         
     | 
| 
       109 
     | 
    
         
            -
                        valueType: formData.valueType,
         
     | 
| 
       110 
     | 
    
         
            -
                        dateType: formData.dateType
         
     | 
| 
       111 
     | 
    
         
            -
                    });
         
     | 
| 
       112 
     | 
    
         
            -
             
     | 
| 
       113 
     | 
    
         
            -
                    value = date;
         
     | 
| 
       114 
     | 
    
         
            -
             
     | 
| 
       115 
     | 
    
         
            -
                    valueStr = dateStr;
         
     | 
| 
       116 
     | 
    
         
            -
             
     | 
| 
       117 
     | 
    
         
            -
                    confConfigMap.set(dateId, {date, dateStr});
         
     | 
| 
       118 
     | 
    
         
            -
             
     | 
| 
       119 
     | 
    
         
            -
                }
         
     | 
| 
       120 
     | 
    
         
            -
                const dataConfig = commonStore[tid].mqttParams.dataConfig;
         
     | 
| 
       121 
     | 
    
         
            -
                if(!dataConfig.data){
         
     | 
| 
       122 
     | 
    
         
            -
                    dataConfig.data = {};
         
     | 
| 
       123 
     | 
    
         
            -
                    dataConfig.picker = new Map();
         
     | 
| 
       124 
     | 
    
         
            -
                }
         
     | 
| 
       125 
     | 
    
         
            -
                dataConfig.data[id] = {
         
     | 
| 
       126 
     | 
    
         
            -
                    id: realData,
         
     | 
| 
       127 
     | 
    
         
            -
                    date: value,
         
     | 
| 
       128 
     | 
    
         
            -
                    dataType: type,
         
     | 
| 
       129 
     | 
    
         
            -
                    valueType: confBindValueType.increment
         
     | 
| 
       130 
     | 
    
         
            -
                };
         
     | 
| 
       131 
     | 
    
         
            -
                dataConfig.picker.set(id, {
         
     | 
| 
       132 
     | 
    
         
            -
                    dateId,
         
     | 
| 
       133 
     | 
    
         
            -
                    date: value,
         
     | 
| 
       134 
     | 
    
         
            -
                    dateStr: valueStr
         
     | 
| 
       135 
     | 
    
         
            -
                });
         
     | 
| 
       136 
     | 
    
         
            -
            }
         
     | 
| 
         @@ -1,178 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            // 图例默认数据
         
     | 
| 
       2 
     | 
    
         
            -
            export const echartsLegendDefaultData = {
         
     | 
| 
       3 
     | 
    
         
            -
              icon: 'rect', // 图标类型:'circle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow', 'none'
         
     | 
| 
       4 
     | 
    
         
            -
              itemWidth: 12, // 图标宽
         
     | 
| 
       5 
     | 
    
         
            -
              itemHeight: 12, // 图标高
         
     | 
| 
       6 
     | 
    
         
            -
              itemGap: 8, // 图例之间的间隔
         
     | 
| 
       7 
     | 
    
         
            -
              top: '0%', // 图例距离容器上边位置
         
     | 
| 
       8 
     | 
    
         
            -
              right: 'auto', // 图例距离容器右边位置
         
     | 
| 
       9 
     | 
    
         
            -
              bottom: 'auto', // 图例距离容器下边位置
         
     | 
| 
       10 
     | 
    
         
            -
              left: '60', // 图例距离容器左边位置
         
     | 
| 
       11 
     | 
    
         
            -
              padding: [20, 0, 0, 0], // 图例内边距 string
         
     | 
| 
       12 
     | 
    
         
            -
              color: '#fff', // 文字颜色
         
     | 
| 
       13 
     | 
    
         
            -
              height: 8, // 文本显示高度 number
         
     | 
| 
       14 
     | 
    
         
            -
              fontSize: 12 // 文字大小 number
         
     | 
| 
       15 
     | 
    
         
            -
            };
         
     | 
| 
       16 
     | 
    
         
            -
            // 柱状图和折线图默认标注
         
     | 
| 
       17 
     | 
    
         
            -
            export const echartsLineBarDefaultLegendData = {
         
     | 
| 
       18 
     | 
    
         
            -
                data: ['标注1'],
         
     | 
| 
       19 
     | 
    
         
            -
                icon: 'rich',
         
     | 
| 
       20 
     | 
    
         
            -
                show: true,
         
     | 
| 
       21 
     | 
    
         
            -
                itemWidth: 14,
         
     | 
| 
       22 
     | 
    
         
            -
                itemHeight: 14,
         
     | 
| 
       23 
     | 
    
         
            -
                textStyle: {
         
     | 
| 
       24 
     | 
    
         
            -
                    color: '#C6D1DB',
         
     | 
| 
       25 
     | 
    
         
            -
                    fontSize: '14px',
         
     | 
| 
       26 
     | 
    
         
            -
                },
         
     | 
| 
       27 
     | 
    
         
            -
                top: '12%',
         
     | 
| 
       28 
     | 
    
         
            -
                left: '10%',
         
     | 
| 
       29 
     | 
    
         
            -
                itemGap: 8
         
     | 
| 
       30 
     | 
    
         
            -
            };
         
     | 
| 
       31 
     | 
    
         
            -
            // 曲线默认配置数据
         
     | 
| 
       32 
     | 
    
         
            -
            export const echartsLineSeriesStyleData = {
         
     | 
| 
       33 
     | 
    
         
            -
              smooth: false,
         
     | 
| 
       34 
     | 
    
         
            -
              symbol: 'none',
         
     | 
| 
       35 
     | 
    
         
            -
              symbolSize: 18,
         
     | 
| 
       36 
     | 
    
         
            -
              itemLineStyle:{
         
     | 
| 
       37 
     | 
    
         
            -
                color: '#2F86ED', //改变折线颜色
         
     | 
| 
       38 
     | 
    
         
            -
                type: 'solid',
         
     | 
| 
       39 
     | 
    
         
            -
                width: 1
         
     | 
| 
       40 
     | 
    
         
            -
              },
         
     | 
| 
       41 
     | 
    
         
            -
              area: false, // 是否是区域图
         
     | 
| 
       42 
     | 
    
         
            -
              linear: false, // 是否是线性渐变
         
     | 
| 
       43 
     | 
    
         
            -
              areaColor: {
         
     | 
| 
       44 
     | 
    
         
            -
                type: 'linear',
         
     | 
| 
       45 
     | 
    
         
            -
                x: 0,
         
     | 
| 
       46 
     | 
    
         
            -
                y: 0,
         
     | 
| 
       47 
     | 
    
         
            -
                x2: 0,
         
     | 
| 
       48 
     | 
    
         
            -
                y2: 1,
         
     | 
| 
       49 
     | 
    
         
            -
                global: false // 缺省为 false
         
     | 
| 
       50 
     | 
    
         
            -
              },
         
     | 
| 
       51 
     | 
    
         
            -
              areaColorStops:[{
         
     | 
| 
       52 
     | 
    
         
            -
                offset: 0,
         
     | 
| 
       53 
     | 
    
         
            -
                color: 'rgba(49, 144, 255, 0.21)' // 0% 处的颜色
         
     | 
| 
       54 
     | 
    
         
            -
              }, {
         
     | 
| 
       55 
     | 
    
         
            -
                offset: 1,
         
     | 
| 
       56 
     | 
    
         
            -
                color: 'rgba(49, 144, 255, 0)' // 100% 处的颜色
         
     | 
| 
       57 
     | 
    
         
            -
              }]
         
     | 
| 
       58 
     | 
    
         
            -
            }
         
     | 
| 
       59 
     | 
    
         
            -
            // 图表X轴默认配置数据
         
     | 
| 
       60 
     | 
    
         
            -
            export const echartsXAxisDefaultStyleData = {
         
     | 
| 
       61 
     | 
    
         
            -
              x1AxisLabel: {
         
     | 
| 
       62 
     | 
    
         
            -
                color: '#fff',
         
     | 
| 
       63 
     | 
    
         
            -
                fontSize:"12"
         
     | 
| 
       64 
     | 
    
         
            -
              }
         
     | 
| 
       65 
     | 
    
         
            -
            }
         
     | 
| 
       66 
     | 
    
         
            -
            // 图表Y轴默认配置数据
         
     | 
| 
       67 
     | 
    
         
            -
            export const echartsYAxisDefaultStyleData = {
         
     | 
| 
       68 
     | 
    
         
            -
              ySplitLineShow: true, // y轴轴线是否显示
         
     | 
| 
       69 
     | 
    
         
            -
              //坐标轴线样式
         
     | 
| 
       70 
     | 
    
         
            -
              ysplitLineLineStyle: {
         
     | 
| 
       71 
     | 
    
         
            -
                type: 'solid', //solid实线;dashed虚线
         
     | 
| 
       72 
     | 
    
         
            -
                color: 'rgba(148, 147, 197, 0.5)'
         
     | 
| 
       73 
     | 
    
         
            -
              },
         
     | 
| 
       74 
     | 
    
         
            -
              y1axisLabelTextStyle: {
         
     | 
| 
       75 
     | 
    
         
            -
                //坐标轴颜色
         
     | 
| 
       76 
     | 
    
         
            -
                color: '#fff',
         
     | 
| 
       77 
     | 
    
         
            -
                fontSize:"12",
         
     | 
| 
       78 
     | 
    
         
            -
                padding: 5
         
     | 
| 
       79 
     | 
    
         
            -
              },
         
     | 
| 
       80 
     | 
    
         
            -
              // y轴刻度最大最小值和分隔值
         
     | 
| 
       81 
     | 
    
         
            -
              y1MinMaxData: {
         
     | 
| 
       82 
     | 
    
         
            -
                min: 0,
         
     | 
| 
       83 
     | 
    
         
            -
                max: 60,
         
     | 
| 
       84 
     | 
    
         
            -
                interval: 20
         
     | 
| 
       85 
     | 
    
         
            -
              },
         
     | 
| 
       86 
     | 
    
         
            -
              // y轴名称
         
     | 
| 
       87 
     | 
    
         
            -
              y1NameData: {
         
     | 
| 
       88 
     | 
    
         
            -
                name: '℃',
         
     | 
| 
       89 
     | 
    
         
            -
                nameTextStyle: {
         
     | 
| 
       90 
     | 
    
         
            -
                  color: '#FDFDFD',
         
     | 
| 
       91 
     | 
    
         
            -
                  padding: [0, 0, 0, -52],
         
     | 
| 
       92 
     | 
    
         
            -
                },
         
     | 
| 
       93 
     | 
    
         
            -
                nameGap: 25
         
     | 
| 
       94 
     | 
    
         
            -
              },
         
     | 
| 
       95 
     | 
    
         
            -
              // y轴刻度标签文字样式
         
     | 
| 
       96 
     | 
    
         
            -
              y2axisLabelTextStyle: {
         
     | 
| 
       97 
     | 
    
         
            -
                //坐标轴颜色
         
     | 
| 
       98 
     | 
    
         
            -
                color: '#fff',
         
     | 
| 
       99 
     | 
    
         
            -
                fontSize:"12",
         
     | 
| 
       100 
     | 
    
         
            -
                padding: 5
         
     | 
| 
       101 
     | 
    
         
            -
              },
         
     | 
| 
       102 
     | 
    
         
            -
              y2MinMaxData: {
         
     | 
| 
       103 
     | 
    
         
            -
                name: '%',
         
     | 
| 
       104 
     | 
    
         
            -
                nameTextStyle: {
         
     | 
| 
       105 
     | 
    
         
            -
                  color: '#FDFDFD',
         
     | 
| 
       106 
     | 
    
         
            -
                  padding: [0, -42, 0, 0],
         
     | 
| 
       107 
     | 
    
         
            -
                },
         
     | 
| 
       108 
     | 
    
         
            -
                nameGap: 25
         
     | 
| 
       109 
     | 
    
         
            -
              },
         
     | 
| 
       110 
     | 
    
         
            -
              y2NameData: {
         
     | 
| 
       111 
     | 
    
         
            -
                min: 0,
         
     | 
| 
       112 
     | 
    
         
            -
                max: 90,
         
     | 
| 
       113 
     | 
    
         
            -
                interval: 30
         
     | 
| 
       114 
     | 
    
         
            -
              }
         
     | 
| 
       115 
     | 
    
         
            -
            }
         
     | 
| 
       116 
     | 
    
         
            -
            // 图表的数据缩放
         
     | 
| 
       117 
     | 
    
         
            -
            export const echartsDataRoom = [{ //给x轴设置滚动条
         
     | 
| 
       118 
     | 
    
         
            -
              start: 0, //默认为0
         
     | 
| 
       119 
     | 
    
         
            -
              end: 50, //默认为100
         
     | 
| 
       120 
     | 
    
         
            -
              type: 'slider',
         
     | 
| 
       121 
     | 
    
         
            -
              show: false,
         
     | 
| 
       122 
     | 
    
         
            -
              xAxisIndex: [0],
         
     | 
| 
       123 
     | 
    
         
            -
              handleSize: 10, //滑动条的 左右2个滑动条的大小
         
     | 
| 
       124 
     | 
    
         
            -
              height: 0, //组件高度
         
     | 
| 
       125 
     | 
    
         
            -
            }, { //下面这个属性是里面拖到
         
     | 
| 
       126 
     | 
    
         
            -
              type: 'inside',
         
     | 
| 
       127 
     | 
    
         
            -
              show: true,
         
     | 
| 
       128 
     | 
    
         
            -
              xAxisIndex: [0],
         
     | 
| 
       129 
     | 
    
         
            -
              start: 0, //默认为1
         
     | 
| 
       130 
     | 
    
         
            -
              end: 50 // 100 - 1500 / 31, //默认为100
         
     | 
| 
       131 
     | 
    
         
            -
            }];
         
     | 
| 
       132 
     | 
    
         
            -
            // 图表类型Map
         
     | 
| 
       133 
     | 
    
         
            -
            export const echartsTypeMap = {
         
     | 
| 
       134 
     | 
    
         
            -
                'type_1': 'line',
         
     | 
| 
       135 
     | 
    
         
            -
                'type_2': 'bar',
         
     | 
| 
       136 
     | 
    
         
            -
                'type_3': 'ring',
         
     | 
| 
       137 
     | 
    
         
            -
                'type_4': 'TOP',
         
     | 
| 
       138 
     | 
    
         
            -
                'type_5': 'pie',
         
     | 
| 
       139 
     | 
    
         
            -
                'type_6': 'gauge'
         
     | 
| 
       140 
     | 
    
         
            -
            };
         
     | 
| 
       141 
     | 
    
         
            -
            // 图表颜色
         
     | 
| 
       142 
     | 
    
         
            -
            export const echartsColorData = [
         
     | 
| 
       143 
     | 
    
         
            -
                '#2648E9',
         
     | 
| 
       144 
     | 
    
         
            -
                '#E513F7',
         
     | 
| 
       145 
     | 
    
         
            -
                '#79E10E',
         
     | 
| 
       146 
     | 
    
         
            -
                '#0D9BE7',
         
     | 
| 
       147 
     | 
    
         
            -
                '#23CEE2',
         
     | 
| 
       148 
     | 
    
         
            -
                '#E5B903',
         
     | 
| 
       149 
     | 
    
         
            -
                '#2BDB8E',
         
     | 
| 
       150 
     | 
    
         
            -
                '#CAD804',
         
     | 
| 
       151 
     | 
    
         
            -
                '#117BEE',
         
     | 
| 
       152 
     | 
    
         
            -
                '#DB8407',
         
     | 
| 
       153 
     | 
    
         
            -
                '#E72B2B',
         
     | 
| 
       154 
     | 
    
         
            -
                '#E96812',
         
     | 
| 
       155 
     | 
    
         
            -
                '#7612D6',
         
     | 
| 
       156 
     | 
    
         
            -
                '#A117B8',
         
     | 
| 
       157 
     | 
    
         
            -
                'rgb(21, 151, 224)',
         
     | 
| 
       158 
     | 
    
         
            -
                'rgb(36, 220, 132)',
         
     | 
| 
       159 
     | 
    
         
            -
                'rgb(154, 77, 251)',
         
     | 
| 
       160 
     | 
    
         
            -
                'rgb(226, 182, 56)',
         
     | 
| 
       161 
     | 
    
         
            -
                'rgb(253, 92, 71)',
         
     | 
| 
       162 
     | 
    
         
            -
                'rgb(175, 215, 14)',
         
     | 
| 
       163 
     | 
    
         
            -
                'rgb(214, 154, 37)',
         
     | 
| 
       164 
     | 
    
         
            -
                'rgb(66, 251, 251)',
         
     | 
| 
       165 
     | 
    
         
            -
                'rgb(255, 158, 4)',
         
     | 
| 
       166 
     | 
    
         
            -
                'rgb(19, 236, 236)',
         
     | 
| 
       167 
     | 
    
         
            -
                'rgb(68, 237, 146)',
         
     | 
| 
       168 
     | 
    
         
            -
                'rgb(251, 94, 45)',
         
     | 
| 
       169 
     | 
    
         
            -
                'rgb(18, 255, 113)'];
         
     | 
| 
       170 
     | 
    
         
            -
            // TOP排行榜默认颜色
         
     | 
| 
       171 
     | 
    
         
            -
            export const rankingTopColorList = [
         
     | 
| 
       172 
     | 
    
         
            -
                'rgba(239, 120, 66, .6)',
         
     | 
| 
       173 
     | 
    
         
            -
                'rgba(255, 225, 65, .5)',
         
     | 
| 
       174 
     | 
    
         
            -
                'rgba(55, 240, 151, .5)',
         
     | 
| 
       175 
     | 
    
         
            -
                'rgba(72, 211, 255, .6)',
         
     | 
| 
       176 
     | 
    
         
            -
                'rgba(67, 153, 255, .5)'
         
     | 
| 
       177 
     | 
    
         
            -
            ];
         
     | 
| 
       178 
     | 
    
         
            -
            export const rankingTopImageName = ['orange', 'yellow', 'ching', 'lightBlue', 'blue'];
         
     | 
    
        package/static/element.js
    DELETED
    
    
    
        package/static/form.js
    DELETED
    
    
    
        package/static/index.js
    DELETED
    
    
    
        package/store/actions.js
    DELETED
    
    | 
         @@ -1 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            export const plugsPool = {};
         
     | 
    
        package/store/clear.js
    DELETED
    
    | 
         @@ -1,10 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            import {setEventListener} from "../core";
         
     | 
| 
       2 
     | 
    
         
            -
            export const removeAllElement = function (){
         
     | 
| 
       3 
     | 
    
         
            -
                const documentDefineEle = document.querySelectorAll('.documentDefine');
         
     | 
| 
       4 
     | 
    
         
            -
                if(documentDefineEle) {
         
     | 
| 
       5 
     | 
    
         
            -
                    documentDefineEle.forEach(function(element) {
         
     | 
| 
       6 
     | 
    
         
            -
                        element.removeEventListener('click', (e) => {setEventListener(e);});
         
     | 
| 
       7 
     | 
    
         
            -
                        element.parentNode.removeChild(element);
         
     | 
| 
       8 
     | 
    
         
            -
                    });
         
     | 
| 
       9 
     | 
    
         
            -
                }
         
     | 
| 
       10 
     | 
    
         
            -
            }
         
     | 
    
        package/store/default.js
    DELETED
    
    | 
         @@ -1,22 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            export const datePickerTypeList = [{
         
     | 
| 
       2 
     | 
    
         
            -
                id: 'date',
         
     | 
| 
       3 
     | 
    
         
            -
                name: '日期选择器', // 可选择:年、月、日
         
     | 
| 
       4 
     | 
    
         
            -
                format: 'yyyy-MM-dd'
         
     | 
| 
       5 
     | 
    
         
            -
            },{
         
     | 
| 
       6 
     | 
    
         
            -
                id: 'datetime',
         
     | 
| 
       7 
     | 
    
         
            -
                name: '日期时间选择器', // 可选择:年、月、日、时、分、秒 dateType
         
     | 
| 
       8 
     | 
    
         
            -
                format: 'yyyy-MM-dd HH:mm:ss'
         
     | 
| 
       9 
     | 
    
         
            -
            },{
         
     | 
| 
       10 
     | 
    
         
            -
                id: 'year',
         
     | 
| 
       11 
     | 
    
         
            -
                name: '年选择器', // 只提供年列表选择
         
     | 
| 
       12 
     | 
    
         
            -
                format: 'yyyy'
         
     | 
| 
       13 
     | 
    
         
            -
            },{
         
     | 
| 
       14 
     | 
    
         
            -
                id: 'month',
         
     | 
| 
       15 
     | 
    
         
            -
                name: '年月选择器', // 只提供年、月选择
         
     | 
| 
       16 
     | 
    
         
            -
                format: 'yyyy-MM'
         
     | 
| 
       17 
     | 
    
         
            -
            },{
         
     | 
| 
       18 
     | 
    
         
            -
                id: 'time',
         
     | 
| 
       19 
     | 
    
         
            -
                name: '时间选择器', // 只提供时、分、秒选择
         
     | 
| 
       20 
     | 
    
         
            -
                format: 'HH:mm:ss'
         
     | 
| 
       21 
     | 
    
         
            -
            }];
         
     | 
| 
       22 
     | 
    
         
            -
            export const datePickerType = {}
         
     | 
    
        package/store/index.js
    DELETED
    
    
    
        package/style/common.css
    DELETED
    
    
    
        package/style/datePicker.css
    DELETED
    
    | 
         @@ -1,44 +0,0 @@ 
     | 
|
| 
       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 
     | 
    
         
            -
            }
         
     |