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

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

上级 083851a1
...@@ -89,6 +89,9 @@ ...@@ -89,6 +89,9 @@
"VMGroup33":[ "VMGroup33":[
{"tag":"ViewMsg32","position":"TOP","type":"ERROR"} {"tag":"ViewMsg32","position":"TOP","type":"ERROR"}
], ],
"VMGroup37":[
{"tag":"ViewMsg36","position":"TOP","type":"ERROR"}
],
"VMGroup28":[ "VMGroup28":[
{"tag":"ViewMsg27","position":"TOP","type":"ERROR"} {"tag":"ViewMsg27","position":"TOP","type":"ERROR"}
], ],
......
...@@ -967,16 +967,6 @@ export default { ...@@ -967,16 +967,6 @@ export default {
tip: "Save And Close Window", tip: "Save And Close Window",
}, },
}, },
ruleseditviewtoolbar_toolbar: {
tbitem3: {
caption: "Save",
tip: "Save",
},
tbitem5: {
caption: "Save And Close",
tip: "Save And Close Window",
},
},
dashboardviewdashboard_sysportlet2_list_quicktoolbar_toolbar: { dashboardviewdashboard_sysportlet2_list_quicktoolbar_toolbar: {
deuiaction1: { deuiaction1: {
caption: "New", caption: "New",
......
...@@ -966,16 +966,6 @@ export default { ...@@ -966,16 +966,6 @@ export default {
tip: "保存并关闭", tip: "保存并关闭",
}, },
}, },
ruleseditviewtoolbar_toolbar: {
tbitem3: {
caption: "保存",
tip: "保存",
},
tbitem5: {
caption: "保存并关闭",
tip: "保存并关闭",
},
},
dashboardviewdashboard_sysportlet2_list_quicktoolbar_toolbar: { dashboardviewdashboard_sysportlet2_list_quicktoolbar_toolbar: {
deuiaction1: { deuiaction1: {
caption: "新建", caption: "新建",
......
...@@ -64,6 +64,7 @@ export class MessageServiceRegister { ...@@ -64,6 +64,7 @@ export class MessageServiceRegister {
this.allMessageService.set('ViewMsg27', () => import('@/message/view-msg27/view-msg27-message')); this.allMessageService.set('ViewMsg27', () => import('@/message/view-msg27/view-msg27-message'));
this.allMessageService.set('ViewMsg9', () => import('@/message/view-msg9/view-msg9-message')); this.allMessageService.set('ViewMsg9', () => import('@/message/view-msg9/view-msg9-message'));
this.allMessageService.set('ViewMsg18', () => import('@/message/view-msg18/view-msg18-message')); this.allMessageService.set('ViewMsg18', () => import('@/message/view-msg18/view-msg18-message'));
this.allMessageService.set('ViewMsg36', () => import('@/message/view-msg36/view-msg36-message'));
this.allMessageService.set('ViewMsg12', () => import('@/message/view-msg12/view-msg12-message')); this.allMessageService.set('ViewMsg12', () => import('@/message/view-msg12/view-msg12-message'));
this.allMessageService.set('ViewMsg19', () => import('@/message/view-msg19/view-msg19-message')); this.allMessageService.set('ViewMsg19', () => import('@/message/view-msg19/view-msg19-message'));
this.allMessageService.set('ViewMsg21', () => import('@/message/view-msg21/view-msg21-message')); this.allMessageService.set('ViewMsg21', () => import('@/message/view-msg21/view-msg21-message'));
......
import ViewMessageService from '../view-message-service';
/**
* 编辑表单---值规则视图消息服务对象基类
*
* @export
* @class ViewMsg36MessageServiceBase
*/
export default class ViewMsg36MessageServiceBase extends ViewMessageService {
/**
* Creates an instance of ViewMsg36MessageServiceBase.
*
* @param {*} [opts={}]
* @memberof ViewMsg36MessageServiceBase
*/
constructor(opts: any = {}) {
super(opts);
}
/**
* 初始化基础参数
*
* @memberof ViewMsg36MessageServiceBase
*/
public initBasicParam(){
this.id = "3998D9C9-37BB-45B9-9331-F17BB06B5490";
this.name = "编辑表单---值规则";
this.codename = "ViewMsg36";
this.title = "";
this.content = "表单分为系统值规则和属性值规则,其中系统值规则已支持正则式和脚本,属性值规则已支持常规规则、正则式规则、数值范围规则、字符长度规则、系统值规则和规则组。";
this.closeMode = 0;
this.position = "TOP";
this.type = "error";
this.isEnableRemove = false;
this.order = 1;
this.dynamicMode = "STATIC";
this.hasMessageTemp = false;
this.messageType = "TEXT";
}
/**
* 转化消息模板标题和内容
*
* @target {*} target 返回目标数据
* @param {*} context 应用上下文
* @param {*} viewparam 视图参数
* @param {*} item 源数据
*
* @memberof ViewMsg36MessageServiceBase
*/
public translateMessageTemp(target:any,context:any,viewparam:any,item?:any){
if(this.hasMessageTemp && Object.is(this.messageType,"HTML")){
Object.assign(target,{title:``});
Object.assign(target,{content:``});
}
if(this.hasMessageTemp && Object.is(this.messageType,"TEXT")){
Object.assign(target,{title:""});
Object.assign(target,{content:""});
}
}
}
\ No newline at end of file
import ViewMsg36MessageServiceBase from './view-msg36-message-base';
/**
* 编辑表单---值规则视图消息服务对象
*
* @export
* @class ViewMsg36MessageService
*/
export default class ViewMsg36MessageService extends ViewMsg36MessageServiceBase {
/**
* Creates an instance of ViewMsg36MessageService.
*
* @param {*} [opts={}]
* @memberof ViewMsg36MessageService
*/
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
...@@ -1544,6 +1544,9 @@ mock.onGet('./assets/json/view-message-group.json').reply((config: any) => { ...@@ -1544,6 +1544,9 @@ mock.onGet('./assets/json/view-message-group.json').reply((config: any) => {
"VMGroup33":[ "VMGroup33":[
{"tag":"ViewMsg32","position":"TOP","type":"ERROR"} {"tag":"ViewMsg32","position":"TOP","type":"ERROR"}
], ],
"VMGroup37":[
{"tag":"ViewMsg36","position":"TOP","type":"ERROR"}
],
"VMGroup28":[ "VMGroup28":[
{"tag":"ViewMsg27","position":"TOP","type":"ERROR"} {"tag":"ViewMsg27","position":"TOP","type":"ERROR"}
], ],
......
<template> <template>
<div class="view-container deeditview ibizbookrules-edit-view"> <div class="view-container deeditview ibizbookrules-edit-view">
<app-studioaction :viewTitle="$t(model.srfCaption)" viewName="ibizbookruleseditview"></app-studioaction> <app-studioaction :viewTitle="$t(model.srfCaption)" viewName="ibizbookruleseditview"></app-studioaction>
<card class='view-card ' :disHover="true" :bordered="false"> <card class='view-card view-no-caption view-no-toolbar' :disHover="true" :bordered="false">
<div slot='title' class="header-container">
<span class='caption-info'>{{$t(model.srfCaption)}}</span>
<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.ibizbook.ruleseditviewtoolbar_toolbar.tbitem3.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.ibizbook.ruleseditviewtoolbar_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.ibizbook.ruleseditviewtoolbar_toolbar.tbitem5.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.ibizbook.ruleseditviewtoolbar_toolbar.tbitem5.tip')}}</div>
</tooltip>
</div>
</div>
<div class='view-top-messages'> <div class='view-top-messages'>
</div> <app-alert-group position='TOP' :context="context" :viewparam="viewparams" infoGroup='VMGroup37' viewname='ibizbookruleseditview'></app-alert-group> </div>
<div class="content-container"> <div class="content-container">
<div class='view-body-messages'> <div class='view-body-messages'>
</div> <app-alert-group position='BODY' :context="context" :viewparam="viewparams" infoGroup='VMGroup37' viewname='ibizbookruleseditview'></app-alert-group> </div>
<view_form <view_form
:viewState="viewState" :viewState="viewState"
:viewparams="viewparams" :viewparams="viewparams"
...@@ -52,7 +33,7 @@ ...@@ -52,7 +33,7 @@
</view_form> </view_form>
</div> </div>
<div class='view-bottom-messages'> <div class='view-bottom-messages'>
</div> <app-alert-group position='BOTTOM' :context="context" :viewparam="viewparams" infoGroup='VMGroup37' viewname='ibizbookruleseditview'></app-alert-group> </div>
</card> </card>
</div> </div>
</template> </template>
...@@ -224,7 +205,6 @@ export default class IBIZBOOKRulesEditViewBase extends Vue { ...@@ -224,7 +205,6 @@ export default class IBIZBOOKRulesEditViewBase extends Vue {
* @memberof IBIZBOOKRulesEditViewBase * @memberof IBIZBOOKRulesEditViewBase
*/ */
public containerModel: any = { public containerModel: any = {
view_toolbar: { name: 'toolbar', type: 'TOOLBAR' },
view_form: { name: 'form', type: 'FORM' }, view_form: { name: 'form', type: 'FORM' },
}; };
...@@ -264,19 +244,6 @@ export default class IBIZBOOKRulesEditViewBase extends Vue { ...@@ -264,19 +244,6 @@ export default class IBIZBOOKRulesEditViewBase extends Vue {
* @memberof IBIZBOOKRulesEditViewBase * @memberof IBIZBOOKRulesEditViewBase
*/ */
public viewState: Subject<ViewState> = new Subject(); public viewState: Subject<ViewState> = new Subject();
/**
* 工具栏模型
*
* @type {*}
* @memberof IBIZBOOKRulesEditView
*/
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: '' } },
};
...@@ -599,29 +566,6 @@ export default class IBIZBOOKRulesEditViewBase extends Vue { ...@@ -599,29 +566,6 @@ export default class IBIZBOOKRulesEditViewBase extends Vue {
} }
/**
* toolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof IBIZBOOKRulesEditViewBase
*/
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 事件 * form 部件 save 事件
* *
...@@ -659,227 +603,6 @@ export default class IBIZBOOKRulesEditViewBase extends Vue { ...@@ -659,227 +603,6 @@ export default class IBIZBOOKRulesEditViewBase 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,"IBIZBOOK");
}
/**
* 逻辑事件
*
* @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,"IBIZBOOK");
}
/**
* 逻辑事件
*
* @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,"IBIZBOOK");
}
/**
* 逻辑事件
*
* @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,"IBIZBOOK");
}
/**
* 保存
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof IBIZBOOKRulesEditViewBase
*/
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 IBIZBOOKRulesEditViewBase
*/
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 IBIZBOOKRulesEditViewBase
*/
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 IBIZBOOKRulesEditViewBase
*/
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 @@ ...@@ -8,20 +8,5 @@
.ibizbookrules-edit-view{ .ibizbookrules-edit-view{
position: relative; 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 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册