Просмотр исходного кода

Merge branch 'dev' of http://110.41.163.243:9980/kd-aiot/kd-aiot-frontend into dev

汪钰 3 лет назад
Родитель
Сommit
a1824ec6a2
27 измененных файлов с 1299 добавлено и 588 удалено
  1. 43 0
      src/api/ledgerAssets/turnovercar.js
  2. 1 1
      src/components/AssetTree/index.vue
  3. 1 0
      src/enum/dict.js
  4. 9 4
      src/views/classifyManage/itemInformation/add.vue
  5. 112 131
      src/views/classifyManage/itemInformation/components/AddDialog.vue
  6. 3 3
      src/views/classifyManage/itemInformation/components/RowDetail.vue
  7. 24 4
      src/views/classifyManage/itemInformation/components/item-list.vue
  8. 46 77
      src/views/classifyManage/itemInformation/components/item-match.vue
  9. 1 7
      src/views/classifyManage/itemInformation/components/match-mixins.js
  10. 252 280
      src/views/classifyManage/itemInformation/details.vue
  11. 2 1
      src/views/ledgerAssets/boat/components/baseInfo.vue
  12. 13 3
      src/views/ledgerAssets/boat/components/boat-list.vue
  13. 0 8
      src/views/ledgerAssets/boat/components/boat-search.vue
  14. 10 2
      src/views/ledgerAssets/boat/index.vue
  15. 243 0
      src/views/ledgerAssets/equipment/components/baseInfo.vue
  16. 157 0
      src/views/ledgerAssets/equipment/components/equipment-list.vue
  17. 113 0
      src/views/ledgerAssets/equipment/components/equipment-search.vue
  18. 66 0
      src/views/ledgerAssets/equipment/detail.vue
  19. 78 0
      src/views/ledgerAssets/equipment/index.vue
  20. 36 31
      src/views/ledgerAssets/material/components/baseInfo.vue
  21. 12 2
      src/views/ledgerAssets/material/components/material-list.vue
  22. 1 9
      src/views/ledgerAssets/material/components/material-search.vue
  23. 9 2
      src/views/ledgerAssets/material/index.vue
  24. 1 1
      src/views/ledgerAssets/turnoverCar/components/baseInfo.vue
  25. 56 16
      src/views/ledgerAssets/turnoverCar/components/turnovercar-list.vue
  26. 1 1
      src/views/ledgerAssets/turnoverCar/edit.vue
  27. 9 5
      src/views/ledgerAssets/turnoverCar/index.vue

+ 43 - 0
src/api/ledgerAssets/turnovercar.js

@@ -0,0 +1,43 @@
+import request from '@/utils/request';
+
+
+// 获取实体列表分页
+export async function getAssetList (data) {
+  let par = new URLSearchParams(data);
+  const res = await request.get(`/main/asset/page?` + par, {});
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 查询实例详情
+export async function getCategoryInfo (id) {
+  const res = await request.get(`/main/category/info/${id}`);
+  if (res.data.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+
+// 获取单个类别实体明细分页
+export async function getPageSingle (data) {
+  let par = new URLSearchParams(data);
+  const res = await request.get(`/main/asset/pageSingleSubstance?` + par, {});
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+
+
+
+
+
+
+
+
+
+

+ 1 - 1
src/components/AssetTree/index.vue

@@ -101,7 +101,7 @@
           this.treeLoading = false;
           if (res?.code === '0') {
             this.treeList = res.data;
-
+            this.$emit('setRootId', res.data[0].id);
             if (this.treeFormate) {
               this.treeList = this.treeFormate(this.treeList);
             }

+ 1 - 0
src/enum/dict.js

@@ -6,6 +6,7 @@ export default {
   流程分类: 'processCategory',
   角度: 'angle',
   生命周期: 'life_cycle',
+  网络状态: 'network_status',
   金额单位: 'money_unit',
   时间单位: 'time_unit'
 };

+ 9 - 4
src/views/classifyManage/itemInformation/add.vue

@@ -193,7 +193,7 @@
           this.$set(this.itemForm, 'itemCode', data.code.substring(3));
         } else {
           this.$set(this.itemForm, 'isCitation', false);
-          this.$set(this.itemForm, 'itemCode', this.newCode.substring(3));
+          this.$set(this.itemForm, 'itemCode', this.newCode);
         }
         this.$set(this.itemForm, 'unpack', data.unpack);
         // this.itemForm.isTransferAssets = data.isTransferAssets
@@ -253,14 +253,19 @@
           this.requestData.univalence = this.itemForm.univalence
             ? this.itemForm.univalence
             : null;
-          this.requestData.categoryVoRelation =
+          this.requestData.categoryRelationPoList = (
             (this.$refs.itemMatchRef && this.$refs.itemMatchRef.getMapList()) ||
-            [];
+            []
+          ).map((i) => ({
+            ...i,
+            categoryId: i.id,
+            mainCategoryId: this.$route.query.id || ''
+          }));
 
           //不传报错
           this.requestData.iotProductSchema = '{}';
           if (this.pageTitle == '编辑物品') {
-            this.requestData.mainInformationId = this.$route.query.id;
+            this.requestData.id = this.$route.query.id;
             delete this.requestData.categoryVoRelationMap;
             this.$confirm(
               '参数信息有变更,与当前已存在的台账信息参数不一致,确定后将同步已存在的台账信息参数 !',

+ 112 - 131
src/views/classifyManage/itemInformation/components/AddDialog.vue

@@ -10,33 +10,7 @@
   >
     <div>
       <el-row>
-        <el-col :span="24" class="topsearch">
-          <el-form>
-            <el-row>
-              <el-col :span="6">
-                <el-input
-                  v-model="searchForm.searchKey"
-                  placeholder="输入物品编码或名称"
-                  size="small"
-                ></el-input>
-              </el-col>
-              <el-col :span="6" style="margin-left: 10px">
-                <el-button type="primary" size="small" @click="searchByKeyWords"
-                  >搜索</el-button
-                >
-                <el-button size="small" @click="reset">重置</el-button>
-              </el-col>
-            </el-row>
-          </el-form>
-        </el-col>
         <el-col :span="6" class="tree_col">
-          <!-- <vTreeList
-            @handleNodeClick="handleNodeClick"
-            ref="commonTree"
-            :defaultExpandAll="false"
-            :defaultExpandedKeys="defaultExpandedKeys"
-            :type="typeValue"
-          /> -->
           <AssetTree
             :props="defaultProps"
             :default-expanded-keys="defaultExpandedKeys"
@@ -51,73 +25,40 @@
           />
         </el-col>
         <el-col :span="18" class="table_col">
-          <el-table
-            :data="tableData"
-            height="450"
-            highlight-current-row
-            @selection-change="handleSelectionChange"
-            :row-key="getRowKeys"
-            ref="tableRef"
+          <ele-pro-table
+            ref="table"
+            :initLoad="false"
+            :columns="columns"
+            row-key="id"
+            :datasource="datasource"
+            :selection.sync="tableSelectionList"
+            height="calc(100vh - 265px)"
+            full-height="calc(100vh - 116px)"
+            tool-class="ele-toolbar-form"
+            cache-key="systemOrgUserTable"
           >
-            <el-table-column
-              type="selection"
-              width="60"
-              align="center"
-              :reserve-selection="true"
-            ></el-table-column>
-            <el-table-column
-              label="物品编码"
-              prop="code"
-              width="130"
-            ></el-table-column>
-            <el-table-column label="物品名称" prop="name"></el-table-column>
-            <el-table-column
-              label="牌号"
-              prop="brandNum"
-              v-if="dialogTitle != '选择设备' && dialogTitle != '选择备品备件'"
-            ></el-table-column>
-            <el-table-column
-              label="型号"
-              prop="modelType"
-              v-if="dialogTitle != '选择物料'"
-            ></el-table-column>
-            <el-table-column
-              label="收缩系数"
-              prop="shrinkageCoefficient"
-              v-if="dialogTitle == '选择模具'"
-            >
-              <template slot-scope="scope">
-                <span>
-                  {{ JSON.parse(scope.row.extendField).shrinkageCoefficient }}
-                </span>
-              </template>
-            </el-table-column>
-            <el-table-column
-              label="大模体型号"
-              prop="dieBodyModel"
-              v-if="dialogTitle == '选择模具'"
-              width="120"
-            >
-              <template slot-scope="scope">
-                <span>
-                  {{ JSON.parse(scope.row.extendField).dieBodyModel }}
-                </span>
-              </template>
-            </el-table-column>
-          </el-table>
-          <div class="pagination">
-            <el-pagination
-              background
-              layout="total, sizes, prev, pager, next, jumper"
-              :total="pagination.total"
-              :page-sizes="[15, 30, 50, 100, 500]"
-              :page-size="pagination.size"
-              :current-page.sync="pagination.page"
-              @current-change="handleCurrent"
-              @size-change="handleSize"
-            >
-            </el-pagination>
-          </div>
+            <!-- 表头工具栏 -->
+            <template v-slot:toolbar>
+              <el-row>
+                <el-col :span="6">
+                  <el-input
+                    v-model="searchForm.searchKey"
+                    placeholder="输入物品编码或名称"
+                    size="small"
+                  ></el-input>
+                </el-col>
+                <el-col :span="6" style="margin-left: 10px">
+                  <el-button
+                    type="primary"
+                    size="small"
+                    @click="searchByKeyWords"
+                    >搜索</el-button
+                  >
+                  <el-button size="small" @click="reset">重置</el-button>
+                </el-col>
+              </el-row>
+            </template>
+          </ele-pro-table>
         </el-col>
       </el-row>
     </div>
@@ -169,21 +110,65 @@
         tableSelectionList: []
       };
     },
+    computed: {
+      columns () {
+        const privateList = [];
+        if (
+          this.dialogTitle != '选择设备' &&
+          this.dialogTitle != '选择备品备件'
+        ) {
+          privateList.push({
+            prop: 'brandNum',
+            label: '牌号'
+          });
+        }
+        if (this.dialogTitle != '选择物料') {
+          privateList.push({
+            prop: 'modelType',
+            label: '型号'
+          });
+        }
+        if (this.dialogTitle == '选择模具') {
+          privateList.push({
+            prop: 'shrinkageCoefficient',
+            label: '收缩系数',
+            formatter (_row, _column, cellValue) {
+              return JSON.parse(_row.extendField).shrinkageCoefficient;
+            }
+          });
+          privateList.push({
+            prop: 'dieBodyModel',
+            label: '大模体型号',
+            formatter (_row, _column, cellValue) {
+              return JSON.parse(_row.extendField).dieBodyModel;
+            }
+          });
+        }
+
+        return [
+          {
+            columnKey: 'selection',
+            align: 'center',
+            type: 'selection'
+          },
+          {
+            prop: 'code',
+            showOverflowTooltip: true,
+            label: '物品编码'
+          },
+          {
+            prop: 'name',
+            label: '物品名称'
+          },
+          ...privateList
+        ];
+      }
+    },
     watch: {
       equipmentdialog (val) {
         if (val) {
           this.$nextTick(() => {
-            this.$refs.tree.getTreeData().then(() => {
-              if (this.tableData.length) this.$refs.tableRef.clearSelection();
-              this.$nextTick(() => {
-                this.mapList.forEach((item) => {
-                  const row = this.tableData.find((i) => i.id === item.id);
-                  if (row) {
-                    this.$refs.tableRef.toggleRowSelection(row, true);
-                  }
-                });
-              });
-            });
+            this.$refs.tree.getTreeData();
           });
           // if(this.tableData.length)  this.$refs.tableRef.clearSelection()
         }
@@ -195,6 +180,26 @@
       }
     },
     methods: {
+      datasource ({ page, where, limit }) {
+        return getList({
+          ...this.searchForm,
+          pageNum: page,
+          size: limit
+        }).then((res) => {
+          setTimeout(() => {
+            const keys = [];
+            this.mapList.forEach((item) => {
+              const row = res.list.find((i) => i.id === item.id);
+              if (row) {
+                keys.push(row.id);
+              }
+            });
+            this.$refs.table.setSelectedRowKeys(keys);
+          }, 100);
+
+          return res;
+        });
+      },
       handleClose () {
         this.equipmentdialog = false;
         this.tableSelectionList = [];
@@ -213,9 +218,6 @@
       handleSelectionChange (val) {
         this.tableSelectionList = val;
       },
-      // handleCurSelectionChange (selection, row) {
-
-      // },
 
       toDelete (val) {
         console.log('触发删除', val);
@@ -235,29 +237,8 @@
       handleNodeClick (data, node) {
         if (data.id === this.currentTreeData.id) return;
         this.currentTreeData = data;
-        this.searchForm.categoryLevelPathId = data.id;
-        this.handleList();
-      },
-
-      async handleList () {
-        const params = {
-          ...this.searchForm,
-          ...this.pagination
-        };
-        const res = await getList(params);
-        if (res?.success) {
-          this.tableData = res.data.records;
-          this.pagination.total = res.data.total;
-          if (this.tableData.length) this.$refs.tableRef.clearSelection();
-          this.$nextTick(() => {
-            this.mapList.forEach((item) => {
-              const row = this.tableData.find((i) => i.id === item.id);
-              if (row) {
-                this.$refs.tableRef.toggleRowSelection(row, true);
-              }
-            });
-          });
-        }
+        this.searchForm.categoryLevelId = data.id;
+        this.$refs.table.reload();
       },
 
       // 弹窗 - 按关键字搜索
@@ -267,13 +248,13 @@
           return;
         }
         this.pagination.page = 1;
-        this.handleList();
+        this.$refs.table.reload();
       },
       // 重置
       reset () {
         this.pagination.page = 1;
         this.searchForm.searchKey = '';
-        this.handleList();
+        this.$refs.table.reload();
       },
 
       // 设置默认高亮行

+ 3 - 3
src/views/classifyManage/itemInformation/components/RowDetail.vue

@@ -168,7 +168,7 @@
 </script>
 
 <style lang="scss" scoped>
-  :deep(.row-form) {
+  .row-form {
     width: 100%;
     display: flex;
     align-items: center;
@@ -178,10 +178,10 @@
     .el-row {
       width: 100%;
     }
-    .el-form-item {
+    :deep(.el-form-item) {
       margin-bottom: 15px;
     }
-    .row-col {
+    :deep(.row-col) {
       display: flex;
       align-items: center;
       justify-content: flex-start;

+ 24 - 4
src/views/classifyManage/itemInformation/components/item-list.vue

@@ -3,6 +3,7 @@
     <!-- 数据表格 -->
     <ele-pro-table
       ref="table"
+      :initLoad="false"
       :columns="columns"
       :datasource="datasource"
       height="calc(100vh - 265px)"
@@ -16,6 +17,14 @@
       </template>
       <!-- 操作列 -->
       <template v-slot:action="{ row }">
+        <el-link
+          type="primary"
+          :underline="false"
+          icon="el-icon-edit"
+          @click="viewEdit(row)"
+        >
+          详情
+        </el-link>
         <el-link
           type="primary"
           :underline="false"
@@ -25,7 +34,6 @@
           编辑
         </el-link>
         <el-link
-          v-if="row.loginName"
           type="primary"
           :underline="false"
           icon="el-icon-unlock"
@@ -144,7 +152,7 @@
           {
             columnKey: 'action',
             label: '操作',
-            width: 200,
+            width: 250,
             align: 'left',
             resizable: false,
             slot: 'action'
@@ -167,10 +175,22 @@
         this.$nextTick(() => {
           this.$refs.table.reload({
             pageNum: 1,
-            where: { ...where, categoryLevelId: this.current?.data?.id }
+            where: {
+              ...where,
+              categoryLevelId: this.current?.data?.id || this.current?.id
+            }
           });
         });
       },
+      /* 显示详情 */
+      viewEdit (row) {
+        this.$router.push({
+          path: '/classifyManage/itemInformation/details',
+          query: {
+            id: row.id
+          }
+        });
+      },
       /* 显示编辑 */
       openEdit (row) {
         this.$router.push({
@@ -218,8 +238,8 @@
     watch: {
       // 监听机构id变化
       current: {
-        immediate: true,
         handler () {
+          console.log(this.current, 'current');
           this.reload();
         }
       }

+ 46 - 77
src/views/classifyManage/itemInformation/components/item-match.vue

@@ -28,16 +28,11 @@
           <template v-slot:action="{ row, $index }">
             <el-popconfirm
               class="ele-action"
-              title="确定要删除此物品?"
-              @confirm="remove(row)"
+              :title="`确认删除[${row.name}]吗?`"
+              @confirm="handleDelete($index, row)"
             >
               <template v-slot:reference>
-                <el-link
-                  @click="handleDelete($index, row)"
-                  type="danger"
-                  :underline="false"
-                  icon="el-icon-delete"
-                >
+                <el-link type="danger" :underline="false" icon="el-icon-delete">
                   删除
                 </el-link>
               </template>
@@ -72,16 +67,11 @@
           <template v-slot:action="{ row, $index }">
             <el-popconfirm
               class="ele-action"
-              title="确定要删除此物品?"
-              @confirm="remove(row)"
+              :title="`确认删除[${row.name}]吗?`"
+              @confirm="handleDelete($index, row)"
             >
               <template v-slot:reference>
-                <el-link
-                  @click="handleDelete($index, row)"
-                  type="danger"
-                  :underline="false"
-                  icon="el-icon-delete"
-                >
+                <el-link type="danger" :underline="false" icon="el-icon-delete">
                   删除
                 </el-link>
               </template>
@@ -112,16 +102,11 @@
           <template v-slot:action="{ row, $index }">
             <el-popconfirm
               class="ele-action"
-              title="确定要删除此物品?"
-              @confirm="remove(row)"
+              :title="`确认删除[${row.name}]吗?`"
+              @confirm="handleDelete($index, row)"
             >
               <template v-slot:reference>
-                <el-link
-                  @click="handleDelete($index, row)"
-                  type="danger"
-                  :underline="false"
-                  icon="el-icon-delete"
-                >
+                <el-link type="danger" :underline="false" icon="el-icon-delete">
                   删除
                 </el-link>
               </template>
@@ -164,16 +149,11 @@
           <template v-slot:action="{ row, $index }">
             <el-popconfirm
               class="ele-action"
-              title="确定要删除此物品?"
-              @confirm="remove(row)"
+              :title="`确认删除[${row.name}]吗?`"
+              @confirm="handleDelete($index, row)"
             >
               <template v-slot:reference>
-                <el-link
-                  @click="handleDelete($index, row)"
-                  type="danger"
-                  :underline="false"
-                  icon="el-icon-delete"
-                >
+                <el-link type="danger" :underline="false" icon="el-icon-delete">
                   删除
                 </el-link>
               </template>
@@ -217,16 +197,11 @@
           <template v-slot:action="{ row, $index }">
             <el-popconfirm
               class="ele-action"
-              title="确定要删除此物品?"
-              @confirm="remove(row)"
+              :title="`确认删除[${row.name}]吗?`"
+              @confirm="handleDelete($index, row)"
             >
               <template v-slot:reference>
-                <el-link
-                  @click="handleDelete($index, row)"
-                  type="danger"
-                  :underline="false"
-                  icon="el-icon-delete"
-                >
+                <el-link type="danger" :underline="false" icon="el-icon-delete">
                   删除
                 </el-link>
               </template>
@@ -253,7 +228,11 @@
   export default {
     components: { AddDialog },
     props: {
-      defaultNum: String
+      defaultNum: String,
+      typeList: {
+        type: Array,
+        default: () => []
+      }
     },
     mixins: [matchMixins],
     data () {
@@ -271,13 +250,7 @@
     },
     methods: {
       getMapList () {
-        return this.mapList.map((item) => {
-          const obj = item;
-
-          obj.informationId = obj.id;
-          delete obj.id;
-          return obj;
-        });
+        return this.mapList;
       },
       setDefault (val) {
         switch (val) {
@@ -355,35 +328,31 @@
         }
       },
       handleDelete (index, row) {
-        this.$confirm(`确认删除[${row.name}]吗?`)
-          .then(async () => {
-            switch (this.activeName) {
-              case 'product': {
-                this.productData.splice(index, 1);
-                break;
-              }
-              case 'mould': {
-                this.mouldData.splice(index, 1);
-                break;
-              }
-              case 'part': {
-                this.partData.splice(index, 1);
-                break;
-              }
-              case 'bom': {
-                this.bomData.splice(index, 1);
-                break;
-              }
-              case 'facility': {
-                this.facilityData.splice(index, 1);
-                break;
-              }
-              default:
-                break;
-            }
-            this.mapAddList();
-          })
-          .catch(() => {});
+        switch (this.activeName) {
+          case 'product': {
+            this.productData.splice(index, 1);
+            break;
+          }
+          case 'mould': {
+            this.mouldData.splice(index, 1);
+            break;
+          }
+          case 'part': {
+            this.partData.splice(index, 1);
+            break;
+          }
+          case 'bom': {
+            this.bomData.splice(index, 1);
+            break;
+          }
+          case 'facility': {
+            this.facilityData.splice(index, 1);
+            break;
+          }
+          default:
+            break;
+        }
+        this.mapAddList();
       },
       // 选择的设备
       selectedEquipment (val) {

+ 1 - 7
src/views/classifyManage/itemInformation/components/match-mixins.js

@@ -1,10 +1,4 @@
 export default {
-  props: {
-    typeList: {
-      type: Array,
-      default: () => []
-    }
-  },
   data () {
     return {
       columns_product: [
@@ -214,7 +208,7 @@ export default {
     classificationCodeFormatter (row) {
       let itemName = '';
       this.typeList.map((item) => {
-        if (item.prefix == row.classificationCode) {
+        if (item.code == row.type) {
           itemName = item.name;
         }
       });

+ 252 - 280
src/views/classifyManage/itemInformation/details.vue

@@ -1,221 +1,162 @@
 <template>
-  <div class="content-height p20">
-    <div class="page-title">
-      <el-page-header @back="goBack">
-        <div slot="content" class="pageContent">
-          <div>物品详情 </div>
-          <el-form class="topform">
-            <el-form-item label="物品类型" label-width="70px">
-              <span>{{ itemValue }}</span>
-            </el-form-item>
-          </el-form>
-        </div>
-      </el-page-header>
-    </div>
-    <div class="table-container">
-      <div class="tree-col">
-        <ItemDetail ref="itemDetailRef" :customForm="customForm" />
+  <div class="ele-body">
+    <el-card shadow="never">
+      <div class="page-title">
+        <el-page-header @back="goBack">
+          <div slot="content" class="pageContent">
+            <div>物品详情</div>
+            <el-form class="topform">
+              <el-form-item label="物品类型" label-width="70px">
+                <span>{{ itemValue }}</span>
+              </el-form-item>
+            </el-form>
+          </div>
+        </el-page-header>
       </div>
-      <div class="attribute-row">
-        <RowDetail
-          ref="rowDetailRef"
-          :customForm="customForm"
-          :defaultNum="defaultNum"
-        />
-        <div
-          class="row-table"
-          v-if="defaultNum != '8' && defaultNum != '2' && defaultNum != '5'"
-        >
-          <el-tabs v-model="activeName" type="card">
-            <el-tab-pane
-              label="匹配产品"
-              name="product"
-              v-if="defaultNum == '3' || defaultNum == '6'"
-            >
-              <el-table
-                :data="productData"
-                class="table-box"
-                :header-cell-style="{ background: '#F0F3F3', border: 'none' }"
+      <div class="table-container">
+        <div class="tree-col">
+          <ItemDetail ref="itemDetailRef" :customForm="customForm" />
+        </div>
+        <div class="attribute-row">
+          <RowDetail
+            ref="rowDetailRef"
+            :customForm="customForm"
+            :defaultNum="defaultNum"
+          />
+          <div
+            class="row-table"
+            v-if="defaultNum != '8' && defaultNum != '2' && defaultNum != '5'"
+          >
+            <el-tabs v-model="activeName" type="card">
+              <el-tab-pane
+                label="匹配产品"
+                name="product"
+                v-if="defaultNum == '3' || defaultNum == '6'"
               >
-                <el-table-column type="index" label="序号" width="50">
-                </el-table-column>
-                <el-table-column prop="code" label="物品编码">
-                </el-table-column>
-                <el-table-column prop="name" label="物品名称">
-                </el-table-column>
-                <el-table-column prop="brandNum" label="牌号">
-                </el-table-column>
-                <el-table-column prop="modelType" label="型号">
-                </el-table-column>
-                <el-table-column
-                  label="物品类型"
-                  prop="classificationCode"
-                  :formatter="classificationCodeFormatter"
+                <!-- 数据表格 -->
+                <ele-pro-table
+                  ref="table"
+                  :columns="columns_product"
+                  :datasource="productData"
+                  :needPage="false"
+                  height="calc(100vh - 265px)"
+                  full-height="calc(100vh - 116px)"
+                  tool-class="ele-toolbar-form"
+                  cache-key="systemOrgUserTable"
                 >
-                </el-table-column>
-                <el-table-column prop="categoryLevelPath" label="分类">
-                </el-table-column>
-              </el-table>
-            </el-tab-pane>
-            <el-tab-pane
-              label="匹配模具"
-              name="mould"
-              v-if="defaultNum == '1' || defaultNum == '4'"
-            >
-              <el-table
-                :data="mouldData"
-                class="table-box"
-                :header-cell-style="{ background: '#F0F3F3', border: 'none' }"
+                </ele-pro-table>
+              </el-tab-pane>
+              <el-tab-pane
+                label="匹配模具"
+                name="mould"
+                v-if="defaultNum == '1' || defaultNum == '4'"
               >
-                <el-table-column type="index" label="序号" width="50">
-                </el-table-column>
-                <el-table-column prop="code" label="物品编码">
-                </el-table-column>
-                <el-table-column prop="name" label="物品名称">
-                </el-table-column>
-                <el-table-column prop="brandNum" label="牌号">
-                </el-table-column>
-                <el-table-column prop="modelType" label="型号">
-                </el-table-column>
-                <el-table-column
-                  label="物品类型"
-                  prop="classificationCode"
-                  :formatter="classificationCodeFormatter"
+                <!-- 数据表格 -->
+                <ele-pro-table
+                  ref="table"
+                  :columns="columns_mould"
+                  :datasource="mouldData"
+                  :needPage="false"
+                  height="calc(100vh - 265px)"
+                  full-height="calc(100vh - 116px)"
+                  tool-class="ele-toolbar-form"
+                  cache-key="systemOrgUserTable"
                 >
-                </el-table-column>
-                <el-table-column prop="categoryLevelPath" label="分类">
-                </el-table-column>
-              </el-table>
-            </el-tab-pane>
-            <el-tab-pane
-              label="匹配备品备件"
-              name="part"
-              v-if="defaultNum == '1'"
-            >
-              <el-table
-                :data="partData"
-                class="table-box"
-                :header-cell-style="{ background: '#F0F3F3', border: 'none' }"
+                </ele-pro-table>
+              </el-tab-pane>
+              <el-tab-pane
+                label="匹配备品备件"
+                name="part"
+                v-if="defaultNum == '1'"
               >
-                <el-table-column type="index" label="序号" width="50">
-                </el-table-column>
-                <el-table-column prop="code" label="物品编码">
-                </el-table-column>
-                <el-table-column prop="name" label="物品名称">
-                </el-table-column>
-                <el-table-column prop="modelType" label="型号">
-                </el-table-column>
-                <el-table-column
-                  label="物品类型"
-                  prop="classificationCode"
-                  :formatter="classificationCodeFormatter"
+                <!-- 数据表格 -->
+                <ele-pro-table
+                  ref="table"
+                  :columns="columns_part"
+                  :datasource="partData"
+                  :needPage="false"
+                  height="calc(100vh - 265px)"
+                  full-height="calc(100vh - 116px)"
+                  tool-class="ele-toolbar-form"
+                  cache-key="systemOrgUserTable"
                 >
-                </el-table-column>
-                <el-table-column prop="categoryLevelPath" label="分类">
-                </el-table-column>
-              </el-table>
-            </el-tab-pane>
-            <el-tab-pane label="BOM表" name="bom" v-if="defaultNum == '4'">
-              <div class="bom-top">
-                <div class="top-input">
-                  <span>基本数量</span>
-                  <div class="input-box">{{ customForm.basicNum }}</div>
-                  <span>{{ customForm.measuringUnit }}</span>
-                </div>
-              </div>
-              <el-table
-                :data="bomData"
-                class="table-box"
-                :header-cell-style="{ background: '#F0F3F3', border: 'none' }"
-              >
-                <el-table-column type="index" label="序号" width="50">
-                </el-table-column>
-                <el-table-column prop="code" label="物品编码">
-                </el-table-column>
-                <el-table-column prop="name" label="物品名称">
-                </el-table-column>
-                <el-table-column prop="brandNum" label="牌号">
-                </el-table-column>
-                <el-table-column
-                  label="物品类型"
-                  prop="classificationCode"
-                  :formatter="classificationCodeFormatter"
+                </ele-pro-table>
+              </el-tab-pane>
+              <el-tab-pane label="BOM表" name="bom" v-if="defaultNum == '4'">
+                <!-- 数据表格 -->
+                <ele-pro-table
+                  ref="table"
+                  :columns="columns_bom"
+                  :datasource="bomData"
+                  :needPage="false"
+                  height="calc(100vh - 265px)"
+                  full-height="calc(100vh - 116px)"
+                  tool-class="ele-toolbar-form"
+                  cache-key="systemOrgUserTable"
                 >
-                </el-table-column>
-                <el-table-column prop="categoryLevelPath" label="分类">
-                </el-table-column>
-                <el-table-column prop="num" label="数量"> </el-table-column>
-                <el-table-column prop="date" label="计量单位">
-                </el-table-column>
-              </el-table>
-            </el-tab-pane>
-            <el-tab-pane
-              label="匹配设备"
-              name="facility"
-              v-if="defaultNum == '6' || defaultNum == '7'"
-            >
-              <el-table
-                :data="facilityData"
-                class="table-box"
-                :header-cell-style="{ background: '#F0F3F3', border: 'none' }"
+                  <!-- 表头工具栏 -->
+                  <template v-slot:toolbar>
+                    <div class="bom-top">
+                      <div class="top-input">
+                        <span>基本数量</span>
+                        <div class="input-box">{{ customForm.basicNum }}</div>
+                        <span>{{ customForm.measuringUnit }}</span>
+                      </div>
+                    </div>
+                  </template>
+                  <!-- 操作列 -->
+                  <template v-slot:num="{ row, $index }">
+                    {{ row.num }}
+                  </template>
+                </ele-pro-table>
+              </el-tab-pane>
+              <el-tab-pane
+                label="匹配设备"
+                name="facility"
+                v-if="defaultNum == '6' || defaultNum == '7'"
               >
-                <el-table-column type="index" label="序号" width="50">
-                </el-table-column>
-                <el-table-column prop="code" label="物品编码">
-                </el-table-column>
-                <el-table-column prop="name" label="物品名称">
-                </el-table-column>
-                <el-table-column prop="modelType" label="型号">
-                </el-table-column>
-                <el-table-column
-                  label="物品类型"
-                  prop="classificationCode"
-                  :formatter="classificationCodeFormatter"
+                <!-- 数据表格 -->
+                <ele-pro-table
+                  ref="table"
+                  :columns="columns_facility"
+                  :datasource="facilityData"
+                  :needPage="false"
+                  height="calc(100vh - 265px)"
+                  full-height="calc(100vh - 116px)"
+                  tool-class="ele-toolbar-form"
+                  cache-key="systemOrgUserTable"
                 >
-                </el-table-column>
-                <el-table-column prop="categoryLevelPath" label="分类">
-                </el-table-column>
-              </el-table>
-            </el-tab-pane>
-            <!--                   <div class="pagination">
-                     <el-pagination
-                       background
-                       layout="total, sizes, prev, pager, next, jumper"
-                       :total="pagination.total"
-                       :page-sizes="[5, 10, 20, 50, 100]"
-                       :page-size="pagination.size"
-                       :current-page.sync="pagination.page"
-                       @current-change="handleCurrent"
-                       @size-change="handleSize"
-                     >
-                     </el-pagination>
-                   </div> -->
-          </el-tabs>
+                </ele-pro-table>
+              </el-tab-pane>
+            </el-tabs>
+          </div>
         </div>
       </div>
-    </div>
+    </el-card>
   </div>
 </template>
 
 <script>
+  import matchMixins from './components/match-mixins';
   import ItemDetail from './components/ItemDetail';
   import RowDetail from './components/RowDetail';
+  import dictMixins from '@/mixins/dictMixins';
   import { getDetails } from '@/api/classifyManage/itemInformation';
   export default {
     components: { ItemDetail, RowDetail },
+    mixins: [dictMixins, matchMixins],
     data () {
       return {
-        pageTitle: '',
-        typeList: [
-          { id: 1, value: '1  生产设备', prefix: '1', code: 1 },
-          { id: 2, value: '2  舟皿', prefix: '2', code: 2 },
-          { id: 3, value: '5  周转车', prefix: '5', code: 5 },
-          { id: 4, value: '6  模具', prefix: '6', code: 6 },
-          { id: 5, value: '7  备品备件', prefix: '7', code: 7 },
-          { id: 6, value: '3  物料', prefix: '3', code: 3 },
-          { id: 7, value: '4  产品', prefix: '4', code: 4 },
-          { id: 8, value: '8  耗材', prefix: '8', code: 8 }
-        ],
+        // typeList: [
+        //   { id: 1, value: '1  生产设备', prefix: '1', code: 1 },
+        //   { id: 2, value: '2  舟皿', prefix: '2', code: 2 },
+        //   { id: 3, value: '5  周转车', prefix: '5', code: 5 },
+        //   { id: 4, value: '6  模具', prefix: '6', code: 6 },
+        //   { id: 5, value: '7  备品备件', prefix: '7', code: 7 },
+        //   { id: 6, value: '3  物料', prefix: '3', code: 3 },
+        //   { id: 7, value: '4  产品', prefix: '4', code: 4 },
+        //   { id: 8, value: '8  耗材', prefix: '8', code: 8 }
+        // ],
         defaultNum: '1',
         // itemForm:{
         //   priceType:0, dateType:0,
@@ -237,26 +178,50 @@
         itemValue: ''
       };
     },
-    created () {
+    computed: {
+      prefix () {
+        const obj =
+          (this.dict[this.dictEnum['分类编号']] || []).find(
+            (itm) => itm.dictCode === this.defaultNum
+          ) || {};
+        return obj && obj.dictValue;
+      },
+      typeList () {
+        const noList = this.dict[this.dictEnum['分类编号']] || [];
+
+        return (this.dict[this.dictEnum['类型用途']] || []).map((item) => {
+          const obj =
+            noList.find((itm) => itm.dictCode === item.dictCode) || {};
+          return {
+            ...item,
+            value: `${obj.dictValue} ${item.dictValue}`,
+            name: item.dictValue,
+            prefix: obj.dictValue,
+            code: item.dictCode
+          };
+        });
+      }
+    },
+    async created () {
+      await this.requestDict('分类编号');
+      await this.requestDict('类型用途');
       this.getDetilInfo(this.$route.query.id);
     },
     methods: {
       async getDetilInfo (id) {
-        const res = await getDetails(id);
-        if (res.success) {
-          this.customForm = res.data;
-          this.defaultNum = res.data.classificationCode;
-          this.formatterValue(res.data.classificationCode);
-          this.setDefault(res.data.classificationCode);
-          for (const key in this.customForm.categoryVoRelationMap) {
-            this.matchList(key, this.customForm.categoryVoRelationMap);
-          }
+        const data = await getDetails(id);
+        this.customForm = data;
+        this.defaultNum = data.type;
+        this.formatterValue(data.type);
+        this.setDefault(data.type);
+        for (const key in this.customForm.categoryVoRelationMap) {
+          this.matchList(key, this.customForm.categoryVoRelationMap);
         }
       },
 
       formatterValue (code) {
         this.typeList.map((item) => {
-          if (item.prefix == code) {
+          if (item.code == code) {
             this.itemValue = item.value;
           }
         });
@@ -335,105 +300,112 @@
         this.pagination.page = 1;
         this.pagination.size = size;
         // this._getList(this.params)
-      },
+      }
 
       // 物品类型格式化
-      classificationCodeFormatter (row) {
-        let itemName = '';
-        this.typeList.map((item) => {
-          if (item.prefix == row.classificationCode) {
-            itemName = item.value;
-          }
-        });
-        return itemName;
-      }
+      // classificationCodeFormatter (row) {
+      //   let itemName = '';
+      //   this.typeList.map((item) => {
+      //     if (item.code == row.type) {
+      //       itemName = item.value;
+      //     }
+      //   });
+      //   return itemName;
+      // }
     }
   };
 </script>
 
 <style lang="scss" scoped>
-  :deep(.page-title) {
-    border-bottom: 1px solid #eaeefb;
-    padding-bottom: 8px;
-    margin-bottom: 16px;
-    display: flex;
-    align-items: center;
-    .el-page-header__left {
+  .ele-body {
+    :deep(.page-title) {
+      border-bottom: 1px solid #eaeefb;
+      padding-bottom: 8px;
+      margin-bottom: 16px;
       display: flex;
       align-items: center;
+      .el-page-header__left {
+        display: flex;
+        align-items: center;
+      }
+      .pageContent {
+        display: flex;
+        align-items: center;
+        font-size: 18px;
+        color: #303133;
+        .topform {
+          margin-left: 30px;
+          display: flex;
+          align-items: center;
+          .el-form-item {
+            margin-bottom: 0;
+          }
+        }
+      }
     }
-    .pageContent {
+    .table-container {
+      flex: 1;
       display: flex;
-      align-items: center;
-      font-size: 18px;
-      color: #303133;
-      .topform {
-        margin: 5px 0 0 30px;
+      overflow: hidden;
+      .tree-col {
+        margin-right: 10px;
+        width: 25%;
+        min-width: 250px;
+        overflow: auto;
+        padding: 20px 20px 20px 10px;
+        background-color: #fff;
+        margin-top: 10px;
+        border: 1px solid #e6ebf5;
+        border-radius: 4px;
+        box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%);
       }
     }
-  }
-  .table-container {
-    flex: 1;
-    display: flex;
-    overflow: hidden;
-    .tree-col {
-      margin-right: 10px;
-      width: 25%;
-      min-width: 250px;
-      overflow: auto;
-      padding: 20px 20px 20px 10px;
-      background-color: #fff;
+
+    :deep(.attribute-row) {
+      padding: 20px 5px;
+      background: #fff;
       margin-top: 10px;
+      overflow: auto;
+      flex: 1;
       border: 1px solid #e6ebf5;
       border-radius: 4px;
       box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%);
-    }
-  }
-
-  :deep(.attribute-row) {
-    padding: 20px 5px;
-    background: #fff;
-    margin-top: 10px;
-    overflow: auto;
-    flex: 1;
-    border: 1px solid #e6ebf5;
-    border-radius: 4px;
-    box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%);
-    position: relative;
-    .row-table {
-      width: 100%;
-      margin: 20px auto 0;
-      .table-box {
+      position: relative;
+      .row-table {
         width: 100%;
-        margin: 10px auto;
-        min-height: 400px;
-      }
-      .bom-top {
-        width: 100%;
-        display: flex;
-        align-items: center;
-        justify-content: flex-start;
-        .top-input {
-          margin-left: 20px;
+        margin: 20px auto 0;
+        .table-box {
+          width: 100%;
+          margin: 10px auto;
+          min-height: 400px;
+        }
+        .bom-top {
+          width: 100%;
           display: flex;
           align-items: center;
           justify-content: flex-start;
-          .input-box {
-            width: 150px;
-            margin: 0 10px;
-            display: inline-box;
+          .top-input {
+            margin-left: 20px;
+            display: flex;
+            align-items: center;
+            justify-content: flex-start;
+            .input-box {
+              width: 150px;
+              margin: 0 10px;
+              display: inline-box;
+            }
           }
         }
       }
-    }
-    .page-footer-btn {
-      background: #fff;
-      z-index: 1;
-      position: fixed;
-      bottom: 40px;
-      right: 80px;
-      text-align: right;
-      width: 50%;
+      .page-footer-btn {
+        background: #fff;
+        z-index: 1;
+        position: fixed;
+        bottom: 40px;
+        right: 80px;
+        text-align: right;
+        width: 50%;
+      }
     }
   }
 </style>

+ 2 - 1
src/views/ledgerAssets/boat/components/baseInfo.vue

@@ -155,7 +155,8 @@ export default {
            ...this.pagination
          }
          getPageSingle(params).then(res=>{
-             
+            this.tableData = res.list
+            this.total = res.count
          })
 
       },

+ 13 - 3
src/views/ledgerAssets/boat/components/boat-list.vue

@@ -1,5 +1,7 @@
 <template>
   <div>
+    <boat-search @search="reload">
+    </boat-search>
     <!-- 数据表格 -->
     <ele-pro-table
       ref="table"
@@ -12,8 +14,14 @@
     >
       <!-- 表头工具栏 -->
       <template v-slot:toolbar>
-        <boat-search @search="reload">
-        </boat-search>
+        <el-button
+          size="small"
+          type="primary"
+          icon="el-icon-download"
+          class="ele-btn-icon"
+        >
+          导出
+        </el-button>
       </template>
       <!-- 编码列 -->
       <template v-slot:code="{ row }">
@@ -35,6 +43,7 @@
     components: { BoatSearch },
     props: {
       // 类别id
+      categoryId: [Number, String],
       rootId: [Number, String],
     },
     data() {
@@ -128,6 +137,7 @@
           ...order,
           pageNum: page,
           size: limit,
+          categoryId: this.categoryId,
           rootCategoryLevelId: this.rootId
         });
       },
@@ -148,7 +158,7 @@
     },
     watch: {
       // 监听类别id变化
-      rootId() {
+      categoryId() {
         this.reload();
       }
     }

+ 0 - 8
src/views/ledgerAssets/boat/components/boat-search.vue

@@ -44,14 +44,6 @@
             size="small"
             type="primary"
           >重置</el-button>
-          <el-button
-            size="small"
-            type="primary"
-            icon="el-icon-download"
-            class="ele-btn-icon"
-          >
-            导出
-          </el-button>
         </div>
       </el-col>
     </el-row>

+ 10 - 2
src/views/ledgerAssets/boat/index.vue

@@ -10,6 +10,7 @@
            <div class="ele-border-lighter sys-organization-list">
              <AssetTree
                @handleNodeClick="handleNodeClick"
+               @setRootId="setRootId"
                :type="'2'"
                :paramsType="'type'"
                ref="treeList"
@@ -19,7 +20,8 @@
          <template v-slot:content>
            <boat-list
              v-if="current"
-             :root-id="current.id"
+             :category-id="current.id"
+             :root-id="rootId"
            />
          </template>
        </ele-split-layout>
@@ -44,7 +46,8 @@
         loading: false,
         // 表格选中数据
         selection: [],
-        current:null
+        current:null,
+        rootId:null,
       };
     },
     computed: {
@@ -54,6 +57,11 @@
       handleNodeClick (info) {
         this.current = info
       },
+      // 获取根节点id
+      setRootId(id){
+        this.rootId = id
+      }
+
     }
   };
 </script>

+ 243 - 0
src/views/ledgerAssets/equipment/components/baseInfo.vue

@@ -0,0 +1,243 @@
+<template>
+  <div class="baseinfo-container">
+    <div class="basic-details-title border-none">
+      <span class="border-span">基本信息</span>
+    </div>
+    <el-descriptions title="" :column="4" size="medium" border>
+      <el-descriptions-item>
+        <template slot="label"> 类别编码 </template>
+        {{ information.code }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 舟皿名称 </template>
+        {{ information.name }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 型号</template>
+        {{ information.modelType }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 规格 </template>
+        {{ information.specification }}
+      </el-descriptions-item>
+      <el-descriptions-item :span="2">
+        <template slot="label"> 分类 </template>
+        {{information.categoryLevelPath}}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 长/宽/高(mm) </template>
+        {{information.extendField.length}}/{{information.extendField.width}}/{{information.extendField.high}}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 计量单位</template>
+        {{information.measuringUnit}}
+      </el-descriptions-item>
+    </el-descriptions>
+    <div class="basic-details-title border-none">
+      <span class="border-span">舟皿明细</span>
+    </div>
+    <div>
+      <el-tabs v-model="activeName" type="card" @tab-click="tabClick" class="basic-tab">
+          <el-tab-pane :label="`在用(${countInfo.inUseSum?countInfo.inUseSum:'0'})`" name="inUse" >
+          </el-tab-pane>
+          <el-tab-pane :label="`在库(${countInfo.inLibrarySum?countInfo.inLibrarySum:'0'})`" name="inLibrary">
+          </el-tab-pane>
+          <el-tab-pane :label="`消耗(${countInfo.consumeSum?countInfo.consumeSum:'0'})`" name="hasConsume">
+          </el-tab-pane>
+      </el-tabs>
+      <el-table :data="tableData" class="table-box"
+         :header-cell-style="{ background: '#F0F3F3', border: 'none'}"
+      >
+           <el-table-column type="index" label="序号"  width="100"> </el-table-column>
+           <el-table-column prop="code" label="编码" > </el-table-column>
+           <el-table-column prop="name" label="名称" > </el-table-column>
+           <el-table-column prop="inCode" label="入库单号" v-if="activeName=='inLibrary'"> </el-table-column>
+           <el-table-column prop="inTime" label="入库时间" v-if="activeName=='inLibrary'"> </el-table-column>
+           <el-table-column prop="outCode" label="出库单号" v-if="activeName!='inLibrary'"> </el-table-column>
+           <el-table-column prop="outTime" label="出库时间" v-if="activeName!='inLibrary'"> </el-table-column>
+      </el-table>
+      <div class="pagination">
+        <el-pagination
+          background
+          layout="total, sizes, prev, pager, next, jumper"
+          :total="total"
+          :page-sizes="[15, 30, 50, 100, 500]"
+          :page-size="pagination.size"
+          :current-page.sync="pagination.pageNum"
+          @current-change="handleCurrent"
+          @size-change="handleSize"
+        >
+        </el-pagination>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+  import {
+    getCategoryInfo,
+    getPageSingle
+  } from '@/api/ledgerAssets/boat.js';
+export default {
+  props: {
+    rowId:{
+      type:String ,
+      default:''
+    },
+  },
+  data () {
+    return {
+      information:{
+        extendField:{}
+      },
+      activeName:'inUse',
+      tableData:[],
+      pagination: {
+        pageNum: 1,
+        size: 15
+      },
+      total: 0,
+      searchForm:{
+        categoryId:this.rowId,
+        positionType:1
+      },
+      countInfo:{}
+
+    }
+  },
+  created () {
+    this.getDetilInfo()
+    this.handleList()
+    // this.getCountNum()
+  },
+  methods:{
+     getDetilInfo(){
+       getCategoryInfo(this.rowId).then(res=>{
+          this.information = res.data
+          if(res.data.extendField){
+            this.$set(this.information, 'extendField', JSON.parse(res.data.extendField))
+          }
+       })
+     },
+     tabClick(val){
+        switch (this.activeName) {
+          case 'inUse': {
+            this.searchForm.positionType = 1
+            break;
+          }
+          case 'inLibrary': {
+            this.searchForm.positionType = 2
+            break;
+          }
+          case 'hasConsume': {
+            this.searchForm.positionType = 3
+            break;
+          }
+          default:
+            break;
+        }
+        this.handleList()
+     },
+
+     handleCurrent (page) {
+       this.pagination.pageNum = page
+       this.handleList()
+     },
+     handleSize (size) {
+       this.pagination.pageNum = 1
+       this.pagination.size = size
+       this.handleList()
+     },
+
+      handleList () {
+         const params = {
+           ...this.searchForm,
+           ...this.pagination
+         }
+         getPageSingle(params).then(res=>{
+            this.tableData = res.list
+            this.total = res.count
+         })
+
+      },
+
+     getCountNum(){
+       const params = {
+           assetType:'ZHOUMIN',
+           informationId:this.rowInfo.id
+       }
+       getCount(params).then(res=>{
+           if(res?.success){
+               this.countInfo = res.data
+           }
+       })
+     }
+
+
+  },
+
+  watch:{
+    // 监听类别id变化
+    // rowId() {
+    //   this.getDetilInfo()
+    // }
+  },
+
+}
+</script>
+
+<style lang="scss" scoped>
+ .baseinfo-container {
+    background-color: #fff;
+    padding: 20px;
+    .content {
+      padding: 0 20px;
+    }
+  .basic-details-title{
+    font-size: 16px;
+    margin: 15px 0;
+  }
+  .basic-tab{
+    margin-bottom: 15px;
+  }
+  .upload-container {
+    display: flex;
+    .img-box {
+      width: 280px;
+      height: 342px;
+      border: 1px solid rgba(215, 215, 215, 1);
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      img {
+        max-width: 100%;
+      }
+    }
+    .file-list {
+      margin-left: 50px;
+      flex: 1;
+      display: flex;
+      justify-content: space-between;
+      flex-wrap: wrap;
+      justify-items: baseline;
+      align-content: flex-start;
+      .file-box {
+        width: 30%;
+        margin-bottom: 20px;
+        height: 57px;
+        text-align: center;
+        line-height: 55px;
+        border: 1px solid var(--mainColor);
+        color: var(--mainColor);
+        cursor: pointer;
+
+        &.disabled {
+          cursor: not-allowed;
+          border-color: rgba(215, 215, 215, 1);
+          color: rgba(215, 215, 215, 1);
+        }
+      }
+    }
+  }
+}
+</style>

+ 157 - 0
src/views/ledgerAssets/equipment/components/equipment-list.vue

@@ -0,0 +1,157 @@
+<template>
+  <div>
+    <equipment-search @search="reload" />
+    <!-- 数据表格 -->
+    <ele-pro-table
+      ref="table"
+      :columns="columns"
+      :datasource="datasource"
+      height="calc(100vh - 265px)"
+      full-height="calc(100vh - 116px)"
+      tool-class="ele-toolbar-form"
+      cache-key="systemOrgUserTable"
+    >
+      <!-- 表头工具栏 -->
+      <template v-slot:toolbar>
+        <el-button
+          size="small"
+          type="primary"
+          icon="el-icon-download"
+          class="ele-btn-icon"
+        >
+          导出
+        </el-button>
+      </template>
+      <!-- 编码列 -->
+      <!-- 操作列 -->
+      <template v-slot:action="{ row }">
+        <el-link
+          type="primary"
+          :underline="false"
+          icon="el-icon-edit"
+          @click="handEdit(row)"
+        >
+          编辑
+        </el-link>
+      </template>
+    </ele-pro-table>
+  </div>
+</template>
+
+<script>
+  import EquipmentSearch from './equipment-search.vue';
+  import { getBoatList } from '@/api/ledgerAssets/boat.js';
+
+  export default {
+    components: { EquipmentSearch },
+    props: {
+      // 类别id
+      categoryId: [Number, String],
+      rootId: [Number, String]
+    },
+    data () {
+      return {
+        // 表格列配置
+        columns: [
+          {
+            columnKey: 'index',
+            type: 'index',
+            label: '序号',
+            width: 55,
+            align: 'center',
+            showOverflowTooltip: true,
+            fixed: 'left'
+          },
+          {
+            prop: 'assetCode',
+            label: '设备编码',
+            showOverflowTooltip: true,
+            minWidth: 110,
+            slot: 'code'
+          },
+          {
+            prop: 'assetName',
+            label: '设备名称',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'fixAssetCode',
+            label: '固资编码',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'module',
+            label: '型号',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'specification',
+            label: '规格',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'location',
+            label: '位置',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'source',
+            label: '生命周期',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'networkStatus',
+            label: '网络状态',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            columnKey: 'action',
+            slot: 'action',
+            label: '操作',
+            minWidth: 60
+          }
+        ]
+      };
+    },
+    methods: {
+      /* 表格数据源 */
+      datasource ({ page, limit, where, order }) {
+        return getBoatList({
+          ...where,
+          ...order,
+          pageNum: page,
+          size: limit,
+          categoryId: this.categoryId,
+          rootCategoryLevelId: this.rootId
+        });
+      },
+      /* 刷新表格 */
+      reload (where) {
+        this.$refs.table.reload({ pageNum: 1, where: where });
+      },
+
+      // 跳转到详情页
+      handEdit ({ id }) {
+        this.$router.push({
+          path: '/ledgerAssets/boat/detail',
+          query: {
+            id
+          }
+        });
+      }
+    },
+    watch: {
+      // 监听类别id变化
+      categoryId () {
+        this.reload();
+      }
+    }
+  };
+</script>

+ 113 - 0
src/views/ledgerAssets/equipment/components/equipment-search.vue

@@ -0,0 +1,113 @@
+<!-- 搜索表单 -->
+<template>
+  <el-form
+    label-width="77px"
+    class="ele-form-search"
+    @keyup.enter.native="search"
+    @submit.native.prevent
+  >
+    <el-row :gutter="15">
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+        <el-form-item label="设备编码:" label-width="100px">
+          <el-input clearable v-model="where.code" placeholder="请输入" />
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+        <el-form-item label="固资编码:" label-width="100px">
+          <el-input
+            clearable
+            v-model="where.fixAssetCode"
+            placeholder="请输入"
+          />
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+        <el-form-item label="设备名称:" label-width="100px">
+          <el-input clearable v-model="where.name" placeholder="请输入" />
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+        <el-form-item label="规格/型号:" label-width="100px">
+          <el-input
+            clearable
+            v-model="where.spaceModule"
+            placeholder="请输入"
+          />
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+        <el-form-item label="网络状态:">
+          <DictSelection
+            dictName="网络状态"
+            clearable
+            v-model="where.networkStatus"
+          >
+          </DictSelection>
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+        <el-form-item label="生命周期:">
+          <DictSelection dictName="生命周期" clearable v-model="where.source">
+          </DictSelection>
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 12, md: 12 } : { span: 12 }">
+        <div class="ele-form-actions">
+          <el-button
+            type="primary"
+            icon="el-icon-search"
+            class="ele-btn-icon"
+            @click="search"
+            size="small"
+          >
+            查询
+          </el-button>
+          <el-button
+            @click="reset"
+            icon="el-icon-refresh-left"
+            size="small"
+            type="primary"
+            >重置</el-button
+          >
+        </div>
+      </el-col>
+    </el-row>
+  </el-form>
+</template>
+
+<script>
+  export default {
+    data () {
+      // 默认表单数据
+      const defaultWhere = {
+        name: '',
+        code: '',
+        networkStatus: '',
+        fixAssetCode: '',
+        source: '',
+        spaceModule: ''
+      };
+      return {
+        // 表单数据
+        where: { ...defaultWhere }
+      };
+    },
+    computed: {
+      // 是否开启响应式布局
+      styleResponsive () {
+        return this.$store.state.theme.styleResponsive;
+      }
+    },
+    methods: {
+      /* 搜索 */
+      search () {
+        this.$emit('search', this.where);
+      },
+      /*  重置 */
+      reset () {
+        this.where = { ...this.defaultWhere };
+        this.search();
+      }
+    }
+  };
+</script>

+ 66 - 0
src/views/ledgerAssets/equipment/detail.vue

@@ -0,0 +1,66 @@
+<template>
+  <div>
+    <!-- tab切换 -->
+<!--   <div class="switch">
+      <div class="switch_left">
+        <ul>
+          <li
+            v-for="item in tabOptions"
+            :key="item.key"
+            :class="{ active: activeComp == item.key }"
+            @click="activeComp = item.key"
+          >
+            {{ item.name }}
+          </li>
+        </ul>
+        <el-button size="small" @click="$router.go(-1)">返回</el-button>
+      </div>
+    </div> -->
+    <div class="content-wrapper">
+      <component :is="activeComp" :rowId="rowId"></component>
+    </div>
+  </div>
+</template>
+
+<script>
+import baseInfo from './components/baseInfo.vue'
+export default {
+  components: {
+    baseInfo
+  },
+  data () {
+    return {
+      activeComp: 'baseInfo',
+      tabOptions: [
+        { key: 'baseInfo', name: '舟皿信息' },
+      ],
+      rowId:null,
+    }
+  },
+  created () {
+     this.rowId = this.$route.query.id
+  },
+  methods:{
+     // async getDetilInfo(id){
+     //   const res = await getDetails({id:id})
+     //   if (res.success){
+
+     //   }
+     // },
+  }
+
+}
+</script>
+
+<style lang="scss" scoped>
+.content-wrapper {
+  background-color: #fff;
+}
+.switch_left{
+  width:100%;
+  display:flex;
+  align-items:center;
+  justify-content: space-between;
+  padding-right:20px;
+}
+</style>

+ 78 - 0
src/views/ledgerAssets/equipment/index.vue

@@ -0,0 +1,78 @@
+<template>
+  <div class="ele-body">
+    <el-card shadow="never" v-loading="loading">
+      <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"
+              :type="'1'"
+              :paramsType="'type'"
+              ref="treeList"
+            />
+          </div>
+        </div>
+        <template v-slot:content>
+          <equipment-list
+            v-if="current"
+            :category-id="current.id"
+            :root-id="rootId"
+          />
+        </template>
+      </ele-split-layout>
+    </el-card>
+  </div>
+</template>
+
+<script>
+  import AssetTree from '@/components/AssetTree';
+  import EquipmentList from './components/equipment-list.vue';
+  import { getBoatList } from '@/api/ledgerAssets/boat.js';
+  export default {
+    components: {
+      AssetTree,
+      EquipmentList
+    },
+    data () {
+      return {
+        // 加载状态
+        loading: false,
+        // 表格选中数据
+        selection: [],
+        current: null,
+        rootId: null
+      };
+    },
+    computed: {},
+    methods: {
+      handleNodeClick (info) {
+        this.current = info;
+      },
+      // 获取根节点id
+      setRootId (id) {
+        this.rootId = id;
+      }
+    }
+  };
+</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 :deep(.el-tree-node__content) {
+    height: 40px;
+    & > .el-tree-node__expand-icon {
+      margin-left: 10px;
+    }
+  }
+</style>

+ 36 - 31
src/views/ledgerAssets/material/components/baseInfo.vue

@@ -6,11 +6,11 @@
     <el-descriptions title="" :column="4" size="medium" border>
       <el-descriptions-item>
         <template slot="label"> 物品编码 </template>
-        {{ information.informationCode }}
+        {{ information.code }}
       </el-descriptions-item>
       <el-descriptions-item>
         <template slot="label"> 原料名称 </template>
-        {{ information.informationName }}
+        {{ information.name }}
       </el-descriptions-item>
       <el-descriptions-item>
         <template slot="label"> 牌号</template>
@@ -26,7 +26,7 @@
       </el-descriptions-item>
       <el-descriptions-item :span="2">
         <template slot="label"> 分类 </template>
-        {{ information.classificationUrl }}
+        {{ information.categoryLevelPath }}
       </el-descriptions-item>
     </el-descriptions>
 
@@ -45,7 +45,7 @@
                 type="text"
                 size="small"
                 placeholder="请输入"
-                v-model="searchForm.outInCode"
+                v-model="searchForm.sourceBizNo"
               ></el-input>
             </el-form-item>
           </el-col>
@@ -55,7 +55,7 @@
                 type="text"
                 size="small"
                 placeholder="请输入"
-                v-model="searchForm.batchNum"
+                v-model="searchForm.sourceBatchNo"
               ></el-input
             ></el-form-item>
           </el-col>
@@ -75,7 +75,7 @@
       </el-form>
 
       <div class="tabbox">
-        <el-tabs v-model="activeName" type="card" @tab-click="tabClick">
+        <el-tabs v-model="activeName" type="card" @tab-click="tabClick" class="basic-tab">
           <el-tab-pane
             :label="`在用(${countInfo.inUseSum ? countInfo.inUseSum : '0'})`"
             name="inUse"
@@ -109,8 +109,9 @@
         <el-table-column type="selection" width="55"> </el-table-column>
         <el-table-column type="index" label="序号" width="100">
         </el-table-column>
-        <el-table-column prop="assetCode" label="原料编码"> </el-table-column>
-        <el-table-column prop="batchNum" label="批次号"> </el-table-column>
+        <el-table-column prop="code" label="编码"> </el-table-column>
+        <el-table-column prop="name" label="名称" > </el-table-column>
+        <el-table-column prop="sourceBatchNo" label="批次号"> </el-table-column>
         <el-table-column prop="bucketNum" label="包装编码"> </el-table-column>
         <el-table-column prop="minPackUnit" label="最小包装单元">
         </el-table-column>
@@ -146,7 +147,7 @@
           :total="total"
           :page-sizes="[15, 30, 50, 100, 500]"
           :page-size="pagination.size"
-          :current-page.sync="pagination.page"
+          :current-page.sync="pagination.pageNum"
           @current-change="handleCurrent"
           @size-change="handleSize"
         >
@@ -169,7 +170,8 @@
 // import { batchBarPrint } from '@/api/ledgerAssets/booksList'
 // import QrPrint from '@/components/print/printPDF.vue'
   import {
-    getCategoryInfo
+    getCategoryInfo,
+    getPageSingle
   } from '@/api/ledgerAssets/boat.js';
 export default {
   props: {
@@ -187,28 +189,25 @@ export default {
       activeName: 'inUse',
       tableData: [],
       pagination: {
-        page: 1,
+        pageNum: 1,
         size: 15
       },
       total: 0,
       searchForm: {
-        assetType: 'WULIAO',
-        informationId: '',
-        source: 1
+        categoryId:this.rowId,
+        positionType:1
       },
       multipleSelection: [],
       openWindows: false, //打印弹窗
       barCodeConfig: [],
-      source: 1,
+      positionType: 1,
       countInfo: {}
     }
   },
   watch: {},
   created () {
     this.getDetilInfo()
-    // this.searchForm.informationId = this.rowInfo.id
-    // this.getDetilInfo(this.rowInfo.id)
-    // this.handleList()
+    this.handleList()
     // this.getCountNum()
   },
   methods: {
@@ -224,21 +223,21 @@ export default {
     tabClick (val) {
       switch (this.activeName) {
         case 'inUse': {
-          this.source = 1
+          this.positionType = 1
           break
         }
         case 'inLibrary': {
-          this.source = 2
+          this.positionType = 2
           break
         }
         case 'hasConsume': {
-          this.source = 3
+          this.positionType = 3
           break
         }
         default:
           break
       }
-      this.searchForm.source = this.source
+      this.searchForm.positionType = this.positionType
       this.handleList()
     },
 
@@ -247,22 +246,21 @@ export default {
       this.handleList()
     },
     handleSize (size) {
-      this.pagination.page = 1
+      this.pagination.pageNum = 1
       this.pagination.size = size
       this.handleList()
     },
 
     // 搜索
     doSearch () {
-      this.pagination.page = 1
+      this.pagination.pageNum = 1
       this.handleList()
     },
     // 重置
     reset () {
       this.searchForm = {
-        assetType: 'WULIAO',
-        informationId: this.rowInfo.id,
-        source: this.source
+        categoryId:this.rowId,
+        positionType:1
       }
       this.doSearch()
     },
@@ -272,10 +270,10 @@ export default {
         ...this.searchForm,
         ...this.pagination
       }
-      const res = await getAssetPage(params)
-      if (res?.success) {
-        this.tableData = res.data.records
-        this.total = res.data.total
+      const res = await getPageSingle(params)
+      if (res) {
+        this.tableData = res.list
+        this.total = res.count
       }
     },
 
@@ -390,6 +388,13 @@ export default {
   .content {
     padding: 0 20px;
   }
+  .basic-details-title{
+    font-size: 16px;
+    margin: 15px 0;
+  }
+  .basic-tab{
+    margin-bottom: 15px;
+  }
   .upload-container {
     display: flex;
     .img-box {

+ 12 - 2
src/views/ledgerAssets/material/components/material-list.vue

@@ -1,5 +1,7 @@
 <template>
   <div>
+    <material-search @search="reload">
+    </material-search>
     <!-- 数据表格 -->
     <ele-pro-table
       ref="table"
@@ -12,8 +14,14 @@
     >
       <!-- 表头工具栏 -->
       <template v-slot:toolbar>
-        <material-search @search="reload">
-        </material-search>
+          <el-button
+            size="small"
+            type="primary"
+            icon="el-icon-download"
+            class="ele-btn-icon"
+          >
+            导出
+          </el-button>
       </template>
       <!-- 编码列 -->
       <template v-slot:code="{ row }">
@@ -35,6 +43,7 @@
     components: { MaterialSearch },
     props: {
       // 类别id
+      categoryId: [Number, String],
       rootId: [Number, String],
     },
     data() {
@@ -110,6 +119,7 @@
           ...order,
           pageNum: page,
           size: limit,
+          categoryId: this.categoryId,
           rootCategoryLevelId: this.rootId
         });
       },

+ 1 - 9
src/views/ledgerAssets/material/components/material-search.vue

@@ -22,7 +22,7 @@
           <el-input clearable v-model="where.modle" placeholder="请输入" />
         </el-form-item>
       </el-col>
-      <el-col v-bind="styleResponsive ? { lg: 7, md: 12 } : { span: 7 }">
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
         <div class="ele-form-actions">
           <el-button
             type="primary"
@@ -38,14 +38,6 @@
              size="small"
              type="primary"
            >重置</el-button>
-           <el-button
-             size="small"
-             type="primary"
-             icon="el-icon-download"
-             class="ele-btn-icon"
-           >
-             导出
-           </el-button>
         </div>
       </el-col>
     </el-row>

+ 9 - 2
src/views/ledgerAssets/material/index.vue

@@ -10,6 +10,7 @@
            <div class="ele-border-lighter sys-organization-list">
              <AssetTree
                @handleNodeClick="handleNodeClick"
+               @setRootId="setRootId"
                :type="'3'"
                :paramsType="'type'"
                ref="treeList"
@@ -19,7 +20,8 @@
          <template v-slot:content>
            <material-list
              v-if="current"
-             :root-id="current.id"
+             :category-id="current.id"
+             :root-id="rootId"
            />
          </template>
        </ele-split-layout>
@@ -44,7 +46,8 @@
         loading: false,
         // 表格选中数据
         selection: [],
-        current:null
+        current:null,
+        rootId:null,
       };
     },
     computed: {
@@ -54,6 +57,10 @@
       handleNodeClick (info) {
         this.current = info
       },
+      // 获取根节点id
+      setRootId(id){
+        this.rootId = id
+      }
     }
   };
 </script>

+ 1 - 1
src/views/ledgerAssets/turnoverCar/components/baseInfo.vue

@@ -217,7 +217,7 @@ export default {
 </script>
 
 <style lang="scss" scoped>
-::v-deep.baseinfo-container {
+.baseinfo-container {
   background-color: #fff;
   padding: 20px;
   .content {

+ 56 - 16
src/views/ledgerAssets/turnoverCar/components/turnovercar-list.vue

@@ -1,5 +1,7 @@
 <template>
   <div>
+    <turnovercar-search @search="reload">
+    </turnovercar-search>
     <!-- 数据表格 -->
     <ele-pro-table
       ref="table"
@@ -12,9 +14,6 @@
     >
       <!-- 表头工具栏 -->
       <template v-slot:toolbar>
-        <turnovercar-search @search="reload">
-        </turnovercar-search>
-        <div>
           <el-checkbox v-model="checked">显示已消耗</el-checkbox>
           <el-button
            size="small"
@@ -24,14 +23,25 @@
          >
            导出
          </el-button>
-        </div>
       </template>
+
       <!-- 编码列 -->
       <template v-slot:code="{ row }">
         <el-link @click="details(row)">
           {{ row.code }}
         </el-link>
       </template>
+      <!-- 操作列 -->
+      <template v-slot:action="{ row }">
+        <el-link
+          type="primary"
+          :underline="false"
+          icon="el-icon-edit"
+          @click="goEdit(row)"
+        >
+          编辑
+        </el-link>
+      </template>
     </ele-pro-table>
   </div>
 </template>
@@ -39,19 +49,27 @@
 <script>
   import TurnovercarSearch from './turnovercar-search.vue';
   import {
-    getBoatList
-  } from '@/api/ledgerAssets/boat.js';
+    getAssetList
+  } from '@/api/ledgerAssets/turnovercar.js';
 
   export default {
     components: { TurnovercarSearch },
     props: {
       // 类别id
+      categoryId: [Number, String],
       rootId: [Number, String],
     },
     data() {
       return {
         // 表格列配置
         columns: [
+          {
+            columnKey: 'selection',
+            type: 'selection',
+            width: 45,
+            align: 'center',
+            fixed: 'left'
+          },
           {
             columnKey: 'index',
             type: 'index',
@@ -63,53 +81,64 @@
           },
           {
             prop: 'code',
-            label: '类别编码',
+            label: '编码',
             showOverflowTooltip: true,
             minWidth: 110,
-            slot: 'code'
+            slot: 'code',
+            fixed: 'left'
           },
           {
             prop: 'name',
-            label: '类别名称',
+            label: '名称',
             showOverflowTooltip: true,
             minWidth: 110
           },
           {
             prop: 'brandNum',
-            label: '牌号',
+            label: '固资编码',
             showOverflowTooltip: true,
             minWidth: 110
           },
           {
             prop: 'categoryLevelPath',
-            label: '分类',
+            label: '材质',
             showOverflowTooltip: true,
             minWidth: 110
           },
           {
             prop: 'inUseSum',
-            label: '在用',
+            label: '型号',
             showOverflowTooltip: true,
             minWidth: 110
           },
           {
             prop: 'inLibrarySum',
-            label: '在库',
+            label: '分类',
             showOverflowTooltip: true,
             minWidth: 110
           },
           {
             prop: 'consumeSum',
-            label: '消耗',
+            label: '所在部门',
             showOverflowTooltip: true,
             minWidth: 110
           },
           {
             prop: 'totalSum',
-            label: '总数量',
+            label: '生命周期',
             showOverflowTooltip: true,
             minWidth: 110
           },
+          {
+            columnKey: 'action',
+            label: '操作',
+            width: 100,
+            align: 'left',
+            resizable: false,
+            slot: 'action',
+            showOverflowTooltip: true,
+            fixed: 'right'
+          }
         ],
         checked:false
       };
@@ -117,11 +146,12 @@
     methods: {
       /* 表格数据源 */
       datasource({ page, limit, where, order }) {
-        return getBoatList({
+        return getAssetList({
           ...where,
           ...order,
           pageNum: page,
           size: limit,
+          categoryId: this.categoryId,
           rootCategoryLevelId: this.rootId
         });
       },
@@ -138,7 +168,17 @@
             id
           }
         })
+      },
+      // 跳转到编辑页
+      goEdit ({ id }) {
+        this.$router.push({
+          path: '/ledgerAssets/turnoverCar/edit',
+          query: {
+            id
+          }
+        })
       }
+
     },
     watch: {
       // 监听类别id变化

+ 1 - 1
src/views/ledgerAssets/turnoverCar/edit.vue

@@ -269,7 +269,7 @@ export default {
 </script>
 
 <style lang="scss" scoped>
-::v-deep.equipment-container {
+.equipment-container {
   background-color: #fff;
   padding: 20px;
   .content {

+ 9 - 5
src/views/ledgerAssets/turnoverCar/index.vue

@@ -19,7 +19,8 @@
          <template v-slot:content>
            <turnovercar-list
              v-if="current"
-             :root-id="current.id"
+             :category-id="current.id"
+             :root-id="rootId"
            />
          </template>
        </ele-split-layout>
@@ -30,9 +31,7 @@
 <script>
   import AssetTree from '@/components/AssetTree';
   import TurnovercarList from './components/turnovercar-list.vue';
-  import {
-    getBoatList
-  } from '@/api/ledgerAssets/boat.js';
+
   export default {
     components: {
       AssetTree ,
@@ -44,7 +43,8 @@
         loading: false,
         // 表格选中数据
         selection: [],
-        current:null
+        current:null,
+        rootId:null
       };
     },
     computed: {
@@ -54,6 +54,10 @@
       handleNodeClick (info) {
         this.current = info
       },
+      // 获取根节点id
+      setRootId(id){
+        this.rootId = id
+      }
     }
   };
 </script>