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

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

上级 e990feaf
......@@ -231,9 +231,12 @@ export default {
remove: "Remove",
},
},
dataview_dataview: {
usr_dataview: {
nodata:"",
uiactions: {
new: "New",
edit: "Edit",
remove: "Remove",
},
},
default_searchform: {
......@@ -400,6 +403,22 @@ export default {
},
dataviewtoolbar_toolbar: {
},
dataviewdataview_quicktoolbar_toolbar: {
deuiaction1: {
caption: "New",
tip: "New",
},
},
dataviewdataview_batchtoolbar_toolbar: {
deuiaction1: {
caption: "Edit",
tip: "Edit {0}",
},
deuiaction2: {
caption: "Remove",
tip: "Remove {0}",
},
},
autogrouplistviewtoolbar_toolbar: {
},
updatedefaultgridviewtoolbar_toolbar: {
......
......@@ -230,9 +230,12 @@ export default {
remove: "批量删除",
},
},
dataview_dataview: {
usr_dataview: {
nodata:"",
uiactions: {
new: "新建",
edit: "编辑",
remove: "批量删除",
},
},
default_searchform: {
......@@ -399,6 +402,22 @@ export default {
},
dataviewtoolbar_toolbar: {
},
dataviewdataview_quicktoolbar_toolbar: {
deuiaction1: {
caption: "新建",
tip: "新建",
},
},
dataviewdataview_batchtoolbar_toolbar: {
deuiaction1: {
caption: "编辑",
tip: "编辑",
},
deuiaction2: {
caption: "删除",
tip: "删除",
},
},
autogrouplistviewtoolbar_toolbar: {
},
updatedefaultgridviewtoolbar_toolbar: {
......
......@@ -110,12 +110,12 @@ export default {
f27: "数据选择(无AC、数据链接)",
f28: "数据选择(下拉)",
f29: "数据选择(下拉、数据链接)",
ibizsample0001id: "值项表单项",
ibizsample0002id: "值项表单项",
f30: "自动填充",
f31: "自动填充(只能选择)",
f32: "自动填充(无按钮)",
f33: "自动填充(只能选择、无按钮)",
formitem: "",
ibizsample0001id: "IBIZSAMPLE0001标识",
},
uiactions: {
},
......
......@@ -109,12 +109,12 @@ export default {
f27: "数据选择(无AC、数据链接)",
f28: "数据选择(下拉)",
f29: "数据选择(下拉、数据链接)",
ibizsample0001id: "值项表单项",
ibizsample0002id: "值项表单项",
f30: "自动填充",
f31: "自动填充(只能选择)",
f32: "自动填充(无按钮)",
f33: "自动填充(只能选择、无按钮)",
formitem: "",
ibizsample0001id: "IBIZSAMPLE0001标识",
},
uiactions: {
},
......
......@@ -3,7 +3,7 @@ import { Component } from 'vue-property-decorator';
import IBIZBOOKDataViewBase from './ibizbookdata-view-base.vue';
import view_searchform from '@widgets/ibizbook/default-searchform/default-searchform.vue';
import view_dataview from '@widgets/ibizbook/dataview-dataview/dataview-dataview.vue';
import view_dataview from '@widgets/ibizbook/usr-dataview/usr-dataview.vue';
@Component({
components: {
view_searchform,
......
.view-card {
>.ivu-card-extra {
top: 5px;
right: 0px;
}
}
.ibizsample0002-edit-view{
position: relative;
}
.toolbar-container {
button {
margin: 6px 0px 4px 4px;
.caption {
margin-left: 4px;
}
}
.seperator {
color: #dcdee2;
margin: 0 0px 0 4px;
}
}
// this is less
.deepskyblueToolBar {color:white !important;background-color:#108cee !important;}
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import IBIZSample0002EditViewBase from './ibizsample0002-edit-view-base.vue';
import view_form from '@widgets/ibizsample0002/main-form/main-form.vue';
@Component({
components: {
view_form,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
if(!Object.is(vm.navModel,"route")){
vm.initNavDataWithTab(vm.viewCacheData);
}
vm.$store.commit('addCurPageViewtag', { fullPath: to.fullPath, viewtag: vm.viewtag });
});
},
})
export default class IBIZSample0002EditView extends IBIZSample0002EditViewBase {
}
</script>
\ No newline at end of file
.ibizsample0002-pickup-grid-view{
position: relative;
}
.ibizsample0002-pickup-grid-view{
display: block;
}
\ No newline at end of file
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import IBIZSample0002PickupGridViewBase from './ibizsample0002-pickup-grid-view-base.vue';
import view_grid from '@widgets/ibizsample0002/main-grid/main-grid.vue';
import view_searchform from '@widgets/ibizsample0002/default-searchform/default-searchform.vue';
@Component({
components: {
view_grid,
view_searchform,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
if(!Object.is(vm.navModel,"route")){
vm.initNavDataWithTab(vm.viewCacheData);
}
vm.$store.commit('addCurPageViewtag', { fullPath: to.fullPath, viewtag: vm.viewtag });
});
},
})
export default class IBIZSample0002PickupGridView extends IBIZSample0002PickupGridViewBase {
}
</script>
\ No newline at end of file
.ibizsample0002-pickup-view{
position: relative;
}
.pickup-view {
>.pickupviewpanel {
flex-grow: 1;
display: flex;
justify-content: flex-end;
height: calc(100% - 64px);
}
>.footer {
height: 64px;
}
}
\ No newline at end of file
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import IBIZSample0002PickupViewBase from './ibizsample0002-pickup-view-base.vue';
import view_pickupviewpanel from '@widgets/ibizsample0002/pickup-viewpickupviewpanel-pickupviewpanel/pickup-viewpickupviewpanel-pickupviewpanel.vue';
@Component({
components: {
view_pickupviewpanel,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
if(!Object.is(vm.navModel,"route")){
vm.initNavDataWithTab(vm.viewCacheData);
}
vm.$store.commit('addCurPageViewtag', { fullPath: to.fullPath, viewtag: vm.viewtag });
});
},
})
export default class IBIZSample0002PickupView extends IBIZSample0002PickupViewBase {
}
</script>
\ No newline at end of file
......@@ -8,6 +8,7 @@ export const PageComponents = {
Vue.component('ibizorder-sgrid-view', () => import('@pages/sample/ibizorder-sgrid-view/ibizorder-sgrid-view.vue'));
Vue.component('ibizuniproduct-pickup-view', () => import('@pages/sample/ibizuniproduct-pickup-view/ibizuniproduct-pickup-view.vue'));
Vue.component('ibizsample0001-sf4-edit-view', () => import('@pages/sample/ibizsample0001-sf4-edit-view/ibizsample0001-sf4-edit-view.vue'));
Vue.component('ibizsample0002-edit-view', () => import('@pages/sample/ibizsample0002-edit-view/ibizsample0002-edit-view.vue'));
Vue.component('ibizsoftware-suit-sgrid-view', () => import('@pages/sample/ibizsoftware-suit-sgrid-view/ibizsoftware-suit-sgrid-view.vue'));
Vue.component('ibizorder-bar-chart-view', () => import('@pages/sample/ibizorder-bar-chart-view/ibizorder-bar-chart-view.vue'));
Vue.component('ibizsample0003-stree-exp-view2', () => import('@pages/sample/ibizsample0003-stree-exp-view2/ibizsample0003-stree-exp-view2.vue'));
......@@ -21,12 +22,12 @@ export const PageComponents = {
Vue.component('ibizuniproduct-pickup-grid-view', () => import('@pages/sample/ibizuniproduct-pickup-grid-view/ibizuniproduct-pickup-grid-view.vue'));
Vue.component('ibizorder-odsp-wfexp-view', () => import('@pages/sample/ibizorder-odsp-wfexp-view/ibizorder-odsp-wfexp-view.vue'));
Vue.component('ibizorder-detail-sgrid-view', () => import('@pages/sample/ibizorder-detail-sgrid-view/ibizorder-detail-sgrid-view.vue'));
Vue.component('ibizsample0002-pickup-grid-view', () => import('@pages/sample/ibizsample0002-pickup-grid-view/ibizsample0002-pickup-grid-view.vue'));
Vue.component('ibizsoftware-suit-edit-view', () => import('@pages/sample/ibizsoftware-suit-edit-view/ibizsoftware-suit-edit-view.vue'));
Vue.component('ibizorder-pickup-view', () => import('@pages/sample/ibizorder-pickup-view/ibizorder-pickup-view.vue'));
Vue.component('ibizorder-sf4-grid-view', () => import('@pages/sample/ibizorder-sf4-grid-view/ibizorder-sf4-grid-view.vue'));
Vue.component('ibizsample0003-grid-view', () => import('@pages/sample/ibizsample0003-grid-view/ibizsample0003-grid-view.vue'));
Vue.component('ibizsample0003-sf4-edit-view', () => import('@pages/sample/ibizsample0003-sf4-edit-view/ibizsample0003-sf4-edit-view.vue'));
Vue.component('ibizsample0015-pickup-grid-view', () => import('@pages/sample/ibizsample0015-pickup-grid-view/ibizsample0015-pickup-grid-view.vue'));
Vue.component('ibizorder-sf1-grid-view', () => import('@pages/sample/ibizorder-sf1-grid-view/ibizorder-sf1-grid-view.vue'));
Vue.component('ibizsample0003-pickup-grid-view', () => import('@pages/sample/ibizsample0003-pickup-grid-view/ibizsample0003-pickup-grid-view.vue'));
Vue.component('ibizsample0003-pickup-view', () => import('@pages/sample/ibizsample0003-pickup-view/ibizsample0003-pickup-view.vue'));
......@@ -34,7 +35,6 @@ export const PageComponents = {
Vue.component('ibizsample0017-form-pickup-data-view', () => import('@pages/sample/ibizsample0017-form-pickup-data-view/ibizsample0017-form-pickup-data-view.vue'));
Vue.component('ibizorder-sf5-grid-view', () => import('@pages/sample/ibizorder-sf5-grid-view/ibizorder-sf5-grid-view.vue'));
Vue.component('ibizcustomer-edit-view', () => import('@pages/sample/ibizcustomer-edit-view/ibizcustomer-edit-view.vue'));
Vue.component('ibizorder-type-pickup-grid-view', () => import('@pages/sample/ibizorder-type-pickup-grid-view/ibizorder-type-pickup-grid-view.vue'));
Vue.component('ibizhardware-edit-view', () => import('@pages/sample/ibizhardware-edit-view/ibizhardware-edit-view.vue'));
Vue.component('ibizorder-sedit-view2', () => import('@pages/sample/ibizorder-sedit-view2/ibizorder-sedit-view2.vue'));
Vue.component('ibizsample0017-edit-view', () => import('@pages/sample/ibizsample0017-edit-view/ibizsample0017-edit-view.vue'));
......@@ -54,13 +54,12 @@ export const PageComponents = {
Vue.component('ibizorder-s2-edit-view', () => import('@pages/sample/ibizorder-s2-edit-view/ibizorder-s2-edit-view.vue'));
Vue.component('ibizorder-sf4-edit-view', () => import('@pages/sample/ibizorder-sf4-edit-view/ibizorder-sf4-edit-view.vue'));
Vue.component('ibizorder-sf1-edit-view', () => import('@pages/sample/ibizorder-sf1-edit-view/ibizorder-sf1-edit-view.vue'));
Vue.component('ibizsample0013-pickup-view', () => import('@pages/sample/ibizsample0013-pickup-view/ibizsample0013-pickup-view.vue'));
Vue.component('ibizsample0017-grid-view', () => import('@pages/sample/ibizsample0017-grid-view/ibizsample0017-grid-view.vue'));
Vue.component('ibizorder-type-pickup-view', () => import('@pages/sample/ibizorder-type-pickup-view/ibizorder-type-pickup-view.vue'));
Vue.component('ibizorder-f8-edit-view', () => import('@pages/sample/ibizorder-f8-edit-view/ibizorder-f8-edit-view.vue'));
Vue.component('ibizsample0003-f1-tree-exp-view', () => import('@pages/sample/ibizsample0003-f1-tree-exp-view/ibizsample0003-f1-tree-exp-view.vue'));
Vue.component('ibizorder-f19-edit-view', () => import('@pages/sample/ibizorder-f19-edit-view/ibizorder-f19-edit-view.vue'));
Vue.component('ibizsample0017-f10-edit-view', () => import('@pages/sample/ibizsample0017-f10-edit-view/ibizsample0017-f10-edit-view.vue'));
Vue.component('ibizsample0002-pickup-view', () => import('@pages/sample/ibizsample0002-pickup-view/ibizsample0002-pickup-view.vue'));
Vue.component('ibizuniproduct-edit-view', () => import('@pages/sample/ibizuniproduct-edit-view/ibizuniproduct-edit-view.vue'));
Vue.component('ibizbookdata-view', () => import('@pages/sample/ibizbookdata-view/ibizbookdata-view.vue'));
Vue.component('ibizcustomer-pickup-view', () => import('@pages/sample/ibizcustomer-pickup-view/ibizcustomer-pickup-view.vue'));
......@@ -70,7 +69,6 @@ export const PageComponents = {
Vue.component('ibizorder-detail-sgrid-view9', () => import('@pages/sample/ibizorder-detail-sgrid-view9/ibizorder-detail-sgrid-view9.vue'));
Vue.component('ibizuniproduct-sgrid-view', () => import('@pages/sample/ibizuniproduct-sgrid-view/ibizuniproduct-sgrid-view.vue'));
Vue.component('ibizsample0003-f3-tree-exp-view', () => import('@pages/sample/ibizsample0003-f3-tree-exp-view/ibizsample0003-f3-tree-exp-view.vue'));
Vue.component('ibizsample0017-pickup-view', () => import('@pages/sample/ibizsample0017-pickup-view/ibizsample0017-pickup-view.vue'));
Vue.component('ibizorder-detail-sf1-edit-view', () => import('@pages/sample/ibizorder-detail-sf1-edit-view/ibizorder-detail-sf1-edit-view.vue'));
Vue.component('ibizorder-odsp-d30-wfgrid-view', () => import('@pages/sample/ibizorder-odsp-d30-wfgrid-view/ibizorder-odsp-d30-wfgrid-view.vue'));
Vue.component('ibizorder-area-chart-view', () => import('@pages/sample/ibizorder-area-chart-view/ibizorder-area-chart-view.vue'));
......@@ -119,9 +117,7 @@ export const PageComponents = {
Vue.component('ibizorder-radar-chart-view', () => import('@pages/sample/ibizorder-radar-chart-view/ibizorder-radar-chart-view.vue'));
Vue.component('ibizbookupdate-default-grid-view', () => import('@pages/sample/ibizbookupdate-default-grid-view/ibizbookupdate-default-grid-view.vue'));
Vue.component('ibizsample0003-stab-exp-view', () => import('@pages/sample/ibizsample0003-stab-exp-view/ibizsample0003-stab-exp-view.vue'));
Vue.component('ibizsample0017-pickup-grid-view', () => import('@pages/sample/ibizsample0017-pickup-grid-view/ibizsample0017-pickup-grid-view.vue'));
Vue.component('ibizbookauto-group-list-view', () => import('@pages/sample/ibizbookauto-group-list-view/ibizbookauto-group-list-view.vue'));
Vue.component('ibizsample0013-pickup-grid-view', () => import('@pages/sample/ibizsample0013-pickup-grid-view/ibizsample0013-pickup-grid-view.vue'));
Vue.component('ibizsample0003-sf5-edit-view', () => import('@pages/sample/ibizsample0003-sf5-edit-view/ibizsample0003-sf5-edit-view.vue'));
Vue.component('ibizuniproduct-grid-view9', () => import('@pages/sample/ibizuniproduct-grid-view9/ibizuniproduct-grid-view9.vue'));
Vue.component('ibizuniproduct-index-pickup-data-view', () => import('@pages/sample/ibizuniproduct-index-pickup-data-view/ibizuniproduct-index-pickup-data-view.vue'));
......
......@@ -25,16 +25,6 @@ export const viewstate: any = {
'55c0b817ceaaa2894e76b510d94da24c',
],
},
{
viewtag: '03c54f13883f56a08229c1a2db6a283f',
viewmodule: 'Sample',
viewname: 'IBIZOrderTypePickupView',
viewaction: '',
viewdatachange: false,
refviews: [
'31b21893ee8c5d0d9922c324daa524fd',
],
},
{
viewtag: '06f6c93b65230d180597e6bd32051447',
viewmodule: 'Sample',
......@@ -52,10 +42,8 @@ export const viewstate: any = {
viewaction: '',
viewdatachange: false,
refviews: [
'03c54f13883f56a08229c1a2db6a283f',
'9ca3b289765416a9d9f35ab0ead5a954',
'ca4d303820103b229490282d1d850702',
'3169df07474ba775203f9635eb0e9b9a',
'2dd64fdd5e7303cc73090d949bc91d9b',
'581e6727bc5983c238cc9990ba5fdcac',
],
},
{
......@@ -300,19 +288,9 @@ export const viewstate: any = {
],
},
{
viewtag: '3169df07474ba775203f9635eb0e9b9a',
viewmodule: 'Sample',
viewname: 'IBIZSample0017PickupView',
viewaction: '',
viewdatachange: false,
refviews: [
'4eb5a5f5e8814b94e51a68cf752d2907',
],
},
{
viewtag: '31b21893ee8c5d0d9922c324daa524fd',
viewtag: '2dd64fdd5e7303cc73090d949bc91d9b',
viewmodule: 'Sample',
viewname: 'IBIZOrderTypePickupGridView',
viewname: 'IBIZSample0002EditView',
viewaction: '',
viewdatachange: false,
refviews: [
......@@ -449,15 +427,6 @@ export const viewstate: any = {
'c153da73d5d5b62475f4213de51a25e0',
],
},
{
viewtag: '4eb5a5f5e8814b94e51a68cf752d2907',
viewmodule: 'Sample',
viewname: 'IBIZSample0017PickupGridView',
viewaction: '',
viewdatachange: false,
refviews: [
],
},
{
viewtag: '4f314340a9325fb84709f24d317afb20',
viewmodule: 'Sample',
......@@ -516,6 +485,16 @@ export const viewstate: any = {
'ec6cfd868c34a036250a813b24068519',
],
},
{
viewtag: '581e6727bc5983c238cc9990ba5fdcac',
viewmodule: 'Sample',
viewname: 'IBIZSample0002PickupView',
viewaction: '',
viewdatachange: false,
refviews: [
'7a334494f71d4328c743657a6429ee03',
],
},
{
viewtag: '59c5d311d09a7f68f8b6962ca652374a',
viewmodule: 'Sample',
......@@ -625,28 +604,28 @@ export const viewstate: any = {
],
},
{
viewtag: '7a8b6138e5893e7aba3b1a5deb3b3036',
viewtag: '7a334494f71d4328c743657a6429ee03',
viewmodule: 'Sample',
viewname: 'IBIZOrderSGridView',
viewname: 'IBIZSample0002PickupGridView',
viewaction: '',
viewdatachange: false,
refviews: [
'f4cda6703c800c075704c5af5e58f2fc',
],
},
{
viewtag: '7d37165f2f535b4a6d2116188fe83d18',
viewtag: '7a8b6138e5893e7aba3b1a5deb3b3036',
viewmodule: 'Sample',
viewname: 'IBIZOrderBarChartView',
viewname: 'IBIZOrderSGridView',
viewaction: '',
viewdatachange: false,
refviews: [
'f4cda6703c800c075704c5af5e58f2fc',
],
},
{
viewtag: '8084d2af7c28ec941796eee0b810cc6e',
viewtag: '7d37165f2f535b4a6d2116188fe83d18',
viewmodule: 'Sample',
viewname: 'IBIZSample0013PickupGridView',
viewname: 'IBIZOrderBarChartView',
viewaction: '',
viewdatachange: false,
refviews: [
......@@ -767,15 +746,6 @@ export const viewstate: any = {
'b3429ecc4d89a02bc5f5279f1bd7f620',
],
},
{
viewtag: '9ca3b289765416a9d9f35ab0ead5a954',
viewmodule: 'Sample',
viewname: 'IBIZSample0015PickupGridView',
viewaction: '',
viewdatachange: false,
refviews: [
],
},
{
viewtag: '9d52aff477cf38e1d92ac24cd4a08c20',
viewmodule: 'Sample',
......@@ -1052,16 +1022,6 @@ export const viewstate: any = {
'54c2461e07dd79fdbecc2c1e3aec8096',
],
},
{
viewtag: 'ca4d303820103b229490282d1d850702',
viewmodule: 'Sample',
viewname: 'IBIZSample0013PickupView',
viewaction: '',
viewdatachange: false,
refviews: [
'8084d2af7c28ec941796eee0b810cc6e',
],
},
{
viewtag: 'd1ee943cf3137dc4d57ad59aa8c4b8cb',
viewmodule: 'Sample',
......
/**
* Usr 部件模型
*
* @export
* @class UsrModel
*/
export default class UsrModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof UsrDataViewMode
*/
public getDataItems(): any[] {
return [
{
name: 'author',
prop: 'author',
dataType: 'TEXT',
},
{
name: 'ibizbookname',
prop: 'ibizbookname',
dataType: 'TEXT',
},
{
name: 'type',
prop: 'type',
dataType: 'TEXT',
},
{
name: 'srfmajortext',
prop: 'ibizbookname',
dataType: 'TEXT',
},
{
name: 'srfkey',
prop: 'ibizbookid',
dataType: 'GUID',
},
{
name: 'ibizbook',
prop: 'ibizbookid',
dataType: 'FONTKEY',
},
{
name:'size',
prop:'size'
},
{
name:'query',
prop:'query'
},
{
name:'sort',
prop:'sort'
},
{
name:'page',
prop:'page'
},
{
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 IBIZBOOKService from '@/service/ibizbook/ibizbook-service';
import UsrModel from './usr-dataview-model';
/**
* Usr 部件服务对象
*
* @export
* @class UsrService
*/
export default class UsrService extends ControlService {
/**
* 图书服务对象
*
* @type {IBIZBOOKService}
* @memberof UsrService
*/
public appEntityService: IBIZBOOKService = new IBIZBOOKService({ $store: this.getStore() });
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof UsrService
*/
public setTempMode(){
this.isTempMode = false;
}
/**
* Creates an instance of UsrService.
*
* @param {*} [opts={}]
* @memberof UsrService
*/
constructor(opts: any = {}) {
super(opts);
this.model = new UsrModel();
}
/**
* 查询数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof UsrService
*/
@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 UsrService
*/
@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) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 添加数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof UsrService
*/
@Errorlog
public add(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.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 UsrService
*/
@Errorlog
public update(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.Update(Context,Data,isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
}
\ No newline at end of file
.app-data-view {
height: 100%;
overflow-y: auto;
overflow-x: hidden;
position: relative;
// 排序栏样式
.bar-container{
padding: 6px 8px;
background-color: #F1F1F1;
.ivu-row-flex.page-sort-bar{
width: 100%;
height: 30px;
.ivu-col{
user-select: none;
text-align: center;
display: flex;
align-items: flex-end;
padding-bottom: 4px;
background-color: #FFF;
border: 1px solid #CCC;
margin-left: -1px;
.sort-field-text{
margin-left: 7px;
}
.caret-wrapper{
width: 15px;
display: inline-block;
padding-bottom: 2px;
.ivu-icon{
display: block;
line-height: 0.5;
color: #c5c8ce;
}
}
}
// 悬浮样式
.ivu-col:hover{
border:1px solid #82bff7;
position:relative;
z-index:2;
.sort-field-text{
color: #82bff7;
}
}
// 选中样式
.sort-ascending, .sort-descending{
border:1px solid #82bff7;
position:relative;
z-index:2;
.sort-field-text{
color:#82bff7;
font-weight: 800;
}
}
.sort-ascending .caret-wrapper .ivu-icon.ivu-icon-md-arrow-dropup,
.sort-descending .caret-wrapper .ivu-icon.ivu-icon-md-arrow-dropdown{
color: #82bff7;
}
}
}
.data-view-container {
height: calc(100% - 42px);
align-content: start;
.el-collapse{
width: 100%;
.el-collapse-item__content{
display: flex;
}
}
.el-collapse-item__header.is-active{
color: #409eff;
background-color: #ecf5ff;
}
.ivu-col{
padding: 10px;
.el-card__body{
padding: 10px;
}
}
.el-card{
background-color: #f6f6f6;
color: #666666;
box-shadow: 0 2px 12px 0 #909399;
}
.single-card-data{
height: 100%;
width: 100%;
cursor: pointer;
border: 2px solid transparent;
.data-view-item{
.single-card-default {
.ivu-tooltip{
.ivu-tooltip-rel{
width: 150px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
text-align: left;
padding-left: 5px;
font-size: 18px;
font-weight: 800;
}
}
}
.single-card-img {
width: 150px;
height: calc(100% - 32px);
}
}
.data-view-item-action{
button{
margin: 0 3px;
cursor: pointer;
padding:3px;
}
button:hover{
color: #409eff;
}
}
}
.isselected{
border: 2px solid #82bff7;
box-shadow: 5px 5px 12px 0 #82bff7;
.ivu-tooltip{
color: #82bff7;
font-weight: 800;
}
}
.single-card-data:hover{
border: 2px solid #82bff7;
box-shadow: 5px 5px 12px 0 #82bff7;
.ivu-tooltip{
color: #82bff7;
font-weight: 800;
}
}
}
// 空值文本
.app-data-empty {
height: calc(100% - 42px);
color: #909399;
display: flex;
justify-content: center;
align-items: center;
}
.el-backtop {
position: absolute;
}
.dataview-pagination {
position: absolute;
height: 42px;
width: 100%;
top: 40px;
display: flex;
justify-content: flex-end;
align-items: center;
text-align: center;
font-size: 20px;
z-index: 5;
.dataview-pagination-icon{
width: 30px;
height: 30px;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
border:1px solid #dcdee2;
border-radius: 50%;
background-color: #FFF;
margin: 3px;
}
.dataview-pagination-icon:hover{
background-color: #409eff;
color: #fff;
}
}
}
// this is less
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import UsrBase from './usr-dataview-base.vue';
@Component({
components: {
}
})
export default class Usr extends UsrBase {
}
</script>
\ No newline at end of file
......@@ -187,35 +187,36 @@ export default class Main4Model {
},
{
name: 'f24',
dataType:'FORMITEM',
prop: 'ibizsample0002name',
dataType: 'PICKUPTEXT',
},
{
name: 'f25',
prop: 'field24',
dataType: 'CODELISTTEXT',
prop: 'ibizsample0002name',
dataType: 'PICKUPTEXT',
},
{
name: 'f26',
prop: 'field24',
dataType: 'CODELISTTEXT',
prop: 'ibizsample0002name',
dataType: 'PICKUPTEXT',
},
{
name: 'f27',
prop: 'field24',
dataType: 'CODELISTTEXT',
prop: 'ibizsample0002name',
dataType: 'PICKUPTEXT',
},
{
name: 'f28',
prop: 'field24',
dataType: 'CODELISTTEXT',
prop: 'ibizsample0002name',
dataType: 'PICKUPTEXT',
},
{
name: 'f29',
prop: 'field24',
dataType: 'CODELISTTEXT',
prop: 'ibizsample0002name',
dataType: 'PICKUPTEXT',
},
{
name: 'ibizsample0001id',
name: 'ibizsample0002id',
prop: 'ibizsample0001id',
dataType: 'GUID',
},
......@@ -233,7 +234,9 @@ export default class Main4Model {
name: 'f33',
},
{
name: 'formitem',
name: 'ibizsample0001id',
prop: 'ibizsample0001id',
dataType: 'GUID',
},
{
name: 'ibizsample0001',
......
......@@ -2,6 +2,7 @@ import { Http,Util,Errorlog } from '@/utils';
import ControlService from '@/widgets/control-service';
import IBIZSample0001Service from '@/service/ibizsample0001/ibizsample0001-service';
import Main4Model from './main4-form-model';
import IBIZSample0002Service from '@/service/ibizsample0002/ibizsample0002-service';
/**
......@@ -41,6 +42,14 @@ export default class Main4Service extends ControlService {
this.model = new Main4Model();
}
/**
* 示例实体02服务对象
*
* @type {IBIZSample0002Service}
* @memberof Main4Service
*/
public ibizsample0002Service: IBIZSample0002Service = new IBIZSample0002Service();
/**
* 远端数据
*
......@@ -90,6 +99,9 @@ export default class Main4Service 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, 'IBIZSample0002Service') && Object.is(interfaceName, 'FetchDefault')) {
return this.doItems(this.ibizsample0002Service.FetchDefault(JSON.parse(JSON.stringify(context)),data, isloading), 'ibizsample0002id', 'ibizsample0002');
}
return Promise.reject([])
}
......
import { Http } from '@/utils';
import ControlService from '@/widgets/control-service';
/**
* PickupViewpickupviewpanel 部件服务对象
*
* @export
* @class PickupViewpickupviewpanelService
*/
export default class PickupViewpickupviewpanelService extends ControlService {
}
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册