yusheng hai 2 semanas
pai
achega
6c777b83f4

+ 7 - 1
src/config/setting.js

@@ -27,7 +27,13 @@ export const KEEP_ALIVE_INCLUDE = [
   'equipmentIndex',
   'boatIndex',
   'meterIndex',
-  'mouldIndex'
+  'mouldIndex',
+  'accountingLedgerIndex',
+  'turnoverCarIndex',
+  'turnoverDisksIndex',
+  'sparepartIndex',
+  'dryAreaIndex',
+  'accountingLedgerIndex'
 ];
 // 直接指定菜单数据
 export const USER_MENUS = undefined;

+ 10 - 1
src/views/ledgerAssets/accountingLedger/index.vue

@@ -21,6 +21,7 @@
             v-if="current"
             :category-id="current.id"
             :root-id="rootId"
+            ref="listRef"
           />
         </template>
       </ele-split-layout>
@@ -32,6 +33,7 @@
   import AssetTree from '@/components/AssetTree';
   import MaterialList from './components/list.vue';
   export default {
+    name:'accountingLedgerIndex',
     components: {
       AssetTree,
       MaterialList
@@ -49,7 +51,7 @@
     computed: {},
     methods: {
       handleNodeClick(info) {
-        console.log(info,'info')
+        console.log(info, 'info');
         this.current = info;
       },
       // 获取根节点id
@@ -57,6 +59,13 @@
         // alert(id)
         this.rootId = id;
       }
+    },
+    activated() {
+      this.$nextTick(() => {
+        if (this.current.id) {
+          this.$refs.listRef.sucesstion(true);
+        }
+      });
     }
   };
 </script>

+ 1 - 0
src/views/ledgerAssets/boat/index.vue

@@ -21,6 +21,7 @@
             v-if="current"
             :category-id="current.id"
             :root-id="rootId"
+            ref="listRef"
           />
         </template>
       </ele-split-layout>

+ 12 - 3
src/views/ledgerAssets/dryArea/components/dryArea-list.vue

@@ -4,7 +4,7 @@
     <!-- 数据表格 -->
     <ele-pro-table
       ref="table"
-:pageSizes="tablePageSizes"
+      :pageSizes="tablePageSizes"
       :columns="columns"
       :datasource="datasource"
       height="calc(100vh - 375px)"
@@ -39,7 +39,9 @@
         >
           编辑
         </el-link>
-        <el-link type="primary" @click="$refs.accountingLedgerListRef.open(row)">表计BOM</el-link>
+        <el-link type="primary" @click="$refs.accountingLedgerListRef.open(row)"
+          >表计BOM</el-link
+        >
         <el-popconfirm
           class="ele-action"
           title="确定要删除此干燥区吗?"
@@ -179,7 +181,14 @@
         this.$refs.userEdit.$refs.form &&
           this.$refs.userEdit.$refs.form.clearValidate();
       },
-
+      // 刷新回调
+      sucesstion(is) {
+        console.log(is);
+        if (is) {
+          this.reload();
+        }
+        this.checkRadioData = [];
+      },
       /* 删除 */
       remove(row) {
         const loading = this.$loading({ lock: true });

+ 64 - 44
src/views/ledgerAssets/dryArea/index.vue

@@ -1,17 +1,30 @@
 <template>
   <div class="ele-body">
     <el-card shadow="never" v-loading="loading">
-      <ele-split-layout width="266px" allow-collapse :right-style="{ overflow: 'hidden' }">
+      <ele-split-layout
+        width="266px"
+        allow-collapse
+        :right-style="{ overflow: 'hidden' }"
+      >
         <div>
           <div class="ele-border-lighter sys-organization-list">
-            <AssetTree @handleNodeClick="handleNodeClick" @setRootId="setRootId" :id="rootId" ref="treeList" />
+            <AssetTree
+              @handleNodeClick="handleNodeClick"
+              @setRootId="setRootId"
+              :id="rootId"
+              ref="treeList"
+            />
           </div>
         </div>
         <template v-slot:content v-if="current">
-          <dryArea-list :category-id="current.id" :root-id="rootId" />
+          <dryArea-list
+            :category-id="current.id"
+            :root-id="rootId"
+            ref="listRef"
+          />
         </template>
         <template v-slot:content v-else>
-          <el-empty :image-size="200" description='暂无数据'></el-empty>
+          <el-empty :image-size="200" description="暂无数据"></el-empty>
         </template>
       </ele-split-layout>
     </el-card>
@@ -19,54 +32,61 @@
 </template>
 
 <script>
-import AssetTree from '@/components/AssetTree';
-import dryAreaList from './components/dryArea-list.vue';
+  import AssetTree from '@/components/AssetTree';
+  import dryAreaList from './components/dryArea-list.vue';
 
-export default {
-  components: {
-    AssetTree,
-    dryAreaList
-  },
-  data() {
-    return {
-      // 加载状态
-      loading: false,
-      // 表格选中数据
-      selection: [],
-      current: null,
-      rootId: '11'
-    };
-  },
-  computed: {},
-  methods: {
-    handleNodeClick(info) {
-      this.current = info;
+  export default {
+    name: 'dryAreaIndex',
+    components: {
+      AssetTree,
+      dryAreaList
     },
-    // 获取根节点id
-    setRootId(id) {
-      if (id) {
-        this.rootId = id;
+    data() {
+      return {
+        // 加载状态
+        loading: false,
+        // 表格选中数据
+        selection: [],
+        current: null,
+        rootId: '11'
+      };
+    },
+    computed: {},
+    methods: {
+      handleNodeClick(info) {
+        this.current = info;
+      },
+      // 获取根节点id
+      setRootId(id) {
+        if (id) {
+          this.rootId = id;
+        }
+      },
+      activated() {
+        this.$nextTick(() => {
+          if (this.current.id) {
+            this.$refs.listRef.sucesstion(true);
+          }
+        });
       }
-
     }
-  }
-};
+  };
 </script>
 
 <style lang="scss" scoped>
-.sys-organization-list {
-  height: calc(100vh - 264px);
-  box-sizing: border-box;
-  border-width: 1px;
-  border-style: solid;
-  overflow: auto;
-}
+  .sys-organization-list {
+    height: calc(100vh - 264px);
+    box-sizing: border-box;
+    border-width: 1px;
+    border-style: solid;
+    overflow: auto;
+  }
 
-.sys-organization-list :deep(.el-tree-node__content) {
-  height: 40px;
+  .sys-organization-list :deep(.el-tree-node__content) {
+    height: 40px;
 
-  &>.el-tree-node__expand-icon {
-    margin-left: 10px;
+    & > .el-tree-node__expand-icon {
+      margin-left: 10px;
+    }
   }
-}
 </style>

+ 1 - 1
src/views/ledgerAssets/equipment/components/DialogMoveTo.vue

@@ -46,7 +46,7 @@
             <DeptSelect v-model="addForm.areaPersonInChargeGroupId" @input="getwhbm" />
           </el-form-item>
           <el-form-item v-if="componentsType == 'person'" label="片区负责人">
-            <el-select v-model="addForm.areaPersonInChargeUserId" placeholder="请选择">
+            <el-select v-model="addForm.areaPersonInChargeUserId" placeholder="请选择" filterable>
               <el-option
                 v-for="item in personList"
                 :key="item.id"

+ 10 - 3
src/views/ledgerAssets/equipment/components/equipment-list.vue

@@ -223,7 +223,7 @@
         networkStatus,
         assetLevel: [],
         isConsumer: false,
-
+        currentPage: 1,
         // 表格列配置
         columns: [
           {
@@ -543,12 +543,12 @@
       /* 表格数据源 */
       datasource({ page, limit, where, order }) {
         console.log('------reload-------');
-        // this.getNetWork(page, limit, where, order);
+        this.currentPage = page;
         return getAssetList({
-          ...where,
           ...order,
           pageNum: page,
           size: limit,
+          ...where,
           categoryLevelId: this.categoryId,
           rootCategoryLevelId: this.rootId
         });
@@ -569,6 +569,13 @@
       reload(where) {
         this.$refs.table.reload({ pageNum: 1, where: where });
       },
+      // /* 刷新表格 */
+      // reloadNew() {
+      //   this.$refs.table.reload({
+      //     ...this.$refs.search.where,
+      //     pageNum: this.currentPage
+      //   });
+      // },
       // 跳转到详情页
       details({ id, code, name }) {
         this.$router.push({

+ 1 - 0
src/views/ledgerAssets/mould/index.vue

@@ -21,6 +21,7 @@
             v-if="current"
             :category-id="current.id"
             :root-id="rootId"
+            ref="listRef"
           />
         </template>
       </ele-split-layout>

+ 13 - 3
src/views/ledgerAssets/sparepart/index.vue

@@ -21,6 +21,7 @@
             v-if="current"
             :category-id="current.id"
             :root-id="rootId"
+            ref="listRef"
           />
         </template>
       </ele-split-layout>
@@ -33,11 +34,13 @@
   import SparepartList from './components/sparepart-list.vue';
 
   export default {
+    name: 'sparepartIndex',
+
     components: {
       AssetTree,
       SparepartList
     },
-    data () {
+    data() {
       return {
         // 加载状态
         loading: false,
@@ -49,12 +52,19 @@
     },
     computed: {},
     methods: {
-      handleNodeClick (info) {
+      handleNodeClick(info) {
         this.current = info;
       },
       // 获取根节点id
-      setRootId (id) {
+      setRootId(id) {
         this.rootId = id;
+      },
+      activated() {
+        this.$nextTick(() => {
+          if (this.current.id) {
+            this.$refs.listRef.sucesstion(true);
+          }
+        });
       }
     }
   };

+ 12 - 3
src/views/ledgerAssets/turnoverCar/index.vue

@@ -21,6 +21,7 @@
             v-if="current"
             :category-id="current.id"
             :root-id="rootId"
+            ref="listRef"
           />
         </template>
       </ele-split-layout>
@@ -33,11 +34,12 @@
   import TurnovercarList from './components/turnovercar-list.vue';
 
   export default {
+    name: 'turnoverCarIndex',
     components: {
       AssetTree,
       TurnovercarList
     },
-    data () {
+    data() {
       return {
         // 加载状态
         loading: false,
@@ -49,12 +51,19 @@
     },
     computed: {},
     methods: {
-      handleNodeClick (info) {
+      handleNodeClick(info) {
         this.current = info;
       },
       // 获取根节点id
-      setRootId (id) {
+      setRootId(id) {
         this.rootId = id;
+      },
+      activated() {
+        this.$nextTick(() => {
+          if (this.current.id) {
+            this.$refs.listRef.sucesstion(true);
+          }
+        });
       }
     }
   };

+ 70 - 47
src/views/ledgerAssets/turnoverDisks/index.vue

@@ -1,18 +1,32 @@
 <template>
   <div class="ele-body">
     <el-card shadow="never" v-loading="loading">
-      <ele-split-layout width="266px" allow-collapse :right-style="{ overflow: 'hidden' }">
+      <ele-split-layout
+        width="266px"
+        allow-collapse
+        :right-style="{ overflow: 'hidden' }"
+      >
         <div>
           <div class="ele-border-lighter sys-organization-list">
-            <AssetTree @handleNodeClick="handleNodeClick" @setRootId="setRootId" id="26" :paramsType="'type'"
-              ref="treeList" />
+            <AssetTree
+              @handleNodeClick="handleNodeClick"
+              @setRootId="setRootId"
+              id="26"
+              :paramsType="'type'"
+              ref="treeList"
+            />
           </div>
         </div>
         <template v-slot:content v-if="current">
-          <equipment-list :category-id="current.id" :root-id="rootId" :current="current" ref="listRef" />
+          <equipment-list
+            :category-id="current.id"
+            :root-id="rootId"
+            :current="current"
+            ref="listRef"
+          />
         </template>
         <template v-slot:content v-else>
-          <el-empty :image-size="200" description='暂无数据'></el-empty>
+          <el-empty :image-size="200" description="暂无数据"></el-empty>
         </template>
       </ele-split-layout>
     </el-card>
@@ -20,54 +34,63 @@
 </template>
 
 <script>
-import AssetTree from '@/components/AssetTree';
-import EquipmentList from './components/equipment-list.vue';
-export default {
-  components: {
-    AssetTree,
-    EquipmentList
-  },
-  data() {
-    return {
-      // 加载状态
-      loading: false,
-      // 表格选中数据
-      selection: [],
-      current: null,
-      rootId: null
-    };
-  },
-  computed: {},
-  methods: {
-    handleNodeClick(info) {
-      console.log(info);
-      this.current = info;
-      this.$nextTick(() => {
-        this.$refs.listRef.sucesstion(false);
-      });
+  import AssetTree from '@/components/AssetTree';
+  import EquipmentList from './components/equipment-list.vue';
+  export default {
+    name: 'turnoverDisksIndex',
+
+    components: {
+      AssetTree,
+      EquipmentList
+    },
+    data() {
+      return {
+        // 加载状态
+        loading: false,
+        // 表格选中数据
+        selection: [],
+        current: null,
+        rootId: null
+      };
     },
-    // 获取根节点id
-    setRootId(id) {
-      this.rootId = id;
+    computed: {},
+    methods: {
+      handleNodeClick(info) {
+        console.log(info);
+        this.current = info;
+        this.$nextTick(() => {
+          this.$refs.listRef.sucesstion(false);
+        });
+      },
+      // 获取根节点id
+      setRootId(id) {
+        this.rootId = id;
+      },
+      activated() {
+        this.$nextTick(() => {
+          if (this.current.id) {
+            this.$refs.listRef.sucesstion(true);
+          }
+        });
+      }
     }
-  }
-};
+  };
 </script>
 
 <style lang="scss" scoped>
-.sys-organization-list {
-  height: calc(100vh - 264px);
-  box-sizing: border-box;
-  border-width: 1px;
-  border-style: solid;
-  overflow: auto;
-}
+  .sys-organization-list {
+    height: calc(100vh - 264px);
+    box-sizing: border-box;
+    border-width: 1px;
+    border-style: solid;
+    overflow: auto;
+  }
 
-.sys-organization-list :deep(.el-tree-node__content) {
-  height: 40px;
+  .sys-organization-list :deep(.el-tree-node__content) {
+    height: 40px;
 
-  &>.el-tree-node__expand-icon {
-    margin-left: 10px;
+    & > .el-tree-node__expand-icon {
+      margin-left: 10px;
+    }
   }
-}
 </style>