修改运行图接口

This commit is contained in:
ival 2019-08-29 13:52:34 +08:00
parent 30e590afc7
commit 1616639f6f
20 changed files with 1702 additions and 1515 deletions

View File

@ -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) {

View File

@ -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'
});
}

View File

@ -1,9 +1,18 @@
<template>
<el-dialog class="fuzhou_01 stand-stop-time" :title="title" :visible.sync="show" width="320px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-form size="small" label-width="90px" :model="formModel" :rules="rules" ref="form">
<el-dialog
v-dialogDrag
class="fuzhou_01 stand-stop-time"
:title="title"
:visible.sync="show"
width="320px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-form ref="form" size="small" label-width="90px" :model="formModel" :rules="rules">
<el-form-item label="车 组 号:" prop="trainNumber">
<el-input :id="domIdTrainNumber" v-model="formModel.trainNumber" @change="trainNumberChange"></el-input>
<el-input :id="domIdTrainNumber" v-model="formModel.trainNumber" @change="trainNumberChange" />
</el-form-item>
</el-form>
<el-row justify="center" class="button-group">
@ -14,17 +23,17 @@
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<confirm-control ref="confirmControl"></confirm-control>
<notice-info ref="noticeInfo"></notice-info>
<confirm-control ref="confirmControl" />
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { getPublishMapTrainNos } from '@/api/runplan';
// import { getPublishMapTrainNos } from '@/api/runplan';
import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
name: 'TrainDelete',
@ -36,18 +45,18 @@
return {
trainNoList: [],
formModel: {
trainNumber: '',
trainNumber: ''
},
rules: {
trainNumber: [
{ required: true, message: '请输入车组号', trigger: 'blur' }
],
]
},
operation: null,
dialogShow: false,
loading: false,
}
loading: false
};
},
computed: {
...mapGetters('map', [
@ -66,22 +75,22 @@
return this.dialogShow ? OperationEvent.Train.delTrainId.trainNumberChange.domId : '';
},
title() {
return '删除列车识别号'
return '删除列车识别号';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
},
methods: {
loadInitData(map) {
if (map) {
getPublishMapTrainNos(map.skinCode).then(response => {
this.trainNoList = response.data;
}).catch(error => {
this.$messageBox(`获取列车车组号失败`);
});
// getPublishMapTrainNos(map.skinCode).then(response => {
// this.trainNoList = response.data;
// }).catch(() => {
// this.$messageBox(``);
// });
}
},
doShow(operate, selected) {
@ -101,27 +110,27 @@
this.$store.dispatch('map/setTrainWindowShow', false);
},
trainNumberChange() {
let operate = {
const operate = {
type: MapDeviceType.Train.type,
val: `${trainNumber}`,
val: `${this.formModel.trainNumber}`,
operation: OperationEvent.Train.delTrainId.trainNumberChange.operation
}
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
});
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
let operate = {
const operate = {
send: true,
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.delTrainId.menu.operation,
val: this.formModel.trainNumber
}
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -129,28 +138,28 @@
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
})
});
} else {
return false;
}
});
},
cancel() {
let operate = {
const operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}).catch(() => { this.doClose(); });
}
}
};
</script>

View File

@ -1,9 +1,18 @@
<template>
<el-dialog class="beijing-01__systerm stand-stop-time" :title="title" :visible.sync="show" width="320px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-form size="small" label-width="90px" :model="addModel" :rules="rules" ref="form">
<el-dialog
v-dialogDrag
class="beijing-01__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="320px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-form ref="form" size="small" label-width="90px" :model="addModel" :rules="rules">
<el-form-item label="车 组 号:" prop="groupNumber">
<el-input v-model="addModel.groupNumber" @change="inputGroupNumber" :id="domIdInput"></el-input>
<el-input :id="domIdInput" v-model="addModel.groupNumber" @change="inputGroupNumber" />
</el-form-item>
</el-form>
<el-row justify="center" class="button-group">
@ -14,18 +23,18 @@
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<confirm-control ref="confirmControl"></confirm-control>
<notice-info ref="noticeInfo"></notice-info>
<confirm-control ref="confirmControl" />
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { getPublishMapTrainNos } from '@/api/runplan';
// import { getPublishMapTrainNos } from '@/api/runplan';
import { mouseCancelState } from '../utils/menuItemStatus';
import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
name: 'TrainDelete',
@ -38,18 +47,18 @@
trainNoList: [],
selected: null,
addModel: {
groupNumber: '',
groupNumber: ''
},
rules: {
groupNumber: [
{ required: true, message: '请输入车组号', trigger: 'blur' }
],
]
},
operation: null,
dialogShow: false,
loading: false,
}
loading: false
};
},
computed: {
...mapGetters('map', [
@ -68,22 +77,22 @@
return this.dialogShow ? OperationEvent.Train.delTrainId.menu.domId : '';
},
title() {
return '删除车组号'
return '删除车组号';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
},
methods: {
loadInitData(map) {
if (map) {
getPublishMapTrainNos(map.skinCode).then(response => {
this.trainNoList = response.data;
}).catch(error => {
this.$messageBox(`获取列车车组号失败`);
});
// getPublishMapTrainNos(map.skinCode).then(response => {
// this.trainNoList = response.data;
// }).catch(() => {
// this.$messageBox(``);
// });
}
},
doShow(operate, selected) {
@ -105,27 +114,27 @@
mouseCancelState(this.selected);
},
inputGroupNumber() {
let operate = {
const operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.delTrainId.input.operation,
val: this.addModel.groupNumber
}
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
});
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
let operate = {
const operate = {
send: true,
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.delTrainId.menu.operation,
val: this.addModel.groupNumber
}
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -133,28 +142,28 @@
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
})
});
} else {
return false;
}
});
},
cancel() {
let operate = {
const operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}).catch(() => { this.doClose(); });
}
}
};
</script>

View File

@ -18,9 +18,9 @@
</template>
<script>
import { runPlanTemplateList, generateUserRunPlanEveryDay } from '@/api/runplan';
import { runPlanTemplateList } from '@/api/runplan';
import { getStationListBySkinCode } from '@/api/runplan';
import { getEveryDayRunPlanData } from '@/api/simulation';
import { getEveryDayRunPlanData, generateDayRunPlan } from '@/api/simulation';
import { getSkinCodeList } from '@/api/management/mapskin';
export default {
@ -100,7 +100,7 @@ export default {
const choose = this.$refs.pageRules.currentChoose();
if (choose && choose.id) {
this.loading = true;
generateUserRunPlanEveryDay(choose.id, this.$route.query.group).then(response => {
generateDayRunPlan(choose.id, this.$route.query.group).then(response => {
this.loading = false;
this.reloadTable();
this.loadRunData();

View File

@ -1,12 +1,21 @@
<template>
<el-dialog class="beijing-01__schedule create-week-plan" :title="title" :visible.sync="dialogShow" width="800px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-dialog
v-dialogDrag
class="beijing-01__schedule create-week-plan"
:title="title"
:visible.sync="dialogShow"
width="800px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row>
<el-form ref="form" :model="model" :rules="rules" label-width="140px" size="small">
<el-form-item label="运行图名称:" prop="planId">
<el-row>
<el-col :span="19">
<el-input v-model="model.planName" :readonly="true"></el-input>
<el-input v-model="model.planName" :readonly="true" />
</el-col>
<el-col :span="4" :offset="1">
<el-button @click="handleChoose">选择 </el-button>
@ -15,9 +24,13 @@
</el-form-item>
<el-form-item label="计划日期范围:" prop="dateList">
<el-row>
<el-date-picker type="dates" v-model="model.dateList" :clearable="false" placeholder="选择一个或多个日期"
value-format="yyyy-MM-dd">
</el-date-picker>
<el-date-picker
v-model="model.dateList"
type="dates"
:clearable="false"
placeholder="选择一个或多个日期"
value-format="yyyy-MM-dd"
/>
</el-row>
</el-form-item>
</el-form>
@ -26,7 +39,7 @@
<el-button @click="create"> </el-button>
<el-button @click="doClose"> </el-button>
</el-row>
<choose-template-plan ref="choose" @chooseConfirm="chooseConfirm"></choose-template-plan>
<choose-template-plan ref="choose" @chooseConfirm="chooseConfirm" />
</el-dialog>
</template>
@ -46,23 +59,23 @@
model: {
planId: '',
planName: '',
dateList: [],
}
dateList: []
}
};
},
computed: {
title() {
return '创建一周计划'
return '创建一周计划';
},
rules() {
let rules = {
const rules = {
planId: [
{ required: true, message: '请选择模板运行图', trigger: 'blur' }
],
dateList: [
{ required: true, message: '请选择计划日期范围', trigger: 'change' }
]
}
};
return rules;
}
@ -87,13 +100,11 @@
}
},
buildModel() {
return this.model.dateList.map(date => {
return {
loadTime: date,
planDateList: this.model.dateList,
mapId: this.$route.query.mapId,
templatePlanId: this.model.planId
}
});
};
},
create() {
this.$refs['form'].validate((valid) => {
@ -102,15 +113,15 @@
this.$message.success('创建运行图计划成功');
this.$emit('reloadTable', { name: 'managePlanList' });
this.doClose();
}).catch(error => {
}).catch(() => {
this.doClose();
this.$messageBox('创建运行图计划失败');
})
});
}
});
}
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";

View File

@ -1,8 +1,16 @@
<template>
<el-dialog class="beijing-01__schedule manage-plan-list" :title="title" :visible.sync="dialogShow" width="80%"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList">
</QueryListPage>
<el-dialog
v-dialogDrag
class="beijing-01__schedule manage-plan-list"
:title="title"
:visible.sync="dialogShow"
width="80%"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
</el-dialog>
</template>
@ -40,7 +48,7 @@
},
{
title: '运行图名称',
prop: 'runPlanName',
prop: 'runPlanName'
},
{
title: '加载日期',
@ -60,16 +68,16 @@
}
],
actions: [
{ text: '创建', btnCode: 'employee_insert', handler: this.handleCreateRunPlan },
{ text: '创建', btnCode: 'employee_insert', handler: this.handleCreateRunPlan }
]
},
currentModel: {}
}
};
},
computed: {
title() {
return '运行图计划表'
return '运行图计划表';
}
},
created() {
@ -93,13 +101,13 @@
type: 'warning'
}).then(() => {
deleteRunPlanLoad(row.id).then(response => {
this.$message.success('删除成功')
this.reloadTable()
}).catch(error => {
this.reloadTable()
this.$messageBox('删除失败')
})
}).catch(() => { })
this.$message.success('删除成功');
this.reloadTable();
}).catch(() => {
this.reloadTable();
this.$messageBox('删除失败');
});
}).catch(() => { });
},
handleCreateRunPlan() {
this.$emit('dispatchDialog', { name: 'createWeekPlan' });
@ -112,10 +120,10 @@
this.dialogShow = false;
},
reloadTable() {
this.queryList.reload()
}
this.queryList.reload();
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";

View File

@ -1,9 +1,18 @@
<template>
<el-dialog class="chengdou-03__systerm stand-stop-time" :title="title" :visible.sync="show" width="320px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-form size="small" label-width="90px" :model="addModel" :rules="rules" ref="form">
<el-dialog
v-dialogDrag
class="chengdou-03__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="320px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-form ref="form" size="small" label-width="90px" :model="addModel" :rules="rules">
<el-form-item label="车 组 号:" prop="groupNumber">
<el-input v-model="addModel.groupNumber"></el-input>
<el-input v-model="addModel.groupNumber" />
</el-form-item>
</el-form>
<el-row justify="center" class="button-group">
@ -14,18 +23,18 @@
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<confirm-control ref="confirmControl"></confirm-control>
<notice-info ref="noticeInfo"></notice-info>
<confirm-control ref="confirmControl" />
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { getPublishMapTrainNos } from '@/api/runplan';
// import { getPublishMapTrainNos } from '@/api/runplan';
import { mouseCancelState } from '../utils/menuItemStatus';
import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
name: 'TrainDelete',
@ -38,18 +47,18 @@
trainNoList: [],
selected: null,
addModel: {
groupNumber: '',
groupNumber: ''
},
rules: {
groupNumber: [
{ required: true, message: '请输入车组号', trigger: 'blur' }
],
]
},
operation: null,
dialogShow: false,
loading: false,
}
loading: false
};
},
computed: {
...mapGetters('map', [
@ -65,22 +74,22 @@
return this.dialogShow ? OperationEvent.Train.delTrainId.menu.domId : '';
},
title() {
return '删除列车识别号'
return '删除列车识别号';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
},
methods: {
loadInitData(map) {
if (map) {
getPublishMapTrainNos(map.skinCode).then(response => {
this.trainNoList = response.data;
}).catch(error => {
this.$messageBox(`获取列车车组号失败`);
});
// getPublishMapTrainNos(map.skinCode).then(response => {
// this.trainNoList = response.data;
// }).catch(() => {
// this.$messageBox(``);
// });
}
},
doShow(operate, selected) {
@ -104,11 +113,11 @@
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
let operate = {
const operate = {
send: true,
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.delTrainId.menu.operation,
}
operation: OperationEvent.Train.delTrainId.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -116,28 +125,28 @@
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
})
});
} else {
return false;
}
});
},
cancel() {
let operate = {
const operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}).catch(() => { this.doClose(); });
}
}
};
</script>

View File

@ -18,10 +18,9 @@
</template>
<script>
// import { listPublishMap } from '@/api/jmap/mapdraft';
import { runPlanTemplateList, generateUserRunPlanEveryDay } from '@/api/runplan';
import { runPlanTemplateList } from '@/api/runplan';
import { getStationListBySkinCode } from '@/api/runplan';
import { getEveryDayRunPlanData } from '@/api/simulation';
import { getEveryDayRunPlanData, generateDayRunPlan } from '@/api/simulation';
import { getSkinCodeList } from '@/api/management/mapskin';
export default {
@ -101,7 +100,7 @@ export default {
const choose = this.$refs.pageRules.currentChoose();
if (choose && choose.id) {
this.loading = true;
generateUserRunPlanEveryDay(choose.id, this.$route.query.group).then(response => {
generateDayRunPlan(choose.id, this.$route.query.group).then(response => {
this.loading = false;
this.reloadTable();
this.loadRunData();

View File

@ -1,12 +1,21 @@
<template>
<el-dialog class="beijing-01__schedule create-week-plan" :title="title" :visible.sync="dialogShow" width="800px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-dialog
v-dialogDrag
class="beijing-01__schedule create-week-plan"
:title="title"
:visible.sync="dialogShow"
width="800px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row>
<el-form ref="form" :model="model" :rules="rules" label-width="140px" size="small">
<el-form-item label="运行图名称:" prop="planId">
<el-row>
<el-col :span="19">
<el-input v-model="model.planName" :readonly="true"></el-input>
<el-input v-model="model.planName" :readonly="true" />
</el-col>
<el-col :span="4" :offset="1">
<el-button @click="handleChoose">选择 </el-button>
@ -15,9 +24,13 @@
</el-form-item>
<el-form-item label="计划日期范围:" prop="dateList">
<el-row>
<el-date-picker type="dates" v-model="model.dateList" :clearable="false" placeholder="选择一个或多个日期"
value-format="yyyy-MM-dd">
</el-date-picker>
<el-date-picker
v-model="model.dateList"
type="dates"
:clearable="false"
placeholder="选择一个或多个日期"
value-format="yyyy-MM-dd"
/>
</el-row>
</el-form-item>
</el-form>
@ -26,7 +39,7 @@
<el-button @click="create"> </el-button>
<el-button @click="doClose"> </el-button>
</el-row>
<choose-template-plan ref="choose" @chooseConfirm="chooseConfirm"></choose-template-plan>
<choose-template-plan ref="choose" @chooseConfirm="chooseConfirm" />
</el-dialog>
</template>
@ -46,23 +59,23 @@
model: {
planId: '',
planName: '',
dateList: [],
}
dateList: []
}
};
},
computed: {
title() {
return '创建一周计划'
return '创建一周计划';
},
rules() {
let rules = {
const rules = {
planId: [
{ required: true, message: '请选择模板运行图', trigger: 'blur' }
],
dateList: [
{ required: true, message: '请选择计划日期范围', trigger: 'change' }
]
}
};
return rules;
}
@ -87,13 +100,11 @@
}
},
buildModel() {
return this.model.dateList.map(date => {
return {
loadTime: date,
planDateList: this.model.dateList,
mapId: this.$route.query.mapId,
templatePlanId: this.model.planId
}
});
};
},
create() {
this.$refs['form'].validate((valid) => {
@ -102,15 +113,15 @@
this.$message.success('创建运行图计划成功');
this.$emit('reloadTable', { name: 'managePlanList' });
this.doClose();
}).catch(error => {
}).catch(() => {
this.doClose();
this.$messageBox('创建运行图计划失败');
})
});
}
});
}
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";

View File

@ -1,8 +1,16 @@
<template>
<el-dialog class="beijing-01__schedule manage-plan-list" :title="title" :visible.sync="dialogShow" width="80%"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList">
</QueryListPage>
<el-dialog
v-dialogDrag
class="beijing-01__schedule manage-plan-list"
:title="title"
:visible.sync="dialogShow"
width="80%"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
</el-dialog>
</template>
@ -40,7 +48,7 @@
},
{
title: '运行图名称',
prop: 'runPlanName',
prop: 'runPlanName'
},
{
title: '加载日期',
@ -60,16 +68,16 @@
}
],
actions: [
{ text: '创建', btnCode: 'employee_insert', handler: this.handleCreateRunPlan },
{ text: '创建', btnCode: 'employee_insert', handler: this.handleCreateRunPlan }
]
},
currentModel: {}
}
};
},
computed: {
title() {
return '运行图计划表'
return '运行图计划表';
}
},
created() {
@ -93,13 +101,13 @@
type: 'warning'
}).then(() => {
deleteRunPlanLoad(row.id).then(response => {
this.$message.success('删除成功')
this.reloadTable()
}).catch(error => {
this.reloadTable()
this.$messageBox('删除失败')
})
}).catch(() => { })
this.$message.success('删除成功');
this.reloadTable();
}).catch(() => {
this.reloadTable();
this.$messageBox('删除失败');
});
}).catch(() => { });
},
handleCreateRunPlan() {
this.$emit('dispatchDialog', { name: 'createWeekPlan' });
@ -112,10 +120,10 @@
this.dialogShow = false;
},
reloadTable() {
this.queryList.reload()
}
this.queryList.reload();
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";

View File

@ -1,20 +1,27 @@
<template>
<el-dialog :title="title" class="beijing-01__schedule reload-today-plan" :visible.sync="dialogShow" width="80%"
:before-close="doClose" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<QueryListPage ref="pageRules" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList">
</QueryListPage>
<el-dialog
v-dialogDrag
:title="title"
class="beijing-01__schedule reload-today-plan"
:visible.sync="dialogShow"
width="80%"
:before-close="doClose"
:modal="false"
:close-on-click-modal="false"
>
<QueryListPage ref="pageRules" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
<el-row type="flex" justify="center" class="button-group">
<el-button type="primary" @click="handleConfirm" :loading="loading"> </el-button>
<el-button type="primary" :loading="loading" @click="handleConfirm"> </el-button>
<el-button @click="dialogShow = false"> </el-button>
</el-row>
</el-dialog>
</template>
<script>
import { runPlanTemplateList, generateUserRunPlanEveryDay } from '@/api/runplan';
import { runPlanTemplateList } from '@/api/runplan';
import { getStationListBySkinCode } from '@/api/runplan';
import { getEveryDayRunPlanData } from '@/api/simulation';
import { getSkinCodeList } from '@/api/management/mapskin'
import { getEveryDayRunPlanData, generateDayRunPlan } from '@/api/simulation';
import { getSkinCodeList } from '@/api/management/mapskin';
export default {
name: 'ReloadTodayPlan',
@ -51,19 +58,19 @@
prop: 'skinCode',
type: 'tag',
columnValue: (row) => {
return this.$convertField(row.skinCode, this.skinCodeList, ['code', 'name'])
return this.$convertField(row.skinCode, this.skinCodeList, ['code', 'name']);
},
tagType: (row) => { return 'success' }
tagType: (row) => { return 'success'; }
}
]
},
currentModel: {}
}
};
},
computed: {
title() {
return '加载当天计划'
return '加载当天计划';
}
},
methods: {
@ -71,7 +78,7 @@
this.skinCodeList = [];
getSkinCodeList().then(response => {
this.skinCodeList = response.data;
})
});
},
doShow() {
this.loading = false;
@ -93,47 +100,47 @@
const choose = this.$refs.pageRules.currentChoose();
if (choose && choose.id) {
this.loading = true;
generateUserRunPlanEveryDay(choose.id, this.$route.query.group).then(response => {
generateDayRunPlan(choose.id, this.$route.query.group).then(response => {
this.loading = false;
this.reloadTable()
this.reloadTable();
this.loadRunData();
this.doClose();
this.$message.success(`生成用户每日运行图成功`);
}).catch(error => {
}).catch(() => {
this.loading = false;
this.reloadTable()
this.reloadTable();
this.$messageBox(`生成用户每日运行图失败`);
})
});
} else {
this.$messageBox(`请选择需要加载的运行图`);
}
}
},
loadRunData() {
let skinCode = this.$route.query.skinCode;
const skinCode = this.$route.query.skinCode;
this.$store.dispatch('runPlan/clear');
if (skinCode) {
getStationListBySkinCode(skinCode).then(response => {
let stations = response.data;
const stations = response.data;
this.PlanConvert = this.$theme.loadPlanConvert(skinCode);
this.$store.dispatch('runPlan/setStations', stations).then(() => {
getEveryDayRunPlanData(this.$route.query.group).then(resp => {
this.$store.dispatch('runPlan/setPlanData', resp.data);
}).catch(error => {
}).catch(() => {
this.$store.dispatch('runPlan/setPlanData', []);
this.$messageBox(`获取运行图数据失败`);
})
})
}).catch(error => {
});
});
}).catch(() => {
this.$messageBox(`获取车站列表失败`);
});
}
},
reloadTable() {
this.queryList.reload()
}
this.queryList.reload();
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";

View File

@ -1,12 +1,21 @@
<template>
<el-dialog class="beijing-01__schedule create-week-plan" :title="title" :visible.sync="dialogShow" width="800px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-dialog
v-dialogDrag
class="beijing-01__schedule create-week-plan"
:title="title"
:visible.sync="dialogShow"
width="800px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row>
<el-form ref="form" :model="model" :rules="rules" label-width="140px" size="small">
<el-form-item label="运行图名称:" prop="planId">
<el-row>
<el-col :span="19">
<el-input v-model="model.planName" :readonly="true"></el-input>
<el-input v-model="model.planName" :readonly="true" />
</el-col>
<el-col :span="4" :offset="1">
<el-button @click="handleChoose">选择 </el-button>
@ -15,9 +24,13 @@
</el-form-item>
<el-form-item label="计划日期范围:" prop="dateList">
<el-row>
<el-date-picker type="dates" v-model="model.dateList" :clearable="false" placeholder="选择一个或多个日期"
value-format="yyyy-MM-dd">
</el-date-picker>
<el-date-picker
v-model="model.dateList"
type="dates"
:clearable="false"
placeholder="选择一个或多个日期"
value-format="yyyy-MM-dd"
/>
</el-row>
</el-form-item>
</el-form>
@ -26,7 +39,7 @@
<el-button @click="create"> </el-button>
<el-button @click="doClose"> </el-button>
</el-row>
<choose-template-plan ref="choose" @chooseConfirm="chooseConfirm"></choose-template-plan>
<choose-template-plan ref="choose" @chooseConfirm="chooseConfirm" />
</el-dialog>
</template>
@ -46,23 +59,23 @@
model: {
planId: '',
planName: '',
dateList: [],
}
dateList: []
}
};
},
computed: {
title() {
return '创建一周计划'
return '创建一周计划';
},
rules() {
let rules = {
const rules = {
planId: [
{ required: true, message: '请选择模板运行图', trigger: 'blur' }
],
dateList: [
{ required: true, message: '请选择计划日期范围', trigger: 'change' }
]
}
};
return rules;
}
@ -87,13 +100,11 @@
}
},
buildModel() {
return this.model.dateList.map(date => {
return {
loadTime: date,
planDateList: this.model.dateList,
mapId: this.$route.query.mapId,
templatePlanId: this.model.planId
}
});
};
},
create() {
this.$refs['form'].validate((valid) => {
@ -102,15 +113,15 @@
this.$message.success('创建运行图计划成功');
this.$emit('reloadTable', { name: 'managePlanList' });
this.doClose();
}).catch(error => {
}).catch(() => {
this.doClose();
this.$messageBox('创建运行图计划失败');
})
});
}
});
}
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";

View File

@ -1,9 +1,18 @@
<template>
<el-dialog class="fuzhou-01__systerm stand-stop-time" :title="title" :visible.sync="show" width="320px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-form size="small" label-width="90px" :model="formModel" :rules="rules" ref="form">
<el-dialog
v-dialogDrag
class="fuzhou-01__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="320px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-form ref="form" size="small" label-width="90px" :model="formModel" :rules="rules">
<el-form-item label="车 组 号:" prop="groupNumber">
<el-input :id="domIdTrainNumber" v-model="formModel.groupNumber" @change="trainNumberChange"></el-input>
<el-input :id="domIdTrainNumber" v-model="formModel.groupNumber" @change="trainNumberChange" />
</el-form-item>
</el-form>
<el-row justify="center" class="button-group">
@ -14,17 +23,17 @@
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<confirm-control ref="confirmControl"></confirm-control>
<notice-info ref="noticeInfo"></notice-info>
<confirm-control ref="confirmControl" />
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { getPublishMapTrainNos } from '@/api/runplan';
// import { getPublishMapTrainNos } from '@/api/runplan';
import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
name: 'TrainDelete',
@ -36,18 +45,18 @@
return {
trainNoList: [],
formModel: {
groupNumber: '',
groupNumber: ''
},
rules: {
groupNumber: [
{ required: true, message: '请输入车组号', trigger: 'blur' }
],
]
},
operation: null,
dialogShow: false,
loading: false,
}
loading: false
};
},
computed: {
...mapGetters('map', [
@ -66,22 +75,22 @@
return this.dialogShow ? OperationEvent.Train.delTrainId.trainNumberChange.domId : '';
},
title() {
return '删除列车识别号'
return '删除列车识别号';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
},
methods: {
loadInitData(map) {
if (map) {
getPublishMapTrainNos(map.skinCode).then(response => {
this.trainNoList = response.data;
}).catch(error => {
this.$messageBox(`获取列车车组号失败`);
});
// getPublishMapTrainNos(map.skinCode).then(response => {
// this.trainNoList = response.data;
// }).catch(() => {
// this.$messageBox(``);
// });
}
},
doShow(operate, selected) {
@ -101,27 +110,27 @@
this.$store.dispatch('map/setTrainWindowShow', false);
},
trainNumberChange() {
let operate = {
const operate = {
type: MapDeviceType.Train.type,
val: `${groupNumber}`,
val: `${this.formModel.groupNumber}`,
operation: OperationEvent.Train.delTrainId.trainNumberChange.operation
}
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
});
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
let operate = {
const operate = {
send: true,
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.delTrainId.menu.operation,
val: this.formModel.groupNumber
}
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -129,28 +138,28 @@
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
})
});
} else {
return false;
}
});
},
cancel() {
let operate = {
const operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}).catch(() => { this.doClose(); });
}
}
};
</script>

View File

@ -18,9 +18,9 @@
</template>
<script>
import { runPlanTemplateList, generateUserRunPlanEveryDay } from '@/api/runplan';
import { runPlanTemplateList } from '@/api/runplan';
import { getStationListBySkinCode } from '@/api/runplan';
import { getEveryDayRunPlanData } from '@/api/simulation';
import { getEveryDayRunPlanData, generateDayRunPlan } from '@/api/simulation';
import { getSkinCodeList } from '@/api/management/mapskin';
export default {
@ -100,7 +100,7 @@ export default {
const choose = this.$refs.pageRules.currentChoose();
if (choose && choose.id) {
this.loading = true;
generateUserRunPlanEveryDay(choose.id, this.$route.query.group).then(response => {
generateDayRunPlan(choose.id, this.$route.query.group).then(response => {
this.loading = false;
this.reloadTable();
this.loadRunData();

View File

@ -1,12 +1,21 @@
<template>
<el-dialog class="fuzhou-01__schedule create-week-plan" :title="title" :visible.sync="dialogShow" width="800px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-dialog
v-dialogDrag
class="fuzhou-01__schedule create-week-plan"
:title="title"
:visible.sync="dialogShow"
width="800px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row>
<el-form ref="form" :model="model" :rules="rules" label-width="140px" size="small">
<el-form-item label="运行图名称:" prop="planId">
<el-row>
<el-col :span="19">
<el-input v-model="model.planName" :readonly="true"></el-input>
<el-input v-model="model.planName" :readonly="true" />
</el-col>
<el-col :span="4" :offset="1">
<el-button @click="handleChoose">选择 </el-button>
@ -15,9 +24,13 @@
</el-form-item>
<el-form-item label="计划日期范围:" prop="dateList">
<el-row>
<el-date-picker type="dates" v-model="model.dateList" :clearable="false" placeholder="选择一个或多个日期"
value-format="yyyy-MM-dd">
</el-date-picker>
<el-date-picker
v-model="model.dateList"
type="dates"
:clearable="false"
placeholder="选择一个或多个日期"
value-format="yyyy-MM-dd"
/>
</el-row>
</el-form-item>
</el-form>
@ -26,7 +39,7 @@
<el-button @click="create"> </el-button>
<el-button @click="doClose"> </el-button>
</el-row>
<choose-template-plan ref="choose" @chooseConfirm="chooseConfirm"></choose-template-plan>
<choose-template-plan ref="choose" @chooseConfirm="chooseConfirm" />
</el-dialog>
</template>
@ -46,23 +59,23 @@
model: {
planId: '',
planName: '',
dateList: [],
}
dateList: []
}
};
},
computed: {
title() {
return '创建一周计划'
return '创建一周计划';
},
rules() {
let rules = {
const rules = {
planId: [
{ required: true, message: '请选择模板运行图', trigger: 'blur' }
],
dateList: [
{ required: true, message: '请选择计划日期范围', trigger: 'change' }
]
}
};
return rules;
}
@ -87,13 +100,11 @@
}
},
buildModel() {
return this.model.dateList.map(date => {
return {
loadTime: date,
planDateList: this.model.dateList,
mapId: this.$route.query.mapId,
templatePlanId: this.model.planId
}
});
};
},
create() {
this.$refs['form'].validate((valid) => {
@ -102,15 +113,15 @@
this.$message.success('创建运行图计划成功');
this.$emit('reloadTable', { name: 'managePlanList' });
this.doClose();
}).catch(error => {
}).catch(() => {
this.doClose();
this.$messageBox('创建运行图计划失败');
})
});
}
});
}
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";

View File

@ -1,8 +1,16 @@
<template>
<el-dialog class="fuzhou-01__schedule manage-plan-list" :title="title" :visible.sync="dialogShow" width="80%"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList">
</QueryListPage>
<el-dialog
v-dialogDrag
class="fuzhou-01__schedule manage-plan-list"
:title="title"
:visible.sync="dialogShow"
width="80%"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
</el-dialog>
</template>
@ -40,7 +48,7 @@
},
{
title: '运行图名称',
prop: 'runPlanName',
prop: 'runPlanName'
},
{
title: '加载日期',
@ -60,16 +68,16 @@
}
],
actions: [
{ text: '创建', btnCode: 'employee_insert', handler: this.handleCreateRunPlan },
{ text: '创建', btnCode: 'employee_insert', handler: this.handleCreateRunPlan }
]
},
currentModel: {}
}
};
},
computed: {
title() {
return '运行图计划表'
return '运行图计划表';
}
},
created() {
@ -93,13 +101,13 @@
type: 'warning'
}).then(() => {
deleteRunPlanLoad(row.id).then(response => {
this.$message.success('删除成功')
this.reloadTable()
}).catch(error => {
this.reloadTable()
this.$messageBox('删除失败')
})
}).catch(() => { })
this.$message.success('删除成功');
this.reloadTable();
}).catch(() => {
this.reloadTable();
this.$messageBox('删除失败');
});
}).catch(() => { });
},
handleCreateRunPlan() {
this.$emit('dispatchDialog', { name: 'createWeekPlan' });
@ -112,10 +120,10 @@
this.dialogShow = false;
},
reloadTable() {
this.queryList.reload()
}
this.queryList.reload();
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";

View File

@ -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;

View File

@ -1,6 +1,7 @@
<template>
<div>
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
<map-select ref="map" @confirm="handleGenerateEveryDay" />
</div>
</template>
@ -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();

View File

@ -0,0 +1,73 @@
<template>
<el-dialog
:title="title"
:visible.sync="show"
width="30%"
:before-close="doClose"
>
<el-form ref="form" :model="formMdoel" :rules="rules" label-width="80px">
<el-form-item :label="$t('publish.selectMap')" prop="mapId">
<el-select v-model="formMdoel.mapId" :placeholder="$t('rules.mapInput')">
<el-option
v-for="item in mapList"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
<el-button type="primary" @click="handleCofirm">{{ $t('global.confirm') }}</el-button>
</span>
</el-dialog>
</template>
<script>
import { getPublishMapListBySkinCode } from '@/api/jmap/map';
export default {
data() {
return {
show: false,
mapList: [],
formMdoel: {
planId: 0,
mapId: ''
}
};
},
computed: {
title() {
return this.$t('publish.selectMap');
},
rules() {
return {
mapId: [
{ required: true, message: this.$t('rules.mapInput'), trigger: 'blur' }
]
};
}
},
methods: {
doShow(row) {
this.formMdoel.planId = row.id;
this.show = true;
getPublishMapListBySkinCode(row.skinCode).then(resp => {
this.mapList = resp.data;
});
},
doClose(done) {
this.show = false;
},
handleCofirm() {
this.$refs['form'].validate((valid) => {
if (valid) {
this.$emit('confirm', this.formMdoel);
}
});
}
}
};
</script>