1.定义avue-crud <el-dialog :visible.sync="detailDialog" title="明细" top="100px" width="90%"> <avue-crud ref="detailTable" :data="detailData" :option="detailOption" :page.sync="detailPage" :over-hidden="true" @size-change="detailTableSizeChange" @current-change="detailTableCurrentChange"> <div slot="footer" class="dialog-footer"> <el-button @click="detailDialog = false">确 定</el-button> </div> </avue-crud></el-dialog> 2.属性配置 detailDialog控制显示 :data="det.... 有更新! avue.js 表格 程序人生
1.创建表格,添加搜索条件 <avue-crud ref="indexDistributionTable" :data="pageData" :option="option" :page.sync="page" @selection-change="selectionChange" @size-change="sizeChange" @current-change="currentChange" @search-change="searchChange" @search-reset="searchReset" > <template slot="search"> <el-form-item label="指标名称"> <el-input v-model="searchForm.indexName" placeholder="请输入指标名称" size="small" /> </el-form-item> </template> </avue-crud 表格的其他属性此前已经有对应的文章了(avue.js表格.... 有更新! avue.js表格添加搜索条件 程序人生
md中编写sql select * from test_table where 1=1 @if(!isEmpty(indexName)){ and index_name_ like #'%'+indexName+'%'# @} 在##符号中拼接%值%,最外层使用@if做判断,只在条件非空时执行此操作 有更新! beetlsql使用like条件做查询 程序人生
1.标签设置 添加标签template,slot-scope设置为scope,slot设置为menu 内部就可以添加按钮和自己想要的属性了 <avue-crud ref="thresholdSetTable" :data="pageData" :option="option" :page.sync="page" @selection-change="selectionChange" @size-change="sizeChange" @current-change="currentChange" @search-change="searchChange" @search-reset="searchReset" > <template slot="search"> <el-form-item label="指标名称"> <el-input v-model="searchForm.indexName" placeholder="请输入指标名称" size="small" /> </el-form-item> </templa.... 有更新! avue.js表格添加行内操作按钮 程序人生
1.beetlsql案例 delete from a where a.org_id_ = #orgId# and index_id_ in ( @for(id in indexIds){ #id# #text(idLP.last?"":",")# @} ) sql中orgId为一个普通变量,indexIds为一个数据集合 @for(id in indexIds){@}遍历了集合中的每一个元素 #id#使用这些元素,#text中做了一个正则表达式的判断,如果当前元素是最后一个元素,则返回空字符串,不是的花就返回逗号,用于进行字符串拼接 2.其他操作 判断集合时候为空使用 isEmpty(indexIds) isEmpty除了判断集合为空,还可以用来判断字符串时候为空,为空则返回true,否则返回false 有更新! beetlsql 遍历集合做in查询 程序人生
1.ftp和ftps ftp文件传输协议是应用层协议,用于传输文件信息,linux上需要安装vsftpd才能使用(明文传输) ftps为FTP协议和数据通道添加了SSL功能,可以对传输信息加密 2.ftp传输文件 引入maven依赖 <!-- https://mvnrepository.com/artifact/commons-net/commons-net --> <dependency> <groupId>commons-net</groupId> <artifactId>commons-net</artifactId> <version>3.6</version> </dependency> 代码,此处将传入的文件参数改为MultipartFile类型,方便前端传递文件数据,再转为File对象(建立临时文件,上传完成会删除),如果需要可以自己改为文件路径 package com.wyl.ppa.utils; import java.io.*; import java.ut.... 有更新! Java使用FTP、FTPS上传文件 程序人生