场景编辑代码调整
This commit is contained in:
parent
a65afc6cab
commit
f1dc88be33
@ -16,7 +16,9 @@
|
||||
<!-- v-model="scope.row.id" -->
|
||||
<el-checkbox v-if="isModify" v-model="checkBoxActionList[scope.row.id].status" :disabled="checkBoxActionList[scope.row.id].disabled" class="checkBoxAction" @change="((val)=>{changeSelectActionId(val, scope.row.id, scope.$index)})" />
|
||||
<el-radio v-if="isOperate" v-model="radioBoxAction" :label="scope.row.id" name="operateAction" class="checkBoxAction" @change="((val)=>{changeSelectRadioActionId(val, scope.row.id, scope.$index)})">{{ '' }}</el-radio>
|
||||
<div v-if="dialogVisible">{{ covert(scope.row) }}</div>
|
||||
<div v-if="dialogVisible">{{ scope.row.remarkName }}</div>
|
||||
<!-- covert(scope.row) -->
|
||||
<!-- -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="语音识别关键词列表" width="350">
|
||||
@ -265,6 +267,37 @@ export default {
|
||||
watch: {
|
||||
'$store.state.map.mapDataLoadedCount': function (val) {
|
||||
this.parseMember();
|
||||
getCompetitionPracticalSceneById(this.formModel.id).then(response=>{
|
||||
const commandEvaluationRuleVOs = {};
|
||||
if (response.data.commandEvaluationRuleVOs) {
|
||||
response.data.commandEvaluationRuleVOs.forEach(data=>{
|
||||
commandEvaluationRuleVOs[data.actionId] = data;
|
||||
// commandEvaluationRuleVOs[data.actionId].inputVisible = false;
|
||||
});
|
||||
}
|
||||
const stepVOs = {};
|
||||
if (response.data.stepVOs) {
|
||||
response.data.stepVOs.forEach(data=>{
|
||||
stepVOs[data.startActionId] = data;
|
||||
const dataIndex = this.tempActionList.findIndex((value, index, arr)=>{ return value.id == data.startActionId; });
|
||||
const dataIndex1 = this.tempActionList.findIndex((value, index, arr)=>{ return value.id == data.endActionId; });
|
||||
this.startArray.push(dataIndex);
|
||||
this.endArray.push(dataIndex1);
|
||||
});
|
||||
}
|
||||
// action.remarkName = this.covert(action);
|
||||
this.tempActionList.forEach(action=>{
|
||||
action.remarkName = this.covert(action);
|
||||
});
|
||||
this.actionList = [...this.tempActionList];
|
||||
this.commandEvaluationRuleVOs = commandEvaluationRuleVOs;
|
||||
if (response.data.operationStatisticVO) {
|
||||
this.formModel.operationStatisticVO = response.data.operationStatisticVO;
|
||||
} else {
|
||||
this.formModel.operationStatisticVO = {score:0, itemVOS:[]};
|
||||
}
|
||||
this.stepVOs = stepVOs;
|
||||
});
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
@ -279,37 +312,13 @@ export default {
|
||||
this.formModel.disposalProcesses = row.disposalProcesses;
|
||||
this.formModel.operationScore = row.operationScore;
|
||||
this.formModel.scriptId = row.scriptId;
|
||||
this.actionList = [];
|
||||
this.tempActionList = [];
|
||||
getScriptByIdNew(row.scriptId).then(res=>{
|
||||
this.actionList = res.data.actionList.filter(action=>{
|
||||
this.tempActionList = res.data.actionList.filter(action=>{
|
||||
return action.type != 'Exit_Conversation' && action.type != 'Accept_Conversation_Invitation';
|
||||
});
|
||||
this.jsonData = res;
|
||||
getCompetitionPracticalSceneById(row.id).then(response=>{
|
||||
const commandEvaluationRuleVOs = {};
|
||||
if (response.data.commandEvaluationRuleVOs) {
|
||||
response.data.commandEvaluationRuleVOs.forEach(data=>{
|
||||
commandEvaluationRuleVOs[data.actionId] = data;
|
||||
// commandEvaluationRuleVOs[data.actionId].inputVisible = false;
|
||||
});
|
||||
}
|
||||
const stepVOs = {};
|
||||
if (response.data.stepVOs) {
|
||||
response.data.stepVOs.forEach(data=>{
|
||||
stepVOs[data.startActionId] = data;
|
||||
const dataIndex = this.actionList.findIndex((value, index, arr)=>{ return value.id == data.startActionId; });
|
||||
const dataIndex1 = this.actionList.findIndex((value, index, arr)=>{ return value.id == data.endActionId; });
|
||||
this.startArray.push(dataIndex);
|
||||
this.endArray.push(dataIndex1);
|
||||
});
|
||||
}
|
||||
this.commandEvaluationRuleVOs = commandEvaluationRuleVOs;
|
||||
if (response.data.operationStatisticVO) {
|
||||
this.formModel.operationStatisticVO = response.data.operationStatisticVO;
|
||||
} else {
|
||||
this.formModel.operationStatisticVO = {score:0, itemVOS:[]};
|
||||
}
|
||||
this.stepVOs = stepVOs;
|
||||
});
|
||||
// 加载地图数据
|
||||
loadMapDataById(res.data.mapId, 'parse');
|
||||
});
|
||||
@ -360,6 +369,7 @@ export default {
|
||||
this.$store.dispatch('map/mapClear');
|
||||
},
|
||||
covert(element) {
|
||||
console.log(JSON.stringify(element), '8888888---666666');
|
||||
const member = this.memberList[element.memberId];
|
||||
let resultData = '';
|
||||
if (element.type == 'Accept_Conversation_Invitation') {
|
||||
|
@ -282,7 +282,7 @@ export const operateEnum = {
|
||||
params:[
|
||||
{
|
||||
code:'stationCode',
|
||||
name:'车站',
|
||||
name:'车站为',
|
||||
function:getStationNameById
|
||||
},
|
||||
{
|
||||
@ -326,7 +326,7 @@ export const operateEnum = {
|
||||
params:[
|
||||
{
|
||||
code:'stationCode',
|
||||
name:'车站',
|
||||
name:'车站为',
|
||||
function:getStationNameById
|
||||
},
|
||||
{
|
||||
@ -354,7 +354,7 @@ export const operateEnum = {
|
||||
params:[
|
||||
{
|
||||
code:'stationCode',
|
||||
name:'车站',
|
||||
name:'车站为',
|
||||
function:getStationNameById
|
||||
},
|
||||
{
|
||||
@ -480,8 +480,81 @@ export const operateEnum = {
|
||||
function: getStationNamList
|
||||
}
|
||||
]
|
||||
},
|
||||
CTC_SEND_NOTICE:{
|
||||
isList:true,
|
||||
name:'发送发车预告',
|
||||
params:[
|
||||
{
|
||||
code:'stationCode',
|
||||
name:'车站为',
|
||||
function:getStationNameById
|
||||
},
|
||||
{
|
||||
code:'runPlanCode',
|
||||
name:'车次号',
|
||||
function:getTripNumberByCode
|
||||
}
|
||||
]
|
||||
},
|
||||
CTC_AGREE_NOTICE:{
|
||||
isList:true,
|
||||
name:'同意发车预告',
|
||||
params:[
|
||||
{
|
||||
code:'stationCode',
|
||||
name:'车站为',
|
||||
function:getStationNameById
|
||||
},
|
||||
{
|
||||
code:'runPlanCode',
|
||||
name:'车次号',
|
||||
function:getTripNumberByCode
|
||||
// 运行计划编码
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
RAIL:{
|
||||
function: getRAILDevicename,
|
||||
RAIL_QUERY_REGISTER:{
|
||||
name:'查询行车簿册',
|
||||
isList:true,
|
||||
params:[
|
||||
{
|
||||
code:'stationCode',
|
||||
name:'车站为',
|
||||
function:getStationNameById
|
||||
}
|
||||
]
|
||||
},
|
||||
RAIL_FILL_IN_REGISTER:{
|
||||
name:'填写行车簿册'
|
||||
},
|
||||
RAIL_FILL_IN_TICKET:{
|
||||
name:'填写票据'
|
||||
},
|
||||
RAIL_QUERY_TICKET:{
|
||||
name:'查询票据',
|
||||
isList:true,
|
||||
params:[
|
||||
{
|
||||
code:'stationCode',
|
||||
name:'车站为',
|
||||
function:getStationNameById
|
||||
}
|
||||
]
|
||||
},
|
||||
RAIL_GIVE_TICKET_TO:{
|
||||
name:'给出票据'
|
||||
}
|
||||
// CMD_RAIL_FILL_IN_TICKET: {value: 'RAIL_FILL_IN_TICKET', label: '填写票据'},
|
||||
// CMD_RAIL_QUERY_TICKET: {value: 'RAIL_QUERY_TICKET', label: '查询票据'},
|
||||
// CMD_RAIL_FILL_IN_REGISTER: {value: 'RAIL_FILL_IN_REGISTER', label: '填写行车簿册'},
|
||||
// CMD_RAIL_QUERY_REGISTER: {value: 'RAIL_QUERY_REGISTER', label: '查询行车簿册'},
|
||||
// CMD_RAIL_GIVE_TICKET_TO: {value: 'RAIL_GIVE_TICKET_TO', label: '给出票据'}
|
||||
}
|
||||
//
|
||||
};
|
||||
|
||||
// // 调度台操作
|
||||
@ -738,8 +811,14 @@ function covertDeviceName(deviceInfo, deviceType) {
|
||||
|
||||
function getCTCDevicename(operationType) {
|
||||
let deviceName = '';
|
||||
const stationRPLogList = ['CTC_SEND_NOTICE', 'CTC_MODIFY_SECTION',
|
||||
'CTC_STATION_SEND_OUT_RUN_PLAN', 'CTC_CANCEL_TWINKLE',
|
||||
'CTC_MODIFY_TRIP_NUMBER', 'CTC_AGREE_NOTICE',
|
||||
'CTC_MODIFY_ADJACENT_STATION'];
|
||||
if (operationType.includes('CTC_ZONE')) {
|
||||
deviceName = '请点击运行图';
|
||||
} else if (stationRPLogList.includes(operationType)) {
|
||||
deviceName = '车务终端 --> 行车日志';
|
||||
} else if (operationType == 'CTC_QUERY_DISPATCH_COMMAND') {
|
||||
const roles = store.state.training.roles;
|
||||
if (roles == 'DISPATCHER') {
|
||||
@ -757,6 +836,18 @@ function getCTCDevicename(operationType) {
|
||||
return deviceName;
|
||||
}
|
||||
|
||||
function getRAILDevicename(operationType) {
|
||||
let deviceName = '';
|
||||
const ticketList = ['RAIL_FILL_IN_TICKET', 'RAIL_QUERY_TICKET', 'RAIL_GIVE_TICKET_TO'];
|
||||
const registerList = ['RAIL_FILL_IN_REGISTER', 'RAIL_QUERY_REGISTER'];
|
||||
if (ticketList.includes(operationType)) {
|
||||
deviceName = '车务终端 --> 票据';
|
||||
} else if (registerList.includes(operationType)) {
|
||||
deviceName = '车务终端 --> 簿册';
|
||||
}
|
||||
return deviceName;
|
||||
}
|
||||
|
||||
function covertOperation(deviceType, operationParamMap, operationType) {
|
||||
let deviceName = '【';
|
||||
let paramName = '';
|
||||
@ -804,6 +895,7 @@ function covertOperation(deviceType, operationParamMap, operationType) {
|
||||
}
|
||||
} else {
|
||||
if (paramInfo.isList) {
|
||||
// debugger;
|
||||
const params = paramInfo.params;
|
||||
if (params && params.length > 0) {
|
||||
paramName += '【';
|
||||
@ -890,6 +982,11 @@ function getDeviceNameById(deviceCode) {
|
||||
const device = store.getters['map/getDeviceByCode'](deviceCode) || {};
|
||||
return device.name;
|
||||
}
|
||||
|
||||
function getTripNumberByCode(code) {
|
||||
return code.slice(3, code.length || 0);
|
||||
}
|
||||
|
||||
function getStationNamList(list) {
|
||||
const nameList = [];
|
||||
list.sort().forEach(stationId => {
|
||||
|
Loading…
Reference in New Issue
Block a user