提交 43f88204 编写于 作者: ibizdev's avatar ibizdev

kuaikuai 发布系统代码 [后台服务,演示应用]

上级 de9f6949
......@@ -81,6 +81,7 @@ export class AuthServiceRegister {
this.allAuthService.set('ibizsample0005', () => import('@/authservice/ibizsample0005/ibizsample0005-auth-service'));
this.allAuthService.set('ibizuniproduct', () => import('@/authservice/ibizuniproduct/ibizuniproduct-auth-service'));
this.allAuthService.set('dynadashboard', () => import('@/authservice/dynadashboard/dynadashboard-auth-service'));
this.allAuthService.set('ibizappextendeditor', () => import('@/authservice/ibizappextendeditor/ibizappextendeditor-auth-service'));
}
/**
......
import AuthService from '../auth-service';
/**
* 扩展编辑器权限服务对象基类
*
* @export
* @class IBIZAPPEXTENDEDITORAuthServiceBase
* @extends {AuthService}
*/
export default class IBIZAPPEXTENDEDITORAuthServiceBase extends AuthService {
/**
* Creates an instance of IBIZAPPEXTENDEDITORAuthServiceBase.
*
* @param {*} [opts={}]
* @memberof IBIZAPPEXTENDEDITORAuthServiceBase
*/
constructor(opts: any = {}) {
super(opts);
}
/**
* 根据当前数据获取实体操作标识
*
* @param {*} mainSateOPPrivs 传入数据操作标识
* @returns {any}
* @memberof IBIZAPPEXTENDEDITORAuthServiceBase
*/
public getOPPrivs(mainSateOPPrivs:any):any{
let curDefaultOPPrivs:any = this.getSysOPPrivs();
let copyDefaultOPPrivs:any = JSON.parse(JSON.stringify(curDefaultOPPrivs));
if(mainSateOPPrivs){
Object.assign(curDefaultOPPrivs,mainSateOPPrivs);
}
// 统一资源优先
Object.keys(curDefaultOPPrivs).forEach((name:string) => {
if(this.sysOPPrivsMap.get(name) && copyDefaultOPPrivs[name] === 0){
curDefaultOPPrivs[name] = copyDefaultOPPrivs[name];
}
});
return curDefaultOPPrivs;
}
}
\ No newline at end of file
import IBIZAPPEXTENDEDITORAuthServiceBase from './ibizappextendeditor-auth-service-base';
/**
* 扩展编辑器权限服务对象
*
* @export
* @class IBIZAPPEXTENDEDITORAuthService
* @extends {IBIZAPPEXTENDEDITORAuthServiceBase}
*/
export default class IBIZAPPEXTENDEDITORAuthService extends IBIZAPPEXTENDEDITORAuthServiceBase {
/**
* Creates an instance of IBIZAPPEXTENDEDITORAuthService.
*
* @param {*} [opts={}]
* @memberof IBIZAPPEXTENDEDITORAuthService
*/
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
......@@ -40,6 +40,7 @@ import ibizcustom_en_US from '@locale/lanres/entities/ibizcustom/ibizcustom_en_U
import ibizsample0005_en_US from '@locale/lanres/entities/ibizsample0005/ibizsample0005_en_US';
import ibizuniproduct_en_US from '@locale/lanres/entities/ibizuniproduct/ibizuniproduct_en_US';
import dynadashboard_en_US from '@locale/lanres/entities/dynadashboard/dynadashboard_en_US';
import ibizappextendeditor_en_US from '@locale/lanres/entities/ibizappextendeditor/ibizappextendeditor_en_US';
import components_en_US from '@locale/lanres/components/components_en_US';
import codelist_en_US from '@locale/lanres/codelist/codelist_en_US';
import userCustom_en_US from '@locale/lanres/userCustom/userCustom_en_US';
......@@ -492,6 +493,7 @@ function getAppLocale(){
ibizsample0005: ibizsample0005_en_US(),
ibizuniproduct: ibizuniproduct_en_US(),
dynadashboard: dynadashboard_en_US(),
ibizappextendeditor: ibizappextendeditor_en_US(),
},
components: components_en_US(),
codelist: codelist_en_US(),
......
......@@ -40,6 +40,7 @@ import ibizcustom_zh_CN from '@locale/lanres/entities/ibizcustom/ibizcustom_zh_C
import ibizsample0005_zh_CN from '@locale/lanres/entities/ibizsample0005/ibizsample0005_zh_CN';
import ibizuniproduct_zh_CN from '@locale/lanres/entities/ibizuniproduct/ibizuniproduct_zh_CN';
import dynadashboard_zh_CN from '@locale/lanres/entities/dynadashboard/dynadashboard_zh_CN';
import ibizappextendeditor_zh_CN from '@locale/lanres/entities/ibizappextendeditor/ibizappextendeditor_zh_CN';
import components_zh_CN from '@locale/lanres/components/components_zh_CN';
import codelist_zh_CN from '@locale/lanres/codelist/codelist_zh_CN';
import userCustom_zh_CN from '@locale/lanres/userCustom/userCustom_zh_CN';
......@@ -491,6 +492,7 @@ function getAppLocale(){
ibizsample0005: ibizsample0005_zh_CN(),
ibizuniproduct: ibizuniproduct_zh_CN(),
dynadashboard: dynadashboard_zh_CN(),
ibizappextendeditor: ibizappextendeditor_zh_CN(),
},
components: components_zh_CN(),
codelist: codelist_zh_CN(),
......
import IBIZAPPEXTENDEDITOR_en_US_Base from './ibizappextendeditor_en_US_base';
function getLocaleResource(){
const IBIZAPPEXTENDEDITOR_en_US_OwnData = {};
const targetData = Object.assign(IBIZAPPEXTENDEDITOR_en_US_Base(), IBIZAPPEXTENDEDITOR_en_US_OwnData);
return targetData;
}
export default getLocaleResource;
\ No newline at end of file
import commonLogic from '@/locale/logic/common/common-logic';
function getLocaleResourceBase(){
const data:any = {
fields: {
createman: commonLogic.appcommonhandle("建立人",null),
updatedate: commonLogic.appcommonhandle("更新时间",null),
createdate: commonLogic.appcommonhandle("建立时间",null),
updateman: commonLogic.appcommonhandle("更新人",null),
ibizappextendeditorname: commonLogic.appcommonhandle("扩展编辑器名称",null),
ibizappextendeditorid: commonLogic.appcommonhandle("扩展编辑器标识",null),
extensionflag: commonLogic.appcommonhandle("扩展标识",null),
documentaddress: commonLogic.appcommonhandle("文档地址",null),
extendeditordescription: commonLogic.appcommonhandle("扩展编辑器描述",null),
amount: commonLogic.appcommonhandle("数量",null),
extendeditortype: commonLogic.appcommonhandle("扩展编辑器类型",null),
},
};
return data;
}
export default getLocaleResourceBase;
\ No newline at end of file
import IBIZAPPEXTENDEDITOR_zh_CN_Base from './ibizappextendeditor_zh_CN_base';
function getLocaleResource(){
const IBIZAPPEXTENDEDITOR_zh_CN_OwnData = {};
const targetData = Object.assign(IBIZAPPEXTENDEDITOR_zh_CN_Base(), IBIZAPPEXTENDEDITOR_zh_CN_OwnData);
return targetData;
}
export default getLocaleResource;
\ No newline at end of file
import commonLogic from '@/locale/logic/common/common-logic';
function getLocaleResourceBase(){
const data:any = {
fields: {
createman: commonLogic.appcommonhandle("建立人",null),
updatedate: commonLogic.appcommonhandle("更新时间",null),
createdate: commonLogic.appcommonhandle("建立时间",null),
updateman: commonLogic.appcommonhandle("更新人",null),
ibizappextendeditorname: commonLogic.appcommonhandle("扩展编辑器名称",null),
ibizappextendeditorid: commonLogic.appcommonhandle("扩展编辑器标识",null),
extensionflag: commonLogic.appcommonhandle("扩展标识",null),
documentaddress: commonLogic.appcommonhandle("文档地址",null),
extendeditordescription: commonLogic.appcommonhandle("扩展编辑器描述",null),
amount: commonLogic.appcommonhandle("数量",null),
extendeditortype: commonLogic.appcommonhandle("扩展编辑器类型",null),
},
};
return data;
}
export default getLocaleResourceBase;
\ No newline at end of file
......@@ -136,56 +136,6 @@ function getLocaleResourceBase(){
uiactions: {
},
},
gridviewtoolbar_toolbar: {
tbitem3: {
caption: commonLogic.appcommonhandle("New",null),
tip: commonLogic.appcommonhandle("New",null),
},
tbitem4: {
caption: commonLogic.appcommonhandle("Edit",null),
tip: commonLogic.appcommonhandle("Edit {0}",null),
},
deuiaction1: {
caption: commonLogic.appcommonhandle("刷新",null),
tip: commonLogic.appcommonhandle("刷新",null),
},
tbitem6: {
caption: commonLogic.appcommonhandle("Copy",null),
tip: commonLogic.appcommonhandle("Copy {0}",null),
},
tbitem7: {
caption: commonLogic.appcommonhandle("-",null),
tip: commonLogic.appcommonhandle("",null),
},
tbitem8: {
caption: commonLogic.appcommonhandle("Remove",null),
tip: commonLogic.appcommonhandle("Remove {0}",null),
},
tbitem9: {
caption: commonLogic.appcommonhandle("-",null),
tip: commonLogic.appcommonhandle("",null),
},
tbitem13: {
caption: commonLogic.appcommonhandle("Export",null),
tip: commonLogic.appcommonhandle("Export {0} Data To Excel",null),
},
tbitem10: {
caption: commonLogic.appcommonhandle("-",null),
tip: commonLogic.appcommonhandle("",null),
},
tbitem16: {
caption: commonLogic.appcommonhandle("其它",null),
tip: commonLogic.appcommonhandle("其它",null),
},
tbitem21: {
caption: commonLogic.appcommonhandle("Export Data Model",null),
tip: commonLogic.appcommonhandle("导出数据模型",null),
},
tbitem23: {
caption: commonLogic.appcommonhandle("数据导入",null),
tip: commonLogic.appcommonhandle("数据导入",null),
},
},
editviewtoolbar_toolbar: {
tbitem3: {
caption: commonLogic.appcommonhandle("Save",null),
......
......@@ -136,56 +136,6 @@ function getLocaleResourceBase(){
uiactions: {
},
},
gridviewtoolbar_toolbar: {
tbitem3: {
caption: commonLogic.appcommonhandle("新建",null),
tip: commonLogic.appcommonhandle("新建",null),
},
tbitem4: {
caption: commonLogic.appcommonhandle("编辑",null),
tip: commonLogic.appcommonhandle("编辑",null),
},
deuiaction1: {
caption: commonLogic.appcommonhandle("刷新",null),
tip: commonLogic.appcommonhandle("刷新",null),
},
tbitem6: {
caption: commonLogic.appcommonhandle("拷贝",null),
tip: commonLogic.appcommonhandle("拷贝",null),
},
tbitem7: {
caption: commonLogic.appcommonhandle("-",null),
tip: commonLogic.appcommonhandle("",null),
},
tbitem8: {
caption: commonLogic.appcommonhandle("删除",null),
tip: commonLogic.appcommonhandle("删除",null),
},
tbitem9: {
caption: commonLogic.appcommonhandle("-",null),
tip: commonLogic.appcommonhandle("",null),
},
tbitem13: {
caption: commonLogic.appcommonhandle("导出",null),
tip: commonLogic.appcommonhandle("导出",null),
},
tbitem10: {
caption: commonLogic.appcommonhandle("-",null),
tip: commonLogic.appcommonhandle("",null),
},
tbitem16: {
caption: commonLogic.appcommonhandle("其它",null),
tip: commonLogic.appcommonhandle("其它",null),
},
tbitem21: {
caption: commonLogic.appcommonhandle("导出数据模型",null),
tip: commonLogic.appcommonhandle("导出数据模型",null),
},
tbitem23: {
caption: commonLogic.appcommonhandle("数据导入",null),
tip: commonLogic.appcommonhandle("数据导入",null),
},
},
editviewtoolbar_toolbar: {
tbitem3: {
caption: commonLogic.appcommonhandle("保存",null),
......
import qs from 'qs';
import { MockAdapter } from '@/mock/mock-adapter';
const mock = MockAdapter.getInstance();
// 模拟数据
const mockDatas: Array<any> = [
];
//getwflink
mock.onGet(new RegExp(/^\/wfcore\/demosys-app-web\/ibizappextendeditors\/[a-zA-Z0-9\-\;]+\/usertasks\/[a-zA-Z0-9\-\;]+\/ways$/)).reply((config: any) => {
console.groupCollapsed("实体:ibizappextendeditor 方法: getwflink");
console.table({url:config.url, method: config.method, data:config.data});
console.groupEnd();
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, {}];
}
return [status,[
{"sequenceFlowId":"dfdsfdsfdsfdsfds","sequenceFlowName":"同意",
"taskId":"aaaaddddccccddddd","processDefinitionKey":"support-workorders-approve-v1",
"processInstanceId":"ddlfldldfldsfds","refViewKey":""},
{"sequenceFlowId":"ddssdfdfdfdfsfdf","sequenceFlowName":"不同意",
"taskId":"aaaaddddccccddddd","processDefinitionKey":"support-workorders-approve-v1",
"processInstanceId":"ddfdsldlfdlldsf","refViewKey":"workorder_ltform_editview"}
]];
});
// getwfstep
mock.onGet(new RegExp(/^\/wfcore\/demosys-app-web\/ibizappextendeditors\/process-definitions-nodes$/)).reply((config: any) => {
console.groupCollapsed("实体:ibizappextendeditor 方法: getwfstep");
console.table({url:config.url, method: config.method, data:config.data});
console.groupEnd();
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, {}];
}
return [status, [
{"userTaskId":"sddfddfd-dfdf-fdfd-fdf-dfdfd",
"userTaskName":"待审",
"cnt":0,
"processDefinitionKey":"support-workorders-approve-v1",
"processDefinitionName":"工单审批流程v1"
},
{"userTaskId":"sddfddfd-dfdf-fdfd-fdf-87927",
"userTaskName":"待分配",
"cnt":3,
"processDefinitionKey":"support-workorders-approve-v1",
"processDefinitionName":"工单审批流程v1"}
]];
});
// createBatch
mock.onPost(new RegExp(/^\/ibizappextendeditors\/batch$/)).reply((config: any) => {
console.groupCollapsed("实体:ibizappextendeditor 方法: createBatch");
console.table({url:config.url, method: config.method, data:config.data});
console.groupEnd();
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, {}];
}
return [status, {}];
});
// updateBatch
mock.onPut(new RegExp(/^\/ibizappextendeditors\/batch$/)).reply((config: any) => {
console.groupCollapsed("实体:ibizappextendeditor 方法: updateBatch");
console.table({url:config.url, method: config.method, data:config.data});
console.groupEnd();
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, {}];
}
return [status, {}];
});
// removeBatch
mock.onDelete(new RegExp(/^\/ibizappextendeditors\/batch$/)).reply((config: any) => {
console.groupCollapsed("实体:ibizappextendeditor 方法: removeBatch");
console.table({url:config.url, method: config.method, data:config.data});
console.groupEnd();
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, {}];
}
return [status, {}];
});
// Select
mock.onGet(new RegExp(/^\/ibizappextendeditors\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:ibizappextendeditor 方法: Select");
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> = ['ibizappextendeditorid'];
const matchArray:any = new RegExp(/^\/ibizappextendeditors\/([a-zA-Z0-9\-\;]{1,35})\/select$/).exec(config.url);
let tempValue: any = {};
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 : [];
let _items = items.find((item: any) => Object.is(item.ibizappextendeditorid, tempValue.ibizappextendeditorid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items);
console.groupEnd();
console.groupEnd();
return [status, _items];
});
// Create
mock.onPost(new RegExp(/^\/ibizappextendeditors\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:ibizappextendeditor 方法: Create");
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> = ['ibizappextendeditorid'];
const matchArray:any = new RegExp(/^\/ibizappextendeditors\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
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]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(mockDatas[0]);
console.groupEnd();
console.groupEnd();
return [status, mockDatas[0]];
});
// Update
mock.onPut(new RegExp(/^\/ibizappextendeditors\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:ibizappextendeditor 方法: Update");
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> = ['ibizappextendeditorid'];
const matchArray:any = new RegExp(/^\/ibizappextendeditors\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
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 : [];
//let _items = items.find((item: any) => Object.is(item.ibizappextendeditorid, tempValue.ibizappextendeditorid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['ibizappextendeditorid'] == tempValue['ibizappextendeditorid'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, data];
});
// GetDraft
mock.onGet(new RegExp(/^\/ibizappextendeditors\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:ibizappextendeditor 方法: GetDraft");
console.table({url:config.url, method: config.method, data:config.data});
// GetDraft
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// CheckKey
mock.onPost(new RegExp(/^\/ibizappextendeditors\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:ibizappextendeditor 方法: CheckKey");
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> = ['ibizappextendeditorid'];
const matchArray:any = new RegExp(/^\/ibizappextendeditors\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/).exec(config.url);
let tempValue: any = {};
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 : [];
//let _items = items.find((item: any) => Object.is(item.ibizappextendeditorid, tempValue.ibizappextendeditorid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['ibizappextendeditorid'] == tempValue['ibizappextendeditorid'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, data];
});
// Save
mock.onPost(new RegExp(/^\/ibizappextendeditors\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:ibizappextendeditor 方法: Save");
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> = ['ibizappextendeditorid'];
const matchArray:any = new RegExp(/^\/ibizappextendeditors\/([a-zA-Z0-9\-\;]{1,35})\/save$/).exec(config.url);
let tempValue: any = {};
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 : [];
//let _items = items.find((item: any) => Object.is(item.ibizappextendeditorid, tempValue.ibizappextendeditorid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['ibizappextendeditorid'] == tempValue['ibizappextendeditorid'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, data];
});
// FetchDefault
mock.onGet(new RegExp(/^\/ibizappextendeditors\/fetchdefault$/)).reply((config: any) => {
console.groupCollapsed("实体:ibizappextendeditor 方法: FetchDefault");
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 : []];
});
// FetchDefault
mock.onGet(new RegExp(/^\/ibizappextendeditors\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((config: any) => {
console.groupCollapsed("实体:ibizappextendeditor 方法: FetchDefault");
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 : []];
});
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// Remove
mock.onDelete(new RegExp(/^\/ibizappextendeditors\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:ibizappextendeditor 方法: Remove");
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> = ['ibizappextendeditorid'];
const matchArray:any = new RegExp(/^\/ibizappextendeditors\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
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 : [];
let _items = items.find((item: any) => Object.is(item.ibizappextendeditorid, tempValue.ibizappextendeditorid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
// Get
mock.onGet(new RegExp(/^\/ibizappextendeditors\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:ibizappextendeditor 方法: Get");
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> = ['ibizappextendeditorid'];
const matchArray:any = new RegExp(/^\/ibizappextendeditors\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
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 : [];
let _items = items.find((item: any) => Object.is(item.ibizappextendeditorid, tempValue.ibizappextendeditorid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
......@@ -49,3 +49,4 @@ import './entity/ibizcustoms/ibizcustoms';
import './entity/ibizsample0005s/ibizsample0005s';
import './entity/ibizuniproducts/ibizuniproducts';
import './entity/dynadashboards/dynadashboards';
import './entity/ibizappextendeditors/ibizappextendeditors';
<template>
<div class='view-container degridview micro-component-grid-view'>
<app-studioaction :viewTitle="$t(model.srfCaption)" viewName="microcomponentgridview"></app-studioaction>
<card class='view-card ' :dis-hover="true" :bordered="false">
<div slot='title' class="header-container">
<span class='caption-info'>{{$t(model.srfCaption)}}</span>
</div>
<card class='view-card view-no-caption' :dis-hover="true" :bordered="false">
<div class='view-top-messages'>
<app-alert-group position='TOP' :context="context" :viewparam="viewparams" infoGroup='VMGroup69' viewname='microcomponentgridview'></app-alert-group> </div>
<div class='content-container'>
<div style='margin-bottom: 6px;'>
<i-input v-show="!isExpandSearchForm" v-model="query" search enter-button @on-search="onSearch($event)" class='quick-search-input' style='max-width: 400px;padding-left: 24px' placeholder="微组件名称" />
<div class='pull-right'>
<div class='toolbar-container'>
<tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem3.visabled" :disabled="toolBarModels.tbitem3.disabled" class=' deepskyblueToolBar' v-loading:i-button @click="toolbar_click({ tag: 'tbitem3' }, $event)">
<i class='fa fa-file-text-o'></i>
<span class='caption'>{{$t('entities.microcomponent.gridviewtoolbar_toolbar.tbitem3.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.microcomponent.gridviewtoolbar_toolbar.tbitem3.tip')}}</div>
</tooltip>
<tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem4.visabled" :disabled="toolBarModels.tbitem4.disabled" class='' v-loading:i-button @click="toolbar_click({ tag: 'tbitem4' }, $event)">
<span class='caption'>{{$t('entities.microcomponent.gridviewtoolbar_toolbar.tbitem4.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.microcomponent.gridviewtoolbar_toolbar.tbitem4.tip')}}</div>
</tooltip>
<tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.deuiaction1.visabled" :disabled="toolBarModels.deuiaction1.disabled" class='' v-loading:i-button @click="toolbar_click({ tag: 'deuiaction1' }, $event)">
<i class='fa fa-refresh'></i>
<span class='caption'>{{$t('entities.microcomponent.gridviewtoolbar_toolbar.deuiaction1.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.microcomponent.gridviewtoolbar_toolbar.deuiaction1.tip')}}</div>
</tooltip>
<tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem6.visabled" :disabled="toolBarModels.tbitem6.disabled" class='' v-loading:i-button @click="toolbar_click({ tag: 'tbitem6' }, $event)">
<span class='caption'>{{$t('entities.microcomponent.gridviewtoolbar_toolbar.tbitem6.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.microcomponent.gridviewtoolbar_toolbar.tbitem6.tip')}}</div>
</tooltip>
<span class='seperator'>|</span>
<tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem8.visabled" :disabled="toolBarModels.tbitem8.disabled" class='' v-loading:i-button @click="toolbar_click({ tag: 'tbitem8' }, $event)">
<span class='caption'>{{$t('entities.microcomponent.gridviewtoolbar_toolbar.tbitem8.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.microcomponent.gridviewtoolbar_toolbar.tbitem8.tip')}}</div>
</tooltip>
<span class='seperator'>|</span>
<tooltip :transfer="true" :max-width="600">
<app-export-excel :item="toolBarModels.tbitem13" :caption="$t('entities.microcomponent.gridviewtoolbar_toolbar.tbitem13.caption')" @exportexcel="toolbar_click({ tag: 'tbitem13' }, $event)"></app-export-excel>
<div slot='content'>{{$t('entities.microcomponent.gridviewtoolbar_toolbar.tbitem13.tip')}}</div>
</tooltip>
<span class='seperator'>|</span>
<dropdown v-show="toolBarModels.tbitem16.visabled" trigger='click'>
<tooltip :transfer="true" :max-width="600">
<i-button class=''>
<i class=''></i>
<span class='caption'>{{$t('entities.microcomponent.gridviewtoolbar_toolbar.tbitem16.caption')}}</span>
<icon type="ios-arrow-down"></icon>
</i-button>
<div slot='content'>{{$t('entities.microcomponent.gridviewtoolbar_toolbar.tbitem16.tip')}}</div>
</tooltip>
<dropdown-menu slot='list'>
<dropdown-item>
<tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem21.visabled" :disabled="toolBarModels.tbitem21.disabled" class='' v-loading:i-button @click="toolbar_click({ tag: 'tbitem21' }, $event)">
<i class='fa fa-download'></i>
<span class='caption'>{{$t('entities.microcomponent.gridviewtoolbar_toolbar.tbitem21.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.microcomponent.gridviewtoolbar_toolbar.tbitem21.tip')}}</div>
</tooltip>
</dropdown-item>
<dropdown-item>
<tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem23.visabled" :disabled="toolBarModels.tbitem23.disabled" class='' v-loading:i-button @click="toolbar_click({ tag: 'tbitem23' }, $event)">
<i class='fa fa-upload'></i>
<span class='caption'>{{$t('entities.microcomponent.gridviewtoolbar_toolbar.tbitem23.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.microcomponent.gridviewtoolbar_toolbar.tbitem23.tip')}}</div>
</tooltip>
</dropdown-item>
</dropdown-menu>
</dropdown>
</div>
</div>
</div>
<view_searchform
......@@ -313,7 +232,6 @@ export default class MicroComponentGridViewBase extends Vue {
* @memberof MicroComponentGridViewBase
*/
public containerModel: any = {
view_toolbar: { name: 'toolbar', type: 'TOOLBAR' },
view_grid: { name: 'grid', type: 'GRID' },
view_searchform: { name: 'searchform', type: 'SEARCHFORM' },
};
......@@ -354,36 +272,6 @@ export default class MicroComponentGridViewBase extends Vue {
* @memberof MicroComponentGridViewBase
*/
public viewState: Subject<ViewState> = new Subject();
/**
* 工具栏模型
*
* @type {*}
* @memberof MicroComponentGridView
*/
public toolBarModels: any = {
tbitem3: { name: 'tbitem3', actiontarget: 'NONE', caption: '新建', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'New', target: '' } },
tbitem4: { name: 'tbitem4', actiontarget: 'NONE', caption: '编辑', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Edit', target: 'SINGLEKEY' } },
deuiaction1: { name: 'deuiaction1', actiontarget: 'NONE', caption: '刷新', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Refresh', target: '' } },
tbitem6: { name: 'tbitem6', actiontarget: 'NONE', caption: '拷贝', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Copy', target: 'SINGLEKEY' } },
tbitem7: { name: 'tbitem7', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem8: { name: 'tbitem8', actiontarget: 'NONE', caption: '删除', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Remove', target: 'MULTIKEY' } },
tbitem9: { name: 'tbitem9', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem13: { name: 'tbitem13', actiontarget: 'NONE', caption: '导出', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'ExportExcel', target: '' }, MaxRowCount: 1000 },
tbitem10: { name: 'tbitem10', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem16: { name: 'tbitem16', caption: '其它', disabled: false, type: 'ITEMS', visabled: true, dataaccaction: '', uiaction: { } },
tbitem21: { name: 'tbitem21', actiontarget: 'NONE', caption: '导出数据模型', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'ExportModel', target: '' } },
tbitem23: { name: 'tbitem23', actiontarget: 'NONE', caption: '数据导入', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Import', target: '' } },
};
......@@ -725,50 +613,6 @@ export default class MicroComponentGridViewBase extends Vue {
}
/**
* toolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof MicroComponentGridViewBase
*/
public toolbar_click($event: any, $event2?: any) {
if (Object.is($event.tag, 'tbitem3')) {
this.toolbar_tbitem3_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem4')) {
this.toolbar_tbitem4_click(null, '', $event2);
}
if (Object.is($event.tag, 'deuiaction1')) {
this.toolbar_deuiaction1_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem6')) {
this.toolbar_tbitem6_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem24')) {
this.toolbar_tbitem24_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem25')) {
this.toolbar_tbitem25_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem8')) {
this.toolbar_tbitem8_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem13')) {
this.toolbar_tbitem13_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem11')) {
this.toolbar_tbitem11_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem21')) {
this.toolbar_tbitem21_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem23')) {
this.toolbar_tbitem23_click(null, '', $event2);
}
}
/**
* grid 部件 selectionchange 事件
*
......@@ -866,314 +710,6 @@ export default class MicroComponentGridViewBase extends Vue {
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem3_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()];
}
if(params){
datas = [params];
}
// 界面行为
this.New(datas, contextJO,paramJO, $event, xData,this,"MicroComponent");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem4_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()];
}
if(params){
datas = [params];
}
// 界面行为
this.Edit(datas, contextJO,paramJO, $event, xData,this,"MicroComponent");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_deuiaction1_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()];
}
if(params){
datas = [params];
}
// 界面行为
this.Refresh(datas, contextJO,paramJO, $event, xData,this,"MicroComponent");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem6_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()];
}
if(params){
datas = [params];
}
// 界面行为
this.Copy(datas, contextJO,paramJO, $event, xData,this,"MicroComponent");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem24_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()];
}
if(params){
datas = [params];
}
// 界面行为
this.ToggleRowEdit(datas, contextJO,paramJO, $event, xData,this,"MicroComponent");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem25_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()];
}
if(params){
datas = [params];
}
// 界面行为
this.NewRow(datas, contextJO,paramJO, $event, xData,this,"MicroComponent");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem8_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()];
}
if(params){
datas = [params];
}
// 界面行为
this.Remove(datas, contextJO,paramJO, $event, xData,this,"MicroComponent");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem13_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()];
}
if(params){
datas = [params];
}
// 界面行为
this.ExportExcel(datas, contextJO,paramJO, $event, xData,this,"MicroComponent");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem11_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()];
}
if(params){
datas = [params];
}
// 界面行为
this.Print(datas, contextJO,paramJO, $event, xData,this,"MicroComponent");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem21_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()];
}
if(params){
datas = [params];
}
// 界面行为
this.ExportModel(datas, contextJO,paramJO, $event, xData,this,"MicroComponent");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem23_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()];
}
if(params){
datas = [params];
}
// 界面行为
this.Import(datas, contextJO,paramJO, $event, xData,this,"MicroComponent");
}
/**
* 打开新建数据视图
*
......@@ -1254,222 +790,6 @@ export default class MicroComponentGridViewBase extends Vue {
}
/**
* 新建
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof MicroComponentGridViewBase
*/
public New(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (_this.newdata && _this.newdata instanceof Function) {
const data: any = {};
_this.newdata([{ ...data }],[{ ...data }], params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'newdata 视图处理逻辑不存在,请添加!' });
}
}
/**
* 编辑
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof MicroComponentGridViewBase
*/
public Edit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
if (args.length === 0) {
return;
}
const _this: any = this;
if (_this.opendata && _this.opendata instanceof Function) {
const data: any = { };
if (args.length > 0) {
Object.assign(data, { microcomponent: args[0].microcomponent })
}
_this.opendata([{ ...data }], params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
}
}
/**
* 刷新
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof MicroComponentGridViewBase
*/
public Refresh(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (xData && xData.refresh && xData.refresh instanceof Function) {
xData.refresh(args);
} else if (_this.refresh && _this.refresh instanceof Function) {
_this.refresh(args);
}
}
/**
* 拷贝
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof MicroComponentGridViewBase
*/
public Copy(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
if (args.length === 0) {
return;
}
const _this: any = this;
if (_this.opendata && _this.opendata instanceof Function) {
const data: any = { };
if (args.length > 0) {
Object.assign(data, { microcomponent: args[0].microcomponent });
}
if(!params) params = {};
Object.assign(params,{copymode:true});
_this.opendata([{ ...data }], params, $event, xData);
} else {
Object.assign(this.viewparams,{copymode:true});
}
}
/**
* 行编辑
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof MicroComponentGridViewBase
*/
public ToggleRowEdit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
xData.actualIsOpenEdit = !xData.actualIsOpenEdit;
}
/**
* 新建行
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof MicroComponentGridViewBase
*/
public NewRow(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
const data: any = {};
if (_this.hasOwnProperty('newRow') && _this.newRow instanceof Function) {
_this.newRow([{ ...data }], params, $event, xData);
} else if(xData.newRow && xData.newRow instanceof Function) {
xData.newRow([{ ...data }], params, $event, xData);
}else{
_this.$Notice.error({ title: '错误', desc: 'newRow 视图处理逻辑不存在,请添加!' });
}
}
/**
* 删除
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof MicroComponentGridViewBase
*/
public Remove(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (!xData || !(xData.remove instanceof Function)) {
return ;
}
xData.remove(args);
}
/**
* 导出
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof MicroComponentGridViewBase
*/
public ExportExcel(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (!xData || !(xData.exportExcel instanceof Function) || !$event) {
return ;
}
xData.exportExcel($event.exportparms);
}
/**
* 打印
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof MicroComponentGridViewBase
*/
public Print(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
let _this:any = this;
if (!xData || !(xData.print instanceof Function) || !$event) {
return ;
}
xData.print();
}
/**
* 导出数据模型
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof MicroComponentGridViewBase
*/
public ExportModel(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
this.$Notice.error({ title: '错误', desc: '导出数据模型未支持' });
}
/**
* 数据导入
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof MicroComponentGridViewBase
*/
public Import(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (!xData || !(xData.importExcel instanceof Function) || !$event) {
return ;
}
xData.importExcel(params);
}
/**
* 关闭视图
......
.micro-component-grid-view{
position: relative;
}
.toolbar-container {
button {
margin: 6px 0px 4px 4px;
.caption {
margin-left: 4px;
}
}
.seperator {
color: #dcdee2;
margin: 0 0px 0 4px;
}
}
// this is less
.deepskyblueToolBar {color:white !important;background-color:#108cee !important;}
......@@ -81,6 +81,7 @@ export class EntityServiceRegister {
this.allEntityService.set('ibizsample0005', () => import('@/service/ibizsample0005/ibizsample0005-service'));
this.allEntityService.set('ibizuniproduct', () => import('@/service/ibizuniproduct/ibizuniproduct-service'));
this.allEntityService.set('dynadashboard', () => import('@/service/dynadashboard/dynadashboard-service'));
this.allEntityService.set('ibizappextendeditor', () => import('@/service/ibizappextendeditor/ibizappextendeditor-service'));
}
/**
......
import { Http,Util } from '@/utils';
import EntityService from '../entity-service';
/**
* 扩展编辑器服务对象基类
*
* @export
* @class IBIZAPPEXTENDEDITORServiceBase
* @extends {EntityServie}
*/
export default class IBIZAPPEXTENDEDITORServiceBase extends EntityService {
/**
* Creates an instance of IBIZAPPEXTENDEDITORServiceBase.
*
* @param {*} [opts={}]
* @memberof IBIZAPPEXTENDEDITORServiceBase
*/
constructor(opts: any = {}) {
super(opts);
}
/**
* 初始化基础数据
*
* @memberof IBIZAPPEXTENDEDITORServiceBase
*/
public initBasicData(){
this.APPLYDEKEY ='ibizappextendeditor';
this.APPDEKEY = 'ibizappextendeditorid';
this.APPDENAME = 'ibizappextendeditors';
this.APPDETEXT = 'ibizappextendeditorname';
this.APPNAME = 'web';
this.SYSTEMNAME = 'demosys';
}
// 实体接口
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof IBIZAPPEXTENDEDITORServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().get(`/ibizappextendeditors/${context.ibizappextendeditor}/select`,isloading);
return res;
}
/**
* Create接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof IBIZAPPEXTENDEDITORServiceBase
*/
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
if(!data.srffrontuf || data.srffrontuf !== "1"){
data[this.APPDEKEY] = null;
}
if(data.srffrontuf){
delete data.srffrontuf;
}
let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/ibizappextendeditors`,data,isloading);
return res;
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof IBIZAPPEXTENDEDITORServiceBase
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/ibizappextendeditors/${context.ibizappextendeditor}`,data,isloading);
return res;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof IBIZAPPEXTENDEDITORServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().delete(`/ibizappextendeditors/${context.ibizappextendeditor}`,isloading);
return res;
}
/**
* Get接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof IBIZAPPEXTENDEDITORServiceBase
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/ibizappextendeditors/${context.ibizappextendeditor}`,isloading);
return res;
}
/**
* GetDraft接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof IBIZAPPEXTENDEDITORServiceBase
*/
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/ibizappextendeditors/getdraft`,isloading);
res.data.ibizappextendeditor = data.ibizappextendeditor;
return res;
}
/**
* CheckKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof IBIZAPPEXTENDEDITORServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().post(`/ibizappextendeditors/${context.ibizappextendeditor}/checkkey`,data,isloading);
return res;
}
/**
* Save接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof IBIZAPPEXTENDEDITORServiceBase
*/
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/ibizappextendeditors/${context.ibizappextendeditor}/save`,data,isloading);
return res;
}
/**
* FetchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof IBIZAPPEXTENDEDITORServiceBase
*/
public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
let res:any = Http.getInstance().get(`/ibizappextendeditors/fetchdefault`,tempData,isloading);
return res;
}
/**
* searchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof IBIZAPPEXTENDEDITORServiceBase
*/
public async searchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/ibizappextendeditors/searchdefault`,tempData,isloading);
}
}
\ No newline at end of file
import { Http,Util } from '@/utils';
import IBIZAPPEXTENDEDITORServiceBase from './ibizappextendeditor-service-base';
/**
* 扩展编辑器服务对象
*
* @export
* @class IBIZAPPEXTENDEDITORService
* @extends {IBIZAPPEXTENDEDITORServiceBase}
*/
export default class IBIZAPPEXTENDEDITORService extends IBIZAPPEXTENDEDITORServiceBase {
/**
* Creates an instance of IBIZAPPEXTENDEDITORService.
*
* @param {*} [opts={}]
* @memberof IBIZAPPEXTENDEDITORService
*/
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
import { Environment } from '@/environments/environment';
import { UIActionTool,Util } from '@/utils';
import UIService from '../ui-service';
import { Subject } from 'rxjs';
import IBIZAPPEXTENDEDITORService from '@/service/ibizappextendeditor/ibizappextendeditor-service';
import IBIZAPPEXTENDEDITORAuthService from '@/authservice/ibizappextendeditor/ibizappextendeditor-auth-service';
/**
* 扩展编辑器UI服务对象基类
*
* @export
* @class IBIZAPPEXTENDEDITORUIServiceBase
*/
export default class IBIZAPPEXTENDEDITORUIServiceBase extends UIService {
/**
* 是否支持工作流
*
* @memberof IBIZAPPEXTENDEDITORUIServiceBase
*/
public isEnableWorkflow:boolean = false;
/**
* 是否支持实体主状态
*
* @memberof IBIZAPPEXTENDEDITORUIServiceBase
*/
public isEnableDEMainState:boolean = false;
/**
* 当前UI服务对应的数据服务对象
*
* @memberof IBIZAPPEXTENDEDITORUIServiceBase
*/
public dataService:IBIZAPPEXTENDEDITORService = new IBIZAPPEXTENDEDITORService();
/**
* 所有关联视图
*
* @memberof IBIZAPPEXTENDEDITORUIServiceBase
*/
public allViewMap: Map<string, Object> = new Map();
/**
* 状态值
*
* @memberof IBIZAPPEXTENDEDITORUIServiceBase
*/
public stateValue: number = 0;
/**
* 状态属性
*
* @memberof IBIZAPPEXTENDEDITORUIServiceBase
*/
public stateField: string = "";
/**
* 主状态属性集合
*
* @memberof IBIZAPPEXTENDEDITORUIServiceBase
*/
public mainStateFields:Array<any> = [];
/**
* 主状态集合Map
*
* @memberof IBIZAPPEXTENDEDITORUIServiceBase
*/
public allDeMainStateMap:Map<string,string> = new Map();
/**
* 主状态操作标识Map
*
* @memberof IBIZAPPEXTENDEDITORUIServiceBase
*/
public allDeMainStateOPPrivsMap:Map<string,any> = new Map();
/**
* Creates an instance of IBIZAPPEXTENDEDITORUIServiceBase.
*
* @param {*} [opts={}]
* @memberof IBIZAPPEXTENDEDITORUIServiceBase
*/
constructor(opts: any = {}) {
super(opts);
this.authService = new IBIZAPPEXTENDEDITORAuthService(opts);
this.initViewMap();
this.initDeMainStateMap();
this.initDeMainStateOPPrivsMap();
}
/**
* 初始化视图Map
*
* @memberof IBIZAPPEXTENDEDITORUIServiceBase
*/
public initViewMap(){
}
/**
* 初始化主状态集合
*
* @memberof IBIZAPPEXTENDEDITORUIServiceBase
*/
public initDeMainStateMap(){
}
/**
* 初始化主状态操作标识
*
* @memberof IBIZAPPEXTENDEDITORUIServiceBase
*/
public initDeMainStateOPPrivsMap(){
}
/**
* 获取指定数据的重定向页面
*
* @param srfkey 数据主键
* @param isEnableWorkflow 重定向视图是否需要处理流程中的数据
* @memberof IBIZAPPEXTENDEDITORUIServiceBase
*/
public async getRDAppView(srfkey:string,isEnableWorkflow:boolean){
this.isEnableWorkflow = isEnableWorkflow;
// 进行数据查询
let result:any = await this.dataService.Get({ibizappextendeditor:srfkey});
const curData:any = result.data;
//判断当前数据模式,默认为true,todo
const iRealDEModel:boolean = true;
let bDataInWF:boolean = false;
let bWFMode:any = false;
// 计算数据模式
if (this.isEnableWorkflow) {
bDataInWF = await this.dataService.testDataInWF({stateValue:this.stateValue,stateField:this.stateField},curData);
if (bDataInWF) {
bDataInWF = true;
bWFMode = await this.dataService.testUserExistWorklist(null,curData);
}
}
let strPDTViewParam:string = await this.getDESDDEViewPDTParam(curData, bDataInWF, bWFMode);
//若不是当前数据模式,处理strPDTViewParam,todo
//查找视图
//返回视图
return this.allViewMap.get(strPDTViewParam);
}
/**
* 获取实际的数据类型
*
* @memberof IBIZAPPEXTENDEDITORUIServiceBase
*/
public getRealDEType(entity:any){
}
/**
* 获取实体单数据实体视图预定义参数
*
* @param curData 当前数据
* @param bDataInWF 是否有数据在工作流中
* @param bWFMode 是否工作流模式
* @memberof IBIZAPPEXTENDEDITORUIServiceBase
*/
public async getDESDDEViewPDTParam(curData:any, bDataInWF:boolean, bWFMode:boolean){
let strPDTParam:string = '';
if (bDataInWF) {
// 判断数据是否在流程中
}
//多表单,todo
const multiFormDEField:string|null =null;
if (multiFormDEField) {
const objFormValue:string = curData[multiFormDEField];
if(!Environment.isAppMode){
return 'MOBEDITVIEW:'+objFormValue;
}
return 'EDITVIEW:'+objFormValue;
}
if(!Environment.isAppMode){
if(this.getDEMainStateTag(curData)){
return `MOBEDITVIEW:MSTAG:${ this.getDEMainStateTag(curData)}`;
}
return 'MOBEDITVIEW:';
}
if(this.getDEMainStateTag(curData)){
return `EDITVIEW:MSTAG:${ this.getDEMainStateTag(curData)}`;
}
return 'EDITVIEW:';
}
/**
* 获取数据对象的主状态标识
*
* @param curData 当前数据
* @memberof IBIZAPPEXTENDEDITORUIServiceBase
*/
public getDEMainStateTag(curData:any){
if(this.mainStateFields.length === 0) return null;
this.mainStateFields.forEach((singleMainField:any) =>{
if(!(singleMainField in curData)){
console.warn(`当前数据对象不包含属性「${singleMainField}」,根据「${singleMainField}」属性进行的主状态计算默认为空值`);
}
})
for (let i = 0; i <= 1; i++) {
let strTag:string = (curData[this.mainStateFields[0]] != null && curData[this.mainStateFields[0]] !== "")?(i == 0) ? `${curData[this.mainStateFields[0]]}` : "":"";
if (this.mainStateFields.length >= 2) {
for (let j = 0; j <= 1; j++) {
let strTag2:string = (curData[this.mainStateFields[1]] != null && curData[this.mainStateFields[1]] !== "")?`${strTag}__${(j == 0) ? `${curData[this.mainStateFields[1]]}` : ""}`:strTag;
if (this.mainStateFields.length >= 3) {
for (let k = 0; k <= 1; k++) {
let strTag3:string = (curData[this.mainStateFields[2]] != null && curData[this.mainStateFields[2]] !== "")?`${strTag2}__${(k == 0) ? `${curData[this.mainStateFields[2]]}` : ""}`:strTag2;
// 判断是否存在
return this.allDeMainStateMap.get(strTag3);
}
}else{
return this.allDeMainStateMap.get(strTag2);
}
}
}else{
return this.allDeMainStateMap.get(strTag);
}
}
return null;
}
/**
* 获取数据对象当前操作标识
*
* @param data 当前数据
* @memberof IBIZAPPEXTENDEDITORUIServiceBase
*/
public getDEMainStateOPPrivs(data:any){
if(this.getDEMainStateTag(data)){
return this.allDeMainStateOPPrivsMap.get((this.getDEMainStateTag(data) as string));
}else{
return null;
}
}
/**
* 获取数据对象所有的操作标识
*
* @param data 当前数据
* @memberof IBIZAPPEXTENDEDITORUIServiceBase
*/
public getAllOPPrivs(data:any){
return this.authService.getOPPrivs(this.getDEMainStateOPPrivs(data));
}
}
\ No newline at end of file
import IBIZAPPEXTENDEDITORUIServiceBase from './ibizappextendeditor-ui-service-base';
/**
* 扩展编辑器UI服务对象
*
* @export
* @class IBIZAPPEXTENDEDITORUIService
*/
export default class IBIZAPPEXTENDEDITORUIService extends IBIZAPPEXTENDEDITORUIServiceBase {
/**
* Creates an instance of IBIZAPPEXTENDEDITORUIService.
*
* @param {*} [opts={}]
* @memberof IBIZAPPEXTENDEDITORUIService
*/
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
......@@ -81,6 +81,7 @@ export class UIServiceRegister {
this.allUIService.set('ibizsample0005', () => import('@/uiservice/ibizsample0005/ibizsample0005-ui-service'));
this.allUIService.set('ibizuniproduct', () => import('@/uiservice/ibizuniproduct/ibizuniproduct-ui-service'));
this.allUIService.set('dynadashboard', () => import('@/uiservice/dynadashboard/dynadashboard-ui-service'));
this.allUIService.set('ibizappextendeditor', () => import('@/uiservice/ibizappextendeditor/ibizappextendeditor-ui-service'));
}
/**
......
......@@ -175,6 +175,10 @@ zuul:
path: /dynadashboards/**
serviceId: ${ibiz.ref.service.demosys-demoapi:demosys-demoapi}
stripPrefix: false
ibizappextendeditor:
path: /ibizappextendeditors/**
serviceId: ${ibiz.ref.service.demosys-demoapi:demosys-demoapi}
stripPrefix: false
wfcore:
path: /wfcore/**
serviceId: ${ibiz.ref.service.wf:ibzwf-api}
......
......@@ -60,7 +60,7 @@
<!--输出实体[IBIZAPPEDITOR]数据结构 -->
<changeSet author="a_LAB01_df847bdfd" id="tab-ibizappeditor-90-3">
<changeSet author="a_LAB01_df847bdfd" id="tab-ibizappeditor-92-3">
<createTable tableName="T_IBIZAPPEDITOR">
<column name="CREATEMAN" remarks="" type="VARCHAR(60)">
</column>
......@@ -88,7 +88,7 @@
<!--输出实体[IBIZAPPEXTENDEDITOR]数据结构 -->
<changeSet author="a_LAB01_df847bdfd" id="tab-ibizappextendeditor-8-4">
<changeSet author="a_LAB01_df847bdfd" id="tab-ibizappextendeditor-17-4">
<createTable tableName="T_IBIZAPPEXTENDEDITOR">
<column name="CREATEMAN" remarks="" type="VARCHAR(60)">
</column>
......@@ -528,7 +528,7 @@
<!--输出实体[IBIZSAMPLE0001]数据结构 -->
<changeSet author="a_LAB01_df847bdfd" id="tab-ibizsample0001-420-19">
<changeSet author="a_LAB01_df847bdfd" id="tab-ibizsample0001-428-19">
<createTable tableName="T_IBIZSAMPLE0001">
<column name="FIELD01" remarks="" type="VARCHAR(100)">
</column>
......@@ -1308,7 +1308,7 @@
<!--输出实体[MICROCOMPONENT]数据结构 -->
<changeSet author="a_LAB01_df847bdfd" id="tab-microcomponent-76-45">
<changeSet author="a_LAB01_df847bdfd" id="tab-microcomponent-77-45">
<createTable tableName="T_MICROCOMPONENT">
<column name="CREATEDATE" remarks="" type="DATETIME">
</column>
......@@ -1425,7 +1425,7 @@
<!--输出实体[IBIZQJ]外键关系 -->
<!--输出实体[IBIZSAMPLE]外键关系 -->
<!--输出实体[IBIZSAMPLE0001]外键关系 -->
<changeSet author="a_LAB01_df847bdfd" id="fk-ibizsample0001-420-46">
<changeSet author="a_LAB01_df847bdfd" id="fk-ibizsample0001-428-46">
<addForeignKeyConstraint baseColumnNames="IBIZSAMPLE0002ID" baseTableName="T_IBIZSAMPLE0001" constraintName="DER1N_IBIZSAMPLE0001_IBIZSAMPL" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="IBIZSAMPLE0002ID" referencedTableName="T_IBIZSAMPLE0002" validate="true"/>
</changeSet>
<!--输出实体[IBIZSAMPLE0002]外键关系 -->
......
......@@ -67,7 +67,7 @@
</createView>
</changeSet>
<!--输出实体[IBIZSAMPLE0001]视图结构信息 runOnChange="true" 当视图发生变更时,通过liquibase强刷prod的视图,实现视图的同步-->
<changeSet author="a_LAB01_df847bdfd" id="view-ibizsample0001-420-13" runOnChange="true">
<changeSet author="a_LAB01_df847bdfd" id="view-ibizsample0001-428-13" runOnChange="true">
<createView fullDefinition="false" replaceIfExists="true" viewName="V_IBIZSAMPLE0001">
<![CDATA[ SELECT t1.[CREATEDATE], t1.[CREATEMAN], t1.[FIELD01], t1.[FIELD02], t1.[FIELD05], t1.[FIELD06], t1.[FIELD07], t1.[FIELD08], t1.[FIELD09], t1.[FIELD10], t1.[FIELD11], t1.[FIELD12], t1.[FIELD13], t1.[FIELD14], t1.[FIELD15], t1.[FIELD16], t1.[FIELD17], t1.[FIELD18], t1.[FIELD19], t1.[FIELD20], t1.[FIELD21], t1.[FIELD22], t1.[FIELD23], t1.[FIELD24], t1.[FIELD25], t1.[FIELD26], t1.[FIELD27], t1.[IBIZSAMPLE0001ID], t1.[IBIZSAMPLE0001NAME], t1.[UPDATEDATE], t1.[UPDATEMAN] FROM [T_IBIZSAMPLE0001] t1 ]]>
</createView>
......
......@@ -33,6 +33,14 @@
"datascope":[{"id":"all","name":"全部数据"}, {"id":"createman","name":"创建人"}]
}
, {
"dename":"IBIZAPPEXTENDEDITOR",
"delogicname":"扩展编辑器",
"sysmoudle":{"id":"SAMPLE","name":"示例"},
"dedataset":[{"id":"Default" , "name":"数据集"}],
"deaction":[{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" }],
"datascope":[{"id":"all","name":"全部数据"}, {"id":"createman","name":"创建人"}]
}
, {
"dename":"IBIZAPPVIEW",
"delogicname":"应用视图",
"sysmoudle":{"id":"SAMPLE","name":"示例"},
......
......@@ -653,6 +653,7 @@
"field_logic_name":"扩展编辑器类型",
"entity_name":"IBIZAPPEXTENDEDITOR",
"field_type":"TEXT",
"dict":"CodeList43",
"nullable":1,
"physical_field":1,
"data_type":"VARCHAR",
......
package cn.ibizlab.demoapi.dto;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.math.BigInteger;
import java.util.Map;
import java.util.HashMap;
import java.io.Serializable;
import java.math.BigDecimal;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.alibaba.fastjson.annotation.JSONField;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import cn.ibizlab.util.domain.DTOBase;
import cn.ibizlab.util.domain.DTOClient;
import lombok.Data;
/**
* 服务DTO对象[IBIZAPPEXTENDEDITORDTO]
*/
@Data
public class IBIZAPPEXTENDEDITORDTO extends DTOBase implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 属性 [CREATEMAN]
*
*/
@JSONField(name = "createman")
@JsonProperty("createman")
@Size(min = 0, max = 60, message = "内容长度必须小于等于[60]")
private String createman;
/**
* 属性 [UPDATEDATE]
*
*/
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("updatedate")
private Timestamp updatedate;
/**
* 属性 [CREATEDATE]
*
*/
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("createdate")
private Timestamp createdate;
/**
* 属性 [UPDATEMAN]
*
*/
@JSONField(name = "updateman")
@JsonProperty("updateman")
@Size(min = 0, max = 60, message = "内容长度必须小于等于[60]")
private String updateman;
/**
* 属性 [IBIZAPPEXTENDEDITORNAME]
*
*/
@JSONField(name = "ibizappextendeditorname")
@JsonProperty("ibizappextendeditorname")
@Size(min = 0, max = 200, message = "内容长度必须小于等于[200]")
private String ibizappextendeditorname;
/**
* 属性 [IBIZAPPEXTENDEDITORID]
*
*/
@JSONField(name = "ibizappextendeditorid")
@JsonProperty("ibizappextendeditorid")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
private String ibizappextendeditorid;
/**
* 属性 [EXTENSIONFLAG]
*
*/
@JSONField(name = "extensionflag")
@JsonProperty("extensionflag")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
private String extensionflag;
/**
* 属性 [DOCUMENTADDRESS]
*
*/
@JSONField(name = "documentaddress")
@JsonProperty("documentaddress")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
private String documentaddress;
/**
* 属性 [EXTENDEDITORDESCRIPTION]
*
*/
@JSONField(name = "extendeditordescription")
@JsonProperty("extendeditordescription")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
private String extendeditordescription;
/**
* 属性 [AMOUNT]
*
*/
@JSONField(name = "amount")
@JsonProperty("amount")
private Integer amount;
/**
* 属性 [EXTENDEDITORTYPE]
*
*/
@JSONField(name = "extendeditortype")
@JsonProperty("extendeditortype")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
private String extendeditortype;
/**
* 设置 [IBIZAPPEXTENDEDITORNAME]
*/
public void setIbizappextendeditorname(String ibizappextendeditorname){
this.ibizappextendeditorname = ibizappextendeditorname ;
this.modify("ibizappextendeditorname",ibizappextendeditorname);
}
/**
* 设置 [EXTENSIONFLAG]
*/
public void setExtensionflag(String extensionflag){
this.extensionflag = extensionflag ;
this.modify("extensionflag",extensionflag);
}
/**
* 设置 [DOCUMENTADDRESS]
*/
public void setDocumentaddress(String documentaddress){
this.documentaddress = documentaddress ;
this.modify("documentaddress",documentaddress);
}
/**
* 设置 [EXTENDEDITORDESCRIPTION]
*/
public void setExtendeditordescription(String extendeditordescription){
this.extendeditordescription = extendeditordescription ;
this.modify("extendeditordescription",extendeditordescription);
}
/**
* 设置 [AMOUNT]
*/
public void setAmount(Integer amount){
this.amount = amount ;
this.modify("amount",amount);
}
/**
* 设置 [EXTENDEDITORTYPE]
*/
public void setExtendeditortype(String extendeditortype){
this.extendeditortype = extendeditortype ;
this.modify("extendeditortype",extendeditortype);
}
}
package cn.ibizlab.demoapi.mapping;
import org.mapstruct.*;
import cn.ibizlab.core.sample.domain.IBIZAPPEXTENDEDITOR;
import cn.ibizlab.demoapi.dto.IBIZAPPEXTENDEDITORDTO;
import cn.ibizlab.util.domain.MappingBase;
@Mapper(componentModel = "spring", uses = {}, implementationName = "DemoAPIIBIZAPPEXTENDEDITORMapping",
nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE,
nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface IBIZAPPEXTENDEDITORMapping extends MappingBase<IBIZAPPEXTENDEDITORDTO, IBIZAPPEXTENDEDITOR> {
}
package cn.ibizlab.demoapi.rest;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.math.BigInteger;
import java.util.HashMap;
import lombok.extern.slf4j.Slf4j;
import com.alibaba.fastjson.JSONObject;
import javax.servlet.ServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.http.HttpStatus;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.util.StringUtils;
import org.springframework.context.annotation.Lazy;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.security.access.prepost.PostAuthorize;
import org.springframework.validation.annotation.Validated;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import cn.ibizlab.demoapi.dto.*;
import cn.ibizlab.demoapi.mapping.*;
import cn.ibizlab.core.sample.domain.IBIZAPPEXTENDEDITOR;
import cn.ibizlab.core.sample.service.IIBIZAPPEXTENDEDITORService;
import cn.ibizlab.core.sample.filter.IBIZAPPEXTENDEDITORSearchContext;
import cn.ibizlab.util.annotation.VersionCheck;
@Slf4j
@Api(tags = {"扩展编辑器" })
@RestController("DemoAPI-ibizappextendeditor")
@RequestMapping("")
public class IBIZAPPEXTENDEDITORResource {
@Autowired
public IIBIZAPPEXTENDEDITORService ibizappextendeditorService;
@Autowired
@Lazy
public IBIZAPPEXTENDEDITORMapping ibizappextendeditorMapping;
@PreAuthorize("hasPermission(this.ibizappextendeditorMapping.toDomain(#ibizappextendeditordto),'DemoSys-IBIZAPPEXTENDEDITOR-Create')")
@ApiOperation(value = "新建扩展编辑器", tags = {"扩展编辑器" }, notes = "新建扩展编辑器")
@RequestMapping(method = RequestMethod.POST, value = "/ibizappextendeditors")
public ResponseEntity<IBIZAPPEXTENDEDITORDTO> create(@Validated @RequestBody IBIZAPPEXTENDEDITORDTO ibizappextendeditordto) {
IBIZAPPEXTENDEDITOR domain = ibizappextendeditorMapping.toDomain(ibizappextendeditordto);
ibizappextendeditorService.create(domain);
IBIZAPPEXTENDEDITORDTO dto = ibizappextendeditorMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission(this.ibizappextendeditorMapping.toDomain(#ibizappextendeditordtos),'DemoSys-IBIZAPPEXTENDEDITOR-Create')")
@ApiOperation(value = "批量新建扩展编辑器", tags = {"扩展编辑器" }, notes = "批量新建扩展编辑器")
@RequestMapping(method = RequestMethod.POST, value = "/ibizappextendeditors/batch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<IBIZAPPEXTENDEDITORDTO> ibizappextendeditordtos) {
ibizappextendeditorService.createBatch(ibizappextendeditorMapping.toDomain(ibizappextendeditordtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@VersionCheck(entity = "ibizappextendeditor" , versionfield = "updatedate")
@PreAuthorize("hasPermission(this.ibizappextendeditorService.get(#ibizappextendeditor_id),'DemoSys-IBIZAPPEXTENDEDITOR-Update')")
@ApiOperation(value = "更新扩展编辑器", tags = {"扩展编辑器" }, notes = "更新扩展编辑器")
@RequestMapping(method = RequestMethod.PUT, value = "/ibizappextendeditors/{ibizappextendeditor_id}")
public ResponseEntity<IBIZAPPEXTENDEDITORDTO> update(@PathVariable("ibizappextendeditor_id") String ibizappextendeditor_id, @RequestBody IBIZAPPEXTENDEDITORDTO ibizappextendeditordto) {
IBIZAPPEXTENDEDITOR domain = ibizappextendeditorMapping.toDomain(ibizappextendeditordto);
domain .setIbizappextendeditorid(ibizappextendeditor_id);
ibizappextendeditorService.update(domain );
IBIZAPPEXTENDEDITORDTO dto = ibizappextendeditorMapping.toDto(domain );
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission(this.ibizappextendeditorService.getIbizappextendeditorByEntities(this.ibizappextendeditorMapping.toDomain(#ibizappextendeditordtos)),'DemoSys-IBIZAPPEXTENDEDITOR-Update')")
@ApiOperation(value = "批量更新扩展编辑器", tags = {"扩展编辑器" }, notes = "批量更新扩展编辑器")
@RequestMapping(method = RequestMethod.PUT, value = "/ibizappextendeditors/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<IBIZAPPEXTENDEDITORDTO> ibizappextendeditordtos) {
ibizappextendeditorService.updateBatch(ibizappextendeditorMapping.toDomain(ibizappextendeditordtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasPermission(this.ibizappextendeditorService.get(#ibizappextendeditor_id),'DemoSys-IBIZAPPEXTENDEDITOR-Remove')")
@ApiOperation(value = "删除扩展编辑器", tags = {"扩展编辑器" }, notes = "删除扩展编辑器")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibizappextendeditors/{ibizappextendeditor_id}")
public ResponseEntity<Boolean> remove(@PathVariable("ibizappextendeditor_id") String ibizappextendeditor_id) {
return ResponseEntity.status(HttpStatus.OK).body(ibizappextendeditorService.remove(ibizappextendeditor_id));
}
@PreAuthorize("hasPermission(this.ibizappextendeditorService.getIbizappextendeditorByIds(#ids),'DemoSys-IBIZAPPEXTENDEDITOR-Remove')")
@ApiOperation(value = "批量删除扩展编辑器", tags = {"扩展编辑器" }, notes = "批量删除扩展编辑器")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibizappextendeditors/batch")
public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) {
ibizappextendeditorService.removeBatch(ids);
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PostAuthorize("hasPermission(this.ibizappextendeditorMapping.toDomain(returnObject.body),'DemoSys-IBIZAPPEXTENDEDITOR-Get')")
@ApiOperation(value = "获取扩展编辑器", tags = {"扩展编辑器" }, notes = "获取扩展编辑器")
@RequestMapping(method = RequestMethod.GET, value = "/ibizappextendeditors/{ibizappextendeditor_id}")
public ResponseEntity<IBIZAPPEXTENDEDITORDTO> get(@PathVariable("ibizappextendeditor_id") String ibizappextendeditor_id) {
IBIZAPPEXTENDEDITOR domain = ibizappextendeditorService.get(ibizappextendeditor_id);
IBIZAPPEXTENDEDITORDTO dto = ibizappextendeditorMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@ApiOperation(value = "获取扩展编辑器草稿", tags = {"扩展编辑器" }, notes = "获取扩展编辑器草稿")
@RequestMapping(method = RequestMethod.GET, value = "/ibizappextendeditors/getdraft")
public ResponseEntity<IBIZAPPEXTENDEDITORDTO> getDraft() {
return ResponseEntity.status(HttpStatus.OK).body(ibizappextendeditorMapping.toDto(ibizappextendeditorService.getDraft(new IBIZAPPEXTENDEDITOR())));
}
@ApiOperation(value = "检查扩展编辑器", tags = {"扩展编辑器" }, notes = "检查扩展编辑器")
@RequestMapping(method = RequestMethod.POST, value = "/ibizappextendeditors/checkkey")
public ResponseEntity<Boolean> checkKey(@RequestBody IBIZAPPEXTENDEDITORDTO ibizappextendeditordto) {
return ResponseEntity.status(HttpStatus.OK).body(ibizappextendeditorService.checkKey(ibizappextendeditorMapping.toDomain(ibizappextendeditordto)));
}
@PreAuthorize("hasPermission(this.ibizappextendeditorMapping.toDomain(#ibizappextendeditordto),'DemoSys-IBIZAPPEXTENDEDITOR-Save')")
@ApiOperation(value = "保存扩展编辑器", tags = {"扩展编辑器" }, notes = "保存扩展编辑器")
@RequestMapping(method = RequestMethod.POST, value = "/ibizappextendeditors/save")
public ResponseEntity<Boolean> save(@RequestBody IBIZAPPEXTENDEDITORDTO ibizappextendeditordto) {
return ResponseEntity.status(HttpStatus.OK).body(ibizappextendeditorService.save(ibizappextendeditorMapping.toDomain(ibizappextendeditordto)));
}
@PreAuthorize("hasPermission(this.ibizappextendeditorMapping.toDomain(#ibizappextendeditordtos),'DemoSys-IBIZAPPEXTENDEDITOR-Save')")
@ApiOperation(value = "批量保存扩展编辑器", tags = {"扩展编辑器" }, notes = "批量保存扩展编辑器")
@RequestMapping(method = RequestMethod.POST, value = "/ibizappextendeditors/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<IBIZAPPEXTENDEDITORDTO> ibizappextendeditordtos) {
ibizappextendeditorService.saveBatch(ibizappextendeditorMapping.toDomain(ibizappextendeditordtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZAPPEXTENDEDITOR-searchDefault-all') and hasPermission(#context,'DemoSys-IBIZAPPEXTENDEDITOR-Get')")
@ApiOperation(value = "获取数据集", tags = {"扩展编辑器" } ,notes = "获取数据集")
@RequestMapping(method= RequestMethod.GET , value="/ibizappextendeditors/fetchdefault")
public ResponseEntity<List<IBIZAPPEXTENDEDITORDTO>> fetchDefault(IBIZAPPEXTENDEDITORSearchContext context) {
Page<IBIZAPPEXTENDEDITOR> domains = ibizappextendeditorService.searchDefault(context) ;
List<IBIZAPPEXTENDEDITORDTO> list = ibizappextendeditorMapping.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','DemoSys-IBIZAPPEXTENDEDITOR-searchDefault-all') and hasPermission(#context,'DemoSys-IBIZAPPEXTENDEDITOR-Get')")
@ApiOperation(value = "查询数据集", tags = {"扩展编辑器" } ,notes = "查询数据集")
@RequestMapping(method= RequestMethod.POST , value="/ibizappextendeditors/searchdefault")
public ResponseEntity<Page<IBIZAPPEXTENDEDITORDTO>> searchDefault(@RequestBody IBIZAPPEXTENDEDITORSearchContext context) {
Page<IBIZAPPEXTENDEDITOR> domains = ibizappextendeditorService.searchDefault(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(ibizappextendeditorMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
}
......@@ -836,7 +836,12 @@ public class StaticDict {
*/
@Getter
public enum CodeList43 {
HTMLEDITOR("HTMLeditor","HTML编辑器"),
DROPLIST("droplist","下拉列表框"),
PICTURECONTROL("picturecontrol","图片控件"),
TEXTAREA("textarea","多行输入框"),
PICKER("picker","数据选择"),
FILEUPLOAD("fileupload","文件上传控件"),
TEXTBOX("textbox","文本框"),
LABEL("label","标签");
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册