fix: BUG修改

This commit is contained in:
kun 2024-04-08 14:08:44 +08:00
parent c07d10fef8
commit 285cb814b8
6 changed files with 408 additions and 185 deletions

View File

@ -2,22 +2,48 @@
<!-- v-if="headerShow" --> <!-- v-if="headerShow" -->
<div class="title"> <div class="title">
<div class="title_l flex"> <div class="title_l flex">
<img v-if="systemInfo.platformLogo" :src="systemInfo.platformLogo" class="logo" height="25" /> <img
<img v-else-if="LOGO_white" :src="'./img/logo/' + LOGO_white + '.png'" class="logo" height="25" /> v-if="systemInfo.platformLogo"
:src="systemInfo.platformLogo"
class="logo"
height="25"
/>
<img
v-else-if="LOGO_white"
:src="'./img/logo/' + LOGO_white + '.png'"
class="logo"
height="25"
/>
<!-- <span v-if="$route.path.indexOf('/firm/')!=-1">{{headerName}}</span> --> <!-- <span v-if="$route.path.indexOf('/firm/')!=-1">{{headerName}}</span> -->
<!-- 南昌头部样式 --> <!-- 南昌头部样式 -->
<span class="canClick" v-if="company == 'nanchang'" @click="changeArea(-1)">{{ titleName }}</span> <span
<span class="canClick" v-if="$route.path.indexOf('/firm/') == -1 && company == 'nanchang'" @click="changeArea(-1)">{{ class="canClick"
titleName ? '' : headerName v-if="company == 'nanchang'"
}}</span> @click="changeArea(-1)"
>{{ titleName }}</span
>
<span
class="canClick"
v-if="$route.path.indexOf('/firm/') == -1 && company == 'nanchang'"
@click="changeArea(-1)"
>{{ titleName ? "" : headerName }}</span
>
<!-- 以上南昌头部样式 --> <!-- 以上南昌头部样式 -->
<span class="canClick" v-if="$route.path.indexOf('/firm/') != -1 && company != 'nanchang'" @click="changeArea(-1)">{{ <span
systemInfo.platformName class="canClick"
}}</span> v-if="$route.path.indexOf('/firm/') != -1 && company != 'nanchang'"
<span class="canClick" v-if="$route.path.indexOf('/firm/') == -1 && company != 'nanchang'" @click="changeArea(-1)">{{ @click="changeArea(-1)"
titleName ? systemInfo.platformName + ' - ' + titleName : headerName >{{ systemInfo.platformName }}</span
}}</span> >
<span
class="canClick"
v-if="$route.path.indexOf('/firm/') == -1 && company != 'nanchang'"
@click="changeArea(-1)"
>{{
titleName ? systemInfo.platformName + " - " + titleName : headerName
}}</span
>
<span <span
class="canClick" class="canClick"
v-show="$route.path.indexOf('/firm/') != -1 && company != 'nanchang'" v-show="$route.path.indexOf('/firm/') != -1 && company != 'nanchang'"
@ -27,15 +53,20 @@
>>{{ item.name }}</span >>{{ item.name }}</span
> >
</div> </div>
<div class="title_near flex"> <div class="title_near flex" v-if="$store.state.userInfo.accountType != 11">
<userChange></userChange> <userChange></userChange>
</div> </div>
<div class="title_near-tow flex"> <div class="title_near-tow flex">
<div class="divider-line"></div> <div class="divider-line"></div>
<centerChange></centerChange> <centerChange></centerChange>
</div> </div>
<div class="headerRight"> <div class="headerRight">
<el-popover placement="bottom" width="200" v-show="showQrCode && $store.state.userInfo.inputQrCode == 0" trigger="click"> <el-popover
placement="bottom"
width="200"
v-show="showQrCode && $store.state.userInfo.inputQrCode == 0"
trigger="click"
>
<div id="qrCode" ref="qrCodeDiv"></div> <div id="qrCode" ref="qrCodeDiv"></div>
<el-button slot="reference" type="text" style="color: #fff; padding: 0" <el-button slot="reference" type="text" style="color: #fff; padding: 0"
>人员录入二维码 <i class="el-icon-arrow-down"></i >人员录入二维码 <i class="el-icon-arrow-down"></i
@ -55,7 +86,11 @@
</div> </div>
</div> </div>
<p <p
v-show="$route.path.indexOf('firm/') != -1 && $store.state.userInfo.companyBigScreen == 0 && company == 'longguang'" v-show="
$route.path.indexOf('firm/') != -1 &&
$store.state.userInfo.companyBigScreen == 0 &&
company == 'longguang'
"
class="header-btn" class="header-btn"
@click="toOverview4()" @click="toOverview4()"
> >
@ -84,12 +119,22 @@
企业大屏 企业大屏
</p> </p>
<!-- 横琴大屏使用龙光大屏样式 --> <!-- 横琴大屏使用龙光大屏样式 -->
<p v-show="$route.path.indexOf('firm/') != -1 && $store.state.userInfo.companyBigScreen == 0" class="header-btn" @click="toOverview4()"> <p
v-show="
$route.path.indexOf('firm/') != -1 &&
$store.state.userInfo.companyBigScreen == 0
"
class="header-btn"
@click="toOverview4()"
>
<img src="@/assets/images/icon-bigData.png" alt srcset /> <img src="@/assets/images/icon-bigData.png" alt srcset />
综合监管大屏 综合监管大屏
</p> </p>
<p <p
v-show="$route.path.indexOf('projectIndex') != -1 && $store.state.userInfo.projectKanban == 0" v-show="
$route.path.indexOf('projectIndex') != -1 &&
$store.state.userInfo.projectKanban == 0
"
class="header-btn" class="header-btn"
@click="toOverview2()" @click="toOverview2()"
> >
@ -121,7 +166,10 @@
塔吊可视大屏 塔吊可视大屏
</p> --> </p> -->
<message @sendMsg="sendMessage"></message> <message @sendMsg="sendMessage"></message>
<div class="title_r" v-if="showR && $route.path.indexOf('/equipmentCenter/') == -1"> <div
class="title_r"
v-if="showR && $route.path.indexOf('/equipmentCenter/') == -1"
>
<!-- <changeTheme></changeTheme> --> <!-- <changeTheme></changeTheme> -->
<!-- <language></language> --> <!-- <language></language> -->
<account v-if="!uid"></account> <account v-if="!uid"></account>
@ -130,137 +178,153 @@
</div> </div>
</template> </template>
<script> <script>
import bus from '@/util/eventBus.js' import bus from "@/util/eventBus.js";
import language from './language' import language from "./language";
import account from './account' import account from "./account";
import changeTheme from './changeTheme' import changeTheme from "./changeTheme";
import message from './message' import message from "./message";
import QRCode from 'qrcodejs2' import QRCode from "qrcodejs2";
import userChange from "@/components/userChange.vue"; import userChange from "@/components/userChange.vue";
import centerChange from "@/components/centerChange.vue"; import centerChange from "@/components/centerChange.vue";
import { getProjectDetail } from '@/assets/js/api/baseInfo.js' import { getProjectDetail } from "@/assets/js/api/baseInfo.js";
export default { export default {
props: ['titleName', 'showR'], props: ["titleName", "showR"],
data() { data() {
return { return {
getNewBigScreen: null, getNewBigScreen: null,
newBigScreen: null, newBigScreen: null,
headerShow, headerShow,
LOGO_white: LOGO_white, LOGO_white: LOGO_white,
headerName: '', headerName: "",
isShowAudio: false, isShowAudio: false,
loginData: {}, loginData: {},
systemInfo: { systemInfo: {
loginBackgroundImage: '', loginBackgroundImage: "",
loginLogo: '', loginLogo: "",
platformLogo: '', platformLogo: "",
platformName: '智慧工地云平台' platformName: "智慧工地云平台",
}, },
showQrCode: false, showQrCode: false,
uid: this.$store.state.uid, // true 退 uid: this.$store.state.uid, // true 退
company: '', company: "",
mp3Url: '', mp3Url: "",
isLoop: true, isLoop: true,
timer: null, timer: null,
jumpToken: '' jumpToken: "",
} };
},
components: {
language,
account,
changeTheme,
message,
userChange,
centerChange,
}, },
components: { language, account, changeTheme, message, userChange, centerChange },
watch: { watch: {
$route: { $route: {
handler(newVal) { handler(newVal) {
if (newVal.path == '/project/labor/personManage') { if (newVal.path == "/project/labor/personManage") {
this.showQrCode = true this.showQrCode = true;
this.bindQRCode() this.bindQRCode();
} else { } else {
this.showQrCode = false this.showQrCode = false;
} }
} },
}, },
newBigScreen(newVal) { newBigScreen(newVal) {
this.newBigScreen = newVal this.newBigScreen = newVal;
} },
}, },
beforeDestroy() { beforeDestroy() {
this.newBigScreen = null this.newBigScreen = null;
console.log('当前数据看板地址', this.newBigScreen) console.log("当前数据看板地址", this.newBigScreen);
}, },
created() { created() {
this.company = COMPANY this.company = COMPANY;
console.log('this.company', this.company) console.log("this.company", this.company);
console.log('COMPANY', COMPANY) console.log("COMPANY", COMPANY);
if (this.$store.state.projectSn) { if (this.$store.state.projectSn) {
this.getProjectDetail() this.getProjectDetail();
} }
this.loginData = JSON.parse(localStorage.getItem('systemInfo')) this.loginData = JSON.parse(localStorage.getItem("systemInfo"));
// console.log('',this.loginData)\ // console.log('',this.loginData)\
}, },
mounted() { mounted() {
if (localStorage.getItem('systemInfo')) { if (localStorage.getItem("systemInfo")) {
this.systemInfo = JSON.parse(localStorage.getItem('systemInfo')) this.systemInfo = JSON.parse(localStorage.getItem("systemInfo"));
} }
console.log('进入页面显示的企业头部名称', this.systemInfo) console.log("进入页面显示的企业头部名称", this.systemInfo);
this.headerName = this.systemInfo.platformName this.headerName = this.systemInfo.platformName;
if (this.$route.path.indexOf('equipmentCenter/') != -1) { if (this.$route.path.indexOf("equipmentCenter/") != -1) {
this.headerName += ' - 设备中台' this.headerName += " - 设备中台";
} }
if (this.$store.state.currentProDetail) { if (this.$store.state.currentProDetail) {
this.headerName += ' - ' + this.$store.state.currentProDetail.projectName this.headerName += " - " + this.$store.state.currentProDetail.projectName;
} }
if (this.$store.state.currentMoudle) { if (this.$store.state.currentMoudle) {
this.headerName += ' - ' + this.$store.state.currentMoudle.moduleName this.headerName += " - " + this.$store.state.currentMoudle.moduleName;
if (COMPANY == 'nanchang') { if (COMPANY == "nanchang") {
this.headerName = this.$store.state.currentMoudle.moduleName this.headerName = this.$store.state.currentMoudle.moduleName;
} }
} }
if (this.$route.path == '/project/labor/personManage') { if (this.$route.path == "/project/labor/personManage") {
this.showQrCode = true this.showQrCode = true;
this.bindQRCode() this.bindQRCode();
} else { } else {
this.showQrCode = false this.showQrCode = false;
} }
}, },
methods: { methods: {
//() //()
closeAudio() { closeAudio() {
this.isShowAudio = false this.isShowAudio = false;
}, },
sendMessage(val) { sendMessage(val) {
this.isShowAudio = false this.isShowAudio = false;
console.log(val, this.isShowAudio) console.log(val, this.isShowAudio);
// let url = "https://dss2.bdstatic.com/6Ot1bjeh1BF3odCf/it/u=2746545937,1203007354&fm=218&app=92&f=PNG?w=121&h=75&s=B59079335D03484B4CD997F10300C027" // let url = "https://dss2.bdstatic.com/6Ot1bjeh1BF3odCf/it/u=2746545937,1203007354&fm=218&app=92&f=PNG?w=121&h=75&s=B59079335D03484B4CD997F10300C027"
if (this.$store.state.userInfo.accountType == 5 || this.$store.state.userInfo.accountType == 6) { if (
console.log(localStorage.getItem('soundList')) this.$store.state.userInfo.accountType == 5 ||
if (localStorage.getItem('soundList')) { this.$store.state.userInfo.accountType == 6
let arr = JSON.parse(localStorage.getItem('soundList')) ) {
arr.forEach(item => { console.log(localStorage.getItem("soundList"));
if (item.type == val.type && val.type != '8') { if (localStorage.getItem("soundList")) {
console.log(1, item) let arr = JSON.parse(localStorage.getItem("soundList"));
clearTimeout(this.timer) arr.forEach((item) => {
this.mp3Url = this.$store.state.FILEURL + item.fileUrl if (item.type == val.type && val.type != "8") {
this.isLoop = item.playType == 2 ? true : false console.log(1, item);
let _this = this clearTimeout(this.timer);
this.mp3Url = this.$store.state.FILEURL + item.fileUrl;
this.isLoop = item.playType == 2 ? true : false;
let _this = this;
this.timer = setTimeout(() => { this.timer = setTimeout(() => {
_this.isShowAudio = true _this.isShowAudio = true;
}, 500) }, 500);
} }
if (item.type == val.type && val.type == '8' && (val.itemType == '0' || val.itemType == '1' || val.itemType == '2')) { if (
console.log(2, item) item.type == val.type &&
clearTimeout(this.timer) val.type == "8" &&
this.mp3Url = this.$store.state.FILEURL + item.fileUrl (val.itemType == "0" ||
this.isLoop = item.playType == 2 ? true : false val.itemType == "1" ||
let _this = this val.itemType == "2")
) {
console.log(2, item);
clearTimeout(this.timer);
this.mp3Url = this.$store.state.FILEURL + item.fileUrl;
this.isLoop = item.playType == 2 ? true : false;
let _this = this;
this.timer = setTimeout(() => { this.timer = setTimeout(() => {
_this.isShowAudio = true _this.isShowAudio = true;
}, 500) }, 500);
console.log(this.isShowAudio) console.log(this.isShowAudio);
console.log(this.mp3Url) console.log(this.mp3Url);
} }
}) });
} }
} }
// this.$notify({ // this.$notify({
@ -271,111 +335,129 @@ export default {
}, },
// //
bindQRCode: function() { bindQRCode: function() {
console.log('人员录入二维码') console.log("人员录入二维码");
document.getElementById('qrCode').innerHTML = '' document.getElementById("qrCode").innerHTML = "";
let httpUrl = window.location.origin let httpUrl = window.location.origin;
let userId = this.$store.state.userInfo.userId let userId = this.$store.state.userInfo.userId;
let projectSn = this.$store.state.projectSn let projectSn = this.$store.state.projectSn;
new QRCode(this.$refs.qrCodeDiv, { new QRCode(this.$refs.qrCodeDiv, {
text: httpUrl + '/doc/h5/index.html?userId=' + userId + '&projectSn=' + projectSn, text:
httpUrl +
"/doc/h5/index.html?userId=" +
userId +
"&projectSn=" +
projectSn,
width: 200, width: 200,
height: 200, height: 200,
colorDark: '#333333', // colorDark: "#333333", //
colorLight: '#ffffff', // colorLight: "#ffffff", //
correctLevel: QRCode.CorrectLevel.L //L/M/H correctLevel: QRCode.CorrectLevel.L, //L/M/H
}) });
}, },
changeArea(index) { changeArea(index) {
var accountType = this.$store.state.userInfo.accountType var accountType = this.$store.state.userInfo.accountType;
bus.$emit('headerAeraSn') bus.$emit("headerAeraSn");
if (this.$route.path.indexOf('/firm/') != -1) { if (this.$route.path.indexOf("/firm/") != -1) {
if ((accountType != 2 && index == -1) || (accountType > 3 && index == 0) || (accountType == 7 && index < 2)) { if (
return false (accountType != 2 && index == -1) ||
(accountType > 3 && index == 0) ||
(accountType == 7 && index < 2)
) {
return false;
} }
if (index == -1) { if (index == -1) {
this.$store.commit('setMapBackArr', []) this.$store.commit("setMapBackArr", []);
} else { } else {
var arr = this.$store.state.mapBackArr var arr = this.$store.state.mapBackArr;
arr = arr.splice(0, index + 1) arr = arr.splice(0, index + 1);
this.$store.commit('setMapBackArr', arr) this.$store.commit("setMapBackArr", arr);
} }
} else if (window.location.href.indexOf('equipmentCenter.html') != -1) { } else if (window.location.href.indexOf("equipmentCenter.html") != -1) {
console.log(window.location.href) console.log(window.location.href);
if (COMPANY == 'nanchang') { if (COMPANY == "nanchang") {
window.open('/index.html#/firm/projectManage', '_self') window.open("/index.html#/firm/projectManage", "_self");
} else { } else {
window.open('/#/firm/projectManage', '_self') window.open("/#/firm/projectManage", "_self");
} }
} else { } else {
// //
if (accountType != 2 && index == -1 && accountType != 7 && accountType != 3 && accountType != 4) { if (
return false accountType != 2 &&
index == -1 &&
accountType != 7 &&
accountType != 3 &&
accountType != 4
) {
return false;
} }
this.$store.commit('setIsShowBackIndex', false) this.$store.commit("setIsShowBackIndex", false);
this.$store.commit('setMenuList', this.$store.state.projectManageMenuList) this.$store.commit(
"setMenuList",
this.$store.state.projectManageMenuList
);
let routeUrl = this.$router.resolve({ let routeUrl = this.$router.resolve({
path: '/firm/projectManage' path: "/firm/projectManage",
}) });
window.open(routeUrl.href, '_self') window.open(routeUrl.href, "_self");
// //
location.reload() location.reload();
} }
}, },
//绿 //绿
toOverview(url) { toOverview(url) {
let routeUrl = this.$router.resolve({ let routeUrl = this.$router.resolve({
path: url path: url,
}) });
if (COMPANY != 'longguang' && url != '/project/bigSiteVisualization') { if (COMPANY != "longguang" && url != "/project/bigSiteVisualization") {
window.open(routeUrl.href, '_blank') window.open(routeUrl.href, "_blank");
} else if (COMPANY == 'jlw') { } else if (COMPANY == "jlw") {
window.open(this.$router.resolve(routeUrl).href, '_blank') window.open(this.$router.resolve(routeUrl).href, "_blank");
} else { } else {
window.location.href = routeUrl.href + '?COMPANY=' + COMPANY window.location.href = routeUrl.href + "?COMPANY=" + COMPANY;
// window.open('#/project/dataBoard/environment?COMPANY=' + COMPANY, "_blank"); // window.open('#/project/dataBoard/environment?COMPANY=' + COMPANY, "_blank");
} }
}, },
getProjectDetail() { getProjectDetail() {
let data = { let data = {
projectSn: this.$store.state.projectSn projectSn: this.$store.state.projectSn,
} };
getProjectDetail(data).then(res => { getProjectDetail(data).then((res) => {
if (res.result) { if (res.result) {
this.getNewBigScreen = res.result.newBigScreen this.getNewBigScreen = res.result.newBigScreen;
console.log('接口获取数据看板地址', this.getNewBigScreen) console.log("接口获取数据看板地址", this.getNewBigScreen);
} }
}) });
}, },
toOverview2() { toOverview2() {
this.$forceUpdate() this.$forceUpdate();
this.newBigScreen = this.getNewBigScreen this.newBigScreen = this.getNewBigScreen;
if (this.newBigScreen == null || this.newBigScreen == "") { if (this.newBigScreen == null || this.newBigScreen == "") {
//-------------------- //--------------------
// //
let arr = this.$store.state.userInfo.menuAuthority.moduleList let arr = this.$store.state.userInfo.menuAuthority.moduleList;
let arr2 = [] let arr2 = [];
arr.forEach(element => { arr.forEach((element) => {
if (element.moduleType == 4) { if (element.moduleType == 4) {
arr2.push(element) arr2.push(element);
return return;
} }
}) });
// 访 // 访
if (!arr2.length) { if (!arr2.length) {
return this.$message.warning('暂无权限') return this.$message.warning("暂无权限");
} }
let routeUrl = this.$router.resolve({ let routeUrl = this.$router.resolve({
path: arr2[0].modulePath path: arr2[0].modulePath,
}) });
window.location.href = routeUrl.href window.location.href = routeUrl.href;
window._paq.push(['trackEvent', '点击', '数据看板', '进入数据看板']) window._paq.push(["trackEvent", "点击", "数据看板", "进入数据看板"]);
} else { } else {
console.log('当前跳转链接', this.newBigScreen) console.log("当前跳转链接", this.newBigScreen);
//-------------------- //--------------------
this.jumpToken = localStorage.getItem('jumpToken') this.jumpToken = localStorage.getItem("jumpToken");
window.open(this.newBigScreen + '?token=' + this.jumpToken, '_self') window.open(this.newBigScreen + "?token=" + this.jumpToken, "_self");
// window.open('http://192.168.34.226:8081/#/large?token=' + this.jumpToken, "_self")//token // window.open('http://192.168.34.226:8081/#/large?token=' + this.jumpToken, "_self")//token
} }
// if (this.newBigScreen != null) { // if (this.newBigScreen != null) {
@ -441,21 +523,21 @@ export default {
// } // }
}, },
toOverview3() { toOverview3() {
if (COMPANY == 'shenbai') { if (COMPANY == "shenbai") {
let routeUrl = this.$router.resolve({ let routeUrl = this.$router.resolve({
path: '/companyAdmin/shenbaiBigScreen' path: "/companyAdmin/shenbaiBigScreen",
}) });
// window.open(routeUrl.href, "_blank"); // window.open(routeUrl.href, "_blank");
} else if (COMPANY == 'henan') { } else if (COMPANY == "henan") {
let routeUrl = this.$router.resolve({ let routeUrl = this.$router.resolve({
path: '/companyAdmin/heNanBigScreen' path: "/companyAdmin/heNanBigScreen",
}) });
window.open(routeUrl.href, '_blank') window.open(routeUrl.href, "_blank");
} else { } else {
let routeUrl = this.$router.resolve({ let routeUrl = this.$router.resolve({
path: '/companyAdmin/bigScreen' path: "/companyAdmin/bigScreen",
}) });
window.open(routeUrl.href, '_blank') window.open(routeUrl.href, "_blank");
} }
}, },
// //
@ -466,24 +548,24 @@ export default {
// }); // });
// 3.0 // 3.0
let routeUrl = this.$router.resolve({ let routeUrl = this.$router.resolve({
path: '/companyAdmin/longguangBigScreen2' path: "/companyAdmin/longguangBigScreen2",
}) });
// let routeUrl = this.$router.resolve({ // let routeUrl = this.$router.resolve({
// path: "/companyAdmin/heNanBigScreen", // path: "/companyAdmin/heNanBigScreen",
// }); // });
window.open(routeUrl.href, '_self') window.open(routeUrl.href, "_self");
window._paq.push(['trackEvent', '点击', '龙光企业大屏', '进入企业大屏']) window._paq.push(["trackEvent", "点击", "龙光企业大屏", "进入企业大屏"]);
}, },
toOverview5(val) { toOverview5(val) {
let routeUrl = this.$router.resolve({ let routeUrl = this.$router.resolve({
path: val path: val,
}) });
// window.open(routeUrl.href, "_blank"); // window.open(routeUrl.href, "_blank");
window.location.href = routeUrl.href window.location.href = routeUrl.href;
} },
} },
} };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.flex { .flex {
@ -501,7 +583,7 @@ export default {
height: 61px; height: 61px;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: flex-end justify-content: flex-end;
} }
.title_l { .title_l {
font-family: PingFangSC-Semibold; font-family: PingFangSC-Semibold;
@ -513,14 +595,14 @@ export default {
margin-right: 14px; margin-right: 14px;
} }
} }
.title_near{ .title_near {
margin-right: 50px; margin-right: 50px;
} }
.title_near-tow{ .title_near-tow {
.divider-line{ .divider-line {
width: 1px; width: 1px;
height: 16px; height: 16px;
background: #FFFFFF; background: #ffffff;
margin-right: 50px; margin-right: 50px;
} }
} }
@ -552,7 +634,7 @@ p {
.headerRight { .headerRight {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
margin-left: auto margin-left: auto;
} }
.canClick { .canClick {
cursor: pointer; cursor: pointer;

View File

@ -90,6 +90,7 @@ export default {
methods: { methods: {
// //
selectProject(obj) { selectProject(obj) {
if(!obj.list) return;
if (obj.list && obj.list.length > 0) { if (obj.list && obj.list.length > 0) {
obj.list.map((item) => { obj.list.map((item) => {
this.selectProject(item); this.selectProject(item);
@ -113,6 +114,7 @@ export default {
// //
getGroupTreeData() { getGroupTreeData() {
this.groupListData = this.$store.state.groupTreeList; this.groupListData = this.$store.state.groupTreeList;
if(!this.groupListData) return;
this.isUserList = false; this.isUserList = false;
let findItem = this.groupListData.find( let findItem = this.groupListData.find(
(item) => item.sn == this.$store.state.selectedGroupSn (item) => item.sn == this.$store.state.selectedGroupSn

View File

@ -334,6 +334,7 @@ router.beforeEach((to, form, next) => {
next() next()
} else if ( } else if (
!store.state.userInfo && !store.state.userInfo &&
to.path != '/resetPassword' &&
to.path != '/login' && to.path != '/login' &&
to.path != '/' && to.path != '/' &&
to.path != '/sign' && to.path != '/sign' &&

View File

@ -605,6 +605,7 @@ export default {
}, },
// //
goReset(){ goReset(){
console.log(666)
this.$router.push({ path: "/resetPassword" }); this.$router.push({ path: "/resetPassword" });
}, },
// //

View File

@ -0,0 +1,137 @@
<template>
<div class="reportForm">
<div class="left">
<div class="menu-list">
<div
class="menu-item"
:class="{ 'active-menu': activeNav == 1 }"
@click="checkNav(1)"
>
<!-- 实时数据 -->
{{ $t("message.unload.realData") }}
</div>
</div>
</div>
<div class="right">
<div class="reportTable">
</div>
</div>
</div>
</template>
<script>
export default {
name: "reportForm",
data() {
return {
activeNav: 1
};
},
methods: {
checkNav(val) {
this.activeNav = val;
},
},
};
</script>
<style lang="less" scoped>
.reportForm {
width: 100%;
height: 100%;
.left {
float: left;
width: 188px;
margin-right: 0;
padding-top: 28px;
box-sizing: border-box;
height: 100%;
background: #fff;
.menu-list {
.menu-item {
color: #7c829e;
padding-left: 28px;
width: 100%;
height: 30px;
box-sizing: border-box;
line-height: 30px;
margin-bottom: 10px;
cursor: pointer;
position: relative;
}
.menu-item:hover {
background: rgba(78, 124, 255, 0.1);
color: #4e7cff;
}
.active-menu {
background: rgba(78, 124, 255, 0.25) !important;
color: #4e7cff;
}
.active-menu::before {
content: "";
width: 3px;
height: 100%;
position: absolute;
top: 0;
left: 0;
background: #4e7cff;
}
}
}
.right {
float: right;
width: calc(100% - 208px);
height: 100%;
margin-left: 20px;
}
}
.reportTable {
width: 100%;
height: 100%;
.left {
float: left;
width: 188px;
margin-right: 0;
padding-top: 28px;
box-sizing: border-box;
height: 100%;
background: #fff;
.menu-list {
.menu-item {
color: #7c829e;
padding-left: 28px;
width: 100%;
height: 30px;
box-sizing: border-box;
line-height: 30px;
margin-bottom: 10px;
cursor: pointer;
position: relative;
}
.menu-item:hover {
background: rgba(78, 124, 255, 0.1);
color: #4e7cff;
}
.active-menu {
background: rgba(78, 124, 255, 0.25) !important;
color: #4e7cff;
}
.active-menu::before {
content: "";
width: 3px;
height: 100%;
position: absolute;
top: 0;
left: 0;
background: #4e7cff;
}
}
}
.right {
float: right;
width: calc(100% - 208px);
height: 100%;
margin-left: 20px;
}
}
</style>

View File

@ -90,7 +90,7 @@
}; };
getGroupListApi(data).then((res) => { getGroupListApi(data).then((res) => {
// console.log(res); // console.log(res);
if (res.code == 200) { if (res.code == 200 && res.result) {
this.groupListData = res.result; this.groupListData = res.result;
this.$store.commit("setGroupTreeList", res.result); // this.$store.commit("setGroupTreeList", res.result); //
} }