This commit is contained in:
cun-nan 2024-03-06 16:25:10 +08:00
parent 632ec70cca
commit 56b4579524
2 changed files with 21 additions and 7 deletions

View File

@ -134,6 +134,12 @@
v-if="scope.row.isonline == 0" v-if="scope.row.isonline == 0"
@click="ordai(scope.row)" @click="ordai(scope.row)"
>下线</el-button> >下线</el-button>
<el-button
size="mini"
type="text"
v-if="scope.row.isonline == 1"
@click="handleDelete1(scope.row)"
>删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -589,6 +595,14 @@ export default {
this.loading = false; this.loading = false;
}); });
}, },
handleDelete1(data){
delFavorable(data.id).then(res => {
if (res.code==200){
this.$modal.msgSuccess("删除成功");
this.getList();
}
})
},
// //
cancel() { cancel() {
this.open = false; this.open = false;
@ -681,9 +695,9 @@ export default {
}) })
}, },
ordai(row){ async ordai(row){
// //
getcardFavorable(row.id).then(res=>{ await getcardFavorable(row.id).then(res=>{
console.log(res) console.log(res)
if(res.code == 200){ if(res.code == 200){
this.form = res.data; this.form = res.data;
@ -691,7 +705,7 @@ export default {
} }
}) })
// //
updateFavorable(this.form).then(response => { await updateFavorable(this.form).then(response => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open = false; this.open = false;
this.getList(); this.getList();

View File

@ -97,12 +97,12 @@ public class CardFavorableController extends BaseController {
/** /**
* 删除数据 * 删除数据
* *
* @param idList 主键结合 * @param id 主键结合
* @return 删除结果 * @return 删除结果
*/ */
@DeleteMapping @DeleteMapping("/{id}")
public ResponseObject delete(@RequestParam("idList") List<Long> idList) { public ResponseObject delete(@PathVariable Integer id) {
return getSuccessResult(this.cardFavorableService.removeByIds(idList)); return getSuccessResult(this.cardFavorableService.removeById(id));
} }
/** /**