qx
qx
5 天以前 6636b48aab02c10b261562abd5dcb6f2c1566a86
src/views/hosp/commonAdvice/index.vue
@@ -18,6 +18,9 @@
      <el-col :span="1.5">
        <el-button type="primary" size="mini" @click="proposalChange">新增</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="primary" size="mini" @click="handleDelete">批量删除</el-button>
      </el-col>
    </el-row>
@@ -62,7 +65,8 @@
  updateAdvice,
  addAdvice,
  getAdvice,
  delAdvice
  delAdvice,
  delCyremove
} from "@/api/advice/advice";
import {
  addCyTjAdvice,
@@ -141,6 +145,7 @@
      this.reset();
    },
    proposalChange() {
        this.reset();
      this.open = true;
    },
    // 表单重置
@@ -202,7 +207,6 @@
      const id = row.id || this.ids;
      this.kjbq = [];
      getAdvice(id).then((response) => {
        console.log(response, 55566);
        this.form = response.data;
        this.open = true;
        // this.form.deptId = this.queryParams.deptId;
@@ -210,11 +214,12 @@
      });
    },
    handleDelete(row) {
      const ids = row.id || this.ids; // 获取主键值,如果row中没有主键值,则使用this.ids
      let idss = this.ids + ''
      const ids = row.id || idss; // 获取主键值,如果row中没有主键值,则使用this.ids
      this.$modal
        .confirm(`是否确认删除"${ids}"的数据项?`)
        .then(() => {
          return delAdvice(ids); // 调用删除接口,传入主键值
          return delCyremove(ids); // 调用删除接口,传入主键值
        })
        .then(() => {
          this.getList(); // 删除成功后刷新列表