소스검증을 위한 수정 변경

This commit is contained in:
kimre
2022-07-12 12:26:45 +09:00
parent 74511fb587
commit 3d7032432c
40 changed files with 2028 additions and 2120 deletions

View File

@@ -41,7 +41,7 @@
<div class="button_group">
<button type="button" class="button blue admin add" @click="adminRegPopOpen();">관리자 등록</button>
<button type="button" class="button blue channel add" @click="adminReg2PopOpen();">유치채널 등록</button>
<button type="button" class="button white delete del" @click="deleteRow();">삭제</button>
<button type="button" class="button white delete del" @click="rowDelete();">삭제</button>
</div>
</div>
<div class="table">
@@ -120,18 +120,18 @@ export default {
addCls: 'box_OFvis',
columns: [
{ name: 'no', header: 'No', align: 'center', width: 60},
{ name: 'auth', header: '권한', align: 'center', width: 160 },
{ name: 'name', header: '이름(대리점명)', align: 'center', width: 130},
{ name: 'adminId', header: 'ID', align: 'center', width: 130, renderer: {
{ name: 'no', header: 'NO', align: 'center', width: '15%'},
{ name: 'auth', header: '권한', align: 'center', width: '15%' },
{ name: 'name', header: '이름(대리점명)', align: 'center', width: '20%'},
{ name: 'adminId', header: 'ID', align: 'center', width: '20%', renderer: {
type: CustomATagRenderer
, options: {
callback: this.detailPop,
}
}
},
{ name: 'adminStat', header: '상태', align: 'center', width: 130, cls: 'td_line'},
{ name: 'regDt', header: '등록일', align: 'center', width: 130}
{ name: 'adminStat', header: '상태', align: 'center', width: '5%', cls: 'td_line'},
{ name: 'regDt', header: '등록일', align: 'center', width: '20%'}
],
noDataStr: '검색 결과가 없습니다.',
params: {
@@ -212,7 +212,7 @@ export default {
var chkList = this.$refs.table.checkedElementDatas();
if(chkList.length == 0){
this.row.title = '관리자/유치채널 관리';
this.row.msg1 = '삭제대상을 체크 해주세요.';
this.row.msg1 = '삭제대상을 체크 해주세요.';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
@@ -230,7 +230,7 @@ export default {
console.log("==========getP : " + getP);
this.$store.commit('searchcondition/updateSearchCondition', {
page: getP._currentPage,
perPage: this.perPageCnt,
perPage: this.perPageCnt,
params: this.grid.params
});
@@ -247,15 +247,18 @@ export default {
this.authType = response.data.data.list;
});
},
async deleteRow(){
if(this.doValidate() && window.confirm('삭제 하시겠습니까?')){
rowDelete(){
if(this.doValidate()){
this.row.title ='관리자/유치채널 관리';
this.row.msg1 ='삭제 하시겠습니까?'
this.$refs.commmonModal.confirmModalOpen2(this.row);
}
},
async deleteRow(){
try {
let response = await sysMgtApi.deleteAdmin(this.row);
const result = response.data;
if (result != null && result.retCode == "0000") {
this.row.title = '관리자/유치채널 관리';
this.row.msg1 = '삭제 하였습니다.';
this.$refs.commmonModal.alertModalOpen(this.row);
this.$refs.table.reloadData();
return;
}
@@ -266,8 +269,13 @@ export default {
this.row.title = '관리자/유치채널 관리';
this.row.msg1 = '실패 하였습니다.';
this.$refs.commmonModal.alertModalOpen(this.row);
}
}
}
},
confirmCalbackFnc(props){
console.log(props)
if(props.result){
this.deleteRow();
}
},
},

View File

@@ -46,7 +46,7 @@
</td>
<td v-else class="two_btn_group">
<button type="button" class="button grey" @click="updateAuth(option.authCd)">수정</button>
<button type="button" class="button white delete" @click="deleteAuth(option.authCd)">삭제</button>
<button type="button" class="button white delete" @click="authDelete(option.authCd)">삭제</button>
</td>
</tr>
<!--
@@ -65,12 +65,14 @@
</tbody>
</table>
</div>
<common-modal ref="commmonModal"></common-modal>
</div>
</div>
</template>
<script>
import sysMgtApi from "../service/sysMgtApi.js";
import commonModal from "@/components/modal/commonModal";
export default {
name: 'authList',
@@ -81,7 +83,8 @@ export default {
totalCnt: '',
};
},
components: {
components: {
commonModal,
},
created(){
this.getAuthList();
@@ -104,10 +107,14 @@ export default {
this.list = result.data.list;
this.totalCnt = result.data.list.length;
} else {
alert("조회정보가 없습니다.");
this.row.title ='권한 관리';
this.row.msg1 ='조회정보가 없습니다.'
this.$refs.commmonModal.alertModalOpen(this.row);
}
} catch(err) {
alert("실패 하였습니다.");
this.row.title ='권한 관리';
this.row.msg1 ='실패 하였습니다.'
this.$refs.commmonModal.alertModalOpen(this.row);
}
},
insertAuth(){
@@ -118,25 +125,40 @@ export default {
//console.log("수정페이지로 이동:"+target);
this.$router.push({ name: 'authModify', params: { targetAuthCd: target }});
},
async deleteAuth(target){
//console.log("삭제처리:"+target);
authDelete(target){
this.row.authCd = target;
if(window.confirm('삭제 하시겠습니까?')){
try {
this.row.title ='권한 관리';
this.row.msg1 ='삭제 하시겠습니까?'
this.$refs.commmonModal.confirmModalOpen2(this.row);
},
async deleteAuth(){
//console.log("삭제처리:"+target);
//this.row.authCd = target;
try {
let response = await sysMgtApi.deleteAuth(this.row);
const result = response.data;
if (result != null && result.retCode == "0000") {
alert('삭제 하였습니다.');
this.getAuthList();
return;
} else {
alert("실패 하였습니다.");
this.row={}
this.row.title = '권한 관리';
this.row.msg1 = '실패 하였습니다.';
this.$refs.commmonModal.alertModalOpen(this.row);
}
} catch(err) {
alert("실패 하였습니다.");
this.row={}
this.row.title = '권한 관리';
this.row.msg1 = '실패 하였습니다.';
this.$refs.commmonModal.alertModalOpen(this.row);
}
}
},
},
confirmCalbackFnc(props){
console.log(props)
if(props.result){
this.deleteAuth();
}
},
}
};
</script>