首页 > 其他分享 >4.30

4.30

时间:2024-06-05 22:33:00浏览次数:7  
标签:name value 地铁线 common import 4.30 public

地铁代码

<template>   <view class="container">     <view class="example">       <uni-forms ref="form" :model="form" labelWidth="80px">   <uni-forms-item label="线路号" name="lineNo" required >     <uni-data-select v-model="form.lineNo" :localdata="routeOptions"></uni-data-select>   </uni-forms-item>   <uni-forms-item label="全部站点" name="stations"  >   <uni-easyinput type="textarea" v-model="form.stations" placeholder="请输入全部站点" />   </uni-forms-item>         </uni-forms>       <view class="button-group">         <button type="default" style="padding:0 3em;font-size:14px"  class="button" @click="reset">重置</button>         <button type="primary" style="padding:0 3em;font-size:14px"  class="button" @click="submit">提交</button>       </view>     </view>   </view> </template>     <script>     import { addLines,getLines,listLines } from "@/api/system/lines";   export default { components: { }, data() {   return {     //字典类型筛选options       routeOptions:[],     form: {},     rules: {             lineNo: {                 rules: [{ required: true, errorMessage: "线路号不能为空" }]             },     }   } }, onLoad(option) {   //字典类型查询       this.$dataDicts.getDicts("route").then(response => {         this.routeOptions = this.$myUtils.getDictOption(response.data,'dictValue','dictLabel');       }); }, onReady() {   this.$refs.form.setRules(this.rules) }, methods: {   /* 提交*/   submit() {     console.log(this.form)     this.$refs.form.validate().then(res => {       addLines(this.form).then(response => {         this.$modal.msgSuccess("新增成功")         setTimeout(() => {           // 返回到上一级父页面           this.$tab.navigateBack();         },500)       })     })   },   /* 表单重置*/   reset(){     this.form = {        id: undefined,        lineNo: undefined,        stations: undefined     };   } } } </script>   <style lang="scss">   page {        }     .example {     padding: 15px;        }   .button-group {     margin-top: 15px;     display: flex;     justify-content: space-around;   } </style>

  

package com.flx.common.entity.system.system;   import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.flx.common.annotation.Excel; import com.flx.common.entity.common.BaseEntity;   /**  * 地铁线对象 a_lines  *  * @author cxk  * @date 2024-04-14  */ public class ALines extends BaseEntity {     private static final long serialVersionUID = 1L;       /** 主键id */     private Long id;       /** 线路号 */     @Excel(name = "线路号")     private String lineNo;       /** 全部站点 */     @Excel(name = "全部站点")     private String stations;       public void setId(Long id)     {         this.id = id;     }       public Long getId()     {         return id;     }     public void setLineNo(String lineNo)     {         this.lineNo = lineNo;     }       public String getLineNo()     {         return lineNo;     }     public void setStations(String stations)     {         this.stations = stations;     }       public String getStations()     {         return stations;     }       @Override     public String toString() {         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)             .append("id", getId())             .append("lineNo", getLineNo())             .append("stations", getStations())             .toString();     } }

  

 

package com.flx.system.project.system.controller;   import java.util.List; import javax.servlet.http.HttpServletResponse; import javax.annotation.Resource; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import com.flx.common.annotation.Log; import com.flx.common.enums.BusinessType; import com.flx.common.entity.system.ALines; import com.flx.system.service.IALinesService; import com.flx.common.response.BaseController; import com.flx.common.entity.common.domain.AjaxResult; import com.flx.common.utils.poi.ExcelUtil; import com.flx.common.entity.common.domain.page.TableDataInfo; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; import org.springframework.web.bind.annotation.*;   /**  * 地铁线Controller  *  * @author cxk  * @date 2024-04-14  */ @Api(tags={"地铁线管理"}) @RestController @RequestMapping("/system-manage-service/system/lines") public class ALinesController extends BaseController {     @Resource     private IALinesService aLinesService;       /**      * 查询地铁线列表      */     @ApiOperation(value="查询地铁线列表")     @ApiImplicitParams({             @ApiImplicitParam(name = "aLines", value = "地铁线实体", dataType = "ALines", required = false),             @ApiImplicitParam(name = "pageNum", value = "页码", dataType = "Integer", defaultValue = "1", required = false),             @ApiImplicitParam(name = "pageSize", value = "每页大小", dataType = "Integer", defaultValue = "10", required = false)     })     @GetMapping("/list")     public TableDataInfo list(ALines aLines)     {         startPage();         List<ALines> list = aLinesService.selectALinesList(aLines);         return getDataTable(list);     }       /**      * 导出地铁线列表      */     @ApiOperation(value="导出地铁线列表")     @ApiImplicitParam(name = "aLines", value = "地铁线实体", dataType = "ALines", required = false)     @Log(title = "地铁线", businessType = BusinessType.EXPORT)     @PostMapping("/export")     public void export(HttpServletResponse response, ALines aLines)     {         List<ALines> list = aLinesService.selectALinesList(aLines);         ExcelUtil<ALines> util = new ExcelUtil<ALines>(ALines.class);         util.exportExcel(response, list, "地铁线数据");     }       /**      * 获取地铁线详细信息      */     @ApiOperation(value="获取地铁线详细信息")     @ApiImplicitParams({             @ApiImplicitParam(name = "id", value = "地铁线Id", dataType = "Long", paramType = "query", required = true)     })     @GetMapping(value = "/getInfo")     public AjaxResult getInfo(@RequestParam Long id)     {         return success(aLinesService.selectALinesById(id));     }       /**      * 新增地铁线      */     @ApiOperation(value="新增地铁线")     @ApiImplicitParam(name = "aLines", value = "地铁线实体", dataType = "ALines", required = true)     @Log(title = "地铁线", businessType = BusinessType.INSERT)     @PostMapping("/add")     public AjaxResult add(@RequestBody ALines aLines)     {         return toAjax(aLinesService.insertALines(aLines));     }       /**      * 修改地铁线      */     @ApiOperation(value="修改地铁线")     @ApiImplicitParam(name = "aLines", value = "地铁线实体", dataType = "ALines", required = true)     @Log(title = "地铁线", businessType = BusinessType.UPDATE)     @PostMapping("/edit")     public AjaxResult edit(@RequestBody ALines aLines)     {         return toAjax(aLinesService.updateALines(aLines));     }       /**      * 删除地铁线      */     @ApiOperation(value="删除地铁线")     @ApiImplicitParam(name = "ids", value = "地铁线数组", dataType = "Long[]", required = true)     @Log(title = "地铁线", businessType = BusinessType.DELETE)     @PostMapping("/remove")     public AjaxResult remove(@RequestParam Long[] ids)     {         return toAjax(aLinesService.deleteALinesByIds(ids));     }       /**      * uniapp端删除地铁线      */     @ApiOperation(value="uniapp端删除地铁线")     @ApiImplicitParam(name = "ids", value = "地铁线id(多个以逗号分隔)", dataType = "String", required = true)     @Log(title = "地铁线", businessType = BusinessType.DELETE)     @PostMapping("/delete")     public AjaxResult delete(@RequestBody Map<String,String> map)     {         if(MapUtil.checkContains(map,"ids")){             String[] ids = map.get("ids").split(",");             Long[] idArr = new Long[ids.length];             for (int i = 0; i < ids.length; i++) {                     idArr[i] = Long.parseLong(ids[i]);             }             return toAjax(aLinesService.deleteALinesByIds(idArr));         }         return AjaxResult.error("请先选择地铁线!");     } }

标签:name,value,地铁线,common,import,4.30,public
From: https://www.cnblogs.com/Christmas77/p/18234053

相关文章

  • 4.30极限测试代码
    以下代码为部分代码:index.jsp<!DOCTYPEhtml><%@pagelanguage="java"contentType="text/html;charset=UTF-8"pageEncoding="UTF-8"%><%@pageimport="java.sql.Connection"%><%@pageimport="java.s......
  • 腾讯公益赛冲刺团队博客6(2024.4.30)
    未完成sos后端、在线医生、聊天室进行中百度地图今天通过申请,开始进行sos后端已完成sos前端、帮扶全部、登录注册和主页  ......
  • 4.30 图推六提示
    笔画数提示:出头、T点、分离、特殊字符(田、日、奥迪)吹捏(图形简单)、数奇点(图形复杂)直角数提示:修正图形(电话卡)垂直关系(直角垂线矩形)数量加减提示:外部轮廓非常规整(五边形、六边形)外部线条和内部空间、线条、交点的数量关系(大小)图提示:提示点是圆相切、相交、相离和......
  • 微服务学习总结4.30
    什么是微服务:分布式结构的一种,可涵盖多种语言不同版本的不同模块,提高了系统的可维护性,可伸缩性,可测试性为什么要用微服务:能够把不同模块分离开,提高效率减少压力。而且,微服务的使用可以方便多模块集成,可以实现一些跨版本模块的共同使用。比如如果我使用一个jdk8......
  • 无root权限,解决conda环境的报错ImportError: /lib/x86_64-linux-gnu/libstdc++.so.6:
    网上的方法都需要sudo或者root权限,但是服务器多是实验室公用,没有ruuto权限,因此更好的办法是通过conda只改自己虚拟环境的环境变量。问题原因问题的根本原因是Linux系统没有GLIBCXX_3.4.30动态链接库。这个库和gcc版本有关。因此要么你更换版本,要么找一个别的so链接到这个连接......
  • 4.30学习总结之初见tkinter
     Tkinter是Python的标准GUI库。Python使用Tkinter可以快速的创建GUI应用程序。由于Tkinter是内置到python的安装包中、只要安装好Python之后就能importTkinter库,对简单图形界面的实现十分简单。在引入"importtkinter"后即可使用,以下两行即可运行出窗口,l......
  • 4.30学习总结
    Android学习——控件EditText 1.主要属性......
  • 建民打卡日记4.30
    一、问题描述大家应该都会玩“锤子剪刀布”的游戏:两人同时给出手势,胜负规则如图所示:现要求你编写一个稳赢不输的程序,根据对方的出招,给出对应的赢招。但是!为了不让对方输得太惨,你需要每隔K次就让一个平局。二、流程设计1.录入平局间隔次数,定义计数器;2.End结束游戏,break;3.若......
  • 上周热点回顾(4.24-4.30)
    热点随笔:· 服务器出现了一个新软件,一帮大佬吵起来了! (轩辕之风)· 【故障公告】被放出的Bing爬虫,又被爬宕机的园子 (博客园团队)· [MAUI]模仿网易云音乐黑胶唱片的交互实现 (林晓lx)· VueHub:我用ChatGPT开发的第一个项目,送给所有Vue爱好者 (DOM哥)· .NETWeb......
  • 2023.4.30——软件工程日报
    所花时间(包括上课):0h代码量(行):0行博客量(篇):1篇今天,数学建模比赛中。。。我了解到的知识点:数学建模的相关知识......