Merge branch 'test_dispaly' of https://git.code.tencent.com/lian-cbtc/jl-client into test_dispaly

This commit is contained in:
joylink_cuiweidong 2022-10-17 16:27:03 +08:00
commit 78b4022062
21 changed files with 2488 additions and 284 deletions

View File

@ -24,10 +24,17 @@ export function deleteDisStation(mapId, code) {
});
}
// 获取调度台逻辑数据
export function getDisStationList(mapId, data) {
export function getDisStationListPaged(mapId, data) {
return request({
url: `/api/draftMap/${mapId}/disStation/page`,
method: 'post',
data
});
}
/** 查询调度台列表 */
export function getDisStationList(mapId) {
return request({
url: `api/draftMap/${mapId}/disStation/list`,
method: 'get'
});
}

View File

@ -214,3 +214,33 @@ export function getQuestionAmount(data) {
data,
})
}
/**
* @param {Number} pcId 试卷蓝图Id
*/
export function lockPaper(pcId) {
return request({
url: `/api/v2/paper/composition/${pcId}/lock`,
method: 'PUT',
})
}
/**
* @param {Number} pcId 试卷蓝图Id
*/
export function unlockPaper(pcId) {
return request({
url: `/api/v2/paper/composition/${pcId}/unlock`,
method: 'PUT',
})
}
/**
* @param {Number} pcId 试卷蓝图Id
*/
export function deletePaper(pcId) {
return request({
url: `/api/v2/paper/composition/${pcId}`,
method: 'DELETE',
})
}

View File

@ -11,7 +11,7 @@ export function listQuestionPage(params) {
}
// 标签列表
export function getLableList() {
export function getLabelList() {
return request({
url: `/api/question/org/label`,
method: 'get'

View File

@ -8,7 +8,7 @@
<script>
// import { UrlConfig } from '@/scripts/ConstDic';
import { listQuestionPage, deleteQuestion, getLableList } from '@/api/questionBank.js';
import { listQuestionPage, deleteQuestion, getLabelList } from '@/api/questionBank.js';
import DialogDetail from './dialog-detail';
import PreviewAnswer from './previewAnswer';
import { convertSheetToList } from '@/jmapNew/theme/parser/util.js';
@ -152,7 +152,7 @@ export default {
// this.companyMap[item.id] = item.name;
// });
// });
getLableList().then(res => {
getLabelList().then(res => {
res.data.forEach(item => {
this.queryForm.queryObject.labels.config.data.push({ value: item, label: item });
});

View File

@ -4,6 +4,7 @@
<div v-for="(el,i) in optionList" :key="i" class="option__item">
<div> 选项-{{ $asc2chart(65+i) }} </div>
<item-rich v-model="el.content" :remove="remove" @modify="doModify(el)" @remove="doRemove(i)" />
<span v-if="!el.content" class="error">选项不能为空</span>
</div>
<el-button v-if="add" class="item__button" type="primary" size="mini" icon="el-icon-plus" @click="doAppend" />
</template>
@ -57,6 +58,19 @@ export default {
.option {
&__item {
margin-bottom: 10px;
position: relative;
.error {
color: #F56C6C;
font-size: 12px;
line-height: 1;
padding-top: 4px;
position: absolute;
top: 100%;
left: 0;
}
}
.item__button {
margin-top: 20px;
}
}
</style>

View File

@ -67,9 +67,19 @@ export default {
tagsChange(list) {
this.tagsArr = list;
},
hasNullOption() { //
const s = this.formModel.optionList.find(item => {
return item.content == '';
});
return s;
},
create() {
this.$refs.info.validate().then(valid => {
if (valid) {
if (this.hasNullOption()) {
this.$message.warning('选项不能为空!');
return;
}
// this.formModel.companyId = parseInt(this.companyId);
this.formModel.tags = this.tagsArr.join(',');
createQuestion(this.formModel).then(resp => {

View File

@ -37,7 +37,7 @@ import ItemOptions from './item-options';
import ItemAnswer from './item-answer';
import { getCompanyList } from '@/api/company';
import { getSessionStorage } from '@/utils/auth';
import { getLableList } from '@/api/questionBank.js';
import { getLabelList } from '@/api/questionBank.js';
export default {
components: {
@ -143,9 +143,10 @@ export default {
});
},
created() {
getLableList().then(res => {
getLabelList().then(res => {
this.labelList = res.data || [];
}).catch(err => {
console.log(err);
});
},
methods: {

View File

@ -83,14 +83,27 @@ export default {
doModify(node) {
this.$refs.rich.doShow(node);
},
hasNullOption() { //
const s = this.formModel.optionList.find(item => {
return item.content == '';
});
return s;
},
update() {
this.$refs.info.validate().then(valid => {
if (this.hasNullOption()) {
this.$message.warning('选项不能为空!');
return;
}
if (this.$route.query.draft && valid) {
this.$store.state.race.preTheoryData[this.questionId] = this.formModel;
this.doBack();
} else if (valid) {
// this.formModel.companyId = parseInt(this.companyId);
this.formModel.tags = this.tagsArr.join(',');
this.formModel.tags = this.tagsArr;
if (Array.isArray(this.tagsArr)) {
this.formModel.tags = this.tagsArr.join(',');
}
updateOption(this.formModel).then(resp => {
this.doBack();
}).catch(error => {

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,378 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm train-set-plan"
:title="title"
:visible.sync="show"
width="670px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-form id="AddDispatcherForm" ref="form" :model="model" label-width="80px" :rules="rules">
<el-form-item label="车站:" prop="stationCode" style="width: 100%;">
<el-select v-model="model.stationCode" placeholder="" style="width:180px" @change="changeStation">
<el-option
v-for="item in stationList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item label="列车类型:" prop="trainType">
<el-select v-model="model.trainType" placeholder="" style="width:180px">
<el-option
v-for="item in trainTypeList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item label="运行类型:" prop="runType" style="margin-left: 45px;">
<el-select v-model="model.runType" placeholder="" style="width:180px">
<el-option
v-for="item in runTypeList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item label="到达车次:" prop="arriveTripNumber">
<el-input v-model="model.arriveTripNumber" style="width:160px" :disabled="model.startRunPlan" />
</el-form-item>
<el-form-item label="出发车次:" prop="departTripNumber" style="margin-left: 66px;">
<el-input v-model="model.departTripNumber" style="width:160px" :disabled="model.endRunPlan" />
</el-form-item>
<el-form-item label="接车口:" prop="arriveDirectionCode">
<el-select v-model="model.arriveDirectionCode" placeholder="" style="width:180px" :disabled="model.startRunPlan">
<el-option
v-for="item in filterArrMapStationDirectionList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item label="发车口:" prop="departDirectionCode" style="margin-left:45px;">
<el-select v-model="model.departDirectionCode" placeholder="" style="width:180px" :disabled="model.endRunPlan">
<el-option
v-for="item in filterDepMapStationDirectionList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item label="接车股道:" prop="arriveSectionCode">
<el-select v-model="model.arriveSectionCode" placeholder="" style="width:160px" :disabled="model.startRunPlan">
<el-option
v-for="item in filterArrSectionList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item label="发车股道:" prop="departSectionCode" style="margin-left: 67px;">
<el-select v-model="model.departSectionCode" placeholder="" style="width:160px" :disabled="model.endRunPlan">
<el-option
v-for="item in filterDepSectionList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item label="到达时间:" prop="arrivePlanTime">
<el-date-picker v-model="model.arrivePlanTime" type="datetime" :disabled="model.startRunPlan" value-format="yyyy-MM-dd HH:mm" format="yyyy-MM-dd HH:mm" style="width:160px" />
</el-form-item>
<el-form-item label="" prop="startRunPlan" class="noMargin" style="margin-left:10px;">
<el-checkbox v-model="model.startRunPlan" @change="changeStartRp">始发</el-checkbox>
</el-form-item>
<el-form-item label="出发时间:" prop="departPlanTime" style="margin-left:10px;">
<el-date-picker v-model="model.departPlanTime" type="datetime" :disabled="model.endRunPlan" value-format="yyyy-MM-dd HH:mm" format="yyyy-MM-dd HH:mm" style="width:160px" />
</el-form-item>
<el-form-item label="" prop="endRunPlan" class="noMargin" style="margin-left:10px;">
<el-checkbox v-model="model.endRunPlan" @change="changeEndRp">终到</el-checkbox>
</el-form-item>
<el-form-item label="" prop="electrical" class="noMargin" style="margin-left:80px;">
<el-checkbox v-model="model.electrical">电力</el-checkbox>
</el-form-item>
<el-form-item label="" prop="passenger" class="noMargin" style="margin-left:10px;">
<el-checkbox v-model="model.passenger">办理客运</el-checkbox>
</el-form-item>
<el-form-item label="" prop="transfinite" style="margin-left:20px;" class="noMargin">
<el-select v-model="model.transfinite" placeholder="" style="width:110px">
<el-option
v-for="item in transfiniteList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<br>
<el-form-item label="" prop="trackDiscordant" style="margin-left:80px;width: 220px;" class="noMargin">
<el-checkbox v-model="model.trackDiscordant">运行股道与基本径路不一致</el-checkbox>
</el-form-item>
<el-form-item label="" prop="entryOutDiscordant" style="margin-left:90px;width: 220px;" class="noMargin">
<el-checkbox v-model="model.entryOutDiscordant">出入口与基本径路不一致</el-checkbox>
</el-form-item>
<!-- trackDiscordant -->
<!-- 运行股道与基本径路不一致 -->
<!-- entryOutDiscordant -->
<!-- 出入口与基本径路不一致 -->
<!-- keyTrains
重点列车 -->
</el-form>
<el-row justify="center" style="margin-top:10px">
<el-col :span="7" :offset="5">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="7" :offset="2">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import { transfiniteList, trainTypeList } from '@/scripts/ConstDic';
import { mapGetters } from 'vuex';
export default {
name: 'AddDispatcherLogerRunplan',
data() {
var validateTripNumber = (rule, value, callback) => {
if (value) {
const judge = /^[a-zA-Z0-9]*[\d]$/.test(value);
if (judge) {
if (value.toString().length > 6 || value.toString().length < 2) {
callback('车次长度2-6位');
} else {
callback();
}
} else {
callback('字母+数字,最后一位数字');
}
} else {
// callback('');
callback();
}
};
return {
dialogShow: false,
loading: false,
mapStationDirectionList:[],
filterArrMapStationDirectionList:[],
filterDepMapStationDirectionList:[],
filterArrSectionList:[],
filterDepSectionList:[],
filterSectionList:[],
trainTypeList:trainTypeList,
runTypeList:[
{name:'快速旅客列车', code:'FAST_PASSENGER_TRAIN' }
],
transfiniteList:transfiniteList,
model:{
// runPlanCode:'', //
trainType:'LOCAL_EXPRESS_PASSENGER_TRAIN', //
runType:'FAST_PASSENGER_TRAIN', //
stationCode:'', //
// groupNumber:'', // :
arriveSectionCode:'', //
arrivePlanTime:'', //
arriveTripNumber:'', //
// arriveStationCode:'', //
arriveDirectionCode:'', //
departSectionCode:'', //
departPlanTime:'', //
departTripNumber:'', //
// departStationCode:'', //
departDirectionCode:'', //
startRunPlan:false, // true,false
endRunPlan:false, // true,false
electrical:false, // true,false
passenger:false, // true,false
// keyTrains:false, // true,false
// military:false, // true,false
trackDiscordant:false, //
entryOutDiscordant:false, //
transfinite:'NO' // NO TRANSFINITE_SUPER TRANSFINITE_ONE_LEVEL TRANSFINITE_TWO_LEVEL
},
rules: {
stationCode:[
{ required: true, message: '请选择车站', trigger: 'blur' },
{ required: true, message: '请选择车站', trigger: 'change' }
],
arriveTripNumber:[
{ required: true, validator: validateTripNumber, trigger: 'blur' }
],
departTripNumber:[
{ required: true, validator: validateTripNumber, trigger: 'blur' }
]
}
};
},
computed: {
...mapGetters('map', [
'stationList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.CTCCommand.addDispatcherLogerRp.menu.domId : '';
},
title() {
return '增加阶段计划车次';
}
},
methods: {
doShow({filterSectionList, mapStationDirectionList}) {
this.mapStationDirectionList = mapStationDirectionList;
this.filterSectionList = filterSectionList;
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
changeStation(stationCode) {
this.filterArrMapStationDirectionList = this.mapStationDirectionList.filter(each=>{ return each.stationCode == stationCode; });
this.filterDepMapStationDirectionList = this.mapStationDirectionList.filter(each=>{ return each.stationCode == stationCode; });
this.filterArrSectionList = this.filterSectionList.filter(each=>{ return each.stationCode == stationCode; });
this.filterDepSectionList = this.filterSectionList.filter(each=>{ return each.stationCode == stationCode; });
},
changeEndRp(data) {
if (data) {
this.model.departSectionCode = '';
this.model.departPlanTime = '';
this.model.departTripNumber = '';
this.model.departDirectionCode = '';
}
},
changeStartRp(data) {
if (data) {
this.model.arriveSectionCode = '';
this.model.arrivePlanTime = '';
this.model.arriveTripNumber = '';
this.model.arriveDirectionCode = '';
}
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.model = {
trainType:'LOCAL_EXPRESS_PASSENGER_TRAIN', //
runType:'FAST_PASSENGER_TRAIN', //
stationCode:'', //
arriveSectionCode:'', //
arrivePlanTime:'', //
arriveTripNumber:'', //
// arriveStationCode:'', //
arriveDirectionCode:'', //
departSectionCode:'', //
departPlanTime:'', //
departTripNumber:'', //
// departStationCode:'', //
departDirectionCode:'', // )
startRunPlan:false, // true,false
endRunPlan:false, // true,false
electrical:false, // true,false
passenger:false, // true,false
trackDiscordant:false, //
entryOutDiscordant:false, //
transfinite:'NO' // NO TRANSFINITE_SUPER TRANSFINITE_ONE_LEVEL TRANSFINITE_TWO_LEVEL
};
this.filterArrMapStationDirectionList = [];
this.filterDepMapStationDirectionList = [];
this.$store.dispatch('training/emitTipFresh');
},
commit() {
this.$refs.form.validate((valid) => {
if (valid) {
this.loading = true;
commitOperate(menuOperate.CTC.addDispatcherLogerRp, {planParam:this.model}, 3).then(({valid, response})=>{
if (valid) {
this.$emit('addDisLoger', response.data);
this.doClose();
}
}).catch(() => {
this.doClose();
this.$emit('noticeInfo');
});
}
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>
<style lang="scss">
.chengdou-03__systerm .el-dialog #AddDispatcherForm .el-form-item label{
padding-right:5px;
line-height:30px;
}
.chengdou-03__systerm .el-dialog #AddDispatcherForm .el-form-item{
margin-bottom:20px;
}
#AddDispatcherForm .el-form-item__content{
line-height:30px;
}
#AddDispatcherForm{
display: flex;
flex-direction: row;
flex-wrap: wrap;
}
#AddDispatcherForm .el-input__inner {
height: 22px !important;
line-height: 22px !important;
}
#AddDispatcherForm span.el-input__suffix .el-input__icon{
height:22px;
line-height:22px;
}
#AddDispatcherForm span.el-input__prefix .el-input__icon{
line-height:22px;
display:none;
}
#AddDispatcherForm .el-form-item.noMargin .el-form-item__content{
margin-left:0px !important;
}
#AddDispatcherForm .el-form-item.noMargin .el-checkbox__label{
padding-left: 5px;
vertical-align: top;
line-height: 30px;
}
#AddDispatcherForm .el-input--prefix .el-input__inner{
padding-left:10px;
padding-right: 26px;
}
</style>

View File

@ -0,0 +1,111 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm train-set-plan"
:title="title"
:visible.sync="show"
width="280px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="text-align: center;">
确定删除该条行车计划
</div>
<el-row justify="center" class="button-group" style="margin-top:20px">
<el-col :span="8" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="3">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default {
name: 'DeleteDispatcherLoger',
data() {
return {
dialogShow: false,
loading: false,
model:{
stationCode:'',
runPlanCode:''
}
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.CTCCommand.deleteDispatcherLogerRp.menu.domId : '';
},
title() {
return '警告';
}
},
methods: {
doShow(row) {
// stationCode
// const param = {stationCode:this.currentRow.stationCode, runPlanCode:this.currentRow.runPlanCode};
// commitOperate(menuOperate.CTC.deleteTrainFixedPath, param, 3).then(({valid})=>{
// if (valid) {
// that.$message.success('');
// }
// }).catch(() => {
// that.$message.error('');
// });
// 4. CTC_ZONE_DELETE_RUN_PLAN stationCode runPlanCode
this.model.stationCode = row.stationCode;
this.model.runPlanCode = row.runPlanCode;
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
this.loading = true;
const param = this.model;
commitOperate(menuOperate.CTC.deleteDispatcherLogerRp, param, 2).then(({valid})=>{
this.loading = false;
this.$emit('clearRpRow');
if (valid) {
this.$emit('deleteDisLoger', param);
this.doClose();
}
}).catch(() => {
this.loading = false;
this.$emit('clearRpRow');
this.doClose();
this.$emit('noticeInfo');
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$emit('clearRpRow');
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>

View File

@ -0,0 +1,491 @@
<template>
<div class="dispatcherLoger">
<div class="dispatcherLogerButton">
<div class="dispatcherLogerLine" />
<div class="dispatcherLogerBtnGroup">
<div id="addRunplan" class="dispatcherLogerClickBtn" @click="addRunplan">添加</div>
<div id="deleteRunplan" class="dispatcherLogerClickBtn" @click="deleteRunplan">删除</div>
<div id="sendRunplan" class="dispatcherLogerClickBtn" @click="sendRunplan">发送计划</div>
</div>
<div class="closeDL">
<i class="el-icon-close close_icon" @click.stop="doClose" />
</div>
</div>
<div class="dispatcherLogerContent" :style="{'height':height+'px'}">
<el-table
id="dispatcherLogerContentTable"
ref="dispatcherLogerContentTable"
:data="tableData"
border
:height="height"
highlight-current-row
style="width: 100%;border:1px #ccc solid"
@cell-click="selectedTripNumber"
>
<!-- -->
<!-- @current-change="handleCurrentChange" -->
<el-table-column
prop="tripNumber"
label=""
width="100"
>
<template slot-scope="scope">
<div>{{ scope.row.tripNumber }} {{ scope.row.status==-1?'(删)':'' }}</div>
</template>
</el-table-column>
<el-table-column width="155" prop="trainType" label="列车类型">
<template slot-scope="scope">
<div v-if="scope.row.trainType" class="accessName">
{{ trainTypeMap[scope.row.trainType] }}
</div>
</template>
</el-table-column>
<!-- <el-table-column width="155" prop="runType" label="运行类型">
<template slot-scope="scope">
<div v-if="scope.row.runType" class="accessName">
{{ runTypeMap[scope.row.runType].name }}
</div>
</template>
</el-table-column> -->
<el-table-column width="155" prop="arriveTripNumber" label="到达车次">
<template slot-scope="scope">{{ scope.row.arriveTripNumber }}</template>
</el-table-column>
<el-table-column width="155" prop="departTripNumber" label="发车车次">
<template slot-scope="scope">{{ scope.row.departTripNumber }}</template>
</el-table-column>
<!-- runPlanCode:"", stationCode:"", tripNumber:"", groupNumber:"",
trackSectionCode:"", arriveSectionCode:"", departSectionCode:"",
arriveTime:"", departTime:"", arrivePlanTime:"", departPlanTime:"",
arriveTripNumber:"", departTripNumber:"",
startRunPlan: null/false/true,endRunPlan: null/false/true,
electrical: null/false/true,passenger: null/false/true,
keyTrains: null/false/true,military: null/false/true,
trackDiscordant:null/false/true, entryOutDiscordant: null/false/true,
transfinite: NO/TRANSFINITE_SUPER/TRANSFINITE_ONE_LEVEL/TRANSFINITE_TWO_LEVEL -->
<!-- width="155" -->
<el-table-column prop="arriveDirectionCode" label="接车口">
<template slot-scope="scope">
<div v-if="scope.row.arriveDirectionCode" class="accessName" :title="scope.row.arriveDirectionCode">
<!-- {{ mapStationDirectionData[scope.row.arriveDirectionCode].name }} -->
<el-select
v-model="tableData[scope.$index].arriveDirectionCode"
placeholder=""
size="mini"
:disabled="scope.row.status==-1"
popper-class="stationSelect"
@change="changeArriveDirectionCode($event,scope.row,scope.$index)"
>
<el-option
v-for="item in mapStationDirectionData.filter(station=>{return station.stationCode == scope.row.stationCode})"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</div>
</template>
</el-table-column>
<!-- width="155" -->
<el-table-column prop="departDirectionCode" label="发车口">
<template slot-scope="scope">
<div v-if="scope.row.departDirectionCode" class="accessName" :title="scope.row.departDirectionCode">
<!-- {{ mapStationDirectionData[scope.row.departDirectionCode].name }} -->
<el-select
v-model="tableData[scope.$index].departDirectionCode"
placeholder=""
size="mini"
:disabled="scope.row.status==-1"
popper-class="stationSelect"
@change="changeDepartDirectionCode($event,scope.row,scope.$index)"
>
<el-option
v-for="item in mapStationDirectionData.filter(station=>{return station.stationCode == scope.row.stationCode})"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</div>
</template>
</el-table-column>
<el-table-column width="155" prop="arriveSectionCode" label="接车股道">
<template slot-scope="scope">
<div v-if="scope.row.arriveSectionCode" class="accessName">
<el-select
v-model="tableData[scope.$index].arriveSectionCode"
placeholder=""
size="mini"
:disabled="scope.row.status==-1"
popper-class="stationSelect"
@change="changeArriveRunPlan($event,scope.row,scope.$index)"
>
<el-option
v-for="item in filterSectionList.filter(section=>{return section.stationCode == scope.row.stationCode})"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</div>
<!--
electrical
电力
passenger
办理客运 -->
<!-- <div v-if="scope.row.arriveSectionCode" class="accessName">
{{ filterSectionMap[scope.row.arriveSectionCode].name }}
</div>
</template> -->
</template></el-table-column>
<el-table-column width="155" prop="departSectionCode" label="发车股道">
<template slot-scope="scope">
<div v-if="scope.row.departSectionCode" class="accessName">
<el-select
v-model="tableData[scope.$index].departSectionCode"
placeholder=""
size="mini"
popper-class="stationSelect"
:disabled="scope.row.status==-1"
@change="changeDepartRunPlan($event,scope.row,scope.$index)"
>
<el-option
v-for="item in filterSectionList.filter(section=>{return section.stationCode == scope.row.stationCode})"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</div>
<!-- <div v-if="scope.row.departSectionCode" class="accessName">
{{ filterSectionMap[scope.row.departSectionCode].name }}
</div> -->
</template>
</el-table-column>
<el-table-column width="175" prop="arrivePlanTime" label="到达时间">
<template slot-scope="scope">
<div v-if="scope.row.arrivePlanTime" class="accessName">
<!-- {{ scope.row.arrivePlanTime }} -->
<el-date-picker v-model="scope.row.arrivePlanTime" size="mini" type="datetime" value-format="yyyy-MM-dd HH:mm" format="yyyy-MM-dd HH:mm" style="width:165px" @change="changeArrivePlanTime($event,scope.row,scope.$index)" />
</div>
</template>
</el-table-column>
<el-table-column width="175" prop="departPlanTime" label="出发时间">
<template slot-scope="scope">
<div v-if="scope.row.departPlanTime" class="accessName">
<!-- {{ scope.row.departPlanTime }} -->
<el-date-picker v-model="scope.row.departPlanTime" size="mini" type="datetime" value-format="yyyy-MM-dd HH:mm" style="width:165px" format="yyyy-MM-dd HH:mm" @change="changeDepartPlanTime($event,scope.row,scope.$index)" />
</div>
</template>
</el-table-column>
</el-table>
</div>
<add-dispatcher-loger-runplan ref="addDispatcherLogerRunplan" @noticeInfo="noticeInfo" @addDisLoger="addDisLoger" />
<delete-dispatcher-loger ref="deleteDispatcherLoger" @clearRpRow="clearRpRow" @noticeInfo="noticeInfo" @deleteDisLoger="deleteDisLoger" />
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
</div>
</template>
<script>
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
// import { copyAssign } from '@/utils/index';
import {getRunplanInRailway} from '@/api/runplan';
// import AddDispatcherLogerRunplan from '@/jmapNew/theme/datie_02/menus/dialog/addDispatcherLogerRunplan';
import AddDispatcherLogerRunplan from './addDispatcherLogerRunplan';
import DeleteDispatcherLoger from './deleteDispatcherLoger';
// import DeleteDispatcherLoger from '@/jmapNew/theme/datie_02/menus/dialog/deleteDispatcherLoger';
import { mapGetters } from 'vuex';
export default {
name:'DispatcherLoger',
components: {
NoticeInfo,
AddDispatcherLogerRunplan,
DeleteDispatcherLoger
},
data() {
return {
height: this.$store.state.app.height - 37,
filterSectionList:[],
mapStationDirectionData:[],
// filterSectionMap:{},
tableData:[],
group:'',
currentRow:null,
trainTypeMap:{
'LOCAL_EXPRESS_PASSENGER_TRAIN':'管内特快旅客列车',
'LOCAL_FAST_PASSENGER_TRAIN':'管内快速旅客列车',
'LOCAL_PASSENGER_TRAIN':'管内普通旅客快车',
'LOCAL_SLOW_PASSENGER_TRAIN':'管内普通旅客慢车',
'LOCAL_TEMPORARY_PASSENGER_TRAIN':'管内临时旅客列车',
'LOCAL_TEMPORARY_TOURIST_TRAIN':'管内临时旅游列车',
'FAST_PASSENGER_TRAIN':'跨局快速旅客列车',
'TEMPORARY_TOURIST_TRAIN':'跨局临时旅游列车',
'TWO_PASSENGER_TRAIN':'跨两局普通旅客快车',
'TWO_SLOW_PASSENGER_TRAIN':'跨两局普通旅客慢车',
'TWO_TEMPORARY_PASSENGER_TRAIN':'跨两局临时旅客列车',
'MORE_PASSENGER_TRAIN':'跨三局及其以上普通旅客快车',
'BACK_FACTORY_PASSENGER_TRAIN':'回送出入厂客车底列车',
'FAULT_TRUE_BACK_PASSENGER_TRAIN':'因故折返旅客列车'
},
runTypeMap:{'FAST_PASSENGER_TRAIN':'快速旅客列车'}
};
},
computed: {
...mapGetters('map', [
'sectionList'
])
},
watch:{
// '$store.state.socket.railwaySimulationRpChange': function (val) {
// this.loadData();
// }
'$store.state.map.mapDataLoadedCount': function (val) { //
this.loadData();
},
// 仿-仿
'$store.state.socket.simulationReset': function (val) { //
this.loadData();
}
},
mounted() {
this.group = this.$route.query.group;
this.loadFilterSectionMap();
this.mapStationDirectionData = Object.values(this.$store.state.map.mapStationDirectionData);
},
beforeDestroy() {
this.rpMenuPopShow = false;
this.clearRpRow();
},
methods:{
loadData() {
getRunplanInRailway(this.group).then(response => {
this.tableData = response.data || [];
}).catch(()=>{
this.tableData = [];
});
this.tableData = [];
//
// const railwaySimulationRpMsg = copyAssign({}, this.$store.state.socket.railwaySimulationRpMsg);
// this.tableData = Object.values(railwaySimulationRpMsg);
},
loadFilterSectionMap() {
// this.filterSectionMap = {};
// this.sectionList.forEach(section=>{
// if (section.standTrack) {
// this.filterSectionMap[section.code] = {code:section.code, name:section.name};
// }
// });
this.filterSectionList = [];
this.filterSectionList = this.sectionList.filter(section=>{
return section.standTrack;
});
},
addDisLoger(model) {
this.tableData.unshift(model);
},
deleteDisLoger(model) {
this.tableData.map(data=>{
if (data.stationCode == model.stationCode && data.runPlanCode == model.runPlanCode) {
data.status = -1;
}
});
},
changeArriveRunPlan(event, row, index) {
this.modifyDispatcherLogerRpSection(row, row.arriveSectionCode, 'R');
},
changeDepartRunPlan(event, row, index) {
this.modifyDispatcherLogerRpSection(row, row.departSectionCode, 'D');
},
changeArrivePlanTime(event, row, index) {
this.modifyDispatcherLogerRpPlanTime(row, row.arrivePlanTime, 'R');
},
changeDepartPlanTime(event, row, index) {
this.modifyDispatcherLogerRpPlanTime(row, row.departPlanTime, 'D');
},
changeArriveDirectionCode(event, row, index) {
this.modifyDispatcherLogerRpDirection(row, row.arriveDirectionCode, 'R');
},
changeDepartDirectionCode(event, row, index) {
this.modifyDispatcherLogerRpDirection(row, row.departDirectionCode, 'D');
},
//
modifyDispatcherLogerRpDirection(row, directionCode, type) {
const params = {stationCode:row.stationCode, runPlanCode:row.runPlanCode, directionCode:directionCode, model:type};
commitOperate(menuOperate.CTC.modifyDispatcherLogerRpDirection, params, 3).then(({valid, response})=>{
if (valid) {
const reslut = response.data;
this.tableData.map(data=>{
if (data.stationCode == reslut.stationCode && data.runPlanCode == reslut.runPlanCode) {
data.arriveDirectionCode = reslut.arriveDirectionCode;
data.departDirectionCode = reslut.departDirectionCode;
}
});
}
}).catch(() => {
// this.$message.error('');
});
},
//
modifyDispatcherLogerRpPlanTime(row, planTime, type) {
const params = {stationCode:row.stationCode, runPlanCode:row.runPlanCode, planTime:planTime, model:type};
commitOperate(menuOperate.CTC.modifyDispatcherLogerRpPlanTime, params, 3).then(({valid, response})=>{
if (valid) {
const reslut = response.data;
this.tableData.map(data=>{
if (data.stationCode == reslut.stationCode && data.runPlanCode == reslut.runPlanCode) {
data.arrivePlanTime = reslut.arrivePlanTime;
data.departPlanTime = reslut.departPlanTime;
}
});
}
}).catch(() => {
// this.$message.error('');
});
},
//
modifyDispatcherLogerRpSection(row, sectionCode, type) {
// stationCode
// runPlanCode
// sectionCode
// model R,D
const params = {stationCode:row.stationCode, runPlanCode:row.runPlanCode, sectionCode:sectionCode, model:type};
commitOperate(menuOperate.CTC.modifyDispatcherLogerRpSection, params, 3).then(({valid, response})=>{
if (valid) {
const reslut = response.data;
this.tableData.map(data=>{
if (data.stationCode == reslut.stationCode && data.runPlanCode == reslut.runPlanCode) {
data.arriveSectionCode = reslut.arriveSectionCode;
data.departSectionCode = reslut.departSectionCode;
}
});
}
}).catch(() => {
// this.$message.error('');
});
},
//
sendRunplan() {
// stationSignRunplan
const that = this;
this.$confirm('确定发布所有行车计划?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
commitOperate(menuOperate.CTC.releaseAllDispatcherLogerRp, {}, 3).then(({valid})=>{
if (valid) {
that.$message.success('发布成功!');
}
}).catch(() => {
that.$message.error('发布失败');
});
}).catch(e => {});
},
clearRpRow() {
this.currentRow = null;
this.$refs.dispatcherLogerContentTable.setCurrentRow();
},
deleteRunplan() {
if (this.currentRow) {
const param = {stationCode:this.currentRow.stationCode, runPlanCode:this.currentRow.runPlanCode};
this.$refs.deleteDispatcherLoger.doShow(param);
}
},
addRunplan() {
this.$refs.addDispatcherLogerRunplan.doShow({
filterSectionList:this.filterSectionList,
mapStationDirectionList:this.mapStationDirectionData
});
},
selectedTripNumber(row, column, cell, event) {
this.currentRow = row;
},
noticeInfo() {
this.$refs.noticeInfo.doShow();
}
}
};
</script>
<style lang="scss" scoped>
.dispatcherLoger{
z-index: 60;
position: absolute;
width: 100%;
top: 0;
left: 0;
background: #fff;
}
.dispatcherLogerButton{
height: 37px;
background: #f0f0f0;
border: 1px #a5a5a5 solid;
margin-top: 1px;
display: flex;
flex-direction: row;
align-items: flex-start;
margin-left:10px;
}
.dispatcherLogerLine{
margin-top: 1px;
height: 31px;
width: 4px;
border: 1px #b3b3b2 solid;
margin-left: 2px;
background: #f7f7f7;
}
.dispatcherLogerBtnGroup{
display: flex;
flex-direction: row;
align-items: flex-start;
margin-left: 45px;
}
.dispatcherLogerClickBtn{
background: #f0f0f0;
font-size: 13px;
border-top: 2px #e0e0e0 solid;
border-left: 2px #e0e0e0 solid;
border-bottom: 2px #4c4c4c solid;
border-right: 2px #4c4c4c solid;
padding: 6px 15px;
margin-top: 2px;
cursor:pointer;
margin-left: 3px;
}
.dispatcherLogerContent{
width: 100%;
background:#fff;
border-top: 3px #818181 solid;
border-left: 3px #818181 solid;
overflow-x: auto;
overflow-y: hidden;
position: relative;
}
.close_icon{
}
.closeDL{
position: absolute;
right:10px;
top:5px;
padding:5px;;
cursor: pointer;
}
</style>
<style lang="scss">
#dispatcherLogerContentTable.el-table td, #dispatcherLogerContentTable.el-table th{
padding-top: 5px;
padding-bottom: 5px;
border-color: #a5a5a5;
}
#dispatcherLogerContentTable.el-table .cell{ padding-left: 5px;padding-right: 5px; text-align: center;font-size: 13px;}
#dispatcherLogerContentTable .el-table__body tr.current-row>td{
background-color: #6aa8ec;
color: #fff;
}
</style>

View File

@ -10,10 +10,9 @@
<traffic-terminal-work v-else-if="picture === 'trafficTerminal'" ref="trafficTerminalWork" :centralized-station-map="centralizedStationMap" />
<ibp-plate v-else-if="picture === 'ibp'" ref="ibpPlate" />
<big-train-runplan-manage v-else-if="picture === 'trafficManageTerminal'" ref="bigTrainRunplanManage" />
<dispatch-cmd v-if="datie" ref="dispatchCmd" @close="close" />
<dispatcher-loger v-if="datie" ref="dispatcherLoger" @close="close" />
<dispatch-cmd v-else-if="picture === 'dispatchingCommand'" ref="dispatchCmd" />
<dispatcher-loger v-else-if="picture === 'schedulingPlan'" ref="dispatcherLoger" />
<terminal-menu v-if="menuShow" ref="terminalMenu" @pictureChange="pictureChange" @popupTerminalShow="popupTerminalShow" @loadingChange="loadingChange" />
</div>
</template>
@ -25,8 +24,8 @@ import { defaultCallback, stateCallback } from '@/utils/subscribeCallback';
import DispatcherWork from './dispatchWork';
import LocalWork from './localWork';
import TerminalMenu from './terminalMenu';
import DispatchCmd from '@/views/dispatcherStationManage/dispatchCmd';
import DispatcherLoger from '@/views/dispatcherLoger/index';
import DispatchCmd from './dispatchCmd';
import DispatcherLoger from './dispatcherLoger/index';
import Jl3dDrive from '@/views/jlmap3d/drive/jl3ddrive';
import Jl3dDevice from '@/views/jlmap3d/device/jl3ddevice';
import Jl3dPassflow from '@/views/jlmap3d/passflow/jl3dpassflow';

View File

@ -50,13 +50,13 @@ export default {
name: '调度计划',
code: 'schedulingPlan',
roleList: ['DISPATCHER'],
click: this.schedulingPlan
click: this.changePictureShow
},
{
name: '调度命令',
code: 'dispatchingCommand',
roleList: ['DISPATCHER'],
click: this.dispatchingCommand
click: this.changePictureShow
}
],
'subway': [
@ -147,10 +147,6 @@ export default {
this.active = code;
this.$emit('popupTerminalShow', 'dispatcherLoger');
},
dispatchingCommand(code) {
this.active = code;
this.$emit('popupTerminalShow', 'dispatchCmd');
},
close() {
this.active = 0;
},

View File

@ -12,7 +12,7 @@
</el-dialog>
</template>
<script>
import { getDisStationList, deleteDisStation } from '@/api/disStation.js';
import { getDisStationListPaged, deleteDisStation } from '@/api/disStation';
import { mapGetters } from 'vuex';
export default {
name:'BigRouteDetail',
@ -101,7 +101,7 @@ export default {
},
queryFunction(params) {
if (this.mapInfo && this.mapInfo.id) {
return getDisStationList(this.mapInfo.id, params);
return getDisStationListPaged(this.mapInfo.id, params);
}
},
getNameList(codeList) {

View File

@ -23,9 +23,10 @@
<el-select v-if="item.type === 'DRIVER'" v-model="item.deviceCode" placeholder="请选择" size="mini">
<el-option v-for="elem in trainList" :key="elem.groupNumber" :label="elem.groupNumber" :value="elem.groupNumber" />
</el-select>
<el-select v-else v-model="item.deviceCode" placeholder="请选择" size="mini">
<el-select v-else-if="stationShow.includes(item.type)" v-model="item.deviceCode" placeholder="请选择" size="mini">
<el-option v-for="elem in stationList" :key="elem.code" :label="elem.name" :value="elem.code" />
</el-select>
<span v-else>--</span>
</el-col>
<el-col :span="5" :offset="1" style="text-align: center;">
<el-button type="primary" size="mini" @click="deleteMember(index, 'METRO')">删除</el-button>
@ -51,12 +52,16 @@
</el-select>
</el-col>
<el-col :span="5" :offset="1">
<el-select v-if="item.type === 'DRIVER'" v-model="item.deviceCode" placeholder="请选择" size="mini">
<el-select v-if="item.type === 'DISPATCHER'" v-model="item.deviceCode" placeholder="请选择" size="mini">
<el-option v-for="elem in disStationList" :key="elem.id" :label="elem.name" :value="elem.code" />
</el-select>
<el-select v-else-if="item.type === 'DRIVER'" v-model="item.deviceCode" placeholder="请选择" size="mini">
<el-option v-for="elem in trainList" :key="elem.groupNumber" :label="elem.groupNumber" :value="elem.groupNumber" />
</el-select>
<el-select v-else v-model="item.deviceCode" placeholder="请选择" size="mini">
<el-select v-else-if="stationShow.includes(item.type)" v-model="item.deviceCode" placeholder="请选择" size="mini">
<el-option v-for="elem in stationList" :key="elem.code" :label="elem.name" :value="elem.code" />
</el-select>
<span v-else>--</span>
</el-col>
<el-col :span="5" :offset="1" style="text-align: center;">
<el-button type="primary" size="mini" @click="deleteMember(index, 'METRO')">删除</el-button>
@ -85,9 +90,10 @@
<el-select v-if="item.type === 'DRIVER'" v-model="item.deviceCode" placeholder="请选择" size="mini">
<el-option v-for="elem in trainList" :key="elem.groupNumber" :label="elem.groupNumber" :value="elem.groupNumber" />
</el-select>
<el-select v-else v-model="item.deviceCode" placeholder="请选择" size="mini">
<el-select v-else-if="stationShow.includes(item.type)" v-model="item.deviceCode" placeholder="请选择" size="mini">
<el-option v-for="elem in stationList" :key="elem.code" :label="elem.name" :value="elem.code" />
</el-select>
<span v-else>--</span>
</el-col>
<el-col :span="5" :offset="1" style="text-align: center;">
<el-button type="primary" size="mini" @click="deleteMember(index, 'METRO')">删除</el-button>
@ -232,18 +238,6 @@
<el-input-number v-model="batchForm.ELECTRIC_DISPATCHER" size="small" :min="0" :step="1" :precision="0" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="上级部分:" prop="PARENT_DEPARTMENT">
<el-input-number v-model="batchForm.PARENT_DEPARTMENT" size="small" :min="0" :step="1" :precision="0" />
</el-form-item>
</el-col>
</el-row>
<el-row v-if="batchForm.systemType === 'METRO'">
<el-col :span="12">
<el-form-item label="派班员:" prop="SCHEDULING">
<el-input-number v-model="batchForm.SCHEDULING" size="small" :min="0" :step="1" :precision="0" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="车务段段长:" prop="TRAIN_MASTER">
<el-input-number v-model="batchForm.TRAIN_MASTER" size="small" :min="0" :max="1" :step="1" :precision="0" />
@ -296,6 +290,7 @@
<script>
import {mapGetters} from 'vuex';
import { getDisStationList } from '@/api/disStation';
export default {
name: 'SimulationMember',
data() {
@ -319,8 +314,6 @@ export default {
{label: '车站工务工', value: 'STATION_WORKER'},
{label: '车务段段长', value: 'TRAIN_MASTER'},
{label: '工电调度', value: 'ELECTRIC_DISPATCHER'},
{label: '上级部分', value: 'PARENT_DEPARTMENT'},
{label: '派班员', value: 'SCHEDULING'},
{label: '设备管理员', value: 'DEVICE_MANAGER'}
],
systemList: [
@ -351,8 +344,6 @@ export default {
STATION_WORKER: 0,
TRAIN_MASTER: 0,
ELECTRIC_DISPATCHER: 0,
PARENT_DEPARTMENT: 0,
SCHEDULING: 0,
DEVICE_MANAGER: 0,
systemType: 'METRO'
},
@ -361,7 +352,10 @@ export default {
},
clearForm: {
systemType: 'METRO'
}
},
disStationList: [],
stationShow: ['STATION_SUPERVISOR', 'DEPOT_DISPATCHER', 'SIGNAL_BUILDING', 'STATION_ASSISTANT', 'STATION_MASTER', 'STATION_SIGNALER', 'STATION_PASSENGER', 'STATION_SWITCH_MAN',
'STATION_FACILITATOR', 'STATION_WORKER', 'DEVICE_MANAGER']
};
},
computed: {
@ -382,8 +376,16 @@ export default {
},
watch: {
},
mounted() {
this.initDisStationList();
},
methods: {
initDisStationList() {
getDisStationList(this.$route.params.mapId).then(resp => {
this.disStationList = resp.data || [];
}).catch(e => { this.$message.error('获取调度台数据失败!'); });
},
getMemberId(systemType) {
let id = '1';
const memberMap = { METRO: this.memberMetroList, RAILWAY: this.memberRailwayList, EMERGENCY: this.memberEmergencyList };
@ -396,17 +398,33 @@ export default {
const memberMap = { METRO: this.memberMetroList, RAILWAY: this.memberRailwayList, EMERGENCY: this.memberEmergencyList };
memberMap[type].splice(index, 1);
},
batchCreate() {
async batchCreate() {
const memberMap = { METRO: this.memberMetroList, RAILWAY: this.memberRailwayList, EMERGENCY: this.memberEmergencyList };
if (this.batchForm.DISPATCHER) {
for (let i = 0; i < this.batchForm.DISPATCHER; i++) {
const member = {
id: this.getMemberId(this.batchForm.systemType),
name: '',
type: 'DISPATCHER',
deviceCode: ''
};
memberMap[this.batchForm.systemType].push(member);
if (this.batchForm.systemType === 'RAILWAY') {
const resp = await getDisStationList(this.$route.params.mapId);
this.disStationList = resp.data || [];
for (let i = 0; i < this.batchForm.DISPATCHER; i++) {
this.disStationList.forEach(disStation => {
const member = {
id: this.getMemberId(this.batchForm.systemType),
name: '',
type: 'DISPATCHER',
deviceCode: disStation.code
};
memberMap[this.batchForm.systemType].push(member);
});
}
} else {
for (let i = 0; i < this.batchForm.DISPATCHER; i++) {
const member = {
id: this.getMemberId(this.batchForm.systemType),
name: '',
type: 'DISPATCHER',
deviceCode: ''
};
memberMap[this.batchForm.systemType].push(member);
}
}
}
this.stationList.forEach(station => {
@ -558,28 +576,6 @@ export default {
memberMap[this.batchForm.systemType].push(member);
}
}
if (this.batchForm.PARENT_DEPARTMENT && this.batchForm.systemType === 'METRO') {
for (let i = 0; i < this.batchForm.PARENT_DEPARTMENT; i++) {
const member = {
id: this.getMemberId(this.batchForm.systemType),
name: '',
type: 'PARENT_DEPARTMENT',
deviceCode: ''
};
memberMap[this.batchForm.systemType].push(member);
}
}
if (this.batchForm.SCHEDULING && this.batchForm.systemType === 'METRO') {
for (let i = 0; i < this.batchForm.SCHEDULING; i++) {
const member = {
id: this.getMemberId(this.batchForm.systemType),
name: '',
type: 'SCHEDULING',
deviceCode: ''
};
memberMap[this.batchForm.systemType].push(member);
}
}
this.$message.success('批量添加成功!');
this.resetForm();
},
@ -612,8 +608,6 @@ export default {
STATION_WORKER: 0,
TRAIN_MASTER: 0,
ELECTRIC_DISPATCHER: 0,
PARENT_DEPARTMENT: 0,
SCHEDULING: 0,
DEVICE_MANAGER: 0,
systemType: 'METRO'
};
@ -628,16 +622,30 @@ export default {
systemType: 'METRO'
};
},
keyGeneration() {
async keyGeneration() {
const memberMap = { METRO: this.memberMetroList, RAILWAY: this.memberRailwayList, EMERGENCY: this.memberEmergencyList };
memberMap[this.generationForm.systemType].splice(0, memberMap[this.generationForm.systemType].length);
const memberDispatcher = {
id: this.getMemberId(this.generationForm.systemType),
name: '',
type: 'DISPATCHER',
deviceCode: ''
};
memberMap[this.generationForm.systemType].push(memberDispatcher);
if (this.generationForm.systemType === 'RAILWAY') {
const resp = await getDisStationList(this.$route.params.mapId);
this.disStationList = resp.data || [];
this.disStationList.forEach(disStation => {
const memberDispatcher = {
id: this.getMemberId(this.generationForm.systemType),
name: '',
type: 'DISPATCHER',
deviceCode: disStation.code
};
memberMap[this.generationForm.systemType].push(memberDispatcher);
});
} else {
const memberDispatcher = {
id: this.getMemberId(this.generationForm.systemType),
name: '',
type: 'DISPATCHER',
deviceCode: ''
};
memberMap[this.generationForm.systemType].push(memberDispatcher);
}
this.stationList.forEach(station => {
if (!station.depot) {
const member = {
@ -762,17 +770,9 @@ export default {
const memberParentDepartment = {
id: this.getMemberId(this.generationForm.systemType),
name: '',
type: 'PARENT_DEPARTMENT',
deviceCode: ''
};
memberMap[this.generationForm.systemType].push(memberParentDepartment);
const memberScheduling = {
id: this.getMemberId(this.batchForm.systemType),
name: '',
type: 'SCHEDULING',
deviceCode: ''
};
memberMap[this.batchForm.systemType].push(memberScheduling);
}
this.$message.success('一键生成成功!');
this.resetForm();

View File

@ -16,7 +16,7 @@ const paperStateMap = {
'2': '封存',
'3': '已使用',
}
import { getExamListProject, getPapaerListOfOrg, setExamEffectivey, setExamEfficacy } from '@/api/management/exam'
import { getPapaerListOfOrg, lockPaper, unlockPaper, deletePaper } from '@/api/management/exam'
import { getPublishMapListOnline } from '@/api/jmap/map'
export default {
@ -39,10 +39,6 @@ export default {
type: 'text',
label: '试卷名称:',
},
// creatorName: {
// type: 'text',
// label: ':'
// },
state: {
type: 'select',
label: '状态:',
@ -53,7 +49,6 @@ export default {
},
},
examQueryList: {
// query: getExamListProject,
query: obj => getPapaerListOfOrg({ ...obj, orgId: this.orgId }),
selectCheckShow: false,
indexShow: false,
@ -63,32 +58,8 @@ export default {
prop: 'name',
},
{
title: '归属地图',
prop: 'mapId',
type: 'tag',
width: '200',
columnValue: row => {
return this.$convertField(row.mapId, this.mapIdList, ['id', 'name'])
},
tagType: row => {
return ''
},
},
{
title: '产品类型',
prop: 'prdType',
type: 'tag',
width: '110',
columnValue: row => {
if (row.prdType === '01') {
return '现地工作站'
} else if (row.prdType === '02') {
return '行调工作站'
}
},
tagType: row => {
return ''
},
title: '简介',
prop: 'profile',
},
{
title: '状态',
@ -98,21 +69,7 @@ export default {
columnValue: row => {
return paperStateMap[row.state]
},
tagType: row => {
return ''
},
},
{
title: '试卷规则状态',
prop: 'abnormal',
type: 'tag',
width: '80',
columnValue: row => {
return row.abnormal ? '异常' : '正常'
},
tagType: row => {
return row.abnormal ? 'danger' : 'success'
},
tagType: row => '',
},
{
title: '开始时间',
@ -144,6 +101,7 @@ export default {
title: '创建人',
prop: 'creatorName',
width: '150',
formatter: row => row.creatorInfo.name,
},
{
type: 'button',
@ -162,26 +120,34 @@ export default {
},
{
name: '编辑',
handleClick: this.handleEditExam,
handleClick: this.handleEdit,
type: 'primary',
showControl: row => {
return row.creatorId == this.userId
return row.creatorId == this.userId && row.state === 1
},
},
{
name: '启用',
handleClick: this.handleEnableExam,
name: '封存',
handleClick: this.handleLock,
type: 'warning',
showControl: row => {
return row.creatorId == this.userId /* && row.status == '0' */
return row.creatorId == this.userId && row.state === 1
},
},
{
name: '禁用',
handleClick: this.handleDeleteExam,
name: '解封',
handleClick: this.handleUnlock,
type: 'danger',
showControl: row => {
return row.creatorId == this.userId /* && row.status == '1' */
return row.creatorId == this.userId && row.state === 2
},
},
{
name: '删除',
handleClick: this.handleDelete,
type: 'danger',
showControl: row => {
return row.creatorId == this.userId && row.state === 1
},
},
],
@ -200,11 +166,6 @@ export default {
},
},
created() {
// const params = localStore.get(this.$route.path) || {}
// if (!params.status) {
// params.status = '1'
// }
// localStore.set(this.$route.path, params)
this.mapIdList = []
getPublishMapListOnline().then(response => {
this.mapIdList = response.data
@ -217,49 +178,67 @@ export default {
handleGradeStatistics(index, row) {
this.$router.push({ path: '/info/gradeStatistics', query: { examId: row.id, name: row.name } })
},
handleEditExam(index, row) {
handleEdit(index, row) {
this.$router.push({ path: `/info/examRule/draft/edit/${row.id}`, query: { source: 'org' } })
},
examCreate() {
this.$router.push({ path: `/info/examRule/draft/add/0`, query: { source: 'org' } })
},
handleEnableExam(index, data) {
setExamEffectivey(data)
handleLock(index, data) {
lockPaper(data.id)
.then(res => {
this.examRefresh()
this.$message.success('启用试卷成功!')
this.$message.success('封存试卷成功!')
})
.catch(error => {
this.$message.error('启用试卷失败:' + error.message)
this.$message.error('封存试卷失败:' + error.message)
})
},
handleDeleteExam(index, data) {
this.$confirm('该操作将禁用试卷,是否继续?', this.$t('global.tips'), {
handleUnlock(index, data) {
this.$confirm('该操作将解封试卷,是否继续?', this.$t('global.tips'), {
confirmButtonText: this.$t('global.confirm'),
cancelButtonText: this.$t('global.cancel'),
type: 'warning',
})
.then(() => {
setExamEfficacy(data)
unlockPaper(data.id)
.then(res => {
this.examRefresh()
this.$message({
type: 'success',
message: '禁用试卷成功!',
message: '解封试卷成功!',
})
})
.catch(res => {
if (res.code == '10004') {
this.$message({ type: 'error', message: '禁用失败:试卷已被使用,无法禁用!' })
this.$message({ type: 'error', message: '解封失败:试卷已被使用,无法解封!' })
} else if (res.code == '10003') {
this.$message({ type: 'warning', message: '禁用失败:无权限禁用!' })
this.$message({ type: 'warning', message: '解封失败:无权限解封!' })
} else {
this.$message({ type: 'error', message: '禁用试卷失败!' })
this.$message({ type: 'error', message: '解封试卷失败!' })
}
})
})
.catch(() => {})
},
handleDelete(index, data) {
this.$confirm('确定删除该试卷吗?', this.$t('global.tips'), {
confirmButtonText: this.$t('global.confirm'),
cancelButtonText: this.$t('global.cancel'),
type: 'warning',
})
.then(() => deletePaper(data.id))
.then(resp => {
this.examRefresh()
this.$message({
type: 'success',
message: '删除成功!',
})
})
.catch(res => {
this.$message({ type: 'error', message: '删除试卷失败!' })
})
},
examRefresh() {
this.$nextTick(() => {
this.$refs.examQueryListPage.refresh(true)

View File

@ -38,7 +38,9 @@
</el-select>
</el-form-item>
<el-form-item label="标签" prop="tags">
<el-select v-model="form.tags"></el-select>
<el-select multiple v-model="form.tags" @change="getQuestionAmount">
<el-option v-for="label in labels" :key="label" :label="label" :value="label"></el-option>
</el-select>
</el-form-item>
<el-form-item label="题目数量" prop="amount">
<el-input-number
@ -65,6 +67,7 @@
<script>
import { getQuestionAmount } from '@/api/management/exam'
import { getLabelList } from '@/api/questionBank'
export default {
name: 'EditRule',
props: {},
@ -116,6 +119,7 @@ export default {
amount: 1,
score: 1,
},
labels: [],
topicNum: 0,
dialogShow: false,
rules: {
@ -127,8 +131,10 @@ export default {
}
},
created() {
},
getLabelList().then(resp => {
this.labels = resp.data.map(v => ({ label: v, value: v }))
})
},
mounted() {},
methods: {
show(detail) {
@ -157,6 +163,7 @@ export default {
orgId: this.$store.state.user.companyId,
groupType: this.form.type,
subType: this.form.subtype,
tags: this.form.tags,
}
getQuestionAmount(param).then(resp => {
this.topicNum = resp.data

View File

@ -25,7 +25,7 @@
</template>
</el-table-column>
<el-table-column prop="score" :label="$t('publish.eachScore')" width="100" />
<el-table-column :label="$t('publish.totalScore')" width="100">
<el-table-column :label="$t('publish.totalScore')" width="90">
<template slot-scope="scope">
<span>{{ Number(scope.row.amount) * Number(scope.row.score) }}</span>
</template>
@ -35,6 +35,11 @@
<span>{{ scope.row.topicNum }}</span>
</template>
</el-table-column>
<el-table-column label="标签">
<template slot-scope="scope">
<el-tag v-for="tag in scope.row.tags" :key="tag">{{ tag }}</el-tag>
</template>
</el-table-column>
<el-table-column :label="$t('global.operate')" width="100">
<template slot-scope="scope">
<el-button type="text" size="small" @click="editRow(scope)">{{ $t('global.edit') }}</el-button>
@ -91,7 +96,6 @@ export default {
created() {},
methods: {
handleAdd() {
this.changeCourseDisable()
this.$refs.addRule.show()
},
handleRuleSubmit(formData, isEdit) {
@ -112,35 +116,11 @@ export default {
const index = data.$index
this.ruleList.splice(index, 1)
},
//
changeCourseDisable() {
this.trainingTypeList.forEach(item => {
item.disabled = false
})
for (const val in this.operationTypeMap) {
this.operationTypeMap[val].forEach(item => {
item.disabled = false
})
}
this.ruleList.forEach(ele => {
this.trainingTypeList.forEach(item => {
if (ele.trainingType == item.value && !ele.operateType) {
item.disabled = true
}
})
;(this.operationTypeMap[ele.trainingType] || []).forEach(item => {
if (ele.operateType && ele.operateType == item.value) {
item.disabled = true
}
})
})
},
checkTotolScores() {
console.log(this.currentTotalScore === this.examData.fullScore)
return this.currentTotalScore === this.examData.fullScore
},
editRow(data) {
this.changeCourseDisable()
this.editingIndex = data.$index
const list = JSON.stringify(data.row)
const detail = JSON.parse(list)

View File

@ -2,7 +2,7 @@
<el-dialog
width="30%"
:title="title"
:before-close="close"
:before-close="close"
:visible.sync="visible"
center
>
@ -17,30 +17,18 @@
<el-option label="应急调度" value="EMERGENCY" />
</el-select>
</el-form-item>
<el-form-item label="使用方式:" prop="usage">
<el-select v-model="ruleForm.usage" placeholder="请选择使用方式" @change="usageChange">
<el-option label="单角色仿真" value="SINGLE_MEMBER" />
<el-option label="单客户端仿真" value="SINGLE_CLIENT" />
<el-option label="综合演练" value="JOINT" />
</el-select>
</el-form-item>
<el-form-item v-if="ruleForm.usage === 'SINGLE_CLIENT'" label="客户端:" prop="client">
<el-select v-model="ruleForm.client" placeholder="请选择使用客户端" @change="clientChange">
<el-form-item label="客户端:" prop="client">
<el-select v-model="ruleForm.client" clearable placeholder="请选择使用客户端" @change="clientChange">
<el-option v-for="option in clientList" :key="option.value" :label="option.label" :value="option.value" />
</el-select>
</el-form-item>
<el-form-item v-if="ruleForm.usage === 'SINGLE_MEMBER'" label="成员类型:" prop="memberType">
<el-select v-model="ruleForm.memberType" placeholder="请选择成员类型" @change="memberTypeChange">
<el-option v-for="option in roleList" :key="option.value" :label="option.label" :value="option.value" />
</el-select>
</el-form-item>
<el-form-item label="仿真成员:" prop="memberId">
<el-select v-model="ruleForm.memberId" placeholder="请选择仿真成员">
<el-option v-for="option in memberList" :key="option.value" :label="option.label" :value="option.value" />
</el-select>
</el-form-item>
<el-form-item label="功能:" prop="function">
<el-select v-model="ruleForm.function" placeholder="请选择功能">
<el-select v-model="ruleForm.function" clearable placeholder="请选择功能">
<el-option label="大客流" value="LPF" />
<el-option label="实训室" value="TRAINING_ROOM" />
<el-option label="实训设计" value="TRAINING_DESIGN" />
@ -62,6 +50,23 @@
placeholder="请输入内容"
/>
</el-form-item>
<el-row>
<el-col :span="8">
<el-form-item label="单客户端:" prop="singleClient">
<el-checkbox v-model="ruleForm.singleClient" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="单角色类型:" prop="singleMember">
<el-checkbox v-model="ruleForm.singleMember" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="含有实训:" prop="hasTraining">
<el-checkbox v-model="ruleForm.hasTraining" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="close"> </el-button>
@ -94,12 +99,6 @@ export default {
type: [
{ required: true, message: '请选择子系统类型', trigger: 'change' }
],
usage: [
{ required: true, message: '请选择使用方式', trigger: 'change' }
],
memberType: [
{ required: true, message: '请选择成员类型', trigger: 'change' }
],
memberId: [
{ required: true, message: '请选择仿真成员', trigger: 'change' }
]
@ -107,14 +106,15 @@ export default {
ruleForm: {
name: '',
type: '',
usage: '',
desc: '',
memberId: '',
client: '',
function: '',
trainingId: '',
trainingName: '',
memberType: ''
singleMember: false,
singleClient: false,
hasTraining: false
},
roleList: [
{label: '行调', value: 'DISPATCHER'},
@ -187,10 +187,8 @@ export default {
this.ruleForm.name = row.name;
this.ruleForm.desc = row.desc || '';
this.ruleForm.type = row.paramVO.type;
this.ruleForm.usage = row.paramVO.usageInfo.usage;
this.ruleForm.client = row.paramVO.usageInfo.param.client || '';
this.ruleForm.memberId = row.paramVO.usageInfo.param.memberId || '';
this.ruleForm.memberType = row.paramVO.usageInfo.param.memberType || '';
this.ruleForm.client = row.paramVO.initParam.client || '';
this.ruleForm.memberId = row.paramVO.initParam.memberId || '';
const functionList = Object.keys(row.paramVO.functionMap);
if (functionList && functionList.length) {
this.ruleForm.function = functionList[0];
@ -213,41 +211,13 @@ export default {
} else if (val === 'EMERGENCY') {
this.memberList = [...this.memberEmergencyList];
}
if (this.ruleForm.usage === 'SINGLE_MEMBER' && this.ruleForm.memberType) {
const temMemberList = this.memberList.filter(member => member.memberType === this.ruleForm.memberType);
if (['C_ATS', 'C_ATS_BS', 'C_PA', 'C_CCTV', 'GPC'].includes(this.ruleForm.client)) {
const temMemberList = this.memberList.filter(member => member.memberType === 'DISPATCHER');
this.memberList = [...temMemberList];
}
if (this.ruleForm.usage === 'SINGLE_CLIENT' && this.ruleForm.client) {
if (['C_ATS', 'C_ATS_BS', 'C_PA', 'C_CCTV', 'GPC'].includes(this.ruleForm.client)) {
const temMemberList = this.memberList.filter(member => member.memberType === 'DISPATCHER');
this.memberList = [...temMemberList];
} else if (['L_ATS', 'LCW', 'L_CCTV', 'L_PA'].includes(this.ruleForm.client)) {
const temMemberList = this.memberList.filter(member => member.memberType === 'STATION_SUPERVISOR');
this.memberList = [...temMemberList];
}
}
},
usageChange(val) {
if (this.ruleForm.type === 'METRO') {
this.memberList = [...this.memberMetroList];
} else if (this.ruleForm.type === 'RAILWAY') {
this.memberList = [...this.memberRailwayList];
} else if (this.ruleForm.type === 'EMERGENCY') {
this.memberList = [...this.memberEmergencyList];
}
if (val === 'SINGLE_MEMBER' && this.ruleForm.memberType) {
const temMemberList = this.memberList.filter(member => member.memberType === this.ruleForm.memberType);
} else if (['L_ATS', 'LCW', 'L_CCTV', 'L_PA'].includes(this.ruleForm.client)) {
const temMemberList = this.memberList.filter(member => member.memberType === 'STATION_SUPERVISOR');
this.memberList = [...temMemberList];
}
if (val === 'SINGLE_CLIENT' && this.ruleForm.client) {
if (['C_ATS', 'C_ATS_BS', 'C_PA', 'C_CCTV', 'GPC'].includes(this.ruleForm.client)) {
const temMemberList = this.memberList.filter(member => member.memberType === 'DISPATCHER');
this.memberList = [...temMemberList];
} else if (['L_ATS', 'LCW', 'L_CCTV', 'L_PA'].includes(this.ruleForm.client)) {
const temMemberList = this.memberList.filter(member => member.memberType === 'STATION_SUPERVISOR');
this.memberList = [...temMemberList];
}
}
},
clientChange(val) {
if (this.ruleForm.type === 'METRO') {
@ -265,18 +235,6 @@ export default {
this.memberList = [...temMemberList];
}
},
memberTypeChange(val) {
if (this.ruleForm.type === 'METRO') {
this.memberList = [...this.memberMetroList];
} else if (this.ruleForm.type === 'RAILWAY') {
this.memberList = [...this.memberRailwayList];
} else if (this.ruleForm.type === 'EMERGENCY') {
this.memberList = [...this.memberEmergencyList];
}
const temMemberList = this.memberList.filter(member => member.memberType === val);
console.log(this.memberList, val, temMemberList);
this.memberList = [...temMemberList];
},
handleMember(member, stationList) {
const data = { value: member.id, label: '', memberType: member.type };
const device = stationList.find(station => station.code === member.deviceCode) || {};
@ -344,13 +302,14 @@ export default {
name: '',
desc: '',
type: '',
usage: '',
memberId: '',
client: '',
function: '',
trainingId: '',
trainingName: '',
memberType: ''
singleClient: false,
singleMember: false,
hasTraining: false
};
this.visible = false;
this.$refs.ruleForm.resetFields();
@ -362,24 +321,23 @@ export default {
} else if (this.ruleForm.function) {
functionMap[this.ruleForm.function] = null;
}
const param = {memberId: this.ruleForm.memberId};
if (this.ruleForm.usage === 'SINGLE_CLIENT') {
param.client = this.ruleForm.client;
} else if (this.ruleForm.usage === 'SINGLE_MEMBER') {
param.memberType = this.ruleForm.memberType;
const initParam = { memberId: this.ruleForm.memberId };
if (this.ruleForm.client) {
initParam.client = this.ruleForm.client;
}
console.log(this.ruleForm.memberType, param, '------');
const data = {
mapId: this.$route.query.mapId,
name: this.ruleForm.name,
desc: this.ruleForm.desc,
paramVO: {
type: this.ruleForm.type,
usageInfo: {
usage: this.ruleForm.usage,
param: param
},
functionMap: functionMap
initParam: initParam,
functionMap: functionMap,
domConfig: {
singleClient: this.ruleForm.singleClient,
singleMember: this.ruleForm.singleMember,
hasTraining: this.ruleForm.hasTraining
}
}
};
if (this.title === '创建子系统') {

View File

@ -14,10 +14,19 @@ const simTypeMap = {
RAILWAY: '大铁CTC',
EMERGENCY: '应急调度'
};
const simUsageMap = {
SINGLE_MEMBER: '单角色仿真',
SINGLE_CLIENT: '单客户端仿真',
JOINT: '综合演练'
const clientMap = {
C_ATS: '中心ATS工作站',
C_ATS_BS: '中心ATS大屏',
C_PA: '中心PA系统',
C_CCTV: '中心视频监控系统',
L_ATS: '现地ATS工作站',
LCW: '本地控制工作站',
L_CCTV: '现地视频监控系统',
L_PA: '现地PA系统',
GPC: '调度台终端',
IPC: '联锁工作站',
STPC: '车务终端',
DMP: '车务管理终端'
};
export default {
name: 'PublishMap',
@ -67,10 +76,10 @@ export default {
tagType: () => { return 'success'; }
},
{
title: '使用方式',
prop: 'simUsage',
title: '客户端',
prop: 'client',
type: 'tag',
columnValue: (row) => { return simUsageMap[row.simUsage]; },
columnValue: (row) => { return clientMap[row.paramVO.initParam.client]; },
tagType: () => { return ''; }
},
{