项目后台设备中台企业前台企业后台切换 骆乐
This commit is contained in:
parent
06659d6804
commit
c51e0d347e
@ -30,6 +30,7 @@ function getLang() {
|
||||
}
|
||||
// 环境的切换
|
||||
if (process.env.NODE_ENV == 'development') {
|
||||
// axios.defaults.baseURL = 'http://8.142.139.165:7080' // 湖里区
|
||||
// axios.defaults.baseURL = 'http://124.71.87.250/'
|
||||
// axios.defaults.baseURL = 'http://139.9.66.234:30/'
|
||||
// axios.defaults.baseURL = 'http://14.29.220.211:6023/'
|
||||
|
||||
@ -25,40 +25,25 @@
|
||||
<img src="@/assets/images/sjzx.png" width="15px" height="15px" />
|
||||
<span>数据中心</span>
|
||||
</div> -->
|
||||
<!-- 项目后台 -->
|
||||
|
||||
<!-- 企业前台 -->
|
||||
<div
|
||||
class="width_100"
|
||||
@click="goProjectBackstage"
|
||||
v-if="
|
||||
$store.state.userInfo.accountType != 5 &&
|
||||
$store.state.userInfo.accountType != 6&&$store.state.userInfo.enterProjectBackType==0
|
||||
"
|
||||
>
|
||||
<img src="@/assets/images/xmht.png" width="15px" height="15px" />
|
||||
<span>{{ $t("message.companyDiagram.projectBackEnd") }}</span>
|
||||
</div>
|
||||
<!-- 设备中台 -->
|
||||
<!-- <div
|
||||
class="width_100"
|
||||
@click="goDevcenter"
|
||||
v-if="messageB = 1"
|
||||
>
|
||||
<img src="@/assets/images/xmht.png" width="15px" height="15px" />
|
||||
<span>{{ $t("message.companyDiagram.devCenter") }}</span>
|
||||
</div> -->
|
||||
<!-- 企业前台 -->
|
||||
<!-- <div
|
||||
class="width_100"
|
||||
@click="goProjectBackstage"
|
||||
@click="goto5()"
|
||||
v-if="($route.path.indexOf('/firm/projectManage') == -1 &&
|
||||
$store.state.userInfo.accountType != 5 &&
|
||||
$store.state.userInfo.accountType != 6
|
||||
) "
|
||||
>
|
||||
<img src="@/assets/images/xmht.png" width="15px" height="15px" />
|
||||
<span>企业前台</span>
|
||||
</div> -->
|
||||
</div>
|
||||
<!-- // 企业后台 -->
|
||||
<div
|
||||
class="width_100"
|
||||
@click="goto2"
|
||||
v-if="
|
||||
($route.path.indexOf('/companyAdmin/companyDiagram') == -1) &&
|
||||
$store.state.userInfo.accountType != 5 &&
|
||||
$store.state.userInfo.accountType != 6
|
||||
"
|
||||
@ -67,8 +52,34 @@
|
||||
<!-- <span>{{$t('message.companyDiagram.operatingCenter')}}</span> -->
|
||||
<span>企业后台</span>
|
||||
</div>
|
||||
<!-- // 资料中心 -->
|
||||
<!-- 项目后台 -->
|
||||
<div
|
||||
class="width_100"
|
||||
@click="goProjectBackstage"
|
||||
v-if="
|
||||
( $route.path.indexOf('/projectIndex') == -1 ||
|
||||
$route.path.indexOf('/equipmentCenterIndx') == -1 &&
|
||||
$store.state.userInfo.accountType != 5 &&
|
||||
$store.state.userInfo.accountType != 6&&$store.state.userInfo.enterProjectBackType==0)
|
||||
"
|
||||
>
|
||||
<img src="@/assets/images/xmht.png" width="15px" height="15px" />
|
||||
<span>{{ $t("message.companyDiagram.projectBackEnd") }}</span>
|
||||
</div>
|
||||
<!-- 设备中台 -->
|
||||
<div
|
||||
class="width_100"
|
||||
@click="goDevcenter"
|
||||
v-if="($route.path.indexOf('/equipmentCenterIndx') == -1 ) ||
|
||||
($route.path.indexOf('/equipmentCenterIndx') == -1 ) &&
|
||||
($route.path.indexOf('/projectIndex') == -1 )
|
||||
"
|
||||
>
|
||||
<img src="@/assets/images/xmht.png" width="15px" height="15px" />
|
||||
<span>{{ $t("message.companyDiagram.devCenter") }}</span>
|
||||
</div>
|
||||
|
||||
<!-- <div
|
||||
class="width_100"
|
||||
@click="goto4"
|
||||
v-if="
|
||||
@ -79,7 +90,8 @@
|
||||
>
|
||||
<img src="@/assets/images/sbzt.png" width="15px" height="15px" />
|
||||
<span>{{ $t("message.companyDiagram.devCenter") }}</span>
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- // 资料中心 -->
|
||||
<div class="width_100" @click="goto3">
|
||||
<img src="@/assets/images/zlzx.png" width="15px" height="15px" />
|
||||
<span>{{ $t("message.docManage.fileCenter") }}</span>
|
||||
@ -108,15 +120,13 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
messageB:'',
|
||||
msgB:'',
|
||||
seeEquipment: 1, //是否能查看设备中台,0是,1否
|
||||
};
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.seeEquipment = this.$store.state.userInfo.seeEquipment;
|
||||
this.$EventBus.$on('aMsg',(data)=>{
|
||||
this.messageB = data
|
||||
// console.log('赋值过来的是什么呢',this.messageB)
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
sendMsg2() {
|
||||
@ -186,7 +196,9 @@ export default {
|
||||
goto4() {
|
||||
window.open("/equipmentCenter.html#/equipmentCenterIndx", "_blank");
|
||||
},
|
||||
|
||||
goto5(){
|
||||
window.open("/firm/projectManage#/firm/projectManage", "_self");
|
||||
},
|
||||
loginOut() {
|
||||
this.$store.commit("setUserInfo", null);
|
||||
this.$store.commit("setMapBackArr", []);
|
||||
@ -226,9 +238,9 @@ export default {
|
||||
|
||||
//去项目后台
|
||||
goProjectBackstage() {
|
||||
this.messageB = '1'
|
||||
var url = window.location.href;
|
||||
let routeUrl = '';
|
||||
let type = this.$store.state.userInfo.accountType
|
||||
// 判断当前页面是不是设备中台
|
||||
if (url.indexOf("equipmentCenter.html") != -1) {
|
||||
// 南昌项目打开的是/index.html#/ 的页面
|
||||
@ -237,7 +249,9 @@ export default {
|
||||
}else{
|
||||
window.open("/#/projectList", "_self");
|
||||
}
|
||||
} else {
|
||||
}if( type == 5 || type == 6 || type == 7 ){
|
||||
window.open("/index.html#/projectIndex", "_self");
|
||||
}else {
|
||||
routeUrl = this.$router.resolve({
|
||||
path: "/projectList",
|
||||
});
|
||||
@ -247,25 +261,23 @@ export default {
|
||||
},
|
||||
// 去设备中台
|
||||
goDevcenter(){
|
||||
this.messageB = '2'
|
||||
console.log('改了吗',this.messageB)
|
||||
var url = window.location.href;
|
||||
let routeUrl = '';
|
||||
// 判断当前页面是不是设备中台
|
||||
if (url.indexOf("equipmentCenter.html") != -1) {
|
||||
// 南昌项目打开的是/index.html#/ 的页面
|
||||
if(COMPANY == 'nanchang') {
|
||||
window.open("/index.html#/projectList", "_self");
|
||||
window.open("/index.html#/equipmentCenterIndx", "_self");
|
||||
}else{
|
||||
window.open("/#/projectList", "_self");
|
||||
window.open("/#/equipmentCenterIndx", "_self");
|
||||
}
|
||||
} else {
|
||||
routeUrl = this.$router.resolve({
|
||||
path: "/projectList",
|
||||
path: "/equipmentCenterIndx",
|
||||
});
|
||||
}
|
||||
window.open(routeUrl.href, "_self");
|
||||
window._paq.push(['trackEvent', '点击', '项目后台','进入项目后台' ])
|
||||
window._paq.push(['trackEvent', '点击', '设备中台','进入设备中台' ])
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
@ -379,6 +379,12 @@ const routes2 = [
|
||||
name: '核酸超时人员列表',
|
||||
component: () => import('@/views/projectFront/nucleicAcidOvertimePersonnel/index.vue'),
|
||||
},
|
||||
// 劳务管理--访客管理
|
||||
{
|
||||
path: '/project/labor/visitorsManage',
|
||||
name: '劳务管理_访客管理',
|
||||
component: () => import('@/views/projectFront/laborManage/visitorsManage.vue'),
|
||||
},
|
||||
//人员定位--卡片管理
|
||||
{
|
||||
path: '/project/personnelPosition/cardManage',
|
||||
|
||||
@ -165,8 +165,6 @@ export default {
|
||||
components: { vhead },
|
||||
data() {
|
||||
return {
|
||||
messageA: '1', //进入后台判断条件
|
||||
msg:'1',
|
||||
userInfo: "",
|
||||
searchForm: {
|
||||
firstCompanyId: "",
|
||||
@ -363,16 +361,9 @@ export default {
|
||||
});
|
||||
window.open(routeUrl.href, "_self");
|
||||
window._paq.push(['trackEvent', '点击', '项目后台','进入项目后台' ])
|
||||
//给一个判断条件
|
||||
this.$EventBus.$emit('aMsg',this.messageA)
|
||||
// console.log('点击操作中项目传入为1',this.messageA)
|
||||
sessionStorage.setItem('messageA',this.messageA)
|
||||
},
|
||||
//去设备中台
|
||||
// goToDevCenter(value) {
|
||||
// this.$store.commit("setProjectSn", value.projectSn);
|
||||
// window.open("/equipmentCenter.html#/equipmentCenterIndx", "_self");
|
||||
// window._paq.push(['trackEvent', '点击', '设备中台','进入设备中台' ]);
|
||||
// },
|
||||
goToDevCenter(value) {
|
||||
this.$store.commit("setProjectSn", value.projectSn);
|
||||
let routeUrl = this.$router.resolve({
|
||||
@ -380,9 +371,6 @@ export default {
|
||||
});
|
||||
window.open(routeUrl.href, "_self");
|
||||
window._paq.push(['trackEvent', '点击', '设备中台','进入设备中台' ]);
|
||||
this.messageA = '2'
|
||||
this.$EventBus.$emit('aMsg',this.messageA)
|
||||
// console.log('点击操作中项目传入为2',this.messageA)
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user