chuwu il y a 6 ans
Parent
commit
796134f476

+ 137 - 0
src/assets/scss/reset.scss

@@ -3,6 +3,34 @@ $BaseC:#555;
 $LinkC:#06f;
 $HoverC:#f60;
 $FontSize:13px;
+$fontFamily: "Spurce Han Sans,Wah Kang font,Microsoft YaHei";
+$allColor: #333; //正文#333
+$color1: #666; //辅助文字#666
+$color2: #999; //#999
+$color3: #ccc; //失效文字#ccc
+$color4: #00A0E8; //链接文字
+$color5: #8E9CC1; //表头文字加粗
+$colorList: ( 1:$color1, 2:$color2, 3:$color3, 4:$color4, 5:$color5);
+$theme1: #5BA7FF;
+$theme2: #FFF;
+$theme3: #8E9CC1;
+$themeList: (1:$theme1, 2:$theme2, 3:$theme3);
+$auxiliary1: #548FF0; //辅助色彩
+$auxiliary2: #FF4121;
+$auxiliary3: #7ED321;
+$auxiliary4: #F5A623;
+$auxiliaryList: ( 1:$auxiliary1, 2:$auxiliary2, 3:$auxiliary3, 4:$auxiliary4);
+$borderColor1: #C2CEDB; //线条色彩
+$borderColor2: #DDD;
+$borderColorList: (1:$borderColor1, 2:$borderColor2);
+$bg1: #FFF;
+$bg2: #F2FBFF;
+$bg3: #EEFAFF;
+$bg4: #FFF5E4;
+$bg5: #E5F6D3;
+$bgList: ( 1:$bg1, 2:$bg2, 3:$bg3, 4:$bg4, 5:$bg5);
+$allSize: 14px; //正常文字大小
+$size1: 12px; //辅助文字大小
 // mixins
 @mixin dz($time:0.25s) {
     -webkit-transition: all $time ease-in-out;
@@ -11,6 +39,115 @@ $FontSize:13px;
     transition: all $time ease-in-out;
 }
 
+.el-button--mini,
+.el-button--mini.is-round {
+    padding: 5px 20px;
+}
+
+.el-button {
+    box-sizing: border-box;
+    border-color: $auxiliary1;
+}
+
+.el-button span {
+    color: $color4;
+}
+
+.el-button:focus,
+.el-button:hover {
+    background-color: $bg1;
+    border-color: $auxiliary1;
+}
+
+.el-button span {
+    display: inline-block;
+    line-height: 20px;
+    height: 20px;
+}
+
+* {
+    font-family: $fontFamily;
+    font-size: $allSize;
+    color: $allColor;
+}
+
+.color {
+    color: $allColor;
+}
+
+//文字色
+@each $i,
+$color in $colorList {
+    .color#{$i} {
+        color: $color;
+    }
+}
+
+//主题色
+@each $i,
+$theme in $themeList {
+    .theme#{$i} {
+        background-color: $theme;
+    }
+}
+
+//辅助背景色
+@each $i,
+$auxiliary in $auxiliaryList {
+    .auxiliary#{$i} {
+        background-color: $auxiliary;
+    }
+}
+
+//辅助色
+@each $i,
+$auxiliary in $auxiliaryList {
+    .auxiliary-color#{$i} {
+        color: $auxiliary;
+    }
+}
+
+//线条色
+@each $i,
+$borderColor in $borderColorList {
+    .border-color#{$i} {
+        border-color: $borderColor;
+    }
+}
+
+//背景色
+@each $i,
+$bg in $bgList {
+    .bg#{$i} {
+        background-color: $bg;
+    }
+}
+
+@for $i from 1 to 51 {
+    .border-radius#{$i} {
+        border-radius: #{$i}px;
+    }
+}
+
+@for $i from 1 to 11 {
+    .border#{$i} {
+        border-width: #{$i}px;
+        border-style: solid;
+    }
+}
+
+// .color2 {
+//     color: $color2;
+// }
+// .color3 {
+//     color: $color3;
+// }
+// .color4 {
+//     color: $color4;
+// }
+// .color5 {
+//     color: $color5
+// }
 // @charset "UTF-8";
 body,
 ul,

+ 38 - 17
src/components/common/jsmind.vue

@@ -1,3 +1,7 @@
+<!--
+    initData(基础参数配置,实际数据): 由父组件调用,成功后返回jsmind实例
+    @event {选中节点} selectNode 派发事件selectNode
+-->
 <template>
     <div class="h100">
         <div :id="id" style="width:100%;height:100%;"></div>
@@ -6,6 +10,7 @@
 <script>
     import "assets/js/jsmind.js"
     import "assets/css/jsmind.css"
+    console.log(jsMind.toggle_node)
     export default {
         name: "jsMindComponent",
         props: {
@@ -17,7 +22,9 @@
             },
         },
         data() {
-            return {}
+            return {
+                jm: ""
+            }
         },
         created() {
             console.log(111)
@@ -28,22 +35,36 @@
         methods: {
             initData(options, data) {
                 let option = Object.assign({
-                    container: this.id,
-                    editable: true,
-                    theme: 'orange'
-                }, options)
-                var el = {
-                    container: this.id,
-                    editable: true, //是否启用编辑
-                    theme: "greensea", //主题
-                    mode: "side", //显示模式
-                    support_html: true //是否支持节点里的HTML元素
-                };
-                console.log(document.getElementById(this.id).clientWidth, document.getElementById(this.id).clientHeight)
-                var jm = new jsMind(el)
-                jm.show(data)
-                console.log(jm)
-                //   return jm
+                        container: this.id,
+                        editable: true,
+                        theme: 'orange'
+                    }, options),
+                    el = {
+                        container: this.id,
+                        editable: true, //是否启用编辑
+                        theme: "greensea", //主题
+                        mode: "side", //显示模式
+                        support_html: true //是否支持节点里的HTML元素
+                    };
+                this.jm = new jsMind(el)
+                this.jm.show(data)
+                console.log(this.jm)
+                this.jm.view.container.addEventListener('click',this.click)
+                return this.jm
+            },
+            click(e){
+                let event = e || window.event,target = event.target || event.srcEvent,val = target.innerHTML;
+                console.log(event,target,target)
+                if(target.nodeName == "JMEXPANDER"){
+                    console.log(target.innerHTML)
+                    //-为展开
+                    if(val == "-"){
+                        console.log(this.jm.get_node(target.getAttribute("nodeid")))
+                        this.$emit("openNode",this.jm.get_node(target.getAttribute("nodeid")))
+                    }else{
+
+                    }
+                }
             }
         }
     }

+ 79 - 8
src/components/config_point/dialog_main.vue

@@ -1,9 +1,9 @@
 <!--steps3的左侧-->
 <template>
     <div class="steps3-dialog-main">
-        <select-one :name="'原始点位描述中识别的设备类型'"></select-one>
-        <select-one :name="'已标准化的设备标识'"></select-one>
-        <div class="own-collape">
+        <select-one  @check="typeCheck" :renderData="typeArr" infosKey="EquipmentType" :name="'原始点位描述中识别的设备类型'"></select-one>
+        <select-one  @check="paramCheck" :renderData="identifyArr" infosKey="ownMess" :name="'已标准化的设备标识'"></select-one>
+        <!-- <div class="own-collape">
             <el-collapse v-model="activeName" accordion>
                 <el-collapse-item name="1">
                     <template slot="title">
@@ -13,23 +13,94 @@
                 <div>在界面中一致:所有的元素和结构需保持一致,比如:设计样式、图标和文本、元素的位置等。</div>
             </el-collapse-item>
         </el-collapse>
-        </div>
+        </div> -->
     </div>
 </template>
 <script>
     import selectOne from "components/config_point/select_one"
+    import {
+        getStandType,
+        queryPoint,
+        updatePoint,
+        getStandParam,
+        getNullofParam
+    } from "fetch/point_http"
+    import {
+        mapGetters,
+        mapActions
+    } from "vuex";
+    import handsontableComponent from "components/common/handsontable"
     export default {
+        name: "updateParam",
         data() {
             return {
                 activeName: '1',
-                
+                typeArr: [],
+                identifyArr: [],
+                KeyEquipmentType: ""
             }
         },
-        created() {},
+        computed: {
+            ...mapGetters("project", [
+                "projectId",
+                "datasourceId",
+                "protocolType"
+            ])
+        },
+        created() {
+            this.getData()
+        },
         mounted() {},
-        methods: {},
+        methods: {
+            getData(){
+                getStandType({
+                    data: {
+                        DataSourceId: this.datasourceId
+                    },
+                    type: this.protocolType
+                },res => {
+                    this.typeArr = res.Content
+                })
+            },
+            typeCheck(item){
+                console.log(item,"item")
+                this.getParamList(item)
+            },
+            paramCheck(param){
+                console.log(param,"param")
+                if(param.EquipmentMark == "空"){
+                    getNullofParam({
+                        data: {
+                            DataSourceId: this.datasourceId,
+                            KeyEquipmentType: this.KeyEquipmentType
+                        },
+                        type: this.protocolType
+                    },res =>{
+                        console.log(res)
+                    })
+                }
+            },
+            //通过type获取param的list
+            getParamList(item){
+                this.KeyEquipmentType = item.EquipmentType
+                getStandParam({
+                    data: {
+                        DataSourceId: this.datasourceId,
+                        KeyEquipmentType: item.EquipmentType
+                    },
+                    type: this.protocolType
+                },res => {
+                    console.log(res,"res")
+                    this.identifyArr = res.Content.map(item => {
+                        item.ownMess = item.EquipmentMark + '(涉及原始点位:' + item.PointCount + ')'
+                        return item
+                    })
+                })
+            }
+        },
         components: {
-            selectOne
+            selectOne,
+            handsontableComponent
         }
     }
 </script>

+ 35 - 37
src/components/config_point/find_keyword.vue

@@ -22,12 +22,8 @@
             </div>
             <div class="right-view saga-border">
                 <div class="find-tags" v-for="tag in tagList">
-                    <el-tag
-                        :key="title == 'type' ? tag.EquipmentType : tag.EquipmentType"
-                        @click="changeName(tag)"
-                        @close="closeTag(tag)"
-                        closable>
-                        {{title == 'type' ? tag.EquipmentType + "(" + tag.PointCount  + ")" : tag.EquipmentType + "(" + tag.PointCount  + ")"}}
+                    <el-tag :key="type == 'type' ? tag.EquipmentType : tag.EquipmentParameter" @click="changeName(type == 'type' ? tag.EquipmentType : tag.EquipmentParameter)" @close="closeTag(tag)" closable>
+                        {{type == 'type' ? (tag.EquipmentType + "(" + tag.PointCount + ")") : (tag.EquipmentParameter + "(" + tag.PointCount + ")")}}
                     </el-tag>
                 </div>
             </div>
@@ -61,8 +57,10 @@
     } from "vuex";
     export default {
         props: {
-            type: String,
-            default: "type", //arguments or type
+            type: {
+                type: String,
+                default: "type", //arguments or type
+            }
         },
         computed: {
             ...mapGetters("project", [
@@ -86,7 +84,7 @@
                 reNameDialog: false,
                 name: "",
                 newName: "",
-                footer:{
+                footer: {
                     cancel: "取消",
                     confirm: "确定"
                 }
@@ -97,8 +95,8 @@
         methods: {
             //继续发现关键字
             getCutString() {
-                console.log(this.$refs.cutString.getData())
-                if(!this.$refs.cutString.getData()){
+                // console.log(this.$refs.cutString.getData())
+                if (!this.$refs.cutString.getData()) {
                     this.$message.error("请确定当前有选择关键字")
                     return false
                 }
@@ -114,21 +112,20 @@
                         Key: this.$refs.cutString.getData()
                     },
                     type: this.protocolType
-                },res => {
+                }, res => {
                     this.$message.success("添加成功")
                     this.changeType()
                 })
             },
             //取消
-            cancel(){
+            cancel() {
                 this.reNameDialog = false
             },
-
             //关闭标签(删除)
-            closeTag(tag){
-                console.log(tag)
+            closeTag(tag) {
+                // console.log(tag)
                 let delFun;
-                 if (this.type == "type") {
+                if (this.type == "type") {
                     delFun = delTypeTer
                 } else {
                     delFun = delParamTer
@@ -140,32 +137,29 @@
                     },
                     type: this.protocolType
                 }
-                this.$confirm("你确定删除该标签?").then(_ =>{
-                    this.delAjax(param,delFun)
-                }).catch(_ =>{
-
+                this.$confirm("你确定删除该标签?").then(_ => {
+                    this.delAjax(param, delFun)
+                }).catch(_ => {
                 })
             },
-
-            delAjax(param,fun){
-                fun(param,res => {
+            delAjax(param, fun) {
+                fun(param, res => {
                     this.$message.success("删除标签成功")
                     this.changeType()
                 })
             },
             //点击事件,重命名
-            changeName(tag){
-                console.log(tag,"tag")
+            changeName(tag) {
                 this.reNameDialog = true
                 this.newName = ""
-                if(this.type == "type"){
-                    this.name = tag.EquipmentType
-                }else{
-                    this.name = tag.EquipmentType
+                if (this.type == "type") {
+                    this.name = tag
+                } else {
+                    this.name = tag
                 }
             },
             //确定修改名字
-            reNameConfirm(){
+            reNameConfirm() {
                 let reNameFun;
                 if (this.type == "type") {
                     reNameFun = renameType
@@ -179,15 +173,17 @@
                         KeyOld: this.name
                     },
                     type: this.protocolType
-                },res => {
+                }, res => {
                     this.$message.success("修改成功")
                     this.changeType()
                     this.cancel()
                 })
             },
             //获取文字
-            changeType() {
+            changeType(type) {
                 let queryFun
+                this.type = !!type ? type : this.type 
+                console.log(this.type)
                 if (this.type == "type") {
                     queryFun = findKeysWordType
                 } else {
@@ -205,7 +201,7 @@
                     } else {
                         this.Description = ""
                     }
-                    console.log(res)
+                    // console.log(res)
                 })
                 this.getDataForSource()
                 this.getbeenFoundList()
@@ -242,7 +238,7 @@
                 } else {
                     getListFetch = queryEqParamList
                 }
-                console.log(getListFetch)
+                // console.log(getListFetch)
                 getListFetch({
                     data: {
                         ProjectId: this.projectId,
@@ -250,10 +246,12 @@
                     },
                     type: this.protocolType
                 }, res => {
-                    console.log(res, 'getListFetch')
+                    // console.log(res, 'getListFetch')
                     this.tagList = res.Content
                 })
             }
+        },
+        watch:{
         }
     }
 </script>
@@ -278,7 +276,7 @@
         .h10 {
             height: 10px;
         }
-        .find-tags{
+        .find-tags {
             display: inline-block;
             margin: 8px;
         }

+ 5 - 0
src/router/index.js

@@ -77,5 +77,10 @@ export default new Router({
                 }
             ]
         },
+        {
+            path: "/demo",
+            name: "demo",
+            component: Home
+        }
     ]
 })

+ 6 - 1
src/store/common/project.js

@@ -4,6 +4,7 @@ const project_mess = {
         projectId: "", //项目id
         datasourceId: "4", //数据源id
         protocolType: "amqp", //数据源类型
+        dataName: ""
     },
     mutations: {
         set_project(state, val) {
@@ -14,6 +15,9 @@ const project_mess = {
         },
         set_protocol_type(state, val) {
             state.protocolType = val
+        },
+        set_datasource_name(state, val) {
+            state.dataName = val
         }
     },
     actions: {
@@ -22,7 +26,8 @@ const project_mess = {
     getters: {
         projectId: state => state.projectId,
         datasourceId: state => state.datasourceId,
-        protocolType: state => state.protocolType
+        protocolType: state => state.protocolType,
+        dataName: state => state.dataName
     }
 }
 

+ 23 - 2
src/views/Home.vue

@@ -1,7 +1,18 @@
 <template>
     <div class="home">
-        <el-input v-model="testData"></el-input>
-        <router-link to="/about">to</router-link>
+        <div class="w40 dcenter center">
+            <el-button type="" size="mini">我的按钮</el-button>
+            <el-button type="info" size="mini">我的按钮</el-button>
+            <el-button type="primary" size="mini">我的按钮</el-button>
+            <el-button type="warning" size="mini">我的按钮</el-button>
+            <p v-for="item in 6" :class="'color' + item">文字{{item}}</p>
+            <div v-for="item in 3" :class="'theme' + item">背景主题{{item}}</div>
+            <div v-for="item in 4" :class="'auxiliary' + item">辅助色彩{{item}}</div>
+            <div v-for="item in 4" :class="'auxiliary-color' + item">辅助文字{{item}}</div>
+            <div v-for="item in 4" :class="'auxiliary-color' + item">辅助文字{{item}}</div>
+            <div v-for="item in 10" :class="['border' + item,'border-radius' + item,'border-color' + item]">border测试</div>
+            <div v-for="item in 5" :class="['bg' + item]">背景色测试</div>
+        </div>
     </div>
 </template>
 
@@ -17,3 +28,13 @@
         }
     }
 </script>
+
+<style lang="scss" scoped>
+.w40{
+    width: 40%;
+    *{
+        margin: 5px;
+    }
+}
+</style>
+

+ 1 - 0
src/views/config_point/index.vue

@@ -72,6 +72,7 @@
                 console.log(item)
                 this.$store.commit("project/set_datasource", item.Id);
                 this.$store.commit("project/set_protocol_type", item.ProtocolType);
+                this.$store.commit("project/set_datasource_name", item.Name);
                 this.$router.push({
                     path: "configPoint/steps",
                 })

+ 17 - 3
src/views/config_point/steps/step2.vue

@@ -5,7 +5,7 @@
             <el-button @click="discern(1)">批量识别设备类型关键字</el-button>
             <el-button @click="discern(2)">批量识别设备参数关键字</el-button>
             <el-button @click="examine">检查&微调</el-button>
-            <el-button>刷新</el-button>
+            <el-button @click="reset">刷新</el-button>
             <el-button @click="saveData">保存</el-button>
         </div>
         <div id="handsontableSteps1">
@@ -70,6 +70,20 @@
             ])
         },
         methods: {
+
+            //刷新
+            reset(){
+                console.log(this.changeFlag,"changeFlag")
+                if(!this.changeFlag){
+                    this.$confirm("表格数据尚未保存,确定刷新吗?").then(_ => {
+                        this.saveData()
+                    }).catch(_ =>{
+                        this.getData()
+                    })
+                }else{
+                    this.getData()
+                }
+            },
             /**
              *  @param num 代表着1类型2参数
              * 
@@ -85,7 +99,7 @@
                 this.isChangeData()
                 this.isDialogShow = true
                 this.$nextTick(() => {
-                    this.$refs.findKeyword.changeType()
+                    this.$refs.findKeyword.changeType(this.type)
                 })
             },
             close() {
@@ -125,7 +139,6 @@
                             KeyEquipmentType: item.KeyEquipmentType || null
                         }
                     })
-                    console.log(changeData)
                     updatePoint({
                         data: {
                             Content: changeData
@@ -144,6 +157,7 @@
             },
             //发生更改
             changeHand(changeData, source) {
+                console.log(changeData, source)
                 if (!!changeData) {
                     this.changeFlag = false
                 }

+ 237 - 94
src/views/config_point/steps/step4.vue

@@ -7,115 +7,258 @@
         <el-tabs type="border-card" @tab-click="clickTabs" class="tabs-h" tab-position="bottom">
             <el-tab-pane>
                 <span slot="label">
-              <i class="el-icon-date"></i> 我的行程
-            </span>
-                <js-mind-component ref="jsmind1"></js-mind-component>
+                        从物理世界角度检查
+                    </span>
+                <js-mind-component ref="jsmind" @openNode="openNode"></js-mind-component>
             </el-tab-pane>
-            <el-tab-pane class="h100" label="消息中心">
-                <js-mind-component ref="jsmind2"></js-mind-component>
+            <el-tab-pane class="h100" label="从原始点位表角度检查">
+                <js-mind-component ref="jsmind1" @openNode="openNode"></js-mind-component>
             </el-tab-pane>
         </el-tabs>
     </div>
 </template>
 <script>
+    import {
+        mapGetters,
+        mapActions
+    } from "vuex";
     import jsMindComponent from "components/common/jsmind"
+    import {
+        platformSysJsMind,
+        platformEqJsMind,
+        platformIdentJsMind,
+        platformInfoJsMind,
+        platformPointJsMind,
+        pointSytemJsMind,
+        pointPostJsMind,
+        pointInfoJsMind,
+        pointTypeJsMind,
+    } from "fetch/point_http"
     export default {
         name: "steps4",
         data() {
-            return {}
+            return {
+                jsMind: "",
+                activeIndex: 0,
+                mindArr: []
+            }
+        },
+        computed: {
+            ...mapGetters("project", [
+                "projectId",
+                "datasourceId",
+                "protocolType",
+                "dataName"
+            ])
         },
         created() {},
-        mounted() {},
+        mounted() {
+            this.clickTabs({
+                index: this.activeIndex
+            })
+        },
         methods: {
-            clickTabs(val) {
-                console.log(this.$refs, val)
-                var mind = {
-                    /* 元数据,定义思维导图的名称、作者、版本等信息 */
-                    meta: {
-                        name: "jsMind-demo-tree",
-                        author: "hizzgdev@163.com",
-                        version: "0.2"
-                    },
-                    /* 数据格式声明 */
-                    format: "node_tree",
-                    /* 数据内容 */
-                    data: {
-                        id: "root",
-                        topic: "jsMind",
-                        children: [{
-                                id: "easy",
-                                topic: "Easy",
-                                direction: "left",
-                                expanded: false,
-                                children: [{
-                                        id: "easy1",
-                                        topic: "Easy to show"
-                                    },
-                                    {
-                                        id: "easy2",
-                                        topic: "Easy to edit"
-                                    },
-                                    {
-                                        id: "easy3",
-                                        topic: "Easy to store"
-                                    },
-                                    {
-                                        id: "easy4",
-                                        topic: "Easy to embed"
-                                    }
-                                ]
-                            },
-                            {
-                                id: "open",
-                                topic: "Open Source",
-                                direction: "right",
-                                expanded: true,
-                                children: [{
-                                        id: "open1",
-                                        topic: "on GitHub"
-                                    },
-                                    {
-                                        id: "open2",
-                                        topic: "BSD License"
-                                    }
-                                ]
-                            },
-                            {
-                                id: "powerful",
-                                topic: "Powerful",
-                                direction: "right",
-                                children: [{
-                                        id: "powerful1",
-                                        topic: "Base on Javascript"
-                                    },
-                                    {
-                                        id: "powerful2",
-                                        topic: "Base on HTML5"
-                                    },
-                                    {
-                                        id: "powerful3",
-                                        topic: "Depends on you"
-                                    }
-                                ]
-                            },
-                            {
-                                id: "other",
-                                topic: "test node",
-                                direction: "left",
-                                children: [{
-                                        id: "other1",
-                                        topic: "I'm from local variable"
-                                    },
-                                    {
-                                        id: "other2",
-                                        topic: "I can do everything"
-                                    }
-                                ]
+            //节点选中事件
+            async openNode(node) {
+                //次级列表children,自定义id ownId,请求参数,请求函数ajaxFun,显示子集的文案text,子集的data
+                let children, ownId,param,ajaxFun,text,nodeOwnData;
+                this.jsMind.options.editable = true
+                console.log(node.data)
+                //删除已有的假节点
+                this.removeNode(node, this.jsMind)
+                if (!!node.data && node.data.pointType == "system") {
+                    //系统级
+                    param = {
+                        DataSourceId: this.datasourceId,
+                        PhysicalSystem: node.data.name
+                    }
+                    ajaxFun = this.activeIndex == 0 ? platformEqJsMind : pointTypeJsMind
+                    console.log(ajaxFun)
+                    children = await this.getList(param, ajaxFun)
+                    console.log(children)
+                    children.map(item => {
+                        text = item.EquipmentType || `${item.Description}(${item.Address})`
+                        nodeOwnData = {
+                            pointType: "eq",
+                            name: item.EquipmentType || item.Description,
+                            systemName: node.data.name
+                        }
+                        ownId = this.createRandomId()
+                        this.jsMind.add_node(node, ownId, text , nodeOwnData)
+                        this.addNodeDefault(ownId)
+                    })
+                }
+                if (!!node.data && node.data.pointType == "eq") {
+                    //标识级
+                    param = {
+                        DataSourceId: this.datasourceId,
+                        EquipmentType: node.data.name,
+                        PhysicalSystem: node.data.systemName
+                    }
+                    ajaxFun = this.activeIndex == 0 ? platformIdentJsMind : pointPostJsMind
+                    children = await this.getList(param, ajaxFun)
+                    if (!children) {
+                        return false
+                    }
+                    console.log(children)
+                    children.map(item => {
+                        text = this.activeIndex == 0 ? item.DataQuality + item.EquipmentMark : `${item.Description}(${item.Address}):${item.Data.Data}-${item.Data.Unit}-${item.Data.Time}`
+                        nodeOwnData = {
+                                pointType: "ident",
+                                name: this.activeIndex == 0 ? item.EquipmentMark : item.Description,
+                                systemName: node.data.systemName,
+                                EquipmentType: node.data.name
                             }
-                        ]
+                            console.log(text,nodeOwnData)
+                        ownId = this.createRandomId()
+                        this.jsMind.add_node(node, ownId, text, nodeOwnData)
+                        this.addNodeDefault(ownId)
+                    })
+                }
+                if (!!node.data && node.data.pointType == "ident") {
+                    //信息级
+                    param = {
+                        DataSourceId: this.datasourceId,
+                        EquipmentType: node.data.EquipmentType,
+                        PhysicalSystem: node.data.systemName,
+                        [ this.activeIndex == 0 ? "EquipmentMark" : "Description"]: node.data.name
+                    }
+                    ajaxFun = this.activeIndex == 0 ? platformInfoJsMind : pointInfoJsMind
+                    children = await this.getList(param, ajaxFun)
+                    if (!children) {
+                        return false
                     }
-                };
-                let jsMind1 = this.$refs.jsmind1.initData({}, mind)
+                    console.log(children)
+                    children.map(item => {
+                        ownId = this.createRandomId()
+                        text = `${item.InfomationPoint}(${item.MeterFunc}):${item.Data.Data}-${item.Data.Unit}-${item.Data.Time}`
+                        nodeOwnData = {
+                            pointType: "point",
+                            InfomationPoint: item.InfomationPoint,
+                            EquipmentMark: node.data.name,
+                            systemName: node.data.systemName,
+                            EquipmentType: node.data.EquipmentType
+                        }
+                        this.jsMind.add_node(node, ownId, text, nodeOwnData)
+                        if(this.activeIndex == 0){
+                            console.log(111)
+                            this.addNodeDefault(ownId)
+                        }
+                    })
+                }
+                if (!!node.data && node.data.pointType == "point") {
+                    //信息级
+                    children = await this.getList({
+                        DataSourceId: this.datasourceId,
+                        EquipmentType: node.data.EquipmentType,
+                        PhysicalSystem: node.data.systemName,
+                        EquipmentMark: node.data.EquipmentMark,
+                        InfomationPoint: node.data.InfomationPoint
+                    }, platformPointJsMind)
+                    if (!children) {
+                        return false
+                    }
+                    console.log(children)
+                    children.map(item => {
+                        ownId = this.createRandomId()
+                        this.jsMind.add_node(node, ownId, `${item.Description}(${item.Address}):${item.Data.Data}-${item.Data.Unit}-${item.Data.Time}`, {
+                            pointType: "point",
+                            InfomationPoint: item.InfomationPoint,
+                            EquipmentMark: node.data.name,
+                            systemName: node.data.systemName,
+                            EquipmentType: node.data.EquipmentType
+                        })
+                    })
+                }
+            },
+            //统一添加默认级数
+            addNodeDefault(ownId) {
+                //给下一级添加默认的级数
+                this.jsMind.add_node(ownId, this.createRandomId(), "")
+                //收起该节点下的子节点
+                this.jsMind.collapse_node(ownId)
+            },
+            /**
+             * 删除某个节点下所有的节点
+             * @param {该节点} node
+             * @param {jsmind实例} jsmind
+             */
+            removeNode(node, jsmind) {
+                if(!!node.children){
+                    node.children.map(item => {
+                        this.jsMind.remove_node(item)
+                    })
+                }
+            },
+            //获取接口封装
+            getList(param, fun) {
+                return new Promise((resolve, reject) => {
+                    fun(
+                        param,
+                        res => {
+                            console.log(res)
+                            resolve(res.Content)
+                        }
+                    )
+                })
+            },
+            clickTabs(val) {
+                this.activeIndex = val.index
+                var data = {
+                        id: "root",
+                        topic: this.dataName,
+                        children: []
+                    },
+                    mind = {
+                        /* 元数据,定义思维导图的名称、作者、版本等信息 */
+                        meta: {
+                            name: "jsMind-demo-tree",
+                            author: "sagacloud",
+                            version: "0.2"
+                        },
+                        /* 数据格式声明 */
+                        format: "node_tree",
+                        /* 数据内容 */
+                        data: data
+                    },
+                    id,func;
+                func = this.activeIndex == 0 ? platformSysJsMind : pointSytemJsMind
+                func({
+                    DataSourceId: this.datasourceId
+                }, res => {
+                    data.children = res.Content.map(item => {
+                        id = this.createRandomId();
+                        return {
+                            id: id,
+                            topic: `<div>${item.SpecialtySystem}(${item.PointCount})</div>`,
+                            expanded: false,
+                            pointType: "system",
+                            name: item.SpecialtySystem,
+                            children: [{
+                                id: this.createRandomId(),
+                                topic: "",
+                            }]
+                        }
+                    })
+                    console.log(data, "data")
+                    this.$nextTick(_ => {
+                        if(!!this.mindArr[this.activeIndex]){
+                            this.jsMind = this.mindArr[this.activeIndex]
+                            return false
+                        }
+                        console.log(val.index, this.$refs.jsmind,this.$refs.jsmind1)
+                        if(this.activeIndex == 0){
+                            this.jsMind = this.$refs.jsmind.initData({}, mind)
+                        }else{
+                            this.jsMind = this.$refs.jsmind1.initData({}, mind)
+                        }
+                        this.mindArr[this.activeIndex] = this.jsMind
+                        this.jsMind.options.editable = false
+                    })
+                })
+            },
+            createRandomId() {
+                return (Math.random() * 10000000).toString(16).substr(0, 4) + '-' + (new Date()).getTime() + '-' + Math.random().toString().substr(2, 5);
             }
         },
         components: {