提交 096ce82b 编写于 作者: ibizdev's avatar ibizdev

ibiz4j 发布系统代码

上级 bc358b7d
......@@ -21,6 +21,8 @@ export const Environment = {
uniteAddress:"http://172.16.100.202:8114",
// 是否为开发模式
devMode: true,
// 是否开启权限认证
enablePermissionValid:false,
// 项目模板地址
ProjectUrl: "http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7",
// 配置平台地址
......
......@@ -400,6 +400,9 @@ export default class WFGroupEditViewBase extends Vue {
if(this.context && this.context.srfparentkey){
Object.assign(this.viewparams,{srfparentkey:this.context.srfparentkey});
}
if(this.$store.getters.getAppData() && this.$store.getters.getAppData().context){
Object.assign(this.context,this.$store.getters.getAppData().context);
}
this.handleCustomViewData();
return;
}
......
......@@ -431,6 +431,9 @@ export default class WFGroupGridViewBase extends Vue {
if(this.context && this.context.srfparentkey){
Object.assign(this.viewparams,{srfparentkey:this.context.srfparentkey});
}
if(this.$store.getters.getAppData() && this.$store.getters.getAppData().context){
Object.assign(this.context,this.$store.getters.getAppData().context);
}
this.handleCustomViewData();
return;
}
......@@ -1138,6 +1141,7 @@ export default class WFGroupGridViewBase extends Vue {
data.srfsourcekey = args[0].srfsourcekey;
}
let curViewParam = JSON.parse(JSON.stringify(this.context));
delete curViewParam.wfgroup;
if(args.length >0){
Object.assign(curViewParam,args[0]);
}
......
......@@ -313,6 +313,9 @@ export default class WFGroupMPickupViewBase extends Vue {
if(this.context && this.context.srfparentkey){
Object.assign(this.viewparams,{srfparentkey:this.context.srfparentkey});
}
if(this.$store.getters.getAppData() && this.$store.getters.getAppData().context){
Object.assign(this.context,this.$store.getters.getAppData().context);
}
this.handleCustomViewData();
return;
}
......
......@@ -287,6 +287,9 @@ export default class WFGroupPickupGridViewBase extends Vue {
if(this.context && this.context.srfparentkey){
Object.assign(this.viewparams,{srfparentkey:this.context.srfparentkey});
}
if(this.$store.getters.getAppData() && this.$store.getters.getAppData().context){
Object.assign(this.context,this.$store.getters.getAppData().context);
}
this.handleCustomViewData();
return;
}
......
......@@ -280,6 +280,9 @@ export default class WFGroupPickupViewBase extends Vue {
if(this.context && this.context.srfparentkey){
Object.assign(this.viewparams,{srfparentkey:this.context.srfparentkey});
}
if(this.$store.getters.getAppData() && this.$store.getters.getAppData().context){
Object.assign(this.context,this.$store.getters.getAppData().context);
}
this.handleCustomViewData();
return;
}
......
......@@ -265,6 +265,9 @@ export default class WFIndexViewBase extends Vue {
if(this.context && this.context.srfparentkey){
Object.assign(this.viewparams,{srfparentkey:this.context.srfparentkey});
}
if(this.$store.getters.getAppData() && this.$store.getters.getAppData().context){
Object.assign(this.context,this.$store.getters.getAppData().context);
}
this.handleCustomViewData();
return;
}
......
......@@ -400,6 +400,9 @@ export default class WFMemberEditViewBase extends Vue {
if(this.context && this.context.srfparentkey){
Object.assign(this.viewparams,{srfparentkey:this.context.srfparentkey});
}
if(this.$store.getters.getAppData() && this.$store.getters.getAppData().context){
Object.assign(this.context,this.$store.getters.getAppData().context);
}
this.handleCustomViewData();
return;
}
......
......@@ -431,6 +431,9 @@ export default class WFMemberGridViewBase extends Vue {
if(this.context && this.context.srfparentkey){
Object.assign(this.viewparams,{srfparentkey:this.context.srfparentkey});
}
if(this.$store.getters.getAppData() && this.$store.getters.getAppData().context){
Object.assign(this.context,this.$store.getters.getAppData().context);
}
this.handleCustomViewData();
return;
}
......
......@@ -400,6 +400,9 @@ export default class WFProcessDefinitionEditViewBase extends Vue {
if(this.context && this.context.srfparentkey){
Object.assign(this.viewparams,{srfparentkey:this.context.srfparentkey});
}
if(this.$store.getters.getAppData() && this.$store.getters.getAppData().context){
Object.assign(this.context,this.$store.getters.getAppData().context);
}
this.handleCustomViewData();
return;
}
......
......@@ -431,6 +431,9 @@ export default class WFProcessDefinitionGridViewBase extends Vue {
if(this.context && this.context.srfparentkey){
Object.assign(this.viewparams,{srfparentkey:this.context.srfparentkey});
}
if(this.$store.getters.getAppData() && this.$store.getters.getAppData().context){
Object.assign(this.context,this.$store.getters.getAppData().context);
}
this.handleCustomViewData();
return;
}
......@@ -1138,6 +1141,7 @@ export default class WFProcessDefinitionGridViewBase extends Vue {
data.srfsourcekey = args[0].srfsourcekey;
}
let curViewParam = JSON.parse(JSON.stringify(this.context));
delete curViewParam.wfprocessdefinition;
if(args.length >0){
Object.assign(curViewParam,args[0]);
}
......
......@@ -305,6 +305,9 @@ export default class WFREModelEditViewBase extends Vue {
if(this.context && this.context.srfparentkey){
Object.assign(this.viewparams,{srfparentkey:this.context.srfparentkey});
}
if(this.$store.getters.getAppData() && this.$store.getters.getAppData().context){
Object.assign(this.context,this.$store.getters.getAppData().context);
}
this.handleCustomViewData();
return;
}
......
......@@ -400,6 +400,9 @@ export default class WFUserEditViewBase extends Vue {
if(this.context && this.context.srfparentkey){
Object.assign(this.viewparams,{srfparentkey:this.context.srfparentkey});
}
if(this.$store.getters.getAppData() && this.$store.getters.getAppData().context){
Object.assign(this.context,this.$store.getters.getAppData().context);
}
this.handleCustomViewData();
return;
}
......
......@@ -431,6 +431,9 @@ export default class WFUserGridViewBase extends Vue {
if(this.context && this.context.srfparentkey){
Object.assign(this.viewparams,{srfparentkey:this.context.srfparentkey});
}
if(this.$store.getters.getAppData() && this.$store.getters.getAppData().context){
Object.assign(this.context,this.$store.getters.getAppData().context);
}
this.handleCustomViewData();
return;
}
......@@ -1138,6 +1141,7 @@ export default class WFUserGridViewBase extends Vue {
data.srfsourcekey = args[0].srfsourcekey;
}
let curViewParam = JSON.parse(JSON.stringify(this.context));
delete curViewParam.wfuser;
if(args.length >0){
Object.assign(curViewParam,args[0]);
}
......
......@@ -313,6 +313,9 @@ export default class WFUserMPickupViewBase extends Vue {
if(this.context && this.context.srfparentkey){
Object.assign(this.viewparams,{srfparentkey:this.context.srfparentkey});
}
if(this.$store.getters.getAppData() && this.$store.getters.getAppData().context){
Object.assign(this.context,this.$store.getters.getAppData().context);
}
this.handleCustomViewData();
return;
}
......
......@@ -287,6 +287,9 @@ export default class WFUserPickupGridViewBase extends Vue {
if(this.context && this.context.srfparentkey){
Object.assign(this.viewparams,{srfparentkey:this.context.srfparentkey});
}
if(this.$store.getters.getAppData() && this.$store.getters.getAppData().context){
Object.assign(this.context,this.$store.getters.getAppData().context);
}
this.handleCustomViewData();
return;
}
......
......@@ -280,6 +280,9 @@ export default class WFUserPickupViewBase extends Vue {
if(this.context && this.context.srfparentkey){
Object.assign(this.viewparams,{srfparentkey:this.context.srfparentkey});
}
if(this.$store.getters.getAppData() && this.$store.getters.getAppData().context){
Object.assign(this.context,this.$store.getters.getAppData().context);
}
this.handleCustomViewData();
return;
}
......
......@@ -637,6 +637,36 @@ export default class EntityService {
}
}
/**
* getDynaModel(获取动态模型)接口方法
*
* @param {*} [context={}]
* @param {*} [data]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EntityService
*/
public async getDynaModel(context: any = {},data: any, isloading?: boolean):Promise<any> {
if(data && data.configType && data.targetType){
return Http.getInstance().get(`/configs/${data.configType}/${data.targetType}`);
}
}
/**
* setDynaModel(设置动态模型)接口方法
*
* @param {*} [context={}]
* @param {*} [data]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EntityService
*/
public async setDynaModel(context: any = {},data: any, isloading?: boolean):Promise<any> {
if(data && data.configType && data.targetType){
return Http.getInstance().put(`/configs/${data.configType}/${data.targetType}`,{model:data.model});
}
}
/**
* WFStart接口方法
*
......
......@@ -7,7 +7,7 @@ import * as mutations from './mutations';
import * as getters from './getters';
import viewaction from './modules/view-action'
import unifiedresource from './modules/unified-resource'
import authresource from './modules/auth-resource'
const state = {
...rootstate
......@@ -22,7 +22,7 @@ const store = new Vuex.Store({
getters,
modules: {
viewaction,
unifiedresource
authresource
},
});
......
/**
* 提交统一资源数据
*
* @param param0
* @param data
*/
export const commitAuthData = ({ commit, state }: { commit: any, state: any }, { unires,appmenu,enablepermissionvalid }: { unires: Array<any>, appmenu: Array<any>, enablepermissionvalid: boolean }) => {
if(unires && unires.length > 0){
commit('setResourceData', unires);
}
if(appmenu && appmenu.length >0){
commit('setMenuData', appmenu);
}
if(enablepermissionvalid){
commit('setEnablePermissionValid', enablepermissionvalid);
}
}
\ No newline at end of file
/**
* 判断指定统一资源是否存在
*
* @param state
*/
export const getResourceData = (state: any) => (resourcetag: string) => {
let itemIndex: any = state.resourceData.findIndex((unirescode: any, objIndex: any, objs: any) => {
return Object.is(unirescode, resourcetag);
})
return itemIndex === -1 ? false : true;
}
/**
* 判断指定菜单权限是否存在
*
* @param state
*/
export const getMenuData = (state: any) => (menutag: string) => {
let itemIndex: any = state.menuData.findIndex((menucode: any, objIndex: any, objs: any) => {
return Object.is(menucode, menutag);
})
return itemIndex === -1 ? false : true;
}
/**
* 获取是否开启权限认证
*
* @param state
*/
export const getEnablePermissionValid = (state: any) => {
return state.enablePermissionValid;
}
/**
* 判断指定菜单是否显示
*
* @param state
*/
export const getAuthMenu = (state: any) => (menu:any) =>{
// 存在权限
let resourceIndex: any;
let menuIndex:any;
if(state.enablePermissionValid){
resourceIndex= state.resourceData.findIndex((resourcetag: any, objIndex: any, objs: any) => {
return Object.is(menu.resourcetag, resourcetag);
})
}
menuIndex= state.menuData.findIndex((menutag: any, objIndex: any, objs: any) => {
return Object.is(menu.authtag, menutag);
})
return (resourceIndex !== -1 || menuIndex !== -1)?true:false;
}
\ No newline at end of file
import { resourcestate } from './state';
import * as actions from './actions';
import * as mutations from './mutations';
import * as getters from './getters';
const state = {
...resourcestate
}
export default {
namespaced: true,
state,
getters,
actions,
mutations
}
\ No newline at end of file
/**
* 设置统一资源数据
*
* @param state
* @param resourceArray
*/
export const setResourceData = (state: any, resourceArray:Array<any>) => {
if(resourceArray && resourceArray.length === 0){
return;
}
state.resourceData = resourceArray;
}
/**
* 设置菜单数据
*
* @param state
* @param resourceArray
*/
export const setMenuData = (state: any, menuArray:Array<any>) => {
if(menuArray && menuArray.length === 0){
return;
}
state.menuData = menuArray;
}
/**
* 设置是否开启权限认证
*
* @param state
* @param resourceArray
*/
export const setEnablePermissionValid = (state: any, enablepermissionvalid:boolean) => {
state.enablePermissionValid = enablepermissionvalid;
}
/**
* 所有资源状态
*/
export const resourcestate: any = {
// 统一资源数据
resourceData: [],
// 菜单数据
menuData:[],
// 是否开启权限认证
enablePermissionValid: false
}
\ No newline at end of file
......@@ -207,7 +207,7 @@
}
}
.view-container.degridview, .view-container.degridview9, .view-container.dewfgridview, .view-container.delistview, .view-container.delistview9, .view-container.dedataview, .view-container.dedataview9{
.view-container.degridview, .view-container.degridview9, .view-container.dewfgridview, .view-container.delistview, .view-container.delistview9, .view-container.dedataview, .view-container.dedataview9, .view-container.decalendarview, .view-container.decalendarview9{
>.view-card.view-no-caption{
>.ivu-card-body{
height: 100%;
......
......@@ -67,7 +67,7 @@ export class AuthGuard {
}
router.app.$store.commit('addAppData', data);
// 提交统一资源数据
router.app.$store.dispatch('unifiedresource/commitResourceData', data);
router.app.$store.dispatch('authresource/commitAuthData', data);
}
}
resolve(true);
......
......@@ -126,6 +126,7 @@ import { UIActionTool,Util } from '@/utils';
import WFIndexViewService from './wfindex-view-appmenu-service';
import WFIndexViewModel from './wfindex-view-appmenu-model';
import { Environment } from '@/environments/environment';
@Component({
......@@ -645,11 +646,11 @@ export default class WFIndexViewBase extends Vue implements ControlInterface {
* @memberof WFIndexView
*/
public handleMenusResource(inputMenus:Array<any>){
if(this.$store.getters['unifiedresource/getEnablePermissionValid']){
if(Environment.enablePermissionValid){
this.computedEffectiveMenus(inputMenus);
}
this.dataProcess(this.menuMode.getAppMenuItems());
this.menus = this.menuMode.getAppMenuItems();
this.dataProcess(inputMenus);
this.menus = inputMenus;
this.doMenuSelect();
}
......@@ -661,7 +662,7 @@ export default class WFIndexViewBase extends Vue implements ControlInterface {
*/
public computedEffectiveMenus(inputMenus:Array<any>){
inputMenus.forEach((_item:any) =>{
if(_item.resourcetag && !this.$store.getters['unifiedresource/getResourceData'](_item.resourcetag)){
if(!this.$store.getters['authresource/getAuthMenu'](_item)){
_item.hidden = true;
if (_item.items && _item.items.length > 0) {
this.computedEffectiveMenus(_item.items);
......
......@@ -31,6 +31,7 @@ export default class WFIndexViewModel {
textcls: '',
appfunctag: 'Auto1',
resourcetag: '',
authtag:'web-WFIndexView-menuitem1',
},
{
id: 'F6C65EF1-F523-466D-9C63-7FA2F87BA90B',
......@@ -49,6 +50,7 @@ export default class WFIndexViewModel {
textcls: '',
appfunctag: 'Auto3',
resourcetag: '',
authtag:'web-WFIndexView-menuitem3',
},
{
id: 'A2004B9C-B0CE-4180-8C76-6FD90059F17B',
......@@ -67,6 +69,7 @@ export default class WFIndexViewModel {
textcls: '',
appfunctag: 'Auto2',
resourcetag: '',
authtag:'web-WFIndexView-menuitem2',
},
];
......
......@@ -9,7 +9,7 @@ services:
deploy:
resources:
limits:
memory: 1024M
memory: 4048M
reservations:
memory: 400M
mode: replicated
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册