feat: add ci cd files dont edit those files
This commit is contained in:
@@ -0,0 +1,115 @@
|
||||
<template>
|
||||
<section class="s4">
|
||||
<div class="row">
|
||||
<div class="col-12 gallery-btn">
|
||||
<div class="mt-2 view-link">
|
||||
<button
|
||||
@click="setChangeInPage({...$route.query,galleryType: 'image',page: 1})"
|
||||
class="btn bigBtn btn-primary"
|
||||
:class="galleryType === 'image' && 'btn-active'"
|
||||
>
|
||||
<span>عکس</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="mt-2 view-link">
|
||||
<button
|
||||
@click="setChangeInPage({...$route.query, galleryType: 'video',page: 1})"
|
||||
class="btn bigBtn btn-primary"
|
||||
:class="galleryType === 'video' && 'btn-active'"
|
||||
>
|
||||
<span>فیلم</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="mt-2 view-link">
|
||||
<button
|
||||
@click="setChangeInPage({...$route.query,galleryType: 'graphic',page: 1})"
|
||||
class="btn bigBtn btn-primary"
|
||||
:class="galleryType === 'graphic' && 'btn-active'"
|
||||
>
|
||||
<span>گرافیک</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="favorites view-gallery" v-if="media.favorites.length">-->
|
||||
<div class="favorites view-gallery">
|
||||
<LineTxt label="چندرسانه ای"/>
|
||||
<div class="sectionStyle" v-if="media.favorites.length">
|
||||
<div id="mediaFavorites">
|
||||
<div class="slide" v-for="(item,index) in media.favorites" :key="item._id + 1" :class="index && 'hide'">
|
||||
<nuxt-link :to="url(item._id)" :title="item.title" class="view-item">
|
||||
<img :src="item.cover" :alt="item.title">
|
||||
<div class="title">
|
||||
<h3>{{ item.title }}</h3>
|
||||
</div>
|
||||
</nuxt-link>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="items">
|
||||
<!-- <LineTxt v-if="galleryType === 'image'" :label="` تصاویر ${category.category.title}`"/>-->
|
||||
<!-- <LineTxt v-if="galleryType === 'video'" :label="` فیلم های ${category.category.title}`"/>-->
|
||||
<!-- <LineTxt v-if="galleryType === 'graphic'" :label="` گرافیک های ${category.category.title}`"/>-->
|
||||
|
||||
<div class="sectionStyle" v-if="media.all.docs.length">
|
||||
<div class="view-gallery">
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-3 mb-3" v-for="item in media.all.docs" :key="item._id">
|
||||
<nuxt-link class="view-item" :to="url(item._id)" :title="item.title">
|
||||
<img :src="item.thumbCover" :alt="item.title">
|
||||
<div class="title">
|
||||
<h5>{{ item.title }}</h5>
|
||||
</div>
|
||||
</nuxt-link>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="not-found" v-else>
|
||||
<p>موردی وجود ندارد!</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="paginate">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<el-pagination
|
||||
layout="next, pager, prev"
|
||||
v-if="media.all.totalPages > 1"
|
||||
class="el-pagination"
|
||||
@current-change="pageNumber"
|
||||
:current-page="Number($route.query.page)"
|
||||
:page-count="Number(media.all.totalPages)"
|
||||
>
|
||||
</el-pagination>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
if (process.client) require("slick-carousel")
|
||||
|
||||
export default {
|
||||
props: ['setChangeInPage', 'galleryType', 'media', 'category', 'pageNumber', 'url'],
|
||||
mounted() {
|
||||
$(document).ready(() => {
|
||||
$("#mediaFavorites").on('init', function () {
|
||||
$('#mediaFavorites .slide').removeClass('hide')
|
||||
})
|
||||
$("#mediaFavorites").slick({
|
||||
dots: true,
|
||||
slidesToShow: 1,
|
||||
rtl: true,
|
||||
autoplay: true,
|
||||
autoplaySpeed: 3000,
|
||||
speed: 1000,
|
||||
arrows: false,
|
||||
infinite: false,
|
||||
pauseOnHover: true
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,41 @@
|
||||
<template>
|
||||
<div class="heronews">
|
||||
<div class="title-holder">
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-6 view-img">
|
||||
<img class="image" :src="data.thumbCover" :alt="data.title">
|
||||
</div>
|
||||
<div class="col-12 col-md-6">
|
||||
<!-- <h2 class="title" :title="data.summaryTitle">{{ data.summaryTitle }}</h2>-->
|
||||
<p class="paragraph titr" :title="data.title">{{ data.title }}</p>
|
||||
<p class="paragraph lid" :title="data.leadTitle">{{ data.leadTitle }}</p>
|
||||
<span class="s1-date">
|
||||
{{ jData2(data.customDate) }}
|
||||
</span>
|
||||
<nuxt-link class="btn btn-primary" :to="{name: 'portal-news-details',params: {portal: $route.params.portal,details: data._id}}">ادامه مطلب</nuxt-link>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
import moment from "moment-jalaali"
|
||||
|
||||
export default {
|
||||
props: {
|
||||
data: {
|
||||
required: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
jData(data) {
|
||||
return moment(data).locale('fa').format('LL')
|
||||
},
|
||||
jData2(data) {
|
||||
return moment(data).locale('fa').fromNow()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,17 @@
|
||||
<template>
|
||||
<div class="line-txt mt-5">
|
||||
<span>{{ label }}</span>
|
||||
<div class="line mb-4"></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
label: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,53 @@
|
||||
<template>
|
||||
<nuxt-link :to="{name: 'portal-news-details', params: {portal: $route.params.portal,details: item._id}}" v-slot="{href,navigate}" custom>
|
||||
<div @click="navigate" class="newsBox justifyBetween col-12 col-md-3 mb-4 pointer" :title="item.title">
|
||||
<div class="innerBox">
|
||||
<img :src="item.thumbCover" :alt="item.title">
|
||||
<div class="suTitrBox mt-1">
|
||||
<div>
|
||||
<h2>
|
||||
<!-- <b>{{ item.summaryTitle }}</b>-->
|
||||
<span> {{ item.title }} </span>
|
||||
</h2>
|
||||
</div>
|
||||
<!-- <div>-->
|
||||
<!-- <h2>{{ item.title }}</h2>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<h3 class="mt-2">{{ item.leadTitle || item.title }}</h3>
|
||||
<div class="row date">
|
||||
<div class="col-12">
|
||||
<p>{{ jDate(item.customDate) }}</p>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<a :href="href" class="btn btn-primary mt-2">
|
||||
<span class="txtBtn">ادامه مطلب</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nuxt-link>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import moment from "moment-jalaali"
|
||||
|
||||
export default {
|
||||
props: {
|
||||
item: {
|
||||
required: true
|
||||
},
|
||||
timeIsAgo: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
jDate(data) {
|
||||
if (this.timeIsAgo) return moment(data).locale('fa').fromNow()
|
||||
else return moment(data).locale('fa').format('LL')
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,452 @@
|
||||
<template>
|
||||
<div class="off-canvas">
|
||||
<div class="side d-none d-md-block">
|
||||
<div class="relativePos">
|
||||
<div
|
||||
class="closeBtn d-none d-md-inline-block"
|
||||
@click="closeOffCanvas">
|
||||
<div class="x"></div>
|
||||
<span>بستن</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="overflow-y: auto; width: 100%">
|
||||
<div class="main">
|
||||
<div
|
||||
class="closeBtnMobile d-block d-md-none"
|
||||
@click="closeOffCanvas">
|
||||
<div class="x"></div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div
|
||||
class="col-12 col-lg-4 order-0 order-lg-1 mb-5 mb-lg-0">
|
||||
<div class="searchBox">
|
||||
<div class="title">
|
||||
<p class="title-search">
|
||||
<i class="fal fa-search"></i>
|
||||
<span>جست و جو</span>
|
||||
</p>
|
||||
<form @submit.prevent="doSearch">
|
||||
<input
|
||||
type="text"
|
||||
name="search"
|
||||
v-model="searchableText"
|
||||
placeholder="عبارت مدنظر خود را بنویسید" />
|
||||
<button type="submit">
|
||||
<i class="fal fa-search"></i>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<template v-if="yearBanner.electionBtn">
|
||||
<el-divider />
|
||||
<nuxt-link
|
||||
:to="{
|
||||
name: 'portal',
|
||||
params: {
|
||||
portal:
|
||||
currentPortal === 'ostandari'
|
||||
? 'election'
|
||||
: 'ostandari',
|
||||
},
|
||||
}"
|
||||
v-slot="{ navigate, href }"
|
||||
custom>
|
||||
<div class="mt-3" @click="navigate">
|
||||
<a
|
||||
class="btn bigBtn btn-primary"
|
||||
:href="href">
|
||||
{{
|
||||
currentPortal === "ostandari"
|
||||
? "برو به صفحه ستاد انتخابات"
|
||||
: "برو به صفحه استانداری"
|
||||
}}
|
||||
</a>
|
||||
</div>
|
||||
</nuxt-link>
|
||||
</template>
|
||||
</div>
|
||||
<div class="col-12 col-lg-8 order-1 order-lg-0">
|
||||
<nav>
|
||||
<ul class="row item1">
|
||||
<nuxt-link
|
||||
class="col-12 col-md-4 mb-3"
|
||||
:to="{
|
||||
name: 'portal',
|
||||
params: { portal: currentPortal },
|
||||
}"
|
||||
v-slot="{ href, navigate, isActive }"
|
||||
custom>
|
||||
<li
|
||||
@click="navigate"
|
||||
:class="isActive ? 'active' : null">
|
||||
<a class="mainLink" :href="href"
|
||||
>صفحه اصلی</a
|
||||
>
|
||||
</li>
|
||||
</nuxt-link>
|
||||
|
||||
<nuxt-link
|
||||
class="col-12 col-md-4 mb-3"
|
||||
:to="{
|
||||
name: 'portal-contact',
|
||||
params: { portal: currentPortal },
|
||||
}"
|
||||
v-slot="{ navigate, href, isActive }"
|
||||
custom>
|
||||
<li
|
||||
@click="navigate"
|
||||
:class="isActive ? 'active' : null">
|
||||
<a class="mainLink" :href="href"
|
||||
>تماس با ما</a
|
||||
>
|
||||
</li>
|
||||
</nuxt-link>
|
||||
|
||||
<nuxt-link
|
||||
class="col-12 col-md-4 mb-3"
|
||||
:to="{
|
||||
name: 'portal-services',
|
||||
params: { portal: currentPortal },
|
||||
}"
|
||||
v-slot="{ navigate, href, isActive }"
|
||||
custom>
|
||||
<li
|
||||
@click="navigate"
|
||||
:class="isActive ? 'active' : null">
|
||||
<a class="mainLink" :href="href"
|
||||
>میز خدمت</a
|
||||
>
|
||||
</li>
|
||||
</nuxt-link>
|
||||
|
||||
<li class="pointer">
|
||||
<p>چند رسانه ای</p>
|
||||
<div class="mega-menu mt-2">
|
||||
<ul class="tree">
|
||||
<nuxt-link
|
||||
class="col-12 col-md-4 mb-2"
|
||||
:to="{
|
||||
name: 'portal-gallery',
|
||||
params: {
|
||||
portal: currentPortal,
|
||||
},
|
||||
query: {
|
||||
type: 'image',
|
||||
page: 1,
|
||||
},
|
||||
}"
|
||||
v-slot="{
|
||||
navigate,
|
||||
href,
|
||||
isActive,
|
||||
}"
|
||||
custom>
|
||||
<li
|
||||
@click="navigate"
|
||||
:class="
|
||||
isActive ? 'active' : null
|
||||
">
|
||||
<a class="mainLink" :href="href"
|
||||
>عکس</a
|
||||
>
|
||||
</li>
|
||||
</nuxt-link>
|
||||
|
||||
<nuxt-link
|
||||
class="col-12 col-md-4 mb-2"
|
||||
:to="{
|
||||
name: 'portal-videos',
|
||||
params: {
|
||||
portal: currentPortal,
|
||||
},
|
||||
query: {
|
||||
type: 'video',
|
||||
page: 1,
|
||||
},
|
||||
}"
|
||||
v-slot="{
|
||||
navigate,
|
||||
href,
|
||||
isActive,
|
||||
}"
|
||||
custom>
|
||||
<li
|
||||
@click="navigate"
|
||||
:class="
|
||||
isActive ? 'active' : null
|
||||
">
|
||||
<a class="mainLink" :href="href"
|
||||
>فیلم</a
|
||||
>
|
||||
</li>
|
||||
</nuxt-link>
|
||||
|
||||
<nuxt-link
|
||||
class="col-12 col-md-4 mb-2"
|
||||
:to="{
|
||||
name: 'portal-graphics',
|
||||
params: {
|
||||
portal: currentPortal,
|
||||
},
|
||||
query: {
|
||||
type: 'graphic',
|
||||
page: 1,
|
||||
},
|
||||
}"
|
||||
v-slot="{
|
||||
navigate,
|
||||
href,
|
||||
isActive,
|
||||
}"
|
||||
custom>
|
||||
<li
|
||||
@click="navigate"
|
||||
:class="
|
||||
isActive ? 'active' : null
|
||||
">
|
||||
<a class="mainLink" :href="href"
|
||||
>گرافیک</a
|
||||
>
|
||||
</li>
|
||||
</nuxt-link>
|
||||
|
||||
<nuxt-link
|
||||
class="col-12 col-md-4 mb-2"
|
||||
to="/ostandari/digital-books"
|
||||
v-slot="{
|
||||
navigate,
|
||||
href,
|
||||
isActive,
|
||||
}"
|
||||
custom>
|
||||
<li
|
||||
@click="navigate"
|
||||
:class="
|
||||
isActive ? 'active' : null
|
||||
">
|
||||
<a class="mainLink" :href="href"
|
||||
>کتابخانه دیجیتال</a
|
||||
>
|
||||
</li>
|
||||
</nuxt-link>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<nuxt-link
|
||||
class="col-12 col-md-4 mb-3"
|
||||
:to="{
|
||||
name: 'portal-services',
|
||||
params: { portal: currentPortal },
|
||||
}"
|
||||
v-slot="{ navigate, href, isActive }"
|
||||
custom>
|
||||
<li
|
||||
@click="navigate"
|
||||
:class="isActive ? 'active' : null">
|
||||
<a class="mainLink" :href="href"
|
||||
>میز خدمت</a
|
||||
>
|
||||
</li>
|
||||
</nuxt-link>
|
||||
|
||||
<nuxt-link
|
||||
class="col-12 col-md-4"
|
||||
v-for="item in header.categories"
|
||||
:key="item._id"
|
||||
:to="{
|
||||
name: 'portal-category-details',
|
||||
params: {
|
||||
portal: currentPortal,
|
||||
details: item.title,
|
||||
},
|
||||
query: categoryURLQuery(item),
|
||||
}"
|
||||
v-slot="{ href, navigate, isActive }"
|
||||
custom>
|
||||
<a class="mainLink">{{ item.title }}</a>
|
||||
|
||||
<li
|
||||
@click="navigate"
|
||||
:class="isActive ? 'active' : null">
|
||||
<div class="children">
|
||||
<ul>
|
||||
<!-- <nuxt-link-->
|
||||
<!-- v-for="child in item.childs"-->
|
||||
<!-- :key="child._id"-->
|
||||
<!-- :to="{name: 'portal-category-details',params: {portal: currentPortal,details: child.title}, query: categoryURLQuery(child)}"-->
|
||||
<!-- v-slot="{href,navigate,isActive}"-->
|
||||
<!-- custom-->
|
||||
<!-- >-->
|
||||
<!-- <li @click="navigate" :class="isActive ? 'active' : null">-->
|
||||
<!-- <a class="subLink" :href="href">{{ child.title }}</a>-->
|
||||
<!-- </li>-->
|
||||
<!-- </nuxt-link>-->
|
||||
<el-tree
|
||||
:data="item.childs"
|
||||
:props="defaultProps"
|
||||
accordion
|
||||
ref="tree">
|
||||
<div
|
||||
slot-scope="{ node, data }">
|
||||
<nuxt-link
|
||||
:to="{
|
||||
name: 'portal-category-details',
|
||||
params: {
|
||||
portal: currentPortal,
|
||||
details: node.label,
|
||||
},
|
||||
query:
|
||||
categoryURLQuery(data),
|
||||
}"
|
||||
v-slot="{
|
||||
href,
|
||||
navigate,
|
||||
isActive,
|
||||
}"
|
||||
custom
|
||||
:class="
|
||||
!data.childs.length &&
|
||||
'test'
|
||||
">
|
||||
<li
|
||||
@click="navigate"
|
||||
:class="
|
||||
isActive
|
||||
? 'active'
|
||||
: null
|
||||
">
|
||||
<a
|
||||
class="subLink"
|
||||
:href="href"
|
||||
>{{ node.label }}</a
|
||||
>
|
||||
</li>
|
||||
</nuxt-link>
|
||||
</div>
|
||||
</el-tree>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
</nuxt-link>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
searchableText: "",
|
||||
defaultProps: {
|
||||
children: "childs",
|
||||
label: "title",
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
header() {
|
||||
return this.$store.state.front.headerData;
|
||||
},
|
||||
offCanvas() {
|
||||
return this.$store.state.front.offCanvas;
|
||||
},
|
||||
route() {
|
||||
return this.$route.fullPath;
|
||||
},
|
||||
yearBanner() {
|
||||
return this.$store.state.front.yearBanner;
|
||||
},
|
||||
currentPortal() {
|
||||
return this.$route.params.portal;
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
offCanvas(newVal, oldVal) {
|
||||
if (newVal) {
|
||||
this.$gsap
|
||||
.timeline()
|
||||
.fromTo(
|
||||
$(".off-canvas"),
|
||||
{ autoAlpha: 0 },
|
||||
{ autoAlpha: 1, duration: 0.2 }
|
||||
)
|
||||
.from($(".off-canvas .main .container-fluid"), {
|
||||
x: 50,
|
||||
opacity: 0,
|
||||
duration: 0.2,
|
||||
})
|
||||
.from(
|
||||
$(".off-canvas .side .closeBtn"),
|
||||
{ scale: 0.7, opacity: 0, duration: 0.2 },
|
||||
"-=0.2"
|
||||
);
|
||||
this.$gsap
|
||||
.timeline()
|
||||
.from(".item1", {
|
||||
x: 50,
|
||||
opacity: 0,
|
||||
duration: 0.4,
|
||||
})
|
||||
.from(".item2", {
|
||||
x: 50,
|
||||
opacity: 0,
|
||||
duration: 0.6,
|
||||
});
|
||||
|
||||
// this.$gsap.timeline()
|
||||
// .from('.item2', {x: 50, opacity: 0, duration: .5})
|
||||
} else {
|
||||
this.$gsap
|
||||
.timeline()
|
||||
.fromTo(
|
||||
$(".off-canvas"),
|
||||
{ autoAlpha: 1 },
|
||||
{ autoAlpha: 0, duration: 0.3 }
|
||||
);
|
||||
}
|
||||
},
|
||||
route(newVal, oldVal) {
|
||||
this.closeOffCanvas();
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
closeOffCanvas() {
|
||||
this.$store.commit("front/setOffCanvas", false);
|
||||
},
|
||||
doSearch() {
|
||||
if (this.searchableText.length) {
|
||||
this.$router.push({
|
||||
name: "portal-search",
|
||||
params: { portal: this.$route.params.portal },
|
||||
query: { sq: this.searchableText },
|
||||
});
|
||||
this.searchableText = "";
|
||||
} else
|
||||
this.$message({
|
||||
type: "warning",
|
||||
message: "ابتدا عبارت مورد نظر را بنویسید",
|
||||
});
|
||||
},
|
||||
categoryURLQuery(item) {
|
||||
const query = {
|
||||
type: item.defaultPageType,
|
||||
id: item._id,
|
||||
};
|
||||
if (item.defaultPageType === "news")
|
||||
return { ...query, page: 1 };
|
||||
if (item.defaultPageType === "gallery")
|
||||
return { ...query, galleryType: "image", page: 1 };
|
||||
else return query;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -0,0 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
<slot></slot>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,18 @@
|
||||
<template>
|
||||
<div class="sidebar-line-txt">
|
||||
<span>{{ label }}</span>
|
||||
<div class="red-line"></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
label: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
<template>
|
||||
<div class="site--footer">
|
||||
<div class="container">
|
||||
<div class="row col1">
|
||||
<!-- <div class="col-12">-->
|
||||
<!-- <span class="logo">-->
|
||||
<!-- <img src="~/static/img/logo-re30-150x150.png" alt="">-->
|
||||
<!-- </span>-->
|
||||
<!-- </div>-->
|
||||
<div class="col-12 col-md-3 mb-5 logo">
|
||||
<img src="~/static/img/logo-re30-150x150.png" alt="استانداری مرکزی">
|
||||
</div>
|
||||
<div class="col-6 col-md-3 mb-3">
|
||||
<h3>دسترسی سریع</h3>
|
||||
<nuxt-link :to="{name: 'portal-info-page', params:{ portal: currentPortal, page: 'aboutus'}}" class="link-txt">درباره ما</nuxt-link>
|
||||
<nuxt-link :to="{name: 'portal-contact' ,params: {portal: currentPortal}}" class="link-txt">تماس با ما</nuxt-link>
|
||||
<nuxt-link :to="{name: 'portal-links' ,params: {portal: currentPortal}}" class="link-txt">پیوندها</nuxt-link>
|
||||
<nuxt-link :to="{name: 'portal-archive' ,params: {portal: currentPortal}, query: {flag:'all', page: 1}}" class="link-txt">آرشیو</nuxt-link>
|
||||
</div>
|
||||
<div class="col-6 col-md-3 mb-3">
|
||||
<h3>بخش های اصلی</h3>
|
||||
<!-- <nuxt-link-->
|
||||
<!-- v-for="item in header.categories"-->
|
||||
<!-- :key="item._id"-->
|
||||
<!-- :to="{name: 'portal-category-details',params: {portal: currentPortal,details: item.title},query: categoryURLQuery(item)}"-->
|
||||
<!-- class="link-txt"-->
|
||||
<!-- >-->
|
||||
<!-- {{ item.title }}-->
|
||||
<!-- </nuxt-link>-->
|
||||
<div v-if="header.categories.length">
|
||||
<nuxt-link
|
||||
v-for="(item, index) in header.categories[0].childs"
|
||||
:key="item._id"
|
||||
:to="{name: 'portal-category-details',params: {portal: currentPortal,details: item.title},query: categoryURLQuery(item)}"
|
||||
class="link-txt"
|
||||
v-if="index < 4"
|
||||
>
|
||||
{{ item.title }}
|
||||
</nuxt-link>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 col-md-3 mb-3">
|
||||
<h3>صفحات ویژه</h3>
|
||||
<nuxt-link :to="{name: 'portal-info-page', params:{portal: currentPortal,page: 'faq'}}" class="link-txt">سوالات متداول</nuxt-link>
|
||||
<nuxt-link :to="{name: 'portal-info-page', params:{portal: currentPortal,page: 'privacy'}}" class="link-txt">حفظ حریم خصوصی</nuxt-link>
|
||||
<nuxt-link :to="{name: 'portal-info-page', params:{portal: currentPortal,page: 'rules'}}" class="link-txt">قوانین و مقررات</nuxt-link>
|
||||
<!-- <nuxt-link :to="{name: 'portal-info-page', params:{portal: currentPortal,page: 'sitemap'}}" class="link-txt">نقشه سایت</nuxt-link>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="border"></div>
|
||||
</div>
|
||||
<div class="row view-copy-right">
|
||||
<div class="col-12 col-md-6 icon-field">
|
||||
<!-- <nuxt-link class="footer-link" to="/">صفحه اصلی</nuxt-link>-->
|
||||
<!-- <nuxt-link class="footer-link" :to="{name: 'portal-info-page', params:{portal: currentPortal,page: 'facilities'}}">امکانات</nuxt-link>-->
|
||||
<!-- <nuxt-link class="footer-link" :to="{name: 'portal-info-page', params:{portal: currentPortal,page: 'layout'}}">صفحه آرایی</nuxt-link>-->
|
||||
<!-- <nuxt-link class="footer-link" :to="{name: 'portal-info-page', params:{portal: currentPortal,page: 'pages'}}">صفحات</nuxt-link>-->
|
||||
<!-- <nuxt-link class="footer-link" :to="{name: 'portal-info-page', params:{portal: currentPortal,page: 'cookies'}}">کوکی ها</nuxt-link>-->
|
||||
|
||||
<a href="tel:08633442222">
|
||||
<i class="fas fa-phone"></i>
|
||||
</a>
|
||||
<a v-if="yearBanner.hasEmail" :href="`mailto:${yearBanner.email}`" target="_blank">
|
||||
<i class="fas fa-envelope"></i>
|
||||
</a>
|
||||
<a v-if="yearBanner.hasInstagram" :href="yearBanner.instagram" target="_blank">
|
||||
<i class="fab fa-instagram"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-12 col-md-6 copy-right-holder">
|
||||
<span class="copy-right">
|
||||
تمامی حقوق محفوظ است. طراحی و توسعه توسط:
|
||||
<a href="https://danakcorp.com/fa/products/%D9%BE%D9%88%D8%B1%D8%AA%D8%A7%D9%84%20%D8%AE%D8%A8%D8%B1%DB%8C" target="_blank">داناک</a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "SiteFooter",
|
||||
computed: {
|
||||
currentPortal() {
|
||||
return this.$route.params.portal
|
||||
},
|
||||
header() {
|
||||
return this.$store.state.front.headerData
|
||||
},
|
||||
yearBanner() {
|
||||
return this.$store.state.front.yearBanner
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
categoryURLQuery(item) {
|
||||
const query = {type: item.defaultPageType, id: item._id}
|
||||
if (item.defaultPageType === 'news') return {...query, page: 1}
|
||||
if (item.defaultPageType === 'gallery') return {...query, galleryType: 'image', page: 1}
|
||||
else return query
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,297 @@
|
||||
<template>
|
||||
<div class="site--header">
|
||||
<div class="col-12">
|
||||
<!------------------------ countDown modal ------------------------>
|
||||
<el-dialog v-if="counterDown" append-to-body :visible.sync="showAlert" :show-close="false" :title="'مانده تا' + ' ' + counterDown.title">
|
||||
<div>
|
||||
<flip-countdown :deadline="counterDown1[0]"></flip-countdown>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button class="btn bigBtn btn-primary" @click="showAlert = false">بستن</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!------------------------ countDown modal ------------------------>
|
||||
<div class="site-top">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-6 site-top-right">
|
||||
<span>
|
||||
<i class="far fa-calendar-alt"></i>
|
||||
<span class="time-date">{{ jDate }}</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-12 col-md-6 site-top-left">
|
||||
<el-button type="text" @click="showAlert = true" v-if="counterDown">
|
||||
<span class="timer">{{ jDate2(counterDown.expireDate) + ' مانده تا ' + counterDown.title }}</span>
|
||||
</el-button>
|
||||
|
||||
<div class="email-top" v-else>
|
||||
<a class="email-text" :href="`mailto: ${yearBanner.email}`" target="_blank">{{ yearBanner.email }}</a>
|
||||
<i class="far fa-envelope"></i>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="view-banner">
|
||||
<img v-if="yearBanner.iranFlag" class="iran-flag" src="~/assets/img/iran.png" alt="">
|
||||
<div class="banner">
|
||||
<img :src="yearBanner.mainCover" alt="">
|
||||
</div>
|
||||
<div class="relativePos">
|
||||
<div class="container navigations">
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-10 menu-desk">
|
||||
<nav>
|
||||
<ul>
|
||||
<nuxt-link :to="{name: 'portal',params: {portal: currentPortal}}" v-slot="{navigate,href,isActive}" custom exact>
|
||||
<li @click="navigate" :class="isActive ? 'active' : null">
|
||||
<a :href="href">صفحه اصلی</a>
|
||||
</li>
|
||||
</nuxt-link>
|
||||
<!-- ***************** dynamic routes ***************** -->
|
||||
<nuxt-link
|
||||
v-for="item in header.categories"
|
||||
:key="item._id"
|
||||
:to="{name: 'portal-category-details',params: {portal: currentPortal,details: item.title},query: categoryURLQuery(item)}"
|
||||
v-slot="{navigate,href,isActive}"
|
||||
custom
|
||||
>
|
||||
<li :class="isActive ? 'active' : null">
|
||||
<a class="pointer">{{ item.title }}</a>
|
||||
<div class="mega-menu">
|
||||
<!-- item route -->
|
||||
<!-- <ul class="tree">-->
|
||||
<!-- <li class="treeItem">-->
|
||||
<!-- <a @click="navigate" :href="href">-->
|
||||
<!-- صفحه-->
|
||||
<!-- {{ item.title }}-->
|
||||
<!-- </a>-->
|
||||
<!-- </li>-->
|
||||
<!-- </ul>-->
|
||||
<!-- recursive tree -->
|
||||
<TreeItem :array="item.childs"/>
|
||||
</div>
|
||||
</li>
|
||||
</nuxt-link>
|
||||
<!-- ***************** dynamic routes ***************** -->
|
||||
<nuxt-link :to="{name: 'portal-services' ,params: {portal: currentPortal}}" v-slot="{navigate,href,isActive}" custom>
|
||||
<li @click="navigate" :class="isActive ? 'active' : null">
|
||||
<a :href="href">میز خدمت</a>
|
||||
</li>
|
||||
</nuxt-link>
|
||||
<li class="pointer">
|
||||
<a>چند رسانه ای</a>
|
||||
<div class="mega-menu">
|
||||
<ul class="tree">
|
||||
<li class="treeItem">
|
||||
<nuxt-link
|
||||
:to="{
|
||||
name: 'portal-gallery',
|
||||
params: {portal: currentPortal},
|
||||
query: {type:'image', page: 1}
|
||||
}">
|
||||
عکس
|
||||
</nuxt-link>
|
||||
</li>
|
||||
<li class="treeItem">
|
||||
<nuxt-link
|
||||
:to="{
|
||||
name: 'portal-videos',
|
||||
params: {portal: currentPortal},
|
||||
query: {type:'video', page: 1}
|
||||
}">
|
||||
فیلم
|
||||
</nuxt-link>
|
||||
<!-- <nuxt-link-->
|
||||
<!-- :to="{-->
|
||||
<!-- name: 'portal-category-details',-->
|
||||
<!-- params: {portal: currentPortal,details: homePageData.s3Side[0].catId.title},-->
|
||||
<!-- query: {id: homePageData.s3Side[0].catId._id,type: 'gallery',galleryType: 'video',page: 1}-->
|
||||
<!-- }">-->
|
||||
<!-- فیلم-->
|
||||
<!-- </nuxt-link>-->
|
||||
</li>
|
||||
<li class="treeItem">
|
||||
<nuxt-link
|
||||
:to="{
|
||||
name: 'portal-graphics',
|
||||
params: {portal: currentPortal},
|
||||
query: {type:'graphic', page: 1}
|
||||
}">
|
||||
گرافیک
|
||||
</nuxt-link>
|
||||
</li>
|
||||
<li class="treeItem">
|
||||
<nuxt-link
|
||||
to="/ostandari/digital-books"
|
||||
>
|
||||
کتابخانه دیجیتال
|
||||
</nuxt-link>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
<nuxt-link
|
||||
v-if="yearBanner.electionBtn"
|
||||
:to="{name: 'portal',params: {portal: currentPortal === 'ostandari' ? 'election' : 'ostandari'}}"
|
||||
v-slot="{navigate,href}"
|
||||
custom
|
||||
>
|
||||
<li @click="navigate">
|
||||
<a :href="href">{{ currentPortal === 'ostandari' ? 'ستاد انتخابات' : 'استانداری' }}</a>
|
||||
</li>
|
||||
</nuxt-link>
|
||||
<nuxt-link :to="{name: 'portal-info-page', params:{portal: currentPortal,page: 'aboutState'}}" v-slot="{navigate,href,isActive}" custom
|
||||
v-if="header.staticContents">
|
||||
<li :class="isActive ? 'active' : null">
|
||||
<a class="pointer">درباره استان</a>
|
||||
|
||||
<div class="mega-menu">
|
||||
<!-- item route -->
|
||||
<ul class="tree">
|
||||
<nuxt-link :to="{name: 'portal-info-page', params:{portal: currentPortal,page: 'sima'}}" v-slot="{navigate,href,isActive}" custom>
|
||||
<li @click="navigate" :class="isActive ? 'active' : null" class="treeItem">
|
||||
<a :href="href">
|
||||
سیمای استان
|
||||
</a>
|
||||
</li>
|
||||
</nuxt-link>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
</nuxt-link>
|
||||
<nuxt-link :to="{name: 'portal-contact' ,params: {portal: currentPortal}}" v-slot="{navigate,href,isActive}" custom>
|
||||
<li @click="navigate" :class="isActive ? 'active' : null">
|
||||
<a :href="href">تماس با ما</a>
|
||||
</li>
|
||||
</nuxt-link>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="col-12 col-lg-2 left">
|
||||
<ul>
|
||||
<li class="searchBtns">
|
||||
<i class="fal fa-search" v-if="!searching" @click="search(true)"></i>
|
||||
<i class="fal fa-times" v-else @click="search(false)"></i>
|
||||
</li>
|
||||
<li class="menu" @click="showOffCanvas">
|
||||
<i class="fas fa-bars hamburger-btn"></i>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="searchBox" :class="searching? 'active-search' : null">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<form @submit.prevent="doSearch" class="searchInput">
|
||||
<input type="text" name="search" id="searchInput" placeholder="عبارت مدنظر خود را جستجو کنید" v-model="searchableText">
|
||||
<button type="submit">
|
||||
<i class="fas fa-arrow-circle-left"></i>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import moment from 'moment-jalaali'
|
||||
import FlipCountdown from '~/components/vue2-flip-countdown.js'
|
||||
|
||||
export default {
|
||||
name: "SiteHeader",
|
||||
data() {
|
||||
return {
|
||||
searching: false,
|
||||
searchableText: '',
|
||||
date: Date.now(),
|
||||
dialogTimeVisible: false,
|
||||
showAlert: false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
setInterval(() => this.date = Date.now(), 1000)
|
||||
$(window).scroll(() => {
|
||||
if ($(window).scrollTop() > 300) $('.app-front').addClass('miniHeader')
|
||||
if ($(window).scrollTop() < 290) $('.app-front').removeClass('miniHeader')
|
||||
})
|
||||
|
||||
if (this.$route.name !== 'portal') {
|
||||
(async () => {
|
||||
try {
|
||||
const homeData = await this.$axios.get(`/api/public/home?portal=${this.$route.params.portal}`, {progress: false})
|
||||
this.$store.commit('front/setHomePageData', homeData.data)
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
})()
|
||||
}
|
||||
},
|
||||
components: {FlipCountdown},
|
||||
computed: {
|
||||
yearBanner() {
|
||||
return this.$store.state.front.yearBanner
|
||||
},
|
||||
currentPortal() {
|
||||
return this.$route.params.portal
|
||||
},
|
||||
header() {
|
||||
return this.$store.state.front.headerData
|
||||
},
|
||||
jDate() {
|
||||
return moment(this.date).locale('fa').format('dddd - LL - h:mm:ss ')
|
||||
},
|
||||
counterDown() {
|
||||
return this.$store.state.front.counterDown
|
||||
},
|
||||
counterDown1() {
|
||||
return this.$store.state.front.counterDown.expireDate.split('T')
|
||||
},
|
||||
homePageData() {
|
||||
return this.$store.state.front.homePageData
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
categoryURLQuery(item) {
|
||||
const query = {type: item.defaultPageType, id: item._id}
|
||||
if (item.defaultPageType === 'news') return {...query, page: 1}
|
||||
if (item.defaultPageType === 'gallery-image') return {...query, page: 1, type: 'gallery', galleryType: 'image'}
|
||||
if (item.defaultPageType === 'gallery-video') return {...query, page: 1, type: 'gallery', galleryType: 'video'}
|
||||
if (item.defaultPageType === 'gallery-graphic') return {...query, page: 1, type: 'gallery', galleryType: 'graphic'}
|
||||
else return query
|
||||
},
|
||||
showOffCanvas() {
|
||||
this.$store.commit('front/setOffCanvas', true)
|
||||
},
|
||||
search(status) {
|
||||
this.searching = status
|
||||
if (status) setTimeout(() => $('#searchInput').focus(), 100)
|
||||
else this.searchableText = ''
|
||||
},
|
||||
doSearch() {
|
||||
if (this.searchableText.length) {
|
||||
this.$router.push({name: 'portal-search', params: {portal: this.currentPortal}, query: {sq: this.searchableText}})
|
||||
setTimeout(() => this.search(false), 100)
|
||||
} else {
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: 'ابتدا عبارت مورد نظر را بنویسید'
|
||||
})
|
||||
}
|
||||
},
|
||||
jDate2(e) {
|
||||
return moment(e).locale('fa').fromNow(true)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,32 @@
|
||||
<template>
|
||||
<ul class="tree">
|
||||
<li class="treeItem" v-for="item in array" :key="item._id">
|
||||
<nuxt-link :to="{name: 'portal-category-details',params: {portal: $route.params.portal,details: item.title},query: categoryURLQuery(item)}">{{ item.title }}</nuxt-link>
|
||||
<i class="fas fa-chevron-left hasChild" v-if="item.childs.length"></i>
|
||||
<div class="children" v-if="item.childs.length">
|
||||
<div class="relativePos">
|
||||
<TreeItem :array="item.childs"/>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
array: {
|
||||
type: Array,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
categoryURLQuery(item) {
|
||||
const query = {type: item.defaultPageType, id: item._id}
|
||||
if (item.defaultPageType === 'news') return {...query, page: 1}
|
||||
if (item.defaultPageType === 'gallery') return {...query, galleryType: 'image', page: 1}
|
||||
else return query
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,23 @@
|
||||
<template>
|
||||
<CSubheader
|
||||
class="custom-subheader px-3"
|
||||
:class="[
|
||||
sidebarShow ? null : 'sideBarClose',
|
||||
sidebarMinimize ? 'sideBarMinimized' : 'sideBarFull'
|
||||
]">
|
||||
<slot/>
|
||||
</CSubheader>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
computed: {
|
||||
sidebarShow() {
|
||||
return this.$store.state.admin.sidebarShow
|
||||
},
|
||||
sidebarMinimize() {
|
||||
return this.$store.state.admin.sidebarMinimize
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,20 @@
|
||||
import Vue from 'vue'
|
||||
|
||||
Vue.component('RenderString', {
|
||||
props: {
|
||||
string: {
|
||||
required: true
|
||||
}
|
||||
},
|
||||
render(h) {
|
||||
const render = {
|
||||
template: "<div>" + this.string + "</div>",
|
||||
methods: {
|
||||
markComplete() {
|
||||
console.log('the method called')
|
||||
}
|
||||
}
|
||||
}
|
||||
return h(render)
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,16 @@
|
||||
<template>
|
||||
<CFooter :fixed="false">
|
||||
<div class="mfs-auto">
|
||||
<div class="copy-right">
|
||||
<span class="mr-1">Powered by</span>
|
||||
<a href="https://danakcorp.com/fa" target="_blank" class="company">Danak Corporation</a>
|
||||
</div>
|
||||
</div>
|
||||
</CFooter>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'TheFooter'
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,40 @@
|
||||
<template>
|
||||
<CHeader fixed with-subheader light>
|
||||
<CToggler
|
||||
in-header
|
||||
class="ml-3 d-lg-none"
|
||||
@click="$store.commit('admin/toggleSidebarMobile')"
|
||||
/>
|
||||
<CToggler
|
||||
in-header
|
||||
class="ml-3 d-md-down-none"
|
||||
@click="$store.commit('admin/toggleSidebarDesktop')"
|
||||
/>
|
||||
<CHeaderNav class="mr-4 mr-auto">
|
||||
<TheHeaderDropdownAccnt/>
|
||||
</CHeaderNav>
|
||||
</CHeader>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'TheHeader',
|
||||
data() {
|
||||
return {
|
||||
breadcrumb: [
|
||||
{
|
||||
text: 'صفحه اصلی',
|
||||
to: '/admin'
|
||||
},
|
||||
{
|
||||
text: 'لیست دانلود ها',
|
||||
to: {name: 'admin-downloads'}
|
||||
},
|
||||
{
|
||||
text: 'This is a span'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,72 @@
|
||||
<template>
|
||||
<CDropdown
|
||||
inNav
|
||||
class="c-header-nav-items"
|
||||
placement="bottom-end"
|
||||
add-menu-classes="pt-0"
|
||||
>
|
||||
<template #toggler>
|
||||
<CHeaderNavLink>
|
||||
<div class="c-avatar">
|
||||
<img
|
||||
:src="$auth.user.profilePic || '/img/avatar.png'"
|
||||
class="c-avatar-img"
|
||||
alt=""
|
||||
title="حساب کاربری"
|
||||
/>
|
||||
</div>
|
||||
</CHeaderNavLink>
|
||||
</template>
|
||||
<CDropdownHeader tag="div" class="text-center" color="light">
|
||||
<strong v-if="$auth.loggedIn">{{ $auth.user.firstName }}</strong>
|
||||
</CDropdownHeader>
|
||||
|
||||
<CDropdownItem :to="{name: 'admin-users-profile' , params : {profile : 'profile'}}">
|
||||
<CIcon name="cil-user"/>
|
||||
<span>پروفایل</span>
|
||||
</CDropdownItem>
|
||||
|
||||
<CDropdownItem @click="logOut">
|
||||
<CIcon name="cil-lock-locked"/>
|
||||
<span>خروج از حساب</span>
|
||||
</CDropdownItem>
|
||||
</CDropdown>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'TheHeaderDropdownAccnt',
|
||||
data() {
|
||||
return {
|
||||
itemsCount: 42
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
logOut() {
|
||||
this.$confirm('میخواهید از حساب کاربری خارج شوید؟', 'هشدار', {
|
||||
confirmButtonText: 'بله',
|
||||
cancelButtonText: 'لغو',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
try {
|
||||
await this.$auth.logout()
|
||||
window.location.replace('/admin/login')
|
||||
} catch (e) {
|
||||
console.log(e.response.data)
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: 'عملیات لغو شد'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.c-icon{
|
||||
margin-right: 0.3rem;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,343 @@
|
||||
<template>
|
||||
<CSidebar
|
||||
fixed
|
||||
:minimize="minimize"
|
||||
:show="show"
|
||||
@update:show="
|
||||
(value) =>
|
||||
$store.commit('admin/set', ['sidebarShow', value])
|
||||
">
|
||||
<CSidebarBrand class="d-md-down-none">
|
||||
<a href="/" target="_blank">
|
||||
<span style="color: #fff">پرتال خبری</span>
|
||||
</a>
|
||||
</CSidebarBrand>
|
||||
|
||||
<!-- <CRenderFunction flat :content-to-render="$options.nav"/> -->
|
||||
|
||||
<!-- sidebar content -->
|
||||
<CSidebarNav>
|
||||
<CSidebarNavItem
|
||||
name="صفحه اصلی"
|
||||
:to="{ name: 'admin' }"
|
||||
font-icon="fal fa-home" />
|
||||
|
||||
<CSidebarNavItem
|
||||
name="مدیریت کاربران"
|
||||
:to="{ name: 'admin-users' }"
|
||||
v-if="hasPermission('superAdmin')"
|
||||
fontIcon="fal fa-users"
|
||||
:exact="false" />
|
||||
|
||||
<CSidebarNavItem
|
||||
name="مدیریت صفحات"
|
||||
:to="{ name: 'admin-pages' }"
|
||||
v-if="hasPermission('categories')"
|
||||
fontIcon="fal fa-file"
|
||||
:exact="false" />
|
||||
|
||||
<CSidebarNavItem
|
||||
name="مدیریت عملکرد"
|
||||
:to="{ name: 'admin-pdfManagement' }"
|
||||
v-if="hasPermission('categories')"
|
||||
fontIcon="fal fa-file"
|
||||
:exact="false" />
|
||||
|
||||
<CSidebarNavItem
|
||||
name="مدیریت پرونده خبری"
|
||||
:to="{ name: 'admin-newsFile' }"
|
||||
v-if="hasPermission('newsFile')"
|
||||
font-icon="fal fa-cabinet-filing"
|
||||
:exact="false" />
|
||||
|
||||
<CSidebarNavItem
|
||||
name="مدیریت اخبار"
|
||||
:to="{ name: 'admin-news' }"
|
||||
v-if="hasPermission('news')"
|
||||
font-icon="fal fa-newspaper"
|
||||
:exact="false" />
|
||||
|
||||
<CSidebarNavItem
|
||||
name="مدیریت چند رسانه ای ها"
|
||||
v-if="hasPermission('gallery')"
|
||||
:to="{ name: 'admin-gallery' }"
|
||||
font-icon="fal fa-images"
|
||||
:exact="false" />
|
||||
|
||||
<CSidebarNavItem
|
||||
name="مدیریت نظرسنجی ها"
|
||||
:to="{ name: 'admin-polls', query: { page: 1 } }"
|
||||
font-icon="fal fa-poll-people"
|
||||
:exact="false" />
|
||||
|
||||
<CSidebarNavItem
|
||||
name="مدیریت انتخابات"
|
||||
:exact="false"
|
||||
:to="{ name: 'admin-elections' }"
|
||||
v-if="hasPermission('elections')"
|
||||
font-icon="fal fa-box-ballot" />
|
||||
|
||||
<CSidebarNavDropdown
|
||||
name="میز خدمت"
|
||||
:show="Boolean(unreadMeetingReq)"
|
||||
v-if="hasPermission('superAdmin')"
|
||||
font-icon="fal fa-browser">
|
||||
<CSidebarNavItem
|
||||
name="درخواست های ملاقات با استاندار"
|
||||
:exact="false"
|
||||
:badge="
|
||||
unreadMeetingReq
|
||||
? { text: unreadMeetingReq, color: 'danger' }
|
||||
: null
|
||||
"
|
||||
:to="{ name: 'admin-meeting' }" />
|
||||
</CSidebarNavDropdown>
|
||||
|
||||
<!-- <CSidebarNavItem
|
||||
name="مدیریت محتوا"
|
||||
v-if="hasPermission('contents')"
|
||||
:to="{ name: 'admin-contents' }"
|
||||
icon="cil-speedometer"
|
||||
/> -->
|
||||
|
||||
<CSidebarNavDropdown
|
||||
name="مدیریت پیام ها"
|
||||
:show="
|
||||
Boolean(
|
||||
unreadContactMessages + unreadNewsMessages
|
||||
)
|
||||
"
|
||||
v-if="
|
||||
hasPermission('comment-News') ||
|
||||
hasPermission('comment-ContactUs')
|
||||
"
|
||||
fontIcon="fal fa-envelope">
|
||||
<CSidebarNavItem
|
||||
v-if="hasPermission('comment-News')"
|
||||
name="کامنت های اخبار"
|
||||
:exact="false"
|
||||
:badge="
|
||||
unreadNewsMessages
|
||||
? {
|
||||
text: unreadNewsMessages,
|
||||
color: 'danger',
|
||||
}
|
||||
: null
|
||||
"
|
||||
:to="{
|
||||
name: 'admin-comments-type',
|
||||
params: { type: 'News' },
|
||||
}" />
|
||||
<CSidebarNavItem
|
||||
v-if="hasPermission('comment-ContactUs')"
|
||||
name="پیام های تماس با ما"
|
||||
:exact="false"
|
||||
:badge="
|
||||
unreadContactMessages
|
||||
? {
|
||||
text: unreadContactMessages,
|
||||
color: 'danger',
|
||||
}
|
||||
: null
|
||||
"
|
||||
:to="{
|
||||
name: 'admin-comments-type',
|
||||
params: { type: 'ContactUs' },
|
||||
}" />
|
||||
</CSidebarNavDropdown>
|
||||
|
||||
<CSidebarNavDropdown
|
||||
name="تنظیمات"
|
||||
v-if="hasPermission('superAdmin')"
|
||||
fontIcon="fal fa-cog">
|
||||
<CSidebarNavItem
|
||||
name="اخباری روی صفحه اصلی"
|
||||
:to="{
|
||||
name: 'admin-homePageNews',
|
||||
query: { portal: 'ostandari' },
|
||||
}" />
|
||||
|
||||
<CSidebarNavItem
|
||||
name="مدیریت پیوندها"
|
||||
:to="{ name: 'admin-links' }"
|
||||
:exact="false" />
|
||||
<CSidebarNavItem
|
||||
name="استاندار"
|
||||
:to="{
|
||||
name: 'admin-contents-details',
|
||||
params: { details: 'manager' },
|
||||
}" />
|
||||
<CSidebarNavItem
|
||||
name="مدیریت اسلایدر"
|
||||
:to="{ name: 'admin-slider' }"
|
||||
:exact="false" />
|
||||
<CSidebarNavItem
|
||||
name="عکس شعار سال"
|
||||
:to="{ name: 'admin-yearBanner' }" />
|
||||
<CSidebarNavItem
|
||||
name="دکمه ستاد انتخابات"
|
||||
:to="{ name: 'admin-electionBtn' }" />
|
||||
<CSidebarNavItem
|
||||
name="آدرس ایمیل و شبکه های اجتماعی"
|
||||
:to="{ name: 'admin-socialLinks' }" />
|
||||
<CSidebarNavItem
|
||||
name="مدیریت مناسبت ها"
|
||||
:to="{ name: 'admin-occasion' }"
|
||||
:exact="false" />
|
||||
<CSidebarNavItem
|
||||
name="مدیریت روز شمار"
|
||||
:to="{ name: 'admin-counterDay' }" />
|
||||
<CSidebarNavItem
|
||||
name="پشتیبان گیری از سایت"
|
||||
:to="{ name: 'admin-backup' }" />
|
||||
</CSidebarNavDropdown>
|
||||
|
||||
<CSidebarNavDropdown
|
||||
name="مدیریت صفحات خاص"
|
||||
v-if="hasPermission('contents')"
|
||||
fontIcon="fal fa-file-alt">
|
||||
<CSidebarNavItem
|
||||
name="صفحه اصلی"
|
||||
:to="{
|
||||
name: 'admin-homePageManagement',
|
||||
query: { portal: 'ostandari' },
|
||||
}" />
|
||||
<CSidebarNavItem
|
||||
name="صفحه عملکرد"
|
||||
:to="{
|
||||
name: 'admin-contents-details',
|
||||
params: { details: 'performance' },
|
||||
}" />
|
||||
<CSidebarNavItem
|
||||
name="صفحه سیمای استان"
|
||||
:to="{
|
||||
name: 'admin-contents-details',
|
||||
params: { details: 'sima' },
|
||||
}" />
|
||||
<CSidebarNavItem
|
||||
name="صفحه درباره ما"
|
||||
:to="{
|
||||
name: 'admin-contents-details',
|
||||
params: { details: 'aboutus' },
|
||||
}" />
|
||||
<!-- <CSidebarNavItem-->
|
||||
<!-- name="صفحه خدمات"-->
|
||||
<!-- :to="{ name: 'admin-contents-details' , params : {details : 'services'} }"-->
|
||||
<!-- />-->
|
||||
<!-- <CSidebarNavItem-->
|
||||
<!-- name="صفحه شرایط استفاده"-->
|
||||
<!-- :to="{ name: 'admin-contents-details' , params : {details : 'terms'} }"-->
|
||||
<!-- />-->
|
||||
<CSidebarNavItem
|
||||
name="صفحه حفظ حریم خصوصی"
|
||||
:to="{
|
||||
name: 'admin-contents-details',
|
||||
params: { details: 'privacy' },
|
||||
}" />
|
||||
<!-- <CSidebarNavItem-->
|
||||
<!-- name="صفحه کوکی ها"-->
|
||||
<!-- :to="{ name: 'admin-contents-details' , params : {details : 'cookies'} }"-->
|
||||
<!-- />-->
|
||||
<!-- <CSidebarNavItem-->
|
||||
<!-- name="صفحه امکانات"-->
|
||||
<!-- :to="{ name: 'admin-contents-details' , params : {details : 'facilities'} }"-->
|
||||
<!-- />-->
|
||||
<!-- <CSidebarNavItem-->
|
||||
<!-- name="صفحه آرایی"-->
|
||||
<!-- :to="{ name: 'admin-contents-details' , params : {details : 'layout'} }"-->
|
||||
<!-- />-->
|
||||
<CSidebarNavItem
|
||||
name="سوالات متداول"
|
||||
:to="{
|
||||
name: 'admin-contents-details',
|
||||
params: { details: 'faq' },
|
||||
}" />
|
||||
<CSidebarNavItem
|
||||
name="صفحه قوانین و مقررات"
|
||||
:to="{
|
||||
name: 'admin-contents-details',
|
||||
params: { details: 'rules' },
|
||||
}" />
|
||||
<CSidebarNavItem
|
||||
name="صفحه نقشه سایت"
|
||||
:to="{
|
||||
name: 'admin-contents-details',
|
||||
params: { details: 'sitemap' },
|
||||
}" />
|
||||
</CSidebarNavDropdown>
|
||||
</CSidebarNav>
|
||||
<!-- sidebar content -->
|
||||
|
||||
<CSidebarMinimizer
|
||||
class="d-md-down-none"
|
||||
@click.native="
|
||||
$store.commit('admin/set', [
|
||||
'sidebarMinimize',
|
||||
!minimize,
|
||||
])
|
||||
" />
|
||||
</CSidebar>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import nav from './_nav';
|
||||
import unreadNewsMessages from "./../../mixins/unreadNewsMessages";
|
||||
import unreadContactMessages from "./../../mixins/unreadContactMessages";
|
||||
import unreadMeetingReq from "../../mixins/unreadMeetingReq";
|
||||
|
||||
export default {
|
||||
name: "TheSidebar",
|
||||
// nav,
|
||||
data() {
|
||||
return {
|
||||
errlogOutMessage:
|
||||
"مشکلی هنگام خروج از سیسیتم بوجود امده لطفا دوباره تلاش کنید",
|
||||
};
|
||||
},
|
||||
mixins: [
|
||||
unreadNewsMessages,
|
||||
unreadContactMessages,
|
||||
unreadMeetingReq,
|
||||
],
|
||||
computed: {
|
||||
show() {
|
||||
return this.$store.state.admin.sidebarShow;
|
||||
},
|
||||
minimize() {
|
||||
return this.$store.state.admin.sidebarMinimize;
|
||||
},
|
||||
unreadNewsMessages() {
|
||||
return this.$store.state.admin
|
||||
.unreadNewsMessagesCount;
|
||||
},
|
||||
unreadContactMessages() {
|
||||
return this.$store.state.admin
|
||||
.unreadContactMessagesCount;
|
||||
},
|
||||
unreadMeetingReq() {
|
||||
return this.$store.state.admin.unreadMeetingReqCount;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
hasPermission(permission) {
|
||||
if (this.$auth.loggedIn) {
|
||||
if (
|
||||
this.$auth.user.permissions.includes("superAdmin")
|
||||
) {
|
||||
return true;
|
||||
} else if (
|
||||
this.$auth.user.permissions.includes(permission)
|
||||
) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} else return false;
|
||||
},
|
||||
async logOut() {
|
||||
await this.$auth.logout();
|
||||
this.$router.push({ name: "admin-login" });
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -0,0 +1,19 @@
|
||||
export default [
|
||||
{
|
||||
_name: 'CSidebarNav',
|
||||
_children: [
|
||||
{
|
||||
_name: 'CSidebarNavItem',
|
||||
name: 'صفحه اصلی',
|
||||
to: {name: 'admin'},
|
||||
icon: 'cil-speedometer'
|
||||
},
|
||||
{
|
||||
_name: 'CSidebarNavItem',
|
||||
name: 'مدیریت کابران',
|
||||
to: {name: 'admin-users'},
|
||||
icon: 'cil-speedometer'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,23 @@
|
||||
<template>
|
||||
<CChartBar
|
||||
:datasets="defaultDatasets"
|
||||
labels="months"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'CChartBarExample',
|
||||
computed: {
|
||||
defaultDatasets() {
|
||||
return [
|
||||
{
|
||||
label: 'GitHub Commits',
|
||||
backgroundColor: '#f87979',
|
||||
data: [40, 20, 12, 39, 10, 40, 39, 80, 40, 20, 12, 11]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,72 @@
|
||||
<template>
|
||||
<CChartBar
|
||||
:datasets="computedDatasets"
|
||||
:options="computedOptions"
|
||||
:labels="labels"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CoreUtils from '~/mixins/CoreUtils'
|
||||
|
||||
export default {
|
||||
name: 'CChartBarSimple',
|
||||
mixins: [CoreUtils],
|
||||
props: {
|
||||
datasets: Array,
|
||||
labels: [Array, String],
|
||||
options: Object,
|
||||
plugins: Array,
|
||||
backgroundColor: {
|
||||
type: String,
|
||||
default: 'rgba(0,0,0,.2)'
|
||||
},
|
||||
pointHoverBackgroundColor: String,
|
||||
dataPoints: {
|
||||
type: Array,
|
||||
default: () => [10, 22, 34, 46, 58, 70, 46, 23, 45, 78, 34, 12]
|
||||
},
|
||||
label: {
|
||||
type: String,
|
||||
default: 'Sales'
|
||||
},
|
||||
pointed: Boolean
|
||||
},
|
||||
computed: {
|
||||
defaultDatasets() {
|
||||
return [
|
||||
{
|
||||
data: this.dataPoints,
|
||||
backgroundColor: this.getColor(this.backgroundColor),
|
||||
pointHoverBackgroundColor: this.getColor(this.pointHoverBackgroundColor),
|
||||
label: this.label,
|
||||
barPercentage: 0.5,
|
||||
categoryPercentage: 1
|
||||
}
|
||||
]
|
||||
},
|
||||
defaultOptions() {
|
||||
return {
|
||||
maintainAspectRatio: false,
|
||||
legend: {
|
||||
display: false
|
||||
},
|
||||
scales: {
|
||||
xAxes: [{
|
||||
display: false
|
||||
}],
|
||||
yAxes: [{
|
||||
display: false
|
||||
}]
|
||||
}
|
||||
}
|
||||
},
|
||||
computedDatasets() {
|
||||
return this.deepObjectsMerge(this.defaultDatasets, this.datasets || {})
|
||||
},
|
||||
computedOptions() {
|
||||
return this.deepObjectsMerge(this.defaultOptions, this.options || {})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,27 @@
|
||||
<template>
|
||||
<CChartDoughnut
|
||||
:datasets="defaultDatasets"
|
||||
:labels="['VueJs', 'EmberJs', 'ReactJs', 'AngularJs']"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'CChartDoughnutExample',
|
||||
computed: {
|
||||
defaultDatasets() {
|
||||
return [
|
||||
{
|
||||
backgroundColor: [
|
||||
'#41B883',
|
||||
'#E46651',
|
||||
'#00D8FF',
|
||||
'#DD1B16'
|
||||
],
|
||||
data: [40, 20, 80, 10]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,28 @@
|
||||
<template>
|
||||
<CChartLine
|
||||
:datasets="defaultDatasets"
|
||||
labels="months"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'CChartLineExample',
|
||||
computed: {
|
||||
defaultDatasets() {
|
||||
return [
|
||||
{
|
||||
label: 'Data One',
|
||||
backgroundColor: 'rgb(228,102,81,0.9)',
|
||||
data: [30, 39, 10, 50, 30, 70, 35]
|
||||
},
|
||||
{
|
||||
label: 'Data Two',
|
||||
backgroundColor: 'rgb(0,216,255,0.9)',
|
||||
data: [39, 80, 40, 35, 40, 20, 45]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,138 @@
|
||||
<template>
|
||||
<CChartLine
|
||||
:datasets="computedDatasets"
|
||||
:options="computedOptions"
|
||||
:labels="labels"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CoreUtils from '~/mixins/CoreUtils'
|
||||
|
||||
export default {
|
||||
name: 'CChartLineSimple',
|
||||
mixins: [CoreUtils],
|
||||
props: {
|
||||
datasets: Array,
|
||||
labels: [Array, String],
|
||||
options: Object,
|
||||
plugins: Array,
|
||||
borderColor: {
|
||||
type: String,
|
||||
default: 'rgba(255,255,255,.55)'
|
||||
},
|
||||
backgroundColor: {
|
||||
type: String,
|
||||
default: 'transparent'
|
||||
},
|
||||
dataPoints: {
|
||||
type: Array,
|
||||
default: () => [10, 22, 34, 46, 58, 70, 46, 23, 45, 78, 34, 12]
|
||||
},
|
||||
label: {
|
||||
type: String,
|
||||
default: 'Sales'
|
||||
},
|
||||
pointed: Boolean,
|
||||
pointHoverBackgroundColor: String
|
||||
},
|
||||
computed: {
|
||||
pointHoverColor() {
|
||||
if (this.pointHoverBackgroundColor) {
|
||||
return this.pointHoverBackgroundColor
|
||||
} else if (this.backgroundColor !== 'transparent') {
|
||||
return this.backgroundColor
|
||||
}
|
||||
return this.borderColor
|
||||
},
|
||||
defaultDatasets() {
|
||||
return [
|
||||
{
|
||||
data: this.dataPoints,
|
||||
borderColor: this.getColor(this.borderColor),
|
||||
backgroundColor: this.getColor(this.backgroundColor),
|
||||
pointBackgroundColor: this.getColor(this.pointHoverColor),
|
||||
pointHoverBackgroundColor: this.getColor(this.pointHoverColor),
|
||||
label: this.label
|
||||
}
|
||||
]
|
||||
},
|
||||
pointedOptions() {
|
||||
return {
|
||||
scales: {
|
||||
xAxes: [
|
||||
{
|
||||
offset: true,
|
||||
gridLines: {
|
||||
color: 'transparent',
|
||||
zeroLineColor: 'transparent'
|
||||
},
|
||||
ticks: {
|
||||
fontSize: 2,
|
||||
fontColor: 'transparent'
|
||||
}
|
||||
}
|
||||
],
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
display: false,
|
||||
min: Math.min.apply(Math, this.dataPoints) - 5,
|
||||
max: Math.max.apply(Math, this.dataPoints) + 5
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderWidth: 1
|
||||
},
|
||||
point: {
|
||||
radius: 4,
|
||||
hitRadius: 10,
|
||||
hoverRadius: 4
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
straightOptions() {
|
||||
return {
|
||||
scales: {
|
||||
xAxes: [{
|
||||
display: false
|
||||
}],
|
||||
yAxes: [{
|
||||
display: false
|
||||
}]
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderWidth: 2
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
hitRadius: 10,
|
||||
hoverRadius: 4
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
defaultOptions() {
|
||||
const options = this.pointed ? this.pointedOptions : this.straightOptions
|
||||
return Object.assign({}, options, {
|
||||
maintainAspectRatio: false,
|
||||
legend: {
|
||||
display: false
|
||||
}
|
||||
})
|
||||
},
|
||||
computedDatasets() {
|
||||
return this.deepObjectsMerge(this.defaultDatasets, this.datasets || {})
|
||||
},
|
||||
computedOptions() {
|
||||
return this.deepObjectsMerge(this.defaultOptions, this.options || {})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,27 @@
|
||||
<template>
|
||||
<CChartPie
|
||||
:datasets="defaultDatasets"
|
||||
:labels="['VueJs', 'EmberJs', 'ReactJs', 'AngularJs']"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'CChartPieExample',
|
||||
computed: {
|
||||
defaultDatasets () {
|
||||
return [
|
||||
{
|
||||
backgroundColor: [
|
||||
'#41B883',
|
||||
'#E46651',
|
||||
'#00D8FF',
|
||||
'#DD1B16'
|
||||
],
|
||||
data: [40, 20, 80, 10]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,45 @@
|
||||
<template>
|
||||
<CChartPolarArea
|
||||
:datasets="defaultDatasets"
|
||||
:options="defaultOptions"
|
||||
:labels="[
|
||||
'Eating', 'Drinking', 'Sleeping', 'Designing',
|
||||
'Coding', 'Cycling', 'Running'
|
||||
]"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'CChartPolarAreaExample',
|
||||
computed: {
|
||||
defaultDatasets () {
|
||||
return [
|
||||
{
|
||||
label: 'My First dataset',
|
||||
backgroundColor: 'rgba(179,181,198,0.2)',
|
||||
pointBackgroundColor: 'rgba(179,181,198,1)',
|
||||
pointBorderColor: '#fff',
|
||||
pointHoverBackgroundColor: 'rgba(179,181,198,1)',
|
||||
pointHoverBorderColor: 'rgba(179,181,198,1)',
|
||||
data: [65, 59, 90, 81, 56, 55, 40]
|
||||
},
|
||||
{
|
||||
label: 'My Second dataset',
|
||||
backgroundColor: 'rgba(255,99,132,0.2)',
|
||||
pointBackgroundColor: 'rgba(255,99,132,1)',
|
||||
pointBorderColor: '#fff',
|
||||
pointHoverBackgroundColor: 'rgba(255,99,132,1)',
|
||||
pointHoverBorderColor: 'rgba(255,99,132,1)',
|
||||
data: [28, 48, 40, 19, 96, 27, 100]
|
||||
}
|
||||
]
|
||||
},
|
||||
defaultOptions () {
|
||||
return {
|
||||
aspectRatio: 1.5
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,49 @@
|
||||
<template>
|
||||
<CChartRadar
|
||||
:datasets="defaultDatasets"
|
||||
:options="defaultOptions"
|
||||
:labels="[
|
||||
'Eating', 'Drinking', 'Sleeping', 'Designing',
|
||||
'Coding', 'Cycling', 'Running'
|
||||
]"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'CChartRadarExample',
|
||||
computed: {
|
||||
defaultDatasets() {
|
||||
return [
|
||||
{
|
||||
label: '2019',
|
||||
backgroundColor: 'rgba(179,181,198,0.2)',
|
||||
borderColor: 'rgba(179,181,198,1)',
|
||||
pointBackgroundColor: 'rgba(179,181,198,1)',
|
||||
pointBorderColor: '#fff',
|
||||
pointHoverBackgroundColor: '#fff',
|
||||
pointHoverBorderColor: 'rgba(179,181,198,1)',
|
||||
tooltipLabelColor: 'rgba(179,181,198,1)',
|
||||
data: [65, 59, 90, 81, 56, 55, 40]
|
||||
},
|
||||
{
|
||||
label: '2020',
|
||||
backgroundColor: 'rgba(255,99,132,0.2)',
|
||||
borderColor: 'rgba(255,99,132,1)',
|
||||
pointBackgroundColor: 'rgba(255,99,132,1)',
|
||||
pointBorderColor: '#fff',
|
||||
pointHoverBackgroundColor: '#fff',
|
||||
pointHoverBorderColor: 'rgba(255,99,132,1)',
|
||||
tooltipLabelColor: 'rgba(255,99,132,1)',
|
||||
data: [28, 48, 40, 19, 96, 27, 100]
|
||||
}
|
||||
]
|
||||
},
|
||||
defaultOptions() {
|
||||
return {
|
||||
aspectRatio: 1.5
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,103 @@
|
||||
<template>
|
||||
<CChartLine
|
||||
:datasets="defaultDatasets"
|
||||
:options="defaultOptions"
|
||||
:labels="['Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa', 'Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa', 'Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa', 'Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa', 'Su']"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import { CChartLine } from '@coreui/vue-chartjs'
|
||||
// import { getStyle, hexToRgba } from '@coreui/utils/src'
|
||||
import CoreUtils from '~/mixins/CoreUtils'
|
||||
|
||||
function random(min, max) {
|
||||
return Math.floor(Math.random() * (max - min + 1) + min)
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'MainChartExample',
|
||||
mixins: [CoreUtils],
|
||||
computed: {
|
||||
defaultDatasets() {
|
||||
const brandSuccess = this.getStyle('success2') || '#4dbd74'
|
||||
const brandInfo = this.getStyle('info') || '#20a8d8'
|
||||
const brandDanger = this.getStyle('danger') || '#f86c6b'
|
||||
|
||||
let elements = 27
|
||||
const data1 = []
|
||||
const data2 = []
|
||||
const data3 = []
|
||||
|
||||
for (let i = 0; i <= elements; i++) {
|
||||
data1.push(random(50, 200))
|
||||
data2.push(random(80, 100))
|
||||
data3.push(65)
|
||||
}
|
||||
return [
|
||||
{
|
||||
label: 'My First dataset',
|
||||
backgroundColor: this.hexToRgba(brandInfo, 10),
|
||||
borderColor: brandInfo,
|
||||
pointHoverBackgroundColor: brandInfo,
|
||||
borderWidth: 2,
|
||||
data: data1
|
||||
},
|
||||
{
|
||||
label: 'My Second dataset',
|
||||
backgroundColor: 'transparent',
|
||||
borderColor: brandSuccess,
|
||||
pointHoverBackgroundColor: brandSuccess,
|
||||
borderWidth: 2,
|
||||
data: data2
|
||||
},
|
||||
{
|
||||
label: 'My Third dataset',
|
||||
backgroundColor: 'transparent',
|
||||
borderColor: brandDanger,
|
||||
pointHoverBackgroundColor: brandDanger,
|
||||
borderWidth: 1,
|
||||
borderDash: [8, 5],
|
||||
data: data3
|
||||
}
|
||||
]
|
||||
},
|
||||
defaultOptions() {
|
||||
return {
|
||||
|
||||
maintainAspectRatio: false,
|
||||
legend: {
|
||||
display: false
|
||||
},
|
||||
scales: {
|
||||
xAxes: [{
|
||||
gridLines: {
|
||||
drawOnChartArea: false
|
||||
}
|
||||
}],
|
||||
yAxes: [{
|
||||
ticks: {
|
||||
beginAtZero: true,
|
||||
maxTicksLimit: 5,
|
||||
stepSize: Math.ceil(250 / 5),
|
||||
max: 250
|
||||
},
|
||||
gridLines: {
|
||||
display: true
|
||||
}
|
||||
}]
|
||||
},
|
||||
elements: {
|
||||
point: {
|
||||
radius: 0,
|
||||
hitRadius: 10,
|
||||
hoverRadius: 4,
|
||||
hoverBorderWidth: 3
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
layout: 'admin'
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,175 @@
|
||||
<template>
|
||||
<CRow>
|
||||
<template v-if="!noCharts">
|
||||
<CCol md="3" sm="6">
|
||||
<CWidgetBrand
|
||||
color="facebook"
|
||||
right-header="89k"
|
||||
right-footer="friends"
|
||||
left-header="459"
|
||||
left-footer="feeds"
|
||||
>
|
||||
<CIcon
|
||||
name="cib-facebook"
|
||||
height="52"
|
||||
class="my-4"
|
||||
/>
|
||||
<CChartLineSimple
|
||||
class="c-chart-brand"
|
||||
background-color="rgba(255,255,255,.1)"
|
||||
:data-points="[65, 59, 84, 84, 51, 55, 40]"
|
||||
label="Friends"
|
||||
labels="months"
|
||||
/>
|
||||
</CWidgetBrand>
|
||||
</CCol>
|
||||
<CCol md="3" sm="6">
|
||||
<CWidgetBrand
|
||||
color="twitter"
|
||||
right-header="973k"
|
||||
right-footer="followers"
|
||||
left-header="1.792"
|
||||
left-footer="tweets"
|
||||
>
|
||||
<CIcon
|
||||
name="cib-twitter"
|
||||
height="52"
|
||||
class="my-4"
|
||||
/>
|
||||
<CChartLineSimple
|
||||
class="c-chart-brand"
|
||||
background-color="rgba(255,255,255,.1)"
|
||||
:data-points="[1, 13, 9, 17, 34, 41, 38]"
|
||||
label="Followers"
|
||||
labels="months"
|
||||
/>
|
||||
</CWidgetBrand>
|
||||
</CCol>
|
||||
<CCol md="3" sm="6">
|
||||
<CWidgetBrand
|
||||
color="linkedin"
|
||||
right-header="500+"
|
||||
right-footer="contracts"
|
||||
left-header="292"
|
||||
left-footer="feeds"
|
||||
>
|
||||
<CIcon
|
||||
name="cib-linkedin"
|
||||
height="52"
|
||||
class="my-4"
|
||||
/>
|
||||
<CChartLineSimple
|
||||
class="c-chart-brand"
|
||||
background-color="rgba(255,255,255,.1)"
|
||||
:data-points="[78, 81, 80, 45, 34, 12, 40]"
|
||||
label="Contracts"
|
||||
labels="months"
|
||||
/>
|
||||
</CWidgetBrand>
|
||||
</CCol>
|
||||
<CCol md="3" sm="6">
|
||||
<CWidgetBrand
|
||||
right-header="12"
|
||||
right-footer="events"
|
||||
left-header="4"
|
||||
left-footer="meetings"
|
||||
color="warning"
|
||||
>
|
||||
<CIcon
|
||||
name="cil-calendar"
|
||||
height="52"
|
||||
class="my-4"
|
||||
/>
|
||||
<CChartLineSimple
|
||||
class="c-chart-brand"
|
||||
background-color="rgba(255,255,255,.1)"
|
||||
:data-points="[35, 23, 56, 22, 97, 23, 64]"
|
||||
label="Followers"
|
||||
labels="months"
|
||||
/>
|
||||
</CWidgetBrand>
|
||||
</CCol>
|
||||
</template>
|
||||
<template v-else>
|
||||
<CCol md="3" sm="6">
|
||||
<CWidgetBrand
|
||||
color="facebook"
|
||||
right-header="89k"
|
||||
right-footer="friends"
|
||||
left-header="459"
|
||||
left-footer="feeds"
|
||||
>
|
||||
<CIcon
|
||||
name="cib-facebook"
|
||||
height="56"
|
||||
class="my-4"
|
||||
/>
|
||||
</CWidgetBrand>
|
||||
</CCol>
|
||||
<CCol md="3" sm="6">
|
||||
<CWidgetBrand
|
||||
color="twitter"
|
||||
right-header="973k"
|
||||
right-footer="followers"
|
||||
left-header="1.792"
|
||||
left-footer="tweets"
|
||||
>
|
||||
<CIcon
|
||||
name="cib-twitter"
|
||||
height="56"
|
||||
class="my-4"
|
||||
/>
|
||||
</CWidgetBrand>
|
||||
</CCol>
|
||||
<CCol md="3" sm="6">
|
||||
<CWidgetBrand
|
||||
color="linkedin"
|
||||
right-header="500+"
|
||||
right-footer="contracts"
|
||||
left-header="292"
|
||||
left-footer="feeds"
|
||||
>
|
||||
<CIcon
|
||||
name="cib-linkedin"
|
||||
height="56"
|
||||
class="my-4"
|
||||
/>
|
||||
</CWidgetBrand>
|
||||
</CCol>
|
||||
<CCol md="3" sm="6">
|
||||
<CWidgetBrand
|
||||
right-header="12"
|
||||
right-footer="events"
|
||||
left-header="4"
|
||||
left-footer="meetings"
|
||||
color="warning"
|
||||
>
|
||||
<CIcon
|
||||
name="cil-calendar"
|
||||
height="56"
|
||||
class="my-4"
|
||||
/>
|
||||
</CWidgetBrand>
|
||||
</CCol>
|
||||
</template>
|
||||
</CRow>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'WidgetsBrand',
|
||||
props: {
|
||||
noCharts: Boolean
|
||||
},
|
||||
layout: 'admin'
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.c-chart-brand {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,136 @@
|
||||
<template>
|
||||
<CRow>
|
||||
<CCol sm="6" lg="3">
|
||||
<CWidgetDropdown color="primary" header="9.823" text="Members online">
|
||||
<template #default>
|
||||
<CDropdown
|
||||
color="transparent p-0"
|
||||
placement="bottom-end"
|
||||
>
|
||||
<template #toggler-content>
|
||||
<CIcon name="cil-settings"/>
|
||||
</template>
|
||||
<CDropdownItem>Action</CDropdownItem>
|
||||
<CDropdownItem>Another action</CDropdownItem>
|
||||
<CDropdownItem>Something else here...</CDropdownItem>
|
||||
<CDropdownItem disabled>Disabled action</CDropdownItem>
|
||||
</CDropdown>
|
||||
</template>
|
||||
<template #footer>
|
||||
<CChartLineSimple
|
||||
pointed
|
||||
class="mt-3 mx-3"
|
||||
style="height:70px"
|
||||
:data-points="[65, 59, 84, 84, 51, 55, 40]"
|
||||
point-hover-background-color="primary"
|
||||
label="Members"
|
||||
labels="months"
|
||||
/>
|
||||
</template>
|
||||
</CWidgetDropdown>
|
||||
</CCol>
|
||||
<CCol sm="6" lg="3">
|
||||
<CWidgetDropdown color="info" header="9.823" text="Members online">
|
||||
<template #default>
|
||||
<CDropdown
|
||||
color="transparent p-0"
|
||||
placement="bottom-end"
|
||||
:caret="false"
|
||||
>
|
||||
<template #toggler-content>
|
||||
<CIcon name="cil-location-pin"/>
|
||||
</template>
|
||||
<CDropdownItem>Action</CDropdownItem>
|
||||
<CDropdownItem>Another action</CDropdownItem>
|
||||
<CDropdownItem>Something else here...</CDropdownItem>
|
||||
<CDropdownItem disabled>Disabled action</CDropdownItem>
|
||||
</CDropdown>
|
||||
</template>
|
||||
<template #footer>
|
||||
<CChartLineSimple
|
||||
pointed
|
||||
class="mt-3 mx-3"
|
||||
style="height:70px"
|
||||
:data-points="[1, 18, 9, 17, 34, 22, 11]"
|
||||
point-hover-background-color="info"
|
||||
:options="{ elements: { line: { tension: 0.00001 }}}"
|
||||
label="Members"
|
||||
labels="months"
|
||||
/>
|
||||
</template>
|
||||
</CWidgetDropdown>
|
||||
</CCol>
|
||||
<CCol sm="6" lg="3">
|
||||
<CWidgetDropdown
|
||||
color="warning"
|
||||
header="9.823"
|
||||
text="Members online"
|
||||
>
|
||||
<template #default>
|
||||
<CDropdown
|
||||
color="transparent p-0"
|
||||
placement="bottom-end"
|
||||
>
|
||||
<template #toggler-content>
|
||||
<CIcon name="cil-settings"/>
|
||||
</template>
|
||||
<CDropdownItem>Action</CDropdownItem>
|
||||
<CDropdownItem>Another action</CDropdownItem>
|
||||
<CDropdownItem>Something else here...</CDropdownItem>
|
||||
<CDropdownItem disabled>Disabled action</CDropdownItem>
|
||||
</CDropdown>
|
||||
</template>
|
||||
<template #footer>
|
||||
<CChartLineSimple
|
||||
class="mt-3"
|
||||
style="height:70px"
|
||||
background-color="rgba(255,255,255,.2)"
|
||||
:data-points="[78, 81, 80, 45, 34, 12, 40]"
|
||||
:options="{ elements: { line: { borderWidth: 2.5 }}}"
|
||||
point-hover-background-color="warning"
|
||||
label="Members"
|
||||
labels="months"
|
||||
/>
|
||||
</template>
|
||||
</CWidgetDropdown>
|
||||
</CCol>
|
||||
<CCol sm="6" lg="3">
|
||||
<CWidgetDropdown
|
||||
color="danger"
|
||||
header="9.823"
|
||||
text="Members online"
|
||||
>
|
||||
<template #default>
|
||||
<CDropdown
|
||||
color="transparent p-0"
|
||||
placement="bottom-end"
|
||||
>
|
||||
<template #toggler-content>
|
||||
<CIcon name="cil-settings"/>
|
||||
</template>
|
||||
<CDropdownItem>Action</CDropdownItem>
|
||||
<CDropdownItem>Another action</CDropdownItem>
|
||||
<CDropdownItem>Something else here...</CDropdownItem>
|
||||
<CDropdownItem disabled>Disabled action</CDropdownItem>
|
||||
</CDropdown>
|
||||
</template>
|
||||
<template #footer>
|
||||
<CChartBarSimple
|
||||
class="mt-3 mx-3"
|
||||
style="height:70px"
|
||||
background-color="rgb(250, 152, 152)"
|
||||
label="Members"
|
||||
labels="months"
|
||||
/>
|
||||
</template>
|
||||
</CWidgetDropdown>
|
||||
</CCol>
|
||||
</CRow>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'WidgetsDropdown',
|
||||
layout: 'admin'
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,41 @@
|
||||
<template>
|
||||
<div class="pageLoad">
|
||||
<div class="relativePos">
|
||||
<div class="txtBox">
|
||||
<div class="relativePos">
|
||||
<p>درحال بارگزاری</p>
|
||||
<div class="anim"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
loading: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
start() {
|
||||
this.loading = true
|
||||
},
|
||||
finish() {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
loading(newVal, oldVal) {
|
||||
if (newVal) {
|
||||
this.$gsap.timeline()
|
||||
.fromTo($('.pageLoad'), {autoAlpha: 0}, {autoAlpha: 1, duration: 0})
|
||||
} else {
|
||||
this.$gsap.timeline()
|
||||
.fromTo($('.pageLoad'), {autoAlpha: 1}, {autoAlpha: 0, duration: 0.1})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,26 @@
|
||||
<template>
|
||||
<div class="pageLoad preLoader" v-if="loading">
|
||||
<div class="relativePos">
|
||||
<div class="txtBox">
|
||||
<div class="relativePos">
|
||||
<p>درحال بارگزاری</p>
|
||||
<div class="anim"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
// when default is false preLoader is disabled
|
||||
loading: true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
setTimeout(() => this.loading = false, 300)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user