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

Merge branch 'dev'

...@@ -203,7 +203,7 @@ import CodeListService from "@/codelist/codelist-service"; ...@@ -203,7 +203,7 @@ import CodeListService from "@/codelist/codelist-service";
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
@Prop() public updateAction!: string; @Prop() public updateAction!: string;
/** /**
* 部件行为--fetch * 部件行为--fetch
* *
...@@ -212,6 +212,14 @@ import CodeListService from "@/codelist/codelist-service"; ...@@ -212,6 +212,14 @@ import CodeListService from "@/codelist/codelist-service";
*/ */
@Prop() public fetchAction!: string; @Prop() public fetchAction!: string;
/**
* 是否单选
*
* @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
@Prop() public isSingleSelect!: boolean;
<#if view.getPSAppViewLogics?? && view.getPSAppViewLogics()??> <#if view.getPSAppViewLogics?? && view.getPSAppViewLogics()??>
<#list view.getPSAppViewLogics() as logic> <#list view.getPSAppViewLogics() as logic>
<#if logic.getPFLogicCodeType() == 'APP_NEWDATA'> <#if logic.getPFLogicCodeType() == 'APP_NEWDATA'>
...@@ -897,6 +905,9 @@ import CodeListService from "@/codelist/codelist-service"; ...@@ -897,6 +905,9 @@ import CodeListService from "@/codelist/codelist-service";
*/ */
public handleClick(args: any) { public handleClick(args: any) {
// this.clearSelection(); // this.clearSelection();
if(this.isingleSelect){
this.clearSelection();
}
args.isselected = !args.isselected; args.isselected = !args.isselected;
this.selectchange(); this.selectchange();
} }
......
<#assign content> <#assign content>
:showBusyIndicator="${ctrl.isShowBusyIndicator()?c}" :showBusyIndicator="${ctrl.isShowBusyIndicator()?c}"
:isSingleSelect="isSingleSelect"
<#if view.getViewType() == 'DELISTEXPVIEW'> <#if view.getViewType() == 'DELISTEXPVIEW'>
:viewUID="viewUID" :viewUID="viewUID"
</#if> </#if>
......
...@@ -812,6 +812,11 @@ ${gridColumn.getName()} ...@@ -812,6 +812,11 @@ ${gridColumn.getName()}
const sort: string = this.minorSortPSDEF+","+this.minorSortDir; const sort: string = this.minorSortPSDEF+","+this.minorSortDir;
Object.assign(page, { sort: sort }); Object.assign(page, { sort: sort });
} }
//清空selections
if(this.selections && this.selections.length > 0) {
this.selections = [];
this.$emit('selectionchange', this.selections);
}
Object.assign(arg, page); Object.assign(arg, page);
const parentdata: any = {}; const parentdata: any = {};
this.$emit('beforeload', parentdata); this.$emit('beforeload', parentdata);
...@@ -831,7 +836,7 @@ ${gridColumn.getName()} ...@@ -831,7 +836,7 @@ ${gridColumn.getName()}
this.totalrow = response.total; this.totalrow = response.total;
this.items = JSON.parse(JSON.stringify(data)); this.items = JSON.parse(JSON.stringify(data));
// 清空selections,gridItemsModel // 清空selections,gridItemsModel
//this.selections = []; // this.selections = [];
this.gridItemsModel = []; this.gridItemsModel = [];
this.items.forEach(()=>{this.gridItemsModel.push(this.getGridRowModel())}); this.items.forEach(()=>{this.gridItemsModel.push(this.getGridRowModel())});
this.items.forEach((item:any)=>{ this.items.forEach((item:any)=>{
...@@ -1364,10 +1369,6 @@ ${gridColumn.getName()} ...@@ -1364,10 +1369,6 @@ ${gridColumn.getName()}
return; return;
} }
if(Object.is(action,'appRefresh')){ if(Object.is(action,'appRefresh')){
if(this.selections && this.selections.length > 0) {
this.selections = [];
this.$emit('selectionchange', this.selections);
}
this.refresh([data]); this.refresh([data]);
} }
}) })
......
...@@ -116,7 +116,7 @@ ${backend_block} ...@@ -116,7 +116,7 @@ ${backend_block}
const backend = () => { const backend = () => {
<#if item.getPSAppDataEntity?? && item.getPSAppDataEntity()?? && item.getPSAppDEMethod?? && item.getPSAppDEMethod()??> <#if item.getPSAppDataEntity?? && item.getPSAppDataEntity()?? && item.getPSAppDEMethod?? && item.getPSAppDEMethod()??>
const curService:${srfclassname('${item.getPSAppDataEntity().getCodeName()}')}Service = new ${srfclassname('${item.getPSAppDataEntity().getCodeName()}')}Service(); const curService:${srfclassname('${item.getPSAppDataEntity().getCodeName()}')}Service = new ${srfclassname('${item.getPSAppDataEntity().getCodeName()}')}Service();
curService.${item.getPSAppDEMethod().getCodeName()}<#if item.getActionTarget() == 'MULTIKEY'>Batch</#if>(context,data, ${item.isShowBusyIndicator()?c}).then((response: any) => { curService.${item.getPSAppDEMethod().getCodeName()}<#if item.getActionTarget() == 'MULTIKEY' && item.getPSDEAction?? && item.getPSDEAction()?? && item.getPSDEAction().getActionType?? && item.getPSDEAction().getActionType()?? && item.getPSDEAction().getActionType() =="USERCUSTOM">Batch</#if>(context,data, ${item.isShowBusyIndicator()?c}).then((response: any) => {
if (!response || response.status !== 200) { if (!response || response.status !== 200) {
actionContext.$Notice.error({ title: '错误', desc: response.message }); actionContext.$Notice.error({ title: '错误', desc: response.message });
return; return;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册