剧本录制样式修改
This commit is contained in:
parent
2cf92690ec
commit
2727309402
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="main" :style="{width: canvasWidth+'px'}" @mousemove="mousemove">
|
||||
<div class="main" :style="{width:canvasWidth+'px'}" @mousemove="mousemove">
|
||||
<div v-show="panelShow" :panelShow="panelShow">
|
||||
<transition name="el-zoom-in-bottom">
|
||||
<map-system-draft ref="mapCanvas" @back="back" />
|
||||
@ -107,14 +107,6 @@ export default {
|
||||
Jl3dDrive
|
||||
},
|
||||
mixins: [WindowResizeHandler],
|
||||
props: {
|
||||
size: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
mode: '',
|
||||
@ -154,18 +146,6 @@ export default {
|
||||
...mapGetters('config', [
|
||||
'canvasId'
|
||||
]),
|
||||
trainingId() {
|
||||
return this.$route.query.trainingId;
|
||||
},
|
||||
skinCode() {
|
||||
return this.$route.query.skinCode;
|
||||
},
|
||||
mapId() {
|
||||
return this.$route.query.mapId;
|
||||
},
|
||||
prdType() {
|
||||
return this.$route.query.prdType;
|
||||
},
|
||||
isLesson() {
|
||||
return this.mode === 'teach' || this.mode === 'record' || this.mode === 'manage';
|
||||
},
|
||||
@ -188,7 +168,10 @@ export default {
|
||||
return this.mode === 'plan';
|
||||
},
|
||||
isDrive() {
|
||||
return this.prdType == '04';
|
||||
return this.$route.query.prdType == '04';
|
||||
},
|
||||
trainingId() {
|
||||
return this.$route.query.trainingId;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -216,9 +199,7 @@ export default {
|
||||
});
|
||||
},
|
||||
$route() {
|
||||
this.$nextTick(() => {
|
||||
this.initLoadData();
|
||||
});
|
||||
this.initLoadData();
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
@ -243,8 +224,8 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
resizeHandler() {
|
||||
const width = this.size ? this.size.width : this._clientWidth;
|
||||
const height = this.size ? this.size.height : this._clientHeight;
|
||||
const width = this._clientWidth;
|
||||
const height = this._clientHeight;
|
||||
|
||||
this.$store.dispatch('config/resize', { width, height });
|
||||
|
||||
@ -334,15 +315,15 @@ export default {
|
||||
async loadSimulationInfo() {
|
||||
const resp = await getSimulationInfo(this.group);
|
||||
if (resp && resp.code == 200) {
|
||||
this.$store.dispatch('scriptRecord/updateSimulationPause', resp.data.pause);
|
||||
this.$store.dispatch('scriptRecord/updateSimulationPause',resp.data.pause);
|
||||
this.questId = Number(resp.data.questId) || 0;
|
||||
}
|
||||
},
|
||||
// 加载地图数据
|
||||
async initLoadData() {
|
||||
// const width = document.documentElement.clientWidth;
|
||||
// const height = document.documentElement.clientHeight + 200;
|
||||
// this.$store.dispatch('config/resize', { width, height });
|
||||
const width = document.documentElement.clientWidth;
|
||||
const height = document.documentElement.clientHeight + 200;
|
||||
this.$store.dispatch('config/resize', { width, height });
|
||||
this.$store.dispatch('training/reset');
|
||||
|
||||
try {
|
||||
@ -400,8 +381,9 @@ export default {
|
||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
||||
this.$store.dispatch('training/setPrdType', '');
|
||||
|
||||
if (parseInt(this.skinCode)) {
|
||||
await this.loadMapData(this.skinCode);
|
||||
const skinCode = this.$route.query.skinCode;
|
||||
if (parseInt(skinCode)) {
|
||||
await this.loadMapData(skinCode);
|
||||
|
||||
} else {
|
||||
this.endViewLoading();
|
||||
@ -411,10 +393,11 @@ export default {
|
||||
async initLoadDemonData() {
|
||||
this.$store.dispatch('training/end', TrainingMode.NORMAL);
|
||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
||||
this.$store.dispatch('training/setPrdType', this.prdTypeMap[this.prdType]);
|
||||
this.$store.dispatch('training/setPrdType', this.prdTypeMap[this.$route.query.prdType]);
|
||||
|
||||
if (parseInt(this.skinCode)) {
|
||||
await this.loadMapData(this.skinCode);
|
||||
const skinCode = this.$route.query.skinCode;
|
||||
if (parseInt(skinCode)) {
|
||||
await this.loadMapData(skinCode);
|
||||
|
||||
} else {
|
||||
this.endViewLoading();
|
||||
@ -426,8 +409,9 @@ export default {
|
||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
||||
this.$store.dispatch('training/setPrdType', '01');
|
||||
|
||||
if (parseInt(this.skinCode)) {
|
||||
await this.loadMapData(this.skinCode);
|
||||
const skinCode = this.$route.query.skinCode;
|
||||
if (parseInt(skinCode)) {
|
||||
await this.loadMapData(skinCode);
|
||||
|
||||
} else {
|
||||
this.endViewLoading();
|
||||
@ -439,8 +423,9 @@ export default {
|
||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
||||
this.switchMode('01');
|
||||
|
||||
if (parseInt(this.mapId)) {
|
||||
await this.loadMapDataById(this.mapId);
|
||||
const mapId = this.$route.query.mapId;
|
||||
if (parseInt(mapId)) {
|
||||
await this.loadMapDataById(mapId);
|
||||
} else {
|
||||
this.endViewLoading();
|
||||
}
|
||||
@ -451,8 +436,9 @@ export default {
|
||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
||||
this.$store.dispatch('training/setPrdType', '01');
|
||||
|
||||
if (parseInt(this.skinCode)) {
|
||||
await this.loadMapData(this.skinCode);
|
||||
const skinCode = this.$route.query.skinCode;
|
||||
if (parseInt(skinCode)) {
|
||||
await this.loadMapData(skinCode);
|
||||
|
||||
} else {
|
||||
this.endViewLoading();
|
||||
@ -545,11 +531,11 @@ export default {
|
||||
if (this.isDrive) {
|
||||
this.panelShow = false;
|
||||
this.drivingShow = true;
|
||||
this.$refs.Jl3dDrive.show(this.skinCode);
|
||||
this.$refs.Jl3dDrive.show(this.$route.query.skinCode);
|
||||
} else {
|
||||
this.panelShow = false;
|
||||
this.simulationShow = true;
|
||||
this.$refs.Jl3dSimulation.show(this.skinCode);
|
||||
this.$refs.Jl3dSimulation.show(this.$route.query.skinCode);
|
||||
}
|
||||
},
|
||||
showpanel() {
|
||||
|
@ -13,14 +13,12 @@
|
||||
</el-button-group>
|
||||
</div>
|
||||
<set-time ref="setTime" @ConfirmSelectBeginTime="start" />
|
||||
<!-- <tip-script-record ref="tipTaskRecord" :group="group" /> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- 单人仿真 -->
|
||||
<script>
|
||||
import SetTime from './demon/setTime';
|
||||
import TipScriptRecord from './tipScriptRecord';
|
||||
// import { mapGetters } from 'vuex';
|
||||
import { Notification } from 'element-ui';
|
||||
// import { getGoodsTryUse } from '@/api/management/goods';
|
||||
@ -37,7 +35,6 @@ export default {
|
||||
name: 'MenuTask',
|
||||
components: {
|
||||
SetTime,
|
||||
TipScriptRecord
|
||||
},
|
||||
props: {
|
||||
group: {
|
||||
|
@ -1,6 +1,8 @@
|
||||
<template>
|
||||
<div class="script-parent">
|
||||
<div class="script-card" />
|
||||
<div class="script-card">
|
||||
<tip-script-record ref="tipTaskRecord" :group="group"/>
|
||||
</div>
|
||||
<div class="script-display">
|
||||
<display ref="display" :size="size" />
|
||||
</div>
|
||||
@ -10,19 +12,22 @@
|
||||
<script>
|
||||
import WindowResizeHandler from '@/mixin/WindowResizeHandler';
|
||||
import Display from '@/views/display/index';
|
||||
import TipScriptRecord from './tipScriptRecord';
|
||||
|
||||
export default {
|
||||
name: 'ScriptDisplay',
|
||||
components: {
|
||||
Display
|
||||
Display,
|
||||
TipScriptRecord
|
||||
},
|
||||
mixins: [WindowResizeHandler],
|
||||
data() {
|
||||
return {
|
||||
size: {
|
||||
width: document.documentElement.clientWidth - 600,
|
||||
width: document.documentElement.clientWidth - 900,
|
||||
height: document.documentElement.clientHeight
|
||||
}
|
||||
},
|
||||
group:this.$route.query.group,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -31,7 +36,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
resizeHandler() {
|
||||
this.size = { width: this._clientWidth - 600, height: this._clientHeight};
|
||||
this.size = { width: this._clientWidth - 900, height: this._clientHeight};
|
||||
},
|
||||
loadInitData() {
|
||||
}
|
||||
@ -44,7 +49,7 @@ export default {
|
||||
display: flex;
|
||||
flex-flow: row;
|
||||
.script-card {
|
||||
width: 800px;
|
||||
width: 900px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -15,12 +15,10 @@
|
||||
</el-button-group>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import Vue from 'vue';
|
||||
import GetAction from './scriptRecord/getAction';
|
||||
import GetAction from '../scriptRecord/getAction';
|
||||
import {saveScriptScenes, saveScriptData, dumpScriptData, updateMapLocation, scriptPause, executeScript} from '@/api/simulation';
|
||||
|
||||
export default {
|
||||
@ -153,7 +151,7 @@ import {saveScriptScenes, saveScriptData, dumpScriptData, updateMapLocation, scr
|
||||
}).then(() => {
|
||||
dumpScriptData(group).then(resp => {
|
||||
// this.isSaveStage = true;
|
||||
this.$parent.resetBeginTime();
|
||||
this.$parent.$refs['display'].$refs['menuScript'].resetBeginTime();
|
||||
this.$refs["getAction"].loadInitData();
|
||||
this.initAutoSaveScript();
|
||||
this.$message.success('清除数据成功');
|
@ -8,40 +8,52 @@
|
||||
<el-option v-for="actionType in actionTypeList" :key="actionType.label" :label="actionType.label" :value="actionType.value"></el-option>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<el-form-item :label="memberName" class="conditionVO" prop="actionVO.memberId">
|
||||
<el-select v-model="modalData.actionVO.memberId" placeholder="请选择主体角色" :disabled="isPause&&isNotModify">
|
||||
<el-form-item label="讲述者" class="conditionVO" prop="actionVO.memberId">
|
||||
<el-select v-model="modalData.actionVO.memberId" placeholder="请选择讲述者" :disabled="isPause&&isNotModify">
|
||||
<el-option v-for="member in memberList" :key="member.id" :label="member.role+(member.name==undefined?'':member.name)" :value="member.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="接收者" class="conditionVO" prop="actionVO.targetId" v-if="isConversitionAdd">
|
||||
<el-select v-model="modalData.actionVO.targetId" placeholder="请选择目标角色" :disabled="isPause&&isNotModify">
|
||||
<el-form-item label="接收者" class="conditionVO" prop="actionVO.targetId">
|
||||
<el-select v-model="modalData.actionVO.targetId" placeholder="请选择接收者" :disabled="isPause&&isNotModify">
|
||||
<el-option v-for="member in memberList" :key="member.id" :label="member.role+(member.name==undefined?'':member.name)" :value="member.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="内容" class="conditionVO" prop="actionVO.reply" v-if="isConversitionAdd">
|
||||
<el-form-item label="内容" class="conditionVO" prop="actionVO.reply">
|
||||
<el-input v-model="modalData.actionVO.reply" type="textarea" class="textareaStyle" rows="3" :disabled="isPause&&isNotModify"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备指令" class="conditionVO" prop="actionVO.deviceCommand" v-if="isCommandAdd">
|
||||
<el-select v-model="modalData.actionVO.deviceCommand " placeholder="请选择设备指令" @change="changeCommand" class="inputStyle" :disabled="isPause&&isModify">
|
||||
<el-option v-for="deviceCommand in deviceCommandList" :key="deviceCommand.deviceCommand" :label="deviceCommand.label" :value="deviceCommand.deviceCommand"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="起始站台" class="conditionVO" v-if="isJinLu" prop="param.startStation">
|
||||
<el-select v-model="modalData.param.startStation " placeholder="请选择起始站台" class="inputStyle" :disabled="isPause&&isNotModify">
|
||||
<el-option v-for="station in stationList" :key="station.code" :label="station.name" :value="station.code"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="终点站台" class="conditionVO" v-if="isJinLu" prop="param.endStation">
|
||||
<el-select v-model="modalData.param.endStation " placeholder="请选择终点站台" class="inputStyle" :disabled="isPause&&isNotModify">
|
||||
<el-option v-for="station in stationList" :key="station.code" :label="station.name" :value="station.code"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="addScriptActionInfo('modalData')" :disabled="isPause&&isNotModify" :loading="modifying">{{buttonName}}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
<el-card class="commandCard">
|
||||
<div class="addCommand">添加指令</div>
|
||||
<el-form :model="commandData" ref="commandData" :rules="commandRules" label-width="100px" class="actionInfo" label-position="right">
|
||||
<el-form-item label="执行者" class="conditionVO" prop="action.memberId">
|
||||
<el-select v-model="commandData.action.memberId" placeholder="请选择执行者" :disabled="isPause">
|
||||
<el-option v-for="member in memberList" :key="member.id" :label="member.role+(member.name==undefined?'':member.name)" :value="member.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备指令" class="conditionVO" prop="action.deviceCommand">
|
||||
<el-select v-model="commandData.action.deviceCommand " placeholder="请选择设备指令" @change="changeCommand" class="inputStyle" :disabled="isPause">
|
||||
<el-option v-for="deviceCommand in deviceCommandList" :key="deviceCommand.deviceCommand" :label="deviceCommand.label" :value="deviceCommand.deviceCommand"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="起始站台" class="conditionVO" v-if="isJinLu" prop="param.startStation">
|
||||
<el-select v-model="commandData.param.startStation " placeholder="请选择起始站台" class="inputStyle" :disabled="isPause">
|
||||
<el-option v-for="station in stationList" :key="station.code" :label="station.name" :value="station.code"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="终点站台" class="conditionVO" v-if="isJinLu" prop="param.endStation">
|
||||
<el-select v-model="commandData.param.endStation " placeholder="请选择终点站台" class="inputStyle" :disabled="isPause">
|
||||
<el-option v-for="station in stationList" :key="station.code" :label="station.name" :value="station.code"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="addCommandAction('commandData')" :disabled="isPause" :loading="adding">添加动作</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@ -84,6 +96,8 @@
|
||||
'$store.state.scriptRecord.simulationPause': function(val){
|
||||
this.isPause=!(this.$store.state.scriptRecord.simulationPause);
|
||||
this.$parent.$parent.$parent.setIsParse(this.isPause);
|
||||
this.$refs['modalData'].clearValidate();
|
||||
this.$refs['commandData'].clearValidate();
|
||||
},
|
||||
},
|
||||
data() {
|
||||
@ -94,21 +108,25 @@
|
||||
targetId:"",
|
||||
reply:"",
|
||||
type:"Conversation",
|
||||
|
||||
}
|
||||
},
|
||||
commandData:{
|
||||
action:{
|
||||
memberId:"",
|
||||
deviceCommand:"",
|
||||
commandParamList:[]
|
||||
commandParamList:[],
|
||||
type:"Command",
|
||||
},
|
||||
param:{
|
||||
startStation:"",
|
||||
endStation:"",
|
||||
}
|
||||
},
|
||||
deviceTypeReadOnly:false,
|
||||
isPause:false,
|
||||
isNotModify:true,
|
||||
modifying:false,
|
||||
memberName:"讲述者",
|
||||
isConversitionAdd:true,
|
||||
isCommandAdd:false,
|
||||
adding:false,
|
||||
actionTypeList:DeviceTypeDic.ConstSelect.actionType,
|
||||
isJinLu:false,
|
||||
stationList:[],
|
||||
@ -126,6 +144,16 @@
|
||||
{ required: true, message: '请选择目标角色', trigger: 'change' }
|
||||
]
|
||||
},
|
||||
},
|
||||
commandRules:{
|
||||
action:{
|
||||
memberId:[
|
||||
{ required: true, message: '请选择主体角色', trigger: 'change' }
|
||||
],
|
||||
deviceCommand:[
|
||||
{ required: true, message: '请选择设备指令', trigger: 'change' }
|
||||
]
|
||||
},
|
||||
param:{
|
||||
startStation:[
|
||||
{ required: true, message: '请选择起始站台', trigger: 'change' }
|
||||
@ -166,15 +194,37 @@
|
||||
this.stationList=resultData;
|
||||
})
|
||||
},
|
||||
addCommandAction(formName){
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
let group=this.group;
|
||||
this.commandData.action.type="Command";
|
||||
if(this.commandData.action.deviceCommand=="Train_Manual_Route_Blocking_Drive")
|
||||
{this.commandData.action.commandParamList=[this.commandData.param.startStation,this.commandData.param.endStation];}
|
||||
let data=this.commandData.action;
|
||||
let obj=this;
|
||||
this.adding=true;
|
||||
addScriptAction(group,data).then(response=>{
|
||||
this.adding=false;
|
||||
this.$message.success('添加动作成功');
|
||||
this.$emit('create');
|
||||
this.initCommandActionData();
|
||||
}).catch(error => {
|
||||
this.adding=false;
|
||||
this.$messageBox(`添加动作失败: ${error.message}`);
|
||||
});
|
||||
}
|
||||
else {
|
||||
console.log('error submit!!');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
addScriptActionInfo(formName){
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
let group=this.group;
|
||||
if(this.modalData.actionVO.deviceCommand==""){
|
||||
delete this.modalData.actionVO.deviceCommand;
|
||||
}
|
||||
if(this.modalData.actionVO.deviceCommand=="Train_Manual_Route_Blocking_Drive")
|
||||
{this.modalData.actionVO.commandParamList=[this.modalData.param.startStation,this.modalData.param.endStation];}
|
||||
this.modalData.actionVO.type="Conversation";
|
||||
let data=this.modalData.actionVO;
|
||||
let obj=this;
|
||||
this.modifying=true;
|
||||
@ -184,7 +234,6 @@
|
||||
this.modifying=false;
|
||||
this.$message.success('添加动作成功');
|
||||
this.$emit('create');
|
||||
// this.resetDisabled();
|
||||
this.initActionData();
|
||||
}).catch(error => {
|
||||
this.modifying=false;
|
||||
@ -196,13 +245,11 @@
|
||||
let actionId=this.modalData.actionVO.id;
|
||||
modifyScriptAction(group,actionId,data).then(response=>{
|
||||
this.modifying=false;
|
||||
|
||||
this.isNotModify=true;
|
||||
this.$parent.$parent.$parent.setDisabled(this.isNotModify);
|
||||
this.$parent.$parent.setDisabled(this.isNotModify);
|
||||
this.$emit('modifyButtonName');
|
||||
this.$message.success('修改动作成功');
|
||||
this.$emit('create');
|
||||
// this.resetDisabled();
|
||||
this.initActionData();
|
||||
}).catch(error => {
|
||||
this.modifying=false;
|
||||
@ -220,73 +267,38 @@
|
||||
if(this.$refs['modalData'])
|
||||
{
|
||||
this.$refs['modalData'].resetFields();
|
||||
// this.$nextTick(function(){
|
||||
this.memberName="讲述者";
|
||||
this.deviceTypeReadOnly=false;
|
||||
this.modalData.actionVO.type="Conversation";
|
||||
this.modalData.actionVO.memberId="";
|
||||
this.modalData.actionVO.targetId="";
|
||||
// this.modalData.actionVO.deviceCommand="";
|
||||
this.modalData.actionVO.reply="";
|
||||
this.modalData.param.startStation="";
|
||||
this.isConversitionAdd=true;
|
||||
this.isCommandAdd=false;
|
||||
this.isJinLu=false;
|
||||
this.modalData.param.endStation="";
|
||||
// });
|
||||
this.modalData.actionVO.type="Conversation";
|
||||
this.modalData.actionVO.memberId="";
|
||||
this.modalData.actionVO.targetId="";
|
||||
this.modalData.actionVO.reply="";
|
||||
}
|
||||
},
|
||||
clearValidate(){
|
||||
if(this.$refs['modalData'])
|
||||
if(this.$refs['commandData'])
|
||||
{
|
||||
this.$refs['modalData'].clearValidate();
|
||||
this.$refs['commandData'].clearValidate();
|
||||
}
|
||||
},
|
||||
initActionData(){
|
||||
this.resetDisabled();
|
||||
},
|
||||
changeType(index){
|
||||
switch(index)
|
||||
initCommandActionData(){
|
||||
if(this.$refs['commandData'])
|
||||
{
|
||||
case "Conversation":{
|
||||
this.memberName="讲述者";
|
||||
this.isConversitionAdd=true;
|
||||
this.isCommandAdd=false;
|
||||
this.isJinLu=false;
|
||||
this.clearValidate();
|
||||
break;
|
||||
}
|
||||
case "Command":{
|
||||
this.memberName="执行者";
|
||||
this.isConversitionAdd=false;
|
||||
this.isCommandAdd=true;
|
||||
//
|
||||
if(this.modalData.actionVO.deviceCommand=="Train_Manual_Route_Blocking_Drive")
|
||||
{
|
||||
this.isJinLu=true;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.isJinLu=false;
|
||||
}
|
||||
this.clearValidate();
|
||||
break;
|
||||
}
|
||||
default:{
|
||||
this.clearValidate();
|
||||
break;
|
||||
}
|
||||
this.$refs['commandData'].resetFields();
|
||||
this.commandData.action.memberId="";
|
||||
this.commandData.param.startStation="";
|
||||
this.isJinLu=false;
|
||||
this.commandData.param.endStation="";
|
||||
}
|
||||
|
||||
},
|
||||
changeCommand(index){
|
||||
this.modalData.actionVO.deviceCommand
|
||||
switch(index)
|
||||
{
|
||||
case "Train_Manual_Route_Blocking_Drive":{
|
||||
this.isJinLu=true;
|
||||
this.getDeviceCode();
|
||||
this.clearValidate();
|
||||
this.clearValidate();
|
||||
break;
|
||||
}
|
||||
default:{
|
||||
@ -302,35 +314,31 @@
|
||||
{
|
||||
this.clearValidate();
|
||||
this.isNotModify=false;
|
||||
this.$parent.$parent.$parent.setDisabled(this.isNotModify);
|
||||
this.$parent.$parent.setDisabled(this.isNotModify);
|
||||
this.initData();
|
||||
this.modalData.actionVO.id=data.id;
|
||||
this.modalData.actionVO.memberId=data.memberId;
|
||||
this.modalData.actionVO.type=data.type;
|
||||
this.deviceTypeReadOnly=true;
|
||||
// this.modalData.actionVO.time=data.time;
|
||||
if(data.type=="Conversation")
|
||||
{
|
||||
this.isJinLu=false;
|
||||
this.modalData.actionVO.targetId=data.targetId;
|
||||
this.isConversitionAdd=true;
|
||||
this.isCommandAdd=false;
|
||||
this.modalData.actionVO.reply=data.reply;
|
||||
}
|
||||
else if(data.type=="Command")
|
||||
{
|
||||
this.isJinLu=false;
|
||||
this.isConversitionAdd=false;
|
||||
this.isCommandAdd=true;
|
||||
this.modalData.actionVO.reply="";
|
||||
this.modalData.actionVO.deviceCommand=data.deviceCommand;
|
||||
if(this.modalData.actionVO.deviceCommand=="Train_Manual_Route_Blocking_Drive")
|
||||
{
|
||||
this.isJinLu=true;
|
||||
this.modalData.param.startStation=data.commandParamList[0];
|
||||
this.modalData.param.endStation=data.commandParamList[1];
|
||||
}
|
||||
}
|
||||
// else if(data.type=="Command")
|
||||
// {
|
||||
// this.isJinLu=false;
|
||||
// this.isConversitionAdd=false;
|
||||
// // this.isCommandAdd=true;
|
||||
// this.modalData.actionVO.reply="";
|
||||
// this.modalData.actionVO.deviceCommand=data.deviceCommand;
|
||||
// if(this.modalData.actionVO.deviceCommand=="Train_Manual_Route_Blocking_Drive")
|
||||
// {
|
||||
// this.isJinLu=true;
|
||||
// this.modalData.param.startStation=data.commandParamList[0];
|
||||
// this.modalData.param.endStation=data.commandParamList[1];
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -369,4 +377,13 @@
|
||||
font-size:15px;
|
||||
padding: 20px 10px;
|
||||
}
|
||||
.commandCard{
|
||||
margin-left: 20px;
|
||||
padding-bottom: 20px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.addCommand{
|
||||
font-size:15px;
|
||||
padding: 20px 10px;
|
||||
}
|
||||
</style>
|
@ -4,7 +4,9 @@
|
||||
<span class="titleStyle">剧本动作</span>
|
||||
</div>
|
||||
<div class="tab-pane-big">
|
||||
<add-action ref="addBehavior" :group="group" @create="create" :buttonName="buttonName" :operateType="operateType" @modifyButtonName="modifyButtonName" class="addScript"></add-action>
|
||||
<el-scrollbar wrapClass="scrollbar-wrapper" ref="elScrollbar" class="elScrollbar">
|
||||
<add-action ref="addBehavior" :group="group" @create="create" :buttonName="buttonName" :operateType="operateType" @modifyButtonName="modifyButtonName" class="addScript"></add-action>
|
||||
</el-scrollbar>
|
||||
<!-- <div class="vertialLine"></div> -->
|
||||
<div class="block actionListTable">
|
||||
<el-scrollbar wrapClass="scrollbar-wrapper" ref="elActionScrollbar">
|
||||
@ -138,7 +140,6 @@
|
||||
create(){
|
||||
this.reloadTable();
|
||||
this.$nextTick(function(){
|
||||
debugger;
|
||||
var div = this.$refs['elActionScrollbar'].$refs['wrap'];
|
||||
div.scrollTop=this.$refs['elActionScrollbar'].wrap.scrollHeight;
|
||||
});
|
||||
@ -166,7 +167,6 @@
|
||||
float:left;
|
||||
width:450px;
|
||||
display: inline-block;
|
||||
position: fixed;
|
||||
}
|
||||
.actionListTable{
|
||||
font-size: 15px;
|
||||
@ -218,4 +218,8 @@
|
||||
width: 470px;
|
||||
margin-top:10px;
|
||||
}
|
||||
.elScrollbar{
|
||||
width: 450px;
|
||||
position: absolute;
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue
Block a user