提交 87feeed9 编写于 作者: ibizdev's avatar ibizdev

ibiz4j 发布系统代码

上级 24c24d1a
......@@ -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",
// 配置平台地址
......
......@@ -428,95 +428,6 @@ mock.onPut(new RegExp(/^\/ibzdepartments\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((co
});
// FetchCurDept
mock.onGet(new RegExp(/^\/ibzorganizations\/([a-zA-Z0-9\-\;]{1,35})\/ibzdepartments\/fetchcurdept$/)).reply((config: any) => {
console.groupCollapsed("实体:ibzdepartment 方法: FetchCurDept");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['orgid'];
let tempValue: any = {};
const matchArray:any = new RegExp(/^\/ibzorganizations\/([a-zA-Z0-9\-\;]{1,35})\/ibzdepartments\/fetchcurdept$/).exec(config.url);
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
if (items.length > 0 && paramArray.length > 0) {
paramArray.forEach((paramkey: any) => {
if (tempValue[paramkey] && tempValue[paramkey].indexOf(";") > 0) {
let keysGrounp: Array<any> = tempValue[paramkey].split(new RegExp(/[\;]/));
let tempArray: Array<any> = [];
keysGrounp.forEach((singlekey: any) => {
let _items = items.filter((item: any) => { return item[paramkey] == singlekey });
if(_items.length >0){
tempArray.push(..._items);
}
})
items = tempArray;
} else {
items = items.filter((item: any) => { return item[paramkey] == tempValue[paramkey] });
}
})
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(items);
console.groupEnd();
console.groupEnd();
return [status, items];
});
// FetchCurDept
mock.onGet(new RegExp(/^\/ibzdepartments\/fetchcurdept$/)).reply((config: any) => {
console.groupCollapsed("实体:ibzdepartment 方法: FetchCurDept");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(mockDatas);
console.groupEnd();
console.groupEnd();
return [status, mockDatas ? mockDatas : []];
});
// FetchCurDept
mock.onGet(new RegExp(/^\/ibzdepartments\/fetchcurdept(\?[\w-./?%&=,]*)*$/)).reply((config: any) => {
console.groupCollapsed("实体:ibzdepartment 方法: FetchCurDept");
console.table({url:config.url, method: config.method, data:config.data});
if(config.url.includes('page')){
let url = config.url.split('?')[1];
let params = qs.parse(url);
Object.assign(config, params);
}
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
let total = mockDatas.length;
let records: Array<any> = [];
if(!config.page || !config.size){
records = mockDatas;
}else{
if((config.page-1)*config.size < total){
records = mockDatas.slice(config.page,config.size);
}
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(records ? records : []);
console.groupEnd();
console.groupEnd();
return [status, records ? records : []];
});
// FetchDefault
mock.onGet(new RegExp(/^\/ibzorganizations\/([a-zA-Z0-9\-\;]{1,35})\/ibzdepartments\/fetchdefault$/)).reply((config: any) => {
console.groupCollapsed("实体:ibzdepartment 方法: FetchDefault");
......
......@@ -271,94 +271,6 @@ mock.onGet(new RegExp(/^\/ibzorganizations\/getdraft$/)).reply((config: any) =>
return [status, {}];
});
// FetchSelectSOrg
mock.onGet(new RegExp(/^\/ibzorganizations\/fetchselectsorg$/)).reply((config: any) => {
console.groupCollapsed("实体:ibzorganization 方法: FetchSelectSOrg");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(mockDatas);
console.groupEnd();
console.groupEnd();
return [status, mockDatas ? mockDatas : []];
});
// FetchSelectSOrg
mock.onGet(new RegExp(/^\/ibzorganizations\/fetchselectsorg(\?[\w-./?%&=,]*)*$/)).reply((config: any) => {
console.groupCollapsed("实体:ibzorganization 方法: FetchSelectSOrg");
console.table({url:config.url, method: config.method, data:config.data});
if(config.url.includes('page')){
let url = config.url.split('?')[1];
let params = qs.parse(url);
Object.assign(config, params);
}
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
let total = mockDatas.length;
let records: Array<any> = [];
if(!config.page || !config.size){
records = mockDatas;
}else{
if((config.page-1)*config.size < total){
records = mockDatas.slice(config.page,config.size);
}
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(records ? records : []);
console.groupEnd();
console.groupEnd();
return [status, records ? records : []];
});
// FetchSelectPOrg
mock.onGet(new RegExp(/^\/ibzorganizations\/fetchselectporg$/)).reply((config: any) => {
console.groupCollapsed("实体:ibzorganization 方法: FetchSelectPOrg");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(mockDatas);
console.groupEnd();
console.groupEnd();
return [status, mockDatas ? mockDatas : []];
});
// FetchSelectPOrg
mock.onGet(new RegExp(/^\/ibzorganizations\/fetchselectporg(\?[\w-./?%&=,]*)*$/)).reply((config: any) => {
console.groupCollapsed("实体:ibzorganization 方法: FetchSelectPOrg");
console.table({url:config.url, method: config.method, data:config.data});
if(config.url.includes('page')){
let url = config.url.split('?')[1];
let params = qs.parse(url);
Object.assign(config, params);
}
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
let total = mockDatas.length;
let records: Array<any> = [];
if(!config.page || !config.size){
records = mockDatas;
}else{
if((config.page-1)*config.size < total){
records = mockDatas.slice(config.page,config.size);
}
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(records ? records : []);
console.groupEnd();
console.groupEnd();
return [status, records ? records : []];
});
// FetchDefault
mock.onGet(new RegExp(/^\/ibzorganizations\/fetchdefault$/)).reply((config: any) => {
console.groupCollapsed("实体:ibzorganization 方法: FetchDefault");
......
......@@ -362,6 +362,9 @@ export default class IBZDepartmentEditGridViewBase 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;
}
......@@ -781,6 +784,7 @@ export default class IBZDepartmentEditGridViewBase extends Vue {
data.srfsourcekey = args[0].srfsourcekey;
}
let curViewParam = JSON.parse(JSON.stringify(this.context));
delete curViewParam.ibzdepartment;
if(args.length >0){
Object.assign(curViewParam,args[0]);
}
......
......@@ -325,6 +325,9 @@ export default class IBZDepartmentEditViewBase 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;
}
......
......@@ -380,6 +380,9 @@ export default class IBZDepartmentGridViewBase 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;
}
......@@ -992,6 +995,7 @@ export default class IBZDepartmentGridViewBase extends Vue {
data.srfsourcekey = args[0].srfsourcekey;
}
let curViewParam = JSON.parse(JSON.stringify(this.context));
delete curViewParam.ibzdepartment;
if(args.length >0){
Object.assign(curViewParam,args[0]);
}
......
......@@ -313,6 +313,9 @@ export default class IBZDepartmentMPickupViewBase 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;
}
......
......@@ -285,6 +285,9 @@ export default class IBZDepartmentOptionViewBase 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 IBZDepartmentPickupGridViewBase 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 IBZDepartmentPickupViewBase 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;
}
......
......@@ -267,6 +267,9 @@ export default class IBZDepartmentTreeExpViewBase 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;
}
......
......@@ -325,6 +325,9 @@ export default class IBZDeptMemberEditViewBase 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;
}
......
......@@ -340,6 +340,9 @@ export default class IBZDeptMemberGridViewBase 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;
}
......
......@@ -305,6 +305,9 @@ export default class IBZEmployeeChangePwdViewBase 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;
}
......
......@@ -365,6 +365,9 @@ export default class IBZEmployeeEditGridViewBase 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;
}
......@@ -784,6 +787,7 @@ export default class IBZEmployeeEditGridViewBase extends Vue {
data.srfsourcekey = args[0].srfsourcekey;
}
let curViewParam = JSON.parse(JSON.stringify(this.context));
delete curViewParam.ibzemployee;
if(args.length >0){
Object.assign(curViewParam,args[0]);
}
......
......@@ -325,6 +325,9 @@ export default class IBZEmployeeEditViewBase 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;
}
......
......@@ -390,6 +390,9 @@ export default class IBZEmployeeGridViewBase 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;
}
......@@ -1035,6 +1038,7 @@ export default class IBZEmployeeGridViewBase extends Vue {
data.srfsourcekey = args[0].srfsourcekey;
}
let curViewParam = JSON.parse(JSON.stringify(this.context));
delete curViewParam.ibzemployee;
if(args.length >0){
Object.assign(curViewParam,args[0]);
}
......
......@@ -313,6 +313,9 @@ export default class IBZEmployeeMPickupViewBase 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;
}
......
......@@ -285,6 +285,9 @@ export default class IBZEmployeeOptionViewBase 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 IBZEmployeePickupGridViewBase 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 IBZEmployeePickupViewBase 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;
}
......
......@@ -325,6 +325,9 @@ export default class IBZOrganizationEditViewBase 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;
}
......
......@@ -383,6 +383,9 @@ export default class IBZOrganizationGridViewBase 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;
}
......@@ -995,6 +998,7 @@ export default class IBZOrganizationGridViewBase extends Vue {
data.srfsourcekey = args[0].srfsourcekey;
}
let curViewParam = JSON.parse(JSON.stringify(this.context));
delete curViewParam.ibzorganization;
if(args.length >0){
Object.assign(curViewParam,args[0]);
}
......
......@@ -285,6 +285,9 @@ export default class IBZOrganizationOptionViewBase 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 IBZOrganizationPickupGridViewBase 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 IBZOrganizationPickupViewBase 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;
}
......
......@@ -267,6 +267,9 @@ export default class IBZOrganizationTreeExpViewBase 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 OUIndexViewBase 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接口方法
*
......
......@@ -293,24 +293,6 @@ export default class IBZDepartmentServiceBase extends EntityService {
return res;
}
/**
* FetchCurDept接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof IBZDepartmentServiceBase
*/
public async FetchCurDept(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.ibzorganization && true){
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/ibzorganizations/${context.ibzorganization}/ibzdepartments/fetchcurdept`,tempData,isloading);
}
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/ibzdepartments/fetchcurdept`,tempData,isloading);
}
/**
* FetchDefault接口方法
*
......
......@@ -98,13 +98,14 @@ export default class SaveDeptMemberLogicBase {
private async executeDeaction1(context:any,params:any,isloading:boolean){
// 行为处理节点
let result: any;
let actionParam:any = this.paramsMap.get('member');
const targetService:IBZDeptMemberService = new IBZDeptMemberService();
if (targetService['Save'] && targetService['Save'] instanceof Function) {
result = await targetService['Save'](context,params, false);
result = await targetService['Save'](actionParam.context,actionParam.data, false);
}
if(result && result.status == 200){
Object.assign(params,result.data);
return params;
Object.assign(actionParam.data,result.data);
return this.paramsMap.get(this.defaultParamName).data;
}
}
......
......@@ -263,34 +263,6 @@ export default class IBZOrganizationServiceBase extends EntityService {
return res;
}
/**
* FetchSelectSOrg接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof IBZOrganizationServiceBase
*/
public async FetchSelectSOrg(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/ibzorganizations/fetchselectsorg`,tempData,isloading);
}
/**
* FetchSelectPOrg接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof IBZOrganizationServiceBase
*/
public async FetchSelectPOrg(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/ibzorganizations/fetchselectporg`,tempData,isloading);
}
/**
* FetchDefault接口方法
*
......
......@@ -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 OUIndexViewService from './ouindex-view-appmenu-service';
import OUIndexViewModel from './ouindex-view-appmenu-model';
import { Environment } from '@/environments/environment';
@Component({
......@@ -645,11 +646,11 @@ export default class OUIndexViewBase extends Vue implements ControlInterface {
* @memberof OUIndexView
*/
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 OUIndexViewBase 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 OUIndexViewModel {
textcls: '',
appfunctag: 'Auto3',
resourcetag: '',
authtag:'web-OUIndexView-menuitem1',
},
{
id: '26353959-9246-4DDF-8ADA-E8A229572BC7',
......@@ -49,6 +50,7 @@ export default class OUIndexViewModel {
textcls: '',
appfunctag: 'Auto5',
resourcetag: '',
authtag:'web-OUIndexView-menuitem2',
},
{
id: '18F0AA9B-5281-46B7-AC6E-1A40E088AEE8',
......@@ -67,6 +69,7 @@ export default class OUIndexViewModel {
textcls: '',
appfunctag: 'Auto4',
resourcetag: '',
authtag:'web-OUIndexView-menuitem3',
},
];
......
......@@ -19,7 +19,6 @@ import com.alibaba.fastjson.JSONObject;
public interface IBZDepartmentMapper extends BaseMapper<IBZDepartment>{
Page<IBZDepartment> searchCurDept(IPage page, @Param("srf") IBZDepartmentSearchContext context, @Param("ew") Wrapper<IBZDepartment> wrapper) ;
Page<IBZDepartment> searchDefault(IPage page, @Param("srf") IBZDepartmentSearchContext context, @Param("ew") Wrapper<IBZDepartment> wrapper) ;
@Override
@Cacheable( value="ibzdepartment",key = "'row:'+#p0")
......
......@@ -19,8 +19,6 @@ import com.alibaba.fastjson.JSONObject;
public interface IBZOrganizationMapper extends BaseMapper<IBZOrganization>{
Page<IBZOrganization> searchSelectSOrg(IPage page, @Param("srf") IBZOrganizationSearchContext context, @Param("ew") Wrapper<IBZOrganization> wrapper) ;
Page<IBZOrganization> searchSelectPOrg(IPage page, @Param("srf") IBZOrganizationSearchContext context, @Param("ew") Wrapper<IBZOrganization> wrapper) ;
Page<IBZOrganization> searchDefault(IPage page, @Param("srf") IBZOrganizationSearchContext context, @Param("ew") Wrapper<IBZOrganization> wrapper) ;
@Override
@Cacheable( value="ibzorganization",key = "'row:'+#p0")
......
......@@ -40,7 +40,6 @@ public interface IIBZDepartmentService extends IService<IBZDepartment>{
boolean update(IBZDepartment et) ;
@CacheEvict(value="ibzdepartment",allEntries=true)
void updateBatch(List<IBZDepartment> list) ;
Page<IBZDepartment> searchCurDept(IBZDepartmentSearchContext context) ;
Page<IBZDepartment> searchDefault(IBZDepartmentSearchContext context) ;
List<IBZDepartment> selectByParentdeptid(String deptid) ;
@CacheEvict(value="ibzdepartment",allEntries=true)
......
......@@ -40,8 +40,6 @@ public interface IIBZOrganizationService extends IService<IBZOrganization>{
void removeBatch(Collection<String> idList) ;
IBZOrganization get(String key) ;
IBZOrganization getDraft(IBZOrganization et) ;
Page<IBZOrganization> searchSelectSOrg(IBZOrganizationSearchContext context) ;
Page<IBZOrganization> searchSelectPOrg(IBZOrganizationSearchContext context) ;
Page<IBZOrganization> searchDefault(IBZOrganizationSearchContext context) ;
List<IBZOrganization> selectByParentorgid(String orgid) ;
@CacheEvict(value="ibzorganization",allEntries=true)
......
......@@ -210,15 +210,6 @@ public class IBZDepartmentServiceImpl extends ServiceImpl<IBZDepartmentMapper, I
}
/**
* 查询集合 CurDept
*/
@Override
public Page<IBZDepartment> searchCurDept(IBZDepartmentSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<IBZDepartment> pages=baseMapper.searchCurDept(context.getPages(),context,context.getSelectCond());
return new PageImpl<IBZDepartment>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
/**
* 查询集合 DEFAULT
*/
......
......@@ -172,24 +172,6 @@ public class IBZOrganizationServiceImpl extends ServiceImpl<IBZOrganizationMappe
}
/**
* 查询集合 查询下级单位
*/
@Override
public Page<IBZOrganization> searchSelectSOrg(IBZOrganizationSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<IBZOrganization> pages=baseMapper.searchSelectSOrg(context.getPages(),context,context.getSelectCond());
return new PageImpl<IBZOrganization>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
/**
* 查询集合 查询上级单位
*/
@Override
public Page<IBZOrganization> searchSelectPOrg(IBZOrganizationSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<IBZOrganization> pages=baseMapper.searchSelectPOrg(context.getPages(),context,context.getSelectCond());
return new PageImpl<IBZOrganization>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
/**
* 查询集合 DEFAULT
*/
......
......@@ -4,7 +4,7 @@
<!--输出实体[IBZORG]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-ibzorg-445-1">
<changeSet author="a_A_5d9d78509" id="tab-ibzorg-449-1">
<createTable tableName="IBZORG">
<column name="ORGID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_IBZORG_ORGID"/>
......@@ -152,7 +152,7 @@
<!--输出实体[IBZDEPT]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-ibzdept-701-6">
<changeSet author="a_A_5d9d78509" id="tab-ibzdept-703-6">
<createTable tableName="IBZDEPT">
<column name="DEPTID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_IBZDEPT_DEPTID"/>
......@@ -201,7 +201,7 @@
</changeSet>
<!--输出实体[IBZORG]外键关系 -->
<changeSet author="a_A_5d9d78509" id="fk-ibzorg-445-8">
<changeSet author="a_A_5d9d78509" id="fk-ibzorg-449-8">
<addForeignKeyConstraint baseColumnNames="PORGID" baseTableName="IBZORG" constraintName="DER1N_IBZORG_IBZORG_PORGID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ORGID" referencedTableName="IBZORG" validate="true"/>
</changeSet>
<!--输出实体[IBZTEAM]外键关系 -->
......@@ -224,10 +224,10 @@
<addForeignKeyConstraint baseColumnNames="USERID" baseTableName="IBZDEPTMEMBER" constraintName="DER1N_IBZDEPTMEMBER_IBZEMP_USE" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="USERID" referencedTableName="IBZEMP" validate="true"/>
</changeSet>
<!--输出实体[IBZDEPT]外键关系 -->
<changeSet author="a_A_5d9d78509" id="fk-ibzdept-701-14">
<changeSet author="a_A_5d9d78509" id="fk-ibzdept-703-14">
<addForeignKeyConstraint baseColumnNames="PDEPTID" baseTableName="IBZDEPT" constraintName="DER1N_IBZDEPT_IBZDEPT_PDEPTID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="DEPTID" referencedTableName="IBZDEPT" validate="true"/>
</changeSet>
<changeSet author="a_A_5d9d78509" id="fk-ibzdept-701-15">
<changeSet author="a_A_5d9d78509" id="fk-ibzdept-703-15">
<addForeignKeyConstraint baseColumnNames="ORGID" baseTableName="IBZDEPT" constraintName="DER1N_IBZDEPT_IBZORG_ORGID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ORGID" referencedTableName="IBZORG" validate="true"/>
</changeSet>
<!--输出实体[IBZTEAMMEMBER]外键关系 -->
......
......@@ -40,15 +40,6 @@
where orgid=#{orgid}
</select>
<!--数据集合[CurDept]-->
<select id="searchCurDept" parameterType="cn.ibizlab.core.ou.filter.IBZDepartmentSearchContext" resultMap="IBZDepartmentResultMap">
select t1.* from (
<include refid="CurDept" />
)t1
<where><if test="ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere">${ew.sqlSegment}</if></where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据集合[Default]-->
<select id="searchDefault" parameterType="cn.ibizlab.core.ou.filter.IBZDepartmentSearchContext" resultMap="IBZDepartmentResultMap">
select t1.* from (
......@@ -58,14 +49,6 @@
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据查询[CurDept]-->
<sql id="CurDept" databaseId="mysql">
<![CDATA[ SELECT t1.`BCODE`, t1.`CREATEDATE`, t1.`DEPTCODE`, t1.`DEPTID`, t1.`DEPTLEVEL`, t1.`DEPTNAME`, t1.`ENABLE`, t1.`LEADERID`, t1.`LEADERNAME`, t1.`ORGID`, t11.`ORGNAME`, t1.`PDEPTID`, t21.`DEPTNAME` AS `PDEPTNAME`, t1.`SHORTNAME`, t1.`SHOWORDER`, t1.`UPDATEDATE` FROM `IBZDEPT` t1 LEFT JOIN IBZORG t11 ON t1.ORGID = t11.ORGID LEFT JOIN IBZDEPT t21 ON t1.PDEPTID = t21.DEPTID
WHERE t1.ENABLE = 1
AND ( t1.`ORGID` = #{srf.datacontext.orgid} )
]]>
</sql>
<!--数据查询[Default]-->
<sql id="Default" databaseId="mysql">
<![CDATA[ SELECT t1.`BCODE`, t1.`CREATEDATE`, t1.`DEPTCODE`, t1.`DEPTID`, t1.`DEPTLEVEL`, t1.`DEPTNAME`, t1.`ENABLE`, t1.`LEADERID`, t1.`LEADERNAME`, t1.`ORGID`, t11.`ORGNAME`, t1.`PDEPTID`, t21.`DEPTNAME` AS `PDEPTNAME`, t1.`SHORTNAME`, t1.`SHOWORDER`, t1.`UPDATEDATE` FROM `IBZDEPT` t1 LEFT JOIN IBZORG t11 ON t1.ORGID = t11.ORGID LEFT JOIN IBZDEPT t21 ON t1.PDEPTID = t21.DEPTID
......
......@@ -30,24 +30,6 @@
where porgid=#{orgid}
</select>
<!--数据集合[SelectSOrg]-->
<select id="searchSelectSOrg" parameterType="cn.ibizlab.core.ou.filter.IBZOrganizationSearchContext" resultMap="IBZOrganizationResultMap">
select t1.* from (
<include refid="SelectSOrg" />
)t1
<where><if test="ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere">${ew.sqlSegment}</if></where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据集合[SelectPOrg]-->
<select id="searchSelectPOrg" parameterType="cn.ibizlab.core.ou.filter.IBZOrganizationSearchContext" resultMap="IBZOrganizationResultMap">
select t1.* from (
<include refid="SelectPOrg" />
)t1
<where><if test="ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere">${ew.sqlSegment}</if></where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据集合[Default]-->
<select id="searchDefault" parameterType="cn.ibizlab.core.ou.filter.IBZOrganizationSearchContext" resultMap="IBZOrganizationResultMap">
select t1.* from (
......@@ -71,22 +53,6 @@
]]>
</sql>
<!--数据查询[SelectPOrg]-->
<sql id="SelectPOrg" databaseId="mysql">
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`ENABLE`, t1.`ORGCODE`, t1.`ORGID`, t1.`ORGLEVEL`, t1.`ORGNAME`, t1.`PORGID`, t11.`ORGNAME` AS `PORGNAME`, t1.`SHORTNAME`, t1.`SHOWORDER`, t1.`UPDATEDATE` FROM `IBZORG` t1 LEFT JOIN IBZORG t11 ON t1.PORGID = t11.ORGID
WHERE t1.ENABLE = 1
AND ( INSTR(#{srf.datacontext.orglevel}, t1.ORGLEVEL)=1 )
]]>
</sql>
<!--数据查询[SelectSOrg]-->
<sql id="SelectSOrg" databaseId="mysql">
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`ENABLE`, t1.`ORGCODE`, t1.`ORGID`, t1.`ORGLEVEL`, t1.`ORGNAME`, t1.`PORGID`, t11.`ORGNAME` AS `PORGNAME`, t1.`SHORTNAME`, t1.`SHOWORDER`, t1.`UPDATEDATE` FROM `IBZORG` t1 LEFT JOIN IBZORG t11 ON t1.PORGID = t11.ORGID
WHERE t1.ENABLE = 1
AND ( INSTR(t1.ORGLEVEL,#{srf.datacontext.orglevel})=1 )
]]>
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="mysql">
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`ENABLE`, t1.`ORGCODE`, t1.`ORGID`, t1.`ORGLEVEL`, t1.`ORGNAME`, t1.`PORGID`, t11.`ORGNAME` AS `PORGNAME`, t1.`SHORTNAME`, t1.`SHOWORDER`, t1.`UPDATEDATE` FROM `IBZORG` t1 LEFT JOIN IBZORG t11 ON t1.PORGID = t11.ORGID
......
......@@ -23,7 +23,7 @@
"dename":"IBZDepartment",
"delogicname":"部门",
"sysmoudle":{"id":"OU","name":"ou"},
"dedataset":[{"id":"CurDept" , "name":"CurDept"},{"id":"Default" , "name":"DEFAULT"}],
"dedataset":[{"id":"Default" , "name":"DEFAULT"}],
"deaction":[{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" }],
"datascope":[{"id":"all","name":"全部数据"}, {"id":"curorg","name":"当前单位"},{"id":"porg","name":"上级单位"},{"id":"sorg","name":"下级单位"} ]
}
......@@ -39,7 +39,7 @@
"dename":"IBZOrganization",
"delogicname":"单位机构",
"sysmoudle":{"id":"OU","name":"ou"},
"dedataset":[{"id":"SelectSOrg" , "name":"查询下级单位"},{"id":"SelectPOrg" , "name":"查询上级单位"},{"id":"Default" , "name":"DEFAULT"}],
"dedataset":[{"id":"Default" , "name":"DEFAULT"}],
"deaction":[{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" },{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" }],
"datascope":[{"id":"all","name":"全部数据"}, {"id":"curorg","name":"当前单位"},{"id":"porg","name":"上级单位"},{"id":"sorg","name":"下级单位"} ]
}
......
......@@ -9,7 +9,7 @@ services:
deploy:
resources:
limits:
memory: 1024M
memory: 4048M
reservations:
memory: 400M
mode: replicated
......
......@@ -137,27 +137,6 @@ public class IBZDepartmentResource {
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDepartment-CurDept-all')")
@ApiOperation(value = "获取CurDept", tags = {"部门" } ,notes = "获取CurDept")
@RequestMapping(method= RequestMethod.GET , value="/ibzdepartments/fetchcurdept")
public ResponseEntity<List<IBZDepartmentDTO>> fetchCurDept(IBZDepartmentSearchContext context) {
Page<IBZDepartment> domains = ibzdepartmentService.searchCurDept(context) ;
List<IBZDepartmentDTO> list = ibzdepartmentMapping.toDto(domains.getContent());
return ResponseEntity.status(HttpStatus.OK)
.header("x-page", String.valueOf(context.getPageable().getPageNumber()))
.header("x-per-page", String.valueOf(context.getPageable().getPageSize()))
.header("x-total", String.valueOf(domains.getTotalElements()))
.body(list);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDepartment-CurDept-all')")
@ApiOperation(value = "查询CurDept", tags = {"部门" } ,notes = "查询CurDept")
@RequestMapping(method= RequestMethod.POST , value="/ibzdepartments/searchcurdept")
public ResponseEntity<Page<IBZDepartmentDTO>> searchCurDept(@RequestBody IBZDepartmentSearchContext context) {
Page<IBZDepartment> domains = ibzdepartmentService.searchCurDept(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(ibzdepartmentMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDepartment-Default-all')")
@ApiOperation(value = "获取DEFAULT", tags = {"部门" } ,notes = "获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/ibzdepartments/fetchdefault")
......@@ -288,29 +267,6 @@ public class IBZDepartmentResource {
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDepartment-CurDept-all')")
@ApiOperation(value = "根据单位机构获取CurDept", tags = {"部门" } ,notes = "根据单位机构获取CurDept")
@RequestMapping(method= RequestMethod.GET , value="/ibzorganizations/{ibzorganization_id}/ibzdepartments/fetchcurdept")
public ResponseEntity<List<IBZDepartmentDTO>> fetchIBZDepartmentCurDeptByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id,IBZDepartmentSearchContext context) {
context.setN_orgid_eq(ibzorganization_id);
Page<IBZDepartment> domains = ibzdepartmentService.searchCurDept(context) ;
List<IBZDepartmentDTO> list = ibzdepartmentMapping.toDto(domains.getContent());
return ResponseEntity.status(HttpStatus.OK)
.header("x-page", String.valueOf(context.getPageable().getPageNumber()))
.header("x-per-page", String.valueOf(context.getPageable().getPageSize()))
.header("x-total", String.valueOf(domains.getTotalElements()))
.body(list);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDepartment-CurDept-all')")
@ApiOperation(value = "根据单位机构查询CurDept", tags = {"部门" } ,notes = "根据单位机构查询CurDept")
@RequestMapping(method= RequestMethod.POST , value="/ibzorganizations/{ibzorganization_id}/ibzdepartments/searchcurdept")
public ResponseEntity<Page<IBZDepartmentDTO>> searchIBZDepartmentCurDeptByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id, @RequestBody IBZDepartmentSearchContext context) {
context.setN_orgid_eq(ibzorganization_id);
Page<IBZDepartment> domains = ibzdepartmentService.searchCurDept(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(ibzdepartmentMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDepartment-Default-all')")
@ApiOperation(value = "根据单位机构获取DEFAULT", tags = {"部门" } ,notes = "根据单位机构获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/ibzorganizations/{ibzorganization_id}/ibzdepartments/fetchdefault")
......
......@@ -137,48 +137,6 @@ public class IBZOrganizationResource {
return ResponseEntity.status(HttpStatus.OK).body(ibzorganizationMapping.toDto(ibzorganizationService.getDraft(new IBZOrganization())));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZOrganization-SelectSOrg-all')")
@ApiOperation(value = "获取查询下级单位", tags = {"单位机构" } ,notes = "获取查询下级单位")
@RequestMapping(method= RequestMethod.GET , value="/ibzorganizations/fetchselectsorg")
public ResponseEntity<List<IBZOrganizationDTO>> fetchSelectSOrg(IBZOrganizationSearchContext context) {
Page<IBZOrganization> domains = ibzorganizationService.searchSelectSOrg(context) ;
List<IBZOrganizationDTO> list = ibzorganizationMapping.toDto(domains.getContent());
return ResponseEntity.status(HttpStatus.OK)
.header("x-page", String.valueOf(context.getPageable().getPageNumber()))
.header("x-per-page", String.valueOf(context.getPageable().getPageSize()))
.header("x-total", String.valueOf(domains.getTotalElements()))
.body(list);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZOrganization-SelectSOrg-all')")
@ApiOperation(value = "查询查询下级单位", tags = {"单位机构" } ,notes = "查询查询下级单位")
@RequestMapping(method= RequestMethod.POST , value="/ibzorganizations/searchselectsorg")
public ResponseEntity<Page<IBZOrganizationDTO>> searchSelectSOrg(@RequestBody IBZOrganizationSearchContext context) {
Page<IBZOrganization> domains = ibzorganizationService.searchSelectSOrg(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(ibzorganizationMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZOrganization-SelectPOrg-all')")
@ApiOperation(value = "获取查询上级单位", tags = {"单位机构" } ,notes = "获取查询上级单位")
@RequestMapping(method= RequestMethod.GET , value="/ibzorganizations/fetchselectporg")
public ResponseEntity<List<IBZOrganizationDTO>> fetchSelectPOrg(IBZOrganizationSearchContext context) {
Page<IBZOrganization> domains = ibzorganizationService.searchSelectPOrg(context) ;
List<IBZOrganizationDTO> list = ibzorganizationMapping.toDto(domains.getContent());
return ResponseEntity.status(HttpStatus.OK)
.header("x-page", String.valueOf(context.getPageable().getPageNumber()))
.header("x-per-page", String.valueOf(context.getPageable().getPageSize()))
.header("x-total", String.valueOf(domains.getTotalElements()))
.body(list);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZOrganization-SelectPOrg-all')")
@ApiOperation(value = "查询查询上级单位", tags = {"单位机构" } ,notes = "查询查询上级单位")
@RequestMapping(method= RequestMethod.POST , value="/ibzorganizations/searchselectporg")
public ResponseEntity<Page<IBZOrganizationDTO>> searchSelectPOrg(@RequestBody IBZOrganizationSearchContext context) {
Page<IBZOrganization> domains = ibzorganizationService.searchSelectPOrg(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(ibzorganizationMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZOrganization-Default-all')")
@ApiOperation(value = "获取DEFAULT", tags = {"单位机构" } ,notes = "获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/ibzorganizations/fetchdefault")
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册