From 1616639f6f9152e0fe040381699d1e7d6883f18e Mon Sep 17 00:00:00 2001 From: ival <610568032@qq.com> Date: Thu, 29 Aug 2019 13:52:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BF=90=E8=A1=8C=E5=9B=BE?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/runplan.js | 32 +- src/api/simulation.js | 10 +- .../batong_01/menus/dialog/trainDelete.vue | 303 ++++++++--------- .../beijing_01/menus/dialog/trainDelete.vue | 311 +++++++++--------- .../beijing_01/menusPlan/createTodayPlan.vue | 6 +- .../beijing_01/menusPlan/createWeekPlan.vue | 227 +++++++------ .../beijing_01/menusPlan/managePlanList.vue | 230 ++++++------- .../chengdu_03/menus/dialog/trainDelete.vue | 279 ++++++++-------- .../chengdu_03/menusPlan/createTodayPlan.vue | 7 +- .../chengdu_03/menusPlan/createWeekPlan.vue | 227 +++++++------ .../chengdu_03/menusPlan/managePlanList.vue | 230 ++++++------- .../chengdu_04/menusPlan/createTodayPlan.vue | 269 +++++++-------- .../chengdu_04/menusPlan/createWeekPlan.vue | 227 +++++++------ .../fuzhou_01/menus/dialog/trainDelete.vue | 303 ++++++++--------- .../fuzhou_01/menusPlan/createTodayPlan.vue | 6 +- .../fuzhou_01/menusPlan/createWeekPlan.vue | 227 +++++++------ .../fuzhou_01/menusPlan/managePlanList.vue | 230 ++++++------- src/utils/baseUrl.js | 4 +- src/views/publish/runPlanTemplate/index.vue | 16 +- .../publish/runPlanTemplate/mapSelect.vue | 73 ++++ 20 files changed, 1702 insertions(+), 1515 deletions(-) create mode 100644 src/views/publish/runPlanTemplate/mapSelect.vue diff --git a/src/api/runplan.js b/src/api/runplan.js index 229c57b1d..21eabe6ef 100644 --- a/src/api/runplan.js +++ b/src/api/runplan.js @@ -277,20 +277,14 @@ export function deleteRunPlanTemplate(planId) { } /** 生成通用每日运行图*/ -export function generateCommonRunPlanEveryDay(planId) { +export function generateCommonRunPlanEveryDay(planId, params) { return request({ url: `/api/runPlan/template/generate/${planId}`, - method: 'post' + method: 'post', + params }); } -/** 生成用户每日运行图*/ -export function generateUserRunPlanEveryDay(planId, group) { - return request({ - url: `/api/runPlan/daily/privilege/${planId}?group=${group}`, - method: 'post' - }); -} /** 获取运行计划每日列表*/ export function runPlanEveryDayList(params) { return request({ @@ -309,20 +303,12 @@ export function deleteRunPlanEveryDay(planId) { } /** 获取地图运行图的车次号*/ -export function getPublishMapTrainNos(skinCode) { - return request({ - url: `/api/runPlan/daily/${skinCode}/trainNos`, - method: 'get' - }); -} - -/** 获取服务号、车组号*/ -export function getPublishMapTrainServerNos(skinCode) { - return request({ - url: `/api/runPlan/daily/${skinCode}/serverNos`, - method: 'get' - }); -} +// export function getPublishMapTrainNos(skinCode) { +// return request({ +// url: `/api/runPlan/daily/${skinCode}/trainNos`, +// method: 'get' +// }); +// } /** 分页查询加载计划*/ export function getRunPlanLoadList(params) { diff --git a/src/api/simulation.js b/src/api/simulation.js index 60e1053b1..5c36b1eea 100644 --- a/src/api/simulation.js +++ b/src/api/simulation.js @@ -239,7 +239,7 @@ export function selectScriptMembers(group, data) { export function modifyScriptMemberSex(group, playerId, data) { return request({ url: `/api/simulation/${group}/scriptWrite/player/${playerId}?gender=${data.gender}`, - method: 'put', + method: 'put' }); } @@ -486,3 +486,11 @@ export function executeScript(group) { method: 'post' }); } + +/** 生成用户自己的当日运行图*/ +export function generateDayRunPlan(planId, group) { + return request({ + url: `/api/simulation/${group}/loadRunPlan/${planId}`, + method: 'post' + }); +} diff --git a/src/jmap/theme/batong_01/menus/dialog/trainDelete.vue b/src/jmap/theme/batong_01/menus/dialog/trainDelete.vue index 003ce2e1f..643df3baa 100644 --- a/src/jmap/theme/batong_01/menus/dialog/trainDelete.vue +++ b/src/jmap/theme/batong_01/menus/dialog/trainDelete.vue @@ -1,156 +1,165 @@ \ No newline at end of file + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.doClose(); + } + }).catch(() => { this.doClose(); }); + } + } +}; + diff --git a/src/jmap/theme/beijing_01/menus/dialog/trainDelete.vue b/src/jmap/theme/beijing_01/menus/dialog/trainDelete.vue index 70225067f..155e29ee3 100644 --- a/src/jmap/theme/beijing_01/menus/dialog/trainDelete.vue +++ b/src/jmap/theme/beijing_01/menus/dialog/trainDelete.vue @@ -1,160 +1,169 @@ \ No newline at end of file + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.doClose(); + } + }).catch(() => { this.doClose(); }); + } + } +}; + diff --git a/src/jmap/theme/beijing_01/menusPlan/createTodayPlan.vue b/src/jmap/theme/beijing_01/menusPlan/createTodayPlan.vue index af08e8157..f9b4ff067 100644 --- a/src/jmap/theme/beijing_01/menusPlan/createTodayPlan.vue +++ b/src/jmap/theme/beijing_01/menusPlan/createTodayPlan.vue @@ -18,9 +18,9 @@ \ No newline at end of file + diff --git a/src/jmap/theme/beijing_01/menusPlan/managePlanList.vue b/src/jmap/theme/beijing_01/menusPlan/managePlanList.vue index b4ae47a4b..fbf13a94c 100644 --- a/src/jmap/theme/beijing_01/menusPlan/managePlanList.vue +++ b/src/jmap/theme/beijing_01/menusPlan/managePlanList.vue @@ -1,122 +1,130 @@ \ No newline at end of file + diff --git a/src/jmap/theme/chengdu_03/menus/dialog/trainDelete.vue b/src/jmap/theme/chengdu_03/menus/dialog/trainDelete.vue index ca1df1743..109e1c918 100644 --- a/src/jmap/theme/chengdu_03/menus/dialog/trainDelete.vue +++ b/src/jmap/theme/chengdu_03/menus/dialog/trainDelete.vue @@ -1,143 +1,152 @@ \ No newline at end of file + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.doClose(); + } + }).catch(() => { this.doClose(); }); + } + } +}; + diff --git a/src/jmap/theme/chengdu_03/menusPlan/createTodayPlan.vue b/src/jmap/theme/chengdu_03/menusPlan/createTodayPlan.vue index 85406230f..1eaccb114 100644 --- a/src/jmap/theme/chengdu_03/menusPlan/createTodayPlan.vue +++ b/src/jmap/theme/chengdu_03/menusPlan/createTodayPlan.vue @@ -18,10 +18,9 @@ \ No newline at end of file + diff --git a/src/jmap/theme/chengdu_03/menusPlan/managePlanList.vue b/src/jmap/theme/chengdu_03/menusPlan/managePlanList.vue index b4ae47a4b..fbf13a94c 100644 --- a/src/jmap/theme/chengdu_03/menusPlan/managePlanList.vue +++ b/src/jmap/theme/chengdu_03/menusPlan/managePlanList.vue @@ -1,122 +1,130 @@ \ No newline at end of file + diff --git a/src/jmap/theme/chengdu_04/menusPlan/createTodayPlan.vue b/src/jmap/theme/chengdu_04/menusPlan/createTodayPlan.vue index 3df161516..f9b4ff067 100644 --- a/src/jmap/theme/chengdu_04/menusPlan/createTodayPlan.vue +++ b/src/jmap/theme/chengdu_04/menusPlan/createTodayPlan.vue @@ -1,140 +1,147 @@ \ No newline at end of file + diff --git a/src/jmap/theme/chengdu_04/menusPlan/createWeekPlan.vue b/src/jmap/theme/chengdu_04/menusPlan/createWeekPlan.vue index c6f6f74b7..b96af17c9 100644 --- a/src/jmap/theme/chengdu_04/menusPlan/createWeekPlan.vue +++ b/src/jmap/theme/chengdu_04/menusPlan/createWeekPlan.vue @@ -1,116 +1,127 @@ \ No newline at end of file + diff --git a/src/jmap/theme/fuzhou_01/menus/dialog/trainDelete.vue b/src/jmap/theme/fuzhou_01/menus/dialog/trainDelete.vue index d0d8ef36c..07a528669 100644 --- a/src/jmap/theme/fuzhou_01/menus/dialog/trainDelete.vue +++ b/src/jmap/theme/fuzhou_01/menus/dialog/trainDelete.vue @@ -1,156 +1,165 @@ \ No newline at end of file + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.doClose(); + } + }).catch(() => { this.doClose(); }); + } + } +}; + diff --git a/src/jmap/theme/fuzhou_01/menusPlan/createTodayPlan.vue b/src/jmap/theme/fuzhou_01/menusPlan/createTodayPlan.vue index b15420cdd..5b813183a 100644 --- a/src/jmap/theme/fuzhou_01/menusPlan/createTodayPlan.vue +++ b/src/jmap/theme/fuzhou_01/menusPlan/createTodayPlan.vue @@ -18,9 +18,9 @@ \ No newline at end of file + diff --git a/src/jmap/theme/fuzhou_01/menusPlan/managePlanList.vue b/src/jmap/theme/fuzhou_01/menusPlan/managePlanList.vue index 11b2df481..52563b829 100644 --- a/src/jmap/theme/fuzhou_01/menusPlan/managePlanList.vue +++ b/src/jmap/theme/fuzhou_01/menusPlan/managePlanList.vue @@ -1,122 +1,130 @@ \ No newline at end of file + diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index 2e575c51e..4050e7e22 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -3,9 +3,9 @@ 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 = '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.6:9000'; // 旭强 // BASE_API = 'http://192.168.3.4:9000' // 琰培 } else { BASE_API = process.env.VUE_APP_BASE_API; diff --git a/src/views/publish/runPlanTemplate/index.vue b/src/views/publish/runPlanTemplate/index.vue index be7757936..885cb1cec 100644 --- a/src/views/publish/runPlanTemplate/index.vue +++ b/src/views/publish/runPlanTemplate/index.vue @@ -1,6 +1,7 @@ @@ -9,9 +10,13 @@ import { superAdmin } from '@/router'; import { getSkinCodeList } from '@/api/management/mapskin'; import { runPlanTemplateList, deleteRunPlanTemplate, generateCommonRunPlanEveryDay } from '@/api/runplan'; import { UrlConfig } from '@/router/index'; +import MapSelect from './mapSelect'; export default { name: 'RunPlanTemplate', + components: { + MapSelect + }, data() { return { skinCodeList: [], @@ -71,7 +76,7 @@ export default { }, { name: this.$t('publish.generateRunPlan'), - handleClick: this.handleGenerateEveryDay, + handleClick: this.handleMapSelect, type: '' }, { @@ -120,15 +125,20 @@ export default { }); }).catch(() => { }); }, + // 选择皮肤关联的地图 + handleMapSelect(index, row) { + this.$refs.map.doShow(row); + }, // 生成每日运行图 - handleGenerateEveryDay(index, row) { + handleGenerateEveryDay({planId, mapId}) { this.$confirm(this.$t('publish.wellGenerateEveryRunPlan'), this.$t('global.tips'), { confirmButtonText: this.$t('global.confirm'), cancelButtonText: this.$t('global.cancel'), type: 'warning' }).then(() => { - generateCommonRunPlanEveryDay(row.id).then(response => { + generateCommonRunPlanEveryDay(planId, {mapId}).then(response => { this.reloadTable(); + this.$refs.map.doClose(); this.$message.success(this.$t('publish.createCommonSuccess')); }).catch(() => { this.reloadTable(); diff --git a/src/views/publish/runPlanTemplate/mapSelect.vue b/src/views/publish/runPlanTemplate/mapSelect.vue new file mode 100644 index 000000000..af43ed409 --- /dev/null +++ b/src/views/publish/runPlanTemplate/mapSelect.vue @@ -0,0 +1,73 @@ + + +