Browse Source

新增文件提交

feature
宋桢 2 years ago
parent
commit
6638ce7059
  1. 252
      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. 84
      src/views/dataBoardMain/main-navbar.vue
  7. 14194
      yarn.lock

252
src/router/index.js

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

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

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

14194
yarn.lock

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