新版剧本代码调整
This commit is contained in:
parent
9a9716e5a9
commit
966bed109b
@ -157,6 +157,14 @@ export function scriptRecordNotify(scriptId) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 录制脚本仿真(新版)*/
|
||||||
|
export function scriptRecordNotifyNew(scriptId) {
|
||||||
|
return request({
|
||||||
|
url: `/api/scriptSimulation/${scriptId}/scriptWrite`,
|
||||||
|
method: 'get'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/** 保存剧本背景*/
|
/** 保存剧本背景*/
|
||||||
export function saveScriptScenes(group) {
|
export function saveScriptScenes(group) {
|
||||||
return request({
|
return request({
|
||||||
@ -189,6 +197,13 @@ export function getScriptMemberData(group) {
|
|||||||
method: 'get'
|
method: 'get'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
/** 获取剧本编制的所有成员角色(新版地图)*/
|
||||||
|
export function getScriptMemberDataNew(group) {
|
||||||
|
return request({
|
||||||
|
url: `/api/scriptSimulation/${group}/allMember`,
|
||||||
|
method: 'get'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/** 获取剧本出演成员角色 */
|
/** 获取剧本出演成员角色 */
|
||||||
export function getScriptPlayMember(group) {
|
export function getScriptPlayMember(group) {
|
||||||
@ -198,6 +213,14 @@ export function getScriptPlayMember(group) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 获取剧本出演成员角色(新版地图) */
|
||||||
|
export function getScriptPlayMemberNew(group) {
|
||||||
|
return request({
|
||||||
|
url: `/api/scriptSimulation/${group}/allPlayer`,
|
||||||
|
method: 'get'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/** 取消剧本演出成员角色 */
|
/** 取消剧本演出成员角色 */
|
||||||
export function cancleScriptMembers(group, data) {
|
export function cancleScriptMembers(group, data) {
|
||||||
return request({
|
return request({
|
||||||
@ -207,6 +230,15 @@ export function cancleScriptMembers(group, data) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 取消剧本演出成员角色 */
|
||||||
|
export function cancleScriptMembersNew(group, data) {
|
||||||
|
return request({
|
||||||
|
url: `/api/scriptSimulation/${group}/removePlayers`,
|
||||||
|
method: 'put',
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/** 选择剧本演出成员角色 */
|
/** 选择剧本演出成员角色 */
|
||||||
export function selectScriptMembers(group, data) {
|
export function selectScriptMembers(group, data) {
|
||||||
return request({
|
return request({
|
||||||
@ -216,6 +248,15 @@ export function selectScriptMembers(group, data) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 选择剧本演出成员角色 (新版地图)*/
|
||||||
|
export function selectScriptMembersNew(group, data) {
|
||||||
|
return request({
|
||||||
|
url: `/api/scriptSimulation/${group}/choosePlayers`,
|
||||||
|
method: 'put',
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/** 修改剧本演出成员性别 */
|
/** 修改剧本演出成员性别 */
|
||||||
export function modifyScriptMemberSex(group, playerId, data) {
|
export function modifyScriptMemberSex(group, playerId, data) {
|
||||||
return request({
|
return request({
|
||||||
|
@ -57,6 +57,7 @@ const LessonDetail = () => import('@/views/lesson/details');
|
|||||||
|
|
||||||
const ScriptmanageHome = () => import('@/views/scriptManage/home');
|
const ScriptmanageHome = () => import('@/views/scriptManage/home');
|
||||||
const ScriptDisplay = () => import('@/views/scriptManage/display/index');
|
const ScriptDisplay = () => import('@/views/scriptManage/display/index');
|
||||||
|
const ScriptDisplayNew = () => import('@/views/scriptManage/display/indexNew');
|
||||||
|
|
||||||
const IbpHome = () => import('@/views/ibp/home');
|
const IbpHome = () => import('@/views/ibp/home');
|
||||||
const IbpDraw = () => import('@/views/ibp/ibpDraw/index');
|
const IbpDraw = () => import('@/views/ibp/ibpDraw/index');
|
||||||
@ -154,6 +155,7 @@ export const UrlConfig = {
|
|||||||
display: '/display',
|
display: '/display',
|
||||||
displayNew: '/displayNew',
|
displayNew: '/displayNew',
|
||||||
scriptDisplay: '/scriptDisplay',
|
scriptDisplay: '/scriptDisplay',
|
||||||
|
scriptDisplayNew:'/scriptDisplayNew',
|
||||||
examRuleDraft: '/examRule/draft',
|
examRuleDraft: '/examRule/draft',
|
||||||
examRuleManage: '/examRule/manage',
|
examRuleManage: '/examRule/manage',
|
||||||
lesson: {
|
lesson: {
|
||||||
@ -517,6 +519,13 @@ export const asyncRouter = [
|
|||||||
},
|
},
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
|
{ // 剧本编辑 战场图
|
||||||
|
path: '/scriptDisplayNew/:mode',
|
||||||
|
component: ScriptDisplayNew,
|
||||||
|
meta: {
|
||||||
|
},
|
||||||
|
hidden: true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/displayIscs/system',
|
path: '/displayIscs/system',
|
||||||
component: IscsSystem,
|
component: IscsSystem,
|
||||||
|
@ -87,7 +87,15 @@ export default {
|
|||||||
{label: '司机', value: 'Driver', enLabel: 'Driver '},
|
{label: '司机', value: 'Driver', enLabel: 'Driver '},
|
||||||
{label: '通号', value: 'Repair', enLabel: 'Repairman '}
|
{label: '通号', value: 'Repair', enLabel: 'Repairman '}
|
||||||
],
|
],
|
||||||
|
roleTypeNew:[
|
||||||
|
{label: '管理员', value: 'ADMIN', enLabel: 'Admin '},
|
||||||
|
// {label: '教员', value: 'Instructor', enLabel: 'Instructor '},
|
||||||
|
{label: '行调', value: 'DISPATCHER', enLabel: 'Dispatcher '},
|
||||||
|
{label: '行值', value: 'STATION_SUPERVISOR', enLabel: 'Attendant '},
|
||||||
|
{label: '观众', value: 'AUDIENCE', enLabel: 'Audience '},
|
||||||
|
{label: '司机', value: 'DRIVER', enLabel: 'Driver '},
|
||||||
|
{label: '通号', value: 'MAINTAINER', enLabel: 'Repairman '}
|
||||||
|
],
|
||||||
SimulationType: [
|
SimulationType: [
|
||||||
{ label: '实训', value: 'Training'},
|
{ label: '实训', value: 'Training'},
|
||||||
{ label: '仿真(行调/现地/司机)', value: 'Simulation'},
|
{ label: '仿真(行调/现地/司机)', value: 'Simulation'},
|
||||||
|
@ -90,7 +90,7 @@ export default {
|
|||||||
switch (obj.type) {
|
switch (obj.type) {
|
||||||
case 'scriptDesign': {
|
case 'scriptDesign': {
|
||||||
setSessionStorage('designType', 'scriptDesign');
|
setSessionStorage('designType', 'scriptDesign');
|
||||||
this.$router.push({ path: `${UrlConfig.design.scriptHome}/${obj.mapId}?lineCode=${obj.lineCode}` });
|
this.$router.push({ path: `${UrlConfig.design.scriptHome}/${obj.mapId}?lineCode=${obj.lineCode}&drawWay=${obj.drawWay}` });
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'lessonDesign': {
|
case 'lessonDesign': {
|
||||||
@ -152,7 +152,8 @@ export default {
|
|||||||
type: 'scriptDesign',
|
type: 'scriptDesign',
|
||||||
mapId: elem.id,
|
mapId: elem.id,
|
||||||
cityCode: elem.cityCode,
|
cityCode: elem.cityCode,
|
||||||
lineCode: elem.lineCode
|
lineCode: elem.lineCode,
|
||||||
|
drawWay: elem.drawWay
|
||||||
// code:elem.children.find(n => { return n.name.includes("行调")})
|
// code:elem.children.find(n => { return n.name.includes("行调")})
|
||||||
});
|
});
|
||||||
elem.children.push(
|
elem.children.push(
|
||||||
|
59
src/views/scriptManage/display/indexNew.vue
Normal file
59
src/views/scriptManage/display/indexNew.vue
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
<template>
|
||||||
|
<div class="script-parent">
|
||||||
|
<div class="script-card" :style="{width: widthLeft+'px'}">
|
||||||
|
<tip-script-record ref="tipTaskRecord" :group="group" :width="widthLeft" />
|
||||||
|
</div>
|
||||||
|
<drap-left :width-left="widthLeft" :min="780" :max="980" @drapWidth="drapWidth" />
|
||||||
|
<div class="script-display">
|
||||||
|
<display ref="display" :size="size" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import Display from '@/views/newMap/displayNew/index';
|
||||||
|
import TipScriptRecord from './tipScriptRecord';
|
||||||
|
import drapLeft from '@/views/components/drapLeft/index';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'ScriptDisplayNew',
|
||||||
|
components: {
|
||||||
|
Display,
|
||||||
|
TipScriptRecord,
|
||||||
|
drapLeft
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
widthLeft: 780,
|
||||||
|
size: {
|
||||||
|
width: document.documentElement.clientWidth - 780,
|
||||||
|
height: document.documentElement.clientHeight
|
||||||
|
},
|
||||||
|
group: this.$route.query.group
|
||||||
|
};
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
'$store.state.app.windowSizeCount': function() {
|
||||||
|
this.size = { width: this.$store.state.app.width - 780, height: this.$store.state.app.height};
|
||||||
|
},
|
||||||
|
widthLeft: function(val) {
|
||||||
|
this.size = { width: this.$store.state.app.width - val, height: this.$store.state.app.height};
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
drapWidth(width) {
|
||||||
|
this.widthLeft = Number(width);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
|
@import "src/styles/mixin.scss";
|
||||||
|
.script-parent {
|
||||||
|
display: flex;
|
||||||
|
flex-flow: row;
|
||||||
|
.script-card {
|
||||||
|
width: 780px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -18,7 +18,7 @@ import { UrlConfig } from '@/router/index';
|
|||||||
import { admin, superAdmin} from '@/router';
|
import { admin, superAdmin} from '@/router';
|
||||||
import { getQuestPageList, createQuest, deleteQuest, updateQuest, publishQuest, retractQuest} from '@/api/quest';
|
import { getQuestPageList, createQuest, deleteQuest, updateQuest, publishQuest, retractQuest} from '@/api/quest';
|
||||||
import { launchFullscreen } from '@/utils/screen';
|
import { launchFullscreen } from '@/utils/screen';
|
||||||
import { scriptDraftRecordNotify, scriptRecordNotify } from '@/api/simulation';
|
import { scriptDraftRecordNotify, scriptRecordNotify, scriptRecordNotifyNew } from '@/api/simulation';
|
||||||
import CreateScript from './create';
|
import CreateScript from './create';
|
||||||
import ScriptPublish from './publish';
|
import ScriptPublish from './publish';
|
||||||
|
|
||||||
@ -125,13 +125,25 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
drawUp(index, row) {
|
drawUp(index, row) {
|
||||||
scriptRecordNotify(row.id).then(resp => {
|
const drawWay = this.$route.query.drawWay;
|
||||||
const query = { mapId: row.mapId, group: resp.data, scriptId: row.id, lang:row.lang, lineCode:this.$route.query.lineCode };
|
if (drawWay == 'true') {
|
||||||
this.$router.push({ path: `${UrlConfig.scriptDisplay}/script`, query });
|
scriptRecordNotifyNew(row.id).then(resp => {
|
||||||
launchFullscreen();
|
const query = { mapId: row.mapId, group: resp.data, scriptId: row.id, lang:row.lang, lineCode:this.$route.query.lineCode, drawWay:drawWay};
|
||||||
}).catch(error => {
|
this.$router.push({ path: `${UrlConfig.scriptDisplayNew}/script`, query });
|
||||||
this.$messageBox(`${this.$t('scriptRecord.createSimulationFail')}: ${error.message}`);
|
launchFullscreen();
|
||||||
});
|
}).catch(error => {
|
||||||
|
this.$messageBox(`${this.$t('scriptRecord.createSimulationFail')}: ${error.message}`);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
scriptRecordNotify(row.id).then(resp => {
|
||||||
|
const query = { mapId: row.mapId, group: resp.data, scriptId: row.id, lang:row.lang, lineCode:this.$route.query.lineCode };
|
||||||
|
this.$router.push({ path: `${UrlConfig.scriptDisplay}/script`, query });
|
||||||
|
launchFullscreen();
|
||||||
|
}).catch(error => {
|
||||||
|
this.$messageBox(`${this.$t('scriptRecord.createSimulationFail')}: ${error.message}`);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
deleteScript(index, row) {
|
deleteScript(index, row) {
|
||||||
this.$confirm(this.$t('scriptRecord.deleteScriptTip'), this.$t('global.tips'), {
|
this.$confirm(this.$t('scriptRecord.deleteScriptTip'), this.$t('global.tips'), {
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import Cookies from 'js-cookie';
|
import Cookies from 'js-cookie';
|
||||||
import ConstConfig from '@/scripts/ConstConfig';
|
import ConstConfig from '@/scripts/ConstConfig';
|
||||||
import {getScriptPlayMember, getScriptMemberData, cancleScriptMembers, selectScriptMembers, modifyScriptMemberSex} from '@/api/simulation';
|
import {getScriptPlayMember, getScriptPlayMemberNew, getScriptMemberData, getScriptMemberDataNew, cancleScriptMembers, cancleScriptMembersNew, selectScriptMembers, selectScriptMembersNew, modifyScriptMemberSex} from '@/api/simulation';
|
||||||
export default {
|
export default {
|
||||||
name: 'AddRole',
|
name: 'AddRole',
|
||||||
props: {
|
props: {
|
||||||
@ -43,19 +43,38 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
initData() {
|
initData() {
|
||||||
const group = this.$props.group;
|
const group = this.$props.group;
|
||||||
getScriptMemberData(group).then(response=>{
|
if (this.$route.query.drawWay == 'true') {
|
||||||
const lastData = JSON.stringify(response.data);
|
getScriptMemberDataNew(group).then(response=>{
|
||||||
this.allRoleData = this.coverData(lastData);
|
debugger;
|
||||||
getScriptPlayMember(group).then(response=>{
|
const lastData = JSON.stringify(response.data);
|
||||||
const last = response.data;
|
this.allRoleData = this.coverDataNew(lastData);
|
||||||
// let userdata=JSON.stringify(response.data)
|
getScriptPlayMemberNew(group).then(response=>{
|
||||||
// let reg=new RegExp('\"id\":\"(.*?)\\\"','g');
|
const last = response.data;
|
||||||
// let datalist=userdata.match(reg);
|
// let userdata=JSON.stringify(response.data)
|
||||||
const data = [];
|
// let reg=new RegExp('\"id\":\"(.*?)\\\"','g');
|
||||||
last.forEach(function(element) { data.push(element.id); });
|
// let datalist=userdata.match(reg);
|
||||||
this.selectRoleData = data;
|
const data = [];
|
||||||
|
last.forEach(function(element) { data.push(element.id); });
|
||||||
|
this.selectRoleData = data;
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
} else {
|
||||||
|
getScriptMemberData(group).then(response=>{
|
||||||
|
const lastData = JSON.stringify(response.data);
|
||||||
|
this.allRoleData = this.coverData(lastData);
|
||||||
|
getScriptPlayMember(group).then(response=>{
|
||||||
|
const last = response.data;
|
||||||
|
// let userdata=JSON.stringify(response.data)
|
||||||
|
// let reg=new RegExp('\"id\":\"(.*?)\\\"','g');
|
||||||
|
// let datalist=userdata.match(reg);
|
||||||
|
const data = [];
|
||||||
|
last.forEach(function(element) { data.push(element.id); });
|
||||||
|
this.selectRoleData = data;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
coverData(data) {
|
coverData(data) {
|
||||||
const roleTypeList = ConstConfig.ConstSelect.roleType;
|
const roleTypeList = ConstConfig.ConstSelect.roleType;
|
||||||
@ -72,32 +91,67 @@ export default {
|
|||||||
lastData = JSON.parse(lastData);
|
lastData = JSON.parse(lastData);
|
||||||
return lastData;
|
return lastData;
|
||||||
},
|
},
|
||||||
|
coverDataNew(data) {
|
||||||
|
const roleTypeList = ConstConfig.ConstSelect.roleTypeNew;
|
||||||
|
let lastData = data.replace(new RegExp('id', 'g'), 'key');
|
||||||
|
roleTypeList.forEach(function(element) {
|
||||||
|
const rolename = element.value;
|
||||||
|
if (Cookies.get('user_lang') == 'en') {
|
||||||
|
lastData = lastData.replace(new RegExp(rolename, 'g'), element.enLabel);
|
||||||
|
} else {
|
||||||
|
|
||||||
|
lastData = lastData.replace(new RegExp(rolename, 'g'), element.label);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
lastData = JSON.parse(lastData);
|
||||||
|
return lastData;
|
||||||
|
},
|
||||||
handleChange(value, direction, movedKeys) {
|
handleChange(value, direction, movedKeys) {
|
||||||
switch (direction) {
|
switch (direction) {
|
||||||
case 'right': {
|
case 'right': {
|
||||||
const group = this.$props.group;
|
const group = this.$props.group;
|
||||||
const data = movedKeys;
|
const data = movedKeys;
|
||||||
selectScriptMembers(group, data).then(response=>{
|
if (this.$route.query.drawWay == 'true') {
|
||||||
this.$message.success(this.$t('scriptRecord.selectScriptActorSuccess'));
|
selectScriptMembersNew(group, data).then(response=>{
|
||||||
this.$emit('refresh');
|
this.$message.success(this.$t('scriptRecord.selectScriptActorSuccess'));
|
||||||
})
|
this.$emit('refresh');
|
||||||
.catch(error => {
|
}).catch(error => {
|
||||||
this.$messageBox(`${this.$t('scriptRecord.selectScriptActorFail')}: ${error.message}`);
|
this.$messageBox(`${this.$t('scriptRecord.selectScriptActorFail')}: ${error.message}`);
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
selectScriptMembers(group, data).then(response=>{
|
||||||
|
this.$message.success(this.$t('scriptRecord.selectScriptActorSuccess'));
|
||||||
|
this.$emit('refresh');
|
||||||
|
}).catch(error => {
|
||||||
|
this.$messageBox(`${this.$t('scriptRecord.selectScriptActorFail')}: ${error.message}`);
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'left': {
|
case 'left': {
|
||||||
const group = this.$props.group;
|
const group = this.$props.group;
|
||||||
const data = movedKeys;
|
const data = movedKeys;
|
||||||
cancleScriptMembers(group, data).then(response=>{
|
if (this.$route.query.drawWay == 'true') {
|
||||||
this.$emit('refresh');
|
cancleScriptMembersNew(group, data).then(response=>{
|
||||||
this.$message.success(this.$t('scriptRecord.cancleScriptActorSuccess'));
|
this.$emit('refresh');
|
||||||
})
|
this.$message.success(this.$t('scriptRecord.cancleScriptActorSuccess'));
|
||||||
.catch(error => {
|
}).catch(error => {
|
||||||
this.$messageBox(`${this.$t('scriptRecord.cancleScriptActorFail')}: ${error.message}`);
|
this.$messageBox(`${this.$t('scriptRecord.cancleScriptActorFail')}: ${error.message}`);
|
||||||
this.initData();
|
this.initData();
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
cancleScriptMembers(group, data).then(response=>{
|
||||||
|
this.$emit('refresh');
|
||||||
|
this.$message.success(this.$t('scriptRecord.cancleScriptActorSuccess'));
|
||||||
|
}).catch(error => {
|
||||||
|
this.$messageBox(`${this.$t('scriptRecord.cancleScriptActorFail')}: ${error.message}`);
|
||||||
|
this.initData();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -77,11 +77,13 @@ export default {
|
|||||||
getDeviceCode() {
|
getDeviceCode() {
|
||||||
const params = {deviceType:'StationStand'};
|
const params = {deviceType:'StationStand'};
|
||||||
const group = this.$route.query.group;
|
const group = this.$route.query.group;
|
||||||
getDeviceCodeByDeviceType(group, params).then(response =>{
|
if (this.$route.query.drawWay != 'true') {
|
||||||
let resultData = response.data;
|
getDeviceCodeByDeviceType(group, params).then(response =>{
|
||||||
resultData = JSON.parse(JSON.stringify(response.data).replace(/groupNumber/g, 'name'));
|
let resultData = response.data;
|
||||||
this.stationList = resultData;
|
resultData = JSON.parse(JSON.stringify(response.data).replace(/groupNumber/g, 'name'));
|
||||||
});
|
this.stationList = resultData;
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
deviceSelect(em) {
|
deviceSelect(em) {
|
||||||
if (this.field.toUpperCase() === 'selectSingalCode'.toUpperCase() && em._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
if (this.field.toUpperCase() === 'selectSingalCode'.toUpperCase() && em._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user