(1)字符串类配置修改支持批量操作
(2)字符串类配置权限增加
This commit is contained in:
@@ -70,7 +70,7 @@ public class IpCfgController extends BaseController{
|
||||
// return ipCfgList(model,Constants.AUDIT_PAGE,cfgName,ipCfg,request,response);
|
||||
// }
|
||||
@RequestMapping(value = {"list"})
|
||||
@RequiresPermissions(value={"cfg:ip:view"},logical=Logical.OR)
|
||||
@RequiresPermissions(value={"cfg:ip:view"})
|
||||
public String ipCfgList(Model model,Integer audit,String cfgName,@ModelAttribute("ipCfg")BaseIpCfg ipCfg,HttpServletRequest request,HttpServletResponse response) {
|
||||
model.addAttribute("cfgName", cfgName);
|
||||
model.addAttribute("audit", audit);
|
||||
@@ -130,7 +130,7 @@ public class IpCfgController extends BaseController{
|
||||
*/
|
||||
@RequestMapping(value = {"form"})
|
||||
@RequiresPermissions("cfg:ip:add")
|
||||
public String ipCfgForm(int action,String cfgName,Integer serviceId,Model model,HttpServletRequest request,HttpServletResponse response) {
|
||||
public String ipCfgForm(int action,String cfgName,Integer serviceId,Model model) {
|
||||
model.addAttribute("cfgName", cfgName);
|
||||
model.addAttribute("serviceId", serviceId);
|
||||
model.addAttribute("action", action);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package com.nis.web.controller.configuration;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@@ -6,6 +7,8 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.authz.annotation.Logical;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
@@ -14,6 +17,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.ServiceConfigInfo;
|
||||
import com.nis.domain.configuration.AreaIpCfg;
|
||||
import com.nis.domain.configuration.BaseIpCfg;
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.web.controller.BaseController;
|
||||
@@ -26,8 +30,23 @@ import com.nis.web.controller.BaseController;
|
||||
@Controller
|
||||
@RequestMapping("${adminPath}/cfg/string")
|
||||
public class StringCfgController extends BaseController{
|
||||
|
||||
/**
|
||||
*
|
||||
* stringCfgList(列表界面)
|
||||
* (这里描述这个方法适用条件 – 可选)
|
||||
* @param model
|
||||
* @param audit
|
||||
* @param cfgName
|
||||
* @param stringCfg
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*String
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@RequestMapping(value = {"list"})
|
||||
@RequiresPermissions(value={"cfg:string:view"})
|
||||
public String stringCfgList(Model model,Integer audit,String cfgName,@ModelAttribute("cfg")BaseStringCfg stringCfg,HttpServletRequest request,HttpServletResponse response) {
|
||||
model.addAttribute("cfgName", cfgName);
|
||||
model.addAttribute("audit", audit);
|
||||
@@ -42,7 +61,21 @@ public class StringCfgController extends BaseController{
|
||||
if(!StringUtils.isBlank(tableName)){
|
||||
logger.info("table name is "+tableName);
|
||||
stringCfg.setTableName(tableName);
|
||||
Page<BaseStringCfg> page = stringCfgService.findPage(new Page<BaseStringCfg>(request,response,"r"), stringCfg);
|
||||
Page<BaseStringCfg> searchPage=new Page<BaseStringCfg>(request,response,"r");
|
||||
String addWhrere=null;
|
||||
if(audit==Constants.CFG_PAGE){//
|
||||
addWhrere="r.is_audit in ("+Constants.AUDIT_NOT_YET+","+Constants.AUDIT_NO+")";
|
||||
}else if(audit==Constants.AUDIT_PAGE){
|
||||
addWhrere="r.is_audit in ("+Constants.AUDIT_NOT_YET+","+Constants.AUDIT_YES+")";
|
||||
}
|
||||
if(addWhrere!=null){
|
||||
if(StringUtils.isNotBlank(searchPage.getWhere())){
|
||||
searchPage.setWhere(searchPage.getWhere()+" AND "+addWhrere);
|
||||
}else{
|
||||
searchPage.setWhere(addWhrere);
|
||||
}
|
||||
}
|
||||
Page<BaseStringCfg> page = stringCfgService.findPage(searchPage, stringCfg);
|
||||
model.addAttribute("page", page);
|
||||
model.addAttribute("action", stringCfg.getAction());
|
||||
model.addAttribute("tableName", tableName);
|
||||
@@ -57,7 +90,8 @@ public class StringCfgController extends BaseController{
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"form"})
|
||||
public String stringCfgForm(int action,String cfgName,Integer serviceId,Model model,HttpServletRequest request,HttpServletResponse response) {
|
||||
@RequiresPermissions(value={"cfg:string:add"})
|
||||
public String stringCfgForm(int action,String cfgName,Integer serviceId,Model model) {
|
||||
model.addAttribute("cfgName", cfgName);
|
||||
model.addAttribute("action", action);
|
||||
model.addAttribute("serviceId", serviceId);
|
||||
@@ -101,7 +135,8 @@ public class StringCfgController extends BaseController{
|
||||
return "/cfg/stringCfgForm";
|
||||
}
|
||||
@RequestMapping(value = {"updateForm"})
|
||||
public String updateStringCfgForm(String tableName,int action,long cfgId,String cfgName,Integer serviceId,Model model) {
|
||||
@RequiresPermissions(value={"cfg:string:edit"})
|
||||
public String updateStringCfgForm(String tableName,int action,int compileId,String cfgName,Integer serviceId,Model model) {
|
||||
model.addAttribute("cfgName", cfgName);
|
||||
model.addAttribute("serviceId", serviceId);
|
||||
model.addAttribute("action", action);
|
||||
@@ -116,9 +151,9 @@ public class StringCfgController extends BaseController{
|
||||
}
|
||||
logger.info("table name is "+tableName);
|
||||
BaseStringCfg searchBean=new BaseStringCfg();
|
||||
searchBean.setCfgId(cfgId);
|
||||
searchBean.setCompileId(compileId);
|
||||
searchBean.setTableName(tableName);
|
||||
BaseStringCfg stringCfg=stringCfgService.getStringCfgById(searchBean);
|
||||
BaseStringCfg stringCfg=stringCfgService.get(searchBean);
|
||||
model.addAttribute("_cfg", stringCfg);
|
||||
model.addAttribute("tableName", tableName);
|
||||
initUpdateFormCondition(model,stringCfg);
|
||||
@@ -140,6 +175,7 @@ public class StringCfgController extends BaseController{
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@RequestMapping(value = {"saveOrUpdateCfg"})
|
||||
@RequiresPermissions(value={"cfg:string:add","cfg:string:edit"},logical=Logical.OR)
|
||||
public String saveOrUpdateStringCfg(String cfgName,Model model, BaseStringCfg stringCfg,String areaCfgIds) {
|
||||
model.addAttribute("cfgName",cfgName);
|
||||
model.addAttribute("cfgType","string");
|
||||
@@ -166,52 +202,65 @@ public class StringCfgController extends BaseController{
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@RequestMapping(value = {"auditCfg"})
|
||||
public String auditStringCfg(String cfgName,BaseStringCfg stringCfg,Model model) {
|
||||
@RequestMapping(value = {"audit"})
|
||||
@RequiresPermissions(value={"cfg:string:audit"})
|
||||
public String auditStringCfg(String cfgName,int serviceId,int isAudit,int action,String tableName,String ids,Model model) {
|
||||
model.addAttribute("cfgName", cfgName);
|
||||
model.addAttribute("audit", Constants.AUDIT_PAGE);
|
||||
model.addAttribute("cfgType","string");
|
||||
model.addAttribute("serviceId", stringCfg.getServiceId());
|
||||
model.addAttribute("action", stringCfg.getAction());
|
||||
model.addAttribute("serviceId", serviceId);
|
||||
model.addAttribute("action", action);
|
||||
try{
|
||||
String tableName=stringCfg.getTableName();
|
||||
int serviceId=stringCfg.getServiceId();
|
||||
String maatTable=null;
|
||||
ServiceConfigInfo serviceConfigInfo=serviceConfigInfoService.findSysServiceConfigInfo(serviceId);
|
||||
if(serviceConfigInfo!=null){
|
||||
if(StringUtils.isBlank(tableName)){
|
||||
tableName=serviceConfigInfo.getTableName();
|
||||
stringCfg.setTableName(tableName);
|
||||
}
|
||||
maatTable=serviceConfigInfo.getMaatTable();
|
||||
}
|
||||
|
||||
BaseStringCfg bean=stringCfgService.getStringCfgById(stringCfg);
|
||||
if(StringUtils.isNotBlank(ids)){
|
||||
List<BaseStringCfg> beans=stringCfgService.getList(tableName,ids);
|
||||
List<BaseStringCfg> auditBeans=new ArrayList<>();
|
||||
List<AreaIpCfg> auditAreaBeans=new ArrayList<>();
|
||||
Date date=new Date();
|
||||
for(BaseStringCfg bean:beans){
|
||||
BaseStringCfg auditBean=new BaseStringCfg();
|
||||
auditBean.setTableName(tableName);
|
||||
auditBean.setCfgId(bean.getCfgId());
|
||||
bean.setTableName(tableName);
|
||||
int audit=bean.getIsAudit().intValue();
|
||||
if(audit==Constants.AUDIT_YES&&stringCfg.getIsAudit()!=Constants.AUDIT_NOT_YES){
|
||||
if(audit==Constants.AUDIT_YES&&isAudit!=Constants.AUDIT_NOT_YES){
|
||||
logger.error("审核通过的配置只能取消审核通过!");
|
||||
addMessage(model, "audit_failed");
|
||||
return "/cfg/resultPage";
|
||||
}else{
|
||||
stringCfg.setAuditorId(stringCfg.getCurrentUser().getId());
|
||||
stringCfg.setAuditTime(new Date());
|
||||
bean.setIsAudit(stringCfg.getIsAudit());
|
||||
if(stringCfg.getIsAudit()==Constants.AUDIT_NOT_YES){//取消审核通过,设置有效标志为0
|
||||
stringCfg.setIsValid(Constants.VALID_NO);
|
||||
auditBean.setAuditorId(bean.getCurrentUser().getId());
|
||||
auditBean.setAuditTime(date);
|
||||
auditBean.setIsAudit(isAudit);
|
||||
bean.setAuditorId(bean.getCurrentUser().getId());
|
||||
bean.setAuditTime(date);
|
||||
bean.setIsAudit(isAudit);
|
||||
if(isAudit==Constants.AUDIT_NOT_YES){//取消审核通过,设置有效标志为0
|
||||
auditBean.setIsValid(Constants.VALID_NO);
|
||||
auditBean.setMaatTable(maatTable);
|
||||
bean.setIsValid(Constants.VALID_NO);
|
||||
bean.setMaatTable(maatTable);
|
||||
}else if(stringCfg.getIsAudit()==Constants.AUDIT_YES){//审核通过,设置有效标志为1
|
||||
stringCfg.setIsValid(Constants.VALID_YES);
|
||||
}else if(isAudit==Constants.AUDIT_YES){//审核通过,设置有效标志为1
|
||||
auditBean.setIsValid(Constants.VALID_YES);
|
||||
auditBean.setMaatTable(maatTable);
|
||||
bean.setIsValid(Constants.VALID_YES);
|
||||
bean.setMaatTable(maatTable);
|
||||
}
|
||||
int result=stringCfgService.auditStringCfg(bean,stringCfg);
|
||||
if(result!=0){
|
||||
List<AreaIpCfg> areaCfg=ipCfgService.getAreaCfgByCompileId(bean.getCompileId());
|
||||
bean.setAreaCfg(areaCfg);
|
||||
auditAreaBeans.addAll(areaCfg);
|
||||
}
|
||||
auditBeans.add(auditBean);
|
||||
}
|
||||
stringCfgService.auditStringCfg(isAudit,auditBeans,auditAreaBeans,beans);
|
||||
}
|
||||
addMessage(model,"audit_success");
|
||||
}else{
|
||||
addMessage(model,"audit_failed");
|
||||
}
|
||||
|
||||
}
|
||||
}catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
logger.error("审核失败", e);
|
||||
@@ -228,8 +277,9 @@ public class StringCfgController extends BaseController{
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@RequestMapping(value = {"deleteCfg"})
|
||||
public String deleteStringCfg(String tableName,int action,long cfgId,int compileId,String cfgName,Integer serviceId,Model model) {
|
||||
@RequestMapping(value = {"delete"})
|
||||
@RequiresPermissions(value={"cfg:string:delete"})
|
||||
public String deleteStringCfg(String tableName,int action,String ids,String cfgName,Integer serviceId,Model model) {
|
||||
model.addAttribute("serviceId", serviceId);
|
||||
model.addAttribute("cfgName", cfgName);
|
||||
model.addAttribute("action", action);
|
||||
@@ -244,33 +294,31 @@ public class StringCfgController extends BaseController{
|
||||
}
|
||||
}
|
||||
model.addAttribute("tableName", tableName);
|
||||
int audit=stringCfgService.getIsAudit(tableName,cfgId);
|
||||
List<AreaIpCfg> areaCfg=ipCfgService.getAreaCfgByCompileId(compileId);
|
||||
List<BaseStringCfg> stringCfgs=new ArrayList<BaseStringCfg>();
|
||||
List<AreaIpCfg> areaCfgs=new ArrayList<AreaIpCfg>();
|
||||
Date date =new Date();
|
||||
if(StringUtils.isNotBlank(ids)){
|
||||
for(String compileIdStr:ids.split(",")){
|
||||
List<AreaIpCfg> areaCfg=ipCfgService.getAreaCfgByCompileId(Integer.parseInt(compileIdStr));
|
||||
if(areaCfg!=null&&areaCfg.size()>0){
|
||||
for(AreaIpCfg c:areaCfg){
|
||||
c.setTableName(AreaIpCfg.getTablename());
|
||||
c.setEditorId(c.getCurrentUser().getId());
|
||||
c.setEditTime(date);
|
||||
}
|
||||
}
|
||||
//未审核时可删除
|
||||
if(audit!=Constants.AUDIT_YES&&audit!=Constants.AUDIT_NOT_YES){
|
||||
areaCfgs.addAll(areaCfg);
|
||||
BaseStringCfg stringCfg=new BaseStringCfg();
|
||||
stringCfg.setCfgId(cfgId);
|
||||
stringCfg.setCompileId(Integer.parseInt(compileIdStr));
|
||||
stringCfg.setTableName(tableName);
|
||||
stringCfg.setEditorId(stringCfg.getCurrentUser().getId());
|
||||
stringCfg.setEditTime(new Date());
|
||||
stringCfg.setEditTime(date);
|
||||
stringCfg.setIsValid(Constants.VALID_DEL);
|
||||
int result=stringCfgService.deleteStringCfg(stringCfg, areaCfg);
|
||||
if(result==0){
|
||||
addMessage(model,"delete_failed");
|
||||
}else{
|
||||
stringCfgs.add(stringCfg);
|
||||
}
|
||||
}
|
||||
stringCfgService.deleteStringCfg(stringCfgs,areaCfgs);
|
||||
addMessage(model,"delete_success");
|
||||
}
|
||||
|
||||
}else{
|
||||
logger.error("通过审核/取消审核通过的配置不能删除!");
|
||||
addMessage(model,"delete_failed");
|
||||
}
|
||||
|
||||
}catch(Exception e){
|
||||
logger.error("删除失败",e);
|
||||
addMessage(model,"delete_failed");
|
||||
|
||||
@@ -27,4 +27,5 @@ public interface StringCfgDao extends CrudDao<BaseStringCfg>{
|
||||
public int getIsAudit(@Param("tableName")String tableName,@Param("cfgId")Long id);
|
||||
public int getIsAudit(BaseStringCfg entity);
|
||||
public int deleteByCompileId(BaseStringCfg entity);
|
||||
public List<BaseStringCfg> getList(@Param("tableName")String tableName, @Param("ids")String ids);
|
||||
}
|
||||
|
||||
@@ -121,6 +121,11 @@
|
||||
AND IS_VALID!=-1
|
||||
</trim>
|
||||
</select>
|
||||
<select id="getList" resultMap="BaseStringMap">
|
||||
SELECT
|
||||
<include refid="BaseStringCfg_Column_List_with_id" />
|
||||
FROM ${tableName} WHERE IS_VALID!=-1 AND COMPILE_ID in (${ids})
|
||||
</select>
|
||||
|
||||
<select id="findList" resultMap="BaseStringMapWithUser">
|
||||
select
|
||||
@@ -432,4 +437,15 @@
|
||||
<update id="deleteByCompileId" parameterType="com.nis.domain.configuration.BaseStringCfg" >
|
||||
update ${tableName} set is_valid = -1, editor_id = #{editorId,jdbcType=INTEGER} , edit_time = #{editTime,jdbcType=TIMESTAMP} where compile_id = #{compileId,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="delete" parameterType="com.nis.domain.configuration.BaseStringCfg" >
|
||||
update ${tableName} set is_valid = -1, editor_id = #{editorId,jdbcType=INTEGER} , edit_time = #{editTime,jdbcType=TIMESTAMP}
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
<if test="cfgId !=null ">
|
||||
AND cfg_id = #{cfgId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="compileId !=null ">
|
||||
AND compile_id = #{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
</trim>
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.nis.web.service.configuration;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -7,8 +8,11 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.nis.domain.configuration.AreaIpCfg;
|
||||
import com.nis.domain.configuration.BaseCfg;
|
||||
import com.nis.domain.configuration.BaseIpCfg;
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.web.dao.configuration.IpCfgDao;
|
||||
import com.nis.web.dao.configuration.StringCfgDao;
|
||||
import com.nis.web.service.CrudService;
|
||||
|
||||
@@ -73,16 +77,24 @@ public class StringCfgService extends CrudService<StringCfgDao,BaseStringCfg> {
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public int auditStringCfg(BaseStringCfg sendCfg,BaseStringCfg baseStringCfg) throws Exception{
|
||||
if(Constants.AUDIT_NOT_YES==baseStringCfg.getIsAudit().intValue()||
|
||||
Constants.AUDIT_YES==baseStringCfg.getIsAudit().intValue()){//审核通过,取消审核通过需要发到maat
|
||||
if(sendToMaatConvertor(baseStringCfg.getIsAudit(),null,sendCfg)){
|
||||
return stringCfgDao.audit(baseStringCfg);
|
||||
public void auditStringCfg(int isAduit,List<BaseStringCfg> auditCfg,List<AreaIpCfg> areaCfg,List<BaseStringCfg> sendCfg) throws Exception{
|
||||
List<BaseCfg[]> sendCfgs=new ArrayList<BaseCfg[]>();
|
||||
for(BaseStringCfg c:sendCfg){
|
||||
BaseStringCfg[] cArr=new BaseStringCfg[1];
|
||||
cArr[0]=c;
|
||||
sendCfgs.add(cArr);
|
||||
}
|
||||
if(Constants.AUDIT_NOT_YES==isAduit||
|
||||
Constants.AUDIT_YES==isAduit){//审核通过,取消审核通过需要发到maat
|
||||
if(sendToMaatConvertorBatch(isAduit,sendCfgs)){
|
||||
if(areaCfg!=null&&areaCfg.size()>0){
|
||||
this.auditIpBatch(areaCfg);
|
||||
}
|
||||
this.auditBatch(auditCfg, StringCfgDao.class);
|
||||
}
|
||||
}else{
|
||||
return stringCfgDao.audit(baseStringCfg);
|
||||
this.auditBatch(auditCfg, IpCfgDao.class);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
/**
|
||||
*
|
||||
@@ -95,11 +107,11 @@ public class StringCfgService extends CrudService<StringCfgDao,BaseStringCfg> {
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public int deleteStringCfg(BaseStringCfg baseStringCfg,List<AreaIpCfg> areaCfg){
|
||||
public void deleteStringCfg(List<BaseStringCfg> stringCfg,List<AreaIpCfg> areaCfg){
|
||||
if(areaCfg!=null&&areaCfg.size()>0){
|
||||
this.deleteIpBatch(areaCfg);
|
||||
}
|
||||
return stringCfgDao.updateValid(baseStringCfg);
|
||||
this.deleteBatch(stringCfg, StringCfgDao.class);
|
||||
}
|
||||
/**
|
||||
*
|
||||
@@ -127,4 +139,18 @@ public class StringCfgService extends CrudService<StringCfgDao,BaseStringCfg> {
|
||||
public Integer getIsAudit(String tableName, long id){
|
||||
return stringCfgDao.getIsAudit(tableName,id);
|
||||
}
|
||||
/**
|
||||
* getList(这里用一句话描述这个方法的作用)
|
||||
* (这里描述这个方法适用条件 – 可选)
|
||||
* @param tableName
|
||||
* @param ids
|
||||
* @return
|
||||
*List<BaseStringCfg>
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public List<BaseStringCfg> getList(String tableName, String ids) {
|
||||
// TODO Auto-generated method stub
|
||||
return stringCfgDao.getList(tableName,ids);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,9 +129,8 @@
|
||||
<!-- <button type="button" class="btn btn-default">
|
||||
<i class="fa fa-download"></i> 导出</button> -->
|
||||
</c:if>
|
||||
|
||||
<shiro:hasPermission name="cfg:ip:audit">
|
||||
<c:if test="${audit==1}">
|
||||
<shiro:hasPermission name="cfg:ip:audit">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fa fa-wrench"></i> <spring:message code="examine"></spring:message>
|
||||
@@ -143,8 +142,9 @@
|
||||
<li><sys:delRow url="${ctx}/cfg/ip/audit?serviceId=${serviceId}&action=${action}&tableName=${tableName}&cfgName=${cfgName}&isAudit=3" id="contentTable" label="cancelPass"></sys:delRow></li>
|
||||
</ul>
|
||||
</div>
|
||||
</c:if>
|
||||
</shiro:hasPermission>
|
||||
</c:if>
|
||||
|
||||
<a class="btn btn-icon-only btn-default setfields tooltips"
|
||||
data-container="body" data-placement="top" data-original-title=<spring:message code="custom_columns"/> href="javascript:;">
|
||||
<i class="icon-wrench"></i>
|
||||
|
||||
@@ -33,14 +33,18 @@
|
||||
$("#searchForm")[0].reset();
|
||||
});
|
||||
});
|
||||
//查询
|
||||
function page(n,s){
|
||||
$("#intype").attr("name",$("#seltype").val());
|
||||
|
||||
$("#pageNo").val(n);
|
||||
$("#pageSize").val(s);
|
||||
$("#searchForm").submit();
|
||||
return false;
|
||||
var edit=function(url){
|
||||
var cked = $('tbody tr td input.i-checks:checkbox:checked');
|
||||
if(cked.val()==1){
|
||||
top.$.jBox.tip("<spring:message code='has_approved'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}
|
||||
if(cked.length==1){
|
||||
window.location = url+"&compileId="+cked.attr("id");
|
||||
}else{
|
||||
top.$.jBox.tip("<spring:message code='check_one'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
@@ -50,10 +54,12 @@
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
<%-- <button type="button" class="btn btn-default" onclick="location='${ctx}/cfg/string/list?serviceId=${serviceId}&action=${action}&cfgName=${cfgName}'"><spring:message code="refresh"></spring:message></button> --%>
|
||||
<c:if test="${audit==0}">
|
||||
<shiro:hasPermission name="cfg:string:add">
|
||||
<button type="button" class="btn btn-primary"
|
||||
onClick="javascript:window.location='${ctx}/cfg/string/form?serviceId=${serviceId}&action=${action}&cfgName=${cfgName}&audit=${audit}'">
|
||||
<i class="fa fa-plus"></i>
|
||||
<spring:message code="add"></spring:message></button>
|
||||
</shiro:hasPermission>
|
||||
</c:if>
|
||||
</div>
|
||||
|
||||
@@ -106,29 +112,38 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<%-- <button type="button" class="btn btn-default btn-sm" onclick="return page()">
|
||||
<i class="fa fa-edit"></i><spring:message code="search"></spring:message>
|
||||
</button> --%>
|
||||
<%-- <div class="pull-left">
|
||||
<select name="orderBy" class="selectpicker select2 input-small">
|
||||
<option value="" <c:if test="${empty page.orderBy}">selected</c:if> ><spring:message code="sort"/></option>
|
||||
<option value="${page.alias}.create_time asc" <c:if test="${fn:contains(page.orderBy,'create_time asc') }">selected</c:if> ><spring:message code="createTime_asc"/></option>
|
||||
<option value="${page.alias}.create_time desc" <c:if test="${fn:contains(page.orderBy , 'create_time desc') }">selected</c:if> ><spring:message code="createTime_desc"/></option>
|
||||
<option value="${page.alias}.edit_time asc" <c:if test="${fn:contains(page.orderBy , 'edit_time asc') }">selected</c:if> ><spring:message code="editTime_asc"/></option>
|
||||
<option value="${page.alias}.edit_time desc" <c:if test="${fn:contains(page.orderBy , 'edit_time desc') }">selected</c:if> ><spring:message code="editTime_desc"/></option>
|
||||
<option value="${page.alias}.audit_time asc" <c:if test="${fn:contains(page.orderBy , 'audit_time asc') }">selected</c:if> ><spring:message code="auditTime_asc"/></option>
|
||||
<option value="${page.alias}.audit_time desc" <c:if test="${fn:contains(page.orderBy , 'audit_time desc') }">selected</c:if> ><spring:message code="auditTime_desc"/></option>
|
||||
</select>
|
||||
</div> --%>
|
||||
<div class="pull-left">
|
||||
<button type="button" class="btn blue" onClick="return page()"> <i class="fa fa-search"></i> <spring:message code="search"/> </button>
|
||||
<button type="button" class="btn btn-default" id="resetBtn"> <i class="fa fa-refresh"></i> <spring:message code="reset"/> </button>
|
||||
<button type="button" class="btn btn-default" id="filter-btn"> 筛选 <i class="fa fa-angle-double-down"></i></button>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<c:if test="${audit==0}">
|
||||
<shiro:hasPermission name="cfg:string:edit">
|
||||
<button type="button" class="btn btn-default" onClick="edit('${ctx}/cfg/string/updateForm?serviceId=${serviceId}&action=${action}&tableName=${tableName}&cfgName=${cfgName}')">
|
||||
<i class="fa fa-edit"></i> <spring:message code="edit"></spring:message></button>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="cfg:string:delete">
|
||||
<sys:delRow url="${ctx}/cfg/string/delete?serviceId=${serviceId}&action=${action}&tableName=${tableName}&cfgName=${cfgName}" id="contentTable" label="delete"></sys:delRow>
|
||||
</shiro:hasPermission>
|
||||
<!-- <button type="button" class="btn btn-default">
|
||||
<i class="fa fa-download"></i> 导出</button> -->
|
||||
</c:if>
|
||||
<c:if test="${audit==1}">
|
||||
<shiro:hasPermission name="cfg:string:audit">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fa fa-wrench"></i> <spring:message code="examine"></spring:message>
|
||||
<i class="fa fa-angle-down"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right">
|
||||
<li><sys:delRow url="${ctx}/cfg/string/audit?serviceId=${serviceId}&action=${action}&tableName=${tableName}&cfgName=${cfgName}&isAudit=1" id="contentTable" label="approved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/cfg/string/audit?serviceId=${serviceId}&action=${action}&tableName=${tableName}&cfgName=${cfgName}&isAudit=2" id="contentTable" label="unapproved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/cfg/string/audit?serviceId=${serviceId}&action=${action}&tableName=${tableName}&cfgName=${cfgName}&isAudit=3" id="contentTable" label="cancelPass"></sys:delRow></li>
|
||||
</ul>
|
||||
</div>
|
||||
</shiro:hasPermission>
|
||||
</c:if>
|
||||
<a class="btn btn-icon-only btn-default setfields tooltips"
|
||||
data-container="body" data-placement="top" data-original-title=<spring:message code="custom_columns"/> href="javascript:;">
|
||||
<i class="icon-wrench"></i>
|
||||
@@ -140,7 +155,6 @@
|
||||
<!-- 筛选搜索内容栏默认隐藏-->
|
||||
<div class="col-md-12 filter-action-select-panle hide" >
|
||||
<div class="row">
|
||||
|
||||
<c:choose>
|
||||
<c:when test="${action==5}">
|
||||
</c:when>
|
||||
@@ -172,9 +186,7 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='attribute'/></label>
|
||||
<form:select path="attribute" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
@@ -184,11 +196,8 @@
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='label'/></label>
|
||||
<form:select path="lable" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
@@ -198,15 +207,10 @@
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
@@ -215,7 +219,6 @@
|
||||
value="<fmt:formatDate value='${cfg.search_create_time_start}' pattern='yyyy-MM-dd HH:mm:ss'/>" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
@@ -224,47 +227,36 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="edit_time"/>:</label>
|
||||
<input name="search_edit_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_edit_time_start}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_edit_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_edit_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="audit_time"/>:</label>
|
||||
<input name="search_audit_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_audit_time_start}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_audit_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_audit_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<!-- /筛选搜索内容栏 结束-->
|
||||
</form:form>
|
||||
</div>
|
||||
@@ -272,6 +264,7 @@
|
||||
<table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input type="checkbox" class="i-checks" id="checkAll"></th>
|
||||
<%-- <th><spring:message code="seq"/></th> --%>
|
||||
<th><spring:message code="config_describe"/></th>
|
||||
<th><spring:message code="key_word"/></th>
|
||||
@@ -295,12 +288,13 @@
|
||||
<th class="sort-column r.edit_time"><spring:message code="edit_time"/></th>
|
||||
<th><spring:message code="auditor"/></th>
|
||||
<th class="sort-column r.audit_time"><spring:message code="audit_time"/></th>
|
||||
<th><spring:message code="operation"></spring:message></th>
|
||||
<%-- <th><spring:message code="operation"></spring:message></th> --%>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach items="${page.list }" var="cfg" varStatus="status" step="1">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="i-checks" id="${cfg.compileId}" value="${cfg.isAudit}"></td>
|
||||
<%-- <td>${status.index+1 }</td> --%>
|
||||
<td>${cfg.cfgDesc }</td>
|
||||
<td>${cfg.cfgKeywords }</td>
|
||||
@@ -366,7 +360,7 @@
|
||||
<td><fmt:formatDate value="${cfg.editTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${cfg.auditorName }</td>
|
||||
<td><fmt:formatDate value="${cfg.auditTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>
|
||||
<%-- <td>
|
||||
<div class="btn-group btn-xs">
|
||||
<a class="btn btn-primary btn-xs dropdown-toggle" data-toggle="dropdown" href="#"><spring:message code="operation"></spring:message><span class="caret"></span></a>
|
||||
<ul class="dropdown-menu btn-xs">
|
||||
@@ -394,7 +388,7 @@
|
||||
</c:if>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</td> --%>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</tbody>
|
||||
|
||||
Reference in New Issue
Block a user