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

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

上级 6bf089db
...@@ -604,6 +604,8 @@ export default { ...@@ -604,6 +604,8 @@ export default {
usr2_dataview: { usr2_dataview: {
nodata:"", nodata:"",
uiactions: { uiactions: {
edit: "Edit",
remove: "Remove",
}, },
}, },
usr3_dataview: { usr3_dataview: {
......
...@@ -603,6 +603,8 @@ export default { ...@@ -603,6 +603,8 @@ export default {
usr2_dataview: { usr2_dataview: {
nodata:"", nodata:"",
uiactions: { uiactions: {
edit: "编辑",
remove: "删除",
}, },
}, },
usr3_dataview: { usr3_dataview: {
......
...@@ -149,6 +149,105 @@ export default class Usr2Base extends Vue implements ControlInterface { ...@@ -149,6 +149,105 @@ export default class Usr2Base extends Vue implements ControlInterface {
public appEntityService: IBIZBOOKService = new IBIZBOOKService({ $store: this.$store }); public appEntityService: IBIZBOOKService = new IBIZBOOKService({ $store: this.$store });
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public dataview_memo1_u693c051_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 dataview_memo1_u8457362_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.Remove(datas, contextJO,paramJO, $event, xData,this,"IBIZBOOK");
}
/**
* 编辑
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof IBIZBOOKUsr2DataViewBase
*/
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 IBIZBOOKUsr2DataViewBase
*/
public Remove(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (!xData || !(xData.remove instanceof Function)) {
return ;
}
xData.remove(args);
}
/** /**
* 转化数据 * 转化数据
...@@ -437,6 +536,8 @@ export default class Usr2Base extends Vue implements ControlInterface { ...@@ -437,6 +536,8 @@ export default class Usr2Base extends Vue implements ControlInterface {
* @memberof Usr2Base * @memberof Usr2Base
*/ */
public actionModel:any ={ public actionModel:any ={
"Edit":{name:"Edit",icon:"fa fa-edit",caption:"编辑",disabled: false, visabled: true,noprivdisplaymode:2,dataaccaction: "", actiontarget: "SINGLEKEY"},
"Remove":{name:"Remove",icon:"fa fa-remove",caption:"删除",disabled: false, visabled: true,noprivdisplaymode:2,dataaccaction: "", actiontarget: "MULTIKEY"},
}; };
/** /**
...@@ -1022,6 +1123,12 @@ export default class Usr2Base extends Vue implements ControlInterface { ...@@ -1022,6 +1123,12 @@ export default class Usr2Base extends Vue implements ControlInterface {
*/ */
public uiAction(data: any, tag: any, $event: any) { public uiAction(data: any, tag: any, $event: any) {
$event.stopPropagation(); $event.stopPropagation();
if(Object.is('Edit', tag)) {
this.dataview_memo1_u693c051_click(data, tag, $event);
}
if(Object.is('Remove', tag)) {
this.dataview_memo1_u8457362_click(data, tag, $event);
}
} }
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册