提交 1c03df63 编写于 作者: ibizdev's avatar ibizdev

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

上级 106d0167
......@@ -1601,7 +1601,7 @@
},
"ibizbookinterfunceditview": {
"title": "图书编辑视图(内置功能)",
"caption": "图书",
"caption": "编辑表单内置功能",
"viewtype": "DEEDITVIEW",
"viewmodule": "Sample",
"viewname": "IBIZBOOKInterFuncEditView",
......
......@@ -211,7 +211,7 @@ function getLocaleResourceBase(){
title: commonLogic.appcommonhandle("图书数据视图",null),
},
interfunceditview: {
caption: commonLogic.appcommonhandle("图书",null),
caption: commonLogic.appcommonhandle("编辑表单内置功能",null),
title: commonLogic.appcommonhandle("图书编辑视图(内置功能)",null),
},
usr3dataview: {
......
......@@ -211,7 +211,7 @@ function getLocaleResourceBase(){
title: commonLogic.appcommonhandle("图书数据视图",null),
},
interfunceditview: {
caption: commonLogic.appcommonhandle("图书",null),
caption: commonLogic.appcommonhandle("编辑表单内置功能",null),
title: commonLogic.appcommonhandle("图书编辑视图(内置功能)",null),
},
usr3dataview: {
......
......@@ -407,16 +407,6 @@ function getLocaleResourceBase(){
tip: commonLogic.appcommonhandle("Save And Close Window",null),
},
},
sf2editviewtoolbar_toolbar: {
tbitem3: {
caption: commonLogic.appcommonhandle("Save",null),
tip: commonLogic.appcommonhandle("Save",null),
},
tbitem5: {
caption: commonLogic.appcommonhandle("Save And Close",null),
tip: commonLogic.appcommonhandle("Save And Close Window",null),
},
},
usr2gridviewtoolbar_toolbar: {
tbitem3: {
caption: commonLogic.appcommonhandle("New",null),
......
......@@ -407,16 +407,6 @@ function getLocaleResourceBase(){
tip: commonLogic.appcommonhandle("保存并关闭",null),
},
},
sf2editviewtoolbar_toolbar: {
tbitem3: {
caption: commonLogic.appcommonhandle("保存",null),
tip: commonLogic.appcommonhandle("保存",null),
},
tbitem5: {
caption: commonLogic.appcommonhandle("保存并关闭",null),
tip: commonLogic.appcommonhandle("保存并关闭",null),
},
},
usr2gridviewtoolbar_toolbar: {
tbitem3: {
caption: commonLogic.appcommonhandle("新建",null),
......
......@@ -28,7 +28,7 @@ export default class ViewMsgMessageServiceBase extends ViewMessageService {
this.name = "默认数据类型";
this.codename = "ViewMsg";
this.title = "";
this.content = "本示例展示实体属性数据类型的默认呈现组件";
this.content = "本示例展示实体属性数据类型的默认呈现组件";
this.closeMode = 0;
this.position = "TOP";
this.type = "error";
......
......@@ -28,7 +28,7 @@ export default class ViewMsg2MessageServiceBase extends ViewMessageService {
this.name = "默认编辑器类型";
this.codename = "ViewMsg2";
this.title = "";
this.content = "本示例展示各类编辑器的呈现样式";
this.content = "本示例展示各类编辑器的呈现样式";
this.closeMode = 0;
this.position = "TOP";
this.type = "error";
......
......@@ -28,7 +28,7 @@ export default class ViewMsg46MessageServiceBase extends ViewMessageService {
this.name = "日历导航--默认";
this.codename = "ViewMsg46";
this.title = "";
this.content = "本示例展示日历导航的内置功能,包含搜索栏、部件工具栏、导航关系等";
this.content = "本示例展示日历导航的内置功能,包含搜索栏、部件工具栏、导航关系等";
this.closeMode = 0;
this.position = "TOP";
this.type = "error";
......
......@@ -28,7 +28,7 @@ export default class ViewMsg65MessageServiceBase extends ViewMessageService {
this.name = "扩展编辑器";
this.codename = "ViewMsg65";
this.title = "";
this.content = "本示例展示扩展编辑器的呈现样式";
this.content = "本示例展示扩展编辑器的呈现样式";
this.closeMode = 0;
this.position = "TOP";
this.type = "error";
......
......@@ -28,7 +28,7 @@ export default class ViewMsg66MessageServiceBase extends ViewMessageService {
this.name = "编辑器插件示例";
this.codename = "ViewMsg66";
this.title = "";
this.content = "该示例展示编辑器的自定义插件";
this.content = "该示例展示编辑器的自定义插件";
this.closeMode = 0;
this.position = "TOP";
this.type = "error";
......
......@@ -28,7 +28,7 @@ export default class ViewMsg67MessageServiceBase extends ViewMessageService {
this.name = "微服务组件";
this.codename = "ViewMsg67";
this.title = "";
this.content = "本示例展示微服务组件";
this.content = "本示例展示微服务组件";
this.closeMode = 0;
this.position = "TOP";
this.type = "error";
......
......@@ -1609,7 +1609,7 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
},
"ibizbookinterfunceditview": {
"title": "图书编辑视图(内置功能)",
"caption": "图书",
"caption": "编辑表单内置功能",
"viewtype": "DEEDITVIEW",
"viewmodule": "Sample",
"viewname": "IBIZBOOKInterFuncEditView",
......
<template>
<div class="view-container deeditview ibizsample0001-sf2-edit-view">
<app-studioaction :viewTitle="$t(model.srfCaption)" viewName="ibizsample0001sf2editview"></app-studioaction>
<card class='view-card view-no-caption ' :disHover="true" :bordered="false">
<div slot='title' class="header-container">
<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-save'></i>
<span class='caption'>{{$t('entities.ibizsample0001.sf2editviewtoolbar_toolbar.tbitem3.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.ibizsample0001.sf2editviewtoolbar_toolbar.tbitem3.tip')}}</div>
</tooltip>
<tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem5.visabled" :disabled="toolBarModels.tbitem5.disabled" class='' v-loading:i-button @click="toolbar_click({ tag: 'tbitem5' }, $event)">
<i class='sx-tb-saveandclose'></i>
<span class='caption'>{{$t('entities.ibizsample0001.sf2editviewtoolbar_toolbar.tbitem5.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.ibizsample0001.sf2editviewtoolbar_toolbar.tbitem5.tip')}}</div>
</tooltip>
</div>
</div>
<card class='view-card view-no-caption view-no-toolbar' :disHover="true" :bordered="false">
<div class='view-top-messages'>
<app-alert-group position='TOP' :context="context" :viewparam="viewparams" infoGroup='VMGroup3' viewname='ibizsample0001sf2editview'></app-alert-group> </div>
......@@ -223,7 +205,6 @@ export default class IBIZSample0001SF2EditViewBase extends Vue {
* @memberof IBIZSample0001SF2EditViewBase
*/
public containerModel: any = {
view_toolbar: { name: 'toolbar', type: 'TOOLBAR' },
view_form: { name: 'form', type: 'FORM' },
};
......@@ -263,19 +244,6 @@ export default class IBIZSample0001SF2EditViewBase extends Vue {
* @memberof IBIZSample0001SF2EditViewBase
*/
public viewState: Subject<ViewState> = new Subject();
/**
* 工具栏模型
*
* @type {*}
* @memberof IBIZSample0001SF2EditView
*/
public toolBarModels: any = {
tbitem3: { name: 'tbitem3', actiontarget: 'NONE', caption: '保存', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Save', target: '' } },
tbitem5: { name: 'tbitem5', actiontarget: 'NONE', caption: '保存并关闭', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'SaveAndExit', target: '' } },
};
......@@ -598,29 +566,6 @@ export default class IBIZSample0001SF2EditViewBase extends Vue {
}
/**
* toolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof IBIZSample0001SF2EditViewBase
*/
public toolbar_click($event: any, $event2?: any) {
if (Object.is($event.tag, 'tbitem3')) {
this.toolbar_tbitem3_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem5')) {
this.toolbar_tbitem5_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem9')) {
this.toolbar_tbitem9_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem15')) {
this.toolbar_tbitem15_click(null, '', $event2);
}
}
/**
* form 部件 save 事件
*
......@@ -658,227 +603,6 @@ export default class IBIZSample0001SF2EditViewBase 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.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Save(datas, contextJO,paramJO, $event, xData,this,"IBIZSample0001");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem5_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.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.SaveAndExit(datas, contextJO,paramJO, $event, xData,this,"IBIZSample0001");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem9_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.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.SaveAndStart(datas, contextJO,paramJO, $event, xData,this,"IBIZSample0001");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem15_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.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Print(datas, contextJO,paramJO, $event, xData,this,"IBIZSample0001");
}
/**
* 保存
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof IBIZSample0001SF2EditViewBase
*/
public Save(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
// 界面行为容器对象 _this
const _this: any = this;
if (xData && xData.save instanceof Function) {
xData.save().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
_this.$emit('viewdataschange', [{ ...response.data }]);
});
} else if (_this.save && _this.save instanceof Function) {
_this.save();
}
}
/**
* 保存并关闭
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof IBIZSample0001SF2EditViewBase
*/
public SaveAndExit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (xData && xData.saveAndExit instanceof Function) {
xData.saveAndExit().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
if(window.parent){
window.parent.postMessage([{ ...response.data }],'*');
}
});
} else if (_this.saveAndExit && _this.saveAndExit instanceof Function) {
_this.saveAndExit().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
if(window.parent){
window.parent.postMessage([{ ...response.data }],'*');
}
});
}
}
/**
* 开始流程
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof IBIZSample0001SF2EditViewBase
*/
public SaveAndStart(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (!xData || !(xData.wfstart instanceof Function)) {
return;
}
xData.wfstart(args).then((response: any) => {
if (!response || response.status !== 200) {
return;
}
const { data: _data } = response;
if(window.parent){
window.parent.postMessage({ ..._data },'*');
}
if (_this.viewdata) {
_this.$emit('viewdataschange', [{ ..._data }]);
_this.$emit('close');
}else if (this.$tabPageExp) {
this.$tabPageExp.onClose(this.$route.fullPath);
}
});
}
/**
* 打印
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof IBIZSample0001SF2EditViewBase
*/
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();
}
/**
* 关闭视图
......
......@@ -8,20 +8,5 @@
.ibizsample0001-sf2-edit-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;}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册