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

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

上级 6604543c
......@@ -882,6 +882,16 @@ export default {
},
usr3editviewtoolbar_toolbar: {
},
tabexpviewtoolbar_toolbar: {
tbitem3: {
caption: "Save",
tip: "Save",
},
tbitem5: {
caption: "Save And Close",
tip: "Save And Close Window",
},
},
sf6gridviewtoolbar_toolbar: {
deuiaction1: {
caption: "New",
......
......@@ -881,6 +881,16 @@ export default {
},
usr3editviewtoolbar_toolbar: {
},
tabexpviewtoolbar_toolbar: {
tbitem3: {
caption: "保存",
tip: "保存",
},
tbitem5: {
caption: "保存并关闭",
tip: "保存并关闭",
},
},
sf6gridviewtoolbar_toolbar: {
deuiaction1: {
caption: "新建",
......
......@@ -2,9 +2,25 @@
<template>
<div class='view-container detabexpview ibizorder-tab-exp-view'>
<app-studioaction :viewTitle="$t(model.srfCaption)" viewName="ibizordertabexpview"></app-studioaction>
<card class='view-card view-no-toolbar' :dis-hover="true" :bordered="false">
<card class='view-card ' :dis-hover="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.ibizorder.tabexpviewtoolbar_toolbar.tbitem3.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.ibizorder.tabexpviewtoolbar_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.ibizorder.tabexpviewtoolbar_toolbar.tbitem5.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.ibizorder.tabexpviewtoolbar_toolbar.tbitem5.tip')}}</div>
</tooltip>
</div>
</div>
<div class='view-top-messages'>
......@@ -122,6 +138,7 @@ export default class IBIZOrderTabExpViewBase extends Vue {
* @memberof IBIZOrderTabExpViewBase
*/
public customViewNavContexts:any ={
"IBIZORDER":{"isRawValue":true,"value":"632d02cf5dc686f5170fbfeb1086d776"}
};
/**
......@@ -194,6 +211,7 @@ export default class IBIZOrderTabExpViewBase extends Vue {
* @memberof IBIZOrderTabExpViewBase
*/
public containerModel: any = {
view_toolbar: { name: 'toolbar', type: 'TOOLBAR' },
view_tabexppanel: { name: 'tabexppanel', type: 'TABEXPPANEL' },
wflinks: [],
};
......@@ -222,6 +240,19 @@ export default class IBIZOrderTabExpViewBase extends Vue {
* @memberof IBIZOrderTabExpViewBase
*/
public viewState: Subject<ViewState> = new Subject();
/**
* 工具栏模型
*
* @type {*}
* @memberof IBIZOrderTabExpView
*/
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: '' } },
};
/**
......@@ -541,7 +572,185 @@ export default class IBIZOrderTabExpViewBase extends Vue {
}
/**
* toolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof IBIZOrderTabExpViewBase
*/
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, 'tbitem15')) {
this.toolbar_tbitem15_click(null, '', $event2);
}
}
/**
* 逻辑事件
*
* @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 = {};
if (_this.getDatas && _this.getDatas instanceof Function) {
datas = [..._this.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Save(datas, contextJO,paramJO, $event, xData,this,"IBIZOrder");
}
/**
* 逻辑事件
*
* @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 = {};
if (_this.getDatas && _this.getDatas instanceof Function) {
datas = [..._this.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.SaveAndExit(datas, contextJO,paramJO, $event, xData,this,"IBIZOrder");
}
/**
* 逻辑事件
*
* @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 = {};
if (_this.getDatas && _this.getDatas instanceof Function) {
datas = [..._this.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Print(datas, contextJO,paramJO, $event, xData,this,"IBIZOrder");
}
/**
* 保存
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof IBIZOrderTabExpViewBase
*/
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 IBIZOrderTabExpViewBase
*/
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 IBIZOrderTabExpViewBase
*/
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();
}
/**
* 关闭视图
......
.ibizorder-tab-exp-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;}
.ibizorder-tab-exp-view {
......
......@@ -113,6 +113,7 @@ export const viewstate: any = {
refviews: [
'4a2a1fa66c88ef36eadc4c37c6260641',
'bafb2c128858efe856db13e44290ca6a',
'2640aa1ca02649c8831b43023d449945',
],
},
{
......
......@@ -668,17 +668,6 @@ export default class RulesFormBase extends Vue implements ControlInterface {
* @memberof RulesFormBase
*/
public deRules:any = {
lendouttime:[
{
type:"SIMPLE",
condOP:"GTANDEQ",
ruleInfo:"需要大于等于当前时间",
isKeyCond:false,
paramType:"CURTIME",
isNotMode:false,
deName:"lendouttime",
},
],
returntime:[
{
type:"GROUP",
......@@ -709,6 +698,17 @@ export default class RulesFormBase extends Vue implements ControlInterface {
]
},
],
lendouttime:[
{
type:"SIMPLE",
condOP:"GTANDEQ",
ruleInfo:"需要大于等于当前时间",
isKeyCond:false,
paramType:"CURTIME",
isNotMode:false,
deName:"lendouttime",
},
],
type:[
{
type:"STRINGLENGTH",
......
......@@ -356,17 +356,15 @@
</i-col>
<i-col v-show="detailsModel.formitem.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='formitem' :itemRules="this.rules().formitem" class='' :caption="$t('entities.ibizsample0001.main_form.details.formitem')" uiStyle="DEFAULT" :labelWidth="150" :isShowCaption="true" :error="detailsModel.formitem.error" :isEmptyCaption="false" labelPos="LEFT">
<app-color-span
:value="data.formitem"
:data="data"
name="formitem"
tag="SysOperator"
codelistType="DYNAMIC"
color="color"
:context="context" :viewparams="viewparams" :localContext ='{ }' :localParam ='{ }' style=""
>
</app-color-span>
<input-box
v-model="data.formitem"
@enter="onEnter($event)"
unit=""
:disabled="detailsModel.formitem.disabled"
type='text'
style="">
</input-box>
</app-form-item>
</i-col>
......@@ -1201,7 +1199,7 @@ export default class MainBase extends Vue implements ControlInterface {
,
field22: new FormItemModel({ caption: '电子邮件', detailType: 'FORMITEM', name: 'field22', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 })
,
formitem: new FormItemModel({ caption: '更新人-颜色', detailType: 'FORMITEM', name: 'formitem', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 })
formitem: new FormItemModel({ caption: '更新人-颜色', detailType: 'FORMITEM', name: 'formitem', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:true, disabled: false, enableCond: 3 })
,
formitem1: new FormItemModel({ caption: '更新时间-多久之前', detailType: 'FORMITEM', name: 'formitem1', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 })
,
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册