@listClick="fnView"
>
<template v-slot:button="{ row, idx }">
+ <div v-if="list[idx]['useYn'] == 'N'">미사용</div>
<button
class="btn-ico md ico-del"
@click.stop="fnDel(row, idx)"
- v-if="pageAuth.delAuthrt == 'Y'"
+ v-else-if="pageAuth.delAuthrt == 'Y'"
</button>
</template>
this.listCnt = res.data.data.pagination.totalRecordCount;
this.search = res.data.data.pagination;
this.makeTbody();
+ console.log("this.list : ", this.list);
} catch (error) {
// console.log("error : ", error);
}
</div>
<div class="btn-wrap">
-
<button class="btn sm tertiary" @click="fnList">목록</button>
class="btn sm primaary"
+ @click="fnUse"
+ v-if="authrt.useYn == 'N' && pageAuth.mdfcnAuthrt == 'Y'"
+ >
+ 사용
+ </button>
+ <button
+ class="btn sm primaary"
@click="fnUpdate"
- v-if="pageAuth.mdfcnAuthrt == 'Y'"
+ v-if="authrt.useYn == 'Y' && pageAuth.mdfcnAuthrt == 'Y'"
수정
class="btn sm red"
@click="fnDelete"
+ v-if="authrt.useYn == 'Y' && pageAuth.delAuthrt == 'Y'"
삭제
<script>
import queryParams from "../../../../../resources/js/queryParams";
-import { findByAuthrt, del } from "../../../../../resources/api/authrt";
+import { findByAuthrt, del, update } from "../../../../../resources/api/authrt";
export default {
mixins: [queryParams],
alert("에러가 발생했습니다.\n시스템관리자에게 문의하세요.");
},
+ // 사용
+ async fnUse() {
+ if (!confirm("권한코드를 사용으로 변경하시겠습니까?")) {
+ return;
+ }
+ try {
+ this.authrt.useYn = "Y";
+ this.authrt.originAuthrtCd = this.authrt.authrtCd;
+ const res = await update(this.authrt);
+ alert(res.data.message);
+ if (res.status == 200) {
+ window.location.reload(); // 새로고침
+ } catch (error) {
+ alert("에러가 발생했습니다.\n시스템관리자에게 문의하세요.");
+ },
watch: {},
computed: {},
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?