| | |
| | | <span class="line">|</span> |
| | | <span @click="handleStop(scope.row)">停用</span> |
| | | <span class="line">|</span> |
| | | <span @click="handleDelete(scope.row)">删除</span> |
| | | <span @click="handleDelete([scope.row.id])">删除</span> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | all: false, |
| | | unsame: false, |
| | | myIdx: 0, |
| | | preMyIdx: 0, |
| | | options: [ |
| | | { |
| | | value: 0, |
| | |
| | | }, |
| | | methods: { |
| | | selectChange(list) { |
| | | console.log(list); |
| | | console.log(this.tempList); |
| | | if (this.tempList.length !== 0) { |
| | | if (list === 3) { |
| | | this.preMyIdx = list; |
| | | this.handleDelete(this.tempList); |
| | | } |
| | | } else { |
| | | this.myIdx = this.preMyIdx; |
| | | this.$message({ |
| | | type: 'warning', |
| | | message: '您还没选中任何数据', |
| | | }) |
| | | } |
| | | }, |
| | | tableChange(list) { |
| | | this.tempList = list; |
| | | this.tempList = []; |
| | | list.forEach(item => { |
| | | this.tempList.push(item.id); |
| | | }) |
| | | if (list.length === this.tableData.length) { |
| | | this.all = true; |
| | | } else { |
| | |
| | | return helper(createTime); |
| | | }, |
| | | selectAll() { |
| | | |
| | | this.$refs.multipleTable.toggleAllSelection(); |
| | | }, |
| | | disSame(list) { |
| | | // console.log(this.$refs.multipleTable); |
| | | // const row = this.$refs.table.data |
| | | list.forEach(row => { |
| | | this.$refs.multipleTable.toggleRowSelection(row) |
| | | }) |
| | | }, |
| | | handleDelete({ id }) { |
| | | handleDelete(id) { |
| | | const that = this; |
| | | let arr = []; |
| | | arr.push(id); |
| | | // let arr = []; |
| | | // arr.push(id); |
| | | this.$confirm('确认删除?') |
| | | .then(_ => { |
| | | that.$axios({ |
| | | method: 'post', |
| | | url: 'sccg/role/delete?ids=' + arr, |
| | | url: 'sccg/role/delete?ids=' + id, |
| | | }) |
| | | .then(res => { |
| | | this.myIdx = 0; |
| | | this.preMyIdx = 0; |
| | | console.log(res); |
| | | this.$message({ |
| | | type: 'success', |
| | |
| | | }, |
| | | changeDialog(val) { |
| | | this.dialogUpdate = val.dialogUpdate; |
| | | console.log(val); |
| | | this.$message({ |
| | | type:'success', |
| | | message:'更改成功', |
| | | }) |
| | | }, |
| | | handleClose(done) { |
| | | this.$confirm('确认关闭?') |