mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-06 18:13:18 +09:00
엑셀 다운로드시 Entity코드 변환되어 노출될 수 있도록 수정
This commit is contained in:
@@ -360,6 +360,13 @@ export default {
|
||||
response = await channelMgtApi.sendNumberListExcel(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 {
|
||||
|
||||
@@ -326,6 +326,13 @@ export default {
|
||||
response = await channelMgtApi.channelListExcel(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 {
|
||||
|
||||
@@ -430,6 +430,13 @@ export default {
|
||||
response = await calcMgtApi.calcListExcel(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 {
|
||||
@@ -449,6 +456,11 @@ export default {
|
||||
initEndDate.setMonth(Number(moment(initEndDate).format('MM')) - 2);
|
||||
this.endDate = initEndDate;
|
||||
},
|
||||
fromHtmlEntities(str) {
|
||||
return (str + '').replace(/&#\d+;/gm, function (s) {
|
||||
return String.fromCharCode(s.match(/\d+/gm)[0]);
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
;
|
||||
|
||||
@@ -202,6 +202,13 @@ export default {
|
||||
response = await channelMgtApi.tmpltListExcel(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 {
|
||||
@@ -246,6 +253,11 @@ export default {
|
||||
this.grid.pagePerRows = this.perPageCnt;
|
||||
this.search(true);
|
||||
},
|
||||
fromHtmlEntities(str) {
|
||||
return (str + '').replace(/&#\d+;/gm, function (s) {
|
||||
return String.fromCharCode(s.match(/\d+/gm)[0]);
|
||||
});
|
||||
},
|
||||
},
|
||||
|
||||
beforeRouteLeave(to, from, next) {
|
||||
|
||||
@@ -328,6 +328,13 @@ export default {
|
||||
response = await custMgtApi.subsListExcel(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 {
|
||||
@@ -349,6 +356,13 @@ export default {
|
||||
const saveFileName = `청약고객정보_${today}.xls`;
|
||||
|
||||
const data = await this.getExcelDataDown();
|
||||
if (!data) {
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '엑셀 다운로드가 실패해습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
|
||||
let options = {
|
||||
header: this.excelHeader,
|
||||
dataOrder: 'header'
|
||||
@@ -410,6 +424,11 @@ export default {
|
||||
let initStartDate = new Date(setYear, 0, 1);
|
||||
this.startDate = initStartDate;
|
||||
},
|
||||
fromHtmlEntities(str) {
|
||||
return (str + '').replace(/&#\d+;/gm, function (s) {
|
||||
return String.fromCharCode(s.match(/\d+/gm)[0]);
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -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>
|
||||
@@ -383,6 +383,13 @@ export default {
|
||||
response = await statsApi.bsnmMonthListExcel(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 {
|
||||
@@ -411,6 +418,12 @@ export default {
|
||||
xlsx.export(data.list, saveFileName, options).then(() => {
|
||||
});
|
||||
},
|
||||
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