Merge branch 'test'

This commit is contained in:
zyy 2020-11-06 18:35:34 +08:00
commit bc8b63dad3
42 changed files with 408 additions and 219 deletions

View File

@ -139,9 +139,9 @@ export function previewRunPlan(planId) {
} }
/** 剧本预览选择角色 */ /** 剧本预览选择角色 */
export function loadDraftScriptNew(memberId, group) { export function loadDraftScriptNew(memberId, group, mode) {
return request({ return request({
url: `/api/scriptSimulation/${group}/chooseMemberAndStart?memberId=${memberId}`, url: `/api/scriptSimulation/${group}/chooseMemberAndStart?memberId=${memberId}&mode=${mode}`,
method: 'put' method: 'put'
}); });
} }

View File

@ -134,10 +134,3 @@ export function updateActionCondition(group, actionId, data) {
data data
}); });
} }
/** 查询剧本活动条件 */
export function getActionCondition(group, actionId) {
return request({
url: `/api/scriptSimulation/${group}/${actionId}/condition`,
method: 'get'
});
}

View File

@ -15,7 +15,7 @@
@disableQuery="disableQuery" @disableQuery="disableQuery"
@enableQuery="enableQuery" @enableQuery="enableQuery"
/> />
<el-card v-loading="loading"> <el-card v-loading="loading" :style="{padding: cardPadding+'px'}">
<el-table <el-table
ref="table2" ref="table2"
highlight-current-row highlight-current-row
@ -211,7 +211,11 @@ export default {
queryList: { queryList: {
type: Object, type: Object,
required: true required: true
} },
cardPadding: {
type: Number,
default: 0
}
}, },
data() { data() {
return { return {

View File

@ -1,5 +1,5 @@
import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, convertSheetToList } from '@/utils/runPlan'; import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, convertSheetToList } from '@/utils/runPlan';
import store from '@/store/index_APP_TARGET';
export default { export default {
/** 边缘高度*/ /** 边缘高度*/
EdgeHeight: 600, EdgeHeight: 600,
@ -113,7 +113,11 @@ export default {
// pointdata.name = `${service.serviceNumber}${train.directionCode}${train.tripNumber}`; // pointdata.name = `${service.serviceNumber}${train.directionCode}${train.tripNumber}`;
pointdata.name = `${service.serviceNumber}${train.tripNumber}`; pointdata.name = `${service.serviceNumber}${train.tripNumber}`;
pointdata.color = '#000' || lineStyle.color; pointdata.color = '#000' || lineStyle.color;
pointdata.directionCode = train.directionCode; pointdata.directionCode = train.right ? '2' : '1';
if (!store.state.map.mapConfig.upRight) {
pointdata.directionCode = train.right ? '1' : '2';
}
// pointdata.directionCode = train.directionCode;
pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], train.directionCode, false)]; pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], train.directionCode, false)];
/** 给服务对象添加服务名称和标记点*/ /** 给服务对象添加服务名称和标记点*/
@ -211,8 +215,12 @@ export default {
if (runPlanData[elem.serviceNumber][elem.tripNumber].length <= 1) { if (runPlanData[elem.serviceNumber][elem.tripNumber].length <= 1) {
const result = serie.markPoint.data.some(ele => ele.name == `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`); const result = serie.markPoint.data.some(ele => ele.name == `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`);
if (!result) { if (!result) {
let directionCode = elem.right ? '2' : '1';
if (!store.state.map.mapConfig.upRight) {
directionCode = elem.right ? '1' : '2';
}
serie.markPoint.data.push(createMartPoint({ serie.markPoint.data.push(createMartPoint({
directionCode: elem.directionCode, directionCode: directionCode,
coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)], coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)],
name: `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`, name: `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`,
color: lineStyle.color || '#000' color: lineStyle.color || '#000'

View File

@ -1,5 +1,5 @@
import { createMartPointReverse, createSeriesModel, createMarkLineModels, hexColor, convertSheetToList } from '@/utils/runPlan'; import { createMartPointReverse, createSeriesModel, createMarkLineModels, hexColor, convertSheetToList } from '@/utils/runPlan';
import store from '@/store/index_APP_TARGET';
export default { export default {
/** 边缘高度*/ /** 边缘高度*/
EdgeHeight: 600, EdgeHeight: 600,
@ -113,7 +113,11 @@ export default {
// pointdata.name = `${service.serviceNumber}${train.directionCode}${train.tripNumber}`; // pointdata.name = `${service.serviceNumber}${train.directionCode}${train.tripNumber}`;
pointdata.name = `${service.serviceNumber}${train.tripNumber}`; pointdata.name = `${service.serviceNumber}${train.tripNumber}`;
pointdata.color = '#000' || lineStyle.color; pointdata.color = '#000' || lineStyle.color;
pointdata.directionCode = train.directionCode; pointdata.directionCode = train.right ? '2' : '1';
if (!store.state.map.mapConfig.upRight) {
pointdata.directionCode = train.right ? '1' : '2';
}
// pointdata.directionCode = train.directionCode;
pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], train.directionCode, false)]; pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], train.directionCode, false)];
/** 给服务对象添加服务名称和标记点*/ /** 给服务对象添加服务名称和标记点*/
@ -211,8 +215,12 @@ export default {
if (runPlanData[elem.serviceNumber][elem.tripNumber].length <= 1) { if (runPlanData[elem.serviceNumber][elem.tripNumber].length <= 1) {
const result = serie.markPoint.data.some(ele => ele.name == `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`); const result = serie.markPoint.data.some(ele => ele.name == `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`);
if (!result) { if (!result) {
let directionCode = elem.right ? '2' : '1';
if (!store.state.map.mapConfig.upRight) {
directionCode = elem.right ? '1' : '2';
}
serie.markPoint.data.push(createMartPointReverse({ serie.markPoint.data.push(createMartPointReverse({
directionCode: elem.directionCode, directionCode: directionCode,
coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)], coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)],
name: `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`, name: `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`,
color: lineStyle.color || '#000' color: lineStyle.color || '#000'

View File

@ -1,5 +1,5 @@
import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, convertSheetToList } from '@/utils/runPlan'; import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, convertSheetToList } from '@/utils/runPlan';
import store from '@/store/index_APP_TARGET';
export default { export default {
/** 边缘高度*/ /** 边缘高度*/
EdgeHeight: 600, EdgeHeight: 600,
@ -91,7 +91,11 @@ export default {
// pointdata.name = `${service.serviceNumber}${train.directionCode}${train.tripNumber}`; // pointdata.name = `${service.serviceNumber}${train.directionCode}${train.tripNumber}`;
pointdata.name = `${service.serviceNumber}${train.tripNumber}`; pointdata.name = `${service.serviceNumber}${train.tripNumber}`;
pointdata.color = '#000' || lineStyle.color; pointdata.color = '#000' || lineStyle.color;
pointdata.directionCode = train.directionCode; // pointdata.directionCode = train.directionCode;
pointdata.directionCode = train.right ? '2' : '1';
if (!store.state.map.mapConfig.upRight) {
pointdata.directionCode = train.right ? '1' : '2';
}
pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], train.directionCode, false)]; pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], train.directionCode, false)];
/** 给服务对象添加服务名称和标记点*/ /** 给服务对象添加服务名称和标记点*/
@ -186,8 +190,12 @@ export default {
if (runPlanData[elem.serviceNumber][elem.tripNumber].length <= 1) { if (runPlanData[elem.serviceNumber][elem.tripNumber].length <= 1) {
const result = serie.markPoint.data.some(ele => ele.name == `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`); const result = serie.markPoint.data.some(ele => ele.name == `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`);
if (!result) { if (!result) {
let directionCode = elem.right ? '2' : '1';
if (!store.state.map.mapConfig.upRight) {
directionCode = elem.right ? '1' : '2';
}
serie.markPoint.data.push(createMartPoint({ serie.markPoint.data.push(createMartPoint({
directionCode: elem.directionCode, directionCode: directionCode,
coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)], coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)],
name: `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`, name: `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`,
color: lineStyle.color || '#000' color: lineStyle.color || '#000'

View File

@ -168,7 +168,6 @@ export default {
var isBackup = true; var isBackup = true;
var opt = { name: '', markPointData: [], data: [] }; var opt = { name: '', markPointData: [], data: [] };
if (service.tripNumberDataList && service.tripNumberDataList.length) { if (service.tripNumberDataList && service.tripNumberDataList.length) {
debugger;
service.tripNumberDataList.forEach((train, j) => { service.tripNumberDataList.forEach((train, j) => {
var pointdata = {}; var pointdata = {};
var idx = 0; var idx = 0;

View File

@ -118,6 +118,11 @@ export default {
}); });
}, },
doClose() { doClose() {
this.addModel = {
groupNumber: '',
destinationCode: '',
tripNumber: ''
};
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');

View File

@ -129,6 +129,11 @@ export default {
}); });
}, },
doClose() { doClose() {
this.addModel = {
groupNumber: '',
tripNumber: '',
serviceNumber: ''
};
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');

View File

@ -67,9 +67,9 @@ export default {
stationName:'', stationName:'',
message:'', message:'',
controlProps: { controlProps: {
'03': '紧急站控', '03': '请求紧急站控',
'02': '站控', '02': '请求站控',
'01': '控' '01': '请求中控'
} }
}; };
}, },
@ -262,7 +262,7 @@ export default {
} }
}; };
</script> </script>
<style scoped rel="stylesheet/scss" lang="scss" scoped> <style scoped rel="stylesheet/scss" lang="scss">
@import "src/styles/mixin.scss"; @import "src/styles/mixin.scss";
/deep/ .el-radio { /deep/ .el-radio {

View File

@ -38,7 +38,8 @@ export const deviceFaultType = {
Switch: [ Switch: [
{label: '失表', value: 'SPLIT'}, {label: '失表', value: 'SPLIT'},
{label: '定位失表', value: 'NORMAL_SPLIT'}, {label: '定位失表', value: 'NORMAL_SPLIT'},
{label: '反位失表', value: 'REVERSE_SPLIT'} {label: '反位失表', value: 'REVERSE_SPLIT'},
{label: '道岔区段计轴故障', value: 'AXLE_FAULT'}
], ],
StationStand: [ StationStand: [
{label: '屏蔽门无法关闭', value: 'PSD_CANNOT_BE_CLOSED'}, {label: '屏蔽门无法关闭', value: 'PSD_CANNOT_BE_CLOSED'},

View File

@ -44,7 +44,8 @@ const training = {
scriptOperationType: '', // 剧本操作类型 scriptOperationType: '', // 剧本操作类型
triggerFaultCount: 0, // 触发故障计数器 triggerFaultCount: 0, // 触发故障计数器
triggerFaultDevice: '', // 触发故障目标设备 triggerFaultDevice: '', // 触发故障目标设备
trainingStart: false // 实训开始状态 trainingStart: false, // 实训开始状态
notifySelected: null // 场景弹窗内容
}, },
getters: { getters: {
@ -283,6 +284,9 @@ const training = {
}, },
setTrainingStart: (state, flag) => { setTrainingStart: (state, flag) => {
state.trainingStart = flag; state.trainingStart = flag;
},
setNotifySelected: (state, data) => {
state.notifySelected = data;
} }
}, },

View File

@ -22,7 +22,6 @@ export function createMartPoint(opt) {
/** 创建一个车次数据点*/ /** 创建一个车次数据点*/
export function createMartPointReverse(opt) { export function createMartPointReverse(opt) {
debugger;
const rotate = opt.directionCode == '1' ? 45 : (opt.directionCode == '2' ? -45 : 0); const rotate = opt.directionCode == '1' ? 45 : (opt.directionCode == '2' ? -45 : 0);
const position = opt.type ? 'insideBottomLeft' : 'insideTopLeft'; const position = opt.type ? 'insideBottomLeft' : 'insideTopLeft';
return { return {

View File

@ -152,7 +152,7 @@ export default {
const url = urlObject.createObjectURL(content); const url = urlObject.createObjectURL(content);
const el = document.createElement('a'); const el = document.createElement('a');
el.href = url; el.href = url;
el.download = `${resultData.name}.json`; el.download = `场景-${resultData.name}.json`;
el.click(); el.click();
urlObject.revokeObjectURL(url); urlObject.revokeObjectURL(url);
}); });

View File

@ -2,7 +2,7 @@
<el-dialog :title="title" :visible.sync="dialogVisible" :before-close="doClose" top="50px" center custom-class="sceneModifyOut" fullscreen> <el-dialog :title="title" :visible.sync="dialogVisible" :before-close="doClose" top="50px" center custom-class="sceneModifyOut" fullscreen>
<el-form ref="form" :model="formModel" label-width="120px" class="sceneModify" @submit.native.prevent> <el-form ref="form" :model="formModel" label-width="120px" class="sceneModify" @submit.native.prevent>
<!-- :rules="rules" --> <!-- :rules="rules" -->
<el-table :data="actionList" border style="width:1250px;margin: 0 auto;" height="500" :span-method="objectSpanMethod"> <el-table :data="actionList" border style="width:1320px;margin: 0 auto;" height="500" :span-method="objectSpanMethod">
<el-table-column label="步骤名称" width="100"> <el-table-column label="步骤名称" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="stepVOs[scope.row.id]"> <div v-if="stepVOs[scope.row.id]">
@ -10,6 +10,7 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="动作id" width="70" prop="id" />
<el-table-column label="动作内容" width="350"> <el-table-column label="动作内容" width="350">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- v-model="scope.row.id" --> <!-- v-model="scope.row.id" -->
@ -19,7 +20,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="语音识别关键词列表" width="350"> <el-table-column label="语音识别关键词列表" width="350">
<template slot-scope="scope"> <template v-if="scope.row.type=='Conversation'&&scope.row.memberId=='1'" slot-scope="scope">
<div v-if="commandEvaluationRuleVOs[scope.row.id]&&commandEvaluationRuleVOs[scope.row.id].keyWords"> <div v-if="commandEvaluationRuleVOs[scope.row.id]&&commandEvaluationRuleVOs[scope.row.id].keyWords">
<el-tag v-for="(tag,index) in commandEvaluationRuleVOs[scope.row.id].keyWords" :key="index" closable :disable-transitions="false" @close="handleClose(scope.row.id,index)">{{ tag }}</el-tag> <el-tag v-for="(tag,index) in commandEvaluationRuleVOs[scope.row.id].keyWords" :key="index" closable :disable-transitions="false" @close="handleClose(scope.row.id,index)">{{ tag }}</el-tag>
<el-input <el-input
@ -39,7 +40,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="总分值" width="149"> <el-table-column label="总分值" width="149">
<template slot-scope="scope"> <template v-if="scope.row.memberId=='1'&&(scope.row.type=='Conversation'||scope.row.type=='Operation')" slot-scope="scope">
<div v-if="commandEvaluationRuleVOs[scope.row.id]&&commandEvaluationRuleVOs[scope.row.id].score!=undefined"> <div v-if="commandEvaluationRuleVOs[scope.row.id]&&commandEvaluationRuleVOs[scope.row.id].score!=undefined">
<el-input-number <el-input-number
v-if="commandEvaluationRuleVOs[scope.row.id].scoreVisible" v-if="commandEvaluationRuleVOs[scope.row.id].scoreVisible"
@ -62,7 +63,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="超时时间" width="150"> <el-table-column label="超时时间" width="150">
<template slot-scope="scope"> <template v-if="scope.row.type=='Conversation'&&scope.row.memberId=='1'" slot-scope="scope">
<div v-if="commandEvaluationRuleVOs[scope.row.id]&&commandEvaluationRuleVOs[scope.row.id].timeOut!=undefined"> <div v-if="commandEvaluationRuleVOs[scope.row.id]&&commandEvaluationRuleVOs[scope.row.id].timeOut!=undefined">
<el-input-number <el-input-number
v-if="commandEvaluationRuleVOs[scope.row.id].timeOutVisible" v-if="commandEvaluationRuleVOs[scope.row.id].timeOutVisible"
@ -85,7 +86,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="扣除分值" width="150"> <el-table-column label="扣除分值" width="150">
<template slot-scope="scope"> <template v-if="scope.row.type=='Conversation'&&scope.row.memberId=='1'" slot-scope="scope">
<div v-if="commandEvaluationRuleVOs[scope.row.id]&&commandEvaluationRuleVOs[scope.row.id].deductScore!=undefined"> <div v-if="commandEvaluationRuleVOs[scope.row.id]&&commandEvaluationRuleVOs[scope.row.id].deductScore!=undefined">
<el-input-number <el-input-number
v-if="commandEvaluationRuleVOs[scope.row.id].deductScoreVisible" v-if="commandEvaluationRuleVOs[scope.row.id].deductScoreVisible"
@ -501,6 +502,20 @@ export default {
commandEvaluationRuleVOs = commandEvaluationRuleVOs.filter(eachData=>{ commandEvaluationRuleVOs = commandEvaluationRuleVOs.filter(eachData=>{
return (eachData.keyWords && eachData.keyWords.length > 0) || eachData.timeOut || eachData.score || eachData.deductScore; return (eachData.keyWords && eachData.keyWords.length > 0) || eachData.timeOut || eachData.score || eachData.deductScore;
}); });
let count = 0;
let errorMessage = '';
commandEvaluationRuleVOs.forEach((RuleVO, index)=>{
if (RuleVO.keyWords) {
if (!(RuleVO.keyWords.length > 0 && RuleVO.timeOut && RuleVO.score && RuleVO.deductScore)) {
errorMessage += '动作id为' + RuleVO.actionId + '的表单没有填写完整, ';
count++;
}
}
});
if (count > 0) {
this.$messageBox(errorMessage);
return false;
}
if (stepVOs.length > 0) { if (stepVOs.length > 0) {
stepVOs.sort(this.objectSort('startActionId')); stepVOs.sort(this.objectSort('startActionId'));
stepVOs.map((step, index)=>{ stepVOs.map((step, index)=>{
@ -664,7 +679,7 @@ export default {
margin-bottom:10px; margin-bottom:10px;
} }
.operateStatistic{ .operateStatistic{
width: 1250px; width: 1320px;
margin: 15px auto; margin: 15px auto;
border: 1px #EBEEF5 solid; border: 1px #EBEEF5 solid;
} }

View File

@ -5,7 +5,7 @@
<el-button size="small" type="primary" class="createScript" style="margin-top: 5px" @click="handleCreate">{{ $t('scriptRecord.scriptCreate') }}</el-button> <el-button size="small" type="primary" class="createScript" style="margin-top: 5px" @click="handleCreate">{{ $t('scriptRecord.scriptCreate') }}</el-button>
<el-button size="small" type="primary" class="createScript" @click="createByPublish">发布数据创建</el-button> <el-button size="small" type="primary" class="createScript" @click="createByPublish">发布数据创建</el-button>
</div> </div>
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" style="width: 91%;margin-left:4%;margin-top:20px;" /> <QueryListPage ref="queryListPage" :cardPadding="50" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" style="width: 91%;margin-left:4%;margin-top:20px;" />
<create-ibp ref="createScript" :title="'创建数据'" @reloadTable="reloadTable" /> <create-ibp ref="createScript" :title="'创建数据'" @reloadTable="reloadTable" />
<create-ibp ref="modifyScript" :title="'修改数据'" @reloadTable="reloadTable" /> <create-ibp ref="modifyScript" :title="'修改数据'" @reloadTable="reloadTable" />
<copy-ibp ref="copyIbp" @reloadTable="reloadTable" /> <copy-ibp ref="copyIbp" @reloadTable="reloadTable" />

View File

@ -9,7 +9,7 @@
<el-button size="mini" type="primary" @click="lessonCreate">{{ $t('lesson.newConstruction') }}</el-button> <el-button size="mini" type="primary" @click="lessonCreate">{{ $t('lesson.newConstruction') }}</el-button>
</div> </div>
</div> </div>
<QueryListPage ref="queryListPage" :query-form="queryForm" :pager-config="pagerConfig" :query-list="queryList" style="width: 91%;margin-left:4%;margin-top:20px;" /> <QueryListPage ref="queryListPage" :cardPadding="50" :query-form="queryForm" :pager-config="pagerConfig" :query-list="queryList" style="width: 91%;margin-left:4%;margin-top:20px;" />
<publish-create ref="publishCreate" @refresh="refresh" /> <publish-create ref="publishCreate" @refresh="refresh" />
<publish-lesson ref="publishLesson" @refresh="refresh" /> <publish-lesson ref="publishLesson" @refresh="refresh" />
<lesson-detail ref="lessonDetail" /> <lesson-detail ref="lessonDetail" />

View File

@ -239,6 +239,12 @@ export default {
const model = {initTime:this.formatTime(initTime)}; const model = {initTime:this.formatTime(initTime)};
this.start(model); this.start(model);
} }
},
isScriptLoad(val) {
if (!val && this.$store.state.training.notifySelected) {
this.$store.state.training.notifySelected.close();
this.$store.commit('training/setNotifySelected', null);
}
} }
}, },
created() { created() {

View File

@ -10,7 +10,11 @@
<el-table-column label="操作"> <el-table-column label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.result"> <div v-if="scope.row.result">
<el-button v-for="(each,index) in scope.row.result" :key="index" type="primary" size="small" @click="handleLoad(each)">{{ each.name }}</el-button> <template v-for="(each,index) in scope.row.result">
<el-tooltip :key="index" class="item" effect="dark" :content="'场景描述: '+ each.description + '\n' + '处置流程: ' +each.disposalProcesses" popper-class="tooltip-box" placement="top">
<el-button type="primary" size="small" @click="handleLoad(each)">{{ each.name }}</el-button>
</el-tooltip>
</template>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
@ -82,17 +86,17 @@ export default {
}); });
list.forEach(each=>{ list.forEach(each=>{
if (each.name == '场景1' || each.name == '场景2' || each.name == '场景3' || each.name == '场景7') { if (each.name == '场景1' || each.name == '场景2' || each.name == '场景3' || each.name == '场景7') {
this.mainSceneData[1].result.push({id:each.id, name:each.name}); this.mainSceneData[1].result.push({id:each.id, name:each.name, description: each.description, disposalProcesses: each.disposalProcesses});
} else if (each.name == '场景4') { } else if (each.name == '场景4') {
this.mainSceneData[0].result.push({id:each.id, name:'场景4'}); this.mainSceneData[0].result.push({id:each.id, name:'场景4', description: each.description, disposalProcesses: each.disposalProcesses});
} else if (each.name == '场景5' || each.name == '场景11') { } else if (each.name == '场景5' || each.name == '场景11') {
this.mainSceneData[4].result.push({id:each.id, name:each.name}); this.mainSceneData[4].result.push({id:each.id, name:each.name, description: each.description, disposalProcesses: each.disposalProcesses});
} else if (each.name == '场景9') { } else if (each.name == '场景9') {
this.mainSceneData[6].result.push({id:each.id, name:'场景9'}); this.mainSceneData[6].result.push({id:each.id, name:'场景9', description: each.description, disposalProcesses: each.disposalProcesses});
} else if (each.name == '场景8') { } else if (each.name == '场景8') {
this.mainSceneData[5].result.push({id:each.id, name:'场景8'}); this.mainSceneData[5].result.push({id:each.id, name:'场景8', description: each.description, disposalProcesses: each.disposalProcesses});
} else if (each.name == '场景10') { } else if (each.name == '场景10') {
this.mainSceneData[7].result.push({id:each.id, name:'场景10'}); this.mainSceneData[7].result.push({id:each.id, name:'场景10', description: each.description, disposalProcesses: each.disposalProcesses});
} }
}); });
} }
@ -127,6 +131,18 @@ export default {
const playerList = []; const playerList = [];
EventBus.$emit('clearRunSeries'); EventBus.$emit('clearRunSeries');
EventBus.$emit('loadScene'); EventBus.$emit('loadScene');
const notifyData = this.$notify({
title: res.data.name,
dangerouslyUseHTMLString: true,
message: `
<p><span style="color: #000;font-weight: bold;">场景描述</span>${row.description}</p>`,
customClass: 'notify_box',
// position: 'top-left',
showClose: false,
offset: 75,
duration: 0
});
this.$store.commit('training/setNotifySelected', notifyData);
if (res.data.memberList && res.data.memberList.length > 0) { if (res.data.memberList && res.data.memberList.length > 0) {
this.form.type = ''; this.form.type = '';
res.data.memberList.sort((a, b) => { res.data.memberList.sort((a, b) => {
@ -228,3 +244,17 @@ export default {
} }
}; };
</script> </script>
<style lang="scss">
.tooltip-box {
white-space:pre-wrap;
}
.notify_box{
width: 300px;
white-space: inherit;
&.el-notification.right{
right: 5px;
padding: 6px 0;
}
}
</style>

View File

@ -26,7 +26,7 @@
/> />
<menu-dispather-contest v-if="isContest" ref="menuDispatherContest" :offset="offset" :offset-bottom="offsetBottom" :data-error="dataError" :text-status-height="textStatusHeight" /> <menu-dispather-contest v-if="isContest" ref="menuDispatherContest" :offset="offset" :offset-bottom="offsetBottom" :data-error="dataError" :text-status-height="textStatusHeight" />
</template> </template>
<menu-train-list v-if="isDemon||isContest" @setCenter="setCenter" /> <menu-train-list v-if="isDemon||isContest||isScript" @setCenter="setCenter" />
<menu-system-time ref="menuSystemTime" :offset="offset" :group="group" /> <menu-system-time ref="menuSystemTime" :offset="offset" :group="group" />
</div> </div>
</template> </template>

View File

@ -136,8 +136,8 @@ export default {
.menuTrainListOut{ .menuTrainListOut{
position: absolute; position: absolute;
right: 0; right: 0;
top: 15%; top: 20%;
height: 70%; height: 60%;
transform: translateX(400px); transform: translateX(400px);
transition: all 0.4s; transition: all 0.4s;
&.active{ &.active{

View File

@ -76,7 +76,7 @@ export const operateEnum = {
// } // }
}, },
ControlConvertMenu:{ ControlConvertMenu:{
type:'制模式', type:'系统/站遥控',
CM_Apply_For_Station_Control:{ CM_Apply_For_Station_Control:{
code:'stationCodes', code:'stationCodes',
isList:true, isList:true,

View File

@ -99,6 +99,7 @@ export default {
this.$notify({ this.$notify({
title: this.$t('global.tips'), title: this.$t('global.tips'),
duration: 3000, duration: 3000,
offset: 100,
message: h('i', { style: 'color:' + opt.color }, opt.message) message: h('i', { style: 'color:' + opt.color }, opt.message)
}); });
} }

View File

@ -17,6 +17,8 @@
@setMemberList="setMemberList" @setMemberList="setMemberList"
@clearAllData="clearAllData" @clearAllData="clearAllData"
@setTreeData="setTreeData" @setTreeData="setTreeData"
@changeScriptMode="changeScriptMode"
@setMapLocation="setMapLocation"
/> />
<script-preview-chat ref="chatbox" :group="group" :user-role="userRole" :offset="offset" /> <script-preview-chat ref="chatbox" :group="group" :user-role="userRole" :offset="offset" />
<menu-system-time ref="menuSystemTime" :offset="offset" :group="group" /> <menu-system-time ref="menuSystemTime" :offset="offset" :group="group" />
@ -45,6 +47,7 @@ import MenuSystemTime from '@/views/newMap/displayNew/menuSystemTime';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { loadDraftScriptNew } from '@/api/designPlatform'; import { loadDraftScriptNew } from '@/api/designPlatform';
import Vue from 'vue'; import Vue from 'vue';
import { ScriptMode } from '@/scripts/ConstDic';
import ConstConfig from '@/scripts/ConstConfig'; import ConstConfig from '@/scripts/ConstConfig';
export default { export default {
@ -79,7 +82,8 @@ export default {
userRole:'', userRole:'',
isDrive: this.prdType == '04', isDrive: this.prdType == '04',
treeData:[], treeData:[],
memberList:[] memberList:[],
scriptMode: ScriptMode.TEACH
}; };
}, },
computed: { computed: {
@ -118,6 +122,11 @@ export default {
// this.setMode(); // this.setMode();
} }
}, },
beforeDestroy() {
this.$store.dispatch('training/setRoles', '');
this.$store.dispatch('training/setPrdType', '');
this.clearAllData();
},
created() { created() {
this.group = this.$route.query.group || ''; this.group = this.$route.query.group || '';
}, },
@ -125,15 +134,19 @@ export default {
back() { back() {
this.$refs.scriptButtonGroup.back(); this.$refs.scriptButtonGroup.back();
}, },
changeScriptMode(scriptMode) {
this.scriptMode = scriptMode;
},
async selectRole(role) { async selectRole(role) {
try { try {
const res = await loadDraftScriptNew(role.id, this.group); const res = await loadDraftScriptNew(role.id, this.group, this.scriptMode);
if (res && res.code == 200) { if (res && res.code == 200) {
if (this.querymapLocation) { // if (this.querymapLocation) {
const newMapLocation = {'offsetX': this.mapLocation.x, 'offsetY': this.mapLocation.y, 'scaleRate': this.mapLocation.scale}; const newMapLocation = {'offsetX': this.mapLocation.x, 'offsetY': this.mapLocation.y, 'scaleRate': this.mapLocation.scale};
Vue.prototype.$jlmap.setOptions(newMapLocation); Vue.prototype.$jlmap.setOptions(newMapLocation);
} // }
} }
this.$store.dispatch('scriptRecord/updateAudioPlay', false);
this.$store.dispatch('scriptRecord/updateBgSet', true); this.$store.dispatch('scriptRecord/updateBgSet', true);
this.$refs.scriptButtonGroup.setIsscriptRun(true); this.$refs.scriptButtonGroup.setIsscriptRun(true);
if (role.type) { if (role.type) {
@ -223,6 +236,9 @@ export default {
} }
}); });
}, },
setMapLocation(mapLocation) {
this.mapLocation = mapLocation;
},
switchMode(prdType) { switchMode(prdType) {
this.$store.dispatch('training/setPrdType', prdType); this.$store.dispatch('training/setPrdType', prdType);
}, },

View File

@ -1,10 +1,20 @@
<template> <template>
<div> <div>
<!-- 下角按钮列表 --> <!-- 下角按钮列表 -->
<div class="display-draft"> <div class="display-draft">
<el-button v-if="isscriptRun&&!dataError" type="danger" @click="handleQuitQuest">{{ $t('display.demon.exitScript') }}</el-button> <el-button v-if="isscriptRun&&!dataError" type="danger" @click="handleQuitQuest">{{ $t('display.demon.exitScript') }}</el-button>
<el-button type="primary" @click="back">{{ $t('display.demon.back') }}</el-button> <el-button type="primary" @click="back">{{ $t('display.demon.back') }}</el-button>
</div> </div>
<!-- 左上角按钮 -->
<div class="trainingButton" :style="{top: (offset+45)+'px'}">
<el-row>
<el-radio-group v-model="scriptMode" class="mode" size="small" @change="changeScriptMode">
<el-radio-button :label="scriptModeList.TEACH" :disabled="isscriptRun">{{ $t('display.lesson.teachingMode') }}</el-radio-button>
<el-radio-button :label="scriptModeList.PRACTICE" :disabled="isscriptRun">{{ $t('display.lesson.practiceMode') }}</el-radio-button>
<el-radio-button :label="scriptModeList.TEST" :disabled="isscriptRun">{{ $t('display.lesson.testMode') }}</el-radio-button>
</el-radio-group>
</el-row>
</div>
<!-- 右上角按钮列表 --> <!-- 右上角按钮列表 -->
<div class="schema" :style="{top: offset+'px'}"> <div class="schema" :style="{top: offset+'px'}">
<template v-if="!dataError"> <template v-if="!dataError">
@ -33,6 +43,7 @@
</div> </div>
</template> </template>
<script> <script>
import { ScriptMode } from '@/scripts/ConstDic';
import DemonMenu from '@/views/newMap/displayNew/demonMenu'; import DemonMenu from '@/views/newMap/displayNew/demonMenu';
import { EventBus } from '@/scripts/event-bus'; import { EventBus } from '@/scripts/event-bus';
import {covertMemberData} from '@/views/newMap/displayNew/utils'; import {covertMemberData} from '@/views/newMap/displayNew/utils';
@ -75,7 +86,9 @@ export default {
viewDisabled: true, viewDisabled: true,
firstLoad:true, firstLoad:true,
activeTrainList:[], activeTrainList:[],
isscriptRun:false // isscriptRun:false, //
scriptMode: ScriptMode.TEACH,
planRunning:false
}; };
}, },
computed:{ computed:{
@ -96,6 +109,9 @@ export default {
}, },
isStation() { isStation() {
return this.$store.state.training.prdType == '01'; return this.$store.state.training.prdType == '01';
},
scriptModeList() {
return ScriptMode;
} }
}, },
watch:{ watch:{
@ -114,10 +130,13 @@ export default {
await this.$store.dispatch('training/reset'); await this.$store.dispatch('training/reset');
await this.$store.dispatch('map/mapClear'); await this.$store.dispatch('map/mapClear');
this.$store.dispatch('scriptRecord/updateSimulationPause', false); this.$store.dispatch('scriptRecord/updateSimulationPause', false);
this.$store.dispatch('scriptRecord/updateAudioPlay', false);
this.$store.dispatch('map/resetActiveTrainList', true);
}, },
methods:{ methods:{
// //
async initLoadData() { async initLoadData() {
this.changeScriptMode(this.scriptMode);
this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setPrdType', '');
this.setWindowSize(); this.setWindowSize();
this.$store.dispatch('training/reset'); this.$store.dispatch('training/reset');
@ -139,6 +158,7 @@ export default {
} else { } else {
this.$store.dispatch('training/over');// 仿 this.$store.dispatch('training/over');// 仿
} }
this.planRunning = resp.data.planRunning;
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(resp.data.systemTime)}`)); this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(resp.data.systemTime)}`));
} else if (resp && resp.code == 200 && resp.data && resp.data.dataError) { } else if (resp && resp.code == 200 && resp.data && resp.data.dataError) {
this.dataError = true; this.dataError = true;
@ -240,6 +260,8 @@ export default {
this.$emit('setMemberData', lastMemberList); this.$emit('setMemberData', lastMemberList);
} }
let newMemberList = []; let newMemberList = [];
// planRunning
// debugger;
const activeMemberList = []; const activeMemberList = [];
resp.data.actionList.forEach((activeMember)=>{ resp.data.actionList.forEach((activeMember)=>{
if (!(activeMemberList.length > 0 && activeMemberList.includes(activeMember.memberId))) { if (!(activeMemberList.length > 0 && activeMemberList.includes(activeMember.memberId))) {
@ -262,7 +284,7 @@ export default {
const lastData = JSON.stringify(playerList); const lastData = JSON.stringify(playerList);
newMemberList = this.covert(lastData, ConstConfig.ConstSelect.roleTypeNew); newMemberList = this.covert(lastData, ConstConfig.ConstSelect.roleTypeNew);
if (resp.data.mapLocation) { if (resp.data.mapLocation) {
this.mapLocation = resp.data.mapLocation; this.$emit('setMapLocation', resp.data.mapLocation);
} }
const memberList = newMemberList || []; const memberList = newMemberList || [];
memberList.unshift({ id: '', label: this.$t('display.script.none'), role: 'no', disabled:false }); memberList.unshift({ id: '', label: this.$t('display.script.none'), role: 'no', disabled:false });
@ -320,6 +342,7 @@ export default {
getSimulationInfoNew(this.group).then(()=>{ getSimulationInfoNew(this.group).then(()=>{
this.isscriptRun = false; this.isscriptRun = false;
this.$store.dispatch('scriptRecord/updateBgSet', false); this.$store.dispatch('scriptRecord/updateBgSet', false);
this.$store.dispatch('scriptRecord/updateAudioPlay', false);
// this.userRole = ''; // this.userRole = '';
this.$store.dispatch('training/setRoles', ''); this.$store.dispatch('training/setRoles', '');
this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setPrdType', '');
@ -372,7 +395,22 @@ export default {
this.$store.dispatch('config/resize', { width, height }); this.$store.dispatch('config/resize', { width, height });
// this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: this.offsetStationCode }); // this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: this.offsetStationCode });
}); });
},
changeScriptMode(scriptMode) {
const ScriptModeList = {
TEACHING_MODE:'teach',
PRACTICE_MODE:'practice',
TEST_MODE:'test'
};
this.$store.dispatch('training/setScriptOperationType', ScriptModeList[scriptMode]);
this.$emit('changeScriptMode', scriptMode);
} }
} }
}; };
</script> </script>
<style lang="scss" scoped>
.trainingButton{
position: absolute;
left: 5px;
}
</style>

View File

@ -2,9 +2,9 @@
<div> <div>
<div class="display-draft"> <div class="display-draft">
<el-button-group> <el-button-group>
<el-button v-if="!isScriptCommand||isReplaceBg" type="success" :disabled="isDisable||dataError" @click="selectBeginTime">{{ $t('scriptRecord.drivingByPlan') }}</el-button>
<el-button v-if="!isScriptCommand||isReplaceBg" type="danger" :disabled="dataError" @click="end">初始化</el-button>
<el-button v-if="!isReplaceBg" type="primary" @click="back">{{ $t('scriptRecord.scriptBack') }}</el-button> <el-button v-if="!isReplaceBg" type="primary" @click="back">{{ $t('scriptRecord.scriptBack') }}</el-button>
<el-button v-if="!isScriptCommand||isReplaceBg" type="danger" :disabled="dataError" @click="end">初始化</el-button>
<el-button v-if="!isScriptCommand||isReplaceBg" type="success" :disabled="isDisable||dataError" @click="selectBeginTime">{{ $t('scriptRecord.drivingByPlan') }}</el-button>
</el-button-group> </el-button-group>
</div> </div>
<demon-menu <demon-menu
@ -122,10 +122,10 @@ export default {
}, },
isStation() { isStation() {
return this.$store.state.training.prdType == '01'; return this.$store.state.training.prdType == '01';
}, },
isDisable() { isDisable() {
return this.$store.state.training.started; return this.$store.state.training.started;
} }
}, },
watch: { watch: {
'$store.state.scriptRecord.bgSet':function (val) { '$store.state.scriptRecord.bgSet':function (val) {
@ -163,7 +163,7 @@ export default {
}, },
'$store.state.scriptRecord.userRole':function (val) { '$store.state.scriptRecord.userRole':function (val) {
this.userRole = val; this.userRole = val;
} }
}, },
beforeDestroy() { beforeDestroy() {
// this.clearAutoSave(); // this.clearAutoSave();

View File

@ -352,12 +352,12 @@ export default {
} }
}, },
async simulationReset() { async simulationReset() {
await this.$store.dispatch('socket/setSimulationStart');
await this.$store.dispatch('map/clearJlmapTrainView'); await this.$store.dispatch('map/clearJlmapTrainView');
await this.$store.dispatch('map/setTrainWindowShow', false); await this.$store.dispatch('map/setTrainWindowShow', false);
await this.$store.dispatch('training/over'); await this.$store.dispatch('training/over');
await this.$store.dispatch('map/resetActiveTrainList'); await this.$store.dispatch('map/resetActiveTrainList');
await this.$store.dispatch('socket/setSimulationReset'); // await this.$store.dispatch('socket/setSimulationReset'); //
await this.$store.dispatch('socket/setSimulationStart');
await this.$store.dispatch('training/setMapDefaultState'); await this.$store.dispatch('training/setMapDefaultState');
}, },
// //

View File

@ -125,8 +125,8 @@ export default {
.menuTrainListOut{ .menuTrainListOut{
position: absolute; position: absolute;
right: 0; right: 0;
top: 15%; top: 20%;
height: 70%; height: 60%;
transform: translateX(400px); transform: translateX(400px);
transition: all 0.4s; transition: all 0.4s;
&.active{ &.active{

View File

@ -1,6 +1,6 @@
<template> <template>
<div v-if="delayShow"> <div v-if="delayShow">
<div v-for="item in stationList"> <div v-for="(item,i) in stationList" :key="i">
<delay-info v-if="item.delayInfo" :delay-info-list="item.delayInfo" position="item.points" /> <delay-info v-if="item.delayInfo" :delay-info-list="item.delayInfo" position="item.points" />
</div> </div>
</div> </div>

View File

@ -1,7 +1,7 @@
<template> <template>
<div v-show="showDelayBox" class="info_box" :style="{left: tPosition.x+'px', top: tPosition.y+'px' }"> <div v-show="showDelayBox" class="info_box" :style="{left: tPosition.x+'px', top: tPosition.y+'px' }">
<el-scrollbal> <el-scrollbal>
<div v-for="item in delayInfoList"><span>人解</span><span>信号机名</span><span>时间</span></div> <div v-for="(item,i) in delayInfoList" :key="i"><span>人解</span><span>信号机名</span><span>时间</span></div>
</el-scrollbal> </el-scrollbal>
</div> </div>
</template> </template>

View File

@ -116,9 +116,11 @@ export default {
}); });
} }
} }
let subDeviceType = '';
if (newStep.subType) { subDeviceType = newStep.subType; } else { subDeviceType = newStep.type; }
position = this.$jlmap.getShapeTipPoint({ position = this.$jlmap.getShapeTipPoint({
code: newStep.code, code: newStep.code,
subDeviceType: newStep.type subDeviceType: subDeviceType
}); });
if (position) { if (position) {

View File

@ -107,7 +107,8 @@ export default {
field: '', field: '',
oldLeftSectionCode: '', oldLeftSectionCode: '',
oldRightSectionCode: '', oldRightSectionCode: '',
tipInfoList: [] tipInfoList: [],
centralizedStationList: []
}; };
}, },
computed: { computed: {
@ -369,9 +370,6 @@ export default {
return this.$store.state.map.map.skinVO.code === '03'; return this.$store.state.map.map.skinVO.code === '03';
} }
return false; return false;
},
centralizedStationList() {
return this.stationList.filter(station => station.centralized);
} }
}, },
watch: { watch: {
@ -402,9 +400,14 @@ export default {
this.editModel.roadType = null; this.editModel.roadType = null;
} }
}, },
handleInit() {
if (this.stationList && this.stationList.length) {
this.centralizedStationList = this.stationList.filter(station => station.centralized);
}
},
deviceSelect(selected) { deviceSelect(selected) {
// //
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) { if (selected && selected._type === 'Section') {
if (this.field === 'leftSection') { if (this.field === 'leftSection') {
if (selected.type === '01' || selected.type === '03') { if (selected.type === '01' || selected.type === '03') {
this.editModel.leftSectionCode = selected.code; this.editModel.leftSectionCode = selected.code;
@ -423,6 +426,7 @@ export default {
return; return;
} }
this.clear(); this.clear();
this.handleInit();
this.activeName = 'first'; this.activeName = 'first';
this.editModel = deepAssign(this.editModel, selected); this.editModel = deepAssign(this.editModel, selected);
this.oldPoint = selected.points; this.oldPoint = selected.points;

View File

@ -44,7 +44,7 @@ export default {
{ code: true, name: '向右' } { code: true, name: '向右' }
], ],
SignalLeftOrRightList: [], SignalLeftOrRightList: [],
CentralizedStationList:[], // CentralizedStationList:[],
mergeRules: { mergeRules: {
sectionCode: [ sectionCode: [
{ required: true, message: this.$t('rules.selectPhysicalExtentName'), trigger: 'change' } { required: true, message: this.$t('rules.selectPhysicalExtentName'), trigger: 'change' }
@ -87,6 +87,13 @@ export default {
}); });
return list; return list;
}, },
ciStationList() {
let list = [];
list = this.stationList.filter(station=>{
return station.ciStation;
});
return list;
},
isButtonType() { isButtonType() {
return this.field == 'selectSingalCode'; return this.field == 'selectSingalCode';
}, },
@ -104,7 +111,7 @@ export default {
{ prop: 'right', label: this.$t('map.signalDirectionTypeX'), type: 'radio', optionLabel: 'name', optionValue:'code', border:true, radioList: this.SignalDirectionList}, { prop: 'right', label: this.$t('map.signalDirectionTypeX'), type: 'radio', optionLabel: 'name', optionValue:'code', border:true, radioList: this.SignalDirectionList},
{ prop: 'positionType', label: this.$t('map.positionType'), type: 'radio', optionLabel: 'name', optionValue:'code', border:true, radioList: this.SignalPositionTypeList}, { prop: 'positionType', label: this.$t('map.positionType'), type: 'radio', optionLabel: 'name', optionValue:'code', border:true, radioList: this.SignalPositionTypeList},
{ prop: 'stationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.centralizedStationList}, { prop: 'stationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.centralizedStationList},
{ prop: 'interlockStationCode', label: '所属联锁站:', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.centralizedStationList} { prop: 'interlockStationCode', label: '所属联锁站:', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.ciStationList}
] ]
} }
} }

View File

@ -266,7 +266,9 @@ export default {
}, },
lampPositionModel: { lampPositionModel: {
lampPositionType: '' lampPositionType: ''
} },
centralizedStationList: [], //
ciStationList: [] //
}; };
}, },
computed: { computed: {
@ -293,20 +295,6 @@ export default {
} }
return list; return list;
}, },
centralizedStationList() {
let list = [];
list = this.stationList.filter(station=>{
return station.centralized;
});
return list;
},
ciStationList() {
let list = [];
list = this.stationList.filter(station=> {
return station.ciStation;
});
return list;
},
form() { form() {
return { return {
labelWidth: '150px', labelWidth: '150px',
@ -426,6 +414,12 @@ export default {
}); });
}, },
methods: { methods: {
handleInit() {
if (this.stationList && this.stationList.length) {
this.centralizedStationList = this.stationList.filter(station=> station.centralized);
this.ciStationList = this.stationList.filter(station=> station.ciStation);
}
},
hover(field) { hover(field) {
this.field = field == this.field ? '' : field; this.field = field == this.field ? '' : field;
this.signalSectionCode(this.field); this.signalSectionCode(this.field);
@ -435,12 +429,13 @@ export default {
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code)); this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
}, },
deviceSelect(selected) { deviceSelect(selected) {
if (selected && selected._type.toUpperCase() == 'Signal'.toUpperCase() && (this.field != 'selectSingalCode' && this.field != 'signalCodesType' && this.field != 'signalIgnoreRouteEnd' && this.field != 'signalCodes')) { if (selected && selected._type == 'Signal' && (this.field != 'selectSingalCode' && this.field != 'signalCodesType' && this.field != 'signalIgnoreRouteEnd' && this.field != 'signalCodes')) {
this.handleInit();
this.editModel = getModel('Signal'); this.editModel = getModel('Signal');
this.$refs.dataform && this.$refs.dataform.resetFields(); this.$refs.dataform && this.$refs.dataform.resetFields();
this.activeName = 'first'; this.activeName = 'first';
this.editModel = deepAssign(this.editModel, selected); this.editModel = deepAssign(this.editModel, selected);
} else if (selected && selected._type.toUpperCase() == 'Section'.toUpperCase() && this.field == 'selectSingalCode') { } else if (selected && selected._type == 'Section' && this.field == 'selectSingalCode') {
if (selected.type == '01' || selected.type === '03') { if (selected.type == '01' || selected.type === '03') {
this.$refs.createSignal.setSectionCode(selected.code); this.$refs.createSignal.setSectionCode(selected.code);
} else if (selected.type == '02') { } else if (selected.type == '02') {
@ -464,12 +459,12 @@ export default {
this.signalStationModel.signalLists.push(selected.code); this.signalStationModel.signalLists.push(selected.code);
} }
this.activeName = 'three'; this.activeName = 'three';
} else if (selected && selected._type === 'Signal' && this.field == 'signalIgnoreRouteEnd') { } else if (selected && selected._type == 'Signal' && this.field == 'signalIgnoreRouteEnd') {
if (!this.editModel.ignoreRouteEnd.includes(selected.code) && this.editModel.code != selected.code) { if (!this.editModel.ignoreRouteEnd.includes(selected.code) && this.editModel.code != selected.code) {
this.editModel.ignoreRouteEnd.push(selected.code); this.editModel.ignoreRouteEnd.push(selected.code);
} }
this.activeName = 'first'; this.activeName = 'first';
} else if (selected && selected._type === 'Signal' && this.field == 'signalCodes') { } else if (selected && selected._type == 'Signal' && this.field == 'signalCodes') {
if (!this.ciModelForm.signalList.includes(selected.code)) { if (!this.ciModelForm.signalList.includes(selected.code)) {
this.ciModelForm.signalList.push(selected.code); this.ciModelForm.signalList.push(selected.code);
} }

View File

@ -21,7 +21,8 @@ export default {
}, },
data() { data() {
return { return {
editModel: getModel('Switch') editModel: getModel('Switch'),
centralizedStationList: []
}; };
}, },
computed: { computed: {
@ -98,21 +99,27 @@ export default {
'switchList', 'switchList',
'stationList', 'stationList',
'lineCode' 'lineCode'
]), ])
centralizedStationList() { // centralizedStationList() {
let list = []; // let list = [];
list = this.stationList.filter(station=>{ // list = this.stationList.filter(station=>{
return station.centralized; // return station.centralized;
}); // });
return list; // return list;
} // }
}, },
methods:{ methods:{
handleInit() {
if (this.stationList && this.stationList.length) {
this.centralizedStationList = this.stationList.filter(station=> station.centralized );
}
},
deviceChange(code) { deviceChange(code) {
this.$emit('setCenter', code); this.$emit('setCenter', code);
this.setModel(this.$store.getters['map/getDeviceByCode'](code)); this.setModel(this.$store.getters['map/getDeviceByCode'](code));
}, },
setModel(data) { setModel(data) {
this.handleInit();
this.$refs.dataform && this.$refs.dataform.resetFields(); this.$refs.dataform && this.$refs.dataform.resetFields();
this.editModel = deepAssign(this.editModel, data); this.editModel = deepAssign(this.editModel, data);
}, },

View File

@ -5,7 +5,7 @@
<el-button v-if="isCreate" size="mini" type="primary" class="createRunPlan" @click="handleCreate">{{ $t('planMonitor.createRunningDiagram') }}</el-button> <el-button v-if="isCreate" size="mini" type="primary" class="createRunPlan" @click="handleCreate">{{ $t('planMonitor.createRunningDiagram') }}</el-button>
</div> </div>
<!--<QueryListPage ref="queryListPage" :query-form="queryForm" :pager-config="pagerConfig" :query-list="queryList" style="width: 91%;margin-left:4%;margin-top:20px;" />--> <!--<QueryListPage ref="queryListPage" :query-form="queryForm" :pager-config="pagerConfig" :query-list="queryList" style="width: 91%;margin-left:4%;margin-top:20px;" />-->
<el-card v-loading="loading" style="width: 91%;margin-left:4%;margin-top:20px;"> <el-card v-loading="loading" style="width: 91%;margin-left:4%;margin-top:20px;padding:50px">
<el-table <el-table
:data="runPlanList" :data="runPlanList"
highlight-current-row highlight-current-row

View File

@ -65,7 +65,7 @@ export default {
const url = urlObject.createObjectURL(content); const url = urlObject.createObjectURL(content);
const el = document.createElement('a'); const el = document.createElement('a');
el.href = url; el.href = url;
el.download = `${this.row.name}.json`; el.download = `综合-${this.row.name}.json`;
el.click(); el.click();
urlObject.revokeObjectURL(url); urlObject.revokeObjectURL(url);
this.$set(this.row, 'loading' + this.idx, false); this.$set(this.row, 'loading' + this.idx, false);

View File

@ -309,7 +309,7 @@ export default {
const url = urlObject.createObjectURL(content); const url = urlObject.createObjectURL(content);
const el = document.createElement('a'); const el = document.createElement('a');
el.href = url; el.href = url;
el.download = `${resultData.name}.json`; el.download = `地图-${resultData.name}.json`;
el.click(); el.click();
urlObject.revokeObjectURL(url); urlObject.revokeObjectURL(url);
this.$set(row, 'loading' + idx, false); this.$set(row, 'loading' + idx, false);

View File

@ -1,96 +1,99 @@
<template> <template>
<div v-if="dialogVisible" v-quickMenuDrag class="reminder-drag"> <div v-if="dialogVisible" v-quickMenuDrag class="reminder-drag">
<div style="width: 100%;text-align: center;font-size: 18px;padding-top: 8px;">条件管理</div> <div style="width: 100%;text-align: center;font-size: 18px;padding-top: 8px;">条件管理</div>
<i style="position: relative;top: -25px;right: -370px;font-size: 20px;" class="el-icon-close" @click="handleClose" /> <i style="position: relative;top: -25px;right: -370px;font-size: 20px;cursor: pointer;" class="el-icon-close" @click="handleClose" />
<el-tabs v-model="activeName"> <div @mousedown="handleMouseDown">
<el-tab-pane label="列车触发" name="first"> <el-tabs v-model="activeName" style="cursor: default;">
<div> <el-tab-pane label="列车触发" name="first">
<el-table <div>
:data="tableData" <el-table
style="width: 100%" :data="tableData"
height="200px" style="width: 100%"
> height="200px"
<el-table-column prop="code" label="触发列车" /> >
<el-table-column prop="physicalCode" label="到达区段"> <el-table-column prop="code" label="触发列车" />
<template slot-scope="scope"> <el-table-column prop="physicalCode" label="到达区段">
<span>{{ getSectionName(scope.row.physicalCode) }}</span> <template slot-scope="scope">
</template> <span>{{ getSectionName(scope.row.physicalCode) }}</span>
</el-table-column> </template>
<el-table-column prop="stop" label="是否停车"> </el-table-column>
<template slot-scope="scope"> <el-table-column prop="stop" label="是否停车">
<span>{{ handleStopValue(scope.row.stop) }}</span> <template slot-scope="scope">
</template> <span>{{ handleStopValue(scope.row.stop) }}</span>
</el-table-column> </template>
<el-table-column width="150"> </el-table-column>
<template slot-scope="scope"> <el-table-column width="150">
<el-button <template slot-scope="scope">
size="mini" <el-button
@click="handleEdit(scope.$index, scope.row)" size="mini"
>编辑</el-button> @click="handleEdit(scope.$index, scope.row)"
<el-button >编辑</el-button>
size="mini" <el-button
type="danger" size="mini"
@click="handleDelete(scope.$index, scope.row)" type="danger"
>删除</el-button> @click="handleDelete(scope.$index, scope.row)"
</template> >删除</el-button>
</el-table-column> </template>
</el-table> </el-table-column>
<el-form ref="form" label-width="80px" style="margin-top: 8px;padding: 10px;" :model="formModel" :rules="rules"> </el-table>
<el-form-item label="触发列车" prop="code"> <el-form ref="form" label-width="80px" style="margin-top: 8px;padding: 10px;" :model="formModel" :rules="rules">
<el-select v-model="formModel.code" size="small" filterable placeholder="请选择"> <el-form-item label="触发列车" prop="code">
<el-option <el-select v-model="formModel.code" size="small" filterable placeholder="请选择">
v-for="item in trainList" <el-option
:key="item.code" v-for="item in trainList"
:label="item.code" :key="item.code"
:value="item.code" :label="item.code"
/> :value="item.code"
</el-select> />
<el-button :type="field === 'triggerTrain'? 'danger': 'primary'" size="small" @click="hover('triggerTrain')">{{ $t('map.activate') }}</el-button> </el-select>
</el-form-item> <el-button :type="field === 'triggerTrain'? 'danger': 'primary'" size="small" @click="hover('triggerTrain')">{{ $t('map.activate') }}</el-button>
<el-form-item label="到达区段" prop="physicalCode"> </el-form-item>
<el-select v-model="formModel.physicalCode" size="small" filterable placeholder="请选择"> <el-form-item label="到达区段" prop="physicalCode">
<el-option <el-select v-model="formModel.physicalCode" size="small" filterable placeholder="请选择">
v-for="item in sectionList" <el-option
:key="item.code" v-for="item in sectionList"
:label="item.name" :key="item.code"
:value="item.code" :label="item.name"
/> :value="item.code"
</el-select> />
<el-button :type="field === 'triggerSection'? 'danger': 'primary'" size="small" @click="hover('triggerSection')">{{ $t('map.activate') }}</el-button> </el-select>
</el-form-item> <el-button :type="field === 'triggerSection'? 'danger': 'primary'" size="small" @click="hover('triggerSection')">{{ $t('map.activate') }}</el-button>
<el-form-item label="是否停车"> </el-form-item>
<el-select v-model="formModel.stop" clearable size="small" placeholder="请选择"> <el-form-item label="是否停车">
<el-option <el-select v-model="formModel.stop" clearable size="small" placeholder="请选择">
v-for="item in stopList" <el-option
:key="item.value" v-for="item in stopList"
:label="item.label" :key="item.value"
:value="item.value" :label="item.label"
/> :value="item.value"
</el-select> />
</el-form-item> </el-select>
<el-form-item style="text-align: center;" label-width="0"> </el-form-item>
<el-button v-if="!update" size="small" type="primary" @click="onCommit">添加</el-button> <el-form-item style="text-align: center;" label-width="0">
<el-button v-if="update" size="small" type="primary" @click="onUpdate">修改</el-button> <el-button v-if="!update" size="small" type="primary" @click="onCommit">添加</el-button>
<el-button v-if="update" size="small" @click="initData">取消</el-button> <el-button v-if="update" size="small" type="primary" @click="onUpdate">修改</el-button>
</el-form-item> <el-button v-if="update" size="small" @click="initData">取消</el-button>
</el-form> </el-form-item>
</div> </el-form>
</el-tab-pane>
<el-tab-pane label="延时触发" name="second">
<div style="text-align: center;">
<div style="display: inline-block;margin-right: 10px;font-size: 14px;">延时条件</div>
<el-input-number v-model="delay" size="small" controls-position="right" :min="0" />
<div style="margin-top: 10px;">
<el-button type="primary" size="mini" @click="onUpdateDelay">修改</el-button>
</div> </div>
</div> </el-tab-pane>
</el-tab-pane> <el-tab-pane label="延时触发" name="second">
</el-tabs> <div style="text-align: center;height: 480px;">
<div style="display: inline-block;margin-right: 10px;font-size: 14px;">延时时间</div>
<el-input-number v-model="delay" size="small" controls-position="right" :min="0" />
<span>s</span>
<div style="margin-top: 10px;">
<el-button type="primary" size="mini" @click="onUpdateDelay">修改</el-button>
</div>
</div>
</el-tab-pane>
</el-tabs>
</div>
</div> </div>
</template> </template>
<script> <script>
import { updateActionCondition, getActionCondition } from '@/api/script'; import { updateActionCondition } from '@/api/script';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
export default { export default {
name: 'ConditionManage', name: 'ConditionManage',
@ -120,7 +123,8 @@ export default {
updateIndex: '', updateIndex: '',
field: '', field: '',
delay: 0, delay: 0,
activeName: 'first' activeName: 'first',
actionInfo: {}
}; };
}, },
computed: { computed: {
@ -138,21 +142,18 @@ export default {
} }
}, },
methods:{ methods:{
doShow(actionId) { doShow(actionInfo) {
if (this.actionId === actionId && this.dialogVisible) { this.actionInfo = actionInfo;
if (this.actionId === actionInfo.id && this.dialogVisible) {
this.handleClose(); this.handleClose();
} else { } else {
this.tableData = []; this.tableData = [];
this.delay = 0; this.delay = 0;
this.actionId = actionId; this.actionId = actionInfo.id;
getActionCondition(this.$route.query.group, this.actionId).then(resp => { if (this.actionInfo.condition) {
if (resp.data) { this.tableData = [...(this.actionInfo.condition.trainStatuses || [])];
this.tableData = resp.data.trainStatuses; this.delay = (this.actionInfo.condition.delay || 0) / 1000;
this.delay = (resp.data.delay || 0) / 1000; }
}
}).catch(()=> {
this.$message.error('获取条件失败');
});
this.dialogVisible = true; this.dialogVisible = true;
} }
}, },
@ -174,6 +175,9 @@ export default {
return '/'; return '/';
} }
}, },
handleMouseDown(e) {
e.stopPropagation();
},
handleEdit(index, row) { handleEdit(index, row) {
this.updateIndex = index; this.updateIndex = index;
this.update = true; this.update = true;
@ -190,6 +194,10 @@ export default {
} }
updateActionCondition(this.$route.query.group, this.actionId, param).then(resp => { updateActionCondition(this.$route.query.group, this.actionId, param).then(resp => {
this.tableData = data; this.tableData = data;
this.actionInfo.condition = {
trainStatuses: data,
delay:this.delay * 1000
};
this.initData(); this.initData();
this.$message.success('删除条件成功'); this.$message.success('删除条件成功');
}).catch(()=>{ }).catch(()=>{
@ -207,6 +215,10 @@ export default {
} }
updateActionCondition(this.$route.query.group, this.actionId, param).then(resp => { updateActionCondition(this.$route.query.group, this.actionId, param).then(resp => {
this.tableData = data; this.tableData = data;
this.actionInfo.condition = {
trainStatuses: data,
delay:this.delay * 1000
};
this.initData(); this.initData();
this.$message.success('修改条件成功'); this.$message.success('修改条件成功');
}).catch(()=>{ }).catch(()=>{
@ -221,6 +233,10 @@ export default {
param.delay = this.delay * 1000; param.delay = this.delay * 1000;
} }
updateActionCondition(this.$route.query.group, this.actionId, param).then(resp => { updateActionCondition(this.$route.query.group, this.actionId, param).then(resp => {
this.actionInfo.condition = {
trainStatuses: [...this.tableData],
delay:this.delay * 1000
};
this.initData(); this.initData();
this.$message.success('修改条件成功'); this.$message.success('修改条件成功');
}).catch(()=>{ }).catch(()=>{
@ -230,7 +246,10 @@ export default {
initData() { initData() {
this.update = false; this.update = false;
this.updateIndex = ''; this.updateIndex = '';
this.field = '';
this.$refs.form && this.$refs.form.resetFields(); this.$refs.form && this.$refs.form.resetFields();
this.formModel.stop = '';
this.actionInfo = {};
}, },
onCommit() { onCommit() {
this.$refs.form.validate((valid) => { this.$refs.form.validate((valid) => {
@ -243,6 +262,10 @@ export default {
} }
updateActionCondition(this.$route.query.group, this.actionId, param).then(resp => { updateActionCondition(this.$route.query.group, this.actionId, param).then(resp => {
this.tableData = data; this.tableData = data;
this.actionInfo.condition = {
trainStatuses: data,
delay:this.delay * 1000
};
this.initData(); this.initData();
this.$message.success('添加条件成功'); this.$message.success('添加条件成功');
}).catch(()=>{ }).catch(()=>{

View File

@ -43,7 +43,7 @@
</span> </span>
</div> </div>
<div class="btnGroup"> <div class="btnGroup">
<el-button :type="conditionActionId === actionInfo.id? 'danger':'primary'" size="mini" @click="handleCondition(actionInfo)">{{ conditionActionId === actionInfo.id? '关闭条件':'触发条件' }}</el-button> <el-button :type="conditionActionId === actionInfo.id? 'danger':'primary'" size="mini" @click="handleCondition(actionInfo)">{{ getConditionNum(actionInfo.condition) }}</el-button>
<el-button v-if="actionInfo.visible && !actionInfo.isModify" type="primary" size="mini" style="margin-left:10px;" @click="modifyAction(actionInfo)">{{ $t('scriptRecord.modifyConversitionButton') }}</el-button> <el-button v-if="actionInfo.visible && !actionInfo.isModify" type="primary" size="mini" style="margin-left:10px;" @click="modifyAction(actionInfo)">{{ $t('scriptRecord.modifyConversitionButton') }}</el-button>
<el-button v-if="actionInfo.visible && actionInfo.isModify" :loading="modifyTextLoading" type="danger" size="mini" style="margin-left:10px;" @click="confirmModify(actionInfo)">确定</el-button> <el-button v-if="actionInfo.visible && actionInfo.isModify" :loading="modifyTextLoading" type="danger" size="mini" style="margin-left:10px;" @click="confirmModify(actionInfo)">确定</el-button>
<el-button v-if="actionInfo.visible && actionInfo.isModify" type="" size="mini" style="margin-left:10px;" @click="cancleModify(actionInfo)">取消</el-button> <el-button v-if="actionInfo.visible && actionInfo.isModify" type="" size="mini" style="margin-left:10px;" @click="cancleModify(actionInfo)">取消</el-button>
@ -120,7 +120,7 @@ export default {
} else { } else {
this.conditionActionId = actionInfo.id; this.conditionActionId = actionInfo.id;
} }
this.$emit('showConditionManage', actionInfo.id); this.$emit('showConditionManage', actionInfo);
}, },
covertData(memberList, element) { covertData(memberList, element) {
const member = memberList.find(elem=>{ return elem.id == element.memberId; }); const member = memberList.find(elem=>{ return elem.id == element.memberId; });
@ -144,16 +144,16 @@ export default {
}); });
} }
this.actionInfoList.push({id: element.id, isStartCoversition: true, memberName: memberName, targetName:targetNameList.toString() }); this.actionInfoList.push({id: element.id, isStartCoversition: true, memberName: memberName, targetName:targetNameList.toString(), condition: element.condition });
break; break;
} }
case 'Drive': { case 'Drive': {
this.actionInfoList.push({id: element.id, isDrive: true, memberName: memberName, targetName:this.covertSection(element.targetSectionCode)}); this.actionInfoList.push({id: element.id, isDrive: true, memberName: memberName, targetName:this.covertSection(element.targetSectionCode), condition: element.condition});
break; break;
} }
case 'Conversation': case 'Conversation':
{ {
this.actionInfoList.push({id: element.id, isCoversition: true, memberName: memberName, reply: element.content, row: element, visible: true, isModify:false, modifyText:''}); this.actionInfoList.push({id: element.id, isCoversition: true, memberName: memberName, reply: element.content, row: element, visible: true, isModify:false, modifyText:'', condition: element.condition});
break; break;
} }
// case 'Exit_Conversation': { // case 'Exit_Conversation': {
@ -199,16 +199,16 @@ export default {
if (operateName) { if (operateName) {
const deviceTypeList = {Section:'区段', Switch:'道岔', Signal:'信号机', Stand:'站台', Station:'车站', TrainWindow:'车次窗', ControlConvertMenu:'控制模式', Driver:'司机', Train:'列车'}; const deviceTypeList = {Section:'区段', Switch:'道岔', Signal:'信号机', Stand:'站台', Station:'车站', TrainWindow:'车次窗', ControlConvertMenu:'控制模式', Driver:'司机', Train:'列车'};
const operateTypeName = deviceTypeList[operateType]; const operateTypeName = deviceTypeList[operateType];
this.actionInfoList.push({id: element.id, isOperation: true, memberName: memberName, command: operateTypeName + '(' + operateName.label + ')', row: element, visible: false}); this.actionInfoList.push({id: element.id, isOperation: true, memberName: memberName, command: operateTypeName + '(' + operateName.label + ')', row: element, visible: false, condition: element.condition});
} }
} else { } else {
// deviceFaultType // deviceFaultType
// element.operationParamMap.faultType; // element.operationParamMap.faultType;
// '(' + operateName.label + ')' // '(' + operateName.label + ')'
if (commandName == 'Set_Fault') { if (commandName == 'Set_Fault') {
this.actionInfoList.push({id: element.id, isOperation: true, memberName: memberName, command: '设置故障', row: element, visible: false}); this.actionInfoList.push({id: element.id, isOperation: true, memberName: memberName, command: '设置故障', row: element, visible: false, condition: element.condition});
} else if (commandName == 'Cancel_Fault') { } else if (commandName == 'Cancel_Fault') {
this.actionInfoList.push({id: element.id, isOperation: true, memberName: memberName, command: '取消故障', row: element, visible: false}); this.actionInfoList.push({id: element.id, isOperation: true, memberName: memberName, command: '取消故障', row: element, visible: false, condition: element.condition});
} }
} }
break; break;
@ -225,7 +225,7 @@ export default {
Open_Or_Close_Door:'开关门', Open_Or_Close_Door:'开关门',
Switch_Hook_Lock: '道岔钩锁' Switch_Hook_Lock: '道岔钩锁'
}; };
this.actionInfoList.push({id: element.id, isCommand: true, memberName: memberName, command: CommandList[element.commandInitiateVO.commandType], targetName:targetName.name, row: element, visible: false}); this.actionInfoList.push({id: element.id, isCommand: true, memberName: memberName, command: CommandList[element.commandInitiateVO.commandType], targetName:targetName.name, row: element, visible: false, condition: element.condition});
break; break;
} }
} }
@ -305,6 +305,16 @@ export default {
this.deleteLoading = false; this.deleteLoading = false;
this.$messageBox('删除会话/动作失败:' + error.message); this.$messageBox('删除会话/动作失败:' + error.message);
}); });
},
getConditionNum(condition) {
let num = 0;
if (condition && condition.trainStatuses) {
num = num + condition.trainStatuses.length;
}
if (condition && condition.delay) {
num = num + 1;
}
return `触发条件(${num})`;
} }
} }
}; };

View File

@ -7,7 +7,7 @@
导入剧本 导入剧本
</el-button> </el-button>
</div> </div>
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" style="width: 91%;margin-left:4%;margin-top:20px;" /> <QueryListPage ref="queryListPage" :card-padding="50" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" style="width: 91%;margin-left:4%;margin-top:20px;" />
<script-publish ref="publishScript" :title="$t('scriptRecord.publishScript')" @reloadTable="reloadTable" @create="handleConfirmPublish" /> <script-publish ref="publishScript" :title="$t('scriptRecord.publishScript')" @reloadTable="reloadTable" @create="handleConfirmPublish" />
<create-script ref="createScript" :title="$t('scriptRecord.createScript')" @reloadTable="reloadTable" @create="handleConfirmCreate" /> <create-script ref="createScript" :title="$t('scriptRecord.createScript')" @reloadTable="reloadTable" @create="handleConfirmCreate" />
<create-script ref="modifyScript" :title="$t('scriptRecord.modifyScript')" @reloadTable="reloadTable" @create="handleConfirmModify" /> <create-script ref="modifyScript" :title="$t('scriptRecord.modifyScript')" @reloadTable="reloadTable" @create="handleConfirmModify" />
@ -293,7 +293,7 @@ export default {
const url = urlObject.createObjectURL(content); const url = urlObject.createObjectURL(content);
const el = document.createElement('a'); const el = document.createElement('a');
el.href = url; el.href = url;
el.download = `${resultData.name}.json`; el.download = `剧本-${resultData.name}.json`;
el.click(); el.click();
urlObject.revokeObjectURL(url); urlObject.revokeObjectURL(url);
}); });

View File

@ -412,7 +412,7 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
dumpScriptDataNew(group).then(resp => { dumpScriptDataNew(group).then(resp => {
this.$parent.resetBeginTime(); // this.$parent.resetBeginTime();
this.$refs['getAction'].loadInitData(); this.$refs['getAction'].loadInitData();
this.$store.dispatch('training/updateMemberListInScript', this.$store.dispatch('training/updateMemberListInScript',
{ {
@ -440,6 +440,7 @@ export default {
this.oldMember = {id:this.orignalUserRoleId, type:new_member.type}; this.oldMember = {id:this.orignalUserRoleId, type:new_member.type};
this.$message.success(this.$t('scriptRecord.resetDataSuccess')); this.$message.success(this.$t('scriptRecord.resetDataSuccess'));
}).catch(() => { }).catch(() => {
// console.log(error);
this.$messageBox(this.$t('scriptRecord.resetDataFail')); this.$messageBox(this.$t('scriptRecord.resetDataFail'));
}); });
}); });
@ -560,8 +561,8 @@ export default {
this.$messageBox(error.message); this.$messageBox(error.message);
}); });
}, },
showConditionManage(actionId) { showConditionManage(actionInfo) {
this.$refs.conditionManage.doShow(actionId); this.$refs.conditionManage.doShow(actionInfo);
}, },
clearConditionActionId() { clearConditionActionId() {
this.$refs.getAction.conditionActionId = ''; this.$refs.getAction.conditionActionId = '';