提交 f545fff4 编写于 作者: Cano1997's avatar Cano1997

update:表格透视表多语言

上级 55ce42b2
...@@ -1099,14 +1099,14 @@ import { FormItemModel } from '@/model/form-detail'; ...@@ -1099,14 +1099,14 @@ import { FormItemModel } from '@/model/form-detail';
* @memberof ${srfclassname(ctrl.codeName)} * @memberof ${srfclassname(ctrl.codeName)}
*/ */
public getItem(items: any[], value: any, codelist: any): any { public getItem(items: any[], value: any, codelist: any): any {
const arr: Array<any> = items.filter(item => {return item.value == value}); const item = items.find(item => Object.is(item.value, value));
if (arr.length !== 1) { if (!item) {
return undefined; return undefined;
} }
if(Object.is(codelist.codelistType,'STATIC')){ if(Object.is(codelist.codelistType,'STATIC')){
return this.$t('codelist.'+codelist.srfkey+'.'+arr[0].value); return item.textLanRes ? this.$t(item.textLanRes, item.text) : item.text;
}else{ }else{
return arr[0].text; return item.text;
} }
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册