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

xignzi006 发布系统代码

上级 0ee58f30
......@@ -766,9 +766,9 @@ export default {
},
},
treegridexviewtoolbar_toolbar: {
deuiaction1: {
caption: "New",
tip: "New",
tbitem1_openquickcreateview: {
caption: "新建",
tip: "新建",
},
tbitem2: {
caption: "-",
......@@ -778,6 +778,10 @@ export default {
caption: "Edit",
tip: "Edit {0}",
},
tbitem6: {
caption: "Copy",
tip: "Copy {0}",
},
tbitem7: {
caption: "-",
tip: "",
......
......@@ -765,7 +765,7 @@ export default {
},
},
treegridexviewtoolbar_toolbar: {
deuiaction1: {
tbitem1_openquickcreateview: {
caption: "新建",
tip: "新建",
},
......@@ -777,6 +777,10 @@ export default {
caption: "编辑",
tip: "编辑",
},
tbitem6: {
caption: "拷贝",
tip: "拷贝",
},
tbitem7: {
caption: "-",
tip: "",
......
import { Subject } from 'rxjs';
import { TreeGridExViewBase } from '@/studio-core';
import AccountService from '@/service/account/account-service';
import AccountUIService from '@/uiservice/account/account-ui-service';
/**
* 客户树表格视图视图基类
......@@ -71,11 +72,13 @@ export class AccountTreeGridExViewBase extends TreeGridExViewBase {
* @memberof AccountTreeGridExView
*/
public toolBarModels: any = {
deuiaction1: { name: 'deuiaction1', caption: '新建','isShowCaption':true,'isShowIcon':true, tooltip: '新建', iconcls: 'fa fa-file-text-o', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'New', target: '' }, class: '' },
tbitem1_openquickcreateview: { name: 'tbitem1_openquickcreateview', caption: '新建','isShowCaption':true,'isShowIcon':true, tooltip: '新建', iconcls: 'fa fa-user-plus', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'OpenQuickCreateView', target: 'NONE' }, class: '' },
tbitem2: { name: 'tbitem2', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem4: { name: 'tbitem4', caption: '编辑','isShowCaption':true,'isShowIcon':true, tooltip: '编辑', iconcls: 'fa fa-edit', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Edit', target: 'SINGLEKEY' }, class: '' },
tbitem6: { name: 'tbitem6', caption: '拷贝','isShowCaption':true,'isShowIcon':true, tooltip: '拷贝', iconcls: 'fa fa-copy', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Copy', target: 'SINGLEKEY' }, class: '' },
tbitem7: { name: 'tbitem7', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem8: { name: 'tbitem8', caption: '删除','isShowCaption':true,'isShowIcon':true, tooltip: '删除', iconcls: 'fa fa-remove', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Remove', target: 'MULTIKEY' }, class: '' },
......@@ -110,12 +113,15 @@ export class AccountTreeGridExViewBase extends TreeGridExViewBase {
* @memberof AccountTreeGridExViewBase
*/
public toolbar_click($event: any, $event2?: any): void {
if (Object.is($event.tag, 'deuiaction1')) {
this.toolbar_deuiaction1_click(null, '', $event2);
if (Object.is($event.tag, 'tbitem1_openquickcreateview')) {
this.toolbar_tbitem1_openquickcreateview_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem4')) {
this.toolbar_tbitem4_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem6')) {
this.toolbar_tbitem6_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem8')) {
this.toolbar_tbitem8_click(null, '', $event2);
}
......@@ -138,7 +144,7 @@ export class AccountTreeGridExViewBase extends TreeGridExViewBase {
* @param {*} [$event]
* @memberof
*/
public toolbar_deuiaction1_click(params: any = {}, tag?: any, $event?: any) {
public toolbar_tbitem1_openquickcreateview_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
......@@ -155,7 +161,8 @@ export class AccountTreeGridExViewBase extends TreeGridExViewBase {
datas = [params];
}
// 界面行为
this.New(datas, contextJO,paramJO, $event, xData,this,"Account");
const curUIService:AccountUIService = new AccountUIService();
curUIService.Account_OpenQuickCreateView(datas,contextJO, paramJO, $event, xData,this,"Account");
}
/**
......@@ -186,6 +193,34 @@ export class AccountTreeGridExViewBase extends TreeGridExViewBase {
this.Edit(datas, contextJO,paramJO, $event, xData,this,"Account");
}
/**
* 逻辑事件
*
* @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.treegridex;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Copy(datas, contextJO,paramJO, $event, xData,this,"Account");
}
/**
* 逻辑事件
*
......@@ -299,7 +334,7 @@ export class AccountTreeGridExViewBase extends TreeGridExViewBase {
}
/**
* 新建
* 编辑
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
......@@ -309,17 +344,23 @@ export class AccountTreeGridExViewBase extends TreeGridExViewBase {
* @param {*} [actionContext] 执行行为上下文
* @memberof AccountTreeGridExViewBase
*/
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);
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, { account: args[0].account })
}
_this.opendata([{ ...data }], params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'newdata 视图处理逻辑不存在,请添加!' });
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
}
}
/**
* 编辑
* 拷贝
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
......@@ -329,17 +370,23 @@ export class AccountTreeGridExViewBase extends TreeGridExViewBase {
* @param {*} [actionContext] 执行行为上下文
* @memberof AccountTreeGridExViewBase
*/
public Edit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
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 (_this.newdata && _this.newdata instanceof Function) {
const data: any = {};
if (args.length > 0) {
Object.assign(data, { account: args[0].account })
Object.assign(data, { srfsourcekey: args[0].srfkey })
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
}
_this.opendata([{ ...data }], params, $event, xData);
_this.newdata([{ ...data }],[{ ...data }],params, $event, xData);
} else if (xData && xData.copy instanceof Function) {
if (args.length > 0) {
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
}
xData.copy(args[0].srfkey);
} else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
}
......
<studio-view-style2 viewName="accounttreegridexview" viewTitle="客户树表格视图" class='detreegridexview account-tree-grid-ex-view'>
<template slot='title'>
<span class='caption-info'>{{$t(model.srfTitle)}}</span>
</template>
<template slot="toolbar">
<view-toolbar mode="STYLE2" :model="toolBarModels" @item-click="toolbar_click($event)"/> </template>
<view_treegridex
......
......@@ -692,6 +692,8 @@ export const viewstate: any = {
viewaction: '',
viewdatachange: false,
refviews: [
'a69ba7dd2f8bdac8a3c733dcc79c0ee5',
'2e9c7792c3a728896ca8902634f71983',
'6e18ac74e5685439110f9b4e534ee005',
],
},
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册