剧本编制修改
This commit is contained in:
parent
50e847ec57
commit
ecefa16f5e
@ -210,10 +210,10 @@ export function getScriptMemberData(group) {
|
||||
}
|
||||
|
||||
/** 清除仿真剧本数据*/
|
||||
export function dumpScriptData(scriptId) {
|
||||
export function dumpScriptData(group) {
|
||||
return request({
|
||||
url: `/api/simulation/${scriptId}/clearScriptRecord`,
|
||||
method: 'post'
|
||||
url: `/api/simulation/${group}/scriptWrite/saveData`,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -77,9 +77,10 @@ export default {
|
||||
{label: '管理员', value: 'Admin'},
|
||||
{label: '教员', value: 'Instructor'},
|
||||
{label: '行调', value: 'Dispatcher'},
|
||||
{label: '车站', value: 'Attendant'},
|
||||
{label: '行值', value: 'Attendant'},
|
||||
{label: '观众', value: 'Audience'},
|
||||
{label: '司机', value: 'Driver'}
|
||||
{label: '司机', value: 'Driver'},
|
||||
{label: '通号', value: 'Repair'}
|
||||
],
|
||||
|
||||
SimulationType: [
|
||||
|
@ -8,7 +8,7 @@
|
||||
</el-button-group> -->
|
||||
<el-button-group>
|
||||
<el-button type="success" :disabled="isDisable" @click="selectBeginTime">按计划行车</el-button>
|
||||
<el-button type="danger" :disabled="!isDisable" @click="end">退出计划</el-button>
|
||||
<!-- <el-button type="danger" :disabled="!isDisable" @click="end">退出计划</el-button> -->
|
||||
<el-button type="primary" @click="back">返回</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<el-form :model="modalData" ref="modalData" :rules="rules" label-width="100px" class="actionInfo" label-position="right">
|
||||
<el-form-item label="主体角色" class="conditionVO" prop="actionVO.memberId">
|
||||
<el-select v-model="modalData.actionVO.memberId" placeholder="请选择主体角色">
|
||||
<el-option v-for="member in memberList" :key="member.id" :label="member.name" :value="member.id"></el-option>
|
||||
<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">
|
||||
@ -16,7 +16,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="目标角色" class="conditionVO" prop="actionVO.targetId" v-if="isConversitionAdd">
|
||||
<el-select v-model="modalData.actionVO.targetId" placeholder="请选择目标角色">
|
||||
<el-option v-for="member in memberList" :key="member.id" :label="member.name" :value="member.id"></el-option>
|
||||
<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">
|
||||
@ -47,6 +47,7 @@
|
||||
import Vue from 'vue';
|
||||
import DeviceTypeDic from '@/scripts/DeviceTypeDic';
|
||||
// import CommandForm from "./commandForm";
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
import {addScriptAction,modifyScriptAction,getAvailableDeviceCommand,getDeviceCodeByDeviceType,getScriptMemberData} from '@/api/simulation';
|
||||
export default {
|
||||
name: 'addAction',
|
||||
@ -67,6 +68,14 @@
|
||||
// components:{
|
||||
// CommandForm,
|
||||
// },
|
||||
watch:{
|
||||
'$store.state.socket.simulationStart': function (val) {
|
||||
if(val)
|
||||
{
|
||||
this.initData();
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
modalData:{
|
||||
@ -120,7 +129,14 @@
|
||||
methods:{
|
||||
initData(){
|
||||
getScriptMemberData(this.group).then(resp => {
|
||||
this.memberList=resp.data;
|
||||
let roleTypeList=ConstConfig.ConstSelect.roleType;
|
||||
let lastData=JSON.stringify(resp.data);
|
||||
roleTypeList.forEach(function(element){
|
||||
let rolename=element.value;
|
||||
lastData=lastData.replace(new RegExp(rolename,'g'),element.label);
|
||||
});
|
||||
lastData=JSON.parse(lastData);
|
||||
this.memberList=lastData;
|
||||
getAvailableDeviceCommand().then(response=>{
|
||||
this.deviceCommandList=response.data;
|
||||
this.getDeviceCode();
|
||||
@ -131,7 +147,6 @@
|
||||
let params = {deviceType:"StationStand"};
|
||||
let group=this.group;
|
||||
getDeviceCodeByDeviceType(group,params).then(response =>{
|
||||
// debugger;
|
||||
let resultData=response.data;
|
||||
resultData=JSON.parse(JSON.stringify(response.data).replace(/groupNumber/g,"name"));
|
||||
this.stationList=resultData;
|
||||
@ -182,7 +197,6 @@
|
||||
resetDisabled(){
|
||||
if(this.$refs['modalData'])
|
||||
{
|
||||
debugger;
|
||||
this.$refs['modalData'].resetFields();
|
||||
}
|
||||
},
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="actionList">
|
||||
<span class="titleStyle">添加剧本动作</span>
|
||||
<span class="titleStyle">剧本动作</span>
|
||||
</div>
|
||||
<div class="tab-pane-big">
|
||||
<el-scrollbar wrapClass="scrollbar-wrapper" ref="elActionScrollbar">
|
||||
|
@ -14,10 +14,10 @@
|
||||
<get-action ref="getAction" :group="group"></get-action>
|
||||
</div>
|
||||
<el-button-group class="button-group">
|
||||
<el-button type="danger" @click="dumpScenesData">重置剧本</el-button>
|
||||
<el-button type="primary" @click="saveMaplocation">{{$t('scriptRecord.saveMaplocation')}}</el-button>
|
||||
<el-button type="primary" @click="saveScenesStage">{{$t('scriptRecord.saveBackground')}}</el-button>
|
||||
<el-button type="success" @click="saveScenesData">{{$t('scriptRecord.saveData')}}</el-button>
|
||||
<!-- <el-button type="danger" @click="dumpScenesData">重置剧本</el-button> -->
|
||||
</el-button-group>
|
||||
</div>
|
||||
</div>
|
||||
@ -97,12 +97,13 @@
|
||||
})
|
||||
},
|
||||
dumpScenesData() {
|
||||
this.$confirm('此操作将会清除已保存的录制数据, 是否继续?', '提示', {
|
||||
let group=this.group;
|
||||
this.$confirm('此操作将会清除已保存的编制数据, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
dumpScriptData(this.scriptId).then(resp => {
|
||||
dumpScriptData(group).then(resp => {
|
||||
// this.isSaveStage = true;
|
||||
this.$message.success('清除数据成功');
|
||||
}).catch(error => {
|
||||
|
@ -7,7 +7,7 @@
|
||||
<el-option v-for="item in mapList" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
<div class="addScript" @click="addScript">
|
||||
<i class="el-icon-plus"></i>
|
||||
<i class="el-icon-plus" style="color:#409eff;font-size:16px;"></i>
|
||||
<span class="addScriptText">添加剧本</span>
|
||||
</div>
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: (height-125) +'px', width:'100%',margin:'5px 0 0 0' }">
|
||||
@ -134,5 +134,10 @@ export default {
|
||||
font-size: 14px;
|
||||
border-radius: 3px;
|
||||
cursor: pointer;
|
||||
margin-top: 5px;
|
||||
}
|
||||
.addScriptText{
|
||||
color:#409eff;
|
||||
font-size: 15px;
|
||||
}
|
||||
</style>
|
@ -51,7 +51,7 @@
|
||||
labelWidth: '100px',
|
||||
items: [
|
||||
{ prop: 'name', label: '剧本名称', type: 'text', required: true},
|
||||
{ prop: 'mapId', label: '地图', type: 'select', required: true, options: this.mapList,disabled:this.disabled},
|
||||
{ prop: 'mapId', label: '所属地图', type: 'select', required: true, options: this.mapList,disabled:this.disabled},
|
||||
{ prop: 'description', label: '剧本描述', type: 'textarea', required: true},
|
||||
]
|
||||
}
|
||||
@ -64,7 +64,7 @@
|
||||
{ required: true, message: '请输入剧本名称', trigger: 'change' },
|
||||
],
|
||||
mapId: [
|
||||
{ required: true, message: '请选择地图', trigger: 'change' },
|
||||
{ required: true, message: '请选择所属地图', trigger: 'change' },
|
||||
],
|
||||
description:[
|
||||
{ required: true, message: '请输入剧本描述', trigger: 'blur' },
|
||||
|
Loading…
Reference in New Issue
Block a user