mirror of https://github.com/jeecgboot/jeecg-boot
Merge branch 'master' of https://github.com/zhangdaiscott/jeecg-boot
commit
e18e980892
|
@ -34,8 +34,8 @@ import org.springframework.web.multipart.MultipartFile;
|
||||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
<#assign bpm_flag=false>
|
<#assign bpm_flag=false>
|
||||||
|
|
|
@ -17,7 +17,6 @@ import org.springframework.format.annotation.DateTimeFormat;
|
||||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
import org.jeecg.common.aspect.annotation.Dict;
|
import org.jeecg.common.aspect.annotation.Dict;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
|
|
@ -339,7 +339,7 @@
|
||||||
<#list columns as po>
|
<#list columns as po>
|
||||||
<#if po.isQuery=='Y' || po.isShowList=='Y'>
|
<#if po.isQuery=='Y' || po.isShowList=='Y'>
|
||||||
<#if po.classType=='popup_dict' && list_has_popup_dict==true>
|
<#if po.classType=='popup_dict' && list_has_popup_dict==true>
|
||||||
const ${po.fieldName}Keys = [...new Set(records.map((item) => item['${po.fieldName}']).flatMap((item) => item.split(',')))];
|
const ${po.fieldName}Keys = [...new Set(records.map((item) => item['${po.fieldName}']).flatMap((item) => item && item.split(',')))];
|
||||||
if(${po.fieldName}Keys && ${po.fieldName}Keys.length){
|
if(${po.fieldName}Keys && ${po.fieldName}Keys.length){
|
||||||
const dictOptions = await getPopDictByCode(${po.fieldName}Keys.join(','), '${po.dictTable},${po.dictField},${po.dictText}');
|
const dictOptions = await getPopDictByCode(${po.fieldName}Keys.join(','), '${po.dictTable},${po.dictField},${po.dictText}');
|
||||||
records.forEach((item) => {
|
records.forEach((item) => {
|
||||||
|
|
|
@ -171,6 +171,10 @@
|
||||||
</#if>
|
</#if>
|
||||||
<#if need_pca>
|
<#if need_pca>
|
||||||
import { getAreaTextByCode } from '/@/components/Form/src/utils/Area';
|
import { getAreaTextByCode } from '/@/components/Form/src/utils/Area';
|
||||||
|
</#if>
|
||||||
|
<#if need_popup_dict>
|
||||||
|
import {getPopDictByCode} from "@/utils/dict";
|
||||||
|
import {filterMultiDictText} from "@/utils/dict/JDictSelectUtil";
|
||||||
</#if>
|
</#if>
|
||||||
<#if bpm_flag==true>
|
<#if bpm_flag==true>
|
||||||
import { startProcess } from '/@/api/common/api';
|
import { startProcess } from '/@/api/common/api';
|
||||||
|
@ -204,6 +208,9 @@
|
||||||
return Object.assign(params, queryParam);
|
return Object.assign(params, queryParam);
|
||||||
</#if>
|
</#if>
|
||||||
},
|
},
|
||||||
|
<#if need_popup_dict>
|
||||||
|
afterFetch: afterFetch
|
||||||
|
</#if>
|
||||||
},
|
},
|
||||||
exportConfig: {
|
exportConfig: {
|
||||||
name: "${tableVo.ftlDescription}",
|
name: "${tableVo.ftlDescription}",
|
||||||
|
@ -465,6 +472,28 @@
|
||||||
return queryParamClone;
|
return queryParamClone;
|
||||||
}
|
}
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
|
<#if need_popup_dict>
|
||||||
|
/**
|
||||||
|
* 翻译Popup字典配置
|
||||||
|
*/
|
||||||
|
async function afterFetch(records){
|
||||||
|
<#list columns as po>
|
||||||
|
<#if po.isQuery=='Y' || po.isShowList=='Y'>
|
||||||
|
<#if po.classType=='popup_dict'>
|
||||||
|
const ${po.fieldName}Keys = [...new Set(records.map((item) => item['${po.fieldName}']).flatMap((item) => item && item.split(',')))];
|
||||||
|
if(${po.fieldName}Keys && ${po.fieldName}Keys.length){
|
||||||
|
const dictOptions = await getPopDictByCode(${po.fieldName}Keys.join(','), '${po.dictTable},${po.dictField},${po.dictText}');
|
||||||
|
records.forEach((item) => {
|
||||||
|
item['${po.fieldName}_dictText'] = filterMultiDictText(dictOptions, item['${po.fieldName}']);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#list>
|
||||||
|
return records;
|
||||||
|
}
|
||||||
|
</#if>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
|
|
@ -42,8 +42,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
<#assign bpm_flag=false>
|
<#assign bpm_flag=false>
|
||||||
|
@ -190,7 +190,7 @@ public class ${entityName}Controller {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
//@AutoLog(value = "${sub.ftlDescription}通过主表ID查询")
|
//@AutoLog(value = "${sub.ftlDescription}通过主表ID查询")
|
||||||
@Operation(summary = "${sub.ftlDescription}-通主表ID查询")
|
@Operation(summary="${sub.ftlDescription}主表ID查询")
|
||||||
@GetMapping(value = "/query${sub.entityName}ByMainId")
|
@GetMapping(value = "/query${sub.entityName}ByMainId")
|
||||||
public Result<List<${sub.entityName}>> query${sub.entityName}ListByMainId(@RequestParam(name="id",required=true) String id) {
|
public Result<List<${sub.entityName}>> 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);
|
List<${sub.entityName}> ${sub.entityName?uncap_first}List = ${sub.entityName?uncap_first}Service.selectByMainId(id);
|
||||||
|
|
|
@ -15,7 +15,6 @@ import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
import org.jeecg.common.aspect.annotation.Dict;
|
import org.jeecg.common.aspect.annotation.Dict;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: ${tableVo.ftlDescription}
|
* @Description: ${tableVo.ftlDescription}
|
||||||
* @Author: jeecg-boot
|
* @Author: jeecg-boot
|
||||||
|
|
|
@ -14,7 +14,6 @@ import org.springframework.format.annotation.DateTimeFormat;
|
||||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -15,7 +15,6 @@ import java.util.Date;
|
||||||
import org.jeecg.common.aspect.annotation.Dict;
|
import org.jeecg.common.aspect.annotation.Dict;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: ${tableVo.ftlDescription}
|
* @Description: ${tableVo.ftlDescription}
|
||||||
* @Author: jeecg-boot
|
* @Author: jeecg-boot
|
||||||
|
|
|
@ -33,8 +33,8 @@ import org.springframework.web.multipart.MultipartFile;
|
||||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
|
||||||
|
|
|
@ -15,8 +15,8 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
import org.jeecg.common.aspect.annotation.Dict;
|
import org.jeecg.common.aspect.annotation.Dict;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
<#assign pidFieldName = "">
|
<#assign pidFieldName = "">
|
||||||
<#assign hasChildrenField = "">
|
<#assign hasChildrenField = "">
|
||||||
<#assign bpm_flag=false>
|
<#assign bpm_flag=false>
|
||||||
|
<#assign list_has_popup_dict=false>
|
||||||
<#list originalColumns as po>
|
<#list originalColumns as po>
|
||||||
<#if po.fieldDbName == tableVo.extendParams.pidField>
|
<#if po.fieldDbName == tableVo.extendParams.pidField>
|
||||||
<#assign pidFieldName = po.fieldName>
|
<#assign pidFieldName = po.fieldName>
|
||||||
|
@ -19,6 +20,9 @@
|
||||||
<#if po.classType=='pca'>
|
<#if po.classType=='pca'>
|
||||||
<#assign list_need_pca=true>
|
<#assign list_need_pca=true>
|
||||||
</#if>
|
</#if>
|
||||||
|
<#if po.classType=='popup_dict'>
|
||||||
|
<#assign list_has_popup_dict=true>
|
||||||
|
</#if>
|
||||||
</#list>
|
</#list>
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
|
@ -93,6 +97,10 @@
|
||||||
<#if list_need_pca>
|
<#if list_need_pca>
|
||||||
import { getAreaTextByCode } from '/@/components/Form/src/utils/Area';
|
import { getAreaTextByCode } from '/@/components/Form/src/utils/Area';
|
||||||
</#if>
|
</#if>
|
||||||
|
<#if list_has_popup_dict>
|
||||||
|
import {getPopDictByCode} from "@/utils/dict";
|
||||||
|
import {filterMultiDictText} from "@/utils/dict/JDictSelectUtil";
|
||||||
|
</#if>
|
||||||
<#if bpm_flag==true>
|
<#if bpm_flag==true>
|
||||||
import { startProcess } from '/@/api/common/api';
|
import { startProcess } from '/@/api/common/api';
|
||||||
</#if>
|
</#if>
|
||||||
|
@ -150,6 +158,9 @@
|
||||||
params.hasQuery = "true";
|
params.hasQuery = "true";
|
||||||
return Object.assign(params, queryParam);
|
return Object.assign(params, queryParam);
|
||||||
},
|
},
|
||||||
|
<#if list_has_popup_dict>
|
||||||
|
afterFetch: afterFetch
|
||||||
|
</#if>
|
||||||
},
|
},
|
||||||
exportConfig: {
|
exportConfig: {
|
||||||
name:"${tableVo.ftlDescription}",
|
name:"${tableVo.ftlDescription}",
|
||||||
|
@ -442,7 +453,27 @@
|
||||||
await reload();
|
await reload();
|
||||||
}
|
}
|
||||||
</#if>
|
</#if>
|
||||||
|
<#if list_has_popup_dict>
|
||||||
|
/**
|
||||||
|
* 翻译Popup字典配置
|
||||||
|
*/
|
||||||
|
async function afterFetch(records){
|
||||||
|
<#list columns as po>
|
||||||
|
<#if po.isQuery=='Y' || po.isShowList=='Y'>
|
||||||
|
<#if po.classType=='popup_dict' && list_has_popup_dict==true>
|
||||||
|
const ${po.fieldName}Keys = [...new Set(records.map((item) => item['${po.fieldName}']).flatMap((item) => item && item.split(',')))];
|
||||||
|
if(${po.fieldName}Keys && ${po.fieldName}Keys.length){
|
||||||
|
const dictOptions = await getPopDictByCode(${po.fieldName}Keys.join(','), '${po.dictTable},${po.dictField},${po.dictText}');
|
||||||
|
records.forEach((item) => {
|
||||||
|
item['${po.fieldName}_dictText'] = filterMultiDictText(dictOptions, item['${po.fieldName}']);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#list>
|
||||||
|
return records;
|
||||||
|
}
|
||||||
|
</#if>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
|
|
@ -181,6 +181,10 @@
|
||||||
<#if need_pca>
|
<#if need_pca>
|
||||||
import { getAreaTextByCode } from '/@/components/Form/src/utils/Area';
|
import { getAreaTextByCode } from '/@/components/Form/src/utils/Area';
|
||||||
</#if>
|
</#if>
|
||||||
|
<#if need_popup_dict>
|
||||||
|
import {getPopDictByCode} from "@/utils/dict";
|
||||||
|
import {filterMultiDictText} from "@/utils/dict/JDictSelectUtil";
|
||||||
|
</#if>
|
||||||
<#if is_range>
|
<#if is_range>
|
||||||
import { cloneDeep } from "lodash-es";
|
import { cloneDeep } from "lodash-es";
|
||||||
</#if>
|
</#if>
|
||||||
|
@ -214,6 +218,9 @@
|
||||||
return Object.assign(params, queryParam.value);
|
return Object.assign(params, queryParam.value);
|
||||||
</#if>
|
</#if>
|
||||||
},
|
},
|
||||||
|
<#if need_popup_dict>
|
||||||
|
afterFetch: afterFetch
|
||||||
|
</#if>
|
||||||
},
|
},
|
||||||
exportConfig: {
|
exportConfig: {
|
||||||
name: "${tableVo.ftlDescription}",
|
name: "${tableVo.ftlDescription}",
|
||||||
|
@ -623,6 +630,28 @@
|
||||||
return queryParamClone;
|
return queryParamClone;
|
||||||
}
|
}
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
|
<#if need_popup_dict>
|
||||||
|
/**
|
||||||
|
* 翻译Popup字典配置
|
||||||
|
*/
|
||||||
|
async function afterFetch(records){
|
||||||
|
<#list columns as po>
|
||||||
|
<#if po.isQuery=='Y' || po.isShowList=='Y'>
|
||||||
|
<#if po.classType=='popup_dict'>
|
||||||
|
const ${po.fieldName}Keys = [...new Set(records.map((item) => item['${po.fieldName}']).flatMap((item) => item && item.split(',')))];
|
||||||
|
if(${po.fieldName}Keys && ${po.fieldName}Keys.length){
|
||||||
|
const dictOptions = await getPopDictByCode(${po.fieldName}Keys.join(','), '${po.dictTable},${po.dictField},${po.dictText}');
|
||||||
|
records.forEach((item) => {
|
||||||
|
item['${po.fieldName}_dictText'] = filterMultiDictText(dictOptions, item['${po.fieldName}']);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#list>
|
||||||
|
return records;
|
||||||
|
}
|
||||||
|
</#if>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
|
|
@ -24,8 +24,8 @@ import ${bussiPackage}.${entityPackage}.service.I${entityName}Service;
|
||||||
<#list subTables as sub>
|
<#list subTables as sub>
|
||||||
import ${bussiPackage}.${entityPackage}.service.I${sub.entityName}Service;
|
import ${bussiPackage}.${entityPackage}.service.I${sub.entityName}Service;
|
||||||
</#list>
|
</#list>
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||||
import org.apache.shiro.SecurityUtils;
|
import org.apache.shiro.SecurityUtils;
|
||||||
import org.jeecg.common.system.vo.LoginUser;
|
import org.jeecg.common.system.vo.LoginUser;
|
||||||
|
|
|
@ -15,8 +15,8 @@ import lombok.Data;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
import org.jeecg.common.aspect.annotation.Dict;
|
import org.jeecg.common.aspect.annotation.Dict;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: ${tableVo.ftlDescription}
|
* @Description: ${tableVo.ftlDescription}
|
||||||
|
|
|
@ -16,8 +16,8 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<#assign list_need_category=false>
|
<#assign list_need_category=false>
|
||||||
<#assign list_need_pca=false>
|
<#assign list_need_pca=false>
|
||||||
<#assign bpm_flag=false>
|
<#assign bpm_flag=false>
|
||||||
|
<#assign list_has_popup_dict=false>
|
||||||
<#-- 开始循环 -->
|
<#-- 开始循环 -->
|
||||||
<#list columns as po>
|
<#list columns as po>
|
||||||
<#if po.fieldDbName=='bpm_status'>
|
<#if po.fieldDbName=='bpm_status'>
|
||||||
|
@ -15,6 +15,9 @@
|
||||||
<#if po.classType=='pca'>
|
<#if po.classType=='pca'>
|
||||||
<#assign list_need_pca=true>
|
<#assign list_need_pca=true>
|
||||||
</#if>
|
</#if>
|
||||||
|
<#if po.classType=='popup_dict'>
|
||||||
|
<#assign list_has_popup_dict=true>
|
||||||
|
</#if>
|
||||||
</#list>
|
</#list>
|
||||||
<#-- 结束循环 -->
|
<#-- 结束循环 -->
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
@ -103,6 +106,10 @@
|
||||||
import { getAreaTextByCode } from '/@/components/Form/src/utils/Area';
|
import { getAreaTextByCode } from '/@/components/Form/src/utils/Area';
|
||||||
</#if>
|
</#if>
|
||||||
<#if list_need_category>
|
<#if list_need_category>
|
||||||
|
<#if list_has_popup_dict>
|
||||||
|
import {getPopDictByCode} from "@/utils/dict";
|
||||||
|
import {filterMultiDictText} from "@/utils/dict/JDictSelectUtil";
|
||||||
|
</#if>
|
||||||
import { loadCategoryData } from '/@/api/common/api'
|
import { loadCategoryData } from '/@/api/common/api'
|
||||||
import { getAuthCache, setAuthCache } from '/@/utils/auth';
|
import { getAuthCache, setAuthCache } from '/@/utils/auth';
|
||||||
import { DB_DICT_DATA_KEY } from '/@/enums/cacheEnum';
|
import { DB_DICT_DATA_KEY } from '/@/enums/cacheEnum';
|
||||||
|
@ -158,6 +165,9 @@
|
||||||
beforeFetch: (params) => {
|
beforeFetch: (params) => {
|
||||||
return Object.assign(params, queryParam);
|
return Object.assign(params, queryParam);
|
||||||
},
|
},
|
||||||
|
<#if list_has_popup_dict>
|
||||||
|
afterFetch: afterFetch,
|
||||||
|
</#if>
|
||||||
pagination:{
|
pagination:{
|
||||||
current: 1,
|
current: 1,
|
||||||
pageSize: 5,
|
pageSize: 5,
|
||||||
|
@ -341,6 +351,28 @@
|
||||||
}
|
}
|
||||||
initDictConfig();
|
initDictConfig();
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
|
<#if list_has_popup_dict>
|
||||||
|
/**
|
||||||
|
* 翻译Popup字典配置
|
||||||
|
*/
|
||||||
|
async function afterFetch(records){
|
||||||
|
<#list columns as po>
|
||||||
|
<#if po.isQuery=='Y' || po.isShowList=='Y'>
|
||||||
|
<#if po.classType=='popup_dict' && list_has_popup_dict==true>
|
||||||
|
const ${po.fieldName}Keys = [...new Set(records.map((item) => item['${po.fieldName}']).flatMap((item) => item && item.split(',')))];
|
||||||
|
if(${po.fieldName}Keys && ${po.fieldName}Keys.length){
|
||||||
|
const dictOptions = await getPopDictByCode(${po.fieldName}Keys.join(','), '${po.dictTable},${po.dictField},${po.dictText}');
|
||||||
|
records.forEach((item) => {
|
||||||
|
item['${po.fieldName}_dictText'] = filterMultiDictText(dictOptions, item['${po.fieldName}']);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#list>
|
||||||
|
return records;
|
||||||
|
}
|
||||||
|
</#if>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
|
|
@ -198,6 +198,10 @@
|
||||||
<#if is_range>
|
<#if is_range>
|
||||||
import { cloneDeep } from "lodash-es";
|
import { cloneDeep } from "lodash-es";
|
||||||
</#if>
|
</#if>
|
||||||
|
<#if need_popup_dict>
|
||||||
|
import {getPopDictByCode} from "@/utils/dict";
|
||||||
|
import {filterMultiDictText} from "@/utils/dict/JDictSelectUtil";
|
||||||
|
</#if>
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
const queryParam = reactive<any>({});
|
const queryParam = reactive<any>({});
|
||||||
const checkedKeys = ref<Array<string | number>>([]);
|
const checkedKeys = ref<Array<string | number>>([]);
|
||||||
|
@ -225,6 +229,9 @@
|
||||||
return Object.assign(params, queryParam);
|
return Object.assign(params, queryParam);
|
||||||
</#if>
|
</#if>
|
||||||
},
|
},
|
||||||
|
<#if need_popup_dict>
|
||||||
|
afterFetch: afterFetch,
|
||||||
|
</#if>
|
||||||
pagination: {
|
pagination: {
|
||||||
current: 1,
|
current: 1,
|
||||||
pageSize: 5,
|
pageSize: 5,
|
||||||
|
@ -419,7 +426,27 @@
|
||||||
}
|
}
|
||||||
initDictConfig();
|
initDictConfig();
|
||||||
</#if>
|
</#if>
|
||||||
|
<#if need_popup_dict>
|
||||||
|
/**
|
||||||
|
* 翻译Popup字典配置
|
||||||
|
*/
|
||||||
|
async function afterFetch(records){
|
||||||
|
<#list columns as po>
|
||||||
|
<#if po.isQuery=='Y' || po.isShowList=='Y'>
|
||||||
|
<#if po.classType=='popup_dict' && need_popup_dict==true>
|
||||||
|
const ${po.fieldName}Keys = [...new Set(records.map((item) => item['${po.fieldName}']).flatMap((item) => item && item.split(',')))];
|
||||||
|
if(${po.fieldName}Keys && ${po.fieldName}Keys.length){
|
||||||
|
const dictOptions = await getPopDictByCode(${po.fieldName}Keys.join(','), '${po.dictTable},${po.dictField},${po.dictText}');
|
||||||
|
records.forEach((item) => {
|
||||||
|
item['${po.fieldName}_dictText'] = filterMultiDictText(dictOptions, item['${po.fieldName}']);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#list>
|
||||||
|
return records;
|
||||||
|
}
|
||||||
|
</#if>
|
||||||
/* ----------------------以下为原生查询需要添加的-------------------------- */
|
/* ----------------------以下为原生查询需要添加的-------------------------- */
|
||||||
const toggleSearchStatus = ref<boolean>(false);
|
const toggleSearchStatus = ref<boolean>(false);
|
||||||
const labelCol = reactive({
|
const labelCol = reactive({
|
||||||
|
|
|
@ -44,8 +44,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
<#assign has_multi_query_field=false>
|
<#assign has_multi_query_field=false>
|
||||||
|
|
|
@ -15,8 +15,8 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
import org.jeecg.common.aspect.annotation.Dict;
|
import org.jeecg.common.aspect.annotation.Dict;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: ${tableVo.ftlDescription}
|
* @Description: ${tableVo.ftlDescription}
|
||||||
|
|
|
@ -16,8 +16,8 @@ import org.springframework.format.annotation.DateTimeFormat;
|
||||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import org.jeecg.common.aspect.annotation.Dict;
|
import org.jeecg.common.aspect.annotation.Dict;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -15,8 +15,8 @@ import java.util.Date;
|
||||||
import org.jeecg.common.aspect.annotation.Dict;
|
import org.jeecg.common.aspect.annotation.Dict;
|
||||||
import org.jeecg.common.constant.ProvinceCityArea;
|
import org.jeecg.common.constant.ProvinceCityArea;
|
||||||
import org.jeecg.common.util.SpringContextUtils;
|
import org.jeecg.common.util.SpringContextUtils;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: ${tableVo.ftlDescription}
|
* @Description: ${tableVo.ftlDescription}
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
<#assign list_need_category=false>
|
<#assign list_need_category=false>
|
||||||
<#assign list_need_pca=false>
|
<#assign list_need_pca=false>
|
||||||
<#assign bpm_flag=false>
|
<#assign bpm_flag=false>
|
||||||
|
<#assign list_has_popup_dict=false>
|
||||||
|
|
||||||
<#-- 开始循环 -->
|
<#-- 开始循环 -->
|
||||||
<#list columns as po>
|
<#list columns as po>
|
||||||
|
@ -18,6 +19,9 @@
|
||||||
<#if po.classType=='pca'>
|
<#if po.classType=='pca'>
|
||||||
<#assign list_need_pca=true>
|
<#assign list_need_pca=true>
|
||||||
</#if>
|
</#if>
|
||||||
|
<#if po.classType=='popup_dict'>
|
||||||
|
<#assign list_has_popup_dict=true>
|
||||||
|
</#if>
|
||||||
</#list>
|
</#list>
|
||||||
<#-- 结束循环 -->
|
<#-- 结束循环 -->
|
||||||
<!--引用表格-->
|
<!--引用表格-->
|
||||||
|
@ -111,6 +115,10 @@
|
||||||
<#if bpm_flag==true>
|
<#if bpm_flag==true>
|
||||||
import { startProcess } from '/@/api/common/api';
|
import { startProcess } from '/@/api/common/api';
|
||||||
</#if>
|
</#if>
|
||||||
|
<#if list_has_popup_dict>
|
||||||
|
import {getPopDictByCode} from "@/utils/dict";
|
||||||
|
import {filterMultiDictText} from "@/utils/dict/JDictSelectUtil";
|
||||||
|
</#if>
|
||||||
import { useUserStore } from '/@/store/modules/user';
|
import { useUserStore } from '/@/store/modules/user';
|
||||||
const queryParam = reactive<any>({});
|
const queryParam = reactive<any>({});
|
||||||
// 展开key
|
// 展开key
|
||||||
|
@ -164,6 +172,9 @@
|
||||||
beforeFetch: (params) => {
|
beforeFetch: (params) => {
|
||||||
return Object.assign(params, queryParam);
|
return Object.assign(params, queryParam);
|
||||||
},
|
},
|
||||||
|
<#if list_has_popup_dict>
|
||||||
|
afterFetch: afterFetch
|
||||||
|
</#if>
|
||||||
},
|
},
|
||||||
exportConfig: {
|
exportConfig: {
|
||||||
name:"${tableVo.ftlDescription}",
|
name:"${tableVo.ftlDescription}",
|
||||||
|
@ -348,6 +359,28 @@
|
||||||
}
|
}
|
||||||
initDictConfig();
|
initDictConfig();
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
|
<#if list_has_popup_dict>
|
||||||
|
/**
|
||||||
|
* 翻译Popup字典配置
|
||||||
|
*/
|
||||||
|
async function afterFetch(records){
|
||||||
|
<#list columns as po>
|
||||||
|
<#if po.isQuery=='Y' || po.isShowList=='Y'>
|
||||||
|
<#if po.classType=='popup_dict' && list_has_popup_dict==true>
|
||||||
|
const ${po.fieldName}Keys = [...new Set(records.map((item) => item['${po.fieldName}']).flatMap((item) => item && item.split(',')))];
|
||||||
|
if(${po.fieldName}Keys && ${po.fieldName}Keys.length){
|
||||||
|
const dictOptions = await getPopDictByCode(${po.fieldName}Keys.join(','), '${po.dictTable},${po.dictField},${po.dictText}');
|
||||||
|
records.forEach((item) => {
|
||||||
|
item['${po.fieldName}_dictText'] = filterMultiDictText(dictOptions, item['${po.fieldName}']);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#list>
|
||||||
|
return records;
|
||||||
|
}
|
||||||
|
</#if>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
|
|
@ -44,8 +44,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
|
||||||
|
@ -212,7 +212,7 @@ public class ${entityName}Controller {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
//@AutoLog(value = "${sub.ftlDescription}通过主表ID查询")
|
//@AutoLog(value = "${sub.ftlDescription}通过主表ID查询")
|
||||||
@Operation(summary = "${sub.ftlDescription}-通主表ID查询")
|
@Operation(summary="${sub.ftlDescription}主表ID查询")
|
||||||
@GetMapping(value = "/query${sub.entityName}ByMainId")
|
@GetMapping(value = "/query${sub.entityName}ByMainId")
|
||||||
public Result<List<${sub.entityName}>> query${sub.entityName}ListByMainId(@RequestParam(name="id",required=true) String id) {
|
public Result<List<${sub.entityName}>> 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);
|
List<${sub.entityName}> ${sub.entityName?uncap_first}List = ${sub.entityName?uncap_first}Service.selectByMainId(id);
|
||||||
|
|
|
@ -15,8 +15,8 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
import org.jeecg.common.aspect.annotation.Dict;
|
import org.jeecg.common.aspect.annotation.Dict;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: ${tableVo.ftlDescription}
|
* @Description: ${tableVo.ftlDescription}
|
||||||
|
|
|
@ -16,7 +16,6 @@ import org.springframework.format.annotation.DateTimeFormat;
|
||||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -15,8 +15,8 @@ import java.util.Date;
|
||||||
import org.jeecg.common.aspect.annotation.Dict;
|
import org.jeecg.common.aspect.annotation.Dict;
|
||||||
import org.jeecg.common.constant.ProvinceCityArea;
|
import org.jeecg.common.constant.ProvinceCityArea;
|
||||||
import org.jeecg.common.util.SpringContextUtils;
|
import org.jeecg.common.util.SpringContextUtils;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: ${tableVo.ftlDescription}
|
* @Description: ${tableVo.ftlDescription}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<#assign list_need_category=false>
|
<#assign list_need_category=false>
|
||||||
<#assign list_need_pca=false>
|
<#assign list_need_pca=false>
|
||||||
<#assign bpm_flag=false>
|
<#assign bpm_flag=false>
|
||||||
|
<#assign list_has_popup_dict=false>
|
||||||
<#-- 开始循环 -->
|
<#-- 开始循环 -->
|
||||||
<#list columns as po>
|
<#list columns as po>
|
||||||
<#if po.fieldDbName=='bpm_status'>
|
<#if po.fieldDbName=='bpm_status'>
|
||||||
|
@ -15,6 +15,9 @@
|
||||||
<#if po.classType=='pca'>
|
<#if po.classType=='pca'>
|
||||||
<#assign list_need_pca=true>
|
<#assign list_need_pca=true>
|
||||||
</#if>
|
</#if>
|
||||||
|
<#if po.classType=='popup_dict'>
|
||||||
|
<#assign list_has_popup_dict=true>
|
||||||
|
</#if>
|
||||||
</#list>
|
</#list>
|
||||||
<#-- 结束循环 -->
|
<#-- 结束循环 -->
|
||||||
<!--引用表格-->
|
<!--引用表格-->
|
||||||
|
@ -92,6 +95,10 @@
|
||||||
import { getAuthCache, setAuthCache } from '/@/utils/auth';
|
import { getAuthCache, setAuthCache } from '/@/utils/auth';
|
||||||
import { DB_DICT_DATA_KEY } from '/@/enums/cacheEnum';
|
import { DB_DICT_DATA_KEY } from '/@/enums/cacheEnum';
|
||||||
</#if>
|
</#if>
|
||||||
|
<#if list_has_popup_dict>
|
||||||
|
import {getPopDictByCode} from "@/utils/dict";
|
||||||
|
import {filterMultiDictText} from "@/utils/dict/JDictSelectUtil";
|
||||||
|
</#if>
|
||||||
<#if bpm_flag==true>
|
<#if bpm_flag==true>
|
||||||
import { startProcess } from '/@/api/common/api';
|
import { startProcess } from '/@/api/common/api';
|
||||||
</#if>
|
</#if>
|
||||||
|
@ -146,6 +153,9 @@
|
||||||
beforeFetch: (params) => {
|
beforeFetch: (params) => {
|
||||||
return Object.assign(params, queryParam);
|
return Object.assign(params, queryParam);
|
||||||
},
|
},
|
||||||
|
<#if list_has_popup_dict>
|
||||||
|
afterFetch: afterFetch
|
||||||
|
</#if>
|
||||||
},
|
},
|
||||||
exportConfig: {
|
exportConfig: {
|
||||||
name:"${tableVo.ftlDescription}",
|
name:"${tableVo.ftlDescription}",
|
||||||
|
@ -321,6 +331,28 @@
|
||||||
}
|
}
|
||||||
initDictConfig();
|
initDictConfig();
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
|
<#if list_has_popup_dict>
|
||||||
|
/**
|
||||||
|
* 翻译Popup字典配置
|
||||||
|
*/
|
||||||
|
async function afterFetch(records){
|
||||||
|
<#list columns as po>
|
||||||
|
<#if po.isQuery=='Y' || po.isShowList=='Y'>
|
||||||
|
<#if po.classType=='popup_dict' && list_has_popup_dict==true>
|
||||||
|
const ${po.fieldName}Keys = [...new Set(records.map((item) => item['${po.fieldName}']).flatMap((item) => item && item.split(',')))];
|
||||||
|
if(${po.fieldName}Keys && ${po.fieldName}Keys.length){
|
||||||
|
const dictOptions = await getPopDictByCode(${po.fieldName}Keys.join(','), '${po.dictTable},${po.dictField},${po.dictText}');
|
||||||
|
records.forEach((item) => {
|
||||||
|
item['${po.fieldName}_dictText'] = filterMultiDictText(dictOptions, item['${po.fieldName}']);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#list>
|
||||||
|
return records;
|
||||||
|
}
|
||||||
|
</#if>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
|
|
@ -182,6 +182,10 @@
|
||||||
<#if is_range>
|
<#if is_range>
|
||||||
import { cloneDeep } from "lodash-es";
|
import { cloneDeep } from "lodash-es";
|
||||||
</#if>
|
</#if>
|
||||||
|
<#if need_popup_dict>
|
||||||
|
import {getPopDictByCode} from "@/utils/dict";
|
||||||
|
import {filterMultiDictText} from "@/utils/dict/JDictSelectUtil";
|
||||||
|
</#if>
|
||||||
import { useUserStore } from '/@/store/modules/user';
|
import { useUserStore } from '/@/store/modules/user';
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
const queryParam = reactive<any>({});
|
const queryParam = reactive<any>({});
|
||||||
|
@ -209,6 +213,9 @@
|
||||||
return Object.assign(params, queryParam);
|
return Object.assign(params, queryParam);
|
||||||
</#if>
|
</#if>
|
||||||
},
|
},
|
||||||
|
<#if need_popup_dict>
|
||||||
|
afterFetch: afterFetch,
|
||||||
|
</#if>
|
||||||
},
|
},
|
||||||
exportConfig: {
|
exportConfig: {
|
||||||
name:"${tableVo.ftlDescription}",
|
name:"${tableVo.ftlDescription}",
|
||||||
|
@ -394,6 +401,27 @@
|
||||||
initDictConfig();
|
initDictConfig();
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
|
<#if need_popup_dict>
|
||||||
|
/**
|
||||||
|
* 翻译Popup字典配置
|
||||||
|
*/
|
||||||
|
async function afterFetch(records){
|
||||||
|
<#list columns as po>
|
||||||
|
<#if po.isQuery=='Y' || po.isShowList=='Y'>
|
||||||
|
<#if po.classType=='popup_dict'>
|
||||||
|
const ${po.fieldName}Keys = [...new Set(records.map((item) => item['${po.fieldName}']).flatMap((item) => item && item.split(',')))];
|
||||||
|
if(${po.fieldName}Keys && ${po.fieldName}Keys.length){
|
||||||
|
const dictOptions = await getPopDictByCode(${po.fieldName}Keys.join(','), '${po.dictTable},${po.dictField},${po.dictText}');
|
||||||
|
records.forEach((item) => {
|
||||||
|
item['${po.fieldName}_dictText'] = filterMultiDictText(dictOptions, item['${po.fieldName}']);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#list>
|
||||||
|
return records;
|
||||||
|
}
|
||||||
|
</#if>
|
||||||
/* ----------------------以下为原生查询需要添加的-------------------------- */
|
/* ----------------------以下为原生查询需要添加的-------------------------- */
|
||||||
const toggleSearchStatus = ref<boolean>(false);
|
const toggleSearchStatus = ref<boolean>(false);
|
||||||
const labelCol = reactive({
|
const labelCol = reactive({
|
||||||
|
|
|
@ -44,8 +44,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
<#assign has_multi_query_field=false>
|
<#assign has_multi_query_field=false>
|
||||||
|
@ -200,7 +200,7 @@ public class ${entityName}Controller {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
//@AutoLog(value = "${sub.ftlDescription}通过主表ID查询")
|
//@AutoLog(value = "${sub.ftlDescription}通过主表ID查询")
|
||||||
@Operation(summary = "${sub.ftlDescription}-通主表ID查询")
|
@Operation(summary="${sub.ftlDescription}主表ID查询")
|
||||||
@GetMapping(value = "/query${sub.entityName}ByMainId")
|
@GetMapping(value = "/query${sub.entityName}ByMainId")
|
||||||
public Result<List<${sub.entityName}>> query${sub.entityName}ListByMainId(@RequestParam(name="id",required=true) String id) {
|
public Result<List<${sub.entityName}>> 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);
|
List<${sub.entityName}> ${sub.entityName?uncap_first}List = ${sub.entityName?uncap_first}Service.selectByMainId(id);
|
||||||
|
|
|
@ -15,8 +15,8 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
import org.jeecg.common.aspect.annotation.Dict;
|
import org.jeecg.common.aspect.annotation.Dict;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: ${tableVo.ftlDescription}
|
* @Description: ${tableVo.ftlDescription}
|
||||||
|
|
|
@ -15,8 +15,8 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -15,8 +15,8 @@ import java.util.Date;
|
||||||
import org.jeecg.common.aspect.annotation.Dict;
|
import org.jeecg.common.aspect.annotation.Dict;
|
||||||
import org.jeecg.common.constant.ProvinceCityArea;
|
import org.jeecg.common.constant.ProvinceCityArea;
|
||||||
import org.jeecg.common.util.SpringContextUtils;
|
import org.jeecg.common.util.SpringContextUtils;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: ${tableVo.ftlDescription}
|
* @Description: ${tableVo.ftlDescription}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<#assign list_need_category=false>
|
<#assign list_need_category=false>
|
||||||
<#assign list_need_pca=false>
|
<#assign list_need_pca=false>
|
||||||
<#assign bpm_flag=false>
|
<#assign bpm_flag=false>
|
||||||
|
<#assign list_has_popup_dict=false>
|
||||||
<#-- 开始循环 -->
|
<#-- 开始循环 -->
|
||||||
<#list columns as po>
|
<#list columns as po>
|
||||||
<#if po.fieldDbName=='bpm_status'>
|
<#if po.fieldDbName=='bpm_status'>
|
||||||
|
@ -15,6 +15,9 @@
|
||||||
<#if po.classType=='pca'>
|
<#if po.classType=='pca'>
|
||||||
<#assign list_need_pca=true>
|
<#assign list_need_pca=true>
|
||||||
</#if>
|
</#if>
|
||||||
|
<#if po.classType=='popup_dict'>
|
||||||
|
<#assign list_has_popup_dict=true>
|
||||||
|
</#if>
|
||||||
</#list>
|
</#list>
|
||||||
<#-- 结束循环 -->
|
<#-- 结束循环 -->
|
||||||
<!--引用表格-->
|
<!--引用表格-->
|
||||||
|
@ -92,6 +95,10 @@
|
||||||
import { getAuthCache, setAuthCache } from '/@/utils/auth';
|
import { getAuthCache, setAuthCache } from '/@/utils/auth';
|
||||||
import { DB_DICT_DATA_KEY } from '/@/enums/cacheEnum';
|
import { DB_DICT_DATA_KEY } from '/@/enums/cacheEnum';
|
||||||
</#if>
|
</#if>
|
||||||
|
<#if list_has_popup_dict>
|
||||||
|
import {getPopDictByCode} from "@/utils/dict";
|
||||||
|
import {filterMultiDictText} from "@/utils/dict/JDictSelectUtil";
|
||||||
|
</#if>
|
||||||
<#if bpm_flag==true>
|
<#if bpm_flag==true>
|
||||||
import { startProcess } from '/@/api/common/api';
|
import { startProcess } from '/@/api/common/api';
|
||||||
</#if>
|
</#if>
|
||||||
|
@ -146,6 +153,9 @@
|
||||||
beforeFetch: (params) => {
|
beforeFetch: (params) => {
|
||||||
return Object.assign(params, queryParam);
|
return Object.assign(params, queryParam);
|
||||||
},
|
},
|
||||||
|
<#if list_has_popup_dict>
|
||||||
|
afterFetch: afterFetch
|
||||||
|
</#if>
|
||||||
},
|
},
|
||||||
exportConfig: {
|
exportConfig: {
|
||||||
name:"${tableVo.ftlDescription}",
|
name:"${tableVo.ftlDescription}",
|
||||||
|
@ -320,6 +330,28 @@
|
||||||
}
|
}
|
||||||
initDictConfig();
|
initDictConfig();
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
|
<#if list_has_popup_dict>
|
||||||
|
/**
|
||||||
|
* 翻译Popup字典配置
|
||||||
|
*/
|
||||||
|
async function afterFetch(records){
|
||||||
|
<#list columns as po>
|
||||||
|
<#if po.isQuery=='Y' || po.isShowList=='Y'>
|
||||||
|
<#if po.classType=='popup_dict' && list_has_popup_dict==true>
|
||||||
|
const ${po.fieldName}Keys = [...new Set(records.map((item) => item['${po.fieldName}']).flatMap((item) => item && item.split(',')))];
|
||||||
|
if(${po.fieldName}Keys && ${po.fieldName}Keys.length){
|
||||||
|
const dictOptions = await getPopDictByCode(${po.fieldName}Keys.join(','), '${po.dictTable},${po.dictField},${po.dictText}');
|
||||||
|
records.forEach((item) => {
|
||||||
|
item['${po.fieldName}_dictText'] = filterMultiDictText(dictOptions, item['${po.fieldName}']);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#list>
|
||||||
|
return records;
|
||||||
|
}
|
||||||
|
</#if>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
|
Loading…
Reference in New Issue