Ver Fonte

BOM清单管理:列表展开功能(未生效)

chris há 1 ano atrás
pai
commit
3eeab49905
1 ficheiros alterados com 4 adições e 7 exclusões
  1. 4 7
      src/views/modules/tech/product-management.vue

+ 4 - 7
src/views/modules/tech/product-management.vue

@@ -44,15 +44,11 @@
       </el-form>
       <el-table
         :data="dataList"
+        row-key="productId"
         border
+        :indent='20'
         v-loading="dataListLoading"
         style="width: 100%;">
-        <el-table-column
-          label="序号"
-          type="index"
-          width="50"
-          align="center">
-        </el-table-column>
         <el-table-column
           prop="productCode"
           header-align="center"
@@ -421,7 +417,8 @@ export default {
         }
         getProductList(params).then(({data}) => {
           if (data && data.code === '200') {
-            this.dataList = data.data.records
+            // this.dataList = data.data.records
+            this.dataList = JSON.parse(JSON.stringify(data.data.records).replace(/"children":null/g, '"children":[]'))
             this.dataList.forEach(item => {
               if (item.attachList2 && item.attachList2.length > 0) {
                 item.simplePic = downloadUrl + item.attachList2[0].url