Ver Fonte

修改bug

chenrui há 9 meses atrás
pai
commit
79450c0fbc
1 ficheiros alterados com 8 adições e 3 exclusões
  1. 8 3
      src/views/easyPassManagement/shoppingProducts/list.vue

+ 8 - 3
src/views/easyPassManagement/shoppingProducts/list.vue

@@ -204,6 +204,7 @@ export default {
       },
       productNum: null, // 列表数据总条数
       categoryOptions: [], // 产品类目列表
+      fieldNames: { label: 'categoryName', value: 'categorySn', children: 'shopCategoryList' },
       category: [], // 类目val
       rowSelectionInfo: null, // 已选数据
       // 加载数据方法 必须为 Promise 对象
@@ -271,7 +272,7 @@ export default {
       // 回显已选择产品并禁用
       const res = await queryProductSnList({})
       if (res.status == 200) {
-        this.chooseDataList = res.data
+        this.chooseDataList = res.data || []
       }
       this.showProModal = true
     },
@@ -427,8 +428,12 @@ export default {
     // 初始化
     pageInit () {
       const _this = this
-      this.getCategoryList()
-      this.$nextTick(() => { // 页面渲染完成后的回调
+      if (!_this.itemCategorySn) {
+        _this.getCategoryList()
+      }
+      _this.chooseDataList = []
+      _this.showProModal = false
+      _this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
       })
     },