zuozhengqing
2023-11-06 e7ccd2a06e4cdf3709e699507e1e15379ded5b83
src/views/productManage/product/index.vue
@@ -5,8 +5,10 @@
        :add-title="'新建'"
        :placeholder="'请输入产品名称'"
        :amount-view="false"
        :search-task-map="searchTaskMap"
        @addCommonClick="addBtnClick"
        @searchClick="searchClick"
        @delSelectClick="delSelectClick"
      />
    </div>
    <div class="list-view">
@@ -54,11 +56,7 @@
      </div>
      <!-- 列表形式 -->
      <div v-if="isIconIndex === '2'" class="product-list">
        <TableCommonView
          ref="tableListRef"
          :table-list="tableList"
          @selTableCol="selTableCol"
        >
        <TableCommonView ref="tableListRef" :table-list="tableList" @selTableCol="selTableCol">
          <template slot="tableButton">
            <el-table-column label="操作" width="90" align="center">
              <template slot-scope="scope">
@@ -114,15 +112,18 @@
      url: "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
      pageSizes: [15, 30],
      keyWord: "",
      categoryId: null
      categoryId: null,
      searchTaskMap: []
    }
  },
  created() {
    this.setTable()
    let query = this.$route.query
    if (query) {
      console.log("ssssss")
      this.categoryId = query.id ? Number(query.id) : null
      this.pagerOptions.currPage = 1
      this.searchTaskMap = query.id ? [{ categoryId: this.categoryId, title: query.categoryName }] : []
    }
    this.getData()
  },
@@ -272,7 +273,7 @@
      this.editConfig.visible = true
    },
    // 编辑
    editRow(row){
    editRow(row) {
      this.editConfig.autoEdit = true
      this.editConfig.title = "编辑"
      this.editConfig.infomation = { ...row }
@@ -290,6 +291,11 @@
        this.pagerOptions.pageSize = 15
      }
      this.getData()
    },
    // 删除产品类型
    delSelectClick() {
      this.categoryId = 0
      this.getData()
    }
  }
}