|
@@ -2,19 +2,20 @@
|
|
|
<div>
|
|
|
<div class="header">
|
|
|
<div class="title-card">
|
|
|
- <li class="bg-img" @click="ConfirmBtn(1)" :class="getClass(1)">
|
|
|
+ <li class="bg-img" @click="ConfirmBtn({ id: 1, url: '/home' })" :class="getClass(1)">
|
|
|
<img src="../assets/images/Vector.png" alt="" />
|
|
|
<linear-text
|
|
|
text="总览"
|
|
|
startColor="#95CCFF"
|
|
|
endColor="#fff"
|
|
|
fontSize="20px"
|
|
|
+
|
|
|
/>
|
|
|
</li>
|
|
|
<ul v-for="(item, index) in titleList" :key="index">
|
|
|
<li
|
|
|
class="bg-img"
|
|
|
- @click="ConfirmBtn(item.id)"
|
|
|
+ @click="ConfirmBtn(item)"
|
|
|
:class="getClass(item.id)"
|
|
|
>
|
|
|
<linear-text
|
|
@@ -30,7 +31,7 @@
|
|
|
<ul v-for="(item, index) in titleList1" :key="index">
|
|
|
<li
|
|
|
class="bg-img"
|
|
|
- @click="ConfirmBtn(item.id)"
|
|
|
+ @click="ConfirmBtn(item)"
|
|
|
:class="getClass(item.id)"
|
|
|
>
|
|
|
<linear-text
|
|
@@ -69,6 +70,7 @@ export default {
|
|
|
{
|
|
|
name: "基础信息",
|
|
|
id: 2,
|
|
|
+ url: '/basic'
|
|
|
},
|
|
|
{
|
|
|
name: "消防管理",
|
|
@@ -101,8 +103,11 @@ export default {
|
|
|
console.log(this.test);
|
|
|
},
|
|
|
methods: {
|
|
|
- ConfirmBtn(num) {
|
|
|
- this.flag = num;
|
|
|
+ ConfirmBtn(item) {
|
|
|
+ this.flag = item.id;
|
|
|
+ if (this.$route.path !== item.url) {
|
|
|
+ this.$router.push(item.url)
|
|
|
+ }
|
|
|
},
|
|
|
getClass(v) {
|
|
|
return this.flag == v ? "bg-img active" : "bg-img";
|