实时数据
parent
5cab7d2d5d
commit
1b6a8e770c
|
@ -9,6 +9,14 @@ export function listMessage(query) {
|
|||
})
|
||||
}
|
||||
|
||||
export function getCarRealTime(vin) {
|
||||
return request({
|
||||
url: '/car/realTime/getCarRealTime',
|
||||
method: 'get',
|
||||
params: {vin}
|
||||
})
|
||||
}
|
||||
|
||||
export function dobListMessage(query) {
|
||||
return request({
|
||||
url: '/car/messageInfo/dobList',
|
||||
|
|
|
@ -134,13 +134,7 @@
|
|||
:name="item.value"
|
||||
>
|
||||
</el-tab-pane>
|
||||
<el-table v-loading="loading" :data="messageList" @selection-change="handleSelectionChange" v-if="srcs==''">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="车辆报文类型编码" align="center" prop="messageTypeCode" />
|
||||
<el-table-column label="报文字段" align="center" >
|
||||
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<p v-html="trueTime" v-if="srcs==''"></p>
|
||||
</el-tabs>
|
||||
|
||||
<iframe :src="srcs" width="100%" height="1000px" frameborder="0" v-if="srcs!=''"></iframe>
|
||||
|
@ -152,13 +146,14 @@
|
|||
|
||||
<script>
|
||||
import { listCar, getCar, delCar, addCar, updateCar } from "/src/api/car/car";
|
||||
import {listMessage, testMessage} from "@/api/car/message/message";
|
||||
import { getCarRealTime, listMessage, testMessage } from '@/api/car/message/message'
|
||||
import {getMessageType, listMessageType} from "@/api/car/message/messageType";
|
||||
|
||||
export default {
|
||||
name: "Car",
|
||||
data() {
|
||||
return {
|
||||
timer: null,
|
||||
srcs:'',
|
||||
options: [
|
||||
{
|
||||
|
@ -233,7 +228,8 @@ export default {
|
|||
carPlate: [
|
||||
{ required: true, message: "车辆车牌号不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
},
|
||||
trueTime:{},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
@ -245,6 +241,20 @@ export default {
|
|||
document.querySelector('.tags-view-container').style.display = 'none';
|
||||
},
|
||||
methods: {
|
||||
getTrueTime(){
|
||||
var vin="";
|
||||
vin=this.messageParams.carVin
|
||||
getCarRealTime(vin).then(response => {
|
||||
this.trueTime = response.data
|
||||
console.log(this.trueTime)
|
||||
})
|
||||
},
|
||||
setTimer() {
|
||||
this.timer = setInterval( () => {
|
||||
console.log('开始定时...每过一秒执行一次')
|
||||
this.getTrueTime()
|
||||
}, 1000)
|
||||
},
|
||||
handleTypeTabClick(tab){
|
||||
console.log(tab.name)
|
||||
this.srcs = tab.name
|
||||
|
@ -263,6 +273,7 @@ export default {
|
|||
this.messageParams.flag = false;
|
||||
}
|
||||
this.getMessageList(row)
|
||||
this.setTimer()
|
||||
},
|
||||
getMessageList(row) {
|
||||
this.loading = true;
|
||||
|
@ -274,6 +285,7 @@ export default {
|
|||
this.getMessageTypeList();
|
||||
});
|
||||
},
|
||||
|
||||
/** 查询车辆基础信息列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['platform:logs:add']"
|
||||
v-hasPermi="['warning:logs:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
|
@ -92,7 +92,7 @@
|
|||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['platform:logs:edit']"
|
||||
v-hasPermi="['warning:logs:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
|
@ -103,7 +103,7 @@
|
|||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['platform:logs:remove']"
|
||||
v-hasPermi="['warning:logs:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
|
@ -113,7 +113,7 @@
|
|||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['platform:logs:export']"
|
||||
v-hasPermi="['warning:logs:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
|
@ -146,14 +146,14 @@
|
|||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['platform:logs:edit']"
|
||||
v-hasPermi="['warning:logs:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['platform:logs:remove']"
|
||||
v-hasPermi="['warning:logs:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['platform:rule:add']"
|
||||
v-hasPermi="['warning:rule:add']"
|
||||
>新增
|
||||
</el-button>
|
||||
</el-col>
|
||||
|
@ -83,7 +83,7 @@
|
|||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['platform:rule:edit']"
|
||||
v-hasPermi="['warning:rule:edit']"
|
||||
>修改
|
||||
</el-button>
|
||||
</el-col>
|
||||
|
@ -95,7 +95,7 @@
|
|||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['platform:rule:remove']"
|
||||
v-hasPermi="['warning:rule:remove']"
|
||||
>删除
|
||||
</el-button>
|
||||
</el-col>
|
||||
|
@ -106,7 +106,7 @@
|
|||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['platform:rule:export']"
|
||||
v-hasPermi="['warning:rule:export']"
|
||||
>导出
|
||||
</el-button>
|
||||
</el-col>
|
||||
|
@ -130,7 +130,7 @@
|
|||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['platform:rule:edit']"
|
||||
v-hasPermi="['warning:rule:edit']"
|
||||
>修改
|
||||
</el-button>
|
||||
<el-button
|
||||
|
@ -138,7 +138,7 @@
|
|||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['platform:rule:remove']"
|
||||
v-hasPermi="['warning:rule:remove']"
|
||||
>删除
|
||||
</el-button>
|
||||
</template>
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['platform:strategy:add']"
|
||||
v-hasPermi="['warning:strategy:add']"
|
||||
>新增
|
||||
</el-button>
|
||||
</el-col>
|
||||
|
@ -51,7 +51,7 @@
|
|||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['platform:strategy:edit']"
|
||||
v-hasPermi="['warning:strategy:edit']"
|
||||
>修改
|
||||
</el-button>
|
||||
</el-col>
|
||||
|
@ -63,7 +63,7 @@
|
|||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['platform:strategy:remove']"
|
||||
v-hasPermi="['warning:strategy:remove']"
|
||||
>删除
|
||||
</el-button>
|
||||
</el-col>
|
||||
|
@ -74,7 +74,7 @@
|
|||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['platform:strategy:export']"
|
||||
v-hasPermi="['warning:strategy:export']"
|
||||
>导出
|
||||
</el-button>
|
||||
</el-col>
|
||||
|
@ -94,7 +94,7 @@
|
|||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['platform:strategy:edit']"
|
||||
v-hasPermi="['warning:strategy:edit']"
|
||||
>修改
|
||||
</el-button>
|
||||
<el-button
|
||||
|
@ -102,7 +102,7 @@
|
|||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['platform:strategy:remove']"
|
||||
v-hasPermi="['warning:strategy:remove']"
|
||||
>删除
|
||||
</el-button>
|
||||
<el-button
|
||||
|
@ -110,7 +110,7 @@
|
|||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleAddRule(scope.row)"
|
||||
v-hasPermi="['platform:strategy:remove']"
|
||||
v-hasPermi="['warning:strategy:remove']"
|
||||
>配置规则
|
||||
</el-button>
|
||||
</template>
|
||||
|
|
|
@ -35,7 +35,7 @@ module.exports = {
|
|||
proxy: {
|
||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||
[process.env.VUE_APP_BASE_API]: {
|
||||
target: `http://localhost:8080`,
|
||||
target: `http://localhost:8081`,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
['^' + process.env.VUE_APP_BASE_API]: ''
|
||||
|
|
Loading…
Reference in New Issue