运行图绘制代码调整

This commit is contained in:
joylink_cuiweidong 2021-01-25 17:05:05 +08:00
parent ec89eca2ad
commit 068c3331e4
2 changed files with 21 additions and 3 deletions

View File

@ -511,3 +511,12 @@ export function getRunLevelDetail(id) {
method: 'get' method: 'get'
}); });
} }
// 更新站间运行等级数据
export function updateRunlevelDistance(mapId) {
return request({
url: `/api/runPlan/userData/${mapId}/runlevelDistance`,
method: 'put'
});
}

View File

@ -71,8 +71,8 @@
</el-table-column> </el-table-column>
<el-table-column prop="distance" :label="$t('planMonitor.modifying.distance')" width="85"> <el-table-column prop="distance" :label="$t('planMonitor.modifying.distance')" width="85">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <span style="margin-left: 10px">{{ scope.row.distance }}</span> --> <span style="margin-left: 10px">{{ scope.row.distance }}</span>
<el-input v-model="scope.row.distance" class="input_text_box" /> <!-- <el-input v-model="scope.row.distance" class="input_text_box" /> -->
</template> </template>
</el-table-column> </el-table-column>
<div> <div>
@ -105,6 +105,7 @@
</el-table> </el-table>
</el-row> </el-row>
<div class="button-group" style="text-align: center; margin-top: 10px;"> <div class="button-group" style="text-align: center; margin-top: 10px;">
<el-button @click="handleStationDistance">更新距离</el-button>
<el-button @click="doClose">关闭</el-button> <el-button @click="doClose">关闭</el-button>
<el-button @click="handleStationTime">更新</el-button> <el-button @click="handleStationTime">更新</el-button>
</div> </div>
@ -112,7 +113,7 @@
</template> </template>
<script> <script>
import { formatName } from '@/utils/runPlan'; import { formatName } from '@/utils/runPlan';
import { setStationRunning, getMapStationRunUser } from '@/api/runplan'; import { setStationRunning, getMapStationRunUser, updateRunlevelDistance } from '@/api/runplan';
export default { export default {
name: 'ModifyingStationIntervalTime', name: 'ModifyingStationIntervalTime',
@ -189,6 +190,14 @@ export default {
this.$messageBox(this.$t('planMonitor.modifying.modifyFailed')); this.$messageBox(this.$t('planMonitor.modifying.modifyFailed'));
}); });
}, },
handleStationDistance() {
updateRunlevelDistance(this.$route.query.mapId).then(resp => {
this.loadInitData();
this.$message.success('更新成功');
}).catch(() => {
this.$messageBox('更新失败');
});
},
doShow(params) { doShow(params) {
this.params = params || {}; this.params = params || {};
this.loadInitData(); this.loadInitData();