mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-07 04:43:08 +09:00
엑셀 다운로드시 Entity코드 변환되어 노출될 수 있도록 수정
This commit is contained in:
@@ -371,6 +371,13 @@ export default {
|
||||
response = await statsApi.bsnmDayListExcel(this.grid.params);
|
||||
|
||||
const result = response.data;
|
||||
// entity code 변환
|
||||
result.data.list = result.data.list.map((item) => {
|
||||
return {
|
||||
...item,
|
||||
custNm: this.fromHtmlEntities(item.custNm)
|
||||
}
|
||||
});
|
||||
if (result != null && result.retCode == "0000") {
|
||||
return result.data;
|
||||
} else {
|
||||
@@ -405,6 +412,11 @@ export default {
|
||||
this.excelHeader = res;
|
||||
});
|
||||
},
|
||||
fromHtmlEntities(str) {
|
||||
return (str + '').replace(/&#\d+;/gm, function (s) {
|
||||
return String.fromCharCode(s.match(/\d+/gm)[0]);
|
||||
});
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user