Merge branch 'main' into project-list
This commit is contained in:
commit
8fcc702d9b
@ -151,16 +151,33 @@ const togglePassword = (button) => {
|
||||
};
|
||||
|
||||
// 비밀번호 확인
|
||||
const handlePasswordSubmit = () => {
|
||||
const handlePasswordSubmit = async () => {
|
||||
isPassword.value = false;
|
||||
lastClickedButton.value = null;
|
||||
|
||||
console.log('비밀번호:', password.value);
|
||||
console.log(props.boardId)
|
||||
|
||||
try {
|
||||
const requestData = {
|
||||
LOCBRDPWD: password.value,
|
||||
LOCBRDSEQ: 288
|
||||
}
|
||||
|
||||
console.log(requestData)
|
||||
|
||||
const postResponse = await axios.post(`board/${props.boardId}/password`, requestData);
|
||||
|
||||
// router.push({ name: 'BoardEdit', params: { id: props.boardId } }); // 편집 예시
|
||||
console.log('post결과:', postResponse.data)
|
||||
|
||||
// if (response.data.code === 200 && response.data.data === true) {
|
||||
// console.log("완료"); // 비밀번호가 맞으면 출력
|
||||
// } else {
|
||||
// console.log("비밀번호가 틀립니다.");
|
||||
// }
|
||||
} catch (error) {
|
||||
console.error('비밀번호 확인 중 오류 발생:', error);
|
||||
}
|
||||
};
|
||||
|
||||
const deletePost = async () => {
|
||||
|
||||
@ -1,24 +1,33 @@
|
||||
<template>
|
||||
<div class="d-flex">
|
||||
<div>
|
||||
<div class="row">
|
||||
<div class="col-10">
|
||||
<FormSelect
|
||||
name="cate"
|
||||
title="카테고리"
|
||||
title="카테고리 선택"
|
||||
:data="formattedDataList"
|
||||
:is-common="true"
|
||||
@update:data="selectCategory = $event"
|
||||
@change="onChange"
|
||||
/>
|
||||
|
||||
</div>
|
||||
<div class="col-2 btn-margin">
|
||||
<PlusBtn @click="toggleInput"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="d-flex" v-if="showInput">
|
||||
<FormInput :isLabel="false" title="카테고리" name="카테고리" @update:modelValue="addCategory = $event" :is-alert="addCategoryAlert"/>
|
||||
<button class="btn btn-primary" @click="saveInput">
|
||||
<div class="row" v-if="showInput">
|
||||
<div class="col-10">
|
||||
<FormInput title="카테고리 입력" name="카테고리" @update:modelValue="addCategory = $event" :is-alert="addCategoryAlert"/>
|
||||
</div>
|
||||
<div class="col-2 btn-margin">
|
||||
<button class="btn btn-primary btn-icon" @click="saveInput">
|
||||
<i class="bx bx-check"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
</div>
|
||||
<div class="dict-w">
|
||||
<FormInput
|
||||
title="용어"
|
||||
type="text"
|
||||
@ -30,10 +39,11 @@
|
||||
</div>
|
||||
<div>
|
||||
<QEditor @update:data="content = $event" @update:imageUrls="imageUrls = $event" :is-alert="wordContentAlert" />
|
||||
<div class="text-end mt-5">
|
||||
<button class="btn btn-primary" @click="saveWord">
|
||||
<i class="bx bx-check"></i>
|
||||
</button>
|
||||
<button @click="$emit('close')">취소</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -124,3 +134,15 @@ const saveWord = () => {
|
||||
emit('addWord', wordData);
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.dict-w {
|
||||
width: 83%;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.btn-margin {
|
||||
margin-top: 2.5rem
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -172,7 +172,7 @@
|
||||
}).then(res => {
|
||||
if(res.data.data == '1'){
|
||||
toastStore.onToast('카테고리가 추가 등록 되었습니다.', 's');
|
||||
const newCategory = { CMNCODNAM: data, CMNCODVAL: newValue.toString() }; // Assuming CMNCODVAL is the same as CMNCODNAM
|
||||
const newCategory = { CMNCODNAM: data, CMNCODVAL: newValue.toString() };
|
||||
cateList.value.unshift(newCategory);
|
||||
selectCategory.value = newCategory.CMNCODVAL;
|
||||
}
|
||||
@ -181,10 +181,6 @@
|
||||
//용어 등록
|
||||
const addWord = (wordData) => {
|
||||
|
||||
// console.log('단어 추가됨:', wordData.category); // WRDDICCAT
|
||||
// console.log('단어 추가됨:', wordData.content); // WRDDICCON
|
||||
// console.log('단어 추가됨:', wordData.title); // WRDDICTTL
|
||||
|
||||
axios.post('worddict/insertWord',{
|
||||
WRDDICCAT : wordData.category,
|
||||
WRDDICTTL : wordData.title,
|
||||
@ -192,10 +188,8 @@
|
||||
}).then(res => {
|
||||
if(res.data.data == '1'){
|
||||
toastStore.onToast('용어가 등록 되었습니다.', 's');
|
||||
isWriteVisible.value = false
|
||||
// const newCategory = { CMNCODNAM: data, CMNCODVAL: newValue.toString() };
|
||||
// cateList.value.unshift(newCategory);
|
||||
// selectCategory.value = newCategory.CMNCODVAL;
|
||||
isWriteVisible.value = false;
|
||||
getwordList();
|
||||
}
|
||||
})
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user