浏览代码

Merge branch 'dev' of http://10.87.10.227:4000/jzyd_yyds/soc_web into dev

luojun 2 年之前
父节点
当前提交
62d415f69c
共有 1 个文件被更改,包括 14 次插入6 次删除
  1. 14 6
      src/views/system/device/index.vue

+ 14 - 6
src/views/system/device/index.vue

@@ -1,7 +1,6 @@
 <template>
   <div class="app-container">
     <el-row :gutter="20">
-
       <!--部门数据-->
       <el-col :span="4" :xs="24">
         <div class="head-container">
@@ -17,7 +16,6 @@
             :default-checked-keys="defaultKeys" @node-click="handleNodeClick" />
         </div>
       </el-col>
-
       <el-col :span="20" :xs="24">
         <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
 
@@ -197,12 +195,14 @@
 </template>
 
 <script>
-
+import tableList from '@/mixins/tableList'
 import treeselect from '@riophae/vue-treeselect'
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import { deptTreeSelect } from "@/api/system/public";
 import { listDevice, getDevice, delDevice, addDevice, updateDevice, getHostByOrgId } from "@/api/system/device";
 export default {
+  /** 引入基础minxins*/
+  mixins: [tableList],
   dicts: ['sys_asset_type', 'sys_device_type'],
   name: "Device",
   components: { treeselect },
@@ -233,9 +233,9 @@ export default {
           { required: true, message: '请选择设备分类', trigger: 'blur' },
 
         ],
-     
-      
-      
+
+
+
       },
       // 遮罩层
       loading: true,
@@ -243,6 +243,8 @@ export default {
       ids: [],
       // 非单个禁用
       single: true,
+      //搜索tree
+      deptName: null,
       // 非多个禁用
       multiple: true,
       // 显示搜索条件
@@ -302,6 +304,12 @@ export default {
     changeCheckBox() {
       this.getList();
     },
+
+    // 筛选节点
+    filterNode(value, data) {
+      if (!value) return true;
+      return data.name.indexOf(value) !== -1;
+    },
     /** 查询机构树数据 */
     getDeptTree() {
       deptTreeSelect().then(response => {