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

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

上级 71efb146
......@@ -11,7 +11,7 @@ export default class Usr2Model {
* 获取数据项集合
*
* @returns {any[]}
* @memberof Usr2DataViewMode
* @memberof Usr2Dataviewexpbar_dataviewMode
*/
public getDataItems(): any[] {
return [
......@@ -40,17 +40,6 @@ export default class Usr2Model {
dataType: 'FONTKEY',
},
{
name: 'n_ibizbookname_like',
prop: 'n_ibizbookname_like',
dataType: 'QUERYPARAM'
},
{
name: 'n_price_gtandeq',
prop: 'n_price_gtandeq',
dataType: 'QUERYPARAM'
},
{
name:'size',
......
// 基于 @CONTROL/表格(透视表)/MODEL.ts.ftl 生成
// 基于 @CONTROL/表格/MODEL.ts.ftl 生成
/**
* ProivateTable 部件模型
*
......@@ -83,27 +83,33 @@ export default class ProivateTableModel {
{
name:'size',
prop:'size'
prop:'size',
dataType: 'QUERYPARAM'
},
{
name:'query',
prop:'query'
prop:'query',
dataType: 'QUERYPARAM'
},
{
name:'filter',
prop:'filter'
prop:'filter',
dataType: 'QUERYPARAM'
},
{
name:'page',
prop:'page'
prop:'page',
dataType: 'QUERYPARAM'
},
{
name:'sort',
prop:'sort'
prop:'sort',
dataType: 'QUERYPARAM'
},
{
name:'srfparentdata',
prop:'srfparentdata'
prop:'srfparentdata',
dataType: 'QUERYPARAM'
},
// 前端新增修改标识,新增为"0",修改为"1"或未设值
{
......@@ -111,6 +117,22 @@ export default class ProivateTableModel {
prop: 'srffrontuf',
dataType: 'TEXT',
},
// 预置工作流数据字段
{
name: 'srfprocessdefinitionkey',
prop: 'srfprocessdefinitionkey',
dataType: 'TEXT'
},
{
name: 'srftaskdefinitionkey',
prop: 'srftaskdefinitionkey',
dataType: 'TEXT'
},
{
name: 'srftaskid',
prop: 'srftaskid',
dataType: 'TEXT'
}
]
}
}
......
// 基于 @CONTROL/表格(透视表)/SERVICE.ts.ftl 生成
// 基于 @CONTROL/表格/SERVICE.ts.ftl 生成
import { Http,Util,Errorlog } from '@/utils';
import ControlService from '@/widgets/control-service';
import IBIZOrderService from '@/service/ibizorder/ibizorder-service';
......@@ -217,7 +217,7 @@ export default class ProivateTableService extends ControlService {
result.then((response) => {
//处理返回数据,补充判断标识
if(response.data){
Object.assign(response.data,{srfuf:0});
Object.assign(response.data,{srfuf:'0'});
}
resolve(response);
}).catch(response => {
......@@ -360,6 +360,99 @@ export default class ProivateTableService extends ControlService {
}
return {context:tempContext,data:requestData};
}
/**
* 处理工作流数据
*
* @param data 传入数据
* @memberof ProivateTableService
*/
public handleWFData(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 = {};
dataItems.forEach((item:any) =>{
if(item && item.prop){
if(item.dataType){
if(!Object.is(item.dataType,'QUERYPARAM')){
requestData[item.prop] = data[item.name];
}
}else{
requestData[item.prop] = data[item.name];
}
}
});
if(isMerge && (data.viewparams && Object.keys(data.viewparams).length > 0)){
Object.assign(requestData,data.viewparams);
}
// 删除前端srffrontuf标识
if(requestData.hasOwnProperty('srffrontuf')){
delete requestData.srffrontuf;
}
//补充工作流所需主键
requestData.srfkey = data.ibizorder;
//补充全量数据
requestData = this.fillNativeData(requestData);
return requestData;
}
/**
* 补充全量数据
*
* @param {*} [data]
* @memberof ProivateTableService
*/
public fillNativeData(data:any){
if(this.copynativeData && this.copynativeData.length >0){
let targetData:any = this.copynativeData.find((item:any) =>{
return item.ibizorderid === data.srfkey;
})
data = Object.assign(targetData,data);
return data;
}
}
/**
* 提交工作流
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof ProivateTableService
*/
@Errorlog
public submitbatch(action: string,context: any = {}, data: any,localdata:any,isloading?: boolean): Promise<any> {
let tempData:any = [];
if(data && data.length > 0){
data.forEach((item:any) => {
let data:any = this.handleWFData(item,true);
tempData.push(data);
});
}
context = this.handleRequestData(action,context,data,true).context;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](context,tempData, localdata,isloading);
} else {
result = this.appEntityService.wfSubmitBatch(context,tempData,localdata,isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 设置远端数据
*
......
// 基于 @CONTROL/表格(透视表)/CONTROL.less.ftl 生成
// 基于 @CONTROL/表格/CONTROL.less.ftl 生成
.grid {
flex-grow: 1;
height: 100%;
overflow: auto;
.el-table__body-wrapper::-webkit-scrollbar {
/*滚动条整体样式*/
width : 10px !important; /*高宽分别对应横竖滚动条的尺寸*/
height: 10px !important;
}
.el-table__body-wrapper::-webkit-scrollbar-thumb {
/*滚动条颜色*/
border-radius : 10px !important;
background-color: #cecece !important;
}
.el-table__body-wrapper::-webkit-scrollbar-track {
/*滚动条里面轨道*/
box-shadow : inset 0 0 5px rgba(0, 0, 0, 0.2) !important;
background : #ededed !important;
border-radius: 10px !important;
}
/*表格文字过长省略*/
.el-table th>.cell, .el-table td>.cell{
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
word-break: break-all;
}
.el-table-column--selection .cell {
padding-left: 0px;
padding-right: 0px;
}
.app-column-link, .app-format-data{
display: inline;
}
.el-table {
height: 100%;
display:flex;
flex-direction: column;
justify-content: flex-start;
.el-table__row{
.grid-uiaction-divider {
padding:0 10px 0 10px;
border-left: 1px #b3b3b3 solid;
}
.grid-first-uiaction {
padding:0 10px 0 10px;
}
}
.quick-toolbar{
display: inline-block;
button{
background: #ebf3fb;
color: #2575ca;
border: 0;
}
}
.el-tooltip{
.ivu-form-item{
margin-bottom: unset !important;
}
}
.el-table__body .edit-cell{
padding:0;
.app-form-item{
margin-top: 20px;
margin-bottom: 20px;
}
}
.el-table__header-wrapper{
min-height: 45px;
max-height: 100px;
height: auto;
}
.el-table__footer-wrapper{
min-height: 45px;
max-height: 100px;
height: auto;
}
}
.grid-pagination {
height: 50px;
padding: 6px 0px;
.page-button {
button {
padding: 0;
font-size: 16px;
min-width: 32px;
height: 32px;
margin-right: 4px;
}
}
.page-column {
position: absolute;
left: 0;
}
.batch-toolbar{
position: absolute;
left: 105px;
>.toolbar-container{
button {
font-size: 16px;
min-width: 32px;
height: 32px;
margin-right: 4px;
margin-top: 0;
margin-bottom: 0;
}
}
}
}
}
.ivu-modal-content{
.footer{
.ivu-row{
text-align: right;
}
}
}
.cell-indeterminate {
>div>label {
>span {
.el-checkbox__inner {
background-color: #409eff;
border-color: #409eff;
}
.el-checkbox__inner:before {
content: "";
position: absolute;
display: block;
background-color: #fff;
height: 2px;
transform: scale(.5);
left: 0;
right: 0;
top: 5px;
}
}
>span.is-checked {
.el-checkbox__inner {
background-color: #409eff;
border-color: #409eff;
}
.el-checkbox__inner:after {
border: 0px;
}
}
}
}
.cell-select-all {
>div>label {
>span {
.el-checkbox__inner {
background-color: #409eff;
border-color: #409eff;
}
.el-checkbox__inner:after {
box-sizing: content-box;
content: "";
border: 1px solid #fff;
border-left: 0;
border-top: 0;
height: 7px;
left: 4px;
position: absolute;
top: 1px;
transform: rotate(45deg) scaleY(1);
width: 3px;
transition: transform .15s ease-in .05s;
transform-origin: center;
}
}
}
}
// this is less
......@@ -3,7 +3,7 @@ import { Component } from 'vue-property-decorator';
import ProivateTableBase from './proivate-table-grid-base.vue';
// 基于 @CONTROL/表格(透视表)/CONTROL.vue.ftl 生成
// 基于 @CONTROL/表格/CONTROL.vue.ftl 生成
@Component({
components: {
......
......@@ -2,7 +2,6 @@
"aggMode" : "NONE",
"codeName" : "ProivateTable",
"columnEnableLink" : 2,
"controlStyle" : "PivotTable",
"controlType" : "GRID",
"dynaModelFilePath" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZOrder/PSGRIDS/ProivateTable.json",
"getFetchPSControlAction" : {
......@@ -148,10 +147,6 @@
},
"allowEmpty" : true
} ],
"getPSSysPFPlugin" : {
"pluginType" : "GRID_RENDER",
"pluginCode" : "PivotTable"
},
"pagingSize" : 20,
"getRemovePSControlAction" : {
"actionName" : "Remove",
......
......@@ -1018,7 +1018,6 @@
"aggMode" : "NONE",
"codeName" : "ProivateTable",
"columnEnableLink" : 2,
"controlStyle" : "PivotTable",
"controlType" : "GRID",
"dynaModelFilePath" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZOrder/PSGRIDS/ProivateTable.json",
"getFetchPSControlAction" : {
......@@ -1251,10 +1250,6 @@
},
"allowEmpty" : true
} ],
"getPSSysPFPlugin" : {
"pluginType" : "GRID_RENDER",
"pluginCode" : "PivotTable"
},
"pagingSize" : 20,
"getRemovePSControlAction" : {
"actionName" : "Remove",
......
......@@ -4129,12 +4129,6 @@
"pluginType" : "EDITFORM_RENDER",
"refMode" : "CONTROL",
"refTag" : "FORM"
}, {
"name" : "表格(透视表)",
"pluginCode" : "PivotTable",
"pluginType" : "GRID_RENDER",
"refMode" : "CONTROL",
"refTag" : "GRID"
}, {
"name" : "视图数量",
"pluginCode" : "PFPlugin8",
......
......@@ -83,12 +83,6 @@
"pluginType" : "EDITFORM_RENDER",
"refMode" : "CONTROL",
"refTag" : "FORM"
}, {
"name" : "表格(透视表)",
"pluginCode" : "PivotTable",
"pluginType" : "GRID_RENDER",
"refMode" : "CONTROL",
"refTag" : "GRID"
}, {
"name" : "视图数量",
"pluginCode" : "PFPlugin8",
......
......@@ -340,7 +340,7 @@
<!--输出实体[IBIZORDER]数据结构 -->
<changeSet author="a_LAB01_df847bdfd" id="tab-ibizorder-696-14">
<changeSet author="a_LAB01_df847bdfd" id="tab-ibizorder-698-14">
<createTable tableName="T_IBIZORDER">
<column name="TP" remarks="" type="TEXT(1048576)">
</column>
......
......@@ -37,7 +37,7 @@
</createView>
</changeSet>
<!--输出实体[IBIZORDER]视图结构信息 runOnChange="true" 当视图发生变更时,通过liquibase强刷prod的视图,实现视图的同步-->
<changeSet author="a_LAB01_df847bdfd" id="view-ibizorder-696-8" runOnChange="true">
<changeSet author="a_LAB01_df847bdfd" id="view-ibizorder-698-8" runOnChange="true">
<createView fullDefinition="false" replaceIfExists="true" viewName="V_IBIZORDER">
<![CDATA[ SELECT t1.[AMOUNT], t1.[CREATEDATE], t1.[CREATEMAN], t1.[DETAILNUM], t1.[IBIZCUSTOMERID], t11.[IBIZCUSTOMERNAME], t1.[IBIZORDERID], t1.[IBIZORDERNAME], t1.[MEMO], t1.[ORDERSTATE], t1.[ORDERTIME], t1.[ORDERTYPE], t1.[ORDERUID], t1.[UPDATEDATE], t1.[UPDATEMAN], t1.[WFINSTANCEID], t1.[WFSTATE], t1.[WFSTEP] FROM [T_IBIZORDER] t1 LEFT JOIN T_IBIZCUSTOMER t11 ON t1.IBIZCUSTOMERID = t11.IBIZCUSTOMERID ]]>
</createView>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册