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

JunZai 发布系统代码

上级 9db0aa72
......@@ -189,6 +189,16 @@
"viewtag": "1316a3add8f01af03edf978ef21af6b1",
"memo": "系统自动添加"
},
"hrcertificatev_001": {
"title": "证书信息表格视图",
"caption": "证书信息",
"viewtype": "DEGRIDVIEW",
"viewmodule": "HumanResource",
"viewname": "HRCertificateV_001",
"viewfilename": "hrcertificate-v-001",
"viewtag": "135e644817a41fccc4733e670e69be87",
"memo": ""
},
"hromhierarchycattabexpview": {
"title": "结构层次类别分页编辑",
"caption": "层次结构",
......@@ -459,6 +469,16 @@
"viewtag": "54e70bcf034bf3715d121537bc8d1d77",
"memo": "系统自动添加"
},
"hrcertificatev_002": {
"title": "证书信息",
"caption": "证书信息",
"viewtype": "DEOPTVIEW",
"viewmodule": "HumanResource",
"viewname": "HRCertificateV_002",
"viewfilename": "hrcertificate-v-002",
"viewtag": "57dbe1035c2366090a02ceb7c8269ebb",
"memo": ""
},
"hrtransferapplyv_001": {
"title": "拟稿",
"caption": "调动申请",
......@@ -679,6 +699,16 @@
"viewtag": "816f119be45e16d278809f590fb65029",
"memo": ""
},
"hrtechnicaltitlev_001": {
"title": "职称信息表格视图",
"caption": "职称信息",
"viewtype": "DEGRIDVIEW",
"viewmodule": "HumanResource",
"viewname": "HRTechnicalTitleV_001",
"viewfilename": "hrtechnical-title-v-001",
"viewtag": "84cfd4498b43e03549cdaba7c5d643ae",
"memo": "系统自动添加"
},
"hrdutyskillgridview": {
"title": "职务技能表格视图",
"caption": "职务技能",
......
......@@ -25,6 +25,14 @@ export default {
empstate: "员工状态",
},
views: {
v_001: {
caption: "证书信息",
title: "证书信息表格视图",
},
v_002: {
caption: "证书信息",
title: "证书信息",
},
gridview: {
caption: "证书信息",
title: "证书信息表格视图",
......@@ -36,10 +44,9 @@ export default {
},
main_form: {
details: {
group1: "证书信息基本信息",
group1: "证书信息",
grouppanel1: "证书获得情况",
formpage1: "基本信息",
group2: "操作信息",
formpage2: "其它",
srfupdatedate: "更新时间",
srforikey: "",
srfkey: "证书信息标识",
......@@ -48,18 +55,44 @@ export default {
srfuf: "",
srfdeid: "",
srfsourcekey: "",
hremployeename: "员工姓名",
certificatecode: "证书编号",
hrcertificatename: "证书名称",
createman: "建立人",
createdate: "建立时间",
updateman: "更新人",
updatedate: "更新时间",
authorganization: "签发机构",
registerorganizationname: "注册单位",
registercode: "注册编号",
authdate: "签发日期",
registertime: "初始注册时间",
expiredate: "失效日期",
memo: "备注",
attachment: "附件",
hremployeeid: "员工标识",
registerorganizationid: "注册单位ID",
hrcertificateid: "证书信息标识",
},
uiactions: {
},
},
grid_001_grid: {
columns: {
hrcertificatename: "证书名称",
certificatecode: "证书编号",
authdate: "签发日期",
expiredate: "失效日期",
authorganization: "签发机构",
registercode: "注册编号",
registerorganizationname: "注册单位",
registertime: "初始注册时间",
},
uiactions: {
},
},
main_grid: {
columns: {
employeecode: "员工编号",
hremployeename: "员工姓名",
organizationname: "单位",
empstate: "员工状态",
hrcertificatename: "证书名称",
certificatecode: "证书编号",
authdate: "签发日期",
......@@ -79,7 +112,7 @@ export default {
uiactions: {
},
},
gridviewtoolbar_toolbar: {
v_001toolbar_toolbar: {
tbitem3: {
caption: "New",
tip: "New",
......@@ -159,4 +192,38 @@ export default {
tip: "Help",
},
},
gridviewtoolbar_toolbar: {
tbitem3: {
caption: "New",
tip: "New",
},
tbitem4: {
caption: "Edit",
tip: "Edit {0}",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "Remove",
tip: "Remove {0}",
},
tbitem9: {
caption: "-",
tip: "",
},
tbitem13: {
caption: "Export",
tip: "Export {0} Data To Excel",
},
tbitem10: {
caption: "-",
tip: "",
},
tbitem19: {
caption: "Filter",
tip: "Filter",
},
},
};
\ No newline at end of file
......@@ -24,6 +24,14 @@ export default {
empstate: "员工状态",
},
views: {
v_001: {
caption: "证书信息",
title: "证书信息表格视图",
},
v_002: {
caption: "证书信息",
title: "证书信息",
},
gridview: {
caption: "证书信息",
title: "证书信息表格视图",
......@@ -35,10 +43,9 @@ export default {
},
main_form: {
details: {
group1: "证书信息基本信息",
group1: "证书信息",
grouppanel1: "证书获得情况",
formpage1: "基本信息",
group2: "操作信息",
formpage2: "其它",
srfupdatedate: "更新时间",
srforikey: "",
srfkey: "证书信息标识",
......@@ -47,18 +54,44 @@ export default {
srfuf: "",
srfdeid: "",
srfsourcekey: "",
hremployeename: "员工姓名",
certificatecode: "证书编号",
hrcertificatename: "证书名称",
createman: "建立人",
createdate: "建立时间",
updateman: "更新人",
updatedate: "更新时间",
authorganization: "签发机构",
registerorganizationname: "注册单位",
registercode: "注册编号",
authdate: "签发日期",
registertime: "初始注册时间",
expiredate: "失效日期",
memo: "备注",
attachment: "附件",
hremployeeid: "员工标识",
registerorganizationid: "注册单位ID",
hrcertificateid: "证书信息标识",
},
uiactions: {
},
},
grid_001_grid: {
columns: {
hrcertificatename: "证书名称",
certificatecode: "证书编号",
authdate: "签发日期",
expiredate: "失效日期",
authorganization: "签发机构",
registercode: "注册编号",
registerorganizationname: "注册单位",
registertime: "初始注册时间",
},
uiactions: {
},
},
main_grid: {
columns: {
employeecode: "员工编号",
hremployeename: "员工姓名",
organizationname: "单位",
empstate: "员工状态",
hrcertificatename: "证书名称",
certificatecode: "证书编号",
authdate: "签发日期",
......@@ -78,7 +111,7 @@ export default {
uiactions: {
},
},
gridviewtoolbar_toolbar: {
v_001toolbar_toolbar: {
tbitem3: {
caption: "新建",
tip: "新建",
......@@ -158,4 +191,38 @@ export default {
tip: "帮助",
},
},
gridviewtoolbar_toolbar: {
tbitem3: {
caption: "新建",
tip: "新建",
},
tbitem4: {
caption: "编辑",
tip: "编辑",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "删除",
tip: "删除",
},
tbitem9: {
caption: "-",
tip: "",
},
tbitem13: {
caption: "导出",
tip: "导出",
},
tbitem10: {
caption: "-",
tip: "",
},
tbitem19: {
caption: "过滤",
tip: "过滤",
},
},
};
\ No newline at end of file
......@@ -28,6 +28,10 @@ export default {
caption: "职称信息",
title: "职称信息编辑视图",
},
v_001: {
caption: "职称信息",
title: "职称信息表格视图",
},
gridview: {
caption: "职称信息",
title: "职称信息表格视图",
......@@ -57,6 +61,19 @@ export default {
uiactions: {
},
},
grid_001_grid: {
columns: {
hrtechnicaltitlename: "职称名称",
titlelevel: "职称等级",
majortype: "专业类别",
major: "专业名称",
titletime: "获取时间",
authorganization: "签发机构",
hightitle: "最高职称",
},
uiactions: {
},
},
main_grid: {
columns: {
hrtechnicaltitlename: "职称名称",
......@@ -77,7 +94,7 @@ export default {
uiactions: {
},
},
gridviewtoolbar_toolbar: {
v_001toolbar_toolbar: {
tbitem3: {
caption: "New",
tip: "New",
......@@ -157,4 +174,38 @@ export default {
tip: "Help",
},
},
gridviewtoolbar_toolbar: {
tbitem3: {
caption: "New",
tip: "New",
},
tbitem4: {
caption: "Edit",
tip: "Edit {0}",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "Remove",
tip: "Remove {0}",
},
tbitem9: {
caption: "-",
tip: "",
},
tbitem13: {
caption: "Export",
tip: "Export {0} Data To Excel",
},
tbitem10: {
caption: "-",
tip: "",
},
tbitem19: {
caption: "Filter",
tip: "Filter",
},
},
};
\ No newline at end of file
......@@ -27,6 +27,10 @@ export default {
caption: "职称信息",
title: "职称信息编辑视图",
},
v_001: {
caption: "职称信息",
title: "职称信息表格视图",
},
gridview: {
caption: "职称信息",
title: "职称信息表格视图",
......@@ -56,6 +60,19 @@ export default {
uiactions: {
},
},
grid_001_grid: {
columns: {
hrtechnicaltitlename: "职称名称",
titlelevel: "职称等级",
majortype: "专业类别",
major: "专业名称",
titletime: "获取时间",
authorganization: "签发机构",
hightitle: "最高职称",
},
uiactions: {
},
},
main_grid: {
columns: {
hrtechnicaltitlename: "职称名称",
......@@ -76,7 +93,7 @@ export default {
uiactions: {
},
},
gridviewtoolbar_toolbar: {
v_001toolbar_toolbar: {
tbitem3: {
caption: "新建",
tip: "新建",
......@@ -156,4 +173,38 @@ export default {
tip: "帮助",
},
},
gridviewtoolbar_toolbar: {
tbitem3: {
caption: "新建",
tip: "新建",
},
tbitem4: {
caption: "编辑",
tip: "编辑",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "删除",
tip: "删除",
},
tbitem9: {
caption: "-",
tip: "",
},
tbitem13: {
caption: "导出",
tip: "导出",
},
tbitem10: {
caption: "-",
tip: "",
},
tbitem19: {
caption: "过滤",
tip: "过滤",
},
},
};
\ No newline at end of file
......@@ -159,6 +159,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "HROMHierarchyCatV_002",
"viewtag": "1316a3add8f01af03edf978ef21af6b1"
},
"hrcertificatev_001": {
"title": "证书信息表格视图",
"caption": "证书信息",
"viewtype": "DEGRIDVIEW",
"viewmodule": "HumanResource",
"viewname": "HRCertificateV_001",
"viewtag": "135e644817a41fccc4733e670e69be87"
},
"hromhierarchycattabexpview": {
"title": "结构层次类别分页编辑",
"caption": "层次结构",
......@@ -375,6 +383,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "HRDutyV_002",
"viewtag": "54e70bcf034bf3715d121537bc8d1d77"
},
"hrcertificatev_002": {
"title": "证书信息",
"caption": "证书信息",
"viewtype": "DEOPTVIEW",
"viewmodule": "HumanResource",
"viewname": "HRCertificateV_002",
"viewtag": "57dbe1035c2366090a02ceb7c8269ebb"
},
"hrtransferapplyv_001": {
"title": "拟稿",
"caption": "调动申请",
......@@ -551,6 +567,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "HROrganizationMPickupView",
"viewtag": "816f119be45e16d278809f590fb65029"
},
"hrtechnicaltitlev_001": {
"title": "职称信息表格视图",
"caption": "职称信息",
"viewtype": "DEGRIDVIEW",
"viewmodule": "HumanResource",
"viewname": "HRTechnicalTitleV_001",
"viewtag": "84cfd4498b43e03549cdaba7c5d643ae"
},
"hrdutyskillgridview": {
"title": "职务技能表格视图",
"caption": "职务技能",
......
import { Subject } from 'rxjs';
import { GridViewBase } from '@/studio-core';
import HRCertificateService from '@/service/hrcertificate/hrcertificate-service';
import HRCertificateAuthService from '@/authservice/hrcertificate/hrcertificate-auth-service';
import GridViewEngine from '@engine/view/grid-view-engine';
import HRCertificateUIService from '@/uiservice/hrcertificate/hrcertificate-ui-service';
import CodeListService from "@service/app/codelist-service";
/**
* 证书信息表格视图视图基类
*
* @export
* @class HRCertificateV_001Base
* @extends {GridViewBase}
*/
export class HRCertificateV_001Base extends GridViewBase {
/**
* 视图对应应用实体名称
*
* @protected
* @type {string}
* @memberof HRCertificateV_001Base
*/
protected appDeName: string = 'hrcertificate';
/**
* 应用实体主键
*
* @protected
* @type {string}
* @memberof HRCertificateV_001Base
*/
protected appDeKey: string = 'hrcertificateid';
/**
* 应用实体主信息
*
* @protected
* @type {string}
* @memberof HRCertificateV_001Base
*/
protected appDeMajor: string = 'hrcertificatename';
/**
* 实体服务对象
*
* @type {HRCertificateService}
* @memberof HRCertificateV_001Base
*/
protected appEntityService: HRCertificateService = new HRCertificateService;
/**
* 实体权限服务对象
*
* @type HRCertificateUIService
* @memberof HRCertificateV_001Base
*/
public appUIService: HRCertificateUIService = new HRCertificateUIService(this.$store);
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof HRCertificateV_001Base
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof HRCertificateV_001Base
*/
protected model: any = {
srfCaption: 'entities.hrcertificate.views.v_001.caption',
srfTitle: 'entities.hrcertificate.views.v_001.title',
srfSubTitle: 'entities.hrcertificate.views.v_001.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof HRCertificateV_001Base
*/
protected containerModel: any = {
view_toolbar: { name: 'toolbar', type: 'TOOLBAR' },
view_grid: { name: 'grid', type: 'GRID' },
view_searchform: { name: 'searchform', type: 'SEARCHFORM' },
};
/**
* 工具栏模型
*
* @type {*}
* @memberof HRCertificateV_001
*/
public toolBarModels: any = {
tbitem3: { name: 'tbitem3', caption: '新建', 'isShowCaption': true, 'isShowIcon': true, tooltip: '新建', iconcls: 'fa fa-file-text-o', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'New', target: '', class: '' } },
tbitem4: { name: 'tbitem4', caption: '编辑', 'isShowCaption': true, 'isShowIcon': true, tooltip: '编辑', iconcls: 'fa fa-edit', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,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,noprivdisplaymode:2,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,noprivdisplaymode:2,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,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'ToggleFilter', target: '', class: '' } },
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected viewtag: string = '135e644817a41fccc4733e670e69be87';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof HRCertificateV_001Base
*/
public engine: GridViewEngine = new GridViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof HRCertificateV_001Base
*/
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: 'hrcertificate',
majorPSDEField: 'hrcertificatename',
isLoadDefault: true,
});
}
/**
* toolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRCertificateV_001Base
*/
public toolbar_click($event: any, $event2?: any): void {
if (Object.is($event.tag, 'tbitem3')) {
this.toolbar_tbitem3_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem4')) {
this.toolbar_tbitem4_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem24')) {
this.toolbar_tbitem24_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem25')) {
this.toolbar_tbitem25_click(null, '', $event2);
}
if (Object.is($event.tag, 'deuiaction1')) {
this.toolbar_deuiaction1_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 HRCertificateV_001Base
*/
public grid_selectionchange($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'selectionchange', $event);
}
/**
* grid 部件 beforeload 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRCertificateV_001Base
*/
public grid_beforeload($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'beforeload', $event);
}
/**
* grid 部件 rowdblclick 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRCertificateV_001Base
*/
public grid_rowdblclick($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'rowdblclick', $event);
}
/**
* grid 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRCertificateV_001Base
*/
public grid_remove($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'remove', $event);
}
/**
* grid 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRCertificateV_001Base
*/
public grid_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'load', $event);
}
/**
* searchform 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRCertificateV_001Base
*/
public searchform_save($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'save', $event);
}
/**
* searchform 部件 search 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRCertificateV_001Base
*/
public searchform_search($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'search', $event);
}
/**
* searchform 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRCertificateV_001Base
*/
public searchform_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'load', $event);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem3_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.New(datas, contextJO,paramJO, $event, xData,this,"HRCertificate");
}
/**
* 逻辑事件
*
* @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,"HRCertificate");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem24_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.ToggleRowEdit(datas, contextJO,paramJO, $event, xData,this,"HRCertificate");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem25_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.NewRow(datas, contextJO,paramJO, $event, xData,this,"HRCertificate");
}
/**
* 逻辑事件
*
* @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.SaveRow(datas, contextJO,paramJO, $event, xData,this,"HRCertificate");
}
/**
* 逻辑事件
*
* @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,"HRCertificate");
}
/**
* 逻辑事件
*
* @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,"HRCertificate");
}
/**
* 逻辑事件
*
* @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,"HRCertificate");
}
/**
* 逻辑事件
*
* @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,"HRCertificate");
}
/**
* 打开新建数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof HRCertificateV_001
*/
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.hrcertificate;
if(args.length >0){
Object.assign(tempContext,args[0]);
}
let deResParameters: any[] = [];
if(tempContext.hremployee && true){
deResParameters = [
{ pathName: 'hremployees', parameterName: 'hremployee' },
]
}
const parameters: any[] = [
{ pathName: 'hrcertificates', parameterName: 'hrcertificate' },
{ pathName: 'editview', parameterName: 'editview' },
];
const _this: any = this;
const openIndexViewTab = (data: any) => {
const _data: any = { w: (new Date().getTime()) };
Object.assign(_data, data);
const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, _data);
this.$router.push(routePath);
}
openIndexViewTab(data);
}
/**
* 打开编辑数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof HRCertificateV_001
*/
public opendata(args: any[],fullargs?:any[],params?: any, $event?: any, xData?: any) {
const localContext: any = null;
const localViewParam: any =null;
const data: any = {};
let tempContext = JSON.parse(JSON.stringify(this.context));
if(args.length >0){
Object.assign(tempContext,args[0]);
}
let deResParameters: any[] = [];
if(tempContext.hremployee && true){
deResParameters = [
{ pathName: 'hremployees', parameterName: 'hremployee' },
]
}
const parameters: any[] = [
{ pathName: 'hrcertificates', parameterName: 'hrcertificate' },
{ pathName: 'editview', parameterName: 'editview' },
];
const _this: any = this;
const openIndexViewTab = (data: any) => {
const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, data);
this.$router.push(routePath);
}
openIndexViewTab(data);
}
/**
* 新建
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof HRCertificateV_001Base
*/
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 HRCertificateV_001Base
*/
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, { hrcertificate: args[0].hrcertificate })
}
_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 HRCertificateV_001Base
*/
public ToggleRowEdit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
xData.actualIsOpenEdit = !xData.actualIsOpenEdit;
}
/**
* 新建行
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof HRCertificateV_001Base
*/
public NewRow(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
const data: any = {};
if (_this.hasOwnProperty('newRow') && _this.newRow instanceof Function) {
_this.newRow([{ ...data }], params, $event, xData);
} else if(xData.newRow && xData.newRow instanceof Function) {
xData.newRow([{ ...data }], params, $event, xData);
}else{
_this.$Notice.error({ title: '错误', desc: 'newRow 视图处理逻辑不存在,请添加!' });
}
}
/**
* 保存行
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof HRCertificateV_001Base
*/
public SaveRow(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
// 界面行为容器对象 _this
const _this: any = this;
if (xData && xData.save instanceof Function) {
xData.save();
} else if (_this.save && _this.save instanceof Function) {
_this.save();
}
}
/**
* 删除
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof HRCertificateV_001Base
*/
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 HRCertificateV_001Base
*/
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 HRCertificateV_001Base
*/
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 HRCertificateV_001Base
*/
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="hrcertificatev_001" viewTitle="证书信息表格视图" class='degridview hrcertificate-v-001'>
<i-input slot="quickSearch" v-show="!isExpandSearchForm" v-model="query" placeholder="证书名称" search @on-search="onSearch($event)"/>
<template slot="toolbar">
<view-toolbar mode="STYLE2" :model="toolBarModels" @item-click="toolbar_click.apply(_self, arguments)"/> </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="isGridSingleSelect"
:showBusyIndicator="true"
:isOpenEdit="false"
:gridRowActiveMode="gridRowActiveMode"
@save="onSave.apply(_self, arguments)"
updateAction=""
removeAction="Remove"
loaddraftAction=""
loadAction=""
createAction=""
fetchAction="FetchDefault"
:newdata="newdata.bind(_self)"
:opendata="opendata.bind(_self)"
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="./hrcertificate-v-001.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { HRCertificateV_001Base } from './hrcertificate-v-001-base';
import view_grid from '@widgets/hrcertificate/grid-001-grid/grid-001-grid.vue';
import view_searchform from '@widgets/hrcertificate/default-searchform/default-searchform.vue';
/**
* 证书信息表格视图视图
*
* @export
* @class HRCertificateV_001
* @extends {HRCertificateV_001Base}
*/
@Component({
components: {
view_grid,
view_searchform,
}
})
@VueLifeCycleProcessing()
export default class HRCertificateV_001 extends HRCertificateV_001Base { }
</script>
import { Subject } from 'rxjs';
import { GridViewBase } from '@/studio-core';
import HRTechnicalTitleService from '@/service/hrtechnical-title/hrtechnical-title-service';
import HRTechnicalTitleAuthService from '@/authservice/hrtechnical-title/hrtechnical-title-auth-service';
import GridViewEngine from '@engine/view/grid-view-engine';
import HRTechnicalTitleUIService from '@/uiservice/hrtechnical-title/hrtechnical-title-ui-service';
import CodeListService from "@service/app/codelist-service";
/**
* 职称信息表格视图视图基类
*
* @export
* @class HRTechnicalTitleV_001Base
* @extends {GridViewBase}
*/
export class HRTechnicalTitleV_001Base extends GridViewBase {
/**
* 视图对应应用实体名称
*
* @protected
* @type {string}
* @memberof HRTechnicalTitleV_001Base
*/
protected appDeName: string = 'hrtechnicaltitle';
/**
* 应用实体主键
*
* @protected
* @type {string}
* @memberof HRTechnicalTitleV_001Base
*/
protected appDeKey: string = 'hrtechnicaltitleid';
/**
* 应用实体主信息
*
* @protected
* @type {string}
* @memberof HRTechnicalTitleV_001Base
*/
protected appDeMajor: string = 'hrtechnicaltitlename';
/**
* 实体服务对象
*
* @type {HRTechnicalTitleService}
* @memberof HRTechnicalTitleV_001Base
*/
protected appEntityService: HRTechnicalTitleService = new HRTechnicalTitleService;
/**
* 实体权限服务对象
*
* @type HRTechnicalTitleUIService
* @memberof HRTechnicalTitleV_001Base
*/
public appUIService: HRTechnicalTitleUIService = new HRTechnicalTitleUIService(this.$store);
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof HRTechnicalTitleV_001Base
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof HRTechnicalTitleV_001Base
*/
protected model: any = {
srfCaption: 'entities.hrtechnicaltitle.views.v_001.caption',
srfTitle: 'entities.hrtechnicaltitle.views.v_001.title',
srfSubTitle: 'entities.hrtechnicaltitle.views.v_001.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof HRTechnicalTitleV_001Base
*/
protected containerModel: any = {
view_toolbar: { name: 'toolbar', type: 'TOOLBAR' },
view_grid: { name: 'grid', type: 'GRID' },
view_searchform: { name: 'searchform', type: 'SEARCHFORM' },
};
/**
* 工具栏模型
*
* @type {*}
* @memberof HRTechnicalTitleV_001
*/
public toolBarModels: any = {
tbitem3: { name: 'tbitem3', caption: '新建', 'isShowCaption': true, 'isShowIcon': true, tooltip: '新建', iconcls: 'fa fa-file-text-o', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'New', target: '', class: '' } },
tbitem4: { name: 'tbitem4', caption: '编辑', 'isShowCaption': true, 'isShowIcon': true, tooltip: '编辑', iconcls: 'fa fa-edit', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,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,noprivdisplaymode:2,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,noprivdisplaymode:2,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,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'ToggleFilter', target: '', class: '' } },
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected viewtag: string = '84cfd4498b43e03549cdaba7c5d643ae';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof HRTechnicalTitleV_001Base
*/
public engine: GridViewEngine = new GridViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof HRTechnicalTitleV_001Base
*/
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: 'hrtechnicaltitle',
majorPSDEField: 'hrtechnicaltitlename',
isLoadDefault: true,
});
}
/**
* toolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRTechnicalTitleV_001Base
*/
public toolbar_click($event: any, $event2?: any): void {
if (Object.is($event.tag, 'tbitem3')) {
this.toolbar_tbitem3_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem4')) {
this.toolbar_tbitem4_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem24')) {
this.toolbar_tbitem24_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem25')) {
this.toolbar_tbitem25_click(null, '', $event2);
}
if (Object.is($event.tag, 'deuiaction1')) {
this.toolbar_deuiaction1_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 HRTechnicalTitleV_001Base
*/
public grid_selectionchange($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'selectionchange', $event);
}
/**
* grid 部件 beforeload 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRTechnicalTitleV_001Base
*/
public grid_beforeload($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'beforeload', $event);
}
/**
* grid 部件 rowdblclick 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRTechnicalTitleV_001Base
*/
public grid_rowdblclick($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'rowdblclick', $event);
}
/**
* grid 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRTechnicalTitleV_001Base
*/
public grid_remove($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'remove', $event);
}
/**
* grid 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRTechnicalTitleV_001Base
*/
public grid_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'load', $event);
}
/**
* searchform 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRTechnicalTitleV_001Base
*/
public searchform_save($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'save', $event);
}
/**
* searchform 部件 search 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRTechnicalTitleV_001Base
*/
public searchform_search($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'search', $event);
}
/**
* searchform 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HRTechnicalTitleV_001Base
*/
public searchform_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'load', $event);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem3_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.New(datas, contextJO,paramJO, $event, xData,this,"HRTechnicalTitle");
}
/**
* 逻辑事件
*
* @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,"HRTechnicalTitle");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem24_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.ToggleRowEdit(datas, contextJO,paramJO, $event, xData,this,"HRTechnicalTitle");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem25_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.NewRow(datas, contextJO,paramJO, $event, xData,this,"HRTechnicalTitle");
}
/**
* 逻辑事件
*
* @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.SaveRow(datas, contextJO,paramJO, $event, xData,this,"HRTechnicalTitle");
}
/**
* 逻辑事件
*
* @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,"HRTechnicalTitle");
}
/**
* 逻辑事件
*
* @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,"HRTechnicalTitle");
}
/**
* 逻辑事件
*
* @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,"HRTechnicalTitle");
}
/**
* 逻辑事件
*
* @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,"HRTechnicalTitle");
}
/**
* 打开新建数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof HRTechnicalTitleV_001
*/
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.hrtechnicaltitle;
if(args.length >0){
Object.assign(tempContext,args[0]);
}
let deResParameters: any[] = [];
if(tempContext.hremployee && true){
deResParameters = [
{ pathName: 'hremployees', parameterName: 'hremployee' },
]
}
const parameters: any[] = [
{ pathName: 'hrtechnicaltitles', parameterName: 'hrtechnicaltitle' },
{ pathName: 'editview', parameterName: 'editview' },
];
const _this: any = this;
const openIndexViewTab = (data: any) => {
const _data: any = { w: (new Date().getTime()) };
Object.assign(_data, data);
const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, _data);
this.$router.push(routePath);
}
openIndexViewTab(data);
}
/**
* 打开编辑数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof HRTechnicalTitleV_001
*/
public opendata(args: any[],fullargs?:any[],params?: any, $event?: any, xData?: any) {
const localContext: any = null;
const localViewParam: any =null;
const data: any = {};
let tempContext = JSON.parse(JSON.stringify(this.context));
if(args.length >0){
Object.assign(tempContext,args[0]);
}
let deResParameters: any[] = [];
if(tempContext.hremployee && true){
deResParameters = [
{ pathName: 'hremployees', parameterName: 'hremployee' },
]
}
const parameters: any[] = [
{ pathName: 'hrtechnicaltitles', parameterName: 'hrtechnicaltitle' },
{ pathName: 'editview', parameterName: 'editview' },
];
const _this: any = this;
const openIndexViewTab = (data: any) => {
const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, data);
this.$router.push(routePath);
}
openIndexViewTab(data);
}
/**
* 新建
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof HRTechnicalTitleV_001Base
*/
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 HRTechnicalTitleV_001Base
*/
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, { hrtechnicaltitle: args[0].hrtechnicaltitle })
}
_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 HRTechnicalTitleV_001Base
*/
public ToggleRowEdit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
xData.actualIsOpenEdit = !xData.actualIsOpenEdit;
}
/**
* 新建行
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof HRTechnicalTitleV_001Base
*/
public NewRow(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
const data: any = {};
if (_this.hasOwnProperty('newRow') && _this.newRow instanceof Function) {
_this.newRow([{ ...data }], params, $event, xData);
} else if(xData.newRow && xData.newRow instanceof Function) {
xData.newRow([{ ...data }], params, $event, xData);
}else{
_this.$Notice.error({ title: '错误', desc: 'newRow 视图处理逻辑不存在,请添加!' });
}
}
/**
* 保存行
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof HRTechnicalTitleV_001Base
*/
public SaveRow(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
// 界面行为容器对象 _this
const _this: any = this;
if (xData && xData.save instanceof Function) {
xData.save();
} else if (_this.save && _this.save instanceof Function) {
_this.save();
}
}
/**
* 删除
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof HRTechnicalTitleV_001Base
*/
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 HRTechnicalTitleV_001Base
*/
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 HRTechnicalTitleV_001Base
*/
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 HRTechnicalTitleV_001Base
*/
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="hrtechnicaltitlev_001" viewTitle="职称信息表格视图" class='degridview hrtechnical-title-v-001'>
<i-input slot="quickSearch" v-show="!isExpandSearchForm" v-model="query" placeholder="职称名称" search @on-search="onSearch($event)"/>
<template slot="toolbar">
<view-toolbar mode="STYLE2" :model="toolBarModels" @item-click="toolbar_click.apply(_self, arguments)"/> </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="isGridSingleSelect"
:showBusyIndicator="true"
:isOpenEdit="false"
:gridRowActiveMode="gridRowActiveMode"
@save="onSave.apply(_self, arguments)"
updateAction=""
removeAction="Remove"
loaddraftAction=""
loadAction=""
createAction=""
fetchAction="FetchDefault"
:newdata="newdata.bind(_self)"
:opendata="opendata.bind(_self)"
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="./hrtechnical-title-v-001.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { HRTechnicalTitleV_001Base } from './hrtechnical-title-v-001-base';
import view_grid from '@widgets/hrtechnical-title/grid-001-grid/grid-001-grid.vue';
import view_searchform from '@widgets/hrtechnical-title/default-searchform/default-searchform.vue';
/**
* 职称信息表格视图视图
*
* @export
* @class HRTechnicalTitleV_001
* @extends {HRTechnicalTitleV_001Base}
*/
@Component({
components: {
view_grid,
view_searchform,
}
})
@VueLifeCycleProcessing()
export default class HRTechnicalTitleV_001 extends HRTechnicalTitleV_001Base { }
</script>
......@@ -7,6 +7,7 @@ export const PageComponents = {
Vue.component('hrcontract-v-001', () => import('@pages/human-resource/hrcontract-v-001/hrcontract-v-001.vue'));
Vue.component('hromhierarchy-cat-tab-exp-view', () => import('@pages/base/hromhierarchy-cat-tab-exp-view/hromhierarchy-cat-tab-exp-view.vue'));
Vue.component('hrlanguage-ability-edit-view', () => import('@pages/human-resource/hrlanguage-ability-edit-view/hrlanguage-ability-edit-view.vue'));
Vue.component('hrtechnical-title-v-001', () => import('@pages/human-resource/hrtechnical-title-v-001/hrtechnical-title-v-001.vue'));
Vue.component('hroperation-unit-v-001', () => import('@pages/base/hroperation-unit-v-001/hroperation-unit-v-001.vue'));
Vue.component('hrduty-pickup-grid-view', () => import('@pages/human-resource/hrduty-pickup-grid-view/hrduty-pickup-grid-view.vue'));
Vue.component('hrcontract-v-003', () => import('@pages/human-resource/hrcontract-v-003/hrcontract-v-003.vue'));
......@@ -62,6 +63,7 @@ export const PageComponents = {
Vue.component('hrwork-record-edit-view', () => import('@pages/human-resource/hrwork-record-edit-view/hrwork-record-edit-view.vue'));
Vue.component('hrpost-grid-view', () => import('@pages/human-resource/hrpost-grid-view/hrpost-grid-view.vue'));
Vue.component('hremployee-v-004', () => import('@pages/human-resource/hremployee-v-004/hremployee-v-004.vue'));
Vue.component('hrcertificate-v-001', () => import('@pages/human-resource/hrcertificate-v-001/hrcertificate-v-001.vue'));
Vue.component('hrcontract-v-005', () => import('@pages/human-resource/hrcontract-v-005/hrcontract-v-005.vue'));
Vue.component('hrpost-v-002', () => import('@pages/human-resource/hrpost-v-002/hrpost-v-002.vue'));
Vue.component('hremployee-v-005', () => import('@pages/human-resource/hremployee-v-005/hremployee-v-005.vue'));
......@@ -80,9 +82,9 @@ export const PageComponents = {
Vue.component('hremployee-tree-exp-view', () => import('@pages/human-resource/hremployee-tree-exp-view/hremployee-tree-exp-view.vue'));
Vue.component('hremployee-tab-exp-view', () => import('@pages/human-resource/hremployee-tab-exp-view/hremployee-tab-exp-view.vue'));
Vue.component('hrcontract-edit-view', () => import('@pages/human-resource/hrcontract-edit-view/hrcontract-edit-view.vue'));
Vue.component('hrorganization-pickup-view', () => import('@pages/base/hrorganization-pickup-view/hrorganization-pickup-view.vue'));
Vue.component('hromhierarchy-cat-dashboard-view', () => import('@pages/base/hromhierarchy-cat-dashboard-view/hromhierarchy-cat-dashboard-view.vue'));
Vue.component('hrduty-edu-grid-view', () => import('@pages/human-resource/hrduty-edu-grid-view/hrduty-edu-grid-view.vue'));
Vue.component('hrorganization-pickup-view', () => import('@pages/base/hrorganization-pickup-view/hrorganization-pickup-view.vue'));
Vue.component('hroperation-unit-tab-exp-view', () => import('@pages/base/hroperation-unit-tab-exp-view/hroperation-unit-tab-exp-view.vue'));
Vue.component('hrlanguage-ability-grid-view', () => import('@pages/human-resource/hrlanguage-ability-grid-view/hrlanguage-ability-grid-view.vue'));
Vue.component('hrorg-address-grid-view', () => import('@pages/base/hrorg-address-grid-view/hrorg-address-grid-view.vue'));
......
......@@ -201,6 +201,35 @@ const router = new Router({
},
component: () => import('@pages/human-resource/hrlanguage-ability-edit-view/hrlanguage-ability-edit-view.vue'),
},
{
path: 'hremployees/:hremployee?/hrtechnicaltitles/:hrtechnicaltitle?/v_001/:v_001?',
meta: {
caption: 'entities.hrtechnicaltitle.views.v_001.title',
info:'',
parameters: [
{ pathName: 'pim', parameterName: 'pim' },
{ pathName: 'hremployees', parameterName: 'hremployee' },
{ pathName: 'hrtechnicaltitles', parameterName: 'hrtechnicaltitle' },
{ pathName: 'v_001', parameterName: 'v_001' },
],
requireAuth: true,
},
component: () => import('@pages/human-resource/hrtechnical-title-v-001/hrtechnical-title-v-001.vue'),
},
{
path: 'hrtechnicaltitles/:hrtechnicaltitle?/v_001/:v_001?',
meta: {
caption: 'entities.hrtechnicaltitle.views.v_001.title',
info:'',
parameters: [
{ pathName: 'pim', parameterName: 'pim' },
{ pathName: 'hrtechnicaltitles', parameterName: 'hrtechnicaltitle' },
{ pathName: 'v_001', parameterName: 'v_001' },
],
requireAuth: true,
},
component: () => import('@pages/human-resource/hrtechnical-title-v-001/hrtechnical-title-v-001.vue'),
},
{
path: 'hroperationunits/:hroperationunit?/v_001/:v_001?',
meta: {
......@@ -1466,6 +1495,35 @@ const router = new Router({
},
component: () => import('@pages/human-resource/hremployee-v-004/hremployee-v-004.vue'),
},
{
path: 'hremployees/:hremployee?/hrcertificates/:hrcertificate?/v_001/:v_001?',
meta: {
caption: 'entities.hrcertificate.views.v_001.title',
info:'',
parameters: [
{ pathName: 'pim', parameterName: 'pim' },
{ pathName: 'hremployees', parameterName: 'hremployee' },
{ pathName: 'hrcertificates', parameterName: 'hrcertificate' },
{ pathName: 'v_001', parameterName: 'v_001' },
],
requireAuth: true,
},
component: () => import('@pages/human-resource/hrcertificate-v-001/hrcertificate-v-001.vue'),
},
{
path: 'hrcertificates/:hrcertificate?/v_001/:v_001?',
meta: {
caption: 'entities.hrcertificate.views.v_001.title',
info:'',
parameters: [
{ pathName: 'pim', parameterName: 'pim' },
{ pathName: 'hrcertificates', parameterName: 'hrcertificate' },
{ pathName: 'v_001', parameterName: 'v_001' },
],
requireAuth: true,
},
component: () => import('@pages/human-resource/hrcertificate-v-001/hrcertificate-v-001.vue'),
},
{
path: 'hremployees/:hremployee?/hrcontracts/:hrcontract?/v_005/:v_005?',
meta: {
......@@ -1988,6 +2046,20 @@ const router = new Router({
},
component: () => import('@pages/human-resource/hrcontract-edit-view/hrcontract-edit-view.vue'),
},
{
path: 'hrorganizations/:hrorganization?/pickupview/:pickupview?',
meta: {
caption: 'entities.hrorganization.views.pickupview.title',
info:'',
parameters: [
{ pathName: 'pim', parameterName: 'pim' },
{ pathName: 'hrorganizations', parameterName: 'hrorganization' },
{ pathName: 'pickupview', parameterName: 'pickupview' },
],
requireAuth: true,
},
component: () => import('@pages/base/hrorganization-pickup-view/hrorganization-pickup-view.vue'),
},
{
path: 'hromhierarchycats/:hromhierarchycat?/dashboardview/:dashboardview?',
meta: {
......@@ -2031,20 +2103,6 @@ const router = new Router({
},
component: () => import('@pages/human-resource/hrduty-edu-grid-view/hrduty-edu-grid-view.vue'),
},
{
path: 'hrorganizations/:hrorganization?/pickupview/:pickupview?',
meta: {
caption: 'entities.hrorganization.views.pickupview.title',
info:'',
parameters: [
{ pathName: 'pim', parameterName: 'pim' },
{ pathName: 'hrorganizations', parameterName: 'hrorganization' },
{ pathName: 'pickupview', parameterName: 'pickupview' },
],
requireAuth: true,
},
component: () => import('@pages/base/hrorganization-pickup-view/hrorganization-pickup-view.vue'),
},
{
path: 'hroperationunits/:hroperationunit?/tabexpview/:tabexpview?',
meta: {
......
......@@ -187,6 +187,16 @@ export const viewstate: any = {
'bf1effbdf9fb9d7d2a1c9d281ab35441',
],
},
{
viewtag: '135e644817a41fccc4733e670e69be87',
viewmodule: 'HumanResource',
viewname: 'HRCertificateV_001',
viewaction: '',
viewdatachange: false,
refviews: [
'ea230b5b872ed3d5cba7daa284278299',
],
},
{
viewtag: '1780a9ed77fb97f2cc3852cfdc55c32c',
viewmodule: 'Base',
......@@ -660,6 +670,16 @@ export const viewstate: any = {
refviews: [
],
},
{
viewtag: '84cfd4498b43e03549cdaba7c5d643ae',
viewmodule: 'HumanResource',
viewname: 'HRTechnicalTitleV_001',
viewaction: '',
viewdatachange: false,
refviews: [
'4b8327f8aa5091583a16b09a241c8866',
],
},
{
viewtag: '8959a1a3f5b43dbc52182d6cf04f00a1',
viewmodule: 'HumanResource',
......@@ -953,16 +973,16 @@ export const viewstate: any = {
viewdatachange: false,
refviews: [
'0ca6b2b05e01dfdc50fcc397b55de86a',
'd6a51bb0caa43fb475fceed816e6a5aa',
'ef663fe283b58da63cd423f8506fa726',
'135e644817a41fccc4733e670e69be87',
'7bef45fc4e0ec53b6a6925262c3ea133',
'c01c4604589a2c171c4f41f2ac11f4e2',
'6fed66b17754f0251f020b82b375c009',
'84cfd4498b43e03549cdaba7c5d643ae',
'621c665c0d1c18948c754c33f0bd86e8',
'6395cba44e6d6151f19e543b55d88845',
'b932c0eb66409c638c29ee27ba4fda37',
'd0d5ecbe6b182e35765428d8f2f2e28f',
'685cd7da1331d604d0382b8d64d90664',
'cc825f424baa276e6a286963d999e03a',
'f7c3f3a7c389106700f90b5973be3d02',
'6a471a103db6b546ec900041100febb7',
......@@ -1244,6 +1264,8 @@ export const viewstate: any = {
viewaction: '',
viewdatachange: false,
refviews: [
'ec9d9fe37bbfc3fcb623e2dc34b48dbc',
'e7ba37699bd458dc8dd5c02abac8dadd',
],
},
{
......
......@@ -89,6 +89,8 @@ export default class HRCertificateUIServiceBase extends UIService {
* @memberof HRCertificateUIServiceBase
*/
public initViewMap(){
this.allViewMap.set(':',{viewname:'v_001',srfappde:'hrcertificates'});
this.allViewMap.set(':',{viewname:'v_002',srfappde:'hrcertificates'});
this.allViewMap.set('MDATAVIEW:',{viewname:'gridview',srfappde:'hrcertificates'});
this.allViewMap.set('EDITVIEW:',{viewname:'editview',srfappde:'hrcertificates'});
}
......
......@@ -90,6 +90,7 @@ export default class HRTechnicalTitleUIServiceBase extends UIService {
*/
public initViewMap(){
this.allViewMap.set('EDITVIEW:',{viewname:'editview',srfappde:'hrtechnicaltitles'});
this.allViewMap.set(':',{viewname:'v_001',srfappde:'hrtechnicaltitles'});
this.allViewMap.set('MDATAVIEW:',{viewname:'gridview',srfappde:'hrtechnicaltitles'});
}
......
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, GridControlBase } from '@/studio-core';
import HRCertificateService from '@/service/hrcertificate/hrcertificate-service';
import GRID_001Service from './grid-001-grid-service';
import HRCertificateUIService from '@/uiservice/hrcertificate/hrcertificate-ui-service';
import { FormItemModel } from '@/model/form-detail';
/**
* grid部件基类
*
* @export
* @class GridControlBase
* @extends {GRID_001GridBase}
*/
export class GRID_001GridBase extends GridControlBase {
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof GRID_001GridBase
*/
protected controlType: string = 'GRID';
/**
* 建构部件服务对象
*
* @type {GRID_001Service}
* @memberof GRID_001GridBase
*/
public service: GRID_001Service = new GRID_001Service({ $store: this.$store });
/**
* 实体服务对象
*
* @type {HRCertificateService}
* @memberof GRID_001GridBase
*/
public appEntityService: HRCertificateService = new HRCertificateService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof GRID_001GridBase
*/
protected appDeName: string = 'hrcertificate';
/**
* 应用实体中文名称
*
* @protected
* @type {string}
* @memberof GRID_001GridBase
*/
protected appDeLogicName: string = '证书信息';
/**
* 界面UI服务对象
*
* @type {HRCertificateUIService}
* @memberof GRID_001Base
*/
public appUIService:HRCertificateUIService = new HRCertificateUIService(this.$store);
/**
* 界面行为模型
*
* @type {*}
* @memberof GRID_001Base
*/
public ActionModel: any = {
};
/**
* 本地缓存标识
*
* @protected
* @type {string}
* @memberof GRID_001Base
*/
protected localStorageTag: string = 'hrcertificate_grid_001_grid';
/**
* 所有列成员
*
* @type {any[]}
* @memberof GRID_001GridBase
*/
public allColumns: any[] = [
{
name: 'hrcertificatename',
label: '证书名称',
langtag: 'entities.hrcertificate.grid_001_grid.columns.hrcertificatename',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'certificatecode',
label: '证书编号',
langtag: 'entities.hrcertificate.grid_001_grid.columns.certificatecode',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'authdate',
label: '签发日期',
langtag: 'entities.hrcertificate.grid_001_grid.columns.authdate',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'expiredate',
label: '失效日期',
langtag: 'entities.hrcertificate.grid_001_grid.columns.expiredate',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'authorganization',
label: '签发机构',
langtag: 'entities.hrcertificate.grid_001_grid.columns.authorganization',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'registercode',
label: '注册编号',
langtag: 'entities.hrcertificate.grid_001_grid.columns.registercode',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'registerorganizationname',
label: '注册单位',
langtag: 'entities.hrcertificate.grid_001_grid.columns.registerorganizationname',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'registertime',
label: '初始注册时间',
langtag: 'entities.hrcertificate.grid_001_grid.columns.registertime',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
]
/**
* 获取表格行模型
*
* @type {*}
* @memberof GRID_001GridBase
*/
public getGridRowModel(){
return {
srfkey: new FormItemModel(),
}
}
/**
* 属性值规则
*
* @type {*}
* @memberof GRID_001GridBase
*/
public rules: any = {
srfkey: [
{ required: false, validator: (rule:any, value:any, callback:any) => { return (rule.required && (value === null || value === undefined || value === "")) ? false : true;}, message: '证书信息标识 值不能为空', trigger: 'change' },
{ required: false, validator: (rule:any, value:any, callback:any) => { return (rule.required && (value === null || value === undefined || value === "")) ? false : true;}, message: '证书信息标识 值不能为空', trigger: 'blur' },
],
}
/**
* 获取对应列class
*
* @type {*}
* @memberof GRID_001Base
*/
public hasRowEdit: any = {
'hrcertificatename':false,
'certificatecode':false,
'authdate':false,
'expiredate':false,
'authorganization':false,
'registercode':false,
'registerorganizationname':false,
'registertime':false,
};
/**
* 获取对应列class
*
* @param {*} $args row 行数据,column 列数据,rowIndex 行索引,列索引
* @returns {void}
* @memberof GRID_001Base
*/
public getCellClassName(args: {row: any, column: any, rowIndex: number, columnIndex: number}): any {
return ( this.hasRowEdit[args.column.property] && this.actualIsOpenEdit ) ? "edit-cell" : "info-cell";
}
/**
* 导出数据格式化
*
* @param {*} filterVal
* @param {*} jsonData
* @param {any[]} [codelistColumns=[]]
* @returns {Promise<any>}
* @memberof GRID_001GridBase
*/
public async formatExcelData(filterVal: any, jsonData: any, codelistColumns?: any[]): Promise<any> {
return super.formatExcelData(filterVal, jsonData, [
]);
}
}
\ No newline at end of file
/**
* GRID_001 部件模型
*
* @export
* @class GRID_001Model
*/
export default class GRID_001Model {
/**
* 是否是实体数据导出
*
* @returns {any[]}
* @memberof GRID_001GridMode
*/
public isDEExport: boolean = false;
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof GRID_001GridMode
*/
public getDataItems(): any[] {
if(this.isDEExport){
return [
]
}else{
return [
{
name: 'registerorganizationname',
prop: 'registerorganizationname',
dataType: 'PICKUPTEXT',
},
{
name: 'registertime',
prop: 'registertime',
dataType: 'DATE',
},
{
name: 'authdate',
prop: 'authdate',
dataType: 'DATE',
},
{
name: 'expiredate',
prop: 'expiredate',
dataType: 'DATE',
},
{
name: 'srfmajortext',
prop: 'hrcertificatename',
dataType: 'TEXT',
},
{
name: 'srfkey',
prop: 'hrcertificateid',
dataType: 'GUID',
isEditable:true
},
{
name: 'srfdataaccaction',
prop: 'hrcertificateid',
dataType: 'GUID',
},
{
name: 'hrcertificatename',
prop: 'hrcertificatename',
dataType: 'TEXT',
},
{
name: 'certificatecode',
prop: 'certificatecode',
dataType: 'TEXT',
},
{
name: 'hremployeeid',
prop: 'hremployeeid',
dataType: 'PICKUP',
},
{
name: 'registerorganizationid',
prop: 'registerorganizationid',
dataType: 'PICKUP',
},
{
name: 'registercode',
prop: 'registercode',
dataType: 'TEXT',
},
{
name: 'authorganization',
prop: 'authorganization',
dataType: 'TEXT',
},
{
name: 'hrcertificate',
prop: 'hrcertificateid',
},
{
name:'size',
prop:'size'
},
{
name:'query',
prop:'query'
},
{
name:'filter',
prop:'filter'
},
{
name:'page',
prop:'page'
},
{
name:'sort',
prop:'sort'
},
{
name:'srfparentdata',
prop:'srfparentdata'
},
// 前端新增修改标识,新增为"0",修改为"1"或未设值
{
name: 'srffrontuf',
prop: 'srffrontuf',
dataType: 'TEXT',
},
]
}
}
}
\ No newline at end of file
import { Http,Util,Errorlog } from '@/utils';
import ControlService from '@/widgets/control-service';
import HRCertificateService from '@/service/hrcertificate/hrcertificate-service';
import GRID_001Model from './grid-001-grid-model';
/**
* GRID_001 部件服务对象
*
* @export
* @class GRID_001Service
*/
export default class GRID_001Service extends ControlService {
/**
* 证书信息服务对象
*
* @type {HRCertificateService}
* @memberof GRID_001Service
*/
public appEntityService: HRCertificateService = new HRCertificateService({ $store: this.getStore() });
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof GRID_001Service
*/
public setTempMode(){
this.isTempMode = false;
}
/**
* Creates an instance of GRID_001Service.
*
* @param {*} [opts={}]
* @memberof GRID_001Service
*/
constructor(opts: any = {}) {
super(opts);
this.model = new GRID_001Model();
}
/**
* 处理数据
*
* @public
* @param {Promise<any>} promise
* @returns {Promise<any>}
* @memberof GRID_001Service
*/
public 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 GRID_001Service
*/
@Errorlog
public getItems(serviceName: string, interfaceName: string, context: any = {}, data: any, isloading?: boolean): Promise<any[]> {
data.page = data.page ? data.page : 0;
data.size = data.size ? data.size : 1000;
return Promise.reject([])
}
/**
* 添加数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof GRID_001Service
*/
@Errorlog
public add(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestDataWithUpdate(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
const _appEntityService: any = this.appEntityService;
let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
}else{
result =_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 GRID_001Service
*/
@Errorlog
public delete(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
const _appEntityService: any = this.appEntityService;
let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
}else{
result =_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 GRID_001Service
*/
@Errorlog
public update(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestDataWithUpdate(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
const _appEntityService: any = this.appEntityService;
let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data,isloading);
}else{
result =_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 GRID_001Service
*/
@Errorlog
public get(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true);
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) => {
//处理返回数据,补充判断标识
if(response.data){
Object.assign(response.data,{srfuf:0});
}
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 查询数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof GRID_001Service
*/
@Errorlog
public search(action: string,context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
const _appEntityService: any = this.appEntityService;
let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
}else{
result =_appEntityService.FetchDefault(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 GRID_001Service
*/
@Errorlog
public loadDraft(action: string, context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true);
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) => {
//处理返回数据,补充判断标识
if(response.data){
Object.assign(response.data,{srfuf:'0'});
//仿真主键数据
response.data.hrcertificateid = Util.createUUID();
}
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 GRID_001Service
*/
@Errorlog
public frontLogic(action:string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true);
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);
resolve(response);
}).catch(response => {
reject(response);
});
})
}
/**
* 处理请求数据(修改或增加数据)
*
* @param action 行为
* @param data 数据
* @memberof GRID_001Service
*/
public handleRequestDataWithUpdate(action: string,context:any ={},data: any = {},isMerge:boolean = false){
let model: any = this.getMode();
if (!model && model.getDataItems instanceof Function) {
return data;
}
let dataItems: any[] = model.getDataItems();
let requestData:any = {};
if(isMerge && (data && data.viewparams)){
Object.assign(requestData,data.viewparams);
}
dataItems.forEach((item:any) =>{
if(item && item.dataType && Object.is(item.dataType,'FONTKEY')){
if(item && item.prop && item.name ){
requestData[item.prop] = context[item.name];
}
}else{
if(item && item.isEditable && item.prop && item.name && (data[item.name] || Object.is(data[item.name],0)) ){
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
<div :class="{ 'grid': true, 'show-paging-bar': isEnablePagingBar, 'hidden-paging-bar': !isEnablePagingBar }">
<i-form>
<el-table v-if="isDisplay === true"
:default-sort="{ prop: minorSortPSDEF, order: Object.is(minorSortDir, 'ASC') ? 'ascending' : Object.is(minorSortDir, 'DESC') ? 'descending' : '' }"
@sort-change="onSortChange($event)"
:border="isDragendCol"
:highlight-current-row ="isSingleSelect"
:row-class-name="getRowClassName.bind(_self)"
:cell-class-name="getCellClassName.bind(_self)"
size="mini"
stripe
@row-click="rowClick($event)"
@select-all="selectAll($event)"
@select="select($event)"
@row-class-name="onRowClassName($event)"
@row-dblclick="rowDBLClick($event)"
ref='multipleTable' :data="items" :show-header="!isHideHeader">
<template slot="empty">
无数据
<span class="quick-toolbar">
</span>
</template>
<template v-if="!isSingleSelect">
<el-table-column align="center" type='selection' :width="checkboxColWidth"></el-table-column>
</template>
<template v-if="getColumnState('hrcertificatename')">
<el-table-column show-overflow-tooltip :prop="'hrcertificatename'" :label="$t('entities.hrcertificate.grid_001_grid.columns.hrcertificatename')" :width="150" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.hrcertificate.grid_001_grid.columns.hrcertificatename')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.hrcertificatename}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('certificatecode')">
<el-table-column show-overflow-tooltip :prop="'certificatecode'" :label="$t('entities.hrcertificate.grid_001_grid.columns.certificatecode')" :width="150" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.hrcertificate.grid_001_grid.columns.certificatecode')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.certificatecode}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('authdate')">
<el-table-column show-overflow-tooltip :prop="'authdate'" :label="$t('entities.hrcertificate.grid_001_grid.columns.authdate')" :width="120" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.hrcertificate.grid_001_grid.columns.authdate')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<app-format-data format="YYYY-MM-DD" :data="row.authdate"></app-format-data>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('expiredate')">
<el-table-column show-overflow-tooltip :prop="'expiredate'" :label="$t('entities.hrcertificate.grid_001_grid.columns.expiredate')" :width="120" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.hrcertificate.grid_001_grid.columns.expiredate')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<app-format-data format="YYYY-MM-DD" :data="row.expiredate"></app-format-data>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('authorganization')">
<el-table-column show-overflow-tooltip :prop="'authorganization'" :label="$t('entities.hrcertificate.grid_001_grid.columns.authorganization')" :width="120" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.hrcertificate.grid_001_grid.columns.authorganization')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.authorganization}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('registercode')">
<el-table-column show-overflow-tooltip :prop="'registercode'" :label="$t('entities.hrcertificate.grid_001_grid.columns.registercode')" :width="120" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.hrcertificate.grid_001_grid.columns.registercode')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.registercode}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('registerorganizationname')">
<el-table-column show-overflow-tooltip :prop="'registerorganizationname'" :label="$t('entities.hrcertificate.grid_001_grid.columns.registerorganizationname')" :width="120" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.hrcertificate.grid_001_grid.columns.registerorganizationname')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.registerorganizationname}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('registertime')">
<el-table-column show-overflow-tooltip :prop="'registertime'" :label="$t('entities.hrcertificate.grid_001_grid.columns.registertime')" :width="150" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.hrcertificate.grid_001_grid.columns.registertime')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<app-format-data format="YYYY-MM-DD" :data="row.registertime"></app-format-data>
</template>
</el-table-column>
</template>
<template v-if="adaptiveState">
<el-table-column></el-table-column>
</template>
</el-table>
<row class='grid-pagination' v-show="items.length > 0">
<page class='pull-right' @on-change="pageOnChange($event)"
@on-page-size-change="onPageSizeChange($event)"
:transfer="true" :total="totalRecord"
show-sizer :current="curPage" :page-size="limit"
:page-size-opts="[10, 20, 30, 40, 50, 60, 70, 80, 90, 100]" show-elevator show-total>
<span>
<span class="page-column">
<poptip transfer placement="top-start">
<i-button icon="md-menu">{{$t('app.gridpage.choicecolumns')}}</i-button>
<div slot="content">
<template v-for="col in allColumns">
<div :key="col.name"><el-checkbox v-model="col.show" @change="onColChange()">{{$t(col.langtag)}}</el-checkbox></div>
</template>
</div>
</poptip>
</span>
<span v-if="selections.length > 0" class="batch-toolbar">
</span>
<span class="page-button"><i-button icon="md-refresh" :title="$t('app.gridpage.refresh')" @click="pageRefresh()"></i-button></span>&nbsp;
<span>
{{$t('app.gridpage.show')}}&nbsp;
<span>
<template v-if="items.length === 1">
1
</template>
<template v-else>
<span>{{(curPage - 1) * limit + 1}}&nbsp;-&nbsp;{{totalRecord > curPage * limit ? curPage * limit : totalRecord}}</span>
</template>
</span>&nbsp;
{{$t('app.gridpage.records')}},{{$t('app.gridpage.totle')}}&nbsp;{{totalRecord}}&nbsp;{{$t('app.gridpage.records')}}
</span>
</span>
</page>
</row>
</i-form>
</div>
\ No newline at end of file
<template src="./grid-001-grid.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { GRID_001GridBase } from './grid-001-grid-base';
/**
* grid部件
*
* @export
* @class GRID_001Grid
* @extends {GRID_001GridBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class GRID_001Grid extends GRID_001GridBase { }
</script>
......@@ -82,11 +82,19 @@ export class MainEditFormBase extends EditFormControlBase {
srfuf: null,
srfdeid: null,
srfsourcekey: null,
hremployeename: null,
certificatecode: null,
hrcertificatename: null,
createman: null,
createdate: null,
updateman: null,
updatedate: null,
authorganization: null,
registerorganizationname: null,
registercode: null,
authdate: null,
registertime: null,
expiredate: null,
memo: null,
attachment: null,
hremployeeid: null,
registerorganizationid: null,
hrcertificateid: null,
hrcertificate:null,
};
......@@ -116,13 +124,11 @@ export class MainEditFormBase extends EditFormControlBase {
* @memberof MainEditFormBase
*/
public detailsModel: any = {
group1: new FormGroupPanelModel({ caption: '证书信息基本信息', detailType: 'GROUPPANEL', name: 'group1', visible: true, isShowCaption: true, form: this, showMoreMode: 0, uiActionGroup: { caption: '', langbase: 'entities.hrcertificate.main_form', extractMode: 'ITEM', details: [] } }),
group1: new FormGroupPanelModel({ caption: '证书信息', detailType: 'GROUPPANEL', name: 'group1', visible: true, isShowCaption: true, form: this, showMoreMode: 0, uiActionGroup: { caption: '', langbase: 'entities.hrcertificate.main_form', extractMode: 'ITEM', details: [] } }),
formpage1: new FormPageModel({ caption: '基本信息', detailType: 'FORMPAGE', name: 'formpage1', visible: true, isShowCaption: true, form: this, showMoreMode: 0 }),
group2: new FormGroupPanelModel({ caption: '操作信息', detailType: 'GROUPPANEL', name: 'group2', visible: true, isShowCaption: true, form: this, showMoreMode: 0, uiActionGroup: { caption: '', langbase: 'entities.hrcertificate.main_form', extractMode: 'ITEM', details: [] } }),
grouppanel1: new FormGroupPanelModel({ caption: '证书获得情况', detailType: 'GROUPPANEL', name: 'grouppanel1', visible: true, isShowCaption: true, form: this, showMoreMode: 0, uiActionGroup: { caption: '', langbase: 'entities.hrcertificate.main_form', extractMode: 'ITEM', details: [] } }),
formpage2: new FormPageModel({ caption: '其它', detailType: 'FORMPAGE', name: 'formpage2', visible: true, isShowCaption: true, form: this, showMoreMode: 0 }),
formpage1: new FormPageModel({ caption: '基本信息', detailType: 'FORMPAGE', name: 'formpage1', visible: true, isShowCaption: true, form: this, showMoreMode: 0 }),
srfupdatedate: new FormItemModel({ caption: '更新时间', detailType: 'FORMITEM', name: 'srfupdatedate', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
......@@ -140,18 +146,33 @@ export class MainEditFormBase extends EditFormControlBase {
srfsourcekey: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfsourcekey', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
hremployeename: new FormItemModel({ caption: '员工姓名', detailType: 'FORMITEM', name: 'hremployeename', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
certificatecode: new FormItemModel({ caption: '证书编号', detailType: 'FORMITEM', name: 'certificatecode', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
hrcertificatename: new FormItemModel({ caption: '证书名称', detailType: 'FORMITEM', name: 'hrcertificatename', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
createman: new FormItemModel({ caption: '建立人', detailType: 'FORMITEM', name: 'createman', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
authorganization: new FormItemModel({ caption: '签发机构', detailType: 'FORMITEM', name: 'authorganization', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
registerorganizationname: new FormItemModel({ caption: '注册单位', detailType: 'FORMITEM', name: 'registerorganizationname', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
registercode: new FormItemModel({ caption: '注册编号', detailType: 'FORMITEM', name: 'registercode', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
authdate: new FormItemModel({ caption: '签发日期', detailType: 'FORMITEM', name: 'authdate', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
registertime: new FormItemModel({ caption: '初始注册时间', detailType: 'FORMITEM', name: 'registertime', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
expiredate: new FormItemModel({ caption: '失效日期', detailType: 'FORMITEM', name: 'expiredate', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
memo: new FormItemModel({ caption: '备注', detailType: 'FORMITEM', name: 'memo', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
createdate: new FormItemModel({ caption: '建立时间', detailType: 'FORMITEM', name: 'createdate', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
attachment: new FormItemModel({ caption: '附件', detailType: 'FORMITEM', name: 'attachment', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
updateman: new FormItemModel({ caption: '更新人', detailType: 'FORMITEM', name: 'updateman', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
hremployeeid: new FormItemModel({ caption: '员工标识', detailType: 'FORMITEM', name: 'hremployeeid', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
updatedate: new FormItemModel({ caption: '更新时间', detailType: 'FORMITEM', name: 'updatedate', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
registerorganizationid: new FormItemModel({ caption: '注册单位ID', detailType: 'FORMITEM', name: 'registerorganizationid', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
hrcertificateid: new FormItemModel({ caption: '证书信息标识', detailType: 'FORMITEM', name: 'hrcertificateid', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
form: new FormTabPanelModel({ caption: 'form', detailType: 'TABPANEL', name: 'form', visible: true, isShowCaption: true, form: this, tabPages: [{ name: 'formpage1', index: 0, visible: true }, { name: 'formpage2', index: 1, visible: true }] }),
};
}
\ No newline at end of file
......@@ -55,30 +55,70 @@ export default class MainModel {
{
name: 'srfsourcekey',
},
{
name: 'hremployeename',
prop: 'hremployeename',
dataType: 'PICKUPTEXT',
},
{
name: 'certificatecode',
prop: 'certificatecode',
dataType: 'TEXT',
},
{
name: 'hrcertificatename',
prop: 'hrcertificatename',
dataType: 'TEXT',
},
{
name: 'createman',
prop: 'createman',
name: 'authorganization',
prop: 'authorganization',
dataType: 'TEXT',
},
{
name: 'createdate',
prop: 'createdate',
dataType: 'DATETIME',
name: 'registerorganizationname',
prop: 'registerorganizationname',
dataType: 'PICKUPTEXT',
},
{
name: 'updateman',
prop: 'updateman',
name: 'registercode',
prop: 'registercode',
dataType: 'TEXT',
},
{
name: 'updatedate',
prop: 'updatedate',
dataType: 'DATETIME',
name: 'authdate',
prop: 'authdate',
dataType: 'DATE',
},
{
name: 'registertime',
prop: 'registertime',
dataType: 'DATE',
},
{
name: 'expiredate',
prop: 'expiredate',
dataType: 'DATE',
},
{
name: 'memo',
prop: 'memo',
dataType: 'LONGTEXT_1000',
},
{
name: 'attachment',
prop: 'attachment',
dataType: 'TEXT',
},
{
name: 'hremployeeid',
prop: 'hremployeeid',
dataType: 'PICKUP',
},
{
name: 'registerorganizationid',
prop: 'registerorganizationid',
dataType: 'PICKUP',
},
{
name: 'hrcertificateid',
......
......@@ -2,6 +2,8 @@ import { Http,Util,Errorlog } from '@/utils';
import ControlService from '@/widgets/control-service';
import HRCertificateService from '@/service/hrcertificate/hrcertificate-service';
import MainModel from './main-form-model';
import HREmployeeService from '@/service/hremployee/hremployee-service';
import HROrganizationService from '@/service/hrorganization/hrorganization-service';
/**
......@@ -41,6 +43,22 @@ export default class MainService extends ControlService {
this.model = new MainModel();
}
/**
* 员工服务对象
*
* @type {HREmployeeService}
* @memberof MainService
*/
public hremployeeService: HREmployeeService = new HREmployeeService();
/**
* 组织服务对象
*
* @type {HROrganizationService}
* @memberof MainService
*/
public hrorganizationService: HROrganizationService = new HROrganizationService();
/**
* 处理数据
*
......@@ -82,6 +100,12 @@ export default class MainService extends ControlService {
public getItems(serviceName: string, interfaceName: string, context: any = {}, data: any, isloading?: boolean): Promise<any[]> {
data.page = data.page ? data.page : 0;
data.size = data.size ? data.size : 1000;
if (Object.is(serviceName, 'HREmployeeService') && Object.is(interfaceName, 'FetchDefault')) {
return this.doItems(this.hremployeeService.FetchDefault(JSON.parse(JSON.stringify(context)),data, isloading), 'employeeid', 'hremployee');
}
if (Object.is(serviceName, 'HROrganizationService') && Object.is(interfaceName, 'FetchDefault')) {
return this.doItems(this.hrorganizationService.FetchDefault(JSON.parse(JSON.stringify(context)),data, isloading), 'organizationid', 'hrorganization');
}
return Promise.reject([])
}
......
<i-form :model="this.data" class='app-form' ref='form' id='hrcertificate_main' style="">
<input style="display:none;" />
<row >
<tabs :animated="false" size="small" name='main' :value="detailsModel.form.activiedPage"
@on-click="detailsModel.form.clickPage($event)">
<tab-pane v-show="detailsModel.formpage1.visible" name='formpage1' :index="0" tab='main' class=''
:label="(h) =>{
return h('span',{
class:'caption'
},[
$t('entities.hrcertificate.main_form.details.formpage1')
])
}">
<i-col class="form-layout-container" v-show="detailsModel.group1.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-group :model="detailsModel.group1" layoutType="TABLE_24COL" titleStyle="" class='' :uiActionGroup="detailsModel.group1.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="$t('entities.hrcertificate.main_form.details.group1')" :isShowCaption="true" uiStyle="DEFAULT" :titleBarCloseMode="0" :isInfoGroupMode="false" >
<app-form-group-data-panel slot="dataInfoPanel" :model="detailsModel.group1" :data="data" :context="context" :viewparams="viewparams"/>
<row>
<i-col class="form-layout-container" v-show="detailsModel.hrcertificatename.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<i-col class="form-layout-container" v-show="detailsModel.hremployeename.visible" :style="{}" :sm="{ span: 24, offset: 0 }" :md="{ span: 12, offset: 0 }" :lg="{ span: 12, offset: 0 }" :xl="{ span: 12, offset: 0 }">
<app-form-item name='hremployeename' :itemRules="this.rules.hremployeename" class='' :caption="$t('entities.hrcertificate.main_form.details.hremployeename')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.hremployeename.error" :isEmptyCaption="false" labelPos="LEFT">
<app-picker
:formState="formState"
:data="data"
:context="context"
:viewparams="viewparams"
:localContext ='{ }'
:localParam ='{ }'
:disabled="detailsModel.hremployeename.disabled"
name='hremployeename'
deMajorField='employeename'
deKeyField='hremployee'
:service="service"
:acParams="{ serviceName: 'HREmployeeService', interfaceName: 'FetchDefault'}"
valueitem='hremployeeid'
:value="data.hremployeename"
:pickupView="{ viewname: 'hremployee-pickup-view', title: $t('entities.hremployee.views.pickupview.title'), deResParameters: [], parameters: [{ pathName: 'hremployees', parameterName: 'hremployee' }, { pathName: 'pickupview', parameterName: 'pickupview' } ], placement:'' }"
style=""
@formitemvaluechange="onFormItemValueChange($event)">
</app-picker>
</app-form-item>
</i-col>
<i-col class="form-layout-container" v-show="detailsModel.certificatecode.visible" :style="{}" :sm="{ span: 24, offset: 0 }" :md="{ span: 12, offset: 0 }" :lg="{ span: 12, offset: 0 }" :xl="{ span: 12, offset: 0 }">
<app-form-item name='certificatecode' :itemRules="this.rules.certificatecode" class='' :caption="$t('entities.hrcertificate.main_form.details.certificatecode')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.certificatecode.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box
v-model="data.certificatecode"
@enter="onEnter($event)"
unit=""
:disabled="detailsModel.certificatecode.disabled"
type='text'
style="">
</input-box>
</app-form-item>
</i-col>
<i-col class="form-layout-container" v-show="detailsModel.hrcertificatename.visible" :style="{}" :sm="{ span: 24, offset: 0 }" :md="{ span: 12, offset: 0 }" :lg="{ span: 12, offset: 0 }" :xl="{ span: 12, offset: 0 }">
<app-form-item name='hrcertificatename' :itemRules="this.rules.hrcertificatename" class='' :caption="$t('entities.hrcertificate.main_form.details.hrcertificatename')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.hrcertificatename.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box
v-model="data.hrcertificatename"
......@@ -30,66 +60,102 @@
</app-form-item>
</i-col>
<i-col class="form-layout-container" v-show="detailsModel.authorganization.visible" :style="{}" :sm="{ span: 24, offset: 0 }" :md="{ span: 12, offset: 0 }" :lg="{ span: 12, offset: 0 }" :xl="{ span: 12, offset: 0 }">
<app-form-item name='authorganization' :itemRules="this.rules.authorganization" class='' :caption="$t('entities.hrcertificate.main_form.details.authorganization')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.authorganization.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box
v-model="data.authorganization"
@enter="onEnter($event)"
unit=""
:disabled="detailsModel.authorganization.disabled"
type='text'
style="">
</input-box>
</app-form-item>
</i-col>
<i-col class="form-layout-container" v-show="detailsModel.registerorganizationname.visible" :style="{}" :sm="{ span: 24, offset: 0 }" :md="{ span: 12, offset: 0 }" :lg="{ span: 12, offset: 0 }" :xl="{ span: 12, offset: 0 }">
<app-form-item name='registerorganizationname' :itemRules="this.rules.registerorganizationname" class='' :caption="$t('entities.hrcertificate.main_form.details.registerorganizationname')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.registerorganizationname.error" :isEmptyCaption="false" labelPos="LEFT">
</row>
</app-form-group>
<app-picker
:formState="formState"
:data="data"
:context="context"
:viewparams="viewparams"
:localContext ='{ }'
:localParam ='{ }'
:disabled="detailsModel.registerorganizationname.disabled"
name='registerorganizationname'
deMajorField='organizationname'
deKeyField='hrorganization'
:service="service"
:acParams="{ serviceName: 'HROrganizationService', interfaceName: 'FetchDefault'}"
valueitem='registerorganizationid'
:value="data.registerorganizationname"
:pickupView="{ viewname: 'hrorganization-pickup-view', title: $t('entities.hrorganization.views.pickupview.title'), deResParameters: [], parameters: [{ pathName: 'hrorganizations', parameterName: 'hrorganization' }, { pathName: 'pickupview', parameterName: 'pickupview' } ], placement:'' }"
style=""
@formitemvaluechange="onFormItemValueChange($event)">
</app-picker>
</app-form-item>
</i-col>
<i-col class="form-layout-container" v-show="detailsModel.registercode.visible" :style="{}" :sm="{ span: 24, offset: 0 }" :md="{ span: 12, offset: 0 }" :lg="{ span: 12, offset: 0 }" :xl="{ span: 12, offset: 0 }">
<app-form-item name='registercode' :itemRules="this.rules.registercode" class='' :caption="$t('entities.hrcertificate.main_form.details.registercode')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.registercode.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box
v-model="data.registercode"
@enter="onEnter($event)"
unit=""
:disabled="detailsModel.registercode.disabled"
type='text'
style="">
</input-box>
</app-form-item>
</tab-pane>
<tab-pane v-show="detailsModel.formpage2.visible" name='formpage2' :index="1" tab='main' class=''
:label="(h) =>{
return h('span',{
class:'caption'
},[
$t('entities.hrcertificate.main_form.details.formpage2')
])
}">
<i-col class="form-layout-container" v-show="detailsModel.group2.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-group :model="detailsModel.group2" layoutType="TABLE_24COL" titleStyle="" class='' :uiActionGroup="detailsModel.group2.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="$t('entities.hrcertificate.main_form.details.group2')" :isShowCaption="true" uiStyle="DEFAULT" :titleBarCloseMode="0" :isInfoGroupMode="false" >
<app-form-group-data-panel slot="dataInfoPanel" :model="detailsModel.group2" :data="data" :context="context" :viewparams="viewparams"/>
<row>
<i-col class="form-layout-container" v-show="detailsModel.createman.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='createman' :itemRules="this.rules.createman" class='' :caption="$t('entities.hrcertificate.main_form.details.createman')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.createman.error" :isEmptyCaption="false" labelPos="LEFT">
</i-col>
<app-span name='createman' :value="data.createman" dataType="TEXT" :precision="0"
tag='SysOperator' codelistType='DYNAMIC' :data="data" :context="context" :viewparams="viewparams" :localContext ='{ }' :localParam ='{ }' style="">
</app-span>
</row>
</app-form-group>
</i-col>
<i-col class="form-layout-container" v-show="detailsModel.grouppanel1.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-group :model="detailsModel.grouppanel1" layoutType="TABLE_24COL" titleStyle="" class='' :uiActionGroup="detailsModel.grouppanel1.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="$t('entities.hrcertificate.main_form.details.grouppanel1')" :isShowCaption="true" uiStyle="DEFAULT" :titleBarCloseMode="0" :isInfoGroupMode="false" >
<app-form-group-data-panel slot="dataInfoPanel" :model="detailsModel.grouppanel1" :data="data" :context="context" :viewparams="viewparams"/>
<row>
<i-col class="form-layout-container" v-show="detailsModel.authdate.visible" :style="{}" :sm="{ span: 24, offset: 0 }" :md="{ span: 12, offset: 0 }" :lg="{ span: 12, offset: 0 }" :xl="{ span: 12, offset: 0 }">
<app-form-item name='authdate' :itemRules="this.rules.authdate" class='' :caption="$t('entities.hrcertificate.main_form.details.authdate')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.authdate.error" :isEmptyCaption="false" labelPos="LEFT">
<date-picker type="date" :transfer="true" format="yyyy-MM-dd" placeholder="请选择时间..." :value="data.authdate" :disabled="detailsModel.authdate.disabled" style="min-width: 150px; width:100px;" @on-change="(val1, val2) => { this.data.authdate = val1 }"></date-picker>
</app-form-item>
</i-col>
<i-col class="form-layout-container" v-show="detailsModel.createdate.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='createdate' :itemRules="this.rules.createdate" class='' :caption="$t('entities.hrcertificate.main_form.details.createdate')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.createdate.error" :isEmptyCaption="false" labelPos="LEFT">
<app-span name='createdate' :value="data.createdate" dataType="DATETIME" valueFormat="%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS" :precision="0"
:data="data" :context="context" :viewparams="viewparams" :localContext ='{ }' :localParam ='{ }' style="">
</app-span>
<i-col class="form-layout-container" v-show="detailsModel.registertime.visible" :style="{}" :sm="{ span: 24, offset: 0 }" :md="{ span: 12, offset: 0 }" :lg="{ span: 12, offset: 0 }" :xl="{ span: 12, offset: 0 }">
<app-form-item name='registertime' :itemRules="this.rules.registertime" class='' :caption="$t('entities.hrcertificate.main_form.details.registertime')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.registertime.error" :isEmptyCaption="false" labelPos="LEFT">
<date-picker type="date" :transfer="true" format="yyyy-MM-dd" placeholder="请选择时间..." :value="data.registertime" :disabled="detailsModel.registertime.disabled" style="min-width: 150px; width:100px;" @on-change="(val1, val2) => { this.data.registertime = val1 }"></date-picker>
</app-form-item>
</i-col>
<i-col class="form-layout-container" v-show="detailsModel.updateman.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='updateman' :itemRules="this.rules.updateman" class='' :caption="$t('entities.hrcertificate.main_form.details.updateman')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.updateman.error" :isEmptyCaption="false" labelPos="LEFT">
<app-span name='updateman' :value="data.updateman" dataType="TEXT" :precision="0"
tag='SysOperator' codelistType='DYNAMIC' :data="data" :context="context" :viewparams="viewparams" :localContext ='{ }' :localParam ='{ }' style="">
</app-span>
<i-col class="form-layout-container" v-show="detailsModel.expiredate.visible" :style="{}" :sm="{ span: 24, offset: 0 }" :md="{ span: 12, offset: 0 }" :lg="{ span: 12, offset: 0 }" :xl="{ span: 12, offset: 0 }">
<app-form-item name='expiredate' :itemRules="this.rules.expiredate" class='' :caption="$t('entities.hrcertificate.main_form.details.expiredate')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.expiredate.error" :isEmptyCaption="false" labelPos="LEFT">
<date-picker type="date" :transfer="true" format="yyyy-MM-dd" placeholder="请选择时间..." :value="data.expiredate" :disabled="detailsModel.expiredate.disabled" style="min-width: 150px; width:100px;" @on-change="(val1, val2) => { this.data.expiredate = val1 }"></date-picker>
</app-form-item>
</i-col>
<i-col class="form-layout-container" v-show="detailsModel.updatedate.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='updatedate' :itemRules="this.rules.updatedate" class='' :caption="$t('entities.hrcertificate.main_form.details.updatedate')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.updatedate.error" :isEmptyCaption="false" labelPos="LEFT">
<app-span name='updatedate' :value="data.updatedate" dataType="DATETIME" valueFormat="%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS" :precision="0"
:data="data" :context="context" :viewparams="viewparams" :localContext ='{ }' :localParam ='{ }' style="">
</app-span>
<i-col class="form-layout-container" v-show="detailsModel.memo.visible" :style="{}" :sm="{ span: 24, offset: 0 }" :md="{ span: 12, offset: 0 }" :lg="{ span: 24, offset: 0 }" :xl="{ span: 24, offset: 0 }">
<app-form-item name='memo' :itemRules="this.rules.memo" class='' :caption="$t('entities.hrcertificate.main_form.details.memo')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.memo.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.memo" :textareaId="this.$util.createUUID()" :disabled="detailsModel.memo.disabled" type='textarea' textareaStyle="height:200px;" ></input-box>
</app-form-item>
</i-col>
<i-col class="form-layout-container" v-show="detailsModel.attachment.visible" :style="{}" :sm="{ span: 24, offset: 0 }" :md="{ span: 12, offset: 0 }" :lg="{ span: 24, offset: 0 }" :xl="{ span: 24, offset: 0 }">
<app-form-item name='attachment' :itemRules="this.rules.attachment" class='' :caption="$t('entities.hrcertificate.main_form.details.attachment')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.attachment.error" :isEmptyCaption="false" labelPos="LEFT">
<app-image-upload :multiple="true" :formState="formState" :ignorefieldvaluechange="ignorefieldvaluechange" @formitemvaluechange="onFormItemValueChange($event)" :data="JSON.stringify(this.data)" name='attachment' :value="data.attachment" :disabled="detailsModel.attachment.disabled" :uploadparams='{}' :exportparams='{}' style="overflow: auto;"></app-image-upload>
</app-form-item>
</i-col>
</row>
......@@ -98,7 +164,5 @@ tag='SysOperator' codelistType='DYNAMIC' :data="data" :context="context" :viewpa
</i-col>
</tab-pane>
</tabs>
</row>
</i-form>
\ No newline at end of file
......@@ -92,6 +92,38 @@ export class MainGridBase extends GridControlBase {
* @memberof MainGridBase
*/
public allColumns: any[] = [
{
name: 'employeecode',
label: '员工编号',
langtag: 'entities.hrcertificate.main_grid.columns.employeecode',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'hremployeename',
label: '员工姓名',
langtag: 'entities.hrcertificate.main_grid.columns.hremployeename',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'organizationname',
label: '单位',
langtag: 'entities.hrcertificate.main_grid.columns.organizationname',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'empstate',
label: '员工状态',
langtag: 'entities.hrcertificate.main_grid.columns.empstate',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'hrcertificatename',
label: '证书名称',
......@@ -190,6 +222,10 @@ export class MainGridBase extends GridControlBase {
* @memberof MainBase
*/
public hasRowEdit: any = {
'employeecode':false,
'hremployeename':false,
'organizationname':false,
'empstate':false,
'hrcertificatename':false,
'certificatecode':false,
'authdate':false,
......
......@@ -26,16 +26,31 @@ export default class MainModel {
]
}else{
return [
{
name: 'organizationname',
prop: 'organizationname',
dataType: 'PICKUPDATA',
},
{
name: 'registerorganizationname',
prop: 'registerorganizationname',
dataType: 'PICKUPTEXT',
},
{
name: 'empstate',
prop: 'empstate',
dataType: 'TEXT',
},
{
name: 'registertime',
prop: 'registertime',
dataType: 'DATE',
},
{
name: 'employeecode',
prop: 'employeecode',
dataType: 'PICKUPDATA',
},
{
name: 'authdate',
prop: 'authdate',
......@@ -52,36 +67,41 @@ export default class MainModel {
dataType: 'TEXT',
},
{
name: 'srfkey',
name: 'srfdataaccaction',
prop: 'hrcertificateid',
dataType: 'GUID',
isEditable:true
},
{
name: 'srfdataaccaction',
name: 'srfkey',
prop: 'hrcertificateid',
dataType: 'GUID',
isEditable:true
},
{
name: 'hrcertificatename',
prop: 'hrcertificatename',
dataType: 'TEXT',
},
{
name: 'certificatecode',
prop: 'certificatecode',
dataType: 'TEXT',
},
{
name: 'hremployeeid',
prop: 'hremployeeid',
dataType: 'PICKUP',
},
{
name: 'certificatecode',
prop: 'certificatecode',
dataType: 'TEXT',
},
{
name: 'registerorganizationid',
prop: 'registerorganizationid',
dataType: 'PICKUP',
},
{
name: 'hremployeename',
prop: 'hremployeename',
dataType: 'PICKUPTEXT',
},
{
name: 'registercode',
prop: 'registercode',
......
......@@ -23,6 +23,54 @@
<template v-if="!isSingleSelect">
<el-table-column align="center" type='selection' :width="checkboxColWidth"></el-table-column>
</template>
<template v-if="getColumnState('employeecode')">
<el-table-column show-overflow-tooltip :prop="'employeecode'" :label="$t('entities.hrcertificate.main_grid.columns.employeecode')" :width="120" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.hrcertificate.main_grid.columns.employeecode')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.employeecode}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('hremployeename')">
<el-table-column show-overflow-tooltip :prop="'hremployeename'" :label="$t('entities.hrcertificate.main_grid.columns.hremployeename')" :width="120" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.hrcertificate.main_grid.columns.hremployeename')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.hremployeename}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('organizationname')">
<el-table-column show-overflow-tooltip :prop="'organizationname'" :label="$t('entities.hrcertificate.main_grid.columns.organizationname')" :width="200" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.hrcertificate.main_grid.columns.organizationname')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.organizationname}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('empstate')">
<el-table-column show-overflow-tooltip :prop="'empstate'" :label="$t('entities.hrcertificate.main_grid.columns.empstate')" :width="120" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.hrcertificate.main_grid.columns.empstate')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.empstate}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('hrcertificatename')">
<el-table-column show-overflow-tooltip :prop="'hrcertificatename'" :label="$t('entities.hrcertificate.main_grid.columns.hrcertificatename')" :width="150" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
......
......@@ -198,7 +198,7 @@ export class TreeExpViewtreeexpbarTreeExpBarBase extends MainControlBase {
}
if (Object.is(expmode, 'TR09')) {
return {
viewname: 'hrtechnical-title-grid-view',
viewname: 'hrtechnical-title-v-001',
parentdata: {"srfparentdefname":"HREMPLOYEEID","srfparentdename":"HREMPLOYEE","srfparentmode":"DER1N_HRTECHNICALTITLE_HREMPLOYEE_HREMPLOYEEID_327A4D"},
deKeyField:'hrtechnicaltitle'
};
......@@ -233,7 +233,7 @@ export class TreeExpViewtreeexpbarTreeExpBarBase extends MainControlBase {
}
if (Object.is(expmode, 'TR11')) {
return {
viewname: 'hrcertificate-grid-view',
viewname: 'hrcertificate-v-001',
parentdata: {"srfparentdefname":"HREMPLOYEEID","srfparentdename":"HREMPLOYEE","srfparentmode":"DER1N_HRCERTIFICATE_HREMPLOYEE_HREMPLOYEEID_327A4D"},
deKeyField:'hrcertificate'
};
......
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, GridControlBase } from '@/studio-core';
import HRTechnicalTitleService from '@/service/hrtechnical-title/hrtechnical-title-service';
import GRID_001Service from './grid-001-grid-service';
import HRTechnicalTitleUIService from '@/uiservice/hrtechnical-title/hrtechnical-title-ui-service';
import { FormItemModel } from '@/model/form-detail';
/**
* grid部件基类
*
* @export
* @class GridControlBase
* @extends {GRID_001GridBase}
*/
export class GRID_001GridBase extends GridControlBase {
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof GRID_001GridBase
*/
protected controlType: string = 'GRID';
/**
* 建构部件服务对象
*
* @type {GRID_001Service}
* @memberof GRID_001GridBase
*/
public service: GRID_001Service = new GRID_001Service({ $store: this.$store });
/**
* 实体服务对象
*
* @type {HRTechnicalTitleService}
* @memberof GRID_001GridBase
*/
public appEntityService: HRTechnicalTitleService = new HRTechnicalTitleService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof GRID_001GridBase
*/
protected appDeName: string = 'hrtechnicaltitle';
/**
* 应用实体中文名称
*
* @protected
* @type {string}
* @memberof GRID_001GridBase
*/
protected appDeLogicName: string = '职称信息';
/**
* 界面UI服务对象
*
* @type {HRTechnicalTitleUIService}
* @memberof GRID_001Base
*/
public appUIService:HRTechnicalTitleUIService = new HRTechnicalTitleUIService(this.$store);
/**
* 界面行为模型
*
* @type {*}
* @memberof GRID_001Base
*/
public ActionModel: any = {
};
/**
* 本地缓存标识
*
* @protected
* @type {string}
* @memberof GRID_001Base
*/
protected localStorageTag: string = 'hrtechnicaltitle_grid_001_grid';
/**
* 所有列成员
*
* @type {any[]}
* @memberof GRID_001GridBase
*/
public allColumns: any[] = [
{
name: 'hrtechnicaltitlename',
label: '职称名称',
langtag: 'entities.hrtechnicaltitle.grid_001_grid.columns.hrtechnicaltitlename',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'titlelevel',
label: '职称等级',
langtag: 'entities.hrtechnicaltitle.grid_001_grid.columns.titlelevel',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'majortype',
label: '专业类别',
langtag: 'entities.hrtechnicaltitle.grid_001_grid.columns.majortype',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'major',
label: '专业名称',
langtag: 'entities.hrtechnicaltitle.grid_001_grid.columns.major',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'titletime',
label: '获取时间',
langtag: 'entities.hrtechnicaltitle.grid_001_grid.columns.titletime',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'authorganization',
label: '签发机构',
langtag: 'entities.hrtechnicaltitle.grid_001_grid.columns.authorganization',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
{
name: 'hightitle',
label: '最高职称',
langtag: 'entities.hrtechnicaltitle.grid_001_grid.columns.hightitle',
show: true,
util: 'PX',
isEnableRowEdit: false,
},
]
/**
* 获取表格行模型
*
* @type {*}
* @memberof GRID_001GridBase
*/
public getGridRowModel(){
return {
srfkey: new FormItemModel(),
}
}
/**
* 属性值规则
*
* @type {*}
* @memberof GRID_001GridBase
*/
public rules: any = {
srfkey: [
{ required: false, validator: (rule:any, value:any, callback:any) => { return (rule.required && (value === null || value === undefined || value === "")) ? false : true;}, message: '职称信息标识 值不能为空', trigger: 'change' },
{ required: false, validator: (rule:any, value:any, callback:any) => { return (rule.required && (value === null || value === undefined || value === "")) ? false : true;}, message: '职称信息标识 值不能为空', trigger: 'blur' },
],
}
/**
* 获取对应列class
*
* @type {*}
* @memberof GRID_001Base
*/
public hasRowEdit: any = {
'hrtechnicaltitlename':false,
'titlelevel':false,
'majortype':false,
'major':false,
'titletime':false,
'authorganization':false,
'hightitle':false,
};
/**
* 获取对应列class
*
* @param {*} $args row 行数据,column 列数据,rowIndex 行索引,列索引
* @returns {void}
* @memberof GRID_001Base
*/
public getCellClassName(args: {row: any, column: any, rowIndex: number, columnIndex: number}): any {
return ( this.hasRowEdit[args.column.property] && this.actualIsOpenEdit ) ? "edit-cell" : "info-cell";
}
/**
* 导出数据格式化
*
* @param {*} filterVal
* @param {*} jsonData
* @param {any[]} [codelistColumns=[]]
* @returns {Promise<any>}
* @memberof GRID_001GridBase
*/
public async formatExcelData(filterVal: any, jsonData: any, codelistColumns?: any[]): Promise<any> {
return super.formatExcelData(filterVal, jsonData, [
{
name: 'hightitle',
srfkey: 'YesNo',
codelistType : 'STATIC',
renderMode: 'other',
textSeparator: '、',
valueSeparator: ',',
},
]);
}
}
\ No newline at end of file
/**
* GRID_001 部件模型
*
* @export
* @class GRID_001Model
*/
export default class GRID_001Model {
/**
* 是否是实体数据导出
*
* @returns {any[]}
* @memberof GRID_001GridMode
*/
public isDEExport: boolean = false;
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof GRID_001GridMode
*/
public getDataItems(): any[] {
if(this.isDEExport){
return [
]
}else{
return [
{
name: 'hightitle',
prop: 'hightitle',
dataType: 'YESNO',
},
{
name: 'hremployeeid',
prop: 'hremployeeid',
dataType: 'PICKUP',
},
{
name: 'titlelevel',
prop: 'titlelevel',
dataType: 'SSCODELIST',
},
{
name: 'titletime',
prop: 'titletime',
dataType: 'DATE',
},
{
name: 'majortype',
prop: 'majortype',
dataType: 'TEXT',
},
{
name: 'hrtechnicaltitlename',
prop: 'hrtechnicaltitlename',
dataType: 'TEXT',
},
{
name: 'authorganization',
prop: 'authorganization',
dataType: 'TEXT',
},
{
name: 'srfmajortext',
prop: 'hrtechnicaltitlename',
dataType: 'TEXT',
},
{
name: 'srfdataaccaction',
prop: 'hrtechnicaltitleid',
dataType: 'GUID',
},
{
name: 'srfkey',
prop: 'hrtechnicaltitleid',
dataType: 'GUID',
isEditable:true
},
{
name: 'major',
prop: 'major',
dataType: 'TEXT',
},
{
name: 'hrtechnicaltitle',
prop: 'hrtechnicaltitleid',
},
{
name:'size',
prop:'size'
},
{
name:'query',
prop:'query'
},
{
name:'filter',
prop:'filter'
},
{
name:'page',
prop:'page'
},
{
name:'sort',
prop:'sort'
},
{
name:'srfparentdata',
prop:'srfparentdata'
},
// 前端新增修改标识,新增为"0",修改为"1"或未设值
{
name: 'srffrontuf',
prop: 'srffrontuf',
dataType: 'TEXT',
},
]
}
}
}
\ No newline at end of file
import { Http,Util,Errorlog } from '@/utils';
import ControlService from '@/widgets/control-service';
import HRTechnicalTitleService from '@/service/hrtechnical-title/hrtechnical-title-service';
import GRID_001Model from './grid-001-grid-model';
/**
* GRID_001 部件服务对象
*
* @export
* @class GRID_001Service
*/
export default class GRID_001Service extends ControlService {
/**
* 职称信息服务对象
*
* @type {HRTechnicalTitleService}
* @memberof GRID_001Service
*/
public appEntityService: HRTechnicalTitleService = new HRTechnicalTitleService({ $store: this.getStore() });
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof GRID_001Service
*/
public setTempMode(){
this.isTempMode = false;
}
/**
* Creates an instance of GRID_001Service.
*
* @param {*} [opts={}]
* @memberof GRID_001Service
*/
constructor(opts: any = {}) {
super(opts);
this.model = new GRID_001Model();
}
/**
* 处理数据
*
* @public
* @param {Promise<any>} promise
* @returns {Promise<any>}
* @memberof GRID_001Service
*/
public 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 GRID_001Service
*/
@Errorlog
public getItems(serviceName: string, interfaceName: string, context: any = {}, data: any, isloading?: boolean): Promise<any[]> {
data.page = data.page ? data.page : 0;
data.size = data.size ? data.size : 1000;
return Promise.reject([])
}
/**
* 添加数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof GRID_001Service
*/
@Errorlog
public add(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestDataWithUpdate(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
const _appEntityService: any = this.appEntityService;
let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
}else{
result =_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 GRID_001Service
*/
@Errorlog
public delete(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
const _appEntityService: any = this.appEntityService;
let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
}else{
result =_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 GRID_001Service
*/
@Errorlog
public update(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestDataWithUpdate(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
const _appEntityService: any = this.appEntityService;
let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data,isloading);
}else{
result =_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 GRID_001Service
*/
@Errorlog
public get(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true);
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) => {
//处理返回数据,补充判断标识
if(response.data){
Object.assign(response.data,{srfuf:0});
}
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 查询数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof GRID_001Service
*/
@Errorlog
public search(action: string,context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
const _appEntityService: any = this.appEntityService;
let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
}else{
result =_appEntityService.FetchDefault(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 GRID_001Service
*/
@Errorlog
public loadDraft(action: string, context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true);
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) => {
//处理返回数据,补充判断标识
if(response.data){
Object.assign(response.data,{srfuf:'0'});
//仿真主键数据
response.data.hrtechnicaltitleid = Util.createUUID();
}
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 GRID_001Service
*/
@Errorlog
public frontLogic(action:string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true);
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);
resolve(response);
}).catch(response => {
reject(response);
});
})
}
/**
* 处理请求数据(修改或增加数据)
*
* @param action 行为
* @param data 数据
* @memberof GRID_001Service
*/
public handleRequestDataWithUpdate(action: string,context:any ={},data: any = {},isMerge:boolean = false){
let model: any = this.getMode();
if (!model && model.getDataItems instanceof Function) {
return data;
}
let dataItems: any[] = model.getDataItems();
let requestData:any = {};
if(isMerge && (data && data.viewparams)){
Object.assign(requestData,data.viewparams);
}
dataItems.forEach((item:any) =>{
if(item && item.dataType && Object.is(item.dataType,'FONTKEY')){
if(item && item.prop && item.name ){
requestData[item.prop] = context[item.name];
}
}else{
if(item && item.isEditable && item.prop && item.name && (data[item.name] || Object.is(data[item.name],0)) ){
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
<div :class="{ 'grid': true, 'show-paging-bar': isEnablePagingBar, 'hidden-paging-bar': !isEnablePagingBar }">
<i-form>
<el-table v-if="isDisplay === true"
:default-sort="{ prop: minorSortPSDEF, order: Object.is(minorSortDir, 'ASC') ? 'ascending' : Object.is(minorSortDir, 'DESC') ? 'descending' : '' }"
@sort-change="onSortChange($event)"
:border="isDragendCol"
:highlight-current-row ="isSingleSelect"
:row-class-name="getRowClassName.bind(_self)"
:cell-class-name="getCellClassName.bind(_self)"
size="mini"
stripe
@row-click="rowClick($event)"
@select-all="selectAll($event)"
@select="select($event)"
@row-class-name="onRowClassName($event)"
@row-dblclick="rowDBLClick($event)"
ref='multipleTable' :data="items" :show-header="!isHideHeader">
<template slot="empty">
无数据
<span class="quick-toolbar">
</span>
</template>
<template v-if="!isSingleSelect">
<el-table-column align="center" type='selection' :width="checkboxColWidth"></el-table-column>
</template>
<template v-if="getColumnState('hrtechnicaltitlename')">
<el-table-column show-overflow-tooltip :prop="'hrtechnicaltitlename'" :label="$t('entities.hrtechnicaltitle.grid_001_grid.columns.hrtechnicaltitlename')" :width="150" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.hrtechnicaltitle.grid_001_grid.columns.hrtechnicaltitlename')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.hrtechnicaltitlename}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('titlelevel')">
<el-table-column show-overflow-tooltip :prop="'titlelevel'" :label="$t('entities.hrtechnicaltitle.grid_001_grid.columns.titlelevel')" :width="120" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.hrtechnicaltitle.grid_001_grid.columns.titlelevel')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.titlelevel}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('majortype')">
<el-table-column show-overflow-tooltip :prop="'majortype'" :label="$t('entities.hrtechnicaltitle.grid_001_grid.columns.majortype')" :width="150" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.hrtechnicaltitle.grid_001_grid.columns.majortype')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.majortype}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('major')">
<el-table-column show-overflow-tooltip :prop="'major'" :label="$t('entities.hrtechnicaltitle.grid_001_grid.columns.major')" :width="150" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.hrtechnicaltitle.grid_001_grid.columns.major')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.major}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('titletime')">
<el-table-column show-overflow-tooltip :prop="'titletime'" :label="$t('entities.hrtechnicaltitle.grid_001_grid.columns.titletime')" :width="120" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.hrtechnicaltitle.grid_001_grid.columns.titletime')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<app-format-data format="YYYY-MM-DD" :data="row.titletime"></app-format-data>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('authorganization')">
<el-table-column show-overflow-tooltip :prop="'authorganization'" :label="$t('entities.hrtechnicaltitle.grid_001_grid.columns.authorganization')" :width="150" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.hrtechnicaltitle.grid_001_grid.columns.authorganization')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.authorganization}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('hightitle')">
<el-table-column show-overflow-tooltip :prop="'hightitle'" :label="$t('entities.hrtechnicaltitle.grid_001_grid.columns.hightitle')" :width="120" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.hrtechnicaltitle.grid_001_grid.columns.hightitle')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<template >
<codelist :value="row.hightitle" tag='YesNo' codelistType='STATIC' ></codelist>
</template>
</template>
</el-table-column>
</template>
<template v-if="adaptiveState">
<el-table-column></el-table-column>
</template>
</el-table>
<row class='grid-pagination' v-show="items.length > 0">
<page class='pull-right' @on-change="pageOnChange($event)"
@on-page-size-change="onPageSizeChange($event)"
:transfer="true" :total="totalRecord"
show-sizer :current="curPage" :page-size="limit"
:page-size-opts="[10, 20, 30, 40, 50, 60, 70, 80, 90, 100]" show-elevator show-total>
<span>
<span class="page-column">
<poptip transfer placement="top-start">
<i-button icon="md-menu">{{$t('app.gridpage.choicecolumns')}}</i-button>
<div slot="content">
<template v-for="col in allColumns">
<div :key="col.name"><el-checkbox v-model="col.show" @change="onColChange()">{{$t(col.langtag)}}</el-checkbox></div>
</template>
</div>
</poptip>
</span>
<span v-if="selections.length > 0" class="batch-toolbar">
</span>
<span class="page-button"><i-button icon="md-refresh" :title="$t('app.gridpage.refresh')" @click="pageRefresh()"></i-button></span>&nbsp;
<span>
{{$t('app.gridpage.show')}}&nbsp;
<span>
<template v-if="items.length === 1">
1
</template>
<template v-else>
<span>{{(curPage - 1) * limit + 1}}&nbsp;-&nbsp;{{totalRecord > curPage * limit ? curPage * limit : totalRecord}}</span>
</template>
</span>&nbsp;
{{$t('app.gridpage.records')}},{{$t('app.gridpage.totle')}}&nbsp;{{totalRecord}}&nbsp;{{$t('app.gridpage.records')}}
</span>
</span>
</page>
</row>
</i-form>
</div>
\ No newline at end of file
<template src="./grid-001-grid.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { GRID_001GridBase } from './grid-001-grid-base';
/**
* grid部件
*
* @export
* @class GRID_001Grid
* @extends {GRID_001GridBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class GRID_001Grid extends GRID_001GridBase { }
</script>
......@@ -68,7 +68,7 @@
<!--输出实体[HRCERTIFICATE]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-hrcertificate-27-3">
<changeSet author="a_LAB01_e85d8801c" id="tab-hrcertificate-38-3">
<createTable tableName="T_HRCERTIFICATE">
<column name="HRCERTIFICATEID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_HRCERTIFICATE_HRCERTIFICATE"/>
......@@ -110,7 +110,7 @@
<!--输出实体[HRCONTRACT]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-hrcontract-135-4">
<changeSet author="a_LAB01_e85d8801c" id="tab-hrcontract-136-4">
<createTable tableName="T_HRCONTRACT">
<column name="CREATEMAN" remarks="" type="VARCHAR(60)">
</column>
......@@ -366,7 +366,7 @@
<!--输出实体[HREMPLOYEE]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-hremployee-288-12">
<changeSet author="a_LAB01_e85d8801c" id="tab-hremployee-290-12">
<createTable tableName="EMPLOYEE">
<column name="EMPLOYEENAME" remarks="" type="VARCHAR(200)">
</column>
......@@ -960,7 +960,7 @@
<!--输出实体[HRTECHNICALTITLE]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-hrtechnicaltitle-38-31">
<changeSet author="a_LAB01_e85d8801c" id="tab-hrtechnicaltitle-42-31">
<createTable tableName="T_HRTECHNICALTITLE">
<column name="HRTECHNICALTITLEID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_HRTECHNICALTITLE_HRTECHNICA"/>
......@@ -1022,7 +1022,7 @@
<!--输出实体[HRTRANSFERAPPLY]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-hrtransferapply-154-33">
<changeSet author="a_LAB01_e85d8801c" id="tab-hrtransferapply-164-33">
<createTable tableName="T_HRTRANSFERAPPLY">
<column name="HRTRANSFERAPPLYID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_HRTRANSFERAPPLY_HRTRANSFERA"/>
......@@ -1108,17 +1108,17 @@
</changeSet>
<!--输出实体[HRATTENDANCE]外键关系 -->
<!--输出实体[HRCERTIFICATE]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-hrcertificate-27-36">
<changeSet author="a_LAB01_e85d8801c" id="fk-hrcertificate-38-36">
<addForeignKeyConstraint baseColumnNames="HREMPLOYEEID" baseTableName="T_HRCERTIFICATE" constraintName="DER1N_HRCERTIFICATE_HREMPLOYEE" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EMPLOYEEID" referencedTableName="EMPLOYEE" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-hrcertificate-27-37">
<changeSet author="a_LAB01_e85d8801c" id="fk-hrcertificate-38-37">
<addForeignKeyConstraint baseColumnNames="REGISTERORGANIZATIONID" baseTableName="T_HRCERTIFICATE" constraintName="DER1N_HRCERTIFICATE_HRORGANIZA" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ORGANIZATIONID" referencedTableName="ORGANIZATION" validate="true"/>
</changeSet>
<!--输出实体[HRCONTRACT]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-hrcontract-135-38">
<changeSet author="a_LAB01_e85d8801c" id="fk-hrcontract-136-38">
<addForeignKeyConstraint baseColumnNames="HREMPLOYEEID" baseTableName="T_HRCONTRACT" constraintName="DER1N_HRCONTRACT_HREMPLOYEE_HR" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EMPLOYEEID" referencedTableName="EMPLOYEE" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-hrcontract-135-39">
<changeSet author="a_LAB01_e85d8801c" id="fk-hrcontract-136-39">
<addForeignKeyConstraint baseColumnNames="MGRORGANIZATIONID" baseTableName="T_HRCONTRACT" constraintName="DER1N_HRCONTRACT_HRORGANIZATIO" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ORGANIZATIONID" referencedTableName="ORGANIZATION" validate="true"/>
</changeSet>
<!--输出实体[HRDISTRIBUTION]外键关系 -->
......@@ -1147,13 +1147,13 @@
</changeSet>
<!--输出实体[HREMPSTATE]外键关系 -->
<!--输出实体[HREMPLOYEE]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-hremployee-288-47">
<changeSet author="a_LAB01_e85d8801c" id="fk-hremployee-290-47">
<addForeignKeyConstraint baseColumnNames="ORGANIZATIONID" baseTableName="EMPLOYEE" constraintName="DER1N_EMPLOYEE_ORGANIZATION_OR" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ORGANIZATIONID" referencedTableName="ORGANIZATION" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-hremployee-288-48">
<changeSet author="a_LAB01_e85d8801c" id="fk-hremployee-290-48">
<addForeignKeyConstraint baseColumnNames="EMPSTATE" baseTableName="EMPLOYEE" constraintName="DER1N_HREMPLOYEE_HREMPSTATE_EM" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="HREMPSTATEID" referencedTableName="T_HREMPSTATE" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-hremployee-288-49">
<changeSet author="a_LAB01_e85d8801c" id="fk-hremployee-290-49">
<addForeignKeyConstraint baseColumnNames="HRPOSTID" baseTableName="EMPLOYEE" constraintName="DER1N_HREMPLOYEE_HRPOST_HRPOST" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="HRPOSTID" referencedTableName="T_HRPOST" validate="true"/>
</changeSet>
<!--输出实体[HRFAMILY]外键关系 -->
......@@ -1223,7 +1223,7 @@
<addForeignKeyConstraint baseColumnNames="HREMPLOYEEID" baseTableName="T_HRREWARD" constraintName="DER1N_HRREWARD_HREMPLOYEE_HREM" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EMPLOYEEID" referencedTableName="EMPLOYEE" validate="true"/>
</changeSet>
<!--输出实体[HRTECHNICALTITLE]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-hrtechnicaltitle-38-67">
<changeSet author="a_LAB01_e85d8801c" id="fk-hrtechnicaltitle-42-67">
<addForeignKeyConstraint baseColumnNames="HREMPLOYEEID" baseTableName="T_HRTECHNICALTITLE" constraintName="DER1N_HRTECHNICALTITLE_HREMPLO" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EMPLOYEEID" referencedTableName="EMPLOYEE" validate="true"/>
</changeSet>
<!--输出实体[HRTRAININGRECORD]外键关系 -->
......@@ -1231,13 +1231,13 @@
<addForeignKeyConstraint baseColumnNames="HREMPLOYEEID" baseTableName="T_HRTRAININGRECORD" constraintName="DER1N_HRTRAININGRECORD_HREMPLO" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EMPLOYEEID" referencedTableName="EMPLOYEE" validate="true"/>
</changeSet>
<!--输出实体[HRTRANSFERAPPLY]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-hrtransferapply-154-69">
<changeSet author="a_LAB01_e85d8801c" id="fk-hrtransferapply-164-69">
<addForeignKeyConstraint baseColumnNames="HREMPLOYEEID" baseTableName="T_HRTRANSFERAPPLY" constraintName="DER1N_HRTRANSFERAPPLY_HREMPLOY" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EMPLOYEEID" referencedTableName="EMPLOYEE" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-hrtransferapply-154-70">
<changeSet author="a_LAB01_e85d8801c" id="fk-hrtransferapply-164-70">
<addForeignKeyConstraint baseColumnNames="HRORGANIZATIONID2" baseTableName="T_HRTRANSFERAPPLY" constraintName="DER1N_HRTRANSFERAPPLY_HRORGANI" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ORGANIZATIONID" referencedTableName="ORGANIZATION" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-hrtransferapply-154-71">
<changeSet author="a_LAB01_e85d8801c" id="fk-hrtransferapply-164-71">
<addForeignKeyConstraint baseColumnNames="HRPOSTID2" baseTableName="T_HRTRANSFERAPPLY" constraintName="DER1N_HRTRANSFERAPPLY_HRPOST_H" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="HRPOSTID" referencedTableName="T_HRPOST" validate="true"/>
</changeSet>
<!--输出实体[HRWORKRECORD]外键关系 -->
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册