mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2025-09-24 07:19:46 +08:00
发布 v3.2.0
This commit is contained in:
@ -70,7 +70,7 @@ spring:
|
||||
config:
|
||||
multi-statement-allow: true
|
||||
|
||||
--- # redis 配置
|
||||
--- # redis 单机配置(单机与集群只能开启一个另一个需要注释掉)
|
||||
spring:
|
||||
redis:
|
||||
# 地址
|
||||
@ -118,6 +118,67 @@ redisson:
|
||||
# DNS监测时间间隔,单位:毫秒
|
||||
dnsMonitoringInterval: 5000
|
||||
|
||||
#--- # redis 集群配置(单机与集群只能开启一个另一个需要注释掉)
|
||||
#spring:
|
||||
# redis:
|
||||
# cluster:
|
||||
# nodes:
|
||||
# - 192.168.0.100:6379
|
||||
# - 192.168.0.101:6379
|
||||
# - 192.168.0.102:6379
|
||||
# # 密码
|
||||
# password:
|
||||
# # 连接超时时间
|
||||
# timeout: 10s
|
||||
# # 是否开启ssl
|
||||
# ssl: false
|
||||
#
|
||||
#redisson:
|
||||
# # 线程池数量
|
||||
# threads: 16
|
||||
# # Netty线程池数量
|
||||
# nettyThreads: 32
|
||||
# # 传输模式
|
||||
# transportMode: "NIO"
|
||||
# # 集群配置
|
||||
# clusterServersConfig:
|
||||
# # 客户端名称
|
||||
# clientName: ${ruoyi.name}
|
||||
# # master最小空闲连接数
|
||||
# masterConnectionMinimumIdleSize: 32
|
||||
# # master连接池大小
|
||||
# masterConnectionPoolSize: 64
|
||||
# # slave最小空闲连接数
|
||||
# slaveConnectionMinimumIdleSize: 32
|
||||
# # slave连接池大小
|
||||
# slaveConnectionPoolSize: 64
|
||||
# # 连接空闲超时,单位:毫秒
|
||||
# idleConnectionTimeout: 10000
|
||||
# # ping连接间隔
|
||||
# pingConnectionInterval: 1000
|
||||
# # 命令等待超时,单位:毫秒
|
||||
# timeout: 3000
|
||||
# # 如果尝试在此限制之内发送成功,则开始启用 timeout 计时。
|
||||
# retryAttempts: 3
|
||||
# # 命令重试发送时间间隔,单位:毫秒
|
||||
# retryInterval: 1500
|
||||
# # 从可用服务器的内部列表中排除 Redis Slave 重新连接尝试的间隔。
|
||||
# failedSlaveReconnectionInterval: 3000
|
||||
# # 发布和订阅连接池最小空闲连接数
|
||||
# subscriptionConnectionMinimumIdleSize: 1
|
||||
# # 发布和订阅连接池大小
|
||||
# subscriptionConnectionPoolSize: 50
|
||||
# # 单个连接最大订阅数量
|
||||
# subscriptionsPerConnection: 5
|
||||
# # 扫描间隔
|
||||
# scanInterval: 1000
|
||||
# # DNS监测时间间隔,单位:毫秒
|
||||
# dnsMonitoringInterval: 5000
|
||||
# # 读取模式
|
||||
# readMode: "SLAVE"
|
||||
# # 订阅模式
|
||||
# subscriptionMode: "MASTER"
|
||||
|
||||
--- # 监控配置
|
||||
spring:
|
||||
boot:
|
||||
|
@ -70,7 +70,7 @@ spring:
|
||||
config:
|
||||
multi-statement-allow: true
|
||||
|
||||
--- # redis 配置
|
||||
--- # redis 单机配置(单机与集群只能开启一个另一个需要注释掉)
|
||||
spring:
|
||||
redis:
|
||||
# 地址
|
||||
@ -118,6 +118,67 @@ redisson:
|
||||
# DNS监测时间间隔,单位:毫秒
|
||||
dnsMonitoringInterval: 5000
|
||||
|
||||
#--- # redis 集群配置(单机与集群只能开启一个另一个需要注释掉)
|
||||
#spring:
|
||||
# redis:
|
||||
# cluster:
|
||||
# nodes:
|
||||
# - 192.168.0.100:6379
|
||||
# - 192.168.0.101:6379
|
||||
# - 192.168.0.102:6379
|
||||
# # 密码
|
||||
# password:
|
||||
# # 连接超时时间
|
||||
# timeout: 10s
|
||||
# # 是否开启ssl
|
||||
# ssl: false
|
||||
#
|
||||
#redisson:
|
||||
# # 线程池数量
|
||||
# threads: 16
|
||||
# # Netty线程池数量
|
||||
# nettyThreads: 32
|
||||
# # 传输模式
|
||||
# transportMode: "NIO"
|
||||
# # 集群配置
|
||||
# clusterServersConfig:
|
||||
# # 客户端名称
|
||||
# clientName: ${ruoyi.name}
|
||||
# # master最小空闲连接数
|
||||
# masterConnectionMinimumIdleSize: 32
|
||||
# # master连接池大小
|
||||
# masterConnectionPoolSize: 64
|
||||
# # slave最小空闲连接数
|
||||
# slaveConnectionMinimumIdleSize: 32
|
||||
# # slave连接池大小
|
||||
# slaveConnectionPoolSize: 64
|
||||
# # 连接空闲超时,单位:毫秒
|
||||
# idleConnectionTimeout: 10000
|
||||
# # ping连接间隔
|
||||
# pingConnectionInterval: 1000
|
||||
# # 命令等待超时,单位:毫秒
|
||||
# timeout: 3000
|
||||
# # 如果尝试在此限制之内发送成功,则开始启用 timeout 计时。
|
||||
# retryAttempts: 3
|
||||
# # 命令重试发送时间间隔,单位:毫秒
|
||||
# retryInterval: 1500
|
||||
# # 从可用服务器的内部列表中排除 Redis Slave 重新连接尝试的间隔。
|
||||
# failedSlaveReconnectionInterval: 3000
|
||||
# # 发布和订阅连接池最小空闲连接数
|
||||
# subscriptionConnectionMinimumIdleSize: 1
|
||||
# # 发布和订阅连接池大小
|
||||
# subscriptionConnectionPoolSize: 50
|
||||
# # 单个连接最大订阅数量
|
||||
# subscriptionsPerConnection: 5
|
||||
# # 扫描间隔
|
||||
# scanInterval: 1000
|
||||
# # DNS监测时间间隔,单位:毫秒
|
||||
# dnsMonitoringInterval: 5000
|
||||
# # 读取模式
|
||||
# readMode: "SLAVE"
|
||||
# # 订阅模式
|
||||
# subscriptionMode: "MASTER"
|
||||
|
||||
--- # 监控配置
|
||||
spring:
|
||||
boot:
|
||||
|
@ -106,10 +106,32 @@ token:
|
||||
# 令牌有效期(默认30分钟)
|
||||
expireTime: 30
|
||||
|
||||
# security配置
|
||||
security:
|
||||
# 登出路径
|
||||
logout-url: /logout
|
||||
# 匿名路径
|
||||
anonymous:
|
||||
- /login
|
||||
- /register
|
||||
- /captchaImage
|
||||
# swagger 文档配置
|
||||
- /doc.html
|
||||
- /swagger-resources/**
|
||||
- /webjars/**
|
||||
- /*/api-docs
|
||||
# druid 监控配置
|
||||
- /druid/**
|
||||
# actuator 监控配置
|
||||
- /actuator
|
||||
- /actuator/**
|
||||
# 用户放行
|
||||
permit-all:
|
||||
|
||||
# 重复提交
|
||||
repeat-submit:
|
||||
# 全局间隔时间(毫秒)
|
||||
intervalTime: 1000
|
||||
interval: 5000
|
||||
|
||||
# MyBatisPlus配置
|
||||
# https://baomidou.com/config/
|
||||
@ -221,6 +243,11 @@ swagger:
|
||||
name: Lion Li
|
||||
email: crazylionli@163.com
|
||||
url: https://gitee.com/JavaLionLi/RuoYi-Vue-Plus
|
||||
groups:
|
||||
- name: 演示案例
|
||||
basePackage: com.ruoyi.demo
|
||||
- name: 系统模块
|
||||
basePackage: com.ruoyi.admin
|
||||
|
||||
# 防止XSS攻击
|
||||
xss:
|
||||
@ -244,7 +271,7 @@ thread-pool:
|
||||
# 线程池维护线程所允许的空闲时间
|
||||
keepAliveSeconds: 300
|
||||
# 线程池对拒绝任务(无线程可用)的处理策略
|
||||
# CALLER_RUNS_POLICY 等待
|
||||
# CALLER_RUNS_POLICY 调用方执行
|
||||
# DISCARD_OLDEST_POLICY 放弃最旧的
|
||||
# DISCARD_POLICY 丢弃
|
||||
# ABORT_POLICY 中止
|
||||
|
@ -12,7 +12,8 @@
|
||||
<result property="orderNum" column="order_num"/>
|
||||
<result property="path" column="path"/>
|
||||
<result property="component" column="component"/>
|
||||
<result property="isFrame" column="is_frame"/>
|
||||
<result property="query" column="query"/>
|
||||
<result property="isFrame" column="is_frame"/>
|
||||
<result property="isCache" column="is_cache"/>
|
||||
<result property="menuType" column="menu_type"/>
|
||||
<result property="visible" column="visible"/>
|
||||
@ -33,6 +34,7 @@
|
||||
order_num,
|
||||
path,
|
||||
component,
|
||||
query,
|
||||
is_frame,
|
||||
is_cache,
|
||||
menu_type,
|
||||
@ -51,7 +53,8 @@
|
||||
m.menu_name,
|
||||
m.path,
|
||||
m.component,
|
||||
m.visible,
|
||||
m.query,
|
||||
m.visible,
|
||||
m.status,
|
||||
ifnull(m.perms, '') as perms,
|
||||
m.is_frame,
|
||||
@ -67,7 +70,7 @@
|
||||
</select>
|
||||
|
||||
<select id="selectMenuListByUserId" parameterType="SysMenu" resultMap="SysMenuResult">
|
||||
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.visible, m.status,
|
||||
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.query, m.visible, m.status,
|
||||
ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
|
||||
from sys_menu m
|
||||
left join sys_role_menu rm on m.menu_id = rm.menu_id
|
||||
@ -92,6 +95,7 @@
|
||||
m.menu_name,
|
||||
m.path,
|
||||
m.component,
|
||||
m.query,
|
||||
m.visible,
|
||||
m.status,
|
||||
ifnull(m.perms, '') as perms,
|
||||
|
@ -2,8 +2,6 @@ package ${packageName}.mapper;
|
||||
|
||||
import ${packageName}.domain.${ClassName};
|
||||
import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus;
|
||||
import com.ruoyi.common.core.mybatisplus.cache.MybatisPlusRedisCache;
|
||||
import org.apache.ibatis.annotations.CacheNamespace;
|
||||
|
||||
/**
|
||||
* ${functionName}Mapper接口
|
||||
|
@ -79,7 +79,12 @@ public class ${ClassName}ServiceImpl extends ServicePlusImpl<${ClassName}Mapper,
|
||||
public Boolean insertByBo(${ClassName}Bo bo) {
|
||||
${ClassName} add = BeanUtil.toBean(bo, ${ClassName}.class);
|
||||
validEntityBeforeSave(add);
|
||||
return save(add);
|
||||
boolean flag = save(add);
|
||||
#set($pk=$pkColumn.javaField.substring(0,1).toUpperCase() + ${pkColumn.javaField.substring(1)})
|
||||
if (flag) {
|
||||
bo.set$pk(add.get$pk());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -27,14 +27,8 @@ public class ${ClassName}Vo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* $pkColumn.columnComment
|
||||
*/
|
||||
@ApiModelProperty("$pkColumn.columnComment")
|
||||
private ${pkColumn.javaType} ${pkColumn.javaField};
|
||||
|
||||
#foreach ($column in $columns)
|
||||
#if($column.isList && $column.isPk!=1)
|
||||
#if($column.isList)
|
||||
/**
|
||||
* $column.columnComment
|
||||
*/
|
||||
|
@ -25,10 +25,10 @@
|
||||
<el-form-item label="${comment}" prop="${column.javaField}">
|
||||
<el-select v-model="queryParams.${column.javaField}" placeholder="请选择${comment}" clearable size="small">
|
||||
<el-option
|
||||
v-for="dict in ${column.javaField}Options"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
:value="dict.dictValue"
|
||||
v-for="dict in dict.type.${dictType}"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@ -108,7 +108,7 @@
|
||||
#elseif($column.list && $column.dictType && "" != $column.dictType)
|
||||
<el-table-column label="${comment}" align="center" prop="${javaField}">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="${javaField}Options" :value="scope.row.${javaField}"/>
|
||||
<dict-tag :options="dict.type.${column.dictType}" :value="scope.row.${javaField}"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
#elseif($column.list && "" != $javaField)
|
||||
@ -183,10 +183,10 @@
|
||||
<el-form-item label="${comment}" prop="${field}">
|
||||
<el-select v-model="form.${field}" placeholder="请选择${comment}">
|
||||
<el-option
|
||||
v-for="dict in ${field}Options"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
#if($column.javaType == "Integer" || $column.javaType == "Long"):value="parseInt(dict.dictValue)"#else:value="dict.dictValue"#end
|
||||
v-for="dict in dict.type.${dictType}"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
#if($column.javaType == "Integer" || $column.javaType == "Long"):value="parseInt(dict.value)"#else:value="dict.value"#end
|
||||
|
||||
></el-option>
|
||||
</el-select>
|
||||
@ -201,10 +201,10 @@
|
||||
<el-form-item label="${comment}">
|
||||
<el-checkbox-group v-model="form.${field}">
|
||||
<el-checkbox
|
||||
v-for="dict in ${field}Options"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictValue">
|
||||
{{dict.dictLabel}}
|
||||
v-for="dict in dict.type.${dictType}"
|
||||
:key="dict.value"
|
||||
:label="dict.value">
|
||||
{{dict.label}}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
@ -218,11 +218,11 @@
|
||||
<el-form-item label="${comment}">
|
||||
<el-radio-group v-model="form.${field}">
|
||||
<el-radio
|
||||
v-for="dict in ${field}Options"
|
||||
:key="dict.dictValue"
|
||||
#if($column.javaType == "Integer" || $column.javaType == "Long"):label="parseInt(dict.dictValue)"#else:label="dict.dictValue"#end
|
||||
v-for="dict in dict.type.${dictType}"
|
||||
:key="dict.value"
|
||||
#if($column.javaType == "Integer" || $column.javaType == "Long"):label="parseInt(dict.value)"#else:label="dict.value"#end
|
||||
|
||||
>{{dict.dictLabel}}</el-radio>
|
||||
>{{dict.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
#elseif($column.htmlType == "radio" && $dictType)
|
||||
@ -263,6 +263,9 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
|
||||
export default {
|
||||
name: "${BusinessName}",
|
||||
#if(${dicts} != '')
|
||||
dicts: [${dicts}],
|
||||
#end
|
||||
components: {
|
||||
Treeselect
|
||||
},
|
||||
@ -283,16 +286,7 @@ export default {
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
#foreach ($column in $columns)
|
||||
#set($parentheseIndex=$column.columnComment.indexOf("("))
|
||||
#if($parentheseIndex != -1)
|
||||
#set($comment=$column.columnComment.substring(0, $parentheseIndex))
|
||||
#else
|
||||
#set($comment=$column.columnComment)
|
||||
#end
|
||||
#if(${column.dictType} && ${column.dictType} != '')
|
||||
// $comment字典
|
||||
${column.javaField}Options: [],
|
||||
#elseif($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
|
||||
#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
|
||||
#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
|
||||
// $comment时间范围
|
||||
daterange${AttrName}: [],
|
||||
@ -330,13 +324,6 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
#foreach ($column in $columns)
|
||||
#if(${column.dictType} && ${column.dictType} != '')
|
||||
this.getDicts("${column.dictType}").then(response => {
|
||||
this.${column.javaField}Options = response.data;
|
||||
});
|
||||
#end
|
||||
#end
|
||||
},
|
||||
methods: {
|
||||
/** 查询${functionName}列表 */
|
||||
@ -464,7 +451,7 @@ export default {
|
||||
#end
|
||||
if (this.form.${pkColumn.javaField} != null) {
|
||||
update${BusinessName}(this.form).then(response => {
|
||||
this.msgSuccess("修改成功");
|
||||
this.#[[$modal]]#.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}).finally(() => {
|
||||
@ -472,7 +459,7 @@ export default {
|
||||
});
|
||||
} else {
|
||||
add${BusinessName}(this.form).then(response => {
|
||||
this.msgSuccess("新增成功");
|
||||
this.#[[$modal]]#.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}).finally(() => {
|
||||
@ -484,19 +471,15 @@ export default {
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
this.$confirm('是否确认删除${functionName}编号为"' + row.${pkColumn.javaField} + '"的数据项?', "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.loading = true;
|
||||
return del${BusinessName}(row.${pkColumn.javaField});
|
||||
}).then(() => {
|
||||
this.loading = false;
|
||||
this.getList();
|
||||
this.msgSuccess("删除成功");
|
||||
this.#[[$modal]]#.confirm('是否确认删除${functionName}编号为"' + row.${pkColumn.javaField} + '"的数据项?').then(() => {
|
||||
this.loading = true;
|
||||
return del${BusinessName}(row.${pkColumn.javaField});
|
||||
}).then(() => {
|
||||
this.loading = false;
|
||||
this.getList();
|
||||
this.#[[$modal]]#.msgSuccess("删除成功");
|
||||
}).finally(() => {
|
||||
this.loading = false;
|
||||
this.loading = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -25,10 +25,10 @@
|
||||
<el-form-item label="${comment}" prop="${column.javaField}">
|
||||
<el-select v-model="queryParams.${column.javaField}" placeholder="请选择${comment}" clearable size="small">
|
||||
<el-option
|
||||
v-for="dict in ${column.javaField}Options"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
:value="dict.dictValue"
|
||||
v-for="dict in dict.type.${dictType}"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@ -137,7 +137,7 @@
|
||||
#elseif($column.list && $column.dictType && "" != $column.dictType)
|
||||
<el-table-column label="${comment}" align="center" prop="${javaField}">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="${javaField}Options" :value="scope.row.${javaField}"/>
|
||||
<dict-tag :options="dict.type.${column.dictType}" :value="scope.row.${javaField}"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
#elseif($column.list && "" != $javaField)
|
||||
@ -163,7 +163,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
@ -205,10 +205,10 @@
|
||||
<el-form-item label="${comment}" prop="${field}">
|
||||
<el-select v-model="form.${field}" placeholder="请选择${comment}">
|
||||
<el-option
|
||||
v-for="dict in ${field}Options"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
#if($column.javaType == "Integer" || $column.javaType == "Long"):value="parseInt(dict.dictValue)"#else:value="dict.dictValue"#end
|
||||
v-for="dict in dict.type.${dictType}"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
#if($column.javaType == "Integer" || $column.javaType == "Long"):value="parseInt(dict.value)"#else:value="dict.value"#end
|
||||
|
||||
></el-option>
|
||||
</el-select>
|
||||
@ -223,10 +223,10 @@
|
||||
<el-form-item label="${comment}">
|
||||
<el-checkbox-group v-model="form.${field}">
|
||||
<el-checkbox
|
||||
v-for="dict in ${field}Options"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictValue">
|
||||
{{dict.dictLabel}}
|
||||
v-for="dict in dict.type.${dictType}"
|
||||
:key="dict.value"
|
||||
:label="dict.value">
|
||||
{{dict.label}}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
@ -240,11 +240,11 @@
|
||||
<el-form-item label="${comment}">
|
||||
<el-radio-group v-model="form.${field}">
|
||||
<el-radio
|
||||
v-for="dict in ${field}Options"
|
||||
:key="dict.dictValue"
|
||||
#if($column.javaType == "Integer" || $column.javaType == "Long"):label="parseInt(dict.dictValue)"#else:label="dict.dictValue"#end
|
||||
v-for="dict in dict.type.${dictType}"
|
||||
:key="dict.value"
|
||||
#if($column.javaType == "Integer" || $column.javaType == "Long"):label="parseInt(dict.value)"#else:label="dict.value"#end
|
||||
|
||||
>{{dict.dictLabel}}</el-radio>
|
||||
>{{dict.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
#elseif($column.htmlType == "radio" && $dictType)
|
||||
@ -315,6 +315,9 @@ import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${Busin
|
||||
|
||||
export default {
|
||||
name: "${BusinessName}",
|
||||
#if(${dicts} != '')
|
||||
dicts: [${dicts}],
|
||||
#end
|
||||
data() {
|
||||
return {
|
||||
// 按钮loading
|
||||
@ -348,16 +351,7 @@ export default {
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
#foreach ($column in $columns)
|
||||
#set($parentheseIndex=$column.columnComment.indexOf("("))
|
||||
#if($parentheseIndex != -1)
|
||||
#set($comment=$column.columnComment.substring(0, $parentheseIndex))
|
||||
#else
|
||||
#set($comment=$column.columnComment)
|
||||
#end
|
||||
#if(${column.dictType} && ${column.dictType} != '')
|
||||
// $comment字典
|
||||
${column.javaField}Options: [],
|
||||
#elseif($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
|
||||
#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
|
||||
#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
|
||||
// $comment时间范围
|
||||
daterange${AttrName}: [],
|
||||
@ -397,13 +391,6 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
#foreach ($column in $columns)
|
||||
#if(${column.dictType} && ${column.dictType} != '')
|
||||
this.getDicts("${column.dictType}").then(response => {
|
||||
this.${column.javaField}Options = response.data;
|
||||
});
|
||||
#end
|
||||
#end
|
||||
},
|
||||
methods: {
|
||||
/** 查询${functionName}列表 */
|
||||
@ -519,7 +506,7 @@ export default {
|
||||
#end
|
||||
if (this.form.${pkColumn.javaField} != null) {
|
||||
update${BusinessName}(this.form).then(response => {
|
||||
this.msgSuccess("修改成功");
|
||||
this.#[[$modal]]#.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}).finally(() => {
|
||||
@ -527,7 +514,7 @@ export default {
|
||||
});
|
||||
} else {
|
||||
add${BusinessName}(this.form).then(response => {
|
||||
this.msgSuccess("新增成功");
|
||||
this.#[[$modal]]#.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}).finally(() => {
|
||||
@ -540,19 +527,15 @@ export default {
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ${pkColumn.javaField}s = row.${pkColumn.javaField} || this.ids;
|
||||
this.$confirm('是否确认删除${functionName}编号为"' + ${pkColumn.javaField}s + '"的数据项?', "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.loading = true;
|
||||
return del${BusinessName}(${pkColumn.javaField}s);
|
||||
}).then(() => {
|
||||
this.loading = false;
|
||||
this.getList();
|
||||
this.msgSuccess("删除成功");
|
||||
this.#[[$modal]]#.confirm('是否确认删除${functionName}编号为"' + ${pkColumn.javaField}s + '"的数据项?').then(() => {
|
||||
this.loading = true;
|
||||
return del${BusinessName}(${pkColumn.javaField}s);
|
||||
}).then(() => {
|
||||
this.loading = false;
|
||||
this.getList();
|
||||
this.#[[$modal]]#.msgSuccess("删除成功");
|
||||
}).finally(() => {
|
||||
this.loading = false;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
#if($table.sub)
|
||||
@ -574,7 +557,7 @@ export default {
|
||||
/** ${subTable.functionName}删除按钮操作 */
|
||||
handleDelete${subClassName}() {
|
||||
if (this.checked${subClassName}.length == 0) {
|
||||
this.msgError("请先选择要删除的${subTable.functionName}数据");
|
||||
this.#[[$modal]]#.msgError("请先选择要删除的${subTable.functionName}数据");
|
||||
} else {
|
||||
const ${subclassName}List = this.${subclassName}List;
|
||||
const checked${subClassName} = this.checked${subClassName};
|
||||
@ -590,7 +573,7 @@ export default {
|
||||
#end
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.downLoadExcel('/${moduleName}/${businessName}/export', this.queryParams);
|
||||
this.#[[$download]]#.excel('/${moduleName}/${businessName}/export', this.queryParams);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user