| | |
| | | <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> |
| | | |
| | |
| | | updateAdvice, |
| | | addAdvice, |
| | | getAdvice, |
| | | delAdvice |
| | | delAdvice, |
| | | delCyremove |
| | | } from "@/api/advice/advice"; |
| | | import { |
| | | addCyTjAdvice, |
| | |
| | | this.reset(); |
| | | }, |
| | | proposalChange() { |
| | | this.reset(); |
| | | this.open = true; |
| | | }, |
| | | // 表单重置 |
| | |
| | | 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; |
| | |
| | | }); |
| | | }, |
| | | 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(); // 删除成功后刷新列表 |