desc: 调整剧本加载,删除城市注释
This commit is contained in:
parent
4be4c87327
commit
ff9e69585d
@ -27,7 +27,14 @@ export function deleteQuest(id) {
|
|||||||
export function getQuestById(id) {
|
export function getQuestById(id) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/quest/${id}`,
|
url: `/api/quest/${id}`,
|
||||||
method: 'get',
|
method: 'get'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/** 根据id查询任务基础信息 */
|
||||||
|
export function getQuestByIdList(id) {
|
||||||
|
return request({
|
||||||
|
url: `/api/quest/${id}/detail`,
|
||||||
|
method: 'get'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
/** 更新任务基本信息 */
|
/** 更新任务基本信息 */
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
const mapDeviceStyle = {
|
const mapDeviceStyle = {
|
||||||
|
// '01': 'chengdu_04',
|
||||||
'02': 'fuzhou_01',
|
'02': 'fuzhou_01',
|
||||||
'03': 'bejing_01',
|
'03': 'bejing_01',
|
||||||
'04': 'chengdu_03',
|
'04': 'chengdu_03',
|
||||||
'05': 'batong_01'
|
'05': 'batong_01' // 暂时没有画北京八通线
|
||||||
};
|
};
|
||||||
|
|
||||||
export function selectSkinStyle(code) {
|
export function selectSkinStyle(code) {
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
|
|
||||||
export function getBaseUrl() {
|
export function getBaseUrl() {
|
||||||
let BASE_API
|
let BASE_API;
|
||||||
if (process.env.NODE_ENV === 'development') {
|
if (process.env.NODE_ENV === 'development') {
|
||||||
// BASE_API = 'https://joylink.club/jlcloud'
|
// BASE_API = 'https://joylink.club/jlcloud'
|
||||||
BASE_API = 'https://test.joylink.club/jlcloud'
|
BASE_API = 'https://test.joylink.club/jlcloud'
|
||||||
// BASE_API = 'http://192.168.3.5:9010' // 袁琪
|
// BASE_API = 'http://192.168.3.5:9010' // 袁琪
|
||||||
// BASE_API = 'http://192.168.3.6:9010' // 旭强
|
// BASE_API = 'http://192.168.3.6:9010'; // 旭强
|
||||||
// BASE_API = 'http://192.168.3.4:9010' // 琰培
|
// BASE_API = 'http://192.168.3.4:9010' // 琰培
|
||||||
} else {
|
} else {
|
||||||
BASE_API = process.env.VUE_APP_BASE_API
|
BASE_API = process.env.VUE_APP_BASE_API;
|
||||||
}
|
}
|
||||||
return BASE_API
|
return BASE_API;
|
||||||
}
|
}
|
||||||
|
@ -1,33 +1,88 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog title="任务列表" :visible.sync="show" top="50px" width="70%" :before-doClose="doClose"
|
<div>
|
||||||
:close-on-click-modal="false">
|
<el-dialog
|
||||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList">
|
title="任务列表"
|
||||||
</QueryListPage>
|
:visible.sync="show"
|
||||||
|
top="50px"
|
||||||
|
width="70%"
|
||||||
|
:before-do-close="doClose"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:z-index="2000"
|
||||||
|
>
|
||||||
|
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
<el-dialog
|
||||||
|
title="角色选择"
|
||||||
|
:visible.sync="roleShow"
|
||||||
|
top="50px"
|
||||||
|
width="350px"
|
||||||
|
:before-do-close="roleDoClose"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:z-index="5000"
|
||||||
|
>
|
||||||
|
<div>
|
||||||
|
<el-form ref="ruleForm" :model="form" :rules="rules" label-width="50px">
|
||||||
|
<el-form-item label="角色" prop="role">
|
||||||
|
<el-select v-model="form.role" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in memberList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
:disabled="item.role != 'Dispatcher'"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="roleDoClose">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="confirm">确 定</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getQuestPageList } from '@/api/quest';
|
import { getQuestPageList, getQuestByIdList } from '@/api/quest';
|
||||||
import { getSkinStyleList } from '@/api/management/mapskin'
|
import { getSkinStyleList } from '@/api/management/mapskin';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'addQuest',
|
name: 'AddQuest',
|
||||||
props: {
|
props: {
|
||||||
trainings: {
|
trainings: {
|
||||||
type: Array,
|
type: Array,
|
||||||
|
default: () => {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
},
|
},
|
||||||
detail: {
|
detail: {
|
||||||
type: Object,
|
type: Object,
|
||||||
|
default: () => {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
show: false,
|
show: false,
|
||||||
|
roleShow: false,
|
||||||
skinCodeList: [],
|
skinCodeList: [],
|
||||||
pagerConfig: {
|
pagerConfig: {
|
||||||
pageSize: 'pageSize',
|
pageSize: 'pageSize',
|
||||||
pageIndex: 'pageNum'
|
pageIndex: 'pageNum'
|
||||||
},
|
},
|
||||||
|
row: {},
|
||||||
|
memberList: [],
|
||||||
|
form: {
|
||||||
|
role: ''
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
role: [
|
||||||
|
{ required: true, message: '请选择', trigger: 'change' }
|
||||||
|
]
|
||||||
|
},
|
||||||
queryForm: {
|
queryForm: {
|
||||||
labelWidth: '80px',
|
labelWidth: '80px',
|
||||||
reset: false,
|
reset: false,
|
||||||
@ -49,12 +104,12 @@
|
|||||||
title: '皮肤类型',
|
title: '皮肤类型',
|
||||||
prop: 'skinCode',
|
prop: 'skinCode',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.convertField(row.skinCode, this.skinCodeList, ['code', 'name']) },
|
columnValue: (row) => { return this.convertField(row.skinCode, this.skinCodeList, ['code', 'name']); },
|
||||||
tagType: (row) => { return 'success' }
|
tagType: (row) => { return 'success'; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '创建时间',
|
title: '创建时间',
|
||||||
prop: 'createTime',
|
prop: 'createTime'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
@ -62,10 +117,10 @@
|
|||||||
width: '250',
|
width: '250',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: '加载任务',
|
name: '加载剧本',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
handleClick: this.handleLoad
|
handleClick: this.handleLoad
|
||||||
},
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -74,7 +129,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
currentModel: {}
|
currentModel: {}
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.loadInitData();
|
this.loadInitData();
|
||||||
@ -106,14 +161,14 @@
|
|||||||
this.skinCodeList = [];
|
this.skinCodeList = [];
|
||||||
getSkinStyleList().then(response => {
|
getSkinStyleList().then(response => {
|
||||||
this.skinCodeList = response.data;
|
this.skinCodeList = response.data;
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
convertField(fieldValue, enumList, converFormat) {
|
convertField(fieldValue, enumList, converFormat) {
|
||||||
if (converFormat && converFormat.length >= 2) {
|
if (converFormat && converFormat.length >= 2) {
|
||||||
let value = converFormat[0];
|
const value = converFormat[0];
|
||||||
let label = converFormat[1];
|
const label = converFormat[1];
|
||||||
for (let i = 0; enumList && i < enumList.length; i++) {
|
for (let i = 0; i < enumList.length; i++) {
|
||||||
if ('' + fieldValue === '' + enumList[i][value]) {
|
if ('' + fieldValue === '' + enumList[i][value]) {
|
||||||
return enumList[i][label];
|
return enumList[i][label];
|
||||||
}
|
}
|
||||||
@ -121,10 +176,14 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
async handleLoad(index, row) {
|
||||||
handleLoad(index, row) {
|
this.row = row;
|
||||||
this.$emit('selectQuest', row);
|
const res = await getQuestByIdList(row.id);
|
||||||
this.doClose();
|
if (res.code == 200) {
|
||||||
|
this.memberList = res.data.memberVOList;
|
||||||
|
this.memberList.unshift({id: '', name: '观众', role: 'Dispatcher'});
|
||||||
|
}
|
||||||
|
this.roleShow = true;
|
||||||
},
|
},
|
||||||
|
|
||||||
reloadTable() {
|
reloadTable() {
|
||||||
@ -132,6 +191,21 @@
|
|||||||
this.queryList.reload();
|
this.queryList.reload();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
confirm() {
|
||||||
|
this.$refs['ruleForm'].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$emit('selectQuest', this.row, this.form.role);
|
||||||
|
this.doClose();
|
||||||
|
this.roleDoClose();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
roleDoClose() {
|
||||||
|
this.$refs['ruleForm'].resetFields();
|
||||||
|
this.roleShow = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
@ -2,34 +2,45 @@
|
|||||||
<div class="main" :style="{width: canvasWidth+'px'}" @mousemove="mousemove">
|
<div class="main" :style="{width: canvasWidth+'px'}" @mousemove="mousemove">
|
||||||
<div v-show="panelShow" :panelShow="panelShow">
|
<div v-show="panelShow" :panelShow="panelShow">
|
||||||
<transition name="el-zoom-in-bottom">
|
<transition name="el-zoom-in-bottom">
|
||||||
<map-system-draft ref="mapCanvas" @back="back"></map-system-draft>
|
<map-system-draft ref="mapCanvas" @back="back" />
|
||||||
</transition>
|
</transition>
|
||||||
|
|
||||||
<menu-exam ref="menuExam" v-if="isExam" :offset="offset" :group="group"></menu-exam>
|
<menu-exam v-if="isExam" ref="menuExam" :offset="offset" :group="group" />
|
||||||
|
|
||||||
<menu-lesson ref="lessonMenu" v-if="isLesson" :offset="offset" :group="group" :trainingObj="trainingObj">
|
<menu-lesson v-if="isLesson" ref="lessonMenu" :offset="offset" :group="group" :training-obj="trainingObj" />
|
||||||
</menu-lesson>
|
|
||||||
|
|
||||||
<menu-demon ref="menuDemon" v-if="isDemon" :offset="offset" :group="group" :questId="questId"
|
<menu-demon
|
||||||
@tryTime='tryTime' @hidepanel="hidepanel" @quitQuest="quitQuest">
|
v-if="isDemon"
|
||||||
|
ref="menuDemon"
|
||||||
|
:offset="offset"
|
||||||
|
:group="group"
|
||||||
|
:quest-id="questId"
|
||||||
|
@tryTime="tryTime"
|
||||||
|
@hidepanel="hidepanel"
|
||||||
|
@quitQuest="quitQuest"
|
||||||
|
/>
|
||||||
|
|
||||||
</menu-demon>
|
<menu-screen v-if="isScreen" ref="menuScreen" :offset="offset" :group="group" @tryTime="tryTime" />
|
||||||
|
|
||||||
<menu-screen ref="menuScreen" v-if="isScreen" :offset="offset" :group="group" @tryTime='tryTime'>
|
<menu-plan v-if="isPlan" ref="menuPlan" :offset="offset" :group="group" />
|
||||||
</menu-screen>
|
|
||||||
|
|
||||||
<menu-plan ref="menuPlan" v-if="isPlan" :offset="offset" :group="group"></menu-plan>
|
<menu-replay v-if="isReplay" ref="menuReplay" :offset="offset" :group="group" />
|
||||||
|
|
||||||
<menu-replay ref="menuReplay" v-if="isReplay" :offset="offset" :group="group"></menu-replay>
|
<menu-script v-if="isTask" ref="menuScript" :offset="offset" :group="group" />
|
||||||
|
|
||||||
<menu-script ref="menuScript" v-if="isTask" :offset="offset" :group="group"></menu-script>
|
<menu-schema
|
||||||
|
v-if="isDemon || isPlan || isTask "
|
||||||
|
ref="menuSchema"
|
||||||
|
:offset="offset"
|
||||||
|
:group="group"
|
||||||
|
@runPlanLoadShow="runPlanLoadShow"
|
||||||
|
@runPlanViewShow="runPlanViewShow"
|
||||||
|
@faultChooseShow="faultChooseShow"
|
||||||
|
@runQuestLoadShow="runQuestLoadShow"
|
||||||
|
@switchMode="switchMode"
|
||||||
|
/>
|
||||||
|
|
||||||
<menu-schema ref="menuSchema" v-if="isDemon || isPlan || isTask " :offset="offset" :group="group"
|
<menu-system-time ref="menuSystemTime" :offset="offset" :group="group" />
|
||||||
@runPlanLoadShow="runPlanLoadShow" @runPlanViewShow="runPlanViewShow" @faultChooseShow="faultChooseShow"
|
|
||||||
@runQuestLoadShow="runQuestLoadShow" @switchMode="switchMode">
|
|
||||||
</menu-schema>
|
|
||||||
|
|
||||||
<menu-system-time ref="menuSystemTime" :offset="offset" :group="group"></menu-system-time>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <Three-Test v-show="simulationShow" :panelShow="simulationShow" ref="ThreeTest" @showpanel="showpanel">
|
<!-- <Three-Test v-show="simulationShow" :panelShow="simulationShow" ref="ThreeTest" @showpanel="showpanel">
|
||||||
@ -37,10 +48,10 @@
|
|||||||
<Jl3d-Simulation v-show="drivingShow" :panelShow="drivingShow" ref="Jl3dSimulation" @showdriving="showdriving">
|
<Jl3d-Simulation v-show="drivingShow" :panelShow="drivingShow" ref="Jl3dSimulation" @showdriving="showdriving">
|
||||||
</Jl3d-Simulation> -->
|
</Jl3d-Simulation> -->
|
||||||
|
|
||||||
<fault-choose ref="faultChoose" :group="group"></fault-choose>
|
<fault-choose ref="faultChoose" :group="group" />
|
||||||
<run-plan-Load ref="runPlanLoad" :group="group"></run-plan-Load>
|
<run-plan-Load ref="runPlanLoad" :group="group" />
|
||||||
<run-plan-view ref="runPlanView" :group="group"></run-plan-view>
|
<run-plan-view ref="runPlanView" :group="group" />
|
||||||
<add-quest ref="addQuest" @selectQuest="selectQuest"></add-quest>
|
<add-quest ref="addQuest" @selectQuest="selectQuest" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -91,7 +102,7 @@
|
|||||||
MenuScreen,
|
MenuScreen,
|
||||||
MenuScript,
|
MenuScript,
|
||||||
MenuSchema,
|
MenuSchema,
|
||||||
MenuSystemTime,
|
MenuSystemTime
|
||||||
// ThreeTest,
|
// ThreeTest,
|
||||||
// Jl3dSimulation
|
// Jl3dSimulation
|
||||||
},
|
},
|
||||||
@ -116,9 +127,9 @@
|
|||||||
prdTypeMap: {
|
prdTypeMap: {
|
||||||
'01': '01', // 现地 => 现地
|
'01': '01', // 现地 => 现地
|
||||||
'02': '02', // 行调 => 行调
|
'02': '02', // 行调 => 行调
|
||||||
'04': '02', //司机加实 => 行调
|
'04': '02' // 司机加实 => 行调
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters([
|
...mapGetters([
|
||||||
@ -157,7 +168,7 @@
|
|||||||
return this.mode === 'plan';
|
return this.mode === 'plan';
|
||||||
},
|
},
|
||||||
isDrive() {
|
isDrive() {
|
||||||
return this.$route.query.prdType == "04";
|
return this.$route.query.prdType == '04';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -202,8 +213,8 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
resizeHandler() {
|
resizeHandler() {
|
||||||
let width = this._clientWidth;
|
const width = this._clientWidth;
|
||||||
let height = this._clientHeight;
|
const height = this._clientHeight;
|
||||||
|
|
||||||
this.$store.dispatch('config/resize', { width, height });
|
this.$store.dispatch('config/resize', { width, height });
|
||||||
|
|
||||||
@ -257,7 +268,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, 1000)
|
}, 1000);
|
||||||
},
|
},
|
||||||
mousemove(e) {
|
mousemove(e) {
|
||||||
this.mouseNum = 1;
|
this.mouseNum = 1;
|
||||||
@ -265,8 +276,8 @@
|
|||||||
setPosition() {
|
setPosition() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
let offset = 15;
|
let offset = 15;
|
||||||
let menuBar = document.getElementById('menuBar');
|
const menuBar = document.getElementById('menuBar');
|
||||||
let menuTool = document.getElementById('menuTool');
|
const menuTool = document.getElementById('menuTool');
|
||||||
if (menuBar) {
|
if (menuBar) {
|
||||||
offset += (menuBar.offsetHeight || 0);
|
offset += (menuBar.offsetHeight || 0);
|
||||||
}
|
}
|
||||||
@ -277,7 +288,7 @@
|
|||||||
if (this.offset != offset) {
|
if (this.offset != offset) {
|
||||||
this.offset = offset;
|
this.offset = offset;
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
// 结束加载状态
|
// 结束加载状态
|
||||||
endViewLoading(isSuccess) {
|
endViewLoading(isSuccess) {
|
||||||
@ -287,19 +298,19 @@
|
|||||||
|
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
eventBus.$emit('viewLoading', false);
|
eventBus.$emit('viewLoading', false);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
// 加载仿真信息
|
// 加载仿真信息
|
||||||
async loadSimulationInfo() {
|
async loadSimulationInfo() {
|
||||||
let resp = await getSimulationInfo(this.group);
|
const resp = await getSimulationInfo(this.group);
|
||||||
if (resp && resp.code == 200) {
|
if (resp && resp.code == 200) {
|
||||||
this.questId = resp.data.questId || 0;
|
this.questId = Number(resp.data.questId) || 0;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 加载地图数据
|
// 加载地图数据
|
||||||
async initLoadData() {
|
async initLoadData() {
|
||||||
let width = document.documentElement.clientWidth;
|
const width = document.documentElement.clientWidth;
|
||||||
let height = document.documentElement.clientHeight + 200;
|
const height = document.documentElement.clientHeight + 200;
|
||||||
this.$store.dispatch('config/resize', { width, height });
|
this.$store.dispatch('config/resize', { width, height });
|
||||||
this.$store.dispatch('training/reset');
|
this.$store.dispatch('training/reset');
|
||||||
|
|
||||||
@ -332,14 +343,14 @@
|
|||||||
this.$store.dispatch('training/end', null);
|
this.$store.dispatch('training/end', null);
|
||||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
||||||
|
|
||||||
let trainingId = this.$route.query.trainingId;
|
const trainingId = this.$route.query.trainingId;
|
||||||
if (parseInt(trainingId)) {
|
if (parseInt(trainingId)) {
|
||||||
// 设置地图数据
|
// 设置地图数据
|
||||||
// 设置实训数据
|
// 设置实训数据
|
||||||
let resp = await getTrainingStepsDetail(trainingId, { group: this.group });
|
const resp = await getTrainingStepsDetail(trainingId, { group: this.group });
|
||||||
if (resp && resp.code == 200) {
|
if (resp && resp.code == 200) {
|
||||||
let stepdData = this.trainingObj = resp.data;
|
const stepdData = this.trainingObj = resp.data;
|
||||||
let rest = await getProductDetail(stepdData.prdCode);
|
const rest = await getProductDetail(stepdData.prdCode);
|
||||||
if (rest && rest.code == 200) {
|
if (rest && rest.code == 200) {
|
||||||
await this.$store.dispatch('training/setPrdType', rest.data.prdType);
|
await this.$store.dispatch('training/setPrdType', rest.data.prdType);
|
||||||
await this.loadMapData(resp.data.skinStyle);
|
await this.loadMapData(resp.data.skinStyle);
|
||||||
@ -359,7 +370,7 @@
|
|||||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
||||||
this.$store.dispatch('training/setPrdType', '');
|
this.$store.dispatch('training/setPrdType', '');
|
||||||
|
|
||||||
let skinStyle = this.$route.query.skinStyle;
|
const skinStyle = this.$route.query.skinStyle;
|
||||||
if (parseInt(skinStyle)) {
|
if (parseInt(skinStyle)) {
|
||||||
await this.loadMapData(skinStyle);
|
await this.loadMapData(skinStyle);
|
||||||
|
|
||||||
@ -373,7 +384,7 @@
|
|||||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
||||||
this.$store.dispatch('training/setPrdType', this.prdTypeMap[this.$route.query.prdType]);
|
this.$store.dispatch('training/setPrdType', this.prdTypeMap[this.$route.query.prdType]);
|
||||||
|
|
||||||
let skinStyle = this.$route.query.skinStyle;
|
const skinStyle = this.$route.query.skinStyle;
|
||||||
if (parseInt(skinStyle)) {
|
if (parseInt(skinStyle)) {
|
||||||
await this.loadMapData(skinStyle);
|
await this.loadMapData(skinStyle);
|
||||||
|
|
||||||
@ -387,7 +398,7 @@
|
|||||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
||||||
this.$store.dispatch('training/setPrdType', '01');
|
this.$store.dispatch('training/setPrdType', '01');
|
||||||
|
|
||||||
let skinStyle = this.$route.query.skinStyle;
|
const skinStyle = this.$route.query.skinStyle;
|
||||||
if (parseInt(skinStyle)) {
|
if (parseInt(skinStyle)) {
|
||||||
await this.loadMapData(skinStyle);
|
await this.loadMapData(skinStyle);
|
||||||
|
|
||||||
@ -401,7 +412,7 @@
|
|||||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
||||||
this.switchMode('01');
|
this.switchMode('01');
|
||||||
|
|
||||||
let skinStyle = this.$route.query.skinStyle;
|
const skinStyle = this.$route.query.skinStyle;
|
||||||
if (parseInt(skinStyle)) {
|
if (parseInt(skinStyle)) {
|
||||||
await this.loadMapData(skinStyle);
|
await this.loadMapData(skinStyle);
|
||||||
|
|
||||||
@ -415,7 +426,7 @@
|
|||||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
||||||
this.$store.dispatch('training/setPrdType', '01');
|
this.$store.dispatch('training/setPrdType', '01');
|
||||||
|
|
||||||
let skinStyle = this.$route.query.skinStyle;
|
const skinStyle = this.$route.query.skinStyle;
|
||||||
if (parseInt(skinStyle)) {
|
if (parseInt(skinStyle)) {
|
||||||
await this.loadMapData(skinStyle);
|
await this.loadMapData(skinStyle);
|
||||||
|
|
||||||
@ -423,13 +434,13 @@
|
|||||||
this.endViewLoading();
|
this.endViewLoading();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 加载剧情
|
// 加载剧本
|
||||||
async runQuestLoadShow() {
|
async runQuestLoadShow() {
|
||||||
this.$refs.addQuest.doShow();
|
this.$refs.addQuest.doShow();
|
||||||
},
|
},
|
||||||
// 选择脚本
|
// 选择脚本
|
||||||
async selectQuest(row) {
|
async selectQuest(row, role) {
|
||||||
let res = await loadQuest(row.id, this.group);
|
const res = await loadQuest(row.id, this.group);
|
||||||
if (res && res.code == 200) {
|
if (res && res.code == 200) {
|
||||||
this.questId = parseInt(row.id);
|
this.questId = parseInt(row.id);
|
||||||
}
|
}
|
||||||
@ -479,10 +490,10 @@
|
|||||||
},
|
},
|
||||||
// 设置使用时间
|
// 设置使用时间
|
||||||
async tryTime(param) {
|
async tryTime(param) {
|
||||||
let data = {
|
const data = {
|
||||||
goodsId: param.goodsId,
|
goodsId: param.goodsId,
|
||||||
time: param.time
|
time: param.time
|
||||||
}
|
};
|
||||||
if (data.goodsId) {
|
if (data.goodsId) {
|
||||||
await setGoodsTryUse(data);
|
await setGoodsTryUse(data);
|
||||||
}
|
}
|
||||||
@ -519,7 +530,7 @@
|
|||||||
this.$refs.faultChoose.doShow();
|
this.$refs.faultChoose.doShow();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
.main {
|
.main {
|
||||||
|
@ -1,20 +1,24 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="schema" :style="{top: offset+'px'}">
|
<div class="schema" :style="{top: offset+'px'}">
|
||||||
<el-select size="small" v-model="swch" v-if="isScript" @change="switchMode" placeholder="请选择产品类型">
|
<el-select v-if="isScript" v-model="swch" size="small" placeholder="请选择产品类型" @change="switchMode">
|
||||||
<el-option v-for="item in swchList" :key="item.value" :label="item.name" :value="item.value">
|
<el-option v-for="item in swchList" :key="item.value" :label="item.name" :value="item.value" />
|
||||||
</el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
|
|
||||||
<el-button-group>
|
<el-button-group>
|
||||||
<el-button size="small" @click="viewRunQuest" v-if="isDemon" :disabled="viewDisabled" type="success">加载任务
|
<el-button v-if="isDemon" size="small" :disabled="viewDisabled" type="success" @click="viewRunQuest">加载剧本
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button size="small" @click="viewRunPlan" v-if="runing" :disabled="viewDisabled">运行图预览</el-button>
|
<el-button v-if="runing" size="small" :disabled="viewDisabled" @click="viewRunPlan">运行图预览</el-button>
|
||||||
<el-button size="small" @click="loadRunPlan" v-if="!runing && !isPlan" :disabled="viewDisabled"
|
<el-button
|
||||||
type="warning">运行图加载</el-button>
|
v-if="!runing && !isPlan"
|
||||||
<el-button size="small" @click="setFault" v-if="mode==OperateMode.FAULT" type="danger">故障设置</el-button>
|
size="small"
|
||||||
|
:disabled="viewDisabled"
|
||||||
|
type="warning"
|
||||||
|
@click="loadRunPlan"
|
||||||
|
>运行图加载</el-button>
|
||||||
|
<el-button v-if="mode==OperateMode.FAULT" size="small" type="danger" @click="setFault">故障设置</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
|
|
||||||
<el-radio-group size="small" v-model="mode" v-if="!isPlan" @change="changeOperateMode(mode)">
|
<el-radio-group v-if="!isPlan" v-model="mode" size="small" @change="changeOperateMode(mode)">
|
||||||
<el-radio-button class="mode" :label="OperateMode.NORMAL">正常操作</el-radio-button>
|
<el-radio-button class="mode" :label="OperateMode.NORMAL">正常操作</el-radio-button>
|
||||||
<el-radio-button class="mode" :label="OperateMode.FAULT">故障操作</el-radio-button>
|
<el-radio-button class="mode" :label="OperateMode.FAULT">故障操作</el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
@ -22,7 +26,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { OperateMode, TrainingMode } from '@/scripts/ConstDic';
|
import { OperateMode } from '@/scripts/ConstDic';
|
||||||
import { getStationListBySkinStyle, queryRunPlan } from '@/api/runplan';
|
import { getStationListBySkinStyle, queryRunPlan } from '@/api/runplan';
|
||||||
import { getEveryDayRunPlanData } from '@/api/simulation';
|
import { getEveryDayRunPlanData } from '@/api/simulation';
|
||||||
|
|
||||||
@ -47,13 +51,13 @@
|
|||||||
swch: '02',
|
swch: '02',
|
||||||
swchList: [
|
swchList: [
|
||||||
{ value: '01', name: '现地' },
|
{ value: '01', name: '现地' },
|
||||||
{ value: '02', name: '行调' },
|
{ value: '02', name: '行调' }
|
||||||
]
|
]
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('runPlan', [
|
...mapGetters('runPlan', [
|
||||||
'stations',
|
'stations'
|
||||||
]),
|
]),
|
||||||
isPlan() {
|
isPlan() {
|
||||||
return this.$route.params.mode === 'plan';
|
return this.$route.params.mode === 'plan';
|
||||||
@ -63,7 +67,7 @@
|
|||||||
},
|
},
|
||||||
isDemon() {
|
isDemon() {
|
||||||
return this.$route.params.mode === 'demon';
|
return this.$route.params.mode === 'demon';
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$store.state.training.started': function (val) {
|
'$store.state.training.started': function (val) {
|
||||||
@ -71,12 +75,12 @@
|
|||||||
},
|
},
|
||||||
'$store.state.training.switchcount': async function () {
|
'$store.state.training.switchcount': async function () {
|
||||||
if (this.group) {
|
if (this.group) {
|
||||||
let started = this.$store.state.training.started;
|
const started = this.$store.state.training.started;
|
||||||
if (started) {
|
if (started) {
|
||||||
await this.loadRunData(this.$route.query);
|
await this.loadRunData(this.$route.query);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
await this.loadRunData(this.$route.query);
|
await this.loadRunData(this.$route.query);
|
||||||
@ -93,10 +97,10 @@
|
|||||||
queryRunPlan(this.$route.query.planId).then(resp => {
|
queryRunPlan(this.$route.query.planId).then(resp => {
|
||||||
this.$store.dispatch('runPlan/setPlanData', resp.data);
|
this.$store.dispatch('runPlan/setPlanData', resp.data);
|
||||||
this.viewDisabled = false;
|
this.viewDisabled = false;
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$store.dispatch('runPlan/setPlanData', []);
|
this.$store.dispatch('runPlan/setPlanData', []);
|
||||||
this.$messageBox(`获取运行图数据失败`);
|
this.$messageBox(`获取运行图数据失败`);
|
||||||
})
|
});
|
||||||
} else {
|
} else {
|
||||||
getEveryDayRunPlanData(this.group).then(resp => {
|
getEveryDayRunPlanData(this.group).then(resp => {
|
||||||
this.$store.dispatch('runPlan/setPlanData', resp.data);
|
this.$store.dispatch('runPlan/setPlanData', resp.data);
|
||||||
@ -108,14 +112,14 @@
|
|||||||
} else {
|
} else {
|
||||||
this.$messageBox(`获取运行图数据失败`);
|
this.$messageBox(`获取运行图数据失败`);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$messageBox(`获取车站列表失败`);
|
this.$messageBox(`获取车站列表失败`);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
changeOperateMode(handle) {
|
changeOperateMode(handle) {
|
||||||
this.$store.dispatch('training/changeOperateMode', { mode: handle });
|
this.$store.dispatch('training/changeOperateMode', { mode: handle });
|
||||||
@ -124,7 +128,7 @@
|
|||||||
this.runing = run;
|
this.runing = run;
|
||||||
},
|
},
|
||||||
setFault() {
|
setFault() {
|
||||||
this.$emit('faultChooseShow')
|
this.$emit('faultChooseShow');
|
||||||
},
|
},
|
||||||
loadRunPlan() {
|
loadRunPlan() {
|
||||||
this.$emit('runPlanLoadShow');
|
this.$emit('runPlanLoadShow');
|
||||||
@ -139,7 +143,7 @@
|
|||||||
this.$emit('switchMode', swch);
|
this.$emit('switchMode', swch);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
.schema {
|
.schema {
|
||||||
|
@ -1,33 +1,32 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="reminder-drag" v-drag>
|
<div v-drag class="reminder-drag">
|
||||||
<div class="reminder-box" ref="drapBox">
|
<div ref="drapBox" class="reminder-box">
|
||||||
<div class="tip-title">
|
<div class="tip-title">
|
||||||
<i class="icon el-icon-minus" @click="shrink" v-show="isShrink"></i>
|
<i v-show="isShrink" class="icon el-icon-minus" @click="shrink" />
|
||||||
<i class="icon el-icon-plus" @click="shrink" v-show="!isShrink"></i>
|
<i v-show="!isShrink" class="icon el-icon-plus" @click="shrink" />
|
||||||
<p style="color: #fff;" v-if="isShrink">
|
<p v-if="isShrink" style="color: #fff;">
|
||||||
<span>{{ formModel.name }}</span>
|
<span>{{ formModel.name }}</span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="tip-body-box" ref="dragBody">
|
<div ref="dragBody" class="tip-body-box">
|
||||||
<div class="tip-body">
|
<div class="tip-body">
|
||||||
<el-scrollbar wrapClass="scrollbar-wrapper">
|
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||||
<p class="list-item">
|
<p class="list-item">
|
||||||
<span class="list-label">任务描述:</span>
|
<span class="list-label">任务描述:</span>
|
||||||
<span class="list-elem">{{ formModel.description }}</span>
|
<span class="list-elem">{{ formModel.description }}</span>
|
||||||
</p>
|
</p>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</div>
|
</div>
|
||||||
<div class="drag-right"></div>
|
<div class="drag-right" />
|
||||||
<div class="drag-left"></div>
|
<div class="drag-left" />
|
||||||
<div class="drag-bottom"></div>
|
<div class="drag-bottom" />
|
||||||
<div class="drag-top"></div>
|
<div class="drag-top" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
|
||||||
import { getQuestById } from '@/api/quest';
|
import { getQuestById } from '@/api/quest';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -45,7 +44,7 @@
|
|||||||
name: '',
|
name: '',
|
||||||
description: ''
|
description: ''
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
},
|
},
|
||||||
@ -60,14 +59,14 @@
|
|||||||
if (questId) {
|
if (questId) {
|
||||||
getQuestById(questId).then(resp => {
|
getQuestById(questId).then(resp => {
|
||||||
this.formModel = resp.data;
|
this.formModel = resp.data;
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$messageBox('获取任务信息失败');
|
this.$messageBox('获取任务信息失败');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
shrink() {
|
shrink() {
|
||||||
let height = this.$refs.dragBody.offsetHeight + 40;
|
const height = this.$refs.dragBody.offsetHeight + 40;
|
||||||
let top = this.$refs.drapBox.style.top;
|
const top = this.$refs.drapBox.style.top;
|
||||||
if (this.isShrink) {
|
if (this.isShrink) {
|
||||||
this.$refs.drapBox.style.height = '40px';
|
this.$refs.drapBox.style.height = '40px';
|
||||||
this.$refs.drapBox.style.top = '';
|
this.$refs.drapBox.style.top = '';
|
||||||
@ -79,7 +78,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
@ -215,11 +215,11 @@ export default {
|
|||||||
},
|
},
|
||||||
initLoadData() {
|
initLoadData() {
|
||||||
this.cityList = [];
|
this.cityList = [];
|
||||||
// this.$Dictionary.cityType().then(list => {
|
this.$Dictionary.cityType().then(list => {
|
||||||
// this.cityList = list;
|
this.cityList = list;
|
||||||
// }).catch(() => {
|
}).catch(() => {
|
||||||
// this.$messageBox('加载城市列表失败');
|
this.$messageBox('加载城市列表失败');
|
||||||
// });
|
});
|
||||||
|
|
||||||
this.skinStyleList = [];
|
this.skinStyleList = [];
|
||||||
getSkinStyleList().then(response => {
|
getSkinStyleList().then(response => {
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
'use strict'
|
;
|
||||||
// import { getBasePathConfig } from '@/utils/baseUrl'
|
// import { getBasePathConfig } from '@/utils/baseUrl'
|
||||||
|
|
||||||
const path = require('path')
|
const path = require('path');
|
||||||
const defaultSettings = require('./src/settings.js')
|
const defaultSettings = require('./src/settings.js');
|
||||||
|
|
||||||
function resolve(dir) {
|
function resolve(dir) {
|
||||||
return path.join(__dirname, dir)
|
return path.join(__dirname, dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
const name = defaultSettings.title // page title
|
const name = defaultSettings.title; // page title
|
||||||
const port = 9527 // dev port
|
const port = 9527; // dev port
|
||||||
|
|
||||||
// All configuration item explanations can be find in https://cli.vuejs.org/config/
|
// All configuration item explanations can be find in https://cli.vuejs.org/config/
|
||||||
module.exports = {
|
module.exports = {
|
||||||
@ -56,14 +56,14 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
chainWebpack(config) {
|
chainWebpack(config) {
|
||||||
config.plugins.delete('preload') // TODO: need test
|
config.plugins.delete('preload'); // TODO: need test
|
||||||
config.plugins.delete('prefetch') // TODO: need test
|
config.plugins.delete('prefetch'); // TODO: need test
|
||||||
|
|
||||||
// set svg-sprite-loader
|
// set svg-sprite-loader
|
||||||
config.module
|
config.module
|
||||||
.rule('svg')
|
.rule('svg')
|
||||||
.exclude.add(resolve('src/icons'))
|
.exclude.add(resolve('src/icons'))
|
||||||
.end()
|
.end();
|
||||||
config.module
|
config.module
|
||||||
.rule('icons')
|
.rule('icons')
|
||||||
.test(/\.svg$/)
|
.test(/\.svg$/)
|
||||||
@ -74,7 +74,7 @@ module.exports = {
|
|||||||
.options({
|
.options({
|
||||||
symbolId: 'icon-[name]'
|
symbolId: 'icon-[name]'
|
||||||
})
|
})
|
||||||
.end()
|
.end();
|
||||||
|
|
||||||
// set preserveWhitespace
|
// set preserveWhitespace
|
||||||
config.module
|
config.module
|
||||||
@ -82,16 +82,16 @@ module.exports = {
|
|||||||
.use('vue-loader')
|
.use('vue-loader')
|
||||||
.loader('vue-loader')
|
.loader('vue-loader')
|
||||||
.tap(options => {
|
.tap(options => {
|
||||||
options.compilerOptions.preserveWhitespace = true
|
options.compilerOptions.preserveWhitespace = true;
|
||||||
return options
|
return options;
|
||||||
})
|
})
|
||||||
.end()
|
.end();
|
||||||
|
|
||||||
config
|
config
|
||||||
// https://webpack.js.org/configuration/devtool/#development
|
// https://webpack.js.org/configuration/devtool/#development
|
||||||
.when(process.env.NODE_ENV === 'development',
|
.when(process.env.NODE_ENV === 'development',
|
||||||
config => config.devtool('cheap-source-map')
|
config => config.devtool('cheap-source-map')
|
||||||
)
|
);
|
||||||
|
|
||||||
config
|
config
|
||||||
.when(process.env.NODE_ENV !== 'development',
|
.when(process.env.NODE_ENV !== 'development',
|
||||||
@ -103,7 +103,7 @@ module.exports = {
|
|||||||
// `runtime` must same as runtimeChunk name. default is `runtime`
|
// `runtime` must same as runtimeChunk name. default is `runtime`
|
||||||
inline: /runtime\..*\.js$/
|
inline: /runtime\..*\.js$/
|
||||||
}])
|
}])
|
||||||
.end()
|
.end();
|
||||||
config
|
config
|
||||||
.optimization.splitChunks({
|
.optimization.splitChunks({
|
||||||
chunks: 'all',
|
chunks: 'all',
|
||||||
@ -127,9 +127,9 @@ module.exports = {
|
|||||||
reuseExistingChunk: true
|
reuseExistingChunk: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
config.optimization.runtimeChunk('single')
|
config.optimization.runtimeChunk('single');
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user