Browse Source

新增文件提交

feature
宋桢 2 years ago
parent
commit
6638ce7059
  1. 254
      src/router/index.js
  2. 0
      src/views/dataBoard/humanData/index.vue
  3. 0
      src/views/dataBoard/organizational/index.vue
  4. 25
      src/views/dataBoard/overview/index.vue
  5. 0
      src/views/dataBoard/satisfactionEval/index.vue
  6. 94
      src/views/dataBoardMain/main-navbar.vue
  7. 14194
      yarn.lock

254
src/router/index.js

@ -1,29 +1,30 @@
import Vue from "vue";
import Router from "vue-router";
import http from "@/utils/request";
import {
isURL
} from "@/utils/validate";
import { isURL } from "@/utils/validate";
import store from "@/js/store";
import {message} from "@/utils/message.js";
import { message } from "@/utils/message.js";
Vue.use(Router);
const CUSTOMER = process.env.VUE_APP_CUSTOMER;
// 页面路由(独立页面)
export const pageRoutes = [{
export const pageRoutes = [
{
path: "/login",
component: () => import("@/views/pages/login"),
name: "login",
meta: {
title: "登录",
},
}, {
},
{
path: "/",
name: "index",
// component: () => import("@/views/pages/index"),
redirect: {
path: "/main/home",
},
}, {
},
{
path: "/404",
component: () => import("@/views/pages/404"),
name: "404",
@ -38,7 +39,8 @@ export const pageRoutes = [{
}
next();
},
}, ];
},
];
// 模块路由(基于主入口布局页面)
export const moduleRoutes = {
path: "/main",
@ -51,7 +53,8 @@ export const moduleRoutes = {
title: "主入口布局",
isTab: false,
},
children: [{
children: [
{
path: "home",
component: () => import("@/views/modules/home/index"),
name: "home",
@ -59,7 +62,8 @@ export const moduleRoutes = {
title: "首页",
isTab: true,
},
}, {
},
{
path: "unopen",
component: () => import("@/views/modules/unopen"),
name: "unopen",
@ -67,7 +71,8 @@ export const moduleRoutes = {
title: "未开放功能",
isTab: true,
},
}, {
},
{
path: "404",
props: true,
component: () => import("@/views/modules/404"),
@ -76,7 +81,8 @@ export const moduleRoutes = {
title: "页面未找到或无权访问",
isTab: false,
},
}, {
},
{
path: "home-notice",
props: true,
name: "home-notice",
@ -84,12 +90,15 @@ export const moduleRoutes = {
meta: {
isTab: true,
title: "智能提醒",
parent: [{
parent: [
{
title: "首页",
path: "/main/home-index",
}, ],
},
}, {
],
},
},
{
path: "shequ-chaxun",
props: true,
name: "shequ-chaxun",
@ -98,7 +107,8 @@ export const moduleRoutes = {
isTab: true,
title: "社区查询",
},
}, ],
},
],
};
// pc端菜单的 如果没有配置 默认的 或者配置了默认的 但没有权限 默认选中第一
function cookApiDataItem(item) {
@ -114,7 +124,9 @@ function cookApiDataItem(item) {
// console.log("aaaa", ret);
return ret;
}
let allChildrenUrl = n2one(item.children).filter((i) => i.url != "" && i.showFlag == 1).map((i) => i.url);
let allChildrenUrl = n2one(item.children)
.filter((i) => i.url != "" && i.showFlag == 1)
.map((i) => i.url);
// console.log("))))))))))))", allChildrenUrl);
if (item.children.length > 0) {
if (item.url == "" || !allChildrenUrl.find((i) => i.url == item.url)) {
@ -129,9 +141,7 @@ function cookApiDataItem(item) {
}
// 把按钮都化为页面内部的权限
function cookApiDataItem2(item) {
let {
children
} = item;
let { children } = item;
if (children && Array.isArray(children) && children.length > 0) {
let btns = item.children.filter((item) => item.type == 1);
item.btns = btns;
@ -142,14 +152,17 @@ function cookApiDataItem2(item) {
// 把父级拼到子集
function cookApiDataItem3(item, parent = []) {
item.parent = parent;
let {
children
} = item;
let { children } = item;
if (children && Array.isArray(children) && children.length > 0) {
item.children = children.map((val) => cookApiDataItem3(val, [...parent, {
item.children = children.map((val) =>
cookApiDataItem3(val, [
...parent,
{
title: item.name || "",
path: (item.url || "").replace(/{{([^}}]+)?}}/g, (s1, s2) => eval(s2)),
}, ]));
},
])
);
}
return item;
}
@ -164,7 +177,8 @@ export const dataBoardRoutes = {
meta: {
title: "主入口布局",
},
children: [{
children: [
{
path: "renfang/index",
props: true,
component: () => import("@/views/dataBoard/renfang/index"),
@ -173,7 +187,8 @@ export const dataBoardRoutes = {
title: "人房总览",
isTab: false,
},
}, {
},
{
path: "renfang/resi-list",
props: true,
component: () => import("@/views/dataBoard/renfang/resi/list"),
@ -182,7 +197,8 @@ export const dataBoardRoutes = {
title: "居民列表",
isTab: false,
},
}, {
},
{
path: "renfang/resi-class",
props: true,
component: () => import("@/views/dataBoard/renfang/resi/class"),
@ -191,7 +207,8 @@ export const dataBoardRoutes = {
title: "居民分类列表",
isTab: false,
},
}, {
},
{
path: "renfang/resi-analyze",
props: true,
component: () => import("@/views/dataBoard/renfang/resi/analyze"),
@ -200,7 +217,8 @@ export const dataBoardRoutes = {
title: "居民分析列表",
isTab: false,
},
}, {
},
{
path: "renfang/house-list",
props: true,
component: () => import("@/views/dataBoard/renfang/house/list"),
@ -209,7 +227,8 @@ export const dataBoardRoutes = {
title: "房屋列表",
isTab: false,
},
}, {
},
{
path: "renfang/warn-building",
props: true,
component: () => import("@/views/dataBoard/renfang/warn/building"),
@ -218,7 +237,8 @@ export const dataBoardRoutes = {
title: "预警楼栋列表",
isTab: false,
},
}, {
},
{
path: "renfang/warn-resi",
props: true,
component: () => import("@/views/dataBoard/renfang/warn/resi"),
@ -227,7 +247,8 @@ export const dataBoardRoutes = {
title: "预警楼栋居民",
isTab: false,
},
}, {
},
{
path: "sida/index",
props: true,
component: () => import("@/views/dataBoard/sida/index"),
@ -236,7 +257,8 @@ export const dataBoardRoutes = {
title: "四大清单",
isTab: false,
},
}, {
},
{
path: "sida/xq/list",
props: true,
component: () => import("@/views/dataBoard/sida/xq/list"),
@ -245,7 +267,8 @@ export const dataBoardRoutes = {
title: "需求清单列表",
isTab: false,
},
},{
},
{
path: "sida/wt/eventList",
props: true,
component: () => import("@/views/dataBoard/sida/wt/eventList"),
@ -254,7 +277,8 @@ export const dataBoardRoutes = {
title: "治理事件列表",
isTab: false,
},
},{
},
{
path: "sida/wt/hiddenDangerList",
props: true,
component: () => import("@/views/dataBoard/sida/wt/hiddenDangerList"),
@ -263,7 +287,8 @@ export const dataBoardRoutes = {
title: "安全隐患列表",
isTab: false,
},
},{
},
{
path: "sida/wt/specialCategoryList",
props: true,
component: () => import("@/views/dataBoard/sida/wt/specialCategoryList"),
@ -272,7 +297,8 @@ export const dataBoardRoutes = {
title: "综治人群列表",
isTab: false,
},
},{
},
{
path: "sida/zy/peopleResList",
props: true,
component: () => import("@/views/dataBoard/sida/zy/peopleResList"),
@ -281,7 +307,8 @@ export const dataBoardRoutes = {
title: "人资源列表",
isTab: false,
},
},{
},
{
path: "sida/zy/goodsResList",
props: true,
component: () => import("@/views/dataBoard/sida/zy/goodsResList"),
@ -290,7 +317,8 @@ export const dataBoardRoutes = {
title: "物资源列表",
isTab: false,
},
},{
},
{
path: "sida/zy/placeResList",
props: true,
component: () => import("@/views/dataBoard/sida/zy/placeResList"),
@ -299,8 +327,8 @@ export const dataBoardRoutes = {
title: "场所隐患列表",
isTab: false,
},
}
, {
},
{
path: "sida/fw",
props: true,
component: () => import("@/views/dataBoard/sida/fw"),
@ -309,7 +337,8 @@ export const dataBoardRoutes = {
title: "四大清单-服务清单查看更多",
isTab: false,
},
}, {
},
{
path: "fifteen/index",
props: true,
component: () => import("@/views/dataBoard/fifteen/index"),
@ -318,7 +347,58 @@ export const dataBoardRoutes = {
title: "十五分钟生活圈",
isTab: false,
},
}, {
},
{
path: "overview/index",
props: true,
component: () => import("@/views/dataBoard/overview/index"),
name: "dataBoard-overview-index",
meta: {
title: "概览",
isTab: false,
},
},
{
path: "organizational/index",
props: true,
component: () => import("@/views/dataBoard/organizational/index"),
name: "dataBoard-organizational-index",
meta: {
title: "组织架构",
isTab: false,
},
},
{
path: "humanData/index",
props: true,
component: () => import("@/views/dataBoard/humanData/index"),
name: "dataBoard-humanData-index",
meta: {
title: "人房数据",
isTab: false,
},
},
{
path: "satisfactionEval/index",
props: true,
component: () => import("@/views/dataBoard/satisfactionEval/index"),
name: "dataBoard-satisfactionEval-index",
meta: {
title: "满意度评价",
isTab: false,
},
},
{
path: "organizational/index",
props: true,
component: () => import("@/views/dataBoard/organizational/index"),
name: "dataBoard-organizational-index",
meta: {
title: "组织架构",
isTab: false,
},
},
{
path: "404",
props: true,
component: () => import("@/views/dataBoard/404"),
@ -335,7 +415,8 @@ export const dataBoardRoutes = {
}
next();
},
}, ],
},
],
};
// 模块路由(基于主入口布局页面) 可视化数据
export const moduleShujuRoutes = {
@ -348,7 +429,8 @@ export const moduleShujuRoutes = {
meta: {
title: "主入口布局",
},
children: [{
children: [
{
path: "/main-shuju/visual-basicinfo-people/:uid",
props: true,
component: () => import("@/views/modules/visual/basicinfo/people"),
@ -357,7 +439,8 @@ export const moduleShujuRoutes = {
title: "个人详情",
isTab: false,
},
}, {
},
{
path: "/main-shuju/visual-basicinfo-people-list",
props: true,
component: () => import("@/views/modules/visual/basicinfo/peopleList"),
@ -366,7 +449,8 @@ export const moduleShujuRoutes = {
title: "人员列表",
isTab: false,
},
}, {
},
{
path: "404",
props: true,
component: () => import("@/views/modules/visual/404"),
@ -375,13 +459,13 @@ export const moduleShujuRoutes = {
title: "页面未找到或无权访问",
isTab: false,
},
}, ],
},
],
};
export function addDynamicRoute(routeParams, router) {
// 组装路由名称, 并判断是否已添加, 如是: 则直接跳转
var routeName = routeParams.routeName;
var dynamicRoute = window.SITE_CONFIG["dynamicRoutes"].filter(
(item) => item.name === routeName)[0];
var dynamicRoute = window.SITE_CONFIG["dynamicRoutes"].filter((item) => item.name === routeName)[0];
if (dynamicRoute) {
return router.push({
name: routeName,
@ -400,12 +484,14 @@ export function addDynamicRoute(routeParams, router) {
},
};
router.matcher = new Router().matcher
router.addRoutes([{
router.matcher = new Router().matcher;
router.addRoutes([
{
...moduleRoutes,
name: `main-dynamic__${dynamicRoute.name}`,
children: [dynamicRoute],
}, ]);
},
]);
window.SITE_CONFIG["dynamicRoutes"].push(dynamicRoute);
router.push({
name: dynamicRoute.name,
@ -430,17 +516,17 @@ router.beforeEach((to, from, next) => {
}
const customerId = localStorage.getItem("customerId");
console.log("customerId:", customerId);
http.get("gov/access/menu/navDigitalCommunityNew?tableName=data_menu").then(({
data: res
}) => {
http
.get("gov/access/menu/navDigitalCommunityNew?tableName=data_menu")
.then(({ data: res }) => {
if (res.code == 10005 || res.code == 10006 || res.code == 10007) {
// 10005 token为空 10006登陆超时 10007别处登录
console.log("登录失效");
message({
message: res.msg || "未知错误",
type: 'error',
duration: 2 * 1000
})
type: "error",
duration: 2 * 1000,
});
return next({
name: "login",
});
@ -451,37 +537,41 @@ router.beforeEach((to, from, next) => {
...to,
replace: true,
});
}).catch((err) => {
})
.catch((err) => {
console.log(err);
next({
name: "login",
});
});
http.get("gov/access/menu/navDigitalCommunityNew").then(({
data: res
}) => {
http
.get("gov/access/menu/navDigitalCommunityNew")
.then(({ data: res }) => {
console.log(res);
if (res.code == 10005 || res.code == 10006 || res.code == 10007) {
// 10005 token为空 10006登陆超时 10007别处登录
console.log("登录失效");
message({
message: res.msg || "未知错误",
type: 'error',
duration: 2 * 1000
})
type: "error",
duration: 2 * 1000,
});
return next({
name: "login",
});
}
window.SITE_CONFIG["menuList"] = res.data.map((item) => cookApiDataItem3(item)).map((item) =>
cookApiDataItem2(item)).map((item) => cookApiDataItem(item));
window.SITE_CONFIG["menuList"] = res.data
.map((item) => cookApiDataItem3(item))
.map((item) => cookApiDataItem2(item))
.map((item) => cookApiDataItem(item));
fnAddDynamicMenuRoutes(window.SITE_CONFIG["menuList"]);
// next({ ...to, replace: true })
next({
...to,
replace: true,
});
}).catch((err) => {
})
.catch((err) => {
console.log(err);
next({
name: "login",
@ -534,8 +624,7 @@ function fnAddDynamicMenuRoutes(menuList = [], routes = []) {
let URL = (menuList[i].url || "").replace(/{{([^}}]+)?}}/g, (s1, s2) => eval(s2)); // URL支持{{ window.xxx }}占位符变量
if (isURL(URL)) {
if (menuList[i].children && menuList[i].children.length >= 1) {
let item = menuList[i].children.find(
(subMenu) => subMenu.url == menuList[i].url);
let item = menuList[i].children.find((subMenu) => subMenu.url == menuList[i].url);
if (item) {
route["path"] = route["name"] = `i-${menuList[i].id}`;
route["redirect"] = `i-${item.id}`;
@ -567,16 +656,19 @@ function fnAddDynamicMenuRoutes(menuList = [], routes = []) {
}
// routers.reverse();
// 添加路由
router.addRoutes([{
router.addRoutes([
{
...moduleRoutes,
name: "main-dynamic-menu",
children: routes,
}, {
},
{
path: "/main/*",
redirect: {
path: "/main/404",
},
}, ]);
},
]);
window.SITE_CONFIG["dynamicMenuRoutes"] = routes;
window.SITE_CONFIG["dynamicMenuRoutesHasAdded"] = true;
}
@ -603,8 +695,7 @@ function fnAddDynamicMenuRoutes2(menuList = [], routes = []) {
let URL = (menuList[i].url || "").replace(/{{([^}}]+)?}}/g, (s1, s2) => eval(s2)); // URL支持{{ window.xxx }}占位符变量
if (isURL(URL)) {
if (menuList[i].children && menuList[i].children.length >= 1) {
let item = menuList[i].children.find(
(subMenu) => subMenu.url == menuList[i].url);
let item = menuList[i].children.find((subMenu) => subMenu.url == menuList[i].url);
if (item) {
route["path"] = route["name"] = `i-${menuList[i].id}`;
route["redirect"] = `i-${item.id}`;
@ -635,16 +726,19 @@ function fnAddDynamicMenuRoutes2(menuList = [], routes = []) {
return fnAddDynamicMenuRoutes2(temp, routes);
}
// 添加路由
router.addRoutes([{
router.addRoutes([
{
...moduleShujuRoutes,
name: "main-dynamic-menu-shuju",
children: routes,
}, {
},
{
path: "/main-shuju/*",
redirect: {
path: "/main-shuju/404",
},
}, ]);
},
]);
window.SITE_CONFIG["dynamicMenuRoutesShuju"] = routes;
window.SITE_CONFIG["dynamicMenuRoutesShujuHasAdded"] = true;
}

0
src/views/dataBoard/humanData/index.vue

0
src/views/dataBoard/organizational/index.vue

25
src/views/dataBoard/overview/index.vue

@ -0,0 +1,25 @@
<template>
<div>
<cpt-bread @tap="clickBreadItem" v-if="breadList.length > 1" :bread-list="breadList" />
</div>
</template>
<script>
import cptBread from "@/views/dataBoard/renfang/cpts/bread";
export default {
data() {
return {
breadList: [],
};
},
components: {
cptBread,
},
computed: {},
methods: {
clickBreadItem(item) {},
},
};
</script>
<style lang="scss"></style>

0
src/views/dataBoard/satisfactionEval/index.vue

94
src/views/dataBoardMain/main-navbar.vue

@ -7,28 +7,28 @@
<span>返回</span>
</div> -->
<div class="nav-list z-left">
<div class="nav-item" :class="{ 'z-on': $route.path == '/dataBoard/renfang/index' }"
@click="toPage('/dataBoard/renfang/index')">
<div class="nav-item" :class="{ 'z-on': $route.path == '/dataBoard/renfang/index' }" @click="toPage('/dataBoard/renfang/index')">
<span>人房总览</span>
</div>
<div class="nav-item" :class="{ 'z-on': $route.path == '/dataBoard/sida/index' }"
@click="toPage('/dataBoard/sida/index')">
<div class="nav-item" :class="{ 'z-on': $route.path == '/dataBoard/sida/index' }" @click="toPage('/dataBoard/sida/index')">
<span>四大清单</span>
</div>
<div class="nav-item" :class="{ 'z-on': $route.path == '/dataBoard/fifteen/index' }"
@click="toPage('/dataBoard/fifteen/index')">
<div class="nav-item" :class="{ 'z-on': $route.path == '/dataBoard/fifteen/index' }" @click="toPage('/dataBoard/fifteen/index')">
<span>十五分钟生活圈</span>
</div>
<div class="nav-item" >
<span>一级菜单</span>
<div class="nav-item" :class="{ 'z-on': $route.path == '/dataBoard/overview/index' }" @click="toPage('/dataBoard/overview/index')">
<span>概览</span>
</div>
</div>
<div class="nav-list z-right">
<div class="nav-item">
<span>一级菜单</span>
<div class="nav-item" :class="{ 'z-on': $route.path == '/dataBoard/organizational/index' }" @click="toPage('/dataBoard/organizational/index')">
<span>组织架构</span>
</div>
<div class="nav-item">
<span>更多菜单</span>
<div class="nav-item" :class="{ 'z-on': $route.path == '/dataBoard/humanData/index' }" @click="toPage('/dataBoard/humanData/index')">
<span>人房数据</span>
</div>
<div class="nav-item" :class="{ 'z-on': $route.path == '/dataBoard/satisfactionEval/index' }" @click="toPage('/dataBoard/satisfactionEval/index')">
<span>满意度评价</span>
</div>
</div>
<div class="msg">
@ -57,17 +57,13 @@
<nav v-if="false" class="m-navbar">
<div class="navbar__header">
<h1 class="navbar__brand" @click="$router.push({ name: 'home' })">
<a class="navbar__brand-lg" href="javascript:;">{{ customerName
}}</a>
<a class="navbar__brand-mini" href="javascript:;">{{ customerName.slice(0, 2)
}}</a>
<a class="navbar__brand-lg" href="javascript:;">{{ customerName }}</a>
<a class="navbar__brand-mini" href="javascript:;">{{ customerName.slice(0, 2) }}</a>
</h1>
</div>
<div class="navbar__body">
<el-menu class="navbar__menu mr-auto" mode="horizontal">
<el-menu-item index="1" @click="
$store.state.sidebarFold = !$store.state.sidebarFold
">
<el-menu-item index="1" @click="$store.state.sidebarFold = !$store.state.sidebarFold">
<svg class="icon-svg navbar__icon-menu navbar__icon-menu--switch" aria-hidden="true">
<use xlink:href="#icon-outdent"></use>
</svg>
@ -78,33 +74,20 @@
</svg>
</el-menu-item>
</el-menu>
<el-menu :default-active="$store.state.mainShuju.activeName" :unique-opened="true"
:collapseTransition="false" mode="horizontal" class="navbar__menu mr-auto z-div">
<el-menu :default-active="$store.state.mainShuju.activeName" :unique-opened="true" :collapseTransition="false" mode="horizontal" class="navbar__menu mr-auto z-div">
<el-menu-item index="index" @click="toIndexPage">
<span>首页</span>
</el-menu-item>
<template v-for="(menu, idx) in $store.state.mainShuju.menuList">
<li class="sub-menu" :class="
$store.state.mainShuju.activeName == menu.id
? 'z-on'
: ''
" v-if="menu.children" :key="menu.id" @click="gotoRouteHandle(menu.id, idx)">
<li class="sub-menu" :class="$store.state.mainShuju.activeName == menu.id ? 'z-on' : ''" v-if="menu.children" :key="menu.id" @click="gotoRouteHandle(menu.id, idx)">
<span>{{ menu.name }}</span>
<div class="sub-menu-list">
<div :class="
$store.state.mainShuju.activeName ==
subMenu.id
? 'z-on'
: ''
" :key="subMenu.id" @click="
gotoRouteHandle(subMenu.id, subIndex)
" v-for="(subMenu, subIndex) in menu.children">
<div :class="$store.state.mainShuju.activeName == subMenu.id ? 'z-on' : ''" :key="subMenu.id" @click="gotoRouteHandle(subMenu.id, subIndex)" v-for="(subMenu, subIndex) in menu.children">
{{ subMenu.name }}
</div>
</div>
</li>
<el-menu-item v-else :key="menu.id" :menu="menu" :index="menu.id"
@click="gotoRouteHandle(menu.id, idx)">
<el-menu-item v-else :key="menu.id" :menu="menu" :index="menu.id" @click="gotoRouteHandle(menu.id, idx)">
<span>{{ menu.name }}</span>
</el-menu-item>
</template>
@ -143,8 +126,7 @@
<i class="el-icon-arrow-down"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="updatePasswordHandle()">{{ $t("updatePassword.title")
}}</el-dropdown-item>
<el-dropdown-item @click.native="updatePasswordHandle()">{{ $t("updatePassword.title") }}</el-dropdown-item>
<el-dropdown-item @click.native="logoutHandle()">{{ $t("logout") }}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
@ -157,16 +139,12 @@
</div>
</template>
<script>
import {
messages
} from "@/i18n";
import UpdatePasswordWork from "@/views/main-navbar-update-password-work";
import dateFormat from "dai-js/tools/dateFormat";
import nextTick from "dai-js/tools/nextTick";
import {
requestGet
} from "@/js/dai/request";
export default {
import { messages } from "@/i18n";
import UpdatePasswordWork from "@/views/main-navbar-update-password-work";
import dateFormat from "dai-js/tools/dateFormat";
import nextTick from "dai-js/tools/nextTick";
import { requestGet } from "@/js/dai/request";
export default {
inject: ["refresh"],
data() {
return {
@ -193,8 +171,7 @@
if ("04c0d396e298f13e57aa5904a657eaa6" != customerId && "3fdd0380deff5b30f45376cdf995d1c1" != customerId) {
for (let index in siteconfigElement) {
if (siteconfigElement[index].id == "6") {
let newMenuArr = siteconfigElement[index].children.filter(
(item) => item.id !== "duoyuanfuwufenxi");
let newMenuArr = siteconfigElement[index].children.filter((item) => item.id !== "duoyuanfuwufenxi");
siteconfigElement[index].children = newMenuArr;
}
}
@ -213,12 +190,12 @@
computeCurrentTime() {
let now = new Date();
let wk = now.getDay();
this.showWeek = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六", ][wk];
this.showWeek = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"][wk];
this.showTime = dateFormat(now, "yyyy-MM-dd hh:mm:ss");
},
toPage(path) {
this.$router.push({
path
path,
});
},
toIndexPage() {
@ -226,11 +203,10 @@
},
// menuId()
gotoRouteHandle(menuId, idx) {
var route = window.SITE_CONFIG["dynamicMenuRoutesShuju"].filter(
(item) => item.meta.menuId === menuId)[0];
var route = window.SITE_CONFIG["dynamicMenuRoutesShuju"].filter((item) => item.meta.menuId === menuId)[0];
if (route) {
this.$router.push({
name: route.name
name: route.name,
});
this.$store.state.mainShuju.activeName = menuId;
}
@ -240,11 +216,7 @@
},
async getWeatherData() {
const url = "https://restapi.amap.com/v3/weather/weatherInfo?key=8c87678f34ce9e8e23245c5161991c4e";
const {
data,
code,
msg
} = await requestGet(url, {
const { data, code, msg } = await requestGet(url, {
city: this.$store.state.user.areaCode,
});
if (code === 0) {
@ -255,6 +227,6 @@
}
},
},
};
};
</script>
<style lang="scss" src="@/assets/scss/dataBoardMain.scss" scoped></style>

14194
yarn.lock

File diff suppressed because it is too large
Loading…
Cancel
Save