
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
<!--
작성자 : 정다정
작성일 : 2024.01.16
내용 : 진단대상 DB 관리 스키마 조회 및 테이블 수정
-->
<template>
<div class="content">
<div class="content-titleZone">
<p class="box-title">DBMS 스키마 정보</p>
</div>
<div class="table-zone">
<table class="list-table" style="text-align: center">
<colgroup>
<col width="5%" />
<col width="10%" />
<col width="20%" />
<col width="20%" />
<col width="40%" />
</colgroup>
<thead>
<tr>
<th>No.</th>
<th>수집 제외</th>
<th>DB 접속 대상</th>
<th>스키마명</th>
<th>설명</th>
</tr>
</thead>
<tbody>
<tr v-for="(item, index) in schemaList" :key="index">
<td>{{ index + 1 }}</td>
<td>
<input type="checkbox" :checked="item.schema_yn === 'y'" @change="changeYN(item, yn)" />
</td>
<td>{{ item.dbms_name }}</td>
<td>{{ item.schema_name }}</td>
<td>
<input type="text" :placeholder="item.schema_explain" v-model="updated_explain" />
</td>
</tr>
</tbody>
</table>
<div class="flex justify-end">
<button class="red-border-btn small-btn">수집제외 여부, 설명 저장</button>
</div>
</div>
<div>{{ update_yn }}</div>
<div>{{ updated_explain }}</div>
<PaginationButton :perPage="perPage" :currentPage.sync="currentPage" :totalCount="totalCount" />
</div>
</template>
<script>
import axios from 'axios';
import PaginationButton from '../../component/PaginationButton.vue';
export default {
data() {
return {
dbms_id: 2, //임시 dbms_id
schemaList: [],
perPage: 10,
currentPage: 1,
totalCount: 0,
// 스키마 수정 목록
updated_explain: '',
updateSchemaList: [],
};
},
methods: {
//스키마 정보 수집
getSchema() {
const vm = this;
axios({
url: '/selectSchemaList.json',
method: 'post',
headers: {
'Content-Type': 'application/json; charset=UTF-8',
},
data: {
dbms_id: vm.dbms_id,
},
})
.then((res) => {
console.log('스키마 정보 수집 응답 : ', res.data);
vm.schemaList = res.data;
})
.catch((err) => {
console.log('스키마 정보 수집 에러 : ', err);
alert('스키마 수집 에러');
});
},
// 수정할 스키마 정보 저장
// 수집 제외 여부
changeYN(item, yn) {
console.log('yn : ', yn);
let updateSchema = {
update_id: item.schema_id,
update_yn: yn ? 'y' : 'n',
};
console.log(updateSchema);
},
},
components: {
PaginationButton: PaginationButton,
},
mounted() {
this.getSchema();
},
};
</script>
<style></style>