majles dashboard
This commit is contained in:
parent
10d59713b0
commit
b1154fa3ae
|
@ -1,2 +1,3 @@
|
||||||
@import "../fonts/tavasi/style";
|
@import "../fonts/tavasi/style";
|
||||||
@import "../img/icomoon/style";
|
@import "../img/icomoon/style";
|
||||||
|
@import "./sahel";
|
||||||
|
|
46
assets/common/vendors/counter/counter.js
vendored
46
assets/common/vendors/counter/counter.js
vendored
|
@ -1,46 +0,0 @@
|
||||||
(function ($) {
|
|
||||||
$.fn.countTo = function (options) {
|
|
||||||
// merge the default plugin settings with the custom options
|
|
||||||
options = $.extend({}, $.fn.countTo.defaults, options || {});
|
|
||||||
|
|
||||||
// how many times to update the value, and how much to increment the value on each update
|
|
||||||
var loops = Math.ceil(options.speed / options.refreshInterval),
|
|
||||||
increment = (options.to - options.from) / loops;
|
|
||||||
|
|
||||||
return $(this).each(function () {
|
|
||||||
var _this = this,
|
|
||||||
loopCount = 0,
|
|
||||||
value = options.from,
|
|
||||||
interval = setInterval(updateTimer, options.refreshInterval);
|
|
||||||
|
|
||||||
function updateTimer() {
|
|
||||||
value += increment;
|
|
||||||
loopCount++;
|
|
||||||
$(_this).html(value.toFixed(options.decimals));
|
|
||||||
|
|
||||||
if (typeof options.onUpdate == "function") {
|
|
||||||
options.onUpdate.call(_this, value);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (loopCount >= loops) {
|
|
||||||
clearInterval(interval);
|
|
||||||
value = options.to;
|
|
||||||
|
|
||||||
if (typeof options.onComplete == "function") {
|
|
||||||
options.onComplete.call(_this, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
$.fn.countTo.defaults = {
|
|
||||||
from: 0, // the number the element should start at
|
|
||||||
to: 100, // the number the element should end at
|
|
||||||
speed: 1000, // how long it should take to count between the target numbers
|
|
||||||
refreshInterval: 100, // how often the element should be updated
|
|
||||||
decimals: 0, // the number of decimal places to show
|
|
||||||
onUpdate: null, // callback method for every time the element is updated,
|
|
||||||
onComplete: null, // callback method for when the element finishes updating
|
|
||||||
};
|
|
||||||
})(jQuery);
|
|
|
@ -43,8 +43,8 @@
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
}
|
}
|
||||||
.inner-wrapper {
|
.inner-wrapper {
|
||||||
max-width: 47.5em;
|
// max-width: 47.5em;
|
||||||
margin: 0 auto;
|
// margin: 0 auto;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
}
|
}
|
||||||
@media only screen and (min-width: 768px) and (max-width: 991.98px) {
|
@media only screen and (min-width: 768px) and (max-width: 991.98px) {
|
||||||
.search-section .top-content .inner-wrapper {
|
.search-section .top-content .inner-wrapper {
|
||||||
padding-top: 10em;
|
// padding-top: 10em;
|
||||||
}
|
}
|
||||||
/* استایلهای مربوط به اندازههای بین 768 تا 991 پیکسل */
|
/* استایلهای مربوط به اندازههای بین 768 تا 991 پیکسل */
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,9 +5,8 @@
|
||||||
<header>
|
<header>
|
||||||
<majles-navbar></majles-navbar>
|
<majles-navbar></majles-navbar>
|
||||||
</header>
|
</header>
|
||||||
|
<div class="inner-wrapper d-flex flex-column col-12">
|
||||||
<div class="inner-wrapper">
|
<div class="">
|
||||||
<div class="d-md-none d-lg-block">
|
|
||||||
<img
|
<img
|
||||||
src="assets/majles/img/logo_200x200.png"
|
src="assets/majles/img/logo_200x200.png"
|
||||||
:alt="appLongTitle()"
|
:alt="appLongTitle()"
|
||||||
|
@ -19,44 +18,32 @@
|
||||||
<h1 class="sub-title">
|
<h1 class="sub-title">
|
||||||
{{ title2 }}<span style="font-size: 1.5rem">{{ title3 }}</span>
|
{{ title2 }}<span style="font-size: 1.5rem">{{ title3 }}</span>
|
||||||
</h1>
|
</h1>
|
||||||
<form
|
<div class=" d-flex justify-content-center">
|
||||||
class="ms-search-form px-3"
|
<form
|
||||||
role="search"
|
class="ms-search-form px-3 col-12 col-sm-8 col-xl-6"
|
||||||
@submit.prevent="searchNavigateList"
|
role="search"
|
||||||
>
|
@submit.prevent="searchNavigateList"
|
||||||
<div class="input-group mb-5" dir="ltr">
|
>
|
||||||
<div class="input-group-prepend">
|
<auto-complation
|
||||||
<button
|
dir="ltr"
|
||||||
dir="rtl"
|
contentKey="qasection"
|
||||||
class="btn"
|
:showAppend="false"
|
||||||
type="button"
|
:showPrepend="true"
|
||||||
id="button-addon2"
|
:showAppendSearchButton="false"
|
||||||
@click.prevent="searchNavigateList()"
|
@onSearchStart="searchNavigateList"
|
||||||
>
|
@on-search-navigate-list="searchNavigateList"
|
||||||
جستجو
|
:placeholder="'جستجو در هزاران محتوای قوانین'"
|
||||||
<span class="tavasi tavasi-Component-198--1"></span>
|
ref="autoComplationRef"
|
||||||
</button>
|
></auto-complation>
|
||||||
</div>
|
<!-- :listAutocomplate="listAutocomplate" -->
|
||||||
|
<!-- @selectAutocomplate2="selectAutocomplate2" -->
|
||||||
<input
|
<!-- </div> -->
|
||||||
v-focus
|
</form>
|
||||||
class="form-control"
|
</div>
|
||||||
ref="search-input"
|
|
||||||
dir="rtl"
|
|
||||||
v-model.trim="searchText"
|
|
||||||
type="search"
|
|
||||||
id="search-query"
|
|
||||||
placeholder="جستجو در قوانین ..."
|
|
||||||
name="search-query"
|
|
||||||
size="60"
|
|
||||||
@keyup.enter="searchNavigateList"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="center-content">
|
<div class="center-content">
|
||||||
<!-- <my-counter-list title=""></my-counter-list> -->
|
<my-counter-list></my-counter-list>
|
||||||
</div>
|
</div>
|
||||||
<div class="footer-content">
|
<div class="footer-content">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
|
@ -86,7 +73,7 @@
|
||||||
<div class="col-sm-6 mb-2 mb-sm-0 col-md mb-sm-2 mb-md-0">
|
<div class="col-sm-6 mb-2 mb-sm-0 col-md mb-sm-2 mb-md-0">
|
||||||
<div class="link-item-container">
|
<div class="link-item-container">
|
||||||
<NuxtLink
|
<NuxtLink
|
||||||
:to="urlResolver('qq308235')"
|
:to="urlResolver('qq308235')"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
class="btn link-item"
|
class="btn link-item"
|
||||||
>
|
>
|
||||||
|
@ -106,7 +93,7 @@
|
||||||
<div class="col-sm-6 mb-2 mb-sm-0 col-md">
|
<div class="col-sm-6 mb-2 mb-sm-0 col-md">
|
||||||
<div class="link-item-container">
|
<div class="link-item-container">
|
||||||
<NuxtLink
|
<NuxtLink
|
||||||
:to="urlResolver('qq38162')"
|
:to="urlResolver('qq38162')"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
class="btn link-item"
|
class="btn link-item"
|
||||||
>
|
>
|
||||||
|
@ -126,7 +113,7 @@
|
||||||
<div class="col-sm-6 mb-2 mb-sm-0 col-md">
|
<div class="col-sm-6 mb-2 mb-sm-0 col-md">
|
||||||
<div class="link-item-container">
|
<div class="link-item-container">
|
||||||
<NuxtLink
|
<NuxtLink
|
||||||
:to="urlResolver('qq233930')"
|
:to="urlResolver('qq233930')"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
class="btn link-item"
|
class="btn link-item"
|
||||||
>
|
>
|
||||||
|
@ -270,6 +257,18 @@ export default {
|
||||||
// return routeData.href;
|
// return routeData.href;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
components: {
|
||||||
|
MyCounterList: defineAsyncComponent(() =>
|
||||||
|
import("@components/other/MyCounterList.vue")
|
||||||
|
),
|
||||||
|
AutoComplation: defineAsyncComponent(() =>
|
||||||
|
import("@search/components/global/AutoComplation.vue")
|
||||||
|
),
|
||||||
|
|
||||||
|
// Navbar: () => import("@dashboard/majles/components/Navbar"),
|
||||||
|
// MySystem: () => import("@dashboard/default/pages/MySystem"),
|
||||||
|
// MyCircleProgress: () => import("@components/MyCircleProgress"),
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -286,6 +285,14 @@ export default {
|
||||||
// .main-page__content{
|
// .main-page__content{
|
||||||
// margin-right: 0px !important;
|
// margin-right: 0px !important;
|
||||||
// }
|
// }
|
||||||
|
.ms-search-form {
|
||||||
|
.input-group {
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.subtitle {
|
||||||
|
font-size: 1.2rem;
|
||||||
|
}
|
||||||
.dropdown-menu {
|
.dropdown-menu {
|
||||||
float: right;
|
float: right;
|
||||||
min-width: 13rem;
|
min-width: 13rem;
|
||||||
|
|
|
@ -5,10 +5,10 @@
|
||||||
class="col-sm-12 col-md mb-5 mb-md-0 text-center"
|
class="col-sm-12 col-md mb-5 mb-md-0 text-center"
|
||||||
v-for="(counter, index) in list"
|
v-for="(counter, index) in list"
|
||||||
>
|
>
|
||||||
<!-- <my-counter-list-item
|
<my-counter-list-item
|
||||||
:counter="counter"
|
:counter="counter"
|
||||||
:key="index + render"
|
:key="index + render"
|
||||||
></my-counter-list-item> -->
|
></my-counter-list-item>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -19,13 +19,13 @@
|
||||||
import repoApi from "~/apis/repoApi";
|
import repoApi from "~/apis/repoApi";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
// props: {
|
||||||
listData: {
|
// listData: {
|
||||||
default() {
|
// default() {
|
||||||
return [];
|
// return [];
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
async beforeMount() {
|
async beforeMount() {
|
||||||
try {
|
try {
|
||||||
const { $api } = useNuxtApp();
|
const { $api } = useNuxtApp();
|
||||||
|
@ -73,6 +73,11 @@ export default {
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
components: {
|
||||||
|
MyCounterListItem: defineAsyncComponent(() =>
|
||||||
|
import("@components/other/MyCounterListItem.vue")
|
||||||
|
),
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
class="d-md-flex justify-content-sm-center align-items-center"
|
class="d-md-flex justify-content-sm-center align-items-center"
|
||||||
>
|
>
|
||||||
<h2 class="counter-number mb-2 mb-md-0">
|
<h2 class="counter-number mb-2 mb-md-0">
|
||||||
<span :class="counter.key + '-timer'">{{ counter.count }}</span>
|
<span>{{ displayValue }}</span>
|
||||||
</h2>
|
</h2>
|
||||||
<div class="d-flex flex-column align-items-center align-items-lg-start">
|
<div class="d-flex flex-column align-items-center align-items-lg-start">
|
||||||
<p class="counter-text">{{ counter.title }}</p>
|
<p class="counter-text">{{ counter.title }}</p>
|
||||||
|
@ -15,42 +15,67 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import "assets/common/vendors/counter/counter.js";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: ["counter"],
|
props: ["counter"],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
displayValue: 0,
|
||||||
|
interval: null,
|
||||||
|
};
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
const vm = this;
|
this.startCount();
|
||||||
|
},
|
||||||
$(`.${vm.counter.key}-timer`).countTo({
|
beforeUnmount() {
|
||||||
from: 0,
|
if (this.interval) clearInterval(this.interval);
|
||||||
to: vm.counter.total,
|
|
||||||
speed: 7000,
|
|
||||||
refreshInterval: 50,
|
|
||||||
onComplete: function (value) {
|
|
||||||
// console.debug(this);
|
|
||||||
},
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
goToRouteName() {
|
startCount() {
|
||||||
this.$router.push({
|
const from = 0;
|
||||||
name: "searchResult",
|
const to = this.counter.total;
|
||||||
query: {
|
const speed = 7000;
|
||||||
q: undefined,
|
const refreshInterval = 50;
|
||||||
key: this.counter.routeName,
|
const decimals = 0;
|
||||||
},
|
|
||||||
});
|
const loops = Math.ceil(speed / refreshInterval);
|
||||||
|
const increment = (to - from) / loops;
|
||||||
|
|
||||||
|
let value = from;
|
||||||
|
let loopCount = 0;
|
||||||
|
|
||||||
|
this.interval = setInterval(() => {
|
||||||
|
value += increment;
|
||||||
|
loopCount++;
|
||||||
|
this.displayValue = value.toFixed(decimals);
|
||||||
|
|
||||||
|
if (loopCount >= loops) {
|
||||||
|
clearInterval(this.interval);
|
||||||
|
this.displayValue = to.toFixed(decimals);
|
||||||
|
}
|
||||||
|
}, refreshInterval);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// goToRouteName() {
|
||||||
|
// this.$router.push({
|
||||||
|
// name: "searchResult",
|
||||||
|
// query: {
|
||||||
|
// q: undefined,
|
||||||
|
// key: this.counter.routeName,
|
||||||
|
// },
|
||||||
|
// });
|
||||||
|
// },
|
||||||
|
|
||||||
urlResolver() {
|
urlResolver() {
|
||||||
const routeData = this.$router.resolve({
|
console.log("555");
|
||||||
name: "searchResult",
|
|
||||||
query: {
|
// const routeData = this.$router.resolve({
|
||||||
q: undefined,
|
// name: "searchResult",
|
||||||
key: this.counter.routeName,
|
// query: {
|
||||||
},
|
// q: undefined,
|
||||||
});
|
// key: this.counter.routeName,
|
||||||
return routeData.href;
|
// },
|
||||||
|
// });
|
||||||
|
// return routeData.href;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user