Browse Source

Merge branch 'test' of http://git.elinkit.com.cn:7070/r/epmet-oper-gov into test

shibei_master
jiangyy 3 years ago
parent
commit
d7edc9e7d8
  1. 9
      src/router/index.js
  2. 34
      src/views/main-shuju/main.vue

9
src/router/index.js

@ -334,13 +334,12 @@ router.beforeEach((to, from, next) => {
// url: "visual/basicinfo/basicInfoMain",
children: [
{
url: "https://test-rxs-job.elinkservice.cn/haiqin-ai/aisecurity.html#/monitor-panel",
// url: "/visual/ai/index",
// url: "https://test-rxs-job.elinkservice.cn/haiqin-ai/aisecurity.html#/monitor-panel",
url: "/visual/ai/index",
name: "视频监控",
id: "5feawfwa111111efwa57",
},
/*{
// url: "http://www.baidu.com",
url: "/visual/ai/renliu",
name: "人流数据",
id: "5fwaefwae222112fawef58",
@ -361,8 +360,8 @@ router.beforeEach((to, from, next) => {
id: "fewafwafewaefddd",
},*/
{
// url: "/visual/ai/yujing",
url: "https://test-rxs-job.elinkservice.cn/haiqin-ai/aisecurity.html#/data-analysis",
url: "/visual/ai/yujing",
// url: "https://test-rxs-job.elinkservice.cn/haiqin-ai/aisecurity.html#/data-analysis",
name: "预警分析",
id: "545345fdsfs",
},

34
src/views/main-shuju/main.vue

@ -1,18 +1,22 @@
<template>
<div v-loading.fullscreen.lock="loading"
:element-loading-text="$t('loading')"
:class="[
<div
v-loading.fullscreen.lock="loading"
:element-loading-text="$t('loading')"
:class="[
'g-bd',
{ 'z-sidebar--fold': $store.state.sidebarFold },
{
'z-sidebar--noside': true,
},
]">
]"
>
<template v-if="!loading">
<main-navbar ref="ref_navbar" />
<div class="g-cnt">
<main-content v-if="!$store.state.contentIsNeedRefresh"
@changeCustomerName="changeCustomerName" />
<main-content
v-if="!$store.state.contentIsNeedRefresh"
@changeCustomerName="changeCustomerName"
/>
</div>
</template>
</div>
@ -27,10 +31,10 @@ import nextTick from "dai-js/tools/nextTick";
import { requestPost } from "@/js/dai/request";
export default {
provide () {
provide() {
return {
//
refresh () {
refresh() {
this.$store.state.contentIsNeedRefresh = true;
this.$nextTick(() => {
this.$store.state.contentIsNeedRefresh = false;
@ -38,7 +42,7 @@ export default {
},
};
},
data () {
data() {
return {
loading: true,
userType: localStorage.getItem("userType"),
@ -52,7 +56,7 @@ export default {
watch: {
$route: "routeHandle",
},
async created () {
async created() {
this.windowResizeHandle();
this.routeHandle(this.$route);
Promise.all([this.getWorkUserInfo()]).then(() => {
@ -61,11 +65,11 @@ export default {
},
computed: {},
methods: {
changeCustomerName (customerName) {
changeCustomerName(customerName) {
this.$refs["ref_navbar"].changeCustomerName(customerName);
},
//
windowResizeHandle () {
windowResizeHandle() {
this.$store.state.sidebarFold =
document.documentElement["clientWidth"] <= 992 || false;
window.addEventListener(
@ -77,8 +81,10 @@ export default {
);
},
// ,
routeHandle (route) {
routeHandle(route) {
if (!route.meta.isTab) {
this.$store.state.mainShuju.activeName = "";
this.$store.state.mainShuju.contentTabsActiveName = "";
return false;
}
var tab = this.$store.state.contentTabs.filter(
@ -101,7 +107,7 @@ export default {
},
//
async getWorkUserInfo () {
async getWorkUserInfo() {
const url = "/epmetuser/customerstaff/staffbasicinfo";
let params = {};
const { data, code, msg } = await requestPost(url, params);

Loading…
Cancel
Save