Merge branch 'master' of https://gitee.com/y_project/RuoYi-Vue
Conflicts:
pom.xml
ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CaptchaController.java
ruoyi-admin/src/main/resources/application.yml
ruoyi-common/src/main/java/com/ruoyi/common/core/redis/RedisCache.java
ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUploadUtils.java
ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUtils.java
ruoyi-common/src/main/java/com/ruoyi/common/utils/html/EscapeUtil.java
ruoyi-common/src/main/java/com/ruoyi/common/utils/sql/SqlUtil.java
ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java
ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/TokenService.java
ruoyi-generator/src/main/java/com/ruoyi/generator/controller/GenController.java
ruoyi-generator/src/main/java/com/ruoyi/generator/domain/GenTable.java
ruoyi-generator/src/main/java/com/ruoyi/generator/service/GenTableServiceImpl.java
ruoyi-generator/src/main/java/com/ruoyi/generator/service/IGenTableService.java
ruoyi-generator/src/main/java/com/ruoyi/generator/util/VelocityUtils.java
ruoyi-generator/src/main/resources/mapper/generator/GenTableMapper.xml
ruoyi-generator/src/main/resources/vm/vue/index.vue.vm
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysMenuMapper.java
ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml
ruoyi-ui/babel.config.js
ruoyi-ui/package.json
ruoyi-ui/src/api/tool/gen.js
ruoyi-ui/src/assets/styles/ruoyi.scss
ruoyi-ui/src/components/HeaderSearch/index.vue
ruoyi-ui/src/layout/components/TagsView/ScrollPane.vue
ruoyi-ui/src/main.js
ruoyi-ui/src/utils/ruoyi.js
ruoyi-ui/src/views/login.vue
ruoyi-ui/src/views/monitor/job/index.vue
ruoyi-ui/src/views/monitor/logininfor/index.vue
ruoyi-ui/src/views/monitor/online/index.vue
ruoyi-ui/src/views/monitor/operlog/index.vue
ruoyi-ui/src/views/system/config/index.vue
ruoyi-ui/src/views/system/dept/index.vue
ruoyi-ui/src/views/system/dict/data.vue
ruoyi-ui/src/views/system/dict/index.vue
ruoyi-ui/src/views/system/menu/index.vue
ruoyi-ui/src/views/system/notice/index.vue
ruoyi-ui/src/views/system/post/index.vue
ruoyi-ui/src/views/system/role/index.vue
ruoyi-ui/src/views/system/user/index.vue
ruoyi-ui/src/views/tool/gen/genInfoForm.vue
ruoyi-ui/src/views/tool/gen/index.vue
ruoyi-ui/vue.config.js
sql/ry_20200724.sql
已修改53个文件
已添加2个文件
已重命名1个文件
| | |
| | | <druid.version>1.1.14</druid.version>
|
| | | <bitwalker.version>1.19</bitwalker.version>
|
| | | <swagger.version>2.9.2</swagger.version>
|
| | | <kaptcha.version>2.3.2</kaptcha.version>
|
| | | <pagehelper.boot.version>1.2.5</pagehelper.boot.version>
|
| | | <fastjson.version>1.2.70</fastjson.version>
|
| | | <oshi.version>3.9.1</oshi.version>
|
| | |
| | | <version>${jwt.version}</version>
|
| | | </dependency>
|
| | |
|
| | | <!--éªè¯ç -->
|
| | | <dependency>
|
| | | <groupId>com.github.penggle</groupId>
|
| | | <artifactId>kaptcha</artifactId>
|
| | | <version>${kaptcha.version}</version>
|
| | | </dependency>
|
| | |
|
| | | <dependency>
|
| | | <groupId>com.baomidou</groupId>
|
| | | <artifactId>mybatis-plus-boot-starter</artifactId>
|
| | |
| | | <artifactId>hutool-all</artifactId>
|
| | | <version>${hutool.version}</version>
|
| | | </dependency>
|
| | | |
| | |
|
| | | <!-- 宿¶ä»»å¡-->
|
| | | <dependency>
|
| | | <groupId>com.ruoyi</groupId>
|
| | |
| | | package com.ruoyi.web.controller.common; |
| | | |
| | | import java.io.ByteArrayOutputStream; |
| | | import java.awt.image.BufferedImage; |
| | | import java.io.IOException; |
| | | import java.util.concurrent.TimeUnit; |
| | | import javax.annotation.Resource; |
| | | import javax.imageio.ImageIO; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.util.FastByteArrayOutputStream; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.google.code.kaptcha.Producer; |
| | | import com.ruoyi.common.constant.Constants; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.core.redis.RedisCache; |
| | | import com.ruoyi.common.utils.VerifyCodeUtils; |
| | | import com.ruoyi.common.utils.sign.Base64; |
| | | import com.ruoyi.common.utils.uuid.IdUtils; |
| | | |
| | |
| | | @RestController |
| | | public class CaptchaController |
| | | { |
| | | @Resource(name = "captchaProducer") |
| | | private Producer captchaProducer; |
| | | |
| | | @Resource(name = "captchaProducerMath") |
| | | private Producer captchaProducerMath; |
| | | |
| | | @Autowired |
| | | private RedisCache redisCache; |
| | | |
| | | // éªè¯ç ç±»å |
| | | @Value("${ruoyi.captchaType}") |
| | | private String captchaType; |
| | | |
| | | /** |
| | | * çæéªè¯ç |
| | |
| | | @GetMapping("/captchaImage") |
| | | public AjaxResult getCode(HttpServletResponse response) throws IOException |
| | | { |
| | | // çæéæºå串 |
| | | String verifyCode = VerifyCodeUtils.generateVerifyCode(4); |
| | | // å¯ä¸æ è¯ |
| | | // ä¿åéªè¯ç ä¿¡æ¯ |
| | | String uuid = IdUtils.simpleUUID(); |
| | | String verifyKey = Constants.CAPTCHA_CODE_KEY + uuid; |
| | | |
| | | redisCache.setCacheObject(verifyKey, verifyCode, Constants.CAPTCHA_EXPIRATION, TimeUnit.MINUTES); |
| | | // çæå¾ç |
| | | int w = 111, h = 36; |
| | | ByteArrayOutputStream stream = new ByteArrayOutputStream(); |
| | | VerifyCodeUtils.outputImage(w, h, stream, verifyCode); |
| | | String capStr = null, code = null; |
| | | BufferedImage image = null; |
| | | |
| | | // çæéªè¯ç |
| | | if ("math".equals(captchaType)) |
| | | { |
| | | String capText = captchaProducerMath.createText(); |
| | | capStr = capText.substring(0, capText.lastIndexOf("@")); |
| | | code = capText.substring(capText.lastIndexOf("@") + 1); |
| | | image = captchaProducerMath.createImage(capStr); |
| | | } |
| | | else if ("char".equals(captchaType)) |
| | | { |
| | | capStr = code = captchaProducer.createText(); |
| | | image = captchaProducer.createImage(capStr); |
| | | } |
| | | |
| | | redisCache.setCacheObject(verifyKey, code, Constants.CAPTCHA_EXPIRATION, TimeUnit.MINUTES); |
| | | // è½¬æ¢æµä¿¡æ¯ååº |
| | | FastByteArrayOutputStream os = new FastByteArrayOutputStream(); |
| | | try |
| | | { |
| | | AjaxResult ajax = AjaxResult.success(); |
| | | ajax.put("uuid", uuid); |
| | | ajax.put("img", Base64.encode(stream.toByteArray())); |
| | | return ajax; |
| | | ImageIO.write(image, "jpg", os); |
| | | } |
| | | catch (Exception e) |
| | | catch (IOException e) |
| | | { |
| | | e.printStackTrace(); |
| | | return AjaxResult.error(e.getMessage()); |
| | | } |
| | | finally |
| | | { |
| | | stream.close(); |
| | | } |
| | | |
| | | AjaxResult ajax = AjaxResult.success(); |
| | | ajax.put("uuid", uuid); |
| | | ajax.put("img", Base64.encode(os.toByteArray())); |
| | | return ajax; |
| | | } |
| | | } |
| | |
| | | profile: D:/ruoyi/uploadPath |
| | | # è·åipå°åå¼å
³ |
| | | addressEnabled: false |
| | | # éªè¯ç ç±»å math æ°ç»è®¡ç® char å符éªè¯ |
| | | captchaType: math |
| | | |
| | | # å¼åç¯å¢é
ç½® |
| | | server: |
| | |
| | | public String readConverterExp() default "";
|
| | |
|
| | | /**
|
| | | * åé符ï¼è¯»åå符串ç»å
容
|
| | | */
|
| | | public String separator() default ",";
|
| | |
|
| | | /**
|
| | | * 导åºç±»åï¼0æ°å 1å符串ï¼
|
| | | */
|
| | | public ColumnType cellType() default ColumnType.STRING;
|
| | |
| | | |
| | | /** |
| | | * spring redis å·¥å
·ç±» |
| | | * |
| | | * |
| | | * @author ruoyi |
| | | **/ |
| | | @SuppressWarnings(value = { "unchecked", "rawtypes" }) |
| | |
| | | * ç¼åListæ°æ® |
| | | * |
| | | * @param key ç¼åçé®å¼ |
| | | * @param values å¾
ç¼åçListæ°æ® |
| | | * @param dataList å¾
ç¼åçListæ°æ® |
| | | * @return ç¼åç对象 |
| | | */ |
| | | public <T> long setCacheList(final String key, final List<T> dataList) |
| | |
| | | |
| | | /** |
| | | * è·å¾ç¼åçåºæ¬å¯¹è±¡å表 |
| | | * |
| | | * |
| | | * @param pattern å符串åç¼ |
| | | * @return 对象å表 |
| | | */ |
| | |
| | | public class DictUtils
|
| | | {
|
| | | /**
|
| | | * åé符
|
| | | */
|
| | | public static final String SEPARATOR = ",";
|
| | |
|
| | | /**
|
| | | * 设置åå
¸ç¼å
|
| | | *
|
| | | * @param key åæ°é®
|
| | |
| | | Object cacheObj = SpringUtils.getBean(RedisCache.class).getCacheObject(getCacheKey(key));
|
| | | if (StringUtils.isNotNull(cacheObj))
|
| | | {
|
| | | List<SysDictData> DictDatas = StringUtils.cast(cacheObj);
|
| | | return DictDatas;
|
| | | List<SysDictData> dictDatas = StringUtils.cast(cacheObj);
|
| | | return dictDatas;
|
| | | }
|
| | | return null;
|
| | | }
|
| | |
| | | */
|
| | | public static String getDictLabel(String dictType, String dictValue)
|
| | | {
|
| | | if (StringUtils.isNotEmpty(dictType) && StringUtils.isNotEmpty(dictValue))
|
| | | {
|
| | | List<SysDictData> datas = getDictCache(dictType);
|
| | | if (StringUtils.isNotEmpty(datas))
|
| | | {
|
| | | for (SysDictData dict : datas)
|
| | | {
|
| | | if (dictValue.equals(dict.getDictValue()))
|
| | | {
|
| | | return dict.getDictLabel();
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | return dictValue;
|
| | | return getDictLabel(dictType, dictValue, SEPARATOR);
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | */
|
| | | public static String getDictValue(String dictType, String dictLabel)
|
| | | {
|
| | | if (StringUtils.isNotEmpty(dictType) && StringUtils.isNotEmpty(dictLabel))
|
| | | return getDictValue(dictType, dictLabel, SEPARATOR);
|
| | | }
|
| | |
|
| | | /**
|
| | | * æ ¹æ®åå
¸ç±»åååå
¸å¼è·ååå
¸æ ç¾
|
| | | * |
| | | * @param dictType åå
¸ç±»å
|
| | | * @param dictValue åå
¸å¼
|
| | | * @param separator åé符
|
| | | * @return åå
¸æ ç¾
|
| | | */
|
| | | public static String getDictLabel(String dictType, String dictValue, String separator)
|
| | | {
|
| | | StringBuilder propertyString = new StringBuilder();
|
| | | List<SysDictData> datas = getDictCache(dictType);
|
| | |
|
| | | if (StringUtils.containsAny(separator, dictValue) && StringUtils.isNotEmpty(datas))
|
| | | {
|
| | | List<SysDictData> datas = getDictCache(dictType);
|
| | | if (StringUtils.isNotEmpty(datas))
|
| | | for (SysDictData dict : datas)
|
| | | {
|
| | | for (SysDictData dict : datas)
|
| | | for (String value : dictValue.split(separator))
|
| | | {
|
| | | if (dictLabel.equals(dict.getDictLabel()))
|
| | | if (value.equals(dict.getDictValue()))
|
| | | {
|
| | | return dict.getDictValue();
|
| | | propertyString.append(dict.getDictLabel() + separator);
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | return dictLabel;
|
| | | else
|
| | | {
|
| | | for (SysDictData dict : datas)
|
| | | {
|
| | | if (dictValue.equals(dict.getDictValue()))
|
| | | {
|
| | | return dict.getDictLabel();
|
| | | }
|
| | | }
|
| | | }
|
| | | return StringUtils.stripEnd(propertyString.toString(), separator);
|
| | | }
|
| | |
|
| | | /**
|
| | | * æ ¹æ®åå
¸ç±»åååå
¸æ ç¾è·ååå
¸å¼
|
| | | * |
| | | * @param dictType åå
¸ç±»å
|
| | | * @param dictLabel åå
¸æ ç¾
|
| | | * @param separator åé符
|
| | | * @return åå
¸å¼
|
| | | */
|
| | | public static String getDictValue(String dictType, String dictLabel, String separator)
|
| | | {
|
| | | StringBuilder propertyString = new StringBuilder();
|
| | | List<SysDictData> datas = getDictCache(dictType);
|
| | |
|
| | | if (StringUtils.containsAny(separator, dictLabel) && StringUtils.isNotEmpty(datas))
|
| | | {
|
| | | for (SysDictData dict : datas)
|
| | | {
|
| | | for (String label : dictLabel.split(separator))
|
| | | {
|
| | | if (label.equals(dict.getDictLabel()))
|
| | | {
|
| | | propertyString.append(dict.getDictValue() + separator);
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | for (SysDictData dict : datas)
|
| | | {
|
| | | if (dictLabel.equals(dict.getDictLabel()))
|
| | | {
|
| | | return dict.getDictValue();
|
| | | }
|
| | | }
|
| | | }
|
| | | return StringUtils.stripEnd(propertyString.toString(), separator);
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | |
| | | /** |
| | | * æä»¶ä¸ä¼ å·¥å
·ç±» |
| | | * |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public class FileUploadUtils |
| | |
| | | * |
| | | * @param baseDir ç¸å¯¹åºç¨çåºç®å½ |
| | | * @param file ä¸ä¼ çæä»¶ |
| | | * @param extension ä¸ä¼ æä»¶ç±»å |
| | | * @param allowedExtension ä¸ä¼ æä»¶ç±»å |
| | | * @return è¿åä¸ä¼ æåçæä»¶å |
| | | * @throws FileSizeLimitExceededException 妿è¶
åºæå¤§å¤§å° |
| | | * @throws FileNameLengthLimitExceededException æä»¶åå¤ªé¿ |
| | |
| | | |
| | | /** |
| | | * è·åæä»¶åçåç¼ |
| | | * |
| | | * |
| | | * @param file 表åæä»¶ |
| | | * @return åç¼å |
| | | */ |
| | |
| | | } |
| | | return extension; |
| | | } |
| | | } |
| | | } |
| | |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public class FileUtils |
| | | public class FileUtils extends org.apache.commons.io.FileUtils |
| | | { |
| | | public static String FILENAME_PATTERN = "[a-zA-Z0-9_\\-\\|\\.\\u4e00-\\u9fa5]+"; |
| | | |
| | |
| | | |
| | | public static void main(String[] args) |
| | | { |
| | | String html = "alert('11111');"; |
| | | String html = "<script>alert(1);</script>"; |
| | | // String html = "<scr<script>ipt>alert(\"XSS\")</scr<script>ipt>"; |
| | | // String html = "<123"; |
| | | // String html = "123>"; |
| | | System.out.println(EscapeUtil.clean(html)); |
| | | System.out.println(EscapeUtil.escape(html)); |
| | | System.out.println(EscapeUtil.unescape(html)); |
| | |
| | | vAllowedEntities = new String[] { "amp", "gt", "lt", "quot" };
|
| | | stripComment = true;
|
| | | encodeQuotes = true;
|
| | | alwaysMakeTags = true;
|
| | | alwaysMakeTags = false;
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | |
|
| | | s = processRemoveBlanks(s);
|
| | |
|
| | | s = validateEntities(s);
|
| | | // s = validateEntities(s);
|
| | |
|
| | | return s;
|
| | | }
|
| | |
| | | // try and form html
|
| | | //
|
| | | s = regexReplace(P_END_ARROW, "", s);
|
| | | // ä¸è¿½å ç»ææ ç¾
|
| | | s = regexReplace(P_BODY_TO_END, "<$1>", s);
|
| | | s = regexReplace(P_XML_CONTENT, "$1<$2", s);
|
| | |
|
| | |
| | | import java.lang.reflect.Field;
|
| | | import java.lang.reflect.Method;
|
| | | import java.math.BigDecimal;
|
| | | import java.text.DecimalFormat;
|
| | | import java.util.ArrayList;
|
| | | import java.util.Arrays;
|
| | | import java.util.Comparator;
|
| | |
| | | // 设置类çç§æåæ®µå±æ§å¯è®¿é®.
|
| | | field.setAccessible(true);
|
| | | Integer column = cellMap.get(attr.name());
|
| | | fieldsMap.put(column, field);
|
| | | if (column != null)
|
| | | {
|
| | | fieldsMap.put(column, field);
|
| | | }
|
| | | }
|
| | | }
|
| | | for (int i = 1; i < rows; i++)
|
| | |
| | | }
|
| | | else if (StringUtils.isNotEmpty(attr.readConverterExp()))
|
| | | {
|
| | | val = reverseByExp(Convert.toStr(val), attr.readConverterExp());
|
| | | val = reverseByExp(Convert.toStr(val), attr.readConverterExp(), attr.separator());
|
| | | }
|
| | | else if (StringUtils.isNotEmpty(attr.dictType()))
|
| | | {
|
| | | val = reverseDictByExp(attr.dictType(), Convert.toStr(val));
|
| | | val = reverseDictByExp(Convert.toStr(val), attr.dictType(), attr.separator());
|
| | | }
|
| | | ReflectUtils.invokeSetter(entity, propertyName, val);
|
| | | }
|
| | |
| | | Object value = getTargetValue(vo, field, attr);
|
| | | String dateFormat = attr.dateFormat();
|
| | | String readConverterExp = attr.readConverterExp();
|
| | | String separator = attr.separator();
|
| | | String dictType = attr.dictType();
|
| | | if (StringUtils.isNotEmpty(dateFormat) && StringUtils.isNotNull(value))
|
| | | {
|
| | |
| | | }
|
| | | else if (StringUtils.isNotEmpty(readConverterExp) && StringUtils.isNotNull(value))
|
| | | {
|
| | | cell.setCellValue(convertByExp(Convert.toStr(value), readConverterExp));
|
| | | cell.setCellValue(convertByExp(Convert.toStr(value), readConverterExp, separator));
|
| | | }
|
| | | else if (StringUtils.isNotEmpty(dictType))
|
| | | {
|
| | | cell.setCellValue(convertDictByExp(dictType, Convert.toStr(value)));
|
| | | cell.setCellValue(convertDictByExp(Convert.toStr(value), dictType, separator));
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | *
|
| | | * @param propertyValue åæ°å¼
|
| | | * @param converterExp ç¿»è¯æ³¨è§£
|
| | | * @param separator åé符
|
| | | * @return è§£æåå¼
|
| | | * @throws Exception
|
| | | */
|
| | | public static String convertByExp(String propertyValue, String converterExp) throws Exception
|
| | | public static String convertByExp(String propertyValue, String converterExp, String separator)
|
| | | {
|
| | | try
|
| | | StringBuilder propertyString = new StringBuilder();
|
| | | String[] convertSource = converterExp.split(",");
|
| | | for (String item : convertSource)
|
| | | {
|
| | | String[] convertSource = converterExp.split(",");
|
| | | for (String item : convertSource)
|
| | | String[] itemArray = item.split("=");
|
| | | if (StringUtils.containsAny(separator, propertyValue))
|
| | | {
|
| | | String[] itemArray = item.split("=");
|
| | | for (String value : propertyValue.split(separator))
|
| | | {
|
| | | if (itemArray[0].equals(value))
|
| | | {
|
| | | propertyString.append(itemArray[1] + separator);
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | if (itemArray[0].equals(propertyValue))
|
| | | {
|
| | | return itemArray[1];
|
| | | }
|
| | | }
|
| | | }
|
| | | catch (Exception e)
|
| | | {
|
| | | throw e;
|
| | | }
|
| | | return propertyValue;
|
| | | return StringUtils.stripEnd(propertyString.toString(), separator);
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | *
|
| | | * @param propertyValue åæ°å¼
|
| | | * @param converterExp ç¿»è¯æ³¨è§£
|
| | | * @param separator åé符
|
| | | * @return è§£æåå¼
|
| | | * @throws Exception
|
| | | */
|
| | | public static String reverseByExp(String propertyValue, String converterExp) throws Exception
|
| | | public static String reverseByExp(String propertyValue, String converterExp, String separator)
|
| | | {
|
| | | try
|
| | | StringBuilder propertyString = new StringBuilder();
|
| | | String[] convertSource = converterExp.split(",");
|
| | | for (String item : convertSource)
|
| | | {
|
| | | String[] convertSource = converterExp.split(",");
|
| | | for (String item : convertSource)
|
| | | String[] itemArray = item.split("=");
|
| | | if (StringUtils.containsAny(separator, propertyValue))
|
| | | {
|
| | | String[] itemArray = item.split("=");
|
| | | for (String value : propertyValue.split(separator))
|
| | | {
|
| | | if (itemArray[1].equals(value))
|
| | | {
|
| | | propertyString.append(itemArray[0] + separator);
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | if (itemArray[1].equals(propertyValue))
|
| | | {
|
| | | return itemArray[0];
|
| | | }
|
| | | }
|
| | | }
|
| | | catch (Exception e)
|
| | | {
|
| | | throw e;
|
| | | }
|
| | | return propertyValue;
|
| | | return StringUtils.stripEnd(propertyString.toString(), separator);
|
| | | }
|
| | |
|
| | | /**
|
| | | * è§£æåå
¸å¼
|
| | | *
|
| | | * @param dictType åå
¸ç±»å
|
| | | * @param dictValue åå
¸å¼
|
| | | * @param dictType åå
¸ç±»å
|
| | | * @param separator åé符
|
| | | * @return åå
¸æ ç¾
|
| | | */
|
| | | public static String convertDictByExp(String dictType, String dictValue) throws Exception
|
| | | public static String convertDictByExp(String dictValue, String dictType, String separator)
|
| | | {
|
| | | return DictUtils.getDictLabel(dictType, dictValue);
|
| | | return DictUtils.getDictLabel(dictType, dictValue, separator);
|
| | | }
|
| | |
|
| | | /**
|
| | | * ååè§£æå¼åå
¸å¼
|
| | | *
|
| | | * @param dictLabel åå
¸æ ç¾
|
| | | * @param dictType åå
¸ç±»å
|
| | | * @param dictValue åå
¸æ ç¾
|
| | | * @param separator åé符
|
| | | * @return åå
¸å¼
|
| | | */
|
| | | public static String reverseDictByExp(String dictType, String dictLabel) throws Exception
|
| | | public static String reverseDictByExp(String dictLabel, String dictType, String separator)
|
| | | {
|
| | | return DictUtils.getDictValue(dictType, dictLabel);
|
| | | return DictUtils.getDictValue(dictType, dictLabel, separator);
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | if ((Double) val % 1 > 0)
|
| | | {
|
| | | val = new DecimalFormat("0.00").format(val);
|
| | | }
|
| | | else
|
| | | {
|
| | | val = new DecimalFormat("0").format(val);
|
| | | }
|
| | | val = new BigDecimal(val.toString()); // æµ®ç¹æ ¼å¼å¤ç
|
| | | }
|
| | | }
|
| | | else if (cell.getCellTypeEnum() == CellType.STRING)
|
| | |
| | | package com.ruoyi.common.utils.sql; |
| | | |
| | | import com.ruoyi.common.exception.BaseException; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | |
| | | /** |
| | |
| | | public class SqlUtil |
| | | { |
| | | /** |
| | | * ä»
æ¯æåæ¯ãæ°åãä¸å线ãç©ºæ ¼ãéå·ï¼æ¯æå¤ä¸ªå段æåºï¼ |
| | | * ä»
æ¯æåæ¯ãæ°åãä¸å线ãç©ºæ ¼ãéå·ãå°æ°ç¹ï¼æ¯æå¤ä¸ªå段æåºï¼ |
| | | */ |
| | | public static String SQL_PATTERN = "[a-zA-Z0-9_\\ \\,]+"; |
| | | public static String SQL_PATTERN = "[a-zA-Z0-9_\\ \\,\\.]+"; |
| | | |
| | | /** |
| | | * æ£æ¥å符ï¼é²æ¢æ³¨å
¥ç»è¿ |
| | |
| | | { |
| | | if (StringUtils.isNotEmpty(value) && !isValidOrderBySql(value)) |
| | | { |
| | | return StringUtils.EMPTY; |
| | | throw new BaseException("åæ°ä¸ç¬¦åè§èï¼ä¸è½è¿è¡æ¥è¯¢"); |
| | | } |
| | | return value; |
| | | } |
| | |
| | | <artifactId>druid-spring-boot-starter</artifactId>
|
| | | </dependency>
|
| | |
|
| | | <!-- éªè¯ç -->
|
| | | <dependency>
|
| | | <groupId>com.github.penggle</groupId>
|
| | | <artifactId>kaptcha</artifactId>
|
| | | <exclusions>
|
| | | <exclusion>
|
| | | <artifactId>javax.servlet-api</artifactId>
|
| | | <groupId>javax.servlet</groupId>
|
| | | </exclusion>
|
| | | </exclusions>
|
| | | </dependency>
|
| | |
|
| | | <!-- è·åç³»ç»ä¿¡æ¯ -->
|
| | | <dependency>
|
| | | <groupId>com.github.oshi</groupId>
|
| | |
| | | |
| | | /** |
| | | * æ°æ®è¿æ»¤å¤ç |
| | | * |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | @Aspect |
| | |
| | | |
| | | /** |
| | | * æ°æ®èå´è¿æ»¤ |
| | | * |
| | | * |
| | | * @param joinPoint åç¹ |
| | | * @param user ç¨æ· |
| | | * @param alias å«å |
| | | * @param userAlias å«å |
| | | */ |
| | | public static void dataScopeFilter(JoinPoint joinPoint, SysUser user, String deptAlias, String userAlias) |
| | | { |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.framework.config; |
| | | |
| | | import java.util.Properties; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import com.google.code.kaptcha.impl.DefaultKaptcha; |
| | | import com.google.code.kaptcha.util.Config; |
| | | import static com.google.code.kaptcha.Constants.*; |
| | | |
| | | /** |
| | | * éªè¯ç é
ç½® |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | @Configuration |
| | | public class CaptchaConfig |
| | | { |
| | | @Bean(name = "captchaProducer") |
| | | public DefaultKaptcha getKaptchaBean() |
| | | { |
| | | DefaultKaptcha defaultKaptcha = new DefaultKaptcha(); |
| | | Properties properties = new Properties(); |
| | | // æ¯å¦æè¾¹æ¡ é»è®¤ä¸ºtrue æä»¬å¯ä»¥èªå·±è®¾ç½®yesï¼no |
| | | properties.setProperty(KAPTCHA_BORDER, "yes"); |
| | | // éªè¯ç ææ¬å符é¢è² é»è®¤ä¸ºColor.BLACK |
| | | properties.setProperty(KAPTCHA_TEXTPRODUCER_FONT_COLOR, "black"); |
| | | // éªè¯ç å¾ç宽度 é»è®¤ä¸º200 |
| | | properties.setProperty(KAPTCHA_IMAGE_WIDTH, "160"); |
| | | // éªè¯ç å¾çé«åº¦ é»è®¤ä¸º50 |
| | | properties.setProperty(KAPTCHA_IMAGE_HEIGHT, "60"); |
| | | // éªè¯ç ææ¬åç¬¦å¤§å° é»è®¤ä¸º40 |
| | | properties.setProperty(KAPTCHA_TEXTPRODUCER_FONT_SIZE, "38"); |
| | | // KAPTCHA_SESSION_KEY |
| | | properties.setProperty(KAPTCHA_SESSION_CONFIG_KEY, "kaptchaCode"); |
| | | // éªè¯ç ææ¬å符é¿åº¦ é»è®¤ä¸º5 |
| | | properties.setProperty(KAPTCHA_TEXTPRODUCER_CHAR_LENGTH, "4"); |
| | | // éªè¯ç ææ¬å使 ·å¼ é»è®¤ä¸ºnew Font("Arial", 1, fontSize), new Font("Courier", 1, fontSize) |
| | | properties.setProperty(KAPTCHA_TEXTPRODUCER_FONT_NAMES, "Arial,Courier"); |
| | | // å¾çæ ·å¼ æ°´çº¹com.google.code.kaptcha.impl.WaterRipple é±¼ç¼com.google.code.kaptcha.impl.FishEyeGimpy é´å½±com.google.code.kaptcha.impl.ShadowGimpy |
| | | properties.setProperty(KAPTCHA_OBSCURIFICATOR_IMPL, "com.google.code.kaptcha.impl.ShadowGimpy"); |
| | | Config config = new Config(properties); |
| | | defaultKaptcha.setConfig(config); |
| | | return defaultKaptcha; |
| | | } |
| | | |
| | | @Bean(name = "captchaProducerMath") |
| | | public DefaultKaptcha getKaptchaBeanMath() |
| | | { |
| | | DefaultKaptcha defaultKaptcha = new DefaultKaptcha(); |
| | | Properties properties = new Properties(); |
| | | // æ¯å¦æè¾¹æ¡ é»è®¤ä¸ºtrue æä»¬å¯ä»¥èªå·±è®¾ç½®yesï¼no |
| | | properties.setProperty(KAPTCHA_BORDER, "yes"); |
| | | // è¾¹æ¡é¢è² é»è®¤ä¸ºColor.BLACK |
| | | properties.setProperty(KAPTCHA_BORDER_COLOR, "105,179,90"); |
| | | // éªè¯ç ææ¬å符é¢è² é»è®¤ä¸ºColor.BLACK |
| | | properties.setProperty(KAPTCHA_TEXTPRODUCER_FONT_COLOR, "blue"); |
| | | // éªè¯ç å¾ç宽度 é»è®¤ä¸º200 |
| | | properties.setProperty(KAPTCHA_IMAGE_WIDTH, "160"); |
| | | // éªè¯ç å¾çé«åº¦ é»è®¤ä¸º50 |
| | | properties.setProperty(KAPTCHA_IMAGE_HEIGHT, "60"); |
| | | // éªè¯ç ææ¬åç¬¦å¤§å° é»è®¤ä¸º40 |
| | | properties.setProperty(KAPTCHA_TEXTPRODUCER_FONT_SIZE, "35"); |
| | | // KAPTCHA_SESSION_KEY |
| | | properties.setProperty(KAPTCHA_SESSION_CONFIG_KEY, "kaptchaCodeMath"); |
| | | // éªè¯ç ææ¬çæå¨ |
| | | properties.setProperty(KAPTCHA_TEXTPRODUCER_IMPL, "com.ruoyi.framework.config.KaptchaTextCreator"); |
| | | // éªè¯ç ææ¬å符é´è· é»è®¤ä¸º2 |
| | | properties.setProperty(KAPTCHA_TEXTPRODUCER_CHAR_SPACE, "3"); |
| | | // éªè¯ç ææ¬å符é¿åº¦ é»è®¤ä¸º5 |
| | | properties.setProperty(KAPTCHA_TEXTPRODUCER_CHAR_LENGTH, "6"); |
| | | // éªè¯ç ææ¬å使 ·å¼ é»è®¤ä¸ºnew Font("Arial", 1, fontSize), new Font("Courier", 1, fontSize) |
| | | properties.setProperty(KAPTCHA_TEXTPRODUCER_FONT_NAMES, "Arial,Courier"); |
| | | // éªè¯ç åªç¹é¢è² é»è®¤ä¸ºColor.BLACK |
| | | properties.setProperty(KAPTCHA_NOISE_COLOR, "white"); |
| | | // å¹²æ°å®ç°ç±» |
| | | properties.setProperty(KAPTCHA_NOISE_IMPL, "com.google.code.kaptcha.impl.NoNoise"); |
| | | // å¾çæ ·å¼ æ°´çº¹com.google.code.kaptcha.impl.WaterRipple é±¼ç¼com.google.code.kaptcha.impl.FishEyeGimpy é´å½±com.google.code.kaptcha.impl.ShadowGimpy |
| | | properties.setProperty(KAPTCHA_OBSCURIFICATOR_IMPL, "com.google.code.kaptcha.impl.ShadowGimpy"); |
| | | Config config = new Config(properties); |
| | | defaultKaptcha.setConfig(config); |
| | | return defaultKaptcha; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.framework.config; |
| | | |
| | | import java.util.Random; |
| | | import com.google.code.kaptcha.text.impl.DefaultTextCreator; |
| | | |
| | | /** |
| | | * éªè¯ç ææ¬çæå¨ |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public class KaptchaTextCreator extends DefaultTextCreator |
| | | { |
| | | private static final String[] CNUMBERS = "0,1,2,3,4,5,6,7,8,9,10".split(","); |
| | | |
| | | @Override |
| | | public String getText() |
| | | { |
| | | Integer result = 0; |
| | | Random random = new Random(); |
| | | int x = random.nextInt(10); |
| | | int y = random.nextInt(10); |
| | | StringBuilder suChinese = new StringBuilder(); |
| | | int randomoperands = (int) Math.round(Math.random() * 2); |
| | | if (randomoperands == 0) |
| | | { |
| | | result = x * y; |
| | | suChinese.append(CNUMBERS[x]); |
| | | suChinese.append("*"); |
| | | suChinese.append(CNUMBERS[y]); |
| | | } |
| | | else if (randomoperands == 1) |
| | | { |
| | | if (!(x == 0) && y % x == 0) |
| | | { |
| | | result = y / x; |
| | | suChinese.append(CNUMBERS[y]); |
| | | suChinese.append("/"); |
| | | suChinese.append(CNUMBERS[x]); |
| | | } |
| | | else |
| | | { |
| | | result = x + y; |
| | | suChinese.append(CNUMBERS[x]); |
| | | suChinese.append("+"); |
| | | suChinese.append(CNUMBERS[y]); |
| | | } |
| | | } |
| | | else if (randomoperands == 2) |
| | | { |
| | | if (x >= y) |
| | | { |
| | | result = x - y; |
| | | suChinese.append(CNUMBERS[x]); |
| | | suChinese.append("-"); |
| | | suChinese.append(CNUMBERS[y]); |
| | | } |
| | | else |
| | | { |
| | | result = y - x; |
| | | suChinese.append(CNUMBERS[y]); |
| | | suChinese.append("-"); |
| | | suChinese.append(CNUMBERS[x]); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | result = x + y; |
| | | suChinese.append(CNUMBERS[x]); |
| | | suChinese.append("+"); |
| | | suChinese.append(CNUMBERS[y]); |
| | | } |
| | | suChinese.append("=?@" + result); |
| | | return suChinese.toString(); |
| | | } |
| | | } |
| | |
| | |
|
| | | /**
|
| | | * 鲿¢éå¤æäº¤æ¦æªå¨
|
| | | * |
| | | *
|
| | | * @author ruoyi
|
| | | */
|
| | | @Component
|
| | |
| | |
|
| | | /**
|
| | | * éªè¯æ¯å¦éå¤æäº¤ç±åç±»å®ç°å
·ä½çé²éå¤æäº¤çè§å
|
| | | * |
| | | * @param httpServletRequest
|
| | | *
|
| | | * @param request
|
| | | * @return
|
| | | * @throws Exception
|
| | | */
|
| | |
| | | |
| | | /** |
| | | * tokenéªè¯å¤ç |
| | | * |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | @Component |
| | |
| | | |
| | | /** |
| | | * è·åç¨æ·èº«ä»½ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @return ç¨æ·ä¿¡æ¯ |
| | | */ |
| | | public LoginUser getLoginUser(HttpServletRequest request) |
| | |
| | | |
| | | /** |
| | | * å建令ç |
| | | * |
| | | * |
| | | * @param loginUser ç¨æ·ä¿¡æ¯ |
| | | * @return 令ç |
| | | */ |
| | |
| | | |
| | | /** |
| | | * éªè¯ä»¤çæææï¼ç¸å·®ä¸è¶³20åéï¼èªå¨å·æ°ç¼å |
| | | * |
| | | * @param token 令ç |
| | | * |
| | | * @param loginUser |
| | | * @return 令ç |
| | | */ |
| | | public void verifyToken(LoginUser loginUser) |
| | |
| | | |
| | | /** |
| | | * å·æ°ä»¤çæææ |
| | | * |
| | | * |
| | | * @param loginUser ç»å½ä¿¡æ¯ |
| | | */ |
| | | public void refreshToken(LoginUser loginUser) |
| | |
| | | String userKey = getTokenKey(loginUser.getToken()); |
| | | redisCache.setCacheObject(userKey, loginUser, expireTime, TimeUnit.MINUTES); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * è®¾ç½®ç¨æ·ä»£çä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param loginUser ç»å½ä¿¡æ¯ |
| | | */ |
| | | public void setUserAgent(LoginUser loginUser) |
| | |
| | | loginUser.setBrowser(userAgent.getBrowser().getName()); |
| | | loginUser.setOs(userAgent.getOperatingSystem().getName()); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 仿°æ®å£°æçæä»¤ç |
| | | * |
| | |
| | | } |
| | | |
| | | /** |
| | | * çæä»£ç |
| | | * çæä»£ç ï¼ä¸è½½æ¹å¼ï¼ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('tool:gen:code')") |
| | | @Log(title = "代ç çæ", businessType = BusinessType.GENCODE) |
| | | @GetMapping("/download/{tableName}") |
| | | public void download(HttpServletResponse response, @PathVariable("tableName") String tableName) throws IOException |
| | | { |
| | | byte[] data = genTableService.downloadCode(tableName); |
| | | genCode(response, data); |
| | | } |
| | | |
| | | /** |
| | | * çæä»£ç ï¼èªå®ä¹è·¯å¾ï¼ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('tool:gen:code')") |
| | | @Log(title = "代ç çæ", businessType = BusinessType.GENCODE) |
| | | @GetMapping("/genCode/{tableName}") |
| | | public void genCode(HttpServletResponse response, @PathVariable("tableName") String tableName) throws IOException |
| | | public AjaxResult genCode(HttpServletResponse response, @PathVariable("tableName") String tableName) |
| | | { |
| | | byte[] data = genTableService.generatorCode(tableName); |
| | | genCode(response, data); |
| | | genTableService.generatorCode(tableName); |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | /** |
| | |
| | | public void batchGenCode(HttpServletResponse response, String tables) throws IOException |
| | | { |
| | | String[] tableNames = Convert.toStrArray(tables); |
| | | byte[] data = genTableService.generatorCode(tableNames); |
| | | byte[] data = genTableService.downloadCode(tableNames); |
| | | genCode(response, data); |
| | | } |
| | | |
| | |
| | | response.setContentType("application/octet-stream; charset=UTF-8"); |
| | | IOUtils.write(data, response.getOutputStream()); |
| | | } |
| | | } |
| | | } |
| | |
| | | @NotBlank(message = "ä½è
ä¸è½ä¸ºç©º") |
| | | private String functionAuthor; |
| | | |
| | | /** çæä»£ç æ¹å¼ï¼0zipå缩å
1èªå®ä¹è·¯å¾ï¼ */ |
| | | private String genType; |
| | | |
| | | /** çæè·¯å¾ï¼ä¸å¡«é»è®¤é¡¹ç®è·¯å¾ï¼ */ |
| | | private String genPath; |
| | | |
| | | /** 主é®ä¿¡æ¯ */ |
| | | private GenTableColumn pkColumn; |
| | | |
| | |
| | | this.functionAuthor = functionAuthor; |
| | | } |
| | | |
| | | public String getGenType() |
| | | { |
| | | return genType; |
| | | } |
| | | |
| | | public void setGenType(String genType) |
| | | { |
| | | this.genType = genType; |
| | | } |
| | | |
| | | public String getGenPath() |
| | | { |
| | | return genPath; |
| | | } |
| | | |
| | | public void setGenPath(String genPath) |
| | | { |
| | | this.genPath = genPath; |
| | | } |
| | | |
| | | public GenTableColumn getPkColumn() |
| | | { |
| | | return pkColumn; |
| | |
| | | package com.ruoyi.generator.service; |
| | | |
| | | import java.io.ByteArrayOutputStream; |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.io.StringWriter; |
| | | import java.util.LinkedHashMap; |
| | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.ruoyi.common.constant.Constants; |
| | | import com.ruoyi.common.constant.GenConstants; |
| | | import com.ruoyi.common.core.text.CharsetKit; |
| | | import com.ruoyi.common.exception.CustomException; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.file.FileUtils; |
| | | import com.ruoyi.generator.domain.GenTable; |
| | | import com.ruoyi.generator.domain.GenTableColumn; |
| | | import com.ruoyi.generator.mapper.GenTableColumnMapper; |
| | |
| | | } |
| | | |
| | | /** |
| | | * çæä»£ç |
| | | * çæä»£ç ï¼ä¸è½½æ¹å¼ï¼ |
| | | * |
| | | * @param tableName 表åç§° |
| | | * @return æ°æ® |
| | | */ |
| | | @Override |
| | | public byte[] generatorCode(String tableName) |
| | | public byte[] downloadCode(String tableName) |
| | | { |
| | | ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); |
| | | ZipOutputStream zip = new ZipOutputStream(outputStream); |
| | |
| | | } |
| | | |
| | | /** |
| | | * æ¹éçæä»£ç |
| | | * çæä»£ç ï¼èªå®ä¹è·¯å¾ï¼ |
| | | * |
| | | * @param tableName 表åç§° |
| | | * @return æ°æ® |
| | | */ |
| | | @Override |
| | | public void generatorCode(String tableName) |
| | | { |
| | | // æ¥è¯¢è¡¨ä¿¡æ¯ |
| | | GenTable table = genTableMapper.selectGenTableByName(tableName); |
| | | // æ¥è¯¢åä¿¡æ¯ |
| | | List<GenTableColumn> columns = table.getColumns(); |
| | | setPkColumn(table, columns); |
| | | |
| | | VelocityInitializer.initVelocity(); |
| | | |
| | | VelocityContext context = VelocityUtils.prepareContext(table); |
| | | |
| | | // è·å模æ¿å表 |
| | | List<String> templates = VelocityUtils.getTemplateList(table.getTplCategory()); |
| | | for (String template : templates) |
| | | { |
| | | if (!StringUtils.containsAny(template, "sql.vm", "api.js.vm", "index.vue.vm", "index-tree.vue.vm")) |
| | | { |
| | | // æ¸²ææ¨¡æ¿ |
| | | StringWriter sw = new StringWriter(); |
| | | Template tpl = Velocity.getTemplate(template, Constants.UTF8); |
| | | tpl.merge(context, sw); |
| | | try |
| | | { |
| | | String path = getGenPath(table, template); |
| | | FileUtils.writeStringToFile(new File(path), sw.toString(), CharsetKit.UTF_8); |
| | | } |
| | | catch (IOException e) |
| | | { |
| | | throw new CustomException("æ¸²ææ¨¡æ¿å¤±è´¥ï¼è¡¨åï¼" + table.getTableName()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * æ¹éçæä»£ç ï¼ä¸è½½æ¹å¼ï¼ |
| | | * |
| | | * @param tableNames 表æ°ç» |
| | | * @return æ°æ® |
| | | */ |
| | | @Override |
| | | public byte[] generatorCode(String[] tableNames) |
| | | public byte[] downloadCode(String[] tableNames) |
| | | { |
| | | ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); |
| | | ZipOutputStream zip = new ZipOutputStream(outputStream); |
| | |
| | | genTable.setParentMenuName(parentMenuName); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * è·å代ç çæå°å |
| | | * |
| | | * @param table ä¸å¡è¡¨ä¿¡æ¯ |
| | | * @param template æ¨¡æ¿æä»¶è·¯å¾ |
| | | * @return çæå°å |
| | | */ |
| | | public static String getGenPath(GenTable table, String template) |
| | | { |
| | | String genPath = table.getGenPath(); |
| | | if (StringUtils.equals(genPath, "/")) |
| | | { |
| | | return System.getProperty("user.dir") + File.separator + "src" + File.separator + VelocityUtils.getFileName(template, table); |
| | | } |
| | | return genPath + File.separator + VelocityUtils.getFileName(template, table); |
| | | } |
| | | } |
| | |
| | | public Map<String, String> previewCode(Long tableId); |
| | | |
| | | /** |
| | | * çæä»£ç |
| | | * çæä»£ç ï¼ä¸è½½æ¹å¼ï¼ |
| | | * |
| | | * @param tableName 表åç§° |
| | | * @return æ°æ® |
| | | */ |
| | | public byte[] generatorCode(String tableName); |
| | | public byte[] downloadCode(String tableName); |
| | | |
| | | /** |
| | | * æ¹éçæä»£ç |
| | | * çæä»£ç ï¼èªå®ä¹è·¯å¾ï¼ |
| | | * |
| | | * @param tableName 表åç§° |
| | | * @return æ°æ® |
| | | */ |
| | | public void generatorCode(String tableName); |
| | | |
| | | /** |
| | | * æ¹éçæä»£ç ï¼ä¸è½½æ¹å¼ï¼ |
| | | * |
| | | * @param tableNames 表æ°ç» |
| | | * @return æ°æ® |
| | | */ |
| | | public byte[] generatorCode(String[] tableNames); |
| | | public byte[] downloadCode(String[] tableNames); |
| | | |
| | | /** |
| | | * ä¿®æ¹ä¿ååæ°æ ¡éª |
| | |
| | | import com.ruoyi.generator.domain.GenTable; |
| | | import com.ruoyi.generator.domain.GenTableColumn; |
| | | |
| | | /** |
| | | * 模æ¿å¤çå·¥å
·ç±» |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public class VelocityUtils |
| | | { |
| | | /** 项ç®ç©ºé´è·¯å¾ */ |
| | | private static final String PROJECT_PATH = "main/java"; |
| | | |
| | | /** mybatis空é´è·¯å¾ */ |
| | | private static final String MYBATIS_PATH = "main/resources/mybatis"; |
| | | private static final String MYBATIS_PATH = "main/resources/mapper"; |
| | | |
| | | /** é»è®¤ä¸çº§èåï¼ç³»ç»å·¥å
· */ |
| | | private static final String DEFAULT_PARENT_MENU_ID = "3"; |
| | | |
| | | /** |
| | | * 设置模æ¿åéä¿¡æ¯ |
| | | * |
| | | * |
| | | * @return 模æ¿å表 |
| | | */ |
| | | public static VelocityContext prepareContext(GenTable genTable) |
| | |
| | | |
| | | /** |
| | | * è·å模æ¿ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @return 模æ¿å表 |
| | | */ |
| | | public static List<String> getTemplateList(String tplCategory) |
| | |
| | | |
| | | /** |
| | | * è·åå
åç¼ |
| | | * |
| | | * |
| | | * @param packageName å
åç§° |
| | | * @return å
åç¼åç§° |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ ¹æ®åç±»åè·å导å
¥å
|
| | | * |
| | | * @param column åéå |
| | | * |
| | | * @param columns åéå |
| | | * @return è¿åéè¦å¯¼å
¥çå
å表 |
| | | */ |
| | | public static HashSet<String> getImportList(List<GenTableColumn> columns) |
| | |
| | | |
| | | /** |
| | | * è·åæéåç¼ |
| | | * |
| | | * |
| | | * @param moduleName 模ååç§° |
| | | * @param businessName ä¸å¡åç§° |
| | | * @return è¿åæéåç¼ |
| | |
| | | public static String getPermissionPrefix(String moduleName, String businessName) |
| | | { |
| | | return StringUtils.format("{}:{}", moduleName, businessName); |
| | | |
| | | } |
| | | |
| | | /** |
| | | * è·åä¸çº§èåIDåæ®µ |
| | | * |
| | | * @param options çæå
¶ä»é项 |
| | | * |
| | | * @param paramsObj çæå
¶ä»é项 |
| | | * @return ä¸çº§èåIDåæ®µ |
| | | */ |
| | | public static String getParentMenuId(JSONObject paramsObj) |
| | |
| | | |
| | | /** |
| | | * è·åæ ç¼ç |
| | | * |
| | | * @param options çæå
¶ä»é项 |
| | | * |
| | | * @param paramsObj çæå
¶ä»é项 |
| | | * @return æ ç¼ç |
| | | */ |
| | | public static String getTreecode(JSONObject paramsObj) |
| | |
| | | |
| | | /** |
| | | * è·åæ ç¶ç¼ç |
| | | * |
| | | * @param options çæå
¶ä»é项 |
| | | * |
| | | * @param paramsObj çæå
¶ä»é项 |
| | | * @return æ ç¶ç¼ç |
| | | */ |
| | | public static String getTreeParentCode(JSONObject paramsObj) |
| | |
| | | |
| | | /** |
| | | * è·åæ åç§° |
| | | * |
| | | * @param options çæå
¶ä»é项 |
| | | * |
| | | * @param paramsObj çæå
¶ä»é项 |
| | | * @return æ åç§° |
| | | */ |
| | | public static String getTreeName(JSONObject paramsObj) |
| | |
| | | |
| | | /** |
| | | * è·åéè¦å¨åªä¸åä¸é¢æ¾ç¤ºå±å¼æé® |
| | | * |
| | | * |
| | | * @param genTable ä¸å¡è¡¨å¯¹è±¡ |
| | | * @return å±å¼æé®ååºå· |
| | | */ |
| | |
| | | } |
| | | return num; |
| | | } |
| | | } |
| | | } |
| | |
| | | <result property="businessName" column="business_name" /> |
| | | <result property="functionName" column="function_name" /> |
| | | <result property="functionAuthor" column="function_author" /> |
| | | <result property="genType" column="gen_type" /> |
| | | <result property="genPath" column="gen_path" /> |
| | | <result property="options" column="options" /> |
| | | <result property="createBy" column="create_by" /> |
| | | <result property="createTime" column="create_time" /> |
| | |
| | | </resultMap> |
| | | |
| | | <sql id="selectGenTableVo"> |
| | | select table_id, table_name, table_comment, class_name, tpl_category, package_name, module_name, business_name, function_name, function_author, options, create_by, create_time, update_by, update_time, remark from gen_table |
| | | select table_id, table_name, table_comment, class_name, tpl_category, package_name, module_name, business_name, function_name, function_author, gen_type, gen_path, options, create_by, create_time, update_by, update_time, remark from gen_table |
| | | </sql> |
| | | |
| | | <select id="selectGenTableList" parameterType="GenTable" resultMap="GenTableResult"> |
| | |
| | | </select> |
| | | |
| | | <select id="selectGenTableById" parameterType="Long" resultMap="GenTableResult"> |
| | | SELECT t.table_id, t.table_name, t.table_comment, t.class_name, t.tpl_category, t.package_name, t.module_name, t.business_name, t.function_name, t.function_author, t.options, t.remark, |
| | | SELECT t.table_id, t.table_name, t.table_comment, t.class_name, t.tpl_category, t.package_name, t.module_name, t.business_name, t.function_name, t.function_author, t.gen_type, t.gen_path, t.options, t.remark, |
| | | c.column_id, c.column_name, c.column_comment, c.column_type, c.java_type, c.java_field, c.is_pk, c.is_increment, c.is_required, c.is_insert, c.is_edit, c.is_list, c.is_query, c.query_type, c.html_type, c.dict_type, c.sort |
| | | FROM gen_table t |
| | | LEFT JOIN gen_table_column c ON t.table_id = c.table_id |
| | |
| | | </select> |
| | | |
| | | <select id="selectGenTableByName" parameterType="String" resultMap="GenTableResult"> |
| | | SELECT t.table_id, t.table_name, t.table_comment, t.class_name, t.tpl_category, t.package_name, t.module_name, t.business_name, t.function_name, t.function_author, t.options, t.remark, |
| | | SELECT t.table_id, t.table_name, t.table_comment, t.class_name, t.tpl_category, t.package_name, t.module_name, t.business_name, t.function_name, t.function_author, t.gen_type, t.gen_path, t.options, t.remark, |
| | | c.column_id, c.column_name, c.column_comment, c.column_type, c.java_type, c.java_field, c.is_pk, c.is_increment, c.is_required, c.is_insert, c.is_edit, c.is_list, c.is_query, c.query_type, c.html_type, c.dict_type, c.sort |
| | | FROM gen_table t |
| | | LEFT JOIN gen_table_column c ON t.table_id = c.table_id |
| | |
| | | <if test="businessName != null and businessName != ''">business_name,</if> |
| | | <if test="functionName != null and functionName != ''">function_name,</if> |
| | | <if test="functionAuthor != null and functionAuthor != ''">function_author,</if> |
| | | <if test="genType != null and genType != ''">gen_type,</if> |
| | | <if test="genPath != null and genPath != ''">gen_path,</if> |
| | | <if test="remark != null and remark != ''">remark,</if> |
| | | <if test="createBy != null and createBy != ''">create_by,</if> |
| | | create_time |
| | |
| | | <if test="businessName != null and businessName != ''">#{businessName},</if> |
| | | <if test="functionName != null and functionName != ''">#{functionName},</if> |
| | | <if test="functionAuthor != null and functionAuthor != ''">#{functionAuthor},</if> |
| | | <if test="genType != null and genType != ''">#{genType},</if> |
| | | <if test="genPath != null and genPath != ''">#{genPath},</if> |
| | | <if test="remark != null and remark != ''">#{remark},</if> |
| | | <if test="createBy != null and createBy != ''">#{createBy},</if> |
| | | sysdate() |
| | |
| | | <if test="tableComment != null and tableComment != ''">table_comment = #{tableComment},</if> |
| | | <if test="className != null and className != ''">class_name = #{className},</if> |
| | | <if test="functionAuthor != null and functionAuthor != ''">function_author = #{functionAuthor},</if> |
| | | <if test="genType != null and genType != ''">gen_type = #{genType},</if> |
| | | <if test="genPath != null and genPath != ''">gen_path = #{genPath},</if> |
| | | <if test="tplCategory != null and tplCategory != ''">tpl_category = #{tplCategory},</if> |
| | | <if test="packageName != null and packageName != ''">package_name = #{packageName},</if> |
| | | <if test="moduleName != null and moduleName != ''">module_name = #{moduleName},</if> |
| | |
| | | <template>
|
| | | <div class="app-container">
|
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
|
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
| | | #foreach($column in $columns)
|
| | | #if($column.query)
|
| | | #set($dictType=$column.dictType)
|
| | |
| | | #end
|
| | | #end
|
| | | <el-form-item>
|
| | | <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button>
|
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">éç½®</el-button>
|
| | | </el-form-item>
|
| | | </el-form>
|
| | |
|
| | | <el-row :gutter="10" class="mb8">
|
| | | <el-col :span="1.5">
|
| | | <el-button
|
| | | class="filter-item"
|
| | | type="primary"
|
| | | icon="el-icon-search"
|
| | | size="mini"
|
| | | @click="handleQuery"
|
| | | >æç´¢</el-button>
|
| | | <el-button
|
| | | class="filter-item"
|
| | | type="primary"
|
| | | icon="el-icon-plus"
|
| | | size="mini"
|
| | | @click="handleAdd"
|
| | | v-hasPermi="['${moduleName}:${businessName}:add']"
|
| | | >æ°å¢</el-button>
|
| | | </el-form-item>
|
| | | </el-form>
|
| | | </el-col>
|
| | | <div class="top-right-btn">
|
| | | <el-tooltip class="item" effect="dark" content="å·æ°" placement="top">
|
| | | <el-button size="mini" circle icon="el-icon-refresh" @click="handleQuery" />
|
| | | </el-tooltip>
|
| | | <el-tooltip class="item" effect="dark" :content="showSearch ? 'éèæç´¢' : 'æ¾ç¤ºæç´¢'" placement="top">
|
| | | <el-button size="mini" circle icon="el-icon-search" @click="showSearch=!showSearch" />
|
| | | </el-tooltip>
|
| | | </div>
|
| | | </el-row>
|
| | |
|
| | | <el-table
|
| | | v-loading="loading"
|
| | |
| | | <el-option label="è¯·éæ©åå
¸çæ" value="" />
|
| | | </el-select>
|
| | | </el-form-item>
|
| | | #elseif($column.htmlType == "checkbox" && "" != $dictType)
|
| | | <el-form-item label="${comment}">
|
| | | <el-checkbox-group v-model="form.${field}">
|
| | | <el-checkbox
|
| | | v-for="dict in ${field}Options"
|
| | | :key="dict.dictValue"
|
| | | :label="dict.dictValue">
|
| | | {{dict.dictLabel}}
|
| | | </el-checkbox>
|
| | | </el-checkbox-group>
|
| | | </el-form-item>
|
| | | #elseif($column.htmlType == "checkbox" && $dictType)
|
| | | <el-form-item label="${comment}">
|
| | | <el-checkbox-group v-model="form.${field}">
|
| | | <el-checkbox>è¯·éæ©åå
¸çæ</el-checkbox>
|
| | | </el-checkbox-group>
|
| | | </el-form-item>
|
| | | #elseif($column.htmlType == "radio" && "" != $dictType)
|
| | | <el-form-item label="${comment}">
|
| | | <el-radio-group v-model="form.${field}">
|
| | |
| | | return {
|
| | | // é®ç½©å±
|
| | | loading: true,
|
| | | // æ¾ç¤ºæç´¢æ¡ä»¶
|
| | | showSearch: true,
|
| | | // ${functionName}è¡¨æ ¼æ°æ®
|
| | | ${businessName}List: [],
|
| | | // ${functionName}æ é项
|
| | |
| | | queryParams: {
|
| | | #foreach ($column in $columns)
|
| | | #if($column.query)
|
| | | $column.javaField: undefined#if($velocityCount != $columns.size()),#end
|
| | | $column.javaField: null#if($velocityCount != $columns.size()),#end
|
| | |
|
| | | #end
|
| | | #end
|
| | |
| | | #end
|
| | | // $commentåå
¸ç¿»è¯
|
| | | ${column.javaField}Format(row, column) {
|
| | | return this.selectDictLabel(this.${column.javaField}Options, row.${column.javaField});
|
| | | return this.selectDictLabel#if($column.htmlType == "checkbox")s#end(this.${column.javaField}Options, row.${column.javaField});
|
| | | },
|
| | | #end
|
| | | #end
|
| | |
| | | this.form = {
|
| | | #foreach ($column in $columns)
|
| | | #if($column.htmlType == "radio")
|
| | | $column.javaField: "0"#if($velocityCount != $columns.size()),#end
|
| | | $column.javaField: #if($column.javaType == "Integer" || $column.javaType == "Long")0#else"0"#end#if($velocityCount != $columns.size()),#end
|
| | |
|
| | | #elseif($column.htmlType == "checkbox")
|
| | | $column.javaField: []#if($velocityCount != $columns.size()),#end
|
| | |
|
| | | #else
|
| | | $column.javaField: undefined#if($velocityCount != $columns.size()),#end
|
| | | $column.javaField: null#if($velocityCount != $columns.size()),#end
|
| | |
|
| | | #end
|
| | | #end
|
| | |
| | | handleUpdate(row) {
|
| | | this.reset();
|
| | | this.getTreeselect();
|
| | | if (row != undefined) {
|
| | | if (row != null) {
|
| | | this.form.${treeParentCode} = row.${treeCode};
|
| | | }
|
| | | get${BusinessName}(row.${pkColumn.javaField}).then(response => {
|
| | | this.form = response.data;
|
| | | #foreach ($column in $columns)
|
| | | #if($column.htmlType == "checkbox")
|
| | | this.form.$column.javaField = this.form.${column.javaField}.split(",");
|
| | | #end
|
| | | #end
|
| | | this.open = true;
|
| | | this.title = "ä¿®æ¹${functionName}";
|
| | | });
|
| | | },
|
| | | /** æäº¤æé® */
|
| | | submitForm: function() {
|
| | | submitForm() {
|
| | | this.#[[$]]#refs["form"].validate(valid => {
|
| | | if (valid) {
|
| | | if (this.form.${pkColumn.javaField} != undefined) {
|
| | | #foreach ($column in $columns)
|
| | | #if($column.htmlType == "checkbox")
|
| | | this.form.$column.javaField = this.form.${column.javaField}.join(",");
|
| | | #end
|
| | | #end
|
| | | if (this.form.${pkColumn.javaField} != null) {
|
| | | update${BusinessName}(this.form).then(response => {
|
| | | if (response.code === 200) {
|
| | | this.msgSuccess("ä¿®æ¹æå");
|
| | |
| | | }
|
| | | }
|
| | | };
|
| | | </script> |
| | | </script>
|
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px"> |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> |
| | | #foreach($column in $columns) |
| | | #if($column.query) |
| | | #set($dictType=$column.dictType) |
| | |
| | | #end |
| | | #end |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> |
| | | <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">éç½®</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | |
| | | v-hasPermi="['${moduleName}:${businessName}:export']" |
| | | >导åº</el-button> |
| | | </el-col> |
| | | <div class="top-right-btn"> |
| | | <el-tooltip class="item" effect="dark" content="å·æ°" placement="top"> |
| | | <el-button size="mini" circle icon="el-icon-refresh" @click="handleQuery" /> |
| | | </el-tooltip> |
| | | <el-tooltip class="item" effect="dark" :content="showSearch ? 'éèæç´¢' : 'æ¾ç¤ºæç´¢'" placement="top"> |
| | | <el-button size="mini" circle icon="el-icon-search" @click="showSearch=!showSearch" /> |
| | | </el-tooltip> |
| | | </div> |
| | | </el-row> |
| | | |
| | | <el-table v-loading="loading" :data="${businessName}List" @selection-change="handleSelectionChange"> |
| | |
| | | <el-option label="è¯·éæ©åå
¸çæ" value="" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | #elseif($column.htmlType == "checkbox" && "" != $dictType) |
| | | <el-form-item label="${comment}"> |
| | | <el-checkbox-group v-model="form.${field}"> |
| | | <el-checkbox |
| | | v-for="dict in ${field}Options" |
| | | :key="dict.dictValue" |
| | | :label="dict.dictValue"> |
| | | {{dict.dictLabel}} |
| | | </el-checkbox> |
| | | </el-checkbox-group> |
| | | </el-form-item> |
| | | #elseif($column.htmlType == "checkbox" && $dictType) |
| | | <el-form-item label="${comment}"> |
| | | <el-checkbox-group v-model="form.${field}"> |
| | | <el-checkbox>è¯·éæ©åå
¸çæ</el-checkbox> |
| | | </el-checkbox-group> |
| | | </el-form-item> |
| | | #elseif($column.htmlType == "radio" && "" != $dictType) |
| | | <el-form-item label="${comment}"> |
| | | <el-radio-group v-model="form.${field}"> |
| | |
| | | single: true, |
| | | // éå¤ä¸ªç¦ç¨ |
| | | multiple: true, |
| | | // æ¾ç¤ºæç´¢æ¡ä»¶ |
| | | showSearch: true, |
| | | // æ»æ¡æ° |
| | | total: 0, |
| | | // ${functionName}è¡¨æ ¼æ°æ® |
| | |
| | | pageSize: 10, |
| | | #foreach ($column in $columns) |
| | | #if($column.query) |
| | | $column.javaField: undefined#if($velocityCount != $columns.size()),#end |
| | | $column.javaField: null#if($velocityCount != $columns.size()),#end |
| | | |
| | | #end |
| | | #end |
| | |
| | | #end |
| | | // $commentåå
¸ç¿»è¯ |
| | | ${column.javaField}Format(row, column) { |
| | | return this.selectDictLabel(this.${column.javaField}Options, row.${column.javaField}); |
| | | return this.selectDictLabel#if($column.htmlType == "checkbox")s#end(this.${column.javaField}Options, row.${column.javaField}); |
| | | }, |
| | | #end |
| | | #end |
| | |
| | | this.form = { |
| | | #foreach ($column in $columns) |
| | | #if($column.htmlType == "radio") |
| | | $column.javaField: "0"#if($velocityCount != $columns.size()),#end |
| | | $column.javaField: #if($column.javaType == "Integer" || $column.javaType == "Long")0#else"0"#end#if($velocityCount != $columns.size()),#end |
| | | |
| | | #elseif($column.htmlType == "checkbox") |
| | | $column.javaField: []#if($velocityCount != $columns.size()),#end |
| | | |
| | | #else |
| | | $column.javaField: undefined#if($velocityCount != $columns.size()),#end |
| | | $column.javaField: null#if($velocityCount != $columns.size()),#end |
| | | |
| | | #end |
| | | #end |
| | |
| | | // å¤éæ¡é䏿°æ® |
| | | handleSelectionChange(selection) { |
| | | this.ids = selection.map(item => item.${pkColumn.javaField}) |
| | | this.single = selection.length!=1 |
| | | this.single = selection.length!==1 |
| | | this.multiple = !selection.length |
| | | }, |
| | | /** æ°å¢æé®æä½ */ |
| | |
| | | const ${pkColumn.javaField} = row.${pkColumn.javaField} || this.ids |
| | | get${BusinessName}(${pkColumn.javaField}).then(response => { |
| | | this.form = response.data; |
| | | #foreach ($column in $columns) |
| | | #if($column.htmlType == "checkbox") |
| | | this.form.$column.javaField = this.form.${column.javaField}.split(","); |
| | | #end |
| | | #end |
| | | this.open = true; |
| | | this.title = "ä¿®æ¹${functionName}"; |
| | | }); |
| | | }, |
| | | /** æäº¤æé® */ |
| | | submitForm: function() { |
| | | submitForm() { |
| | | this.#[[$]]#refs["form"].validate(valid => { |
| | | if (valid) { |
| | | if (this.form.${pkColumn.javaField} != undefined) { |
| | | #foreach ($column in $columns) |
| | | #if($column.htmlType == "checkbox") |
| | | this.form.$column.javaField = this.form.${column.javaField}.join(","); |
| | | #end |
| | | #end |
| | | if (this.form.${pkColumn.javaField} != null) { |
| | | update${BusinessName}(this.form).then(response => { |
| | | if (response.code === 200) { |
| | | this.msgSuccess("ä¿®æ¹æå"); |
| | |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | </script> |
| | |
| | | * æ§è¡å
|
| | | *
|
| | | * @param context 工使§è¡ä¸ä¸æå¯¹è±¡
|
| | | * @param sysScheduleJob ç³»ç»è®¡åä»»å¡
|
| | | * @param sysJob ç³»ç»è®¡åä»»å¡
|
| | | */
|
| | | protected void after(JobExecutionContext context, SysJob sysJob, Exception e)
|
| | | {
|
| | |
| | | |
| | | /** |
| | | * èå表 æ°æ®å± |
| | | * |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public interface SysMenuMapper |
| | | { |
| | | /** |
| | | * æ¥è¯¢ç³»ç»èåå表 |
| | | * |
| | | * |
| | | * @param menu èåä¿¡æ¯ |
| | | * @return èåå表 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ ¹æ®ç¨æ·æææé |
| | | * |
| | | * |
| | | * @return æéå表 |
| | | */ |
| | | public List<String> selectMenuPerms(); |
| | | |
| | | /** |
| | | * æ ¹æ®ç¨æ·æ¥è¯¢ç³»ç»èåå表 |
| | | * |
| | | * |
| | | * @param menu èåä¿¡æ¯ |
| | | * @return èåå表 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ ¹æ®ç¨æ·IDæ¥è¯¢æé |
| | | * |
| | | * |
| | | * @param userId ç¨æ·ID |
| | | * @return æéå表 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ ¹æ®ç¨æ·IDæ¥è¯¢èå |
| | | * |
| | | * |
| | | * @return èåå表 |
| | | */ |
| | | public List<SysMenu> selectMenuTreeAll(); |
| | | |
| | | /** |
| | | * æ ¹æ®ç¨æ·IDæ¥è¯¢èå |
| | | * |
| | | * @param username ç¨æ·ID |
| | | * |
| | | * @param userId ç¨æ·ID |
| | | * @return èåå表 |
| | | */ |
| | | public List<SysMenu> selectMenuTreeByUserId(Long userId); |
| | | |
| | | /** |
| | | * æ ¹æ®è§è²IDæ¥è¯¢èåæ ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param roleId è§è²ID |
| | | * @return éä¸èåå表 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ ¹æ®èåIDæ¥è¯¢ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param menuId èåID |
| | | * @return èåä¿¡æ¯ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¯å¦åå¨èååèç¹ |
| | | * |
| | | * |
| | | * @param menuId èåID |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ°å¢èåä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param menu èåä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * ä¿®æ¹èåä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param menu èåä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * å é¤èå管çä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param menuId èåID |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ ¡éªèååç§°æ¯å¦å¯ä¸ |
| | | * |
| | | * |
| | | * @param menuName èååç§° |
| | | * @param parentId ç¶èåID |
| | | * @return ç»æ |
| | |
| | | |
| | | <select id="checkDeptNameUnique" resultMap="SysDeptResult"> |
| | | <include refid="selectDeptVo"/> |
| | | where dept_name=#{deptName} and parent_id = #{parentId} |
| | | where dept_name=#{deptName} and parent_id = #{parentId} limit 1 |
| | | </select> |
| | | |
| | | <insert id="insertDept" parameterType="SysDept"> |
| | |
| | | module.exports = { |
| | | presets: [ |
| | | '@vue/app' |
| | | ] |
| | | // https://github.com/vuejs/vue-cli/tree/master/packages/@vue/babel-preset-app |
| | | '@vue/cli-plugin-babel/preset' |
| | | ], |
| | | 'env': { |
| | | 'development': { |
| | | // babel-plugin-dynamic-import-node plugin only does one thing by converting all import() to require(). |
| | | // This plugin can significantly increase the speed of hot updates, when you have a large number of pages. |
| | | 'plugins': ['dynamic-import-node'] |
| | | } |
| | | } |
| | | } |
| | |
| | | "author": "è¥ä¾", |
| | | "license": "MIT", |
| | | "scripts": { |
| | | "dev": "vue-cli-service serve --open", |
| | | "dev": "vue-cli-service serve", |
| | | "build:prod": "vue-cli-service build", |
| | | "build:stage": "vue-cli-service build --mode staging", |
| | | "preview": "node build/index.js --preview", |
| | |
| | | "@riophae/vue-treeselect": "0.4.0", |
| | | "axios": "0.18.1", |
| | | "clipboard": "2.0.4", |
| | | "core-js": "3.6.5", |
| | | "echarts": "4.2.1", |
| | | "element-ui": "2.13.2", |
| | | "file-saver": "2.0.1", |
| | | "js-beautify": "^1.10.2", |
| | | "js-beautify": "1.10.2", |
| | | "fuse.js": "3.4.4", |
| | | "js-cookie": "2.2.0", |
| | | "jsencrypt": "3.0.0-rc.1", |
| | |
| | | "vuex": "3.1.0" |
| | | }, |
| | | "devDependencies": { |
| | | "@vue/cli-plugin-babel": "3.5.3", |
| | | "@vue/cli-plugin-eslint": "^3.9.1", |
| | | "@vue/cli-plugin-unit-jest": "3.5.3", |
| | | "@vue/cli-service": "3.5.3", |
| | | "@vue/cli-plugin-babel": "4.4.4", |
| | | "@vue/cli-plugin-eslint": "4.4.4", |
| | | "@vue/cli-plugin-unit-jest": "4.4.4", |
| | | "@vue/cli-service": "4.4.4", |
| | | "@vue/test-utils": "1.0.0-beta.29", |
| | | "autoprefixer": "^9.5.1", |
| | | "babel-core": "7.0.0-bridge.0", |
| | | "babel-eslint": "10.0.1", |
| | | "autoprefixer": "9.5.1", |
| | | "babel-eslint": "10.1.0", |
| | | "babel-jest": "23.6.0", |
| | | "babel-plugin-dynamic-import-node": "2.3.3", |
| | | "chalk": "2.4.2", |
| | | "chokidar": "2.1.5", |
| | | "connect": "3.6.6", |
| | | "eslint": "5.15.3", |
| | | "eslint-plugin-vue": "5.2.2", |
| | | "eslint": "6.7.2", |
| | | "eslint-plugin-vue": "6.2.2", |
| | | "html-webpack-plugin": "3.2.0", |
| | | "http-proxy-middleware": "^0.19.1", |
| | | "husky": "1.3.1", |
| | | "lint-staged": "8.1.5", |
| | | "mockjs": "1.0.1-beta3", |
| | | "node-sass": "^4.9.0", |
| | | "plop": "2.3.0", |
| | | "runjs": "^4.3.2", |
| | | "sass-loader": "^7.1.0", |
| | | "runjs": "4.3.2", |
| | | "sass": "1.26.10", |
| | | "sass-loader": "8.0.2", |
| | | "script-ext-html-webpack-plugin": "2.1.3", |
| | | "script-loader": "0.7.2", |
| | | "serve-static": "^1.13.2", |
| | | "serve-static": "1.13.2", |
| | | "svg-sprite-loader": "4.1.3", |
| | | "svgo": "1.2.0", |
| | | "vue-template-compiler": "2.6.10" |
| | |
| | | params: data |
| | | }) |
| | | } |
| | | |
| | | // é¢è§çæä»£ç |
| | | export function previewTable(tableId) { |
| | | return request({ |
| | |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // å é¤è¡¨æ°æ® |
| | | export function delTable(tableId) { |
| | | return request({ |
| | |
| | | }) |
| | | } |
| | | |
| | | // çæä»£ç ï¼èªå®ä¹è·¯å¾ï¼ |
| | | export function genCode(tableName) { |
| | | return request({ |
| | | url: '/tool/gen/genCode/' + tableName, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | |
| | | padding-left: 15px; |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | |
| | | /* button color */ |
| | | .el-button--cyan.is-active, |
| | | .el-button--cyan:active { |
| | | background: #20B2AA; |
| | | border-color: #20B2AA; |
| | | color: #FFFFFF; |
| | | } |
| | | |
| | | .el-button--cyan:focus, |
| | | .el-button--cyan:hover { |
| | | background: #48D1CC; |
| | | border-color: #48D1CC; |
| | | color: #FFFFFF; |
| | | } |
| | | |
| | | .el-button--cyan { |
| | | background-color: #20B2AA; |
| | | border-color: #20B2AA; |
| | | color: #FFFFFF; |
| | | } |
| | | |
| | | /* text color */ |
| | | .text-navy { |
| | | color: #1ab394; |
| | |
| | | opacity: .8; |
| | | color: #fff!important; |
| | | background: #42b983!important; |
| | | } |
| | | |
| | | .top-right-btn { |
| | | float: right; |
| | | } |
| | |
| | | display: inline-block; |
| | | vertical-align: middle; |
| | | |
| | | /deep/ .el-input__inner { |
| | | ::v-deep .el-input__inner { |
| | | border-radius: 0; |
| | | border: 0; |
| | | padding-left: 0; |
| | |
| | | position: relative; |
| | | overflow: hidden; |
| | | width: 100%; |
| | | /deep/ { |
| | | ::v-deep { |
| | | .el-scrollbar__bar { |
| | | bottom: 0px; |
| | | } |
| | |
| | | import './permission' // permission control |
| | | import { getDicts } from "@/api/system/dict/data"; |
| | | import { getConfigKey } from "@/api/system/config"; |
| | | import { parseTime, resetForm, addDateRange, selectDictLabel, download, handleTree } from "@/utils/ruoyi"; |
| | | import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, download, handleTree } from "@/utils/ruoyi"; |
| | | import Pagination from "@/components/Pagination"; |
| | | |
| | | // å
¨å±æ¹æ³æè½½ |
| | |
| | | Vue.prototype.resetForm = resetForm |
| | | Vue.prototype.addDateRange = addDateRange |
| | | Vue.prototype.selectDictLabel = selectDictLabel |
| | | Vue.prototype.selectDictLabels = selectDictLabels |
| | | Vue.prototype.download = download |
| | | Vue.prototype.handleTree = handleTree |
| | | |
| | |
| | | return actions.join(''); |
| | | } |
| | | |
| | | // åæ¾æ°æ®åå
¸ï¼å符串æ°ç»ï¼ |
| | | export function selectDictLabels(datas, value, separator) { |
| | | var actions = []; |
| | | var currentSeparator = undefined === separator ? "," : separator; |
| | | var temp = value.split(currentSeparator); |
| | | Object.keys(value.split(currentSeparator)).some((val) => { |
| | | Object.keys(datas).some((key) => { |
| | | if (datas[key].dictValue == ('' + temp[val])) { |
| | | actions.push(datas[key].dictLabel + currentSeparator); |
| | | } |
| | | }) |
| | | }) |
| | | return actions.join('').substring(0, actions.join('').length - 1); |
| | | } |
| | | |
| | | // éç¨ä¸è½½æ¹æ³ |
| | | export function download(fileName) { |
| | | window.location.href = baseURL + "/common/download?fileName=" + encodeURI(fileName) + "&delete=" + true; |
| | |
| | | |
| | | // 转æ¢å符串ï¼undefined,nullç转å为"" |
| | | export function praseStrEmpty(str) { |
| | | if (!str || str == "undefined" || str == "null") { |
| | | return ""; |
| | | } |
| | | return str; |
| | | if (!str || str == "undefined" || str == "null") { |
| | | return ""; |
| | | } |
| | | return str; |
| | | } |
| | | |
| | | /** |
| | |
| | | //å¯¹æºæ°æ®æ·±åº¦å
é |
| | | const cloneData = JSON.parse(JSON.stringify(data)) |
| | | //å¾ªç¯ææé¡¹ |
| | | const treeData = cloneData.filter(father => { |
| | | let branchArr = cloneData.filter(child => { |
| | | //è¿åæ¯ä¸é¡¹çå级æ°ç» |
| | | return father[id] === child[parentId] |
| | | }); |
| | | branchArr.length > 0 ? father.children = branchArr : ''; |
| | | //è¿å第ä¸å± |
| | | return father[parentId] === rootId; |
| | | const treeData = cloneData.filter(father => { |
| | | let branchArr = cloneData.filter(child => { |
| | | //è¿åæ¯ä¸é¡¹çå级æ°ç» |
| | | return father[id] === child[parentId] |
| | | }); |
| | | branchArr.length > 0 ? father.children = branchArr : ''; |
| | | //è¿å第ä¸å± |
| | | return father[parentId] === rootId; |
| | | }); |
| | | return treeData != '' ? treeData : data; |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | <svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" /> |
| | | </el-input> |
| | | <div class="login-code"> |
| | | <img :src="codeUrl" @click="getCode" /> |
| | | <img :src="codeUrl" @click="getCode" class="login-code-img"/> |
| | | </div> |
| | | </el-form-item> |
| | | <el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">è®°ä½å¯ç </el-checkbox> |
| | |
| | | font-size: 12px; |
| | | letter-spacing: 1px; |
| | | } |
| | | .login-code-img { |
| | | height: 38px; |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px"> |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> |
| | | <el-form-item label="ä»»å¡åç§°" prop="jobName"> |
| | | <el-input |
| | | v-model="queryParams.jobName" |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> |
| | | <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">éç½®</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | |
| | | v-hasPermi="['monitor:job:query']" |
| | | >æ¥å¿</el-button> |
| | | </el-col> |
| | | <div class="top-right-btn"> |
| | | <el-tooltip class="item" effect="dark" content="å·æ°" placement="top"> |
| | | <el-button size="mini" circle icon="el-icon-refresh" @click="handleQuery" /> |
| | | </el-tooltip> |
| | | <el-tooltip class="item" effect="dark" :content="showSearch ? 'éèæç´¢' : 'æ¾ç¤ºæç´¢'" placement="top"> |
| | | <el-button size="mini" circle icon="el-icon-search" @click="showSearch=!showSearch" /> |
| | | </el-tooltip> |
| | | </div> |
| | | </el-row> |
| | | |
| | | <el-table v-loading="loading" :data="jobList" @selection-change="handleSelectionChange"> |
| | |
| | | single: true, |
| | | // éå¤ä¸ªç¦ç¨ |
| | | multiple: true, |
| | | // æ¾ç¤ºæç´¢æ¡ä»¶ |
| | | showSearch: true, |
| | | // æ»æ¡æ° |
| | | total: 0, |
| | | // 宿¶ä»»å¡è¡¨æ ¼æ°æ® |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px"> |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> |
| | | <el-form-item label="ä»»å¡åç§°" prop="jobName"> |
| | | <el-input |
| | | v-model="queryParams.jobName" |
| | |
| | | ></el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> |
| | | <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">éç½®</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | |
| | | v-hasPermi="['monitor:job:export']" |
| | | >导åº</el-button> |
| | | </el-col> |
| | | <div class="top-right-btn"> |
| | | <el-tooltip class="item" effect="dark" content="å·æ°" placement="top"> |
| | | <el-button size="mini" circle icon="el-icon-refresh" @click="handleQuery" /> |
| | | </el-tooltip> |
| | | <el-tooltip class="item" effect="dark" :content="showSearch ? 'éèæç´¢' : 'æ¾ç¤ºæç´¢'" placement="top"> |
| | | <el-button size="mini" circle icon="el-icon-search" @click="showSearch=!showSearch" /> |
| | | </el-tooltip> |
| | | </div> |
| | | </el-row> |
| | | |
| | | <el-table v-loading="loading" :data="jobLogList" @selection-change="handleSelectionChange"> |
| | |
| | | ids: [], |
| | | // éå¤ä¸ªç¦ç¨ |
| | | multiple: true, |
| | | // æ¾ç¤ºæç´¢æ¡ä»¶ |
| | | showSearch: true, |
| | | // æ»æ¡æ° |
| | | total: 0, |
| | | // è°åº¦æ¥å¿è¡¨æ ¼æ°æ® |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px"> |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> |
| | | <el-form-item label="ç»å½å°å" prop="ipaddr"> |
| | | <el-input |
| | | v-model="queryParams.ipaddr" |
| | |
| | | ></el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> |
| | | <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">éç½®</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | |
| | | v-hasPermi="['system:logininfor:export']" |
| | | >导åº</el-button> |
| | | </el-col> |
| | | <div class="top-right-btn"> |
| | | <el-tooltip class="item" effect="dark" content="å·æ°" placement="top"> |
| | | <el-button size="mini" circle icon="el-icon-refresh" @click="handleQuery" /> |
| | | </el-tooltip> |
| | | <el-tooltip class="item" effect="dark" :content="showSearch ? 'éèæç´¢' : 'æ¾ç¤ºæç´¢'" placement="top"> |
| | | <el-button size="mini" circle icon="el-icon-search" @click="showSearch=!showSearch" /> |
| | | </el-tooltip> |
| | | </div> |
| | | </el-row> |
| | | |
| | | <el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange"> |
| | |
| | | ids: [], |
| | | // éå¤ä¸ªç¦ç¨ |
| | | multiple: true, |
| | | // æ¾ç¤ºæç´¢æ¡ä»¶ |
| | | showSearch: true, |
| | | // æ»æ¡æ° |
| | | total: 0, |
| | | // è¡¨æ ¼æ°æ® |
| | |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> |
| | | <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">éç½®</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px"> |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> |
| | | <el-form-item label="ç³»ç»æ¨¡å" prop="title"> |
| | | <el-input |
| | | v-model="queryParams.title" |
| | |
| | | ></el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> |
| | | <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">éç½®</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | |
| | | v-hasPermi="['system:config:export']" |
| | | >导åº</el-button> |
| | | </el-col> |
| | | <div class="top-right-btn"> |
| | | <el-tooltip class="item" effect="dark" content="å·æ°" placement="top"> |
| | | <el-button size="mini" circle icon="el-icon-refresh" @click="handleQuery" /> |
| | | </el-tooltip> |
| | | <el-tooltip class="item" effect="dark" :content="showSearch ? 'éèæç´¢' : 'æ¾ç¤ºæç´¢'" placement="top"> |
| | | <el-button size="mini" circle icon="el-icon-search" @click="showSearch=!showSearch" /> |
| | | </el-tooltip> |
| | | </div> |
| | | </el-row> |
| | | |
| | | <el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange"> |
| | |
| | | ids: [], |
| | | // éå¤ä¸ªç¦ç¨ |
| | | multiple: true, |
| | | // æ¾ç¤ºæç´¢æ¡ä»¶ |
| | | showSearch: true, |
| | | // æ»æ¡æ° |
| | | total: 0, |
| | | // è¡¨æ ¼æ°æ® |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px"> |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> |
| | | <el-form-item label="åæ°åç§°" prop="configName"> |
| | | <el-input |
| | | v-model="queryParams.configName" |
| | |
| | | ></el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> |
| | | <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">éç½®</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | |
| | | v-hasPermi="['system:config:remove']" |
| | | >æ¸
çç¼å</el-button> |
| | | </el-col> |
| | | <div class="top-right-btn"> |
| | | <el-tooltip class="item" effect="dark" content="å·æ°" placement="top"> |
| | | <el-button size="mini" circle icon="el-icon-refresh" @click="handleQuery" /> |
| | | </el-tooltip> |
| | | <el-tooltip class="item" effect="dark" :content="showSearch ? 'éèæç´¢' : 'æ¾ç¤ºæç´¢'" placement="top"> |
| | | <el-button size="mini" circle icon="el-icon-search" @click="showSearch=!showSearch" /> |
| | | </el-tooltip> |
| | | </div> |
| | | </el-row> |
| | | |
| | | <el-table v-loading="loading" :data="configList" @selection-change="handleSelectionChange"> |
| | |
| | | single: true, |
| | | // éå¤ä¸ªç¦ç¨ |
| | | multiple: true, |
| | | // æ¾ç¤ºæç´¢æ¡ä»¶ |
| | | showSearch: true, |
| | | // æ»æ¡æ° |
| | | total: 0, |
| | | // åæ°è¡¨æ ¼æ°æ® |
| | |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | </script> |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :inline="true"> |
| | | <el-form-item label="é¨é¨åç§°"> |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch"> |
| | | <el-form-item label="é¨é¨åç§°" prop="deptName"> |
| | | <el-input |
| | | v-model="queryParams.deptName" |
| | | placeholder="请è¾å
¥é¨é¨åç§°" |
| | |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="ç¶æ"> |
| | | <el-form-item label="ç¶æ" prop="status"> |
| | | <el-select v-model="queryParams.status" placeholder="é¨é¨ç¶æ" clearable size="small"> |
| | | <el-option |
| | | v-for="dict in statusOptions" |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">éç½®</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | | <el-row :gutter="10" class="mb8"> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | class="filter-item" |
| | | type="primary" |
| | | icon="el-icon-search" |
| | | size="mini" |
| | | @click="handleQuery" |
| | | >æç´¢</el-button> |
| | | <el-button |
| | | class="filter-item" |
| | | type="primary" |
| | | icon="el-icon-plus" |
| | | size="mini" |
| | | @click="handleAdd" |
| | | v-hasPermi="['system:dept:add']" |
| | | >æ°å¢</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-col> |
| | | <div class="top-right-btn"> |
| | | <el-tooltip class="item" effect="dark" content="å·æ°" placement="top"> |
| | | <el-button size="mini" circle icon="el-icon-refresh" @click="handleQuery" /> |
| | | </el-tooltip> |
| | | <el-tooltip class="item" effect="dark" :content="showSearch ? 'éèæç´¢' : 'æ¾ç¤ºæç´¢'" placement="top"> |
| | | <el-button size="mini" circle icon="el-icon-search" @click="showSearch=!showSearch" /> |
| | | </el-tooltip> |
| | | </div> |
| | | </el-row> |
| | | |
| | | <el-table |
| | | v-loading="loading" |
| | |
| | | </el-table-column> |
| | | <el-table-column label="æä½" align="center" class-name="small-padding fixed-width"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-edit" |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-edit" |
| | | @click="handleUpdate(scope.row)" |
| | | v-hasPermi="['system:dept:edit']" |
| | | >ä¿®æ¹</el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-plus" |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-plus" |
| | | @click="handleAdd(scope.row)" |
| | | v-hasPermi="['system:dept:add']" |
| | | >æ°å¢</el-button> |
| | |
| | | return { |
| | | // é®ç½©å± |
| | | loading: true, |
| | | // æ¾ç¤ºæç´¢æ¡ä»¶ |
| | | showSearch: true, |
| | | // è¡¨æ ¼æ æ°æ® |
| | | deptList: [], |
| | | // é¨é¨æ é项 |
| | |
| | | handleQuery() { |
| | | this.getList(); |
| | | }, |
| | | /** éç½®æé®æä½ */ |
| | | resetQuery() { |
| | | this.resetForm("queryForm"); |
| | | this.handleQuery(); |
| | | }, |
| | | /** æ°å¢æé®æä½ */ |
| | | handleAdd(row) { |
| | | this.reset(); |
| | |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | </script> |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true"> |
| | | <el-form :model="queryParams" ref="queryForm" v-show="showSearch" :inline="true"> |
| | | <el-form-item label="åå
¸åç§°" prop="dictType"> |
| | | <el-select v-model="queryParams.dictType" size="small"> |
| | | <el-option |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> |
| | | <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">éç½®</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | |
| | | v-hasPermi="['system:dict:export']" |
| | | >导åº</el-button> |
| | | </el-col> |
| | | <div class="top-right-btn"> |
| | | <el-tooltip class="item" effect="dark" content="å·æ°" placement="top"> |
| | | <el-button size="mini" circle icon="el-icon-refresh" @click="handleQuery" /> |
| | | </el-tooltip> |
| | | <el-tooltip class="item" effect="dark" :content="showSearch ? 'éèæç´¢' : 'æ¾ç¤ºæç´¢'" placement="top"> |
| | | <el-button size="mini" circle icon="el-icon-search" @click="showSearch=!showSearch" /> |
| | | </el-tooltip> |
| | | </div> |
| | | </el-row> |
| | | |
| | | <el-table v-loading="loading" :data="dataList" @selection-change="handleSelectionChange"> |
| | |
| | | single: true, |
| | | // éå¤ä¸ªç¦ç¨ |
| | | multiple: true, |
| | | // æ¾ç¤ºæç´¢æ¡ä»¶ |
| | | showSearch: true, |
| | | // æ»æ¡æ° |
| | | total: 0, |
| | | // åå
¸è¡¨æ ¼æ°æ® |
| | |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | </script> |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px"> |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> |
| | | <el-form-item label="åå
¸åç§°" prop="dictName"> |
| | | <el-input |
| | | v-model="queryParams.dictName" |
| | |
| | | ></el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> |
| | | <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">éç½®</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | |
| | | v-hasPermi="['system:dict:remove']" |
| | | >æ¸
çç¼å</el-button> |
| | | </el-col> |
| | | <div class="top-right-btn"> |
| | | <el-tooltip class="item" effect="dark" content="å·æ°" placement="top"> |
| | | <el-button size="mini" circle icon="el-icon-refresh" @click="handleQuery" /> |
| | | </el-tooltip> |
| | | <el-tooltip class="item" effect="dark" :content="showSearch ? 'éèæç´¢' : 'æ¾ç¤ºæç´¢'" placement="top"> |
| | | <el-button size="mini" circle icon="el-icon-search" @click="showSearch=!showSearch" /> |
| | | </el-tooltip> |
| | | </div> |
| | | </el-row> |
| | | |
| | | <el-table v-loading="loading" :data="typeList" @selection-change="handleSelectionChange"> |
| | |
| | | single: true, |
| | | // éå¤ä¸ªç¦ç¨ |
| | | multiple: true, |
| | | // æ¾ç¤ºæç´¢æ¡ä»¶ |
| | | showSearch: true, |
| | | // æ»æ¡æ° |
| | | total: 0, |
| | | // åå
¸è¡¨æ ¼æ°æ® |
| | |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | </script> |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :inline="true"> |
| | | <el-form-item label="èååç§°"> |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch"> |
| | | <el-form-item label="èååç§°" prop="menuName"> |
| | | <el-input |
| | | v-model="queryParams.menuName" |
| | | placeholder="请è¾å
¥èååç§°" |
| | |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="ç¶æ"> |
| | | <el-form-item label="ç¶æ" prop="status"> |
| | | <el-select v-model="queryParams.status" placeholder="èåç¶æ" clearable size="small"> |
| | | <el-option |
| | | v-for="dict in statusOptions" |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> |
| | | <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['system:menu:add']">æ°å¢</el-button> |
| | | <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">éç½®</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | | <el-row :gutter="10" class="mb8"> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-plus" |
| | | size="mini" |
| | | @click="handleAdd" |
| | | v-hasPermi="['system:menu:add']" |
| | | >æ°å¢</el-button> |
| | | </el-col> |
| | | <div class="top-right-btn"> |
| | | <el-tooltip class="item" effect="dark" content="å·æ°" placement="top"> |
| | | <el-button size="mini" circle icon="el-icon-refresh" @click="handleQuery" /> |
| | | </el-tooltip> |
| | | <el-tooltip class="item" effect="dark" :content="showSearch ? 'éèæç´¢' : 'æ¾ç¤ºæç´¢'" placement="top"> |
| | | <el-button size="mini" circle icon="el-icon-search" @click="showSearch=!showSearch" /> |
| | | </el-tooltip> |
| | | </div> |
| | | </el-row> |
| | | |
| | | <el-table |
| | | v-loading="loading" |
| | |
| | | return { |
| | | // é®ç½©å± |
| | | loading: true, |
| | | // æ¾ç¤ºæç´¢æ¡ä»¶ |
| | | showSearch: true, |
| | | // èåè¡¨æ ¼æ æ°æ® |
| | | menuList: [], |
| | | // èåæ é项 |
| | |
| | | handleQuery() { |
| | | this.getList(); |
| | | }, |
| | | /** éç½®æé®æä½ */ |
| | | resetQuery() { |
| | | this.resetForm("queryForm"); |
| | | this.handleQuery(); |
| | | }, |
| | | /** æ°å¢æé®æä½ */ |
| | | handleAdd(row) { |
| | | this.reset(); |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px"> |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> |
| | | <el-form-item label="å
¬åæ é¢" prop="noticeTitle"> |
| | | <el-input |
| | | v-model="queryParams.noticeTitle" |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> |
| | | <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">éç½®</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | |
| | | v-hasPermi="['system:notice:remove']" |
| | | >å é¤</el-button> |
| | | </el-col> |
| | | <div class="top-right-btn"> |
| | | <el-tooltip class="item" effect="dark" content="å·æ°" placement="top"> |
| | | <el-button size="mini" circle icon="el-icon-refresh" @click="handleQuery" /> |
| | | </el-tooltip> |
| | | <el-tooltip class="item" effect="dark" :content="showSearch ? 'éèæç´¢' : 'æ¾ç¤ºæç´¢'" placement="top"> |
| | | <el-button size="mini" circle icon="el-icon-search" @click="showSearch=!showSearch" /> |
| | | </el-tooltip> |
| | | </div> |
| | | </el-row> |
| | | |
| | | <el-table v-loading="loading" :data="noticeList" @selection-change="handleSelectionChange"> |
| | |
| | | single: true, |
| | | // éå¤ä¸ªç¦ç¨ |
| | | multiple: true, |
| | | // æ¾ç¤ºæç´¢æ¡ä»¶ |
| | | showSearch: true, |
| | | // æ»æ¡æ° |
| | | total: 0, |
| | | // å
¬åè¡¨æ ¼æ°æ® |
| | |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | </script> |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px"> |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> |
| | | <el-form-item label="å²ä½ç¼ç " prop="postCode"> |
| | | <el-input |
| | | v-model="queryParams.postCode" |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> |
| | | <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">éç½®</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | |
| | | v-hasPermi="['system:post:export']" |
| | | >导åº</el-button> |
| | | </el-col> |
| | | <div class="top-right-btn"> |
| | | <el-tooltip class="item" effect="dark" content="å·æ°" placement="top"> |
| | | <el-button size="mini" circle icon="el-icon-refresh" @click="handleQuery" /> |
| | | </el-tooltip> |
| | | <el-tooltip class="item" effect="dark" :content="showSearch ? 'éèæç´¢' : 'æ¾ç¤ºæç´¢'" placement="top"> |
| | | <el-button size="mini" circle icon="el-icon-search" @click="showSearch=!showSearch" /> |
| | | </el-tooltip> |
| | | </div> |
| | | </el-row> |
| | | |
| | | <el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange"> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | |
| | | <pagination |
| | | v-show="total>0" |
| | | :total="total" |
| | |
| | | single: true, |
| | | // éå¤ä¸ªç¦ç¨ |
| | | multiple: true, |
| | | // æ¾ç¤ºæç´¢æ¡ä»¶ |
| | | showSearch: true, |
| | | // æ»æ¡æ° |
| | | total: 0, |
| | | // å²ä½è¡¨æ ¼æ°æ® |
| | |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | </script> |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true"> |
| | | <el-form :model="queryParams" ref="queryForm" v-show="showSearch" :inline="true"> |
| | | <el-form-item label="è§è²åç§°" prop="roleName"> |
| | | <el-input |
| | | v-model="queryParams.roleName" |
| | |
| | | ></el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> |
| | | <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">éç½®</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | |
| | | icon="el-icon-download" |
| | | size="mini" |
| | | @click="handleExport" |
| | | v-hasPermi="['system:post:export']" |
| | | v-hasPermi="['system:role:export']" |
| | | >导åº</el-button> |
| | | </el-col> |
| | | <div class="top-right-btn"> |
| | | <el-tooltip class="item" effect="dark" content="å·æ°" placement="top"> |
| | | <el-button size="mini" circle icon="el-icon-refresh" @click="handleQuery" /> |
| | | </el-tooltip> |
| | | <el-tooltip class="item" effect="dark" :content="showSearch ? 'éèæç´¢' : 'æ¾ç¤ºæç´¢'" placement="top"> |
| | | <el-button size="mini" circle icon="el-icon-search" @click="showSearch=!showSearch" /> |
| | | </el-tooltip> |
| | | </div> |
| | | </el-row> |
| | | |
| | | <el-table v-loading="loading" :data="roleList" @selection-change="handleSelectionChange"> |
| | |
| | | single: true, |
| | | // éå¤ä¸ªç¦ç¨ |
| | | multiple: true, |
| | | // æ¾ç¤ºæç´¢æ¡ä»¶ |
| | | showSearch: true, |
| | | // æ»æ¡æ° |
| | | total: 0, |
| | | // è§è²è¡¨æ ¼æ°æ® |
| | |
| | | </el-col> |
| | | <!--ç¨æ·æ°æ®--> |
| | | <el-col :span="20" :xs="24"> |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px"> |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> |
| | | <el-form-item label="ç¨æ·åç§°" prop="userName"> |
| | | <el-input |
| | | v-model="queryParams.userName" |
| | |
| | | ></el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> |
| | | <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">éç½®</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | |
| | | v-hasPermi="['system:user:export']" |
| | | >导åº</el-button> |
| | | </el-col> |
| | | <div class="top-right-btn"> |
| | | <el-tooltip class="item" effect="dark" content="å·æ°" placement="top"> |
| | | <el-button size="mini" circle icon="el-icon-refresh" @click="handleQuery" /> |
| | | </el-tooltip> |
| | | <el-tooltip class="item" effect="dark" :content="showSearch ? 'éèæç´¢' : 'æ¾ç¤ºæç´¢'" placement="top"> |
| | | <el-button size="mini" circle icon="el-icon-search" @click="showSearch=!showSearch" /> |
| | | </el-tooltip> |
| | | </div> |
| | | </el-row> |
| | | |
| | | <el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange"> |
| | |
| | | single: true, |
| | | // éå¤ä¸ªç¦ç¨ |
| | | multiple: true, |
| | | // æ¾ç¤ºæç´¢æ¡ä»¶ |
| | | showSearch: true, |
| | | // æ»æ¡æ° |
| | | total: 0, |
| | | // ç¨æ·è¡¨æ ¼æ°æ® |
| | |
| | | <span slot="label">çææ¨¡æ¿</span> |
| | | <el-select v-model="info.tplCategory"> |
| | | <el-option label="å表ï¼å¢å æ¹æ¥ï¼" value="crud" /> |
| | | <el-option label="æ 表ï¼å¢å æ¹æ¥ï¼" value="tree"/> |
| | | <el-option label="æ 表ï¼å¢å æ¹æ¥ï¼" value="tree" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | </el-col> |
| | | |
| | | <el-col :span="12"> |
| | | <el-form-item prop="functionName"> |
| | | <el-form-item> |
| | | <span slot="label"> |
| | | ä¸çº§èå |
| | | <el-tooltip content="åé
å°æå®èåä¸ï¼ä¾å¦ ç³»ç»ç®¡ç" placement="top"> |
| | | <i class="el-icon-question"></i> |
| | | </el-tooltip> |
| | | </span> |
| | | <treeselect :append-to-body="true" v-model="info.parentMenuId" :options="menus" :normalizer="normalizer" :show-count="true" placeholder="è¯·éæ©ç³»ç»èå"/> |
| | | <treeselect |
| | | :append-to-body="true" |
| | | v-model="info.parentMenuId" |
| | | :options="menus" |
| | | :normalizer="normalizer" |
| | | :show-count="true" |
| | | placeholder="è¯·éæ©ç³»ç»èå" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | <el-col :span="12"> |
| | | <el-form-item prop="genType"> |
| | | <span slot="label"> |
| | | çæä»£ç æ¹å¼ |
| | | <el-tooltip content="é»è®¤ä¸ºzipå缩å
ä¸è½½ï¼ä¹å¯ä»¥èªå®ä¹çæè·¯å¾" placement="top"> |
| | | <i class="el-icon-question"></i> |
| | | </el-tooltip> |
| | | </span> |
| | | <el-radio v-model="info.genType" label="0">zipå缩å
</el-radio> |
| | | <el-radio v-model="info.genType" label="1">èªå®ä¹è·¯å¾</el-radio> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | <el-col :span="24" v-if="info.genType == '1'"> |
| | | <el-form-item prop="genPath"> |
| | | <span slot="label"> |
| | | èªå®ä¹è·¯å¾ |
| | | <el-tooltip content="å¡«åç£çç»å¯¹è·¯å¾ï¼è¥ä¸å¡«åï¼åçæå°å½åWeb项ç®ä¸" placement="top"> |
| | | <i class="el-icon-question"></i> |
| | | </el-tooltip> |
| | | </span> |
| | | <el-input v-model="info.genPath"> |
| | | <el-dropdown slot="append"> |
| | | <el-button type="primary"> |
| | | æè¿è·¯å¾å¿«ééæ© |
| | | <i class="el-icon-arrow-down el-icon--right"></i> |
| | | </el-button> |
| | | <el-dropdown-menu slot="dropdown"> |
| | | <el-dropdown-item @click.native="info.genPath = '/'">æ¢å¤é»è®¤ççæåºç¡è·¯å¾</el-dropdown-item> |
| | | </el-dropdown-menu> |
| | | </el-dropdown> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | ], |
| | | functionName: [ |
| | | { required: true, message: "请è¾å
¥çæåè½å", trigger: "blur" } |
| | | ] |
| | | ], |
| | | } |
| | | }; |
| | | }, |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px"> |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> |
| | | <el-form-item label="表åç§°" prop="tableName"> |
| | | <el-input |
| | | v-model="queryParams.tableName" |
| | |
| | | ></el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> |
| | | <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">éç½®</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | |
| | | v-hasPermi="['tool:gen:remove']" |
| | | >å é¤</el-button> |
| | | </el-col> |
| | | <div class="top-right-btn"> |
| | | <el-tooltip class="item" effect="dark" content="å·æ°" placement="top"> |
| | | <el-button size="mini" circle icon="el-icon-refresh" @click="handleQuery" /> |
| | | </el-tooltip> |
| | | <el-tooltip class="item" effect="dark" :content="showSearch ? 'éèæç´¢' : 'æ¾ç¤ºæç´¢'" placement="top"> |
| | | <el-button size="mini" circle icon="el-icon-search" @click="showSearch=!showSearch" /> |
| | | </el-tooltip> |
| | | </div> |
| | | </el-row> |
| | | |
| | | <el-table v-loading="loading" :data="tableList" @selection-change="handleSelectionChange"> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { listTable, previewTable, delTable } from "@/api/tool/gen"; |
| | | import { listTable, previewTable, delTable, genCode } from "@/api/tool/gen"; |
| | | import importTable from "./importTable"; |
| | | import { downLoadZip } from "@/utils/zipdownload"; |
| | | export default { |
| | |
| | | single: true, |
| | | // éå¤ä¸ªç¦ç¨ |
| | | multiple: true, |
| | | // æ¾ç¤ºæç´¢æ¡ä»¶ |
| | | showSearch: true, |
| | | // æ»æ¡æ° |
| | | total: 0, |
| | | // è¡¨æ°æ® |
| | |
| | | this.msgError("è¯·éæ©è¦çæçæ°æ®"); |
| | | return; |
| | | } |
| | | downLoadZip("/tool/gen/batchGenCode?tables=" + tableNames, "ruoyi"); |
| | | if(row.genType === "1") { |
| | | genCode(row.tableName).then(response => { |
| | | this.msgSuccess("æåçæå°èªå®ä¹è·¯å¾ï¼" + row.genPath); |
| | | }); |
| | | } else { |
| | | downLoadZip("/tool/gen/batchGenCode?tables=" + tableNames, "ruoyi"); |
| | | } |
| | | }, |
| | | /** æå¼å¯¼å
¥è¡¨å¼¹çª */ |
| | | openImportTable() { |
| | |
| | | devServer: { |
| | | host: '0.0.0.0', |
| | | port: port, |
| | | open: true, |
| | | proxy: { |
| | | // detail: https://cli.vuejs.org/config/#devserver-proxy |
| | | [process.env.VUE_APP_BASE_API]: { |
| | |
| | | .loader('svg-sprite-loader') |
| | | .options({ |
| | | symbolId: 'icon-[name]' |
| | | }) |
| | | .end() |
| | | |
| | | // set preserveWhitespace |
| | | config.module |
| | | .rule('vue') |
| | | .use('vue-loader') |
| | | .loader('vue-loader') |
| | | .tap(options => { |
| | | options.compilerOptions.preserveWhitespace = true |
| | | return options |
| | | }) |
| | | .end() |
| | | |
ÎļþÃû´Ó sql/ry_20200629.sql ÐÞ¸Ä |
| | |
| | | -- ---------------------------- |
| | | -- åå§å-è§è²ä¿¡æ¯è¡¨æ°æ® |
| | | -- ---------------------------- |
| | | insert into sys_role values('1', 'ç³»ç»ç®¡çå', 'admin', 1, 1, '0', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', 'ç³»ç»ç®¡çå'); |
| | | insert into sys_role values('1', 'è¶
级管çå', 'admin', 1, 1, '0', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', 'è¶
级管çå'); |
| | | insert into sys_role values('2', 'æ®éè§è²', 'common', 2, 2, '0', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', 'æ®éè§è²'); |
| | | |
| | | |
| | |
| | | business_name varchar(30) comment 'çæä¸å¡å', |
| | | function_name varchar(50) comment 'çæåè½å', |
| | | function_author varchar(50) comment 'çæåè½ä½è
', |
| | | gen_type char(1) default '0' comment 'çæä»£ç æ¹å¼ï¼0zipå缩å
1èªå®ä¹è·¯å¾ï¼', |
| | | gen_path varchar(200) default '/' comment 'çæè·¯å¾ï¼ä¸å¡«é»è®¤é¡¹ç®è·¯å¾ï¼', |
| | | options varchar(1000) comment 'å
¶å®çæé项', |
| | | create_by varchar(64) default '' comment 'å建è
', |
| | | create_time datetime comment 'å建æ¶é´', |