提交 95ef0a00 编写于 作者: ibizdev's avatar ibizdev

ibizdev提交

上级 914c827d
...@@ -130,6 +130,14 @@ export default { ...@@ -130,6 +130,14 @@ export default {
}, },
}, },
gridviewtoolbar_toolbar: { gridviewtoolbar_toolbar: {
tbitem1_opennewcreateview: {
caption: "新建",
tip: "新建",
},
tbitem2: {
caption: "-",
tip: "",
},
tbitem3: { tbitem3: {
caption: "New", caption: "New",
tip: "New", tip: "New",
......
...@@ -129,6 +129,14 @@ export default { ...@@ -129,6 +129,14 @@ export default {
}, },
}, },
gridviewtoolbar_toolbar: { gridviewtoolbar_toolbar: {
tbitem1_opennewcreateview: {
caption: '新建',
tip: '新建',
},
tbitem2: {
caption: '-',
tip: '',
},
tbitem3: { tbitem3: {
caption: '新建', caption: '新建',
tip: '新建', tip: '新建',
......
...@@ -13,6 +13,13 @@ ...@@ -13,6 +13,13 @@
<div class='pull-right'> <div class='pull-right'>
<div class='toolbar-container'> <div class='toolbar-container'>
<tooltip :transfer="true" :max-width="600"> <tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem1_opennewcreateview.visabled" :disabled="toolBarModels.tbitem1_opennewcreateview.disabled" class='' @click="toolbar_click({ tag: 'tbitem1_opennewcreateview' }, $event)">
<i class=''></i>
<span class='caption'>{{$t('entities.ibzorganization.gridviewtoolbar_toolbar.tbitem1_opennewcreateview.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.ibzorganization.gridviewtoolbar_toolbar.tbitem1_opennewcreateview.tip')}}</div>
</tooltip>
<span class='seperator'>|</span> <tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem3.visabled" :disabled="toolBarModels.tbitem3.disabled" class='' @click="toolbar_click({ tag: 'tbitem3' }, $event)"> <i-button v-show="toolBarModels.tbitem3.visabled" :disabled="toolBarModels.tbitem3.disabled" class='' @click="toolbar_click({ tag: 'tbitem3' }, $event)">
<i class='fa fa-file-text-o'></i> <i class='fa fa-file-text-o'></i>
<span class='caption'>{{$t('entities.ibzorganization.gridviewtoolbar_toolbar.tbitem3.caption')}}</span> <span class='caption'>{{$t('entities.ibzorganization.gridviewtoolbar_toolbar.tbitem3.caption')}}</span>
...@@ -111,6 +118,7 @@ import IBZOrganizationService from '@/service/ibzorganization/ibzorganization-se ...@@ -111,6 +118,7 @@ import IBZOrganizationService from '@/service/ibzorganization/ibzorganization-se
import GridViewEngine from '@engine/view/grid-view-engine'; import GridViewEngine from '@engine/view/grid-view-engine';
import IBZOrganizationUIService from '@/uiservice/ibzorganization/ibzorganization-ui-service';
@Component({ @Component({
components: { components: {
...@@ -289,6 +297,9 @@ export default class IBZOrganizationGridViewBase extends Vue { ...@@ -289,6 +297,9 @@ export default class IBZOrganizationGridViewBase extends Vue {
* @memberof IBZOrganizationGridView * @memberof IBZOrganizationGridView
*/ */
public toolBarModels: any = { public toolBarModels: any = {
tbitem1_opennewcreateview: { name: 'tbitem1_opennewcreateview', caption: '新建', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'OpenNewCreateView', target: 'NONE' } },
tbitem2: { name: 'tbitem2', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem3: { name: 'tbitem3', caption: '新建', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'New', target: '' } }, tbitem3: { name: 'tbitem3', caption: '新建', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'New', target: '' } },
tbitem4: { name: 'tbitem4', caption: '编辑', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Edit', target: 'SINGLEKEY' } }, tbitem4: { name: 'tbitem4', caption: '编辑', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Edit', target: 'SINGLEKEY' } },
...@@ -549,6 +560,9 @@ export default class IBZOrganizationGridViewBase extends Vue { ...@@ -549,6 +560,9 @@ export default class IBZOrganizationGridViewBase extends Vue {
* @memberof IBZOrganizationGridViewBase * @memberof IBZOrganizationGridViewBase
*/ */
public toolbar_click($event: any, $event2?: any) { public toolbar_click($event: any, $event2?: any) {
if (Object.is($event.tag, 'tbitem1_opennewcreateview')) {
this.toolbar_tbitem1_opennewcreateview_click($event, '', $event2);
}
if (Object.is($event.tag, 'tbitem3')) { if (Object.is($event.tag, 'tbitem3')) {
this.toolbar_tbitem3_click($event, '', $event2); this.toolbar_tbitem3_click($event, '', $event2);
} }
...@@ -679,6 +693,33 @@ export default class IBZOrganizationGridViewBase extends Vue { ...@@ -679,6 +693,33 @@ export default class IBZOrganizationGridViewBase extends Vue {
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem1_opennewcreateview_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
// 界面行为
const curUIService:IBZOrganizationUIService = new IBZOrganizationUIService();
curUIService.IBZOrganization_OpenNewCreateView(datas,contextJO, paramJO, $event, xData,this,"IBZOrganization");
}
/** /**
* 逻辑事件 * 逻辑事件
* *
......
...@@ -5,6 +5,7 @@ export const PageComponents = { ...@@ -5,6 +5,7 @@ export const PageComponents = {
Vue.component('ibzorganization-edit-view', () => import('@pages/ou/ibzorganization-edit-view/ibzorganization-edit-view.vue')); Vue.component('ibzorganization-edit-view', () => import('@pages/ou/ibzorganization-edit-view/ibzorganization-edit-view.vue'));
Vue.component('ibzdepartment-edit-view', () => import('@pages/ou/ibzdepartment-edit-view/ibzdepartment-edit-view.vue')); Vue.component('ibzdepartment-edit-view', () => import('@pages/ou/ibzdepartment-edit-view/ibzdepartment-edit-view.vue'));
Vue.component('ibzorganization-pickup-view', () => import('@pages/ou/ibzorganization-pickup-view/ibzorganization-pickup-view.vue')); Vue.component('ibzorganization-pickup-view', () => import('@pages/ou/ibzorganization-pickup-view/ibzorganization-pickup-view.vue'));
Vue.component('ibzorganization-option-view', () => import('@pages/ou/ibzorganization-option-view/ibzorganization-option-view.vue'));
Vue.component('ibzemployee-grid-view', () => import('@pages/ou/ibzemployee-grid-view/ibzemployee-grid-view.vue')); Vue.component('ibzemployee-grid-view', () => import('@pages/ou/ibzemployee-grid-view/ibzemployee-grid-view.vue'));
Vue.component('ibzorganization-pickup-grid-view', () => import('@pages/ou/ibzorganization-pickup-grid-view/ibzorganization-pickup-grid-view.vue')); Vue.component('ibzorganization-pickup-grid-view', () => import('@pages/ou/ibzorganization-pickup-grid-view/ibzorganization-pickup-grid-view.vue'));
Vue.component('ibzdepartment-grid-view', () => import('@pages/ou/ibzdepartment-grid-view/ibzdepartment-grid-view.vue')); Vue.component('ibzdepartment-grid-view', () => import('@pages/ou/ibzdepartment-grid-view/ibzdepartment-grid-view.vue'));
......
...@@ -170,6 +170,19 @@ const router = new Router({ ...@@ -170,6 +170,19 @@ const router = new Router({
}, },
component: () => import('@pages/ou/ibzorganization-pickup-view/ibzorganization-pickup-view.vue'), component: () => import('@pages/ou/ibzorganization-pickup-view/ibzorganization-pickup-view.vue'),
}, },
{
path: 'ibzorganizations/:ibzorganization?/optionview/:optionview?',
meta: {
caption: 'entities.ibzorganization.views.optionview.caption',
parameters: [
{ pathName: 'ouindexview', parameterName: 'ouindexview' },
{ pathName: 'ibzorganizations', parameterName: 'ibzorganization' },
{ pathName: 'optionview', parameterName: 'optionview' },
],
requireAuth: true,
},
component: () => import('@pages/ou/ibzorganization-option-view/ibzorganization-option-view.vue'),
},
{ {
path: 'ibzorganizations/:ibzorganization?/ibzdepartments/:ibzdepartment?/ibzemployees/:ibzemployee?/gridview/:gridview?', path: 'ibzorganizations/:ibzorganization?/ibzdepartments/:ibzdepartment?/ibzemployees/:ibzemployee?/gridview/:gridview?',
meta: { meta: {
...@@ -487,6 +500,18 @@ const router = new Router({ ...@@ -487,6 +500,18 @@ const router = new Router({
}, },
component: () => import('@pages/ou/ibzdepartment-pickup-grid-view/ibzdepartment-pickup-grid-view.vue'), component: () => import('@pages/ou/ibzdepartment-pickup-grid-view/ibzdepartment-pickup-grid-view.vue'),
}, },
{
path: '/ibzorganizations/:ibzorganization?/optionview/:optionview?',
meta: {
caption: 'entities.ibzorganization.views.optionview.caption',
parameters: [
{ pathName: 'ibzorganizations', parameterName: 'ibzorganization' },
{ pathName: 'optionview', parameterName: 'optionview' },
],
requireAuth: true,
},
component: () => import('@pages/ou/ibzorganization-option-view/ibzorganization-option-view.vue'),
},
{ {
path: '/ibzorganizations/:ibzorganization?/pickupview/:pickupview?', path: '/ibzorganizations/:ibzorganization?/pickupview/:pickupview?',
meta: { meta: {
......
...@@ -91,6 +91,7 @@ export const viewstate: any = { ...@@ -91,6 +91,7 @@ export const viewstate: any = {
viewdatachange: false, viewdatachange: false,
refviews: [ refviews: [
'12cffa053a1d3e22ab397b1164338cfb', '12cffa053a1d3e22ab397b1164338cfb',
'995d26f289a30e31573d557a5f5ba254',
], ],
}, },
{ {
......
...@@ -94,6 +94,102 @@ export default class IBZOrganizationUIServiceBase extends UIService { ...@@ -94,6 +94,102 @@ export default class IBZOrganizationUIServiceBase extends UIService {
public initDeMainStateMap(){ public initDeMainStateMap(){
} }
/**
* 新建
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
*/
public async IBZOrganization_OpenNewCreateView(args: any[], context:any = {} ,params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
let data: any = {};
const _args: any[] = Util.deepCopy(args);
const _this: any = actionContext;
const actionTarget: string | null = 'NONE';
context = UIActionTool.handleContextParam(actionTarget,_args,context);
data = UIActionTool.handleActionParam(actionTarget,_args,params);
context = Object.assign({},actionContext.context,context);
let parentObj:any = {srfparentdename:srfParentDeName?srfParentDeName:null,srfparentkey:srfParentDeName?context[srfParentDeName.toLowerCase()]:null};
Object.assign(data,parentObj);
Object.assign(context,parentObj);
let deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'ibzorganizations', parameterName: 'ibzorganization' },
{ pathName: 'optionview', parameterName: 'optionview' },
];
const openIndexViewTab = (data: any) => {
const routePath = actionContext.$viewTool.buildUpRoutePath(actionContext.$route, context, deResParameters, parameters, _args, data);
actionContext.$router.push(routePath);
if (xData && xData.refresh && xData.refresh instanceof Function) {
xData.refresh(args);
}
if (this.IBZOrganization_OpenMainView && this.IBZOrganization_OpenMainView instanceof Function) {
this.IBZOrganization_OpenMainView([data],context,params, $event, xData,actionContext);
}
return null;
}
openIndexViewTab(data);
}
/**
* 打开主页面
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
*/
public async IBZOrganization_OpenMainView(args: any[], context:any = {} ,params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
let data: any = {};
const _args: any[] = Util.deepCopy(args);
const _this: any = actionContext;
const actionTarget: string | null = 'SINGLEKEY';
Object.assign(context, { ibzorganization: '%ibzorganization%' });
Object.assign(params, { orgid: '%ibzorganization%' });
Object.assign(params, { orgname: '%orgname%' });
context = UIActionTool.handleContextParam(actionTarget,_args,context);
data = UIActionTool.handleActionParam(actionTarget,_args,params);
context = Object.assign({},actionContext.context,context);
let parentObj:any = {srfparentdename:srfParentDeName?srfParentDeName:null,srfparentkey:srfParentDeName?context[srfParentDeName.toLowerCase()]:null};
Object.assign(data,parentObj);
Object.assign(context,parentObj);
let deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'ibzorganizations', parameterName: 'ibzorganization' },
];
const openDrawer = (view: any, data: any) => {
let container: Subject<any> = actionContext.$appdrawer.openDrawer(view, context,data);
container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
}
const _this: any = actionContext;
if(window.opener){
window.opener.postMessage({status:'OK',identification:'WF'},Environment.uniteAddress);
window.close();
}
return result.datas;
});
}
const view: any = {
viewname: 'ibzorganization-edit-view',
height: 0,
width: 0,
title: actionContext.$t('entities.ibzorganization.views.editview.title'),
placement: 'DRAWER_RIGHT',
};
openDrawer(view, data);
}
/** /**
* 获取指定数据的重定向页面 * 获取指定数据的重定向页面
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd"> <databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
<!--输出实体[IBZORG]数据结构 --> <!--输出实体[IBZORG]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-ibzorg-412-1"> <changeSet author="a_A_5d9d78509" id="tab-ibzorg-416-1">
<createTable tableName="IBZORG"> <createTable tableName="IBZORG">
<column name="ORGID" remarks="" type="VARCHAR(100)"> <column name="ORGID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_IBZORG_ORGID"/> <constraints primaryKey="true" primaryKeyName="PK_IBZORG_ORGID"/>
...@@ -137,7 +137,7 @@ ...@@ -137,7 +137,7 @@
</changeSet> </changeSet>
<!--输出实体[IBZORG]外键关系 --> <!--输出实体[IBZORG]外键关系 -->
<changeSet author="a_A_5d9d78509" id="fk-ibzorg-412-4"> <changeSet author="a_A_5d9d78509" id="fk-ibzorg-416-4">
<addForeignKeyConstraint baseColumnNames="PORGID" baseTableName="IBZORG" constraintName="DER1N_IBZORG_IBZORG_PORGID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ORGID" referencedTableName="IBZORG" validate="true"/> <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> </changeSet>
<!--输出实体[IBZEMP]外键关系 --> <!--输出实体[IBZEMP]外键关系 -->
......
...@@ -8,23 +8,29 @@ import org.springframework.util.ObjectUtils; ...@@ -8,23 +8,29 @@ import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import org.springframework.beans.factory.annotation.Value;
import cn.ibizlab.util.security.AuthenticationUser; import cn.ibizlab.util.security.AuthenticationUser;
@RestController @RestController
@RequestMapping(value = "") @RequestMapping(value = "")
public class AppController { public class AppController {
@Value("${ibiz.enablePermissionValid:false}")
boolean enablePermissionValid; //是否开启权限校验
@RequestMapping(method = RequestMethod.GET, value = "/appdata") @RequestMapping(method = RequestMethod.GET, value = "/appdata")
public ResponseEntity<JSONObject> getAppData() { public ResponseEntity<JSONObject> getAppData() {
JSONObject appData = new JSONObject() ; JSONObject appData = new JSONObject() ;
JSONArray uniRes=new JSONArray(); JSONArray uniRes=new JSONArray();
if(enablePermissionValid){
JSONObject userPermission=AuthenticationUser.getAuthenticationUser().getPermissionList(); JSONObject userPermission=AuthenticationUser.getAuthenticationUser().getPermissionList();
if(!ObjectUtils.isEmpty(userPermission)){ if(!ObjectUtils.isEmpty(userPermission)){
uniRes = userPermission.getJSONArray("unires"); uniRes = userPermission.getJSONArray("unires");
} }
}
appData.put("unires",uniRes); appData.put("unires",uniRes);
appData.put("enablepermissionvalid",enablePermissionValid);
return ResponseEntity.status(HttpStatus.OK).body(appData); return ResponseEntity.status(HttpStatus.OK).body(appData);
} }
} }
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册