mirror of
https://github.com/jeecgboot/JeecgBoot.git
synced 2026-01-01 01:25:28 +08:00
Jeecg-Boot 2.1.4 版本发布 | 重构较大,较多新功能
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
server:
|
||||
port: 8080
|
||||
tomcat:
|
||||
tomcat:
|
||||
max-swallow-size: -1
|
||||
servlet:
|
||||
context-path: /jeecg-boot
|
||||
@ -8,16 +8,16 @@ server:
|
||||
enabled: true
|
||||
min-response-size: 1024
|
||||
mime-types: application/javascript,application/json,application/xml,text/html,text/xml,text/plain,text/css,image/*
|
||||
|
||||
|
||||
management:
|
||||
endpoints:
|
||||
web:
|
||||
exposure:
|
||||
include: metrics,httptrace
|
||||
|
||||
|
||||
spring:
|
||||
servlet:
|
||||
multipart:
|
||||
multipart:
|
||||
max-file-size: 10MB
|
||||
max-request-size: 10MB
|
||||
mail:
|
||||
@ -96,7 +96,7 @@ spring:
|
||||
connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
|
||||
datasource:
|
||||
master:
|
||||
url: jdbc:mysql://127.0.0.1:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false
|
||||
url: jdbc:mysql://127.0.0.1:3306/jeecg-boot-?characterEncoding=UTF-8&useUnicode=true&useSSL=false
|
||||
username: root
|
||||
password: root
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
@ -130,16 +130,20 @@ mybatis-plus:
|
||||
id-type: 4
|
||||
# 默认数据库表下划线命名
|
||||
table-underline: true
|
||||
#configuration:
|
||||
configuration:
|
||||
# 这个配置会将执行的sql打印出来,在开发或测试的时候可以用
|
||||
#log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
# 返回类型为Map,显示null对应的字段
|
||||
call-setters-on-nulls: true
|
||||
#jeecg专用配置
|
||||
jeecg :
|
||||
# 本地:local\Minio:minio\阿里云:alioss
|
||||
uploadType: local
|
||||
path :
|
||||
#文件上传根目录 设置
|
||||
upload: D://upFiles
|
||||
upload: D://opt//upFiles
|
||||
#webapp文件路径
|
||||
webapp: D://webapp
|
||||
webapp: D://opt//webapp
|
||||
#短信秘钥
|
||||
sms:
|
||||
accessKeyId: ??
|
||||
@ -155,18 +159,24 @@ jeecg :
|
||||
staticDomain: ??
|
||||
# ElasticSearch 设置
|
||||
elasticsearch:
|
||||
cluster-name: jeecg-ES
|
||||
cluster-name: docker-cluster
|
||||
cluster-nodes: 127.0.0.1:9200
|
||||
# 表单设计器配置
|
||||
desform:
|
||||
# 主题颜色(仅支持 16进制颜色代码)
|
||||
theme-color: "#1890ff"
|
||||
# 在线预览文件服务器地址配置
|
||||
file-view-domain: http://127.0.0.1:8012
|
||||
file-view-domain: http://fileview.jeecg.com
|
||||
# minio文件上传
|
||||
minio:
|
||||
minio_url: http://minio.jeecg.com
|
||||
minio_name: ??
|
||||
minio_pass: ??
|
||||
bucketName: ??
|
||||
#Mybatis输出sql日志
|
||||
logging:
|
||||
level:
|
||||
org.jeecg.modules.system.mapper : debug
|
||||
#cas单点登录
|
||||
cas:
|
||||
prefixUrl: http://cas.example.org:8443/cas
|
||||
prefixUrl: http://cas.example.org:8443/cas
|
||||
|
||||
@ -130,8 +130,15 @@ mybatis-plus:
|
||||
id-type: 4
|
||||
# 默认数据库表下划线命名
|
||||
table-underline: true
|
||||
configuration:
|
||||
# 这个配置会将执行的sql打印出来,在开发或测试的时候可以用
|
||||
#log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
# 返回类型为Map,显示null对应的字段
|
||||
call-setters-on-nulls: true
|
||||
#jeecg专用配置
|
||||
jeecg :
|
||||
# 本地:local\Minio:minio\阿里云:alioss
|
||||
uploadType: local
|
||||
path :
|
||||
#文件上传根目录 设置
|
||||
upload: /opt/jeecg-boot/upload
|
||||
@ -159,7 +166,13 @@ jeecg :
|
||||
# 主题颜色(仅支持 16进制颜色代码)
|
||||
theme-color: "#1890ff"
|
||||
# 在线预览文件服务器地址配置
|
||||
file-view-domain: 127.0.0.1:8012
|
||||
file-view-domain: http://fileview.jeecg.com
|
||||
# minio文件上传
|
||||
minio:
|
||||
minio_url: http://minio.jeecg.com
|
||||
minio_name: ??
|
||||
minio_pass: ??
|
||||
bucketName: ??
|
||||
#cas单点登录
|
||||
cas:
|
||||
prefixUrl: http://cas.example.org:8443/cas
|
||||
|
||||
@ -133,13 +133,17 @@ mybatis-plus:
|
||||
configuration:
|
||||
# 这个配置会将执行的sql打印出来,在开发或测试的时候可以用
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
# 返回类型为Map,显示null对应的字段
|
||||
call-setters-on-nulls: true
|
||||
#jeecg专用配置
|
||||
jeecg :
|
||||
# 本地:local\Minio:minio\阿里云:alioss
|
||||
uploadType: local
|
||||
path :
|
||||
#文件上传根目录 设置
|
||||
upload: D://upFiles
|
||||
upload: D://opt//upFiles
|
||||
#webapp文件路径
|
||||
webapp: D://webapp
|
||||
webapp: D://opt//webapp
|
||||
#短信秘钥
|
||||
sms:
|
||||
accessKeyId: LTAIpW4gUG7xYDNI
|
||||
@ -152,7 +156,7 @@ jeecg :
|
||||
accessKey: WegDpuKzOuPK6D3N
|
||||
secretKey: ??
|
||||
bucketName: jeecgos
|
||||
staticDomain: ??
|
||||
staticDomain: https://static.jeecg.com
|
||||
# ElasticSearch 设置
|
||||
elasticsearch:
|
||||
cluster-name: jeecg-ES
|
||||
@ -163,6 +167,12 @@ jeecg :
|
||||
theme-color: "#1890ff"
|
||||
# 在线预览文件服务器地址配置
|
||||
file-view-domain: 127.0.0.1:8012
|
||||
# minio文件上传
|
||||
minio:
|
||||
minio_url: http://minio.jeecg.com
|
||||
minio_name: ??
|
||||
minio_pass: ??
|
||||
bucketName: ??
|
||||
#cas单点登录
|
||||
cas:
|
||||
prefixUrl: http://cas.example.org:8443/cas
|
||||
@ -9,6 +9,6 @@ ${AnsiColor.BRIGHT_BLUE}
|
||||
|
||||
|
||||
${AnsiColor.BRIGHT_GREEN}
|
||||
Jeecg Boot Version: 2.1.3
|
||||
Jeecg Boot Version: 2.1.4
|
||||
Spring Boot Version: ${spring-boot.version}${spring-boot.formatted-version}
|
||||
${AnsiColor.BLACK}
|
||||
|
||||
@ -32,6 +32,9 @@ import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
|
||||
/**
|
||||
* @Description: ${tableVo.ftlDescription}
|
||||
@ -39,6 +42,7 @@ import com.alibaba.fastjson.JSON;
|
||||
* @Date: ${.now?string["yyyy-MM-dd"]}
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="${tableVo.ftlDescription}")
|
||||
@RestController
|
||||
@RequestMapping("/${entityPackage}/${entityName?uncap_first}")
|
||||
@Slf4j
|
||||
@ -55,6 +59,8 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "${tableVo.ftlDescription}-分页列表查询")
|
||||
@ApiOperation(value="${tableVo.ftlDescription}-分页列表查询", notes="${tableVo.ftlDescription}-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<?> queryPageList(${entityName} ${entityName?uncap_first},
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@ -72,6 +78,8 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
|
||||
* @param ${entityName?uncap_first}
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "${tableVo.ftlDescription}-添加")
|
||||
@ApiOperation(value="${tableVo.ftlDescription}-添加", notes="${tableVo.ftlDescription}-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@RequestBody ${entityName} ${entityName?uncap_first}) {
|
||||
${entityName?uncap_first}Service.save(${entityName?uncap_first});
|
||||
@ -84,6 +92,8 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
|
||||
* @param ${entityName?uncap_first}
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "${tableVo.ftlDescription}-编辑")
|
||||
@ApiOperation(value="${tableVo.ftlDescription}-编辑", notes="${tableVo.ftlDescription}-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@RequestBody ${entityName} ${entityName?uncap_first}) {
|
||||
${entityName?uncap_first}Service.updateById(${entityName?uncap_first});
|
||||
@ -96,6 +106,8 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "${tableVo.ftlDescription}-通过id删除")
|
||||
@ApiOperation(value="${tableVo.ftlDescription}-通过id删除", notes="${tableVo.ftlDescription}-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
${entityName?uncap_first}Service.removeById(id);
|
||||
@ -108,6 +120,8 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "${tableVo.ftlDescription}-批量删除")
|
||||
@ApiOperation(value="${tableVo.ftlDescription}-批量删除", notes="${tableVo.ftlDescription}-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.${entityName?uncap_first}Service.removeByIds(Arrays.asList(ids.split(",")));
|
||||
@ -120,6 +134,8 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "${tableVo.ftlDescription}-通过id查询")
|
||||
@ApiOperation(value="${tableVo.ftlDescription}-通过id查询", notes="${tableVo.ftlDescription}-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
${entityName} ${entityName?uncap_first} = ${entityName?uncap_first}Service.getById(id);
|
||||
@ -12,6 +12,10 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description: ${tableVo.ftlDescription}
|
||||
@ -21,27 +25,46 @@ import org.jeecg.common.aspect.annotation.Dict;
|
||||
*/
|
||||
@Data
|
||||
@TableName("${tableName}")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="${tableName}对象", description="${tableVo.ftlDescription}")
|
||||
public class ${entityName} implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
<#list originalColumns as po>
|
||||
<#-- 生成字典Code -->
|
||||
<#assign list_field_dictCode="">
|
||||
<#if po.classType='sel_user'>
|
||||
<#assign list_field_dictCode=', dictTable = "sys_user", dicText = "realname", dicCode = "username"'>
|
||||
<#elseif po.classType='sel_depart'>
|
||||
<#assign list_field_dictCode=', dictTable = "sys_depart", dicText = "depart_name", dicCode = "id"'>
|
||||
<#elseif po.classType=='list' || po.classType=='list_multi' || po.classType=='sel_search' || po.classType=='radio' || po.classType=='checkbox'>
|
||||
<#if po.dictTable?default("")?trim?length gt 1>
|
||||
<#assign list_field_dictCode=', dictTable = "${po.dictTable}", dicText = "${po.dictText}", dicCode = "${po.dictField}"'>
|
||||
<#elseif po.dictField?default("")?trim?length gt 1>
|
||||
<#assign list_field_dictCode=', dicCode = "${po.dictField}"'>
|
||||
</#if>
|
||||
</#if>
|
||||
/**${po.filedComment}*/
|
||||
<#if po.fieldName == primaryKeyField>
|
||||
@TableId(type = IdType.ID_WORKER_STR)
|
||||
<#else>
|
||||
<#if po.fieldDbType =='Date'>
|
||||
<#if po.classType=='date'>
|
||||
@Excel(name = "${po.filedComment}", width = 15, format = "yyyy-MM-dd")
|
||||
@Excel(name = "${po.filedComment}", width = 15, format = "yyyy-MM-dd"${list_field_dictCode})
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
<#else>
|
||||
@Excel(name = "${po.filedComment}", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "${po.filedComment}", width = 20, format = "yyyy-MM-dd HH:mm:ss"${list_field_dictCode})
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
</#if>
|
||||
<#else>
|
||||
@Excel(name = "${po.filedComment}", width = 15)
|
||||
@Excel(name = "${po.filedComment}", width = 15${list_field_dictCode})
|
||||
</#if>
|
||||
<#if list_field_dictCode?length gt 1>
|
||||
@Dict(${list_field_dictCode?substring(2)})
|
||||
</#if>
|
||||
<#-- <#if po.classType!='popup'>
|
||||
<#if po.dictTable?default("")?trim?length gt 1>
|
||||
@Dict(dicCode="${po.dictField}",dicText="${po.dictText}",dictTable="${po.dictTable}")
|
||||
@ -79,6 +102,7 @@ public class ${entityName} implements Serializable {
|
||||
return "";
|
||||
}
|
||||
<#else>
|
||||
@ApiModelProperty(value = "${po.filedComment}")
|
||||
private ${po.fieldType} ${po.fieldName};
|
||||
</#if>
|
||||
</#list>
|
||||
@ -18,7 +18,7 @@
|
||||
<template v-if="toggleSearchStatus">
|
||||
</#if>
|
||||
<#if po.queryMode=='single'>
|
||||
<#if query_field_no gt 1> </#if><a-col :md="6" :sm="8">
|
||||
<#if query_field_no gt 1> </#if><a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<#if query_field_no gt 1> </#if><a-form-item label="${po.filedComment}">
|
||||
<#if po.classType=='date'>
|
||||
<#assign query_field_date=true>
|
||||
@ -42,7 +42,7 @@
|
||||
<#if query_field_no gt 1> </#if></a-form-item>
|
||||
<#if query_field_no gt 1> </#if></a-col>
|
||||
<#else>
|
||||
<#if query_field_no gt 1> </#if><a-col :md="12" :sm="16">
|
||||
<#if query_field_no gt 1> </#if><a-col :xl="10" :lg="11" :md="12" :sm="24">
|
||||
<#if query_field_no gt 1> </#if><a-form-item label="${po.filedComment}">
|
||||
<#if po.classType=='date'>
|
||||
<#assign query_field_date=true>
|
||||
@ -77,7 +77,7 @@
|
||||
</template>
|
||||
</#if>
|
||||
<#if query_flag>
|
||||
<a-col :md="6" :sm="8" >
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
||||
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
|
||||
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
|
||||
@ -186,7 +186,7 @@
|
||||
import { loadCategoryData } from '@/api/api'
|
||||
</#if>
|
||||
<#if list_need_dict>
|
||||
import {initDictOptions, filterMultiDictText} from '@/components/dict/JDictSelectUtil'
|
||||
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
|
||||
</#if>
|
||||
|
||||
export default {
|
||||
@ -239,34 +239,15 @@
|
||||
<#elseif po.classType=='image'>
|
||||
dataIndex: '${po.fieldName}',
|
||||
scopedSlots: {customRender: 'imgSlot'}
|
||||
<#elseif po.classType=='sel_search' || po.classType=='list_multi' || po.classType=='list' || po.classType=='radio' || po.classType=='checkbox' || po.classType=='sel_depart'>
|
||||
dataIndex: '${po.fieldName}',
|
||||
customRender:(text)=>{
|
||||
if(!text){
|
||||
return ''
|
||||
}else{
|
||||
return filterMultiDictText(this.dictOptions['${po.fieldName}'], text+"")
|
||||
}
|
||||
}
|
||||
<#elseif po.classType=='list' || po.classType=='list_multi' || po.classType=='sel_search' || po.classType=='radio' || po.classType=='checkbox' || po.classType=='sel_depart' || po.classType=='sel_user'>
|
||||
dataIndex: '${po.fieldName}_dictText'
|
||||
<#elseif po.classType=='cat_tree'>
|
||||
<#if list_need_category>
|
||||
dataIndex: '${po.fieldName}',
|
||||
customRender:(text)=>{
|
||||
if(!text){
|
||||
return ''
|
||||
}else{
|
||||
return filterMultiDictText(this.dictOptions['${po.fieldName}'], text+"")
|
||||
}
|
||||
}
|
||||
customRender: (text) => (text ? filterMultiDictText(this.dictOptions['${po.fieldName}'], text) : '')
|
||||
<#else>
|
||||
dataIndex: '${po.fieldName}',
|
||||
customRender:(text,record)=>{
|
||||
if(!text){
|
||||
return ''
|
||||
}else{
|
||||
return record['${po.dictText}']
|
||||
}
|
||||
}
|
||||
customRender: (text, record) => (text ? record['${po.dictText}'] : '')
|
||||
</#if>
|
||||
<#else>
|
||||
dataIndex: '${po.fieldName}'
|
||||
@ -292,15 +273,7 @@
|
||||
exportXlsUrl: "/${entityPackage}/${entityName?uncap_first}/exportXls",
|
||||
importExcelUrl: "${entityPackage}/${entityName?uncap_first}/importExcel",
|
||||
},
|
||||
dictOptions:{
|
||||
<#list columns as po>
|
||||
<#if (po.isQuery=='Y' || po.isShowList=='Y')>
|
||||
<#if po.classType='sel_depart' || po.classType=='list_multi' || po.classType=='list' || po.classType=='radio' || po.classType=='checkbox'>
|
||||
${po.fieldName}:[],
|
||||
</#if>
|
||||
</#if>
|
||||
</#list>
|
||||
},
|
||||
dictOptions:{},
|
||||
<#if tableVo.extendParams.scroll=='1'>
|
||||
tableScroll:{x :${showColNum}*147+50}
|
||||
</#if>
|
||||
@ -315,38 +288,19 @@
|
||||
initDictConfig(){
|
||||
<#list columns as po>
|
||||
<#if (po.isQuery=='Y' || po.isShowList=='Y') && po.classType!='popup'>
|
||||
<#if po.classType='sel_depart'>
|
||||
initDictOptions('sys_depart,depart_name,id').then((res) => {
|
||||
if (res.success) {
|
||||
this.$set(this.dictOptions, '${po.fieldName}', res.result)
|
||||
}
|
||||
})
|
||||
<#elseif po.classType=='cat_tree' && list_need_category==true>
|
||||
<#if po.classType=='cat_tree' && list_need_category==true>
|
||||
loadCategoryData({code:"${po.dictField}"}).then((res) => {
|
||||
if (res.success) {
|
||||
this.$set(this.dictOptions, '${po.fieldName}', res.result)
|
||||
}
|
||||
})
|
||||
<#elseif po.classType=='sel_search' || po.classType=='list_multi' || po.classType=='list' || po.classType=='radio' || po.classType=='checkbox'>
|
||||
<#assign list_field_dictCode="">
|
||||
<#if po.dictTable?default("")?trim?length gt 1>
|
||||
<#assign list_field_dictCode="${po.dictTable},${po.dictText},${po.dictField}">
|
||||
<#elseif po.dictField?default("")?trim?length gt 1>
|
||||
<#assign list_field_dictCode="${po.dictField}">
|
||||
</#if>
|
||||
initDictOptions('${list_field_dictCode}').then((res) => {
|
||||
if (res.success) {
|
||||
this.$set(this.dictOptions, '${po.fieldName}', res.result)
|
||||
}
|
||||
})
|
||||
</#if>
|
||||
</#if>
|
||||
</#list>
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
@import '~@assets/less/common.less'
|
||||
@import '~@assets/less/common.less';
|
||||
</style>
|
||||
@ -42,6 +42,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
|
||||
/**
|
||||
* @Description: ${tableVo.ftlDescription}
|
||||
@ -49,6 +52,7 @@ import com.alibaba.fastjson.JSON;
|
||||
* @Date: ${.now?string["yyyy-MM-dd"]}
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="${tableVo.ftlDescription}")
|
||||
@RestController
|
||||
@RequestMapping("/${entityPackage}/${entityName?uncap_first}")
|
||||
@Slf4j
|
||||
@ -69,6 +73,8 @@ public class ${entityName}Controller {
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "${tableVo.ftlDescription}-分页列表查询")
|
||||
@ApiOperation(value="${tableVo.ftlDescription}-分页列表查询", notes="${tableVo.ftlDescription}-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<?> queryPageList(${entityName} ${entityName?uncap_first},
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@ -86,6 +92,8 @@ public class ${entityName}Controller {
|
||||
* @param ${entityName?uncap_first}Page
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "${tableVo.ftlDescription}-添加")
|
||||
@ApiOperation(value="${tableVo.ftlDescription}-添加", notes="${tableVo.ftlDescription}-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@RequestBody ${entityName}Page ${entityName?uncap_first}Page) {
|
||||
${entityName} ${entityName?uncap_first} = new ${entityName}();
|
||||
@ -100,6 +108,8 @@ public class ${entityName}Controller {
|
||||
* @param ${entityName?uncap_first}Page
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "${tableVo.ftlDescription}-编辑")
|
||||
@ApiOperation(value="${tableVo.ftlDescription}-编辑", notes="${tableVo.ftlDescription}-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@RequestBody ${entityName}Page ${entityName?uncap_first}Page) {
|
||||
${entityName} ${entityName?uncap_first} = new ${entityName}();
|
||||
@ -118,6 +128,8 @@ public class ${entityName}Controller {
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "${tableVo.ftlDescription}-通过id删除")
|
||||
@ApiOperation(value="${tableVo.ftlDescription}-通过id删除", notes="${tableVo.ftlDescription}-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
${entityName?uncap_first}Service.delMain(id);
|
||||
@ -130,6 +142,8 @@ public class ${entityName}Controller {
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "${tableVo.ftlDescription}-批量删除")
|
||||
@ApiOperation(value="${tableVo.ftlDescription}-批量删除", notes="${tableVo.ftlDescription}-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.${entityName?uncap_first}Service.delBatchMain(Arrays.asList(ids.split(",")));
|
||||
@ -142,6 +156,8 @@ public class ${entityName}Controller {
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "${tableVo.ftlDescription}-通过id查询")
|
||||
@ApiOperation(value="${tableVo.ftlDescription}-通过id查询", notes="${tableVo.ftlDescription}-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
${entityName} ${entityName?uncap_first} = ${entityName?uncap_first}Service.getById(id);
|
||||
@ -159,6 +175,8 @@ public class ${entityName}Controller {
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "${sub.ftlDescription}集合-通过id查询")
|
||||
@ApiOperation(value="${sub.ftlDescription}集合-通过id查询", notes="${sub.ftlDescription}-通过id查询")
|
||||
@GetMapping(value = "/query${sub.entityName}ByMainId")
|
||||
public Result<?> query${sub.entityName}ListByMainId(@RequestParam(name="id",required=true) String id) {
|
||||
List<${sub.entityName}> ${sub.entityName?uncap_first}List = ${sub.entityName?uncap_first}Service.selectByMainId(id);
|
||||
@ -8,6 +8,10 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
* @Description: ${tableVo.ftlDescription}
|
||||
@ -15,26 +19,46 @@ import org.springframework.format.annotation.DateTimeFormat;
|
||||
* @Date: ${.now?string["yyyy-MM-dd"]}
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@ApiModel(value="${tableName}对象", description="${tableVo.ftlDescription}")
|
||||
@Data
|
||||
@TableName("${tableName}")
|
||||
public class ${entityName} implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
<#list originalColumns as po>
|
||||
<#-- 生成字典Code -->
|
||||
<#assign list_field_dictCode="">
|
||||
<#if po.classType='sel_user'>
|
||||
<#assign list_field_dictCode=', dictTable = "sys_user", dicText = "realname", dicCode = "username"'>
|
||||
<#elseif po.classType='sel_depart'>
|
||||
<#assign list_field_dictCode=', dictTable = "sys_depart", dicText = "depart_name", dicCode = "id"'>
|
||||
<#elseif po.classType=='list' || po.classType=='list_multi' || po.classType=='sel_search' || po.classType=='radio' || po.classType=='checkbox'>
|
||||
<#if po.dictTable?default("")?trim?length gt 1>
|
||||
<#assign list_field_dictCode=', dictTable = "${po.dictTable}", dicText = "${po.dictText}", dicCode = "${po.dictField}"'>
|
||||
<#elseif po.dictField?default("")?trim?length gt 1>
|
||||
<#assign list_field_dictCode=', dicCode = "${po.dictField}"'>
|
||||
</#if>
|
||||
</#if>
|
||||
/**${po.filedComment}*/
|
||||
<#if po.fieldName == primaryKeyField>
|
||||
@TableId(type = IdType.ID_WORKER_STR)
|
||||
<#else>
|
||||
<#if po.fieldDbType =='Date'>
|
||||
<#if po.classType=='date'>
|
||||
@Excel(name = "${po.filedComment}", width = 15, format = "yyyy-MM-dd"${list_field_dictCode})
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
<#else>
|
||||
@Excel(name = "${po.filedComment}", width = 20, format = "yyyy-MM-dd HH:mm:ss"${list_field_dictCode})
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
</#if>
|
||||
<#else>
|
||||
@Excel(name = "${po.filedComment}", width = 15${list_field_dictCode})
|
||||
</#if>
|
||||
<#if list_field_dictCode?length gt 1>
|
||||
@Dict(${list_field_dictCode?substring(2)})
|
||||
</#if>
|
||||
</#if>
|
||||
<#if po.fieldDbType=='Blob'>
|
||||
private transient java.lang.String ${po.fieldName}String;
|
||||
@ -65,6 +89,7 @@ public class ${entityName} implements Serializable {
|
||||
return "";
|
||||
}
|
||||
<#else>
|
||||
@ApiModelProperty(value = "${po.filedComment}")
|
||||
private ${po.fieldType} ${po.fieldName};
|
||||
</#if>
|
||||
</#list>
|
||||
@ -11,6 +11,8 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import java.util.Date;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
* @Description: ${subTab.ftlDescription}
|
||||
@ -18,30 +20,45 @@ import java.util.Date;
|
||||
* @Date: ${.now?string["yyyy-MM-dd"]}
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@ApiModel(value="${tableName}对象", description="${tableVo.ftlDescription}")
|
||||
@Data
|
||||
@TableName("${subTab.tableName}")
|
||||
public class ${subTab.entityName} implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
<#list subTab.originalColumns as po>
|
||||
<#-- 生成字典Code -->
|
||||
<#assign list_field_dictCode="">
|
||||
<#if po.classType='sel_user'>
|
||||
<#assign list_field_dictCode=', dictTable = "sys_user", dicText = "realname", dicCode = "username"'>
|
||||
<#elseif po.classType='sel_depart'>
|
||||
<#assign list_field_dictCode=', dictTable = "sys_depart", dicText = "depart_name", dicCode = "id"'>
|
||||
<#elseif po.classType=='list' || po.classType=='list_multi' || po.classType=='sel_search' || po.classType=='radio' || po.classType=='checkbox'>
|
||||
<#if po.dictTable?default("")?trim?length gt 1>
|
||||
<#assign list_field_dictCode=', dictTable = "${po.dictTable}", dicText = "${po.dictText}", dicCode = "${po.dictField}"'>
|
||||
<#elseif po.dictField?default("")?trim?length gt 1>
|
||||
<#assign list_field_dictCode=', dicCode = "${po.dictField}"'>
|
||||
</#if>
|
||||
</#if>
|
||||
/**${po.filedComment}*/
|
||||
<#if po.fieldName == primaryKeyField>
|
||||
@TableId(type = IdType.ID_WORKER_STR)
|
||||
<#else>
|
||||
<#if po.fieldDbType =='Date'>
|
||||
<#if po.classType=='date'>
|
||||
@Excel(name = "${po.filedComment}", width = 15, format = "yyyy-MM-dd")
|
||||
@Excel(name = "${po.filedComment}", width = 15, format = "yyyy-MM-dd"${list_field_dictCode})
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
<#else>
|
||||
@Excel(name = "${po.filedComment}", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "${po.filedComment}", width = 20, format = "yyyy-MM-dd HH:mm:ss"${list_field_dictCode})
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
</#if>
|
||||
<#elseif !subTab.foreignKeys?seq_contains(po.fieldName?cap_first)>
|
||||
@Excel(name = "${po.filedComment}", width = 15)
|
||||
@Excel(name = "${po.filedComment}", width = 15${list_field_dictCode})
|
||||
</#if>
|
||||
</#if>
|
||||
@ApiModelProperty(value = "${po.filedComment}")
|
||||
private <#if po.fieldType=='java.sql.Blob'>byte[]<#else>${po.fieldType}</#if> ${po.fieldName};
|
||||
</#list>
|
||||
}
|
||||
@ -12,6 +12,8 @@ import org.jeecgframework.poi.excel.annotation.ExcelCollection;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.util.Date;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
* @Description: ${tableVo.ftlDescription}
|
||||
@ -20,6 +22,7 @@ import java.util.Date;
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value="${tableName}Page对象", description="${tableVo.ftlDescription}")
|
||||
public class ${entityName}Page {
|
||||
|
||||
<#list originalColumns as po>
|
||||
@ -40,12 +43,14 @@ public class ${entityName}Page {
|
||||
@Excel(name = "${po.filedComment}", width = 15)
|
||||
</#if>
|
||||
</#if>
|
||||
@ApiModelProperty(value = "${po.filedComment}")
|
||||
private <#if po.fieldType=='java.sql.Blob'>byte[]<#else>${po.fieldType}</#if> ${po.fieldName};
|
||||
</#list>
|
||||
|
||||
<#list subTables as sub>
|
||||
@ExcelCollection(name="${sub.ftlDescription}")
|
||||
private List<${sub.entityName}> ${sub.entityName?uncap_first}List;
|
||||
@ApiModelProperty(value = "${sub.ftlDescription}")
|
||||
private List<${sub.entityName}> ${sub.entityName?uncap_first}List;
|
||||
</#list>
|
||||
|
||||
}
|
||||
@ -18,7 +18,7 @@
|
||||
<template v-if="toggleSearchStatus">
|
||||
</#if>
|
||||
<#if po.queryMode=='single'>
|
||||
<#if query_field_no gt 1> </#if><a-col :md="6" :sm="8">
|
||||
<#if query_field_no gt 1> </#if><a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<#if query_field_no gt 1> </#if><a-form-item label="${po.filedComment}">
|
||||
<#if po.classType=='date'>
|
||||
<#assign query_field_date=true>
|
||||
@ -42,7 +42,7 @@
|
||||
<#if query_field_no gt 1> </#if></a-form-item>
|
||||
<#if query_field_no gt 1> </#if></a-col>
|
||||
<#else>
|
||||
<#if query_field_no gt 1> </#if><a-col :md="12" :sm="16">
|
||||
<#if query_field_no gt 1> </#if><a-col :xl="10" :lg="11" :md="12" :sm="24">
|
||||
<#if query_field_no gt 1> </#if><a-form-item label="${po.filedComment}">
|
||||
<#if po.classType=='date'>
|
||||
<#assign query_field_date=true>
|
||||
@ -77,7 +77,7 @@
|
||||
</template>
|
||||
</#if>
|
||||
<#if query_flag>
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
||||
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
|
||||
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
|
||||
@ -182,7 +182,7 @@
|
||||
import JDate from '@/components/jeecg/JDate.vue'
|
||||
</#if>
|
||||
<#if list_need_dict>
|
||||
import {initDictOptions, filterMultiDictText} from '@/components/dict/JDictSelectUtil'
|
||||
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
|
||||
</#if>
|
||||
<#if list_need_category>
|
||||
import { loadCategoryData } from '@/api/api'
|
||||
@ -238,34 +238,15 @@
|
||||
<#elseif po.classType=='image'>
|
||||
dataIndex: '${po.fieldName}',
|
||||
scopedSlots: {customRender: 'imgSlot'}
|
||||
<#elseif po.classType=='sel_search' || po.classType=='list_multi' || po.classType=='list' || po.classType=='radio' || po.classType=='checkbox' || po.classType=='sel_depart'>
|
||||
dataIndex: '${po.fieldName}',
|
||||
customRender:(text)=>{
|
||||
if(!text){
|
||||
return ''
|
||||
}else{
|
||||
return filterMultiDictText(this.dictOptions['${po.fieldName}'], text+"")
|
||||
}
|
||||
}
|
||||
<#elseif po.classType=='list' || po.classType=='list_multi' || po.classType=='sel_search' || po.classType=='radio' || po.classType=='checkbox' || po.classType=='sel_depart' || po.classType=='sel_user'>
|
||||
dataIndex: '${po.fieldName}_dictText'
|
||||
<#elseif po.classType=='cat_tree'>
|
||||
<#if list_need_category>
|
||||
dataIndex: '${po.fieldName}',
|
||||
customRender:(text)=>{
|
||||
if(!text){
|
||||
return ''
|
||||
}else{
|
||||
return filterMultiDictText(this.dictOptions['${po.fieldName}'], text+"")
|
||||
}
|
||||
}
|
||||
customRender: (text) => (text ? filterMultiDictText(this.dictOptions['${po.fieldName}'], text) : '')
|
||||
<#else>
|
||||
dataIndex: '${po.fieldName}',
|
||||
customRender:(text,record)=>{
|
||||
if(!text){
|
||||
return ''
|
||||
}else{
|
||||
return record['${po.dictText}']
|
||||
}
|
||||
}
|
||||
customRender: (text, record) => (text ? record['${po.dictText}'] : '')
|
||||
</#if>
|
||||
<#else>
|
||||
dataIndex: '${po.fieldName}'
|
||||
@ -287,16 +268,7 @@
|
||||
exportXlsUrl: "/${entityPackage}/${entityName?uncap_first}/exportXls",
|
||||
importExcelUrl: "${entityPackage}/${entityName?uncap_first}/importExcel",
|
||||
},
|
||||
dictOptions:{
|
||||
<#list columns as po>
|
||||
<#if (po.isQuery=='Y' || po.isShowList=='Y')>
|
||||
<#if po.classType='sel_depart' || po.classType=='list_multi' || po.classType=='list' || po.classType=='radio' || po.classType=='checkbox'>
|
||||
${po.fieldName}:[],
|
||||
</#if>
|
||||
</#if>
|
||||
</#list>
|
||||
},
|
||||
|
||||
dictOptions:{},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -308,30 +280,12 @@
|
||||
initDictConfig(){
|
||||
<#list columns as po>
|
||||
<#if (po.isQuery=='Y' || po.isShowList=='Y') && po.classType!='popup'>
|
||||
<#if po.classType='sel_depart'>
|
||||
initDictOptions('sys_depart,depart_name,id').then((res) => {
|
||||
if (res.success) {
|
||||
this.$set(this.dictOptions, '${po.fieldName}', res.result)
|
||||
}
|
||||
})
|
||||
<#elseif po.classType=='cat_tree' && list_need_category==true>
|
||||
<#if po.classType=='cat_tree' && list_need_category==true>
|
||||
loadCategoryData({code:"${po.dictField}"}).then((res) => {
|
||||
if (res.success) {
|
||||
this.$set(this.dictOptions, '${po.fieldName}', res.result)
|
||||
}
|
||||
})
|
||||
<#elseif po.classType=='sel_search' || po.classType=='list_multi' || po.classType=='list' || po.classType=='radio' || po.classType=='checkbox'>
|
||||
<#assign list_field_dictCode="">
|
||||
<#if po.dictTable?default("")?trim?length gt 1>
|
||||
<#assign list_field_dictCode="${po.dictTable},${po.dictText},${po.dictField}">
|
||||
<#elseif po.dictField?default("")?trim?length gt 1>
|
||||
<#assign list_field_dictCode="${po.dictField}">
|
||||
</#if>
|
||||
initDictOptions('${list_field_dictCode}').then((res) => {
|
||||
if (res.success) {
|
||||
this.$set(this.dictOptions, '${po.fieldName}', res.result)
|
||||
}
|
||||
})
|
||||
</#if>
|
||||
</#if>
|
||||
</#list>
|
||||
@ -341,5 +295,5 @@
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
@import '~@assets/less/common.less'
|
||||
@import '~@assets/less/common.less';
|
||||
</style>
|
||||
@ -47,7 +47,7 @@
|
||||
<#elseif po.classType =='popup'>
|
||||
<#assign form_popup=true>
|
||||
<j-popup
|
||||
v-decorator="['${po.fieldName}']"
|
||||
v-decorator="['${po.fieldName}', validatorRules.${po.fieldName}]"
|
||||
:trigger-change="true"
|
||||
org-fields="${po.dictField}"
|
||||
dest-fields="${po.dictText}"
|
||||
@ -55,24 +55,24 @@
|
||||
@callback="popupCallback"/>
|
||||
<#elseif po.classType =='sel_depart'>
|
||||
<#assign form_sel_depart=true>
|
||||
<j-select-depart v-decorator="['${po.fieldName}']" :trigger-change="true"/>
|
||||
<j-select-depart v-decorator="['${po.fieldName}', validatorRules.${po.fieldName}]" :trigger-change="true"/>
|
||||
<#elseif po.classType =='sel_user'>
|
||||
<#assign form_sel_user = true>
|
||||
<j-select-user-by-dep v-decorator="['${po.fieldName}']" :trigger-change="true"/>
|
||||
<j-select-user-by-dep v-decorator="['${po.fieldName}', validatorRules.${po.fieldName}]" :trigger-change="true"/>
|
||||
<#elseif po.classType =='textarea'>
|
||||
<a-textarea v-decorator="['${po.fieldName}']" rows="4" placeholder="请输入${po.filedComment}"/>
|
||||
<a-textarea v-decorator="['${po.fieldName}', validatorRules.${po.fieldName}]" rows="4" placeholder="请输入${po.filedComment}"/>
|
||||
<#elseif po.classType=='list' || po.classType=='radio'>
|
||||
<#assign form_select = true>
|
||||
<j-dict-select-tag type="${po.classType}" v-decorator="['${po.fieldName}']" :trigger-change="true" dictCode="${form_field_dictCode}" placeholder="请选择${po.filedComment}"/>
|
||||
<j-dict-select-tag type="${po.classType}" v-decorator="['${po.fieldName}', validatorRules.${po.fieldName}]" :trigger-change="true" dictCode="${form_field_dictCode}" placeholder="请选择${po.filedComment}"/>
|
||||
<#elseif po.classType=='list_multi' || po.classType=='checkbox'>
|
||||
<#assign form_select_multi = true>
|
||||
<j-multi-select-tag type="${po.classType}" v-decorator="['${po.fieldName}']" :trigger-change="true" dictCode="${form_field_dictCode}" placeholder="请选择${po.filedComment}"/>
|
||||
<j-multi-select-tag type="${po.classType}" v-decorator="['${po.fieldName}', validatorRules.${po.fieldName}]" :trigger-change="true" dictCode="${form_field_dictCode}" placeholder="请选择${po.filedComment}"/>
|
||||
<#elseif po.classType=='sel_search'>
|
||||
<#assign form_select_search = true>
|
||||
<j-search-select-tag v-decorator="['${po.fieldName}']" dict="${form_field_dictCode}" />
|
||||
<j-search-select-tag v-decorator="['${po.fieldName}', validatorRules.${po.fieldName}]" dict="${form_field_dictCode}" />
|
||||
<#elseif po.classType=='cat_tree'>
|
||||
<#assign form_cat_tree = true>
|
||||
<j-category-select v-decorator="['${po.fieldName}']" pcode="${po.dictField}" placeholder="请选择${po.filedComment}" <#if po.dictText?default("")?trim?length gt 1>back="${po.dictText}" @change="handleCategoryChange"</#if>/>
|
||||
<j-category-select v-decorator="['${po.fieldName}', validatorRules.${po.fieldName}]" pcode="${po.dictField}" placeholder="请选择${po.filedComment}" <#if po.dictText?default("")?trim?length gt 1>back="${po.dictText}" @change="handleCategoryChange"</#if>/>
|
||||
<#if po.dictText?default("")?trim?length gt 1>
|
||||
<#assign form_cat_back = "${po.dictText}">
|
||||
</#if>
|
||||
@ -80,7 +80,7 @@
|
||||
<a-input-number v-decorator="[ '${po.fieldName}', validatorRules.${po.fieldName}]" placeholder="请输入${po.filedComment}" style="width: 100%"/>
|
||||
<#elseif po.classType=='file' || po.classType=='image'>
|
||||
<#assign form_file = true>
|
||||
<j-upload v-decorator="['${po.fieldName}']" :trigger-change="true"></j-upload>
|
||||
<j-upload v-decorator="['${po.fieldName}', validatorRules.${po.fieldName}]" :trigger-change="true"></j-upload>
|
||||
<#elseif po.classType=='umeditor'>
|
||||
<#assign form_editor = true>
|
||||
<j-editor v-decorator="['${po.fieldName}',{trigger:'input'}]"/>
|
||||
@ -136,6 +136,7 @@
|
||||
import pick from 'lodash.pick'
|
||||
import { FormTypes,getRefPromise } from '@/utils/JEditableTableUtil'
|
||||
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
|
||||
import { validateDuplicateValue } from '@/utils/util'
|
||||
<#list subTables as sub>
|
||||
<#if sub.foreignRelationType =='1'>
|
||||
import ${sub.entityName}Form from './${sub.entityName}Form.vue'
|
||||
@ -222,19 +223,7 @@
|
||||
},
|
||||
// 新增时子表默认添加几行空数据
|
||||
addDefaultRowNum: 1,
|
||||
validatorRules: {
|
||||
<#list columns as po>
|
||||
<#if po.isShow =='Y'>
|
||||
<#if po.fieldName !='id'>
|
||||
<#if po.nullable =='N'>
|
||||
${po.fieldName}: { rules: [{ required: true, message: '请输入${po.filedComment}!' }] },
|
||||
<#else>
|
||||
${po.fieldName}:{},
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
</#list>
|
||||
},
|
||||
<#include "/common/validatorRulesTemplate.ftl">
|
||||
refKeys: [<#list subTables as sub>'${sub.entityName?uncap_first}', </#list>],
|
||||
tableKeys:[<#list subTables as sub><#if sub.foreignRelationType =='0'>'${sub.entityName?uncap_first}', </#if></#list>],
|
||||
activeKey: '${subTables[0].entityName?uncap_first}',
|
||||
@ -313,8 +302,18 @@
|
||||
placeholder: '请输入${'$'}{title}',
|
||||
</#if>
|
||||
defaultValue: '',
|
||||
<#if col.nullable =='N'>
|
||||
<#-- 子表的校验 -->
|
||||
<#assign subFieldValidType = col.fieldValidType!''>
|
||||
<#-- 非空校验 -->
|
||||
<#if col.nullable == 'N' || subFieldValidType == '*'>
|
||||
validateRules: [{ required: true, message: '${'$'}{title}不能为空' }],
|
||||
<#-- 其他情况下,只要有值就被认为是正则校验 -->
|
||||
<#elseif subFieldValidType?length gt 0>
|
||||
<#assign subMessage = '格式不正确'>
|
||||
<#if subFieldValidType == 'only' >
|
||||
<#assign subMessage = '不能重复'>
|
||||
</#if>
|
||||
validateRules: [{ pattern: "${subFieldValidType}", message: "${'$'}{title}${subMessage}" }],
|
||||
</#if>
|
||||
},
|
||||
</#if>
|
||||
@ -66,10 +66,14 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
if(oConvertUtils.isEmpty(${entityName?uncap_first}.get${pidFieldName?cap_first}())){
|
||||
${entityName?uncap_first}.set${pidFieldName?cap_first}("0");
|
||||
String parentId = ${entityName?uncap_first}.get${pidFieldName?cap_first}();
|
||||
if (oConvertUtils.isEmpty(parentId)) {
|
||||
parentId = "0";
|
||||
}
|
||||
${entityName?uncap_first}.set${pidFieldName?cap_first}(null);
|
||||
QueryWrapper<${entityName}> queryWrapper = QueryGenerator.initQueryWrapper(${entityName?uncap_first}, req.getParameterMap());
|
||||
// 使用 eq 防止模糊查询
|
||||
queryWrapper.eq("${pidFieldName}", parentId);
|
||||
Page<${entityName}> page = new Page<${entityName}>(pageNo, pageSize);
|
||||
IPage<${entityName}> pageList = ${entityName?uncap_first}Service.page(page, queryWrapper);
|
||||
return Result.ok(pageList);
|
||||
@ -22,24 +22,37 @@ import org.jeecg.common.aspect.annotation.Dict;
|
||||
@TableName("${tableName}")
|
||||
public class ${entityName} implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
<#list originalColumns as po>
|
||||
<#-- 生成字典Code -->
|
||||
<#assign list_field_dictCode="">
|
||||
<#if po.classType='sel_user'>
|
||||
<#assign list_field_dictCode=', dictTable = "sys_user", dicText = "realname", dicCode = "username"'>
|
||||
<#elseif po.classType='sel_depart'>
|
||||
<#assign list_field_dictCode=', dictTable = "sys_depart", dicText = "depart_name", dicCode = "id"'>
|
||||
<#elseif po.classType=='list' || po.classType=='list_multi' || po.classType=='sel_search' || po.classType=='radio' || po.classType=='checkbox'>
|
||||
<#if po.dictTable?default("")?trim?length gt 1>
|
||||
<#assign list_field_dictCode=', dictTable = "${po.dictTable}", dicText = "${po.dictText}", dicCode = "${po.dictField}"'>
|
||||
<#elseif po.dictField?default("")?trim?length gt 1>
|
||||
<#assign list_field_dictCode=', dicCode = "${po.dictField}"'>
|
||||
</#if>
|
||||
</#if>
|
||||
/**${po.filedComment}*/
|
||||
<#if po.fieldName == primaryKeyField>
|
||||
@TableId(type = IdType.ID_WORKER_STR)
|
||||
<#else>
|
||||
<#if po.fieldDbType =='Date'>
|
||||
<#if po.classType=='date'>
|
||||
@Excel(name = "${po.filedComment}", width = 15, format = "yyyy-MM-dd")
|
||||
@Excel(name = "${po.filedComment}", width = 15, format = "yyyy-MM-dd"${list_field_dictCode})
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
<#else>
|
||||
@Excel(name = "${po.filedComment}", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "${po.filedComment}", width = 20, format = "yyyy-MM-dd HH:mm:ss"${list_field_dictCode})
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
</#if>
|
||||
<#else>
|
||||
@Excel(name = "${po.filedComment}", width = 15)
|
||||
@Excel(name = "${po.filedComment}", width = 15${list_field_dictCode})
|
||||
</#if>
|
||||
<#-- <#if po.classType!='popup'>
|
||||
<#if po.dictTable?default("")?trim?length gt 1>
|
||||
@ -48,6 +61,9 @@ public class ${entityName} implements Serializable {
|
||||
@Dict(dicCode="${po.dictField}")
|
||||
</#if>
|
||||
</#if>-->
|
||||
<#if list_field_dictCode?length gt 1>
|
||||
@Dict(${list_field_dictCode?substring(2)})
|
||||
</#if>
|
||||
</#if>
|
||||
private <#if po.fieldType=='java.sql.Blob'>byte[]<#else>${po.fieldType}</#if> ${po.fieldName};
|
||||
</#list>
|
||||
@ -91,7 +91,7 @@
|
||||
import { getAction } from '@/api/manage'
|
||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
||||
import ${entityName}Modal from './modules/${entityName}Modal'
|
||||
import {initDictOptions, filterMultiDictText} from '@/components/dict/JDictSelectUtil'
|
||||
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
|
||||
|
||||
export default {
|
||||
name: "${entityName}List",
|
||||
@ -130,15 +130,8 @@
|
||||
<#elseif po.classType=='image'>
|
||||
dataIndex: '${po.fieldName}',
|
||||
scopedSlots: {customRender: 'imgSlot'}
|
||||
<#elseif po.classType=='list_multi' || po.classType=='list' || po.classType=='radio' || po.classType=='checkbox' || po.classType=='sel_depart'>
|
||||
dataIndex: '${po.fieldName}',
|
||||
customRender:(text)=>{
|
||||
if(!text){
|
||||
return ''
|
||||
}else{
|
||||
return filterMultiDictText(this.dictOptions['${po.fieldName}'], text+"")
|
||||
}
|
||||
}
|
||||
<#elseif po.classType=='list' || po.classType=='list_multi' || po.classType=='sel_search' || po.classType=='radio' || po.classType=='checkbox' || po.classType=='sel_depart' || po.classType=='sel_user'>
|
||||
dataIndex: '${po.fieldName}_dictText'
|
||||
<#else>
|
||||
dataIndex: '${po.fieldName}'
|
||||
</#if>
|
||||
@ -164,15 +157,7 @@
|
||||
expandedRowKeys:[],
|
||||
hasChildrenField:"${hasChildrenField}",
|
||||
pidField:"${pidFieldName}",
|
||||
dictOptions:{
|
||||
<#list columns as po>
|
||||
<#if (po.isQuery=='Y' || po.isShowList=='Y')>
|
||||
<#if po.classType='sel_depart' || po.classType=='list_multi' || po.classType=='list' || po.classType=='radio' || po.classType=='checkbox'>
|
||||
${po.fieldName}:[],
|
||||
</#if>
|
||||
</#if>
|
||||
</#list>
|
||||
}
|
||||
dictOptions: {}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -258,25 +243,6 @@
|
||||
initDictConfig(){
|
||||
<#list columns as po>
|
||||
<#if (po.isQuery=='Y' || po.isShowList=='Y') && po.classType!='popup'>
|
||||
<#if po.classType='sel_depart'>
|
||||
initDictOptions('sys_depart,depart_name,id').then((res) => {
|
||||
if (res.success) {
|
||||
this.$set(this.dictOptions, '${po.fieldName}', res.result)
|
||||
}
|
||||
})
|
||||
<#elseif po.classType=='list_multi' || po.classType=='list' || po.classType=='radio' || po.classType=='checkbox'>
|
||||
<#assign list_field_dictCode="">
|
||||
<#if po.dictTable?default("")?trim?length gt 1>
|
||||
<#assign list_field_dictCode="${po.dictTable},${po.dictText},${po.dictField}">
|
||||
<#elseif po.dictField?default("")?trim?length gt 1>
|
||||
<#assign list_field_dictCode="${po.dictField}">
|
||||
</#if>
|
||||
initDictOptions('${list_field_dictCode}').then((res) => {
|
||||
if (res.success) {
|
||||
this.$set(this.dictOptions, '${po.fieldName}', res.result)
|
||||
}
|
||||
})
|
||||
</#if>
|
||||
</#if>
|
||||
</#list>
|
||||
},
|
||||
@ -353,5 +319,5 @@
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
@import '~@assets/less/common.less'
|
||||
@import '~@assets/less/common.less';
|
||||
</style>
|
||||
@ -50,7 +50,7 @@
|
||||
<#elseif po.classType =='popup'>
|
||||
<#assign form_popup=true>
|
||||
<j-popup
|
||||
v-decorator="['${po.fieldName}']"
|
||||
v-decorator="['${po.fieldName}', validatorRules.${po.fieldName}]"
|
||||
:trigger-change="true"
|
||||
org-fields="${po.dictField}"
|
||||
dest-fields="${po.dictText}"
|
||||
@ -58,23 +58,23 @@
|
||||
@callback="popupCallback"/>
|
||||
<#elseif po.classType =='sel_depart'>
|
||||
<#assign form_sel_depart=true>
|
||||
<j-select-depart v-decorator="['${po.fieldName}']" :trigger-change="true"/>
|
||||
<j-select-depart v-decorator="['${po.fieldName}', validatorRules.${po.fieldName}]" :trigger-change="true"/>
|
||||
<#elseif po.classType =='sel_user'>
|
||||
<#assign form_sel_user = true>
|
||||
<j-select-user-by-dep v-decorator="['${po.fieldName}']" :trigger-change="true"/>
|
||||
<j-select-user-by-dep v-decorator="['${po.fieldName}', validatorRules.${po.fieldName}]" :trigger-change="true"/>
|
||||
<#elseif po.classType =='textarea'>
|
||||
<a-textarea v-decorator="['${po.fieldName}']" rows="4" placeholder="请输入${po.filedComment}"/>
|
||||
<a-textarea v-decorator="['${po.fieldName}', validatorRules.${po.fieldName}]" rows="4" placeholder="请输入${po.filedComment}"/>
|
||||
<#elseif po.classType=='list' || po.classType=='radio'>
|
||||
<#assign form_select = true>
|
||||
<j-dict-select-tag type="${po.classType}" v-decorator="['${po.fieldName}']" :trigger-change="true" dictCode="${form_field_dictCode}" placeholder="请选择${po.filedComment}"/>
|
||||
<j-dict-select-tag type="${po.classType}" v-decorator="['${po.fieldName}', validatorRules.${po.fieldName}]" :trigger-change="true" dictCode="${form_field_dictCode}" placeholder="请选择${po.filedComment}"/>
|
||||
<#elseif po.classType=='list_multi' || po.classType=='checkbox'>
|
||||
<#assign form_select_multi = true>
|
||||
<j-multi-select-tag type="${po.classType}" v-decorator="['${po.fieldName}']" :trigger-change="true" dictCode="${form_field_dictCode}" placeholder="请选择${po.filedComment}"/>
|
||||
<j-multi-select-tag type="${po.classType}" v-decorator="['${po.fieldName}', validatorRules.${po.fieldName}]" :trigger-change="true" dictCode="${form_field_dictCode}" placeholder="请选择${po.filedComment}"/>
|
||||
<#elseif po.fieldDbType=='int' || po.fieldDbType=='double' || po.fieldDbType=='BigDecimal'>
|
||||
<a-input-number v-decorator="[ '${po.fieldName}', validatorRules.${po.fieldName}]" placeholder="请输入${po.filedComment}" style="width: 100%"/>
|
||||
<#elseif po.classType=='file' || po.classType=='image'>
|
||||
<#assign form_file = true>
|
||||
<j-upload v-decorator="['${po.fieldName}']" :trigger-change="true"></j-upload>
|
||||
<j-upload v-decorator="['${po.fieldName}', validatorRules.${po.fieldName}]" :trigger-change="true"></j-upload>
|
||||
<#else>
|
||||
<a-input v-decorator="[ '${po.fieldName}', validatorRules.${po.fieldName}]" placeholder="请输入${po.filedComment}"></a-input>
|
||||
</#if>
|
||||
@ -91,6 +91,7 @@
|
||||
|
||||
import { httpAction } from '@/api/manage'
|
||||
import pick from 'lodash.pick'
|
||||
import { validateDuplicateValue } from '@/utils/util'
|
||||
<#if form_date>
|
||||
import JDate from '@/components/jeecg/JDate'
|
||||
</#if>
|
||||
@ -155,19 +156,7 @@
|
||||
},
|
||||
|
||||
confirmLoading: false,
|
||||
validatorRules:{
|
||||
<#list columns as po>
|
||||
<#if po.isShow =='Y'>
|
||||
<#if po.fieldName !='id'>
|
||||
<#if po.nullable =='N'>
|
||||
${po.fieldName}:{rules: [{ required: true, message: '请输入${po.filedComment}!' }]},
|
||||
<#else>
|
||||
${po.fieldName}:{},
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
</#list>
|
||||
},
|
||||
<#include "/common/validatorRulesTemplate.ftl">
|
||||
url: {
|
||||
add: "/${entityPackage}/${entityName?uncap_first}/add",
|
||||
edit: "/${entityPackage}/${entityName?uncap_first}/edit",
|
||||
@ -18,7 +18,7 @@
|
||||
<template v-if="toggleSearchStatus">
|
||||
</#if>
|
||||
<#if po.queryMode=='single'>
|
||||
<#if query_field_no gt 1> </#if><a-col :md="6" :sm="8">
|
||||
<#if query_field_no gt 1> </#if><a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<#if query_field_no gt 1> </#if><a-form-item label="${po.filedComment}">
|
||||
<#if po.classType=='date'>
|
||||
<#assign query_field_date=true>
|
||||
@ -42,7 +42,7 @@
|
||||
<#if query_field_no gt 1> </#if></a-form-item>
|
||||
<#if query_field_no gt 1> </#if></a-col>
|
||||
<#else>
|
||||
<#if query_field_no gt 1> </#if><a-col :md="12" :sm="16">
|
||||
<#if query_field_no gt 1> </#if><a-col :xl="10" :lg="11" :md="12" :sm="24">
|
||||
<#if query_field_no gt 1> </#if><a-form-item label="${po.filedComment}">
|
||||
<#if po.classType=='date'>
|
||||
<#assign query_field_date=true>
|
||||
@ -78,7 +78,7 @@
|
||||
</template>
|
||||
</#if>
|
||||
<#if query_flag>
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
||||
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
|
||||
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
|
||||
@ -8,20 +8,20 @@
|
||||
|
||||
<#list columns as po>
|
||||
<#if po.fieldName !='id' && po_index<= tableVo.searchFieldNum>
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<a-form-item label="${po.filedComment}">
|
||||
<a-input placeholder="请输入${po.filedComment}" v-model="queryParam.${po.fieldName}"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<#elseif po_index == 2>
|
||||
<template v-if="toggleSearchStatus">
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<a-form-item label="${po.filedComment}">
|
||||
<a-input placeholder="请输入${po.filedComment}" v-model="queryParam.${po.fieldName}"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<#elseif po.fieldName !='id' && po_index< 5>
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<a-form-item label="${po.filedComment}">
|
||||
<a-input placeholder="请输入${po.filedComment}" v-model="queryParam.${po.fieldName}"></a-input>
|
||||
</a-form-item>
|
||||
@ -32,7 +32,7 @@
|
||||
<#if (columns?size>1) >
|
||||
</template>
|
||||
</#if>
|
||||
<a-col :md="6" :sm="8" >
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
||||
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
|
||||
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
|
||||
|
||||
@ -8,20 +8,20 @@
|
||||
|
||||
<#list columns as po>
|
||||
<#if po.fieldName !='id' && po_index<= tableVo.searchFieldNum>
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<a-form-item label="${po.filedComment}">
|
||||
<a-input placeholder="请输入${po.filedComment}" v-model="queryParam.${po.fieldName}"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<#elseif po_index == 2>
|
||||
<template v-if="toggleSearchStatus">
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<a-form-item label="${po.filedComment}">
|
||||
<a-input placeholder="请输入${po.filedComment}" v-model="queryParam.${po.fieldName}"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<#elseif po.fieldName !='id' && po_index< 5>
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<a-form-item label="${po.filedComment}">
|
||||
<a-input placeholder="请输入${po.filedComment}" v-model="queryParam.${po.fieldName}"></a-input>
|
||||
</a-form-item>
|
||||
@ -32,7 +32,7 @@
|
||||
<#if (columns?size>1) >
|
||||
</template>
|
||||
</#if>
|
||||
<a-col :md="6" :sm="8" >
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
||||
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
|
||||
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
|
||||
|
||||
@ -7,14 +7,14 @@
|
||||
<a-row :gutter="24">
|
||||
<#list columns as po><#rt/>
|
||||
<#if po.fieldName !='id' && po_index<= tableVo.searchFieldNum>
|
||||
<a-col :span="6">
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<a-form-item label="${po.filedComment}">
|
||||
<a-input placeholder="请输入${po.filedComment}" v-model="queryParam.${po.fieldName}"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</#if>
|
||||
</#list>
|
||||
<a-col :span="8" >
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
||||
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
|
||||
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
|
||||
|
||||
@ -7,14 +7,14 @@
|
||||
<a-row :gutter="24">
|
||||
<#list columns as po><#rt/>
|
||||
<#if po.fieldName !='id' && po_index<= tableVo.searchFieldNum>
|
||||
<a-col :md="6" :sm="24">
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<a-form-item label="${po.filedComment}">
|
||||
<a-input placeholder="请输入${po.filedComment}" v-model="queryParam.${po.fieldName}"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</#if>
|
||||
</#list>
|
||||
<a-col :md="6" :sm="24">
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
||||
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
|
||||
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
|
||||
|
||||
@ -0,0 +1,28 @@
|
||||
|
||||
window.onresize = function() {
|
||||
setAppScale();
|
||||
};
|
||||
|
||||
function setAppScale() {
|
||||
var ratioY = $(window).height()/1536;
|
||||
var ratioX = $(window).width()/4352;
|
||||
var screenWidth = window.screen.width;
|
||||
var screenHeigth = window.screen.height;
|
||||
if (screenWidth >= 960) {
|
||||
ratioX = 0.62
|
||||
}
|
||||
if(screenHeigth <= 1080){
|
||||
ratioY = 0.62
|
||||
}
|
||||
$("body").css({
|
||||
transform: "scale("+ ratioX+","+ ratioY+")",
|
||||
transformOrigin: "left top",
|
||||
overflow:"visible"
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
$().ready(function(){
|
||||
//初始化时调整大小
|
||||
setAppScale();
|
||||
});
|
||||
@ -7,7 +7,7 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>JEECG-boot大屏指挥室</title>
|
||||
<title>JEECG ROOM 作战指挥室</title>
|
||||
<link href="${base}/bigscreen/template1/css/easyui.css" rel="stylesheet" type="text/css">
|
||||
<link href="${base}/bigscreen/template1/css/room.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
@ -19,6 +19,7 @@
|
||||
<script language="javascript" type="text/javascript" src="${base}/bigscreen/template1/js/china.js"></script>
|
||||
<script language="javascript" type="text/javascript" src="${base}/bigscreen/template1/js/geoCoord.js"></script>
|
||||
<script language="javascript" type="text/javascript" src="${base}/bigscreen/template1/js/room.js"></script>
|
||||
<script language="javascript" type="text/javascript" src="${base}/bigscreen/template1/js/resize.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@ -48,7 +49,7 @@
|
||||
<!-- 地图结束 -->
|
||||
|
||||
<!-- 产品饼图开始 -->
|
||||
<div id="productPie"></div>
|
||||
<div id="productPie" style="width: 900px; height: 590px;"></div>
|
||||
<!-- 产品饼图结束 -->
|
||||
|
||||
<!-- 业务进展图开始 -->
|
||||
|
||||
Reference in New Issue
Block a user