搜索条件,开始时间结束时间控件精确到日期;

列表中去掉“层级”一列;
列表中显示序号一列
数据列表上下级节点的数据类型校验
分类性质菜单拆分,分为分类管理、性质管理两个菜单
地域、运营商、特征作用域三种数据拆分为三个功能菜单管理地域管理、运营商管理、特征作用域管理。
This commit is contained in:
zhangshilin
2018-03-10 18:54:05 +08:00
parent fd6425772c
commit bdea050447
20 changed files with 1521 additions and 395 deletions

View File

@@ -36,6 +36,14 @@ public class ServiceDictInfo extends BaseEntity<ServiceDictInfo>{
private Date beginDate; // 开始日期
private Date endDate; // 结束日期
private Date editBeginDate; // 修改开始日期
private Date editEndDate; // 修改结束日期
/**
* 筛选搜索框展开状态
*/
private boolean isFilterActio = false;
public Integer getServiceDictId() {
return serviceDictId;
}
@@ -134,6 +142,24 @@ public class ServiceDictInfo extends BaseEntity<ServiceDictInfo>{
public void setEndDate(Date endDate) {
this.endDate = endDate;
}
public Date getEditBeginDate() {
return editBeginDate;
}
public void setEditBeginDate(Date editBeginDate) {
this.editBeginDate = editBeginDate;
}
public Date getEditEndDate() {
return editEndDate;
}
public void setEditEndDate(Date editEndDate) {
this.editEndDate = editEndDate;
}
public boolean isFilterActio() {
return isFilterActio;
}
public void setFilterActio(boolean isFilterActio) {
this.isFilterActio = isFilterActio;
}
@JsonIgnore
public static void sortList(List<ServiceDictInfo> list, List<ServiceDictInfo> sourcelist, Integer parentId, boolean cascade){
for (int i=0; i<sourcelist.size(); i++){

View File

@@ -34,6 +34,14 @@ public class SysDictInfo extends BaseEntity<SysDictInfo>{
private Date beginDate; // 开始日期
private Date endDate; // 结束日期
private Date editBeginDate; // 修改开始日期
private Date editEndDate; // 修改结束日期
/**
* 筛选搜索框展开状态
*/
private boolean isFilterActio = false;
public Integer getSysDictId() {
return sysDictId;
@@ -131,6 +139,24 @@ public class SysDictInfo extends BaseEntity<SysDictInfo>{
public void setLevelNo(Integer levelNo) {
this.levelNo = levelNo;
}
public Date getEditBeginDate() {
return editBeginDate;
}
public void setEditBeginDate(Date editBeginDate) {
this.editBeginDate = editBeginDate;
}
public Date getEditEndDate() {
return editEndDate;
}
public void setEditEndDate(Date editEndDate) {
this.editEndDate = editEndDate;
}
public boolean isFilterActio() {
return isFilterActio;
}
public void setFilterActio(boolean isFilterActio) {
this.isFilterActio = isFilterActio;
}
@JsonIgnore
public static void sortList(List<SysDictInfo> list, List<SysDictInfo> sourcelist, Integer parentId, boolean cascade){
for (int i=0; i<sourcelist.size(); i++){

View File

@@ -47,5 +47,43 @@ public class ConfigDictUtils {
public static SysDictInfo getSysDictInfoById(Integer sysDictId){
return sysDictInfoDao.getDictById(sysDictId);
}
/**
* 根据计算公式计算数据结果
* @param sysDictId
* @return
*/
public static Integer getNumberResult(Integer number1, Integer number2, Integer number3){
return number1+(number2-1)*number3;
}
/**
* 根据数据类型编码取出数据类型
* @param dictKey
* @param intArr
* @return
*/
public static String getItemTypeByNo(String dictKey, List intArr){
String result = "";
String value = DictUtils.getDictLabel(dictKey,intArr.get(0).toString());
if(value.trim().equals("分类")){
result = "分类";
}
if(value.trim().equals("性质")){
result = "性质";
}
if(value.trim().equals("标签")){
result = "标签";
}
if(value.trim().equals("地域")){
result = "地域";
}
if(value.trim().equals("运营商")){
result = "运营商";
}
if(value.trim().equals("特征作用域")){
result = "特征作用域";
}
return result;
}
}

View File

@@ -8,6 +8,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.zookeeper.ZooDefs.Ids;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
@@ -118,7 +119,9 @@ public class ServiceDictInfoController extends BaseController {
if(StringUtils.strIsBlank(serviceDictInfo.getItemValue())
&&StringUtils.strIsBlank(serviceDictInfo.getItemCode())
&&serviceDictInfo.getBeginDate()==null
&&serviceDictInfo.getEndDate()==null){
&&serviceDictInfo.getEndDate()==null
&&serviceDictInfo.getEditBeginDate()==null
&&serviceDictInfo.getEditEndDate()==null){
if(serviceDictInfo.getItemType()!=null){
selectedType = serviceDictInfo.getItemType();
return "redirect:"+ adminPath + "/basics/serviceDictInfo/list?itType="+itType+"&selectedType="+selectedType;
@@ -136,6 +139,19 @@ public class ServiceDictInfoController extends BaseController {
model.addAttribute("selectedType", selectedType);
serviceDictInfo.setItemType(selectedType);
}
String searchType = null;
String searchContent = null;
if(!StringUtils.isBlank(serviceDictInfo.getItemCode())){
searchType = "itemCode";
searchContent = serviceDictInfo.getItemCode();
}
if(!StringUtils.isBlank(serviceDictInfo.getItemValue())){
searchType = "itemValue";
searchContent = serviceDictInfo.getItemValue();
}
model.addAttribute("searchType", searchType);
model.addAttribute("searchContent", searchContent);
//先查出条件查询所有数据(注意顺序)
List<ServiceDictInfo> allList = serviceDictInfoService.findAllDictSearchList(serviceDictInfo,intArr);
@@ -180,10 +196,18 @@ public class ServiceDictInfoController extends BaseController {
* @return
*/
@RequestMapping(value={"form"})
public String form(ServiceDictInfo serviceDictInfo, Model model,String doAction,String itType) {
public String form(ServiceDictInfo serviceDictInfo, Model model,String doAction,String itType, String mulitId) {
if(doAction!=null&&doAction.equals("0")){
return "/basics/serviceDictInfo";
}
Integer id=0;
if(mulitId!=null){
String[] ids = mulitId.split(",");
id = Integer.valueOf(ids[0]);
}
if(id!=0){
serviceDictInfo = serviceDictInfoService.getDictById(id);
}
if (serviceDictInfo.getParent() == null || serviceDictInfo.getParent().getServiceDictId() == null||serviceDictInfo.getParent().getServiceDictId() == 0) {
ServiceDictInfo parent = new ServiceDictInfo();
parent.setServiceDictId(0);
@@ -232,9 +256,9 @@ public class ServiceDictInfoController extends BaseController {
* @return
*/
@RequestMapping(value={"delete"})
public String delete(ServiceDictInfo serviceDictInfo, RedirectAttributes redirectAttributes,String itType) {
public String delete(ServiceDictInfo serviceDictInfo, RedirectAttributes redirectAttributes, String itType, String mulitId) {
try {
serviceDictInfoService.deleteDict(serviceDictInfo);
serviceDictInfoService.deleteDict(mulitId);
addMessage(redirectAttributes, "删除成功");
} catch (Exception e) {
e.printStackTrace();

View File

@@ -116,7 +116,9 @@ public class SysDictInfoController extends BaseController {
if(StringUtils.strIsBlank(sysDictInfo.getItemValue())
&&StringUtils.strIsBlank(sysDictInfo.getItemCode())
&&sysDictInfo.getBeginDate()==null
&&sysDictInfo.getEndDate()==null){
&&sysDictInfo.getEndDate()==null
&&sysDictInfo.getEditBeginDate()==null
&&sysDictInfo.getEditEndDate()==null){
if(sysDictInfo.getItemType()!=null){
selectedType = sysDictInfo.getItemType();
return "redirect:"+ adminPath + "/basics/sysDictInfo/list?itType="+itType+"&selectedType="+selectedType;
@@ -134,6 +136,18 @@ public class SysDictInfoController extends BaseController {
model.addAttribute("selectedType", selectedType);
sysDictInfo.setItemType(selectedType);
}
String searchType = null;
String searchContent = null;
if(!StringUtils.isBlank(sysDictInfo.getItemCode())){
searchType = "itemCode";
searchContent = sysDictInfo.getItemCode();
}
if(!StringUtils.isBlank(sysDictInfo.getItemValue())){
searchType = "itemValue";
searchContent = sysDictInfo.getItemValue();
}
model.addAttribute("searchType", searchType);
model.addAttribute("searchContent", searchContent);
//先查出条件查询所有数据(注意顺序)
List<SysDictInfo> allList = sysDictInfoService.findAllDictSearchList(sysDictInfo,intArr);
@@ -198,10 +212,18 @@ public class SysDictInfoController extends BaseController {
* @return
*/
@RequestMapping(value={"form"})
public String form(SysDictInfo sysDictInfo, Model model, String doAction, String itType) {
public String form(SysDictInfo sysDictInfo, Model model, String doAction, String itType, String mulitId) {
if(doAction!=null&&doAction.equals("0")){
return "/basics/sysDictInfo";
}
Integer id=0;
if(mulitId!=null){
String[] ids = mulitId.split(",");
id = Integer.valueOf(ids[0]);
}
if(id!=0){
sysDictInfo = sysDictInfoService.getDictById(id);
}
if (sysDictInfo.getParent() == null || sysDictInfo.getParent().getSysDictId() == null||sysDictInfo.getParent().getSysDictId() == 0) {
SysDictInfo parent = new SysDictInfo();
parent.setSysDictId(0);
@@ -247,9 +269,9 @@ public class SysDictInfoController extends BaseController {
* @return
*/
@RequestMapping(value={"delete"})
public String delete(SysDictInfo sysDictInfo, RedirectAttributes redirectAttributes, String itType) {
public String delete(SysDictInfo sysDictInfo, RedirectAttributes redirectAttributes, String itType, String mulitId) {
try {
sysDictInfoService.deleteDict(sysDictInfo);
sysDictInfoService.deleteDict(mulitId);
addMessage(redirectAttributes, "删除成功");
} catch (Exception e) {
e.printStackTrace();
@@ -413,7 +435,7 @@ public class SysDictInfoController extends BaseController {
*/
@ResponseBody
@RequestMapping(value = "ajaxLeafHasTree")
public boolean ajaxLeafHasTree(Integer serviceDictId,Integer newIsLeaf,Integer parentId) {
public boolean ajaxLeafHasTree(Integer sysDictId,Integer newIsLeaf,Integer parentId) {
if(parentId==null||parentId==0||parentId==-1){
if(newIsLeaf==0){

View File

@@ -86,6 +86,12 @@
<if test="endDate !=null" >
AND create_time &lt;= #{endDate,jdbcType=TIMESTAMP}
</if>
<if test="editBeginDate !=null" >
AND edit_time &gt;= #{editBeginDate,jdbcType=TIMESTAMP}
</if>
<if test="editEndDate !=null" >
AND edit_time &lt;= #{editEndDate,jdbcType=TIMESTAMP}
</if>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
@@ -117,7 +123,12 @@
<if test="endDate !=null" >
AND create_time &lt;= #{endDate,jdbcType=TIMESTAMP}
</if>
<if test="editBeginDate !=null" >
AND edit_time &gt;= #{editBeginDate,jdbcType=TIMESTAMP}
</if>
<if test="editEndDate !=null" >
AND edit_time &lt;= #{editEndDate,jdbcType=TIMESTAMP}
</if>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
@@ -169,6 +180,12 @@
</if>
<if test="endDate !=null" >
AND s.create_time &lt;= #{endDate,jdbcType=TIMESTAMP}
</if>
<if test="editBeginDate !=null" >
AND edit_time &gt;= #{editBeginDate,jdbcType=TIMESTAMP}
</if>
<if test="editEndDate !=null" >
AND edit_time &lt;= #{editEndDate,jdbcType=TIMESTAMP}
</if>
AND s.parent_id not in (
SELECT s2.service_dict_id FROM service_dict_info s2 WHERE s2.is_valid=1
@@ -187,6 +204,12 @@
<if test="endDate !=null" >
AND s2.create_time &lt;= #{endDate,jdbcType=TIMESTAMP}
</if>
<if test="editBeginDate !=null" >
AND edit_time &gt;= #{editBeginDate,jdbcType=TIMESTAMP}
</if>
<if test="editEndDate !=null" >
AND edit_time &lt;= #{editEndDate,jdbcType=TIMESTAMP}
</if>
)
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
@@ -217,6 +240,12 @@
</if>
<if test="endDate !=null" >
AND s.create_time &lt;= #{endDate,jdbcType=TIMESTAMP}
</if>
<if test="editBeginDate !=null" >
AND edit_time &gt;= #{editBeginDate,jdbcType=TIMESTAMP}
</if>
<if test="editEndDate !=null" >
AND edit_time &lt;= #{editEndDate,jdbcType=TIMESTAMP}
</if>
AND s.parent_id not in (
SELECT s2.service_dict_id FROM service_dict_info s2 WHERE s2.is_valid=1
@@ -235,6 +264,12 @@
<if test="endDate !=null" >
AND s2.create_time &lt;= #{endDate,jdbcType=TIMESTAMP}
</if>
<if test="editBeginDate !=null" >
AND edit_time &gt;= #{editBeginDate,jdbcType=TIMESTAMP}
</if>
<if test="editEndDate !=null" >
AND edit_time &lt;= #{editEndDate,jdbcType=TIMESTAMP}
</if>
)
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
@@ -268,6 +303,12 @@
<if test="endDate !=null" >
AND create_time &lt;= #{endDate,jdbcType=TIMESTAMP}
</if>
<if test="editBeginDate !=null" >
AND edit_time &gt;= #{editBeginDate,jdbcType=TIMESTAMP}
</if>
<if test="editEndDate !=null" >
AND edit_time &lt;= #{editEndDate,jdbcType=TIMESTAMP}
</if>
</select>
<!-- 条件查询所有列表 (!=)-->
@@ -288,6 +329,12 @@
</if>
<if test="endDate !=null" >
AND create_time &lt;= #{endDate,jdbcType=TIMESTAMP}
</if>
<if test="editBeginDate !=null" >
AND edit_time &gt;= #{editBeginDate,jdbcType=TIMESTAMP}
</if>
<if test="editEndDate !=null" >
AND edit_time &lt;= #{editEndDate,jdbcType=TIMESTAMP}
</if>
</select>

View File

@@ -17,6 +17,12 @@ public interface SysDictInfoDao extends CrudDao<SysDictInfo> {
* @return
*/
List<SysDictInfo> findTopDictList(SysDictInfo sysDictInfo);
/**
* 查询顶层字典列表(无条件查询(!=)
* @param sysDictInfo
* @return
*/
List<SysDictInfo> findTopDictListN(SysDictInfo sysDictInfo);
/**
* 查出所有有效数据
@@ -30,15 +36,24 @@ public interface SysDictInfoDao extends CrudDao<SysDictInfo> {
* @return
*/
List<SysDictInfo> findDictTopSearchList(SysDictInfo sysDictInfo);
/**
* 查询条件查询顶层字典列表(含条件查询(!=)
* @param sysDictInfo
* @return
*/
List<SysDictInfo> findDictTopSearchListN(SysDictInfo sysDictInfo);
/**
* 查询字典列表(含条件查询(==)
* @param sysDictInfo
* @return
*/
List<SysDictInfo> findAllDictSearchList(SysDictInfo sysDictInfo);
/**
* 查询字典列表(含条件查询(!=)
* @param sysDictInfo
* @return
*/
List<SysDictInfo> findAllDictSearchListN(SysDictInfo sysDictInfo);
/**
* 添加字典信息
* @param sysDictInfo
@@ -91,6 +106,8 @@ public interface SysDictInfoDao extends CrudDao<SysDictInfo> {

View File

@@ -69,6 +69,12 @@
<if test="endDate !=null" >
AND create_time &lt;= #{endDate,jdbcType=TIMESTAMP}
</if>
<if test="editBeginDate !=null" >
AND edit_time &gt;= #{editBeginDate,jdbcType=TIMESTAMP}
</if>
<if test="editEndDate !=null" >
AND edit_time &lt;= #{editEndDate,jdbcType=TIMESTAMP}
</if>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
@@ -79,6 +85,42 @@
</otherwise>
</choose>
</select>
<!-- 查询顶层分页列表 (!=)-->
<select id="findTopDictListN" resultMap="dictResultMap" parameterType="com.nis.domain.basics.SysDictInfo">
SELECT * FROM sys_dict_info WHERE is_valid=1 AND parent_id = 0
<if test="itemValue != null and itemValue != '' " >
AND item_value like '%${itemValue}%'
</if>
<if test="itemCode != null and itemCode != '' " >
AND item_code like '%${itemCode}%'
</if>
<if test="itemType != null and itemType != '' " >
AND item_type != #{itemType}
</if>
<if test="beginDate !=null" >
AND create_time &gt;= #{beginDate,jdbcType=TIMESTAMP}
</if>
<if test="endDate !=null" >
AND create_time &lt;= #{endDate,jdbcType=TIMESTAMP}
</if>
<if test="editBeginDate !=null" >
AND edit_time &gt;= #{editBeginDate,jdbcType=TIMESTAMP}
</if>
<if test="editEndDate !=null" >
AND edit_time &lt;= #{editEndDate,jdbcType=TIMESTAMP}
</if>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
<otherwise>
ORDER BY create_time desc
</otherwise>
</choose>
</select>
<!-- 查出所有 -->
@@ -109,6 +151,12 @@
<if test="endDate !=null" >
AND s.create_time &lt;= #{endDate,jdbcType=TIMESTAMP}
</if>
<if test="editBeginDate !=null" >
AND edit_time &gt;= #{editBeginDate,jdbcType=TIMESTAMP}
</if>
<if test="editEndDate !=null" >
AND edit_time &lt;= #{editEndDate,jdbcType=TIMESTAMP}
</if>
AND s.parent_id not in (
SELECT s2.sys_dict_id FROM sys_dict_info s2 WHERE s2.is_valid=1
<if test="itemCode != null and itemCode != '' " >
@@ -126,6 +174,72 @@
<if test="endDate !=null" >
AND s2.create_time &lt;= #{endDate,jdbcType=TIMESTAMP}
</if>
<if test="editBeginDate !=null" >
AND edit_time &gt;= #{editBeginDate,jdbcType=TIMESTAMP}
</if>
<if test="editEndDate !=null" >
AND edit_time &lt;= #{editEndDate,jdbcType=TIMESTAMP}
</if>
)
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY s.${page.orderBy}
</when>
<otherwise>
ORDER BY s.create_time desc
</otherwise>
</choose>
</select>
<!-- 条件查询顶层分页(!=) -->
<select id="findDictTopSearchListN" resultMap="dictResultMap" parameterType="com.nis.domain.basics.SysDictInfo">
SELECT * FROM sys_dict_info s WHERE s.is_valid=1
<if test="itemCode != null and itemCode != '' " >
AND s.item_code like '%${itemCode}%'
</if>
<if test="itemValue!= null and itemValue != '' " >
AND s.item_value like '%${itemValue}%'
</if>
<if test="itemType != null and itemType != '' " >
AND s.item_type != ${itemType}
</if>
<if test="beginDate !=null" >
AND s.create_time &gt;= #{beginDate,jdbcType=TIMESTAMP}
</if>
<if test="endDate !=null" >
AND s.create_time &lt;= #{endDate,jdbcType=TIMESTAMP}
</if>
<if test="editBeginDate !=null" >
AND edit_time &gt;= #{editBeginDate,jdbcType=TIMESTAMP}
</if>
<if test="editEndDate !=null" >
AND edit_time &lt;= #{editEndDate,jdbcType=TIMESTAMP}
</if>
AND s.parent_id not in (
SELECT s2.sys_dict_id FROM sys_dict_info s2 WHERE s2.is_valid=1
<if test="itemCode != null and itemCode != '' " >
AND s2.item_code like '%${itemCode}%'
</if>
<if test="itemValue!= null and itemValue != '' " >
AND s2.item_value like '%${itemValue}%'
</if>
<if test="itemType != null and itemType != '' " >
AND s2.item_type != ${itemType}
</if>
<if test="beginDate !=null" >
AND s2.create_time &gt;= #{beginDate,jdbcType=TIMESTAMP}
</if>
<if test="endDate !=null" >
AND s2.create_time &lt;= #{endDate,jdbcType=TIMESTAMP}
</if>
<if test="editBeginDate !=null" >
AND edit_time &gt;= #{editBeginDate,jdbcType=TIMESTAMP}
</if>
<if test="editEndDate !=null" >
AND edit_time &lt;= #{editEndDate,jdbcType=TIMESTAMP}
</if>
)
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
@@ -157,6 +271,38 @@
<if test="endDate !=null" >
AND create_time &lt;= #{endDate,jdbcType=TIMESTAMP}
</if>
<if test="editBeginDate !=null" >
AND edit_time &gt;= #{editBeginDate,jdbcType=TIMESTAMP}
</if>
<if test="editEndDate !=null" >
AND edit_time &lt;= #{editEndDate,jdbcType=TIMESTAMP}
</if>
</select>
<!-- 条件查询所有(!=) -->
<select id="findAllDictSearchListN" resultMap="dictResultMap" parameterType="com.nis.domain.basics.SysDictInfo">
SELECT * FROM sys_dict_info WHERE is_valid=1
<if test="itemType != null and itemType != '' " >
AND item_type = ${itemType}
</if>
<if test="itemCode != null and itemCode != '' " >
AND item_code like '%${itemCode}%'
</if>
<if test="itemValue!= null and itemValue != '' " >
AND item_value like '%${itemValue}%'
</if>
<if test="beginDate !=null" >
AND create_time &gt;= #{beginDate,jdbcType=TIMESTAMP}
</if>
<if test="endDate !=null" >
AND create_time &lt;= #{endDate,jdbcType=TIMESTAMP}
</if>
<if test="editBeginDate !=null" >
AND edit_time &gt;= #{editBeginDate,jdbcType=TIMESTAMP}
</if>
<if test="editEndDate !=null" >
AND edit_time &lt;= #{editEndDate,jdbcType=TIMESTAMP}
</if>
</select>
<!-- 根据主键查询字典详细信息 -->

View File

@@ -354,17 +354,29 @@ public class ServiceDictInfoService extends BaseService{
* @param serviceDictInfo
*/
@Transactional(readOnly = false)
public void deleteDict(ServiceDictInfo serviceDictInfo) {
List<ServiceDictInfo> list = Lists.newArrayList();
//找出所有下级
//查出所有节点
ServiceDictInfo.sortList(list, serviceDictInfoDao.findAllDictList(new ServiceDictInfo()), serviceDictInfo.getServiceDictId(), true);
list.add(serviceDictInfo);
for(ServiceDictInfo se:list){
se.setIsValid(0);
serviceDictInfoDao.delete(se);
public void deleteDict(String mulitId) {
String[] ids = mulitId.split(",");
for(String id:ids){
if (!id.equals("")) {
ServiceDictInfo serviceDictInfo = serviceDictInfoDao.getDictById(Integer.valueOf(id));
List<ServiceDictInfo> list = Lists.newArrayList();
//找出所有下级
//查出所有节点
if(serviceDictInfo!=null){
ServiceDictInfo.sortList(list, serviceDictInfoDao.findAllDictList(new ServiceDictInfo()), serviceDictInfo.getServiceDictId(), true);
list.add(serviceDictInfo);
for(ServiceDictInfo se:list){
se.setIsValid(0);
serviceDictInfoDao.delete(se);
}
}
}
}
}
/**

View File

@@ -5,6 +5,7 @@ import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.google.common.collect.Lists;
import com.nis.domain.Page;
@@ -28,10 +29,10 @@ public class SysDictInfoService extends BaseService{
* 查询顶层分页(无条件查询)
* @param page
* @param sysDictInfo
* @param intArr
* @param itType
* @return
*/
public Page<SysDictInfo> findTopDictList(Page<SysDictInfo> page, SysDictInfo sysDictInfo, Integer[] intArr) {
public Page<SysDictInfo> findTopDictList(Page<SysDictInfo> page, SysDictInfo sysDictInfo, Integer[] itType) {
// 设置分页参数
sysDictInfo.setPage(page);
List<SysDictInfo> parentList = Lists.newArrayList();
@@ -41,8 +42,28 @@ public class SysDictInfoService extends BaseService{
tempType = sysDictInfo.getItemType();
}
//查出顶层分页查询
parentList = sysDictInfoDao.findTopDictList(sysDictInfo);
if(itType.length==1){
sysDictInfo.setItemType(itType[0]);
parentList = sysDictInfoDao.findTopDictList(sysDictInfo);
}
if(itType.length==2){
if(tempType!=0){
parentList = sysDictInfoDao.findTopDictList(sysDictInfo);
}else{
List<Integer> tempList = Lists.newArrayList();
tempList.add(1);tempList.add(2);tempList.add(3);
//Map<String,String> map = DictUtils.getDictOption("SERVICE_DICT_ITM_TYPE");
if(tempList.contains(itType[0])){
tempList.remove(itType[0]);
}
if(tempList.contains(itType[1])){
tempList.remove(itType[1]);
}
sysDictInfo.setItemType(tempList.get(0));
parentList = sysDictInfoDao.findTopDictListN(sysDictInfo);
}
}
page.setList(parentList);
return page;
}
@@ -63,8 +84,36 @@ public class SysDictInfoService extends BaseService{
public List<SysDictInfo> findAllDictSearchList(SysDictInfo sysDictInfo, Integer[] itType) {
List<SysDictInfo> list = Lists.newArrayList();
list = sysDictInfoDao.findAllDictSearchList(sysDictInfo);
Integer tempType = 0;
if(sysDictInfo.getItemType()!=null){
tempType = sysDictInfo.getItemType();
}
if(itType.length==1){
sysDictInfo.setItemType(itType[0]);
list = sysDictInfoDao.findAllDictSearchList(sysDictInfo);
}
if(itType.length==2){
if(tempType!=0){
list = sysDictInfoDao.findAllDictSearchList(sysDictInfo);
}else{
List<Integer> tempIntegerList = Lists.newArrayList();
tempIntegerList.add(1);tempIntegerList.add(2);tempIntegerList.add(3);
//Map<String,String> map = DictUtils.getDictOption("SERVICE_DICT_ITM_TYPE");
if(tempIntegerList.contains(itType[0])){
tempIntegerList.remove(itType[0]);
}
if(tempIntegerList.contains(itType[1])){
tempIntegerList.remove(itType[1]);
}
sysDictInfo.setItemType(tempIntegerList.get(0));
list = sysDictInfoDao.findAllDictSearchListN(sysDictInfo);
}
}
if(tempType!=0){
sysDictInfo.setItemType(tempType);
}else{
sysDictInfo.setItemType(null);
}
return list;
}
/**
@@ -81,6 +130,31 @@ public class SysDictInfoService extends BaseService{
List<SysDictInfo> allList = Lists.newArrayList();
List<SysDictInfo> list = Lists.newArrayList();
Integer tempType = 0;
if(sysDictInfo.getItemType()!=null){
tempType = sysDictInfo.getItemType();
}
if(itType.length==1){
sysDictInfo.setItemType(itType[0]);
allList = sysDictInfoDao.findDictTopSearchList(sysDictInfo);
}
if(itType.length==2){
if(tempType!=0){
allList = sysDictInfoDao.findDictTopSearchList(sysDictInfo);
}else{
List<Integer> tempIntegerList = Lists.newArrayList();
tempIntegerList.add(1);tempIntegerList.add(2);tempIntegerList.add(3);
//Map<String,String> map = DictUtils.getDictOption("SERVICE_DICT_ITM_TYPE");
if(tempIntegerList.contains(itType[0])){
tempIntegerList.remove(itType[0]);
}
if(tempIntegerList.contains(itType[1])){
tempIntegerList.remove(itType[1]);
}
sysDictInfo.setItemType(tempIntegerList.get(0));
allList = sysDictInfoDao.findDictTopSearchListN(sysDictInfo);
}
}
allList = sysDictInfoDao.findDictTopSearchList(sysDictInfo);
SysDictInfo tempSe = new SysDictInfo();
tempSe.setSysDictId(0);
@@ -176,15 +250,26 @@ public class SysDictInfoService extends BaseService{
* 删除
* @param sysDictInfo
*/
public void deleteDict(SysDictInfo sysDictInfo) {
List<SysDictInfo> list = Lists.newArrayList();
SysDictInfo.sortList(list, sysDictInfoDao.findAllDictList(new SysDictInfo()), sysDictInfo.getSysDictId(), true);
list.add(sysDictInfo);
for(SysDictInfo se:list){
se.setIsValid(0);
sysDictInfoDao.delete(sysDictInfo);
@Transactional(readOnly = false)
public void deleteDict(String mulitId) {
String[] ids = mulitId.split(",");
for(String id:ids){
if (!id.equals("")) {
List<SysDictInfo> list = Lists.newArrayList();
SysDictInfo sysDictInfo = sysDictInfoDao.getDictById(Integer.valueOf(id));
if(sysDictInfo!=null){
SysDictInfo.sortList(list, sysDictInfoDao.findAllDictList(new SysDictInfo()), sysDictInfo.getSysDictId(), true);
list.add(sysDictInfo);
for(SysDictInfo se:list){
se.setIsValid(0);
sysDictInfoDao.delete(se);
}
}
}
}
}
/**
* 查询该类型所有的非叶子配置

View File

@@ -1,11 +1,11 @@
#\u7ba1\u7406\u57fa\u7840\u8def\u5f84, \u9700\u540c\u6b65\u4fee\u6539\uff1aweb.xml
adminPath=/nis
#Restful\u670D\u52A1\u9ED8\u8BA4\u8DEF\u5F84<EFBFBD>
#Restful\u670d\u52a1\u9ed8\u8ba4\u8def\u5f84\ufffd
servicePath=/service
#\u5206\u9875\u914d\u7f6e
page.pageSize=30
page.pageSize=5
#\u5206\u9875\u914d\u7f6e
page.count=0
@@ -37,7 +37,7 @@ notAllowRefreshIndex=false
#\u524d\u7aef\u57fa\u7840\u8def\u5f84
frontPath=/f
#\u662F\u5426\u8FD0\u884C\u591A\u8D26\u6237\u540C\u65F6\u767B\u5F55?
#\u662f\u5426\u8fd0\u884c\u591a\u8d26\u6237\u540c\u65f6\u767b\u5f55?
user.multiAccountLogin=true
#\u7855\u6b63\u7ec4\u4ef6\u662f\u5426\u4f7f\u7528\u7f13\u5b58
@@ -65,7 +65,7 @@ userfiles.basedir=upload
#===== webservice settings ======#
#============================#
#ESB<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͳһ<EFBFBD><EFBFBD>ַ
#ESB\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u1e69\ufffd\ufffd\u0373\u04bb\ufffd\ufffd\u05b7
webservice.esb.endpoint=http://10.55.0.197:7879/TongServiceProxy_doprocess/services/WebService1/
#webservice RID
webservice.rid=XFBL
@@ -88,47 +88,47 @@ webservice.data.dict.code.sid=s_2042_0660BD17-35E4-4482-AA3A-556F2C024902
#webservice request timeout for seconds
webservice.request.timeout=30
#<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>URL
#\ufffd\ufffd\ufffd\ufffd\ufffdURL
webservice.jg.service.url=http://10.55.0.155:8080/jgService
#<EFBFBD>û<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>URL
#\ufffd\u00fb\ufffd\ufffd\ufffd\ufffd\ufffdURL
webservice.yh.service.url=http://10.55.0.155:8080/ryService
#<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD>URL
#\ufffd\ufffd\ufffd\ufffd\u05b5\ufffdURL
webservice.data.dict.service.url=http://10.55.0.155:8080/sjzdService
#<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>URL
#\ufffd\ufffd\ufffd\ufffd\u05b5\ufffd\ufffd\ufffd\ufffdURL
webservice.data.dict.bm.url=http://10.55.0.155:8080/sjzdbmService
#<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>URL
#\ufffd\ufffd\ufffd\ufffd\ufffd\ufffdURL
webservice.data.code.url=http://10.55.0.155:8080/sjmbService
#webservice<EFBFBD>ӿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ÿҳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#webservice\ufffd\u04ff\ufffd\ufffd\ufffd\ufffd\u00ff\u04b3\ufffd\ufffd\ufffd\ufffd
webservice.data.pagesize = 2000
#webservice<EFBFBD><EFBFBD>ǰĬ<EFBFBD><EFBFBD>ҳ
#webservice\ufffd\ufffd\u01f0\u012c\ufffd\ufffd\u04b3
webservice.data.currentpage = 1
#webservice <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#webservice \ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd
webservice.jgmb.name=CK_T_JC_RY
#webservice <EFBFBD>û<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#webservice \ufffd\u00fb\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd
webservice.yhmb.name=CK_T_YH_RY
#webservice<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ȫ<><C8AB>
#webservice\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd \u022b\ufffd\ufffd
webservice.method.name.ql=getData
# webservice<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
# webservice\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd \ufffd\ufffd\ufffd\ufffd
webservice.method.name.zl=getDataZL
# redis配置文件
#redis 各个分片的 IP端口
# redis\u914d\u7f6e\u6587\u4ef6
#redis \u5404\u4e2a\u5206\u7247\u7684 IP\u7aef\u53e3
redis.cluster.host_port=10.0.6.32:6379,10.0.6.32:6380,10.0.6.32:6381,10.0.6.33:6379,10.0.6.33:6380,10.0.6.33:6381
#中心现场redis地址和端口
#\u4e2d\u5fc3\u73b0\u573aredis\u5730\u5740\u548c\u7aef\u53e3
#redis.cluster.host_port=10.174.196.33:6379,10.174.196.33:6380,10.174.196.33:6381,10.174.196.34:6379,10.174.196.34:6380,10.174.196.34:6381,10.174.196.35:6379,10.174.196.35:6380,10.174.196.35:6381,10.174.196.36:6379,10.174.196.36:6380,10.174.196.36:6381,10.174.196.37:6379,10.174.196.37:6380,10.174.196.37:6381,10.174.196.38:6379,10.174.196.38:6380,10.174.196.38:6381,10.174.196.39:6379,10.174.196.39:6380,10.174.196.39:6381
redis.cluster.connectiontimeout=5000
redis.cluster.sotimeout=5000
redis.cluster.maxattempts=3
#redis连接池相关配置
#redis\u8fde\u63a5\u6c60\u76f8\u5173\u914d\u7f6e
redis.pool.maxtotal=500
@@ -141,31 +141,31 @@ redis.pool.testonreturn=false
redis.pool.testwhileidle=true
redis.pool.timebetweenevictionrunsmillis=60000
redis.pool.minevictableidletimemillis=60000
#oracle数据redis存储时间(秒为单位 默认3分钟即180s)
#oracle\u6570\u636eredis\u5b58\u50a8\u65f6\u95f4(\u79d2\u4e3a\u5355\u4f4d \u9ed8\u8ba43\u5206\u949f\u5373180s)
oracleExpire=180
#hive数据中心数据redis存储时间(秒为单位 默认20分钟即1200s)
#hive\u6570\u636e\u4e2d\u5fc3\u6570\u636eredis\u5b58\u50a8\u65f6\u95f4(\u79d2\u4e3a\u5355\u4f4d \u9ed8\u8ba420\u5206\u949f\u53731200s)
hiveExpire=300
#redis开关
#redis\u5f00\u5173
isOpenRedis=false
#是否将数据中心的日志加入到redis中
#\u662f\u5426\u5c06\u6570\u636e\u4e2d\u5fc3\u7684\u65e5\u5fd7\u52a0\u5165\u5230redis\u4e2d
dataCenterOpenRedis=true
#跨域问题允许 的url Access-Control-Allow-Origin *允许所有设置成其他url只允许该url.不能设置多个url
#\u8de8\u57df\u95ee\u9898\u5141\u8bb8 \u7684url Access-Control-Allow-Origin *\u5141\u8bb8\u6240\u6709\uff0c\u8bbe\u7f6e\u6210\u5176\u4ed6url\u53ea\u5141\u8bb8\u8be5url.\u4e0d\u80fd\u8bbe\u7f6e\u591a\u4e2aurl
target_url=*
#跨域问题 3600表明在3600秒内不需要再发送预请求可以缓存该结果
#\u8de8\u57df\u95ee\u9898 3600\uff1a\u8868\u660e\u57283600\u79d2\u5185\uff0c\u4e0d\u9700\u8981\u518d\u53d1\u9001\u9884\u8bf7\u6c42\uff0c\u53ef\u4ee5\u7f13\u5b58\u8be5\u7ed3\u679c
ACCESS_CONTROL_MAX_AGE=3600
##########HTTPCLIENT POOL START###################
#从连接池中获取到连接的最长时间
#\u4ece\u8fde\u63a5\u6c60\u4e2d\u83b7\u53d6\u5230\u8fde\u63a5\u7684\u6700\u957f\u65f6\u95f4
http.request.connectionRequestTimeout=500
#5000
http.request.connectTimeout=5000
#数据传输的最长时间
#\u6570\u636e\u4f20\u8f93\u7684\u6700\u957f\u65f6\u95f4
http.request.socketTimeout=30000
#提交请求前测试连接是否可用
#\u63d0\u4ea4\u8bf7\u6c42\u524d\u6d4b\u8bd5\u8fde\u63a5\u662f\u5426\u53ef\u7528
http.request.staleConnectionCheckEnabled=true
#设置连接总数
#\u8bbe\u7f6e\u8fde\u63a5\u603b\u6570
http.pool.maxTotal=200
#设置每个地址的并发数
#\u8bbe\u7f6e\u6bcf\u4e2a\u5730\u5740\u7684\u5e76\u53d1\u6570
http.pool.defaultMaxPerRoute=100
##########HTTPCLIENT POOL END###################
search.dateformat=yyyy-MM-dd HH:mm:ss
@@ -176,45 +176,45 @@ search.eshostandport_C=10.0.6.115:9200
#search.eshostandport=10.174.196.135:9200
#日志是否从hive中查询
#\u65e5\u5fd7\u662f\u5426\u4ecehive\u4e2d\u67e5\u8be2
selFromHive=false
#是否获取数据中心查询记录的总条数
#\u662f\u5426\u83b7\u53d6\u6570\u636e\u4e2d\u5fc3\u67e5\u8be2\u8bb0\u5f55\u7684\u603b\u6761\u6570
isGetHiveCount=false
#每次获取数据中心多少条数据,咱们在对获取的数据进行分页处理
#\u6bcf\u6b21\u83b7\u53d6\u6570\u636e\u4e2d\u5fc3\u591a\u5c11\u6761\u6570\u636e,\u54b1\u4eec\u5728\u5bf9\u83b7\u53d6\u7684\u6570\u636e\u8fdb\u884c\u5206\u9875\u5904\u7406
everyGetHiveDataNum=10000
#oracle数据库有问题不从oracle查询数据,所有日志数据均从数据中心查询
#oracle\u6570\u636e\u5e93\u6709\u95ee\u9898\u4e0d\u4eceoracle\u67e5\u8be2\u6570\u636e,\u6240\u6709\u65e5\u5fd7\u6570\u636e\u5747\u4ece\u6570\u636e\u4e2d\u5fc3\u67e5\u8be2
onlySelFromHive=false
#\u662F\u5426\u67E5\u8BE2\u795E\u901A\u6570\u636E\u5E93
#\u662f\u5426\u67e5\u8be2\u795e\u901a\u6570\u636e\u5e93
isSelectCluster=true
#用户查询日志超过多少小时去数据中心查询
#\u7528\u6237\u67e5\u8be2\u65e5\u5fd7\u8d85\u8fc7\u591a\u5c11\u5c0f\u65f6\u53bb\u6570\u636e\u4e2d\u5fc3\u67e5\u8be2
dataCenterTime=48
#是否开启基础验证
#\u662f\u5426\u5f00\u542f\u57fa\u7840\u9a8c\u8bc1
baseValidate=true
#是否开启业务验证
#\u662f\u5426\u5f00\u542f\u4e1a\u52a1\u9a8c\u8bc1
serviceValidate=true
#\u65E5\u5FD7\u5B58\u50A8\u672C\u5730\u65F6\u95F4(\u5355\u4F4D\u5C0F\u65F6)
#\u65e5\u5fd7\u5b58\u50a8\u672c\u5730\u65f6\u95f4(\u5355\u4f4d\u5c0f\u65f6)
logLocalTime=48
#\u5B9E\u65F6\u7EDF\u8BA1\u9ED8\u8BA4\u67E5\u8BE2\u672C\u5730\u4E00\u4E2A\u5C0F\u65F6\u7684\u6570\u636E(\u5355\u4F4D\uFF1A\u5C0F\u65F6)
#\u5b9e\u65f6\u7edf\u8ba1\u9ed8\u8ba4\u67e5\u8be2\u672c\u5730\u4e00\u4e2a\u5c0f\u65f6\u7684\u6570\u636e(\u5355\u4f4d\uff1a\u5c0f\u65f6)
reportLocalTime=1
#\u795E\u901A\u6570\u636E\u5E93\u6700\u65E9\u65E5\u5FD7\u65F6\u95F4(A\u7248\u6BEB\u79D2)
#\u795e\u901a\u6570\u636e\u5e93\u6700\u65e9\u65e5\u5fd7\u65f6\u95f4(A\u7248\u6beb\u79d2)
#2017-08-13 10:07:25
clusterAStartTime=1503504000725
#\u795E\u901A\u6570\u636E\u5E93\u6700\u65E9\u7ED3\u675F\u65F6\u95F4(B\u7248\u6BEB\u79D2)
#\u795e\u901a\u6570\u636e\u5e93\u6700\u65e9\u7ed3\u675f\u65f6\u95f4(B\u7248\u6beb\u79d2)
#2017-08-13 10:07:25
clusterBStartTime=1503504000725
############################################################################################################################################
#设置配置是否入库
#\u8bbe\u7f6e\u914d\u7f6e\u662f\u5426\u5165\u5e93
############################################################################################################################################
isCommit=true
############################################################################################################################################
@@ -229,9 +229,9 @@ isUseES=false
#数据中心A版数据库名称,程序中每次查询时使用的数据库名称 use dbA
#\u6570\u636e\u4e2d\u5fc3A\u7248\u6570\u636e\u5e93\u540d\u79f0,\u7a0b\u5e8f\u4e2d\u6bcf\u6b21\u67e5\u8be2\u65f6\u4f7f\u7528\u7684\u6570\u636e\u5e93\u540d\u79f0 use dbA
jdbc.hive.AName=xa_dfbhit_hive
#数据中心B版数据库名称
#\u6570\u636e\u4e2d\u5fc3B\u7248\u6570\u636e\u5e93\u540d\u79f0
jdbc.hive.BName=xa_z2_mesalog_hive
maxPageSize=100000

View File

@@ -25,8 +25,8 @@
<%@ attribute name="selectDepartment" type="java.lang.String" required="false" description="不允许选择部门,自办部门,转办部门"%>
<%@ attribute name="showParentName" type="java.lang.String" required="false" description="显示父类名称"%>
<div class="input-append">
<input id="${id}Id" name="${name}" class="${cssClass}" type="hidden" value="${value}" />
<input id="${id}Name" name="${labelName}" ${allowInput?'':'readonly="readonly"'} type="text" value="${labelValue}" data-msg-required="${dataMsgRequired}"
<input id="${id}Id" name="${name}" class="${cssClass} singleClass" type="hidden" value="${value}" />
<input id="${id}Name" name="${labelName}" ${allowInput?'':'readonly="readonly"'} type="text" value="${labelValue}" data-msg-required="${dataMsgRequired}" placeholder="${value}"
class="${cssClass}" style="${cssStyle}"/><a id="${id}Button" href="javascript:" class="btn ${disabled} ${hideBtn ? 'hide' : ''}" style="${smallBtn?'padding:4px 2px;':''}">&nbsp;<i class="icon-search"></i>&nbsp;</a>&nbsp;&nbsp;
</div>
<script type="text/javascript">

View File

@@ -311,4 +311,25 @@
<example>${fns:getSysDictInfoById(id)}</example>
</function>
<!-- 计算序号 -->
<function>
<description>计算序号</description>
<name>getNumberResult</name>
<function-class>com.nis.util.ConfigDictUtils</function-class>
<function-signature>java.lang.String getNumberResult(java.lang.Integer,java.lang.Integer,java.lang.Integer)</function-signature>
<example>${fns:getNumberResult(integer1,integer2,integer3)}</example>
</function>
<!-- 根据数据类型编码取出数据类型 -->
<function>
<description>计算序号</description>
<name>getItemTypeByNo</name>
<function-class>com.nis.util.ConfigDictUtils</function-class>
<function-signature>java.lang.String getItemTypeByNo(java.lang.String,java.util.List)</function-signature>
<example>${fns:getItemTypeByNo(str1,list)}</example>
</function>
</taglib>

View File

@@ -29,92 +29,97 @@
$(document).ready(function() {
//层级校验
jQuery.validator.addMethod("isLevelNoSure",function(value,element){
var flag2=false;
$.ajax({
//var flagIsLevelNoSure = true;
$.ajax({
type:'post',
async:true,
cache:false,
url:'${ctx}/basics/serviceDictInfo/isLevelTotalSure',
data:{parentId:$("#serviceDictInfoId").val(),currentId:'${serviceDictInfo.serviceDictId}'},
data:{parentId:$(".singleClass").val(),currentId:'${serviceDictInfo.serviceDictId}'},
success:function(data){
flag2=data;
/* if(data){
$("#uploadLevel").css("display","none");
}else{
$("#uploadLevel").css("display","block");
} */
/* flagIsLevelNoSure=data;
alert(flagIsLevelNoSure);
return flagIsLevelNoSure; */
flagIsLevelNoSure = data;
return flagIsLevelNoSure;
}
});
return flag2
});
/* alert(flagIsLevelNoSure);
return flagIsLevelNoSure; */
},"选择此配置上下层级数将超过四级");
//类型选择与上级是否冲突
jQuery.validator.addMethod("typeSame",function(value,element){
var flag=false;
var flagTypeSame=false;
$.ajax({
type:'post',
async:false,
url:'${ctx}/basics/serviceDictInfo/ajaxType',
data:{parent:$("#serviceDictInfoId").val(),child:$("#itemType option:selected").val()},
data:{parent:$("#serviceDictInfoId").val(),child:$("#itemTypeCheckChild option:selected").val()},
success:function(data){
flag=data;
flagTypeSame=data;
}
});
return flag;
return flagTypeSame;
},"请选择正确的数据类型");
//校验更改数据类型后校验数据类型是否与下级冲突
jQuery.validator.addMethod("typeChild",function(value,element){
var flag=false;
var flagTypeChild=false;
$.ajax({
type:'post',
async:false,
url:'${ctx}/basics/serviceDictInfo/ajaxChildrenType',
data:{parent:"${serviceDictInfo.serviceDictId}",newItemType:$("#itemType option:selected").val()},
data:{parent:"${serviceDictInfo.serviceDictId}",newItemType:$("#itemTypeCheckChild option:selected").val()},
success:function(data){
flag=data;
flagTypeChild=data;
}
});
return flag;
return flagTypeChild;
},"该配置包含下级配置,数据类型更改后上下级类型不一致");
//校验叶子节点有下级不得更改为叶子节点
jQuery.validator.addMethod("leafChange",function(value,element){
var flag=false;
var flagLeafChange=false;
$.ajax({
type:'post',
async:false,
url:'${ctx}/basics/serviceDictInfo/ajaxLeafChange',
data:{parent:"${serviceDictInfo.serviceDictId}",newIsLeaf:$("#isLeaf option:selected").val()},
success:function(data){
flag=data;
flagLeafChange=data;
}
});
return flag;
return flagLeafChange;
},"该配置包含下级配置,不得改为叶子节点");
//校验叶子节点无上级不得选为叶子节点
jQuery.validator.addMethod("leafHasTree",function(value,element){
var flag=false;
var flagLeafHasTree=false;
$.ajax({
type:'post',
async:false,
url:'${ctx}/basics/serviceDictInfo/ajaxLeafHasTree',
data:{serviceDictId:"${serviceDictInfo.serviceDictId}",newIsLeaf:$("#isLeaf option:selected").val(),parentId:$("#serviceDictInfoId").val()},
success:function(data){
flag=data;
flagLeafHasTree=data;
}
});
return flag;
return flagLeafHasTree;
},"该配置上级为根节点,不得设为叶子节点");
$("#name").focus();
$("#inputForm").validate({
//ignore:[],
//需验证 item_code item_value
rules: {
'parent.itemValue':{
remote:'${ctx}/basics/serviceDictInfo/isLevelTotalSure?parentId='+$("#serviceDictInfoId").val()+'&currentId=${serviceDictInfo.serviceDictId}'
},
/* 'jafrkwajrow':{
isLevelNoSure:true
//remote:'${ctx}/basics/serviceDictInfo/isLevelTotalSure?parentId='+$(".singleClass").val()+'&currentId=${serviceDictInfo.serviceDictId}'
}, */
'itemCode':{
//isLevelNoSure:true,
required:true,
remote:'${ctx}/basics/serviceDictInfo/isItemCodeRepeat?oldItemCode=${serviceDictInfo.itemCode}'
},
@@ -132,10 +137,12 @@
},
messages: {
'parent.itemValue':{
remote:"选择此配置上下层级数将超过四级"
},
/* 'jafrkwajrow':{
//remote:"选择此配置上下层级数将超过四级"
isLevelNoSure:"选择此配置上下层级数将超过四级"
}, */
'itemCode':{
//isLevelNoSure:"选择此配置上下层级数将超过四级",
required:'请填写配置编码',
remote:'该配置编码已存在'
},
@@ -213,13 +220,13 @@
<div class="col-md-4">
<sys:treeselect id="serviceDictInfo" name="parent.serviceDictId" value="${serviceDictInfo.parent.serviceDictId}" labelName="parent.itemValue" labelValue="${serviceDictInfo.parent.itemValue eq '根节点'?'根节点':fns:getServiceDictInfoById(serviceDictInfo.parent.serviceDictId).itemValue}"
title="菜单" url="/basics/serviceDictInfo/treeData?itType=${itType}" extId="${serviceDictInfo.serviceDictId}" cssClass="required form-control"/>
<!-- <label id="uploadLevel" style="display:none;" class="error" for="uploadLevel">选择此配置上下层级数将超过四级</label> -->
<input style="width:50px;height:20px;" name="jafrkwajrow" />
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label radio-lable"><font color="red">*</font> <spring:message code="item_type"/>:</label>
<div class="col-md-4">
<select id="itemType" name="itemType" class="form-control">
<select id="itemTypeCheckChild" name="itemType" class="form-control">
<c:forEach items="${fns:getDictList('SERVICE_DICT_ITM_TYPE')}" var="dict">
<c:forEach items="${intArr}" var="itTemp">
<c:if test="${dict.itemCode eq itTemp}">

View File

@@ -8,26 +8,68 @@
<script src="${ctxStatic}/global/plugins/treeTable/jquery.treeTable.min.js" type="text/javascript"></script>
<script src="${ctxStatic}/pages/scripts/dict.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#treeTable").treeTable({expandLevel : 3}).show();
function reset(){
$("#searchForm").reset();
}
/*
系统通用方法根据参数来决定处理的url和参数
*/
function cmd(){
var url=arguments[0];
var mulitId="";
jQuery("#treeTable").find(":checkbox:checked[name='check']").each(function(){
if(jQuery(this).val()!=""){
mulitId+=jQuery(this).val()+",";
}
});
//查询
function page(n,s){
$("#intype").attr("name",$("#seltype").val());
$("#pageNo").val(n);
$("#pageSize").val(s);
$("#searchForm").attr("action","${ctx}/basics/serviceDictInfo/searchList?itType=${itType}");
$("#searchForm").submit();
return false;
}
function page2(n,s){
$("#intype").attr("name",$("#seltype").val());
$("#pageNo").val(n);
$("#pageSize").val(s);
$("#searchForm").attr("action","${ctx}/basics/serviceDictInfo/searchList?itType=${itType}");
$("#searchForm").submit();
return false;
}
if(mulitId!=""){
confirmx('您确认要执行该操作?', url+"&mulitId="+mulitId);
}else{
alert("至少选择一条数据记录");
}
}
//查询
function page(n,s){
//$("#intype").attr("name",$("#seltype").val());
$("#pageNo").val(n);
$("#pageSize").val(s);
$("#searchForm").attr("action","${ctx}/basics/serviceDictInfo/searchList?itType=${itType}");
$("#searchForm").submit();
return false;
}
function page2(n,s){
//$("#intype").attr("name",$("#seltype").val());
$("#pageNo").val(n);
$("#pageSize").val(s);
$("#searchForm").attr("action","${ctx}/basics/serviceDictInfo/searchList?itType=${itType}");
$("#searchForm").submit();
return false;
}
$(document).ready(function() {
//设定selected设定name 设定value
$("#seltype").find("option[value=${searchType==null?11:searchType}]").attr("selected",true);
$("#intype").attr("name",$("#seltype").find("option:selected").val());
$("#intype").val(${searchContent});
//筛选功能初始化
filterActionInit();
$("#isAudit").change(function(){
page();
});
$("#seltype").change(function(){
$("#intype").val("");
$("#intype").attr("placeholder","请输入"+$(this).find("option:selected").text());
$("#intype").attr("name",$(this).find("option:selected").val());
});
$("#treeTable").treeTable({expandLevel : 3}).show();
});
</script>
<style type="text/css">
.dropdown-menu {
@@ -36,63 +78,176 @@
</style>
</head>
<body>
<div class="page-content">
<div class="theme-panel hidden-xs hidden-sm">
<button type="button" class="btn btn-default" onclick="location='${ctx}/basics/serviceDictInfo/list?itType=${itType}'"><spring:message code="refresh"></spring:message></button>
<button type="button" class="btn btn-primary"
onClick="javascript:window.location='${ctx}/basics/serviceDictInfo/form?itType=${itType}'">新增配置</button>
onClick="javascript:window.location='${ctx}/basics/serviceDictInfo/form?itType=${itType}'">
<i class="fa fa-plus"></i>
<spring:message code="add"></spring:message>配置</button>
</div>
<h3 class="page-title">
配置管理
</h3>
<h3 class="page-title">
${fns:getItemTypeByNo("SERVICE_DICT_ITM_TYPE",intArr)}
<small><spring:message code="date_list"/></small>
</h3>
<div class="row">
<div class="col-md-12">
<div class="portlet box blue">
<div class="portlet-title">
<div class="caption">
<i class="fa fa-cogs"></i>搜索结果
</div>
</div>
<div class="portlet-body">
<div class="row" >
<div class="col-md-12">
<sys:message content="${message}"/>
<form:form id="searchForm" modelAttribute="serviceDictInfo" action="${ctx}/basics/serviceDictInfo/searchList?itType=${itType}" method="post" class="form-search">
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
<div class="col-md-12">
<label class="search-lable">配置编码:</label><input id="itemCode" name="itemCode" type="text" maxlength="25" class="input-medium" value="${serviceDictInfo.itemCode}"/>
<label class="search-lable">配置内容:</label><input id="itemValue" name="itemValue" type="text" maxlength="25" class="input-medium" value="${serviceDictInfo.itemValue}"/>
<label class="search-lable itemType">数据类型:</label>
<select id="itemType" name="itemType" >
<option value="" selected="selected">-请选择-</option>
<c:forEach items="${fns:getDictList('SERVICE_DICT_ITM_TYPE')}" var="dict">
<h5 class="page-header"></h5>
<div class="row">
<div class="col-md-12">
<div class="portlet">
<div class="portlet-body">
<div class="row" >
<form:form id="searchForm" modelAttribute="serviceDictInfo" action="${ctx}/basics/serviceDictInfo/searchList?itType=${itType}" method="post" class="form-search">
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
<!-- 筛选按钮展开状态-->
<input id="isFilterAction" name="isFilterAction" type="hidden" value="${serviceDictInfo.isFilterAction}"/>
<!-- 搜索内容与操作按钮栏 -->
<div class="col-md-12">
<%-- <div class="pull-left">
<form:select path="itemType" class="selectpicker select2 input-small" >
<form:option value="">数据类型</form:option>
<c:forEach items="${fns:getDictList('SERVICE_DICT_ITM_TYPE')}" var="dict">
<c:forEach items="${intArr}" var="itTemp">
<c:if test="${dict.itemCode eq itTemp}">
<option value="${dict.itemCode}"
<c:if test="${selectedType eq dict.itemCode}">selected="selected"</c:if>
>${dict.itemValue}</option>
<c:if test="${selectedType eq dict.itemCode}">selected="selected"</c:if>
>${dict.itemValue}</option>
</c:if>
</c:forEach>
</c:forEach>
</select>
<spring:message code="begin_date"></spring:message>:<input id="beginDate" name="beginDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
value="<fmt:formatDate value="${serviceDictInfo.beginDate}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
<spring:message code="end_date"></spring:message>:<input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
value="<fmt:formatDate value="${serviceDictInfo.endDate}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
<button type="button" class="btn btn-default btn-sm" onclick="return page2()">
<i class="fa fa-edit"></i> <spring:message code="search"></spring:message>
</button>
</div>
</form:form>
<table id="treeTable" class="table table-striped table-bordered table-condensed">
<thead><tr><th>配置ID</th><th>配置编码</th><th>配置内容</th><th>描述信息</th><th>数据类型</th><th>叶子节点</th><th>创建人员</th><th>创建时间</th><th>最近修改人员</th><th>最近修改时间</th><shiro:hasPermission name="sys:menu:edit"><th>操作</th></shiro:hasPermission></tr></thead>
<tbody><c:forEach items="${list}" var="serviceDictInfo">
</form:select>
</div> --%>
<div class="pull-left">
<div class="input-group">
<div class="input-group-btn">
<select id="seltype" class="selectpicker select2 input-small" >
<option value="itemCode"><spring:message code="item_code"></spring:message></option>
<option value="itemValue"><spring:message code="config_content"></spring:message></option>
</select>
</div>
<input id="intype" class="form-control input-medium" placeholder="请输入配置编码" type="text">
<div class="input-group-btn">
<button class="btn btn-default btn-search" type="button" onclick="page2()"><i class="fa fa-search"></i></button>
</div>
</div>
</div>
<div class="pull-left">
<button type="button" class="btn btn-default" id="filter-btn"> 筛选 <i class="fa fa-angle-double-down"></i></button>
</div>
<div class="pull-right">
<button type="button" class="btn btn-default" onclick="cmd('${ctx}/basics/serviceDictInfo/form?itType=${itType}')">
<i class="fa fa-edit"></i> 编辑</button>
<button type="button" class="btn btn-default" onclick="cmd('${ctx}/basics/serviceDictInfo/delete?itType=${itType}')">
<i class="fa fa-trash"></i> 删除</button>
<a class="btn btn-icon-only btn-default setfields tooltips"
data-container="body" data-placement="top" data-original-title="自定义列字段" href="javascript:;">
<i class="icon-wrench"></i>
</a>
</div>
</div>
<!-- /搜索内容与操作按钮栏-->
<!-- 筛选搜索内容栏默认隐藏-->
<div class="col-md-12 filter-action-select-panle hide" >
<div class="row">
<div class="col-md-6">
<div class="pull-left">
<label>创建时间:</label>
</div>
<div class="pull-left">
<input id="beginDate" name="beginDate" type="text" readonly="readonly" maxlength="20" class="form-control input-small Wdate"
value="<fmt:formatDate value="${serviceDictInfo.beginDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
</div>
<div class="pull-left">
<label>到</label>
</div>
<div class="pull-left">
<input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" class="form-control input-small Wdate"
value="<fmt:formatDate value="${serviceDictInfo.endDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
</div>
</div>
<div class="col-md-6">
<div class="pull-left">
<label>修改时间:</label>
</div>
<div class="pull-left">
<input id="editBeginDate" name="editBeginDate" type="text" readonly="readonly" maxlength="20" class="form-control input-small Wdate"
value="<fmt:formatDate value="${serviceDictInfo.beginDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
</div>
<div class="pull-left">
<label>到</label>
</div>
<div class="pull-left">
<input id="editEndDate" name="editEndDate" type="text" readonly="readonly" maxlength="20" class="form-control input-small Wdate"
value="<fmt:formatDate value="${serviceDictInfo.endDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
</div>
</div>
</div>
<h5 class="page-header"></h5>
<div class="row">
<div class="pull-left">
<button type="button" class="btn blue" onclick="page2()"> <i class="fa fa-search"></i> 搜索 </button>
<button type="button" class="btn btn-default" onclick="reset()"> <i class="fa fa-refresh"></i> 重置 </button>
</div>
</div>
</div>
<!-- /筛选搜索内容栏 结束-->
</form:form>
</div>
<!-- <div class="table-responsive"> -->
<sys:message content="${message}"/>
<table id="treeTable" class="table table-striped table-bordered table-condensed">
<thead>
<tr>
<th><input type="checkbox" class="ckboxs"></th>
<th>序号</th>
<th><spring:message code="item_code"/></th>
<th><spring:message code="config_content"/></th>
<th><spring:message code="desc"/></th>
<th><spring:message code="item_type"/></th>
<th><spring:message code="is_leaf"/></th>
<th><spring:message code="creator"/></th>
<th><spring:message code="create_time"/>
</th><th><spring:message code="editor"/></th>
<th><spring:message code="edit_time"/></th>
<shiro:hasPermission name="sys:menu:edit"><th><spring:message code="operation"/></th></shiro:hasPermission>
</tr>
</thead>
<tbody>
<c:forEach items="${list}" var="serviceDictInfo" varStatus="se">
<tr id="${serviceDictInfo.serviceDictId}" pId="${serviceDictInfo.parent.serviceDictId ne 0?serviceDictInfo.parent.serviceDictId:0}">
<td nowrap><i class="icon-icon-tablet"></i><a href="${ctx}/basics/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}&doAction=0">${serviceDictInfo.serviceDictId}</a></td>
<td>${serviceDictInfo.itemCode}</td>
<td><input type="checkbox" class="ckbox" name="check" value="${serviceDictInfo.serviceDictId}"></td>
<td>${fns:getNumberResult(se.count,page.pageNo,page.pageSize) }</td>
<td nowrap><i class="icon-icon-tablet"></i><a href="${ctx}/basics/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}&doAction=0">${serviceDictInfo.itemCode}</a></td>
<td>${serviceDictInfo.itemValue}</td>
<td title="${serviceDictInfo.itemDesc}">${fns:abbr(serviceDictInfo.itemDesc,15)}</td>
<td>${fns:getDictLabel("SERVICE_DICT_ITM_TYPE",serviceDictInfo.itemType,"0")}</td>
@@ -107,31 +262,28 @@
<td><fmt:formatDate value="${serviceDictInfo.editTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
<td>
<div class="btn-group btn-xs">
<a class="btn btn-primary btn-xs dropdown-toggle" data-toggle="dropdown" href="#">操作<span class="caret"></span></a>
<a class="btn btn-primary btn-xs dropdown-toggle" data-toggle="dropdown" href="#"><spring:message code="operation"/><span class="caret"></span></a>
<ul class="dropdown-menu btn-xs">
<li><a href="${ctx}/basics/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}&doAction=0&itType=${itType}">查看</a></li>
<li><a href="${ctx}/basics/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}&doAction=0&itType=${itType}"><spring:message code="show"/></a></li>
<shiro:hasPermission name="sys:dict:edit">
<li><a href="${ctx}/basics/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}&itType=${itType}" onclick="return confirmx('您确认要修改该项配置吗?', this.href)">修改</a></li>
<li><a href="${ctx}/basics/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}&itType=${itType}" onclick="return confirmx('您确认要修改该项配置吗?', this.href)"><spring:message code="edit"/></a></li>
</shiro:hasPermission>
<shiro:hasPermission name="sys:dict:edit">
<li><a href="${ctx}/basics/serviceDictInfo/delete?serviceDictId=${serviceDictInfo.serviceDictId}&itType=${itType}" onclick="return confirmx('您确认要删除该项配置吗?', this.href)">删除</a></li>
<li><a href="${ctx}/basics/serviceDictInfo/delete?serviceDictId=${serviceDictInfo.serviceDictId}&itType=${itType}" onclick="return confirmx('您确认要删除该项配置吗?', this.href)"><spring:message code="delete"/></a></li>
</shiro:hasPermission>
</ul>
</div>
</td>
</tr>
</c:forEach></tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</c:forEach>
</tbody>
</table>
<div class="page">${page}</div>
</div>
</div>
</div>
</div>
</div>
<div class="page">${page}</div>
</body>
</html>

View File

@@ -8,26 +8,70 @@
<script src="${ctxStatic}/global/plugins/treeTable/jquery.treeTable.min.js" type="text/javascript"></script>
<script src="${ctxStatic}/pages/scripts/dict.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#treeTable").treeTable({expandLevel : 3}).show();
function reset(){
$("#searchForm").reset();
}
/*
系统通用方法根据参数来决定处理的url和参数
*/
function cmd(){
var url=arguments[0];
var mulitId="";
jQuery("#treeTable").find(":checkbox:checked[name='check']").each(function(){
if(jQuery(this).val()!=""){
mulitId+=jQuery(this).val()+",";
}
});
//查询
function page(n,s){
$("#intype").attr("name",$("#seltype").val());
$("#pageNo").val(n);
$("#pageSize").val(s);
$("#searchForm").attr("action","${ctx}/basics/serviceDictInfo/list?itType=${itType}");
$("#searchForm").submit();
return false;
}
function page2(n,s){
$("#intype").attr("name",$("#seltype").val());
$("#pageNo").val(n);
$("#pageSize").val(s);
$("#searchForm").attr("action","${ctx}/basics/serviceDictInfo/searchList?itType=${itType}");
$("#searchForm").submit();
return false;
}
if(mulitId!=""){
confirmx('您确认要执行该操作?', url+"&mulitId="+mulitId);
}else{
alert("至少选择一条数据记录");
}
}
//查询
function page(n,s){
$("#intype").attr("name",$("#seltype").val());
$("#pageNo").val(n);
$("#pageSize").val(s);
$("#searchForm").attr("action","${ctx}/basics/serviceDictInfo/list?itType=${itType}");
$("#searchForm").submit();
return false;
}
function page2(n,s){
$("#intype").attr("name",$("#seltype").val());
$("#pageNo").val(n);
$("#pageSize").val(s);
$("#searchForm").attr("action","${ctx}/basics/serviceDictInfo/searchList?itType=${itType}");
$("#searchForm").submit();
return false;
}
$(document).ready(function() {
//设定显示总条数
//$("#showTotalCount").text();
//设定selected设定name 设定value
$("#seltype").find("option[value='"+${searchType==null?"11":searchType}+"']").attr("selected",true);
$("#intype").attr("name",$("#seltype").find("option:selected").val());
$("#intype").val(${serviceDictInfo.itemValue});
//筛选功能初始化
filterActionInit();
$("#isAudit").change(function(){
page();
});
$("#seltype").change(function(){
$("#intype").val("");
$("#intype").attr("placeholder","请输入"+$(this).find("option:selected").text());
$("#intype").attr("name",$(this).find("option:selected").val());
});
$("#treeTable").treeTable({expandLevel : 3}).show();
});
</script>
<style type="text/css">
.dropdown-menu {
@@ -36,61 +80,175 @@
</style>
</head>
<body>
<div class="page-content">
<div class="theme-panel hidden-xs hidden-sm">
<button type="button" class="btn btn-default" onclick="location='${ctx}/basics/serviceDictInfo/list?itType=${itType}'"><spring:message code="refresh"></spring:message></button>
<button type="button" class="btn btn-primary"
onClick="javascript:window.location='${ctx}/basics/serviceDictInfo/form?itType=${itType}'"><spring:message code="add"/></button>
onClick="javascript:window.location='${ctx}/basics/serviceDictInfo/form?itType=${itType}'">
<i class="fa fa-plus"></i>
<spring:message code="add"></spring:message>配置</button>
</div>
<h3 class="page-title">
<spring:message code="configuration_manage"/>
</h3>
<h3 class="page-title">
${fns:getItemTypeByNo("SERVICE_DICT_ITM_TYPE",intArr)}
<small><spring:message code="date_list"/></small>
</h3>
<div class="row">
<div class="col-md-12">
<div class="portlet box blue">
<div class="portlet-title">
<div class="caption">
<i class="fa fa-cogs"></i><spring:message code="date_list"/>
</div>
</div>
<div class="portlet-body">
<div class="row" >
<div class="col-md-12">
<sys:message content="${message}"/>
<form:form id="searchForm" modelAttribute="serviceDictInfo" action="${ctx}/basics/serviceDictInfo/searchList?itType=${itType}" method="post" class="form-search">
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
<div class="col-md-12">
<label class="search-lable"><spring:message code="item_code"/>:</label><input id="itemCode" name="itemCode" type="text" maxlength="25" class="input-medium" value="${serviceDictInfo.itemCode}"/>
<label class="search-lable"><spring:message code="config_content"/>:</label><input id="itemValue" name="itemValue" type="text" maxlength="25" class="input-medium" value="${serviceDictInfo.itemValue}"/>
<label class="search-lable itemType"><spring:message code="item_type"/>:</label>
<select id="itemType" name="itemType" >
<option value="" selected="selected"><spring:message code="select"/></option>
<c:forEach items="${fns:getDictList('SERVICE_DICT_ITM_TYPE')}" var="dict">
<h5 class="page-header"></h5>
<div class="row">
<div class="col-md-12">
<div class="portlet">
<div class="portlet-body">
<div class="row" >
<form:form id="searchForm" modelAttribute="serviceDictInfo" action="${ctx}/basics/serviceDictInfo/searchList?itType=${itType}" method="post" class="form-search">
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
<!-- 筛选按钮展开状态-->
<input id="isFilterAction" name="" type="hidden" value=""/>
<!-- 搜索内容与操作按钮栏 -->
<div class="col-md-12">
<%-- <div class="pull-left">
<form:select path="itemType" class="selectpicker select2 input-small" >
<form:option value="">数据类型</form:option>
<c:forEach items="${fns:getDictList('SERVICE_DICT_ITM_TYPE')}" var="dict">
<c:forEach items="${intArr}" var="itTemp">
<c:if test="${dict.itemCode eq itTemp}">
<option value="${dict.itemCode}"
<c:if test="${selectedType eq dict.itemCode}">selected="selected"</c:if>
>${dict.itemValue}</option>
<c:if test="${selectedType eq dict.itemCode}">selected="selected"</c:if>
>${dict.itemValue}</option>
</c:if>
</c:forEach>
</c:forEach>
</select>
<spring:message code="begin_date"></spring:message>:<input id="beginDate" name="beginDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
value="<fmt:formatDate value="${serviceDictInfo.beginDate}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
<spring:message code="end_date"></spring:message>:<input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
value="<fmt:formatDate value="${serviceDictInfo.endDate}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
<button type="button" class="btn btn-default btn-sm" onclick="return page2()">
<i class="fa fa-edit"></i> <spring:message code="search"></spring:message>
</button>
</div>
</form:form>
<table id="treeTable" class="table table-striped table-bordered table-condensed">
<thead><tr><th><spring:message code="item_code"/></th><th><spring:message code="config_content"/></th><th><spring:message code="desc"/></th><th><spring:message code="item_type"/></th><th><spring:message code="is_leaf"/></th><th><spring:message code="creator"/></th><th><spring:message code="create_time"/></th><th><spring:message code="editor"/></th><th><spring:message code="edit_time"/></th><shiro:hasPermission name="sys:menu:edit"><th><spring:message code="operation"/></th></shiro:hasPermission></tr></thead>
<tbody><c:forEach items="${list}" var="serviceDictInfo">
</form:select>
</div> --%>
<div class="pull-left">
<div class="input-group">
<div class="input-group-btn">
<select id="seltype" class="selectpicker select2 input-small" >
<option value="itemCode"><spring:message code="item_code"></spring:message></option>
<option value="itemValue"><spring:message code="config_content"></spring:message></option>
</select>
</div>
<input id="intype" class="form-control input-medium" placeholder="请输入配置编码" type="text">
<div class="input-group-btn">
<button class="btn btn-default btn-search" type="button" onclick="page2()"><i class="fa fa-search"></i></button>
</div>
</div>
</div>
<div class="pull-left">
<button type="button" class="btn btn-default" id="filter-btn"> 筛选 <i class="fa fa-angle-double-down"></i></button>
</div>
<div class="pull-right">
<button type="button" class="btn btn-default" onclick="cmd('${ctx}/basics/serviceDictInfo/form?itType=${itType}')">
<i class="fa fa-edit"></i> 编辑</button>
<button type="button" class="btn btn-default" onclick="cmd('${ctx}/basics/serviceDictInfo/delete?itType=${itType}')">
<i class="fa fa-trash"></i> 删除</button>
<a class="btn btn-icon-only btn-default setfields tooltips"
data-container="body" data-placement="top" data-original-title="自定义列字段" href="javascript:;">
<i class="icon-wrench"></i>
</a>
</div>
</div>
<!-- /搜索内容与操作按钮栏-->
<!-- 筛选搜索内容栏默认隐藏-->
<div class="col-md-12 filter-action-select-panle hide" >
<div class="row">
<div class="col-md-6">
<div class="pull-left">
<label>创建时间:</label>
</div>
<div class="pull-left">
<input id="beginDate" name="beginDate" type="text" readonly="readonly" maxlength="20" class="form-control input-small Wdate"
value="<fmt:formatDate value="${serviceDictInfo.beginDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
</div>
<div class="pull-left">
<label>到</label>
</div>
<div class="pull-left">
<input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" class="form-control input-small Wdate"
value="<fmt:formatDate value="${serviceDictInfo.endDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
</div>
</div>
<div class="col-md-6">
<div class="pull-left">
<label>修改时间:</label>
</div>
<div class="pull-left">
<input id="editBeginDate" name="editBeginDate" type="text" readonly="readonly" maxlength="20" class="form-control input-small Wdate"
value="<fmt:formatDate value="${serviceDictInfo.beginDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
</div>
<div class="pull-left">
<label>到</label>
</div>
<div class="pull-left">
<input id="editEndDate" name="editEndDate" type="text" readonly="readonly" maxlength="20" class="form-control input-small Wdate"
value="<fmt:formatDate value="${serviceDictInfo.endDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
</div>
</div>
</div>
<h5 class="page-header"></h5>
<div class="row">
<div class="pull-left">
<button type="button" class="btn blue" onclick="page2()"> <i class="fa fa-search"></i> 搜索 </button>
<button type="button" class="btn btn-default" onclick="reset()"> <i class="fa fa-refresh"></i> 重置 </button>
</div>
</div>
</div>
<!-- /筛选搜索内容栏 结束-->
</form:form>
</div>
<!-- <div class="table-responsive"> -->
<sys:message content="${message}"/>
<table id="treeTable" class="table table-striped table-bordered table-condensed">
<thead>
<tr>
<th><input type="checkbox" class="ckboxs"></th>
<th>序号</th>
<th><spring:message code="item_code"/></th>
<th><spring:message code="config_content"/></th>
<th><spring:message code="desc"/></th>
<th><spring:message code="item_type"/></th>
<th><spring:message code="is_leaf"/></th>
<th><spring:message code="creator"/></th>
<th><spring:message code="create_time"/>
</th><th><spring:message code="editor"/></th>
<th><spring:message code="edit_time"/></th>
<shiro:hasPermission name="sys:menu:edit"><th><spring:message code="operation"/></th></shiro:hasPermission>
</tr>
</thead>
<tbody>
<c:forEach items="${list}" var="serviceDictInfo" varStatus="se">
<tr id="${serviceDictInfo.serviceDictId}" pId="${serviceDictInfo.parent.serviceDictId ne 0?serviceDictInfo.parent.serviceDictId:0}">
<td><input type="checkbox" class="ckbox" name="check" value="${serviceDictInfo.serviceDictId}"></td>
<td>${fns:getNumberResult(se.count,page.pageNo,page.pageSize) }</td>
<td nowrap><i class="icon-icon-tablet"></i><a href="${ctx}/basics/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}&doAction=0">${serviceDictInfo.itemCode}</a></td>
<td>${serviceDictInfo.itemValue}</td>
<td title="${serviceDictInfo.itemDesc}">${fns:abbr(serviceDictInfo.itemDesc,15)}</td>
@@ -120,17 +278,14 @@
</div>
</td>
</tr>
</c:forEach></tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</c:forEach>
</tbody>
</table>
<div class="page">${page}</div>
</div>
</div>
</div>
</div>
</div>
<div class="page">${page}</div>
</body>
</html>

View File

@@ -24,9 +24,7 @@
});
}
$(document).ready(function() {
//校验itemCode数值
jQuery.validator.addMethod("codeNumber",function(value,element){
return value>=0&value<=20000000},"请填写正确的数值");
//类型选择与上级是否冲突
jQuery.validator.addMethod("typeSame",function(value,element){
var flag=false;
$.ajax({
@@ -90,6 +88,10 @@
$("#inputForm").validate({
//需验证 item_code item_value
rules: {
'itemCode':{
required:true,
remote:'${ctx}/basics/sysDictInfo/isItemCodeRepeat?oldItemCode=${sysDictInfo.itemCode}'
},
'itemValue':{
required:true
},
@@ -104,6 +106,10 @@
},
messages: {
'itemCode':{
required:'请填写配置编码',
remote:'该配置编码已存在'
},
'itemValue':{
required:'编码对应值必须填写'
},

View File

@@ -12,13 +12,13 @@
<div class="theme-panel hidden-xs hidden-sm">
<button type="button" class="btn btn-default" onclick="history.go(-1)">返回</button>
<button type="button" class="btn btn-default" onclick="history.go(-1)"><spring:message code="back"/></button>
</div>
<h3 class="page-title">
配置管理
<spring:message code="configuration_manage"/>
</h3>
<div class="row">
@@ -26,7 +26,7 @@
<div class="portlet box blue">
<div class="portlet-title">
<div class="caption">
<i class="fa fa-gift"></i>配置查看</div>
<i class="fa fa-gift"></i><spring:message code="show"/></div>
</div>
<div class="portlet-body form">
@@ -39,37 +39,73 @@
<form:hidden path="sysDictId"/>
<sys:message content="${message}"/>
<div class="form-group">
<label class="col-md-3 control-label">上级配置:</label>
<label class="col-md-3 control-label"><font color="red">*</font><spring:message code="superior_config"/>:</label>
<div class="col-md-4">
<input value="${sysDictInfo.parent.sysDictId == 0?'根节点':fns:getSysDictInfoById(sysDictInfo.parent.sysDictId).itemValue}" maxlength="50" class="form-control" readonly="readonly"/>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label radio-lable"><font color="red">*</font> 数据类型:</label>
<label class="col-md-3 control-label radio-lable"><font color="red">*</font> 配置ID:</label>
<div class="col-md-4">
<input value="${sysDictInfo.sysDictId}" maxlength="50" class="form-control" readonly="readonly"/>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label radio-lable"><font color="red">*</font> <spring:message code="item_type"/>:</label>
<div class="col-md-4">
<input value="${fns:getDictLabel('SYS_DICT_ITM_TYPE',sysDictInfo.itemType,'0')}" maxlength="50" class="form-control" readonly="readonly"/>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label"><font color="red">*</font>编码:</label>
<label class="col-md-3 control-label"><font color="red">*</font><spring:message code="item_code"/>:</label>
<div class="col-md-4">
<input value="${sysDictInfo.itemCode}" maxlength="50" class="form-control" readonly="readonly"/>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label"><font color="red">*</font>编码对应值:</label>
<label class="col-md-3 control-label"><font color="red">*</font><spring:message code="item_value"/>:</label>
<div class="col-md-4">
<input value="${sysDictInfo.itemValue}" maxlength="50" class="form-control" readonly="readonly"/>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label"><font color="red">*</font>是否叶子节点:</label>
<label class="col-md-3 control-label"><font color="red">*</font><spring:message code="is_leaf"/>:</label>
<div class="col-md-4">
<input value="${fns:getDictLabel('SYS_YES_NO',sysDictInfo.isValid,'0')}" maxlength="50" class="form-control" readonly="readonly"/>
</div>
</div>
<%-- <div class="form-group">
<label class="col-md-3 control-label"><font color="red">*</font>层级:</label>
<div class="col-md-4">
<input value="${sysDictInfo.levelNo}" maxlength="50" class="form-control" readonly="readonly"/>
</div>
</div> --%>
<div class="form-group">
<label class="col-md-3 control-label">描述信息:</label>
<label class="col-md-3 control-label"><font color="red"></font>创建人员:</label>
<div class="col-md-4">
<input value="${fns:getUserById(sysDictInfo.sysDictCreator.id).name}" maxlength="50" class="form-control" readonly="readonly"/>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label"><font color="red"></font>创建时间:</label>
<div class="col-md-4">
<input value="<fmt:formatDate value='${sysDictInfo.createTime}' pattern='yyyy-MM-dd HH:mm:ss'/>" maxlength="50" class="form-control" readonly="readonly" />
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label"><font color="red"></font>修改人员:</label>
<div class="col-md-4">
<input value="${fns:getUserById(sysDictInfo.sysDictEditor.id).name}" maxlength="50" class="form-control" readonly="readonly"/>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label"><font color="red"></font>修改时间:</label>
<div class="col-md-4">
<input value="<fmt:formatDate value='${sysDictInfo.editTime}' pattern='yyyy-MM-dd HH:mm:ss'/>" maxlength="50" class="form-control" readonly="readonly" />
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label"><spring:message code="desc"/>:</label>
<div class="col-md-4">
<form:textarea path="itemDesc" htmlEscape="false" maxlength="2000" class="form-control"/>
</div>

View File

@@ -8,9 +8,27 @@
<script src="${ctxStatic}/global/plugins/treeTable/jquery.treeTable.min.js" type="text/javascript"></script>
<script src="${ctxStatic}/pages/scripts/dict.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#treeTable").treeTable({expandLevel : 3}).show();
function reset(){
$("#searchForm").reset();
}
/*
系统通用方法根据参数来决定处理的url和参数
*/
function cmd(){
var url=arguments[0];
var mulitId="";
jQuery("#treeTable").find(":checkbox:checked[name='check']").each(function(){
if(jQuery(this).val()!=""){
mulitId+=jQuery(this).val()+",";
}
});
if(mulitId!=""){
confirmx('您确认要执行该操作?', url+"&mulitId="+mulitId);
}else{
alert("至少选择一条数据记录");
}
}
//查询
function page(n,s){
$("#intype").attr("name",$("#seltype").val());
@@ -28,6 +46,30 @@
$("#searchForm").submit();
return false;
}
$(document).ready(function() {
//设定显示总条数
//$("#showTotalCount").text();
//设定selected设定name 设定value
$("#seltype").find("option[value='"+${searchType==null?"11":searchType}+"']").attr("selected",true);
$("#intype").attr("name",$("#seltype").find("option:selected").val());
$("#intype").val(${sysDictInfo.itemValue});
//筛选功能初始化
filterActionInit();
$("#isAudit").change(function(){
page();
});
$("#seltype").change(function(){
$("#intype").val("");
$("#intype").attr("placeholder","请输入"+$(this).find("option:selected").text());
$("#intype").attr("name",$(this).find("option:selected").val());
});
$("#treeTable").treeTable({expandLevel : 3}).show();
});
</script>
<style type="text/css">
.dropdown-menu {
@@ -36,61 +78,175 @@
</style>
</head>
<body>
<div class="page-content">
<div class="theme-panel hidden-xs hidden-sm">
<button type="button" class="btn btn-default" onclick="location='${ctx}/basics/sysDictInfo/list?itType=${itType}'"><spring:message code="refresh"></spring:message></button>
<button type="button" class="btn btn-primary"
onClick="javascript:window.location='${ctx}/basics/sysDictInfo/form?itType=${itType}'">新增配置</button>
onClick="javascript:window.location='${ctx}/basics/sysDictInfo/form?itType=${itType}'">
<i class="fa fa-plus"></i>
<spring:message code="add"></spring:message>配置</button>
</div>
<h3 class="page-title">
配置管理
</h3>
<h3 class="page-title">
${fns:getItemTypeByNo("SYS_DICT_ITM_TYPE",intArr)}
<small><spring:message code="date_list"/></small>
</h3>
<div class="row">
<div class="col-md-12">
<div class="portlet box blue">
<div class="portlet-title">
<div class="caption">
<i class="fa fa-cogs"></i>搜索结果
</div>
</div>
<div class="portlet-body">
<div class="row" >
<div class="col-md-12">
<sys:message content="${message}"/>
<form:form id="searchForm" modelAttribute="sysDictInfo" action="${ctx}/basics/sysDictInfo/searchList?itType=${itType}" method="post" class="form-search">
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
<div class="col-md-12">
<label class="search-lable">配置编码:</label><input id="itemCode" name="itemCode" type="text" maxlength="25" class="input-medium" value="${sysDictInfo.itemCode}"/>
<label class="search-lable">配置内容:</label><input id="itemValue" name="itemValue" type="text" maxlength="25" class="input-medium" value="${sysDictInfo.itemValue}"/>
<label class="search-lable itemType">数据类型:</label>
<select id="itemType" name="itemType" >
<option value="" selected="selected">-请选择-</option>
<c:forEach items="${fns:getDictList('SYS_DICT_ITM_TYPE')}" var="dict">
<h5 class="page-header"></h5>
<div class="row">
<div class="col-md-12">
<div class="portlet">
<div class="portlet-body">
<div class="row" >
<form:form id="searchForm" modelAttribute="sysDictInfo" action="${ctx}/basics/sysDictInfo/searchList?itType=${itType}" method="post" class="form-search">
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
<!-- 筛选按钮展开状态-->
<input id="isFilterAction" name="" type="hidden" value=""/>
<!-- 搜索内容与操作按钮栏 -->
<div class="col-md-12">
<%-- <div class="pull-left">
<form:select path="itemType" class="selectpicker select2 input-small" >
<form:option value="">数据类型</form:option>
<c:forEach items="${fns:getDictList('SERVICE_DICT_ITM_TYPE')}" var="dict">
<c:forEach items="${intArr}" var="itTemp">
<c:if test="${dict.itemCode eq itTemp}">
<option value="${dict.itemCode}"
<c:if test="${sysDictInfo.itemType eq dict.itemCode}">selected="selected"</c:if>
>${dict.itemValue}</option>
<c:if test="${selectedType eq dict.itemCode}">selected="selected"</c:if>
>${dict.itemValue}</option>
</c:if>
</c:forEach>
</c:forEach>
</select>
<spring:message code="begin_date"></spring:message>:<input id="beginDate" name="beginDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
value="<fmt:formatDate value="${sysDictInfo.beginDate}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
<spring:message code="end_date"></spring:message>:<input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
value="<fmt:formatDate value="${sysDictInfo.endDate}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
<button type="button" class="btn btn-default btn-sm" onclick="return page2()">
<i class="fa fa-edit"></i> <spring:message code="search"></spring:message>
</button>
</div>
</form:form>
<table id="treeTable" class="table table-striped table-bordered table-condensed">
<thead><tr><th>配置编码</th><th>配置内容</th><th>描述信息</th><th>数据类型</th><th>叶子节点</th><th>创建人员</th><th>创建时间</th><th>最近修改人员</th><th>最近修改时间</th><shiro:hasPermission name="sys:menu:edit"><th>操作</th></shiro:hasPermission></tr></thead>
<tbody><c:forEach items="${list}" var="sysDictInfo">
</form:select>
</div> --%>
<div class="pull-left">
<div class="input-group">
<div class="input-group-btn">
<select id="seltype" class="selectpicker select2 input-small" >
<option value="itemCode"><spring:message code="item_code"></spring:message></option>
<option value="itemValue"><spring:message code="config_content"></spring:message></option>
</select>
</div>
<input id="intype" class="form-control input-medium" placeholder="请输入配置编码" type="text">
<div class="input-group-btn">
<button class="btn btn-default btn-search" type="button" onclick="page2()"><i class="fa fa-search"></i></button>
</div>
</div>
</div>
<div class="pull-left">
<button type="button" class="btn btn-default" id="filter-btn"> 筛选 <i class="fa fa-angle-double-down"></i></button>
</div>
<div class="pull-right">
<button type="button" class="btn btn-default" onclick="cmd('${ctx}/basics/sysDictInfo/form?itType=${itType}')">
<i class="fa fa-edit"></i> 编辑</button>
<button type="button" class="btn btn-default" onclick="cmd('${ctx}/basics/sysDictInfo/delete?itType=${itType}')">
<i class="fa fa-trash"></i> 删除</button>
<a class="btn btn-icon-only btn-default setfields tooltips"
data-container="body" data-placement="top" data-original-title="自定义列字段" href="javascript:;">
<i class="icon-wrench"></i>
</a>
</div>
</div>
<!-- /搜索内容与操作按钮栏-->
<!-- 筛选搜索内容栏默认隐藏-->
<div class="col-md-12 filter-action-select-panle hide" >
<div class="row">
<div class="col-md-6">
<div class="pull-left">
<label>创建时间:</label>
</div>
<div class="pull-left">
<input id="beginDate" name="beginDate" type="text" readonly="readonly" maxlength="20" class="form-control input-small Wdate"
value="<fmt:formatDate value="${sysDictInfo.beginDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
</div>
<div class="pull-left">
<label>到</label>
</div>
<div class="pull-left">
<input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" class="form-control input-small Wdate"
value="<fmt:formatDate value="${sysDictInfo.endDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
</div>
</div>
<div class="col-md-6">
<div class="pull-left">
<label>修改时间:</label>
</div>
<div class="pull-left">
<input id="editBeginDate" name="editBeginDate" type="text" readonly="readonly" maxlength="20" class="form-control input-small Wdate"
value="<fmt:formatDate value="${sysDictInfo.beginDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
</div>
<div class="pull-left">
<label>到</label>
</div>
<div class="pull-left">
<input id="editEndDate" name="editEndDate" type="text" readonly="readonly" maxlength="20" class="form-control input-small Wdate"
value="<fmt:formatDate value="${sysDictInfo.endDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
</div>
</div>
</div>
<h5 class="page-header"></h5>
<div class="row">
<div class="pull-left">
<button type="button" class="btn blue" onclick="page2()"> <i class="fa fa-search"></i> 搜索 </button>
<button type="button" class="btn btn-default" onclick="reset()"> <i class="fa fa-refresh"></i> 重置 </button>
</div>
</div>
</div>
<!-- /筛选搜索内容栏 结束-->
</form:form>
</div>
<!-- <div class="table-responsive"> -->
<sys:message content="${message}"/>
<table id="treeTable" class="table table-striped table-bordered table-condensed">
<thead>
<tr>
<th><input type="checkbox" class="ckboxs"></th>
<th>序号</th>
<th><spring:message code="item_code"/></th>
<th><spring:message code="config_content"/></th>
<th><spring:message code="desc"/></th>
<th><spring:message code="item_type"/></th>
<th><spring:message code="is_leaf"/></th>
<th><spring:message code="creator"/></th>
<th><spring:message code="create_time"/>
</th><th><spring:message code="editor"/></th>
<th><spring:message code="edit_time"/></th>
<shiro:hasPermission name="sys:menu:edit"><th><spring:message code="operation"/></th></shiro:hasPermission>
</tr>
</thead>
<tbody>
<c:forEach items="${list}" var="sysDictInfo" varStatus="se">
<tr id="${sysDictInfo.sysDictId}" pId="${sysDictInfo.parent.sysDictId ne 0?sysDictInfo.parent.sysDictId:0}">
<td><input type="checkbox" class="ckbox" name="check" value="${sysDictInfo.sysDictId}"></td>
<td>${fns:getNumberResult(se.count,page.pageNo,page.pageSize) }</td>
<td nowrap><i class="icon-icon-tablet"></i><a href="${ctx}/basics/sysDictInfo/form?sysDictId=${sysDictInfo.sysDictId}&doAction=0">${sysDictInfo.itemCode}</a></td>
<td>${sysDictInfo.itemValue}</td>
<td title="${sysDictInfo.itemDesc}">${fns:abbr(sysDictInfo.itemDesc,15)}</td>
@@ -106,31 +262,28 @@
<td><fmt:formatDate value="${sysDictInfo.editTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
<td>
<div class="btn-group btn-xs">
<a class="btn btn-primary btn-xs dropdown-toggle" data-toggle="dropdown" href="#">操作<span class="caret"></span></a>
<a class="btn btn-primary btn-xs dropdown-toggle" data-toggle="dropdown" href="#"><spring:message code="operation"/><span class="caret"></span></a>
<ul class="dropdown-menu btn-xs">
<li><a href="${ctx}/basics/sysDictInfo/form?sysDictId=${sysDictInfo.sysDictId}&doAction=0&itType=${itType}">查看</a></li>
<li><a href="${ctx}/basics/sysDictInfo/form?sysDictId=${sysDictInfo.sysDictId}&doAction=0&itType=${itType}"><spring:message code="show"/></a></li>
<shiro:hasPermission name="sys:dict:edit">
<li><a href="${ctx}/basics/sysDictInfo/form?sysDictId=${sysDictInfo.sysDictId}&itType=${itType}" onclick="return confirmx('您确认要修改该项配置吗?', this.href)">修改</a></li>
<li><a href="${ctx}/basics/sysDictInfo/form?sysDictId=${sysDictInfo.sysDictId}&itType=${itType}" onclick="return confirmx('您确认要修改该项配置吗?', this.href)"><spring:message code="edit"/></a></li>
</shiro:hasPermission>
<shiro:hasPermission name="sys:dict:edit">
<li><a href="${ctx}/basics/sysDictInfo/delete?sysDictId=${sysDictInfo.sysDictId}&itType=${itType}" onclick="return confirmx('您确认要删除该项配置吗?', this.href)">删除</a></li>
<li><a href="${ctx}/basics/sysDictInfo/delete?sysDictId=${sysDictInfo.sysDictId}&itType=${itType}" onclick="return confirmx('您确认要删除该项配置吗?', this.href)"><spring:message code="delete"/></a></li>
</shiro:hasPermission>
</ul>
</div>
</td>
</tr>
</c:forEach></tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</c:forEach>
</tbody>
</table>
<div class="page">${page}</div>
</div>
</div>
</div>
</div>
</div>
<div class="page">${page}</div>
</body>
</html>

View File

@@ -8,9 +8,27 @@
<script src="${ctxStatic}/global/plugins/treeTable/jquery.treeTable.min.js" type="text/javascript"></script>
<script src="${ctxStatic}/pages/scripts/dict.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#treeTable").treeTable({expandLevel : 3}).show();
function reset(){
$("#searchForm").reset();
}
/*
系统通用方法根据参数来决定处理的url和参数
*/
function cmd(){
var url=arguments[0];
var mulitId="";
jQuery("#treeTable").find(":checkbox:checked[name='check']").each(function(){
if(jQuery(this).val()!=""){
mulitId+=jQuery(this).val()+",";
}
});
if(mulitId!=""){
confirmx('您确认要执行该操作?', url+"&mulitId="+mulitId);
}else{
alert("至少选择一条数据记录");
}
}
//查询
function page(n,s){
$("#intype").attr("name",$("#seltype").val());
@@ -28,6 +46,30 @@
$("#searchForm").submit();
return false;
}
$(document).ready(function() {
//设定显示总条数
//$("#showTotalCount").text();
//设定selected设定name 设定value
$("#seltype").find("option[value='"+${searchType==null?"11":searchType}+"']").attr("selected",true);
$("#intype").attr("name",$("#seltype").find("option:selected").val());
$("#intype").val(${sysDictInfo.itemValue});
//筛选功能初始化
filterActionInit();
$("#isAudit").change(function(){
page();
});
$("#seltype").change(function(){
$("#intype").val("");
$("#intype").attr("placeholder","请输入"+$(this).find("option:selected").text());
$("#intype").attr("name",$(this).find("option:selected").val());
});
$("#treeTable").treeTable({expandLevel : 3}).show();
});
</script>
<style type="text/css">
.dropdown-menu {
@@ -36,61 +78,175 @@
</style>
</head>
<body>
<div class="page-content">
<div class="theme-panel hidden-xs hidden-sm">
<button type="button" class="btn btn-default" onclick="location='${ctx}/basics/sysDictInfo/list?itType=${itType}'"><spring:message code="refresh"></spring:message></button>
<button type="button" class="btn btn-primary"
onClick="javascript:window.location='${ctx}/basics/sysDictInfo/form?itType=${itType}'"><spring:message code="add"/></button>
onClick="javascript:window.location='${ctx}/basics/sysDictInfo/form?itType=${itType}'">
<i class="fa fa-plus"></i>
<spring:message code="add"></spring:message>配置</button>
</div>
<h3 class="page-title">
<spring:message code="effect_range"/>
</h3>
<h3 class="page-title">
${fns:getItemTypeByNo("SYS_DICT_ITM_TYPE",intArr)}
<small><spring:message code="date_list"/></small>
</h3>
<div class="row">
<div class="col-md-12">
<div class="portlet box blue">
<div class="portlet-title">
<div class="caption">
<i class="fa fa-cogs"></i><spring:message code="date_list"/>
</div>
</div>
<div class="portlet-body">
<div class="row" >
<div class="col-md-12">
<sys:message content="${message}"/>
<form:form id="searchForm" modelAttribute="sysDictInfo" action="${ctx}/basics/sysDictInfo/searchList?itType=${itType}" method="post" class="form-search">
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
<div class="col-md-12">
<label class="search-lable"><spring:message code="item_code"/>:</label><input id="itemCode" name="itemCode" type="text" maxlength="25" class="input-medium" value="${sysDictInfo.itemCode}"/>
<label class="search-lable"><spring:message code="config_content"/>:</label><input id="itemValue" name="itemValue" type="text" maxlength="25" class="input-medium" value="${sysDictInfo.itemValue}"/>
<label class="search-lable itemType"><spring:message code="item_type"/>:</label>
<select id="itemType" name="itemType" >
<option value="" selected="selected"><spring:message code="select"/></option>
<c:forEach items="${fns:getDictList('SYS_DICT_ITM_TYPE')}" var="dict">
<h5 class="page-header"></h5>
<div class="row">
<div class="col-md-12">
<div class="portlet">
<div class="portlet-body">
<div class="row" >
<form:form id="searchForm" modelAttribute="sysDictInfo" action="${ctx}/basics/sysDictInfo/searchList?itType=${itType}" method="post" class="form-search">
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
<!-- 筛选按钮展开状态-->
<input id="isFilterAction" name="" type="hidden" value=""/>
<!-- 搜索内容与操作按钮栏 -->
<div class="col-md-12">
<%-- <div class="pull-left">
<form:select path="itemType" class="selectpicker select2 input-small" >
<form:option value="">数据类型</form:option>
<c:forEach items="${fns:getDictList('SERVICE_DICT_ITM_TYPE')}" var="dict">
<c:forEach items="${intArr}" var="itTemp">
<c:if test="${dict.itemCode eq itTemp}">
<option value="${dict.itemCode}"
<c:if test="${selectedType eq dict.itemCode}">selected="selected"</c:if>
>${dict.itemValue}</option>
<c:if test="${selectedType eq dict.itemCode}">selected="selected"</c:if>
>${dict.itemValue}</option>
</c:if>
</c:forEach>
</c:forEach>
</select>
<spring:message code="begin_date"></spring:message>:<input id="beginDate" name="beginDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
value="<fmt:formatDate value="${sysDictInfo.beginDate}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
<spring:message code="end_date"></spring:message>:<input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
value="<fmt:formatDate value="${sysDictInfo.endDate}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
<button type="button" class="btn btn-default btn-sm" onclick="return page2()">
<i class="fa fa-edit"></i> <spring:message code="search"></spring:message>
</button>
</div>
</form:form>
<table id="treeTable" class="table table-striped table-bordered table-condensed">
<thead><tr><th><spring:message code="item_code"/></th><th><spring:message code="config_content"/></th><th><spring:message code="desc"/></th><th><spring:message code="item_type"/></th><th><spring:message code="is_leaf"/></th><th><spring:message code="creator"/></th><th><spring:message code="create_time"/></th><th><spring:message code="editor"/></th><th><spring:message code="edit_time"/></th><shiro:hasPermission name="sys:menu:edit"><th><spring:message code="operation"/></th></shiro:hasPermission></tr></thead>
<tbody><c:forEach items="${list}" var="sysDictInfo">
</form:select>
</div> --%>
<div class="pull-left">
<div class="input-group">
<div class="input-group-btn">
<select id="seltype" class="selectpicker select2 input-small" >
<option value="itemCode"><spring:message code="item_code"></spring:message></option>
<option value="itemValue"><spring:message code="config_content"></spring:message></option>
</select>
</div>
<input id="intype" class="form-control input-medium" placeholder="请输入配置编码" type="text">
<div class="input-group-btn">
<button class="btn btn-default btn-search" type="button" onclick="page2()"><i class="fa fa-search"></i></button>
</div>
</div>
</div>
<div class="pull-left">
<button type="button" class="btn btn-default" id="filter-btn"> 筛选 <i class="fa fa-angle-double-down"></i></button>
</div>
<div class="pull-right">
<button type="button" class="btn btn-default" onclick="cmd('${ctx}/basics/sysDictInfo/form?itType=${itType}')">
<i class="fa fa-edit"></i> 编辑</button>
<button type="button" class="btn btn-default" onclick="cmd('${ctx}/basics/sysDictInfo/delete?itType=${itType}')">
<i class="fa fa-trash"></i> 删除</button>
<a class="btn btn-icon-only btn-default setfields tooltips"
data-container="body" data-placement="top" data-original-title="自定义列字段" href="javascript:;">
<i class="icon-wrench"></i>
</a>
</div>
</div>
<!-- /搜索内容与操作按钮栏-->
<!-- 筛选搜索内容栏默认隐藏-->
<div class="col-md-12 filter-action-select-panle hide" >
<div class="row">
<div class="col-md-6">
<div class="pull-left">
<label>创建时间:</label>
</div>
<div class="pull-left">
<input id="beginDate" name="beginDate" type="text" readonly="readonly" maxlength="20" class="form-control input-small Wdate"
value="<fmt:formatDate value="${sysDictInfo.beginDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
</div>
<div class="pull-left">
<label>到</label>
</div>
<div class="pull-left">
<input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" class="form-control input-small Wdate"
value="<fmt:formatDate value="${sysDictInfo.endDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
</div>
</div>
<div class="col-md-6">
<div class="pull-left">
<label>修改时间:</label>
</div>
<div class="pull-left">
<input id="editBeginDate" name="editBeginDate" type="text" readonly="readonly" maxlength="20" class="form-control input-small Wdate"
value="<fmt:formatDate value="${sysDictInfo.beginDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
</div>
<div class="pull-left">
<label>到</label>
</div>
<div class="pull-left">
<input id="editEndDate" name="editEndDate" type="text" readonly="readonly" maxlength="20" class="form-control input-small Wdate"
value="<fmt:formatDate value="${sysDictInfo.endDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
</div>
</div>
</div>
<h5 class="page-header"></h5>
<div class="row">
<div class="pull-left">
<button type="button" class="btn blue" onclick="page2()"> <i class="fa fa-search"></i> 搜索 </button>
<button type="button" class="btn btn-default" onclick="reset()"> <i class="fa fa-refresh"></i> 重置 </button>
</div>
</div>
</div>
<!-- /筛选搜索内容栏 结束-->
</form:form>
</div>
<!-- <div class="table-responsive"> -->
<sys:message content="${message}"/>
<table id="treeTable" class="table table-striped table-bordered table-condensed">
<thead>
<tr>
<th><input type="checkbox" class="ckboxs"></th>
<th>序号</th>
<th><spring:message code="item_code"/></th>
<th><spring:message code="config_content"/></th>
<th><spring:message code="desc"/></th>
<th><spring:message code="item_type"/></th>
<th><spring:message code="is_leaf"/></th>
<th><spring:message code="creator"/></th>
<th><spring:message code="create_time"/>
</th><th><spring:message code="editor"/></th>
<th><spring:message code="edit_time"/></th>
<shiro:hasPermission name="sys:menu:edit"><th><spring:message code="operation"/></th></shiro:hasPermission>
</tr>
</thead>
<tbody>
<c:forEach items="${list}" var="sysDictInfo" varStatus="se">
<tr id="${sysDictInfo.sysDictId}" pId="${sysDictInfo.parent.sysDictId ne 0?sysDictInfo.parent.sysDictId:0}">
<td><input type="checkbox" class="ckbox" name="check" value="${sysDictInfo.sysDictId}"></td>
<td>${fns:getNumberResult(se.count,page.pageNo,page.pageSize) }</td>
<td nowrap><i class="icon-icon-tablet"></i><a href="${ctx}/basics/sysDictInfo/form?sysDictId=${sysDictInfo.sysDictId}&doAction=0">${sysDictInfo.itemCode}</a></td>
<td>${sysDictInfo.itemValue}</td>
<td title="${sysDictInfo.itemDesc}">${fns:abbr(sysDictInfo.itemDesc,15)}</td>
@@ -120,17 +276,14 @@
</div>
</td>
</tr>
</c:forEach></tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</c:forEach>
</tbody>
</table>
<div class="page">${page}</div>
</div>
</div>
</div>
</div>
</div>
<div class="page">${page}</div>
</body>
</html>