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

Merge branch 'dev'

<#ibizinclude> <#ibizinclude>
../@MACRO/CONTROL/LANGBASE.vue.ftl ../@MACRO/CONTROL/LANGBASE.vue.ftl
</#ibizinclude> </#ibizinclude>
<#<#assign ListContent> <#assign ListContent>
<div class="app-list-item-content"> <div class="app-list-item-content">
<div class="item-icon"> <div class="item-icon">
<template v-if="item.srficon"> <template v-if="item.srficon">
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
</#assign> </#assign>
<template> <template>
<#if ctrl.getBatchPSDEToolbar?? && ctrl.getBatchPSDEToolbar()??> <#if ctrl.getBatchPSDEToolbar?? && ctrl.getBatchPSDEToolbar()??>
<div> <div style="overflow:auto;">
</#if> </#if>
<div :class="['app-list',<#if ctrl.getPSSysCss?? && ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()>'${singleCss.getCssName()}',</#if>this.items.length > 0 ? '' : 'app-list-empty' ]"> <div :class="['app-list',<#if ctrl.getPSSysCss?? && ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()>'${singleCss.getCssName()}',</#if>this.items.length > 0 ? '' : 'app-list-empty' ]">
<#if ctrl.render??> <#if ctrl.render??>
...@@ -519,6 +519,19 @@ import CodeListService from "@/codelist/codelist-service"; ...@@ -519,6 +519,19 @@ import CodeListService from "@/codelist/codelist-service";
*/ */
public afterMounted () { public afterMounted () {
const loadMoreCallBack:any = this.throttle(this.loadMore,3000); const loadMoreCallBack:any = this.throttle(this.loadMore,3000);
<#if ctrl.getBatchPSDEToolbar?? && ctrl.getBatchPSDEToolbar()??>
let listDom = this.$el.children[0];
listDom.addEventListener('scroll', ()=> {
if(this.$el.scrollHeight > this.$el.clientHeight) {
this.isScrollBar = true;
} else {
this.isScrollBar = false;
}
if( this.$el.scrollTop + this.$el.clientHeight >= this.$el.scrollHeight) {
loadMoreCallBack();
}
})
<#else>
this.$el.addEventListener('scroll', ()=> { this.$el.addEventListener('scroll', ()=> {
if(this.$el.scrollHeight > this.$el.clientHeight) { if(this.$el.scrollHeight > this.$el.clientHeight) {
this.isScrollBar = true; this.isScrollBar = true;
...@@ -529,6 +542,7 @@ import CodeListService from "@/codelist/codelist-service"; ...@@ -529,6 +542,7 @@ import CodeListService from "@/codelist/codelist-service";
loadMoreCallBack(); loadMoreCallBack();
} }
}) })
</#if>
} }
/** /**
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
@clickSort="(val) => {sortClick(val);}"> @clickSort="(val) => {sortClick(val);}">
</app-sort-bar> </app-sort-bar>
</#if> </#if>
<row class="data-view-container" v-if="items.length > 0" :gutter="20" type="flex" justify="start" style="margin:0px;"> <row class="data-view-container" v-show="items.length > 0" :gutter="20" type="flex" justify="start" style="margin:0px;">
<#if ctrl.isEnableGroup?? && !ctrl.isEnableGroup()> <#if ctrl.isEnableGroup?? && !ctrl.isEnableGroup()>
<a v-for="(item,index) in items" :key="index" :href = "item.starturl"> <a v-for="(item,index) in items" :key="index" :href = "item.starturl">
<i-col <#if ctrl.getCardColLG() gt 0> :lg="${ctrl.getCardColLG()?c}"</#if><#if ctrl.getCardColMD() gt 0> :md="${ctrl.getCardColMD()?c}"</#if><#if ctrl.getCardColSM() gt 0> :sm="${ctrl.getCardColSM()?c}"</#if><#if ctrl.getCardColXS() gt 0> :xs="${ctrl.getCardColXS()?c}"</#if> style="<#if ctrl.getCardHeight() gt 0>height: ${ctrl.getCardHeight()?c}<#else>min-height: 170</#if>px;<#if ctrl.getCardWidth() gt 0> width: ${ctrl.getCardWidth()?c}px;</#if>margin-bottom: 10px;"> <i-col <#if ctrl.getCardColLG() gt 0> :lg="${ctrl.getCardColLG()?c}"</#if><#if ctrl.getCardColMD() gt 0> :md="${ctrl.getCardColMD()?c}"</#if><#if ctrl.getCardColSM() gt 0> :sm="${ctrl.getCardColSM()?c}"</#if><#if ctrl.getCardColXS() gt 0> :xs="${ctrl.getCardColXS()?c}"</#if> style="<#if ctrl.getCardHeight() gt 0>height: ${ctrl.getCardHeight()?c}<#else>min-height: 170</#if>px;<#if ctrl.getCardWidth() gt 0> width: ${ctrl.getCardWidth()?c}px;</#if>margin-bottom: 10px;">
...@@ -103,8 +103,23 @@ ...@@ -103,8 +103,23 @@
</el-collapse-item> </el-collapse-item>
</el-collapse> </el-collapse>
</#if> </#if>
<#if ctrl.getBatchPSDEToolbar?? && ctrl.getBatchPSDEToolbar()??>
<div class="drag-filed" @mousedown="down">
<row class='dataview-pagination'>
<div v-show="flag" class="batch-toolbar">
<#assign batchToolbar = ctrl.getBatchPSDEToolbar()/>
<@ibizindent blank=12>
${P.getCtrlCode(batchToolbar, 'CONTROL.html').code}
</@ibizindent>
</div>
<div class="dataview-pagination-icon">
<Icon type="md-code-working" @click="onClick"/>
</div>
</row>
</div>
</#if>
</row> </row>
<div v-else class="app-data-empty"> <div v-show="items.length == 0" class="app-data-empty">
{{ $t('<#if langbase??>${langbase}.nodata</#if>') }} {{ $t('<#if langbase??>${langbase}.nodata</#if>') }}
<#if ctrl.getQuickPSDEToolbar?? && ctrl.getQuickPSDEToolbar()??> <#if ctrl.getQuickPSDEToolbar?? && ctrl.getQuickPSDEToolbar()??>
<span class="quick-toolbar"> <span class="quick-toolbar">
...@@ -115,22 +130,7 @@ ...@@ -115,22 +130,7 @@
</span> </span>
</#if> </#if>
</div> </div>
<el-backtop target=".content-container .app-data-view"></el-backtop> <el-backtop target=".content-container .app-data-view"></el-backtop>
<#if ctrl.getBatchPSDEToolbar?? && ctrl.getBatchPSDEToolbar()??>
<div class="drag-filed" @mousedown="down">
<row class='dataview-pagination'>
<div v-show="flag" class="batch-toolbar">
<#assign batchToolbar = ctrl.getBatchPSDEToolbar()/>
<@ibizindent blank=12>
${P.getCtrlCode(batchToolbar, 'CONTROL.html').code}
</@ibizindent>
</div>
<div class="dataview-pagination-icon">
<Icon type="md-code-working" @click="onClick"/>
</div>
</row>
</div>
</#if>
</div> </div>
</#if> </#if>
</template> </template>
...@@ -659,13 +659,15 @@ import CodeListService from "@/codelist/codelist-service"; ...@@ -659,13 +659,15 @@ import CodeListService from "@/codelist/codelist-service";
*/ */
public afterMounted(){ public afterMounted(){
this.$el.addEventListener('scroll', ()=> { this.$el.addEventListener('scroll', ()=> {
<#if ctrl.getBatchPSDEToolbar?? && ctrl.getBatchPSDEToolbar()??>
let el: any = this.$el.getElementsByClassName('dataview-pagination')[0]; let el: any = this.$el.getElementsByClassName('dataview-pagination')[0];
el.style.top = 40 + this.$el.scrollTop + 'px'; el.style.top = 40 + this.$el.scrollTop + 'px';
<#if ctrl.isEnablePagingBar()> </#if>
<#if ctrl.isEnablePagingBar()>
if( this.$el.scrollTop + this.$el.clientHeight >= this.$el.scrollHeight) { if( this.$el.scrollTop + this.$el.clientHeight >= this.$el.scrollHeight) {
this.loadMore(); this.loadMore();
} }
</#if> </#if>
}) })
} }
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
height: 100%; height: 100%;
overflow-y: auto; overflow-y: auto;
overflow-x: hidden; overflow-x: hidden;
position: relative;
// 排序栏样式 // 排序栏样式
.bar-container{ .bar-container{
padding: 6px 8px; padding: 6px 8px;
...@@ -67,6 +66,7 @@ ...@@ -67,6 +66,7 @@
} }
} }
.data-view-container { .data-view-container {
position: relative;
<#if hasSortBar> <#if hasSortBar>
height: calc(100% - 42px); height: calc(100% - 42px);
<#else> <#else>
......
...@@ -11,17 +11,24 @@ ${ctrl.render.code} ...@@ -11,17 +11,24 @@ ${ctrl.render.code}
<#if ctrl.groupRender??> <#if ctrl.groupRender??>
${ctrl.groupRender.code} ${ctrl.groupRender.code}
<#else> <#else>
<div :key="index" class="dataview-group-folading-kanban"> <draggable :key="index" :list="group.items" class="dragbar" ghostClass="dragitems" handle=".dataview-group-item" :group="{name: 'bar', put: group.folding ? false:true}" @change="onDragChange($event,group.value)">
<div class="dataview-group-icon"> <div v-show="!group.folding" :key="index" class="dataview-group-folading-kanban" @click="onClick(group,index)">
<Icon :type="group.folding ? 'md-arrow-dropright' : 'md-arrow-dropleft'" size="25" @click="onClick(group,index)"/> <div class="unfold-icon">
</div> <i class="el-icon-s-unfold" :title="$t('app.kanban.unfold')"></i>
<div class="dataview-group-folding"> </div>
<span>{{getGroupText(group.value)}}({{group.items.length}})</span> <div class="dataview-group-folding">
<span>{{getGroupText(group.value)}}({{group.items.length}})</span>
</div>
</div> </div>
</div> </draggable>
<div :key="group + index" class="dataview-group-content dataview-group-kanban" style="<#if ctrl.getGroupWidth() gt 0>width: ${ctrl.getGroupWidth()?c}px;<#else>flex-grow: 1;</#if>"> <div :key="group + index" class="dataview-group-content dataview-group-kanban" style="<#if ctrl.getGroupWidth() gt 0>width: ${ctrl.getGroupWidth()?c}px;<#else>flex-grow: 1;</#if>">
<div class="dataview-group-header<#if ctrl.getGroupPSSysCss()??> ${ctrl.getGroupPSSysCss().getCssName()}</#if>"> <div class="dataview-group-header<#if ctrl.getGroupPSSysCss()??> ${ctrl.getGroupPSSysCss().getCssName()}</#if>">
{{ getGroupText(group.value) }} <div class="fold-icon" @click="onClick(group,index)">
<i class="el-icon-s-fold" :title="$t('app.kanban.fold')"></i>
</div>
<span>
{{ getGroupText(group.value) }}
</span>
<#if ctrl.getGroupPSUIActionGroup()??> <#if ctrl.getGroupPSUIActionGroup()??>
<Poptip trigger="hover" content="content" placement="bottom-end" style="float: right;"> <Poptip trigger="hover" content="content" placement="bottom-end" style="float: right;">
<Icon type="md-more" /> <Icon type="md-more" />
...@@ -46,7 +53,7 @@ ${ctrl.render.code} ...@@ -46,7 +53,7 @@ ${ctrl.render.code}
</Poptip> </Poptip>
</#if> </#if>
</div> </div>
<draggable :list="group.items" group="${ctrl.name}" class="dataview-group-items" @change="onDragChange($event, group.value)"> <draggable v-show="group.folding" :list="group.items" group="${ctrl.name}" class="dataview-group-items" @change="onDragChange($event, group.value)">
<div v-for="(item, i) in group.items" :key="i" :class="{'dataview-group-item': true, 'is-select': item.isselected}" @click="handleClick(item)" @dblclick="handleDblClick(item)"> <div v-for="(item, i) in group.items" :key="i" :class="{'dataview-group-item': true, 'is-select': item.isselected}" @click="handleClick(item)" @dblclick="handleDblClick(item)">
<#if ctrl.getItemPSLayoutPanel()??> <#if ctrl.getItemPSLayoutPanel()??>
<#assign panel = ctrl.getItemPSLayoutPanel()> <#assign panel = ctrl.getItemPSLayoutPanel()>
...@@ -627,10 +634,12 @@ draggable, ...@@ -627,10 +634,12 @@ draggable,
}).catch((response: any) => { }).catch((response: any) => {
if (response && response.status && response.data) { if (response && response.status && response.data) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
this.refresh();
return; return;
} }
if (!response || !response.status || !response.data) { if (!response || !response.status || !response.data) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.sysException') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.sysException') as string) });
this.refresh();
return; return;
} }
}); });
...@@ -643,6 +652,7 @@ draggable, ...@@ -643,6 +652,7 @@ draggable,
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public async setGroups() { public async setGroups() {
let tempGroups: Array<any> = this.groups;
if(!this.isGroup || !this.groupField || Object.is(this.groupMode, 'NONE')) { if(!this.isGroup || !this.groupField || Object.is(this.groupMode, 'NONE')) {
return; return;
} }
...@@ -650,10 +660,12 @@ draggable, ...@@ -650,10 +660,12 @@ draggable,
this.groups = []; this.groups = [];
this.items.forEach(item => { this.items.forEach(item => {
let group: any = this.groups.find((group: any) => Object.is(group.name, item[this.groupField])); let group: any = this.groups.find((group: any) => Object.is(group.name, item[this.groupField]));
let state: any = tempGroups.filter((temp: any) => Object.is(item[this.groupField], temp.value))[0];
if(!group) { if(!group) {
this.groups.push({ this.groups.push({
name: item[this.groupField], name: item[this.groupField],
value: item[this.groupField], value: item[this.groupField],
folding: (state && !state.folding) ? state.folding : true,
items: this.getGroupItems(item[this.groupField]) items: this.getGroupItems(item[this.groupField])
}) })
} }
...@@ -665,9 +677,11 @@ draggable, ...@@ -665,9 +677,11 @@ draggable,
this.allCodeList = Util.deepCopy(codelistItems); this.allCodeList = Util.deepCopy(codelistItems);
if(codelistItems && codelistItems.length >0) { if(codelistItems && codelistItems.length >0) {
codelistItems.forEach((item: any) => { codelistItems.forEach((item: any) => {
let state: any = tempGroups.filter((temp: any) => Object.is(item.value, temp.value))[0];
this.groups.push({ this.groups.push({
name: item.value, name: item.value,
value: item.value, value: item.value,
folding: (state && !state.folding) ? state.folding : true,
items: this.getGroupItems(item.value) items: this.getGroupItems(item.value)
}) })
}) })
...@@ -767,12 +781,6 @@ draggable, ...@@ -767,12 +781,6 @@ draggable,
*/ */
public onClick(group: any,index: number){ public onClick(group: any,index: number){
group.folding = !group.folding; group.folding = !group.folding;
let kanban: any = this.$el.getElementsByClassName('dataview-group-kanban')[index];
if(group.folding){
kanban.style.display="none";
}else{
kanban.style.display="block";
}
this.$forceUpdate(); this.$forceUpdate();
} }
......
...@@ -10,8 +10,10 @@ ...@@ -10,8 +10,10 @@
width: 40px; width: 40px;
background-color: #d8d8d8; background-color: #d8d8d8;
color: #a5a5a5; color: #a5a5a5;
.dataview-group-icon{ display: none;
padding: 6px 0; .unfold-icon {
padding: 3px 0;
font-size: 20px;
} }
.dataview-group-folding{ .dataview-group-folding{
height: calc(100% - 39px); height: calc(100% - 39px);
...@@ -22,7 +24,6 @@ ...@@ -22,7 +24,6 @@
} }
.dataview-group-content { .dataview-group-content {
border: 1px solid #ddd; border: 1px solid #ddd;
border-left: 0;
flex-shrink: 0; flex-shrink: 0;
height: 100%; height: 100%;
display: flex; display: flex;
...@@ -30,8 +31,14 @@ ...@@ -30,8 +31,14 @@
.dataview-group-header { .dataview-group-header {
height: 36px; height: 36px;
line-height: 36px; line-height: 36px;
position: relative;
border-bottom: 1px solid #ddd; border-bottom: 1px solid #ddd;
padding: 0 8px; padding: 0 8px;
.fold-icon{
font-size: 20px;
color:#a5a5a5;
position: absolute;
}
.group-action { .group-action {
.group-action-item:nth-child(1) + .group-action-item { .group-action-item:nth-child(1) + .group-action-item {
margin-top: 5px; margin-top: 5px;
...@@ -76,6 +83,19 @@ ...@@ -76,6 +83,19 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.dragitems {
z-index: -1 !important;
margin: 0px !important;
border: none !important;
padding: 0px !important;
height: 0px !important;
.app-layoutpanel {
.app-layoutpanel-container {
padding: 0px !important;
}
}
}
} }
<#ibizinclude> <#ibizinclude>
../@MACRO/CSS/DEFAULT.less.ftl ../@MACRO/CSS/DEFAULT.less.ftl
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
} }
if(!params) params = {}; if(!params) params = {};
Object.assign(params,{copymode:true}); Object.assign(params,{copymode:true});
_this.opendata([{ ...data }], params, $event, xData); _this.opendata([{ ...data }], args, params, $event, xData);
} else { } else {
Object.assign(this.viewparams,{copymode:true}); Object.assign(this.viewparams,{copymode:true});
} }
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
if (args.length > 0) { if (args.length > 0) {
Object.assign(data, { ${keyPSDEField}: args[0].${keyPSDEField} }) Object.assign(data, { ${keyPSDEField}: args[0].${keyPSDEField} })
} }
_this.opendata([{ ...data }], params, $event, xData); _this.opendata([{ ...data }], args, params, $event, xData);
} else { } else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' }); _this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
} }
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
if (args.length > 0) { if (args.length > 0) {
Object.assign(data, { ${keyPSDEField}: args[0].${keyPSDEField} }) Object.assign(data, { ${keyPSDEField}: args[0].${keyPSDEField} })
} }
_this.opendata([{ ...data }], params, $event, xData); _this.opendata([{ ...data }], args, params, $event, xData);
} else { } else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' }); _this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
} }
......
...@@ -143,13 +143,13 @@ ...@@ -143,13 +143,13 @@
<#-- BEGIN:导航参数 --> <#-- BEGIN:导航参数 -->
<#if curNewLogicRefView?? && curNewLogicRefView.getPSNavigateContexts?? && curNewLogicRefView.getPSNavigateContexts()??> <#if curNewLogicRefView?? && curNewLogicRefView.getPSNavigateContexts?? && curNewLogicRefView.getPSNavigateContexts()??>
if(localContext && Object.keys(localContext).length >0){ if(localContext && Object.keys(localContext).length >0){
let _context:any = this.$util.computedNavData(args[0],this.context,this.viewparams,localContext); let _context:any = this.$util.computedNavData(fullargs[0],this.context,this.viewparams,localContext);
Object.assign(tempContext,_context); Object.assign(tempContext,_context);
} }
</#if> </#if>
<#if curNewLogicRefView?? && curNewLogicRefView.getPSNavigateParams?? && curNewLogicRefView.getPSNavigateParams()??> <#if curNewLogicRefView?? && curNewLogicRefView.getPSNavigateParams?? && curNewLogicRefView.getPSNavigateParams()??>
if(localViewParam && Object.keys(localViewParam).length >0){ if(localViewParam && Object.keys(localViewParam).length >0){
let _param:any = this.$util.computedNavData(args[0],this.context,this.viewparams,localViewParam); let _param:any = this.$util.computedNavData(fullargs[0],this.context,this.viewparams,localViewParam);
Object.assign(data,_param); Object.assign(data,_param);
} }
</#if> </#if>
......
...@@ -40,13 +40,13 @@ ...@@ -40,13 +40,13 @@
<#-- BEGIN:导航参数 --> <#-- BEGIN:导航参数 -->
<#if curOPenLogicRefView?? && curOPenLogicRefView.getPSNavigateContexts?? && curOPenLogicRefView.getPSNavigateContexts()??> <#if curOPenLogicRefView?? && curOPenLogicRefView.getPSNavigateContexts?? && curOPenLogicRefView.getPSNavigateContexts()??>
if(localContext && Object.keys(localContext).length >0){ if(localContext && Object.keys(localContext).length >0){
let _context:any = this.$util.computedNavData(args[0],this.context,this.viewparams,localContext); let _context:any = this.$util.computedNavData(fullargs[0],this.context,this.viewparams,localContext);
Object.assign(tempContext,_context); Object.assign(tempContext,_context);
} }
</#if> </#if>
<#if curOPenLogicRefView?? && curOPenLogicRefView.getPSNavigateParams?? && curOPenLogicRefView.getPSNavigateParams()??> <#if curOPenLogicRefView?? && curOPenLogicRefView.getPSNavigateParams?? && curOPenLogicRefView.getPSNavigateParams()??>
if(localViewParam && Object.keys(localViewParam).length >0){ if(localViewParam && Object.keys(localViewParam).length >0){
let _param:any = this.$util.computedNavData(args[0],this.context,this.viewparams,localViewParam); let _param:any = this.$util.computedNavData(fullargs[0],this.context,this.viewparams,localViewParam);
Object.assign(data,_param); Object.assign(data,_param);
} }
</#if> </#if>
......
...@@ -93,6 +93,13 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co ...@@ -93,6 +93,13 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co
*/ */
public quickGroupModel:Array<any> = []; public quickGroupModel:Array<any> = [];
/**
* 是否单选
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public isSingleSelect:boolean = true;
/** /**
* 加载快速分组模型 * 加载快速分组模型
* *
......
...@@ -190,6 +190,8 @@ function getAppLocale(){ ...@@ -190,6 +190,8 @@ function getAppLocale(){
}, },
delete1: "Confirm to delete ", delete1: "Confirm to delete ",
delete2: "the delete operation will be unrecoverable!", delete2: "the delete operation will be unrecoverable!",
fold: "fold",
unfold: "upfold",
}, },
dashBoard: { dashBoard: {
handleClick: { handleClick: {
......
...@@ -189,6 +189,8 @@ function getAppLocale(){ ...@@ -189,6 +189,8 @@ function getAppLocale(){
}, },
delete1: "确认要删除 ", delete1: "确认要删除 ",
delete2: "删除操作将不可恢复?", delete2: "删除操作将不可恢复?",
fold: "折叠",
unfold: "展开",
}, },
dashBoard: { dashBoard: {
handleClick: { handleClick: {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册