设置返回点
This commit is contained in:
@@ -49,4 +49,8 @@ export const synchronizedMap = () => post('mapInfo/synchronizedMap', {})
|
||||
// 错误
|
||||
export const queryErrorDataByCode = (code) => post('anomalyInfo/queryErrorDataByCode?code=' + code, {})
|
||||
// 叉间状态
|
||||
export const backIoStatus = (type) => post('vehicle/setForkLegsObstacles?backIoStatus=' + type, {})
|
||||
export const backIoStatus = (type) => post('vehicle/setForkLegsObstacles?backIoStatus=' + type, {})
|
||||
// 获取当前配置的休息点
|
||||
export const getReturnStation = () => get('station/getReturnStation', {})
|
||||
// 配置车辆返回点
|
||||
export const updateReturnStation = (id) => post('station/updateReturnStation?station_id=' + id, {})
|
||||
@@ -3,20 +3,20 @@ export const queryStation = () => {
|
||||
let res = {
|
||||
message: 'ok',
|
||||
data: [
|
||||
{station_code: 'B1', station_name: 'Starting position on the first floor Starting position on the first floor', x: '10', Y: '10', angle: '90'},
|
||||
{station_code: 'B2', station_name: '一楼起点位置一楼起点位置一楼起点位置', x: '10', Y: '10', angle: '90'},
|
||||
{station_code: 'B3', station_name: 'B3', x: '10', Y: '10', angle: '90'},
|
||||
{station_code: 'B4', station_name: 'B4', x: '10', Y: '10', angle: '90'},
|
||||
{station_code: 'B5', station_name: 'B5', x: '10', Y: '10', angle: '90'},
|
||||
{station_code: 'B6', station_name: 'B6', x: '10', Y: '10', angle: '90'},
|
||||
{station_code: 'B7', station_name: 'B7', x: '10', Y: '10', angle: '90'},
|
||||
{station_code: 'B8', station_name: 'B8', x: '10', Y: '10', angle: '90'},
|
||||
{station_code: 'B9', station_name: 'B9', x: '10', Y: '10', angle: '90'},
|
||||
{station_code: 'B10', station_name: 'B10', x: '10', Y: '10', angle: '90'},
|
||||
{station_code: 'B11', station_name: 'B11', x: '10', Y: '10', angle: '90'},
|
||||
{station_code: 'B12', station_name: 'B12', x: '10', Y: '10', angle: '90'},
|
||||
{station_code: 'B13', station_name: 'B13', x: '10', Y: '10', angle: '90'},
|
||||
{station_code: 'B14', station_name: 'B14', x: '10', Y: '10', angle: '90'}
|
||||
{station_id: 'B1', station_code: 'B1', station_name: 'Starting position on the first floor Starting position on the first floor', x: '10', Y: '10', angle: '90'},
|
||||
{station_id: 'B2', station_code: 'B2', station_name: '一楼起点位置一楼起点位置一楼起点位置', x: '10', Y: '10', angle: '90'},
|
||||
{station_id: 'B3', station_code: 'B3', station_name: 'B3', x: '10', Y: '10', angle: '90'},
|
||||
{station_id: 'B4', station_code: 'B4', station_name: 'B4', x: '10', Y: '10', angle: '90'},
|
||||
{station_id: 'B5', station_code: 'B5', station_name: 'B5', x: '10', Y: '10', angle: '90'},
|
||||
{station_id: 'B6', station_code: 'B6', station_name: 'B6', x: '10', Y: '10', angle: '90'},
|
||||
{station_id: 'B7', station_code: 'B7', station_name: 'B7', x: '10', Y: '10', angle: '90'},
|
||||
{station_id: 'B8', station_code: 'B8', station_name: 'B8', x: '10', Y: '10', angle: '90'},
|
||||
{station_id: 'B9', station_code: 'B9', station_name: 'B9', x: '10', Y: '10', angle: '90'},
|
||||
{station_id: 'B10', station_code: 'B10', station_name: 'B10', x: '10', Y: '10', angle: '90'},
|
||||
{station_id: 'B11', station_code: 'B11', station_name: 'B11', x: '10', Y: '10', angle: '90'},
|
||||
{station_id: 'B12', station_code: 'B12', station_name: 'B12', x: '10', Y: '10', angle: '90'},
|
||||
{station_id: 'B13', station_code: 'B13', station_name: 'B13', x: '10', Y: '10', angle: '90'},
|
||||
{station_id: 'B14', station_code: 'B14', station_name: 'B14', x: '10', Y: '10', angle: '90'}
|
||||
]
|
||||
}
|
||||
return res
|
||||
@@ -199,4 +199,8 @@ export const setStation = (sn, code) => {
|
||||
message: 'ok'
|
||||
}
|
||||
return res
|
||||
}
|
||||
export const getReturnStation = () => {
|
||||
let res = {station_id: 'B1',station_code:"111",station_name:"1111"}
|
||||
return res
|
||||
}
|
||||
@@ -119,5 +119,6 @@ module.exports = {
|
||||
no: 'No',
|
||||
Dispatchnotconnected: 'Dispatch is not connected',
|
||||
Vehiclenotconnected: 'Vehicle body is not connected',
|
||||
Dispatchvehiclenotconnected: 'Dispatch and the vehicle body are not connected.'
|
||||
Dispatchvehiclenotconnected: 'Dispatch and the vehicle body are not connected.',
|
||||
Vehiclereturnpoint: 'Vehicle return point'
|
||||
}
|
||||
|
||||
@@ -119,5 +119,6 @@ module.exports = {
|
||||
no: '否',
|
||||
Dispatchnotconnected: '调度未连接',
|
||||
Vehiclenotconnected: '车辆本体未连接',
|
||||
Dispatchvehiclenotconnected: '调度和车辆本体未连接'
|
||||
Dispatchvehiclenotconnected: '调度和车辆本体未连接',
|
||||
Vehiclereturnpoint: '车辆返回点'
|
||||
}
|
||||
|
||||
@@ -57,6 +57,22 @@
|
||||
<input type="checkbox" @click="_backIoStatus">
|
||||
</div>
|
||||
</el-row>
|
||||
<div class="contorl_title">{{$t('Vehiclereturnpoint')}}</div>
|
||||
<el-row type="flex" align="middle" class="contorl_box">
|
||||
<el-col :span="14">
|
||||
<el-select v-model="returnPoint" :placeholder="$t('Pleaseselect')" clearable style="width: 100%;">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.station_id"
|
||||
:label="item.station_name"
|
||||
:value="item.station_id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-button type="primary" size="mini" style="height: .4rem; margin-left: 0.2rem" @click="_updateReturnStation">{{$t('Save')}}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
@@ -64,7 +80,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { rebootVehicle, synchronizedMap, backIoStatus } from '../../config/getData.js'
|
||||
import { rebootVehicle, synchronizedMap, backIoStatus, updateReturnStation, queryStation, getReturnStation } from '../../config/getData.js'
|
||||
import { mapGetters, mapActions } from 'vuex'
|
||||
export default {
|
||||
data () {
|
||||
@@ -89,7 +105,9 @@ export default {
|
||||
{label: '中文', value: 'zh-cn'},
|
||||
{label: 'English', value: 'en-us'}
|
||||
// {label: 'Español', value: 'es'}
|
||||
]
|
||||
],
|
||||
returnPoint: '',
|
||||
options: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -113,6 +131,7 @@ export default {
|
||||
this.dataForm.serverIp = this.serverUrl
|
||||
this.activeName = 'first'
|
||||
this.dialogVisible = true
|
||||
this._queryStation()
|
||||
},
|
||||
exitUser () {
|
||||
this.dialogVisible = false
|
||||
@@ -214,6 +233,44 @@ export default {
|
||||
this.loading.close()
|
||||
}
|
||||
},
|
||||
async _queryStation () {
|
||||
try {
|
||||
let res = await queryStation()
|
||||
if (res && res.data) {
|
||||
this.options = [...res.data]
|
||||
this._getReturnStation()
|
||||
}
|
||||
} catch (e) {
|
||||
this.options = []
|
||||
}
|
||||
},
|
||||
async _getReturnStation () {
|
||||
try {
|
||||
let res = await getReturnStation()
|
||||
if (res) {
|
||||
this.returnPoint = res.station_id
|
||||
}
|
||||
} catch (e) {
|
||||
this.returnPoint = ''
|
||||
}
|
||||
},
|
||||
async _updateReturnStation () {
|
||||
try {
|
||||
this.loading = this.$loading({
|
||||
lock: true,
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.6)'
|
||||
})
|
||||
let res = await updateReturnStation(this.returnPoint)
|
||||
if (res) {
|
||||
this.$message(res.message)
|
||||
}
|
||||
this.loading.close()
|
||||
} catch (e) {
|
||||
this.$message.error(e)
|
||||
this.loading.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -158,6 +158,10 @@
|
||||
color #fff
|
||||
.el-select-dropdown__item.hover, .el-select-dropdown__item:hover
|
||||
background-color #2D58B8
|
||||
.el-select:hover .el-input__inner
|
||||
border-color: #409EFF;
|
||||
.el-select-dropdown__empty
|
||||
font-size .2rem
|
||||
.el-table, .el-table tr
|
||||
background-color transparent
|
||||
.el-table th
|
||||
|
||||
Reference in New Issue
Block a user