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

lab_gzf 发布系统代码

上级 4abe51a6
......@@ -660,6 +660,43 @@
}
]
},
{
"srfkey": "Incident__StateCode",
"emptytext": "未定义",
"codelisttype":"static",
"items": [
{
"id": "2",
"label": "已取消",
"text": "已取消",
"data":"",
"codename":"Item_2",
"value": "2",
"disabled": false
}
, {
"id": "1",
"label": "已解决",
"text": "已解决",
"data":"",
"codename":"Item_1",
"value": "1",
"disabled": false
}
, {
"id": "0",
"label": "有效",
"text": "有效",
"data":"",
"codename":"Item_0",
"value": "0",
"disabled": false
}
]
},
{
"srfkey": "Lead__LeadSourceCode",
"emptytext": "未定义",
......@@ -4308,6 +4345,43 @@
}
]
},
{
"srfkey": "Incident__PriorityCode",
"emptytext": "未定义",
"codelisttype":"static",
"items": [
{
"id": "3",
"label": "低",
"text": "低",
"data":"",
"codename":"Item_3",
"value": "3",
"disabled": false
}
, {
"id": "2",
"label": "标准",
"text": "标准",
"data":"",
"codename":"Item_2",
"value": "2",
"disabled": false
}
, {
"id": "1",
"label": "高",
"text": "高",
"data":"",
"codename":"Item_1",
"value": "1",
"disabled": false
}
]
},
{
"srfkey": "Invoice__PaymentTermsCode",
"emptytext": "未定义",
......
......@@ -95,6 +95,12 @@ export default {
"2": "免收费用",
"empty": ""
},
Incident__StateCode: {
"2": "已取消",
"1": "已解决",
"0": "有效",
"empty": ""
},
Lead__LeadSourceCode: {
"8": "Web",
"5": "公共关系",
......@@ -554,6 +560,12 @@ export default {
"CAMPAIGNRESPONSE": "市场活动响应",
"empty": ""
},
Incident__PriorityCode: {
"3": "低",
"2": "标准",
"1": "高",
"empty": ""
},
Invoice__PaymentTermsCode: {
"2": "2/10 N30",
"1": "N30",
......
......@@ -95,6 +95,12 @@ export default {
"2": "免收费用",
"empty": "",
},
Incident__StateCode: {
"2": "已取消",
"1": "已解决",
"0": "有效",
"empty": "",
},
Lead__LeadSourceCode: {
"8": "Web",
"5": "公共关系",
......@@ -554,6 +560,12 @@ export default {
"CAMPAIGNRESPONSE": "市场活动响应",
"empty": "",
},
Incident__PriorityCode: {
"3": "低",
"2": "标准",
"1": "高",
"empty": "",
},
Invoice__PaymentTermsCode: {
"2": "2/10 N30",
"1": "N30",
......
......@@ -246,8 +246,11 @@ export default {
main_grid: {
columns: {
title: "案例标题",
updateman: "更新人",
updatedate: "更新时间",
ticketnumber: "案例号",
prioritycode: "优先级",
caseorigincode: "起源",
customerid: "客户",
statecode: "状态",
},
uiactions: {
},
......
......@@ -245,8 +245,11 @@ export default {
main_grid: {
columns: {
title: "案例标题",
updateman: "更新人",
updatedate: "更新时间",
ticketnumber: "案例号",
prioritycode: "优先级",
caseorigincode: "起源",
customerid: "客户",
statecode: "状态",
},
uiactions: {
},
......
......@@ -668,6 +668,43 @@ mock.onGet('./assets/json/data-dictionary.json').reply((config: any) => {
},
]
},
{
srfkey: "Incident__StateCode",
emptytext: "未定义",
"codelisttype":"static",
items: [
{
id: "2",
label: "已取消",
text: "已取消",
"data":"",
"codename":"Item_2",
value: "2",
disabled: false,
},
{
id: "1",
label: "已解决",
text: "已解决",
"data":"",
"codename":"Item_1",
value: "1",
disabled: false,
},
{
id: "0",
label: "有效",
text: "有效",
"data":"",
"codename":"Item_0",
value: "0",
disabled: false,
},
]
},
{
srfkey: "Lead__LeadSourceCode",
emptytext: "未定义",
......@@ -4316,6 +4353,43 @@ mock.onGet('./assets/json/data-dictionary.json').reply((config: any) => {
},
]
},
{
srfkey: "Incident__PriorityCode",
emptytext: "未定义",
"codelisttype":"static",
items: [
{
id: "3",
label: "低",
text: "低",
"data":"",
"codename":"Item_3",
value: "3",
disabled: false,
},
{
id: "2",
label: "标准",
text: "标准",
"data":"",
"codename":"Item_2",
value: "2",
disabled: false,
},
{
id: "1",
label: "高",
text: "高",
"data":"",
"codename":"Item_1",
value: "1",
disabled: false,
},
]
},
{
srfkey: "Invoice__PaymentTermsCode",
emptytext: "未定义",
......
import { Subject } from 'rxjs';
import { GridViewBase } from '@/studio-core';
import GoalService from '@/service/goal/goal-service';
import GridViewEngine from '@engine/view/grid-view-engine';
import CodeListService from "@service/app/codelist-service";
/**
* 子目标表格视图视图基类
*
* @export
* @class GoalChildGoalGridViewBase
* @extends {GridViewBase}
*/
export class GoalChildGoalGridViewBase extends GridViewBase {
/**
* 实体服务对象
*
* @type {GoalService}
* @memberof GoalChildGoalGridViewBase
*/
protected appEntityService: GoalService = new GoalService;
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof GoalChildGoalGridViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof GoalChildGoalGridViewBase
*/
protected model: any = {
srfCaption: 'entities.goal.views.childgoalgridview.caption',
srfTitle: 'entities.goal.views.childgoalgridview.title',
srfSubTitle: 'entities.goal.views.childgoalgridview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof GoalChildGoalGridViewBase
*/
protected containerModel: any = {
view_toolbar: { name: 'toolbar', type: 'TOOLBAR' },
view_grid: { name: 'grid', type: 'GRID' },
view_searchform: { name: 'searchform', type: 'SEARCHFORM' },
};
/**
* 工具栏模型
*
* @type {*}
* @memberof GoalChildGoalGridView
*/
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: '' },
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: '' },
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: '' },
tbitem9: { name: 'tbitem9', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem13: { name: 'tbitem13', caption: '导出','isShowCaption':true,'isShowIcon':true, tooltip: '导出', iconcls: 'fa fa-file-excel-o', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'ExportExcel', target: '' }, MaxRowCount: 1000, class: '' },
tbitem10: { name: 'tbitem10', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem19: { name: 'tbitem19', caption: '过滤','isShowCaption':true,'isShowIcon':true, tooltip: '过滤', iconcls: 'fa fa-filter', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'ToggleFilter', target: '' }, class: '' },
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected viewtag: string = 'cb7c18e9af4848f515ab84524fb234b2';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof GoalChildGoalGridViewBase
*/
public engine: GridViewEngine = new GridViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof GoalChildGoalGridViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
opendata: (args: any[],fullargs?:any[],params?: any, $event?: any, xData?: any) => {
this.opendata(args,fullargs, params, $event, xData);
},
newdata: (args: any[],fullargs?:any[],params?: any, $event?: any, xData?: any) => {
this.newdata(args,fullargs, params, $event, xData);
},
grid: this.$refs.grid,
searchform: this.$refs.searchform,
keyPSDEField: 'goal',
majorPSDEField: 'title',
isLoadDefault: true,
});
}
/**
* toolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof GoalChildGoalGridViewBase
*/
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, 'tbitem4')) {
this.toolbar_tbitem4_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem8')) {
this.toolbar_tbitem8_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem13')) {
this.toolbar_tbitem13_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem11')) {
this.toolbar_tbitem11_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem19')) {
this.toolbar_tbitem19_click(null, '', $event2);
}
}
/**
* grid 部件 selectionchange 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof GoalChildGoalGridViewBase
*/
public grid_selectionchange($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'selectionchange', $event);
}
/**
* grid 部件 beforeload 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof GoalChildGoalGridViewBase
*/
public grid_beforeload($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'beforeload', $event);
}
/**
* grid 部件 rowdblclick 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof GoalChildGoalGridViewBase
*/
public grid_rowdblclick($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'rowdblclick', $event);
}
/**
* grid 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof GoalChildGoalGridViewBase
*/
public grid_remove($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'remove', $event);
}
/**
* grid 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof GoalChildGoalGridViewBase
*/
public grid_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'load', $event);
}
/**
* searchform 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof GoalChildGoalGridViewBase
*/
public searchform_save($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'save', $event);
}
/**
* searchform 部件 search 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof GoalChildGoalGridViewBase
*/
public searchform_search($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'search', $event);
}
/**
* searchform 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof GoalChildGoalGridViewBase
*/
public searchform_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'load', $event);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_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.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.New(datas, contextJO,paramJO, $event, xData,this,"Goal");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem4_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.Edit(datas, contextJO,paramJO, $event, xData,this,"Goal");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem8_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.Remove(datas, contextJO,paramJO, $event, xData,this,"Goal");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem13_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.ExportExcel(datas, contextJO,paramJO, $event, xData,this,"Goal");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem11_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.Print(datas, contextJO,paramJO, $event, xData,this,"Goal");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem19_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.ToggleFilter(datas, contextJO,paramJO, $event, xData,this,"Goal");
}
/**
* 打开新建数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof GoalChildGoalGridView
*/
public newdata(args: any[],fullargs?:any[], params?: any, $event?: any, xData?: any) {
let localContext:any = null;
let localViewParam:any =null;
const data: any = {};
if(args[0].srfsourcekey){
data.srfsourcekey = args[0].srfsourcekey;
}
let tempContext = JSON.parse(JSON.stringify(this.context));
delete tempContext.goal;
if(args.length >0){
Object.assign(tempContext,args[0]);
}
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'goals', parameterName: 'goal' },
];
const _this: any = this;
const openPopupModal = (view: any, data: any) => {
let container: Subject<any> = this.$appmodal.openModal(view, tempContext, data);
container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
}
if (!xData || !(xData.refresh instanceof Function)) {
return;
}
xData.refresh(result.datas);
});
}
const view: any = {
viewname: 'goal-edit-child-goal-view',
height: 0,
width: 0,
title: this.$t('entities.goal.views.edit_childgoalview.title'),
};
openPopupModal(view, data);
}
/**
* 打开编辑数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof GoalChildGoalGridView
*/
public opendata(args: any[],fullargs?:any[],params?: any, $event?: any, xData?: any) {
let localContext:any = null;
let localViewParam:any =null;
const data: any = {};
let tempContext = JSON.parse(JSON.stringify(this.context));
if(args.length >0){
Object.assign(tempContext,args[0]);
}
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'goals', parameterName: 'goal' },
];
const _this: any = this;
const openPopupModal = (view: any, data: any) => {
let container: Subject<any> = this.$appmodal.openModal(view, tempContext, data);
container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
}
if (!xData || !(xData.refresh instanceof Function)) {
return;
}
xData.refresh(result.datas);
});
}
const view: any = {
viewname: 'goal-edit-child-goal-view',
height: 0,
width: 0,
title: this.$t('entities.goal.views.edit_childgoalview.title'),
};
openPopupModal(view, data);
}
/**
* 新建
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof GoalChildGoalGridViewBase
*/
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 视图处理逻辑不存在,请添加!' });
}
}
/**
* 编辑
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof GoalChildGoalGridViewBase
*/
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, { goal: args[0].goal })
}
_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 GoalChildGoalGridViewBase
*/
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);
}
/**
* 导出
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof GoalChildGoalGridViewBase
*/
public ExportExcel(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (!xData || !(xData.exportExcel instanceof Function) || !$event) {
return ;
}
xData.exportExcel($event.exportparms);
}
/**
* 打印
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof GoalChildGoalGridViewBase
*/
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();
}
/**
* 过滤
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof GoalChildGoalGridViewBase
*/
public ToggleFilter(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (_this.hasOwnProperty('isExpandSearchForm')) {
_this.isExpandSearchForm = !_this.isExpandSearchForm;
}
}
}
\ No newline at end of file
<studio-view-style2 viewName="goalchildgoalgridview" viewTitle="子目标表格视图" class='degridview goal-child-goal-grid-view'>
<i-input slot="quickSearch" v-show="!isExpandSearchForm" v-model="query" search @on-search="onSearch($event)"/>
<template slot="toolbar">
<view-toolbar mode="STYLE2" :model="toolBarModels" @item-click="toolbar_click($event)"/> </template>
<template slot="searchForm">
<view_searchform
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:showBusyIndicator="true"
v-show="isExpandSearchForm"
loaddraftAction="FilterGetDraft"
loadAction="FilterGet"
name="searchform"
ref='searchform'
@save="searchform_save($event)"
@search="searchform_search($event)"
@load="searchform_load($event)"
@closeview="closeView($event)">
</view_searchform>
</template>
<view_grid
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:isSingleSelect="isSingleSelect"
:showBusyIndicator="true"
:isOpenEdit="false"
:gridRowActiveMode="gridRowActiveMode"
@save="onSave"
updateAction=""
removeAction="Remove"
loaddraftAction=""
loadAction=""
createAction=""
fetchAction="FetchDefault"
:newdata="newdata"
:opendata="opendata"
name="grid"
ref='grid'
@selectionchange="grid_selectionchange($event)"
@beforeload="grid_beforeload($event)"
@rowdblclick="grid_rowdblclick($event)"
@remove="grid_remove($event)"
@load="grid_load($event)"
@closeview="closeView($event)">
</view_grid>
</studio-view-style2>
\ No newline at end of file
<template src="./goal-child-goal-grid-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { GoalChildGoalGridViewBase } from './goal-child-goal-grid-view-base';
import view_grid from '@widgets/goal/main-grid/main-grid.vue';
import view_searchform from '@widgets/goal/default-searchform/default-searchform.vue';
/**
* 子目标表格视图视图
*
* @export
* @class GoalChildGoalGridView
* @extends {GoalChildGoalGridViewBase}
*/
@Component({
components: {
view_grid,
view_searchform,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
vm.$store.commit('addCurPageViewtag', { route: to, viewtag: vm.viewtag });
});
}
})
@VueLifeCycleProcessing()
export default class GoalChildGoalGridView extends GoalChildGoalGridViewBase { }
</script>
import { Subject } from 'rxjs';
import { EditViewBase } from '@/studio-core';
import GoalService from '@/service/goal/goal-service';
import EditViewEngine from '@engine/view/edit-view-engine';
/**
* 子目标信息视图基类
*
* @export
* @class GoalEdit_ChildGoalViewBase
* @extends {EditViewBase}
*/
export class GoalEdit_ChildGoalViewBase extends EditViewBase {
/**
* 实体服务对象
*
* @type {GoalService}
* @memberof GoalEdit_ChildGoalViewBase
*/
protected appEntityService: GoalService = new GoalService;
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof GoalEdit_ChildGoalViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof GoalEdit_ChildGoalViewBase
*/
protected model: any = {
srfCaption: 'entities.goal.views.edit_childgoalview.caption',
srfTitle: 'entities.goal.views.edit_childgoalview.title',
srfSubTitle: 'entities.goal.views.edit_childgoalview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof GoalEdit_ChildGoalViewBase
*/
protected containerModel: any = {
view_toolbar: { name: 'toolbar', type: 'TOOLBAR' },
view_form: { name: 'form', type: 'FORM' },
};
/**
* 工具栏模型
*
* @type {*}
* @memberof GoalEdit_ChildGoalView
*/
public toolBarModels: any = {
tbitem1: { name: 'tbitem1', caption: '保存并关闭','isShowCaption':true,'isShowIcon':true, tooltip: '保存并关闭', iconcls: 'fa fa-power-off', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'SaveAndExit', target: '' }, class: '' },
tbitem2: { name: 'tbitem2', caption: '关闭','isShowCaption':true,'isShowIcon':true, tooltip: '关闭', iconcls: 'fa fa-sign-out', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Exit', target: '' }, class: '' },
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected viewtag: string = '9be8eab621377b4bb8432a48a3f3f785';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof GoalEdit_ChildGoalViewBase
*/
public engine: EditViewEngine = new EditViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof GoalEdit_ChildGoalViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
form: this.$refs.form,
p2k: '0',
keyPSDEField: 'goal',
majorPSDEField: 'title',
isLoadDefault: true,
});
}
/**
* toolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof GoalEdit_ChildGoalViewBase
*/
public toolbar_click($event: any, $event2?: any): void {
if (Object.is($event.tag, 'tbitem1')) {
this.toolbar_tbitem1_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem2')) {
this.toolbar_tbitem2_click(null, '', $event2);
}
}
/**
* form 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof GoalEdit_ChildGoalViewBase
*/
public form_save($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'save', $event);
}
/**
* form 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof GoalEdit_ChildGoalViewBase
*/
public form_remove($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'remove', $event);
}
/**
* form 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof GoalEdit_ChildGoalViewBase
*/
public form_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'load', $event);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem1_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.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.SaveAndExit(datas, contextJO,paramJO, $event, xData,this,"Goal");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem2_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.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Exit(datas, contextJO,paramJO, $event, xData,this,"Goal");
}
/**
* 保存并关闭
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof GoalEdit_ChildGoalViewBase
*/
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 GoalEdit_ChildGoalViewBase
*/
public Exit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
this.closeView(args);
if(window.parent){
window.parent.postMessage([{ ...args }],'*');
}
}
}
\ No newline at end of file
<studio-view-style2 viewName="goaledit_childgoalview" viewTitle="子目标信息" class='deeditview goal-edit-child-goal-view'>
<template slot="toolbar">
<view-toolbar mode="STYLE2" :model="toolBarModels" @item-click="toolbar_click($event)"/> </template>
<view_form
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:autosave="false"
:viewtag="viewtag"
:showBusyIndicator="true"
updateAction="Update"
removeAction="Remove"
loaddraftAction="GetDraft"
loadAction="Get"
createAction="Create"
WFSubmitAction=""
WFStartAction=""
style=''
name="form"
ref='form'
@save="form_save($event)"
@remove="form_remove($event)"
@load="form_load($event)"
@closeview="closeView($event)">
</view_form>
</studio-view-style2>
\ No newline at end of file
<template src="./goal-edit-child-goal-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { GoalEdit_ChildGoalViewBase } from './goal-edit-child-goal-view-base';
import view_form from '@widgets/goal/edit-child-goal-form/edit-child-goal-form.vue';
/**
* 子目标信息视图
*
* @export
* @class GoalEdit_ChildGoalView
* @extends {GoalEdit_ChildGoalViewBase}
*/
@Component({
components: {
view_form,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
vm.$store.commit('addCurPageViewtag', { route: to, viewtag: vm.viewtag });
});
}
})
@VueLifeCycleProcessing()
export default class GoalEdit_ChildGoalView extends GoalEdit_ChildGoalViewBase { }
</script>
......@@ -517,7 +517,7 @@ export class GoalGridViewBase extends GridViewBase {
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'goals', parameterName: 'goal' },
{ pathName: 'editview', parameterName: 'editview' },
{ pathName: 'infoview', parameterName: 'infoview' },
];
const _this: any = this;
const openIndexViewTab = (data: any) => {
......
import { Subject } from 'rxjs';
import { EditViewBase } from '@/studio-core';
import GoalService from '@/service/goal/goal-service';
import EditViewEngine from '@engine/view/edit-view-engine';
/**
* 目标信息视图视图基类
*
* @export
* @class GoalInfo_GoalViewBase
* @extends {EditViewBase}
*/
export class GoalInfo_GoalViewBase extends EditViewBase {
/**
* 实体服务对象
*
* @type {GoalService}
* @memberof GoalInfo_GoalViewBase
*/
protected appEntityService: GoalService = new GoalService;
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof GoalInfo_GoalViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof GoalInfo_GoalViewBase
*/
protected model: any = {
srfCaption: 'entities.goal.views.info_goalview.caption',
srfTitle: 'entities.goal.views.info_goalview.title',
srfSubTitle: 'entities.goal.views.info_goalview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof GoalInfo_GoalViewBase
*/
protected containerModel: any = {
view_form: { name: 'form', type: 'FORM' },
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected viewtag: string = '42dfdbed522e32b0efd03a9402ae29f8';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof GoalInfo_GoalViewBase
*/
public engine: EditViewEngine = new EditViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof GoalInfo_GoalViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
form: this.$refs.form,
p2k: '0',
keyPSDEField: 'goal',
majorPSDEField: 'title',
isLoadDefault: true,
});
}
/**
* form 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof GoalInfo_GoalViewBase
*/
public form_save($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'save', $event);
}
/**
* form 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof GoalInfo_GoalViewBase
*/
public form_remove($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'remove', $event);
}
/**
* form 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof GoalInfo_GoalViewBase
*/
public form_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'load', $event);
}
}
\ No newline at end of file
<studio-view-style2 viewName="goalinfo_goalview" viewTitle="目标信息视图" class='deeditview goal-info-goal-view from-dashboard-style'>
<view_form
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:autosave="false"
:viewtag="viewtag"
:showBusyIndicator="true"
updateAction="Update"
removeAction="Remove"
loaddraftAction="GetDraft"
loadAction="Get"
createAction="Create"
WFSubmitAction=""
WFStartAction=""
style=''
name="form"
ref='form'
@save="form_save($event)"
@remove="form_remove($event)"
@load="form_load($event)"
@closeview="closeView($event)">
</view_form>
</studio-view-style2>
\ No newline at end of file
<template src="./goal-info-goal-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { GoalInfo_GoalViewBase } from './goal-info-goal-view-base';
import view_form from '@widgets/goal/info-goal-form/info-goal-form.vue';
/**
* 目标信息视图视图
*
* @export
* @class GoalInfo_GoalView
* @extends {GoalInfo_GoalViewBase}
*/
@Component({
components: {
view_form,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
vm.$store.commit('addCurPageViewtag', { route: to, viewtag: vm.viewtag });
});
}
})
@VueLifeCycleProcessing()
export default class GoalInfo_GoalView extends GoalInfo_GoalViewBase { }
</script>
import { Subject } from 'rxjs';
import { TabExpViewBase } from '@/studio-core';
import GoalService from '@/service/goal/goal-service';
import TabExpViewEngine from '@engine/view/tab-exp-view-engine';
/**
* 目标信息视图基类
*
* @export
* @class GoalInfoViewBase
* @extends {TabExpViewBase}
*/
export class GoalInfoViewBase extends TabExpViewBase {
/**
* 实体服务对象
*
* @type {GoalService}
* @memberof GoalInfoViewBase
*/
protected appEntityService: GoalService = new GoalService;
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof GoalInfoViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof GoalInfoViewBase
*/
protected model: any = {
srfCaption: 'entities.goal.views.infoview.caption',
srfTitle: 'entities.goal.views.infoview.title',
srfSubTitle: 'entities.goal.views.infoview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof GoalInfoViewBase
*/
protected containerModel: any = {
view_tabexppanel: { name: 'tabexppanel', type: 'TABEXPPANEL' },
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected viewtag: string = '521acee07c15c72e914d3ca538cb26fc';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof GoalInfoViewBase
*/
public engine: TabExpViewEngine = new TabExpViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof GoalInfoViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
keyPSDEField: 'goal',
majorPSDEField: 'title',
isLoadDefault: true,
});
}
/**
* 加载模型
*
* @protected
* @memberof GoalInfoViewBase
*/
protected async loadModel(): Promise<any> {
if(this.context.goal){
this.appEntityService.getDataInfo(JSON.parse(JSON.stringify(this.context)),{},false).then((response:any) =>{
if (!response || response.status !== 200) {
return;
}
const { data: _data } = response;
if (_data.title) {
Object.assign(this.model, { dataInfo: _data.title });
if (this.$tabPageExp) {
this.$tabPageExp.setCurPageCaption(this.model.srfTitle, this.model.srfTitle, this.model.dataInfo);
}
if(this.$route){
this.$route.meta.info = this.model.dataInfo;
}
Object.assign(this.model, { srfTitle: `${this.$t(this.model.srfTitle)} - ${this.model.dataInfo}` });
}
})
}
}
}
\ No newline at end of file
<studio-view-style2 viewName="goalinfoview" viewTitle="目标信息" class='detabexpview goal-info-view'>
<template slot='title'>
<span class='caption-info'>{{$t(model.srfTitle)}}</span>
</template>
<view_tabexppanel
:viewState="viewState"
:viewparams="viewparams"
:context="context"
name="tabexppanel"
ref='tabexppanel'
@closeview="closeView($event)">
</view_tabexppanel>
</studio-view-style2>
\ No newline at end of file
<template src="./goal-info-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { GoalInfoViewBase } from './goal-info-view-base';
import view_tabexppanel from '@widgets/goal/info-viewtabexppanel-tabexppanel/info-viewtabexppanel-tabexppanel.vue';
/**
* 目标信息视图
*
* @export
* @class GoalInfoView
* @extends {GoalInfoViewBase}
*/
@Component({
components: {
view_tabexppanel,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
vm.$store.commit('addCurPageViewtag', { route: to, viewtag: vm.viewtag });
});
}
})
@VueLifeCycleProcessing()
export default class GoalInfoView extends GoalInfoViewBase { }
</script>
import { Subject } from 'rxjs';
import { DashboardViewBase } from '@/studio-core';
import GoalService from '@/service/goal/goal-service';
import PortalViewEngine from '@engine/view/portal-view-engine';
/**
* 目标数据看板视图视图基类
*
* @export
* @class GoalSummaryViewBase
* @extends {DashboardViewBase}
*/
export class GoalSummaryViewBase extends DashboardViewBase {
/**
* 实体服务对象
*
* @type {GoalService}
* @memberof GoalSummaryViewBase
*/
protected appEntityService: GoalService = new GoalService;
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof GoalSummaryViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof GoalSummaryViewBase
*/
protected model: any = {
srfCaption: 'entities.goal.views.summaryview.caption',
srfTitle: 'entities.goal.views.summaryview.title',
srfSubTitle: 'entities.goal.views.summaryview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof GoalSummaryViewBase
*/
protected containerModel: any = {
view_dashboard: { name: 'dashboard', type: 'DASHBOARD' },
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected viewtag: string = '674522952049a4e85508a1f9f3642d80';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof GoalSummaryViewBase
*/
public engine: PortalViewEngine = new PortalViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof GoalSummaryViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
dashboard: this.$refs.dashboard,
keyPSDEField: 'goal',
majorPSDEField: 'title',
isLoadDefault: true,
});
}
/**
* dashboard 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof GoalSummaryViewBase
*/
public dashboard_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('dashboard', 'load', $event);
}
}
\ No newline at end of file
<studio-view-style2 viewName="goalsummaryview" viewTitle="目标数据看板视图" class='deportalview goal-summary-view'>
<view_dashboard
:viewState="viewState"
:viewparams="viewparams"
:context="JSON.parse(JSON.stringify(context))"
:isEnableCustomized = "false"
name="dashboard"
ref='dashboard'
@load="dashboard_load($event)"
@closeview="closeView($event)">
</view_dashboard>
</studio-view-style2>
\ No newline at end of file
<template src="./goal-summary-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { GoalSummaryViewBase } from './goal-summary-view-base';
import view_dashboard from '@widgets/goal/goal-info-dashboard/goal-info-dashboard.vue';
/**
* 目标数据看板视图视图
*
* @export
* @class GoalSummaryView
* @extends {GoalSummaryViewBase}
*/
@Component({
components: {
view_dashboard,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
vm.$store.commit('addCurPageViewtag', { route: to, viewtag: vm.viewtag });
});
}
})
@VueLifeCycleProcessing()
export default class GoalSummaryView extends GoalSummaryViewBase { }
</script>
......@@ -2,6 +2,7 @@ export const PageComponents = {
install(Vue: any, opt: any) {
Vue.component('account-gradation', () => import('@pages/base/account-gradation/account-gradation.vue'));
Vue.component('account-quick-create', () => import('@pages/base/account-quick-create/account-quick-create.vue'));
Vue.component('goal-child-goal-grid-view', () => import('@pages/sales/goal-child-goal-grid-view/goal-child-goal-grid-view.vue'));
Vue.component('incident-edit-chlid-incident', () => import('@pages/service/incident-edit-chlid-incident/incident-edit-chlid-incident.vue'));
Vue.component('invoice-info-invoice-view', () => import('@pages/finance/invoice-info-invoice-view/invoice-info-invoice-view.vue'));
Vue.component('product-price-level-pro-prilv-grid-view', () => import('@pages/product/product-price-level-pro-prilv-grid-view/product-price-level-pro-prilv-grid-view.vue'));
......@@ -25,13 +26,14 @@ export const PageComponents = {
Vue.component('contact-info-person', () => import('@pages/base/contact-info-person/contact-info-person.vue'));
Vue.component('invoice-quick-create-view', () => import('@pages/finance/invoice-quick-create-view/invoice-quick-create-view.vue'));
Vue.component('opportunity-competitor-opp-comp-grid-view', () => import('@pages/sales/opportunity-competitor-opp-comp-grid-view/opportunity-competitor-opp-comp-grid-view.vue'));
Vue.component('goal-info-goal-view', () => import('@pages/sales/goal-info-goal-view/goal-info-goal-view.vue'));
Vue.component('campaign-info-schedule', () => import('@pages/marketing/campaign-info-schedule/campaign-info-schedule.vue'));
Vue.component('lead-con-lead-grid-view', () => import('@pages/sales/lead-con-lead-grid-view/lead-con-lead-grid-view.vue'));
Vue.component('sales-order-info-view', () => import('@pages/sales/sales-order-info-view/sales-order-info-view.vue'));
Vue.component('sales-order-detail-edit-view', () => import('@pages/sales/sales-order-detail-edit-view/sales-order-detail-edit-view.vue'));
Vue.component('opportunity-grid-view', () => import('@pages/sales/opportunity-grid-view/opportunity-grid-view.vue'));
Vue.component('goal-info-view', () => import('@pages/sales/goal-info-view/goal-info-view.vue'));
Vue.component('letter-edit-view', () => import('@pages/base/letter-edit-view/letter-edit-view.vue'));
Vue.component('goal-edit-view', () => import('@pages/sales/goal-edit-view/goal-edit-view.vue'));
Vue.component('transaction-currency-pickup-view', () => import('@pages/base/transaction-currency-pickup-view/transaction-currency-pickup-view.vue'));
Vue.component('opportunity-product-edit-view', () => import('@pages/sales/opportunity-product-edit-view/opportunity-product-edit-view.vue'));
Vue.component('incident-summary-view', () => import('@pages/service/incident-summary-view/incident-summary-view.vue'));
......@@ -45,6 +47,7 @@ export const PageComponents = {
Vue.component('quote-info', () => import('@pages/sales/quote-info/quote-info.vue'));
Vue.component('product-info-view', () => import('@pages/product/product-info-view/product-info-view.vue'));
Vue.component('competitor-summary', () => import('@pages/sales/competitor-summary/competitor-summary.vue'));
Vue.component('goal-edit-child-goal-view', () => import('@pages/sales/goal-edit-child-goal-view/goal-edit-child-goal-view.vue'));
Vue.component('ibiz-list-grid-view', () => import('@pages/marketing/ibiz-list-grid-view/ibiz-list-grid-view.vue'));
Vue.component('discount-type-pickup-view', () => import('@pages/sales/discount-type-pickup-view/discount-type-pickup-view.vue'));
Vue.component('product-grid-view', () => import('@pages/product/product-grid-view/product-grid-view.vue'));
......@@ -143,6 +146,7 @@ export const PageComponents = {
Vue.component('lead-info', () => import('@pages/sales/lead-info/lead-info.vue'));
Vue.component('product-pickup-grid-view', () => import('@pages/product/product-pickup-grid-view/product-pickup-grid-view.vue'));
Vue.component('list-lead-quick-create-by-list', () => import('@pages/marketing/list-lead-quick-create-by-list/list-lead-quick-create-by-list.vue'));
Vue.component('goal-summary-view', () => import('@pages/sales/goal-summary-view/goal-summary-view.vue'));
Vue.component('account-info', () => import('@pages/base/account-info/account-info.vue'));
Vue.component('lead-info-detail', () => import('@pages/sales/lead-info-detail/lead-info-detail.vue'));
Vue.component('sales-order-detail-soproduct-grid-view', () => import('@pages/sales/sales-order-detail-soproduct-grid-view/sales-order-detail-soproduct-grid-view.vue'));
......
......@@ -63,6 +63,20 @@ const router = new Router({
},
component: () => import('@pages/base/account-quick-create/account-quick-create.vue'),
},
{
path: 'goals/:goal?/childgoalgridview/:childgoalgridview?',
meta: {
caption: 'entities.goal.views.childgoalgridview.title',
info:'',
parameters: [
{ pathName: 'central', parameterName: 'central' },
{ pathName: 'goals', parameterName: 'goal' },
{ pathName: 'childgoalgridview', parameterName: 'childgoalgridview' },
],
requireAuth: true,
},
component: () => import('@pages/sales/goal-child-goal-grid-view/goal-child-goal-grid-view.vue'),
},
{
path: 'incidents/:incident?/edit_chlidincident/:edit_chlidincident?',
meta: {
......@@ -708,6 +722,20 @@ const router = new Router({
},
component: () => import('@pages/sales/opportunity-competitor-opp-comp-grid-view/opportunity-competitor-opp-comp-grid-view.vue'),
},
{
path: 'goals/:goal?/info_goalview/:info_goalview?',
meta: {
caption: 'entities.goal.views.info_goalview.title',
info:'',
parameters: [
{ pathName: 'central', parameterName: 'central' },
{ pathName: 'goals', parameterName: 'goal' },
{ pathName: 'info_goalview', parameterName: 'info_goalview' },
],
requireAuth: true,
},
component: () => import('@pages/sales/goal-info-goal-view/goal-info-goal-view.vue'),
},
{
path: 'campaigns/:campaign?/info_schedule/:info_schedule?',
meta: {
......@@ -871,32 +899,32 @@ const router = new Router({
component: () => import('@pages/sales/opportunity-grid-view/opportunity-grid-view.vue'),
},
{
path: 'letters/:letter?/editview/:editview?',
path: 'goals/:goal?/infoview/:infoview?',
meta: {
caption: 'entities.letter.views.editview.title',
caption: 'entities.goal.views.infoview.title',
info:'',
parameters: [
{ pathName: 'central', parameterName: 'central' },
{ pathName: 'letters', parameterName: 'letter' },
{ pathName: 'editview', parameterName: 'editview' },
{ pathName: 'goals', parameterName: 'goal' },
{ pathName: 'infoview', parameterName: 'infoview' },
],
requireAuth: true,
},
component: () => import('@pages/base/letter-edit-view/letter-edit-view.vue'),
component: () => import('@pages/sales/goal-info-view/goal-info-view.vue'),
},
{
path: 'goals/:goal?/editview/:editview?',
path: 'letters/:letter?/editview/:editview?',
meta: {
caption: 'entities.goal.views.editview.title',
caption: 'entities.letter.views.editview.title',
info:'',
parameters: [
{ pathName: 'central', parameterName: 'central' },
{ pathName: 'goals', parameterName: 'goal' },
{ pathName: 'letters', parameterName: 'letter' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/sales/goal-edit-view/goal-edit-view.vue'),
component: () => import('@pages/base/letter-edit-view/letter-edit-view.vue'),
},
{
path: 'transactioncurrencies/:transactioncurrency?/pickupview/:pickupview?',
......@@ -1176,6 +1204,20 @@ const router = new Router({
},
component: () => import('@pages/sales/competitor-summary/competitor-summary.vue'),
},
{
path: 'goals/:goal?/edit_childgoalview/:edit_childgoalview?',
meta: {
caption: 'entities.goal.views.edit_childgoalview.title',
info:'',
parameters: [
{ pathName: 'central', parameterName: 'central' },
{ pathName: 'goals', parameterName: 'goal' },
{ pathName: 'edit_childgoalview', parameterName: 'edit_childgoalview' },
],
requireAuth: true,
},
component: () => import('@pages/sales/goal-edit-child-goal-view/goal-edit-child-goal-view.vue'),
},
{
path: 'ibizlists/:ibizlist?/gridview/:gridview?',
meta: {
......@@ -4223,6 +4265,20 @@ const router = new Router({
},
component: () => import('@pages/marketing/list-lead-quick-create-by-list/list-lead-quick-create-by-list.vue'),
},
{
path: 'goals/:goal?/summaryview/:summaryview?',
meta: {
caption: 'entities.goal.views.summaryview.title',
info:'',
parameters: [
{ pathName: 'central', parameterName: 'central' },
{ pathName: 'goals', parameterName: 'goal' },
{ pathName: 'summaryview', parameterName: 'summaryview' },
],
requireAuth: true,
},
component: () => import('@pages/sales/goal-summary-view/goal-summary-view.vue'),
},
{
path: 'accounts/:account?/info/:info?',
meta: {
......
......@@ -607,6 +607,15 @@ export const viewstate: any = {
refviews: [
],
},
{
viewtag: '42dfdbed522e32b0efd03a9402ae29f8',
viewmodule: 'Sales',
viewname: 'GoalInfo_GoalView',
viewaction: '',
viewdatachange: false,
refviews: [
],
},
{
viewtag: '44a690a1d62a390708480cb43f67d98b',
viewmodule: 'Marketing',
......@@ -720,6 +729,17 @@ export const viewstate: any = {
'd8b664607bd727900320b23da3fafaf2',
],
},
{
viewtag: '521acee07c15c72e914d3ca538cb26fc',
viewmodule: 'Sales',
viewname: 'GoalInfoView',
viewaction: '',
viewdatachange: false,
refviews: [
'cb7c18e9af4848f515ab84524fb234b2',
'674522952049a4e85508a1f9f3642d80',
],
},
{
viewtag: '540213698dac06ea2ef3193da7fe9b11',
viewmodule: 'Service',
......@@ -842,7 +862,7 @@ export const viewstate: any = {
viewdatachange: false,
refviews: [
'cab8702dc3d6cc283eb40a1e07fa72ba',
'7877d7e7e55fe21f48e8382e07579f33',
'521acee07c15c72e914d3ca538cb26fc',
],
},
{
......@@ -864,6 +884,16 @@ export const viewstate: any = {
refviews: [
],
},
{
viewtag: '674522952049a4e85508a1f9f3642d80',
viewmodule: 'Sales',
viewname: 'GoalSummaryView',
viewaction: '',
viewdatachange: false,
refviews: [
'42dfdbed522e32b0efd03a9402ae29f8',
],
},
{
viewtag: '688201ee5642d41628dbf4deba002d17',
viewmodule: 'Base',
......@@ -987,15 +1017,6 @@ export const viewstate: any = {
'a5213905238dbc5d8e1a505029105cc9',
],
},
{
viewtag: '7877d7e7e55fe21f48e8382e07579f33',
viewmodule: 'Sales',
viewname: 'GoalEditView',
viewaction: '',
viewdatachange: false,
refviews: [
],
},
{
viewtag: '78862ad65295f145e7520291f1183604',
viewmodule: 'Sales',
......@@ -1285,6 +1306,17 @@ export const viewstate: any = {
'6debde861c6e6f91eeb442cb869e9737',
],
},
{
viewtag: '9be8eab621377b4bb8432a48a3f3f785',
viewmodule: 'Sales',
viewname: 'GoalEdit_ChildGoalView',
viewaction: '',
viewdatachange: false,
refviews: [
'2665d630c1446030eab8f52c5ebca818',
'a17a40c513ec2011425e9d26b6591214',
],
},
{
viewtag: '9bf80730e83a74615919a0f0907505d4',
viewmodule: 'Sales',
......@@ -1718,6 +1750,16 @@ export const viewstate: any = {
'a17a40c513ec2011425e9d26b6591214',
],
},
{
viewtag: 'cb7c18e9af4848f515ab84524fb234b2',
viewmodule: 'Sales',
viewname: 'GoalChildGoalGridView',
viewaction: '',
viewdatachange: false,
refviews: [
'9be8eab621377b4bb8432a48a3f3f785',
],
},
{
viewtag: 'd138851bb39f6334938bb634467dc3cc',
viewmodule: 'Service',
......
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, EditFormControlBase } from '@/studio-core';
import GoalService from '@/service/goal/goal-service';
import Edit_ChildGoalService from './edit-child-goal-form-service';
import { FormButtonModel, FormPageModel, FormItemModel, FormDRUIPartModel, FormPartModel, FormGroupPanelModel, FormIFrameModel, FormRowItemModel, FormTabPageModel, FormTabPanelModel, FormUserControlModel } from '@/model/form-detail';
/**
* form部件基类
*
* @export
* @class EditFormControlBase
* @extends {Edit_ChildGoalEditFormBase}
*/
export class Edit_ChildGoalEditFormBase extends EditFormControlBase {
/**
* 建构部件服务对象
*
* @type {Edit_ChildGoalService}
* @memberof Edit_ChildGoalEditFormBase
*/
public service: Edit_ChildGoalService = new Edit_ChildGoalService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {GoalService}
* @memberof Edit_ChildGoalEditFormBase
*/
public appEntityService: GoalService = new GoalService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof Edit_ChildGoalEditFormBase
*/
protected appDeName: string = 'goal';
/**
* 表单数据对象
*
* @type {*}
* @memberof Edit_ChildGoalEditFormBase
*/
public data: any = {
srfupdatedate: null,
srforikey: null,
srfkey: null,
srfmajortext: null,
srftempmode: null,
srfuf: null,
srfdeid: null,
srfsourcekey: null,
title: null,
parentgoalname: null,
metricname: null,
goalownerid: null,
ownerid: null,
fiscalperiodgoal: null,
fiscalyear: null,
fiscalperiod: null,
goalstartdate: null,
goalenddate: null,
targetmoney: null,
actualmoney: null,
percentage: null,
inprogressmoney: null,
parentgoalid: null,
goalid: null,
metricid: null,
goal:null,
};
/**
* 属性值规则
*
* @type {*}
* @memberof Edit_ChildGoalEditFormBase
*/
public rules: any = {
title: [
{ required: true, type: 'string', message: '名称 值不能为空', trigger: 'change' },
{ required: true, type: 'string', message: '名称 值不能为空', trigger: 'blur' },
],
goalownerid: [
{ required: true, type: 'string', message: '目标负责人 值不能为空', trigger: 'change' },
{ required: true, type: 'string', message: '目标负责人 值不能为空', trigger: 'blur' },
],
ownerid: [
{ required: true, type: 'string', message: '经理 值不能为空', trigger: 'change' },
{ required: true, type: 'string', message: '经理 值不能为空', trigger: 'blur' },
],
}
/**
* 详情模型集合
*
* @type {*}
* @memberof Edit_ChildGoalEditFormBase
*/
public detailsModel: any = {
group1: new FormGroupPanelModel({ caption: '基本信息', detailType: 'GROUPPANEL', name: 'group1', visible: true, isShowCaption: true, form: this, uiActionGroup: { caption: '', langbase: 'entities.goal.edit_childgoal_form', extractMode: 'ITEM', details: [] } }),
grouppanel2: new FormGroupPanelModel({ caption: '分组面板', detailType: 'GROUPPANEL', name: 'grouppanel2', visible: false, isShowCaption: false, form: this, uiActionGroup: { caption: '', langbase: 'entities.goal.edit_childgoal_form', extractMode: 'ITEM', details: [] } }),
grouppanel3: new FormGroupPanelModel({ caption: '分组面板', detailType: 'GROUPPANEL', name: 'grouppanel3', visible: false, isShowCaption: false, form: this, uiActionGroup: { caption: '', langbase: 'entities.goal.edit_childgoal_form', extractMode: 'ITEM', details: [] } }),
grouppanel1: new FormGroupPanelModel({ caption: '时间段', detailType: 'GROUPPANEL', name: 'grouppanel1', visible: true, isShowCaption: true, form: this, uiActionGroup: { caption: '', langbase: 'entities.goal.edit_childgoal_form', extractMode: 'ITEM', details: [] } }),
grouppanel4: new FormGroupPanelModel({ caption: '详细信息', detailType: 'GROUPPANEL', name: 'grouppanel4', visible: true, isShowCaption: true, form: this, uiActionGroup: { caption: '', langbase: 'entities.goal.edit_childgoal_form', extractMode: 'ITEM', details: [] } }),
formpage1: new FormPageModel({ caption: '基本信息', detailType: 'FORMPAGE', name: 'formpage1', visible: true, isShowCaption: true, form: this }),
srfupdatedate: new FormItemModel({ caption: '更新时间', detailType: 'FORMITEM', name: 'srfupdatedate', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 0 }),
srforikey: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srforikey', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
srfkey: new FormItemModel({ caption: '目标', detailType: 'FORMITEM', name: 'srfkey', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 1 }),
srfmajortext: new FormItemModel({ caption: '名称', detailType: 'FORMITEM', name: 'srfmajortext', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
srftempmode: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srftempmode', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
srfuf: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfuf', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
srfdeid: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfdeid', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
srfsourcekey: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfsourcekey', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
title: new FormItemModel({ caption: '名称', detailType: 'FORMITEM', name: 'title', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
parentgoalname: new FormItemModel({ caption: '上级目标', detailType: 'FORMITEM', name: 'parentgoalname', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
metricname: new FormItemModel({ caption: '目标度量', detailType: 'FORMITEM', name: 'metricname', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
goalownerid: new FormItemModel({ caption: '目标负责人', detailType: 'FORMITEM', name: 'goalownerid', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
ownerid: new FormItemModel({ caption: '经理', detailType: 'FORMITEM', name: 'ownerid', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
fiscalperiodgoal: new FormItemModel({ caption: '目标期间类型', detailType: 'FORMITEM', name: 'fiscalperiodgoal', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
fiscalyear: new FormItemModel({ caption: '会计年度', detailType: 'FORMITEM', name: 'fiscalyear', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
fiscalperiod: new FormItemModel({ caption: '会计期间', detailType: 'FORMITEM', name: 'fiscalperiod', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
goalstartdate: new FormItemModel({ caption: '从', detailType: 'FORMITEM', name: 'goalstartdate', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
goalenddate: new FormItemModel({ caption: '到', detailType: 'FORMITEM', name: 'goalenddate', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
targetmoney: new FormItemModel({ caption: '目标值(金额)', detailType: 'FORMITEM', name: 'targetmoney', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
actualmoney: new FormItemModel({ caption: '实际值(金额)', detailType: 'FORMITEM', name: 'actualmoney', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
percentage: new FormItemModel({ caption: '已实现百分比', detailType: 'FORMITEM', name: 'percentage', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
inprogressmoney: new FormItemModel({ caption: '过程值(金额)', detailType: 'FORMITEM', name: 'inprogressmoney', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
parentgoalid: new FormItemModel({ caption: '上级目标', detailType: 'FORMITEM', name: 'parentgoalid', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
goalid: new FormItemModel({ caption: '目标', detailType: 'FORMITEM', name: 'goalid', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 1 }),
metricid: new FormItemModel({ caption: '目标度量', detailType: 'FORMITEM', name: 'metricid', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
};
/**
* 表单逻辑
*
* @param {{ name: string, newVal: any, oldVal: any }} { name, newVal, oldVal }
* @memberof Edit_ChildGoalEditFormBase
*/
public formLogic({ name, newVal, oldVal }: { name: string, newVal: any, oldVal: any }): void {
if (Object.is(name, '') || Object.is(name, 'fiscalperiodgoal')) {
let ret = false;
const _fiscalperiodgoal = this.data.fiscalperiodgoal;
if (this.$verify.testCond(_fiscalperiodgoal, 'EQ', '')) {
ret = true;
}
this.detailsModel.grouppanel2.setVisible(ret);
}
if (Object.is(name, '') || Object.is(name, 'fiscalperiodgoal')) {
let ret = false;
const _fiscalperiodgoal = this.data.fiscalperiodgoal;
if (this.$verify.testCond(_fiscalperiodgoal, 'EQ', '0')) {
ret = true;
}
this.detailsModel.grouppanel3.setVisible(ret);
}
}
}
\ No newline at end of file
/**
* Edit_ChildGoal 部件模型
*
* @export
* @class Edit_ChildGoalModel
*/
export default class Edit_ChildGoalModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof Edit_ChildGoalModel
*/
public getDataItems(): any[] {
return [
{
name: 'srfwfmemo',
prop: 'srfwfmemo',
dataType: 'TEXT',
},
// 前端新增修改标识,新增为"0",修改为"1"或未设值
{
name: 'srffrontuf',
prop: 'srffrontuf',
dataType: 'TEXT',
},
{
name: 'srfupdatedate',
prop: 'updatedate',
dataType: 'DATETIME',
},
{
name: 'srforikey',
},
{
name: 'srfkey',
prop: 'goalid',
dataType: 'GUID',
},
{
name: 'srfmajortext',
prop: 'title',
dataType: 'TEXT',
},
{
name: 'srftempmode',
},
{
name: 'srfuf',
},
{
name: 'srfdeid',
},
{
name: 'srfsourcekey',
},
{
name: 'title',
prop: 'title',
dataType: 'TEXT',
},
{
name: 'parentgoalname',
prop: 'parentgoalname',
dataType: 'PICKUPTEXT',
},
{
name: 'metricname',
prop: 'metricname',
dataType: 'PICKUPTEXT',
},
{
name: 'goalownerid',
prop: 'goalownerid',
dataType: 'TEXT',
},
{
name: 'ownerid',
prop: 'ownerid',
dataType: 'TEXT',
},
{
name: 'fiscalperiodgoal',
prop: 'fiscalperiodgoal',
dataType: 'YESNO',
},
{
name: 'fiscalyear',
prop: 'fiscalyear',
dataType: 'SSCODELIST',
},
{
name: 'fiscalperiod',
prop: 'fiscalperiod',
dataType: 'SSCODELIST',
},
{
name: 'goalstartdate',
prop: 'goalstartdate',
dataType: 'DATETIME',
},
{
name: 'goalenddate',
prop: 'goalenddate',
dataType: 'DATETIME',
},
{
name: 'targetmoney',
prop: 'targetmoney',
dataType: 'BIGDECIMAL',
},
{
name: 'actualmoney',
prop: 'actualmoney',
dataType: 'BIGDECIMAL',
},
{
name: 'percentage',
prop: 'percentage',
dataType: 'BIGDECIMAL',
},
{
name: 'inprogressmoney',
prop: 'inprogressmoney',
dataType: 'BIGDECIMAL',
},
{
name: 'parentgoalid',
prop: 'parentgoalid',
dataType: 'PICKUP',
},
{
name: 'goalid',
prop: 'goalid',
dataType: 'GUID',
},
{
name: 'metricid',
prop: 'metricid',
dataType: 'PICKUP',
},
{
name: 'goal',
prop: 'goalid',
dataType: 'FONTKEY',
},
]
}
}
\ No newline at end of file
import { Http,Util,Errorlog } from '@/utils';
import ControlService from '@/widgets/control-service';
import GoalService from '@/service/goal/goal-service';
import Edit_ChildGoalModel from './edit-child-goal-form-model';
import MetricService from '@/service/metric/metric-service';
/**
* Edit_ChildGoal 部件服务对象
*
* @export
* @class Edit_ChildGoalService
*/
export default class Edit_ChildGoalService extends ControlService {
/**
* 目标服务对象
*
* @type {GoalService}
* @memberof Edit_ChildGoalService
*/
public appEntityService: GoalService = new GoalService({ $store: this.getStore() });
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof Edit_ChildGoalService
*/
public setTempMode(){
this.isTempMode = false;
}
/**
* Creates an instance of Edit_ChildGoalService.
*
* @param {*} [opts={}]
* @memberof Edit_ChildGoalService
*/
constructor(opts: any = {}) {
super(opts);
this.model = new Edit_ChildGoalModel();
}
/**
* 目标度量服务对象
*
* @type {MetricService}
* @memberof Edit_ChildGoalService
*/
public metricService: MetricService = new MetricService();
/**
* 处理数据
*
* @private
* @param {Promise<any>} promise
* @returns {Promise<any>}
* @memberof Edit_ChildGoalService
*/
private doItems(promise: Promise<any>, deKeyField: string, deName: string): Promise<any> {
return new Promise((resolve, reject) => {
promise.then((response: any) => {
if (response && response.status === 200) {
const data = response.data;
data.forEach((item:any,index:number) =>{
item[deName] = item[deKeyField];
data[index] = item;
});
resolve(data);
} else {
reject([])
}
}).catch((response: any) => {
reject([])
});
});
}
/**
* 获取跨实体数据集合
*
* @param {string} serviceName 服务名称
* @param {string} interfaceName 接口名称
* @param {*} data
* @param {boolean} [isloading]
* @returns {Promise<any[]>}
* @memberof Edit_ChildGoalService
*/
@Errorlog
public getItems(serviceName: string, interfaceName: string, context: any = {}, data: any, isloading?: boolean): Promise<any[]> {
if (Object.is(serviceName, 'GoalService') && Object.is(interfaceName, 'FetchDefault')) {
return this.doItems(this.appEntityService.FetchDefault(JSON.parse(JSON.stringify(context)), data, isloading), 'goalid', 'goal');
}
if (Object.is(serviceName, 'MetricService') && Object.is(interfaceName, 'FetchDefault')) {
return this.doItems(this.metricService.FetchDefault(JSON.parse(JSON.stringify(context)),data, isloading), 'metricid', 'metric');
}
return Promise.reject([])
}
/**
* 启动工作流
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof Edit_ChildGoalService
*/
@Errorlog
public wfstart(action: string,context: any = {},data: any = {}, isloading?: boolean,localdata?:any): Promise<any> {
data = this.handleWFData(data);
context = this.handleRequestData(action,context,data).context;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](context,data, isloading,localdata);
} else {
result = this.appEntityService.WFStart(context,data, isloading,localdata);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 提交工作流
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof Edit_ChildGoalService
*/
@Errorlog
public wfsubmit(action: string,context: any = {}, data: any = {}, isloading?: boolean,localdata?:any): Promise<any> {
data = this.handleWFData(data,true);
context = this.handleRequestData(action,context,data,true).context;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](context,data, isloading,localdata);
} else {
result = this.appEntityService.WFSubmit(context,data, isloading,localdata);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 添加数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof Edit_ChildGoalService
*/
@Errorlog
public add(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Create(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 删除数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof Edit_ChildGoalService
*/
@Errorlog
public delete(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Remove(Context,Data, isloading);
}
result.then((response) => {
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 修改数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof Edit_ChildGoalService
*/
@Errorlog
public update(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Update(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 查询数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof Edit_ChildGoalService
*/
@Errorlog
public get(action: string,context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Get(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 加载草稿
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof Edit_ChildGoalService
*/
@Errorlog
public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
//仿真主键数据
const PrimaryKey = Util.createUUID();
Data.goalid = PrimaryKey;
Data.goal = PrimaryKey;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.GetDraft(Context,Data, isloading);
}
result.then((response) => {
response.data.goalid = PrimaryKey;
this.handleResponse(action, response, true);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 前台逻辑
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof Edit_ChildGoalService
*/
@Errorlog
public frontLogic(action:string,context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any)=>{
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
return Promise.reject({ status: 500, data: { title: '失败', message: '系统异常' } });
}
result.then((response) => {
this.handleResponse(action, response,true);
resolve(response);
}).catch(response => {
reject(response);
});
})
}
/**
* 处理请求数据
*
* @param action 行为
* @param data 数据
* @memberof Edit_ChildGoalService
*/
public handleRequestData(action: string,context:any, data: any = {},isMerge:boolean = false){
let mode: any = this.getMode();
if (!mode && mode.getDataItems instanceof Function) {
return data;
}
let formItemItems: any[] = mode.getDataItems();
let requestData:any = {};
if(isMerge && (data && data.viewparams)){
Object.assign(requestData,data.viewparams);
}
formItemItems.forEach((item:any) =>{
if(item && item.dataType && Object.is(item.dataType,'FONTKEY')){
if(item && item.prop){
requestData[item.prop] = context[item.name];
}
}else{
if(item && item.prop){
requestData[item.prop] = data[item.name];
}
}
});
let tempContext:any = JSON.parse(JSON.stringify(context));
if(tempContext && tempContext.srfsessionid){
tempContext.srfsessionkey = tempContext.srfsessionid;
delete tempContext.srfsessionid;
}
return {context:tempContext,data:requestData};
}
}
\ No newline at end of file
<i-form :model="this.data" class='app-form' ref='form' id='goal_edit_childgoal' style="">
<input style="display:none;" />
<row >
<i-col v-show="detailsModel.group1.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-group layoutType="TABLE_24COL" titleStyle="" class='' :uiActionGroup="detailsModel.group1.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="$t('entities.goal.edit_childgoal_form.details.group1')" :isShowCaption="true" uiStyle="DEFAULT" :titleBarCloseMode="1" :isInfoGroupMode="false" >
<row>
<i-col v-show="detailsModel.title.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='title' :itemRules="this.rules.title" class='' :caption="$t('entities.goal.edit_childgoal_form.details.title')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.title.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.title" @enter="onEnter($event)" unit="" :disabled="detailsModel.title.disabled" type='text' style=""></input-box>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.parentgoalname.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='parentgoalname' :itemRules="this.rules.parentgoalname" class='' :caption="$t('entities.goal.edit_childgoal_form.details.parentgoalname')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.parentgoalname.error" :isEmptyCaption="false" labelPos="LEFT">
<app-picker
:formState="formState"
:data="data"
:context="context"
:viewparams="viewparams"
:localContext ='{ }'
:localParam ='{ }'
:disabled="detailsModel.parentgoalname.disabled"
name='parentgoalname'
deMajorField='title'
deKeyField='goal'
:service="service"
:acParams="{ serviceName: 'GoalService', interfaceName: 'FetchDefault'}"
valueitem='parentgoalid'
:value="data.parentgoalname"
editortype=""
:pickupView="{ viewname: 'goal-pickup-view', title: $t('entities.goal.views.pickupview.title'), deResParameters: [], parameters: [{ pathName: 'goals', parameterName: 'goal' }, { pathName: 'pickupview', parameterName: 'pickupview' } ], placement:'' }"
style=""
@formitemvaluechange="onFormItemValueChange($event)">
</app-picker>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.metricname.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='metricname' :itemRules="this.rules.metricname" class='' :caption="$t('entities.goal.edit_childgoal_form.details.metricname')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.metricname.error" :isEmptyCaption="false" labelPos="LEFT">
<app-picker
:formState="formState"
:data="data"
:context="context"
:viewparams="viewparams"
:localContext ='{ }'
:localParam ='{ }'
:disabled="detailsModel.metricname.disabled"
name='metricname'
deMajorField='metricname'
deKeyField='metric'
:service="service"
:acParams="{ serviceName: 'MetricService', interfaceName: 'FetchDefault'}"
valueitem='metricid'
:value="data.metricname"
editortype=""
:pickupView="{ viewname: 'metric-pickup-view', title: $t('entities.metric.views.pickupview.title'), deResParameters: [], parameters: [{ pathName: 'metrics', parameterName: 'metric' }, { pathName: 'pickupview', parameterName: 'pickupview' } ], placement:'' }"
style=""
@formitemvaluechange="onFormItemValueChange($event)">
</app-picker>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.goalownerid.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='goalownerid' :itemRules="this.rules.goalownerid" class='' :caption="$t('entities.goal.edit_childgoal_form.details.goalownerid')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.goalownerid.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.goalownerid" @enter="onEnter($event)" unit="" :disabled="detailsModel.goalownerid.disabled" type='text' style=""></input-box>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.ownerid.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='ownerid' :itemRules="this.rules.ownerid" class='' :caption="$t('entities.goal.edit_childgoal_form.details.ownerid')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.ownerid.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.ownerid" @enter="onEnter($event)" unit="" :disabled="detailsModel.ownerid.disabled" type='text' style=""></input-box>
</app-form-item>
</i-col>
</row>
</app-form-group>
</i-col>
<i-col v-show="detailsModel.grouppanel1.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-group layoutType="TABLE_24COL" titleStyle="" class='' :uiActionGroup="detailsModel.grouppanel1.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="$t('entities.goal.edit_childgoal_form.details.grouppanel1')" :isShowCaption="true" uiStyle="DEFAULT" :titleBarCloseMode="1" :isInfoGroupMode="false" >
<row>
<i-col v-show="detailsModel.fiscalperiodgoal.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='fiscalperiodgoal' :itemRules="this.rules.fiscalperiodgoal" class='' :caption="$t('entities.goal.edit_childgoal_form.details.fiscalperiodgoal')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.fiscalperiodgoal.error" :isEmptyCaption="false" labelPos="LEFT">
<dropdown-list
v-model="data.fiscalperiodgoal"
:data="data"
:context="context"
:viewparams="viewparams"
:localContext ='{ }'
:localParam ='{ }'
:disabled="detailsModel.fiscalperiodgoal.disabled"
style="width:100px;width: 100px;"
tag='YesNo'
codelistType='STATIC'
placeholder='请选择...'>
</dropdown-list>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.grouppanel2.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-group layoutType="TABLE_24COL" titleStyle="" class='' :uiActionGroup="detailsModel.grouppanel2.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="$t('entities.goal.edit_childgoal_form.details.grouppanel2')" :isShowCaption="false" uiStyle="DEFAULT" :titleBarCloseMode="0" :isInfoGroupMode="false" >
<row>
<i-col v-show="detailsModel.fiscalyear.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='fiscalyear' :itemRules="this.rules.fiscalyear" class='' :caption="$t('entities.goal.edit_childgoal_form.details.fiscalyear')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.fiscalyear.error" :isEmptyCaption="false" labelPos="LEFT">
<dropdown-list
v-model="data.fiscalyear"
:data="data"
:context="context"
:viewparams="viewparams"
:localContext ='{ }'
:localParam ='{ }'
:disabled="detailsModel.fiscalyear.disabled"
tag='Goal__FiscalYear'
codelistType='STATIC'
placeholder='请选择...' style="">
</dropdown-list>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.fiscalperiod.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='fiscalperiod' :itemRules="this.rules.fiscalperiod" class='' :caption="$t('entities.goal.edit_childgoal_form.details.fiscalperiod')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.fiscalperiod.error" :isEmptyCaption="false" labelPos="LEFT">
<dropdown-list
v-model="data.fiscalperiod"
:data="data"
:context="context"
:viewparams="viewparams"
:localContext ='{ }'
:localParam ='{ }'
:disabled="detailsModel.fiscalperiod.disabled"
tag='Goal__FiscalPeriod'
codelistType='STATIC'
placeholder='请选择...' style="">
</dropdown-list>
</app-form-item>
</i-col>
</row>
</app-form-group>
</i-col>
<i-col v-show="detailsModel.grouppanel3.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-group layoutType="TABLE_24COL" titleStyle="" class='' :uiActionGroup="detailsModel.grouppanel3.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="$t('entities.goal.edit_childgoal_form.details.grouppanel3')" :isShowCaption="false" uiStyle="DEFAULT" :titleBarCloseMode="0" :isInfoGroupMode="false" >
<row>
<i-col v-show="detailsModel.goalstartdate.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='goalstartdate' :itemRules="this.rules.goalstartdate" class='' :caption="$t('entities.goal.edit_childgoal_form.details.goalstartdate')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.goalstartdate.error" :isEmptyCaption="false" labelPos="LEFT">
<date-picker type="datetime" :transfer="true" format="yyyy-MM-dd HH:mm:ss" placeholder="请选择时间..." :value="data.goalstartdate" :disabled="detailsModel.goalstartdate.disabled" style="min-width: 150px; width:160px;" @on-change="(val1, val2) => { this.data.goalstartdate = val1 }"></date-picker>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.goalenddate.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='goalenddate' :itemRules="this.rules.goalenddate" class='' :caption="$t('entities.goal.edit_childgoal_form.details.goalenddate')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.goalenddate.error" :isEmptyCaption="false" labelPos="LEFT">
<date-picker type="datetime" :transfer="true" format="yyyy-MM-dd HH:mm:ss" placeholder="请选择时间..." :value="data.goalenddate" :disabled="detailsModel.goalenddate.disabled" style="min-width: 150px; width:160px;" @on-change="(val1, val2) => { this.data.goalenddate = val1 }"></date-picker>
</app-form-item>
</i-col>
</row>
</app-form-group>
</i-col>
</row>
</app-form-group>
</i-col>
<i-col v-show="detailsModel.grouppanel4.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-group layoutType="TABLE_24COL" titleStyle="" class='' :uiActionGroup="detailsModel.grouppanel4.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="$t('entities.goal.edit_childgoal_form.details.grouppanel4')" :isShowCaption="true" uiStyle="DEFAULT" :titleBarCloseMode="1" :isInfoGroupMode="false" >
<row>
<i-col v-show="detailsModel.targetmoney.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='targetmoney' :itemRules="this.rules.targetmoney" class='' :caption="$t('entities.goal.edit_childgoal_form.details.targetmoney')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.targetmoney.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.targetmoney" @enter="onEnter($event)" unit="" :disabled="detailsModel.targetmoney.disabled" type='number' style=""></input-box>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.actualmoney.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='actualmoney' :itemRules="this.rules.actualmoney" class='' :caption="$t('entities.goal.edit_childgoal_form.details.actualmoney')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.actualmoney.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.actualmoney" @enter="onEnter($event)" unit="" :disabled="detailsModel.actualmoney.disabled" type='number' style=""></input-box>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.percentage.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='percentage' :itemRules="this.rules.percentage" class='' :caption="$t('entities.goal.edit_childgoal_form.details.percentage')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.percentage.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.percentage" @enter="onEnter($event)" unit="" :disabled="detailsModel.percentage.disabled" type='number' style=""></input-box>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.inprogressmoney.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='inprogressmoney' :itemRules="this.rules.inprogressmoney" class='' :caption="$t('entities.goal.edit_childgoal_form.details.inprogressmoney')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.inprogressmoney.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.inprogressmoney" @enter="onEnter($event)" unit="" :disabled="detailsModel.inprogressmoney.disabled" type='number' style=""></input-box>
</app-form-item>
</i-col>
</row>
</app-form-group>
</i-col>
</row>
</i-form>
\ No newline at end of file
<template src="./edit-child-goal-form.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { Edit_ChildGoalEditFormBase } from './edit-child-goal-form-base';
/**
* form部件
*
* @export
* @class Edit_ChildGoalEditForm
* @extends {Edit_ChildGoalEditFormBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class Edit_ChildGoalEditForm extends Edit_ChildGoalEditFormBase { }
</script>
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, MainControlBase } from '@/studio-core';
import GoalService from '@/service/goal/goal-service';
import GoalInfoService from './goal-info-dashboard-service';
import UtilService from '@/utilservice/util-service';
/**
* dashboard部件基类
*
* @export
* @class MainControlBase
* @extends {GoalInfoDashboardBase}
*/
export class GoalInfoDashboardBase extends MainControlBase {
/**
* 建构部件服务对象
*
* @type {GoalInfoService}
* @memberof GoalInfoDashboardBase
*/
public service: GoalInfoService = new GoalInfoService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {GoalService}
* @memberof GoalInfoDashboardBase
*/
public appEntityService: GoalService = new GoalService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof GoalInfoDashboardBase
*/
protected appDeName: string = 'goal';
/**
* 是否支持看板定制
*
* @public
* @type {(boolean)}
* @memberof GoalInfo
*/
@Prop() public isEnableCustomized!:boolean;
/**
* 是否已有看板定制
*
* @public
* @type {(boolean)}
* @memberof GoalInfo
*/
public isHasCustomized:boolean = false;
/**
* 模型数据
*
* @public
* @type {(*)}
* @memberof GoalInfo
*/
public modelDta:any;
/**
* modleId
*
* @type {string}
* @memberof GoalInfo
*/
public modelId:string = "dashboard_goal_goalinfo";
/**
* 建构功能服务对象
*
* @type {UtilService}
* @memberof GoalInfo
*/
public utilService:UtilService = new UtilService();
/**
* 功能服务名称
*
* @type {string}
* @memberof GoalInfo
*/
public utilServiceName:string = "";
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof GoalInfo
*/
public getDatas(): any[] {
return [];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof GoalInfo
*/
public getData(): any {
return {};
}
/**
* vue 生命周期
*
* @memberof GoalInfo
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof GoalInfo
*/
public afterCreated(){
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
return;
}
if (Object.is('load', action)) {
this.loadModel();
}
});
}
}
/**
* 动态设计水平列数
*
* @memberof GoalInfo
*/
public layoutColNum:number = 12;
/**
* 动态设计单元格高度,80px
*
* @memberof GoalInfo
*/
public layoutRowH:number = 80;
/**
* 通知状态
*
* @memberof GoalInfo
*/
public notifyState(){
this.$nextTick(() =>{
if (this.isHasCustomized) {
if (this.modelDta && this.modelDta.length > 0) {
this.modelDta.forEach((item: any) => {
this.viewState.next({
tag: item.portletCodeName,
action: "load",
data: JSON.parse(JSON.stringify(this.viewparams))
});
});
}
} else {
if (this.viewState) {
const refs: any = this.$refs;
Object.keys(refs).forEach((name: string) => {
this.viewState.next({
tag: name,
action: "load",
data: JSON.parse(JSON.stringify(this.viewparams))
});
});
}
}
})
}
/**
* 加载布局与数据模型
*
* @memberof GoalInfo
*/
public loadModel(){
if(this.isEnableCustomized){
this.utilService.getService(this.utilServiceName).then((service:any) =>{
service.loadModelData(JSON.parse(JSON.stringify(this.context)),{modelid:this.modelId,utilServiceName:this.utilServiceName}).then((res:any) =>{
if(res && res.status == 200){
const data:any = res.data;
if(data && data.length >0){
this.isHasCustomized = true;
this.modelDta = data;
this.$forceUpdate();
}else{
this.isHasCustomized = false;
}
this.notifyState();
}else{
console.error("加载面板模型异常");
this.isHasCustomized = false;
this.notifyState();
}
}).catch((error:any)=>{
console.error("加载面板模型异常");
console.error(error);
this.isHasCustomized = false;
this.notifyState();
});
})
}else{
this.notifyState();
}
}
/**
* 处理私人定制按钮
*
* @memberof GoalInfo
*/
public handleClick(){
const view:any ={
viewname: 'app-portal-design',
title: '面板设计',
width: 1600,
placement: 'DRAWER_RIGHT'
}
const viewparam:any ={
modelid:this.modelId,
utilServiceName:this.utilServiceName,
appdeName:'Goal'
}
const appdrawer = this.$appdrawer.openDrawer(view, JSON.parse(JSON.stringify(this.context)), viewparam);
appdrawer.subscribe((result: any) => {
if(Object.is(result.ret,'OK')){
this.loadModel();
}
});
}
/**
* vue 生命周期
*
* @memberof GoalInfo
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof GoalInfo
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
}
\ No newline at end of file
/**
* GoalInfo 部件模型
*
* @export
* @class GoalInfoModel
*/
export default class GoalInfoModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof GoalInfoModel
*/
public getDataItems(): any[] {
return [
{
name: 'inprogressdecimal',
},
{
name: 'goal',
prop: 'goalid',
},
{
name: 'stretchtargetmoney',
},
{
name: 'actualdecimal',
},
{
name: 'computedtargetasoftodayinteger',
},
{
name: 'timezoneruleversionnumber',
},
{
name: 'exchangerate',
},
{
name: 'entityimageid',
},
{
name: 'targetinteger',
},
{
name: 'customrollupfieldmoney_base',
},
{
name: 'entityimage_url',
},
{
name: 'actualmoney_base',
},
{
name: 'utcconversiontimezonecode',
},
{
name: 'inprogressinteger',
},
{
name: 'statecode',
},
{
name: 'targetmoney_base',
},
{
name: 'inprogressstring',
},
{
name: 'entityimage_timestamp',
},
{
name: 'goalstartdate',
},
{
name: 'percentage',
},
{
name: 'ownerid',
},
{
name: 'goalowneridyominame',
},
{
name: 'targetdecimal',
},
{
name: 'amount',
},
{
name: 'statuscode',
},
{
name: 'amountdatatype',
},
{
name: 'customrollupfieldinteger',
},
{
name: 'owneridtype',
},
{
name: 'updatedate',
},
{
name: 'inprogressmoney',
},
{
name: 'fiscalyear',
},
{
name: 'fiscalperiod',
},
{
name: 'title',
},
{
name: 'stretchtargetdecimal',
},
{
name: 'customrollupfielddecimal',
},
{
name: 'consideronlygoalownersrecords',
},
{
name: 'overriddencreatedon',
},
{
name: 'actualmoney',
},
{
name: 'rolluponlyfromchildgoals',
},
{
name: 'goalenddate',
},
{
name: 'createdate',
},
{
name: 'customrollupfieldmoney',
},
{
name: 'rolluperrorcode',
},
{
name: 'versionnumber',
},
{
name: 'stretchtargetmoney_base',
},
{
name: 'treeid',
},
{
name: 'entityimage',
},
{
name: 'stretchtargetstring',
},
{
name: 'stretchtargetinteger',
},
{
name: 'fiscalperiodgoal',
},
{
name: 'inprogressmoney_base',
},
{
name: 'overridden',
},
{
name: 'actualstring',
},
{
name: 'actualinteger',
},
{
name: 'goalowneridtype',
},
{
name: 'importsequencenumber',
},
{
name: 'goalownerid',
},
{
name: 'computedtargetasoftodaydecimal',
},
{
name: 'createman',
},
{
name: 'targetstring',
},
{
name: 'customrollupfieldstring',
},
{
name: 'targetmoney',
},
{
name: 'lastrolledupdate',
},
{
name: 'updateman',
},
{
name: 'override',
},
{
name: 'computedtargetasoftodaymoney',
},
{
name: 'owneridyominame',
},
{
name: 'parentgoalid',
},
{
name: 'rollupqueryinprogressmoneyid',
},
{
name: 'rollupquerycustommoneyid',
},
{
name: 'rollupqueryinprogressintegerid',
},
{
name: 'rollupquerycustomdecimalid',
},
{
name: 'rollupqueryactualmoneyid',
},
{
name: 'rollupquerycustomintegerid',
},
{
name: 'goalwitherrorid',
},
{
name: 'metricid',
},
{
name: 'rollupqueryinprogressdecimalid',
},
{
name: 'rollupqueryactualintegerid',
},
{
name: 'rollupqueryactualdecimalid',
},
{
name: 'parentgoalname',
},
{
name: 'metricname',
},
]
}
}
\ No newline at end of file
import { Http } from '@/utils';
import ControlService from '@/widgets/control-service';
/**
* GoalInfo 部件服务对象
*
* @export
* @class GoalInfoService
*/
export default class GoalInfoService extends ControlService {
}
\ No newline at end of file
<div class='dashboard'>
<row v-if="isEnableCustomized">
<app-build @handleClick="handleClick.apply(_self, arguments)"></app-build>
</row>
<row v-if="!isHasCustomized">
<i-col :md="{ span: 24, offset: 0 }">
<card class="portlet-card" :bordered="false" dis-hover :padding="0">
<span>
<div class='portlet-container summary-viewdashboard-container1 portlet-container-no-border' :style="{}">
<row>
<i-col :md="{ span: 24, offset: 0 }">
<div class="portlet-without-title">
<card class="portlet-card" :bordered="false" dis-hover :padding="0">
<span>
<view_dashboard_sysportlet1
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:height="0"
:width="0"
name="dashboard_sysportlet1"
ref='dashboard_sysportlet1'
@closeview="closeView($event)">
</view_dashboard_sysportlet1>
</span>
</card>
</div>
</i-col>
</row>
</div>
</span>
</card>
</i-col>
</row>
<row v-if="isHasCustomized" style="width: 100%;min-height: calc(100% - 40px);">
<div class="portlet-container" style="position: relative;width:100%;">
<template v-for="(item, index) of modelDta">
<div :key="index" :style="{zIndex: 10, position: 'absolute', height: item.h*layoutRowH + 'px', width: `calc(100% / ${layoutColNum} * ${item.w})`,top: item.y*layoutRowH + 'px', left: `calc(100% / ${layoutColNum} * ${item.x})`}">
<component :key="$util.createUUID()" :is="item.componentName" :name="item.portletCodeName" :context="JSON.parse(JSON.stringify(context))" :viewDefaultUsage="false" :isAdaptiveSize="true" :viewState="viewState"></component>
</div>
</template>
</div>
</row>
</div>
\ No newline at end of file
<template src="./goal-info-dashboard.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { GoalInfoDashboardBase } from './goal-info-dashboard-base';
import view_dashboard_sysportlet1 from '@widgets/goal/view-goal-info-portlet/view-goal-info-portlet.vue';
/**
* dashboard部件
*
* @export
* @class GoalInfoDashboard
* @extends {GoalInfoDashboardBase}
*/
@Component({
components: {
view_dashboard_sysportlet1,
}
})
@VueLifeCycleProcessing()
export default class GoalInfoDashboard extends GoalInfoDashboardBase { }
</script>
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, EditFormControlBase } from '@/studio-core';
import GoalService from '@/service/goal/goal-service';
import Info_GoalService from './info-goal-form-service';
import { FormButtonModel, FormPageModel, FormItemModel, FormDRUIPartModel, FormPartModel, FormGroupPanelModel, FormIFrameModel, FormRowItemModel, FormTabPageModel, FormTabPanelModel, FormUserControlModel } from '@/model/form-detail';
/**
* form部件基类
*
* @export
* @class EditFormControlBase
* @extends {Info_GoalEditFormBase}
*/
export class Info_GoalEditFormBase extends EditFormControlBase {
/**
* 建构部件服务对象
*
* @type {Info_GoalService}
* @memberof Info_GoalEditFormBase
*/
public service: Info_GoalService = new Info_GoalService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {GoalService}
* @memberof Info_GoalEditFormBase
*/
public appEntityService: GoalService = new GoalService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof Info_GoalEditFormBase
*/
protected appDeName: string = 'goal';
/**
* 表单数据对象
*
* @type {*}
* @memberof Info_GoalEditFormBase
*/
public data: any = {
srfupdatedate: null,
srforikey: null,
srfkey: null,
srfmajortext: null,
srftempmode: null,
srfuf: null,
srfdeid: null,
srfsourcekey: null,
title: null,
parentgoalname: null,
metricname: null,
goalownerid: null,
ownerid: null,
fiscalperiodgoal: null,
fiscalyear: null,
fiscalperiod: null,
goalstartdate: null,
goalenddate: null,
targetmoney: null,
actualmoney: null,
percentage: null,
inprogressmoney: null,
goalid: null,
goal:null,
};
/**
* 属性值规则
*
* @type {*}
* @memberof Info_GoalEditFormBase
*/
public rules: any = {
}
/**
* 详情模型集合
*
* @type {*}
* @memberof Info_GoalEditFormBase
*/
public detailsModel: any = {
group1: new FormGroupPanelModel({ caption: '基本信息', detailType: 'GROUPPANEL', name: 'group1', visible: true, isShowCaption: true, form: this, uiActionGroup: { caption: '', langbase: 'entities.goal.info_goal_form', extractMode: 'ITEM', details: [] } }),
grouppanel2: new FormGroupPanelModel({ caption: '分组面板', detailType: 'GROUPPANEL', name: 'grouppanel2', visible: false, isShowCaption: false, form: this, uiActionGroup: { caption: '', langbase: 'entities.goal.info_goal_form', extractMode: 'ITEM', details: [] } }),
grouppanel3: new FormGroupPanelModel({ caption: '分组面板', detailType: 'GROUPPANEL', name: 'grouppanel3', visible: false, isShowCaption: false, form: this, uiActionGroup: { caption: '', langbase: 'entities.goal.info_goal_form', extractMode: 'ITEM', details: [] } }),
grouppanel1: new FormGroupPanelModel({ caption: '时间段', detailType: 'GROUPPANEL', name: 'grouppanel1', visible: true, isShowCaption: true, form: this, uiActionGroup: { caption: '', langbase: 'entities.goal.info_goal_form', extractMode: 'ITEM', details: [] } }),
grouppanel4: new FormGroupPanelModel({ caption: '详细信息', detailType: 'GROUPPANEL', name: 'grouppanel4', visible: true, isShowCaption: true, form: this, uiActionGroup: { caption: '', langbase: 'entities.goal.info_goal_form', extractMode: 'ITEM', details: [] } }),
formpage1: new FormPageModel({ caption: '基本信息', detailType: 'FORMPAGE', name: 'formpage1', visible: true, isShowCaption: true, form: this }),
srfupdatedate: new FormItemModel({ caption: '更新时间', detailType: 'FORMITEM', name: 'srfupdatedate', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 0 }),
srforikey: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srforikey', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
srfkey: new FormItemModel({ caption: '目标', detailType: 'FORMITEM', name: 'srfkey', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 1 }),
srfmajortext: new FormItemModel({ caption: '名称', detailType: 'FORMITEM', name: 'srfmajortext', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
srftempmode: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srftempmode', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
srfuf: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfuf', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
srfdeid: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfdeid', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
srfsourcekey: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfsourcekey', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
title: new FormItemModel({ caption: '名称', detailType: 'FORMITEM', name: 'title', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
parentgoalname: new FormItemModel({ caption: '上级目标', detailType: 'FORMITEM', name: 'parentgoalname', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
metricname: new FormItemModel({ caption: '目标度量', detailType: 'FORMITEM', name: 'metricname', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
goalownerid: new FormItemModel({ caption: '目标负责人', detailType: 'FORMITEM', name: 'goalownerid', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
ownerid: new FormItemModel({ caption: '经理', detailType: 'FORMITEM', name: 'ownerid', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
fiscalperiodgoal: new FormItemModel({ caption: '目标期间类型', detailType: 'FORMITEM', name: 'fiscalperiodgoal', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
fiscalyear: new FormItemModel({ caption: '会计年度', detailType: 'FORMITEM', name: 'fiscalyear', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
fiscalperiod: new FormItemModel({ caption: '会计期间', detailType: 'FORMITEM', name: 'fiscalperiod', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
goalstartdate: new FormItemModel({ caption: '从', detailType: 'FORMITEM', name: 'goalstartdate', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
goalenddate: new FormItemModel({ caption: '到', detailType: 'FORMITEM', name: 'goalenddate', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
targetmoney: new FormItemModel({ caption: '目标值(金额)', detailType: 'FORMITEM', name: 'targetmoney', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
actualmoney: new FormItemModel({ caption: '实际值(金额)', detailType: 'FORMITEM', name: 'actualmoney', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
percentage: new FormItemModel({ caption: '已实现百分比', detailType: 'FORMITEM', name: 'percentage', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
inprogressmoney: new FormItemModel({ caption: '过程值(金额)', detailType: 'FORMITEM', name: 'inprogressmoney', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
goalid: new FormItemModel({ caption: '目标', detailType: 'FORMITEM', name: 'goalid', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 1 }),
};
/**
* 表单逻辑
*
* @param {{ name: string, newVal: any, oldVal: any }} { name, newVal, oldVal }
* @memberof Info_GoalEditFormBase
*/
public formLogic({ name, newVal, oldVal }: { name: string, newVal: any, oldVal: any }): void {
if (Object.is(name, '') || Object.is(name, 'fiscalperiodgoal')) {
let ret = false;
const _fiscalperiodgoal = this.data.fiscalperiodgoal;
if (this.$verify.testCond(_fiscalperiodgoal, 'EQ', '')) {
ret = true;
}
this.detailsModel.grouppanel2.setVisible(ret);
}
if (Object.is(name, '') || Object.is(name, 'fiscalperiodgoal')) {
let ret = false;
const _fiscalperiodgoal = this.data.fiscalperiodgoal;
if (this.$verify.testCond(_fiscalperiodgoal, 'EQ', '0')) {
ret = true;
}
this.detailsModel.grouppanel3.setVisible(ret);
}
}
}
\ No newline at end of file
/**
* Info_Goal 部件模型
*
* @export
* @class Info_GoalModel
*/
export default class Info_GoalModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof Info_GoalModel
*/
public getDataItems(): any[] {
return [
{
name: 'srfwfmemo',
prop: 'srfwfmemo',
dataType: 'TEXT',
},
// 前端新增修改标识,新增为"0",修改为"1"或未设值
{
name: 'srffrontuf',
prop: 'srffrontuf',
dataType: 'TEXT',
},
{
name: 'srfupdatedate',
prop: 'updatedate',
dataType: 'DATETIME',
},
{
name: 'srforikey',
},
{
name: 'srfkey',
prop: 'goalid',
dataType: 'GUID',
},
{
name: 'srfmajortext',
prop: 'title',
dataType: 'TEXT',
},
{
name: 'srftempmode',
},
{
name: 'srfuf',
},
{
name: 'srfdeid',
},
{
name: 'srfsourcekey',
},
{
name: 'title',
prop: 'title',
dataType: 'TEXT',
},
{
name: 'parentgoalname',
prop: 'parentgoalname',
dataType: 'PICKUPTEXT',
},
{
name: 'metricname',
prop: 'metricname',
dataType: 'PICKUPTEXT',
},
{
name: 'goalownerid',
prop: 'goalownerid',
dataType: 'TEXT',
},
{
name: 'ownerid',
prop: 'ownerid',
dataType: 'TEXT',
},
{
name: 'fiscalperiodgoal',
prop: 'fiscalperiodgoal',
dataType: 'YESNO',
},
{
name: 'fiscalyear',
prop: 'fiscalyear',
dataType: 'SSCODELIST',
},
{
name: 'fiscalperiod',
prop: 'fiscalperiod',
dataType: 'SSCODELIST',
},
{
name: 'goalstartdate',
prop: 'goalstartdate',
dataType: 'DATETIME',
},
{
name: 'goalenddate',
prop: 'goalenddate',
dataType: 'DATETIME',
},
{
name: 'targetmoney',
prop: 'targetmoney',
dataType: 'BIGDECIMAL',
},
{
name: 'actualmoney',
prop: 'actualmoney',
dataType: 'BIGDECIMAL',
},
{
name: 'percentage',
prop: 'percentage',
dataType: 'BIGDECIMAL',
},
{
name: 'inprogressmoney',
prop: 'inprogressmoney',
dataType: 'BIGDECIMAL',
},
{
name: 'goalid',
prop: 'goalid',
dataType: 'GUID',
},
{
name: 'goal',
prop: 'goalid',
dataType: 'FONTKEY',
},
]
}
}
\ No newline at end of file
import { Http,Util,Errorlog } from '@/utils';
import ControlService from '@/widgets/control-service';
import GoalService from '@/service/goal/goal-service';
import Info_GoalModel from './info-goal-form-model';
/**
* Info_Goal 部件服务对象
*
* @export
* @class Info_GoalService
*/
export default class Info_GoalService extends ControlService {
/**
* 目标服务对象
*
* @type {GoalService}
* @memberof Info_GoalService
*/
public appEntityService: GoalService = new GoalService({ $store: this.getStore() });
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof Info_GoalService
*/
public setTempMode(){
this.isTempMode = false;
}
/**
* Creates an instance of Info_GoalService.
*
* @param {*} [opts={}]
* @memberof Info_GoalService
*/
constructor(opts: any = {}) {
super(opts);
this.model = new Info_GoalModel();
}
/**
* 处理数据
*
* @private
* @param {Promise<any>} promise
* @returns {Promise<any>}
* @memberof Info_GoalService
*/
private doItems(promise: Promise<any>, deKeyField: string, deName: string): Promise<any> {
return new Promise((resolve, reject) => {
promise.then((response: any) => {
if (response && response.status === 200) {
const data = response.data;
data.forEach((item:any,index:number) =>{
item[deName] = item[deKeyField];
data[index] = item;
});
resolve(data);
} else {
reject([])
}
}).catch((response: any) => {
reject([])
});
});
}
/**
* 获取跨实体数据集合
*
* @param {string} serviceName 服务名称
* @param {string} interfaceName 接口名称
* @param {*} data
* @param {boolean} [isloading]
* @returns {Promise<any[]>}
* @memberof Info_GoalService
*/
@Errorlog
public getItems(serviceName: string, interfaceName: string, context: any = {}, data: any, isloading?: boolean): Promise<any[]> {
return Promise.reject([])
}
/**
* 启动工作流
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof Info_GoalService
*/
@Errorlog
public wfstart(action: string,context: any = {},data: any = {}, isloading?: boolean,localdata?:any): Promise<any> {
data = this.handleWFData(data);
context = this.handleRequestData(action,context,data).context;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](context,data, isloading,localdata);
} else {
result = this.appEntityService.WFStart(context,data, isloading,localdata);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 提交工作流
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof Info_GoalService
*/
@Errorlog
public wfsubmit(action: string,context: any = {}, data: any = {}, isloading?: boolean,localdata?:any): Promise<any> {
data = this.handleWFData(data,true);
context = this.handleRequestData(action,context,data,true).context;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](context,data, isloading,localdata);
} else {
result = this.appEntityService.WFSubmit(context,data, isloading,localdata);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 添加数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof Info_GoalService
*/
@Errorlog
public add(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Create(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 删除数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof Info_GoalService
*/
@Errorlog
public delete(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Remove(Context,Data, isloading);
}
result.then((response) => {
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 修改数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof Info_GoalService
*/
@Errorlog
public update(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Update(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 查询数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof Info_GoalService
*/
@Errorlog
public get(action: string,context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Get(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 加载草稿
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof Info_GoalService
*/
@Errorlog
public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
//仿真主键数据
const PrimaryKey = Util.createUUID();
Data.goalid = PrimaryKey;
Data.goal = PrimaryKey;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.GetDraft(Context,Data, isloading);
}
result.then((response) => {
response.data.goalid = PrimaryKey;
this.handleResponse(action, response, true);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 前台逻辑
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof Info_GoalService
*/
@Errorlog
public frontLogic(action:string,context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any)=>{
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
return Promise.reject({ status: 500, data: { title: '失败', message: '系统异常' } });
}
result.then((response) => {
this.handleResponse(action, response,true);
resolve(response);
}).catch(response => {
reject(response);
});
})
}
/**
* 处理请求数据
*
* @param action 行为
* @param data 数据
* @memberof Info_GoalService
*/
public handleRequestData(action: string,context:any, data: any = {},isMerge:boolean = false){
let mode: any = this.getMode();
if (!mode && mode.getDataItems instanceof Function) {
return data;
}
let formItemItems: any[] = mode.getDataItems();
let requestData:any = {};
if(isMerge && (data && data.viewparams)){
Object.assign(requestData,data.viewparams);
}
formItemItems.forEach((item:any) =>{
if(item && item.dataType && Object.is(item.dataType,'FONTKEY')){
if(item && item.prop){
requestData[item.prop] = context[item.name];
}
}else{
if(item && item.prop){
requestData[item.prop] = data[item.name];
}
}
});
let tempContext:any = JSON.parse(JSON.stringify(context));
if(tempContext && tempContext.srfsessionid){
tempContext.srfsessionkey = tempContext.srfsessionid;
delete tempContext.srfsessionid;
}
return {context:tempContext,data:requestData};
}
}
\ No newline at end of file
<i-form :model="this.data" class='app-form info-form-mode' ref='form' id='goal_info_goal' style="">
<input style="display:none;" />
<row >
<i-col v-show="detailsModel.group1.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-group layoutType="TABLE_24COL" titleStyle="" class='' :uiActionGroup="detailsModel.group1.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="$t('entities.goal.info_goal_form.details.group1')" :isShowCaption="true" uiStyle="DEFAULT" :titleBarCloseMode="1" :isInfoGroupMode="true" >
<row>
<i-col v-show="detailsModel.title.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='title' :itemRules="this.rules.title" class='' :caption="$t('entities.goal.info_goal_form.details.title')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.title.error" :isEmptyCaption="false" labelPos="LEFT">
<app-span name='title' :value="data.title" :data="data" :context="context" :viewparams="viewparams" :localContext ='{ }' :localParam ='{ }' style=""></app-span>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.parentgoalname.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='parentgoalname' :itemRules="this.rules.parentgoalname" class='' :caption="$t('entities.goal.info_goal_form.details.parentgoalname')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.parentgoalname.error" :isEmptyCaption="false" labelPos="LEFT">
<app-span name='parentgoalname' :value="data.parentgoalname" :data="data" :context="context" :viewparams="viewparams" :localContext ='{ }' :localParam ='{ }' style=""></app-span>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.metricname.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='metricname' :itemRules="this.rules.metricname" class='' :caption="$t('entities.goal.info_goal_form.details.metricname')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.metricname.error" :isEmptyCaption="false" labelPos="LEFT">
<app-span name='metricname' :value="data.metricname" :data="data" :context="context" :viewparams="viewparams" :localContext ='{ }' :localParam ='{ }' style=""></app-span>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.goalownerid.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='goalownerid' :itemRules="this.rules.goalownerid" class='' :caption="$t('entities.goal.info_goal_form.details.goalownerid')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.goalownerid.error" :isEmptyCaption="false" labelPos="LEFT">
<app-span name='goalownerid' :value="data.goalownerid" :data="data" :context="context" :viewparams="viewparams" :localContext ='{ }' :localParam ='{ }' style=""></app-span>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.ownerid.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='ownerid' :itemRules="this.rules.ownerid" class='' :caption="$t('entities.goal.info_goal_form.details.ownerid')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.ownerid.error" :isEmptyCaption="false" labelPos="LEFT">
<app-span name='ownerid' :value="data.ownerid" :data="data" :context="context" :viewparams="viewparams" :localContext ='{ }' :localParam ='{ }' style=""></app-span>
</app-form-item>
</i-col>
</row>
</app-form-group>
</i-col>
<i-col v-show="detailsModel.grouppanel1.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-group layoutType="TABLE_24COL" titleStyle="" class='' :uiActionGroup="detailsModel.grouppanel1.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="$t('entities.goal.info_goal_form.details.grouppanel1')" :isShowCaption="true" uiStyle="DEFAULT" :titleBarCloseMode="1" :isInfoGroupMode="true" >
<row>
<i-col v-show="detailsModel.fiscalperiodgoal.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='fiscalperiodgoal' :itemRules="this.rules.fiscalperiodgoal" class='' :caption="$t('entities.goal.info_goal_form.details.fiscalperiodgoal')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.fiscalperiodgoal.error" :isEmptyCaption="false" labelPos="LEFT">
<app-span name='fiscalperiodgoal' :value="data.fiscalperiodgoal" tag='YesNo' codelistType='STATIC' :data="data" :context="context" :viewparams="viewparams" :localContext ='{ }' :localParam ='{ }' style=""></app-span>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.grouppanel2.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-group layoutType="TABLE_24COL" titleStyle="" class='' :uiActionGroup="detailsModel.grouppanel2.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="$t('entities.goal.info_goal_form.details.grouppanel2')" :isShowCaption="false" uiStyle="DEFAULT" :titleBarCloseMode="0" :isInfoGroupMode="true" >
<row>
<i-col v-show="detailsModel.fiscalyear.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='fiscalyear' :itemRules="this.rules.fiscalyear" class='' :caption="$t('entities.goal.info_goal_form.details.fiscalyear')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.fiscalyear.error" :isEmptyCaption="false" labelPos="LEFT">
<app-span name='fiscalyear' :value="data.fiscalyear" tag='Goal__FiscalYear' codelistType='STATIC' :data="data" :context="context" :viewparams="viewparams" :localContext ='{ }' :localParam ='{ }' style=""></app-span>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.fiscalperiod.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='fiscalperiod' :itemRules="this.rules.fiscalperiod" class='' :caption="$t('entities.goal.info_goal_form.details.fiscalperiod')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.fiscalperiod.error" :isEmptyCaption="false" labelPos="LEFT">
<app-span name='fiscalperiod' :value="data.fiscalperiod" tag='Goal__FiscalPeriod' codelistType='STATIC' :data="data" :context="context" :viewparams="viewparams" :localContext ='{ }' :localParam ='{ }' style=""></app-span>
</app-form-item>
</i-col>
</row>
</app-form-group>
</i-col>
<i-col v-show="detailsModel.grouppanel3.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-group layoutType="TABLE_24COL" titleStyle="" class='' :uiActionGroup="detailsModel.grouppanel3.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="$t('entities.goal.info_goal_form.details.grouppanel3')" :isShowCaption="false" uiStyle="DEFAULT" :titleBarCloseMode="0" :isInfoGroupMode="true" >
<row>
<i-col v-show="detailsModel.goalstartdate.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='goalstartdate' :itemRules="this.rules.goalstartdate" class='' :caption="$t('entities.goal.info_goal_form.details.goalstartdate')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.goalstartdate.error" :isEmptyCaption="false" labelPos="LEFT">
<app-span name='goalstartdate' :value="data.goalstartdate" :data="data" :context="context" :viewparams="viewparams" :localContext ='{ }' :localParam ='{ }' style=""></app-span>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.goalenddate.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='goalenddate' :itemRules="this.rules.goalenddate" class='' :caption="$t('entities.goal.info_goal_form.details.goalenddate')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.goalenddate.error" :isEmptyCaption="false" labelPos="LEFT">
<app-span name='goalenddate' :value="data.goalenddate" :data="data" :context="context" :viewparams="viewparams" :localContext ='{ }' :localParam ='{ }' style=""></app-span>
</app-form-item>
</i-col>
</row>
</app-form-group>
</i-col>
</row>
</app-form-group>
</i-col>
<i-col v-show="detailsModel.grouppanel4.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-group layoutType="TABLE_24COL" titleStyle="" class='' :uiActionGroup="detailsModel.grouppanel4.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="$t('entities.goal.info_goal_form.details.grouppanel4')" :isShowCaption="true" uiStyle="DEFAULT" :titleBarCloseMode="1" :isInfoGroupMode="true" >
<row>
<i-col v-show="detailsModel.targetmoney.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='targetmoney' :itemRules="this.rules.targetmoney" class='' :caption="$t('entities.goal.info_goal_form.details.targetmoney')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.targetmoney.error" :isEmptyCaption="false" labelPos="LEFT">
<app-span name='targetmoney' :value="data.targetmoney" :data="data" :context="context" :viewparams="viewparams" :localContext ='{ }' :localParam ='{ }' style=""></app-span>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.actualmoney.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='actualmoney' :itemRules="this.rules.actualmoney" class='' :caption="$t('entities.goal.info_goal_form.details.actualmoney')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.actualmoney.error" :isEmptyCaption="false" labelPos="LEFT">
<app-span name='actualmoney' :value="data.actualmoney" :data="data" :context="context" :viewparams="viewparams" :localContext ='{ }' :localParam ='{ }' style=""></app-span>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.percentage.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='percentage' :itemRules="this.rules.percentage" class='' :caption="$t('entities.goal.info_goal_form.details.percentage')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.percentage.error" :isEmptyCaption="false" labelPos="LEFT">
<app-span name='percentage' :value="data.percentage" :data="data" :context="context" :viewparams="viewparams" :localContext ='{ }' :localParam ='{ }' style=""></app-span>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.inprogressmoney.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='inprogressmoney' :itemRules="this.rules.inprogressmoney" class='' :caption="$t('entities.goal.info_goal_form.details.inprogressmoney')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.inprogressmoney.error" :isEmptyCaption="false" labelPos="LEFT">
<app-span name='inprogressmoney' :value="data.inprogressmoney" :data="data" :context="context" :viewparams="viewparams" :localContext ='{ }' :localParam ='{ }' style=""></app-span>
</app-form-item>
</i-col>
</row>
</app-form-group>
</i-col>
</row>
</i-form>
\ No newline at end of file
<template src="./info-goal-form.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { Info_GoalEditFormBase } from './info-goal-form-base';
/**
* form部件
*
* @export
* @class Info_GoalEditForm
* @extends {Info_GoalEditFormBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class Info_GoalEditForm extends Info_GoalEditFormBase { }
</script>
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, TabExpPanelControlBase } from '@/studio-core';
import GoalService from '@/service/goal/goal-service';
import InfoViewtabexppanelService from './info-viewtabexppanel-tabexppanel-service';
/**
* tabexppanel部件基类
*
* @export
* @class TabExpPanelControlBase
* @extends {InfoViewtabexppanelTabexppanelBase}
*/
export class InfoViewtabexppanelTabexppanelBase extends TabExpPanelControlBase {
/**
* 建构部件服务对象
*
* @type {InfoViewtabexppanelService}
* @memberof InfoViewtabexppanelTabexppanelBase
*/
public service: InfoViewtabexppanelService = new InfoViewtabexppanelService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {GoalService}
* @memberof InfoViewtabexppanelTabexppanelBase
*/
public appEntityService: GoalService = new GoalService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof InfoViewtabexppanelTabexppanelBase
*/
protected appDeName: string = 'goal';
/**
* 是否初始化
*
* @protected
* @returns {any}
* @memberof InfoViewtabexppanel
*/
protected isInit: any = {
tabviewpanel: true ,
tabviewpanel2: false ,
}
/**
* 被激活的分页面板
*
* @protected
* @type {string}
* @memberof InfoViewtabexppanel
*/
protected activatedTabViewPanel: string = 'tabviewpanel';
/**
* 组件创建完毕
*
* @protected
* @memberof InfoViewtabexppanel
*/
protected ctrlCreated(): void {
//设置分页导航srfparentdename和srfparentkey
if (this.context.goal) {
Object.assign(this.context, { srfparentdename: 'Goal', srfparentkey: this.context.goal });
}
super.ctrlCreated();
}
}
\ No newline at end of file
/**
* InfoViewtabexppanel 部件模型
*
* @export
* @class InfoViewtabexppanelModel
*/
export default class InfoViewtabexppanelModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof InfoViewtabexppanelModel
*/
public getDataItems(): any[] {
return [
{
name: 'inprogressdecimal',
},
{
name: 'goal',
prop: 'goalid',
},
{
name: 'stretchtargetmoney',
},
{
name: 'actualdecimal',
},
{
name: 'computedtargetasoftodayinteger',
},
{
name: 'timezoneruleversionnumber',
},
{
name: 'exchangerate',
},
{
name: 'entityimageid',
},
{
name: 'targetinteger',
},
{
name: 'customrollupfieldmoney_base',
},
{
name: 'entityimage_url',
},
{
name: 'actualmoney_base',
},
{
name: 'utcconversiontimezonecode',
},
{
name: 'inprogressinteger',
},
{
name: 'statecode',
},
{
name: 'targetmoney_base',
},
{
name: 'inprogressstring',
},
{
name: 'entityimage_timestamp',
},
{
name: 'goalstartdate',
},
{
name: 'percentage',
},
{
name: 'ownerid',
},
{
name: 'goalowneridyominame',
},
{
name: 'targetdecimal',
},
{
name: 'amount',
},
{
name: 'statuscode',
},
{
name: 'amountdatatype',
},
{
name: 'customrollupfieldinteger',
},
{
name: 'owneridtype',
},
{
name: 'updatedate',
},
{
name: 'inprogressmoney',
},
{
name: 'fiscalyear',
},
{
name: 'fiscalperiod',
},
{
name: 'title',
},
{
name: 'stretchtargetdecimal',
},
{
name: 'customrollupfielddecimal',
},
{
name: 'consideronlygoalownersrecords',
},
{
name: 'overriddencreatedon',
},
{
name: 'actualmoney',
},
{
name: 'rolluponlyfromchildgoals',
},
{
name: 'goalenddate',
},
{
name: 'createdate',
},
{
name: 'customrollupfieldmoney',
},
{
name: 'rolluperrorcode',
},
{
name: 'versionnumber',
},
{
name: 'stretchtargetmoney_base',
},
{
name: 'treeid',
},
{
name: 'entityimage',
},
{
name: 'stretchtargetstring',
},
{
name: 'stretchtargetinteger',
},
{
name: 'fiscalperiodgoal',
},
{
name: 'inprogressmoney_base',
},
{
name: 'overridden',
},
{
name: 'actualstring',
},
{
name: 'actualinteger',
},
{
name: 'goalowneridtype',
},
{
name: 'importsequencenumber',
},
{
name: 'goalownerid',
},
{
name: 'computedtargetasoftodaydecimal',
},
{
name: 'createman',
},
{
name: 'targetstring',
},
{
name: 'customrollupfieldstring',
},
{
name: 'targetmoney',
},
{
name: 'lastrolledupdate',
},
{
name: 'updateman',
},
{
name: 'override',
},
{
name: 'computedtargetasoftodaymoney',
},
{
name: 'owneridyominame',
},
{
name: 'parentgoalid',
},
{
name: 'rollupqueryinprogressmoneyid',
},
{
name: 'rollupquerycustommoneyid',
},
{
name: 'rollupqueryinprogressintegerid',
},
{
name: 'rollupquerycustomdecimalid',
},
{
name: 'rollupqueryactualmoneyid',
},
{
name: 'rollupquerycustomintegerid',
},
{
name: 'goalwitherrorid',
},
{
name: 'metricid',
},
{
name: 'rollupqueryinprogressdecimalid',
},
{
name: 'rollupqueryactualintegerid',
},
{
name: 'rollupqueryactualdecimalid',
},
{
name: 'parentgoalname',
},
{
name: 'metricname',
},
]
}
}
\ No newline at end of file
import { Http,Util,Errorlog } from '@/utils';
import ControlService from '@/widgets/control-service';
import GoalService from '@/service/goal/goal-service';
import InfoViewtabexppanelModel from './info-viewtabexppanel-tabexppanel-model';
/**
* InfoViewtabexppanel 部件服务对象
*
* @export
* @class InfoViewtabexppanelService
*/
export default class InfoViewtabexppanelService extends ControlService {
/**
* 目标服务对象
*
* @type {GoalService}
* @memberof InfoViewtabexppanelService
*/
public appEntityService: GoalService = new GoalService({ $store: this.getStore() });
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof InfoViewtabexppanelService
*/
public setTempMode(){
this.isTempMode = false;
}
/**
* Creates an instance of InfoViewtabexppanelService.
*
* @param {*} [opts={}]
* @memberof InfoViewtabexppanelService
*/
constructor(opts: any = {}) {
super(opts);
this.model = new InfoViewtabexppanelModel();
}
}
\ No newline at end of file
<div class='tabviewpanel'>
<tabs :value="activatedTabViewPanel" :animated="false" class='tabexppanel' name='infoviewtabexppanel' @on-click="tabPanelClick($event)">
<tab-pane :index="0" name='tabviewpanel' tab='infoviewtabexppanel' class=''
:label="(h) =>{
return h('div', [
h('i',{
class:'fa fa-info-circle',
style:{
'margin-right' : '2px'
}
}),
h('span', '概览'),
h('Badge', {
props: {
count: undefined,
type: 'primary'
}
})
])
}" >
<view_tabviewpanel
:viewState="viewState"
:viewparams="JSON.parse(JSON.stringify(viewparams))"
:context="JSON.parse(JSON.stringify(context))"
v-if="isInit.tabviewpanel"
name="tabviewpanel"
ref='tabviewpanel'
@viewpanelDatasChange = "tabViewPanelDatasChange"
@closeview="closeView($event)">
</view_tabviewpanel>
</tab-pane>
<tab-pane :index="1" name='tabviewpanel2' tab='infoviewtabexppanel' class=''
:label="(h) =>{
return h('div', [
h('i',{
class:'fa fa-flag-checkered',
style:{
'margin-right' : '2px'
}
}),
h('span', '子目标'),
h('Badge', {
props: {
count: undefined,
type: 'primary'
}
})
])
}" >
<view_tabviewpanel2
:viewState="viewState"
:viewparams="JSON.parse(JSON.stringify(viewparams))"
:context="JSON.parse(JSON.stringify(context))"
v-if="isInit.tabviewpanel2"
name="tabviewpanel2"
ref='tabviewpanel2'
@viewpanelDatasChange = "tabViewPanelDatasChange"
@closeview="closeView($event)">
</view_tabviewpanel2>
</tab-pane>
</tabs>
</div>
\ No newline at end of file
<template src="./info-viewtabexppanel-tabexppanel.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { InfoViewtabexppanelTabexppanelBase } from './info-viewtabexppanel-tabexppanel-base';
import view_tabviewpanel from '@widgets/goal/info-viewtabviewpanel-tabviewpanel/info-viewtabviewpanel-tabviewpanel.vue';
import view_tabviewpanel2 from '@widgets/goal/info-viewtabviewpanel2-tabviewpanel/info-viewtabviewpanel2-tabviewpanel.vue';
/**
* tabexppanel部件
*
* @export
* @class InfoViewtabexppanelTabexppanel
* @extends {InfoViewtabexppanelTabexppanelBase}
*/
@Component({
components: {
view_tabviewpanel,
view_tabviewpanel2,
}
})
@VueLifeCycleProcessing()
export default class InfoViewtabexppanelTabexppanel extends InfoViewtabexppanelTabexppanelBase { }
</script>
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, MainControlBase } from '@/studio-core';
import GoalService from '@/service/goal/goal-service';
import InfoViewtabviewpanelService from './info-viewtabviewpanel-tabviewpanel-service';
/**
* tabviewpanel部件基类
*
* @export
* @class MainControlBase
* @extends {InfoViewtabviewpanelTabviewpanelBase}
*/
export class InfoViewtabviewpanelTabviewpanelBase extends MainControlBase {
/**
* 建构部件服务对象
*
* @type {InfoViewtabviewpanelService}
* @memberof InfoViewtabviewpanelTabviewpanelBase
*/
public service: InfoViewtabviewpanelService = new InfoViewtabviewpanelService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {GoalService}
* @memberof InfoViewtabviewpanelTabviewpanelBase
*/
public appEntityService: GoalService = new GoalService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof InfoViewtabviewpanelTabviewpanelBase
*/
protected appDeName: string = 'goal';
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof InfoViewtabviewpanel
*/
public getDatas(): any[] {
return [];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof InfoViewtabviewpanel
*/
public getData(): any {
return null;
}
/**
* 是否被激活
*
* @type {boolean}
* @memberof InfoViewtabviewpanel
*/
public isActivied: boolean = true;
/**
* 局部上下文
*
* @type {*}
* @memberof InfoViewtabviewpanel
*/
public localContext: any = null;
/**
* 局部视图参数
*
* @type {*}
* @memberof InfoViewtabviewpanel
*/
public localViewParam: any = null;
/**
* 传入上下文
*
* @type {string}
* @memberof TabExpViewtabviewpanel
*/
public viewdata: string = JSON.stringify(this.context);
/**
* 传入视图参数
*
* @type {string}
* @memberof PickupViewpickupviewpanel
*/
public viewparam: string = JSON.stringify(this.viewparams);
/**
* 视图面板过滤项
*
* @type {string}
* @memberof InfoViewtabviewpanel
*/
public navfilter: string = "";
/**
* vue 生命周期
*
* @returns
* @memberof InfoViewtabviewpanel
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof InfoViewtabviewpanel
*/
public afterCreated(){
this.initNavParam();
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
return;
}
this.$forceUpdate();
this.initNavParam();
});
}
}
/**
* 初始化导航参数
*
* @memberof InfoViewtabviewpanel
*/
public initNavParam(){
if(!Object.is(this.navfilter,"")){
Object.assign(this.viewparams,{[this.navfilter]:this.context['majorentity']})
}
if(this.localContext && Object.keys(this.localContext).length >0){
let _context:any = this.$util.computedNavData({},this.context,this.viewparams,this.localContext);
Object.assign(this.context,_context);
}
if(this.localViewParam && Object.keys(this.localViewParam).length >0){
let _param:any = this.$util.computedNavData({},this.context,this.viewparams,this.localViewParam);
Object.assign(this.viewparams,_param);
}
this.viewdata =JSON.stringify(this.context);
this.viewparam = JSON.stringify(this.viewparams);
}
/**
* 视图数据变化
*
* @memberof InfoViewtabviewpanel
*/
public viewDatasChange($event:any){
this.$emit('viewpanelDatasChange',$event);
}
/**
* vue 生命周期
*
* @memberof InfoViewtabviewpanel
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof InfoViewtabviewpanel
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
}
\ No newline at end of file
/**
* InfoViewtabviewpanel 部件模型
*
* @export
* @class InfoViewtabviewpanelModel
*/
export default class InfoViewtabviewpanelModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof InfoViewtabviewpanelModel
*/
public getDataItems(): any[] {
return [
{
name: 'inprogressdecimal',
},
{
name: 'goal',
prop: 'goalid',
},
{
name: 'stretchtargetmoney',
},
{
name: 'actualdecimal',
},
{
name: 'computedtargetasoftodayinteger',
},
{
name: 'timezoneruleversionnumber',
},
{
name: 'exchangerate',
},
{
name: 'entityimageid',
},
{
name: 'targetinteger',
},
{
name: 'customrollupfieldmoney_base',
},
{
name: 'entityimage_url',
},
{
name: 'actualmoney_base',
},
{
name: 'utcconversiontimezonecode',
},
{
name: 'inprogressinteger',
},
{
name: 'statecode',
},
{
name: 'targetmoney_base',
},
{
name: 'inprogressstring',
},
{
name: 'entityimage_timestamp',
},
{
name: 'goalstartdate',
},
{
name: 'percentage',
},
{
name: 'ownerid',
},
{
name: 'goalowneridyominame',
},
{
name: 'targetdecimal',
},
{
name: 'amount',
},
{
name: 'statuscode',
},
{
name: 'amountdatatype',
},
{
name: 'customrollupfieldinteger',
},
{
name: 'owneridtype',
},
{
name: 'updatedate',
},
{
name: 'inprogressmoney',
},
{
name: 'fiscalyear',
},
{
name: 'fiscalperiod',
},
{
name: 'title',
},
{
name: 'stretchtargetdecimal',
},
{
name: 'customrollupfielddecimal',
},
{
name: 'consideronlygoalownersrecords',
},
{
name: 'overriddencreatedon',
},
{
name: 'actualmoney',
},
{
name: 'rolluponlyfromchildgoals',
},
{
name: 'goalenddate',
},
{
name: 'createdate',
},
{
name: 'customrollupfieldmoney',
},
{
name: 'rolluperrorcode',
},
{
name: 'versionnumber',
},
{
name: 'stretchtargetmoney_base',
},
{
name: 'treeid',
},
{
name: 'entityimage',
},
{
name: 'stretchtargetstring',
},
{
name: 'stretchtargetinteger',
},
{
name: 'fiscalperiodgoal',
},
{
name: 'inprogressmoney_base',
},
{
name: 'overridden',
},
{
name: 'actualstring',
},
{
name: 'actualinteger',
},
{
name: 'goalowneridtype',
},
{
name: 'importsequencenumber',
},
{
name: 'goalownerid',
},
{
name: 'computedtargetasoftodaydecimal',
},
{
name: 'createman',
},
{
name: 'targetstring',
},
{
name: 'customrollupfieldstring',
},
{
name: 'targetmoney',
},
{
name: 'lastrolledupdate',
},
{
name: 'updateman',
},
{
name: 'override',
},
{
name: 'computedtargetasoftodaymoney',
},
{
name: 'owneridyominame',
},
{
name: 'parentgoalid',
},
{
name: 'rollupqueryinprogressmoneyid',
},
{
name: 'rollupquerycustommoneyid',
},
{
name: 'rollupqueryinprogressintegerid',
},
{
name: 'rollupquerycustomdecimalid',
},
{
name: 'rollupqueryactualmoneyid',
},
{
name: 'rollupquerycustomintegerid',
},
{
name: 'goalwitherrorid',
},
{
name: 'metricid',
},
{
name: 'rollupqueryinprogressdecimalid',
},
{
name: 'rollupqueryactualintegerid',
},
{
name: 'rollupqueryactualdecimalid',
},
{
name: 'parentgoalname',
},
{
name: 'metricname',
},
]
}
}
\ No newline at end of file
import { Http } from '@/utils';
import ControlService from '@/widgets/control-service';
/**
* InfoViewtabviewpanel 部件服务对象
*
* @export
* @class InfoViewtabviewpanelService
*/
export default class InfoViewtabviewpanelService extends ControlService {
}
\ No newline at end of file
<div class='tabviewpanel' v-if='isActivied'>
<goal-summary-view
class='viewcontainer2'
:viewdata="viewdata"
:viewparam="viewparam"
@viewload="viewDatasChange($event)"
:viewDefaultUsage="false" >
</goal-summary-view>
</div>
\ No newline at end of file
<template src="./info-viewtabviewpanel-tabviewpanel.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { InfoViewtabviewpanelTabviewpanelBase } from './info-viewtabviewpanel-tabviewpanel-base';
/**
* tabviewpanel部件
*
* @export
* @class InfoViewtabviewpanelTabviewpanel
* @extends {InfoViewtabviewpanelTabviewpanelBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class InfoViewtabviewpanelTabviewpanel extends InfoViewtabviewpanelTabviewpanelBase { }
</script>
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, MainControlBase } from '@/studio-core';
import GoalService from '@/service/goal/goal-service';
import InfoViewtabviewpanel2Service from './info-viewtabviewpanel2-tabviewpanel-service';
/**
* tabviewpanel2部件基类
*
* @export
* @class MainControlBase
* @extends {InfoViewtabviewpanel2TabviewpanelBase}
*/
export class InfoViewtabviewpanel2TabviewpanelBase extends MainControlBase {
/**
* 建构部件服务对象
*
* @type {InfoViewtabviewpanel2Service}
* @memberof InfoViewtabviewpanel2TabviewpanelBase
*/
public service: InfoViewtabviewpanel2Service = new InfoViewtabviewpanel2Service({ $store: this.$store });
/**
* 实体服务对象
*
* @type {GoalService}
* @memberof InfoViewtabviewpanel2TabviewpanelBase
*/
public appEntityService: GoalService = new GoalService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof InfoViewtabviewpanel2TabviewpanelBase
*/
protected appDeName: string = 'goal';
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof InfoViewtabviewpanel2
*/
public getDatas(): any[] {
return [];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof InfoViewtabviewpanel2
*/
public getData(): any {
return null;
}
/**
* 是否被激活
*
* @type {boolean}
* @memberof InfoViewtabviewpanel2
*/
public isActivied: boolean = true;
/**
* 局部上下文
*
* @type {*}
* @memberof InfoViewtabviewpanel2
*/
public localContext: any = null;
/**
* 局部视图参数
*
* @type {*}
* @memberof InfoViewtabviewpanel2
*/
public localViewParam: any = null;
/**
* 传入上下文
*
* @type {string}
* @memberof TabExpViewtabviewpanel
*/
public viewdata: string = JSON.stringify(this.context);
/**
* 传入视图参数
*
* @type {string}
* @memberof PickupViewpickupviewpanel
*/
public viewparam: string = JSON.stringify(this.viewparams);
/**
* 视图面板过滤项
*
* @type {string}
* @memberof InfoViewtabviewpanel2
*/
public navfilter: string = "";
/**
* vue 生命周期
*
* @returns
* @memberof InfoViewtabviewpanel2
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof InfoViewtabviewpanel2
*/
public afterCreated(){
this.initNavParam();
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
return;
}
this.$forceUpdate();
this.initNavParam();
});
}
}
/**
* 初始化导航参数
*
* @memberof InfoViewtabviewpanel2
*/
public initNavParam(){
if(!Object.is(this.navfilter,"")){
Object.assign(this.viewparams,{[this.navfilter]:this.context['majorentity']})
}
if(this.localContext && Object.keys(this.localContext).length >0){
let _context:any = this.$util.computedNavData({},this.context,this.viewparams,this.localContext);
Object.assign(this.context,_context);
}
if(this.localViewParam && Object.keys(this.localViewParam).length >0){
let _param:any = this.$util.computedNavData({},this.context,this.viewparams,this.localViewParam);
Object.assign(this.viewparams,_param);
}
this.viewdata =JSON.stringify(this.context);
this.viewparam = JSON.stringify(this.viewparams);
}
/**
* 视图数据变化
*
* @memberof InfoViewtabviewpanel2
*/
public viewDatasChange($event:any){
this.$emit('viewpanelDatasChange',$event);
}
/**
* vue 生命周期
*
* @memberof InfoViewtabviewpanel2
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof InfoViewtabviewpanel2
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
}
\ No newline at end of file
/**
* InfoViewtabviewpanel2 部件模型
*
* @export
* @class InfoViewtabviewpanel2Model
*/
export default class InfoViewtabviewpanel2Model {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof InfoViewtabviewpanel2Model
*/
public getDataItems(): any[] {
return [
{
name: 'inprogressdecimal',
},
{
name: 'goal',
prop: 'goalid',
},
{
name: 'stretchtargetmoney',
},
{
name: 'actualdecimal',
},
{
name: 'computedtargetasoftodayinteger',
},
{
name: 'timezoneruleversionnumber',
},
{
name: 'exchangerate',
},
{
name: 'entityimageid',
},
{
name: 'targetinteger',
},
{
name: 'customrollupfieldmoney_base',
},
{
name: 'entityimage_url',
},
{
name: 'actualmoney_base',
},
{
name: 'utcconversiontimezonecode',
},
{
name: 'inprogressinteger',
},
{
name: 'statecode',
},
{
name: 'targetmoney_base',
},
{
name: 'inprogressstring',
},
{
name: 'entityimage_timestamp',
},
{
name: 'goalstartdate',
},
{
name: 'percentage',
},
{
name: 'ownerid',
},
{
name: 'goalowneridyominame',
},
{
name: 'targetdecimal',
},
{
name: 'amount',
},
{
name: 'statuscode',
},
{
name: 'amountdatatype',
},
{
name: 'customrollupfieldinteger',
},
{
name: 'owneridtype',
},
{
name: 'updatedate',
},
{
name: 'inprogressmoney',
},
{
name: 'fiscalyear',
},
{
name: 'fiscalperiod',
},
{
name: 'title',
},
{
name: 'stretchtargetdecimal',
},
{
name: 'customrollupfielddecimal',
},
{
name: 'consideronlygoalownersrecords',
},
{
name: 'overriddencreatedon',
},
{
name: 'actualmoney',
},
{
name: 'rolluponlyfromchildgoals',
},
{
name: 'goalenddate',
},
{
name: 'createdate',
},
{
name: 'customrollupfieldmoney',
},
{
name: 'rolluperrorcode',
},
{
name: 'versionnumber',
},
{
name: 'stretchtargetmoney_base',
},
{
name: 'treeid',
},
{
name: 'entityimage',
},
{
name: 'stretchtargetstring',
},
{
name: 'stretchtargetinteger',
},
{
name: 'fiscalperiodgoal',
},
{
name: 'inprogressmoney_base',
},
{
name: 'overridden',
},
{
name: 'actualstring',
},
{
name: 'actualinteger',
},
{
name: 'goalowneridtype',
},
{
name: 'importsequencenumber',
},
{
name: 'goalownerid',
},
{
name: 'computedtargetasoftodaydecimal',
},
{
name: 'createman',
},
{
name: 'targetstring',
},
{
name: 'customrollupfieldstring',
},
{
name: 'targetmoney',
},
{
name: 'lastrolledupdate',
},
{
name: 'updateman',
},
{
name: 'override',
},
{
name: 'computedtargetasoftodaymoney',
},
{
name: 'owneridyominame',
},
{
name: 'parentgoalid',
},
{
name: 'rollupqueryinprogressmoneyid',
},
{
name: 'rollupquerycustommoneyid',
},
{
name: 'rollupqueryinprogressintegerid',
},
{
name: 'rollupquerycustomdecimalid',
},
{
name: 'rollupqueryactualmoneyid',
},
{
name: 'rollupquerycustomintegerid',
},
{
name: 'goalwitherrorid',
},
{
name: 'metricid',
},
{
name: 'rollupqueryinprogressdecimalid',
},
{
name: 'rollupqueryactualintegerid',
},
{
name: 'rollupqueryactualdecimalid',
},
{
name: 'parentgoalname',
},
{
name: 'metricname',
},
]
}
}
\ No newline at end of file
import { Http } from '@/utils';
import ControlService from '@/widgets/control-service';
/**
* InfoViewtabviewpanel2 部件服务对象
*
* @export
* @class InfoViewtabviewpanel2Service
*/
export default class InfoViewtabviewpanel2Service extends ControlService {
}
\ No newline at end of file
<div class='tabviewpanel' v-if='isActivied'>
<goal-child-goal-grid-view
class='viewcontainer2'
:viewdata="viewdata"
:viewparam="viewparam"
@viewload="viewDatasChange($event)"
:viewDefaultUsage="false" >
</goal-child-goal-grid-view>
</div>
\ No newline at end of file
<template src="./info-viewtabviewpanel2-tabviewpanel.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { InfoViewtabviewpanel2TabviewpanelBase } from './info-viewtabviewpanel2-tabviewpanel-base';
/**
* tabviewpanel2部件
*
* @export
* @class InfoViewtabviewpanel2Tabviewpanel
* @extends {InfoViewtabviewpanel2TabviewpanelBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class InfoViewtabviewpanel2Tabviewpanel extends InfoViewtabviewpanel2TabviewpanelBase { }
</script>
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, MainControlBase } from '@/studio-core';
import GoalService from '@/service/goal/goal-service';
import View_GoalInfoService from './view-goal-info-portlet-service';
import { Environment } from '@/environments/environment';
/**
* dashboard_sysportlet1部件基类
*
* @export
* @class MainControlBase
* @extends {View_GoalInfoPortletBase}
*/
export class View_GoalInfoPortletBase extends MainControlBase {
/**
* 建构部件服务对象
*
* @type {View_GoalInfoService}
* @memberof View_GoalInfoPortletBase
*/
public service: View_GoalInfoService = new View_GoalInfoService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {GoalService}
* @memberof View_GoalInfoPortletBase
*/
public appEntityService: GoalService = new GoalService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof View_GoalInfoPortletBase
*/
protected appDeName: string = 'goal';
/**
* 长度
*
* @type {number}
* @memberof View_GoalInfo
*/
@Prop() public height?: number;
/**
* 宽度
*
* @type {number}
* @memberof View_GoalInfo
*/
@Prop() public width?: number;
/**
* 是否自适应大小
*
* @returns {boolean}
* @memberof View_GoalInfoBase
*/
@Prop({default: false})public isAdaptiveSize!: boolean;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof View_GoalInfoBase
*/
public getDatas(): any[] {
return [];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof View_GoalInfoBase
*/
public getData(): any {
return {};
}
/**
* 获取高度
*
* @returns {any[]}
* @memberof View_GoalInfoBase
*/
get getHeight(): any{
if(!this.$util.isEmpty(this.height) && !this.$util.isNumberNaN(this.height)){
if(this.height == 0){
return 'auto';
} else {
return this.height+'px';
}
} else {
return 'auto';
}
}
/**
* vue 生命周期
*
* @memberof View_GoalInfoBase
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof View_GoalInfoBase
*/
public afterCreated(){
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
return;
}
const refs: any = this.$refs;
Object.keys(refs).forEach((_name: string) => {
this.viewState.next({ tag: _name, action: action, data: data });
});
});
}
}
/**
* vue 生命周期
*
* @memberof View_GoalInfoBase
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof View_GoalInfoBase
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
}
/**
* View_GoalInfo 部件模型
*
* @export
* @class View_GoalInfoModel
*/
export default class View_GoalInfoModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof View_GoalInfoModel
*/
public getDataItems(): any[] {
return [
{
name: 'inprogressdecimal',
},
{
name: 'goal',
prop: 'goalid',
},
{
name: 'stretchtargetmoney',
},
{
name: 'actualdecimal',
},
{
name: 'computedtargetasoftodayinteger',
},
{
name: 'timezoneruleversionnumber',
},
{
name: 'exchangerate',
},
{
name: 'entityimageid',
},
{
name: 'targetinteger',
},
{
name: 'customrollupfieldmoney_base',
},
{
name: 'entityimage_url',
},
{
name: 'actualmoney_base',
},
{
name: 'utcconversiontimezonecode',
},
{
name: 'inprogressinteger',
},
{
name: 'statecode',
},
{
name: 'targetmoney_base',
},
{
name: 'inprogressstring',
},
{
name: 'entityimage_timestamp',
},
{
name: 'goalstartdate',
},
{
name: 'percentage',
},
{
name: 'ownerid',
},
{
name: 'goalowneridyominame',
},
{
name: 'targetdecimal',
},
{
name: 'amount',
},
{
name: 'statuscode',
},
{
name: 'amountdatatype',
},
{
name: 'customrollupfieldinteger',
},
{
name: 'owneridtype',
},
{
name: 'updatedate',
},
{
name: 'inprogressmoney',
},
{
name: 'fiscalyear',
},
{
name: 'fiscalperiod',
},
{
name: 'title',
},
{
name: 'stretchtargetdecimal',
},
{
name: 'customrollupfielddecimal',
},
{
name: 'consideronlygoalownersrecords',
},
{
name: 'overriddencreatedon',
},
{
name: 'actualmoney',
},
{
name: 'rolluponlyfromchildgoals',
},
{
name: 'goalenddate',
},
{
name: 'createdate',
},
{
name: 'customrollupfieldmoney',
},
{
name: 'rolluperrorcode',
},
{
name: 'versionnumber',
},
{
name: 'stretchtargetmoney_base',
},
{
name: 'treeid',
},
{
name: 'entityimage',
},
{
name: 'stretchtargetstring',
},
{
name: 'stretchtargetinteger',
},
{
name: 'fiscalperiodgoal',
},
{
name: 'inprogressmoney_base',
},
{
name: 'overridden',
},
{
name: 'actualstring',
},
{
name: 'actualinteger',
},
{
name: 'goalowneridtype',
},
{
name: 'importsequencenumber',
},
{
name: 'goalownerid',
},
{
name: 'computedtargetasoftodaydecimal',
},
{
name: 'createman',
},
{
name: 'targetstring',
},
{
name: 'customrollupfieldstring',
},
{
name: 'targetmoney',
},
{
name: 'lastrolledupdate',
},
{
name: 'updateman',
},
{
name: 'override',
},
{
name: 'computedtargetasoftodaymoney',
},
{
name: 'owneridyominame',
},
{
name: 'parentgoalid',
},
{
name: 'rollupqueryinprogressmoneyid',
},
{
name: 'rollupquerycustommoneyid',
},
{
name: 'rollupqueryinprogressintegerid',
},
{
name: 'rollupquerycustomdecimalid',
},
{
name: 'rollupqueryactualmoneyid',
},
{
name: 'rollupquerycustomintegerid',
},
{
name: 'goalwitherrorid',
},
{
name: 'metricid',
},
{
name: 'rollupqueryinprogressdecimalid',
},
{
name: 'rollupqueryactualintegerid',
},
{
name: 'rollupqueryactualdecimalid',
},
{
name: 'parentgoalname',
},
{
name: 'metricname',
},
]
}
}
import { Http } from '@/utils';
import ControlService from '@/widgets/control-service';
/**
* View_GoalInfo 部件服务对象
*
* @export
* @class View_GoalInfoService
*/
export default class View_GoalInfoService extends ControlService {
}
<div class='portlet view-goal-info ' :style="{}">
<div class="portlet-without-title">
<goal-info-goal-view :viewdata="JSON.stringify(context)" :viewDefaultUsage="false" ></goal-info-goal-view>
</div>
</div>
<template src="./view-goal-info-portlet.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { View_GoalInfoPortletBase } from './view-goal-info-portlet-base';
/**
* dashboard_sysportlet1部件
*
* @export
* @class View_GoalInfoPortlet
* @extends {View_GoalInfoPortletBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class View_GoalInfoPortlet extends View_GoalInfoPortletBase { }
</script>
......@@ -16,7 +16,7 @@
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:height="300"
:height="0"
:width="0"
name="dashboard_sysportlet1"
ref='dashboard_sysportlet1'
......
......@@ -64,16 +64,37 @@ export class MainGridBase extends GridControllerBase {
util: 'PX'
},
{
name: 'updateman',
label: '更新人',
langtag: 'entities.incident.main_grid.columns.updateman',
name: 'ticketnumber',
label: '案例号',
langtag: 'entities.incident.main_grid.columns.ticketnumber',
show: true,
util: 'PX'
},
{
name: 'updatedate',
label: '更新时间',
langtag: 'entities.incident.main_grid.columns.updatedate',
name: 'prioritycode',
label: '优先级',
langtag: 'entities.incident.main_grid.columns.prioritycode',
show: true,
util: 'PX'
},
{
name: 'caseorigincode',
label: '起源',
langtag: 'entities.incident.main_grid.columns.caseorigincode',
show: true,
util: 'PX'
},
{
name: 'customerid',
label: '客户',
langtag: 'entities.incident.main_grid.columns.customerid',
show: true,
util: 'PX'
},
{
name: 'statecode',
label: '状态',
langtag: 'entities.incident.main_grid.columns.statecode',
show: true,
util: 'PX'
},
......@@ -112,8 +133,11 @@ export class MainGridBase extends GridControllerBase {
*/
public hasRowEdit: any = {
'title':false,
'updateman':false,
'updatedate':false,
'ticketnumber':false,
'prioritycode':false,
'caseorigincode':false,
'customerid':false,
'statecode':false,
};
/**
......@@ -140,9 +164,25 @@ export class MainGridBase extends GridControllerBase {
public async formatExcelData(filterVal: any, jsonData: any, codelistColumns?: any[]): Promise<any> {
return super.formatExcelData(filterVal, jsonData, [
{
name: 'updateman',
srfkey: 'SysOperator',
codelistType : 'DYNAMIC',
name: 'prioritycode',
srfkey: 'Incident__PriorityCode',
codelistType : 'STATIC',
renderMode: 'other',
textSeparator: '、',
valueSeparator: ',',
},
{
name: 'caseorigincode',
srfkey: 'Incident__CaseOriginCode',
codelistType : 'STATIC',
renderMode: 'other',
textSeparator: '、',
valueSeparator: ',',
},
{
name: 'statecode',
srfkey: 'Incident__StateCode',
codelistType : 'STATIC',
renderMode: 'other',
textSeparator: '、',
valueSeparator: ',',
......
......@@ -26,11 +26,26 @@ export default class MainModel {
]
}else{
return [
{
name: 'prioritycode',
prop: 'prioritycode',
dataType: 'SSCODELIST',
},
{
name: 'statecode',
prop: 'statecode',
dataType: 'NSCODELIST',
},
{
name: 'resolvebykpiid',
prop: 'resolvebykpiid',
dataType: 'PICKUP',
},
{
name: 'caseorigincode',
prop: 'caseorigincode',
dataType: 'SSCODELIST',
},
{
name: 'contractid',
prop: 'contractid',
......@@ -41,11 +56,6 @@ export default class MainModel {
prop: 'primarycontactid',
dataType: 'PICKUP',
},
{
name: 'updateman',
prop: 'updateman',
dataType: 'TEXT',
},
{
name: 'transactioncurrencyid',
prop: 'transactioncurrencyid',
......@@ -81,6 +91,11 @@ export default class MainModel {
prop: 'incidentid',
dataType: 'GUID',
},
{
name: 'ticketnumber',
prop: 'ticketnumber',
dataType: 'TEXT',
},
{
name: 'masterid',
prop: 'masterid',
......@@ -91,6 +106,11 @@ export default class MainModel {
prop: 'title',
dataType: 'TEXT',
},
{
name: 'customerid',
prop: 'customerid',
dataType: 'TEXT',
},
{
name: 'productid',
prop: 'productid',
......@@ -106,11 +126,6 @@ export default class MainModel {
prop: 'existingcase',
dataType: 'PICKUP',
},
{
name: 'updatedate',
prop: 'updatedate',
dataType: 'DATETIME',
},
{
name: 'subjectid',
prop: 'subjectid',
......
......@@ -35,29 +35,69 @@
</template>
</el-table-column>
</template>
<template v-if="getColumnState('updateman')">
<el-table-column show-overflow-tooltip :prop="'updateman'" :label="$t('entities.incident.main_grid.columns.updateman')" :width="150" :align="'left'" :sortable="'custom'">
<template v-if="getColumnState('ticketnumber')">
<el-table-column show-overflow-tooltip :prop="'ticketnumber'" :label="$t('entities.incident.main_grid.columns.ticketnumber')" :width="150" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.incident.main_grid.columns.updateman')}}
{{$t('entities.incident.main_grid.columns.ticketnumber')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.ticketnumber}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('prioritycode')">
<el-table-column show-overflow-tooltip :prop="'prioritycode'" :label="$t('entities.incident.main_grid.columns.prioritycode')" :width="150" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.incident.main_grid.columns.prioritycode')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<template >
<codelist :value="row.prioritycode" tag='Incident__PriorityCode' codelistType='STATIC' ></codelist>
</template>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('caseorigincode')">
<el-table-column show-overflow-tooltip :prop="'caseorigincode'" :label="$t('entities.incident.main_grid.columns.caseorigincode')" :width="150" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.incident.main_grid.columns.caseorigincode')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<template >
<codelist :value="row.updateman" tag='SysOperator' codelistType='DYNAMIC' ></codelist>
<codelist :value="row.caseorigincode" tag='Incident__CaseOriginCode' codelistType='STATIC' ></codelist>
</template>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('updatedate')">
<el-table-column show-overflow-tooltip :prop="'updatedate'" :label="$t('entities.incident.main_grid.columns.updatedate')" :width="150" :align="'left'" :sortable="'custom'">
<template v-if="getColumnState('customerid')">
<el-table-column show-overflow-tooltip :prop="'customerid'" :label="$t('entities.incident.main_grid.columns.customerid')" :width="160" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.incident.main_grid.columns.customerid')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.customerid}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('statecode')">
<el-table-column show-overflow-tooltip :prop="'statecode'" :label="$t('entities.incident.main_grid.columns.statecode')" :width="150" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.incident.main_grid.columns.updatedate')}}
{{$t('entities.incident.main_grid.columns.statecode')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<app-format-data format="YYYY-MM-DD hh:mm:ss" :data="row.updatedate"></app-format-data>
<template >
<codelist :value="row.statecode" tag='Incident__StateCode' codelistType='STATIC' ></codelist>
</template>
</template>
</el-table-column>
</template>
......
......@@ -100,7 +100,7 @@ export class View_IncidentInfoPortletBase extends MainControlBase {
return this.height+'px';
}
} else {
return '300px';
return 'auto';
}
}
......
<div class='portlet view-incident-info ' :style="{'height': isAdaptiveSize ? 'calc(100% - 16px)' : getHeight,}">
<div class='portlet view-incident-info ' :style="{}">
<div class="portlet-without-title">
<incident-info-incident-view :viewdata="JSON.stringify(context)" :viewDefaultUsage="false" ></incident-info-incident-view>
</div>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册