[1078] 增加驾驶员信息
This commit is contained in:
@@ -273,5 +273,14 @@ export function telephoneCallback({ phoneNumber, sign, destPhoneNumber }) {
|
||||
}
|
||||
})
|
||||
}
|
||||
export function queryDriverInfo(phoneNumber) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: '/api/jt1078/driver-information',
|
||||
params: {
|
||||
phoneNumber: phoneNumber
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
play, ptz, queryAttribute,
|
||||
queryChannels, queryConfig,
|
||||
queryDeviceById,
|
||||
queryDevices, queryPosition, queryRecordList, sendTextMessage, setConfig, startPlayback,
|
||||
queryDevices, queryDriverInfo, queryPosition, queryRecordList, sendTextMessage, setConfig, startPlayback,
|
||||
stopPlay, stopPlayback, telephoneCallback, update,
|
||||
updateChannel, wiper
|
||||
} from '@/api/jtDevice'
|
||||
@@ -260,6 +260,16 @@ const actions = {
|
||||
reject(error)
|
||||
})
|
||||
})
|
||||
},
|
||||
queryDriverInfo({ commit }, phoneNumber) {
|
||||
return new Promise((resolve, reject) => {
|
||||
queryDriverInfo(phoneNumber).then(response => {
|
||||
const { data } = response
|
||||
resolve(data)
|
||||
}).catch(error => {
|
||||
reject(error)
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
83
web/src/views/jtDevice/dialog/driverInfo.vue
Executable file
83
web/src/views/jtDevice/dialog/driverInfo.vue
Executable file
@@ -0,0 +1,83 @@
|
||||
<template>
|
||||
<div id="configInfo">
|
||||
<el-dialog
|
||||
v-el-drag-dialog
|
||||
title="驾驶员信息"
|
||||
width="=80%"
|
||||
top="2rem"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="showDialog"
|
||||
:destroy-on-close="true"
|
||||
@close="close()"
|
||||
>
|
||||
<div id="shared">
|
||||
<el-descriptions :column="2" v-if="driverInfo" style="margin-bottom: 1rem;">
|
||||
<el-descriptions-item label="状态">{{ getStatus(driverInfo.status) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="时间">{{ driverInfo.time }}</el-descriptions-item>
|
||||
<el-descriptions-item label="IC卡读取结果">{{ getICInfo(driverInfo.result) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="驾驶员姓名">{{ driverInfo.name }}</el-descriptions-item>
|
||||
<el-descriptions-item label="从业资格证编码">{{ driverInfo.certificateCode }}</el-descriptions-item>
|
||||
<el-descriptions-item label="发证机构名称">{{ driverInfo.certificateIssuanceMechanismName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="证件有效期">{{ driverInfo.expire }}</el-descriptions-item>
|
||||
<el-descriptions-item label="驾驶员身份证号">{{ driverInfo.driverIdNumber }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import elDragDialog from '@/directive/el-drag-dialog'
|
||||
|
||||
export default {
|
||||
name: 'ConfigInfo',
|
||||
directives: { elDragDialog },
|
||||
props: {},
|
||||
data() {
|
||||
return {
|
||||
showDialog: false,
|
||||
driverInfo: null
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
created() {},
|
||||
methods: {
|
||||
openDialog: function(data) {
|
||||
this.showDialog = true
|
||||
this.driverInfo = data
|
||||
},
|
||||
close: function() {
|
||||
this.showDialog = false
|
||||
},
|
||||
getStatus: function(status) {
|
||||
switch (status) {
|
||||
case 1:
|
||||
return 'IC卡插入'
|
||||
case 2:
|
||||
return 'IC卡拔出'
|
||||
default:
|
||||
return '未知'
|
||||
|
||||
}
|
||||
},
|
||||
getICInfo: function(result) {
|
||||
switch (result) {
|
||||
case 0:
|
||||
return 'IC卡读卡成功'
|
||||
case 1:
|
||||
return '读卡失败:卡片密钥认证未通过'
|
||||
case 2:
|
||||
return '读卡失败:卡片已被锁定'
|
||||
case 3:
|
||||
return '读卡失败:卡片被拔出'
|
||||
case 4:
|
||||
return '读卡失败:数据校验错误'
|
||||
default:
|
||||
return '未知失败原因'
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -117,16 +117,14 @@
|
||||
电话回拨</el-dropdown-item>
|
||||
<el-dropdown-item command="setPhoneBook" v-bind:disabled="!scope.row.status" >
|
||||
设置电话本</el-dropdown-item>
|
||||
<el-dropdown-item command="tempPositionTracking" v-bind:disabled="!scope.row.status" >
|
||||
临时跟踪</el-dropdown-item>
|
||||
<el-dropdown-item command="driverInfo" v-bind:disabled="!scope.row.status" >
|
||||
驾驶员信息</el-dropdown-item>
|
||||
<el-dropdown-item command="reset" v-bind:disabled="!scope.row.status" >
|
||||
终端复位</el-dropdown-item>
|
||||
<el-dropdown-item command="factoryReset" v-bind:disabled="!scope.row.status" >
|
||||
恢复出厂</el-dropdown-item>
|
||||
<el-dropdown-item command="door" v-bind:disabled="!scope.row.status" >
|
||||
车门控制</el-dropdown-item>
|
||||
<el-dropdown-item command="driverInfo" v-bind:disabled="!scope.row.status" >
|
||||
驾驶员信息</el-dropdown-item>
|
||||
<el-dropdown-item command="mediaAttribute" v-bind:disabled="!scope.row.status" >
|
||||
音视频属性</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
@@ -150,6 +148,7 @@
|
||||
<position ref="position" />
|
||||
<textMsg ref="textMsg" />
|
||||
<telephoneCallback ref="telephoneCallback" />
|
||||
<driverInfo ref="driverInfo" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -160,11 +159,12 @@ import attribute from './dialog/attribute.vue'
|
||||
import position from './dialog/position.vue'
|
||||
import textMsg from './dialog/textMsg.vue'
|
||||
import telephoneCallback from './dialog/telephoneCallback.vue'
|
||||
import driverInfo from './dialog/driverInfo.vue'
|
||||
|
||||
export default {
|
||||
name: 'App',
|
||||
components: {
|
||||
deviceEdit, configInfo, attribute, position, textMsg, telephoneCallback
|
||||
deviceEdit, configInfo, attribute, position, textMsg, telephoneCallback, driverInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -275,6 +275,8 @@ export default {
|
||||
this.sendTextMsg(itemData)
|
||||
} else if (command === 'telephoneCallback') {
|
||||
this.telephoneCallback(itemData)
|
||||
} else if (command === 'driverInfo') {
|
||||
this.queryDriverInfo(itemData)
|
||||
} else {
|
||||
this.$message.info('尚不支持')
|
||||
}
|
||||
@@ -304,6 +306,12 @@ export default {
|
||||
telephoneCallback: function(itemData) {
|
||||
this.$refs.telephoneCallback.openDialog(itemData)
|
||||
},
|
||||
queryDriverInfo: function(itemData) {
|
||||
this.$store.dispatch('jtDevice/queryDriverInfo', itemData.phoneNumber)
|
||||
.then(data => {
|
||||
this.$refs.driverInfo.openDialog(data)
|
||||
})
|
||||
},
|
||||
linkDetection: function(itemData) {
|
||||
this.$store.dispatch('jtDevice/linkDetection', itemData.phoneNumber)
|
||||
.then((data) => {
|
||||
|
||||
Reference in New Issue
Block a user