Merge branch 'master' of gitee.com:y_project/RuoYi-Vue into ruoyi-ui
This commit is contained in:
commit
39646ee7f2
@ -7,6 +7,7 @@
|
|||||||
* 权限认证使用Jwt,支持多终端认证系统。
|
* 权限认证使用Jwt,支持多终端认证系统。
|
||||||
* 支持加载动态权限菜单,多方式轻松权限控制。
|
* 支持加载动态权限菜单,多方式轻松权限控制。
|
||||||
* 高效率开发,使用代码生成器可以一键生成前后端代码。
|
* 高效率开发,使用代码生成器可以一键生成前后端代码。
|
||||||
|
* 提供了技术栈([Vue3](https://v3.cn.vuejs.org) [Element Plus](https://element-plus.org/zh-CN) [Vite](https://cn.vitejs.dev))版本[RuoYi-Vue3](https://github.com/yangzongzhuan/RuoYi-Vue3),保持同步更新。
|
||||||
* 提供了单应用版本[RuoYi-Vue-fast](https://github.com/yangzongzhuan/RuoYi-Vue-fast),Oracle版本[RuoYi-Vue-Oracle](https://github.com/yangzongzhuan/RuoYi-Vue-Oracle),保持同步更新。
|
* 提供了单应用版本[RuoYi-Vue-fast](https://github.com/yangzongzhuan/RuoYi-Vue-fast),Oracle版本[RuoYi-Vue-Oracle](https://github.com/yangzongzhuan/RuoYi-Vue-Oracle),保持同步更新。
|
||||||
* 不分离版本,请移步[RuoYi](https://gitee.com/y_project/RuoYi),微服务版本,请移步[RuoYi-Cloud](https://gitee.com/y_project/RuoYi-Cloud)
|
* 不分离版本,请移步[RuoYi](https://gitee.com/y_project/RuoYi),微服务版本,请移步[RuoYi-Cloud](https://gitee.com/y_project/RuoYi-Cloud)
|
||||||
* 特别鸣谢:[element](https://github.com/ElemeFE/element),[vue-element-admin](https://github.com/PanJiaChen/vue-element-admin),[eladmin-web](https://github.com/elunez/eladmin-web)。
|
* 特别鸣谢:[element](https://github.com/ElemeFE/element),[vue-element-admin](https://github.com/PanJiaChen/vue-element-admin),[eladmin-web](https://github.com/elunez/eladmin-web)。
|
||||||
|
14
pom.xml
14
pom.xml
@ -6,14 +6,14 @@
|
|||||||
|
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi</artifactId>
|
<artifactId>ruoyi</artifactId>
|
||||||
<version>3.7.0</version>
|
<version>3.8.0</version>
|
||||||
|
|
||||||
<name>ruoyi</name>
|
<name>ruoyi</name>
|
||||||
<url>http://www.ruoyi.vip</url>
|
<url>http://www.ruoyi.vip</url>
|
||||||
<description>若依管理系统</description>
|
<description>若依管理系统</description>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<ruoyi.version>3.7.0</ruoyi.version>
|
<ruoyi.version>3.8.0</ruoyi.version>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
<java.version>1.8</java.version>
|
<java.version>1.8</java.version>
|
||||||
@ -31,7 +31,7 @@
|
|||||||
<commons.fileupload.version>1.4</commons.fileupload.version>
|
<commons.fileupload.version>1.4</commons.fileupload.version>
|
||||||
<commons.collections.version>3.2.2</commons.collections.version>
|
<commons.collections.version>3.2.2</commons.collections.version>
|
||||||
<poi.version>4.1.2</poi.version>
|
<poi.version>4.1.2</poi.version>
|
||||||
<velocity.version>1.7</velocity.version>
|
<velocity.version>2.3</velocity.version>
|
||||||
<jwt.version>0.9.1</jwt.version>
|
<jwt.version>0.9.1</jwt.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
@ -132,14 +132,8 @@
|
|||||||
<!-- velocity代码生成使用模板 -->
|
<!-- velocity代码生成使用模板 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.velocity</groupId>
|
<groupId>org.apache.velocity</groupId>
|
||||||
<artifactId>velocity</artifactId>
|
<artifactId>velocity-engine-core</artifactId>
|
||||||
<version>${velocity.version}</version>
|
<version>${velocity.version}</version>
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>commons-collections</groupId>
|
|
||||||
<artifactId>commons-collections</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- collections工具类 -->
|
<!-- collections工具类 -->
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>ruoyi</artifactId>
|
<artifactId>ruoyi</artifactId>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<version>3.7.0</version>
|
<version>3.8.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
@ -60,6 +60,9 @@ public class SysProfileController extends BaseController
|
|||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult updateProfile(@RequestBody SysUser user)
|
public AjaxResult updateProfile(@RequestBody SysUser user)
|
||||||
{
|
{
|
||||||
|
LoginUser loginUser = getLoginUser();
|
||||||
|
SysUser sysUser = loginUser.getUser();
|
||||||
|
user.setUserName(sysUser.getUserName());
|
||||||
if (StringUtils.isNotEmpty(user.getPhonenumber())
|
if (StringUtils.isNotEmpty(user.getPhonenumber())
|
||||||
&& UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user)))
|
&& UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user)))
|
||||||
{
|
{
|
||||||
@ -70,8 +73,6 @@ public class SysProfileController extends BaseController
|
|||||||
{
|
{
|
||||||
return AjaxResult.error("修改用户'" + user.getUserName() + "'失败,邮箱账号已存在");
|
return AjaxResult.error("修改用户'" + user.getUserName() + "'失败,邮箱账号已存在");
|
||||||
}
|
}
|
||||||
LoginUser loginUser = getLoginUser();
|
|
||||||
SysUser sysUser = loginUser.getUser();
|
|
||||||
user.setUserId(sysUser.getUserId());
|
user.setUserId(sysUser.getUserId());
|
||||||
user.setPassword(null);
|
user.setPassword(null);
|
||||||
if (userService.updateUserProfile(user) > 0)
|
if (userService.updateUserProfile(user) > 0)
|
||||||
|
@ -3,7 +3,7 @@ ruoyi:
|
|||||||
# 名称
|
# 名称
|
||||||
name: RuoYi
|
name: RuoYi
|
||||||
# 版本
|
# 版本
|
||||||
version: 3.7.0
|
version: 3.8.0
|
||||||
# 版权年份
|
# 版权年份
|
||||||
copyrightYear: 2021
|
copyrightYear: 2021
|
||||||
# 实例演示开关
|
# 实例演示开关
|
||||||
@ -25,10 +25,13 @@ server:
|
|||||||
tomcat:
|
tomcat:
|
||||||
# tomcat的URI编码
|
# tomcat的URI编码
|
||||||
uri-encoding: UTF-8
|
uri-encoding: UTF-8
|
||||||
# tomcat最大线程数,默认为200
|
# 连接数满后的排队数,默认为100
|
||||||
max-threads: 800
|
accept-count: 1000
|
||||||
# Tomcat启动初始化的线程数,默认值25
|
threads:
|
||||||
min-spare-threads: 30
|
# tomcat最大线程数,默认为200
|
||||||
|
max: 800
|
||||||
|
# Tomcat启动初始化的线程数,默认值10
|
||||||
|
min-spare: 100
|
||||||
|
|
||||||
# 日志配置
|
# 日志配置
|
||||||
logging:
|
logging:
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>ruoyi</artifactId>
|
<artifactId>ruoyi</artifactId>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<version>3.7.0</version>
|
<version>3.8.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>ruoyi</artifactId>
|
<artifactId>ruoyi</artifactId>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<version>3.7.0</version>
|
<version>3.8.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>ruoyi</artifactId>
|
<artifactId>ruoyi</artifactId>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<version>3.7.0</version>
|
<version>3.8.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
@ -20,7 +20,7 @@
|
|||||||
<!--velocity代码生成使用模板 -->
|
<!--velocity代码生成使用模板 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.velocity</groupId>
|
<groupId>org.apache.velocity</groupId>
|
||||||
<artifactId>velocity</artifactId>
|
<artifactId>velocity-engine-core</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- collections工具类 -->
|
<!-- collections工具类 -->
|
||||||
|
@ -20,10 +20,9 @@ public class VelocityInitializer
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
// 加载classpath目录下的vm文件
|
// 加载classpath目录下的vm文件
|
||||||
p.setProperty("file.resource.loader.class", "org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader");
|
p.setProperty("resource.loader.file.class", "org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader");
|
||||||
// 定义字符集
|
// 定义字符集
|
||||||
p.setProperty(Velocity.INPUT_ENCODING, Constants.UTF8);
|
p.setProperty(Velocity.INPUT_ENCODING, Constants.UTF8);
|
||||||
p.setProperty(Velocity.OUTPUT_ENCODING, Constants.UTF8);
|
|
||||||
// 初始化Velocity引擎,指定配置Properties
|
// 初始化Velocity引擎,指定配置Properties
|
||||||
Velocity.init(p);
|
Velocity.init(p);
|
||||||
}
|
}
|
||||||
|
@ -274,7 +274,8 @@ public class VelocityUtils
|
|||||||
for (GenTableColumn column : columns)
|
for (GenTableColumn column : columns)
|
||||||
{
|
{
|
||||||
if (!column.isSuperColumn() && StringUtils.isNotEmpty(column.getDictType()) && StringUtils.equalsAny(
|
if (!column.isSuperColumn() && StringUtils.isNotEmpty(column.getDictType()) && StringUtils.equalsAny(
|
||||||
column.getHtmlType(), new String[] { GenConstants.HTML_SELECT, GenConstants.HTML_RADIO }))
|
column.getHtmlType(),
|
||||||
|
new String[] { GenConstants.HTML_SELECT, GenConstants.HTML_RADIO, GenConstants.HTML_CHECKBOX }))
|
||||||
{
|
{
|
||||||
dicts.add("'" + column.getDictType() + "'");
|
dicts.add("'" + column.getDictType() + "'");
|
||||||
}
|
}
|
||||||
|
@ -42,12 +42,3 @@ export function del${BusinessName}(${pkColumn.javaField}) {
|
|||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 导出${functionName}
|
|
||||||
export function export${BusinessName}(query) {
|
|
||||||
return request({
|
|
||||||
url: '/${moduleName}/${businessName}/export',
|
|
||||||
method: 'get',
|
|
||||||
params: query
|
|
||||||
})
|
|
||||||
}
|
|
@ -108,7 +108,11 @@
|
|||||||
#elseif($column.list && "" != $column.dictType)
|
#elseif($column.list && "" != $column.dictType)
|
||||||
<el-table-column label="${comment}" align="center" prop="${javaField}">
|
<el-table-column label="${comment}" align="center" prop="${javaField}">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
#if($column.htmlType == "checkbox")
|
||||||
|
<dict-tag :options="dict.type.${column.dictType}" :value="scope.row.${javaField} ? scope.row.${javaField}.split(',') : []"/>
|
||||||
|
#else
|
||||||
<dict-tag :options="dict.type.${column.dictType}" :value="scope.row.${javaField}"/>
|
<dict-tag :options="dict.type.${column.dictType}" :value="scope.row.${javaField}"/>
|
||||||
|
#end
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
#elseif($column.list && "" != $javaField)
|
#elseif($column.list && "" != $javaField)
|
||||||
@ -259,7 +263,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName}, export${BusinessName} } from "@/api/${moduleName}/${businessName}";
|
import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName} } from "@/api/${moduleName}/${businessName}";
|
||||||
import Treeselect from "@riophae/vue-treeselect";
|
import Treeselect from "@riophae/vue-treeselect";
|
||||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||||
|
|
||||||
@ -296,8 +300,7 @@ export default {
|
|||||||
queryParams: {
|
queryParams: {
|
||||||
#foreach ($column in $columns)
|
#foreach ($column in $columns)
|
||||||
#if($column.query)
|
#if($column.query)
|
||||||
$column.javaField: null#if($velocityCount != $columns.size()),#end
|
$column.javaField: null#if($foreach.count != $columns.size()),#end
|
||||||
|
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
},
|
},
|
||||||
@ -315,8 +318,7 @@ export default {
|
|||||||
#end
|
#end
|
||||||
$column.javaField: [
|
$column.javaField: [
|
||||||
{ required: true, message: "$comment不能为空", trigger: #if($column.htmlType == "select")"change"#else"blur"#end }
|
{ required: true, message: "$comment不能为空", trigger: #if($column.htmlType == "select")"change"#else"blur"#end }
|
||||||
]#if($velocityCount != $columns.size()),#end
|
]#if($foreach.count != $columns.size()),#end
|
||||||
|
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
}
|
}
|
||||||
@ -379,14 +381,12 @@ export default {
|
|||||||
this.form = {
|
this.form = {
|
||||||
#foreach ($column in $columns)
|
#foreach ($column in $columns)
|
||||||
#if($column.htmlType == "radio")
|
#if($column.htmlType == "radio")
|
||||||
$column.javaField: #if($column.javaType == "Integer" || $column.javaType == "Long")0#else"0"#end#if($velocityCount != $columns.size()),#end
|
$column.javaField: #if($column.javaType == "Integer" || $column.javaType == "Long")0#else"0"#end#if($foreach.count != $columns.size()),#end
|
||||||
|
|
||||||
#elseif($column.htmlType == "checkbox")
|
#elseif($column.htmlType == "checkbox")
|
||||||
$column.javaField: []#if($velocityCount != $columns.size()),#end
|
$column.javaField: []#if($foreach.count != $columns.size()),#end
|
||||||
|
|
||||||
#else
|
#else
|
||||||
$column.javaField: null#if($velocityCount != $columns.size()),#end
|
$column.javaField: null#if($foreach.count != $columns.size()),#end
|
||||||
|
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
};
|
};
|
||||||
|
@ -136,7 +136,11 @@
|
|||||||
#elseif($column.list && "" != $column.dictType)
|
#elseif($column.list && "" != $column.dictType)
|
||||||
<el-table-column label="${comment}" align="center" prop="${javaField}">
|
<el-table-column label="${comment}" align="center" prop="${javaField}">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
#if($column.htmlType == "checkbox")
|
||||||
|
<dict-tag :options="dict.type.${column.dictType}" :value="scope.row.${javaField} ? scope.row.${javaField}.split(',') : []"/>
|
||||||
|
#else
|
||||||
<dict-tag :options="dict.type.${column.dictType}" :value="scope.row.${javaField}"/>
|
<dict-tag :options="dict.type.${column.dictType}" :value="scope.row.${javaField}"/>
|
||||||
|
#end
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
#elseif($column.list && "" != $javaField)
|
#elseif($column.list && "" != $javaField)
|
||||||
@ -360,8 +364,7 @@ export default {
|
|||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
#foreach ($column in $columns)
|
#foreach ($column in $columns)
|
||||||
#if($column.query)
|
#if($column.query)
|
||||||
$column.javaField: null#if($velocityCount != $columns.size()),#end
|
$column.javaField: null#if($foreach.count != $columns.size()),#end
|
||||||
|
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
},
|
},
|
||||||
@ -379,8 +382,7 @@ export default {
|
|||||||
#end
|
#end
|
||||||
$column.javaField: [
|
$column.javaField: [
|
||||||
{ required: true, message: "$comment不能为空", trigger: #if($column.htmlType == "select")"change"#else"blur"#end }
|
{ required: true, message: "$comment不能为空", trigger: #if($column.htmlType == "select")"change"#else"blur"#end }
|
||||||
]#if($velocityCount != $columns.size()),#end
|
]#if($foreach.count != $columns.size()),#end
|
||||||
|
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
}
|
}
|
||||||
@ -424,14 +426,11 @@ export default {
|
|||||||
this.form = {
|
this.form = {
|
||||||
#foreach ($column in $columns)
|
#foreach ($column in $columns)
|
||||||
#if($column.htmlType == "radio")
|
#if($column.htmlType == "radio")
|
||||||
$column.javaField: #if($column.javaType == "Integer" || $column.javaType == "Long")0#else"0"#end#if($velocityCount != $columns.size()),#end
|
$column.javaField: #if($column.javaType == "Integer" || $column.javaType == "Long")0#else"0"#end#if($foreach.count != $columns.size()),#end
|
||||||
|
|
||||||
#elseif($column.htmlType == "checkbox")
|
#elseif($column.htmlType == "checkbox")
|
||||||
$column.javaField: []#if($velocityCount != $columns.size()),#end
|
$column.javaField: []#if($foreach.count != $columns.size()),#end
|
||||||
|
|
||||||
#else
|
#else
|
||||||
$column.javaField: null#if($velocityCount != $columns.size()),#end
|
$column.javaField: null#if($foreach.count != $columns.size()),#end
|
||||||
|
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
};
|
};
|
||||||
|
@ -23,7 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
#end
|
#end
|
||||||
|
|
||||||
<sql id="select${ClassName}Vo">
|
<sql id="select${ClassName}Vo">
|
||||||
select#foreach($column in $columns) $column.columnName#if($velocityCount != $columns.size()),#end#end from ${tableName}
|
select#foreach($column in $columns) $column.columnName#if($foreach.count != $columns.size()),#end#end from ${tableName}
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="select${ClassName}List" parameterType="${ClassName}" resultMap="${ClassName}Result">
|
<select id="select${ClassName}List" parameterType="${ClassName}" resultMap="${ClassName}Result">
|
||||||
@ -63,8 +63,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<include refid="select${ClassName}Vo"/>
|
<include refid="select${ClassName}Vo"/>
|
||||||
where ${pkColumn.columnName} = #{${pkColumn.javaField}}
|
where ${pkColumn.columnName} = #{${pkColumn.javaField}}
|
||||||
#elseif($table.sub)
|
#elseif($table.sub)
|
||||||
select#foreach($column in $columns) a.$column.columnName#if($velocityCount != $columns.size()),#end#end,
|
select#foreach($column in $columns) a.$column.columnName#if($foreach.count != $columns.size()),#end#end,
|
||||||
#foreach($column in $subTable.columns) b.$column.columnName as sub_$column.columnName#if($velocityCount != $subTable.columns.size()),#end#end
|
#foreach($column in $subTable.columns) b.$column.columnName as sub_$column.columnName#if($foreach.count != $subTable.columns.size()),#end#end
|
||||||
|
|
||||||
from ${tableName} a
|
from ${tableName} a
|
||||||
left join ${subTableName} b on b.${subTableFkName} = a.${pkColumn.columnName}
|
left join ${subTableName} b on b.${subTableFkName} = a.${pkColumn.columnName}
|
||||||
@ -126,9 +126,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<insert id="batch${subClassName}">
|
<insert id="batch${subClassName}">
|
||||||
insert into ${subTableName}(#foreach($column in $subTable.columns) $column.columnName#if($velocityCount != $subTable.columns.size()),#end#end) values
|
insert into ${subTableName}(#foreach($column in $subTable.columns) $column.columnName#if($foreach.count != $subTable.columns.size()),#end#end) values
|
||||||
<foreach item="item" index="index" collection="list" separator=",">
|
<foreach item="item" index="index" collection="list" separator=",">
|
||||||
(#foreach($column in $subTable.columns) #{item.$column.javaField}#if($velocityCount != $subTable.columns.size()),#end#end)
|
(#foreach($column in $subTable.columns) #{item.$column.javaField}#if($foreach.count != $subTable.columns.size()),#end#end)
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
#end
|
#end
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>ruoyi</artifactId>
|
<artifactId>ruoyi</artifactId>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<version>3.7.0</version>
|
<version>3.8.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ import javax.sql.DataSource;
|
|||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定时任务配置
|
* 定时任务配置(单机部署建议删除此类和qrtz数据库表,默认走内存会最高效)
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>ruoyi</artifactId>
|
<artifactId>ruoyi</artifactId>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<version>3.7.0</version>
|
<version>3.8.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ public interface SysDeptMapper
|
|||||||
* @param deptCheckStrictly 部门树选择项是否关联显示
|
* @param deptCheckStrictly 部门树选择项是否关联显示
|
||||||
* @return 选中部门列表
|
* @return 选中部门列表
|
||||||
*/
|
*/
|
||||||
public List<Integer> selectDeptListByRoleId(@Param("roleId") Long roleId, @Param("deptCheckStrictly") boolean deptCheckStrictly);
|
public List<Long> selectDeptListByRoleId(@Param("roleId") Long roleId, @Param("deptCheckStrictly") boolean deptCheckStrictly);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据部门ID查询信息
|
* 根据部门ID查询信息
|
||||||
|
@ -64,7 +64,7 @@ public interface SysMenuMapper
|
|||||||
* @param menuCheckStrictly 菜单树选择项是否关联显示
|
* @param menuCheckStrictly 菜单树选择项是否关联显示
|
||||||
* @return 选中菜单列表
|
* @return 选中菜单列表
|
||||||
*/
|
*/
|
||||||
public List<Integer> selectMenuListByRoleId(@Param("roleId") Long roleId, @Param("menuCheckStrictly") boolean menuCheckStrictly);
|
public List<Long> selectMenuListByRoleId(@Param("roleId") Long roleId, @Param("menuCheckStrictly") boolean menuCheckStrictly);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据菜单ID查询信息
|
* 根据菜单ID查询信息
|
||||||
|
@ -39,7 +39,7 @@ public interface SysPostMapper
|
|||||||
* @param userId 用户ID
|
* @param userId 用户ID
|
||||||
* @return 选中岗位ID列表
|
* @return 选中岗位ID列表
|
||||||
*/
|
*/
|
||||||
public List<Integer> selectPostListByUserId(Long userId);
|
public List<Long> selectPostListByUserId(Long userId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询用户所属岗位组
|
* 查询用户所属岗位组
|
||||||
|
@ -41,7 +41,7 @@ public interface ISysDeptService
|
|||||||
* @param roleId 角色ID
|
* @param roleId 角色ID
|
||||||
* @return 选中部门列表
|
* @return 选中部门列表
|
||||||
*/
|
*/
|
||||||
public List<Integer> selectDeptListByRoleId(Long roleId);
|
public List<Long> selectDeptListByRoleId(Long roleId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据部门ID查询信息
|
* 根据部门ID查询信息
|
||||||
|
@ -52,7 +52,7 @@ public interface ISysMenuService
|
|||||||
* @param roleId 角色ID
|
* @param roleId 角色ID
|
||||||
* @return 选中菜单列表
|
* @return 选中菜单列表
|
||||||
*/
|
*/
|
||||||
public List<Integer> selectMenuListByRoleId(Long roleId);
|
public List<Long> selectMenuListByRoleId(Long roleId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 构建前端路由所需要的菜单
|
* 构建前端路由所需要的菜单
|
||||||
|
@ -39,7 +39,7 @@ public interface ISysPostService
|
|||||||
* @param userId 用户ID
|
* @param userId 用户ID
|
||||||
* @return 选中岗位ID列表
|
* @return 选中岗位ID列表
|
||||||
*/
|
*/
|
||||||
public List<Integer> selectPostListByUserId(Long userId);
|
public List<Long> selectPostListByUserId(Long userId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验岗位名称
|
* 校验岗位名称
|
||||||
|
@ -100,7 +100,7 @@ public class SysDeptServiceImpl implements ISysDeptService
|
|||||||
* @return 选中部门列表
|
* @return 选中部门列表
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<Integer> selectDeptListByRoleId(Long roleId)
|
public List<Long> selectDeptListByRoleId(Long roleId)
|
||||||
{
|
{
|
||||||
SysRole role = roleMapper.selectRoleById(roleId);
|
SysRole role = roleMapper.selectRoleById(roleId);
|
||||||
return deptMapper.selectDeptListByRoleId(roleId, role.isDeptCheckStrictly());
|
return deptMapper.selectDeptListByRoleId(roleId, role.isDeptCheckStrictly());
|
||||||
|
@ -128,7 +128,7 @@ public class SysMenuServiceImpl implements ISysMenuService
|
|||||||
* @return 选中菜单列表
|
* @return 选中菜单列表
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<Integer> selectMenuListByRoleId(Long roleId)
|
public List<Long> selectMenuListByRoleId(Long roleId)
|
||||||
{
|
{
|
||||||
SysRole role = roleMapper.selectRoleById(roleId);
|
SysRole role = roleMapper.selectRoleById(roleId);
|
||||||
return menuMapper.selectMenuListByRoleId(roleId, role.isMenuCheckStrictly());
|
return menuMapper.selectMenuListByRoleId(roleId, role.isMenuCheckStrictly());
|
||||||
@ -179,7 +179,7 @@ public class SysMenuServiceImpl implements ISysMenuService
|
|||||||
router.setPath("/inner");
|
router.setPath("/inner");
|
||||||
List<RouterVo> childrenList = new ArrayList<RouterVo>();
|
List<RouterVo> childrenList = new ArrayList<RouterVo>();
|
||||||
RouterVo children = new RouterVo();
|
RouterVo children = new RouterVo();
|
||||||
String routerPath = StringUtils.replaceEach(menu.getPath(), new String[] { Constants.HTTP, Constants.HTTPS }, new String[] { "", "" });
|
String routerPath = innerLinkReplaceEach(menu.getPath());
|
||||||
children.setPath(routerPath);
|
children.setPath(routerPath);
|
||||||
children.setComponent(UserConstants.INNER_LINK);
|
children.setComponent(UserConstants.INNER_LINK);
|
||||||
children.setName(StringUtils.capitalize(routerPath));
|
children.setName(StringUtils.capitalize(routerPath));
|
||||||
@ -358,7 +358,7 @@ public class SysMenuServiceImpl implements ISysMenuService
|
|||||||
// 内链打开外网方式
|
// 内链打开外网方式
|
||||||
if (menu.getParentId().intValue() != 0 && isInnerLink(menu))
|
if (menu.getParentId().intValue() != 0 && isInnerLink(menu))
|
||||||
{
|
{
|
||||||
routerPath = StringUtils.replaceEach(routerPath, new String[] { Constants.HTTP, Constants.HTTPS }, new String[] { "", "" });
|
routerPath = innerLinkReplaceEach(routerPath);
|
||||||
}
|
}
|
||||||
// 非外链并且是一级目录(类型为目录)
|
// 非外链并且是一级目录(类型为目录)
|
||||||
if (0 == menu.getParentId().intValue() && UserConstants.TYPE_DIR.equals(menu.getMenuType())
|
if (0 == menu.getParentId().intValue() && UserConstants.TYPE_DIR.equals(menu.getMenuType())
|
||||||
@ -500,4 +500,15 @@ public class SysMenuServiceImpl implements ISysMenuService
|
|||||||
{
|
{
|
||||||
return getChildList(list, t).size() > 0 ? true : false;
|
return getChildList(list, t).size() > 0 ? true : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 内链域名特殊字符替换
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String innerLinkReplaceEach(String path)
|
||||||
|
{
|
||||||
|
return StringUtils.replaceEach(path, new String[] { Constants.HTTP, Constants.HTTPS },
|
||||||
|
new String[] { "", "" });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -67,7 +67,7 @@ public class SysPostServiceImpl implements ISysPostService
|
|||||||
* @return 选中岗位ID列表
|
* @return 选中岗位ID列表
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<Integer> selectPostListByUserId(Long userId)
|
public List<Long> selectPostListByUserId(Long userId)
|
||||||
{
|
{
|
||||||
return postMapper.selectPostListByUserId(userId);
|
return postMapper.selectPostListByUserId(userId);
|
||||||
}
|
}
|
||||||
|
@ -2,11 +2,13 @@ package com.ruoyi.system.service.impl;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
import com.ruoyi.common.annotation.DataScope;
|
import com.ruoyi.common.annotation.DataScope;
|
||||||
import com.ruoyi.common.constant.UserConstants;
|
import com.ruoyi.common.constant.UserConstants;
|
||||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||||
@ -127,16 +129,11 @@ public class SysUserServiceImpl implements ISysUserService
|
|||||||
public String selectUserRoleGroup(String userName)
|
public String selectUserRoleGroup(String userName)
|
||||||
{
|
{
|
||||||
List<SysRole> list = roleMapper.selectRolesByUserName(userName);
|
List<SysRole> list = roleMapper.selectRolesByUserName(userName);
|
||||||
StringBuffer idsStr = new StringBuffer();
|
if (CollectionUtils.isEmpty(list))
|
||||||
for (SysRole role : list)
|
|
||||||
{
|
{
|
||||||
idsStr.append(role.getRoleName()).append(",");
|
return StringUtils.EMPTY;
|
||||||
}
|
}
|
||||||
if (StringUtils.isNotEmpty(idsStr.toString()))
|
return list.stream().map(SysRole::getRoleName).collect(Collectors.joining(","));
|
||||||
{
|
|
||||||
return idsStr.substring(0, idsStr.length() - 1);
|
|
||||||
}
|
|
||||||
return idsStr.toString();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -149,16 +146,11 @@ public class SysUserServiceImpl implements ISysUserService
|
|||||||
public String selectUserPostGroup(String userName)
|
public String selectUserPostGroup(String userName)
|
||||||
{
|
{
|
||||||
List<SysPost> list = postMapper.selectPostsByUserName(userName);
|
List<SysPost> list = postMapper.selectPostsByUserName(userName);
|
||||||
StringBuffer idsStr = new StringBuffer();
|
if (CollectionUtils.isEmpty(list))
|
||||||
for (SysPost post : list)
|
|
||||||
{
|
{
|
||||||
idsStr.append(post.getPostName()).append(",");
|
return StringUtils.EMPTY;
|
||||||
}
|
}
|
||||||
if (StringUtils.isNotEmpty(idsStr.toString()))
|
return list.stream().map(SysPost::getPostName).collect(Collectors.joining(","));
|
||||||
{
|
|
||||||
return idsStr.substring(0, idsStr.length() - 1);
|
|
||||||
}
|
|
||||||
return idsStr.toString();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -47,7 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
order by d.parent_id, d.order_num
|
order by d.parent_id, d.order_num
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectDeptListByRoleId" resultType="Integer">
|
<select id="selectDeptListByRoleId" resultType="Long">
|
||||||
select d.dept_id
|
select d.dept_id
|
||||||
from sys_dept d
|
from sys_dept d
|
||||||
left join sys_role_dept rd on d.dept_id = rd.dept_id
|
left join sys_role_dept rd on d.dept_id = rd.dept_id
|
||||||
|
@ -84,7 +84,7 @@
|
|||||||
order by m.parent_id, m.order_num
|
order by m.parent_id, m.order_num
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectMenuListByRoleId" resultType="Integer">
|
<select id="selectMenuListByRoleId" resultType="Long">
|
||||||
select m.menu_id
|
select m.menu_id
|
||||||
from sys_menu m
|
from sys_menu m
|
||||||
left join sys_role_menu rm on m.menu_id = rm.menu_id
|
left join sys_role_menu rm on m.menu_id = rm.menu_id
|
||||||
|
@ -46,7 +46,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
where post_id = #{postId}
|
where post_id = #{postId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectPostListByUserId" parameterType="Long" resultType="Integer">
|
<select id="selectPostListByUserId" parameterType="Long" resultType="Long">
|
||||||
select p.post_id
|
select p.post_id
|
||||||
from sys_post p
|
from sys_post p
|
||||||
left join sys_user_post up on up.post_id = p.post_id
|
left join sys_user_post up on up.post_id = p.post_id
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ruoyi",
|
"name": "ruoyi",
|
||||||
"version": "3.7.0",
|
"version": "3.8.0",
|
||||||
"description": "若依管理系统",
|
"description": "若依管理系统",
|
||||||
"author": "若依",
|
"author": "若依",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@ -46,7 +46,7 @@
|
|||||||
"fuse.js": "6.4.3",
|
"fuse.js": "6.4.3",
|
||||||
"highlight.js": "9.18.5",
|
"highlight.js": "9.18.5",
|
||||||
"js-beautify": "1.13.0",
|
"js-beautify": "1.13.0",
|
||||||
"js-cookie": "2.2.1",
|
"js-cookie": "3.0.1",
|
||||||
"jsencrypt": "3.2.1",
|
"jsencrypt": "3.2.1",
|
||||||
"nprogress": "0.2.0",
|
"nprogress": "0.2.0",
|
||||||
"quill": "1.3.7",
|
"quill": "1.3.7",
|
||||||
@ -55,7 +55,7 @@
|
|||||||
"vue": "2.6.12",
|
"vue": "2.6.12",
|
||||||
"vue-count-to": "1.0.13",
|
"vue-count-to": "1.0.13",
|
||||||
"vue-cropper": "0.5.5",
|
"vue-cropper": "0.5.5",
|
||||||
"vue-meta": "^2.4.0",
|
"vue-meta": "2.4.0",
|
||||||
"vue-router": "3.4.9",
|
"vue-router": "3.4.9",
|
||||||
"vuedraggable": "2.24.3",
|
"vuedraggable": "2.24.3",
|
||||||
"vuex": "3.6.0"
|
"vuex": "3.6.0"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
|
||||||
// 查询服务器详细
|
// 获取服务信息
|
||||||
export function getServer() {
|
export function getServer() {
|
||||||
return request({
|
return request({
|
||||||
url: '/monitor/server',
|
url: '/monitor/server',
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<el-breadcrumb class="app-breadcrumb" separator="/">
|
<el-breadcrumb class="app-breadcrumb" separator="/">
|
||||||
<transition-group name="breadcrumb">
|
<transition-group name="breadcrumb">
|
||||||
<el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path">
|
<el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path">
|
||||||
<span v-if="item.redirect==='noRedirect'||index==levelList.length-1" class="no-redirect">{{ item.meta.title }}</span>
|
<span v-if="item.redirect === 'noRedirect' || index == levelList.length - 1" class="no-redirect">{{ item.meta.title }}</span>
|
||||||
<a v-else @click.prevent="handleLink(item)">{{ item.meta.title }}</a>
|
<a v-else @click.prevent="handleLink(item)">{{ item.meta.title }}</a>
|
||||||
</el-breadcrumb-item>
|
</el-breadcrumb-item>
|
||||||
</transition-group>
|
</transition-group>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<el-form size="small">
|
<el-form size="small">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-radio v-model='radioValue' :label="1">
|
<el-radio v-model='radioValue' :label="1">
|
||||||
日,允许的通配符[, - * / L M]
|
日,允许的通配符[, - * ? / L W]
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
@ -15,23 +15,23 @@
|
|||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-radio v-model='radioValue' :label="3">
|
<el-radio v-model='radioValue' :label="3">
|
||||||
周期从
|
周期从
|
||||||
<el-input-number v-model='cycle01' :min="0" :max="31" /> -
|
<el-input-number v-model='cycle01' :min="1" :max="30" /> -
|
||||||
<el-input-number v-model='cycle02' :min="0" :max="31" /> 日
|
<el-input-number v-model='cycle02' :min="cycle01 ? cycle01 + 1 : 2" :max="31" /> 日
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-radio v-model='radioValue' :label="4">
|
<el-radio v-model='radioValue' :label="4">
|
||||||
从
|
从
|
||||||
<el-input-number v-model='average01' :min="0" :max="31" /> 号开始,每
|
<el-input-number v-model='average01' :min="1" :max="30" /> 号开始,每
|
||||||
<el-input-number v-model='average02' :min="0" :max="31" /> 日执行一次
|
<el-input-number v-model='average02' :min="1" :max="31 - average01 || 1" /> 日执行一次
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-radio v-model='radioValue' :label="5">
|
<el-radio v-model='radioValue' :label="5">
|
||||||
每月
|
每月
|
||||||
<el-input-number v-model='workday' :min="0" :max="31" /> 号最近的那个工作日
|
<el-input-number v-model='workday' :min="1" :max="31" /> 号最近的那个工作日
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
@ -72,31 +72,22 @@ export default {
|
|||||||
// 单选按钮值变化时
|
// 单选按钮值变化时
|
||||||
radioChange() {
|
radioChange() {
|
||||||
('day rachange');
|
('day rachange');
|
||||||
if (this.radioValue === 1) {
|
if (this.radioValue !== 2 && this.cron.week !== '?') {
|
||||||
this.$emit('update', 'day', '*', 'day');
|
this.$emit('update', 'week', '?', 'day')
|
||||||
this.$emit('update', 'week', '?', 'day');
|
|
||||||
this.$emit('update', 'month', '*', 'day');
|
|
||||||
} else {
|
|
||||||
if (this.cron.hour === '*') {
|
|
||||||
this.$emit('update', 'hour', '0', 'day');
|
|
||||||
}
|
|
||||||
if (this.cron.min === '*') {
|
|
||||||
this.$emit('update', 'min', '0', 'day');
|
|
||||||
}
|
|
||||||
if (this.cron.second === '*') {
|
|
||||||
this.$emit('update', 'second', '0', 'day');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (this.radioValue) {
|
switch (this.radioValue) {
|
||||||
|
case 1:
|
||||||
|
this.$emit('update', 'day', '*');
|
||||||
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
this.$emit('update', 'day', '?');
|
this.$emit('update', 'day', '?');
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
this.$emit('update', 'day', this.cycle01 + '-' + this.cycle02);
|
this.$emit('update', 'day', this.cycleTotal);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
this.$emit('update', 'day', this.average01 + '/' + this.average02);
|
this.$emit('update', 'day', this.averageTotal);
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
this.$emit('update', 'day', this.workday + 'W');
|
this.$emit('update', 'day', this.workday + 'W');
|
||||||
@ -125,7 +116,7 @@ export default {
|
|||||||
// 最近工作日值变化时
|
// 最近工作日值变化时
|
||||||
workdayChange() {
|
workdayChange() {
|
||||||
if (this.radioValue == '5') {
|
if (this.radioValue == '5') {
|
||||||
this.$emit('update', 'day', this.workday + 'W');
|
this.$emit('update', 'day', this.workdayCheck + 'W');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// checkbox值变化时
|
// checkbox值变化时
|
||||||
@ -133,19 +124,10 @@ export default {
|
|||||||
if (this.radioValue == '7') {
|
if (this.radioValue == '7') {
|
||||||
this.$emit('update', 'day', this.checkboxString);
|
this.$emit('update', 'day', this.checkboxString);
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
// 父组件传递的week发生变化触发
|
|
||||||
weekChange() {
|
|
||||||
//判断week值与day不能同时为“?”
|
|
||||||
if (this.cron.week == '?' && this.radioValue == '2') {
|
|
||||||
this.radioValue = '1';
|
|
||||||
} else if (this.cron.week !== '?' && this.radioValue != '2') {
|
|
||||||
this.radioValue = '2';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
"radioValue": "radioChange",
|
'radioValue': 'radioChange',
|
||||||
'cycleTotal': 'cycleChange',
|
'cycleTotal': 'cycleChange',
|
||||||
'averageTotal': 'averageChange',
|
'averageTotal': 'averageChange',
|
||||||
'workdayCheck': 'workdayChange',
|
'workdayCheck': 'workdayChange',
|
||||||
@ -154,20 +136,20 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
// 计算两个周期值
|
// 计算两个周期值
|
||||||
cycleTotal: function () {
|
cycleTotal: function () {
|
||||||
this.cycle01 = this.checkNum(this.cycle01, 1, 31)
|
const cycle01 = this.checkNum(this.cycle01, 1, 30)
|
||||||
this.cycle02 = this.checkNum(this.cycle02, 1, 31)
|
const cycle02 = this.checkNum(this.cycle02, cycle01 ? cycle01 + 1 : 2, 31, 31)
|
||||||
return this.cycle01 + '-' + this.cycle02;
|
return cycle01 + '-' + cycle02;
|
||||||
},
|
},
|
||||||
// 计算平均用到的值
|
// 计算平均用到的值
|
||||||
averageTotal: function () {
|
averageTotal: function () {
|
||||||
this.average01 = this.checkNum(this.average01, 1, 31)
|
const average01 = this.checkNum(this.average01, 1, 30)
|
||||||
this.average02 = this.checkNum(this.average02, 1, 31)
|
const average02 = this.checkNum(this.average02, 1, 31 - average01 || 0)
|
||||||
return this.average01 + '/' + this.average02;
|
return average01 + '/' + average02;
|
||||||
},
|
},
|
||||||
// 计算工作日格式
|
// 计算工作日格式
|
||||||
workdayCheck: function () {
|
workdayCheck: function () {
|
||||||
this.workday = this.checkNum(this.workday, 1, 31)
|
const workday = this.checkNum(this.workday, 1, 31)
|
||||||
return this.workday;
|
return workday;
|
||||||
},
|
},
|
||||||
// 计算勾选的checkbox值合集
|
// 计算勾选的checkbox值合集
|
||||||
checkboxString: function () {
|
checkboxString: function () {
|
||||||
|
@ -9,16 +9,16 @@
|
|||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-radio v-model='radioValue' :label="2">
|
<el-radio v-model='radioValue' :label="2">
|
||||||
周期从
|
周期从
|
||||||
<el-input-number v-model='cycle01' :min="0" :max="60" /> -
|
<el-input-number v-model='cycle01' :min="0" :max="22" /> -
|
||||||
<el-input-number v-model='cycle02' :min="0" :max="60" /> 小时
|
<el-input-number v-model='cycle02' :min="cycle01 ? cycle01 + 1 : 1" :max="23" /> 小时
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-radio v-model='radioValue' :label="3">
|
<el-radio v-model='radioValue' :label="3">
|
||||||
从
|
从
|
||||||
<el-input-number v-model='average01' :min="0" :max="60" /> 小时开始,每
|
<el-input-number v-model='average01' :min="0" :max="22" /> 小时开始,每
|
||||||
<el-input-number v-model='average02' :min="0" :max="60" /> 小时执行一次
|
<el-input-number v-model='average02' :min="1" :max="23 - average01 || 0" /> 小时执行一次
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
@ -51,23 +51,15 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
// 单选按钮值变化时
|
// 单选按钮值变化时
|
||||||
radioChange() {
|
radioChange() {
|
||||||
if (this.radioValue === 1) {
|
|
||||||
this.$emit('update', 'hour', '*', 'hour');
|
|
||||||
this.$emit('update', 'day', '*', 'hour');
|
|
||||||
} else {
|
|
||||||
if (this.cron.min === '*') {
|
|
||||||
this.$emit('update', 'min', '0', 'hour');
|
|
||||||
}
|
|
||||||
if (this.cron.second === '*') {
|
|
||||||
this.$emit('update', 'second', '0', 'hour');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
switch (this.radioValue) {
|
switch (this.radioValue) {
|
||||||
|
case 1:
|
||||||
|
this.$emit('update', 'hour', '*')
|
||||||
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
this.$emit('update', 'hour', this.cycle01 + '-' + this.cycle02);
|
this.$emit('update', 'hour', this.cycleTotal);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
this.$emit('update', 'hour', this.average01 + '/' + this.average02);
|
this.$emit('update', 'hour', this.averageTotal);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
this.$emit('update', 'hour', this.checkboxString);
|
this.$emit('update', 'hour', this.checkboxString);
|
||||||
@ -94,7 +86,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
"radioValue": "radioChange",
|
'radioValue': 'radioChange',
|
||||||
'cycleTotal': 'cycleChange',
|
'cycleTotal': 'cycleChange',
|
||||||
'averageTotal': 'averageChange',
|
'averageTotal': 'averageChange',
|
||||||
'checkboxString': 'checkboxChange'
|
'checkboxString': 'checkboxChange'
|
||||||
@ -102,15 +94,15 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
// 计算两个周期值
|
// 计算两个周期值
|
||||||
cycleTotal: function () {
|
cycleTotal: function () {
|
||||||
this.cycle01 = this.checkNum(this.cycle01, 0, 23)
|
const cycle01 = this.checkNum(this.cycle01, 0, 22)
|
||||||
this.cycle02 = this.checkNum(this.cycle02, 0, 23)
|
const cycle02 = this.checkNum(this.cycle02, cycle01 ? cycle01 + 1 : 1, 23)
|
||||||
return this.cycle01 + '-' + this.cycle02;
|
return cycle01 + '-' + cycle02;
|
||||||
},
|
},
|
||||||
// 计算平均用到的值
|
// 计算平均用到的值
|
||||||
averageTotal: function () {
|
averageTotal: function () {
|
||||||
this.average01 = this.checkNum(this.average01, 0, 23)
|
const average01 = this.checkNum(this.average01, 0, 22)
|
||||||
this.average02 = this.checkNum(this.average02, 1, 23)
|
const average02 = this.checkNum(this.average02, 1, 23 - average01 || 0)
|
||||||
return this.average01 + '/' + this.average02;
|
return average01 + '/' + average02;
|
||||||
},
|
},
|
||||||
// 计算勾选的checkbox值合集
|
// 计算勾选的checkbox值合集
|
||||||
checkboxString: function () {
|
checkboxString: function () {
|
||||||
|
@ -2,7 +2,12 @@
|
|||||||
<div>
|
<div>
|
||||||
<el-tabs type="border-card">
|
<el-tabs type="border-card">
|
||||||
<el-tab-pane label="秒" v-if="shouldHide('second')">
|
<el-tab-pane label="秒" v-if="shouldHide('second')">
|
||||||
<CrontabSecond @update="updateCrontabValue" :check="checkNumber" ref="cronsecond" />
|
<CrontabSecond
|
||||||
|
@update="updateCrontabValue"
|
||||||
|
:check="checkNumber"
|
||||||
|
:cron="crontabValueObj"
|
||||||
|
ref="cronsecond"
|
||||||
|
/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|
||||||
<el-tab-pane label="分钟" v-if="shouldHide('min')">
|
<el-tab-pane label="分钟" v-if="shouldHide('min')">
|
||||||
|
@ -9,16 +9,16 @@
|
|||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-radio v-model='radioValue' :label="2">
|
<el-radio v-model='radioValue' :label="2">
|
||||||
周期从
|
周期从
|
||||||
<el-input-number v-model='cycle01' :min="0" :max="60" /> -
|
<el-input-number v-model='cycle01' :min="0" :max="58" /> -
|
||||||
<el-input-number v-model='cycle02' :min="0" :max="60" /> 分钟
|
<el-input-number v-model='cycle02' :min="cycle01 ? cycle01 + 1 : 1" :max="59" /> 分钟
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-radio v-model='radioValue' :label="3">
|
<el-radio v-model='radioValue' :label="3">
|
||||||
从
|
从
|
||||||
<el-input-number v-model='average01' :min="0" :max="60" /> 分钟开始,每
|
<el-input-number v-model='average01' :min="0" :max="58" /> 分钟开始,每
|
||||||
<el-input-number v-model='average02' :min="0" :max="60" /> 分钟执行一次
|
<el-input-number v-model='average02' :min="1" :max="59 - average01 || 0" /> 分钟执行一次
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
@ -52,19 +52,15 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
// 单选按钮值变化时
|
// 单选按钮值变化时
|
||||||
radioChange() {
|
radioChange() {
|
||||||
if (this.radioValue !== 1 && this.cron.second === '*') {
|
|
||||||
this.$emit('update', 'second', '0', 'min');
|
|
||||||
}
|
|
||||||
switch (this.radioValue) {
|
switch (this.radioValue) {
|
||||||
case 1:
|
case 1:
|
||||||
this.$emit('update', 'min', '*', 'min');
|
this.$emit('update', 'min', '*', 'min');
|
||||||
this.$emit('update', 'hour', '*', 'min');
|
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
this.$emit('update', 'min', this.cycle01 + '-' + this.cycle02, 'min');
|
this.$emit('update', 'min', this.cycleTotal, 'min');
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
this.$emit('update', 'min', this.average01 + '/' + this.average02, 'min');
|
this.$emit('update', 'min', this.averageTotal, 'min');
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
this.$emit('update', 'min', this.checkboxString, 'min');
|
this.$emit('update', 'min', this.checkboxString, 'min');
|
||||||
@ -92,7 +88,7 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
"radioValue": "radioChange",
|
'radioValue': 'radioChange',
|
||||||
'cycleTotal': 'cycleChange',
|
'cycleTotal': 'cycleChange',
|
||||||
'averageTotal': 'averageChange',
|
'averageTotal': 'averageChange',
|
||||||
'checkboxString': 'checkboxChange',
|
'checkboxString': 'checkboxChange',
|
||||||
@ -100,15 +96,15 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
// 计算两个周期值
|
// 计算两个周期值
|
||||||
cycleTotal: function () {
|
cycleTotal: function () {
|
||||||
this.cycle01 = this.checkNum(this.cycle01, 0, 59)
|
const cycle01 = this.checkNum(this.cycle01, 0, 58)
|
||||||
this.cycle02 = this.checkNum(this.cycle02, 0, 59)
|
const cycle02 = this.checkNum(this.cycle02, cycle01 ? cycle01 + 1 : 1, 59)
|
||||||
return this.cycle01 + '-' + this.cycle02;
|
return cycle01 + '-' + cycle02;
|
||||||
},
|
},
|
||||||
// 计算平均用到的值
|
// 计算平均用到的值
|
||||||
averageTotal: function () {
|
averageTotal: function () {
|
||||||
this.average01 = this.checkNum(this.average01, 0, 59)
|
const average01 = this.checkNum(this.average01, 0, 58)
|
||||||
this.average02 = this.checkNum(this.average02, 1, 59)
|
const average02 = this.checkNum(this.average02, 1, 59 - average01 || 0)
|
||||||
return this.average01 + '/' + this.average02;
|
return average01 + '/' + average02;
|
||||||
},
|
},
|
||||||
// 计算勾选的checkbox值合集
|
// 计算勾选的checkbox值合集
|
||||||
checkboxString: function () {
|
checkboxString: function () {
|
||||||
|
@ -9,16 +9,16 @@
|
|||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-radio v-model='radioValue' :label="2">
|
<el-radio v-model='radioValue' :label="2">
|
||||||
周期从
|
周期从
|
||||||
<el-input-number v-model='cycle01' :min="1" :max="12" /> -
|
<el-input-number v-model='cycle01' :min="1" :max="11" /> -
|
||||||
<el-input-number v-model='cycle02' :min="1" :max="12" /> 月
|
<el-input-number v-model='cycle02' :min="cycle01 ? cycle01 + 1 : 2" :max="12" /> 月
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-radio v-model='radioValue' :label="3">
|
<el-radio v-model='radioValue' :label="3">
|
||||||
从
|
从
|
||||||
<el-input-number v-model='average01' :min="1" :max="12" /> 月开始,每
|
<el-input-number v-model='average01' :min="1" :max="11" /> 月开始,每
|
||||||
<el-input-number v-model='average02' :min="1" :max="12" /> 月月执行一次
|
<el-input-number v-model='average02' :min="1" :max="12 - average01 || 0" /> 月月执行一次
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
@ -51,29 +51,15 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
// 单选按钮值变化时
|
// 单选按钮值变化时
|
||||||
radioChange() {
|
radioChange() {
|
||||||
if (this.radioValue === 1) {
|
|
||||||
this.$emit('update', 'month', '*');
|
|
||||||
this.$emit('update', 'year', '*');
|
|
||||||
} else {
|
|
||||||
if (this.cron.day === '*') {
|
|
||||||
this.$emit('update', 'day', '0', 'month');
|
|
||||||
}
|
|
||||||
if (this.cron.hour === '*') {
|
|
||||||
this.$emit('update', 'hour', '0', 'month');
|
|
||||||
}
|
|
||||||
if (this.cron.min === '*') {
|
|
||||||
this.$emit('update', 'min', '0', 'month');
|
|
||||||
}
|
|
||||||
if (this.cron.second === '*') {
|
|
||||||
this.$emit('update', 'second', '0', 'month');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
switch (this.radioValue) {
|
switch (this.radioValue) {
|
||||||
|
case 1:
|
||||||
|
this.$emit('update', 'month', '*');
|
||||||
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
this.$emit('update', 'month', this.cycle01 + '-' + this.cycle02);
|
this.$emit('update', 'month', this.cycleTotal);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
this.$emit('update', 'month', this.average01 + '/' + this.average02);
|
this.$emit('update', 'month', this.averageTotal);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
this.$emit('update', 'month', this.checkboxString);
|
this.$emit('update', 'month', this.checkboxString);
|
||||||
@ -100,7 +86,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
"radioValue": "radioChange",
|
'radioValue': 'radioChange',
|
||||||
'cycleTotal': 'cycleChange',
|
'cycleTotal': 'cycleChange',
|
||||||
'averageTotal': 'averageChange',
|
'averageTotal': 'averageChange',
|
||||||
'checkboxString': 'checkboxChange'
|
'checkboxString': 'checkboxChange'
|
||||||
@ -108,15 +94,15 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
// 计算两个周期值
|
// 计算两个周期值
|
||||||
cycleTotal: function () {
|
cycleTotal: function () {
|
||||||
this.cycle01 = this.checkNum(this.cycle01, 1, 12)
|
const cycle01 = this.checkNum(this.cycle01, 1, 11)
|
||||||
this.cycle02 = this.checkNum(this.cycle02, 1, 12)
|
const cycle02 = this.checkNum(this.cycle02, cycle01 ? cycle01 + 1 : 2, 12)
|
||||||
return this.cycle01 + '-' + this.cycle02;
|
return cycle01 + '-' + cycle02;
|
||||||
},
|
},
|
||||||
// 计算平均用到的值
|
// 计算平均用到的值
|
||||||
averageTotal: function () {
|
averageTotal: function () {
|
||||||
this.average01 = this.checkNum(this.average01, 1, 12)
|
const average01 = this.checkNum(this.average01, 1, 11)
|
||||||
this.average02 = this.checkNum(this.average02, 1, 12)
|
const average02 = this.checkNum(this.average02, 1, 12 - average01 || 0)
|
||||||
return this.average01 + '/' + this.average02;
|
return average01 + '/' + average02;
|
||||||
},
|
},
|
||||||
// 计算勾选的checkbox值合集
|
// 计算勾选的checkbox值合集
|
||||||
checkboxString: function () {
|
checkboxString: function () {
|
||||||
|
@ -179,7 +179,7 @@ export default {
|
|||||||
// 获取达到条件的日期是星期X
|
// 获取达到条件的日期是星期X
|
||||||
let thisWeek = this.formatDate(new Date(YY + '-' + MM + '-' + thisDD + ' 00:00:00'), 'week');
|
let thisWeek = this.formatDate(new Date(YY + '-' + MM + '-' + thisDD + ' 00:00:00'), 'week');
|
||||||
// 当星期日时
|
// 当星期日时
|
||||||
if (thisWeek == 0) {
|
if (thisWeek == 1) {
|
||||||
// 先找下一个日,并判断是否为月底
|
// 先找下一个日,并判断是否为月底
|
||||||
DD++;
|
DD++;
|
||||||
thisDD = DD < 10 ? '0' + DD : DD;
|
thisDD = DD < 10 ? '0' + DD : DD;
|
||||||
@ -187,7 +187,7 @@ export default {
|
|||||||
if (this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true) {
|
if (this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true) {
|
||||||
DD -= 3;
|
DD -= 3;
|
||||||
}
|
}
|
||||||
} else if (thisWeek == 6) {
|
} else if (thisWeek == 7) {
|
||||||
// 当星期6时只需判断不是1号就可进行操作
|
// 当星期6时只需判断不是1号就可进行操作
|
||||||
if (this.dayRuleSup !== 1) {
|
if (this.dayRuleSup !== 1) {
|
||||||
DD--;
|
DD--;
|
||||||
@ -200,7 +200,7 @@ export default {
|
|||||||
// 获取当前日期是属于星期几
|
// 获取当前日期是属于星期几
|
||||||
let thisWeek = this.formatDate(new Date(YY + '-' + MM + '-' + DD + ' 00:00:00'), 'week');
|
let thisWeek = this.formatDate(new Date(YY + '-' + MM + '-' + DD + ' 00:00:00'), 'week');
|
||||||
// 校验当前星期是否在星期池(dayRuleSup)中
|
// 校验当前星期是否在星期池(dayRuleSup)中
|
||||||
if (Array.indexOf(this.dayRuleSup, thisWeek) < 0) {
|
if (this.dayRuleSup.indexOf(thisWeek) < 0) {
|
||||||
// 如果到达最大值时
|
// 如果到达最大值时
|
||||||
if (Di == DDate.length - 1) {
|
if (Di == DDate.length - 1) {
|
||||||
resetDay();
|
resetDay();
|
||||||
@ -385,7 +385,7 @@ export default {
|
|||||||
} else if (rule.indexOf('#') >= 0) {
|
} else if (rule.indexOf('#') >= 0) {
|
||||||
this.dayRule = 'assWeek';
|
this.dayRule = 'assWeek';
|
||||||
let matchRule = rule.match(/[0-9]{1}/g);
|
let matchRule = rule.match(/[0-9]{1}/g);
|
||||||
this.dayRuleSup = [Number(matchRule[0]), Number(matchRule[1])];
|
this.dayRuleSup = [Number(matchRule[1]), Number(matchRule[0])];
|
||||||
this.dateArr[3] = [1];
|
this.dateArr[3] = [1];
|
||||||
if (this.dayRuleSup[1] == 7) {
|
if (this.dayRuleSup[1] == 7) {
|
||||||
this.dayRuleSup[1] = 0;
|
this.dayRuleSup[1] = 0;
|
||||||
@ -401,14 +401,6 @@ export default {
|
|||||||
this.dayRule = 'weekDay';
|
this.dayRule = 'weekDay';
|
||||||
this.dayRuleSup = this.getAssignArr(rule)
|
this.dayRuleSup = this.getAssignArr(rule)
|
||||||
}
|
}
|
||||||
// 如果weekDay时将7调整为0【week值0即是星期日】
|
|
||||||
if (this.dayRule == 'weekDay') {
|
|
||||||
for (let i = 0; i < this.dayRuleSup.length; i++) {
|
|
||||||
if (this.dayRuleSup[i] == 7) {
|
|
||||||
this.dayRuleSup[i] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 获取"日"数组-少量为日期规则
|
// 获取"日"数组-少量为日期规则
|
||||||
@ -543,14 +535,15 @@ export default {
|
|||||||
if (type == undefined) {
|
if (type == undefined) {
|
||||||
return Y + '-' + (M < 10 ? '0' + M : M) + '-' + (D < 10 ? '0' + D : D) + ' ' + (h < 10 ? '0' + h : h) + ':' + (m < 10 ? '0' + m : m) + ':' + (s < 10 ? '0' + s : s);
|
return Y + '-' + (M < 10 ? '0' + M : M) + '-' + (D < 10 ? '0' + D : D) + ' ' + (h < 10 ? '0' + h : h) + ':' + (m < 10 ? '0' + m : m) + ':' + (s < 10 ? '0' + s : s);
|
||||||
} else if (type == 'week') {
|
} else if (type == 'week') {
|
||||||
return week;
|
// 在quartz中 1为星期日
|
||||||
|
return week + 1;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 检查日期是否存在
|
// 检查日期是否存在
|
||||||
checkDate(value) {
|
checkDate(value) {
|
||||||
let time = new Date(value);
|
let time = new Date(value);
|
||||||
let format = this.formatDate(time)
|
let format = this.formatDate(time)
|
||||||
return value == format ? true : false;
|
return value === format;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
@ -9,16 +9,16 @@
|
|||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-radio v-model='radioValue' :label="2">
|
<el-radio v-model='radioValue' :label="2">
|
||||||
周期从
|
周期从
|
||||||
<el-input-number v-model='cycle01' :min="0" :max="60" /> -
|
<el-input-number v-model='cycle01' :min="0" :max="58" /> -
|
||||||
<el-input-number v-model='cycle02' :min="0" :max="60" /> 秒
|
<el-input-number v-model='cycle02' :min="cycle01 ? cycle01 + 1 : 1" :max="59" /> 秒
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-radio v-model='radioValue' :label="3">
|
<el-radio v-model='radioValue' :label="3">
|
||||||
从
|
从
|
||||||
<el-input-number v-model='average01' :min="0" :max="60" /> 秒开始,每
|
<el-input-number v-model='average01' :min="0" :max="58" /> 秒开始,每
|
||||||
<el-input-number v-model='average02' :min="0" :max="60" /> 秒执行一次
|
<el-input-number v-model='average02' :min="1" :max="59 - average01 || 0" /> 秒执行一次
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
@ -54,13 +54,12 @@ export default {
|
|||||||
switch (this.radioValue) {
|
switch (this.radioValue) {
|
||||||
case 1:
|
case 1:
|
||||||
this.$emit('update', 'second', '*', 'second');
|
this.$emit('update', 'second', '*', 'second');
|
||||||
this.$emit('update', 'min', '*', 'second');
|
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
this.$emit('update', 'second', this.cycle01 + '-' + this.cycle02);
|
this.$emit('update', 'second', this.cycleTotal);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
this.$emit('update', 'second', this.average01 + '/' + this.average02);
|
this.$emit('update', 'second', this.averageTotal);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
this.$emit('update', 'second', this.checkboxString);
|
this.$emit('update', 'second', this.checkboxString);
|
||||||
@ -84,25 +83,10 @@ export default {
|
|||||||
if (this.radioValue == '4') {
|
if (this.radioValue == '4') {
|
||||||
this.$emit('update', 'second', this.checkboxString);
|
this.$emit('update', 'second', this.checkboxString);
|
||||||
}
|
}
|
||||||
},
|
|
||||||
othChange() {
|
|
||||||
// 反解析
|
|
||||||
let ins = this.cron.second
|
|
||||||
('反解析 second', ins);
|
|
||||||
if (ins === '*') {
|
|
||||||
this.radioValue = 1;
|
|
||||||
} else if (ins.indexOf('-') > -1) {
|
|
||||||
this.radioValue = 2
|
|
||||||
} else if (ins.indexOf('/') > -1) {
|
|
||||||
this.radioValue = 3
|
|
||||||
} else {
|
|
||||||
this.radioValue = 4
|
|
||||||
this.checkboxList = ins.split(',')
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
"radioValue": "radioChange",
|
'radioValue': 'radioChange',
|
||||||
'cycleTotal': 'cycleChange',
|
'cycleTotal': 'cycleChange',
|
||||||
'averageTotal': 'averageChange',
|
'averageTotal': 'averageChange',
|
||||||
'checkboxString': 'checkboxChange',
|
'checkboxString': 'checkboxChange',
|
||||||
@ -113,15 +97,15 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
// 计算两个周期值
|
// 计算两个周期值
|
||||||
cycleTotal: function () {
|
cycleTotal: function () {
|
||||||
this.cycle01 = this.checkNum(this.cycle01, 0, 59)
|
const cycle01 = this.checkNum(this.cycle01, 0, 58)
|
||||||
this.cycle02 = this.checkNum(this.cycle02, 0, 59)
|
const cycle02 = this.checkNum(this.cycle02, cycle01 ? cycle01 + 1 : 1, 59)
|
||||||
return this.cycle01 + '-' + this.cycle02;
|
return cycle01 + '-' + cycle02;
|
||||||
},
|
},
|
||||||
// 计算平均用到的值
|
// 计算平均用到的值
|
||||||
averageTotal: function () {
|
averageTotal: function () {
|
||||||
this.average01 = this.checkNum(this.average01, 0, 59)
|
const average01 = this.checkNum(this.average01, 0, 58)
|
||||||
this.average02 = this.checkNum(this.average02, 1, 59)
|
const average02 = this.checkNum(this.average02, 1, 59 - average01 || 0)
|
||||||
return this.average01 + '/' + this.average02;
|
return average01 + '/' + average02;
|
||||||
},
|
},
|
||||||
// 计算勾选的checkbox值合集
|
// 计算勾选的checkbox值合集
|
||||||
checkboxString: function () {
|
checkboxString: function () {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<el-form size='small'>
|
<el-form size='small'>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-radio v-model='radioValue' :label="1">
|
<el-radio v-model='radioValue' :label="1">
|
||||||
周,允许的通配符[, - * / L #]
|
周,允许的通配符[, - * ? / L #]
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
@ -15,8 +15,25 @@
|
|||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-radio v-model='radioValue' :label="3">
|
<el-radio v-model='radioValue' :label="3">
|
||||||
周期从星期
|
周期从星期
|
||||||
<el-input-number v-model='cycle01' :min="1" :max="7" /> -
|
<el-select clearable v-model="cycle01">
|
||||||
<el-input-number v-model='cycle02' :min="1" :max="7" />
|
<el-option
|
||||||
|
v-for="(item,index) of weekList"
|
||||||
|
:key="index"
|
||||||
|
:label="item.value"
|
||||||
|
:value="item.key"
|
||||||
|
:disabled="item.key === 1"
|
||||||
|
>{{item.value}}</el-option>
|
||||||
|
</el-select>
|
||||||
|
-
|
||||||
|
<el-select clearable v-model="cycle02">
|
||||||
|
<el-option
|
||||||
|
v-for="(item,index) of weekList"
|
||||||
|
:key="index"
|
||||||
|
:label="item.value"
|
||||||
|
:value="item.key"
|
||||||
|
:disabled="item.key < cycle01 && item.key !== 1"
|
||||||
|
>{{item.value}}</el-option>
|
||||||
|
</el-select>
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
@ -24,14 +41,18 @@
|
|||||||
<el-radio v-model='radioValue' :label="4">
|
<el-radio v-model='radioValue' :label="4">
|
||||||
第
|
第
|
||||||
<el-input-number v-model='average01' :min="1" :max="4" /> 周的星期
|
<el-input-number v-model='average01' :min="1" :max="4" /> 周的星期
|
||||||
<el-input-number v-model='average02' :min="1" :max="7" />
|
<el-select clearable v-model="average02">
|
||||||
|
<el-option v-for="(item,index) of weekList" :key="index" :label="item.value" :value="item.key">{{item.value}}</el-option>
|
||||||
|
</el-select>
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-radio v-model='radioValue' :label="5">
|
<el-radio v-model='radioValue' :label="5">
|
||||||
本月最后一个星期
|
本月最后一个星期
|
||||||
<el-input-number v-model='weekday' :min="1" :max="7" />
|
<el-select clearable v-model="weekday">
|
||||||
|
<el-option v-for="(item,index) of weekList" :key="index" :label="item.value" :value="item.key">{{item.value}}</el-option>
|
||||||
|
</el-select>
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
@ -39,7 +60,7 @@
|
|||||||
<el-radio v-model='radioValue' :label="6">
|
<el-radio v-model='radioValue' :label="6">
|
||||||
指定
|
指定
|
||||||
<el-select clearable v-model="checkboxList" placeholder="可多选" multiple style="width:100%">
|
<el-select clearable v-model="checkboxList" placeholder="可多选" multiple style="width:100%">
|
||||||
<el-option v-for="(item,index) of weekList" :key="index" :value="index+1">{{item}}</el-option>
|
<el-option v-for="(item,index) of weekList" :key="index" :label="item.value" :value="item.key">{{item.value}}</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -52,13 +73,42 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
radioValue: 2,
|
radioValue: 2,
|
||||||
weekday: 1,
|
weekday: 2,
|
||||||
cycle01: 1,
|
cycle01: 2,
|
||||||
cycle02: 2,
|
cycle02: 3,
|
||||||
average01: 1,
|
average01: 1,
|
||||||
average02: 1,
|
average02: 2,
|
||||||
checkboxList: [],
|
checkboxList: [],
|
||||||
weekList: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
|
weekList: [
|
||||||
|
{
|
||||||
|
key: 2,
|
||||||
|
value: '星期一'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 3,
|
||||||
|
value: '星期二'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 4,
|
||||||
|
value: '星期三'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 5,
|
||||||
|
value: '星期四'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 6,
|
||||||
|
value: '星期五'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 7,
|
||||||
|
value: '星期六'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 1,
|
||||||
|
value: '星期日'
|
||||||
|
}
|
||||||
|
],
|
||||||
checkNum: this.$options.propsData.check
|
checkNum: this.$options.propsData.check
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -67,45 +117,30 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
// 单选按钮值变化时
|
// 单选按钮值变化时
|
||||||
radioChange() {
|
radioChange() {
|
||||||
if (this.radioValue === 1) {
|
if (this.radioValue !== 2 && this.cron.day !== '?') {
|
||||||
this.$emit('update', 'week', '*');
|
this.$emit('update', 'day', '?', 'week');
|
||||||
this.$emit('update', 'year', '*');
|
|
||||||
} else {
|
|
||||||
if (this.cron.month === '*') {
|
|
||||||
this.$emit('update', 'month', '0', 'week');
|
|
||||||
}
|
|
||||||
if (this.cron.day === '*') {
|
|
||||||
this.$emit('update', 'day', '0', 'week');
|
|
||||||
}
|
|
||||||
if (this.cron.hour === '*') {
|
|
||||||
this.$emit('update', 'hour', '0', 'week');
|
|
||||||
}
|
|
||||||
if (this.cron.min === '*') {
|
|
||||||
this.$emit('update', 'min', '0', 'week');
|
|
||||||
}
|
|
||||||
if (this.cron.second === '*') {
|
|
||||||
this.$emit('update', 'second', '0', 'week');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
switch (this.radioValue) {
|
switch (this.radioValue) {
|
||||||
|
case 1:
|
||||||
|
this.$emit('update', 'week', '*');
|
||||||
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
this.$emit('update', 'week', '?');
|
this.$emit('update', 'week', '?');
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
this.$emit('update', 'week', this.cycle01 + '-' + this.cycle02);
|
this.$emit('update', 'week', this.cycleTotal);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
this.$emit('update', 'week', this.average01 + '#' + this.average02);
|
this.$emit('update', 'week', this.averageTotal);
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
this.$emit('update', 'week', this.weekday + 'L');
|
this.$emit('update', 'week', this.weekdayCheck + 'L');
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
this.$emit('update', 'week', this.checkboxString);
|
this.$emit('update', 'week', this.checkboxString);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 根据互斥事件,更改radio的值
|
|
||||||
|
|
||||||
// 周期两个值变化时
|
// 周期两个值变化时
|
||||||
cycleChange() {
|
cycleChange() {
|
||||||
@ -133,7 +168,7 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
"radioValue": "radioChange",
|
'radioValue': 'radioChange',
|
||||||
'cycleTotal': 'cycleChange',
|
'cycleTotal': 'cycleChange',
|
||||||
'averageTotal': 'averageChange',
|
'averageTotal': 'averageChange',
|
||||||
'weekdayCheck': 'weekdayChange',
|
'weekdayCheck': 'weekdayChange',
|
||||||
@ -150,7 +185,7 @@ export default {
|
|||||||
averageTotal: function () {
|
averageTotal: function () {
|
||||||
this.average01 = this.checkNum(this.average01, 1, 4)
|
this.average01 = this.checkNum(this.average01, 1, 4)
|
||||||
this.average02 = this.checkNum(this.average02, 1, 7)
|
this.average02 = this.checkNum(this.average02, 1, 7)
|
||||||
return this.average01 + '#' + this.average02;
|
return this.average02 + '#' + this.average01;
|
||||||
},
|
},
|
||||||
// 最近的工作日(格式)
|
// 最近的工作日(格式)
|
||||||
weekdayCheck: function () {
|
weekdayCheck: function () {
|
||||||
|
@ -15,16 +15,16 @@
|
|||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-radio :label="3" v-model='radioValue'>
|
<el-radio :label="3" v-model='radioValue'>
|
||||||
周期从
|
周期从
|
||||||
<el-input-number v-model='cycle01' :min='fullYear' /> -
|
<el-input-number v-model='cycle01' :min='fullYear' :max="2098" /> -
|
||||||
<el-input-number v-model='cycle02' :min='fullYear' />
|
<el-input-number v-model='cycle02' :min="cycle01 ? cycle01 + 1 : fullYear + 1" :max="2099" />
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-radio :label="4" v-model='radioValue'>
|
<el-radio :label="4" v-model='radioValue'>
|
||||||
从
|
从
|
||||||
<el-input-number v-model='average01' :min='fullYear' /> 年开始,每
|
<el-input-number v-model='average01' :min='fullYear' :max="2098"/> 年开始,每
|
||||||
<el-input-number v-model='average02' :min='fullYear' /> 年执行一次
|
<el-input-number v-model='average02' :min="1" :max="2099 - average01 || fullYear" /> 年执行一次
|
||||||
</el-radio>
|
</el-radio>
|
||||||
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -59,21 +59,6 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
// 单选按钮值变化时
|
// 单选按钮值变化时
|
||||||
radioChange() {
|
radioChange() {
|
||||||
if (this.cron.month === '*') {
|
|
||||||
this.$emit('update', 'month', '0', 'year');
|
|
||||||
}
|
|
||||||
if (this.cron.day === '*') {
|
|
||||||
this.$emit('update', 'day', '0', 'year');
|
|
||||||
}
|
|
||||||
if (this.cron.hour === '*') {
|
|
||||||
this.$emit('update', 'hour', '0', 'year');
|
|
||||||
}
|
|
||||||
if (this.cron.min === '*') {
|
|
||||||
this.$emit('update', 'min', '0', 'year');
|
|
||||||
}
|
|
||||||
if (this.cron.second === '*') {
|
|
||||||
this.$emit('update', 'second', '0', 'year');
|
|
||||||
}
|
|
||||||
switch (this.radioValue) {
|
switch (this.radioValue) {
|
||||||
case 1:
|
case 1:
|
||||||
this.$emit('update', 'year', '');
|
this.$emit('update', 'year', '');
|
||||||
@ -82,10 +67,10 @@ export default {
|
|||||||
this.$emit('update', 'year', '*');
|
this.$emit('update', 'year', '*');
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
this.$emit('update', 'year', this.cycle01 + '-' + this.cycle02);
|
this.$emit('update', 'year', this.cycleTotal);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
this.$emit('update', 'year', this.average01 + '/' + this.average02);
|
this.$emit('update', 'year', this.averageTotal);
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
this.$emit('update', 'year', this.checkboxString);
|
this.$emit('update', 'year', this.checkboxString);
|
||||||
@ -112,7 +97,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
"radioValue": "radioChange",
|
'radioValue': 'radioChange',
|
||||||
'cycleTotal': 'cycleChange',
|
'cycleTotal': 'cycleChange',
|
||||||
'averageTotal': 'averageChange',
|
'averageTotal': 'averageChange',
|
||||||
'checkboxString': 'checkboxChange'
|
'checkboxString': 'checkboxChange'
|
||||||
@ -120,15 +105,15 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
// 计算两个周期值
|
// 计算两个周期值
|
||||||
cycleTotal: function () {
|
cycleTotal: function () {
|
||||||
this.cycle01 = this.checkNum(this.cycle01, this.fullYear, this.fullYear + 100)
|
const cycle01 = this.checkNum(this.cycle01, this.fullYear, 2098)
|
||||||
this.cycle02 = this.checkNum(this.cycle02, this.fullYear + 1, this.fullYear + 101)
|
const cycle02 = this.checkNum(this.cycle02, cycle01 ? cycle01 + 1 : this.fullYear + 1, 2099)
|
||||||
return this.cycle01 + '-' + this.cycle02;
|
return cycle01 + '-' + cycle02;
|
||||||
},
|
},
|
||||||
// 计算平均用到的值
|
// 计算平均用到的值
|
||||||
averageTotal: function () {
|
averageTotal: function () {
|
||||||
this.average01 = this.checkNum(this.average01, this.fullYear, this.fullYear + 100)
|
const average01 = this.checkNum(this.average01, this.fullYear, 2098)
|
||||||
this.average02 = this.checkNum(this.average02, 1, 10)
|
const average02 = this.checkNum(this.average02, 1, 2099 - average01 || this.fullYear)
|
||||||
return this.average01 + '/' + this.average02;
|
return average01 + '/' + average02;
|
||||||
},
|
},
|
||||||
// 计算勾选的checkbox值合集
|
// 计算勾选的checkbox值合集
|
||||||
checkboxString: function () {
|
checkboxString: function () {
|
||||||
@ -139,6 +124,8 @@ export default {
|
|||||||
mounted: function () {
|
mounted: function () {
|
||||||
// 仅获取当前年份
|
// 仅获取当前年份
|
||||||
this.fullYear = Number(new Date().getFullYear());
|
this.fullYear = Number(new Date().getFullYear());
|
||||||
|
this.cycle01 = this.fullYear
|
||||||
|
this.average01 = this.fullYear
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -62,7 +62,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 右侧列表元素变化
|
// 右侧列表元素变化
|
||||||
dataChange(data) {
|
dataChange(data) {
|
||||||
for (var item in this.columns) {
|
for (let item in this.columns) {
|
||||||
const key = this.columns[item].key;
|
const key = this.columns[item].key;
|
||||||
this.columns[item].visible = !data.includes(key);
|
this.columns[item].visible = !data.includes(key);
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<svg-icon icon-class="question" @click="goto"/>
|
<svg-icon icon-class="question" @click="goto" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<svg-icon icon-class="github" @click="goto"/>
|
<svg-icon icon-class="github" @click="goto" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -5,8 +5,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item v-for="item of sizeOptions" :key="item.value" :disabled="size===item.value" :command="item.value">
|
<el-dropdown-item v-for="item of sizeOptions" :key="item.value" :disabled="size===item.value" :command="item.value">
|
||||||
{{
|
{{ item.label }}
|
||||||
item.label }}
|
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
|
@ -29,7 +29,7 @@ export default {
|
|||||||
variables() {
|
variables() {
|
||||||
return variables;
|
return variables;
|
||||||
},
|
},
|
||||||
sideTheme() {
|
sideTheme() {
|
||||||
return this.$store.state.settings.sideTheme
|
return this.$store.state.settings.sideTheme
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -98,7 +98,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.hideSidebar .fixed-header {
|
.hideSidebar .fixed-header {
|
||||||
width: calc(100% - 54px)
|
width: calc(100% - 54px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.mobile .fixed-header {
|
.mobile .fixed-header {
|
||||||
|
@ -10,7 +10,7 @@ import '@/assets/styles/ruoyi.scss' // ruoyi css
|
|||||||
import App from './App'
|
import App from './App'
|
||||||
import store from './store'
|
import store from './store'
|
||||||
import router from './router'
|
import router from './router'
|
||||||
import directive from './directive' //directive
|
import directive from './directive' // directive
|
||||||
import plugins from './plugins' // plugins
|
import plugins from './plugins' // plugins
|
||||||
import { download } from '@/utils/request'
|
import { download } from '@/utils/request'
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ export default {
|
|||||||
responseType: 'blob',
|
responseType: 'blob',
|
||||||
headers: { 'Authorization': 'Bearer ' + getToken() }
|
headers: { 'Authorization': 'Bearer ' + getToken() }
|
||||||
}).then(async (res) => {
|
}).then(async (res) => {
|
||||||
const isLogin = await this.blobValidate(res.data);
|
const isLogin = await blobValidate(res.data);
|
||||||
if (isLogin) {
|
if (isLogin) {
|
||||||
const blob = new Blob([res.data])
|
const blob = new Blob([res.data])
|
||||||
this.saveAs(blob, decodeURI(res.headers['download-filename']))
|
this.saveAs(blob, decodeURI(res.headers['download-filename']))
|
||||||
@ -32,7 +32,7 @@ export default {
|
|||||||
responseType: 'blob',
|
responseType: 'blob',
|
||||||
headers: { 'Authorization': 'Bearer ' + getToken() }
|
headers: { 'Authorization': 'Bearer ' + getToken() }
|
||||||
}).then(async (res) => {
|
}).then(async (res) => {
|
||||||
const isLogin = await this.blobValidate(res.data);
|
const isLogin = await blobValidate(res.data);
|
||||||
if (isLogin) {
|
if (isLogin) {
|
||||||
const blob = new Blob([res.data])
|
const blob = new Blob([res.data])
|
||||||
this.saveAs(blob, decodeURI(res.headers['download-filename']))
|
this.saveAs(blob, decodeURI(res.headers['download-filename']))
|
||||||
|
@ -59,6 +59,14 @@ export default {
|
|||||||
type: "warning",
|
type: "warning",
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 提交内容
|
||||||
|
prompt(content) {
|
||||||
|
return MessageBox.prompt(content, "系统提示", {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: "warning",
|
||||||
|
})
|
||||||
|
},
|
||||||
// 打开遮罩层
|
// 打开遮罩层
|
||||||
loading(content) {
|
loading(content) {
|
||||||
loadingInstance = Loading.service({
|
loadingInstance = Loading.service({
|
||||||
|
@ -20,8 +20,6 @@ export default {
|
|||||||
path: '/redirect' + path
|
path: '/redirect' + path
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
// 关闭当前tab页签,打开新页签
|
// 关闭当前tab页签,打开新页签
|
||||||
closeOpenPage(obj) {
|
closeOpenPage(obj) {
|
||||||
@ -56,7 +54,7 @@ export default {
|
|||||||
return store.dispatch('tagsView/delOthersViews', obj || router.currentRoute);
|
return store.dispatch('tagsView/delOthersViews', obj || router.currentRoute);
|
||||||
},
|
},
|
||||||
// 添加tab页签
|
// 添加tab页签
|
||||||
addPage(title, url) {
|
openPage(title, url) {
|
||||||
var obj = { path: url, meta: { title: title } }
|
var obj = { path: url, meta: { title: title } }
|
||||||
store.dispatch('tagsView/addView', obj);
|
store.dispatch('tagsView/addView', obj);
|
||||||
return router.push(url);
|
return router.push(url);
|
||||||
|
@ -95,7 +95,7 @@ export const constantRoutes = [
|
|||||||
path: 'role/:userId(\\d+)',
|
path: 'role/:userId(\\d+)',
|
||||||
component: (resolve) => require(['@/views/system/user/authRole'], resolve),
|
component: (resolve) => require(['@/views/system/user/authRole'], resolve),
|
||||||
name: 'AuthRole',
|
name: 'AuthRole',
|
||||||
meta: { title: '分配角色', activeMenu: '/system/user'}
|
meta: { title: '分配角色', activeMenu: '/system/user' }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -108,7 +108,7 @@ export const constantRoutes = [
|
|||||||
path: 'user/:roleId(\\d+)',
|
path: 'user/:roleId(\\d+)',
|
||||||
component: (resolve) => require(['@/views/system/role/authUser'], resolve),
|
component: (resolve) => require(['@/views/system/role/authUser'], resolve),
|
||||||
name: 'AuthUser',
|
name: 'AuthUser',
|
||||||
meta: { title: '分配用户', activeMenu: '/system/role'}
|
meta: { title: '分配用户', activeMenu: '/system/role' }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -121,7 +121,7 @@ export const constantRoutes = [
|
|||||||
path: 'index/:dictId(\\d+)',
|
path: 'index/:dictId(\\d+)',
|
||||||
component: (resolve) => require(['@/views/system/dict/data'], resolve),
|
component: (resolve) => require(['@/views/system/dict/data'], resolve),
|
||||||
name: 'Data',
|
name: 'Data',
|
||||||
meta: { title: '字典数据', activeMenu: '/system/dict'}
|
meta: { title: '字典数据', activeMenu: '/system/dict' }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -134,7 +134,7 @@ export const constantRoutes = [
|
|||||||
path: 'index',
|
path: 'index',
|
||||||
component: (resolve) => require(['@/views/monitor/job/log'], resolve),
|
component: (resolve) => require(['@/views/monitor/job/log'], resolve),
|
||||||
name: 'JobLog',
|
name: 'JobLog',
|
||||||
meta: { title: '调度日志', activeMenu: '/monitor/job'}
|
meta: { title: '调度日志', activeMenu: '/monitor/job' }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -147,7 +147,7 @@ export const constantRoutes = [
|
|||||||
path: 'index',
|
path: 'index',
|
||||||
component: (resolve) => require(['@/views/tool/gen/editTable'], resolve),
|
component: (resolve) => require(['@/views/tool/gen/editTable'], resolve),
|
||||||
name: 'GenEdit',
|
name: 'GenEdit',
|
||||||
meta: { title: '修改生成配置', activeMenu: '/tool/gen'}
|
meta: { title: '修改生成配置', activeMenu: '/tool/gen' }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { constantRoutes } from '@/router'
|
import { constantRoutes } from '@/router'
|
||||||
import { getRouters } from '@/api/menu'
|
import { getRouters } from '@/api/menu'
|
||||||
import Layout from '@/layout/index'
|
import Layout from '@/layout/index'
|
||||||
import ParentView from '@/components/ParentView';
|
import ParentView from '@/components/ParentView'
|
||||||
import InnerLink from '@/layout/components/InnerLink'
|
import InnerLink from '@/layout/components/InnerLink'
|
||||||
|
|
||||||
const permission = {
|
const permission = {
|
||||||
@ -24,7 +24,7 @@ const permission = {
|
|||||||
// 顶部导航菜单默认添加统计报表栏指向首页
|
// 顶部导航菜单默认添加统计报表栏指向首页
|
||||||
const index = [{
|
const index = [{
|
||||||
path: 'index',
|
path: 'index',
|
||||||
meta: { title: '统计报表', icon: 'dashboard'}
|
meta: { title: '统计报表', icon: 'dashboard' }
|
||||||
}]
|
}]
|
||||||
state.topbarRouters = routes.concat(index);
|
state.topbarRouters = routes.concat(index);
|
||||||
},
|
},
|
||||||
|
@ -8,7 +8,7 @@ const state = {
|
|||||||
theme: storageSetting.theme || '#409EFF',
|
theme: storageSetting.theme || '#409EFF',
|
||||||
sideTheme: storageSetting.sideTheme || sideTheme,
|
sideTheme: storageSetting.sideTheme || sideTheme,
|
||||||
showSettings: showSettings,
|
showSettings: showSettings,
|
||||||
topNav: storageSetting.topNav === undefined ? topNav : storageSetting.topNav,
|
topNav: storageSetting.topNav === undefined ? topNav : storageSetting.topNav,
|
||||||
tagsView: storageSetting.tagsView === undefined ? tagsView : storageSetting.tagsView,
|
tagsView: storageSetting.tagsView === undefined ? tagsView : storageSetting.tagsView,
|
||||||
fixedHeader: storageSetting.fixedHeader === undefined ? fixedHeader : storageSetting.fixedHeader,
|
fixedHeader: storageSetting.fixedHeader === undefined ? fixedHeader : storageSetting.fixedHeader,
|
||||||
sidebarLogo: storageSetting.sidebarLogo === undefined ? sidebarLogo : storageSetting.sidebarLogo,
|
sidebarLogo: storageSetting.sidebarLogo === undefined ? sidebarLogo : storageSetting.sidebarLogo,
|
||||||
|
@ -66,7 +66,7 @@ const user = {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 退出系统
|
// 退出系统
|
||||||
LogOut({ commit, state }) {
|
LogOut({ commit, state }) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
@ -5,7 +5,7 @@ export default function(Vue, options) {
|
|||||||
mergeOptions(options)
|
mergeOptions(options)
|
||||||
Vue.mixin({
|
Vue.mixin({
|
||||||
data() {
|
data() {
|
||||||
if (this.$options.dicts === undefined || this.$options.dicts === null) {
|
if (this.$options === undefined || this.$options.dicts === undefined || this.$options.dicts === null) {
|
||||||
return {}
|
return {}
|
||||||
}
|
}
|
||||||
const dict = new Dict()
|
const dict = new Dict()
|
||||||
|
@ -381,7 +381,7 @@ export function titleCase(str) {
|
|||||||
|
|
||||||
// 下划转驼峰
|
// 下划转驼峰
|
||||||
export function camelCase(str) {
|
export function camelCase(str) {
|
||||||
return str.replace(/-[a-z]/g, str1 => str1.substr(-1).toUpperCase())
|
return str.replace(/_[a-z]/g, str1 => str1.substr(-1).toUpperCase())
|
||||||
}
|
}
|
||||||
|
|
||||||
export function isNumberStr(str) {
|
export function isNumberStr(str) {
|
||||||
|
@ -147,6 +147,59 @@
|
|||||||
<span>更新日志</span>
|
<span>更新日志</span>
|
||||||
</div>
|
</div>
|
||||||
<el-collapse accordion>
|
<el-collapse accordion>
|
||||||
|
<el-collapse-item title="v3.8.0 - 2021-12-01">
|
||||||
|
<ol>
|
||||||
|
<li>新增配套并同步的Vue3前端版本</li>
|
||||||
|
<li>新增通用方法简化模态/缓存/下载/权限/页签使用</li>
|
||||||
|
<li>优化导出数据/使用通用下载方法</li>
|
||||||
|
<li>Excel注解支持自定义数据处理器</li>
|
||||||
|
<li>Excel注解支持导入导出标题信息</li>
|
||||||
|
<li>Excel导入支持@Excels注解</li>
|
||||||
|
<li>新增组件data-dict,简化数据字典使用</li>
|
||||||
|
<li>新增Jaxb依赖,防止jdk8以上出现的兼容错误</li>
|
||||||
|
<li>生产环境使用路由懒加载提升页面响应速度</li>
|
||||||
|
<li>修复五级以上菜单出现的404问题</li>
|
||||||
|
<li>防重提交注解支持配置间隔时间/提示消息</li>
|
||||||
|
<li>日志注解新增是否保存响应参数</li>
|
||||||
|
<li>任务屏蔽违规字符&参数忽略双引号中的逗号</li>
|
||||||
|
<li>升级SpringBoot到最新版本2.5.6</li>
|
||||||
|
<li>升级pagehelper到最新版1.4.0</li>
|
||||||
|
<li>升级spring-boot-mybatis到最新版2.2.0</li>
|
||||||
|
<li>升级oshi到最新版本v5.8.2</li>
|
||||||
|
<li>升级druid到最新版1.2.8</li>
|
||||||
|
<li>升级velocity到最新版本2.3</li>
|
||||||
|
<li>升级fastjson到最新版1.2.78</li>
|
||||||
|
<li>升级axios到最新版本0.24.0</li>
|
||||||
|
<li>升级dart-sass到版本1.32.13</li>
|
||||||
|
<li>升级core-js到最新版本3.19.1</li>
|
||||||
|
<li>升级jsencrypt到最新版本3.2.1</li>
|
||||||
|
<li>升级js-cookie到最新版本3.0.1</li>
|
||||||
|
<li>升级file-saver到最新版本2.0.5</li>
|
||||||
|
<li>升级sass-loader到最新版本10.1.1</li>
|
||||||
|
<li>升级element-ui到最新版本2.15.6</li>
|
||||||
|
<li>新增sendGet无参请求方法</li>
|
||||||
|
<li>禁用el-tag组件的渐变动画</li>
|
||||||
|
<li>代码生成点击预览重置激活tab</li>
|
||||||
|
<li>AjaxResult重写put方法,以方便链式调用</li>
|
||||||
|
<li>优化登录/验证码请求headers不设置token</li>
|
||||||
|
<li>优化用户个人信息接口防止修改用户名</li>
|
||||||
|
<li>优化Cron表达式生成器关闭时销毁避免缓存</li>
|
||||||
|
<li>优化注册成功提示消息类型success</li>
|
||||||
|
<li>优化aop语法,使用spring自动注入注解</li>
|
||||||
|
<li>优化记录登录信息,移除不必要的修改</li>
|
||||||
|
<li>优化mybatis全局默认的执行器</li>
|
||||||
|
<li>优化Excel导入图片可能出现的异常</li>
|
||||||
|
<li>修复代码生成模板主子表删除缺少事务</li>
|
||||||
|
<li>修复日志记录可能出现的转换异常</li>
|
||||||
|
<li>修复代码生成复选框字典遗漏问题</li>
|
||||||
|
<li>修复关闭xss功能导致可重复读RepeatableFilter失效</li>
|
||||||
|
<li>修复字符串无法被反转义问题</li>
|
||||||
|
<li>修复后端主子表代码模板方法名生成错误问题</li>
|
||||||
|
<li>修复xss过滤后格式出现的异常</li>
|
||||||
|
<li>修复swagger没有指定dataTypeClass导致启动出现warn日志</li>
|
||||||
|
<li>其他细节优化</li>
|
||||||
|
</ol>
|
||||||
|
</el-collapse-item>
|
||||||
<el-collapse-item title="v3.7.0 - 2021-09-13">
|
<el-collapse-item title="v3.7.0 - 2021-09-13">
|
||||||
<ol>
|
<ol>
|
||||||
<li>参数管理支持配置验证码开关</li>
|
<li>参数管理支持配置验证码开关</li>
|
||||||
@ -664,7 +717,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 版本号
|
// 版本号
|
||||||
version: "3.7.0",
|
version: "3.8.0",
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -1,215 +1,215 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="login">
|
<div class="login">
|
||||||
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
|
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
|
||||||
<h3 class="title">若依后台管理系统</h3>
|
<h3 class="title">若依后台管理系统</h3>
|
||||||
<el-form-item prop="username">
|
<el-form-item prop="username">
|
||||||
<el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">
|
<el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">
|
||||||
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
|
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="password">
|
<el-form-item prop="password">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="loginForm.password"
|
v-model="loginForm.password"
|
||||||
type="password"
|
type="password"
|
||||||
auto-complete="off"
|
auto-complete="off"
|
||||||
placeholder="密码"
|
placeholder="密码"
|
||||||
@keyup.enter.native="handleLogin"
|
@keyup.enter.native="handleLogin"
|
||||||
>
|
>
|
||||||
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
|
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="code" v-if="captchaOnOff">
|
<el-form-item prop="code" v-if="captchaOnOff">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="loginForm.code"
|
v-model="loginForm.code"
|
||||||
auto-complete="off"
|
auto-complete="off"
|
||||||
placeholder="验证码"
|
placeholder="验证码"
|
||||||
style="width: 63%"
|
style="width: 63%"
|
||||||
@keyup.enter.native="handleLogin"
|
@keyup.enter.native="handleLogin"
|
||||||
>
|
>
|
||||||
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
|
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
|
||||||
</el-input>
|
</el-input>
|
||||||
<div class="login-code">
|
<div class="login-code">
|
||||||
<img :src="codeUrl" @click="getCode" class="login-code-img"/>
|
<img :src="codeUrl" @click="getCode" class="login-code-img"/>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox>
|
<el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox>
|
||||||
<el-form-item style="width:100%;">
|
<el-form-item style="width:100%;">
|
||||||
<el-button
|
<el-button
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
size="medium"
|
size="medium"
|
||||||
type="primary"
|
type="primary"
|
||||||
style="width:100%;"
|
style="width:100%;"
|
||||||
@click.native.prevent="handleLogin"
|
@click.native.prevent="handleLogin"
|
||||||
>
|
>
|
||||||
<span v-if="!loading">登 录</span>
|
<span v-if="!loading">登 录</span>
|
||||||
<span v-else>登 录 中...</span>
|
<span v-else>登 录 中...</span>
|
||||||
</el-button>
|
</el-button>
|
||||||
<div style="float: right;" v-if="register">
|
<div style="float: right;" v-if="register">
|
||||||
<router-link class="link-type" :to="'/register'">立即注册</router-link>
|
<router-link class="link-type" :to="'/register'">立即注册</router-link>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<!-- 底部 -->
|
<!-- 底部 -->
|
||||||
<div class="el-login-footer">
|
<div class="el-login-footer">
|
||||||
<span>Copyright © 2018-2021 ruoyi.vip All Rights Reserved.</span>
|
<span>Copyright © 2018-2021 ruoyi.vip All Rights Reserved.</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getCodeImg } from "@/api/login";
|
import { getCodeImg } from "@/api/login";
|
||||||
import Cookies from "js-cookie";
|
import Cookies from "js-cookie";
|
||||||
import { encrypt, decrypt } from '@/utils/jsencrypt'
|
import { encrypt, decrypt } from '@/utils/jsencrypt'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Login",
|
name: "Login",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
codeUrl: "",
|
codeUrl: "",
|
||||||
cookiePassword: "",
|
cookiePassword: "",
|
||||||
loginForm: {
|
loginForm: {
|
||||||
username: "admin",
|
username: "admin",
|
||||||
password: "qwerasdf",
|
password: "qwerasdf",
|
||||||
rememberMe: false,
|
rememberMe: false,
|
||||||
code: "",
|
code: "",
|
||||||
uuid: ""
|
uuid: ""
|
||||||
},
|
},
|
||||||
loginRules: {
|
loginRules: {
|
||||||
username: [
|
username: [
|
||||||
{ required: true, trigger: "blur", message: "请输入您的账号" }
|
{ required: true, trigger: "blur", message: "请输入您的账号" }
|
||||||
],
|
],
|
||||||
password: [
|
password: [
|
||||||
{ required: true, trigger: "blur", message: "请输入您的密码" }
|
{ required: true, trigger: "blur", message: "请输入您的密码" }
|
||||||
],
|
],
|
||||||
code: [{ required: true, trigger: "change", message: "请输入验证码" }]
|
code: [{ required: true, trigger: "change", message: "请输入验证码" }]
|
||||||
},
|
},
|
||||||
loading: false,
|
loading: false,
|
||||||
// 验证码开关
|
// 验证码开关
|
||||||
captchaOnOff: true,
|
captchaOnOff: true,
|
||||||
// 注册开关
|
// 注册开关
|
||||||
register: false,
|
register: false,
|
||||||
redirect: undefined
|
redirect: undefined
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
$route: {
|
$route: {
|
||||||
handler: function(route) {
|
handler: function(route) {
|
||||||
this.redirect = route.query && route.query.redirect;
|
this.redirect = route.query && route.query.redirect;
|
||||||
},
|
},
|
||||||
immediate: true
|
immediate: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getCode();
|
this.getCode();
|
||||||
this.getCookie();
|
this.getCookie();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getCode() {
|
getCode() {
|
||||||
getCodeImg().then(res => {
|
getCodeImg().then(res => {
|
||||||
this.captchaOnOff = res.captchaOnOff === undefined ? true : res.captchaOnOff;
|
this.captchaOnOff = res.captchaOnOff === undefined ? true : res.captchaOnOff;
|
||||||
if (this.captchaOnOff) {
|
if (this.captchaOnOff) {
|
||||||
this.codeUrl = "data:image/gif;base64," + res.img;
|
this.codeUrl = "data:image/gif;base64," + res.img;
|
||||||
this.loginForm.uuid = res.uuid;
|
this.loginForm.uuid = res.uuid;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getCookie() {
|
getCookie() {
|
||||||
const username = Cookies.get("username");
|
const username = Cookies.get("username");
|
||||||
const password = Cookies.get("password");
|
const password = Cookies.get("password");
|
||||||
const rememberMe = Cookies.get('rememberMe')
|
const rememberMe = Cookies.get('rememberMe')
|
||||||
this.loginForm = {
|
this.loginForm = {
|
||||||
username: username === undefined ? this.loginForm.username : username,
|
username: username === undefined ? this.loginForm.username : username,
|
||||||
password: password === undefined ? this.loginForm.password : decrypt(password),
|
password: password === undefined ? this.loginForm.password : decrypt(password),
|
||||||
rememberMe: rememberMe === undefined ? false : Boolean(rememberMe)
|
rememberMe: rememberMe === undefined ? false : Boolean(rememberMe)
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
handleLogin() {
|
handleLogin() {
|
||||||
this.$refs.loginForm.validate(valid => {
|
this.$refs.loginForm.validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
if (this.loginForm.rememberMe) {
|
if (this.loginForm.rememberMe) {
|
||||||
Cookies.set("username", this.loginForm.username, { expires: 30 });
|
Cookies.set("username", this.loginForm.username, { expires: 30 });
|
||||||
Cookies.set("password", encrypt(this.loginForm.password), { expires: 30 });
|
Cookies.set("password", encrypt(this.loginForm.password), { expires: 30 });
|
||||||
Cookies.set('rememberMe', this.loginForm.rememberMe, { expires: 30 });
|
Cookies.set('rememberMe', this.loginForm.rememberMe, { expires: 30 });
|
||||||
} else {
|
} else {
|
||||||
Cookies.remove("username");
|
Cookies.remove("username");
|
||||||
Cookies.remove("password");
|
Cookies.remove("password");
|
||||||
Cookies.remove('rememberMe');
|
Cookies.remove('rememberMe');
|
||||||
}
|
}
|
||||||
this.$store.dispatch("Login", this.loginForm).then(() => {
|
this.$store.dispatch("Login", this.loginForm).then(() => {
|
||||||
this.$router.push({ path: this.redirect || "/" }).catch(()=>{});
|
this.$router.push({ path: this.redirect || "/" }).catch(()=>{});
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (this.captchaOnOff) {
|
if (this.captchaOnOff) {
|
||||||
this.getCode();
|
this.getCode();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style rel="stylesheet/scss" lang="scss">
|
<style rel="stylesheet/scss" lang="scss">
|
||||||
.login {
|
.login {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-image: url("../assets/images/login-background.jpg");
|
background-image: url("../assets/images/login-background.jpg");
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
}
|
}
|
||||||
.title {
|
.title {
|
||||||
margin: 0px auto 30px auto;
|
margin: 0px auto 30px auto;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #707070;
|
color: #707070;
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-form {
|
.login-form {
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
width: 400px;
|
width: 400px;
|
||||||
padding: 25px 25px 5px 25px;
|
padding: 25px 25px 5px 25px;
|
||||||
.el-input {
|
.el-input {
|
||||||
height: 38px;
|
height: 38px;
|
||||||
input {
|
input {
|
||||||
height: 38px;
|
height: 38px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.input-icon {
|
.input-icon {
|
||||||
height: 39px;
|
height: 39px;
|
||||||
width: 14px;
|
width: 14px;
|
||||||
margin-left: 2px;
|
margin-left: 2px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.login-tip {
|
.login-tip {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #bfbfbf;
|
color: #bfbfbf;
|
||||||
}
|
}
|
||||||
.login-code {
|
.login-code {
|
||||||
width: 33%;
|
width: 33%;
|
||||||
height: 38px;
|
height: 38px;
|
||||||
float: right;
|
float: right;
|
||||||
img {
|
img {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.el-login-footer {
|
.el-login-footer {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-family: Arial;
|
font-family: Arial;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
letter-spacing: 1px;
|
letter-spacing: 1px;
|
||||||
}
|
}
|
||||||
.login-code-img {
|
.login-code-img {
|
||||||
height: 38px;
|
height: 38px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
v-model="queryParams.ipaddr"
|
v-model="queryParams.ipaddr"
|
||||||
placeholder="请输入登录地址"
|
placeholder="请输入登录地址"
|
||||||
clearable
|
clearable
|
||||||
|
size="small"
|
||||||
style="width: 240px;"
|
style="width: 240px;"
|
||||||
size="small"
|
|
||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -16,8 +16,8 @@
|
|||||||
v-model="queryParams.userName"
|
v-model="queryParams.userName"
|
||||||
placeholder="请输入用户名称"
|
placeholder="请输入用户名称"
|
||||||
clearable
|
clearable
|
||||||
|
size="small"
|
||||||
style="width: 240px;"
|
style="width: 240px;"
|
||||||
size="small"
|
|
||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -111,7 +111,7 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 强退按钮操作 */
|
/** 强退按钮操作 */
|
||||||
handleForceLogout(row) {
|
handleForceLogout(row) {
|
||||||
this.$modal.confirm('是否确认强退名称为"' + row.userName + '"的数据项?').then(function() {
|
this.$modal.confirm('是否确认强退名称为"' + row.userName + '"的用户?').then(function() {
|
||||||
return forceLogout(row.tokenId);
|
return forceLogout(row.tokenId);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
v-model="queryParams.title"
|
v-model="queryParams.title"
|
||||||
placeholder="请输入系统模块"
|
placeholder="请输入系统模块"
|
||||||
clearable
|
clearable
|
||||||
style="width: 240px;"
|
|
||||||
size="small"
|
size="small"
|
||||||
|
style="width: 240px;"
|
||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -16,8 +16,8 @@
|
|||||||
v-model="queryParams.operName"
|
v-model="queryParams.operName"
|
||||||
placeholder="请输入操作人员"
|
placeholder="请输入操作人员"
|
||||||
clearable
|
clearable
|
||||||
style="width: 240px;"
|
|
||||||
size="small"
|
size="small"
|
||||||
|
style="width: 240px;"
|
||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -127,7 +127,8 @@ export default {
|
|||||||
register(this.registerForm).then(res => {
|
register(this.registerForm).then(res => {
|
||||||
const username = this.registerForm.username;
|
const username = this.registerForm.username;
|
||||||
this.$alert("<font color='red'>恭喜你,您的账号 " + username + " 注册成功!</font>", '系统提示', {
|
this.$alert("<font color='red'>恭喜你,您的账号 " + username + " 注册成功!</font>", '系统提示', {
|
||||||
dangerouslyUseHTMLString: true
|
dangerouslyUseHTMLString: true,
|
||||||
|
type: 'success'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.$router.push("/login");
|
this.$router.push("/login");
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
|
@ -179,8 +179,6 @@ export default {
|
|||||||
isExpandAll: true,
|
isExpandAll: true,
|
||||||
// 重新渲染表格状态
|
// 重新渲染表格状态
|
||||||
refreshTable: true,
|
refreshTable: true,
|
||||||
// 是否展开
|
|
||||||
expand: false,
|
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
deptName: undefined,
|
deptName: undefined,
|
||||||
@ -276,7 +274,7 @@ export default {
|
|||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "添加部门";
|
this.title = "添加部门";
|
||||||
listDept().then(response => {
|
listDept().then(response => {
|
||||||
this.deptOptions = this.handleTree(response.data, "deptId");
|
this.deptOptions = this.handleTree(response.data, "deptId");
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 展开/折叠操作 */
|
/** 展开/折叠操作 */
|
||||||
@ -296,7 +294,7 @@ export default {
|
|||||||
this.title = "修改部门";
|
this.title = "修改部门";
|
||||||
});
|
});
|
||||||
listDeptExcludeChild(row.deptId).then(response => {
|
listDeptExcludeChild(row.deptId).then(response => {
|
||||||
this.deptOptions = this.handleTree(response.data, "deptId");
|
this.deptOptions = this.handleTree(response.data, "deptId");
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
|
@ -325,7 +325,7 @@ export default {
|
|||||||
this.queryParams.pageNum = 1;
|
this.queryParams.pageNum = 1;
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
// 返回按钮
|
/** 返回按钮操作 */
|
||||||
handleClose() {
|
handleClose() {
|
||||||
const obj = { path: "/system/dict" };
|
const obj = { path: "/system/dict" };
|
||||||
this.$tab.closeOpenPage(obj);
|
this.$tab.closeOpenPage(obj);
|
||||||
|
@ -78,7 +78,8 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button size="mini"
|
<el-button
|
||||||
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
@ -126,8 +127,8 @@
|
|||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="24" v-if="form.menuType != 'F'">
|
||||||
<el-form-item v-if="form.menuType != 'F'" label="菜单图标">
|
<el-form-item label="菜单图标">
|
||||||
<el-popover
|
<el-popover
|
||||||
placement="bottom-start"
|
placement="bottom-start"
|
||||||
width="460"
|
width="460"
|
||||||
@ -158,8 +159,8 @@
|
|||||||
<el-input-number v-model="form.orderNum" controls-position="right" :min="0" />
|
<el-input-number v-model="form.orderNum" controls-position="right" :min="0" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12" v-if="form.menuType != 'F'">
|
||||||
<el-form-item v-if="form.menuType != 'F'">
|
<el-form-item>
|
||||||
<span slot="label">
|
<span slot="label">
|
||||||
<el-tooltip content="选择是外链则路由地址需要以`http(s)://`开头" placement="top">
|
<el-tooltip content="选择是外链则路由地址需要以`http(s)://`开头" placement="top">
|
||||||
<i class="el-icon-question"></i>
|
<i class="el-icon-question"></i>
|
||||||
@ -172,8 +173,8 @@
|
|||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12" v-if="form.menuType != 'F'">
|
||||||
<el-form-item v-if="form.menuType != 'F'" prop="path">
|
<el-form-item prop="path">
|
||||||
<span slot="label">
|
<span slot="label">
|
||||||
<el-tooltip content="访问的路由地址,如:`user`,如外网地址需内链访问则以`http(s)://`开头" placement="top">
|
<el-tooltip content="访问的路由地址,如:`user`,如外网地址需内链访问则以`http(s)://`开头" placement="top">
|
||||||
<i class="el-icon-question"></i>
|
<i class="el-icon-question"></i>
|
||||||
@ -194,8 +195,8 @@
|
|||||||
<el-input v-model="form.component" placeholder="请输入组件路径" />
|
<el-input v-model="form.component" placeholder="请输入组件路径" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12" v-if="form.menuType != 'M'">
|
||||||
<el-form-item v-if="form.menuType != 'M'">
|
<el-form-item>
|
||||||
<el-input v-model="form.perms" placeholder="请输入权限标识" maxlength="100" />
|
<el-input v-model="form.perms" placeholder="请输入权限标识" maxlength="100" />
|
||||||
<span slot="label">
|
<span slot="label">
|
||||||
<el-tooltip content="控制器中定义的权限字符,如:@PreAuthorize(`@ss.hasPermi('system:user:list')`)" placement="top">
|
<el-tooltip content="控制器中定义的权限字符,如:@PreAuthorize(`@ss.hasPermi('system:user:list')`)" placement="top">
|
||||||
@ -205,8 +206,8 @@
|
|||||||
</span>
|
</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12" v-if="form.menuType == 'C'">
|
||||||
<el-form-item v-if="form.menuType == 'C'">
|
<el-form-item>
|
||||||
<el-input v-model="form.query" placeholder="请输入路由参数" maxlength="255" />
|
<el-input v-model="form.query" placeholder="请输入路由参数" maxlength="255" />
|
||||||
<span slot="label">
|
<span slot="label">
|
||||||
<el-tooltip content='访问路由的默认传递参数,如:`{"id": 1, "name": "ry"}`' placement="top">
|
<el-tooltip content='访问路由的默认传递参数,如:`{"id": 1, "name": "ry"}`' placement="top">
|
||||||
@ -216,8 +217,8 @@
|
|||||||
</span>
|
</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12" v-if="form.menuType == 'C'">
|
||||||
<el-form-item v-if="form.menuType == 'C'">
|
<el-form-item>
|
||||||
<span slot="label">
|
<span slot="label">
|
||||||
<el-tooltip content="选择是则会被`keep-alive`缓存,需要匹配组件的`name`和地址保持一致" placement="top">
|
<el-tooltip content="选择是则会被`keep-alive`缓存,需要匹配组件的`name`和地址保持一致" placement="top">
|
||||||
<i class="el-icon-question"></i>
|
<i class="el-icon-question"></i>
|
||||||
@ -230,8 +231,8 @@
|
|||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12" v-if="form.menuType != 'F'">
|
||||||
<el-form-item v-if="form.menuType != 'F'">
|
<el-form-item>
|
||||||
<span slot="label">
|
<span slot="label">
|
||||||
<el-tooltip content="选择隐藏则路由将不会出现在侧边栏,但仍然可以访问" placement="top">
|
<el-tooltip content="选择隐藏则路由将不会出现在侧边栏,但仍然可以访问" placement="top">
|
||||||
<i class="el-icon-question"></i>
|
<i class="el-icon-question"></i>
|
||||||
@ -247,8 +248,8 @@
|
|||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12" v-if="form.menuType != 'F'">
|
||||||
<el-form-item v-if="form.menuType != 'F'">
|
<el-form-item>
|
||||||
<span slot="label">
|
<span slot="label">
|
||||||
<el-tooltip content="选择停用则路由将不会出现在侧边栏,也不能被访问" placement="top">
|
<el-tooltip content="选择停用则路由将不会出现在侧边栏,也不能被访问" placement="top">
|
||||||
<i class="el-icon-question"></i>
|
<i class="el-icon-question"></i>
|
||||||
|
@ -355,8 +355,7 @@ export default {
|
|||||||
/** 查询角色列表 */
|
/** 查询角色列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
listRole(this.addDateRange(this.queryParams, this.dateRange)).then(
|
listRole(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
||||||
response => {
|
|
||||||
this.roleList = response.rows;
|
this.roleList = response.rows;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
@ -123,6 +123,10 @@ export default {
|
|||||||
handleSelectUser() {
|
handleSelectUser() {
|
||||||
const roleId = this.queryParams.roleId;
|
const roleId = this.queryParams.roleId;
|
||||||
const userIds = this.userIds.join(",");
|
const userIds = this.userIds.join(",");
|
||||||
|
if (userIds == "") {
|
||||||
|
this.$modal.msgError("请选择要分配的用户");
|
||||||
|
return;
|
||||||
|
}
|
||||||
authUserSelectAll({ roleId: roleId, userIds: userIds }).then(res => {
|
authUserSelectAll({ roleId: roleId, userIds: userIds }).then(res => {
|
||||||
this.$modal.msgSuccess(res.msg);
|
this.$modal.msgSuccess(res.msg);
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8" :offset="2">
|
<el-col :span="8" :offset="2">
|
||||||
<el-form-item label="登录账号" prop="phonenumber">
|
<el-form-item label="登录账号" prop="userName">
|
||||||
<el-input v-model="form.userName" disabled />
|
<el-input v-model="form.userName" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -206,7 +206,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<!-- 添加或修改参数配置对话框 -->
|
<!-- 添加或修改用户配置对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
<el-row>
|
<el-row>
|
||||||
@ -596,7 +596,7 @@ export default {
|
|||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
closeOnClickModal: false,
|
closeOnClickModal: false,
|
||||||
inputPattern: /^.{5,20}$/,
|
inputPattern: /^.{5,20}$/,
|
||||||
inputErrorMessage: "用户密码长度必须介于 5 和 20 之间",
|
inputErrorMessage: "用户密码长度必须介于 5 和 20 之间"
|
||||||
}).then(({ value }) => {
|
}).then(({ value }) => {
|
||||||
resetUserPwd(row.userId, value).then(response => {
|
resetUserPwd(row.userId, value).then(response => {
|
||||||
this.$modal.msgSuccess("修改成功,新密码是:" + value);
|
this.$modal.msgSuccess("修改成功,新密码是:" + value);
|
||||||
@ -652,7 +652,6 @@ export default {
|
|||||||
/** 下载模板操作 */
|
/** 下载模板操作 */
|
||||||
importTemplate() {
|
importTemplate() {
|
||||||
this.download('system/user/importTemplate', {
|
this.download('system/user/importTemplate', {
|
||||||
...this.queryParams
|
|
||||||
}, `user_template_${new Date().getTime()}.xlsx`)
|
}, `user_template_${new Date().getTime()}.xlsx`)
|
||||||
},
|
},
|
||||||
// 文件上传中处理
|
// 文件上传中处理
|
||||||
|
@ -29,7 +29,6 @@ export default {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
return {
|
return {
|
||||||
test: "1test",
|
|
||||||
user: {
|
user: {
|
||||||
oldPassword: undefined,
|
oldPassword: undefined,
|
||||||
newPassword: undefined,
|
newPassword: undefined,
|
||||||
@ -55,11 +54,9 @@ export default {
|
|||||||
submit() {
|
submit() {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
updateUserPwd(this.user.oldPassword, this.user.newPassword).then(
|
updateUserPwd(this.user.oldPassword, this.user.newPassword).then(response => {
|
||||||
response => {
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.$modal.msgSuccess("修改成功");
|
});
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div class="user-info-head" @click="editCropper()"><img v-bind:src="options.img" title="点击上传头像" class="img-circle img-lg" /></div>
|
<div class="user-info-head" @click="editCropper()"><img v-bind:src="options.img" title="点击上传头像" class="img-circle img-lg" /></div>
|
||||||
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body @opened="modalOpened" @close="closeDialog()">
|
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body @opened="modalOpened" @close="closeDialog">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :xs="24" :md="12" :style="{height: '350px'}">
|
<el-col :xs="24" :md="12" :style="{height: '350px'}">
|
||||||
<vue-cropper
|
<vue-cropper
|
||||||
@ -140,7 +140,7 @@ export default {
|
|||||||
// 关闭窗口
|
// 关闭窗口
|
||||||
closeDialog() {
|
closeDialog() {
|
||||||
this.options.img = store.getters.avatar
|
this.options.img = store.getters.avatar
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
<el-input placeholder="请输入" v-model="info.tableComment" />
|
<el-input placeholder="请输入" v-model="info.tableComment" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="实体类名称" prop="className">
|
<el-form-item label="实体类名称" prop="className">
|
||||||
<el-input placeholder="请输入" v-model="info.className" />
|
<el-input placeholder="请输入" v-model="info.className" />
|
||||||
@ -30,9 +29,9 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "BasicInfoForm",
|
|
||||||
props: {
|
props: {
|
||||||
info: {
|
info: {
|
||||||
type: Object,
|
type: Object,
|
||||||
|
@ -124,6 +124,7 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getGenTable, updateGenTable } from "@/api/tool/gen";
|
import { getGenTable, updateGenTable } from "@/api/tool/gen";
|
||||||
import { optionselect as getDictOptionselect } from "@/api/system/dict/type";
|
import { optionselect as getDictOptionselect } from "@/api/system/dict/type";
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item prop="packageName">
|
<el-form-item prop="packageName">
|
||||||
<span slot="label">
|
<span slot="label">
|
||||||
@ -213,12 +212,12 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Treeselect from "@riophae/vue-treeselect";
|
import Treeselect from "@riophae/vue-treeselect";
|
||||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "BasicInfoForm",
|
|
||||||
components: { Treeselect },
|
components: { Treeselect },
|
||||||
props: {
|
props: {
|
||||||
info: {
|
info: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user