提交 cb374c25 编写于 作者: tony001's avatar tony001

2020.5.23 dev合并到master

上级 88380b1e
...@@ -133,6 +133,22 @@ ...@@ -133,6 +133,22 @@
*/ */
public totalRecord: number = 0; public totalRecord: number = 0;
/**
* 排序方向
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public sortDir:string = '<#if ctrl.getMinorSortDir()??>${ctrl.getMinorSortDir()?lower_case}</#if>';
/**
* 排序字段
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public sortField: string = '<#if ctrl.getMinorSortPSDEF()??>${ctrl.getMinorSortPSDEF().getCodeName()?lower_case}</#if>';
/** /**
* 选中数组 * 选中数组
* @type {Array<any>} * @type {Array<any>}
...@@ -254,6 +270,11 @@ ...@@ -254,6 +270,11 @@
if (this.isEnablePagingBar) { if (this.isEnablePagingBar) {
Object.assign(page, { page: this.curPage-1, size: this.limit }); Object.assign(page, { page: this.curPage-1, size: this.limit });
} }
// 设置排序
if (!Object.is(this.sortDir, '') && !Object.is(this.sortField, '')) {
const sort: string = this.sortField+","+this.sortDir;
Object.assign(page, { sort: sort });
}
Object.assign(arg, page); Object.assign(arg, page);
const parentdata: any = {}; const parentdata: any = {};
this.$emit('beforeload', parentdata); this.$emit('beforeload', parentdata);
......
...@@ -65,6 +65,10 @@ ...@@ -65,6 +65,10 @@
name:'query', name:'query',
prop:'query' prop:'query'
}, },
{
name:'sort',
prop:'sort'
},
{ {
name:'page', name:'page',
prop:'page' prop:'page'
......
...@@ -189,7 +189,7 @@ ...@@ -189,7 +189,7 @@
* @type {string} * @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
public sortDir:string = ''; public sortDir:string = '<#if ctrl.getMinorSortDir()??>${ctrl.getMinorSortDir()?lower_case}</#if>';
/** /**
* 排序字段 * 排序字段
...@@ -197,7 +197,7 @@ ...@@ -197,7 +197,7 @@
* @type {string} * @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
public sortField: string = ''; public sortField: string = '<#if ctrl.getMinorSortPSDEF()??>${ctrl.getMinorSortPSDEF().getCodeName()?lower_case}</#if>';
/** /**
* 排序点击事件 * 排序点击事件
......
...@@ -76,7 +76,7 @@ GanttElastic, ...@@ -76,7 +76,7 @@ GanttElastic,
*/ */
public options: any = { public options: any = {
isflex: true, isflex: true,
maxRows: 100, maxRows: 1000,
dataType: 'treegrid', dataType: 'treegrid',
title: { title: {
label: "" label: ""
...@@ -109,7 +109,7 @@ GanttElastic, ...@@ -109,7 +109,7 @@ GanttElastic,
{ {
label: '${column.getCaption()}', label: '${column.getCaption()}',
value: '<#if column.getName() == "begin">start<#else>${column.getName()}</#if>', value: '<#if column.getName() == "begin">start<#else>${column.getName()}</#if>',
<#if column_index == 0> <#if column.getName() == "text">
expander: true, expander: true,
</#if> </#if>
width: <#if column.getWidth() gt 0>${column.getWidth()}<#else>100</#if> width: <#if column.getWidth() gt 0>${column.getWidth()}<#else>100</#if>
......
<app-org-select :data="data" :context="JSON.parse(JSON.stringify(context))" :fillMap="<#if item.getEditorParam('FILLMAP','') != ''>${item.getEditorParam('FILLMAP','')}<#else>{}</#if>" filter="<#if item.getEditorParam('FILTER','') != ''>${item.getEditorParam('FILTER','')}</#if>" :multiple="<#if item.getEditorParam('MULTIPLE','') != ''>${item.getEditorParam('MULTIPLE','')}</#if>" style="${editor.getEditorCssStyle()}" @formitemvaluechange="onFormItemValueChange"></app-org-select>
\ No newline at end of file
<span>单位选择</span>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
EDITORTYPE=DROPDOWNLIST#ORGSELECT
\ No newline at end of file
<app-department-select :data="data" name="${editor.name}" :value="data.${editor.name}" :context="JSON.parse(JSON.stringify(context))" :fillMap="<#if item.getEditorParam('FILLMAP','') != ''>${item.getEditorParam('FILLMAP','')}<#else>{}</#if>" filter="<#if item.getEditorParam('FILTER','') != ''>${item.getEditorParam('FILTER','')}</#if>" <#if item.getEditorParam('MULTIPLE','') != ''>:multiple="${item.getEditorParam('MULTIPLE','')}"</#if> <#if item.getEditorParam('URL','') != ''>url="${item.getEditorParam('URL','')}"</#if> style="${editor.getEditorCssStyle()}" @select-change="onFormItemValueChange"></app-department-select>
\ No newline at end of file
<span>部门选择</span>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
EDITORTYPE=DROPDOWNLIST#DEPATMENTSELECT
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<ibiz-group-select
name="${editor.name}"
:value='data.${editor.name}'
valueitem="${editor.getValueItemName()}"
<#if editor.getEditorParam("MULTIPLE", false)>:multiple="true"</#if>
<#if editor.getEditorParam("FILTER", "") != "">filter="${editor.getEditorParam("FILTER", "")}"</#if>
<#if editor.getEditorParam("FILLMAP", "") != "">:fillmap='${editor.getEditorParam("FILLMAP", "")}'</#if>
:disabled="detailsModel.${editor.name}.disabled"
:data="data"
:context="context"
@formitemvaluechange="onFormItemValueChange">
</ibiz-group-select>
EDITORTYPE=PICKER#GroupSelect
\ No newline at end of file
...@@ -207,7 +207,7 @@ if(this.formDruipart){ ...@@ -207,7 +207,7 @@ if(this.formDruipart){
if(quickGroupCodeList.tag && Object.is(quickGroupCodeList.codelistType,"STATIC")){ if(quickGroupCodeList.tag && Object.is(quickGroupCodeList.codelistType,"STATIC")){
const codelist = this.$store.getters.getCodeList(quickGroupCodeList.tag); const codelist = this.$store.getters.getCodeList(quickGroupCodeList.tag);
if (codelist) { if (codelist) {
this.quickGroupModel = [...JSON.parse(JSON.stringify(codelist.items))]; this.quickGroupModel = [...this.handleDynamicData(JSON.parse(JSON.stringify(codelist.items)))];
} else { } else {
<#noparse>console.log(`----${quickGroupCodeList.tag}----代码表不存在`);</#noparse> <#noparse>console.log(`----${quickGroupCodeList.tag}----代码表不存在`);</#noparse>
} }
...@@ -221,6 +221,33 @@ if(this.formDruipart){ ...@@ -221,6 +221,33 @@ if(this.formDruipart){
</#if> </#if>
} }
/**
* 处理快速分组模型动态数据部分(%xxx%)
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public handleDynamicData(inputArray:Array<any>){
if(inputArray.length >0){
inputArray.forEach((item:any) =>{
if(item.data && Object.keys(item.data).length >0){
Object.keys(item.data).forEach((name:any) =>{
let value: any = item.data[name];
if (value && typeof(value)=='string' && value.startsWith('%') && value.endsWith('%')) {
const key = (value.substring(1, value.length - 1)).toLowerCase();
if (this.context[key]) {
value = this.context[key];
} else if(this.viewparams[key]){
value = this.viewparams[key];
}
}
item.data[name] = value;
})
}
})
}
return inputArray;
}
/** /**
* 快速分组值变化 * 快速分组值变化
* *
......
...@@ -4,12 +4,14 @@ import VueRouter from 'vue-router'; ...@@ -4,12 +4,14 @@ import VueRouter from 'vue-router';
import App from '@/App.vue'; import App from '@/App.vue';
import ElementUi from 'element-ui'; import ElementUi from 'element-ui';
import ViewUI from 'view-design'; import ViewUI from 'view-design';
import ibizLab from 'ibiz-vue-lib';
import { Interceptors } from '@/utils'; import { Interceptors } from '@/utils';
import {Print} from '@/utils/print'; import {Print} from '@/utils/print';
import i18n from '@/locale' import i18n from '@/locale'
import 'element-ui/lib/theme-chalk/index.css'; import 'element-ui/lib/theme-chalk/index.css';
import 'view-design/dist/styles/iview.css'; import 'view-design/dist/styles/iview.css';
import 'ibiz-vue-lib/lib/ibiz-vue-lib.css';
import '@/styles/default.less'; import '@/styles/default.less';
...@@ -30,7 +32,8 @@ Vue.config.errorHandler = function (err: any, vm: any, info: any) { ...@@ -30,7 +32,8 @@ Vue.config.errorHandler = function (err: any, vm: any, info: any) {
console.log(err); console.log(err);
} }
Vue.config.productionTip = false; Vue.config.productionTip = false;
Vue.use(Print) Vue.use(Print);
Vue.use(ibizLab);
Vue.use(Vuex); Vue.use(Vuex);
Vue.use(VueRouter);; Vue.use(VueRouter);;
Vue.use(ElementUi, { Vue.use(ElementUi, {
......
## v7.0.0-alpha.6 [2020-5-23]
### Bug修复
修复处理快速分组模型动态数据部分
修复列表,数据视图默认排序
### 功能新增及优化
#### 模板
补充单位选择器、部门选择器、人员选择器
#### 基础文件
补充单位选择器、部门选择器、人员选择器
## v7.0.0-alpha.5 [2020-5-21] ## v7.0.0-alpha.5 [2020-5-21]
### Bug修复 ### Bug修复
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册