This commit is contained in:
ival 2019-11-12 17:28:44 +08:00
commit 8fb45d91a0
40 changed files with 2859 additions and 3002 deletions

View File

@ -16,7 +16,6 @@
}, },
"dependencies": { "dependencies": {
"axios": "0.18.0", "axios": "0.18.0",
"echarts": "^4.2.1",
"element-ui": "2.7.2", "element-ui": "2.7.2",
"file-saver": "^1.3.3", "file-saver": "^1.3.3",
"js-cookie": "2.2.0", "js-cookie": "2.2.0",

View File

@ -5,9 +5,14 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" href="<%= BASE_URL %>favicon.png"> <link rel="icon" href="<%= BASE_URL %>favicon.png">
<!-- <link rel="stylesheet" href="https://cdn.bootcss.com/element-ui/2.12.0/theme-chalk/index.css"> -->
<title><%= webpackConfig.name %></title> <title><%= webpackConfig.name %></title>
<script src="/static/inflate.min.js"></script> <script src="/static/inflate.min.js"></script>
<script src="/static/three.min.js"></script> <script src="/static/three.min.js"></script>
<script src="https://cdn.bootcss.com/echarts/4.4.0-rc.1/echarts-en.common.js"></script>
<!-- <script src="https://cdn.bootcss.com/element-ui/2.12.0/index.js"></script>
<script src="https://cdn.bootcss.com/element-ui/2.12.0/locale/en.min.js"></script>
<script src="https://cdn.bootcss.com/element-ui/2.12.0/locale/zh-CN.min.js"></script> -->
</head> </head>
<body> <body>
<noscript> <noscript>

View File

@ -49,16 +49,7 @@ export function chatWithText(data, group) {
}); });
} }
// 文字聊天 发送文字 // 生成分发二维码
export function chatWithAudio(file, group) {
return request({
url: `/api/jointTraining/chatWithAudio?group=${group}`,
method: 'post',
data: file
});
}
// 文字聊天 发送文字
export function getJoinTrainCode(data, group) { export function getJoinTrainCode(data, group) {
return request({ return request({
url: `/api/jointTraining/qrCode?group=${group}`, url: `/api/jointTraining/qrCode?group=${group}`,
@ -132,7 +123,7 @@ export function putUserRoles(data, group) {
}); });
} }
// 设置人员角色 // 获取房间里的用户列表
export function getJointTrainRoomUserList(group) { export function getJointTrainRoomUserList(group) {
return request({ return request({
url: `/api/jointTraining/room/${group}/user/list`, url: `/api/jointTraining/room/${group}/user/list`,

View File

@ -1,21 +1,5 @@
import request from '@/utils/request'; import request from '@/utils/request';
export function getDraftLesson(params, mapId) {
/** 根据mapId获取草稿课程 */
return request({
url: `/api/mapSystem/findDraftLessonBy/${mapId}`,
method: 'get',
params
});
}
/** 获取用户地图树 */
export function getUserMapTree(cityCode) {
return request({
url: `/api/mapSystem/findDraftMapByCityCode?cityCode=${cityCode}`,
method: 'get'
});
}
/** 运行图*/ /** 运行图*/
export function getRpListByUserMapId(mapId) { export function getRpListByUserMapId(mapId) {
return request({ return request({
@ -147,14 +131,6 @@ export function rejectRunPlan(id, data) {
}); });
} }
/** 用户申请发布剧本或者撤销剧本申请 */
export function releaseScript(id, status) {
return request({
url: `/api/review/script/releaseOrCancel/${id}/${status}`,
method: 'get'
});
}
/** 查看课程详情 */ /** 查看课程详情 */
export function reviewLessonDetail(id) { export function reviewLessonDetail(id) {
return request({ return request({

View File

@ -8,7 +8,7 @@ export function login(params) {
}); });
} }
// 获取登陆url 二维码 其他系统 // 获取微信登陆二维码 url 其他系统
export function getLoginUrl(params) { export function getLoginUrl(params) {
return request({ return request({
url: '/api/login/url', url: '/api/login/url',
@ -17,7 +17,7 @@ export function getLoginUrl(params) {
}); });
} }
// 获取登陆url 小程序二维码 // 获取微信小程序登陆二维码
export function getLoginWmurl(params) { export function getLoginWmurl(params) {
return request({ return request({
url: '/api/login/wmurl', url: '/api/login/wmurl',

View File

@ -10,14 +10,6 @@ export function getScriptPageListOnline(params) {
}); });
} }
/** 通过ID查询剧本的基础信息 */
export function getScriptByIdList(id) {
return request({
url: `/api/script/${id}/basic`,
method: 'get'
});
}
/** 通过ID查询发布的剧本的详细信息 */ /** 通过ID查询发布的剧本的详细信息 */
export function getScriptById(id) { export function getScriptById(id) {
return request({ return request({

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 KiB

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 KiB

After

Width:  |  Height:  |  Size: 106 KiB

BIN
src/assets/home/script.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

View File

@ -153,6 +153,7 @@ export default {
pleaseEnterMapName: 'Please enter a map name', pleaseEnterMapName: 'Please enter a map name',
pleaseChooseSkinCode: 'Please choose skin style', pleaseChooseSkinCode: 'Please choose skin style',
pleaseChooseLineCode:'Please Choose line type',
pleaseSelectMapSource: 'Please select the map source', pleaseSelectMapSource: 'Please select the map source',
pleaseSelectAssociatedCity: 'Please select the associated city', pleaseSelectAssociatedCity: 'Please select the associated city',
pleaseSelectAssociatedSkin: 'Please select associated skin', pleaseSelectAssociatedSkin: 'Please select associated skin',

View File

@ -152,6 +152,7 @@ export default {
pleaseEnterMapName: '请输入地图名称', pleaseEnterMapName: '请输入地图名称',
pleaseChooseSkinCode: '请选择皮肤风格', pleaseChooseSkinCode: '请选择皮肤风格',
pleaseChooseLineCode:'请选择线路类型',
pleaseSelectMapSource: '请选择地图来源', pleaseSelectMapSource: '请选择地图来源',
pleaseSelectAssociatedCity: '请选择关联城市', pleaseSelectAssociatedCity: '请选择关联城市',
pleaseSelectAssociatedSkin: '请选择关联皮肤', pleaseSelectAssociatedSkin: '请选择关联皮肤',

View File

@ -1,8 +1,8 @@
<template> <template>
<div class="plan-schedule" style="width: 100%"> <div class="plan-schedule" style="width: 100%">
<title-bar ref="titleBar" @back="back" /> <title-bar ref="titleBar" @back="back" />
<menu-bar ref="menuBar" :skin-code="skinCode" @dispatchDialog="dispatchDialog" /> <menu-bar ref="menuBar" :line-code="lineCode" @dispatchDialog="dispatchDialog" />
<schedule ref="schedule" :group="group" :skin-code="skinCode" :max-height="height" :max-width="width" /> <schedule ref="schedule" :group="group" :line-code="lineCode" :max-height="height" :max-width="width" />
<status-bar ref="statusBar" :max-top="height" @setPosition="setPosition" /> <status-bar ref="statusBar" :max-top="height" @setPosition="setPosition" />
<manage-plan-list ref="managePlanList" @dispatchDialog="dispatchDialog" /> <manage-plan-list ref="managePlanList" @dispatchDialog="dispatchDialog" />
@ -54,8 +54,8 @@ export default {
}; };
}, },
computed: { computed: {
skinCode() { lineCode() {
return this.$route.query.skinCode || '02'; return this.$route.query.lineCode || '02';
}, },
width() { width() {
return this.$store.state.app.width; return this.$store.state.app.width;

View File

@ -125,7 +125,7 @@ import { EventBus } from '@/scripts/event-bus';
export default { export default {
name: 'PlanMenuBar', name: 'PlanMenuBar',
props: { props: {
skinCode: { lineCode: {
type: String, type: String,
required: true required: true
} }

View File

@ -27,6 +27,7 @@ import { mapGetters } from 'vuex';
import { timeFormat } from '@/utils/date'; import { timeFormat } from '@/utils/date';
import { runDiagramGetTime } from '@/api/simulation'; import { runDiagramGetTime } from '@/api/simulation';
import DataTable from '../menusPlan/components/dataTable'; import DataTable from '../menusPlan/components/dataTable';
import echarts from 'echarts';
export default { export default {
name: 'PlanSchedule', name: 'PlanSchedule',
@ -38,7 +39,7 @@ export default {
type: String, type: String,
required: true required: true
}, },
skinCode: { lineCode: {
type: String, type: String,
required: true required: true
}, },
@ -237,7 +238,7 @@ export default {
} }
}, },
mounted() { mounted() {
this.PlanConvert = this.$theme.loadPlanConvert(this.skinCode); this.PlanConvert = this.$theme.loadPlanConvert(this.lineCode);
}, },
beforeDestroy() { beforeDestroy() {
this.destroy(); this.destroy();
@ -343,61 +344,32 @@ export default {
return series; return series;
}, },
popModels(series, models) {
if (models && models.length) {
models.forEach(elem => {
const index = series.indexOf(elem);
if (index >= 0) {
series.split(index, 1);
}
});
}
return series;
},
loadInitChart(series) { loadInitChart(series) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
try { try {
const that = this; this.destroy();
// echart
require.config(
{
paths: {
echarts: './js/dist'
}
}
);
//
require(
[
'echarts',
'echarts/lib/chart/line'
],
function (ec) {
that.destroy();
let startValue = 3600 + that.PlanConvert.TranslationTime; let startValue = 3600 + this.PlanConvert.TranslationTime;
const offsetTime = 3600; const offsetTime = 3600;
runDiagramGetTime(that.group).then(resp => { runDiagramGetTime(this.group).then(resp => {
startValue = resp.data - that.PlanConvert.TranslationTime; startValue = resp.data - this.PlanConvert.TranslationTime;
that.option.dataZoom[0].startValue = that.option.dataZoom[1].startValue = startValue - offsetTime; this.option.dataZoom[0].startValue = this.option.dataZoom[1].startValue = startValue - offsetTime;
that.option.dataZoom[0].endValue = that.option.dataZoom[1].endValue = startValue + offsetTime; this.option.dataZoom[0].endValue = this.option.dataZoom[1].endValue = startValue + offsetTime;
that.option.series = series; this.option.series = series;
that.myChart = ec.init(document.getElementById(that.runPlanId)); this.myChart = echarts.init(document.getElementById(this.runPlanId));
if (that.myChart) { if (this.myChart) {
that.myChart.setOption(that.option); this.myChart.setOption(this.option);
that.reSize({ width: that.$store.state.runPlan.width, height: that.$store.state.runPlan.height }); this.reSize({ width: this.$store.state.runPlan.width, height: this.$store.state.runPlan.height });
that.myChart.on('click', that.mouseClick); this.myChart.on('click', this.mouseClick);
} }
}); });
resolve(true); resolve(true);
}
);
} catch (error) { } catch (error) {
reject(error); reject(error);
} }
}); });
}, },
xAxisPointFormat(params) { xAxisPointFormat(params) {
return timeFormat(params.value); return timeFormat(params.value);
@ -476,7 +448,7 @@ export default {
} }
}; };
</script> </script>
<style scoped rel="stylesheet/scss" lang="scss" scoped> <style scoped rel="stylesheet/scss" lang="scss">
@import "src/styles/mixin.scss"; @import "src/styles/mixin.scss";
#PlanSchedule { #PlanSchedule {

View File

@ -1,8 +1,8 @@
<template> <template>
<div class="plan-schedule" style="width: 100%"> <div class="plan-schedule" style="width: 100%">
<title-bar ref="titleBar" @back="back" /> <title-bar ref="titleBar" @back="back" />
<menu-bar ref="menuBar" :skin-code="skinCode" @dispatchDialog="dispatchDialog" /> <menu-bar ref="menuBar" :line-code="lineCode" @dispatchDialog="dispatchDialog" />
<schedule ref="schedule" :group="group" :skin-code="skinCode" :max-height="height" :max-width="width" /> <schedule ref="schedule" :group="group" :line-code="lineCode" :max-height="height" :max-width="width" />
<status-bar ref="statusBar" :max-top="height" @setPosition="setPosition" /> <status-bar ref="statusBar" :max-top="height" @setPosition="setPosition" />
<manage-plan-list ref="managePlanList" @dispatchDialog="dispatchDialog" /> <manage-plan-list ref="managePlanList" @dispatchDialog="dispatchDialog" />

View File

@ -125,7 +125,7 @@ import { EventBus } from '@/scripts/event-bus';
export default { export default {
name: 'PlanMenuBar', name: 'PlanMenuBar',
props: { props: {
skinCode: { lineCode: {
type: String, type: String,
required: true required: true
} }

View File

@ -1,31 +1,45 @@
<template> <template>
<div id="PlanSchedule" :style="{top: top+'px', height: height+'px'}"> <div id="PlanSchedule" :style="{top: top+'px', height: height+'px'}">
<div class="left"> <div class="left">
<div :id="runPlanId"></div> <div :id="runPlanId" />
</div> </div>
<div class="right"> <div class="right">
<data-table ref="serviceTable" :height="height/2" :config="serviceNumberConfig" @touch="scheduleTouch" <data-table
:style="{top: top-height/2+'px'}"></data-table> ref="serviceTable"
<data-table ref="tripTable" :height="height/2" :config="tripNumberConfig" @touch="trainNumTouch" :height="height/2"
:style="{top: top-height/2+'px'}"></data-table> :config="serviceNumberConfig"
:style="{top: top-height/2+'px'}"
@touch="scheduleTouch"
/>
<data-table
ref="tripTable"
:height="height/2"
:config="tripNumberConfig"
:style="{top: top-height/2+'px'}"
@touch="trainNumTouch"
/>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { timeFormat } from '@/utils/date'; import { timeFormat } from '@/utils/date';
import { runDiagramGetTime } from '@/api/simulation'; import { runDiagramGetTime } from '@/api/simulation';
import DataTable from '../menusPlan/components/dataTable'; import DataTable from '../menusPlan/components/dataTable';
import echarts from 'echarts';
export default { export default {
name: 'PlanSchedule', name: 'PlanSchedule',
components: {
DataTable
},
props: { props: {
group: { group: {
type: String, type: String,
required: true required: true
}, },
skinCode: { lineCode: {
type: String, type: String,
required: true required: true
}, },
@ -38,9 +52,6 @@
required: true required: true
} }
}, },
components: {
DataTable
},
data() { data() {
return { return {
top: 0, top: 0,
@ -57,7 +68,7 @@
columns: [ columns: [
{ {
prop: 'serviceNumber', prop: 'serviceNumber',
label: '表号', label: '表号'
}, },
{ {
width: 40 width: 40
@ -72,7 +83,7 @@
columns: [ columns: [
{ {
prop: 'tripNumber', prop: 'tripNumber',
label: '车次号', label: '车次号'
}, },
{ {
width: 40 width: 40
@ -110,7 +121,7 @@
type: 'cross' type: 'cross'
}, },
formatter: this.axisTooltip, formatter: this.axisTooltip,
borderWidth: 1, borderWidth: 1
}, },
xAxis: [ xAxis: [
{ {
@ -135,7 +146,7 @@
label: { label: {
formatter: this.xAxisPointFormat, formatter: this.xAxisPointFormat,
backgroundColor: 'rgb(255,0,0,0.5)', backgroundColor: 'rgb(255,0,0,0.5)',
color: 'white', color: 'white'
} }
} }
} }
@ -146,7 +157,7 @@
show: false show: false
}, },
axisTick: { axisTick: {
show: false, show: false
}, },
axisLine: { axisLine: {
onZero: false, onZero: false,
@ -157,23 +168,23 @@
}, },
axisLabel: { axisLabel: {
interval: 'auto', interval: 'auto',
formatter: this.yAxisLableFormat, formatter: this.yAxisLableFormat
}, },
axisPointer: { axisPointer: {
xAxisIndex: 'all', xAxisIndex: 'all',
label: { label: {
formatter: this.yAxisPointFormat, formatter: this.yAxisPointFormat,
backgroundColor: 'rgb(0,100,0,0.5)', backgroundColor: 'rgb(0,100,0,0.5)',
color: 'white', color: 'white'
} }
}, },
min: 0, min: 0,
max: 0, max: 0
}, },
series: [], series: [],
dataZoom: [ dataZoom: [
{ {
type: 'inside', type: 'inside'
}, },
{ {
fiterMode: 'filter', fiterMode: 'filter',
@ -192,7 +203,7 @@
}, },
absoluteTime: 2 * 3600, absoluteTime: 2 * 3600,
indexKmRangeMap: {} indexKmRangeMap: {}
} };
}, },
watch: { watch: {
maxWidth() { maxWidth() {
@ -208,16 +219,16 @@
this.reSize({ width: this.$store.state.runPlan.width, height: this.$store.state.runPlan.height }); this.reSize({ width: this.$store.state.runPlan.width, height: this.$store.state.runPlan.height });
}, },
'$store.state.runPlan.selected.serviceNumber': function (val) { '$store.state.runPlan.selected.serviceNumber': function (val) {
let index = this.serviceNumberConfig.data.findIndex(elem => { const index = this.serviceNumberConfig.data.findIndex(elem => {
return elem.serviceNumber == val; return elem.serviceNumber == val;
}) });
this.$refs.serviceTable.setCurrentRow(this.serviceNumberConfig.data[index]); this.$refs.serviceTable.setCurrentRow(this.serviceNumberConfig.data[index]);
}, },
'$store.state.runPlan.selected.tripNumber': function (val) { '$store.state.runPlan.selected.tripNumber': function (val) {
let index = this.tripNumberConfig.data.findIndex(elem => { const index = this.tripNumberConfig.data.findIndex(elem => {
return elem.tripNumber == val; return elem.tripNumber == val;
}) });
this.$refs.tripTable.setCurrentRow(this.tripNumberConfig.data[index]); this.$refs.tripTable.setCurrentRow(this.tripNumberConfig.data[index]);
} }
}, },
@ -227,7 +238,7 @@
]) ])
}, },
mounted() { mounted() {
this.PlanConvert = this.$theme.loadPlanConvert(this.skinCode); this.PlanConvert = this.$theme.loadPlanConvert(this.lineCode);
}, },
beforeDestroy() { beforeDestroy() {
this.destroy(); this.destroy();
@ -236,7 +247,7 @@
serviceNumberChange(row) { serviceNumberChange(row) {
if (row) { if (row) {
this.$store.dispatch('runPlan/setSelected', { serviceNumber: row.serviceNumber, tripNumber: null }); this.$store.dispatch('runPlan/setSelected', { serviceNumber: row.serviceNumber, tripNumber: null });
let serviceObj = this.$store.state.runPlan.editData[row.serviceNumber] const serviceObj = this.$store.state.runPlan.editData[row.serviceNumber];
if (serviceObj) { if (serviceObj) {
this.analyticalTripNumber(serviceObj.trainMap); this.analyticalTripNumber(serviceObj.trainMap);
} }
@ -249,24 +260,24 @@
}, },
async analyticalServiceNumber(data) { async analyticalServiceNumber(data) {
this.serviceNumberConfig.data = Object.keys(data || {}) this.serviceNumberConfig.data = Object.keys(data || {})
.sort((a, b) => { return data[a].oldIndex - data[b].oldIndex }) .sort((a, b) => { return data[a].oldIndex - data[b].oldIndex; })
.map(serviceNumber => { return { serviceNumber } }); .map(serviceNumber => { return { serviceNumber }; });
}, },
async analyticalTripNumber(data) { async analyticalTripNumber(data) {
this.tripNumberConfig.data = Object.keys(data || {}) this.tripNumberConfig.data = Object.keys(data || {})
.sort((a, b) => { return data[a].oldIndex - data[b].oldIndex }) .sort((a, b) => { return data[a].oldIndex - data[b].oldIndex; })
.map(tripNumber => { return { tripNumber } }); .map(tripNumber => { return { tripNumber }; });
}, },
async setPosition() { async setPosition() {
this.$nextTick(() => { this.$nextTick(() => {
let top = 3; let top = 3;
let width = this.maxWidth * 0.85; const width = this.maxWidth * 0.85;
let height = this.maxHeight; let height = this.maxHeight;
let titleBar = document.getElementById('PlanTitleBar'); const titleBar = document.getElementById('PlanTitleBar');
let menuBar = document.getElementById('PlanMenuBar'); const menuBar = document.getElementById('PlanMenuBar');
let menuTool = document.getElementById('PlanMenuTool'); const menuTool = document.getElementById('PlanMenuTool');
let statusBar = document.getElementById('PlanStatusBar'); const statusBar = document.getElementById('PlanStatusBar');
if (titleBar) { if (titleBar) {
top += (titleBar.offsetHeight || 0); top += (titleBar.offsetHeight || 0);
@ -294,13 +305,13 @@
if (this.height != height) { if (this.height != height) {
this.height = height - 20 * 2; this.height = height - 20 * 2;
} }
}) });
}, },
async loadChartPage() { async loadChartPage() {
try { try {
let series = []; let series = [];
let stations = this.$store.state.runPlan.stations; const stations = this.$store.state.runPlan.stations;
let planData = this.$store.state.runPlan.planData; const planData = this.$store.state.runPlan.planData;
this.viewDisabled = true; this.viewDisabled = true;
this.kmRangeCoordMap = this.PlanConvert.convertStationsToMap(stations); this.kmRangeCoordMap = this.PlanConvert.convertStationsToMap(stations);
@ -328,7 +339,7 @@
if (elem) { if (elem) {
series.push(elem); series.push(elem);
} }
}) });
} }
return series; return series;
@ -336,58 +347,39 @@
popModels(series, models) { popModels(series, models) {
if (models && models.length) { if (models && models.length) {
models.forEach(elem => { models.forEach(elem => {
let index = series.indexOf(elem); const index = series.indexOf(elem);
if (index >= 0) { if (index >= 0) {
series.split(index, 1); series.split(index, 1);
} }
}) });
} }
return series; return series;
}, },
loadInitChart(series) { loadInitChart(series) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
try { try {
let that = this; this.destroy();
//echart let startValue = 3600 + this.PlanConvert.TranslationTime;
require.config( const offsetTime = 3600;
{
paths: {
echarts: './js/dist'
}
}
);
//
require(
[
'echarts',
'echarts/lib/chart/line',
],
function (ec) {
that.destroy();
let startValue = 3600 + that.PlanConvert.TranslationTime; runDiagramGetTime(this.group).then(resp => {
let offsetTime = 3600; startValue = resp.data - this.PlanConvert.TranslationTime;
this.option.dataZoom[0].startValue = this.option.dataZoom[1].startValue = startValue - offsetTime;
runDiagramGetTime(that.group).then(resp => { this.option.dataZoom[0].endValue = this.option.dataZoom[1].endValue = startValue + offsetTime;
startValue = resp.data - that.PlanConvert.TranslationTime; this.option.series = series;
that.option.dataZoom[0].startValue = that.option.dataZoom[1].startValue = startValue - offsetTime; this.myChart = echarts.init(document.getElementById(this.runPlanId));
that.option.dataZoom[0].endValue = that.option.dataZoom[1].endValue = startValue + offsetTime; if (this.myChart) {
that.option.series = series; this.myChart.setOption(this.option);
that.myChart = ec.init(document.getElementById(that.runPlanId)); this.reSize({ width: this.$store.state.runPlan.width, height: this.$store.state.runPlan.height });
if (that.myChart) { this.myChart.on('click', this.mouseClick);
that.myChart.setOption(that.option);
that.reSize({ width: that.$store.state.runPlan.width, height: that.$store.state.runPlan.height });
that.myChart.on('click', that.mouseClick);
} }
}) });
resolve(true); resolve(true);
}
);
} catch (error) { } catch (error) {
reject(error); reject(error);
} }
}); });
}, },
xAxisPointFormat(params) { xAxisPointFormat(params) {
return timeFormat(params.value); return timeFormat(params.value);
@ -404,13 +396,13 @@
return ''; return '';
}, },
xAxisInit() { xAxisInit() {
let list = []; const list = [];
for (var time = 0 + this.PlanConvert.TranslationTime; time < 3600 * 24 + this.PlanConvert.TranslationTime; time++) { for (var time = 0 + this.PlanConvert.TranslationTime; time < 3600 * 24 + this.PlanConvert.TranslationTime; time++) {
list.push(time); list.push(time);
} }
let startValue = 3600 * 6; const startValue = 3600 * 6;
let offsetTime = 3600 * 1; const offsetTime = 3600 * 1;
this.option.xAxis[0].data = list; this.option.xAxis[0].data = list;
if (!this.option.dataZoom[0].startValue) { if (!this.option.dataZoom[0].startValue) {
@ -428,7 +420,7 @@
} }
}, },
axisTooltip(param) { axisTooltip(param) {
let station = this.stations[Math.floor((param.data[1] - this.PlanConvert.EdgeHeight) / this.PlanConvert.CoordMultiple)] || { name: '', kmRange: '' }; const station = this.stations[Math.floor((param.data[1] - this.PlanConvert.EdgeHeight) / this.PlanConvert.CoordMultiple)] || { name: '', kmRange: '' };
return [ return [
`Point Data <hr size=1 style=" margin: 3px 0">`, `Point Data <hr size=1 style=" margin: 3px 0">`,
`车站名称: ${station.name}<br>`, `车站名称: ${station.name}<br>`,
@ -437,9 +429,9 @@
].join(''); ].join('');
}, },
mouseClick(params) { mouseClick(params) {
let model = { const model = {
serviceNumber: params.seriesName serviceNumber: params.seriesName
} };
this.$store.dispatch('runPlan/setSelected', model); this.$store.dispatch('runPlan/setSelected', model);
}, },
reSize(opt) { reSize(opt) {
@ -464,9 +456,9 @@
} }
} }
} };
</script> </script>
<style scoped rel="stylesheet/scss" lang="scss" scoped> <style scoped rel="stylesheet/scss" lang="scss">
@import "src/styles/mixin.scss"; @import "src/styles/mixin.scss";
#PlanSchedule { #PlanSchedule {

View File

@ -1,8 +1,8 @@
<template> <template>
<div class="plan-schedule" style="width: 100%"> <div class="plan-schedule" style="width: 100%">
<title-bar ref="titleBar" @back="back" /> <title-bar ref="titleBar" @back="back" />
<menu-bar ref="menuBar" :skin-code="skinCode" @dispatchDialog="dispatchDialog" /> <menu-bar ref="menuBar" :line-code="lineCode" @dispatchDialog="dispatchDialog" />
<schedule ref="schedule" :group="group" :skin-code="skinCode" :max-height="height" :max-width="width" /> <schedule ref="schedule" :group="group" :line-code="lineCode" :max-height="height" :max-width="width" />
<status-bar ref="statusBar" :max-top="height" @setPosition="setPosition" /> <status-bar ref="statusBar" :max-top="height" @setPosition="setPosition" />
<manage-plan-list ref="managePlanList" @dispatchDialog="dispatchDialog" /> <manage-plan-list ref="managePlanList" @dispatchDialog="dispatchDialog" />
@ -54,8 +54,8 @@ export default {
}; };
}, },
computed: { computed: {
skinCode() { lineCode() {
return this.$route.query.skinCode || '02'; return this.$route.query.lineCode || '02';
}, },
width() { width() {
return this.$store.state.app.width; return this.$store.state.app.width;

View File

@ -125,7 +125,7 @@ import { EventBus } from '@/scripts/event-bus';
export default { export default {
name: 'PlanMenuBar', name: 'PlanMenuBar',
props: { props: {
skinCode: { lineCode: {
type: String, type: String,
required: true required: true
} }

View File

@ -27,6 +27,7 @@ import { mapGetters } from 'vuex';
import { timeFormat } from '@/utils/date'; import { timeFormat } from '@/utils/date';
import { runDiagramGetTime } from '@/api/simulation'; import { runDiagramGetTime } from '@/api/simulation';
import DataTable from '../menusPlan/components/dataTable'; import DataTable from '../menusPlan/components/dataTable';
import echarts from 'echarts';
export default { export default {
name: 'PlanSchedule', name: 'PlanSchedule',
@ -38,7 +39,7 @@ export default {
type: String, type: String,
required: true required: true
}, },
skinCode: { lineCode: {
type: String, type: String,
required: true required: true
}, },
@ -237,7 +238,7 @@ export default {
} }
}, },
mounted() { mounted() {
this.PlanConvert = this.$theme.loadPlanConvert(this.skinCode); this.PlanConvert = this.$theme.loadPlanConvert(this.lineCode);
}, },
beforeDestroy() { beforeDestroy() {
this.destroy(); this.destroy();
@ -358,42 +359,24 @@ export default {
loadInitChart(series) { loadInitChart(series) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
try { try {
const that = this; this.destroy();
// echart
require.config(
{
paths: {
echarts: './js/dist'
}
}
);
//
require(
[
'echarts',
'echarts/lib/chart/line'
],
function (ec) {
that.destroy();
let startValue = 3600 + that.PlanConvert.TranslationTime; let startValue = 3600 + this.PlanConvert.TranslationTime;
const offsetTime = 3600; const offsetTime = 3600;
runDiagramGetTime(that.group).then(resp => { runDiagramGetTime(this.group).then(resp => {
startValue = resp.data - that.PlanConvert.TranslationTime; startValue = resp.data - this.PlanConvert.TranslationTime;
that.option.dataZoom[0].startValue = that.option.dataZoom[1].startValue = startValue - offsetTime; this.option.dataZoom[0].startValue = this.option.dataZoom[1].startValue = startValue - offsetTime;
that.option.dataZoom[0].endValue = that.option.dataZoom[1].endValue = startValue + offsetTime; this.option.dataZoom[0].endValue = this.option.dataZoom[1].endValue = startValue + offsetTime;
that.option.series = series; this.option.series = series;
that.myChart = ec.init(document.getElementById(that.runPlanId)); this.myChart = echarts.init(document.getElementById(this.runPlanId));
if (that.myChart) { if (this.myChart) {
that.myChart.setOption(that.option); this.myChart.setOption(this.option);
that.reSize({ width: that.$store.state.runPlan.width, height: that.$store.state.runPlan.height }); this.reSize({ width: this.$store.state.runPlan.width, height: this.$store.state.runPlan.height });
that.myChart.on('click', that.mouseClick); this.myChart.on('click', this.mouseClick);
} }
}); });
resolve(true); resolve(true);
}
);
} catch (error) { } catch (error) {
reject(error); reject(error);
} }
@ -476,7 +459,7 @@ export default {
} }
}; };
</script> </script>
<style scoped rel="stylesheet/scss" lang="scss" scoped> <style scoped rel="stylesheet/scss" lang="scss">
@import "src/styles/mixin.scss"; @import "src/styles/mixin.scss";
#PlanSchedule { #PlanSchedule {

View File

@ -1,8 +1,8 @@
<template> <template>
<div class="plan-schedule" style="width: 100%"> <div class="plan-schedule" style="width: 100%">
<title-bar ref="titleBar" @back="back" /> <title-bar ref="titleBar" @back="back" />
<menu-bar ref="menuBar" :skin-code="skinCode" @dispatchDialog="dispatchDialog" /> <menu-bar ref="menuBar" :line-code="lineCode" @dispatchDialog="dispatchDialog" />
<schedule ref="schedule" :skin-code="skinCode" :group="group" :max-height="height" :max-width="width" /> <schedule ref="schedule" :line-code="lineCode" :group="group" :max-height="height" :max-width="width" />
<status-bar ref="statusBar" :max-top="height" @setPosition="setPosition" /> <status-bar ref="statusBar" :max-top="height" @setPosition="setPosition" />
<manage-plan-list ref="managePlanList" @dispatchDialog="dispatchDialog" /> <manage-plan-list ref="managePlanList" @dispatchDialog="dispatchDialog" />
@ -54,8 +54,8 @@ export default {
}; };
}, },
computed: { computed: {
skinCode() { lineCode() {
return this.$route.query.skinCode || '02'; return this.$route.query.lineCode || '02';
}, },
width() { width() {
return this.$store.state.app.width; return this.$store.state.app.width;

View File

@ -125,7 +125,7 @@ import { EventBus } from '@/scripts/event-bus';
export default { export default {
name: 'PlanMenuBar', name: 'PlanMenuBar',
props: { props: {
skinCode: { lineCode: {
type: String, type: String,
required: true required: true
} }

View File

@ -27,6 +27,7 @@ import { mapGetters } from 'vuex';
import { timeFormat } from '@/utils/date'; import { timeFormat } from '@/utils/date';
import { runDiagramGetTime } from '@/api/simulation'; import { runDiagramGetTime } from '@/api/simulation';
import DataTable from '../menusPlan/components/dataTable'; import DataTable from '../menusPlan/components/dataTable';
import echarts from 'echarts';
export default { export default {
name: 'PlanSchedule', name: 'PlanSchedule',
@ -38,7 +39,7 @@ export default {
type: String, type: String,
required: true required: true
}, },
skinCode: { lineCode: {
type: String, type: String,
required: true required: true
}, },
@ -237,7 +238,7 @@ export default {
} }
}, },
mounted() { mounted() {
this.PlanConvert = this.$theme.loadPlanConvert(this.skinCode); this.PlanConvert = this.$theme.loadPlanConvert(this.lineCode);
}, },
beforeDestroy() { beforeDestroy() {
this.destroy(); this.destroy();
@ -358,42 +359,24 @@ export default {
loadInitChart(series) { loadInitChart(series) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
try { try {
const that = this; this.destroy();
// echart
require.config(
{
paths: {
echarts: './js/dist'
}
}
);
//
require(
[
'echarts',
'echarts/lib/chart/line'
],
function (ec) {
that.destroy();
let startValue = 3600 + that.PlanConvert.TranslationTime; let startValue = 3600 + this.PlanConvert.TranslationTime;
const offsetTime = 3600; const offsetTime = 3600;
runDiagramGetTime(that.group).then(resp => { runDiagramGetTime(this.group).then(resp => {
startValue = resp.data - that.PlanConvert.TranslationTime; startValue = resp.data - this.PlanConvert.TranslationTime;
that.option.dataZoom[0].startValue = that.option.dataZoom[1].startValue = startValue - offsetTime; this.option.dataZoom[0].startValue = this.option.dataZoom[1].startValue = startValue - offsetTime;
that.option.dataZoom[0].endValue = that.option.dataZoom[1].endValue = startValue + offsetTime; this.option.dataZoom[0].endValue = this.option.dataZoom[1].endValue = startValue + offsetTime;
that.option.series = series; this.option.series = series;
that.myChart = ec.init(document.getElementById(that.runPlanId)); this.myChart = echarts.init(document.getElementById(this.runPlanId));
if (that.myChart) { if (this.myChart) {
that.myChart.setOption(that.option); this.myChart.setOption(this.option);
that.reSize({ width: that.$store.state.runPlan.width, height: that.$store.state.runPlan.height }); this.reSize({ width: this.$store.state.runPlan.width, height: this.$store.state.runPlan.height });
that.myChart.on('click', that.mouseClick); this.myChart.on('click', this.mouseClick);
} }
resolve(true);
}); });
} resolve(true);
);
} catch (error) { } catch (error) {
reject(error); reject(error);
} }

View File

@ -102,12 +102,12 @@ export default {
}, },
mounted() { mounted() {
this.routes = this.$router.options.routes; this.routes = this.$router.options.routes;
if (this.$route.fullPath.indexOf('design/userlist')>=0) { if (this.$route.fullPath.indexOf('design/userlist') >= 0) {
this.activePath='/design/userlist/home'; this.activePath = '/design/userlist/home';
} else if (this.$route.fullPath.includes('design/lesson') || this.$route.fullPath.includes('design/script') || this.$route.fullPath.includes('design/runPlan') || this.$route.fullPath.includes('design/mapPreview')) { } else if (this.$route.fullPath.includes('design/lesson') || this.$route.fullPath.includes('design/script') || this.$route.fullPath.includes('design/runPlan') || this.$route.fullPath.includes('design/mapPreview')) {
this.activePath='/design/home'; this.activePath = '/design/home';
} else { } else {
this.activePath=this.$route.path; this.activePath = this.$route.path;
} }
}, },
methods: { methods: {

View File

@ -3,6 +3,7 @@ import Vue from 'vue';
import 'normalize.css/normalize.css'; // A modern alternative to CSS resets import 'normalize.css/normalize.css'; // A modern alternative to CSS resets
import ElementUI from 'element-ui'; import ElementUI from 'element-ui';
// import ELEMENT from 'element-ui';
import ElementLocale from 'element-ui/lib/locale'; import ElementLocale from 'element-ui/lib/locale';
import 'element-ui/lib/theme-chalk/index.css'; import 'element-ui/lib/theme-chalk/index.css';

View File

@ -127,6 +127,14 @@ router.beforeEach((to, from, next) => {
} }
}); });
NProgress.configure({
easing: 'ease', // 动画方式
speed: 500, // 递增进度条的速度
showSpinner: false, // 是否显示加载ico
trickleSpeed: 200, // 自动递增间隔
minimum: 0.3 // 初始化时的最小百分比
});
router.afterEach(() => { router.afterEach(() => {
// 结束Progress // 结束Progress
NProgress.done(); NProgress.done();

View File

@ -4,101 +4,101 @@ import Router from 'vue-router';
Vue.use(Router); Vue.use(Router);
/* Layout */ /* Layout */
import Layout from '@/layout'; const Layout = () => import('@/layout');
import Login from '@/views/login/index'; const Login = () => import('@/views/login/index');
import Jlmap3dedit from '@/views/jlmap3d/edit/jlmap3dedit'; const Jlmap3dedit = () => import('@/views/jlmap3d/edit/jlmap3dedit');
import Jlmap3d from '@/views/jlmap3d/drive/jl3ddrive'; const Jlmap3d = () => import('@/views/jlmap3d/drive/jl3ddrive');
import Display from '@/views/display/index'; const Display = () => import('@/views/display/index');
import DesignDisplay from '@/views/display/designIndex'; const DesignDisplay = () => import('@/views/display/designIndex');
import TrainRoom from '@/views/trainRoom/index'; const TrainRoom = () => import('@/views/trainRoom/index');
import JointTraining from '@/views/jointTraining/index'; const JointTraining = () => import('@/views/jointTraining/index');
import Error401 from '@/views/error-page/401'; const Error401 = () => import('@/views/error-page/401');
import Errpr404 from '@/views/error-page/404'; const Errpr404 = () => import('@/views/error-page/404');
import MapProduct from '@/views/system/product/index'; const MapProduct = () => import('@/views/system/product/index');
import Dictionary from '@/views/system/dictionary/index'; const Dictionary = () => import('@/views/system/dictionary/index');
import DictionaryDetail from '@/views/system/dictionaryDetail/index'; const DictionaryDetail = () => import('@/views/system/dictionaryDetail/index');
import UserControl from '@/views/system/userControl/index'; const UserControl = () => import('@/views/system/userControl/index');
import UserTraining from '@/views/system/userTraining/index'; const UserTraining = () => import('@/views/system/userTraining/index');
import UserExam from '@/views/system/userExam/index'; const UserExam = () => import('@/views/system/userExam/index');
import UserSimulation from '@/views/system/userSimulation/index'; const UserSimulation = () => import('@/views/system/userSimulation/index');
import ExistingSimulation from '@/views/system/existingSimulation/index'; const ExistingSimulation = () => import('@/views/system/existingSimulation/index');
import CacheControl from '@/views/system/cacheControl/index'; const CacheControl = () => import('@/views/system/cacheControl/index');
import SystemGenerate from '@/views/system/systemGenerate/index'; const SystemGenerate = () => import('@/views/system/systemGenerate/index');
import IbpDraw from '@/views/system/ibpDraw/index'; const IbpDraw = () => import('@/views/system/ibpDraw/index');
import Mapedit from '@/views/mapdraft/index'; const Mapedit = () => import('@/views/mapdraft/index');
import Taskmanage from '@/views/lesson/taskmanage/list'; const Taskmanage = () => import('@/views/lesson/taskmanage/list');
import TrainingRuleList from '@/views/lesson/trainingRule/list'; const TrainingRuleList = () => import('@/views/lesson/trainingRule/list');
import TrainingRuleEdit from '@/views/lesson/trainingRule/detail/index'; const TrainingRuleEdit = () => import('@/views/lesson/trainingRule/detail/index');
import Trainingmanage from '@/views/lesson/trainingmanage/index'; const Trainingmanage = () => import('@/views/lesson/trainingmanage/index');
import LessonEdit from '@/views/lesson/lessoncategory/index'; const LessonEdit = () => import('@/views/lesson/lessoncategory/index');
import LessonHome from '@/views/lesson/home'; const LessonHome = () => import('@/views/lesson/home');
import LessonDetail from '@/views/lesson/details'; const LessonDetail = () => import('@/views/lesson/details');
import ScriptmanageHome from '@/views/scriptManage/home'; const ScriptmanageHome = () => import('@/views/scriptManage/home');
import ScriptDisplay from '@/views/scriptManage/display/index'; const ScriptDisplay = () => import('@/views/scriptManage/display/index');
import TeachDetail from '@/views/teach/detail/index'; const TeachDetail = () => import('@/views/teach/detail/index');
import TeachHome from '@/views/teach/index'; const TeachHome = () => import('@/views/teach/index');
import Pay from '@/views/components/pay/index'; const Pay = () => import('@/views/components/pay/index');
import ExamHome from '@/views/exam/index'; const ExamHome = () => import('@/views/exam/index');
import ExamResult from '@/views/exam/result'; const ExamResult = () => import('@/views/exam/result');
import ExamDetail from '@/views/exam/detail/examDetail'; const ExamDetail = () => import('@/views/exam/detail/examDetail');
import ExamCourseDetail from '@/views/exam/detail/courseDetail'; const ExamCourseDetail = () => import('@/views/exam/detail/courseDetail');
import DemonstrationDetail from '@/views/demonstration/detail/index'; const DemonstrationDetail = () => import('@/views/demonstration/detail/index');
import PlanMonitorEditTool from '@/views/planMonitor/editTool/index'; const PlanMonitorEditTool = () => import('@/views/planMonitor/editTool/index');
import PlanMonitorEditUserTool from '@/views/planMonitor/editTool/userindex'; const PlanMonitorEditUserTool = () => import('@/views/planMonitor/editTool/userindex');
import PlanMonitorDetail from '@/views/planMonitor/detail'; const PlanMonitorDetail = () => import('@/views/planMonitor/detail');
import DesignPlatformHome from '@/views/designPlatform/home'; const DesignPlatformHome = () => import('@/views/designPlatform/home');
import DesignPlatform from '@/views/designPlatform/index'; const DesignPlatform = () => import('@/views/designPlatform/index');
import MapPreview from '@/views/designPlatform/mapPreview'; const MapPreview = () => import('@/views/designPlatform/mapPreview');
import DesignPlatformUser from '@/views/designUser/index'; const DesignPlatformUser = () => import('@/views/designUser/index');
import Package from '@/views/package/index'; const Package = () => import('@/views/package/index');
import PackageDraft from '@/views/package/draft/ruleForm'; const PackageDraft = () => import('@/views/package/draft/ruleForm');
import PackageDetail from '@/views/package/detail'; const PackageDetail = () => import('@/views/package/detail');
import PublishMap from '@/views/publish/publishMap/index'; const PublishMap = () => import('@/views/publish/publishMap/index');
import PublishMapDetail from '@/views/publish/publishMap/list'; // 发布历史 const PublishMapDetail = () => import('@/views/publish/publishMap/list'); // 发布历史
import ProductStatus from '@/views/publish/productStatus/index'; const ProductStatus = () => import('@/views/publish/productStatus/index');
import PublishLesson from '@/views/publish/publishLesson/index'; const PublishLesson = () => import('@/views/publish/publishLesson/index');
import RunPlanTemplate from '@/views/publish/runPlanTemplate/index'; const RunPlanTemplate = () => import('@/views/publish/runPlanTemplate/index');
import RunPlanCommon from '@/views/publish/runPlanCommon/index'; const RunPlanCommon = () => import('@/views/publish/runPlanCommon/index');
import RunPlanCommonDraft from '@/views/publish/runPlanCommon/draft'; const RunPlanCommonDraft = () => import('@/views/publish/runPlanCommon/draft');
import RunPlanEveryDay from '@/views/publish/runPlanEveryDay/index'; const RunPlanEveryDay = () => import('@/views/publish/runPlanEveryDay/index');
import RunplanView from '@/views/publish/runPlanEveryDay/runPlanView'; const RunplanView = () => import('@/views/publish/runPlanEveryDay/runPlanView');
import PublishExamRule from '@/views/publish/examRule/index'; const PublishExamRule = () => import('@/views/publish/examRule/index');
import PublishExamRuleDraft from '@/views/publish/examRule/draft/index'; const PublishExamRuleDraft = () => import('@/views/publish/examRule/draft/index');
import TrainingPlatform from '@/views/trainingPlatform/index'; const TrainingPlatform = () => import('@/views/trainingPlatform/index');
import Commodity from '@/views/orderauthor/commodity/index'; const Commodity = () => import('@/views/orderauthor/commodity/index');
import CommodityDraft from '@/views/orderauthor/commodity/draft'; const CommodityDraft = () => import('@/views/orderauthor/commodity/draft');
import OrderList from '@/views/orderauthor/order/list'; const OrderList = () => import('@/views/orderauthor/order/list');
import OrderDraft from '@/views/orderauthor/order/draft'; const OrderDraft = () => import('@/views/orderauthor/order/draft');
import Author from '@/views/orderauthor/author/index'; const Author = () => import('@/views/orderauthor/author/index');
import AuthorDraft from '@/views/orderauthor/author/draft/ruleForm'; const AuthorDraft = () => import('@/views/orderauthor/author/draft/ruleForm');
import Permission from '@/views/orderauthor/permission/index'; const Permission = () => import('@/views/orderauthor/permission/index');
import PermissionDetail from '@/views/orderauthor/permission/detail'; const PermissionDetail = () => import('@/views/orderauthor/permission/detail');
import PermissionDraft from '@/views/orderauthor/permission/package/ruleForm'; const PermissionDraft = () => import('@/views/orderauthor/permission/package/ruleForm');
import PermissionCreate from '@/views/orderauthor/permission/create/index'; const PermissionCreate = () => import('@/views/orderauthor/permission/create/index');
import UserRules from '@/views/orderauthor/rules/index'; const UserRules = () => import('@/views/orderauthor/rules/index');
import UserRulesDetail from '@/views/orderauthor/rules/detail'; const UserRulesDetail = () => import('@/views/orderauthor/rules/detail');
import LessonApproval from '@/views/approval/lesson/index'; const LessonApproval = () => import('@/views/approval/lesson/index');
import ScriptApproval from '@/views/approval/script/index'; const ScriptApproval = () => import('@/views/approval/script/index');
import RunPlanApproval from '@/views/approval/runPlan/index'; const RunPlanApproval = () => import('@/views/approval/runPlan/index');
import News from '@/views/news/index'; const News = () => import('@/views/news/index');
import { loginTitle } from '@/scripts/ConstDic'; import { loginTitle } from '@/scripts/ConstDic';
import { getSessionStorage } from '@/utils/auth'; import { getSessionStorage } from '@/utils/auth';

View File

@ -140,7 +140,7 @@ export default {
this.option.series = []; this.option.series = [];
this.option.legend.data = []; this.option.legend.data = [];
this.option.xAxis[0].data = [this.$t('dashboard.controlRightsTraining'), this.option.xAxis[0].data = [this.$t('dashboard.controlRightsTraining'),
this.$t('dashboard.signalTraining'),this.$t('dashboard.turnoutTraining'), this.$t('dashboard.sectionTraining'), this.$t('dashboard.stationTraining')]; this.$t('dashboard.signalTraining'), this.$t('dashboard.turnoutTraining'), this.$t('dashboard.sectionTraining'), this.$t('dashboard.stationTraining')];
data.forEach(elem => { data.forEach(elem => {
this.option.legend.data.push(elem.statsProjectName); this.option.legend.data.push(elem.statsProjectName);
this.option.series.push({ this.option.series.push({

View File

@ -142,7 +142,7 @@ export default {
if (mapName) { if (mapName) {
var permissionDict = {}; var permissionDict = {};
var permissionList = await this.$Dictionary.permissionType(); var permissionList = await this.$Dictionary.permissionType();
(permissionList ||[]).forEach(elem => { (permissionList || []).forEach(elem => {
permissionDict[elem.code] = elem.name; permissionDict[elem.code] = elem.name;
}); });
var permissionMap = { var permissionMap = {
@ -157,8 +157,8 @@ export default {
'大屏系统权限': 0 '大屏系统权限': 0
}; };
(this.permissionList.filter(elem => { return elem.mapName == mapName; })|| []).forEach(elem => { (this.permissionList.filter(elem => { return elem.mapName == mapName; }) || []).forEach(elem => {
if (elem.prdName == Object.keys(permissionMap)[Object.keys(permissionMap).length -1]) { if (elem.prdName == Object.keys(permissionMap)[Object.keys(permissionMap).length - 1]) {
permissionMap[`${elem.prdName}`] = elem.remains; permissionMap[`${elem.prdName}`] = elem.remains;
} else { } else {
permissionMap[`${elem.prdName}-${permissionDict[elem.permissionType]}`] = elem.remains; permissionMap[`${elem.prdName}-${permissionDict[elem.permissionType]}`] = elem.remains;
@ -180,7 +180,7 @@ export default {
this.option.series[0].data = values; this.option.series[0].data = values;
this.option.series[1].data = keys.filter(name => { return permissionMap[name]; } ).map(name => { return {name, value: permissionMap[name]}; }); this.option.series[1].data = keys.filter(name => { return permissionMap[name]; } ).map(name => { return {name, value: permissionMap[name]}; });
} else { } else {
this.option.title.text =this.$t('dashboard.residualPermissionDistributionMap') + ``+ this.$t('dashboard.noMapLineDataYetAvailable') +``; this.option.title.text = this.$t('dashboard.residualPermissionDistributionMap') + `` + this.$t('dashboard.noMapLineDataYetAvailable') + ``;
this.option.title.subtext = this.$t('dashboard.totalPermissions') + `0` + this.$t('dashboard.individual'); this.option.title.subtext = this.$t('dashboard.totalPermissions') + `0` + this.$t('dashboard.individual');
this.option.xAxis.show = false; this.option.xAxis.show = false;
this.option.yAxis.show = false; this.option.yAxis.show = false;

View File

@ -19,9 +19,9 @@
<script> <script>
import home1 from '@/assets/home/home1.png'; import home1 from '@/assets/home/home1.png';
import home2 from '@/assets/home/home2.png'; import home2 from '@/assets/home/home2.png';
import home3 from '@/assets/home/demon1.jpg'; import home3 from '@/assets/home/script.png';
import home4 from '@/assets/home/tring1.png'; import home4 from '@/assets/home/tring1.png';
import home5 from '@/assets/home/tring4.jpg'; import home5 from '@/assets/home/demon1.jpg';
import home6 from '@/assets/home/demon2.jpg'; import home6 from '@/assets/home/demon2.jpg';
export default { export default {

View File

@ -29,7 +29,6 @@ export default {
listShow: true, listShow: true,
widthLeft: Number(localStore.get('LeftWidth')) || 450, widthLeft: Number(localStore.get('LeftWidth')) || 450,
productList: [], productList: [],
skinCode: '',
currentWidth: '' currentWidth: ''
}; };
}, },

View File

@ -88,7 +88,7 @@ export default {
{ required: true, message: this.$t('rules.pleaseEnterMapName'), trigger: 'blur' } { required: true, message: this.$t('rules.pleaseEnterMapName'), trigger: 'blur' }
], ],
lineCode: [ lineCode: [
{ required: true, message: this.$t('rules.pleaseChooseSkinCode'), trigger: 'change' } { required: true, message: this.$t('rules.pleaseChooseLineCode'), trigger: 'change' }
] ]
}, },
pullRules: { pullRules: {

View File

@ -26,14 +26,14 @@ export default {
} }
}, },
watch: { watch: {
'$route.query.skinCode': function (code) { '$route.query.lineCode': function (code) {
if (code) { if (code) {
this.menus = this.$theme.loadPlanComponent(code); this.menus = this.$theme.loadPlanComponent(code);
} }
} }
}, },
mounted() { mounted() {
this.menus = this.$theme.loadPlanComponent(this.$route.query.skinCode); this.menus = this.$theme.loadPlanComponent(this.$route.query.lineCode);
}, },
methods: { methods: {
doShow() { doShow() {

View File

@ -18,6 +18,7 @@ import { mapGetters } from 'vuex';
import { runDiagramGetTime } from '@/api/simulation'; import { runDiagramGetTime } from '@/api/simulation';
import { getPublishMapInfo } from '@/api/jmap/map'; import { getPublishMapInfo } from '@/api/jmap/map';
import { timeFormat } from '@/utils/date'; import { timeFormat } from '@/utils/date';
import echarts from 'echarts';
export default { export default {
name: 'RunPlanView', name: 'RunPlanView',
@ -213,46 +214,29 @@ export default {
loadInitChart(series) { loadInitChart(series) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
try { try {
const that = this; if (this.myChart && this.myChart.isDisposed) {
// echart this.myChart.clear();
require.config(
{
paths: {
echarts: './js/dist'
}
}
);
//
require(
[
'echarts',
'echarts/lib/chart/line'
],
function (ec) {
if (that.myChart && that.myChart.isDisposed) {
that.myChart.clear();
} }
let startValue = 3600 + that.PlanConvert.TranslationTime; let startValue = 3600 + this.PlanConvert.TranslationTime;
const offsetTime = 3600; const offsetTime = 3600;
runDiagramGetTime(that.group).then(resp => { runDiagramGetTime(this.group).then(resp => {
startValue = resp.data - that.PlanConvert.TranslationTime; startValue = resp.data - this.PlanConvert.TranslationTime;
that.option.dataZoom[0].startValue = that.option.dataZoom[1].startValue = startValue - offsetTime; this.option.dataZoom[0].startValue = this.option.dataZoom[1].startValue = startValue - offsetTime;
that.option.dataZoom[0].endValue = that.option.dataZoom[1].endValue = startValue + offsetTime; this.option.dataZoom[0].endValue = this.option.dataZoom[1].endValue = startValue + offsetTime;
that.option.series = series; this.option.series = series;
that.myChart = ec.init(document.getElementById(that.runPlanId)); this.myChart = echarts.init(document.getElementById(this.runPlanId));
if (that.myChart) { if (this.myChart) {
that.myChart.setOption(that.option); this.myChart.setOption(this.option);
that.reSize({ width: document.documentElement.clientWidth, height: document.documentElement.clientHeight - 55 }); this.reSize({ width: document.documentElement.clientWidth, height: document.documentElement.clientHeight - 55 });
} }
resolve(true);
}); });
} resolve(true);
);
} catch (error) { } catch (error) {
reject(error); reject(error);
} }
}); });
}, },
updateRunPlanData(data) { updateRunPlanData(data) {
const stations = this.$store.state.runPlan.stations; const stations = this.$store.state.runPlan.stations;

View File

@ -30,6 +30,7 @@ import {getRpDetailByUserMapId, getUserMapDetailByMapId} from '@/api/designPlatf
import { loadMapDataById } from '@/utils/loaddata'; import { loadMapDataById } from '@/utils/loaddata';
import { getPublishMapInfo } from '@/api/jmap/map'; import { getPublishMapInfo } from '@/api/jmap/map';
import DataTable from './menus/components/dataTable'; import DataTable from './menus/components/dataTable';
import echarts from 'echarts';
export default { export default {
name: 'PlanSchedule', name: 'PlanSchedule',
@ -467,35 +468,16 @@ export default {
loadInitChart() { loadInitChart() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
try { try {
const that = this; if (this.myChart && this.myChart.isDisposed) {
// echart this.myChart.clear();
require.config(
{
paths: {
echarts: './js/dist'
} }
if (this.$route.query.planName) {
this.option.title.text = this.mapName;
} }
); this.myChart = echarts.init(document.getElementById(this.runPlanId));
// this.myChart.setOption(this.option);
require( this.reSize({ width: this.$store.state.runPlan.width, height: this.$store.state.runPlan.height });
[
'echarts',
'echarts/lib/chart/line'
],
function (ec) {
if (that.myChart && that.myChart.isDisposed) {
that.myChart.clear();
}
if (that.$route.query.planName) {
that.option.title.text = that.mapName;
}
that.myChart = ec.init(document.getElementById(that.runPlanId));
that.myChart.setOption(that.option);
that.reSize({ width: that.$store.state.runPlan.width, height: that.$store.state.runPlan.height });
// that.myChart.on('click', that.mouseClick);
resolve(true); resolve(true);
}
);
} catch (error) { } catch (error) {
reject(error); reject(error);
} }

View File

@ -14,6 +14,7 @@ import { mapGetters } from 'vuex';
import { getStationList, queryRunPlan, queryRunPlanTemplate, queryRunPlanDaily } from '@/api/runplan'; import { getStationList, queryRunPlan, queryRunPlanTemplate, queryRunPlanDaily } from '@/api/runplan';
import { timeFormat } from '@/utils/date'; import { timeFormat } from '@/utils/date';
import { UrlConfig } from '@/router/index'; import { UrlConfig } from '@/router/index';
import echarts from 'echarts';
export default { export default {
name: 'RunPlan', name: 'RunPlan',
@ -279,32 +280,15 @@ export default {
loadInitChart() { loadInitChart() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
try { try {
const that = this;
// echart if (this.myChart && this.myChart.isDisposed) {
require.config( this.myChart.clear();
{
paths: {
echarts: './js/dist'
} }
} this.myChart = echarts.init(document.getElementById(this.runPlanId));
); this.myChart.setOption(this.option);
// this.reSize({ width: this.$store.state.runPlan.width, height: this.$store.state.runPlan.height });
require( // this.myChart.on('click', this.mouseClick);
[
'echarts',
'echarts/lib/chart/line'
],
function (ec) {
if (that.myChart && that.myChart.isDisposed) {
that.myChart.clear();
}
that.myChart = ec.init(document.getElementById(that.runPlanId));
that.myChart.setOption(that.option);
that.reSize({ width: that.$store.state.runPlan.width, height: that.$store.state.runPlan.height });
// that.myChart.on('click', that.mouseClick);
resolve(true); resolve(true);
}
);
} catch (error) { } catch (error) {
reject(error); reject(error);
} }

View File

@ -65,7 +65,11 @@ module.exports = {
ignore: ['.*'] ignore: ['.*']
} }
]) ])
] ],
externals: {
'echarts': 'echarts' // 配置使用CDN
// 'element-ui': 'ELEMENT'
}
}, },
chainWebpack(config) { chainWebpack(config) {
config.plugins.delete('preload'); // TODO: need test config.plugins.delete('preload'); // TODO: need test