This commit is contained in:
fan 2022-09-15 13:30:26 +08:00
commit 63f4505ed9
11 changed files with 568 additions and 79 deletions

View File

@ -112,6 +112,14 @@ export function getTrainingMmembers(trainingId) {
});
}
/** 获取实训所有参与者 */
export function getTrainingPlayers(trainingId) {
return request({
url: `/api/v2/draft/training/${trainingId}/player/list`,
method: 'get'
});
}
/** 更新所有评分规则*/
export function updateTrainingGradeRules(trainingId, data) {
return request({

BIN
src/assets/pis/train.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -203,6 +203,8 @@ const VoiceManage = () => import('@/views/fileManage/voiceManage');
const IscsDeviceManage = () => import('@/views/system/iscsDeviceManage');
const IscsResourcesManage = () => import('@/views/system/iscsResourcesManage');
const PisScreen = () => import('@/views/pis/index')
// import { GenerateRouteProjectList } from '@/scripts/ProjectConfig';
// import { getSessionStorage } from '@/utils/auth';
@ -703,6 +705,11 @@ export const publicAsyncRoute = [
path: '/bigTrainRunplanManage',
component: BigTrainRunplanManage,
hidden: true
},
{
path: '/pis',
component: PisScreen,
hidden: true
}
];

View File

@ -291,7 +291,9 @@ export default {
{ label: '站台', value: 'StationStand' }, // Stand
{ label: '车站', value: 'Station' },
{label:'进路', value:'Route'},
{ label: '列车', value: 'Train' }
{ label: '列车', value: 'Train' },
{ label: '自动闭塞', value: 'StationDirectionAuto' },
{ label: '半自动闭塞', value: 'StationDirectionSemi' }
]
}
};

368
src/views/pis/index.vue Normal file
View File

@ -0,0 +1,368 @@
<template>
<div class="screen">
<el-button @click="changeView" style="position:fixed; top: 0; right: 0">{{ this.view }}</el-button>
<div v-if="view === 'station'" class="station">
<div class="datetime">
<div class="logo">LOGO</div>
<div>
<span>{{ date }}</span>
<span class="time">{{ time }}</span>
</div>
</div>
<div class="traininfo">
<div class="currentStation">
<div>本站 This Station</div>
<div class="text-center bigger">{{ trainInfo.station.name }}</div>
<div class="text-center">{{ trainInfo.station.nameEN }}</div>
</div>
<div class="devide"></div>
<div class="nextTrain">
<div>第一班列车 1st</div>
<div class="text-center yellow">
<span class="bigger">{{ trainInfo.nextTrain.time }} 分钟</span> <span>min</span>
</div>
<div>开往 {{ trainInfo.nextTrain.to }}</div>
<div>TO {{ trainInfo.nextTrain.toEN }}</div>
</div>
<div class="devide"></div>
<div class="secondTrain">
<div>第二班列车 2nd</div>
<div class="text-center bigger">{{ trainInfo.secondTrain.time }} 分钟 <span>min</span></div>
<div>开往 {{ trainInfo.secondTrain.to }}</div>
<div>TO {{ trainInfo.secondTrain.toEN }}</div>
</div>
</div>
<div class="media">
<div class="mediacontent"></div>
<div class="banner">
<div class="text">{{ bannerText }}</div>
<div class="text">{{ bannerText }}</div>
</div>
</div>
<div class="tempratrue">
<div class="directionIdentifer"></div>
<div class="trainpic">
<div class="pic"></div>
<div class="textarea">
<div v-for="i in 6" :key="i">舒适 Vacant</div>
</div>
</div>
</div>
</div>
<div v-if="view === 'train'" class="train">
<div class="content">
<div class="left">
<div class="logo">LOGO</div>
<div class="info">
<div class="time block">
<div>时间 TIME</div>
<div>{{ time }}</div>
</div>
<div class="date block">
<div>日期 DATE</div>
<div>{{ date }}</div>
</div>
<div class="next block">
<div class="up">
<div>下一站</div>
<div>Next Station</div>
</div>
<div class="down">
<div>{{ currentTrain.nextStationName }}</div>
<div>{{ currentTrain.nextStationNameEN }}</div>
</div>
</div>
</div>
</div>
<div class="right">
<div class="dest">
<div>开往: {{ currentTrain.destination }} / TO: {{ currentTrain.destinationEN }}</div>
</div>
<div class="media"></div>
</div>
</div>
<div class="banner">
<div class="text">{{ bannerText }}</div>
<div class="text">{{ bannerText }}</div>
</div>
</div>
</div>
</template>
<script>
let timer
export default {
name: 'PIS',
components: {},
computed: {
date() {
return `${this.datetime.getFullYear()}${this.datetime.getMonth() + 1}${this.datetime.getDate()}`
},
time() {
return `${this.datetime.getHours()}:${this.datetime.getMinutes() + 1}`
},
},
data() {
return {
view: 'station',
datetime: new Date(),
trainInfo: {
station: {
name: '科技路',
nameEN: 'KEJILU',
},
nextTrain: {
time: 3,
to: '航天东路',
toEN: 'HANGTIANDONGLU',
},
secondTrain: {
time: 7,
to: '航天新城',
toEN: 'HANGTIANXINCHENG',
},
},
bannerText:
'党的十八大提出倡导富强、民主、文明、和谐倡导自由、平等、公正、法治倡导爱国、敬业、诚信、友善积极培育和践行社会主义核心价值观。富强、民主、文明、和谐是国家层面的价值目标自由、平等、公正、法治是社会层面的价值取向爱国、敬业、诚信、友善是公民个人层面的价值准则这24个字是社会主义核心价值观的基本内容。',
currentTrain: {
nextStationName: '丈八一路',
nextStationNameEN: 'ZHANGBA 1 LU',
destination: '西安国际医学中心',
destinationEN: `XI'ANGUOJIYIXUEZHONGXIN`,
},
}
},
mounted() {
clearTimeout(timer)
timer = setInterval(() => {
this.tick()
}, 1000)
},
destroyed() {
clearInterval(timer)
timer = null
},
methods: {
changeView() {
if (this.view === 'station') {
this.view = 'train'
} else {
this.view = 'station'
}
},
tick() {
this.datetime = new Date()
},
},
}
</script>
<style lang="scss" scoped>
.screen {
height: 100vh;
width: 100vw;
font-size: 28px;
color: #fff;
user-select: none;
}
.station {
height: 100%;
display: grid;
gap: 10px;
padding: 10px;
background: linear-gradient(#009eb5, #00b7d7);
grid-template-columns: repeat(4, 1fr);
grid-template-rows: repeat(5, 1fr);
& > div {
display: flex;
justify-content: center;
align-items: center;
overflow: visible;
}
.datetime,
.traininfo {
border: 1px solid rgb(143, 192, 184);
border-radius: 5px;
background: #009ab8;
box-shadow: 2px 2px 3px 1px #69898f;
}
.datetime {
grid-area: 1/1/2/2;
flex-direction: column;
justify-content: space-evenly;
.time {
font-size: 1.2em;
margin-left: 0.5em;
}
}
.traininfo {
grid-area: 2/1/5/2;
flex-direction: column;
justify-content: space-evenly;
font-size: 24px;
& > div {
width: 100%;
padding: 0 30px;
line-height: 1.6em;
}
.devide {
width: 80%;
height: 2px;
background: rgba($color: #fff, $alpha: 0.7);
border-radius: 100%;
}
.text-center {
text-align: center;
}
.bigger {
font-size: 1.5em;
}
.yellow {
color: #cff055;
}
.nextTrain {
font-size: 1.1em;
}
}
.media {
grid-area: 1/2/5/5;
flex-direction: column;
justify-content: space-between;
.mediacontent {
width: 100%;
height: calc(85% - 10px);
background: linear-gradient(#cff055, #009eb5);
}
.banner {
width: 100%;
height: 15%;
border: 1px solid rgb(143, 192, 184);
border-radius: 5px;
background: #009ab8;
box-shadow: 2px 2px 3px 1px #69898f;
overflow: hidden;
padding: 10px;
display: flex;
justify-content: flex-start;
align-items: center;
.text {
white-space: nowrap;
font-size: 60px;
animation: 40s linear infinite scroll;
color: #cff055;
}
}
}
.tempratrue {
grid-area: 5/1/6/5;
justify-content: space-evenly;
.directionIdentifer {
font-size: 72px;
}
.trainpic {
width: 80%;
.pic {
height: 120px;
background-image: url('~@/assets/pis/train.png');
background-size: cover;
background-position: center;
}
.textarea {
display: flex;
justify-content: space-evenly;
}
}
}
}
.train {
height: 100%;
background: linear-gradient(90deg, #44537b, #445567, #44537b);
.content {
height: 88%;
padding: 15px;
display: flex;
.left,
.right {
height: 100%;
}
.left {
width: 30%;
background: linear-gradient(90deg, #3e4e69, #586baa, #3e4e69);
padding: 20px;
.logo {
height: 12%;
}
.info {
height: 88%;
background-color: #7076b0;
border-radius: 15px;
padding: 8px;
overflow: visible;
display: flex;
flex-direction: column;
font-size: 40px;
font-weight: bold;
.time {
height: 25%;
}
.date {
height: 25%;
margin: 8px 0;
}
.next {
height: 50%;
}
.block {
background: linear-gradient(90deg, #445397, #7b7cc2, #445397);
border-radius: 7px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-evenly;
.up,
.down {
text-align: center;
}
}
}
}
.right {
width: 70%;
.dest {
height: 15%;
display: flex;
align-items: center;
padding: 20px;
font-size: 40px;
}
.media {
height: 85%;
background: linear-gradient(#7b7cc2, #cff055);
}
}
}
.banner {
height: 12%;
overflow: hidden;
padding: 10px;
display: flex;
justify-content: flex-start;
align-items: center;
.text {
white-space: nowrap;
font-size: 60px;
animation: 40s linear infinite scroll;
color: #cff055;
}
}
}
@keyframes scroll {
from {
transform: translateX(0);
}
to {
transform: translateX(-100%);
}
}
</style>

View File

@ -8,7 +8,7 @@
</el-button-group>
</div>
<TrainingList ref="trainingList" @updateDetails="updateDetails" @gradeRules="gradeRules" @closeAllDialog="closeAllDialog" />
<EditDetails ref="editDetails" :edit-data="editData" @openEditOperate="openEditOperate" @handleCondition="handleCondition" @publish="publish" @preview="preview" />
<EditDetails ref="editDetails" :edit-data="editData" @openEditOperate="openEditOperate" @handleCondition="handleCondition" @publish="publish" @preview="preview" @gradeRules="gradeRules" />
<EditCondition ref="editCondition" v-dialogDrag :materials-list="materialsList" @editConditionFn="editConditionFn" @backStep="backStep" />
<edit-operate ref="editOperate" v-dialogDrag @backStepList="backStepList" />
<grade-rules ref="gradeRules" />

View File

@ -47,11 +47,6 @@ export default {
ExpressionValue,
Expression
},
provide() {
return {
optionObj: this.optionObj
};
},
props: {
materialsList: {
type: Array,
@ -68,44 +63,7 @@ export default {
tableData: [],
activeIndexPath: '',
rowIndex: 0,
conditionKey: '',
optionObj: {
boolean: [
{ label: '是', value: true },
{ label: '否', value: false }
],
RunLevel: [
{ label: 'cbtc级别', value: 'CBTC' },
{ label: '点式通信', value: 'ITC' },
{ label: '联锁级', value: 'IL' }
],
SignalAspect: [
{label:'红', value:1},
{label:'绿', value:2},
{label:'黄', value:3},
{label:'黄红', value:4},
{label:'绿绿', value:5},
{label:'绿黄', value:6},
{label:'黄黄', value:7},
{label:'黄闪黄', value:8},
{label:'白红', value:9},
{label:'蓝', value:10},
{label:'白', value:11},
{label:'红闪', value:12}
],
SwitchIndication: [// N- R- NO-() EX-
{ label: '定位', value: 'N' },
{ label: '反位', value: 'R' },
{ label: '失表', value: 'NO' },
{ label: '挤叉', value: 'EX' }
],
DriveMode: [
{ label: '自动驾驶模式', value: 'AM' },
{ label: '人工驾驶模式', value: 'CM' },
{ label: '限制人工驾驶模式', value: 'RM' },
{ label: '非限制人工驾驶模式', value: 'NRM' }
]
}
conditionKey: ''
};
},
computed: {
@ -129,6 +87,9 @@ export default {
mapDevice() {
return this.$store.state.map.mapDevice;
},
mapStationDirectionData() {
return this.$store.state.map.mapStationDirectionData;
},
getDeviceList() {
const typeObj = {};
this.ConstSelect.operationDeviceList.forEach(ii => {
@ -144,10 +105,22 @@ export default {
});
}
});
Object.values(this.mapStationDirectionData).forEach(item => {
let isAuto = true;
if (item.runModel == 'S') {
isAuto = false;
}
list.push({
code: item.code,
name: `${item.name}_${item.labelEnum}(${isAuto ? '自动闭塞' : '半自动闭塞'})`,
_type: `${isAuto ? 'StationDirectionAuto' : 'StationDirectionSemi'}`
});
});
this.getRouteList.forEach(item => {
list.push({
code: item.code,
name: `${item.name}(进路)`,
startSignalCode: item.startSignalCode,
_type: 'Route'
});
});
@ -286,6 +259,7 @@ export default {
doShow(data, rowIndex, conditionKey) {
this.dialogVisible = true;
this.tabVisible = true;
this.activeIndexPath = '';
if (data) {
this.tableData = [data];
} else {

View File

@ -10,6 +10,7 @@
<span>实训名称{{ editData.name || '' }}</span>
</div>
<div>
<el-button size="small" type="success" @click="gradeRules">评分</el-button>
<el-button size="small" type="primary" @click="previewTraining">预览</el-button>
<el-button size="small" type="primary" @click="publishTraining">发布</el-button>
<el-button size="small" type="danger" @click="clearStep">清空步骤</el-button>
@ -252,6 +253,9 @@ export default {
this.tableData[data.index].tipPosition = data.tipPosition;
}
},
gradeRules() {
this.$emit('gradeRules', this.editData);
},
handleDelete(index, row) {
console.log('删除', index, row);
this.$confirm('确定删除该条步骤数据?', '警告', {

View File

@ -12,7 +12,7 @@
</el-select>
</el-form-item>
<div class="rowConditionList">
<el-form-item label="值1类型" prop="t1">
<!-- <el-form-item label="值1类型" prop="t1">
<el-select v-model="formModel.t1" placeholder="请选择条件类型" size="mini">
<el-option
v-for="option in conditionList1"
@ -21,20 +21,41 @@
:value="option.value"
/>
</el-select>
</el-form-item>
<el-form-item v-if="showDevice" label="值1设备" prop="elementCode">
<el-select v-model="formModel.elementCode" clearable placeholder="请选择设备" size="mini">
</el-form-item> -->
<el-form-item v-if="showDevice" label="设备类型">
<el-select v-model="deviceType" clearable placeholder="请选择设备类型" size="mini" @change="changeDeviceType">
<el-option
v-for="option in getDeviceList"
v-for="option in ConstSelect.operationDeviceList"
:key="option.value"
:label="option.label"
:value="option.value"
/>
</el-select>
</el-form-item>
<el-form-item v-if="deviceType == 'Route'" label="初始信号机">
<el-select v-model="startSignal" placeholder="请选择值" size="mini">
<el-option
v-for="option in getSignalList"
:key="option.code"
:label="option.name"
:value="option.code"
/>
</el-select>
<el-button :type="field == 'elementCode' ? 'danger' : 'primary'" size="mini" @click="hover('elementCode')">激活</el-button>
<el-button :type="field == 'startSignal' ? 'danger' : 'primary'" size="mini" @click="hover('startSignal')">激活</el-button>
</el-form-item>
<el-form-item v-if="showDevice" label="值1属性" prop="filedName">
<el-select v-model="formModel.filedName" clearable placeholder="请选择设备属性" size="mini">
<el-form-item v-if="showDevice" label="设备" prop="elementCode">
<el-select v-model="formModel.elementCode" clearable placeholder="请选择设备" size="mini">
<el-option
v-for="option in filterDeviceList"
:key="option.code"
:label="option.name"
:value="option.code"
/>
</el-select>
<el-button v-if="showElementCodeActive" :type="field == 'elementCode' ? 'danger' : 'primary'" size="mini" @click="hover('elementCode')">激活</el-button>
</el-form-item>
<el-form-item v-if="showDevice" label="属性" prop="filedName">
<el-select v-model="formModel.filedName" clearable placeholder="请选择设备属性" size="mini" @change="changeFiledName">
<el-option
v-for="option in getAttributeList"
:key="option.name"
@ -45,7 +66,7 @@
</el-form-item>
</div>
<div class="rowConditionList">
<el-form-item v-if="showConditionList2" label="值2类型" prop="t2">
<!-- <el-form-item v-if="showConditionList2" label="值2类型" prop="t2">
<el-select v-model="formModel.t2" placeholder="请选择条件类型" size="mini">
<el-option
v-for="option in conditionList2"
@ -54,8 +75,8 @@
:value="option.value"
/>
</el-select>
</el-form-item>
<el-form-item v-if="showValue2" label="值2" prop="v">
</el-form-item> -->
<el-form-item v-if="showValue2" label="值" prop="v">
<el-select v-if="optionObj[valueType]" v-model="formModel.v" placeholder="请选择值" size="mini">
<el-option
v-for="option in optionValueType"
@ -64,7 +85,7 @@
:value="option.value"
/>
</el-select>
<div v-else-if="valueType == 'SECTION'">
<div v-else-if="valueType == 'Section'">
<el-select v-model="formModel.v" placeholder="请选择值" size="mini">
<el-option
v-for="option in getSectionList"
@ -75,7 +96,7 @@
</el-select>
<el-button :type="field == 'v' ? 'danger' : 'primary'" size="mini" @click="hover('v')">激活</el-button>
</div>
<el-input-number v-else-if="valueType=='int'" v-model="formModel.v" size="mini" style="width: 180px" />
<el-input-number v-else-if="valueType=='float' || valueType=='int'" v-model="formModel.v" :precision="valueType=='int' ? 0 : 2" size="mini" style="width: 180px" />
<el-input v-else v-model="formModel.v" size="mini" style="width: 180px" />
</el-form-item>
</div>
@ -92,7 +113,6 @@ import ConstConfig from '@/scripts/ConstConfig';
export default {
name: 'Expression',
components:{},
inject: ['optionObj'],
props: {
getDeviceList: {
type: Array,
@ -111,6 +131,8 @@ export default {
return {
indexPath: '',
field: '',
deviceType: '',
startSignal: '',
formModel: {
t: 'E',
t1: 'S',
@ -138,15 +160,24 @@ export default {
return item.value == 'V';
});
},
deviceType() {
let type = '';
const findObj = this.getDeviceList.find(item => {
return item.code == this.formModel.elementCode;
filterDeviceList() {
let list = [];
list = this.getDeviceList.filter(item => {
return item._type == this.deviceType;
});
if (findObj) {
type = findObj._type || '';
if (this.deviceType == 'Route') {
list = list.filter(item => {
return item.startSignalCode == this.startSignal;
});
}
return type;
return list;
},
getSignalList() { //
let list = [];
list = this.getDeviceList.filter(item => {
return item._type == 'Signal';
});
return list;
},
getSectionList() { //
let list = [];
@ -180,6 +211,22 @@ export default {
}
return attr;
},
optionObj() {
const obj = {
boolean: [
{ label: '是', value: true },
{ label: '否', value: false }
]
};
this.materialsList.forEach(item => {
item.materials.forEach(every => {
if (every.valueList) {
obj[every.type] = every.valueList;
}
});
});
return obj;
},
rules() {
const crules = {
t: [
@ -206,6 +253,14 @@ export default {
};
return crules;
},
showElementCodeActive() {
let s = true;
const arr = ['Route', 'StationDirectionAuto', 'StationDirectionSemi'];
if (arr.includes(this.deviceType)) {
s = false;
}
return s;
},
showDevice() {
let s = false;
if (this.formModel.t1 == 'S') {
@ -234,14 +289,30 @@ export default {
if (this.field && this.showDevice) {
const model = this.$store.state.menuOperation.selected;
let code = model.code;
if (model._type == 'SignalButton') {
if (model._type == 'SignalButton' && model.signalCode) {
code = model.signalCode;
}
const findObj = this.getDeviceList.find(item => {
let list = this.getDeviceList;
if (this.field == 'v') {
list = this.getSectionList;
} else if (this.field == 'startSignal') {
list = this.getSignalList;
}
const findObj = list.find(item => {
return item.code == code;
});
if (findObj) {
this.formModel[this.field] = findObj.code;
if (this.field == 'startSignal') {
this[this.field] = findObj.code;
this.formModel.elementCode = '';
} else {
this.formModel[this.field] = findObj.code;
}
}
if (this.field != 'startSignal' && this.deviceType != this.getDeviceType()) {
this.deviceType = this.getDeviceType();
this.formModel.filedName = '';
this.formModel.v = '';
}
this.field = '';
}
@ -249,6 +320,14 @@ export default {
},
created() {},
methods: {
changeDeviceType() {
this.formModel.elementCode = '';
this.formModel.filedName = '';
this.formModel.v = '';
},
changeFiledName() {
this.formModel.v = '';
},
hover(field) {
this.field = field == this.field ? '' : field;
this.$emit('hover', field);
@ -331,6 +410,28 @@ export default {
this.formModel.t2 = 'V';
}
}
this.deviceType = this.getDeviceType();
this.startSignal = this.getStartSignal();
},
getDeviceType() {
let type = '';
const findObj = this.getDeviceList.find(item => {
return item.code == this.formModel.elementCode;
});
if (findObj) {
type = findObj._type || '';
}
return type;
},
getStartSignal() {
let signal = '';
const findObj = this.getDeviceList.find(item => {
return item.code == this.formModel.elementCode;
});
if (findObj) {
signal = findObj.startSignalCode || '';
}
return signal;
},
clearFromData() {
this.$refs.formModel.resetFields();
@ -341,6 +442,7 @@ export default {
<style lang="scss" scoped>
.rowConditionList {
display: flex;
flex-wrap: wrap;
}
/deep/ .el-form-item__label {
line-height: 28px;

View File

@ -45,7 +45,6 @@ import ConstConfig from '@/scripts/ConstConfig';
export default {
name: 'ExpressionValue',
components:{},
inject: ['optionObj'],
props: {
valueObj: {
type: Object,
@ -91,6 +90,22 @@ export default {
return arr.includes(item.value);
});
},
optionObj() {
const obj = {
boolean: [
{ label: '是', value: true },
{ label: '否', value: false }
]
};
this.materialsList.forEach(item => {
item.materials.forEach(every => {
if (every.valueList) {
obj[every.type] = every.valueList;
}
});
});
return obj;
},
valueTypeList() {
let list = [];
Object.values(this.optionObj).forEach(item => {
@ -106,12 +121,21 @@ export default {
let value = obj.valuables[1].v;
const type = this.getValueType(obj.valuables[0]);
if (type) {
const list = this.optionObj[type] || [];
const findObj = list.find(item => {
return item.value == value;
});
if (findObj) {
value = findObj.label;
if (type != 'Section') {
const list = this.optionObj[type] || [];
const findObj = list.find(item => {
return item.value == value;
});
if (findObj) {
value = findObj.label;
}
} else {
const findObj = this.getDeviceList.find(item => {
return item.code == value;
});
if (findObj) {
value = findObj.name;
}
}
}
return value;

View File

@ -39,7 +39,7 @@
/>
<el-table-column
prop="score"
label="扣分分值"
label="分值"
width="200"
>
<template v-if="addModel.memberId==scope.row.memberId" slot-scope="scope">
@ -59,7 +59,7 @@
</template>
<script>
import {covertMemberData} from '@/views/newMap/displayNew/utils';
import { getTrainingStepList, getTrainingMmembers, updateTrainingGradeRules, getTrainingGradeRules } from '@/api/trainingManage';
import { getTrainingStepList, getTrainingPlayers, updateTrainingGradeRules, getTrainingGradeRules } from '@/api/trainingManage';
export default {
name: 'GradeRules',
props: {},
@ -106,7 +106,7 @@ export default {
this.gradeRulesMap[gradeRule.memberId] = gradeRule;
});
//
getTrainingMmembers(row.id).then(res=>{
getTrainingPlayers(row.id).then(res=>{
let activeTrainList = [];
if (this.$store.state.training.started) {
activeTrainList = this.$store.state.map.activeTrainList;