增加大屏角色

This commit is contained in:
ival 2019-09-04 16:58:13 +08:00
parent ec51f2de2c
commit f925043e41
2 changed files with 99 additions and 67 deletions

View File

@ -3,8 +3,8 @@ export function getBaseUrl() {
let BASE_API; let BASE_API;
if (process.env.NODE_ENV === 'development') { if (process.env.NODE_ENV === 'development') {
// BASE_API = 'https://joylink.club/jlcloud'; // 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.5:9000'; // 袁琪
// BASE_API = 'http://192.168.3.6:9000'; // 旭强 // BASE_API = 'http://192.168.3.6:9000'; // 旭强
// BASE_API = 'http://192.168.3.4:9000' // 琰培 // BASE_API = 'http://192.168.3.4:9000' // 琰培
} else { } else {

View File

@ -15,7 +15,7 @@
</div> </div>
<!-- 参与人员 --> <!-- 参与人员 -->
<div class="personnel"> <div class="personnel">
<div style="height: calc(100% - 20px); overflow-y: scroll;"> <div style="height: calc(100% - 20px); overflow-y: scroll; padding: 0px 30px;">
<div style="display: flex; justify-content: space-between;"> <div style="display: flex; justify-content: space-between;">
<div class="Scheduling"> <div class="Scheduling">
<p class="title">调度员</p> <p class="title">调度员</p>
@ -33,7 +33,7 @@
<el-button icon="el-icon-plus" circle plain @click="addingRoles('dispatch', '增加调度人员')" /> <el-button icon="el-icon-plus" circle plain @click="addingRoles('dispatch', '增加调度人员')" />
</div> </div>
</div> </div>
<div class="Scheduling bottomNone"> <div class="Scheduling">
<p class="title">车站值班员</p> <p class="title">车站值班员</p>
<ul> <ul>
<li v-for="(nor, index) in equipmentList" :key="index" class="selectPerson"> <li v-for="(nor, index) in equipmentList" :key="index" class="selectPerson">
@ -107,7 +107,7 @@
</div> </div>
</div> </div>
<div style="display: flex; justify-content: space-between;"> <div style="display: flex; justify-content: space-between;">
<div class="Scheduling bottomNone"> <div class="Scheduling">
<p class="title">司机</p> <p class="title">司机</p>
<ul> <ul>
<li v-for="(nor, index) in driverList" :key="index" class="selectPerson"> <li v-for="(nor, index) in driverList" :key="index" class="selectPerson">
@ -123,7 +123,7 @@
<el-button icon="el-icon-plus" circle plain @click="addingRoles('driver', '增加司机')" /> <el-button icon="el-icon-plus" circle plain @click="addingRoles('driver', '增加司机')" />
</div> </div>
</div> </div>
<div class="Scheduling bottomNone"> <div class="Scheduling">
<p class="title">IBP</p> <p class="title">IBP</p>
<ul> <ul>
<li v-for="(nor, index) in ibpList" :key="index" class="selectPerson"> <li v-for="(nor, index) in ibpList" :key="index" class="selectPerson">
@ -162,54 +162,72 @@
</div> </div>
</div> </div>
</div> </div>
<div class="start-box"> <div style="display: flex; justify-content: space-between;">
<div v-if="!starting" style="float: right; margin-left: 10px;"> <div class="Scheduling">
<el-button <p class="title">大屏</p>
v-if="userId == roomInfo.creatorId" <ul>
type="primary" <li v-for="(nor, index) in bigScreenList" :key="index" class="selectPerson">
style="float: right;" <span>{{ nor.nickName }}</span>
:loading="loading" <i
@click="start" v-if="userId == roomInfo.creatorId"
> class="el-icon-close delPerson"
开始仿真</el-button> @click="handleDelUser(bigScreenList, nor, index)"
/>
</li>
</ul>
<div v-if="userId == roomInfo.creatorId" class="add-box">
<el-button icon="el-icon-plus" circle plain @click="addingRoles('bigScreen', '增加大屏')" />
</div>
</div> </div>
<div v-else>
<el-button
type="primary"
style="float: right; margin-right: 10px;"
:loading="loading"
@click="joinJointTrain"
>
进入仿真</el-button>
<el-button
v-if="userId == roomInfo.creatorId"
type=""
style="float: right; margin-right: 10px;"
:loading="loading"
@click="stop"
>
结束仿真</el-button>
</div>
<el-button
v-if="userId == roomInfo.creatorId"
type=""
style="float: right; margin-right: 0px;"
:loading="loading"
@click="postCode"
>生成二维码
</el-button>
<el-button type="" style="float: right; margin-right: 10px;" @click="backRoom">返回
</el-button>
<el-button
v-if="userId == roomInfo.creatorId"
type="danger"
style="float: right; margin-right: 0px;"
:loading="loading"
@click="exit"
>销毁房间
</el-button>
</div> </div>
</div> </div>
<div class="start-box">
<template v-if="!starting">
<el-button
v-if="userId == roomInfo.creatorId"
style="margin-left: 10px"
type="primary"
:loading="loading"
@click="start"
>
开始仿真</el-button>
</template>
<template v-else>
<el-button
type="primary"
style="margin-left: 10px"
:loading="loading"
@click="joinJointTrain"
>
进入仿真</el-button>
<el-button
v-if="userId == roomInfo.creatorId"
style="margin-left: 10px"
type="warning"
:loading="loading"
@click="stop"
>
结束仿真</el-button>
</template>
<el-button
v-if="userId == roomInfo.creatorId"
style="margin-left: 10px"
type="success"
:loading="loading"
@click="postCode"
>生成二维码
</el-button>
<el-button
v-if="userId == roomInfo.creatorId"
style="margin-left: 10px"
type="danger"
:loading="loading"
@click="exit"
>销毁房间
</el-button>
<el-button type="" @click="backRoom">返回
</el-button>
</div>
</div> </div>
</div> </div>
<!-- 观众席 --> <!-- 观众席 -->
@ -286,7 +304,8 @@ export default {
adminList: [], adminList: [],
driverList: [], driverList: [],
signalList: [], signalList: [],
stationList: [], // bigScreenList: [],
stationList: [],
ibpList: [], ibpList: [],
point: { point: {
x: 0, x: 0,
@ -387,7 +406,8 @@ export default {
...this.equipmentList, ...this.equipmentList,
...this.driverList, ...this.driverList,
...this.signalList, ...this.signalList,
...this.ibpList ...this.ibpList,
...this.bigScreenList
].length - 1: 0; ].length - 1: 0;
}, },
filterNode(value, data) { filterNode(value, data) {
@ -483,11 +503,11 @@ export default {
break; break;
case 'Attendant': case 'Attendant':
this.equipmentList.forEach((nor, index) => { this.equipmentList.forEach((nor, index) => {
if (nor.id == item.id) { // if (nor.id == item.id) {
this.equipmentList.splice(index, 1); this.equipmentList.splice(index, 1);
} }
}); });
this.equipmentList.push(item); // this.equipmentList.push(item);
break; break;
case 'Driver': case 'Driver':
this.driverList.push(item); this.driverList.push(item);
@ -497,11 +517,14 @@ export default {
break; break;
case 'IBP': case 'IBP':
this.ibpList.forEach((nor, index) => { this.ibpList.forEach((nor, index) => {
if (nor.id == item.id) { // if (nor.id == item.id) {
this.ibpList.splice(index, 1); this.ibpList.splice(index, 1);
} }
}); });
this.ibpList.push(item); // this.ibpList.push(item);
break;
case 'BigScreen':
this.bigScreenList.push(item);
break; break;
default: default:
this.dispatchList.forEach((nor, index) => { this.dispatchList.forEach((nor, index) => {
@ -534,6 +557,11 @@ export default {
this.ibpList.splice(index, 1); this.ibpList.splice(index, 1);
} }
}); });
this.bigScreenList.forEach((nor, index) => {
if (item.id == nor.id) {
this.bigScreenList.splice(index, 1);
}
});
break; break;
} }
}); });
@ -597,6 +625,10 @@ export default {
item.select = true; item.select = true;
this.ibpList.push(item); this.ibpList.push(item);
break; break;
case 'BigScreen':
item.select = true;
this.bigScreenList.push(item);
break;
} }
this.treeData.push(item); this.treeData.push(item);
}); });
@ -713,6 +745,9 @@ export default {
case 'ibp': // IBP case 'ibp': // IBP
params.userRole = 'IBP'; params.userRole = 'IBP';
break; break;
case 'bigScreen': //
params.userRole = 'BigScreen';
break;
} }
arr.push(params); arr.push(params);
}); });
@ -886,15 +921,14 @@ export default {
} }
.personnel { .personnel {
padding: 0px 20px;
width: calc(100% - 500px); width: calc(100% - 500px);
height: calc(100% - 60px); height: calc(100% - 120px);
float: left; float: left;
.Scheduling { .Scheduling {
width: calc(50% - 10px); width: calc(50% - 10px);
float: left; float: left;
height: 250px; height: 240px;
border: 1px solid #ccc; border: 1px solid #ccc;
margin-bottom: 20px; margin-bottom: 20px;
overflow-y: scroll; overflow-y: scroll;
@ -915,10 +949,6 @@ export default {
} }
} }
.bottomNone {
margin-bottom: 0;
}
.selectPerson { .selectPerson {
height: 30px; height: 30px;
line-height: 30px; line-height: 30px;
@ -940,9 +970,11 @@ export default {
} }
.start-box { .start-box {
width: 100%; width: 100%;
height: 40px; display: flex;
margin-top: 20px; justify-content: center;
background: #f1f1f1;
padding: 20px 0px;
} }
@media screen and (max-width: 1325px) { @media screen and (max-width: 1325px) {