调整哈尔滨线路设备管理,判断设备管理显示逻辑

This commit is contained in:
zyy 2020-07-24 14:11:03 +08:00
parent 584f65d285
commit b69cc2c4ab
4 changed files with 25 additions and 12 deletions

View File

@ -2,9 +2,9 @@ export function getBaseUrl() {
let BASE_API;
if (process.env.NODE_ENV === 'development') {
// BASE_API = 'https://joylink.club/jlcloud';
BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
BASE_API = 'http://192.168.3.6:9000'; // 旭强
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
// BASE_API = 'http://b29z135112.zicp.vip';

View File

@ -40,6 +40,7 @@
import { getAllSimulationList, postSimulationConnectById, putSimulationDisconnectById } from '@/api/simulation.js';
import ConstConfig from '@/scripts/ConstConfig';
import { EventBus } from '@/scripts/event-bus';
import { getSessionStorage } from '@/utils/auth';
export default {
name: 'Equipment',
@ -63,7 +64,12 @@ export default {
StationStand: '站台'
}
};
},
},
computed: {
project() {
return getSessionStorage('project');
}
},
mounted() {
EventBus.$on('selectDevice', (data) => {
this.selected = data;
@ -85,20 +91,26 @@ export default {
async getList() {
try {
const res = await getAllSimulationList(this.group);
this.tableData = [].concat(res.data);
this.tableData.forEach((item, index) => {
this.tableData = [];
res.data.forEach((item, index) => {
if (item.type == 'PLC_GATEWAY') {
this.plcInfo = {
name: 'PLC网关',
status: item.online
};
this.tableData.splice(index, 1);
} else {
item.buttonShowType = false;
item.typeName = this.typeList.find(el => el.value == item.type).label;
if (item.vrDeviceCode) {
item.vrDeviceName = this.$store.getters['map/getDeviceByCode'](item.vrDeviceCode).name;
}
}
if (this.project == 'heb' || this.project == 'designheb') {
if (item.type == 'SWITCH') {
this.tableData.push(item);
}
} else {
this.tableData.push(item);
}
}
});
} catch (error) {

View File

@ -5,8 +5,6 @@
<map-system-draft ref="mapCanvas" @back="back" />
</transition>
<status-icon v-if="$route.query.lineCode == '11' || $route.query.lineCode == '10'" ref="statusIcon" />
<!-- :group="group" -->
<!-- :show-station="showStation" -->
<menu-demon
v-if="isDemon"
ref="menuDemon"

View File

@ -3,7 +3,7 @@
<chat-box :group="group" :user-role="userRole" />
<div class="display-draft" :class="{'display-type-hb': $route.query.lineCode == '07' && $store.state.training.prdType=='01'}" :style="{bottom: offsetBottom + 'px'}">
<el-button-group>
<el-button v-if="isAdmin" @click="handleEquipment">设备管理</el-button>
<el-button v-if="isAdmin && isProject" @click="handleEquipment">设备管理</el-button>
<el-button v-if="isAdmin" @click="memberManage">成员管理</el-button>
<el-button v-if="isAdmin && !noQrcodeList.includes(project)" type="primary" @click="generateQrCode">生成二维码</el-button>
<el-button v-if="isDriver && !dataError" type="jumpjlmap3d" @click="jumpjlmap3d">{{ $t('joinTraining.driverPerspective') }}</el-button>
@ -114,7 +114,10 @@ export default {
},
project() {
return getSessionStorage('project');
}
},
isProject() {
return getSessionStorage('project') != 'login' && getSessionStorage('project') != 'design'
}
},
watch: {
'$store.state.config.menuBarLoadedCount': function (val) {
@ -144,7 +147,7 @@ export default {
this.isDisable = val;
},
'$store.state.socket.simulationOver':function(val) {
if (val && this.project === 'refereeJsxt') {
if (val && this.project == 'refereeJsxt') {
this.$router.go(-1);
} else {
if (!this.isGoback) {