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

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

上级 7b3f17da
......@@ -1018,6 +1018,9 @@ export default {
ibizbookpanel_calendar: {
nodata:"",
uiactions: {
save: "Save",
edit: "Edit",
refresh: "刷新",
},
},
};
\ No newline at end of file
......@@ -1017,6 +1017,9 @@ export default {
ibizbookpanel_calendar: {
nodata:"",
uiactions: {
save: "保存",
edit: "编辑",
refresh: "刷新",
},
},
};
\ No newline at end of file
......@@ -144,8 +144,182 @@ export default class IBIZBOOKPANELBase extends Vue implements ControlInterface {
* @memberof IBIZBOOKPANELBase
*/
public appEntityService: IBIZBOOKService = new IBIZBOOKService({ $store: this.$store });
/**
* cm 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof IBIZBOOKPANELBase
*/
public cm_click($event: any, $event2?: any) {
if (Object.is($event.tag, 'deuiaction1')) {
this.cm_deuiaction1_click(null, 'cm', $event2);
}
if (Object.is($event.tag, 'deuiaction2')) {
this.cm_deuiaction2_click(null, 'cm', $event2);
}
if (Object.is($event.tag, 'deuiaction3')) {
this.cm_deuiaction3_click(null, 'cm', $event2);
}
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public cm_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;
if (_this.getDatas && _this.getDatas instanceof Function) {
datas = [..._this.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Save(datas, contextJO,paramJO, $event, xData,this,"IBIZBOOK");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public cm_deuiaction2_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;
if (_this.getDatas && _this.getDatas instanceof Function) {
datas = [..._this.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Edit(datas, contextJO,paramJO, $event, xData,this,"IBIZBOOK");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public cm_deuiaction3_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;
if (_this.getDatas && _this.getDatas instanceof Function) {
datas = [..._this.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Refresh(datas, contextJO,paramJO, $event, xData,this,"IBIZBOOK");
}
/**
* 保存
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof IBIZBOOKUsr3CalendarViewBase
*/
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 IBIZBOOKUsr3CalendarViewBase
*/
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, { ibizbook: args[0].ibizbook })
}
_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 IBIZBOOKUsr3CalendarViewBase
*/
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);
}
}
/**
* 转化数据
......@@ -413,6 +587,9 @@ export default class IBIZBOOKPANELBase extends Vue implements ControlInterface {
* @memberof IBIZBOOKPANELBase
*/
public actionModel: any = {
item1_deuiaction1: {name:'deuiaction1',nodeOwner:'item1',type: 'DEUIACTION', tag: 'Save', noprivdisplaymode:2, visabled: true, disabled: false},
item1_deuiaction2: {name:'deuiaction2',nodeOwner:'item1',type: 'DEUIACTION', tag: 'Edit', actiontarget: 'SINGLEKEY', noprivdisplaymode:2, visabled: true, disabled: false},
item1_deuiaction3: {name:'deuiaction3',nodeOwner:'item1',type: 'DEUIACTION', tag: 'Refresh', actiontarget: 'SINGLEKEY', noprivdisplaymode:2, visabled: true, disabled: false},
}
/**
......@@ -892,11 +1069,41 @@ export default class IBIZBOOKPANELBase extends Vue implements ControlInterface {
const data: any = JSON.parse(JSON.stringify(event));
this.selections = [event];
switch(event.itemType){
case "item1":
content = this.renderContextMenuItem1();
break;
}
}
return content;
}
/**
* 绘制item1类型右键菜单
*
* @returns
* @memberof IBIZBOOKPANELBase
*/
public renderContextMenuItem1() {
return (
<dropdown class="tree-right-menu" trigger="custom" visible={true} on-on-click={($event: any) => this.cm_click({tag: $event})}>
<dropdown-menu slot="list">
<dropdown-item name='deuiaction1' v-show={this.copyActionModel['deuiaction1'].visabled} disabled={this.copyActionModel['deuiaction1'].disabled}>
<i class='fa fa-save'></i>
保存
</dropdown-item>
<dropdown-item name='deuiaction2' v-show={this.copyActionModel['deuiaction2'].visabled} disabled={this.copyActionModel['deuiaction2'].disabled}>
<i class='fa fa-edit'></i>
编辑
</dropdown-item>
<dropdown-item name='deuiaction3' v-show={this.copyActionModel['deuiaction3'].visabled} disabled={this.copyActionModel['deuiaction3'].disabled}>
<i class='fa fa-refresh'></i>
刷新
</dropdown-item>
</dropdown-menu>
</dropdown>
);
}
}
</script>
......
......@@ -2,7 +2,7 @@
import { Component } from 'vue-property-decorator';
import IBIZBOOKPANELBase from './ibizbookpanel-calendar-base.vue';
import layout_item1layoutpanel from '@widgets/ibizbook/item1layoutpanel-panel/item1layoutpanel-panel.vue';
import layout_item1layoutpanel from '@widgets/ibizbook/usr4-panel/usr4-panel.vue';
@Component({
components: {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册