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

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

上级 ba7b0464
......@@ -567,12 +567,9 @@ export default {
uiactions: {
},
},
usr_dataview: {
usr5_dataview: {
nodata:"",
uiactions: {
new: "New",
edit: "Edit",
remove: "Remove",
},
},
usr2_dataview: {
......@@ -585,6 +582,14 @@ export default {
uiactions: {
},
},
usr_dataview: {
nodata:"",
uiactions: {
new: "New",
edit: "Edit",
remove: "Remove",
},
},
usr4_dataview: {
nodata:"",
uiactions: {
......@@ -699,22 +704,6 @@ export default {
},
usr5dataviewtoolbar_toolbar: {
},
usr5dataviewdataview_quicktoolbar_toolbar: {
deuiaction1: {
caption: "New",
tip: "New",
},
},
usr5dataviewdataview_batchtoolbar_toolbar: {
deuiaction1: {
caption: "Edit",
tip: "Edit {0}",
},
deuiaction2: {
caption: "Remove",
tip: "Remove {0}",
},
},
roweditgridviewtoolbar_toolbar: {
tbitem3: {
caption: "New",
......
......@@ -566,12 +566,9 @@ export default {
uiactions: {
},
},
usr_dataview: {
usr5_dataview: {
nodata:"",
uiactions: {
new: "新建",
edit: "编辑",
remove: "删除",
},
},
usr2_dataview: {
......@@ -584,6 +581,14 @@ export default {
uiactions: {
},
},
usr_dataview: {
nodata:"",
uiactions: {
new: "新建",
edit: "编辑",
remove: "删除",
},
},
usr4_dataview: {
nodata:"",
uiactions: {
......@@ -698,22 +703,6 @@ export default {
},
usr5dataviewtoolbar_toolbar: {
},
usr5dataviewdataview_quicktoolbar_toolbar: {
deuiaction1: {
caption: "新建",
tip: "新建",
},
},
usr5dataviewdataview_batchtoolbar_toolbar: {
deuiaction1: {
caption: "编辑",
tip: "编辑",
},
deuiaction2: {
caption: "删除",
tip: "删除",
},
},
roweditgridviewtoolbar_toolbar: {
tbitem3: {
caption: "新建",
......
......@@ -3,7 +3,7 @@ import { Component } from 'vue-property-decorator';
import IBIZBOOKUsr5DataViewBase from './ibizbookusr5-data-view-base.vue';
import view_searchform from '@widgets/ibizbook/default-searchform/default-searchform.vue';
import view_dataview from '@widgets/ibizbook/usr-dataview/usr-dataview.vue';
import view_dataview from '@widgets/ibizbook/usr5-dataview/usr5-dataview.vue';
@Component({
components: {
view_searchform,
......
/**
* Usr5 部件模型
*
* @export
* @class Usr5Model
*/
export default class Usr5Model {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof Usr5DataViewMode
*/
public getDataItems(): any[] {
return [
{
name: 'srficon',
prop: 'icon',
dataType: 'TEXT',
},
{
name: 'srfdescription',
prop: 'subtext',
dataType: 'TEXT',
},
{
name: 'srfkey',
prop: 'ibizbookid',
dataType: 'GUID',
},
{
name: 'srfmajortext',
},
{
name: 'ibizbook',
prop: 'ibizbookid',
dataType: 'FONTKEY',
},
{
name: 'n_ibizbookname_like',
prop: 'n_ibizbookname_like',
dataType: 'QUERYPARAM'
},
{
name: 'n_price_gtandeq',
prop: 'n_price_gtandeq',
dataType: 'QUERYPARAM'
},
{
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 Usr5Model from './usr5-dataview-model';
/**
* Usr5 部件服务对象
*
* @export
* @class Usr5Service
*/
export default class Usr5Service extends ControlService {
/**
* 图书服务对象
*
* @type {IBIZBOOKService}
* @memberof Usr5Service
*/
public appEntityService: IBIZBOOKService = new IBIZBOOKService({ $store: this.getStore() });
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof Usr5Service
*/
public setTempMode(){
this.isTempMode = false;
}
/**
* Creates an instance of Usr5Service.
*
* @param {*} [opts={}]
* @memberof Usr5Service
*/
constructor(opts: any = {}) {
super(opts);
this.model = new Usr5Model();
}
/**
* 查询数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof Usr5Service
*/
@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 Usr5Service
*/
@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 Usr5Service
*/
@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 Usr5Service
*/
@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{
padding: 10px 0px 0px 0px;
display: flex;
.item-nodata {
padding-bottom: 10px;
width: 100%;
text-align: center;
}
}
}
.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 Usr5Base from './usr5-dataview-base.vue';
import layout_itemlayoutpanel from '@widgets/ibizbook/usr5-panel/usr5-panel.vue';
@Component({
components: {
layout_itemlayoutpanel,
}
})
export default class Usr5 extends Usr5Base {
}
</script>
\ No newline at end of file
/**
* Usr5 部件模型
*
* @export
* @class Usr5Model
*/
export default class Usr5Model {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof Usr5Model
*/
public getDataItems(): any[] {
return [
]
}
}
\ No newline at end of file
import { Http } from '@/utils';
import ControlService from '@/widgets/control-service';
/**
* Usr5 部件服务对象
*
* @export
* @class Usr5Service
*/
export default class Usr5Service extends ControlService {
}
\ No newline at end of file
// this is less
.app-layoutpanel {
height: 100%;
.app-layoutpanel-container {
padding: 6px;
}
.app-layoutpanel-tabpanel{
>.el-tabs {
>.el-.el-tabs__header{
margin: 0 0 10px;
}
.app-layoutpanel-tabpage{
padding: 6px;
}
}
}
.app-layoutpanel-button,.app-layoutpanel-conctrl,.app-layoutpanel-ctrlpos,.app-layoutpanel-field,.app-layoutpanel-rowitem,.app-layoutpanel-usercontrol{
padding: 6px;
}
.item-field{
padding: 0 4px;
display: flex;
>.item-field-label{
padding: 0 8px;
}
}
}
\ No newline at end of file
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import Usr5Base from './usr5-panel-base.vue';
@Component({
components: {
}
})
export default class Usr5 extends Usr5Base {
}
</script>
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册