diff --git a/lib/finekit-10.0-20200430.jar b/lib/finekit-10.0-20200430.jar deleted file mode 100644 index 083faf3..0000000 Binary files a/lib/finekit-10.0-20200430.jar and /dev/null differ diff --git a/lib/finekit-10.0-20200612.jar b/lib/finekit-10.0-20200612.jar new file mode 100644 index 0000000..fcda4ac Binary files /dev/null and b/lib/finekit-10.0-20200612.jar differ diff --git a/plugin.xml b/plugin.xml index 5af221d..96b8f0b 100644 --- a/plugin.xml +++ b/plugin.xml @@ -4,13 +4,14 @@ yes no - 1.0.1 - 10.0~ - 2020-5-1 + 1.1.0 + 10.0 + 2020-6-8 finereport [2019-04-28]实现批量设置角色逻辑

+

[2020-06-12]适配按职位分配权限

+

[2020-06-08]实现批量设置角色逻辑

]]>
diff --git a/pom.xml b/pom.xml index af21dad..2fb5e87 100644 --- a/pom.xml +++ b/pom.xml @@ -3,27 +3,15 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - - - com.fr.decision - decision-feature - 10.0 - compile - - - com.fr.decision - decision-feature - 10.0 - compile - - com.fr.plugin starter 10.0 jar - decision.message.event + plugin-decision-batch-role + + ${project.basedir}/../webroot/WEB-INF/plugins/plugin-com.fr.plugin.decision.batch.role-1.0/classes diff --git a/src/main/java/com/fr/plugin/decision/role/auth/BatchRoleController.java b/src/main/java/com/fr/plugin/decision/role/auth/BatchRoleController.java index 70ba07a..39879c3 100644 --- a/src/main/java/com/fr/plugin/decision/role/auth/BatchRoleController.java +++ b/src/main/java/com/fr/plugin/decision/role/auth/BatchRoleController.java @@ -27,6 +27,7 @@ public class BatchRoleController { private static final String DEP = "depost"; private static final String ROLE = "role"; private static final String USER = "user"; + private static final String POST = "post"; @RequestMapping(value = "/batch/role", method = RequestMethod.POST) @ResponseBody @@ -45,6 +46,8 @@ public class BatchRoleController { AuthorityKit.setUserAuth(bean.getRoleId(), bean.getAuthValue(), roleId, bean.getAuthType()); } else if (ROLE.equals(roleType)) { AuthorityKit.setCustomRoleAuth(bean.getRoleId(), bean.getAuthValue(), roleId, bean.getAuthType()); + } else if (POST.equals(roleType)) { + AuthorityKit.setPostAuth(bean.getRoleId(), bean.getAuthValue(), roleId, bean.getAuthType()); } } diff --git a/src/main/resources/com/fr/plugin/decision/batch/role/plugin.min.js b/src/main/resources/com/fr/plugin/decision/batch/role/plugin.min.js index 8524c71..760a23d 100644 --- a/src/main/resources/com/fr/plugin/decision/batch/role/plugin.min.js +++ b/src/main/resources/com/fr/plugin/decision/batch/role/plugin.min.js @@ -1,2 +1,2 @@ -/** simple-template 20-05-09 17:10:41 */ -!function(){var t=BI.inherit(BI.BasicButton,{props:{baseCls:"",text:"",items:[{value:!0,text:BI.i18nText("Dec-Plugin_Authority_Role_Full_Authorization")},{value:!1,text:BI.i18nText("Dec-Plugin_Authority_Role_De_Authorization")}]},render:function(){var e=this,t=this.options;return{type:"bi.center_adapt",items:[{type:"bi.combo",trigger:"click",adjustXOffset:60,adjustYOffset:-8,el:{type:"bi.vertical_adapt",height:36,items:[{type:"bi.label",text:t.text,ref:function(t){e.text=t}},{type:"bi.icon_button",height:16,tgap:5,cls:"trigger-triangle-font",ref:function(t){e.trigger=t}}]},popup:{el:{type:"bi.vertical",items:[{type:"bi.text_value_combo_popup",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,items:t.items,textAlign:"center",listeners:[{eventName:BI.IconComboPopup.EVENT_CHANGE,action:function(){e.combo.hideView(),e.fireEvent("EVENT_CHANGE",this.getValue()[0]),this.setValue()}}]}]}},ref:function(t){e.combo=t}}]}},doHighLight:function(){this.text.doHighLight()},unHighLight:function(){this.text.unHighLight()}});BI.shortcut("dec.plugin.role.list.header.auth",t)}(),Dec.Utils=Dec.Utils||{},BI.extend(Dec.Utils,{setPluginRoleAuthority:function(t,e){Dec.reqPost("/batch/role",t,e)}}),function(){var t=BI.inherit(BI.NodeButton,{props:{baseCls:"dec-expander-trigger bi-background",texts:[],items:[],iconWidth:30},_store:function(){return BI.Models.getModel("dec.model.plugin.role.trigger")},watch:{status:function(t){this.statusMasker&&this.statusMasker.setStatus(t)}},render:function(){var e=this,i=this.options;return{type:"bi.htape",items:[{el:{type:"dec.screening.combo",ref:function(t){e.combo=t},text:i.texts.all,defaultValue:1,items:[{text:i.texts.all,iconCls1:"check-mark-e-font",value:1},{text:i.texts.onlyOpen,iconCls1:"check-mark-e-font",value:2}],listeners:[{eventName:"EVENT_CHANGE",action:function(){}}]}},{el:{type:"bi.button_group",ref:function(t){e.authItemsGroup=t},layouts:[{type:"bi.right_vertical_adapt"}],items:this._formatItems(i.items)},width:300},{el:{type:"dec.display.selector",ref:function(t){e.displaySelecter=t},items:i.items,listeners:[{eventName:"EVENT_CHANGE",action:function(t){i.onAuthItemsChange(t)}}]},width:30},{type:"bi.default",width:i.iconWidth}]}},_formatItems:function(t){var i=this,o=[];return BI.each(t,function(t,e){e.selected&&o.push(BI.extend({type:"dec.plugin.role.list.header.auth",width:i.options.itemWidth,listeners:[{eventName:"EVENT_CHANGE",action:function(t){i._doAuth(t)}}]},e))}),o},_doAuth:function(e){var i=this,t=BI.i18nText(e?"Dec-Plugin_Authority_Role_Full_Authorization_Tip":"Dec-Plugin_Authority_Role_De_Authorization_Tip",this.model.carrierText);BI.Msg.confirm(BI.i18nText("BI-Basic_Sure"),t,function(t){t&&i._startSet(e)})},_startSet:function(t){var e=this,i=BI.UUID();BI.Maskers.create(i,null,{render:{type:"dec.test.status",waitingText:BI.i18nText("Dec-Plugin_Authority_Role_Processing"),successText:BI.i18nText("Dec-Plugin_Authority_Role_Processing_Success"),failText:BI.i18nText("Dec-Plugin_Authority_Role_Processing_Fail"),listeners:[{eventName:"EVENT_CLOSE",action:function(){BI.Maskers.hide(i),BI.Maskers.remove(i)}}],ref:function(t){e.statusMasker=t}}}),BI.Maskers.show(i),e.store.doAuthorization(t)},doHighLight:function(i){var t=this.authItemsGroup.getAllButtons();BI.each(t,function(t,e){e.getValue()===i?e.doHighLight():e.unHighLight()})},unHighLight:function(){var t=this.authItemsGroup.getAllButtons();BI.each(t,function(t,e){e.unHighLight()})},populate:function(t){this.options.authItems=t,this.authItemsGroup.populate(this._formatItems(t))}});t.EVENT_CHANGE="EVENT_CHANGE",t.EVENT_RESIZE="EVENT_RESIZE",BI.shortcut("dec.plugin.role.list.header",t)}(),function(){var t=BI.inherit(Fix.Model,{state:function(){return{status:{}}},context:["keyword","entityInfo","carrierInfo"],computed:{carrierText:function(){var t=this.model.carrierInfo.carrierType;return t===DecCst.Authority.CARRIER_TYPE.USER?BI.i18nText("Dec-Basic_User"):t===DecCst.Authority.CARRIER_TYPE.DEPOST?BI.i18nText("Dec-Department"):t===DecCst.Authority.CARRIER_TYPE.ROLE?BI.i18nText("Dec-Role"):""}},actions:{doAuthorization:function(t){var e=this;Dec.Utils.setPluginRoleAuthority({roleType:this.model.carrierInfo.carrierType,roleId:this.model.carrierInfo.carrierId,authType:2,authValue:t?2:1,keyword:this.model.keyword},function(t){e.model.status=t,BI.isNotNull(t.data)&&(e.model.carrierInfo=BI.extend({},e.model.carrierInfo))})}}});BI.model("dec.model.plugin.role.trigger",t)}(),BI.config("dec.role.expander",function(t){return BI.Services.getService("dec.service.global").isAdmin()?BI.extend(t,{header:"dec.plugin.role.list.header"}):t}); \ No newline at end of file +/** simple-template 20-06-12 16:47:27 */ +!function(){var t=BI.inherit(BI.BasicButton,{props:{baseCls:"",text:"",items:[{value:!0,text:BI.i18nText("Dec-Plugin_Authority_Role_Full_Authorization")},{value:!1,text:BI.i18nText("Dec-Plugin_Authority_Role_De_Authorization")}]},render:function(){var e=this,t=this.options;return{type:"bi.center_adapt",items:[{type:"bi.combo",trigger:"click",adjustXOffset:60,adjustYOffset:-8,el:{type:"bi.vertical_adapt",height:36,items:[{type:"bi.label",text:t.text,ref:function(t){e.text=t}},{type:"bi.icon_button",height:16,tgap:5,cls:"trigger-triangle-font",ref:function(t){e.trigger=t}}]},popup:{el:{type:"bi.vertical",items:[{type:"bi.text_value_combo_popup",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,items:t.items,textAlign:"center",listeners:[{eventName:BI.IconComboPopup.EVENT_CHANGE,action:function(){e.combo.hideView(),e.fireEvent("EVENT_CHANGE",this.getValue()[0]),this.setValue()}}]}]}},ref:function(t){e.combo=t}}]}},doHighLight:function(){this.text.doHighLight()},unHighLight:function(){this.text.unHighLight()}});BI.shortcut("dec.plugin.role.list.header.auth",t)}(),Dec.Utils=Dec.Utils||{},BI.extend(Dec.Utils,{setPluginRoleAuthority:function(t,e){Dec.reqPost("/batch/role",t,e)}}),function(){var t=BI.inherit(BI.NodeButton,{props:{baseCls:"dec-expander-trigger bi-background",texts:[],items:[],iconWidth:30},_store:function(){return BI.Models.getModel("dec.model.plugin.role.trigger")},watch:{status:function(t){this.statusMasker&&this.statusMasker.setStatus(t)}},render:function(){var e=this,i=this.options;return{type:"bi.htape",items:[{el:{type:"dec.screening.combo",ref:function(t){e.combo=t},text:i.texts.all,defaultValue:1,items:[{text:i.texts.all,iconCls1:"check-mark-e-font",value:1},{text:i.texts.onlyOpen,iconCls1:"check-mark-e-font",value:2}],listeners:[{eventName:"EVENT_CHANGE",action:function(){}}]}},{el:{type:"bi.button_group",ref:function(t){e.authItemsGroup=t},layouts:[{type:"bi.right_vertical_adapt"}],items:this._formatItems(i.items)},width:300},{el:{type:"dec.display.selector",ref:function(t){e.displaySelecter=t},items:i.items,listeners:[{eventName:"EVENT_CHANGE",action:function(t){i.onAuthItemsChange(t)}}]},width:30},{type:"bi.default",width:i.iconWidth}]}},_formatItems:function(t){var i=this,n=[];return BI.each(t,function(t,e){e.selected&&n.push(BI.extend({type:"dec.plugin.role.list.header.auth",width:i.options.itemWidth,listeners:[{eventName:"EVENT_CHANGE",action:function(t){i._doAuth(t)}}]},e))}),n},_doAuth:function(e){var i=this,t=BI.i18nText(e?"Dec-Plugin_Authority_Role_Full_Authorization_Tip":"Dec-Plugin_Authority_Role_De_Authorization_Tip",this.model.carrierText);BI.Msg.confirm(BI.i18nText("BI-Basic_Sure"),t,function(t){t&&i._startSet(e)})},_startSet:function(t){var e=this,i=BI.UUID();BI.Maskers.create(i,null,{render:{type:"dec.test.status",waitingText:BI.i18nText("Dec-Plugin_Authority_Role_Processing"),successText:BI.i18nText("Dec-Plugin_Authority_Role_Processing_Success"),failText:BI.i18nText("Dec-Plugin_Authority_Role_Processing_Fail"),listeners:[{eventName:"EVENT_CLOSE",action:function(){BI.Maskers.hide(i),BI.Maskers.remove(i)}}],ref:function(t){e.statusMasker=t}}}),BI.Maskers.show(i),e.store.doAuthorization(t)},doHighLight:function(i){var t=this.authItemsGroup.getAllButtons();BI.each(t,function(t,e){e.getValue()===i?e.doHighLight():e.unHighLight()})},unHighLight:function(){var t=this.authItemsGroup.getAllButtons();BI.each(t,function(t,e){e.unHighLight()})},populate:function(t){this.options.authItems=t,this.authItemsGroup.populate(this._formatItems(t))}});t.EVENT_CHANGE="EVENT_CHANGE",t.EVENT_RESIZE="EVENT_RESIZE",BI.shortcut("dec.plugin.role.list.header",t)}(),function(){var t=BI.inherit(Fix.Model,{state:function(){return{status:{}}},context:["keyword","entityInfo","carrierInfo"],computed:{carrierText:function(){var i="",n=this.model.carrierInfo.carrierType;return BI.some(BI.Constants.getConstant("dec.constant.authority.member.selector.tabs"),function(t,e){if(n===e.value)return i=e.text,!0}),i}},actions:{doAuthorization:function(t){var e=this;Dec.Utils.setPluginRoleAuthority({roleType:this.model.carrierInfo.carrierType,roleId:this.model.carrierInfo.carrierId,authType:2,authValue:t?2:1,keyword:this.model.keyword},function(t){e.model.status=t,BI.isNotNull(t.data)&&(e.model.carrierInfo=BI.extend({},e.model.carrierInfo))})}}});BI.model("dec.model.plugin.role.trigger",t)}(),BI.config("dec.role.expander",function(t){return BI.Services.getService("dec.service.global").isAdmin()?BI.extend(t,{header:"dec.plugin.role.list.header"}):t}); \ No newline at end of file