当前位置: 首页 > news >正文

前端vue 列表中回显并下拉选择修改标签

1,vue数据列表中进行回显状态并可以在下拉框中选择修改,效果如下

2,vue 页面关键代码

 <el-table-column label="审核"  align="center" class-name="small-padding fixed-width" prop="status" ><template slot-scope="scope"><el-select v-model="scope.row.status" @change="updateStatus(scope.row)"><el-option v-for="option in options4"  :key="option.value" :value="option.value"  :label="option.text">{{ option.text }}</el-option></el-select></template></el-table-column>

 3,js代码

updateStatus(data){updateStatus({ id: data.id,status:data.status }).then((response) => {this.$modal.msgSuccess("审核成功");this.getList();});

4,后端代码

   @GetMapping(value = "/updateStatus")public AjaxResult updateStatus(String id,Integer status) {try {PetCircles info = petCirclesService.selectPetCirclesById(id);info.setStatus(status);petCirclesService.updatePetCircles(info);} catch (Exception e) {return AjaxResult.error("操作失败");}return AjaxResult.success();}

以上仅供参考

http://www.lryc.cn/news/484767.html

相关文章:

  • hbase未来的发展趋势
  • Rust 语言学习笔记(二)
  • 【postman】怎么通过curl看请求报什么错
  • Python 编程入门指南(一)
  • macOS 设置固定IP
  • redis实现消息队列的几种方式
  • debian 系统更新升级
  • STM32学习笔记-----UART的概念
  • Pytest-Bdd-Playwright 系列教程(9):datatable 参数的使用
  • 【408】SDN重点笔记
  • 云运维基础
  • 基于微信小程序的平安驾校预约平台的设计与实现(源码+LW++远程调试+代码讲解等)
  • Rust开发一个命令行工具(一,简单版持续更新)
  • 实战:深入探讨 MySQL 和 SQL Server 全文索引的使用及其弊端
  • 情景2 虚拟化世界 自己答案的理解
  • 【国产操作系统对Qt支持有哪些?】
  • 深度学习--正则化
  • PHP反序列化_1
  • 深度学习在图像识别中的应用
  • SQL面试题——奔驰SQL面试题 车辆在不同驾驶模式下的时间
  • Leecode刷题C语言之统计好节点的数目
  • webpack5 + vue3 从零配置项目
  • Queuing 表(buffer表)的优化实践 | OceanBase 性能优化实践
  • ./mysqld: error while loading shared libraries: libaio.so.1: cannot open sha
  • Qt主线程把数据发给子线程,主线程会阻塞吗
  • 前后端、网关、协议方面补充
  • 如何在Mac上切换到JDK 17开发环境
  • 深入探索 TypeScript:从基础到高级特性
  • Leetcode:118. 杨辉三角——Java数学法求解
  • SHELL脚本(Linux)