| | |
| | | @selProductClick="selProductClick" |
| | | > |
| | | <template slot="tableButton"> |
| | | <el-table-column label="操作" width="90" fixed="right" align="center"> |
| | | <el-table-column label="操作" width="90" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-button v-if="scope.row.isEdit" @click.stop="delClick(scope)" type="text" size="small" |
| | | >删除</el-button |
| | | > |
| | | <span v-if="scope.row.isEdit" @click.stop="delClick(scope)" class="yes-cursor"> |
| | | <span style="color: #2a78fb">删除</span> |
| | | </span> |
| | | </template> |
| | | </el-table-column> |
| | | </template> |
| | |
| | | this.isRowClick = false |
| | | this.currentRowId = 0 |
| | | this.countId++ |
| | | this.tableData.push({ |
| | | this.tableData.unshift({ |
| | | countId: this.countId, |
| | | areaId: 0, |
| | | areaName: "", |
| | |
| | | }).then((res) => { |
| | | console.log(res) |
| | | if (res.code === 200) { |
| | | this.getData() |
| | | let tipStr = this.currentRowId === 0 ? "添加成功" : "修改成功" |
| | | this.$message.success(tipStr) |
| | | this.getData() |
| | | } |
| | | }) |
| | | } |
| | |
| | | item.isEdit = true |
| | | }) |
| | | } else { |
| | | this.tableData.splice(this.tableData.length - 1, 1) |
| | | this.tableData.splice(0, 1) |
| | | } |
| | | this.addTitle = "新建" |
| | | this.showDiscard = false |