어드민 수정건 수정

This commit is contained in:
USER
2022-07-11 11:43:43 +09:00
parent fb40f49f09
commit 74511fb587
47 changed files with 887 additions and 384 deletions

View File

@@ -3,36 +3,34 @@
<div>
<div class="dimmed modal33" @click="excelPopClose();"></div>
<div class="popup-wrap modal33">
<!-- 사용자 ID 대량 생성 -->
<div class="popup modal33 popup_form">
<div class="pop-head">
<h3 class="pop-tit">사용자 ID 대량 생성</h3>
</div>
<table>
<tbody>
<tr>
<th>관리자 ID</th>
<td>{{adminId}}</td>
</tr>
<tr>
<th>사용자 ID 업로드</th>
<td>
<div class="pop-btn2 bulk">
<button class="btn-default" @click="sampleDown">샘플 다운로드</button>
<input type="file" ref="file" style="display: none" @change="readFile" accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"/>
<button class="button grey" @click="$refs.file.click()">파일 업로드</button>
</div>
<p class="file" id="uploadFile">
</p>
</td>
</tr>
</tbody>
</table>
<div class="pop-btn2">
<button class="btn-pcolor" @click="saveExcel">저장</button>
<button class="btn-default" @click="excelPopClose">취소</button>
</div>
</div>
<div class="popup modal33 popup_form">
<div class="pop-head">
<h3 class="pop-tit">사용자 ID 대량 생성</h3>
</div>
<table>
<tbody>
<tr>
<th>관리자 ID</th>
<td>{{adminId}}</td>
</tr>
<tr>
<th>사용자 ID 업로드</th>
<td>
<div class="popup-btn2 bulk">
<input type="file" ref="file" style="display: none" @change="readFile" accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"/>
<button class="btn-default" @click="sampleDown">샘플 다운로드</button>
<button class="button btn-p2color" @click="$refs.file.click()">파일 업로드</button>
</div>
<p class="file" id="uploadFile"></p>
</td>
</tr>
</tbody>
</table>
<div class="popup-btn2">
<button class="btn-pcolor" @click="saveExcel">저장</button>
<button class="btn-default" @click="excelPopClose">취소</button>
</div>
</div>
<common-modal ref="commmonModal"></common-modal>
</div>
</div>
@@ -66,9 +64,9 @@ export default {
components: {
commonModal,
},
created(){
created(){
this.getExcelHeader();
},
},
methods :{
// 모달 띄우기
excelPopOpen(adminId, totalItems){
@@ -87,7 +85,7 @@ export default {
for(var i = 0; i < excelPop.length; i++){
excelPop[i].style.display = 'none';
}
},
// 저장 후 부모창 호출.
toComplete(){
@@ -135,13 +133,13 @@ export default {
const file = event.target.files[0];
console.log(file.name);
// inner Html.
const button = document.createElement('button');
const text = document.createElement('p');
text.innerText = file.name;
button.addEventListener('click', () => {
this.delFile(event);
this.delFile(event);
})
const root = document.getElementById('uploadFile');
root.appendChild(text);
@@ -169,7 +167,7 @@ export default {
const rowObj = XLSX.utils.sheet_to_json(workbook.Sheets[sheetName],{raw:true});
tmpResult = rowObj;
const limitCnt = 100;
const totalCnt = Number(this.totalItems) + rowObj.length;
if(totalCnt > limitCnt){
@@ -178,7 +176,7 @@ export default {
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
for (const [idx,r] of rowObj.entries()) {
if(idx > limitCnt-1 ) {
break;
@@ -203,7 +201,7 @@ export default {
{ name:'ID잠금',val:ID잠금, len:4,},];
const rVal = vm.isTitle(pVal);
if(rVal.retVal){
vm.nData.push({userId:ID,userNm:이름,mdn:휴대폰번호,email:이메일,stat:ID잠금,msg});
}else{
@@ -265,7 +263,7 @@ export default {
// uploadFile
},
async saveExcel(){
//
//
this.row.adminId = this.adminId;
this.row.list = this.nData;
@@ -274,7 +272,7 @@ export default {
const result = response.data;
console.log(result);
if (result != null && result.retCode == "0000") {
// this.totalCnt = result.data.totalCnt;
// this.successCnt = result.data.successCnt;
// this.failCnt = result.data.failCnt;
@@ -290,7 +288,7 @@ export default {
// 오류건수.
console.log(this.oData.length);
},
}
}
</script>