Browse Source

操作日志

zhangkunling 2 năm trước cách đây
mục cha
commit
b59ccf2258
35 tập tin đã thay đổi với 1284 bổ sung1493 xóa
  1. 427 0
      src/components/common/TreeFilter.vue
  2. 10 17
      src/components/common/TreeList.vue
  3. 2 0
      src/components/common/index.js
  4. 58 4
      src/components/treefilter2.vue
  5. 58 123
      src/views/homecomponents/BasicInfomation/ApplicationEquip.vue
  6. 0 39
      src/views/homecomponents/BasicInfomation/ApplicationStation.vue
  7. 50 165
      src/views/homecomponents/BasicInfomation/DeviceManage.vue
  8. 21 25
      src/views/homecomponents/BasicInfomation/DeviceManageIndex.vue
  9. 1 22
      src/views/homecomponents/BasicInfomation/DeviceModelManage.vue
  10. 3 22
      src/views/homecomponents/BasicInfomation/DeviceTypeManage.vue
  11. 73 93
      src/views/homecomponents/BasicInfomation/LineStationManage.vue
  12. 1 22
      src/views/homecomponents/BasicInfomation/ModelConfig.vue
  13. 8 6
      src/views/homecomponents/BasicInfomation/StationManage.vue
  14. 1 22
      src/views/homecomponents/EquipmentAnalysis/AlarmAcknowledgConfig.vue
  15. 1 22
      src/views/homecomponents/EquipmentAnalysis/AlarmFilterConfig.vue
  16. 34 131
      src/views/homecomponents/EquipmentAnalysis/AlarmHandling.vue
  17. 40 112
      src/views/homecomponents/EquipmentAnalysis/AlarmMonitor.vue
  18. 1 22
      src/views/homecomponents/EquipmentAnalysis/AlarmRealLine.vue
  19. 1 22
      src/views/homecomponents/EquipmentAnalysis/AlarmRealStation.vue
  20. 1 22
      src/views/homecomponents/EquipmentAnalysis/ClearedAlarm.vue
  21. 1 22
      src/views/homecomponents/EquipmentAnalysis/ComprehensiveInfor.vue
  22. 1 22
      src/views/homecomponents/EquipmentAnalysis/ConfirmedAlarm.vue
  23. 1 22
      src/views/homecomponents/EquipmentAnalysis/ContinuityMonitorConfig.vue
  24. 1 22
      src/views/homecomponents/EquipmentAnalysis/FilteredAlarm.vue
  25. 1 24
      src/views/homecomponents/EquipmentAnalysis/LevelDeterConfig.vue
  26. 30 114
      src/views/homecomponents/EquipmentAnalysis/PolicyConfigManage.vue
  27. 1 22
      src/views/homecomponents/EquipmentAnalysis/ToConfirmedAlarm.vue
  28. 1 22
      src/views/homecomponents/EquipmentAnalysis/UnableDeterAlarm.vue
  29. 282 6
      src/views/homecomponents/SystemSettings/OperationLog.vue
  30. 131 169
      src/views/homecomponents/SystemSettings/Organization.vue
  31. 30 65
      src/views/homecomponents/SystemSettings/ResourceManagement.vue
  32. 4 5
      src/views/homecomponents/SystemSettings/ResourceManagementIndex.vue
  33. 0 3
      src/views/homecomponents/SystemSettings/RolePermissions.vue
  34. 8 81
      src/views/homecomponents/SystemSettings/UserManagement.vue
  35. 1 3
      src/views/homecomponents/SystemSettings/UserManagementIndex.vue

+ 427 - 0
src/components/common/TreeFilter.vue

@@ -0,0 +1,427 @@
+<template>
+  <div class="tree-filter">
+    <div class="station-tree-top">
+      <Input
+        suffix="ios-search"
+        placeholder="输入关键字查询"
+        search
+        v-model="currentStation"
+        class="common-search"
+      />
+    </div>
+    <div class="station-tree-center">
+      <div class="station-tree-left common-scroll">
+        <Tree
+          :data="treeData"
+          ref="tree"
+          :render="renderContent"
+          @on-select-change="selectChange"
+          v-show="treeData.length>0"
+        ></Tree>
+        <div class="station-tree-left-notree" v-show="!treeData || treeData.length==0">
+          暂无数据!
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+import _ from "lodash";
+export default {
+  name: "TreeFilter",
+  components: {},
+  props: {
+    currentStaData: {
+      type: Array,
+      default: () => {
+        return [];
+      },
+    },
+    defaultData: {
+      type: Array,
+      default: () => {
+        return [];
+      },
+    },
+    clickAllNode: {
+      // 是否能点击全部节点 (true可点击  false第一层节点不能点击)
+      type: Boolean,
+      default: true,
+    },
+    firstCalssName: {
+      type: String,
+      default: "icon-hefeiditie",
+    },
+    secondCalssName: {
+      type: String,
+      default: "icon-sutpczhihuizhantai",
+    },
+    thirdCalssName: {
+      type: String,
+      default: "icon-ditiezhaofang",
+    },
+  },
+  data() {
+    return {
+      currentStation: null,
+      treeData: [],
+      saveId: null,
+      upperTreeData: []
+    };
+  },
+  watch: {
+    currentStation(val) {
+      if (val) {
+        let arr = JSON.parse(JSON.stringify(this.treeData));
+        this.treeData = this.filterNode(val, arr);
+      } else {
+        if (this.saveId) { //当this.saveId>0时,输入框没值时,默认上个选中的节点
+          this.treeData = this.getParentIdList(this.defaultData,this.saveId)
+        } else if(this.saveId === 0){ //选中根节点时
+          this.treeData =  this.getTree(this.defaultData);
+        } else { //初始化默认显示树形结构
+          this.treeData =  this.defaultData;
+        }
+      }
+    },
+    defaultData: {
+      handler(newValue, oldValue) {
+        this.treeData = newValue;
+      },
+    },
+  },
+  mounted() {
+    this.treeData = this.defaultData;
+  },
+  methods: {
+    // 当选中根节点时
+     getTree(arr) {
+      return arr.map((v,index) => {
+        v.selected = false
+        v.disabled = false
+        if (index==0) {
+          v.expand = true
+        } else {
+          v.expand = false
+        }
+        if (v.level== 1) {
+          v.disabled = true
+          v.selected = true
+          v.expand = true
+        }
+        if (v.children) v.children = this.getTree(v.children);
+        return v;
+      });
+    },
+    getParentIdList(list, id) {
+        if (!list || !id) {
+            return ''
+        }
+        let findParent = (data, currentdId, nodeId) => {
+            for (var i = 0, length = data.length; i < length; i++) {
+                let node = data[i];
+                node.expand = false
+                node.selected = false
+                node.disabled = false
+                if (node.level == 1 && !this.clickAllNode) {
+                  node.disabled = true
+                } else {
+                  node.disabled = false
+                }
+                if (node.nodeId === currentdId) {
+                    node.expand = true
+                    if (node.nodeId == id) {     
+                      node.expand = true
+                      this.currentOrgId = node.nodeId
+                      node.selected = true
+                      node.disabled = true
+                      if(node.children) {
+                        findParent(node.children, currentdId, node.nodeId);
+                      }       
+                    }
+                    if (!node.nodeId) {
+                      break
+                    }
+                    findParent(list, nodeId);
+                    // break
+                } else {
+                    if (node.children) {
+                      findParent(node.children, currentdId, node.nodeId);
+                    }
+                    continue
+                }
+            }
+            return list;
+        }
+        return findParent(list, id);
+    },
+    renderContent(h, { root, node, data }) {
+      let calssName = "",
+        color = "";
+      if (data.level == 1) {
+        calssName = "iconfont " + this.firstCalssName;
+        color = "red";
+      } else if (data.level == 2) {
+        calssName = "iconfont " + this.secondCalssName;
+        color = "#41aeff";
+      } else {
+        calssName = "iconfont " + this.thirdCalssName;
+        color = "#41aeff";
+      }
+      return h(
+        "span",
+        {
+          style: {
+            display: "inline-block",
+            width: "100%",
+          },
+        },
+        [
+          h("span", [
+            h("i", {
+              style: {
+                verticalAlign: "sub",
+                display: "inline-block",
+                margin: "0px 5px",
+                color: color,
+                fontSize: "24px",
+              },
+              class: calssName,
+            }),
+            // h("img", {
+            //   attrs: {
+            //     src: src
+            //   },
+            //   style: {
+            //     verticalAlign: "text-bottom",
+            //     display: "inline-block",
+            //     margin: "0px 5px"
+            //   }
+            // }),
+            h("span", data.title),
+          ]),
+        ]
+      );
+    },
+    //过滤树节点
+    filterNode(val, List) {
+      //过滤出满足条件的数组
+      let List1 = List.filter((item) => {
+        //如果该元素有children,则优先处理children的
+        if (item.children) {
+          if (item.level == 1 && !this.clickAllNode) {
+              item.disabled = true
+            } else {
+              item.disabled = false
+            }
+          item.selected = false;
+          item.expand = true;
+          //过滤children里面满足条件的
+          item.children = this.filterNode(val, item.children);
+          //如果children里面没有满足条件的,则进入,否则返回true
+          if (!item.children.some((item1) => item1.title.indexOf(val) !== -1)) {
+            //判断children里面是否还有一层children,如果有则对内层children继续调用函数判断,否则返回title中含有关键字的元素
+            if (item.children.some((item1) => item1.children)) {
+              item.children.forEach((item2) => {
+                item2.children && this.filterNode(val, item2.children);
+              });
+            } else {
+              return item.title.indexOf(val) > -1;
+            }
+          }
+          return true;
+        }
+        //返回title中含有关键字的元素
+        return item.title.indexOf(val) > -1;
+      });
+      return List1;
+    },
+    selectChange(option) {
+      if (option[0].level == 1) {
+        this.saveId = option[0].id
+      } else {
+        this.saveId = option[0].nodeId
+      }
+      let arr = [],
+        level = null,
+        currentNodeId = null;
+        this.treeData.forEach((first, firstIndex, firstArr) => {
+          first.expand = false; //expand 是否展开直子节点
+          if (this.clickAllNode) {
+            first.disabled = false; // disabled 是否禁止选中
+          }
+          // first.disabled = false; // disabled 是否禁止选中
+          first.selected = false;
+          if (first.title == option[0].title && first.id == option[0].id) {
+            first.selected = true;
+            first.disabled = true; // disabled 是否禁止选中
+            first.expand = true;
+            level = first.level;
+            currentNodeId = first.nodeId;
+          }
+          if (first.children) {
+            first.children.forEach((second, secondIndex, secondArr) => {
+              second.expand = false; //expand 是否展开直子节点
+              second.disabled = false; // disabled 是否禁止选中
+              second.selected = false;
+              if (option[0].level == 1) {
+                secondArr[firstIndex].expand = true;
+              }
+              if (second.title == option[0].title && second.id == option[0].id) {
+                second.selected = true;
+                second.disabled = true; // disabled 是否禁止选中
+                second.expand = true;
+                currentNodeId = second.nodeId;
+                first.expand = true;
+                arr.push(second.nodeId);
+                level = second.level;
+              }
+              if (second.children && second.children.length > 0) {
+                second.children.forEach((thrid, thridIndex, thridArr) => {
+                  thrid.expand = false; //expand 是否展开直子节点
+                  thrid.disabled = false;
+                  thrid.selected = false;
+                  if (
+                    thrid.title == option[0].title &&
+                    thrid.id == option[0].id
+                  ) {
+                    thrid.selected = true;
+                    thrid.disabled = true; // disabled 是否禁止选中
+                    thrid.expand = true;
+                    second.expand = true;
+                    first.expand = true;
+                    currentNodeId = thrid.nodeId;
+                    arr.push(second.nodeId);
+                    arr.push(thrid.nodeId);
+                    level = thrid.level;
+                  }
+                  if (thrid.children && thrid.children.length > 0) {
+                    thrid.children.forEach((forth) => {
+                      forth.expand = false; //expand 是否展开直子节点
+                      forth.disabled = false;
+                      forth.selected = false;
+                      if (
+                        forth.title == option[0].title &&
+                        forth.id == option[0].id
+                      ) {
+                        forth.selected = true;
+                        forth.disabled = true; // disabled 是否禁止选中
+                        forth.expand = true;
+                        second.expand = true;
+                        first.expand = true;
+                        thrid.expand = true;
+                        currentNodeId = forth.nodeId;
+                        arr.push(second.nodeId);
+                        arr.push(thrid.nodeId);
+                        arr.push(forth.nodeId);
+                        level = forth.level;
+                      }
+                      if (forth.children && forth.children.length > 0) {
+                        forth.children.forEach((five) => {
+                          five.expand = false; //expand 是否展开直子节点
+                          five.disabled = false;
+                          five.selected = false;
+                          if (
+                            five.title == option[0].title &&
+                            five.id == option[0].id
+                          ) {
+                            five.selected = true;
+                            five.disabled = true; // disabled 是否禁止选中
+                            five.expand = true;
+                            second.expand = true;
+                            first.expand = true;
+                            thrid.expand = true;
+                            forth.expand = true;
+                            currentNodeId = five.nodeId;
+                            arr.push(second.nodeId);
+                            arr.push(thrid.nodeId);
+                            arr.push(forth.nodeId);
+                            arr.push(five.nodeId);
+                            level = five.level;
+                          }
+                        });
+                      }
+                    });
+                  }
+                });
+              }
+            });
+          }
+      });
+      this.$emit('treeChange',arr,level,currentNodeId)
+    },
+  },
+};
+</script>
+<style scoped lang="stylus">
+.tree-filter {
+  height: 100%;
+}
+.station-tree-center {
+  height: calc(100% - 32px);
+  padding-top: 10px;
+}
+.station-tree-left {
+  height: 100%;
+  overflow: auto;
+}
+.station-tree-left-notree {
+  height: 100%;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  color: #fff;
+  fon-size: 14px;
+}
+>>> .ivu-tree-empty {
+  height: 100%;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    color: #fff;
+}
+>>> .ivu-tree-arrow {
+  color: #41aeff;
+  width: 15px;
+}
+>>> .ivu-tree-title {
+  color: #fff;
+  min-width: 90%;
+  padding: 6px 4px;
+  vertical-align: middle;
+}
+>>> .ivu-tree-title:hover {
+    background-color: transparent;
+}
+>>> .ivu-tree-title-selected, >>> .ivu-tree-title-selected:hover {
+  background-color: #3565BC;
+  // background-color: transparent;
+  color: #fff;
+}
+>>> .ivu-tree-title img {
+  width: 18px;
+  height: 18px;
+}
+// >>> .ivu-tree .ivu-icon {// 禁止旋转
+//   -webkit-transform: rotate(0deg);
+//   transform: rotate(0deg);
+// }
+// >>> .ivu-tree .ivu-icon-ios-arrow-forward:before { //改变tree默认折叠的三角箭头
+//     background: url('../../assets/images/yu.png') no-repeat 0 3px;
+//     content: '';
+//     display: block;
+//     width: 16px;
+//     height: 16px;
+//     font-size: 16px;
+//     background-size: 16px;
+// }
+// >>> .ivu-tree .ivu-tree-arrow-open .ivu-icon-ios-arrow-forward:before { //改变tree默认展开的三角箭头
+//     background: url('../../assets/images/warning.png') no-repeat 0 0px;
+//     content: '';
+//     display: block;
+//     width: 16px;
+//     height: 16px;
+//     font-size: 16px;
+//     background-size: 16px;
+// }
+</style>

+ 10 - 17
src/components/common/TreeList.vue

@@ -159,7 +159,7 @@ export default {
                   this.selectVal = second.title;
                   currentNodeId = second.nodeId
                   first.expand = true
-                  arr.push(second.id)
+                  arr.push(second.nodeId)
                   level = second.level
               }
               if (second.children && second.children.length>0) {
@@ -167,8 +167,6 @@ export default {
                   thrid.expand = false; //expand 是否展开直子节点 
                   thrid.disabled = false; 
                   thrid.selected = false;
-                  // if (newArr[0].level == 1) {
-                  // }
                   if (thrid.title == newArr[0].title && thrid.id == newArr[0].id) {
                     thrid.selected = true;
                     thrid.disabled = true; // disabled 是否禁止选中 
@@ -177,8 +175,8 @@ export default {
                     first.expand = true
                     this.selectVal = thrid.title;
                     currentNodeId = thrid.nodeId
-                    arr.push(second.id)
-                    arr.push(thrid.id)
+                    arr.push(second.nodeId)
+                    arr.push(thrid.nodeId)
                     level = thrid.level
                   }
                   if (thrid.children && thrid.children.length>0) {
@@ -197,9 +195,9 @@ export default {
                         thrid.expand = true;
                         this.selectVal = forth.title;
                         currentNodeId = forth.nodeId
-                        arr.push(second.id)
-                        arr.push(thrid.id)
-                        arr.push(forth.id)
+                        arr.push(second.nodeId)
+                        arr.push(thrid.nodeId)
+                        arr.push(forth.nodeId)
                         level = forth.level  
                       }
                       if (forth.children && forth.children.length>0) {
@@ -220,10 +218,10 @@ export default {
                             forth.expand = true
                             this.selectVal = five.title;
                             currentNodeId = five.nodeId
-                            arr.push(second.id)
-                            arr.push(thrid.id)
-                            arr.push(forth.id)
-                            arr.push(five.id)
+                            arr.push(second.nodeId)
+                            arr.push(thrid.nodeId)
+                            arr.push(forth.nodeId)
+                            arr.push(five.nodeId)
                             level = five.level
                           }
                         })
@@ -245,13 +243,8 @@ export default {
 <style scoped lang="stylus">
 >>> .ivu-tree-arrow {
   color: #41aeff;
-  // height: 30px;
-  // line-height: 30px;
   width: 15px;
 }
->>> .ivu-tree-children li {
-  // width: 100%;
-}
 >>> .ivu-tree-title {
   color: #fff;
   min-width: 90%;

+ 2 - 0
src/components/common/index.js

@@ -8,6 +8,7 @@ import NoData from './NoData.vue'
 import RollingDetailTable from './RollingDetailTable.vue'
 // import SelectType from './SelectType.vue'
 import TreeList from './TreeList.vue'
+import TreeFilter from './TreeFilter.vue'
 import TreeSelect from './TreeSelect.vue'
 // import AsideList from './AsideList.vue'
 // import TabsList from './TabsList.vue'
@@ -38,6 +39,7 @@ const Global = {
     Vue.component('TreeList', TreeList)
     // 树形下拉框组件
     Vue.component('TreeSelect', TreeSelect)
+    Vue.component('TreeFilter', TreeFilter)
     // // 表格搜索组件
     // // Vue.component('SearchTable', SearchTable)
     // Vue.component('AsideList', AsideList)

+ 58 - 4
src/components/TreeFilter.vue → src/components/treefilter2.vue

@@ -2,7 +2,7 @@
   <div class="container">
     <!-- tree过滤字节模糊查询 -->
     <Input placeholder="输入关键字进行过滤" v-model="filterText"/>
-    <Tree :data="data" show-checkbox></Tree>
+    <Tree :data="treeData" show-checkbox></Tree>
   </div>
 </template>
 <script>
@@ -62,14 +62,68 @@ export default {
   },
   watch: {
       filterText(val) {
-          let arr=JSON.parse(JSON.stringify(this.data2))
-          this.data=this.filterNode(val,arr)
-      }
+          // let arr=JSON.parse(JSON.stringify(this.data2))
+          // this.data=this.filterNode(val,arr)
+      },
+      defaultData: {
+       handler(newValue, oldValue) {
+          this.treeData = newValue;
+        }, 
+   }
   },
   mounted() {
     this.data=this.data2
   },
   methods: {
+    renderContent(h, { root, node, data }) {
+      let calssName = "", color="";
+      if (data.level == 1) {
+        calssName = 'iconfont '+ this.firstCalssName;
+        color = 'red'
+      } else if (data.level == 2) {
+        calssName = 'iconfont '+ this.secondCalssName;
+        color = '#41aeff'
+      } else {
+        calssName = 'iconfont '+ this.thirdCalssName
+        color = '#41aeff'
+      }
+      return h(
+        "span",
+        {
+          style: {
+            display: "inline-block",
+            width: "100%",
+          }
+        },
+        [
+          h("span", [
+             h("i", {
+              style: {
+                verticalAlign: "sub",
+                display: "inline-block",
+                margin: "0px 5px",
+                color: color,
+                fontSize:'24px'
+              },
+              class: calssName
+            }),
+            // h("img", {
+            //   attrs: {
+            //     src: src
+            //   },
+            //   style: {
+            //     verticalAlign: "text-bottom",
+            //     display: "inline-block",
+            //     margin: "0px 5px"
+            //   }
+            // }),
+            h(
+              "span",data.title
+            )
+          ])
+        ]
+      );
+    },
      //过滤树节点
             filterNode(val,List){
                 //过滤出满足条件的数组

+ 58 - 123
src/views/homecomponents/BasicInfomation/ApplicationEquip.vue

@@ -5,17 +5,7 @@
         <i-col span="5" style="height:100%">
           <div class="station-tree">
             <div class="station-tree-body">
-              <div class="station-tree-top">
-                <Input suffix="ios-search" placeholder="输入关键字查询" clearable search v-model="currentStation" class="common-search"  @on-search="iconChange" @on-clear="clearChange"/>
-              </div>
-              <div class="station-tree-center">
-                <div class="station-tree-left common-scroll" v-show="showTree">
-                  <tree-list :defaultData="stationData" :currentStaData="currentStaData" :clickAllNode="true" secondCalssName="icon-shebei1" thirdCalssName="icon-shebei" v-if="stationData && stationData.length>0" @treeChange="treeChange" ref="tree"></tree-list>
-                </div>
-                <div class="station-tree-left-notree" v-show="!showTree">
-                  关键字输入错误!
-                </div>
-              </div>
+              <tree-filter :defaultData="stationData" secondCalssName="icon-shebei1" thirdCalssName="icon-shebei" v-if="stationData && stationData.length>0" @treeChange="treeChange" ref="tree"></tree-filter>
             </div>
           </div>
         </i-col>
@@ -95,8 +85,6 @@
 import _ from 'lodash'
 export default {
   name: "ApplicationEquip",
-  components:{
-  },
   data() {
     return {
       currentStation: '',
@@ -165,7 +153,8 @@ export default {
         pageNum: 1,
         pageSize: 9999
       },
-      appNameList: []
+      appNameList: [],
+      saveId: null
     };
   },
   mounted() {
@@ -178,98 +167,65 @@ export default {
      this.$get('metroapi/application/appEquipmentTypeTree').then(res => {
       if (res.httpCode == 1) {
         this.stationData = res.data
+        if (this.saveId) {
+          this.stationData = this.getParentIdList(this.stationData,this.saveId)
+        }
 			}
 		 })
     },
-    // 递归函数 每层数组的第一个对象里的属性expand 全展开(true)
-    getTree(arr) {
-      return arr.map((v,index) => {
-        if (index==0) {
-          v.expand = true
-        }
-        if (v.children) v.children = this.getTree(v.children);
-        return v;
-      });
-    },
-    iconChange: _.throttle(function() {
-      this.currentStaData = []
-      this.treeName = []
-      this.$nextTick(()=> {
-        this.tableParams.pageNum = 1
-        this.getTableData()
-      })
-      if(this.currentStation != ''){
-        this.showTree = false
-        document.querySelector(".common-scroll").scrollTo(0, 0); // 滚动条回到顶部
-      } else {
-        document.querySelector(".common-scroll").scrollTo(0, 0); // 滚动条回到顶部
-        this.showTree = true
-        this.stationData = this.getTree(this.stationData)
-        return 
-      }
-      this.getSelectedItem()
-		}, 500),
-    clearChange () {
-      this.getSelectedItem()
-      this.$nextTick(()=> {
-        this.tableParams.pageNum = 1
-        this.getTableData()
-      })
-    },
-    getSelectedItem  () {
-      this.stationData.forEach((item, index,itemArr) => {
-        item.expand = false;
-        item.disabled = false; 
-        item.selected = false;
-        if (item.title == this.currentStation) {
-            item.selected = true;
-            item.disabled = true; // disabled 是否禁止选中 
-            item.expand = true;
-            this.currentStaData.push(item)
-            this.showTree = true
+    getParentIdList(list, id) {
+        if (!list || !id) {
+            return ''
         }
-        if (this.currentStation == '' && index == 0) {
-          item.expand = true
+        let findParent = (data, currentdId, nodeId) => {
+            for (var i = 0, length = data.length; i < length; i++) {
+                let node = data[i];
+                node.expand = false
+                node.selected = false
+                node.disabled = false
+                if (node.nodeId === currentdId) {
+                    node.expand = true
+                    if (node.nodeId == id) {     
+                      node.expand = true
+                      this.currentOrgId = node.nodeId
+                      node.selected = true
+                      node.disabled = true
+                      // this.$refs.treeManage.getOrgData(node.nodeId)
+                      if(node.children) {
+                        findParent(node.children, currentdId, node.nodeId);
+                      }       
+                    }
+                    if (!node.nodeId) {
+                      break
+                    }
+                    findParent(list, nodeId);
+                    // break
+                } else {
+                    if (node.children) {
+                      findParent(node.children, currentdId, node.nodeId);
+                    }
+                    continue
+                }
+            }
+            return list;
         }
-        item.children.forEach((val, i,valArr) => {
-          val.expand = false; //expand 是否展开直子节点 
-          val.disabled = false; // disabled 是否禁止选中
-          val.selected = false;
-          if (val.title == this.currentStation) {
-            val.selected = true;
-            val.disabled = true; // disabled 是否禁止选中 
-            val.expand = true;
-            item.expand = true;
-            this.currentStaData.push(val)
-            this.showTree = true
-          }
-          if (this.currentStation == '' && i==0) {
-            val.expand = true
-          }
-          if (val.children) {
-            val.children.forEach ((lastVal,lastIndex) => {
-            lastVal.selected = false; //expand 是否展开直子节点 
-            lastVal.disabled = false; 
-            lastVal.expand = false;
-            if (lastVal.title == this.currentStation) {
-              lastVal.selected = true;
-              lastVal.disabled = true; // disabled 是否禁止选中 
-              lastVal.expand = true;
-              val.expand = true
-              item.expand = true
-              this.currentStaData.push(lastVal)
-              this.showTree = true
-            } 
-           })
-          }
-        });
-      });
+        return findParent(list, id);
     },
-    treeChange(val,arr,level) {
-      this.currentStation = val
+    treeChange(arr,level,currentNodeId) {
+      this.saveId = currentNodeId
       this.$nextTick(()=> {
+        if (level == 2) {
+          this.tableParams.applicationId = arr[arr.length-1]
+          this.tableParams.equipmentTypeId = ''
+        } else if (level == 3) {
+          this.tableParams.applicationId = arr[arr.length-2]
+          this.tableParams.equipmentTypeId = arr[arr.length-1]
+        } else {
+          this.tableParams.applicationId = ''
+          this.tableParams.applicationId = ''
+        }
         this.tableParams.pageNum = 1
-        this.getTableData(arr,level)
+        this.getTableData()
       })
 		},
     rowClassName(row, index) {
@@ -284,31 +240,7 @@ export default {
       this.tableParams.pageNum = val
       this.getTableData()
     },
-    getTableData (arr,level) {
-      if (level) {
-        this.tableParams.keywords = ''
-        if (level == 2) {
-          this.tableParams.applicationId = arr[arr.length-1]
-          this.tableParams.equipmentTypeId = ''
-        } else if (level == 3) {
-          this.tableParams.applicationId = arr[arr.length-2]
-          this.tableParams.equipmentTypeId = arr[arr.length-1]
-        } else {
-          this.tableParams.applicationId = ''
-          this.tableParams.applicationId = ''
-        }
-      } else {
-        this.tableParams.applicationId = ''
-        this.tableParams.equipmentTypeId = ''
-        if (this.currentStation == '合肥轨道交通' || this.currentStation == '') {
-          this.tableParams.keywords = ''
-        } else {
-          this.tableParams.keywords = this.currentStation
-        }
-        // if (this.$route.params.type) {
-        //   this.currentStation = '合肥轨道交通'
-        // }
-      }
+    getTableData () {
       this.loading = true
       this.$get('metroapi/application/equipmentTypeInfo', this.tableParams).then(res=>{
         this.loading = false
@@ -385,6 +317,9 @@ export default {
       this.$post('metroapi/application/deleteEquipmentType',{appEquipmentTypeId:this.rowObj.appEquipmentTypeId}).then(res=>{
         if (res.httpCode == 1 ){
           this.modalStatus = false
+          this.tableParams.applicationId = ''
+          this.tableParams.equipmentTypeId = ''
+          this.saveId = null
           this.getTableData()
           this.getMetroLevel()
           this.$Message.info(res.msg)

+ 0 - 39
src/views/homecomponents/BasicInfomation/ApplicationStation.vue

@@ -413,45 +413,6 @@ export default {
           }
         })
     },
-    // selectModalLine (val) {
-    //   this.formOption.stationId = ''
-    //   this.formOption.level = ''
-    //   if (val) {
-    //     this.formOption.lineName = val.label
-    //     this.formOption.lineId =val.value
-    //     this.getStationData(val.value)
-    //   }
-    //   this.levelModalData = this.getCurrentLevel()
-    // },
-    // selectModalStation (val) {
-    //   if (val) {
-    //    this.formOption.stationName = val.label
-    //    this.formOption.stationId =val.value
-    //    this.levelModalData = this.getCurrentLevel()
-    //   }
-    // },
-    // selectModalLevel (val) {
-    //   if (val) {
-    //    this.formOption.levelDesc = val.label
-    //    this.formOption.level =val.value
-    //   }
-    // },
-    // 获取对话框层级数据
-    // getCurrentLevel () {
-    //   let arr = []
-    //   if (this.formOption.lineId == '-1') {
-    //     if (this.formOption.stationId == '' || this.formOption.stationId == '-1') {
-    //       arr = [{value:'线网',id:'9'}]
-    //     }
-    //   } else {
-    //     if (this.formOption.stationId == '' || this.formOption.stationId == '-1') {
-    //       arr = [{value:'线路',id:'8'}]
-    //     } else {
-    //       arr = [{value:'站点',id:'7'}]
-    //     }
-    //   }
-    //   return arr
-    // },
     searchClick () {
       this.getTableData()
     },

+ 50 - 165
src/views/homecomponents/BasicInfomation/DeviceManage.vue

@@ -5,17 +5,7 @@
         <i-col span="5" style="height:100%">
           <div class="station-tree">
             <div class="station-tree-body">
-              <div class="station-tree-top">
-                <Input suffix="ios-search" placeholder="输入关键字查询" clearable search v-model="currentStation" class="common-search"  @on-search="iconChange" @on-clear="clearChange"/>
-              </div>
-              <div class="station-tree-center">
-                <div class="station-tree-left common-scroll" v-show="showTree">
-                  <tree-list :defaultData="stationData" :currentStaData="currentStaData" :clickAllNode="true" secondCalssName="icon-shebei1" thirdCalssName="icon-shebei" v-if="stationData && stationData.length>0" @treeChange="treeChange" ref="tree"></tree-list>
-                </div>
-                <div class="station-tree-left-notree" v-show="!showTree">
-                  关键字输入错误!
-                </div>
-              </div>
+              <tree-filter :defaultData="stationData" :clickAllNode="true" secondCalssName="icon-shebei1" thirdCalssName="icon-shebei" v-if="stationData && stationData.length>0" @treeChange="treeChange"></tree-filter>
             </div>
           </div>
         </i-col>
@@ -36,7 +26,6 @@
 </template>
 <script>
 import _ from 'lodash'
-import LineManage from './LineManage.vue'
 import DeviceManageIndex from './DeviceManageIndex.vue'
 import DeviceTypeManage from './DeviceTypeManage.vue'
 import DeviceModelManage from './DeviceModelManage.vue'
@@ -48,13 +37,13 @@ export default {
   },
   data() {
     return {
-      currentStation: '',
-      currentStaData: [], // 当前搜索框搜索的站台数组对象,传给子组件,用来判断单选站台名当前选中状态
-      showTree: true,// 是否显示树形组件
 		  stationData: [],
       // tabsData: [{label:'设备管理'},{label:'设备类型管理'}],
       tabsData: [{label:'设备管理'},{label:'设备类型管理'},{label:'设备监测模型'},{label:'监测模型配置(开发人员专用)'}],
-      currentTabs: '设备管理'
+      currentTabs: '设备管理',
+      currentAppId: '',
+      currentEquTypeId: '',
+      level: '',
     };
   },
   mounted() {
@@ -96,149 +85,78 @@ export default {
     // 递归函数 每层数组的第一个对象里的属性expand 全展开(true)
     getTree(arr) {
       return arr.map((v,index) => {
+        v.selected = false
+        v.disabled = false
         if (index==0) {
           v.expand = true
+        } else {
+          v.expand = false
         }
         if (v.children) v.children = this.getTree(v.children);
         return v;
       });
     },
-    iconChange: _.throttle(function() {
-      this.currentStaData = []
-      this.treeName = []
-      this.$nextTick(()=> {
-        if (this.currentTabs == '设备管理') {
-          this.$refs.device.tableParams.pageNum = 1
-          this.$refs.device.getTableData(this.currentStation)
-        } else if(this.currentTabs == '设备类型管理'){
-          this.$nextTick(()=> {
-            this.$refs.deviceType.tableParams.pageNum = 1
-            this.$refs.deviceType.getTableData(this.currentStation)
-          })
-        } else if(this.currentTabs == '设备监测模型'){
-          this.$nextTick(()=> {
-            this.$refs.deviceModel.tableParams.pageNum = 1
-            this.$refs.deviceModel.getTableData(this.currentStation)
-          })
-        } else {
-          this.$nextTick(()=> {
-            this.$refs.modelConfig.tableParams.pageNum = 1
-            this.$refs.modelConfig.getTableData(this.currentStation)
-          })
-        }
-      })
-      if(this.currentStation != ''){
-        this.showTree = false
-        document.querySelector(".common-scroll").scrollTo(0, 0); // 滚动条回到顶部
-      } else {
-        document.querySelector(".common-scroll").scrollTo(0, 0); // 滚动条回到顶部
-        this.showTree = true
-        this.stationData = this.getTree(this.stationData)
-        return 
-      }
-      this.getSelectedItem()
-		}, 500),
-    clearChange () {
-      this.getSelectedItem()
-      this.$nextTick(()=> {
-        if (this.currentTabs == '设备管理') {
-          this.$refs.device.tableParams.pageNum = 1
-          this.$refs.device.getTableData(this.currentStation)
-        } else if(this.currentTabs == '设备类型管理'){
-          this.$nextTick(()=> {
-            this.$refs.deviceType.tableParams.pageNum = 1
-            this.$refs.deviceType.getTableData(this.currentStation)
-          })
-        } else if(this.currentTabs == '设备监测模型'){
-          this.$nextTick(()=> {
-            this.$refs.deviceModel.tableParams.pageNum = 1
-            this.$refs.deviceModel.getTableData(this.currentStation)
-          })
-        } else {
-          this.$nextTick(()=> {
-            this.$refs.modelConfig.tableParams.pageNum = 1
-            this.$refs.modelConfig.getTableData(this.currentStation)
-          })
-        }
-      })
-    },
-    getSelectedItem  () {
-      this.stationData.forEach((item, index,itemArr) => {
-        item.expand = false;
-        item.disabled = false; 
-        item.selected = false;
-        if (item.title == this.currentStation) {
-            item.selected = true;
-            item.disabled = true; // disabled 是否禁止选中 
-            item.expand = true;
-            this.currentStaData.push(item)
-            this.showTree = true
-        }
-        if (this.currentStation == '' && index == 0) {
-          item.expand = true
-        }
-        item.children.forEach((val, i,valArr) => {
-          val.expand = false; //expand 是否展开直子节点 
-          val.disabled = false; // disabled 是否禁止选中
-          val.selected = false;
-          if (val.title == this.currentStation) {
-            val.selected = true;
-            val.disabled = true; // disabled 是否禁止选中 
-            val.expand = true;
-            item.expand = true;
-            this.currentStaData.push(val)
-            this.showTree = true
-          }
-          if (this.currentStation == '' && i==0) {
-            val.expand = true
-          }
-          if (val.children) {
-            val.children.forEach ((lastVal,lastIndex) => {
-            lastVal.selected = false; //expand 是否展开直子节点 
-            lastVal.disabled = false; 
-            lastVal.expand = false;
-            if (lastVal.title == this.currentStation) {
-              lastVal.selected = true;
-              lastVal.disabled = true; // disabled 是否禁止选中 
-              lastVal.expand = true;
-              val.expand = true
-              item.expand = true
-              this.currentStaData.push(lastVal)
-              this.showTree = true
-            } 
-           })
-          } 
-        });
-      });
-    },
-    treeChange(val,arr,level) {
-      this.currentStation = val
+    treeChange(arr,level) {
+      this.level = level
       if (this.currentTabs == '设备管理') {
         this.$refs.device.tableParams.pageNum = 1
-        this.$refs.device.getTableData(this.currentStation,arr,level)
+        if (level == 2) {
+          this.$refs.device.tableParams.applicationId = arr[arr.length-1]
+          this.$refs.device.tableParams.equipmentType = ''
+        } else if (level == 3) {
+          this.$refs.device.tableParams.applicationId = arr[arr.length-2]
+          this.$refs.device.tableParams.equipmentType = arr[arr.length-1]
+        } else {
+          this.$refs.device.tableParams.applicationId = ''
+          this.$refs.device.tableParams.equipmentType = ''
+        }
+        // if (level == 2) {
+        //   this.currentAppId = arr[arr.length-1]
+        // } else if (level == 3) {
+        //   this.currentAppId = arr[arr.length-2]
+        //   this.currentEquTypeId = arr[arr.length-1]
+        // } else {
+        //   this.currentAppId = ''
+        //   this.currentEquTypeId = ''
+        // }
+        this.$refs.device.getTableData(arr,level)
       } else if(this.currentTabs == '设备类型管理'){
         this.$nextTick(()=> {
+          this.getParams ('deviceType',arr,level)
           this.$refs.deviceType.tableParams.pageNum = 1
-          this.$refs.deviceType.getTableData(this.currentStation,arr,level)
+          this.$refs.deviceType.getTableData()
         })
       } else if(this.currentTabs == '设备监测模型'){
         this.$nextTick(()=> {
+          this.getParams ('deviceModel',arr,level)
           this.$refs.deviceModel.tableParams.pageNum = 1
-          this.$refs.deviceModel.getTableData(this.currentStation,arr,level)
+          this.$refs.deviceModel.getTableData()
         })
        } else {
         this.$nextTick(()=> {
+          this.getParams ('modelConfig',arr,level)
           this.$refs.modelConfig.tableParams.pageNum = 1
-          this.$refs.modelConfig.getTableData(this.currentStation,arr,level)
+          this.$refs.modelConfig.getTableData()
         })
        }
 		},
+    getParams (name,arr,level) {
+     if (level == 2) {
+        this.$refs[name].tableParams.applicationId = arr[arr.length-1]
+        this.$refs[name].tableParams.equipmentTypeId = ''
+      } else if (level == 3) {
+        this.$refs[name].tableParams.applicationId = arr[arr.length-2]
+        this.$refs[name].tableParams.equipmentTypeId = arr[arr.length-1]
+      } else {
+        this.$refs[name].tableParams.applicationId = ''
+        this.$refs[name].tableParams.equipmentTypeId = ''
+      }
+    },
     tabsClick (name) {
       document.querySelector(".station-tree-left").scrollTo(0, 0) 
       sessionStorage.setItem("currentTabs",name)
       this.currentTabs = name
-      this.stationData = this.getElseTree(this.stationData) // 切换tab页时,清除tree选中情况
-      this.currentStation = ''
+      this.stationData = this.getTree(this.stationData) // 切换tab页时,清除tree选中情况
       if (this.currentTabs == '设备管理') {
          this.$nextTick(()=> {
           //  this.getMetroLevel()
@@ -262,22 +180,6 @@ export default {
     changeTree () {
      this.getMetroLevel()
     },
-    // 递归函数 每层数组的第一个对象里的属性expand 全展开(true)
-    getElseTree(arr) {
-      return arr.map((v,index) => {
-        if (v.title==this.currentStation) {
-          v.selected = false
-          v.disabled = false
-        }
-        if (index == 0) {
-          v.expand = true
-        } else {
-          v.expand = false
-        }
-        if (v.children) v.children = this.getElseTree(v.children);
-        return v;
-      });
-    },
   }
 };
 </script>
@@ -314,23 +216,6 @@ export default {
   height: 100%;
   padding: 10px;
 }
-.station-tree-center {
-  height: calc(100% - 32px);
-  padding-top: 10px;
-  // display: flex;
-}
-.station-tree-left {
-  height: 100%;
-  overflow: auto;
-}
-.station-tree-left-notree {
-  height: 100%;
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  color: #fff;
-  fon-size: 14px;
-}
 .right-main {
   height: 100%;
   padding: 10px 0;

+ 21 - 25
src/views/homecomponents/BasicInfomation/DeviceManageIndex.vue

@@ -192,6 +192,11 @@ export default {
   name: "DeviceManageIndex",
   components:{
   },
+  // props: {
+  //   currentAppId: [String,Number],
+  //   currentEquTypeId: [String,Number],
+  //   level: [String,Number],
+  // },
   data() {
     return {
       applicationParams: {
@@ -349,6 +354,21 @@ export default {
       detailLabel: [],
     };
   },
+  // watch: {
+  //   currentAppId: {
+  //    handler(newValue) {
+  //     console.log(newValue)
+  //       this.tableParams.applicationId = newValue
+  //       this.getTableData()
+  //     }
+  //  },
+  //  currentEquTypeId: {
+  //    handler(newValue) {
+  //       this.tableParams.equipmentType = newValue
+  //       this.getTableData()
+  //     }
+  //  },
+  // },
   mounted() {
     this.getType()
     this.getAppApplicate()
@@ -444,32 +464,8 @@ export default {
       }
     },
     // 获取表格数据
-    getTableData (keywords,arr,level) {
-       if (level) {
-        this.tableParams.keywords = ''
-        if (level == 2) {
-          this.tableParams.applicationId = arr[arr.length-1]
-          this.tableParams.equipmentType = ''
-        } else if (level == 3) {
-          this.tableParams.applicationId = arr[arr.length-2]
-          this.tableParams.equipmentType = arr[arr.length-1]
-        } else {
-          this.tableParams.applicationId = ''
-          this.tableParams.equipmentType = ''
-        }
-      } else {
-        this.tableParams.applicationId = ''
-        this.tableParams.equipmentType = ''
-        if (keywords == '合肥轨道交通' || keywords == '' || !keywords) {
-          this.tableParams.keywords = ''
-        } else {
-          this.tableParams.keywords = keywords
-        }
-      }
+    getTableData () {
       let params = JSON.parse(JSON.stringify(this.tableParams))
-      // params.lineId = params.lineId == '-1' || !params.lineId ? '':params.lineId
-      // params.stationId = params.stationId == '-1' || !params.stationId ?'':params.stationId
-      // params.equipmentStatus = params.equipmentStatus == '-1' || !params.equipmentStatus ?'':params.equipmentStatus
       params.lineId = params.lineId == '-1' ? '':params.lineId
       params.stationId = params.stationId == '-1'?'':params.stationId
       params.equipmentStatus = params.equipmentStatus == '-1' ?'':params.equipmentStatus

+ 1 - 22
src/views/homecomponents/BasicInfomation/DeviceModelManage.vue

@@ -269,28 +269,7 @@ export default {
       this.tableParams.pageNum = val
       this.getTableData()
     },
-    getTableData (keywords,arr,level) {
-      if (level) {
-        this.tableParams.keywords = ''
-        if (level == 2) {
-          this.tableParams.applicationId = arr[arr.length-1]
-          this.tableParams.equipmentTypeId = ''
-        } else if (level == 3) {
-          this.tableParams.applicationId = arr[arr.length-2]
-          this.tableParams.equipmentTypeId = arr[arr.length-1]
-        } else {
-          this.tableParams.applicationId = ''
-          this.tableParams.equipmentTypeId = ''
-        }
-      } else {
-        this.tableParams.applicationId = ''
-        this.tableParams.equipmentTypeId = ''
-        if (keywords == '合肥轨道交通' || keywords == '' || keywords == undefined) {
-          this.tableParams.keywords = ''
-        } else {
-          this.tableParams.keywords = keywords
-        }
-      }
+    getTableData () {
       this.loading = true
       this.$get('metroapi/target/queryTargetPage', this.tableParams).then(res=>{
         this.loading = false

+ 3 - 22
src/views/homecomponents/BasicInfomation/DeviceTypeManage.vue

@@ -282,28 +282,7 @@ export default {
       this.tableParams.pageSize = val
       this.getTableData()
     },
-    getTableData (keywords,arr,level) {
-      if (level) {
-        this.tableParams.name = ''
-        if (level == 2) {
-          this.tableParams.applicationId = arr[arr.length-1]
-          this.tableParams.equipmentTypeId = ''
-        } else if (level == 3) {
-          this.tableParams.applicationId = arr[arr.length-2]
-          this.tableParams.equipmentTypeId = arr[arr.length-1]
-        } else {
-          this.tableParams.applicationId = ''
-          this.tableParams.equipmentTypeId = ''
-        }
-      } else {
-        this.tableParams.applicationId = ''
-        this.tableParams.equipmentTypeId = ''
-        if (keywords == '合肥轨道交通' || keywords == '' || keywords == undefined) {
-          this.tableParams.name = ''
-        } else {
-          this.tableParams.name = keywords
-        }
-      }
+    getTableData () {
       this.loading = true
       this.$get('metroapi/equipment/queryEquipmentTypePage', this.tableParams).then(res=>{
         this.loading = false
@@ -400,6 +379,7 @@ export default {
             this.$post('metroapi/equipment/addEquipmentType', this.formOption).then(res=>{
               if ( res.httpCode == 1 ){
                 this.showModal = false
+                this.$emit('changeTree')
                 this.$Message.info(res.msg)
                 this.getTableData()
               } else {
@@ -416,6 +396,7 @@ export default {
             this.$post('metroapi/equipment/editEquipmentType', this.formOption).then(res=>{
               if (res.httpCode == 1 ){
                 this.showModal = false
+                this.$emit('changeTree')
                 this.$Message.info(res.msg)
                 this.getTableData()
               } else {

+ 73 - 93
src/views/homecomponents/BasicInfomation/LineStationManage.vue

@@ -9,17 +9,7 @@
         <i-col span="5" style="height:100%">
           <div class="station-tree">
             <div class="station-tree-body">
-              <div class="station-tree-top">
-                <Input suffix="ios-search" placeholder="输入关键字查询" clearable search v-model="currentStation" class="common-search"  @on-search="iconChange" @on-clear="clearChange"/>
-              </div>
-              <div class="station-tree-center">
-                <div class="station-tree-left common-scroll" v-show="showTree">
-                  <tree-list :defaultData="stationData" :currentStaData="currentStaData" :clickAllNode="true" v-if="stationData && stationData.length>0" @treeChange="treeChange" ref="tree"></tree-list>
-                </div>
-                <div class="station-tree-left-notree" v-show="!showTree">
-                  站点输入错误!
-                </div>
-              </div>
+               <tree-filter :defaultData="stationData" v-if="stationData && stationData.length>0" @treeChange="treeChange" ref="tree"></tree-filter>
             </div>
           </div>
         </i-col>
@@ -43,19 +33,17 @@ export default {
   },
   data() {
     return {
-      currentStation: '',
-      currentStaData: [], // 当前搜索框搜索的站台数组对象,传给子组件,用来判断单选站台名当前选中状态
-      showTree: true,// 是否显示树形组件
 		  stationData: [],
       tabsData: [{label:'线路管理'},{label:'站点管理'}],
       currentTabs: '线路管理',
+      saveId: null
     };
   },
   created() {
+    this.currentTabs = sessionStorage.getItem('currentTabs') || '线路管理'
     if (sessionStorage.getItem('currentTabs') == '站点管理') {
        this.$nextTick(()=> {
         this.currentTabs = sessionStorage.getItem('currentTabs')
-        this.currentStation = ''
         this.$refs.stationManage.getTableData()
         this.$refs.stationManage.getType()
         this.getMetroLevel()
@@ -78,116 +66,108 @@ export default {
       this.$get('metroapi/lineStation/lineStationTree').then(res => {
 				if (res.httpCode == 1) {
           this.stationData = res.data
+          if (this.saveId) {
+           this.stationData = this.getParentIdList(this.stationData,this.saveId)
+          }
 				}
 		  })
     },
+    getParentIdList(list, id) {
+        if (!list || !id) {
+            return ''
+        }
+        let findParent = (data, currentdId, nodeId) => {
+            for (var i = 0, length = data.length; i < length; i++) {
+                let node = data[i];
+                node.expand = false
+                node.selected = false
+                node.disabled = false
+                if (node.nodeId === currentdId) {
+                    node.expand = true
+                    if (node.nodeId == id) {     
+                      node.expand = true
+                      this.currentOrgId = node.nodeId
+                      node.selected = true
+                      node.disabled = true
+                      // this.$refs.treeManage.getOrgData(node.nodeId)
+                      if(node.children) {
+                        findParent(node.children, currentdId, node.nodeId);
+                      }       
+                    }
+                    if (!node.nodeId) {
+                      break
+                    }
+                    findParent(list, nodeId);
+                    // break
+                } else {
+                    if (node.children) {
+                      findParent(node.children, currentdId, node.nodeId);
+                    }
+                    continue
+                }
+            }
+            return list;
+        }
+        return findParent(list, id);
+    },
     // 递归函数 每层数组的第一个对象里的属性expand 全展开(true)
     getTree(arr) {
       return arr.map((v,index) => {
+        v.disabled = false
+        v.selected = false
         if (index==0) {
           v.expand = true
+        } else {
+          v.expand = false
         }
         if (v.children) v.children = this.getTree(v.children);
         return v;
       });
     },
-    iconChange: _.throttle(function() {
-      this.currentStaData = []
-      this.treeName = []
+    treeChange(arr,level,currentNodeId) {
+      this.saveId = currentNodeId
       this.$nextTick(()=> {
+        this.getParams('stationManage',arr,level)
         this.$refs.stationManage.tableParams.pageNum = 1
-        this.$refs.stationManage.getTableData(this.currentStation)
+        this.$refs.stationManage.getTableData()
       })
-      if(this.currentStation != ''){
-        this.showTree = false
-        document.querySelector(".common-scroll").scrollTo(0, 0); // 滚动条回到顶部
+		},
+    getParams (name,arr,level) {
+     if (level == 2) {
+        this.$refs[name].tableParams.lineId = arr[arr.length-1]
+        this.$refs[name].tableParams.stationId = ''
+      } else if (level == 3) {
+        this.$refs[name].tableParams.lineId = arr[arr.length-2]
+        this.$refs[name].tableParams.stationId = arr[arr.length-1]
       } else {
-        document.querySelector(".common-scroll").scrollTo(0, 0); // 滚动条回到顶部
-        this.showTree = true
-        this.stationData = this.getTree(this.stationData)
-        return 
+        this.$refs[name].tableParams.lineId = ''
+        this.$refs[name].tableParams.stationId = ''
       }
-      this.getSelectedItem()
-		}, 500),
-    clearChange () {
-      this.getSelectedItem()
-      this.$nextTick(()=> {
-        this.$refs.stationManage.tableParams.pageNum = 1
-        this.$refs.stationManage.getTableData(this.currentStation)
-      })
     },
-    getSelectedItem  () {
-      this.stationData.forEach((item, index,itemArr) => {
-        item.expand = false;
-        item.disabled = false; 
-        item.selected = false;
-        if (item.title == this.currentStation) {
-            item.selected = true;
-            item.disabled = true; // disabled 是否禁止选中 
-            item.expand = true;
-            this.currentStaData.push(item)
-            this.showTree = true
-        }
-        if (this.currentStation == '' && index == 0) {
-          item.expand = true
-        }
-        item.children.forEach((val, i,valArr) => {
-          val.expand = false; //expand 是否展开直子节点 
-          val.disabled = false; // disabled 是否禁止选中
-          val.selected = false;
-          if (val.title == this.currentStation) {
-            val.selected = true;
-            val.disabled = true; // disabled 是否禁止选中 
-            val.expand = true;
-            item.expand = true;
-            this.currentStaData.push(val)
-            this.showTree = true
-          }
-          if (this.currentStation == '' && i==0) {
-            val.expand = true
-          }
-          val.children.forEach ((lastVal,lastIndex) => {
-            lastVal.selected = false; //expand 是否展开直子节点 
-            lastVal.disabled = false; 
-            lastVal.expand = false;
-            if (lastVal.title == this.currentStation) {
-              lastVal.selected = true;
-              lastVal.disabled = true; // disabled 是否禁止选中 
-              lastVal.expand = true;
-              val.expand = true
-              item.expand = true
-              this.currentStaData.push(lastVal)
-              this.showTree = true
-            } 
-          })
-        });
-      });
-    },
-    treeChange(val,arr) {
-      this.currentStation = val
-      this.$nextTick(()=> {
-        this.$refs.stationManage.tableParams.pageNum = 1
-        this.$refs.stationManage.getTableData(this.currentStation)
-      })
-		},
     tabsClick (name) {
+      this.saveId = null
       sessionStorage.setItem("currentTabs",name)
       this.currentTabs = name
       if (this.currentTabs == '线路管理') {
          this.$nextTick(()=> {
-           this.getMetroLevel()
+           this.stationData = this.getTree(this.stationData)
            this.$refs.lineManage.getTableData()
         })
       } else {
         this.$nextTick(()=> {
-          this.currentStation = ''
-          this.$refs.stationManage.getTableData(this.currentStation)
+          this.$refs.stationManage.tableParams.lineId = ''
+          this.$refs.stationManage.tableParams.stationId = ''
+          this.getMetroLevel()
+          this.$refs.stationManage.getTableData()
           this.$refs.stationManage.getType()
         })
       }
     },
-    changeTree () {
-     this.getMetroLevel()
+    changeTree (operateType) {
+      if (operateType == 'del') {
+        this.saveId = null
+      }
+      this.getMetroLevel()
     }
   }
 };

+ 1 - 22
src/views/homecomponents/BasicInfomation/ModelConfig.vue

@@ -170,28 +170,7 @@ export default {
       this.tableParams.pageNum = val
       this.getTableData()
     },
-    getTableData (keywords,arr,level) {
-      if (level) {
-        this.tableParams.keywords = ''
-        if (level == 2) {
-          this.tableParams.applicationId = arr[arr.length-1]
-          this.tableParams.equipmentTypeId = ''
-        } else if (level == 3) {
-          this.tableParams.applicationId = arr[arr.length-2]
-          this.tableParams.equipmentTypeId = arr[arr.length-1]
-        } else {
-          this.tableParams.applicationId = ''
-          this.tableParams.equipmentTypeId = ''
-        }
-      } else {
-        this.tableParams.applicationId = ''
-        this.tableParams.equipmentTypeId = ''
-        if (keywords == '合肥轨道交通' || keywords == '' || keywords == undefined) {
-          this.tableParams.keywords = ''
-        } else {
-          this.tableParams.keywords = keywords
-        }
-      }
+    getTableData () {
       this.loading = true
       this.$get('metroapi/target/queryTargetPage', this.tableParams).then(res=>{
         this.loading = false

+ 8 - 6
src/views/homecomponents/BasicInfomation/StationManage.vue

@@ -88,7 +88,7 @@
       <div slot="footer">
           <Button @click="modalCancel">取消</Button>
           <Button type="primary" @click="modalOk('formOption')">确定</Button>
-        </div>
+      </div>
     </Modal>
     <Modal
       v-model="modalStatus"
@@ -156,7 +156,8 @@ export default {
       rowObj: {},
       loading: true,
       tableParams: {
-        stationName: '',
+        lineId: '',
+        stationId: '',
         pageNum: 1,
         pageSize: 10
       },
@@ -164,7 +165,7 @@ export default {
       tablePage: 0,
       tableData: [],
       showModal: false,
-      detailStatus: false, 
+      detailStatus: false,
       modalStatus: false,
       title: '新增站点',
       commonTitle: "确认删除",
@@ -361,8 +362,7 @@ export default {
       this.modalTitle = '删除的同时将解绑所有运营数据,且数据不可恢复。请慎重操作。'
       this.modalStatus = true
     },
-    getTableData (stationName) {
-      this.tableParams.stationName = stationName ? stationName : ''
+    getTableData () {
       this.loading = true
       this.$get('metroapi/lineStation/queryStationPage', this.tableParams).then(res=>{
         this.loading = false
@@ -479,7 +479,9 @@ export default {
       this.$get('metroapi/lineStation/delStation',params).then(res=>{
         if (res.httpCode == 1 ){
           this.modalStatus = false
-          this.$emit('changeTree')
+          this.tableParams.lineId = ''
+          this.tableParams.stationId = ''
+          this.$emit('changeTree','del')
           this.getTableData()
         } else {
           this.$Message.info(res.msg)

+ 1 - 22
src/views/homecomponents/EquipmentAnalysis/AlarmAcknowledgConfig.vue

@@ -455,28 +455,7 @@ export default {
       })
     },
     // 获取表格数据
-    getTableData (keywords,arr,level) {
-       if (level) {
-        this.tableParams.keywords = ''
-        if (level == 2) {
-          this.tableParams.applicationId = arr[arr.length-1]
-          this.tableParams.equipmentTypeId = ''
-        } else if (level == 3) {
-          this.tableParams.applicationId = arr[arr.length-2]
-          this.tableParams.equipmentTypeId = arr[arr.length-1]
-        } else {
-          this.tableParams.applicationId = ''
-          this.tableParams.equipmentTypeId = ''
-        }
-      } else {
-        this.tableParams.applicationId = ''
-        this.tableParams.equipmentTypeId = ''
-        if (keywords == '合肥轨道交通' || keywords == '' || !keywords) {
-          this.tableParams.keywords = ''
-        } else {
-          this.tableParams.keywords = keywords
-        }
-      }
+    getTableData () {
       let params = JSON.parse(JSON.stringify(this.tableParams))
       params.coverRankCount = params.coverRankCount == '-1' ? '':params.coverRankCount
       this.loading = true

+ 1 - 22
src/views/homecomponents/EquipmentAnalysis/AlarmFilterConfig.vue

@@ -434,28 +434,7 @@ export default {
       }
     },
     // 获取表格数据
-    getTableData (keywords,arr,level) {
-       if (level) {
-        this.tableParams.keywords = ''
-        if (level == 2) {
-          this.tableParams.applicationId = arr[arr.length-1]
-          this.tableParams.equipmentTypeId = ''
-        } else if (level == 3) {
-          this.tableParams.applicationId = arr[arr.length-2]
-          this.tableParams.equipmentTypeId = arr[arr.length-1]
-        } else {
-          this.tableParams.applicationId = ''
-          this.tableParams.equipmentTypeId = ''
-        }
-      } else {
-        this.tableParams.applicationId = ''
-        this.tableParams.equipmentTypeId = ''
-        if (keywords == '合肥轨道交通' || keywords == '' || !keywords) {
-          this.tableParams.keywords = ''
-        } else {
-          this.tableParams.keywords = keywords
-        }
-      }
+    getTableData () {
       let params = JSON.parse(JSON.stringify(this.tableParams))
       params.lineId = params.lineId == -1 ? '':params.lineId
       params.stationId = params.stationId == -1 ?'':params.stationId

+ 34 - 131
src/views/homecomponents/EquipmentAnalysis/AlarmHandling.vue

@@ -9,17 +9,7 @@
           <i-col span="4" style="height:100%">
             <div class="station-tree">
               <div class="station-tree-body">
-                <div class="station-tree-top">
-                  <Input suffix="ios-search" placeholder="输入关键字查询" clearable search v-model="currentStation" class="common-search"  @on-search="iconChange" @on-clear="clearChange"/>
-                </div>
-                <div class="station-tree-center">
-                  <div class="station-tree-left common-scroll" v-show="showTree">
-                    <tree-list :defaultData="stationData" :currentStaData="currentStaData" :clickAllNode="true" v-if="stationData && stationData.length>0" @treeChange="treeChange" ref="tree"></tree-list>
-                  </div>
-                  <div class="station-tree-left-notree" v-show="!showTree">
-                    站点输入错误!
-                  </div>
-                </div>
+                <tree-filter :defaultData="stationData" v-if="stationData && stationData.length>0" @treeChange="treeChange" ref="tree"></tree-filter>
               </div>
             </div>
           </i-col>
@@ -52,9 +42,6 @@ export default {
   },
   data() {
     return {
-      currentStation: '',
-      currentStaData: [], // 当前搜索框搜索的站台数组对象,传给子组件,用来判断单选站台名当前选中状态
-      showTree: true,// 是否显示树形组件
 		  stationData: [],
       tabsData: [{label:'告警信息-无法判定等级'},{label:'告警信息-待确认'},{label:'告警信息-已确认'},{label:'告警信息-已清除'},{label:'告警信息-已过滤'},{label:'综合处理告警信息'}],
       currentTabs: '告警信息-无法判定等级',
@@ -80,148 +67,80 @@ export default {
     },
     // 递归函数 每层数组的第一个对象里的属性expand 全展开(true)
     getTree(arr) {
-      return arr.map((v,index) => {
+       return arr.map((v,index) => {
+        v.selected = false
+        v.disabled = false
         if (index==0) {
           v.expand = true
+        } else {
+          v.expand = false
         }
         if (v.children) v.children = this.getTree(v.children);
         return v;
       });
     },
-    iconChange: _.throttle(function() {
-      this.currentStaData = []
-      this.treeName = []
-      this.$nextTick(()=> {
-       this.getCurrentTab(this.currentTabs,this.currentStation)
-      })
-      if(this.currentStation != ''){
-        this.showTree = false
-        document.querySelector(".common-scroll").scrollTo(0, 0); // 滚动条回到顶部
-      } else {
-        document.querySelector(".common-scroll").scrollTo(0, 0); // 滚动条回到顶部
-        this.showTree = true
-        this.stationData = this.getTree(this.stationData)
-        return 
-      }
-      this.getSelectedItem()
-		}, 500),
-    clearChange () {
-      this.getSelectedItem()
-      this.getCurrentTab(this.currentTabs,this.currentStation)
-    },
-    getSelectedItem  () {
-      this.stationData.forEach((item, index,itemArr) => {
-        item.expand = false;
-        item.disabled = false; 
-        item.selected = false;
-        if (item.title == this.currentStation) {
-            item.selected = true;
-            item.disabled = true; // disabled 是否禁止选中 
-            item.expand = true;
-            this.currentStaData.push(item)
-            this.showTree = true
-        }
-        if (this.currentStation == '' && index == 0) {
-          item.expand = true
-        }
-        if (item.children) {
-          item.children.forEach((val, i,valArr) => {
-          val.expand = false; //expand 是否展开直子节点 
-          val.disabled = false; // disabled 是否禁止选中
-          val.selected = false;
-          if (val.title == this.currentStation) {
-            val.selected = true;
-            val.disabled = true; // disabled 是否禁止选中 
-            val.expand = true;
-            item.expand = true;
-            this.currentStaData.push(val)
-            this.showTree = true
-          }
-          if (this.currentStation == '' && i==0) {
-            val.expand = true
-          }
-          if (val.children) {
-            val.children.forEach ((lastVal,lastIndex) => {
-              lastVal.selected = false; //expand 是否展开直子节点 
-              lastVal.disabled = false; 
-              lastVal.expand = false;
-              if (lastVal.title == this.currentStation) {
-                lastVal.selected = true;
-                lastVal.disabled = true; // disabled 是否禁止选中 
-                lastVal.expand = true;
-                val.expand = true
-                item.expand = true
-                this.currentStaData.push(lastVal)
-                this.showTree = true
-              } 
-            })
-          } 
-        });
-        }    
-      });
-    },
-    treeChange(val,arr,level) {
-      this.currentStation = val
-      this.getCurrentTab(this.currentTabs,this.currentStation,arr,level)
+    treeChange(arr,level) {
+      this.getCurrentTab(this.currentTabs,arr,level)
 		},
     tabsClick (name) {
-      this.stationData = this.getElseTree(this.stationData) // 切换tab页时,清除tree选中情况
-      this.currentStation = ''
+      this.stationData = this.getTree(this.stationData) // 切换tab页时,清除tree选中情况
       sessionStorage.setItem("currentTabs",name)
       this.getCurrentTab (name)
       if (document.querySelector(".station-tree-left")) {
         document.querySelector(".station-tree-left").scrollTo(0, 0) 
       }
     },
-    getCurrentTab (currentTabs,currentStation,arr,level) {
+    getCurrentTab (currentTabs,arr,level) {
       this.currentTabs = currentTabs || '告警信息-无法判定等级'
       if (currentTabs == '告警信息-无法判定等级' || !currentTabs) {
          this.$nextTick(()=> {
+          this.getParams('unableDeter',arr,level)
           this.$refs.unableDeter.tableParams.pageNum = 1
-          this.$refs.unableDeter.getTableData(currentStation,arr,level)
+          this.$refs.unableDeter.getTableData()
         })
       } else if(currentTabs == '告警信息-待确认'){       
         this.$nextTick(()=> {
+          this.getParams('toConfirmed',arr,level)
           this.$refs.toConfirmed.tableParams.pageNum = 1
-          this.$refs.toConfirmed.getTableData(currentStation,arr,level)
+          this.$refs.toConfirmed.getTableData()
         })
       } else if(currentTabs == '告警信息-已确认'){
         this.$nextTick(()=> {
+          this.getParams('confirmed',arr,level)
           this.$refs.confirmed.tableParams.pageNum = 1
-          this.$refs.confirmed.getTableData(currentStation,arr,level)
+          this.$refs.confirmed.getTableData()
         })
       } else if(currentTabs == '告警信息-已清除'){
         this.$nextTick(()=> {
+          this.getParams('cleared',arr,level)
           this.$refs.cleared.tableParams.pageNum = 1
-          this.$refs.cleared.getTableData(currentStation,arr,level)
+          this.$refs.cleared.getTableData()
         })
       } else if(currentTabs == '告警信息-已过滤'){
         this.$nextTick(()=> {
+          this.getParams('filtered',arr,level)
           this.$refs.filtered.tableParams.pageNum = 1
-          this.$refs.filtered.getTableData(currentStation,arr,level)
+          this.$refs.filtered.getTableData()
         })
       } else {
          this.$nextTick(()=> {
-           this.$refs.comprehensive.tableParams.pageNum = 1
-          this.$refs.comprehensive.getTableData(currentStation,arr,level)
+           this.getParams('comprehensive',arr,level)
+          this.$refs.comprehensive.tableParams.pageNum = 1
+          this.$refs.comprehensive.getTableData()
         })
       }
     },
-    // 递归函数 每层数组的第一个对象里的属性expand 全展开(true)
-    getElseTree(arr) {
-      return arr.map((v,index) => {
-        if (v.title==this.currentStation) {
-          v.selected = false
-          v.disabled = false
-        }
-        if (index == 0) {
-          v.expand = true
-        } else {
-          v.expand = false
-        }
-        if (v.children) v.children = this.getElseTree(v.children);
-        return v;
-      });
+    getParams (name,arr,level) {
+     if (level == 2) {
+        this.$refs[name].tableParams.lineId = arr[arr.length-1]
+        this.$refs[name].tableParams.stationId = ''
+      } else if (level == 3) {
+        this.$refs[name].tableParams.lineId = arr[arr.length-2]
+        this.$refs[name].tableParams.stationId = arr[arr.length-1]
+      } else {
+        this.$refs[name].tableParams.lineId = ''
+        this.$refs[name].tableParams.stationId = ''
+      }
     },
   }
 };
@@ -265,22 +184,6 @@ export default {
   height: 100%;
   padding: 10px;
 }
-.station-tree-center {
-  height: calc(100% - 32px);
-  padding-top: 10px;
-}
-.station-tree-left {
-  height: 100%;
-  overflow: auto;
-}
-.station-tree-left-notree {
-  height: 100%;
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  color: #fff;
-  fon-size: 14px;
-}
 .right-main {
   height: 100%;
   padding: 10px 0;

+ 40 - 112
src/views/homecomponents/EquipmentAnalysis/AlarmMonitor.vue

@@ -104,17 +104,7 @@
             </div>
             <div class="station-tree" v-else>
               <div class="station-tree-body">
-                <div class="station-tree-top">
-                  <Input suffix="ios-search" placeholder="输入关键字查询" clearable search v-model="currentStation" class="common-search"  @on-search="iconChange" @on-clear="clearChange"/>
-                </div>
-                <div class="station-tree-center">
-                  <div class="station-tree-left common-scroll" v-show="showTree">
-                    <tree-list :defaultData="stationData" :currentStaData="currentStaData" :clickAllNode="true" v-if="stationData && stationData.length>0" @treeChange="treeChange" ref="tree"></tree-list>
-                  </div>
-                  <div class="station-tree-left-notree" v-show="!showTree">
-                    站点输入错误!
-                  </div>
-                </div>
+                <tree-filter :defaultData="stationData" v-if="stationData && stationData.length>0" @treeChange="treeChange" ref="tree"></tree-filter>
               </div>
             </div>
           </i-col>
@@ -149,9 +139,6 @@ export default {
   },
   data() {
     return {
-      currentStation: '',
-      currentStaData: [], // 当前搜索框搜索的站台数组对象,传给子组件,用来判断单选站台名当前选中状态
-      showTree: true,// 是否显示树形组件
 		  stationData: [],
       tabsData: [{label:'今日告警'},{label:'实时告警列表-线网视图'},{label:'实时告警列表-设备视图'}],
       currentTabs: '今日告警',
@@ -229,100 +216,31 @@ export default {
     // 递归函数 每层数组的第一个对象里的属性expand 全展开(true)
     getTree(arr) {
       return arr.map((v,index) => {
+        v.selected = false
+        v.disabled = false
         if (index==0) {
           v.expand = true
+        } else {
+          v.expand = false
         }
         if (v.children) v.children = this.getTree(v.children);
         return v;
       });
     },
-    iconChange: _.throttle(function() {
-      this.currentStaData = []
-      this.treeName = []
-      this.$nextTick(()=> {
-       this.getCurrentTab(this.currentTabs,this.currentStation)
-      })
-      if(this.currentStation != ''){
-        this.showTree = false
-        document.querySelector(".common-scroll").scrollTo(0, 0); // 滚动条回到顶部
-      } else {
-        document.querySelector(".common-scroll").scrollTo(0, 0); // 滚动条回到顶部
-        this.showTree = true
-        this.stationData = this.getTree(this.stationData)
-        return 
-      }
-      this.getSelectedItem()
-		}, 500),
-    clearChange () {
-      this.getSelectedItem()
-      this.getCurrentTab(this.currentTabs,this.currentStation)
-    },
-    getSelectedItem  () {
-      this.stationData.forEach((item, index,itemArr) => {
-        item.expand = false;
-        item.disabled = false; 
-        item.selected = false;
-        if (item.title == this.currentStation) {
-            item.selected = true;
-            item.disabled = true; // disabled 是否禁止选中 
-            item.expand = true;
-            this.currentStaData.push(item)
-            this.showTree = true
-        }
-        if (this.currentStation == '' && index == 0) {
-          item.expand = true
-        }
-        if (item.children) {
-          item.children.forEach((val, i,valArr) => {
-          val.expand = false; //expand 是否展开直子节点 
-          val.disabled = false; // disabled 是否禁止选中
-          val.selected = false;
-          if (val.title == this.currentStation) {
-            val.selected = true;
-            val.disabled = true; // disabled 是否禁止选中 
-            val.expand = true;
-            item.expand = true;
-            this.currentStaData.push(val)
-            this.showTree = true
-          }
-          if (this.currentStation == '' && i==0) {
-            val.expand = true
-          }
-          if (val.children) {
-            val.children.forEach ((lastVal,lastIndex) => {
-              lastVal.selected = false; //expand 是否展开直子节点 
-              lastVal.disabled = false; 
-              lastVal.expand = false;
-              if (lastVal.title == this.currentStation) {
-                lastVal.selected = true;
-                lastVal.disabled = true; // disabled 是否禁止选中 
-                lastVal.expand = true;
-                val.expand = true
-                item.expand = true
-                this.currentStaData.push(lastVal)
-                this.showTree = true
-              } 
-            })
-          } 
-        });
-        }    
-      });
-    },
-    treeChange(val,arr,level) {
-      this.currentStation = val
-      this.getCurrentTab(this.currentTabs,this.currentStation,arr,level)
+   
+    treeChange(arr,level) {
+      this.getCurrentTab(this.currentTabs,arr,level)
 		},
     skipTabs (equipmentId) { //实时告警列表-线网视图 跳转到 实时告警列表-设备视图
       this.getTreeList()
-      this.getCurrentTab(sessionStorage.getItem('currentTabs'),'',null,null,equipmentId)
+      this.getCurrentTab(sessionStorage.getItem('currentTabs'),'',null,equipmentId)
     },
     skipEquipTabs (obj) {
       this.getTreeList()
-      this.getCurrentTab(sessionStorage.getItem('currentTabs'),'',null,null,obj)
+      this.getCurrentTab(sessionStorage.getItem('currentTabs'),'',null,obj)
     },
     tabsClick (name) {
-      this.stationData = this.getElseTree(this.stationData) // 切换tab页时,清除tree选中情况
-      this.currentStation = ''
+      this.stationData = this.getTree(this.stationData) // 切换tab页时,清除tree选中情况
       sessionStorage.setItem("currentTabs",name)
       this.getCurrentTab (name)
       this.getTreeList()
@@ -330,44 +248,54 @@ export default {
         document.querySelector(".station-tree-left").scrollTo(0, 0) 
       }
     },
-    getCurrentTab (currentTabs,currentStation,arr,level,equipmentId) {
+    getCurrentTab (currentTabs,arr,level,equipmentId) {
       this.currentTabs = currentTabs || '今日告警'
       if (currentTabs == '今日告警' || !currentTabs) {
         this.$route.params.equipmentId = null //告警处理页面跳转点击tab页,清除跳转参数值 先不考虑 等测试提bug再放开
       } else if(currentTabs == '实时告警列表-线网视图'){ 
         this.$route.params.equipmentId = null //告警处理页面跳转点击tab页,清除跳转参数值 先不考虑 等测试提bug再放开
         this.$nextTick(()=> {
+         this.getLineParams('alarmRealLine',arr,level)
          this.$refs.alarmRealLine.tableParams.pageNum = 1
-         this.$refs.alarmRealLine.getTableData(currentStation,arr,level,equipmentId)
+         this.$refs.alarmRealLine.getTableData(equipmentId)
         })
       } else if(currentTabs == '实时告警列表-设备视图'){
         this.$nextTick(()=> {
+          this.getParams('alarmRealStation',arr,level)
           this.$refs.alarmRealStation.tableParams.pageNum = 1
-          this.$refs.alarmRealStation.getTableData(currentStation,arr,level,equipmentId)
+          this.$refs.alarmRealStation.getTableData(equipmentId)
         })
       }
     },
+    getLineParams (name,arr,level) {
+     if (level == 2) {
+        this.$refs[name].tableParams.lineId = arr[arr.length-1]
+        this.$refs[name].tableParams.stationId = ''
+      } else if (level == 3) {
+        this.$refs[name].tableParams.lineId = arr[arr.length-2]
+        this.$refs[name].tableParams.stationId = arr[arr.length-1]
+      } else {
+        this.$refs[name].tableParams.lineId = ''
+        this.$refs[name].tableParams.stationId = ''
+      }
+    },
+    getParams (name,arr,level) {
+     if (level == 2) {
+        this.$refs[name].tableParams.applicationId = arr[arr.length-1]
+        this.$refs[name].tableParams.equipmentTypeId = ''
+      } else if (level == 3) {
+        this.$refs[name].tableParams.applicationId = arr[arr.length-2]
+        this.$refs[name].tableParams.equipmentTypeId = arr[arr.length-1]
+      } else {
+        this.$refs[name].tableParams.applicationId = ''
+        this.$refs[name].tableParams.equipmentTypeId = ''
+      }
+    },
     getTreeList () {
       if (sessionStorage.getItem('currentTabs')!= '今日告警') {
         this.getMetroLevel()
       }
     },
-    // 递归函数 每层数组的第一个对象里的属性expand 全展开(true)
-    getElseTree(arr) {
-      return arr.map((v,index) => {
-        if (v.title==this.currentStation) {
-          v.selected = false
-          v.disabled = false
-        }
-        if (index == 0) {
-          v.expand = true
-        } else {
-          v.expand = false
-        }
-        if (v.children) v.children = this.getElseTree(v.children);
-        return v;
-      });
-    },
   },
   beforeDestroy() {
     if (this.formatDate) {

+ 1 - 22
src/views/homecomponents/EquipmentAnalysis/AlarmRealLine.vue

@@ -451,28 +451,7 @@ export default {
       this.idArr = selection.map(item => item.id)
     },
     // 获取表格数据
-    getTableData (keywords,arr,level,skipval) {
-       if (level) {
-        this.tableParams.keywords = ''
-        if (level == 2) {
-          this.tableParams.lineId = arr[arr.length-1]
-          this.tableParams.stationId = ''
-        } else if (level == 3) {
-          this.tableParams.lineId = arr[arr.length-2]
-          this.tableParams.stationId = arr[arr.length-1]
-        } else {
-          this.tableParams.lineId = ''
-          this.tableParams.stationId = ''
-        }
-      } else {
-        this.tableParams.lineId = ''
-        this.tableParams.stationId = ''
-        if (keywords == '合肥轨道交通' || keywords == '' || !keywords) {
-          this.tableParams.oneKeywords = ''
-        } else {
-          this.tableParams.oneKeywords = keywords
-        }
-      }
+    getTableData (skipval) {
        if (skipval && skipval.todayText == '今日') {
         this.tableParams.beginAlertTime = moment().format("YYYY-MM-DD") + ' 00:00:00'
         this.tableParams.endAlertTime = moment().format("YYYY-MM-DD") + ' 23:59:59'

+ 1 - 22
src/views/homecomponents/EquipmentAnalysis/AlarmRealStation.vue

@@ -495,28 +495,7 @@ export default {
       this.idArr = selection.map(item => item.id)
     },
     // 获取表格数据
-    getTableData (keywords,arr,level,skipval) {
-      if (level) {
-        this.tableParams.keywords = ''
-        if (level == 2) {
-          this.tableParams.applicationId = arr[arr.length-1]
-          this.tableParams.equipmentTypeId = ''
-        } else if (level == 3) {
-          this.tableParams.applicationId = arr[arr.length-2]
-          this.tableParams.equipmentTypeId = arr[arr.length-1]
-        } else {
-          this.tableParams.applicationId = ''
-          this.tableParams.equipmentTypeId = ''
-        }
-      } else {
-        this.tableParams.applicationId = ''
-        this.tableParams.equipmentTypeId = ''
-        if (keywords == '合肥轨道交通' || keywords == '' || !keywords) {
-          this.tableParams.twoKeywords = ''
-        } else {
-          this.tableParams.twoKeywords = keywords
-        }
-      }
+    getTableData (skipval) {
        if (skipval && typeof(skipval) == 'number') { // 实时告警列表-线网视图详情跳转到这里
         this.tableParams.equipmentId = skipval
       }

+ 1 - 22
src/views/homecomponents/EquipmentAnalysis/ClearedAlarm.vue

@@ -419,28 +419,7 @@ export default {
       this.idArr = selection.map(item => item.id)
     },
     // 获取表格数据
-    getTableData (keywords,arr,level) {
-       if (level) {
-        this.tableParams.keywords = ''
-        if (level == 2) {
-          this.tableParams.lineId = arr[arr.length-1]
-          this.tableParams.stationId = ''
-        } else if (level == 3) {
-          this.tableParams.lineId = arr[arr.length-2]
-          this.tableParams.stationId = arr[arr.length-1]
-        } else {
-          this.tableParams.lineId = ''
-          this.tableParams.stationId = ''
-        }
-      } else {
-        this.tableParams.lineId = ''
-        this.tableParams.stationId = ''
-        if (keywords == '合肥轨道交通' || keywords == '' || !keywords) {
-          this.tableParams.oneKeywords = ''
-        } else {
-          this.tableParams.oneKeywords = keywords
-        }
-      }
+    getTableData () {
       let params = JSON.parse(JSON.stringify(this.tableParams))
       params.alertRankId = params.alertRankId == '-1' ? '':params.alertRankId
       params.applicationId = params.applicationId == '-1' ? '':params.applicationId

+ 1 - 22
src/views/homecomponents/EquipmentAnalysis/ComprehensiveInfor.vue

@@ -483,28 +483,7 @@ export default {
       this.idArr = selection.map(item => item.id)
     },
     // 获取表格数据
-    getTableData (keywords,arr,level) {
-       if (level) {
-        this.tableParams.keywords = ''
-        if (level == 2) {
-          this.tableParams.lineId = arr[arr.length-1]
-          this.tableParams.stationId = ''
-        } else if (level == 3) {
-          this.tableParams.lineId = arr[arr.length-2]
-          this.tableParams.stationId = arr[arr.length-1]
-        } else {
-          this.tableParams.lineId = ''
-          this.tableParams.stationId = ''
-        }
-      } else {
-        this.tableParams.lineId = ''
-        this.tableParams.stationId = ''
-        if (keywords == '合肥轨道交通' || keywords == '' || !keywords) {
-          this.tableParams.oneKeywords = ''
-        } else {
-          this.tableParams.oneKeywords = keywords
-        }
-      }
+    getTableData () {
       let params = JSON.parse(JSON.stringify(this.tableParams))
       params.alertRankId = params.alertRankId == '-1' ? '':params.alertRankId
       params.applicationId = params.applicationId == '-1' ? '':params.applicationId

+ 1 - 22
src/views/homecomponents/EquipmentAnalysis/ConfirmedAlarm.vue

@@ -423,28 +423,7 @@ export default {
       this.idArr = selection.map(item => item.id)
     },
     // 获取表格数据
-    getTableData (keywords,arr,level) {
-       if (level) {
-        this.tableParams.keywords = ''
-        if (level == 2) {
-          this.tableParams.lineId = arr[arr.length-1]
-          this.tableParams.stationId = ''
-        } else if (level == 3) {
-          this.tableParams.lineId = arr[arr.length-2]
-          this.tableParams.stationId = arr[arr.length-1]
-        } else {
-          this.tableParams.lineId = ''
-          this.tableParams.stationId = ''
-        }
-      } else {
-        this.tableParams.lineId = ''
-        this.tableParams.stationId = ''
-        if (keywords == '合肥轨道交通' || keywords == '' || !keywords) {
-          this.tableParams.oneKeywords = ''
-        } else {
-          this.tableParams.oneKeywords = keywords
-        }
-      }
+    getTableData () {
       let params = JSON.parse(JSON.stringify(this.tableParams))
       params.alertRankId = params.alertRankId == '-1' ? '':params.alertRankId
       params.applicationId = params.applicationId == '-1' ? '':params.applicationId

+ 1 - 22
src/views/homecomponents/EquipmentAnalysis/ContinuityMonitorConfig.vue

@@ -520,28 +520,7 @@ export default {
       })
     },
     // 获取表格数据
-    getTableData (keywords,arr,level) {
-       if (level) {
-        this.tableParams.keywords = ''
-        if (level == 2) {
-          this.tableParams.applicationId = arr[arr.length-1]
-          this.tableParams.equipmentTypeId = ''
-        } else if (level == 3) {
-          this.tableParams.applicationId = arr[arr.length-2]
-          this.tableParams.equipmentTypeId = arr[arr.length-1]
-        } else {
-          this.tableParams.applicationId = ''
-          this.tableParams.equipmentTypeId = ''
-        }
-      } else {
-        this.tableParams.applicationId = ''
-        this.tableParams.equipmentTypeId = ''
-        if (keywords == '合肥轨道交通' || keywords == '' || !keywords) {
-          this.tableParams.keywords = ''
-        } else {
-          this.tableParams.keywords = keywords
-        }
-      }
+    getTableData () {
       let params = JSON.parse(JSON.stringify(this.tableParams))
       params.coverTargetCount = params.coverTargetCount == '-1' ? '':params.coverTargetCount
       this.loading = true

+ 1 - 22
src/views/homecomponents/EquipmentAnalysis/FilteredAlarm.vue

@@ -400,28 +400,7 @@ export default {
       this.idArr = selection.map(item => item.id)
     },
     // 获取表格数据
-    getTableData (keywords,arr,level) {
-       if (level) {
-        this.tableParams.keywords = ''
-        if (level == 2) {
-          this.tableParams.lineId = arr[arr.length-1]
-          this.tableParams.stationId = ''
-        } else if (level == 3) {
-          this.tableParams.lineId = arr[arr.length-2]
-          this.tableParams.stationId = arr[arr.length-1]
-        } else {
-          this.tableParams.lineId = ''
-          this.tableParams.stationId = ''
-        }
-      } else {
-        this.tableParams.lineId = ''
-        this.tableParams.stationId = ''
-        if (keywords == '合肥轨道交通' || keywords == '' || !keywords) {
-          this.tableParams.oneKeywords = ''
-        } else {
-          this.tableParams.oneKeywords = keywords
-        }
-      }
+    getTableData () {
       let params = JSON.parse(JSON.stringify(this.tableParams))
       params.alertRankId = params.alertRankId == '-1' ? '':params.alertRankId
       params.applicationId = params.applicationId == '-1' ? '':params.applicationId

+ 1 - 24
src/views/homecomponents/EquipmentAnalysis/LevelDeterConfig.vue

@@ -663,30 +663,7 @@ export default {
       }
     },
     // 获取表格数据
-    getTableData (keywords,arr,level) {
-       if (level) {
-        this.tableParams.keywords = ''
-        if (level == 2) {
-          this.tableParams.applicationId = arr[arr.length-1]
-          this.tableParams.equipmentTypeId = ''
-        } else if (level == 3) {
-          this.tableParams.applicationId = arr[arr.length-2]
-          this.tableParams.equipmentTypeId = arr[arr.length-1]
-          // this.appParams.applicationId = this.tableParams.applicationId
-          // this.getAddEquipType(this.appParams)
-        } else {
-          this.tableParams.applicationId = ''
-          this.tableParams.equipmentTypeId = ''
-        }
-      } else {
-        this.tableParams.applicationId = ''
-        this.tableParams.equipmentTypeId = ''
-        if (keywords == '合肥轨道交通' || keywords == '' || !keywords) {
-          this.tableParams.keywords = ''
-        } else {
-          this.tableParams.keywords = keywords
-        }
-      }
+    getTableData () {
       let params = JSON.parse(JSON.stringify(this.tableParams))
       // params.applicationId = params.applicationId == '-1' ? '':params.applicationId
       // params.equipmentTypeId = params.equipmentTypeId == '-1' ?'':params.equipmentTypeId

+ 30 - 114
src/views/homecomponents/EquipmentAnalysis/PolicyConfigManage.vue

@@ -10,17 +10,7 @@
           <i-col span="5" style="height:100%">
             <div class="station-tree">
               <div class="station-tree-body">
-                <div class="station-tree-top">
-                  <Input suffix="ios-search" placeholder="输入关键字查询" clearable search v-model="currentStation" class="common-search"  @on-search="iconChange" @on-clear="clearChange"/>
-                </div>
-                <div class="station-tree-center">
-                  <div class="station-tree-left common-scroll" v-show="showTree">
-                    <tree-list :defaultData="stationData" :currentStaData="currentStaData" :clickAllNode="true" v-if="stationData && stationData.length>0" @treeChange="treeChange" ref="tree"></tree-list>
-                  </div>
-                  <div class="station-tree-left-notree" v-show="!showTree">
-                    站点输入错误!
-                  </div>
-                </div>
+                 <tree-filter :defaultData="stationData" v-if="stationData && stationData.length>0" @treeChange="treeChange" ref="tree"></tree-filter>
               </div>
             </div>
           </i-col>
@@ -50,16 +40,12 @@ export default {
   },
   data() {
     return {
-      currentStation: '',
-      currentStaData: [], // 当前搜索框搜索的站台数组对象,传给子组件,用来判断单选站台名当前选中状态
-      showTree: true,// 是否显示树形组件
 		  stationData: [],
       tabsData: [{label:'告警等级配置'},{label:'等级判定策略配置'},{label:'告警过滤策略配置'},{label:'告警自动确认策略'},{label:'连续性监测策略'}],
       currentTabs: '告警等级配置',
     };
   },
   mounted() {
-    // console.log(sessionStorage.getItem('currentTabs'))
     this.getCurrentTab (sessionStorage.getItem('currentTabs'))
     this.getMetroLevel()
   },
@@ -80,147 +66,77 @@ export default {
     // 递归函数 每层数组的第一个对象里的属性expand 全展开(true)
     getTree(arr) {
       return arr.map((v,index) => {
+        v.selected = false
+        v.disabled = false
         if (index==0) {
           v.expand = true
+        } else {
+          v.expand = false
         }
         if (v.children) v.children = this.getTree(v.children);
         return v;
       });
     },
-    iconChange: _.throttle(function() {
-      this.currentStaData = []
-      this.treeName = []
-      this.$nextTick(()=> {
-       this.getCurrentTab(this.currentTabs,this.currentStation)
-      })
-      if(this.currentStation != ''){
-        this.showTree = false
-        document.querySelector(".common-scroll").scrollTo(0, 0); // 滚动条回到顶部
-      } else {
-        document.querySelector(".common-scroll").scrollTo(0, 0); // 滚动条回到顶部
-        this.showTree = true
-        this.stationData = this.getTree(this.stationData)
-        return 
-      }
-      this.getSelectedItem()
-		}, 500),
-    clearChange () {
-      this.getSelectedItem()
-      this.getCurrentTab(this.currentTabs,this.currentStation)
-    },
-    getSelectedItem  () {
-      this.stationData.forEach((item, index,itemArr) => {
-        item.expand = false;
-        item.disabled = false; 
-        item.selected = false;
-        if (item.title == this.currentStation) {
-            item.selected = true;
-            item.disabled = true; // disabled 是否禁止选中 
-            item.expand = true;
-            this.currentStaData.push(item)
-            this.showTree = true
-        }
-        if (this.currentStation == '' && index == 0) {
-          item.expand = true
-        }
-        if (item.children) {
-          item.children.forEach((val, i,valArr) => {
-          val.expand = false; //expand 是否展开直子节点 
-          val.disabled = false; // disabled 是否禁止选中
-          val.selected = false;
-          if (val.title == this.currentStation) {
-            val.selected = true;
-            val.disabled = true; // disabled 是否禁止选中 
-            val.expand = true;
-            item.expand = true;
-            this.currentStaData.push(val)
-            this.showTree = true
-          }
-          if (this.currentStation == '' && i==0) {
-            val.expand = true
-          }
-          if (val.children) {
-            val.children.forEach ((lastVal,lastIndex) => {
-              lastVal.selected = false; //expand 是否展开直子节点 
-              lastVal.disabled = false; 
-              lastVal.expand = false;
-              if (lastVal.title == this.currentStation) {
-                lastVal.selected = true;
-                lastVal.disabled = true; // disabled 是否禁止选中 
-                lastVal.expand = true;
-                val.expand = true
-                item.expand = true
-                this.currentStaData.push(lastVal)
-                this.showTree = true
-              } 
-            })
-          } 
-        });
-        }    
-      });
-    },
-    treeChange(val,arr,level) {
-      this.currentStation = val
-      this.getCurrentTab(this.currentTabs,this.currentStation,arr,level)
+    treeChange(arr,level) {
+      this.getCurrentTab(this.currentTabs,arr,level)
       //  if (this.currentTabs == '设备管理') {
-      //   this.$refs.device.getTableData(this.currentStation,arr,level)
+      //   this.$refs.device.getTableData()
       // } else if(this.currentTabs == '设备类型管理'){
       //   this.$nextTick(()=> {
-      //     this.$refs.deviceType.getTableData(this.currentStation,arr,level)
+      //     this.$refs.deviceType.getTableData()
       //   })
       // }
 		},
     tabsClick (name) {
-      this.stationData = this.getElseTree(this.stationData) // 切换tab页时,清除tree选中情况
-      this.currentStation = ''
+      this.stationData = this.getTree(this.stationData) // 切换tab页时,清除tree选中情况
       sessionStorage.setItem("currentTabs",name)
       this.getCurrentTab (name)
       if (document.querySelector(".station-tree-left")) {
         document.querySelector(".station-tree-left").scrollTo(0, 0) 
       }
     },
-    getCurrentTab (currentTabs,currentStation,arr,level) {
+    getCurrentTab (currentTabs,arr,level) {
       this.currentTabs = currentTabs || '告警等级配置'
       if (currentTabs == '告警等级配置' || !currentTabs) {
          this.$nextTick(()=> {
         })
       } else if(currentTabs == '等级判定策略配置'){       
         this.$nextTick(()=> {
+          this.getParams('levelDeter',arr,level)
           this.$refs.levelDeter.tableParams.pageNum = 1
-          this.$refs.levelDeter.getTableData(currentStation,arr,level)
+          this.$refs.levelDeter.getTableData()
         })
       } else if(currentTabs == '告警过滤策略配置'){
         this.$nextTick(()=> {
+          this.getParams('alarmFilter',arr,level)
           this.$refs.alarmFilter.tableParams.pageNum = 1
-          this.$refs.alarmFilter.getTableData(currentStation,arr,level)
+          this.$refs.alarmFilter.getTableData()
         })
       } else if(currentTabs == '告警自动确认策略'){
         this.$nextTick(()=> {
+          this.getParams('alarmAcknowledg',arr,level)
           this.$refs.alarmAcknowledg.tableParams.pageNum = 1
-          this.$refs.alarmAcknowledg.getTableData(currentStation,arr,level)
+          this.$refs.alarmAcknowledg.getTableData()
         })
       } else if(currentTabs == '连续性监测策略'){
         this.$nextTick(()=> {
+          this.getParams('continuityMonitor',arr,level)
           this.$refs.continuityMonitor.tableParams.pageNum = 1
-          this.$refs.continuityMonitor.getTableData(currentStation,arr,level)
+          this.$refs.continuityMonitor.getTableData()
         })
       }
     },
-    // 递归函数 每层数组的第一个对象里的属性expand 全展开(true)
-    getElseTree(arr) {
-      return arr.map((v,index) => {
-        if (v.title==this.currentStation) {
-          v.selected = false
-          v.disabled = false
-        }
-        if (index == 0) {
-          v.expand = true
-        } else {
-          v.expand = false
-        }
-        if (v.children) v.children = this.getElseTree(v.children);
-        return v;
-      });
+    getParams (name,arr,level) {
+     if (level == 2) {
+        this.$refs[name].tableParams.applicationId = arr[arr.length-1]
+        this.$refs[name].tableParams.equipmentTypeId = ''
+      } else if (level == 3) {
+        this.$refs[name].tableParams.applicationId = arr[arr.length-2]
+        this.$refs[name].tableParams.equipmentTypeId = arr[arr.length-1]
+      } else {
+        this.$refs[name].tableParams.applicationId = ''
+        this.$refs[name].tableParams.equipmentTypeId = ''
+      }
     },
   }
 };

+ 1 - 22
src/views/homecomponents/EquipmentAnalysis/ToConfirmedAlarm.vue

@@ -437,28 +437,7 @@ export default {
       this.idArr = selection.map(item => item.id)
     },
     // 获取表格数据
-    getTableData (keywords,arr,level) {
-       if (level) {
-        this.tableParams.keywords = ''
-        if (level == 2) {
-          this.tableParams.lineId = arr[arr.length-1]
-          this.tableParams.stationId = ''
-        } else if (level == 3) {
-          this.tableParams.lineId = arr[arr.length-2]
-          this.tableParams.stationId = arr[arr.length-1]
-        } else {
-          this.tableParams.lineId = ''
-          this.tableParams.stationId = ''
-        }
-      } else {
-        this.tableParams.lineId = ''
-        this.tableParams.stationId = ''
-        if (keywords == '合肥轨道交通' || keywords == '' || !keywords) {
-          this.tableParams.oneKeywords = ''
-        } else {
-          this.tableParams.oneKeywords = keywords
-        }
-      }
+    getTableData () {
       let params = JSON.parse(JSON.stringify(this.tableParams))
       params.alertRankId = params.alertRankId == '-1' ? '':params.alertRankId
       params.applicationId = params.applicationId == '-1' ? '':params.applicationId

+ 1 - 22
src/views/homecomponents/EquipmentAnalysis/UnableDeterAlarm.vue

@@ -390,28 +390,7 @@ export default {
       this.idArr = selection.map(item => item.id)
     },
     // 获取表格数据
-    getTableData (keywords,arr,level) {
-       if (level) {
-        this.tableParams.keywords = ''
-        if (level == 2) {
-          this.tableParams.lineId = arr[arr.length-1]
-          this.tableParams.stationId = ''
-        } else if (level == 3) {
-          this.tableParams.lineId = arr[arr.length-2]
-          this.tableParams.stationId = arr[arr.length-1]
-        } else {
-          this.tableParams.lineId = ''
-          this.tableParams.stationId = ''
-        }
-      } else {
-        this.tableParams.lineId = ''
-        this.tableParams.stationId = ''
-        if (keywords == '合肥轨道交通' || keywords == '' || !keywords) {
-          this.tableParams.oneKeywords = ''
-        } else {
-          this.tableParams.oneKeywords = keywords
-        }
-      }
+    getTableData () {
       let params = JSON.parse(JSON.stringify(this.tableParams))
       params.alertRankId = params.alertRankId == '-1' ? '':params.alertRankId
       params.applicationId = params.applicationId == '-1' ? '':params.applicationId

+ 282 - 6
src/views/homecomponents/SystemSettings/OperationLog.vue

@@ -1,24 +1,300 @@
 <template>
-  <div class="container">
-    角色
+  <div class="content-main-manage">
+    <div class="content-main">
+     <div class="content-body-wrap">
+       <div class="content-body">
+          <div class="search-list">
+            <div class="search-left">
+              <Form class="common-form common-form-list" ref="tableParams" :model="tableParams" inline>
+                 <FormItem label="" prop="roleId">
+                  <Select v-model="tableParams.roleId" placeholder="角色名称">
+                    <Option v-for="item in roleData" :value="item.value" :key="item.value">{{ item.label }}</Option>
+                  </Select>
+                </FormItem>
+                 <FormItem label="">
+                  <DatePicker type="datetimerange" :value="dateRange" format="yyyy-MM-dd HH:mm:ss" placeholder="操作时间范围" class="common-date-picker date-picker-main" :clearable="false" :editable="false" @on-change="changePicker"></DatePicker>
+                </FormItem>
+                <FormItem label="" prop="moduleName">
+                  <Input placeholder="输入页面名称关键词进行查询" clearable search v-model="tableParams.moduleName" />
+                </FormItem>
+                <FormItem label="" prop="operationName">
+                  <Input placeholder="输入操作内容关键词进行查询" clearable search v-model="tableParams.operationName" />
+                </FormItem> 
+                <FormItem label="" >
+                  <Button type="primary" class="common-btn-search" @click="searchClick">
+                    <Icon type="ios-search" style="margin-right:4px;font-size: 16px"/> 筛选
+                  </Button> 
+                  <Button type="primary" class="common-btn-search" style="margin-left:10px" @click="resetClick('tableParams')">
+                    <Icon type="ios-search" style="margin-right:4px;font-size: 16px"/> 重置
+                  </Button>   
+                </FormItem>
+              </Form>
+            </div>
+            </div>
+            <div class="manage-main-center">
+              <Table :columns="columns" :data="tableData" class="common-table app-table" no-data-text="" :row-class-name="rowClassName" :loading="loading">
+                <template slot="loading">
+                    <Loading-animation></Loading-animation>
+                </template>
+              </Table>
+            </div>
+            <div class="common-page">
+              <div class="common-page-total">
+                共<span>{{tablePage}}</span>页 / <span>{{tableTotal}}</span>条数据
+              </div>
+              <Page :total="tableTotal" :current="tableParams.pageNum" :page-size="tableParams.pageSize" @on-change="changePage" @on-page-size-change="sizeChange" show-elevator />
+            </div>
+       </div>      
+     </div>
+    </div>
   </div>
 </template>
 <script>
 export default {
   name: "OperationLog",
-  components:{
-  },
   data() {
     return {
+      loading: true,
+      dateRange: [],
+      tableParams: {
+        roleId: '',
+        beginOperateTime: '',
+        endOperateTime: '',
+        moduleName: '',
+        operationName: '',
+        pageNum: 1,
+        pageSize: 10
+      },
+      tableData: [],
+      tableTotal: 0,
+      tablePage: 0,
+      columns: [
+           {
+            title: '序号',
+            type: 'index',
+            align: 'center',
+            ellipsis: true,
+            tooltip: true
+          },
+          {
+            title: '用户号',
+            key: 'operationUser',
+            align: 'center',
+          },
+          {
+            title: '角色名称',
+            key: 'roleName',
+            align: 'center',
+            ellipsis: true,
+            tooltip: true
+          },
+          {
+            title: 'IP地址',
+            key: 'operator',
+            align: 'center',
+            ellipsis: true,
+            tooltip: true
+          },
+          {
+            title: '模块页面',
+            key: 'moduleName',
+            align: 'center',
+            ellipsis: true,
+            tooltip: true
+          },
+          {
+            title: '操作',
+            key: 'operationName',
+            align: 'center'
+          },
+          {
+            title: '操作时间',
+            key: 'operationTime',
+            align: 'center',
+            ellipsis: true,
+            tooltip: true
+          },
+      ],   
+      roleData: [], 
     };
   },
   mounted() {
+    this.getRoleList()
+    this.getTableData()
   },
   methods: {
-   
+    changePicker (date) {
+      this.tableParams.beginOperateTime = date[0]
+      this.tableParams.endOperateTime = date[1]
+    },
+    rowClassName(row, index) {
+      if (index % 2 == 0) {
+        return "ivu-table-stripe-even";
+      } else {
+        return "ivu-table-stripe-odd";
+      }
+    },
+    // 分页
+    changePage (val) {
+      this.tableParams.pageNum = val
+      this.getTableData()
+    },
+    //跳转
+    sizeChange (val) {
+      this.tableParams.pageSize = val
+      this.getTableData()
+    },
+    // 获取表格数据
+    getTableData () {
+      let params = JSON.parse(JSON.stringify(this.tableParams))
+      params.roleId= params.roleId == '-1'?'':params.roleId
+      this.loading = true
+      this.$get('metroapi/log/querySysLogPage', params).then(res=>{
+        this.loading = false
+          if (res.httpCode == 1 ){
+            this.tableData = res.data.data
+            this.tableTotal = res.data.count
+            if (res.data.data.length==0) {
+              this.tablePage = 0
+            } else {
+              this.tablePage = res.data.count<= 10 ? 1: Math.ceil(res.data.count/this.tableParams.pageSize)
+            }
+            if (res.data.data.length==0 && this.tableParams.pageNum>1) {
+              this.tableParams.pageNum--
+              return this.getTableData()
+            }
+          } else {
+            this.tableData = []
+            this.tableTotal = 0
+          }
+        })
+    },
+    searchClick () {
+      this.tableParams.pageNum = 1
+      this.getTableData()
+    },
+    resetClick (name) {
+     this.dateRange = []
+     this.tableParams.beginOperateTime = ''
+     this.tableParams.endOperateTime = ''
+     this.$refs[name].resetFields()
+     this.tableParams.pageNum = 1
+     this.getTableData()
+    },   
+    getRoleList () {
+      //获取角色名称
+      this.$get('metroapi/role/box').then(res=>{
+        if (res.httpCode == 1 ){
+          this.roleModalData = JSON.parse(JSON.stringify(res.data))
+          this.roleData = res.data
+          this.roleData.unshift({ value: '-1', label: '角色名称' })
+        } else {
+          this.roleData = []
+        }
+      })
+    },  
   }
 };
 </script>
 <style scoped lang="stylus">
-
+.content-main-manage {
+  overflow: hidden;
+  height: calc(100% - 50px);
+  width: 100%;
+}
+.content-main {
+  width: 100%;
+  height: 100%;
+}
+.content-body-wrap {
+  width: 100%;
+  height: 100%;
+  background: #06214d;
+  padding: 10px;
+}
+.content-body {
+  height: 100%;
+  position: relative;
+}
+.search-list {
+  display: flex;
+  justify-content: space-between;
+  padding: 10px 0;
+}
+.search-left {
+  display: flex;
+  align-items: center;
+   .ivu-select {
+     width: 150px;
+     height: 32px;
+   }
+   .ivu-select-single .ivu-select-selection {
+     height: 100%;
+   }
+    >>> .ivu-input {
+     width: 225px;
+     height: 32px;
+   }
+    >>> .ivu-date-picker-editor .ivu-input {
+     width: 315px;
+   }
+    >>> .ivu-input-prefix, >>> .ivu-input-suffix {
+     height: 32px;
+     line-height: 32px;
+   }
+}
+.manage-main-center {
+  width: 100%;
+  height: calc(100% - 150px);
+}
+.common-table {
+  max-height: 100%;
+}
+>>> .common-table .ivu-table th {
+  height: 54px;
+ }
+ >>> .common-table .ivu-table td {
+  height: 55px;
+ }
+  >>> .common-table .ivu-spin-fix {
+   top: 54px;
+ }
+  >>> .app-table .ivu-spin-fix {
+   height: calc(100vh - 355px);
+ }
+ >>> .common-table .ivu-table-tip {
+  background: url('../../../assets/images/noData.png') no-repeat center;
+}
+>>> .common-table .ivu-table-tip table {
+ display: none;
+}
+>>> .app-table .ivu-table-tip {
+   height: calc(100vh - 355px);
+ }
+ >>> .modal-table {
+   overflow: auto !important;
+ }
+ >>> .modal-table .ivu-spin-fix {
+   height: 200px;
+ }
+  >>> .modal-table .ivu-table-tip {
+   height: 200px;
+ }
+.common-page {
+  margin-top: 15px;
+  display: flex;
+  align-items: center;
+  justify-content: flex-end;
+  position: absolute;
+  bottom: 0;
+  right: 0;
+}
+.common-page-total {
+  color: #fff;
+  padding-right: 10px;
+  font-size: 14px;
+  span {
+    color #409EFF;
+  }
+}
 </style>

+ 131 - 169
src/views/homecomponents/SystemSettings/Organization.vue

@@ -6,17 +6,7 @@
           <i-col span="4" style="height:100%">
             <div class="station-tree">
               <div class="station-tree-body">
-                <div class="station-tree-top">
-                  <Input suffix="ios-search" placeholder="输入关键字查询" clearable search v-model="currentStation" class="common-search"  @on-search="iconChange"/>
-                </div>
-                <div class="station-tree-center">
-                  <div class="station-tree-left common-scroll" v-show="showTree">
-                    <tree-list :defaultData="stationData" :currentStaData="currentStaData" :clickAllNode="false" v-if="stationData && stationData.length>0" @treeChange="treeChange" ref="tree"></tree-list>
-                  </div>
-                  <div class="station-tree-left-notree" v-show="!showTree">
-                    关键字输入错误!
-                  </div>
-                </div>
+                <tree-filter :defaultData="stationData" :clickAllNode="false" v-if="stationData && stationData.length>0" @treeChange="treeChange" ref="tree"></tree-filter>
               </div>
             </div>
           </i-col>
@@ -39,14 +29,9 @@ export default {
   },
   data() {
     return {
-      currentStation: '',
-      currentStaData: [], // 当前搜索框搜索的站台数组对象,传给子组件,用来判断单选站台名当前选中状态
-      showTree: true,// 是否显示树形组件
 		  stationData: [],
       levelNum: 0,
       currentOrgId: '',
-      // data: [],
-      //  value1: [],
     };
   },
   // watch: {
@@ -68,7 +53,6 @@ export default {
           this.stationData = res.data
           if (text == 'update') {
             this.stationData = this.getParentIdList(this.stationData,currentOrgId,editText)
-            // this.stationData = this.getChangeTree(this.stationData,currentOrgId,editText)
           } else {
             this.stationData = this.getTree(this.stationData)
           }
@@ -89,7 +73,6 @@ export default {
           this.levelNum = v.level
           v.selected = true
           v.disabled = true
-          this.currentStation = v.title
           this.currentOrgId = v.nodeId
           this.$refs.treeManage.getOrgData(v.nodeId)
         }
@@ -106,7 +89,6 @@ export default {
     //       this.levelNum = v.level
     //       v.selected = true
     //       v.disabled = true
-    //       this.currentStation = v.title
     //       this.currentOrgId = v.nodeId
     //       this.$refs.treeManage.getOrgData(v.nodeId,editText)
     //     }
@@ -114,134 +96,112 @@ export default {
     //     return v;
     //   });
     // },
-    iconChange: _.throttle(function() {
-      this.currentStaData = []
-      this.treeName = []
-      if(this.currentStation != ''){
-        this.showTree = false
-        document.querySelector(".common-scroll").scrollTo(0, 0); // 滚动条回到顶部
-      } else {
-        document.querySelector(".common-scroll").scrollTo(0, 0); // 滚动条回到顶部
-        this.showTree = true
-        this.stationData = this.getTree(this.stationData)
-        return 
-      }
-      if (this.currentStation == this.stationData[0].title) {
-        this.showTree = true
-        return
-      }
-      let currentNodeId = this.filterNodeId(this.stationData,this.currentStation)
-      if (currentNodeId) {
-        this.stationData = this.getParentIdList(this.stationData,currentNodeId)
-      }
-      // this.getSelectedItem()
-		}, 500),
-    getSelectedItem  () {
-      let level  = null, currentNodeId = null
-      this.stationData.forEach((first, firstIndex,firstArr) => {
-            first.expand = false; //expand 是否展开直子节点 
-            if (this.clickAllNode) {
-              first.disabled = false; // disabled 是否禁止选中
-            }
-            first.selected = false;
-            if (first.title == this.currentStation) {
-                first.selected = true;
-                first.disabled = true; // disabled 是否禁止选中 
-                first.expand = true;
-                level = first.level
-                currentNodeId = first.nodeId
-                this.showTree = true
-            }  
-            if (first.children) {
-              first.children.forEach((second, secondIndex,secondArr) => {
-              second.expand = false; //expand 是否展开直子节点 
-              second.disabled = false; // disabled 是否禁止选中
-              second.selected = false;
-              if (second.title == this.currentStation) {
-                  second.selected = true;
-                  second.disabled = true; // disabled 是否禁止选中 
-                  second.expand = true;
-                  currentNodeId = second.nodeId
-                  first.expand = true
-                  level = second.level
-                  this.showTree = true
-              }
-              if (second.children && second.children.length>0) {
-                second.children.forEach((thrid,thridIndex,thridArr) => {
-                  thrid.expand = false; //expand 是否展开直子节点 
-                  thrid.disabled = false; 
-                  thrid.selected = false;
-                  if (thrid.title == this.currentStation) {
-                    thrid.selected = true;
-                    thrid.disabled = true; // disabled 是否禁止选中 
-                    thrid.expand = true;
-                    second.expand = true
-                    first.expand = true
-                    currentNodeId = thrid.nodeId
-                    level = thrid.level
-                    this.showTree = true
-                  }
-                  if (thrid.children && thrid.children.length>0) {
-                    thrid.children.forEach((forth) => {
-                      forth.expand = false; //expand 是否展开直子节点 
-                      forth.disabled = false; 
-                      forth.selected = false;
-                      if (forth.title == this.currentStation) {
-                        forth.selected = true;
-                        forth.disabled = true; // disabled 是否禁止选中
-                        forth.expand = true;
-                        second.expand = true
-                        first.expand = true
-                        thrid.expand = true;
-                        currentNodeId = forth.nodeId
-                        level = forth.level
-                        this.showTree = true
-                      }
-                      if (forth.children && forth.children.length>0) {
-                        forth.children.forEach((five) => {
-                          five.expand = false; //expand 是否展开直子节点 
-                          five.disabled = false; 
-                          five.selected = false;
-                          if (five.title == this.currentStation) {
-                            five.selected = true;
-                            five.disabled = true; // disabled 是否禁止选中 
-                            five.expand = true;
-                            second.expand = true
-                            first.expand = true
-                            thrid.expand = true
-                            forth.expand = true
-                            currentNodeId = five.nodeId
-                            level = five.level
-                            this.showTree = true
-                          }
-                        })
-                        }
-                    })
-                  }
-                })
-              }
-            });
-            }        
-          });
-      this.$refs.treeManage.getOrgData(currentNodeId)
-    },
-    // 根据搜索框的值查到当前nodeId
-    filterNodeId(list,val){
-      let _this=this
-      for (let i = 0; i < list.length; i++) {
-        let a=list[i]
-        if(a.title=== val){
-          return a.nodeId
-        }else{
-          if(a.children && a.children.length>0){
-            let res=_this.filterNodeId(a.children,val)
-            if(res){
-              return res
-            }
-          }
-        }
-      }
-    },
+    // getSelectedItem  () {
+    //   let level  = null, currentNodeId = null
+    //   this.stationData.forEach((first, firstIndex,firstArr) => {
+    //         first.expand = false; //expand 是否展开直子节点 
+    //         if (this.clickAllNode) {
+    //           first.disabled = false; // disabled 是否禁止选中
+    //         }
+    //         first.selected = false;
+    //         if (first.title == this.currentStation) {
+    //             first.selected = true;
+    //             first.disabled = true; // disabled 是否禁止选中 
+    //             first.expand = true;
+    //             level = first.level
+    //             currentNodeId = first.nodeId
+    //             this.showTree = true
+    //         }  
+    //         if (first.children) {
+    //           first.children.forEach((second, secondIndex,secondArr) => {
+    //           second.expand = false; //expand 是否展开直子节点 
+    //           second.disabled = false; // disabled 是否禁止选中
+    //           second.selected = false;
+    //           if (second.title == this.currentStation) {
+    //               second.selected = true;
+    //               second.disabled = true; // disabled 是否禁止选中 
+    //               second.expand = true;
+    //               currentNodeId = second.nodeId
+    //               first.expand = true
+    //               level = second.level
+    //               this.showTree = true
+    //           }
+    //           if (second.children && second.children.length>0) {
+    //             second.children.forEach((thrid,thridIndex,thridArr) => {
+    //               thrid.expand = false; //expand 是否展开直子节点 
+    //               thrid.disabled = false; 
+    //               thrid.selected = false;
+    //               if (thrid.title == this.currentStation) {
+    //                 thrid.selected = true;
+    //                 thrid.disabled = true; // disabled 是否禁止选中 
+    //                 thrid.expand = true;
+    //                 second.expand = true
+    //                 first.expand = true
+    //                 currentNodeId = thrid.nodeId
+    //                 level = thrid.level
+    //                 this.showTree = true
+    //               }
+    //               if (thrid.children && thrid.children.length>0) {
+    //                 thrid.children.forEach((forth) => {
+    //                   forth.expand = false; //expand 是否展开直子节点 
+    //                   forth.disabled = false; 
+    //                   forth.selected = false;
+    //                   if (forth.title == this.currentStation) {
+    //                     forth.selected = true;
+    //                     forth.disabled = true; // disabled 是否禁止选中
+    //                     forth.expand = true;
+    //                     second.expand = true
+    //                     first.expand = true
+    //                     thrid.expand = true;
+    //                     currentNodeId = forth.nodeId
+    //                     level = forth.level
+    //                     this.showTree = true
+    //                   }
+    //                   if (forth.children && forth.children.length>0) {
+    //                     forth.children.forEach((five) => {
+    //                       five.expand = false; //expand 是否展开直子节点 
+    //                       five.disabled = false; 
+    //                       five.selected = false;
+    //                       if (five.title == this.currentStation) {
+    //                         five.selected = true;
+    //                         five.disabled = true; // disabled 是否禁止选中 
+    //                         five.expand = true;
+    //                         second.expand = true
+    //                         first.expand = true
+    //                         thrid.expand = true
+    //                         forth.expand = true
+    //                         currentNodeId = five.nodeId
+    //                         level = five.level
+    //                         this.showTree = true
+    //                       }
+    //                     })
+    //                     }
+    //                 })
+    //               }
+    //             })
+    //           }
+    //         });
+    //         }        
+    //       });
+    //   this.$refs.treeManage.getOrgData(currentNodeId)
+    // },
+    // // 根据搜索框的值查到当前nodeId
+    // filterNodeId(list,val){
+    //   let _this=this
+    //   for (let i = 0; i < list.length; i++) {
+    //     let a=list[i]
+    //     if(a.title=== val){
+    //       return a.nodeId
+    //     }else{
+    //       if(a.children && a.children.length>0){
+    //         let res=_this.filterNodeId(a.children,val)
+    //         if(res){
+    //           return res
+    //         }
+    //       }
+    //     }
+    //   }
+    // },
     // 递归循环 根据当前id找到它的所有父节点
     getParentIdList(list, id,editText) {
         if (!list || !id) {
@@ -258,14 +218,13 @@ export default {
                 }
                 if (node.nodeId === currentdId) {
                     node.expand = true
-                    if (node.title == this.currentStation) {
+                    if (node.nodeId == id) {     
                       node.expand = true
                       this.currentOrgId = node.nodeId
                       node.selected = true
                       node.disabled = true
-                      this.showTree = true
                       this.$refs.treeManage.getOrgData(node.nodeId,editText)
-                      if( node.children) {
+                      if(node.children) {
                         findParent(node.children, currentdId, node.nodeId);
                       }       
                     }
@@ -285,13 +244,16 @@ export default {
         }
         return findParent(list, id);
     },
-    treeChange(val,arr,level,currentNodeId) {
+    treeChange(arr,level,currentNodeId) {
       this.levelNum = level
-      this.currentStation = val
       this.$refs.treeManage.getOrgData(currentNodeId)
 		},
+    // inputChange (nodeId) {
+    //  this.getMetroLevel('init')
+    //  this.$refs.treeManage.getOrgData(nodeId)
+    // },
     changeTree (currentOrgId,editText) {
-    this.getMetroLevel('update',currentOrgId,editText)
+      this.getMetroLevel('update',currentOrgId,editText)
     }
   }
 };
@@ -335,22 +297,22 @@ export default {
   height: 100%;
   padding: 10px;
 }
-.station-tree-center {
-  height: calc(100% - 32px);
-  padding-top: 10px;
-}
-.station-tree-left {
-  height: 100%;
-  overflow: auto;
-}
-.station-tree-left-notree {
-  height: 100%;
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  color: #fff;
-  fon-size: 14px;
-}
+// .station-tree-center {
+//   height: calc(100% - 32px);
+//   padding-top: 10px;
+// }
+// .station-tree-left {
+//   height: 100%;
+//   overflow: auto;
+// }
+// .station-tree-left-notree {
+//   height: 100%;
+//   display: flex;
+//   align-items: center;
+//   justify-content: center;
+//   color: #fff;
+//   fon-size: 14px;
+// }
 .right-main {
   height: 100%;
   padding: 10px 0;

+ 30 - 65
src/views/homecomponents/SystemSettings/ResourceManagement.vue

@@ -6,17 +6,7 @@
           <i-col span="4" style="height:100%">
             <div class="station-tree">
               <div class="station-tree-body">
-                <div class="station-tree-top">
-                  <Input suffix="ios-search" placeholder="输入关键字查询" clearable search v-model="currentStation" class="common-search"  @on-search="iconChange"/>
-                </div>
-                <div class="station-tree-center">
-                  <div class="station-tree-left common-scroll" v-show="showTree">
-                    <tree-list :defaultData="stationData" :currentStaData="currentStaData" :clickAllNode="false" v-if="stationData && stationData.length>0" @treeChange="treeChange" ref="tree"></tree-list>
-                  </div>
-                  <div class="station-tree-left-notree" v-show="!showTree">
-                    关键字输入错误!
-                  </div>
-                </div>
+                <tree-filter :defaultData="stationData" :clickAllNode="false" v-if="stationData && stationData.length>0" @treeChange="treeChange" ref="tree"></tree-filter>
               </div>
             </div>
           </i-col>
@@ -39,9 +29,6 @@ export default {
   },
   data() {
     return {
-      currentStation: '',
-      currentStaData: [], // 当前搜索框搜索的站台数组对象,传给子组件,用来判断单选站台名当前选中状态
-      showTree: true,// 是否显示树形组件
 		  stationData: [],
       levelNum: 0,
       currentMenuId: '',
@@ -80,7 +67,6 @@ export default {
           this.levelNum = v.level
           v.selected = true
           v.disabled = true
-          this.currentStation = v.title
           this.currentMenuId = v.nodeId
           this.$refs.treeManage.getMenuData(v.nodeId)
         }
@@ -88,47 +74,23 @@ export default {
         return v;
       });
     },
-    iconChange: _.throttle(function() {
-      this.currentStaData = []
-      this.treeName = []
-      if(this.currentStation != ''){
-        this.showTree = false
-        document.querySelector(".common-scroll").scrollTo(0, 0); // 滚动条回到顶部
-      } else {
-        document.querySelector(".common-scroll").scrollTo(0, 0); // 滚动条回到顶部
-        this.showTree = true
-        this.stationData = this.getTree(this.stationData)
-        return 
-      }
-      if (this.currentStation == this.stationData[0].title) {
-        this.showTree = true
-        return
-      }
-      let currentNodeId = this.filterNodeId(this.stationData,this.currentStation)
-      if (currentNodeId) {
-        console.log(currentNodeId)
-        this.stationData = this.getParentIdList(this.stationData,currentNodeId)
-        console.log(this.stationData)
-      }
-		}, 500),
     // 根据搜索框的值查到当前nodeId
-    filterNodeId(list,val){
-      let _this=this
-      for (let i = 0; i < list.length; i++) {
-        let a=list[i]
-        if(a.title=== val){
-          return a.nodeId
-        }else{
-          if(a.children && a.children.length>0){
-            let res=_this.filterNodeId(a.children,val)
-            if(res){
-              return res
-            }
-          }
-        }
-      }
-    },
-    // 递归循环 根据当前id找到它的所有父节点
+    // filterNodeId(list,val){
+    //   let _this=this
+    //   for (let i = 0; i < list.length; i++) {
+    //     let a=list[i]
+    //     if(a.title=== val){
+    //       return a.nodeId
+    //     }else{
+    //       if(a.children && a.children.length>0){
+    //         let res=_this.filterNodeId(a.children,val)
+    //         if(res){
+    //           return res
+    //         }
+    //       }
+    //     }
+    //   }
+    // },
     getParentIdList(list, id,editText) {
         if (!list || !id) {
             return ''
@@ -144,19 +106,19 @@ export default {
                 }
                 if (node.nodeId === currentdId) {
                     node.expand = true
-                    if (node.title == this.currentStation) {
+                    if (node.nodeId == id) {     
                       node.expand = true
-                      this.currentMenuId = node.nodeId
+                      this.currentOrgId = node.nodeId
                       node.selected = true
                       node.disabled = true
                       this.showTree = true
                       this.$refs.treeManage.getMenuData(node.nodeId,editText)
-                       if(node.children) {
-                        findParent(node.children, currentdId, node.nodeId); 
-                      }
+                      if(node.children) {
+                        findParent(node.children, currentdId, node.nodeId);
+                      }       
                     }
                     if (!node.nodeId) {
-                        break
+                      break
                     }
                     findParent(list, nodeId);
                     // break
@@ -171,13 +133,16 @@ export default {
         }
         return findParent(list, id);
     },
-    treeChange(val,arr,level,currentNodeId) {
+    treeChange(arr,level,currentNodeId) {
       this.levelNum = level
-      this.currentStation = val
       this.$refs.treeManage.getMenuData(currentNodeId)
 		},
-    changeTree (currentMenuId,editText) {
-      this.getMetroLevel('update',currentMenuId,editText)
+    // inputChange (nodeId) {
+    //  this.getMetroLevel('init')
+    //  this.$refs.treeManage.getOrgData(nodeId)
+    // },
+    changeTree (currentOrgId,editText) {
+      this.getMetroLevel('update',currentOrgId,editText)
     }
   }
 };

+ 4 - 5
src/views/homecomponents/SystemSettings/ResourceManagementIndex.vue

@@ -55,7 +55,6 @@
           <Input placeholder="输入资源地址" v-model="currentMenuList.linkUrl" />
           <i class='iconfont icon-baocun2' @click="editIconUrl('save')"></i>
         </div>
-        <!-- <span class="form-item-bot-left" @click="pageJump(currentMenuList)">{{currentMenuList.linkUrl}}</span> -->
       </FormItem>
       <FormItem label="更新时间" prop="equipmentStatus" style="width:48%">
         <span class="form-item-bot-right">{{currentMenuList.updateTime}}</span>
@@ -133,11 +132,11 @@
           <Input v-model.trim="formOption.menuName" maxlength="20" show-word-limit />
         </FormItem>
         <FormItem label="资源类型:" prop="resourceType">
-         <Select v-model="formOption.resourceType" placeholder="资源类型">
+          <Select v-model="formOption.resourceType" placeholder="资源类型">
               <Option v-for="item in resourceTypeList" :value="item.value" :key="item.value">{{ item.label }}</Option>
-          </Select>
+           </Select>
         </FormItem>
-         <FormItem label="图标:" prop="imageUrl">   
+         <FormItem label="图标:" prop="imageUrl">
           <Input v-model="formOption.imageUrl" maxlength="25" show-word-limit placeholder="请输入图标class名称"/>
           <div class="common-form-item-text">新增系统中不存在的资源,图标默认名称为icon-caidan</div> 
         </FormItem>
@@ -371,7 +370,7 @@ export default {
     levelNum: {
      handler(newValue) {
         this.disabledLevel = newValue
-        if (this.disabledLevel>=4) {
+        if (this.disabledLevel >=4 ) {
         this.childDisabled = true
         } else {
           this.childDisabled = false

+ 0 - 3
src/views/homecomponents/SystemSettings/RolePermissions.vue

@@ -34,9 +34,6 @@
                 <template slot="loading">
                     <Loading-animation></Loading-animation>
                 </template>
-                <template slot-scope="{ row }" slot="colorValue">
-                  <i class="iconfont icon-gaojing1" style="vertical-align: middle" :style="'color:' + row.colorValue"></i>
-                </template>
                 <template slot-scope="{ row }" slot="action">
                   <Tooltip content="配置权限" placement="top">
                       <i class="iconfont icon-quanxian" style="cursor:pointer;color:#fb9c2c;fontSize:18px;marginRight:6px" @click="permissionConfig(row)"></i>

+ 8 - 81
src/views/homecomponents/SystemSettings/UserManagement.vue

@@ -6,17 +6,7 @@
           <i-col span="4" style="height:100%">
             <div class="station-tree">
               <div class="station-tree-body">
-                <div class="station-tree-top">
-                  <Input suffix="ios-search" placeholder="输入关键字查询" clearable search v-model="currentStation" class="common-search"  @on-search="iconChange" @on-clear="clearChange"/>
-                </div>
-                <div class="station-tree-center">
-                  <div class="station-tree-left common-scroll" v-show="showTree">
-                    <tree-list :defaultData="stationData" :currentStaData="currentStaData" :clickAllNode="true" v-if="stationData && stationData.length>0" @treeChange="treeChange" ref="treeManage"></tree-list>
-                  </div>
-                  <div class="station-tree-left-notree" v-show="!showTree">
-                    站点输入错误!
-                  </div>
-                </div>
+                 <tree-filter :defaultData="stationData" v-if="stationData && stationData.length>0" @treeChange="treeChange" ref="treeManage"></tree-filter>
               </div>
             </div>
           </i-col>
@@ -39,9 +29,6 @@ export default {
   },
   data() {
     return {
-      currentStation: '',
-      currentStaData: [], // 当前搜索框搜索的站台数组对象,传给子组件,用来判断单选站台名当前选中状态
-      showTree: true,// 是否显示树形组件
 		  stationData: [],
       userStationData: [],
       currentOrgId: '',
@@ -60,7 +47,7 @@ export default {
           this.userStationData = this.getModalTree(this.userStationData) //新增和编辑组织结构数据disabled应始终为false,不能变化
           if (this.$route.params.orgId) {
             let pageJumpOrgId = this.$route.params.orgId
-            this.stationData = this.getJumpTree(this.stationData,pageJumpOrgId) //从组织机构跳转过来携带参数orgId
+            this.stationData = this.getParentIdList(this.stationData,pageJumpOrgId) //从组织机构跳转过来携带参数orgId
           } else {
             this.stationData = this.getTree(this.stationData) //直接到当前页面无参数默认选中树形根节点
           }
@@ -77,23 +64,6 @@ export default {
         return v;
       });
     },
-    getJumpTree (arr,pageJumpOrgId) {
-     return arr.map((v,index) => {
-        v.expand = false
-        v.selected = false
-        if (index==0) {
-          v.expand = true
-        }
-        if (v.id == pageJumpOrgId) {
-          v.selected = true
-          this.currentStation = v.title
-          this.currentOrgId = v.nodeId
-          this.$refs.user.getTableData('',v.nodeId)
-        } 
-        if (v.children) v.children = this.getJumpTree(v.children,pageJumpOrgId);
-        return v;
-      });
-    },
     getTree(arr,textState) {
       return arr.map((v,index) => {
         v.disabled = false
@@ -104,35 +74,13 @@ export default {
         }
         if(v.level== 1 && textState != 'del'){
           v.selected = true
-          this.currentStation = v.title
           this.currentOrgId = v.nodeId
-          this.$refs.user.getTableData('',v.nodeId)
+          this.$refs.user.getTableData(v.nodeId)
         }
         if (v.children) v.children = this.getTree(v.children,textState);
         return v;
       });
     },
-    iconChange: _.throttle(function() {
-      this.currentStaData = []
-      this.treeName = []
-      if(this.currentStation != ''){
-        this.showTree = false
-        document.querySelector(".common-scroll").scrollTo(0, 0); // 滚动条回到顶部
-      } else {
-        document.querySelector(".common-scroll").scrollTo(0, 0); // 滚动条回到顶部
-        this.showTree = true
-        this.stationData = this.getTree(this.stationData)
-        return 
-      }
-      let currentNodeId = this.filterNodeId(this.stationData,this.currentStation)
-      if (currentNodeId) {
-        this.stationData = this.getParentIdList(this.stationData,currentNodeId)
-      }
-		}, 500),
-    clearChange () {
-      this.getTree(this.stationData,'del')
-      this.$refs.user.getTableData('',0)
-    },
     // 根据搜索框的值查到当前nodeId
     filterNodeId(list,val){
       let _this=this
@@ -162,18 +110,14 @@ export default {
                 node.expand = false
                 node.selected = false
                 node.disabled = false
-                if (node.level== 1) {
-                  node.disabled = true
-                }
                 if (node.nodeId === currentdId) {
                     node.expand = true
-                    if (node.title == this.currentStation) {
+                    if (node.nodeId == id) {
                       node.expand = true   
                       this.currentOrgId = node.nodeId
                       node.selected = true
                       node.disabled = true
-                      this.showTree = true
-                      this.$refs.user.getTableData('',node.id)        
+                      this.$refs.user.getTableData(node.nodeId)        
                     }
                     if (!node.nodeId) {
                         break
@@ -191,10 +135,9 @@ export default {
         }
         return findParent(list, id);
     },
-    treeChange(val,arr,level,currentNodeId) {
-      this.currentStation = val
-      this.currentOrgId = currentNodeId
-      this.$refs.user.getTableData('',currentNodeId) 
+    treeChange(arr,level,currentNodeId) {
+      this.currentOrgId = currentNodeId ? currentNodeId : 0
+      this.$refs.user.getTableData(this.currentOrgId) 
 		},
   }
 };
@@ -238,22 +181,6 @@ export default {
   height: 100%;
   padding: 10px;
 }
-.station-tree-center {
-  height: calc(100% - 32px);
-  padding-top: 10px;
-}
-.station-tree-left {
-  height: 100%;
-  overflow: auto;
-}
-.station-tree-left-notree {
-  height: 100%;
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  color: #fff;
-  fon-size: 14px;
-}
 .right-main {
   height: 100%;
   padding: 10px 0;

+ 1 - 3
src/views/homecomponents/SystemSettings/UserManagementIndex.vue

@@ -424,18 +424,16 @@ export default {
       })
     },
     // 获取表格数据
-    getTableData (keywords,orgId) {
+    getTableData (orgId) {
       if (typeof(orgId) == 'number' && orgId>0) {
        this.tableParams.orgId = orgId
       } else {
-        // this.tableParams.orgId = ''
         if (orgId === 0) {
           this.tableParams.orgId = ''
         } else {
           this.tableParams.orgId = this.curOrgId
         }
       }
-      this.tableParams.keywords = keywords ? keywords : ''
       let params = JSON.parse(JSON.stringify(this.tableParams))
       params.roleId = params.roleId == '-1' ? '' : params.roleId
       params.isEnabled = params.isEnabled == '-1' ? '' : params.isEnabled