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

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

上级 22075f2e
......@@ -927,6 +927,14 @@
"viewname": "IBIZSample0003SPickupView2",
"viewtag": "df462fabce815005a40debffad2f43e6"
},
"ibizbookusr3dataview": {
"title": "图书数据视图(代码表分组)",
"caption": "图书",
"viewtype": "DEDATAVIEW",
"viewmodule": "Sample",
"viewname": "IBIZBOOKUsr3DataView",
"viewtag": "e14e0fa8f3def77ebbcf18f1f39c0225"
},
"ibizhardwareeditview": {
"title": "硬件编辑视图",
"caption": "硬件",
......@@ -967,6 +975,14 @@
"viewname": "IBIZOrderSGridView2",
"viewtag": "e7441fa67d425df343d996c745fb5d6b"
},
"ibizbookusr2dataview": {
"title": "图书数据视图(自动分组)",
"caption": "图书",
"viewtype": "DEDATAVIEW",
"viewmodule": "Sample",
"viewname": "IBIZBOOKUsr2DataView",
"viewtag": "e9b54ef29b192ecd2da05ff9570eb4d5"
},
"ibizsample0003f1treeexpview": {
"title": "示例实体03树导航视图",
"caption": "示例实体03",
......
......@@ -219,6 +219,8 @@ export default {
menuitem66: "后台界面行为",
menuitem87: "数据视图",
menuitem88: "内置功能",
menuitem89: "自动分组",
menuitem90: "代码表分组",
menuitem5: "视图",
menuitem9: "列表视图",
menuitem19: "常规表格视图",
......
......@@ -219,6 +219,8 @@ export default {
menuitem66: "后台界面行为",
menuitem87: "数据视图",
menuitem88: "内置功能",
menuitem89: "自动分组",
menuitem90: "代码表分组",
menuitem5: "视图",
menuitem9: "列表视图",
menuitem19: "常规表格视图",
......
......@@ -54,10 +54,18 @@ export default {
caption: "图书",
title: "图书数据视图",
},
usr3dataview: {
caption: "图书",
title: "图书数据视图(代码表分组)",
},
updatedefaultgridview: {
caption: "图书",
title: "图书表格视图(更新默认值)",
},
usr2dataview: {
caption: "图书",
title: "图书数据视图(自动分组)",
},
groupbycodelistlistview: {
caption: "图书",
title: "图书列表视图(代码表分组)",
......@@ -231,6 +239,16 @@ export default {
remove: "Remove",
},
},
usr2_dataview: {
nodata:"",
uiactions: {
},
},
usr3_dataview: {
nodata:"",
uiactions: {
},
},
usr_dataview: {
nodata:"",
uiactions: {
......@@ -335,6 +353,8 @@ export default {
},
groupbycodelistlistviewtoolbar_toolbar: {
},
usr2dataviewtoolbar_toolbar: {
},
newdefaultvaluegridviewtoolbar_toolbar: {
tbitem3: {
caption: "New",
......@@ -401,6 +421,8 @@ export default {
tip: "数据导入",
},
},
usr3dataviewtoolbar_toolbar: {
},
dataviewtoolbar_toolbar: {
},
dataviewdataview_quicktoolbar_toolbar: {
......
......@@ -53,10 +53,18 @@ export default {
caption: "图书",
title: "图书数据视图",
},
usr3dataview: {
caption: "图书",
title: "图书数据视图(代码表分组)",
},
updatedefaultgridview: {
caption: "图书",
title: "图书表格视图(更新默认值)",
},
usr2dataview: {
caption: "图书",
title: "图书数据视图(自动分组)",
},
groupbycodelistlistview: {
caption: "图书",
title: "图书列表视图(代码表分组)",
......@@ -230,6 +238,16 @@ export default {
remove: "批量删除",
},
},
usr2_dataview: {
nodata:"",
uiactions: {
},
},
usr3_dataview: {
nodata:"",
uiactions: {
},
},
usr_dataview: {
nodata:"",
uiactions: {
......@@ -334,6 +352,8 @@ export default {
},
groupbycodelistlistviewtoolbar_toolbar: {
},
usr2dataviewtoolbar_toolbar: {
},
newdefaultvaluegridviewtoolbar_toolbar: {
tbitem3: {
caption: "新建",
......@@ -400,6 +420,8 @@ export default {
tip: "数据导入",
},
},
usr3dataviewtoolbar_toolbar: {
},
dataviewtoolbar_toolbar: {
},
dataviewdataview_quicktoolbar_toolbar: {
......
......@@ -1031,6 +1031,42 @@ mock.onGet('v7/main-menuappmenu').reply((config: any) => {
textcls: '',
appfunctag: 'AppFunc14',
resourcetag: '',
},
{
id: 'F29C81F6-72C1-4E50-A234-E48CD739E4E2',
name: 'menuitem89',
text: '自动分组',
type: 'MENUITEM',
counterid: '',
tooltip: '自动分组',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: '',
icon: '',
textcls: '',
appfunctag: 'AppFunc15',
resourcetag: '',
},
{
id: 'F93188C2-7067-4B74-A5C8-21C067662E91',
name: 'menuitem90',
text: '代码表分组',
type: 'MENUITEM',
counterid: '',
tooltip: '代码表分组',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: '',
icon: '',
textcls: '',
appfunctag: 'AppFunc16',
resourcetag: '',
},
],
},
......
......@@ -935,6 +935,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "IBIZSample0003SPickupView2",
"viewtag": "df462fabce815005a40debffad2f43e6"
},
"ibizbookusr3dataview": {
"title": "图书数据视图(代码表分组)",
"caption": "图书",
"viewtype": "DEDATAVIEW",
"viewmodule": "Sample",
"viewname": "IBIZBOOKUsr3DataView",
"viewtag": "e14e0fa8f3def77ebbcf18f1f39c0225"
},
"ibizhardwareeditview": {
"title": "硬件编辑视图",
"caption": "硬件",
......@@ -975,6 +983,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "IBIZOrderSGridView2",
"viewtag": "e7441fa67d425df343d996c745fb5d6b"
},
"ibizbookusr2dataview": {
"title": "图书数据视图(自动分组)",
"caption": "图书",
"viewtype": "DEDATAVIEW",
"viewmodule": "Sample",
"viewname": "IBIZBOOKUsr2DataView",
"viewtag": "e9b54ef29b192ecd2da05ff9570eb4d5"
},
"ibizsample0003f1treeexpview": {
"title": "示例实体03树导航视图",
"caption": "示例实体03",
......
.ibizbookusr2-data-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
.ibizbookusr2-data-view{
display: block;
}
\ No newline at end of file
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import IBIZBOOKUsr2DataViewBase from './ibizbookusr2-data-view-base.vue';
import view_searchform from '@widgets/ibizbook/default-searchform/default-searchform.vue';
import view_dataview from '@widgets/ibizbook/usr2-dataview/usr2-dataview.vue';
@Component({
components: {
view_searchform,
view_dataview,
},
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 IBIZBOOKUsr2DataView extends IBIZBOOKUsr2DataViewBase {
}
</script>
\ No newline at end of file
.ibizbookusr3-data-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
.ibizbookusr3-data-view{
display: block;
}
\ No newline at end of file
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import IBIZBOOKUsr3DataViewBase from './ibizbookusr3-data-view-base.vue';
import view_searchform from '@widgets/ibizbook/default-searchform/default-searchform.vue';
import view_dataview from '@widgets/ibizbook/usr3-dataview/usr3-dataview.vue';
@Component({
components: {
view_searchform,
view_dataview,
},
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 IBIZBOOKUsr3DataView extends IBIZBOOKUsr3DataViewBase {
}
</script>
\ No newline at end of file
......@@ -35,6 +35,7 @@ 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('ibizbookusr3-data-view', () => import('@pages/sample/ibizbookusr3-data-view/ibizbookusr3-data-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'));
......@@ -86,6 +87,7 @@ export const PageComponents = {
Vue.component('ibizsoftware-suit-grid-view9', () => import('@pages/sample/ibizsoftware-suit-grid-view9/ibizsoftware-suit-grid-view9.vue'));
Vue.component('ibizorder-sf6-grid-view', () => import('@pages/sample/ibizorder-sf6-grid-view/ibizorder-sf6-grid-view.vue'));
Vue.component('ibizorder-detail-edit-view', () => import('@pages/sample/ibizorder-detail-edit-view/ibizorder-detail-edit-view.vue'));
Vue.component('ibizbookusr2-data-view', () => import('@pages/sample/ibizbookusr2-data-view/ibizbookusr2-data-view.vue'));
Vue.component('ibizbooklist-view', () => import('@pages/sample/ibizbooklist-view/ibizbooklist-view.vue'));
Vue.component('ibizsample0017-form-pickup-view', () => import('@pages/sample/ibizsample0017-form-pickup-view/ibizsample0017-form-pickup-view.vue'));
Vue.component('ibizbookrow-edit-grid-view', () => import('@pages/sample/ibizbookrow-edit-grid-view/ibizbookrow-edit-grid-view.vue'));
......
......@@ -570,6 +570,20 @@ const router = new Router({
},
component: () => import('@pages/sample/ibizcustomer-edit-view/ibizcustomer-edit-view.vue'),
},
{
path: 'ibizbooks/:ibizbook?/usr3dataview/:usr3dataview?',
meta: {
caption: 'entities.ibizbook.views.usr3dataview.caption',
info:'',
parameters: [
{ pathName: 'index', parameterName: 'index' },
{ pathName: 'ibizbooks', parameterName: 'ibizbook' },
{ pathName: 'usr3dataview', parameterName: 'usr3dataview' },
],
requireAuth: true,
},
component: () => import('@pages/sample/ibizbookusr3-data-view/ibizbookusr3-data-view.vue'),
},
{
path: 'ibizhardwares/:ibizhardware?/editview/:editview?',
meta: {
......@@ -1284,6 +1298,20 @@ const router = new Router({
},
component: () => import('@pages/sample/ibizorder-detail-edit-view/ibizorder-detail-edit-view.vue'),
},
{
path: 'ibizbooks/:ibizbook?/usr2dataview/:usr2dataview?',
meta: {
caption: 'entities.ibizbook.views.usr2dataview.caption',
info:'',
parameters: [
{ pathName: 'index', parameterName: 'index' },
{ pathName: 'ibizbooks', parameterName: 'ibizbook' },
{ pathName: 'usr2dataview', parameterName: 'usr2dataview' },
],
requireAuth: true,
},
component: () => import('@pages/sample/ibizbookusr2-data-view/ibizbookusr2-data-view.vue'),
},
{
path: 'ibizbooks/:ibizbook?/listview/:listview?',
meta: {
......@@ -3239,6 +3267,19 @@ const router = new Router({
},
component: () => import('@pages/sample/ibizsample0003-spickup-view2/ibizsample0003-spickup-view2.vue'),
},
{
path: '/ibizbooks/:ibizbook?/usr3dataview/:usr3dataview?',
meta: {
caption: 'entities.ibizbook.views.usr3dataview.caption',
info:'',
parameters: [
{ pathName: 'ibizbooks', parameterName: 'ibizbook' },
{ pathName: 'usr3dataview', parameterName: 'usr3dataview' },
],
requireAuth: true,
},
component: () => import('@pages/sample/ibizbookusr3-data-view/ibizbookusr3-data-view.vue'),
},
{
path: '/ibizhardwares/:ibizhardware?/editview/:editview?',
meta: {
......@@ -3304,6 +3345,19 @@ const router = new Router({
},
component: () => import('@pages/sample/ibizorder-sgrid-view2/ibizorder-sgrid-view2.vue'),
},
{
path: '/ibizbooks/:ibizbook?/usr2dataview/:usr2dataview?',
meta: {
caption: 'entities.ibizbook.views.usr2dataview.caption',
info:'',
parameters: [
{ pathName: 'ibizbooks', parameterName: 'ibizbook' },
{ pathName: 'usr2dataview', parameterName: 'usr2dataview' },
],
requireAuth: true,
},
component: () => import('@pages/sample/ibizbookusr2-data-view/ibizbookusr2-data-view.vue'),
},
{
path: '/ibizsample0003s/:ibizsample0003?/f1treeexpview/:f1treeexpview?',
meta: {
......
......@@ -177,6 +177,7 @@ export const viewstate: any = {
'e7441fa67d425df343d996c745fb5d6b',
'13ed6c02918e612bac45715a6f300f2f',
'aa68a83577209ff0ec3864aec4e194f2',
'e9b54ef29b192ecd2da05ff9570eb4d5',
'd69d223e4d3aeb8d947ac9b9ddc60a7e',
'b038c48269316664e5b48380a879fd99',
'19d36909f837de28880553dc9a190922',
......@@ -191,6 +192,7 @@ export const viewstate: any = {
'b7c0a73eb248d41eb750bbf095fa5505',
'd99f9680b535dcf3ad0d0f853a8b89d9',
'dd8d7ffe00cabb07784f30f66a5b34da',
'e14e0fa8f3def77ebbcf18f1f39c0225',
'd3255261c8522c660c1000cd0a61c3b0',
'5ccbd78fe47300a160915d6398b59604',
'51dc78a9ed0e9cd37d46bec7dbc7d172',
......@@ -1150,6 +1152,16 @@ export const viewstate: any = {
'692ede21641dfdb7075ede69d7c4ad33',
],
},
{
viewtag: 'e14e0fa8f3def77ebbcf18f1f39c0225',
viewmodule: 'Sample',
viewname: 'IBIZBOOKUsr3DataView',
viewaction: '',
viewdatachange: false,
refviews: [
'b3429ecc4d89a02bc5f5279f1bd7f620',
],
},
{
viewtag: 'e30db3af513fb7b7bf44a8744ed5f7a4',
viewmodule: 'Sample',
......@@ -1200,6 +1212,16 @@ export const viewstate: any = {
'f90fa878f2ed0eb4e27353786b10c3f4',
],
},
{
viewtag: 'e9b54ef29b192ecd2da05ff9570eb4d5',
viewmodule: 'Sample',
viewname: 'IBIZBOOKUsr2DataView',
viewaction: '',
viewdatachange: false,
refviews: [
'b3429ecc4d89a02bc5f5279f1bd7f620',
],
},
{
viewtag: 'ea604a66caf499c70c9002a917dd1694',
viewmodule: 'Sample',
......
......@@ -106,7 +106,9 @@ export default class IBIZBOOKUIServiceBase extends UIService {
this.allViewMap.set(':',{viewname:'roweditgridview',srfappde:'ibizbooks',component:'ibizbookrow-edit-grid-view'});
this.allViewMap.set(':',{viewname:'usr3gridview',srfappde:'ibizbooks',component:'ibizbookusr3-grid-view'});
this.allViewMap.set(':',{viewname:'dataview',srfappde:'ibizbooks',component:'ibizbookdata-view'});
this.allViewMap.set(':',{viewname:'usr3dataview',srfappde:'ibizbooks',component:'ibizbookusr3-data-view'});
this.allViewMap.set(':',{viewname:'updatedefaultgridview',srfappde:'ibizbooks',component:'ibizbookupdate-default-grid-view'});
this.allViewMap.set(':',{viewname:'usr2dataview',srfappde:'ibizbooks',component:'ibizbookusr2-data-view'});
this.allViewMap.set(':',{viewname:'groupbycodelistlistview',srfappde:'ibizbooks',component:'ibizbookgroup-by-codelist-list-view'});
this.allViewMap.set(':',{viewname:'internalfuncgridview',srfappde:'ibizbooks',component:'ibizbookinternal-func-grid-view'});
this.allViewMap.set(':',{viewname:'newdefaultvaluegridview',srfappde:'ibizbooks',component:'ibizbooknew-default-value-grid-view'});
......
......@@ -563,6 +563,9 @@ export default class MainMenuBase extends Vue implements ControlInterface {
case 'Auto151':
this.clickAuto151(item);
return;
case 'AppFunc15':
this.clickAppFunc15(item);
return;
case 'Auto258':
this.clickAuto258(item);
return;
......@@ -623,6 +626,9 @@ export default class MainMenuBase extends Vue implements ControlInterface {
case 'Auto393':
this.clickAuto393(item);
return;
case 'AppFunc16':
this.clickAppFunc16(item);
return;
case 'Auto319':
this.clickAuto319(item);
return;
......@@ -1079,6 +1085,29 @@ export default class MainMenuBase extends Vue implements ControlInterface {
})
}
/**
* 功能名称
*
* @param {*} [item={}]
* @memberof MainMenu
*/
public clickAppFunc15(item: any = {}) {
const viewparam: any = {};
Object.assign(viewparam, {});
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'ibizbooks', parameterName: 'ibizbook' },
{ pathName: 'usr2dataview', parameterName: 'usr2dataview' },
];
const path: string = this.$viewTool.buildUpRoutePath(this.$route, {}, deResParameters, parameters, [], viewparam);
if(Object.is(this.$route.fullPath,path)){
return;
}
this.$nextTick(function(){
this.$router.push(path);
})
}
/**
* 嵌入表格视图
*
......@@ -1539,6 +1568,29 @@ export default class MainMenuBase extends Vue implements ControlInterface {
})
}
/**
* 功能名称
*
* @param {*} [item={}]
* @memberof MainMenu
*/
public clickAppFunc16(item: any = {}) {
const viewparam: any = {};
Object.assign(viewparam, {});
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'ibizbooks', parameterName: 'ibizbook' },
{ pathName: 'usr3dataview', parameterName: 'usr3dataview' },
];
const path: string = this.$viewTool.buildUpRoutePath(this.$route, {}, deResParameters, parameters, [], viewparam);
if(Object.is(this.$route.fullPath,path)){
return;
}
this.$nextTick(function(){
this.$router.push(path);
})
}
/**
* 表单项默认值
*
......
......@@ -1091,6 +1091,44 @@ export default class MainMenuModel {
appfunctag: 'AppFunc14',
resourcetag: '',
authtag:'Web-MainMenu-menuitem88',
},
{
id: 'F29C81F6-72C1-4E50-A234-E48CD739E4E2',
name: 'menuitem89',
text: '自动分组',
type: 'MENUITEM',
counterid: '',
tooltip: '自动分组',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: '',
icon: '',
textcls: '',
appfunctag: 'AppFunc15',
resourcetag: '',
authtag:'Web-MainMenu-menuitem89',
},
{
id: 'F93188C2-7067-4B74-A5C8-21C067662E91',
name: 'menuitem90',
text: '代码表分组',
type: 'MENUITEM',
counterid: '',
tooltip: '代码表分组',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: '',
icon: '',
textcls: '',
appfunctag: 'AppFunc16',
resourcetag: '',
authtag:'Web-MainMenu-menuitem90',
},
],
},
......
/**
* Usr2 部件模型
*
* @export
* @class Usr2Model
*/
export default class Usr2Model {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof Usr2DataViewMode
*/
public getDataItems(): any[] {
return [
{
name: 'author',
prop: 'author',
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 Usr2Model from './usr2-dataview-model';
/**
* Usr2 部件服务对象
*
* @export
* @class Usr2Service
*/
export default class Usr2Service extends ControlService {
/**
* 图书服务对象
*
* @type {IBIZBOOKService}
* @memberof Usr2Service
*/
public appEntityService: IBIZBOOKService = new IBIZBOOKService({ $store: this.getStore() });
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof Usr2Service
*/
public setTempMode(){
this.isTempMode = false;
}
/**
* Creates an instance of Usr2Service.
*
* @param {*} [opts={}]
* @memberof Usr2Service
*/
constructor(opts: any = {}) {
super(opts);
this.model = new Usr2Model();
}
/**
* 查询数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof Usr2Service
*/
@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 Usr2Service
*/
@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 Usr2Service
*/
@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 Usr2Service
*/
@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;
}
}
// this is less
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import Usr2Base from './usr2-dataview-base.vue';
@Component({
components: {
}
})
export default class Usr2 extends Usr2Base {
}
</script>
\ No newline at end of file
/**
* Usr3 部件模型
*
* @export
* @class Usr3Model
*/
export default class Usr3Model {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof Usr3DataViewMode
*/
public getDataItems(): any[] {
return [
{
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 Usr3Model from './usr3-dataview-model';
/**
* Usr3 部件服务对象
*
* @export
* @class Usr3Service
*/
export default class Usr3Service extends ControlService {
/**
* 图书服务对象
*
* @type {IBIZBOOKService}
* @memberof Usr3Service
*/
public appEntityService: IBIZBOOKService = new IBIZBOOKService({ $store: this.getStore() });
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof Usr3Service
*/
public setTempMode(){
this.isTempMode = false;
}
/**
* Creates an instance of Usr3Service.
*
* @param {*} [opts={}]
* @memberof Usr3Service
*/
constructor(opts: any = {}) {
super(opts);
this.model = new Usr3Model();
}
/**
* 查询数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof Usr3Service
*/
@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 Usr3Service
*/
@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 Usr3Service
*/
@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 Usr3Service
*/
@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
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import Usr3Base from './usr3-dataview-base.vue';
@Component({
components: {
}
})
export default class Usr3 extends Usr3Base {
}
</script>
\ No newline at end of file
......@@ -302,7 +302,7 @@
{
"appid":"Web",
"appname":"演示应用",
"appmenu":[{"menuid":"MainMenu", "menuname":"MainMenu", "menuitem":[{ "id":"menuitem1" , "name":"工作台" },{ "id":"menuitem3" , "name":"控件" , "items":[{ "id":"menuitem6" , "name":"默认数据类型" },{ "id":"menuitem7" , "name":"默认编辑器类型" },{ "id":"menuitem15" , "name":"基础表单项" },{ "id":"menuitem72" , "name":"编辑器扩展" }]},{ "id":"menuitem4" , "name":"部件" , "items":[{ "id":"menuitem12" , "name":"编辑表单" , "items":[{ "id":"menuitem47" , "name":"默认值" },{ "id":"menuitem48" , "name":"输入提示" },{ "id":"menuitem49" , "name":"辅助输入" },{ "id":"menuitem50" , "name":"自动填充" },{ "id":"menuitem51" , "name":"超链接" },{ "id":"menuitem52" , "name":"值重置" },{ "id":"menuitem55" , "name":"动态显示" },{ "id":"menuitem53" , "name":"动态启用" },{ "id":"menuitem54" , "name":"动态空输入" },{ "id":"menuitem56" , "name":"表单项更新" }]},{ "id":"menuitem16" , "name":"搜索表单" },{ "id":"menuitem13" , "name":"表格" , "items":[{ "id":"menuitem57" , "name":"禁用排序" },{ "id":"menuitem59" , "name":"行操作" },{ "id":"menuitem58" , "name":"行编辑" },{ "id":"menuitem73" , "name":"表格内置功能" },{ "id":"menuitem74" , "name":"表格行编辑" },{ "id":"menuitem75" , "name":"新建默认值" },{ "id":"menuitem76" , "name":"更新默认值" },{ "id":"menuitem77" , "name":"表格值规则" },{ "id":"menuitem78" , "name":"自动分组" },{ "id":"menuitem80" , "name":"代码表分组" },{ "id":"menuitem81" , "name":"当前页聚合" },{ "id":"menuitem82" , "name":"远程聚合" }]},{ "id":"menuitem83" , "name":"列表" , "items":[{ "id":"menuitem84" , "name":"列表内置功能" },{ "id":"menuitem85" , "name":"列表自动分组" },{ "id":"menuitem86" , "name":"代码表分组" }]},{ "id":"menuitem14" , "name":"树视图" , "items":[{ "id":"menuitem60" , "name":"静态节点" },{ "id":"menuitem61" , "name":"动态节点(代码表)" },{ "id":"menuitem62" , "name":"动态节点(实体)" },{ "id":"menuitem63" , "name":"右键操作" },{ "id":"menuitem64" , "name":"动态参数过滤" }]},{ "id":"menuitem37" , "name":"图表" , "items":[{ "id":"menuitem38" , "name":"柱状图" },{ "id":"menuitem39" , "name":"折线图" },{ "id":"menuitem40" , "name":"饼图" },{ "id":"menuitem41" , "name":"区域图" },{ "id":"menuitem42" , "name":"雷达图" },{ "id":"menuitem43" , "name":"仪表盘" },{ "id":"menuitem44" , "name":"K线图" }]},{ "id":"menuitem17" , "name":"向导" },{ "id":"menuitem18" , "name":"界面行为" , "items":[{ "id":"menuitem65" , "name":"前端界面行为" },{ "id":"menuitem66" , "name":"后台界面行为" }]},{ "id":"menuitem87" , "name":"数据视图" , "items":[{ "id":"menuitem88" , "name":"内置功能" }]}]},{ "id":"menuitem5" , "name":"视图" , "items":[{ "id":"menuitem9" , "name":"列表视图" , "items":[{ "id":"menuitem19" , "name":"常规表格视图" },{ "id":"menuitem21" , "name":"左右表格视图" },{ "id":"menuitem20" , "name":"嵌入表格视图" }]},{ "id":"menuitem8" , "name":"编辑视图" , "items":[{ "id":"menuitem22" , "name":"常规编辑视图" },{ "id":"menuitem23" , "name":"左右编辑视图" },{ "id":"menuitem24" , "name":"分页编辑视图" },{ "id":"menuitem25" , "name":"嵌入编辑视图" }]},{ "id":"menuitem26" , "name":"选择视图" , "items":[{ "id":"menuitem27" , "name":"单选视图" },{ "id":"menuitem28" , "name":"多选视图" },{ "id":"menuitem29" , "name":"树形选择视图" },{ "id":"menuitem30" , "name":"左右单选视图" },{ "id":"menuitem31" , "name":"左右多选视图" }]},{ "id":"menuitem10" , "name":"导航视图" , "items":[{ "id":"menuitem32" , "name":"常规导航视图" },{ "id":"menuitem33" , "name":"分页导航视图" },{ "id":"menuitem34" , "name":"嵌入导航视图" }]},{ "id":"menuitem11" , "name":"其他视图" , "items":[{ "id":"menuitem35" , "name":"图表视图" },{ "id":"menuitem36" , "name":"报表视图" }]},{ "id":"menuitem79" , "name":"表格视图" }]},{ "id":"menuitem69" , "name":"工作流" },{ "id":"menuitem2" , "name":"更多" , "items":[{ "id":"menuitem46" , "name":"数据导出导入" },{ "id":"menuitem45" , "name":"数据打印" },{ "id":"menuitem67" , "name":"索引实体" },{ "id":"menuitem68" , "name":"继承实体" },{ "id":"menuitem70" , "name":"主状态" },{ "id":"menuitem71" , "name":"多表单" }]}] }]
"appmenu":[{"menuid":"MainMenu", "menuname":"MainMenu", "menuitem":[{ "id":"menuitem1" , "name":"工作台" },{ "id":"menuitem3" , "name":"控件" , "items":[{ "id":"menuitem6" , "name":"默认数据类型" },{ "id":"menuitem7" , "name":"默认编辑器类型" },{ "id":"menuitem15" , "name":"基础表单项" },{ "id":"menuitem72" , "name":"编辑器扩展" }]},{ "id":"menuitem4" , "name":"部件" , "items":[{ "id":"menuitem12" , "name":"编辑表单" , "items":[{ "id":"menuitem47" , "name":"默认值" },{ "id":"menuitem48" , "name":"输入提示" },{ "id":"menuitem49" , "name":"辅助输入" },{ "id":"menuitem50" , "name":"自动填充" },{ "id":"menuitem51" , "name":"超链接" },{ "id":"menuitem52" , "name":"值重置" },{ "id":"menuitem55" , "name":"动态显示" },{ "id":"menuitem53" , "name":"动态启用" },{ "id":"menuitem54" , "name":"动态空输入" },{ "id":"menuitem56" , "name":"表单项更新" }]},{ "id":"menuitem16" , "name":"搜索表单" },{ "id":"menuitem13" , "name":"表格" , "items":[{ "id":"menuitem57" , "name":"禁用排序" },{ "id":"menuitem59" , "name":"行操作" },{ "id":"menuitem58" , "name":"行编辑" },{ "id":"menuitem73" , "name":"表格内置功能" },{ "id":"menuitem74" , "name":"表格行编辑" },{ "id":"menuitem75" , "name":"新建默认值" },{ "id":"menuitem76" , "name":"更新默认值" },{ "id":"menuitem77" , "name":"表格值规则" },{ "id":"menuitem78" , "name":"自动分组" },{ "id":"menuitem80" , "name":"代码表分组" },{ "id":"menuitem81" , "name":"当前页聚合" },{ "id":"menuitem82" , "name":"远程聚合" }]},{ "id":"menuitem83" , "name":"列表" , "items":[{ "id":"menuitem84" , "name":"列表内置功能" },{ "id":"menuitem85" , "name":"列表自动分组" },{ "id":"menuitem86" , "name":"代码表分组" }]},{ "id":"menuitem14" , "name":"树视图" , "items":[{ "id":"menuitem60" , "name":"静态节点" },{ "id":"menuitem61" , "name":"动态节点(代码表)" },{ "id":"menuitem62" , "name":"动态节点(实体)" },{ "id":"menuitem63" , "name":"右键操作" },{ "id":"menuitem64" , "name":"动态参数过滤" }]},{ "id":"menuitem37" , "name":"图表" , "items":[{ "id":"menuitem38" , "name":"柱状图" },{ "id":"menuitem39" , "name":"折线图" },{ "id":"menuitem40" , "name":"饼图" },{ "id":"menuitem41" , "name":"区域图" },{ "id":"menuitem42" , "name":"雷达图" },{ "id":"menuitem43" , "name":"仪表盘" },{ "id":"menuitem44" , "name":"K线图" }]},{ "id":"menuitem17" , "name":"向导" },{ "id":"menuitem18" , "name":"界面行为" , "items":[{ "id":"menuitem65" , "name":"前端界面行为" },{ "id":"menuitem66" , "name":"后台界面行为" }]},{ "id":"menuitem87" , "name":"数据视图" , "items":[{ "id":"menuitem88" , "name":"内置功能" },{ "id":"menuitem89" , "name":"自动分组" },{ "id":"menuitem90" , "name":"代码表分组" }]}]},{ "id":"menuitem5" , "name":"视图" , "items":[{ "id":"menuitem9" , "name":"列表视图" , "items":[{ "id":"menuitem19" , "name":"常规表格视图" },{ "id":"menuitem21" , "name":"左右表格视图" },{ "id":"menuitem20" , "name":"嵌入表格视图" }]},{ "id":"menuitem8" , "name":"编辑视图" , "items":[{ "id":"menuitem22" , "name":"常规编辑视图" },{ "id":"menuitem23" , "name":"左右编辑视图" },{ "id":"menuitem24" , "name":"分页编辑视图" },{ "id":"menuitem25" , "name":"嵌入编辑视图" }]},{ "id":"menuitem26" , "name":"选择视图" , "items":[{ "id":"menuitem27" , "name":"单选视图" },{ "id":"menuitem28" , "name":"多选视图" },{ "id":"menuitem29" , "name":"树形选择视图" },{ "id":"menuitem30" , "name":"左右单选视图" },{ "id":"menuitem31" , "name":"左右多选视图" }]},{ "id":"menuitem10" , "name":"导航视图" , "items":[{ "id":"menuitem32" , "name":"常规导航视图" },{ "id":"menuitem33" , "name":"分页导航视图" },{ "id":"menuitem34" , "name":"嵌入导航视图" }]},{ "id":"menuitem11" , "name":"其他视图" , "items":[{ "id":"menuitem35" , "name":"图表视图" },{ "id":"menuitem36" , "name":"报表视图" }]},{ "id":"menuitem79" , "name":"表格视图" }]},{ "id":"menuitem69" , "name":"工作流" },{ "id":"menuitem2" , "name":"更多" , "items":[{ "id":"menuitem46" , "name":"数据导出导入" },{ "id":"menuitem45" , "name":"数据打印" },{ "id":"menuitem67" , "name":"索引实体" },{ "id":"menuitem68" , "name":"继承实体" },{ "id":"menuitem70" , "name":"主状态" },{ "id":"menuitem71" , "name":"多表单" }]}] }]
}
]
}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册