diff --git a/src/main.js b/src/main.js index db2e58341..99c4decfd 100644 --- a/src/main.js +++ b/src/main.js @@ -27,7 +27,7 @@ Vue.use(VueI18n); Vue.config.productionTip = false; export const i18n = new VueI18n({ - locale: LangStorage.getLang('en'), + locale: LangStorage.getLang('zh'), messages }); diff --git a/src/store/modules/runplan.js b/src/store/modules/runplan.js index 3226ad2d4..d0af9b925 100644 --- a/src/store/modules/runplan.js +++ b/src/store/modules/runplan.js @@ -9,9 +9,10 @@ const runPlan = { planSizeCount: 0, // 运行图canvas 大小变更标识 planLoadedCount: 0, // 运行图数据更新 planUpdateCount: 0, // 运行图更新标识 - selected: {}, // 选择的对象 + selected: {}, // 选择的对象 width: 800, // 运行图canvas 容器 宽度 - height: 600 // 运行图canvas 容器 高度 + height: 600, // 运行图canvas 容器 高度 + refreshCount: 0 // 刷新页面重新加载 }, getters: { stations: (state) => { @@ -95,6 +96,9 @@ const runPlan = { state.planData = {}; state.editData = {}; state.selected = {}; + }, + refresh: (state) => { + state.refreshCount++; } }, actions: { @@ -130,6 +134,10 @@ const runPlan = { /** 清空数据*/ clear: ({ commit }) => { commit('clear'); + }, + /** 刷新页面*/ + refresh: ({commit}) => { + commit('refresh'); } } }; diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index 2e575c51e..72be3b2f1 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -3,8 +3,8 @@ export function getBaseUrl() { let BASE_API; if (process.env.NODE_ENV === 'development') { // BASE_API = 'https://joylink.club/jlcloud'; - BASE_API = 'https://test.joylink.club/jlcloud'; - // BASE_API = 'http://192.168.3.5:9000'; // 袁琪 + // BASE_API = 'https://test.joylink.club/jlcloud'; + BASE_API = 'http://192.168.3.5:9000'; // 袁琪 // BASE_API = 'http://192.168.3.6:9000'; // 旭强 // BASE_API = 'http://192.168.3.4:9000' // 琰培 } else { diff --git a/src/views/planMonitor/editTool/index.vue b/src/views/planMonitor/editTool/index.vue index 7b281bb37..65c820652 100644 --- a/src/views/planMonitor/editTool/index.vue +++ b/src/views/planMonitor/editTool/index.vue @@ -145,7 +145,7 @@ export default { deletePlanService(model).then(resp => { this.$message.success('删除计划成功'); this.$store.dispatch('runPlan/setSelected', {}); - this.$refs.openRunPlan.loadRunPlanData(this.$route.query); + this.$refs.openRunPlan.loadRunPlanData(Object.assign({refresh: true}, this.$route.query)); }).catch(() => { this.$messageBox('删除计划失败'); }); diff --git a/src/views/planMonitor/editTool/menuBar.vue b/src/views/planMonitor/editTool/menuBar.vue index 39a1ccf23..34a506497 100644 --- a/src/views/planMonitor/editTool/menuBar.vue +++ b/src/views/planMonitor/editTool/menuBar.vue @@ -518,7 +518,8 @@ export default { width: 260, message: `真的要删除列车 ${serviceNumber} 吗?`, operate: 'DeletePlanningTrain', - serviceNumber: serviceNumber + serviceNumber: serviceNumber, + refresh: true } }); } else { diff --git a/src/views/planMonitor/editTool/menus/addPlanningTrain.vue b/src/views/planMonitor/editTool/menus/addPlanningTrain.vue index 27efe2da9..a1127a972 100644 --- a/src/views/planMonitor/editTool/menus/addPlanningTrain.vue +++ b/src/views/planMonitor/editTool/menus/addPlanningTrain.vue @@ -1,80 +1,89 @@ \ No newline at end of file + diff --git a/src/views/planMonitor/editTool/menus/addTask.vue b/src/views/planMonitor/editTool/menus/addTask.vue index 7f0487536..088c65bf4 100644 --- a/src/views/planMonitor/editTool/menus/addTask.vue +++ b/src/views/planMonitor/editTool/menus/addTask.vue @@ -1,294 +1,311 @@ \ No newline at end of file + diff --git a/src/views/planMonitor/editTool/menus/createEmptyPlan.vue b/src/views/planMonitor/editTool/menus/createEmptyPlan.vue index 64ad3a8c5..cb6a04b30 100644 --- a/src/views/planMonitor/editTool/menus/createEmptyPlan.vue +++ b/src/views/planMonitor/editTool/menus/createEmptyPlan.vue @@ -1,79 +1,88 @@ \ No newline at end of file + diff --git a/src/views/planMonitor/editTool/menus/deleteTask.vue b/src/views/planMonitor/editTool/menus/deleteTask.vue index 84c149433..4b4b24f8f 100644 --- a/src/views/planMonitor/editTool/menus/deleteTask.vue +++ b/src/views/planMonitor/editTool/menus/deleteTask.vue @@ -1,84 +1,93 @@ \ No newline at end of file + diff --git a/src/views/planMonitor/editTool/menus/duplicateTrain.vue b/src/views/planMonitor/editTool/menus/duplicateTrain.vue index 4f22bb19b..4aa6fe42d 100644 --- a/src/views/planMonitor/editTool/menus/duplicateTrain.vue +++ b/src/views/planMonitor/editTool/menus/duplicateTrain.vue @@ -1,82 +1,91 @@ \ No newline at end of file + diff --git a/src/views/planMonitor/editTool/menus/editPlanningTrain.vue b/src/views/planMonitor/editTool/menus/editPlanningTrain.vue index eead789fd..7bbb86ca4 100644 --- a/src/views/planMonitor/editTool/menus/editPlanningTrain.vue +++ b/src/views/planMonitor/editTool/menus/editPlanningTrain.vue @@ -1,211 +1,224 @@ \ No newline at end of file + diff --git a/src/views/planMonitor/editTool/menus/modifyingTask.vue b/src/views/planMonitor/editTool/menus/modifyingTask.vue index 645d82549..a4b84ce85 100644 --- a/src/views/planMonitor/editTool/menus/modifyingTask.vue +++ b/src/views/planMonitor/editTool/menus/modifyingTask.vue @@ -1,396 +1,418 @@ \ No newline at end of file + diff --git a/src/views/planMonitor/editTool/menus/offLine.vue b/src/views/planMonitor/editTool/menus/offLine.vue index 1111996b5..a67347c3e 100644 --- a/src/views/planMonitor/editTool/menus/offLine.vue +++ b/src/views/planMonitor/editTool/menus/offLine.vue @@ -1,61 +1,71 @@ \ No newline at end of file + diff --git a/src/views/planMonitor/editTool/menus/openRunPlan.vue b/src/views/planMonitor/editTool/menus/openRunPlan.vue index aced4f971..4300c997d 100644 --- a/src/views/planMonitor/editTool/menus/openRunPlan.vue +++ b/src/views/planMonitor/editTool/menus/openRunPlan.vue @@ -1,93 +1,109 @@ \ No newline at end of file + diff --git a/src/views/planMonitor/editTool/schedule.vue b/src/views/planMonitor/editTool/schedule.vue index a36db9ec0..37f4d9ca0 100644 --- a/src/views/planMonitor/editTool/schedule.vue +++ b/src/views/planMonitor/editTool/schedule.vue @@ -235,6 +235,9 @@ export default { }); this.$refs.tripTable.setCurrentRow(this.tripNumberConfig.data[index]); }, + '$store.state.runPlan.refreshCount': function() { + this.loadChartPage(); + }, $route() { this.loadChartPage(); }