zhongrj
2024-02-28 cf29b0e7df3af2ce2c1fcd0b515132bdc038bd37
src/views/userHouse/components/categoryList.vue
File was renamed from src/views/userHouse/lable/categoryList.vue
@@ -45,7 +45,7 @@
          menuWidth: 240,
          lazy: true,
          rowKey: 'id',
          defaultExpandAll: true,
          // defaultExpandAll: true,
          column: [{
            label: '名称',
            prop: 'name'
@@ -120,14 +120,14 @@
      },
      rowDel(row, index, done) {
        console.log("*************")
        console.log("*************" + JSON.stringify(row))
        this.$confirm("确定将选择数据删除?", {
            confirmButtonText: "确定",
            cancelButtonText: "取消",
            type: "warning"
          })
          .then(() => {
            return remove(row.id)
            return remove(row.ids)
          })
          .then(() => {
            this.$message({
@@ -139,7 +139,7 @@
      },
      rowSave(row, done) {
        // row.parentId = this.parentId
        row.parentNo = row.parentId
        row.categoryName = row.name
        submit(row).then(() => {
          this.initFlag = false
@@ -158,6 +158,22 @@
      rowUpdate(row, index, done) {
        const column = this.findObject(this.option.column, "parentId")
        column.value = row.id
        row.parentNo = row.parentId
        row.id = row.ids
        update(row).then(
          () => {
            this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!",
            })
            done()
          },
          (error) => {
            window.console.log(error)
            loading()
          }
        )
        done(row)
      },
@@ -186,4 +202,4 @@
<style></style>
<style></style>