Удаление лишнего без ошибок
ч. 1
This commit is contained in:
1 parent
5c96958d1c
commit
fd2309c154
5 files changed
+14
-59
No files matched your search
@@ -65,19 +65,18 @@
|
||||
@click="menusCloses"
|
||||
/>
|
||||
<v-btn
|
||||
v-if="tab_userComment.length=0"
|
||||
color="blue-darken-1"
|
||||
variant="text"
|
||||
text="Отправить"
|
||||
@click="feedAll"
|
||||
:text="t_userComment.length==0?'Отправить':'Обновить'"
|
||||
@click="proba"
|
||||
/>
|
||||
<v-btn
|
||||
<!-- <v-btn
|
||||
v-else
|
||||
color="blue-darken-1"
|
||||
variant="text"
|
||||
text="Обновить"
|
||||
@click="proba"
|
||||
/>
|
||||
/> -->
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</template>
|
||||
@@ -123,21 +122,6 @@ export default {
|
||||
|
||||
})
|
||||
|
||||
function feedAll() {
|
||||
const feedObj = {}
|
||||
feedObj.ratingstatus = ratingStatus.value.decFeed
|
||||
feedObj.comment = comment.value
|
||||
axiosApiInstance.post('api/feedback/formfeed/', feedObj)
|
||||
comment.value=""
|
||||
t_baseCriteria.value.map(e=>e.rating=5)
|
||||
}
|
||||
|
||||
function feedUp() {
|
||||
const feedObj = {}
|
||||
feedObj.comment = comment.value
|
||||
feedObj.ratingstatus = ratingStatus.value.decFeed
|
||||
axiosApiInstance.put('api/feedback/formupdate/', feedObj)
|
||||
}
|
||||
|
||||
const ratingStatus = computed(() => {
|
||||
const decFeed = []
|
||||
@@ -174,24 +158,21 @@ export default {
|
||||
}
|
||||
|
||||
function proba() {
|
||||
f_userComment()
|
||||
// console.log(t_userComment.value, 't_userComment.value');
|
||||
// console.log(ratingStatus.value.decFeed, 'ratingStatus.value.decFeed');
|
||||
const feedObj = {}
|
||||
|
||||
feedObj.comment = comment.value
|
||||
feedObj.ratingstatus = ratingStatus.value.decFeed
|
||||
if (t_userComment.value.length==0) {
|
||||
console.log('111111111111111111');
|
||||
axiosApiInstance.post(`api/feedback/userComment/`, feedObj)
|
||||
}
|
||||
else {
|
||||
axiosApiInstance.put(`api/feedback/userCommentUp/${t_userComment.value[0].id}/`, feedObj)
|
||||
}
|
||||
console.log(t_userComment.value);
|
||||
f_userComment()
|
||||
console.log(t_userComment.value, '111111111111111111111111111111');
|
||||
}
|
||||
|
||||
return {t_baseCriteria, tab_userComment, comment, average, feedAll, feedUp, menusCloses, myLabel, proba}
|
||||
return {t_baseCriteria, t_userComment, tab_userComment, comment, average, menusCloses, myLabel, proba}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user