diff --git a/src/front/src/components/news-full.vue b/src/front/src/components/news-full.vue index 1ae7a6ff0..5265fe238 100644 --- a/src/front/src/components/news-full.vue +++ b/src/front/src/components/news-full.vue @@ -60,12 +60,16 @@ + + @@ -397,6 +401,42 @@ + + + + + + + + + + + + + + + + + + + + + @@ -425,6 +465,7 @@ export default { const route = useRoute() const newsFull=ref([]) const gallery = ref(false) + const burl = baseURL.slice(0,-1) const loadNews = () => { @@ -494,6 +535,7 @@ export default { // ------------------------------ Галерея const galleryimges=ref([]) const dialogfoto = ref(false) + const dialogfotoOne = ref(false) const indximg = ref('') const openImg = (idimg) => { @@ -501,6 +543,13 @@ export default { indximg.value = newsFull.value.gallery.findIndex(e=>e.id == idimg) } + const openOneImg = (idimg) => { + dialogfotoOne.value = true + galleryimges.value = idimg + console.log(idimg); + + } + watch(()=>indximg ,(newValue,oldValue)=>{ if(newValue){ galleryimges.value = newsFull.value.gallery[newValue.value] @@ -535,36 +584,7 @@ export default { } - const downloadimg = (idimg) => { - console.log(burl+idimg) - const link = document.createElement('a'); - - // link.href = burl+idimg - // link.setAttribute('download', 'file.jpg'); //or any other extension - // document.body.appendChild(link); - // link.click(); - // let link = document.createElement("a") - - // link.href = burl+idimg - // link.setAttribute("download", "image.jpeg"); - // document.body.appendChild(link); - // link.download ='img.jpeg' - // link.download('img.jpeg') - // console.log(burl+idimg,'22222222222222222'); - // link.remove() - - } - - - // const excelOp = (ex) => { - // axiosApiInstance.get(`api/general_vacation/dailyroundup/?excel=${ex}`).then(result => { - // let link = document.createElement("a") - // link.href = baseURL+result.data.path - // link.click() - // link.remove() - // }) - // } return { route, newsFull, @@ -588,7 +608,8 @@ export default { galleryimges, indximg, toggleIncrementLike, - downloadimg + openOneImg, + dialogfotoOne } }