提交 62e3d1ab 编写于 作者: JunZai's avatar JunZai

update

上级 ace95904
...@@ -179,10 +179,9 @@ GanttElastic, ...@@ -179,10 +179,9 @@ GanttElastic,
<#if dataItem.getFrontPSCodeList()??> <#if dataItem.getFrontPSCodeList()??>
<#assign codelist = dataItem.getFrontPSCodeList()/> <#assign codelist = dataItem.getFrontPSCodeList()/>
if (Object.is(field, '${dataItem.name}')) { if (Object.is(field, '${dataItem.name}')) {
let items: any[] = this.$store.getters.getCodeList('${codelist.codeName}'); let codelist: any[] = this.$store.getters.getCodeList('CodeList4');
if(items) { if(codelist) {
let item = this.getCodeListItem(items, task[field]); return this.getCodeListItem(codelist, task[field]);
return item.text;
} }
} }
</#if> </#if>
...@@ -200,12 +199,13 @@ GanttElastic, ...@@ -200,12 +199,13 @@ GanttElastic,
* @public * @public
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
public getCodeListItem(items: any[], val: any) { public getCodeListItem(codelist: any, val: any) {
for(let i = 0; i < items.length; i++) { for(let i = 0; i < codelist.items.length; i++) {
if(Object.is(items[i].value, val)) { if(Object.is(codelist.items[i].value, val)) {
return items[i]; return codelist.items[i].text;
} }
} }
return codelist.emptytext;
} }
/** /**
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册