1、系统字典新增字典分组功能

2、前端积分管理页面细微调整
3、前端过渡动画调整
pull/254/head
xjs 4 years ago
parent 721c07f06d
commit d5913e0ad9

@ -1,12 +1,13 @@
package com.ruoyi.system.api.domain; package com.ruoyi.system.api.domain;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel; import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.annotation.Excel.ColumnType; import com.ruoyi.common.core.annotation.Excel.ColumnType;
import com.ruoyi.common.core.web.domain.BaseEntity; import com.ruoyi.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
/** /**
* sys_dict_type * sys_dict_type
@ -29,10 +30,24 @@ public class SysDictType extends BaseEntity
@Excel(name = "字典类型") @Excel(name = "字典类型")
private String dictType; private String dictType;
/**
*
*/
@Excel(name = "字典分组")
private String dictGroup;
/** 状态0正常 1停用 */ /** 状态0正常 1停用 */
@Excel(name = "状态", readConverterExp = "0=正常,1=停用") @Excel(name = "状态", readConverterExp = "0=正常,1=停用")
private String status; private String status;
public String getDictGroup() {
return dictGroup;
}
public void setDictGroup(String dictGroup) {
this.dictGroup = dictGroup;
}
public Long getDictId() public Long getDictId()
{ {
return dictId; return dictId;

@ -8,6 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<id property="dictId" column="dict_id" /> <id property="dictId" column="dict_id" />
<result property="dictName" column="dict_name" /> <result property="dictName" column="dict_name" />
<result property="dictType" column="dict_type" /> <result property="dictType" column="dict_type" />
<result property="dictGroup" column="dict_group" />
<result property="status" column="status" /> <result property="status" column="status" />
<result property="createBy" column="create_by" /> <result property="createBy" column="create_by" />
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time" />
@ -16,7 +17,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectDictTypeVo"> <sql id="selectDictTypeVo">
select dict_id, dict_name, dict_type, status, create_by, create_time, remark select dict_id, dict_name, dict_type, dict_group, status, create_by, create_time, remark
from sys_dict_type from sys_dict_type
</sql> </sql>
@ -32,6 +33,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="dictType != null and dictType != ''"> <if test="dictType != null and dictType != ''">
AND dict_type like concat('%', #{dictType}, '%') AND dict_type like concat('%', #{dictType}, '%')
</if> </if>
<if test="dictGroup != null and dictGroup != ''">
AND dict_group like concat('%', #{dictGroup}, '%')
</if>
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 --> <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
and date_format(create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d') and date_format(create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
</if> </if>
@ -39,7 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and date_format(create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d') and date_format(create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
</if> </if>
</where> </where>
order by update_time desc ,dict_id desc order by dict_group desc, update_time desc ,dict_id desc
</select> </select>
<select id="selectDictTypeAll" resultMap="SysDictTypeResult"> <select id="selectDictTypeAll" resultMap="SysDictTypeResult">
@ -77,6 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<set> <set>
<if test="dictName != null and dictName != ''">dict_name = #{dictName},</if> <if test="dictName != null and dictName != ''">dict_name = #{dictName},</if>
<if test="dictType != null and dictType != ''">dict_type = #{dictType},</if> <if test="dictType != null and dictType != ''">dict_type = #{dictType},</if>
<if test="dictGroup != null and dictGroup != ''">dict_group = #{dictGroup},</if>
<if test="status != null">status = #{status},</if> <if test="status != null">status = #{status},</if>
<if test="remark != null">remark = #{remark},</if> <if test="remark != null">remark = #{remark},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
@ -89,6 +94,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
insert into sys_dict_type( insert into sys_dict_type(
<if test="dictName != null and dictName != ''">dict_name,</if> <if test="dictName != null and dictName != ''">dict_name,</if>
<if test="dictType != null and dictType != ''">dict_type,</if> <if test="dictType != null and dictType != ''">dict_type,</if>
<if test="dictGroup != null and dictGroup != ''">dict_group,</if>
<if test="status != null">status,</if> <if test="status != null">status,</if>
<if test="remark != null and remark != ''">remark,</if> <if test="remark != null and remark != ''">remark,</if>
<if test="createBy != null and createBy != ''">create_by,</if> <if test="createBy != null and createBy != ''">create_by,</if>
@ -96,6 +102,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
)values( )values(
<if test="dictName != null and dictName != ''">#{dictName},</if> <if test="dictName != null and dictName != ''">#{dictName},</if>
<if test="dictType != null and dictType != ''">#{dictType},</if> <if test="dictType != null and dictType != ''">#{dictType},</if>
<if test="dictGroup != null and dictGroup != ''">#{dictGroup},</if>
<if test="status != null">#{status},</if> <if test="status != null">#{status},</if>
<if test="remark != null and remark != ''">#{remark},</if> <if test="remark != null and remark != ''">#{remark},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if> <if test="createBy != null and createBy != ''">#{createBy},</if>

@ -1,6 +1,6 @@
<template> <template>
<section class="app-main"> <section class="app-main">
<transition name="fade-transform" mode="out-in"> <transition name="el-fade-in-linear" mode="out-in">
<keep-alive :include="cachedViews"> <keep-alive :include="cachedViews">
<router-view :key="key" /> <router-view :key="key" />
</keep-alive> </keep-alive>

@ -11,7 +11,9 @@
<el-input-number v-model="formData.integralEnd" placeholder="积分区间结束" :min="0"></el-input-number> <el-input-number v-model="formData.integralEnd" placeholder="积分区间结束" :min="0"></el-input-number>
</el-form-item> </el-form-item>
<el-form-item size="large"> <el-form-item size="large">
<el-button type="primary" @click="submitForm"></el-button> <el-button type="primary"
v-hasPermi="['srb:integralGrade:save']"
@click="submitForm">提交</el-button>
<el-button @click="resetForm"></el-button> <el-button @click="resetForm"></el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -79,14 +81,9 @@ export default {
//id //id
getById(id) { getById(id) {
const loading = this.$loading({ this.$modal.loading("请稍候...");
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: "#666666"
});
getById(id).then(res => { getById(id).then(res => {
loading.close(); this.$modal.closeLoading()
this.formData = res.data this.formData = res.data
}) })
}, },

@ -81,16 +81,11 @@ export default {
methods: { methods: {
// //
fetchData() { fetchData() {
const loading = this.$loading({ this.$modal.loading("请稍候...");
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: "#666666"
});
getList().then(res => { getList().then(res => {
loading.close();
this.list = res.data this.list = res.data
this.$modal.closeLoading()
}).catch(err => { }).catch(err => {
}) })
loading.close(); loading.close();

@ -7,7 +7,7 @@
placeholder="请输入字典名称" placeholder="请输入字典名称"
clearable clearable
size="small" size="small"
style="width: 240px" style="width: 180px"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
@ -17,7 +17,7 @@
placeholder="请输入字典类型" placeholder="请输入字典类型"
clearable clearable
size="small" size="small"
style="width: 240px" style="width: 180px"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
@ -27,7 +27,7 @@
placeholder="字典状态" placeholder="字典状态"
clearable clearable
size="small" size="small"
style="width: 240px" style="width: 120px"
> >
<el-option <el-option
v-for="dict in dict.type.sys_normal_disable" v-for="dict in dict.type.sys_normal_disable"
@ -37,11 +37,27 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="字典分组" prop="dictGroup">
<el-select
v-model="queryParams.dictGroup"
placeholder="字典分组"
clearable
size="small"
style="width: 120px"
>
<el-option
v-for="dict in dict.type.sys_dict_group"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="创建时间"> <el-form-item label="创建时间">
<el-date-picker <el-date-picker
v-model="dateRange" v-model="dateRange"
size="small" size="small"
style="width: 240px" style="width: 200px"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
type="daterange" type="daterange"
range-separator="-" range-separator="-"
@ -127,6 +143,11 @@
<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/> <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="字典分组" align="center" prop="dictGroup" :show-overflow-tooltip="true" >
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_dict_group" :value="scope.row.dictGroup"/>
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" /> <el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
<el-table-column label="创建时间" align="center" prop="createTime" width="180"> <el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
@ -170,6 +191,23 @@
<el-form-item label="字典类型" prop="dictType"> <el-form-item label="字典类型" prop="dictType">
<el-input v-model="form.dictType" placeholder="请输入字典类型" /> <el-input v-model="form.dictType" placeholder="请输入字典类型" />
</el-form-item> </el-form-item>
<el-form-item label="字典分组" prop="dictGroup">
<el-select
v-model="form.dictGroup"
placeholder="字典分组"
clearable
size="small"
style="width: 240px"
>
<el-option
v-for="dict in dict.type.sys_dict_group"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="状态" prop="status"> <el-form-item label="状态" prop="status">
<el-radio-group v-model="form.status"> <el-radio-group v-model="form.status">
<el-radio <el-radio
@ -196,7 +234,7 @@ import { listType, getType, delType, addType, updateType, refreshCache } from "@
export default { export default {
name: "Dict", name: "Dict",
dicts: ['sys_normal_disable'], dicts: ['sys_normal_disable','sys_dict_group'],
data() { data() {
return { return {
// //
@ -225,7 +263,8 @@ export default {
pageSize: 10, pageSize: 10,
dictName: undefined, dictName: undefined,
dictType: undefined, dictType: undefined,
status: undefined status: undefined,
dictGroup:undefined
}, },
// //
form: {}, form: {},

Loading…
Cancel
Save