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

xignzi006 发布系统代码

上级 ca9a60a5
...@@ -56,6 +56,10 @@ export default { ...@@ -56,6 +56,10 @@ export default {
}, },
}, },
gridviewtoolbar_toolbar: { gridviewtoolbar_toolbar: {
tbitem3: {
caption: "New",
tip: "New",
},
tbitem4: { tbitem4: {
caption: "Edit", caption: "Edit",
tip: "Edit {0}", tip: "Edit {0}",
......
...@@ -55,6 +55,10 @@ export default { ...@@ -55,6 +55,10 @@ export default {
}, },
}, },
gridviewtoolbar_toolbar: { gridviewtoolbar_toolbar: {
tbitem3: {
caption: '新建',
tip: '新建',
},
tbitem4: { tbitem4: {
caption: '编辑', caption: '编辑',
tip: '编辑', tip: '编辑',
......
...@@ -56,6 +56,10 @@ export default { ...@@ -56,6 +56,10 @@ export default {
}, },
}, },
gridviewtoolbar_toolbar: { gridviewtoolbar_toolbar: {
tbitem3: {
caption: "New",
tip: "New",
},
tbitem4: { tbitem4: {
caption: "Edit", caption: "Edit",
tip: "Edit {0}", tip: "Edit {0}",
......
...@@ -55,6 +55,10 @@ export default { ...@@ -55,6 +55,10 @@ export default {
}, },
}, },
gridviewtoolbar_toolbar: { gridviewtoolbar_toolbar: {
tbitem3: {
caption: '新建',
tip: '新建',
},
tbitem4: { tbitem4: {
caption: '编辑', caption: '编辑',
tip: '编辑', tip: '编辑',
......
...@@ -56,6 +56,10 @@ export default { ...@@ -56,6 +56,10 @@ export default {
}, },
}, },
gridviewtoolbar_toolbar: { gridviewtoolbar_toolbar: {
tbitem3: {
caption: "New",
tip: "New",
},
tbitem4: { tbitem4: {
caption: "Edit", caption: "Edit",
tip: "Edit {0}", tip: "Edit {0}",
......
...@@ -55,6 +55,10 @@ export default { ...@@ -55,6 +55,10 @@ export default {
}, },
}, },
gridviewtoolbar_toolbar: { gridviewtoolbar_toolbar: {
tbitem3: {
caption: '新建',
tip: '新建',
},
tbitem4: { tbitem4: {
caption: '编辑', caption: '编辑',
tip: '编辑', tip: '编辑',
......
...@@ -56,6 +56,10 @@ export default { ...@@ -56,6 +56,10 @@ export default {
}, },
}, },
gridviewtoolbar_toolbar: { gridviewtoolbar_toolbar: {
tbitem3: {
caption: "New",
tip: "New",
},
tbitem4: { tbitem4: {
caption: "Edit", caption: "Edit",
tip: "Edit {0}", tip: "Edit {0}",
......
...@@ -55,6 +55,10 @@ export default { ...@@ -55,6 +55,10 @@ export default {
}, },
}, },
gridviewtoolbar_toolbar: { gridviewtoolbar_toolbar: {
tbitem3: {
caption: '新建',
tip: '新建',
},
tbitem4: { tbitem4: {
caption: '编辑', caption: '编辑',
tip: '编辑', tip: '编辑',
......
...@@ -6,6 +6,10 @@ ...@@ -6,6 +6,10 @@
<i-input slot="quickSearch" v-show="!isExpandSearchForm" v-model="query" search @on-search="onSearch($event)"/> <i-input slot="quickSearch" v-show="!isExpandSearchForm" v-model="query" search @on-search="onSearch($event)"/>
<template slot="toolbar"> <template slot="toolbar">
<div class='toolbar-container'> <div class='toolbar-container'>
<i-button :title="$t('entities.campaignlist.gridviewtoolbar_toolbar.tbitem3.tip')" v-show="toolBarModels.tbitem3.visabled" :disabled="toolBarModels.tbitem3.disabled" class='' @click="toolbar_click({ tag: 'tbitem3' }, $event)">
<i class='fa fa-file-text-o'></i>
<span class='caption'>{{$t('entities.campaignlist.gridviewtoolbar_toolbar.tbitem3.caption')}}</span>
</i-button>
<i-button :title="$t('entities.campaignlist.gridviewtoolbar_toolbar.tbitem4.tip')" v-show="toolBarModels.tbitem4.visabled" :disabled="toolBarModels.tbitem4.disabled" class='' @click="toolbar_click({ tag: 'tbitem4' }, $event)"> <i-button :title="$t('entities.campaignlist.gridviewtoolbar_toolbar.tbitem4.tip')" v-show="toolBarModels.tbitem4.visabled" :disabled="toolBarModels.tbitem4.disabled" class='' @click="toolbar_click({ tag: 'tbitem4' }, $event)">
<i class='fa fa-edit'></i> <i class='fa fa-edit'></i>
<span class='caption'>{{$t('entities.campaignlist.gridviewtoolbar_toolbar.tbitem4.caption')}}</span> <span class='caption'>{{$t('entities.campaignlist.gridviewtoolbar_toolbar.tbitem4.caption')}}</span>
...@@ -263,6 +267,8 @@ export default class CampaignListGridViewBase extends Vue { ...@@ -263,6 +267,8 @@ export default class CampaignListGridViewBase extends Vue {
* @memberof CampaignListGridView * @memberof CampaignListGridView
*/ */
public toolBarModels: any = { public toolBarModels: any = {
tbitem3: { name: 'tbitem3', 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: '' },
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: '' }, 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: '' }, 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: '' },
...@@ -526,12 +532,21 @@ export default class CampaignListGridViewBase extends Vue { ...@@ -526,12 +532,21 @@ export default class CampaignListGridViewBase extends Vue {
* @memberof CampaignListGridViewBase * @memberof CampaignListGridViewBase
*/ */
public toolbar_click($event: any, $event2?: any) { public toolbar_click($event: any, $event2?: any) {
if (Object.is($event.tag, 'tbitem3')) {
this.toolbar_tbitem3_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem4')) { if (Object.is($event.tag, 'tbitem4')) {
this.toolbar_tbitem4_click(null, '', $event2); this.toolbar_tbitem4_click(null, '', $event2);
} }
if (Object.is($event.tag, 'tbitem6')) { if (Object.is($event.tag, 'tbitem6')) {
this.toolbar_tbitem6_click(null, '', $event2); this.toolbar_tbitem6_click(null, '', $event2);
} }
if (Object.is($event.tag, 'tbitem24')) {
this.toolbar_tbitem24_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem25')) {
this.toolbar_tbitem25_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem8')) { if (Object.is($event.tag, 'tbitem8')) {
this.toolbar_tbitem8_click(null, '', $event2); this.toolbar_tbitem8_click(null, '', $event2);
} }
...@@ -644,6 +659,34 @@ export default class CampaignListGridViewBase extends Vue { ...@@ -644,6 +659,34 @@ export default class CampaignListGridViewBase 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.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.New(datas, contextJO,paramJO, $event, xData,this,"CampaignList");
}
/** /**
* 逻辑事件 * 逻辑事件
* *
...@@ -700,6 +743,62 @@ export default class CampaignListGridViewBase extends Vue { ...@@ -700,6 +743,62 @@ export default class CampaignListGridViewBase extends Vue {
this.Copy(datas, contextJO,paramJO, $event, xData,this,"CampaignList"); this.Copy(datas, contextJO,paramJO, $event, xData,this,"CampaignList");
} }
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem24_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.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.ToggleRowEdit(datas, contextJO,paramJO, $event, xData,this,"CampaignList");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem25_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.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.NewRow(datas, contextJO,paramJO, $event, xData,this,"CampaignList");
}
/** /**
* 逻辑事件 * 逻辑事件
* *
...@@ -892,6 +991,26 @@ export default class CampaignListGridViewBase extends Vue { ...@@ -892,6 +991,26 @@ export default class CampaignListGridViewBase extends Vue {
} }
/**
* 新建
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof CampaignListGridViewBase
*/
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);
} else {
_this.$Notice.error({ title: '错误', desc: 'newdata 视图处理逻辑不存在,请添加!' });
}
}
/** /**
* 编辑 * 编辑
* *
...@@ -950,6 +1069,42 @@ export default class CampaignListGridViewBase extends Vue { ...@@ -950,6 +1069,42 @@ export default class CampaignListGridViewBase extends Vue {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' }); _this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
} }
} }
/**
* 行编辑
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof CampaignListGridViewBase
*/
public ToggleRowEdit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
xData.actualIsOpenEdit = !xData.actualIsOpenEdit;
}
/**
* 新建行
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof CampaignListGridViewBase
*/
public NewRow(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
const data: any = {};
if (_this.newRow && _this.newRow instanceof Function) {
_this.newRow([{ ...data }], params, $event, xData);
} else if(xData.newRow && xData.newRow instanceof Function) {
xData.newRow([{ ...data }], params, $event, xData);
}else{
_this.$Notice.error({ title: '错误', desc: 'newRow 视图处理逻辑不存在,请添加!' });
}
}
/** /**
* 删除 * 删除
* *
......
...@@ -6,6 +6,10 @@ ...@@ -6,6 +6,10 @@
<i-input slot="quickSearch" v-show="!isExpandSearchForm" v-model="query" search @on-search="onSearch($event)"/> <i-input slot="quickSearch" v-show="!isExpandSearchForm" v-model="query" search @on-search="onSearch($event)"/>
<template slot="toolbar"> <template slot="toolbar">
<div class='toolbar-container'> <div class='toolbar-container'>
<i-button :title="$t('entities.listaccount.gridviewtoolbar_toolbar.tbitem3.tip')" v-show="toolBarModels.tbitem3.visabled" :disabled="toolBarModels.tbitem3.disabled" class='' @click="toolbar_click({ tag: 'tbitem3' }, $event)">
<i class='fa fa-file-text-o'></i>
<span class='caption'>{{$t('entities.listaccount.gridviewtoolbar_toolbar.tbitem3.caption')}}</span>
</i-button>
<i-button :title="$t('entities.listaccount.gridviewtoolbar_toolbar.tbitem4.tip')" v-show="toolBarModels.tbitem4.visabled" :disabled="toolBarModels.tbitem4.disabled" class='' @click="toolbar_click({ tag: 'tbitem4' }, $event)"> <i-button :title="$t('entities.listaccount.gridviewtoolbar_toolbar.tbitem4.tip')" v-show="toolBarModels.tbitem4.visabled" :disabled="toolBarModels.tbitem4.disabled" class='' @click="toolbar_click({ tag: 'tbitem4' }, $event)">
<i class='fa fa-edit'></i> <i class='fa fa-edit'></i>
<span class='caption'>{{$t('entities.listaccount.gridviewtoolbar_toolbar.tbitem4.caption')}}</span> <span class='caption'>{{$t('entities.listaccount.gridviewtoolbar_toolbar.tbitem4.caption')}}</span>
...@@ -263,6 +267,8 @@ export default class ListAccountGridViewBase extends Vue { ...@@ -263,6 +267,8 @@ export default class ListAccountGridViewBase extends Vue {
* @memberof ListAccountGridView * @memberof ListAccountGridView
*/ */
public toolBarModels: any = { public toolBarModels: any = {
tbitem3: { name: 'tbitem3', 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: '' },
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: '' }, 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: '' }, 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: '' },
...@@ -526,12 +532,21 @@ export default class ListAccountGridViewBase extends Vue { ...@@ -526,12 +532,21 @@ export default class ListAccountGridViewBase extends Vue {
* @memberof ListAccountGridViewBase * @memberof ListAccountGridViewBase
*/ */
public toolbar_click($event: any, $event2?: any) { public toolbar_click($event: any, $event2?: any) {
if (Object.is($event.tag, 'tbitem3')) {
this.toolbar_tbitem3_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem4')) { if (Object.is($event.tag, 'tbitem4')) {
this.toolbar_tbitem4_click(null, '', $event2); this.toolbar_tbitem4_click(null, '', $event2);
} }
if (Object.is($event.tag, 'tbitem6')) { if (Object.is($event.tag, 'tbitem6')) {
this.toolbar_tbitem6_click(null, '', $event2); this.toolbar_tbitem6_click(null, '', $event2);
} }
if (Object.is($event.tag, 'tbitem24')) {
this.toolbar_tbitem24_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem25')) {
this.toolbar_tbitem25_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem8')) { if (Object.is($event.tag, 'tbitem8')) {
this.toolbar_tbitem8_click(null, '', $event2); this.toolbar_tbitem8_click(null, '', $event2);
} }
...@@ -644,6 +659,34 @@ export default class ListAccountGridViewBase extends Vue { ...@@ -644,6 +659,34 @@ export default class ListAccountGridViewBase 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.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.New(datas, contextJO,paramJO, $event, xData,this,"ListAccount");
}
/** /**
* 逻辑事件 * 逻辑事件
* *
...@@ -700,6 +743,62 @@ export default class ListAccountGridViewBase extends Vue { ...@@ -700,6 +743,62 @@ export default class ListAccountGridViewBase extends Vue {
this.Copy(datas, contextJO,paramJO, $event, xData,this,"ListAccount"); this.Copy(datas, contextJO,paramJO, $event, xData,this,"ListAccount");
} }
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem24_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.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.ToggleRowEdit(datas, contextJO,paramJO, $event, xData,this,"ListAccount");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem25_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.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.NewRow(datas, contextJO,paramJO, $event, xData,this,"ListAccount");
}
/** /**
* 逻辑事件 * 逻辑事件
* *
...@@ -892,6 +991,26 @@ export default class ListAccountGridViewBase extends Vue { ...@@ -892,6 +991,26 @@ export default class ListAccountGridViewBase extends Vue {
} }
/**
* 新建
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof ListAccountGridViewBase
*/
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);
} else {
_this.$Notice.error({ title: '错误', desc: 'newdata 视图处理逻辑不存在,请添加!' });
}
}
/** /**
* 编辑 * 编辑
* *
...@@ -950,6 +1069,42 @@ export default class ListAccountGridViewBase extends Vue { ...@@ -950,6 +1069,42 @@ export default class ListAccountGridViewBase extends Vue {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' }); _this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
} }
} }
/**
* 行编辑
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof ListAccountGridViewBase
*/
public ToggleRowEdit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
xData.actualIsOpenEdit = !xData.actualIsOpenEdit;
}
/**
* 新建行
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof ListAccountGridViewBase
*/
public NewRow(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
const data: any = {};
if (_this.newRow && _this.newRow instanceof Function) {
_this.newRow([{ ...data }], params, $event, xData);
} else if(xData.newRow && xData.newRow instanceof Function) {
xData.newRow([{ ...data }], params, $event, xData);
}else{
_this.$Notice.error({ title: '错误', desc: 'newRow 视图处理逻辑不存在,请添加!' });
}
}
/** /**
* 删除 * 删除
* *
......
...@@ -6,6 +6,10 @@ ...@@ -6,6 +6,10 @@
<i-input slot="quickSearch" v-show="!isExpandSearchForm" v-model="query" search @on-search="onSearch($event)"/> <i-input slot="quickSearch" v-show="!isExpandSearchForm" v-model="query" search @on-search="onSearch($event)"/>
<template slot="toolbar"> <template slot="toolbar">
<div class='toolbar-container'> <div class='toolbar-container'>
<i-button :title="$t('entities.listcontact.gridviewtoolbar_toolbar.tbitem3.tip')" v-show="toolBarModels.tbitem3.visabled" :disabled="toolBarModels.tbitem3.disabled" class='' @click="toolbar_click({ tag: 'tbitem3' }, $event)">
<i class='fa fa-file-text-o'></i>
<span class='caption'>{{$t('entities.listcontact.gridviewtoolbar_toolbar.tbitem3.caption')}}</span>
</i-button>
<i-button :title="$t('entities.listcontact.gridviewtoolbar_toolbar.tbitem4.tip')" v-show="toolBarModels.tbitem4.visabled" :disabled="toolBarModels.tbitem4.disabled" class='' @click="toolbar_click({ tag: 'tbitem4' }, $event)"> <i-button :title="$t('entities.listcontact.gridviewtoolbar_toolbar.tbitem4.tip')" v-show="toolBarModels.tbitem4.visabled" :disabled="toolBarModels.tbitem4.disabled" class='' @click="toolbar_click({ tag: 'tbitem4' }, $event)">
<i class='fa fa-edit'></i> <i class='fa fa-edit'></i>
<span class='caption'>{{$t('entities.listcontact.gridviewtoolbar_toolbar.tbitem4.caption')}}</span> <span class='caption'>{{$t('entities.listcontact.gridviewtoolbar_toolbar.tbitem4.caption')}}</span>
...@@ -263,6 +267,8 @@ export default class ListContactGridViewBase extends Vue { ...@@ -263,6 +267,8 @@ export default class ListContactGridViewBase extends Vue {
* @memberof ListContactGridView * @memberof ListContactGridView
*/ */
public toolBarModels: any = { public toolBarModels: any = {
tbitem3: { name: 'tbitem3', 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: '' },
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: '' }, 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: '' }, 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: '' },
...@@ -526,12 +532,21 @@ export default class ListContactGridViewBase extends Vue { ...@@ -526,12 +532,21 @@ export default class ListContactGridViewBase extends Vue {
* @memberof ListContactGridViewBase * @memberof ListContactGridViewBase
*/ */
public toolbar_click($event: any, $event2?: any) { public toolbar_click($event: any, $event2?: any) {
if (Object.is($event.tag, 'tbitem3')) {
this.toolbar_tbitem3_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem4')) { if (Object.is($event.tag, 'tbitem4')) {
this.toolbar_tbitem4_click(null, '', $event2); this.toolbar_tbitem4_click(null, '', $event2);
} }
if (Object.is($event.tag, 'tbitem6')) { if (Object.is($event.tag, 'tbitem6')) {
this.toolbar_tbitem6_click(null, '', $event2); this.toolbar_tbitem6_click(null, '', $event2);
} }
if (Object.is($event.tag, 'tbitem24')) {
this.toolbar_tbitem24_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem25')) {
this.toolbar_tbitem25_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem8')) { if (Object.is($event.tag, 'tbitem8')) {
this.toolbar_tbitem8_click(null, '', $event2); this.toolbar_tbitem8_click(null, '', $event2);
} }
...@@ -644,6 +659,34 @@ export default class ListContactGridViewBase extends Vue { ...@@ -644,6 +659,34 @@ export default class ListContactGridViewBase 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.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.New(datas, contextJO,paramJO, $event, xData,this,"ListContact");
}
/** /**
* 逻辑事件 * 逻辑事件
* *
...@@ -700,6 +743,62 @@ export default class ListContactGridViewBase extends Vue { ...@@ -700,6 +743,62 @@ export default class ListContactGridViewBase extends Vue {
this.Copy(datas, contextJO,paramJO, $event, xData,this,"ListContact"); this.Copy(datas, contextJO,paramJO, $event, xData,this,"ListContact");
} }
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem24_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.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.ToggleRowEdit(datas, contextJO,paramJO, $event, xData,this,"ListContact");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem25_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.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.NewRow(datas, contextJO,paramJO, $event, xData,this,"ListContact");
}
/** /**
* 逻辑事件 * 逻辑事件
* *
...@@ -892,6 +991,26 @@ export default class ListContactGridViewBase extends Vue { ...@@ -892,6 +991,26 @@ export default class ListContactGridViewBase extends Vue {
} }
/**
* 新建
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof ListContactGridViewBase
*/
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);
} else {
_this.$Notice.error({ title: '错误', desc: 'newdata 视图处理逻辑不存在,请添加!' });
}
}
/** /**
* 编辑 * 编辑
* *
...@@ -950,6 +1069,42 @@ export default class ListContactGridViewBase extends Vue { ...@@ -950,6 +1069,42 @@ export default class ListContactGridViewBase extends Vue {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' }); _this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
} }
} }
/**
* 行编辑
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof ListContactGridViewBase
*/
public ToggleRowEdit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
xData.actualIsOpenEdit = !xData.actualIsOpenEdit;
}
/**
* 新建行
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof ListContactGridViewBase
*/
public NewRow(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
const data: any = {};
if (_this.newRow && _this.newRow instanceof Function) {
_this.newRow([{ ...data }], params, $event, xData);
} else if(xData.newRow && xData.newRow instanceof Function) {
xData.newRow([{ ...data }], params, $event, xData);
}else{
_this.$Notice.error({ title: '错误', desc: 'newRow 视图处理逻辑不存在,请添加!' });
}
}
/** /**
* 删除 * 删除
* *
......
...@@ -6,6 +6,10 @@ ...@@ -6,6 +6,10 @@
<i-input slot="quickSearch" v-show="!isExpandSearchForm" v-model="query" search @on-search="onSearch($event)"/> <i-input slot="quickSearch" v-show="!isExpandSearchForm" v-model="query" search @on-search="onSearch($event)"/>
<template slot="toolbar"> <template slot="toolbar">
<div class='toolbar-container'> <div class='toolbar-container'>
<i-button :title="$t('entities.listlead.gridviewtoolbar_toolbar.tbitem3.tip')" v-show="toolBarModels.tbitem3.visabled" :disabled="toolBarModels.tbitem3.disabled" class='' @click="toolbar_click({ tag: 'tbitem3' }, $event)">
<i class='fa fa-file-text-o'></i>
<span class='caption'>{{$t('entities.listlead.gridviewtoolbar_toolbar.tbitem3.caption')}}</span>
</i-button>
<i-button :title="$t('entities.listlead.gridviewtoolbar_toolbar.tbitem4.tip')" v-show="toolBarModels.tbitem4.visabled" :disabled="toolBarModels.tbitem4.disabled" class='' @click="toolbar_click({ tag: 'tbitem4' }, $event)"> <i-button :title="$t('entities.listlead.gridviewtoolbar_toolbar.tbitem4.tip')" v-show="toolBarModels.tbitem4.visabled" :disabled="toolBarModels.tbitem4.disabled" class='' @click="toolbar_click({ tag: 'tbitem4' }, $event)">
<i class='fa fa-edit'></i> <i class='fa fa-edit'></i>
<span class='caption'>{{$t('entities.listlead.gridviewtoolbar_toolbar.tbitem4.caption')}}</span> <span class='caption'>{{$t('entities.listlead.gridviewtoolbar_toolbar.tbitem4.caption')}}</span>
...@@ -263,6 +267,8 @@ export default class ListLeadGridViewBase extends Vue { ...@@ -263,6 +267,8 @@ export default class ListLeadGridViewBase extends Vue {
* @memberof ListLeadGridView * @memberof ListLeadGridView
*/ */
public toolBarModels: any = { public toolBarModels: any = {
tbitem3: { name: 'tbitem3', 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: '' },
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: '' }, 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: '' }, 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: '' },
...@@ -526,12 +532,21 @@ export default class ListLeadGridViewBase extends Vue { ...@@ -526,12 +532,21 @@ export default class ListLeadGridViewBase extends Vue {
* @memberof ListLeadGridViewBase * @memberof ListLeadGridViewBase
*/ */
public toolbar_click($event: any, $event2?: any) { public toolbar_click($event: any, $event2?: any) {
if (Object.is($event.tag, 'tbitem3')) {
this.toolbar_tbitem3_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem4')) { if (Object.is($event.tag, 'tbitem4')) {
this.toolbar_tbitem4_click(null, '', $event2); this.toolbar_tbitem4_click(null, '', $event2);
} }
if (Object.is($event.tag, 'tbitem6')) { if (Object.is($event.tag, 'tbitem6')) {
this.toolbar_tbitem6_click(null, '', $event2); this.toolbar_tbitem6_click(null, '', $event2);
} }
if (Object.is($event.tag, 'tbitem24')) {
this.toolbar_tbitem24_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem25')) {
this.toolbar_tbitem25_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem8')) { if (Object.is($event.tag, 'tbitem8')) {
this.toolbar_tbitem8_click(null, '', $event2); this.toolbar_tbitem8_click(null, '', $event2);
} }
...@@ -644,6 +659,34 @@ export default class ListLeadGridViewBase extends Vue { ...@@ -644,6 +659,34 @@ export default class ListLeadGridViewBase 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.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.New(datas, contextJO,paramJO, $event, xData,this,"ListLead");
}
/** /**
* 逻辑事件 * 逻辑事件
* *
...@@ -700,6 +743,62 @@ export default class ListLeadGridViewBase extends Vue { ...@@ -700,6 +743,62 @@ export default class ListLeadGridViewBase extends Vue {
this.Copy(datas, contextJO,paramJO, $event, xData,this,"ListLead"); this.Copy(datas, contextJO,paramJO, $event, xData,this,"ListLead");
} }
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem24_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.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.ToggleRowEdit(datas, contextJO,paramJO, $event, xData,this,"ListLead");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem25_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.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.NewRow(datas, contextJO,paramJO, $event, xData,this,"ListLead");
}
/** /**
* 逻辑事件 * 逻辑事件
* *
...@@ -892,6 +991,26 @@ export default class ListLeadGridViewBase extends Vue { ...@@ -892,6 +991,26 @@ export default class ListLeadGridViewBase extends Vue {
} }
/**
* 新建
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof ListLeadGridViewBase
*/
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);
} else {
_this.$Notice.error({ title: '错误', desc: 'newdata 视图处理逻辑不存在,请添加!' });
}
}
/** /**
* 编辑 * 编辑
* *
...@@ -950,6 +1069,42 @@ export default class ListLeadGridViewBase extends Vue { ...@@ -950,6 +1069,42 @@ export default class ListLeadGridViewBase extends Vue {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' }); _this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
} }
} }
/**
* 行编辑
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof ListLeadGridViewBase
*/
public ToggleRowEdit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
xData.actualIsOpenEdit = !xData.actualIsOpenEdit;
}
/**
* 新建行
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof ListLeadGridViewBase
*/
public NewRow(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
const data: any = {};
if (_this.newRow && _this.newRow instanceof Function) {
_this.newRow([{ ...data }], params, $event, xData);
} else if(xData.newRow && xData.newRow instanceof Function) {
xData.newRow([{ ...data }], params, $event, xData);
}else{
_this.$Notice.error({ title: '错误', desc: 'newRow 视图处理逻辑不存在,请添加!' });
}
}
/** /**
* 删除 * 删除
* *
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册