修改图表数据展示

master
夜笙歌 2 years ago
parent be3e1a2983
commit 021d52a63a

@ -5,7 +5,7 @@ VITE_APP_TITLE = 若依管理系统
VITE_APP_ENV = 'production'
# 若依管理系统/生产环境
VITE_APP_BASE_API = 'http://10.11.41.249:8080/dev-api'
VITE_APP_BASE_API = 'http://47.94.93.46:8080/dev-api'
# VITE_APP_BASE_API = 'http://47.94.93.46:80/dev-api'
# 是否在打包时开启压缩,支持 gzip 和 brotli
VITE_BUILD_COMPRESS = gzip

@ -9,37 +9,3 @@ export function listTest(query) {
params: query
})
}
// 查询轮胎基础信息详细
export function getTest(id) {
return request({
url: '/test/test/' + id,
method: 'get'
})
}
// 新增轮胎基础信息
export function addTest(data) {
return request({
url: '/test/test',
method: 'post',
data: data
})
}
// 修改轮胎基础信息
export function updateTest(data) {
return request({
url: '/test/test',
method: 'put',
data: data
})
}
// 删除轮胎基础信息
export function delTest(id) {
return request({
url: '/test/test/' + id,
method: 'delete'
})
}

@ -1,28 +1,28 @@
/**
/**
* v-hasPermi 操作权限处理
* Copyright (c) 2019 ruoyi
*/
import useUserStore from '@/store/modules/user'
export default {
mounted(el, binding, vnode) {
const { value } = binding
const all_permission = "*:*:*";
const permissions = useUserStore().permissions
mounted(el, binding, vnode) {
const {value} = binding
const all_permission = "*:*:*";
const permissions = useUserStore().permissions
if (value && value instanceof Array && value.length > 0) {
const permissionFlag = value
if (value && value instanceof Array && value.length > 0) {
const permissionFlag = value
const hasPermissions = permissions.some(permission => {
return all_permission === permission || permissionFlag.includes(permission)
})
const hasPermissions = permissions.some(permission => {
return all_permission === permission || permissionFlag.includes(permission)
})
if (!hasPermissions) {
el.parentNode && el.parentNode.removeChild(el)
}
} else {
throw new Error(`请设置操作权限标签值`)
if (!hasPermissions) {
el.parentNode && el.parentNode.removeChild(el)
}
} else {
throw new Error(`请设置操作权限标签值`)
}
}
}
}

@ -21,10 +21,12 @@ let downloadLoadingInstance;
export let isRelogin = {show: false};
axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
console.log(import.meta.env.VITE_APP_BASE_API)
// 创建axios实例
const service = axios.create({
// axios中请求配置有baseURL选项表示请求URL公共部分
baseURL: import.meta.env.VITE_APP_BASE_API,
// baseURL: 'http://47.94.93.46/dev-api',
// 超时
timeout: 10000
})

@ -23,11 +23,12 @@
</el-form-item>
<el-form-item label="GPS时间" prop="internationalization3">
<el-date-picker
v-model="queryParams.internationalization3"
type="datetimerange"
range-separator="到"
start-placeholder="开始时间"
end-placeholder="结束时间"
v-model="dateRange"
value-format="YYYY-MM-DD"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
/>
</el-form-item>
<el-form-item label=" ">
@ -38,16 +39,6 @@
<!-- 顶部操作按钮-->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
v-hasPermi="['test:test:add']"
icon="Plus"
plain
type="primary"
@click="handleAdd"
>{{ t('option.add') }}
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
v-hasPermi="['test:test:export']"
@ -118,180 +109,11 @@
@pagination="getList"
/>
<!-- 添加或修改岗位对话框 -->
<el-dialog v-model="open" :title="title" append-to-body width="500px">
<el-form ref="postRef" :label-width=" locale ? '90px':'140px'" :model="form" :rules="rules">
<el-form-item v-if="false" prop="id">
<el-input v-model="form.id"/>
</el-form-item>
<el-form-item :label="t('test.test.internationalization1')" prop="internationalization1">
<el-input
v-model="form.internationalization1"
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization1')"/>
</el-form-item>
<el-form-item :label="t('test.test.internationalization2')" prop="internationalization2">
<el-input
v-model="form.internationalization2"
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization2')"/>
</el-form-item>
<el-form-item :label="t('test.test.internationalization3')" prop="internationalization3">
<el-input
v-model="form.internationalization3"
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization3')"/>
</el-form-item>
<el-form-item :label="t('test.test.internationalization4')" prop="internationalization4">
<el-input
v-model="form.internationalization4"
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization4')"/>
</el-form-item>
<el-form-item :label="t('test.test.internationalization5')" prop="internationalization5">
<el-input
v-model="form.internationalization5"
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization5')"/>
</el-form-item>
<el-form-item :label="t('test.test.internationalization6')" prop="internationalization6">
<el-input
v-model="form.internationalization6"
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization6')"/>
</el-form-item>
<el-form-item :label="t('test.test.internationalization7')" prop="internationalization7">
<el-input
v-model="form.internationalization7"
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization7')"/>
</el-form-item>
<el-form-item :label="t('test.test.internationalization8')" prop="internationalization8">
<el-input
v-model="form.internationalization8"
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization8')"/>
</el-form-item>
<el-form-item :label="t('test.test.internationalization9')" prop="internationalization9">
<el-input
v-model="form.internationalization9"
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization9')"/>
</el-form-item>
<el-form-item :label="t('test.test.internationalization10')" prop="internationalization10">
<el-input
v-model="form.internationalization10"
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization10')"/>
</el-form-item>
<el-form-item :label="t('test.test.internationalization11')" prop="internationalization11">
<el-input
v-model="form.internationalization11"
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization11')"/>
</el-form-item>
<el-form-item :label="t('test.test.internationalization12')" prop="internationalization12">
<el-input
v-model="form.internationalization12"
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization12')"/>
</el-form-item>
<el-form-item :label="t('test.test.internationalization13')" prop="internationalization13">
<el-input
v-model="form.internationalization13"
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization13')"/>
</el-form-item>
<el-form-item :label="t('test.test.internationalization14')" prop="internationalization14">
<el-input
v-model="form.internationalization14"
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization14')"/>
</el-form-item>
<el-form-item :label="t('test.test.internationalization15')" prop="internationalization15">
<el-input
v-model="form.internationalization15"
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization15')"/>
</el-form-item>
<el-form-item :label="t('test.test.internationalization16')" prop="internationalization16">
<el-input
v-model="form.internationalization16"
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization16')"/>
</el-form-item>
<el-form-item :label="t('test.test.internationalization17')" prop="internationalization17">
<el-input
v-model="form.internationalization17"
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization17')"/>
</el-form-item>
<el-form-item :label="t('test.test.internationalization18')" prop="internationalization18">
<el-input
v-model="form.internationalization18"
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization18')"/>
</el-form-item>
<el-form-item :label="t('test.test.internationalization19')" prop="internationalization19">
<el-input
v-model="form.internationalization19"
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization19')"/>
</el-form-item>
<el-form-item :label="t('test.test.internationalization20')" prop="internationalization20">
<el-input
v-model="form.internationalization20"
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization20')"/>
</el-form-item>
<el-form-item :label="t('common.isRemove')" prop="isDelete">
<el-input
v-model="form.isDelete"
:placeholder="t('common.pleaseEnter') + t('common.isRemove')"/>
</el-form-item>
<el-form-item :label="t('common.createTime')" prop="createTime">
<el-date-picker
v-model="form.createTime"
:placeholder="t('common.PleaseSelect') + t('common.createTime')"
clearable
format="YYYY/MM/DD"
type="date"
value-format="YYYY-MM-DD"
/>
</el-form-item>
<el-form-item :label="t('common.creatorId')" prop="createId">
<el-input
v-model="form.createId"
:placeholder="t('common.pleaseEnter') + t('common.creatorId')"/>
</el-form-item>
<el-form-item :label="t('common.createBy')" prop="createBy">
<el-input
v-model="form.createBy"
:placeholder="t('common.pleaseEnter') + t('common.createBy')"/>
</el-form-item>
<el-form-item :label="t('common.creatorName')" prop="createName">
<el-input
v-model="form.createName"
:placeholder="t('common.pleaseEnter') + t('common.creatorName')"/>
</el-form-item>
<el-form-item :label="t('common.editTime')" prop="modifyTime">
<el-date-picker
v-model="form.modifyTime"
:placeholder="t('common.PleaseSelect') + t('common.editTime')"
clearable
format="YYYY/MM/DD"
type="date"
value-format="YYYY-MM-DD"
/>
</el-form-item>
<el-form-item :label="t('common.editID')" prop="modifyId">
<el-input
v-model="form.modifyId"
:placeholder="t('common.pleaseEnter') + t('common.editID')"/>
</el-form-item>
<el-form-item :label="t('common.editBy')" prop="modifyBy">
<el-input
v-model="form.modifyBy"
:placeholder="t('common.pleaseEnter') + t('common.editBy')"/>
</el-form-item>
<el-form-item :label="t('common.editName')" prop="modifyName">
<el-input
v-model="form.modifyName"
:placeholder="t('common.pleaseEnter') + t('common.editName')"/>
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submitForm">{{ t('option.ok') }}</el-button>
<el-button @click="cancel">{{ t('option.cancel') }}</el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script name="Test" setup>
import {addTest, delTest, getTest, listTest, updateTest} from "@/api/GPS/car";
import { listTest} from "@/api/GPS/car";
import {useI18n} from 'vue-i18n';
import Cookies from "js-cookie";
@ -301,26 +123,15 @@ const {t} = useI18n();
const locale = (Cookies.get('language') || 'zhCn') === 'zhCn'
const {proxy} = getCurrentInstance();
//
const postList = ref([]);
//
const open = ref(false);
//
const loading = ref(true);
//
const showSearch = ref(true);
// id
const ids = ref([]);
//
const single = ref(true);
//
const multiple = ref(true);
//
const total = ref(0);
//
const title = ref("");
const dateRange = ref([]);
//
const queryParams = ref({
@ -331,48 +142,10 @@ const queryParams = ref({
internationalization3: undefined,
})
//
const rules = {
}
//
const form = ref({
id: null,
internationalization1: null,
internationalization2: null,
internationalization3: null,
internationalization4: null,
internationalization5: null,
internationalization6: null,
internationalization7: null,
internationalization8: null,
internationalization9: null,
internationalization10: null,
internationalization11: null,
internationalization12: null,
internationalization13: null,
internationalization14: null,
internationalization15: null,
internationalization16: null,
internationalization17: null,
internationalization18: null,
internationalization19: null,
internationalization20: null,
isDelete: null,
createTime: null,
createId: null,
createBy: null,
createName: null,
modifyTime: null,
modifyId: null,
modifyBy: null,
modifyName: null,
});
/** 查询岗位列表 */
function getList() {
loading.value = true;
listTest(queryParams.value).then(response => {
listTest(proxy.addDateRange(queryParams.value, dateRange.value)).then(response => {
postList.value = response.rows;
total.value = response.total;
}).finally(() => {
@ -380,49 +153,6 @@ function getList() {
});
}
/** 取消按钮 */
function cancel() {
open.value = false;
reset();
}
/** 表单重置 */
function reset() {
form.value = {
id: null,
internationalization1: null,
internationalization2: null,
internationalization3: null,
internationalization4: null,
internationalization5: null,
internationalization6: null,
internationalization7: null,
internationalization8: null,
internationalization9: null,
internationalization10: null,
internationalization11: null,
internationalization12: null,
internationalization13: null,
internationalization14: null,
internationalization15: null,
internationalization16: null,
internationalization17: null,
internationalization18: null,
internationalization19: null,
internationalization20: null,
isDelete: null,
createTime: null,
createId: null,
createBy: null,
createName: null,
modifyTime: null,
modifyId: null,
modifyBy: null,
modifyName: null,
};
proxy.resetForm("postRef");
}
/** 搜索按钮操作 */
function handleQuery() {
queryParams.value.pageNum = 1;
@ -435,67 +165,6 @@ const resetQuery = () => {
handleQuery();
}
/** 多选框选中数据 */
function handleSelectionChange(selection) {
ids.value = selection.map(item => item.id);
single.value = selection.length !== 1;
multiple.value = !selection.length;
}
/** 新增按钮操作 */
function handleAdd() {
reset();
open.value = true;
title.value = t('test.test.addTitle');
}
/** 修改按钮操作 */
function handleUpdate(row) {
reset();
const postId = row.id || ids.value;
getTest(postId).then(response => {
form.value = response.data;
open.value = true;
title.value = t('test.test.editTitle');
});
}
/** 提交按钮 */
function submitForm() {
proxy.$refs["postRef"].validate(valid => {
if (valid) {
if (form.value.id != undefined) {
updateTest(form.value).then(response => {
proxy.$modal.msgSuccess(t('option.modificationSuccessful'));
open.value = false;
getList();
});
} else {
addTest(form.value).then(response => {
proxy.$modal.msgSuccess(t('option.addedSuccessfully'));
open.value = false;
getList();
});
}
}
});
}
/** 删除按钮操作 */
function handleDelete(row) {
const postIds = row.postId || ids.value;
proxy.$modal.confirm(t('option.confirmDeletion', {
key: t('test.test.internationalization1'),
value: postIds
})).then(function () {
return delTest(postIds);
}).then(() => {
getList();
proxy.$modal.msgSuccess(t('option.successfullyDeleted'));
}).catch(() => {
});
}
/** 导出按钮操作 */
function handleExport() {
proxy.download("system/post/export", {

@ -41,11 +41,12 @@
</el-form-item>
<el-form-item label="GPS时间" prop="internationalization5">
<el-date-picker
v-model="queryParams.internationalization5"
type="datetimerange"
range-separator="到"
start-placeholder="开始时间"
end-placeholder="结束时间"
v-model="dateRange"
value-format="YYYY-MM-DD"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
/>
</el-form-item>
<el-form-item label=" ">
@ -56,38 +57,6 @@
<!-- 顶部操作按钮-->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
v-hasPermi="['test:test:add']"
icon="Plus"
plain
type="primary"
@click="handleAdd"
>{{ t('option.add') }}
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
v-hasPermi="['test:test:edit']"
:disabled="single"
icon="Edit"
plain
type="success"
@click="handleUpdate"
>{{ t('option.edit') }}
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
v-hasPermi="['test:test:remove']"
:disabled="multiple"
icon="Delete"
plain
type="danger"
@click="handleDelete"
>{{ t('option.remove') }}
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
v-hasPermi="['test:test:export']"
@ -104,61 +73,42 @@
<!-- 表格主体-->
<el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange">
<el-table-column align="center" fixed type="selection" width="55"/>
<el-table-column label="序号" align="center" prop="internationalization1"
<el-table-column align="center" label="序号" prop="internationalization1"
width="150"/>
<el-table-column label="轮胎编号" align="center" prop="internationalization2"
<el-table-column align="center" label="轮胎编号" prop="internationalization2"
width="150"/>
<el-table-column label="轮胎位置" align="center" prop="internationalization3"
<el-table-column align="center" label="轮胎位置" prop="internationalization3"
width="150"/>
<el-table-column label="胎压传感器ID" align="center" prop="internationalization4"
<el-table-column align="center" label="胎压传感器ID" prop="internationalization4"
width="150"/>
<el-table-column label="GPS时间" align="center" prop="internationalization5"
<el-table-column align="center" label="GPS时间" prop="internationalization5"
width="150"/>
<el-table-column label="接收机ID" align="center" prop="internationalization6"
<el-table-column align="center" label="接收机ID" prop="internationalization6"
width="150"/>
<el-table-column label="传感器电池电压" align="center" prop="internationalization7"
<el-table-column align="center" label="传感器电池电压" prop="internationalization7"
width="150"/>
<el-table-column label="压力值" align="center" prop="internationalization8"
<el-table-column align="center" label="压力值" prop="internationalization8"
width="150"/>
<el-table-column label="温度值" align="center" prop="internationalization9"
<el-table-column align="center" label="温度值" prop="internationalization9"
width="150"/>
<el-table-column label="是否低电压" align="center" prop="internationalization10"
<el-table-column align="center" label="是否低电压" prop="internationalization10"
width="150"/>
<el-table-column label="是否60分钟未收到数据" align="center" prop="internationalization11"
<el-table-column align="center" label="是否60分钟未收到数据" prop="internationalization11"
width="180"/>
<el-table-column label="传感器是否运行" align="center" prop="internationalization12"
<el-table-column align="center" label="传感器是否运行" prop="internationalization12"
width="150"/>
<el-table-column label="是否气压高" align="center" prop="internationalization13"
<el-table-column align="center" label="是否气压高" prop="internationalization13"
width="150"/>
<el-table-column label="是否气压低" align="center" prop="internationalization14"
<el-table-column align="center" label="是否气压低" prop="internationalization14"
width="150"/>
<el-table-column label="是否温度高" align="center" prop="internationalization15"
<el-table-column align="center" label="是否温度高" prop="internationalization15"
width="150"/>
<el-table-column label="气压状态" align="center" prop="internationalization16"
<el-table-column align="center" label="气压状态" prop="internationalization16"
width="150"/>
<el-table-column label="纬度" align="center" prop="internationalization17"
<el-table-column align="center" label="纬度" prop="internationalization17"
width="150"/>
<el-table-column label="经度" align="center" prop="internationalization18"
<el-table-column align="center" label="经度" prop="internationalization18"
width="150"/>
<el-table-column :label="t('option.option')" align="center" class-name="small-padding fixed-width" fixed="right"
width="160">
<template #default="scope">
<el-button
v-hasPermi="['test:test:edit']"
icon="Edit"
type="text"
@click="handleUpdate(scope.row)"
>{{ t('option.edit') }}
</el-button>
<el-button
v-hasPermi="['test:test:remove']"
icon="Delete"
type="text"
@click="handleDelete(scope.row)"
>{{ t('option.remove') }}
</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页-->
@ -170,175 +120,6 @@
@pagination="getList"
/>
<!-- 添加或修改岗位对话框 -->
<el-dialog v-model="open" :title="title" append-to-body width="500px">
<el-form ref="postRef" :label-width=" locale ? '90px':'140px'" :model="form" :rules="rules">
<el-form-item v-if="false" prop="id">
<el-input v-model="form.id"/>
</el-form-item>
<el-form-item :label="t('test.test.internationalization1')" prop="internationalization1">
<el-input
v-model="form.internationalization1"
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization1')"/>
</el-form-item>
<el-form-item :label="t('test.test.internationalization2')" prop="internationalization2">
<el-input
v-model="form.internationalization2"
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization2')"/>
</el-form-item>
<el-form-item :label="t('test.test.internationalization3')" prop="internationalization3">
<el-input
v-model="form.internationalization3"
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization3')"/>
</el-form-item>
<el-form-item :label="t('test.test.internationalization4')" prop="internationalization4">
<el-input
v-model="form.internationalization4"
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization4')"/>
</el-form-item>
<el-form-item :label="t('test.test.internationalization5')" prop="internationalization5">
<el-input
v-model="form.internationalization5"
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization5')"/>
</el-form-item>
<el-form-item :label="t('test.test.internationalization6')" prop="internationalization6">
<el-input
v-model="form.internationalization6"
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization6')"/>
</el-form-item>
<el-form-item :label="t('test.test.internationalization7')" prop="internationalization7">
<el-input
v-model="form.internationalization7"
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization7')"/>
</el-form-item>
<el-form-item :label="t('test.test.internationalization8')" prop="internationalization8">
<el-input
v-model="form.internationalization8"
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization8')"/>
</el-form-item>
<el-form-item :label="t('test.test.internationalization9')" prop="internationalization9">
<el-input
v-model="form.internationalization9"
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization9')"/>
</el-form-item>
<el-form-item :label="t('test.test.internationalization10')" prop="internationalization10">
<el-input
v-model="form.internationalization10"
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization10')"/>
</el-form-item>
<el-form-item :label="t('test.test.internationalization11')" prop="internationalization11">
<el-input
v-model="form.internationalization11"
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization11')"/>
</el-form-item>
<el-form-item :label="t('test.test.internationalization12')" prop="internationalization12">
<el-input
v-model="form.internationalization12"
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization12')"/>
</el-form-item>
<el-form-item :label="t('test.test.internationalization13')" prop="internationalization13">
<el-input
v-model="form.internationalization13"
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization13')"/>
</el-form-item>
<el-form-item :label="t('test.test.internationalization14')" prop="internationalization14">
<el-input
v-model="form.internationalization14"
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization14')"/>
</el-form-item>
<el-form-item :label="t('test.test.internationalization15')" prop="internationalization15">
<el-input
v-model="form.internationalization15"
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization15')"/>
</el-form-item>
<el-form-item :label="t('test.test.internationalization16')" prop="internationalization16">
<el-input
v-model="form.internationalization16"
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization16')"/>
</el-form-item>
<el-form-item :label="t('test.test.internationalization17')" prop="internationalization17">
<el-input
v-model="form.internationalization17"
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization17')"/>
</el-form-item>
<el-form-item :label="t('test.test.internationalization18')" prop="internationalization18">
<el-input
v-model="form.internationalization18"
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization18')"/>
</el-form-item>
<el-form-item :label="t('test.test.internationalization19')" prop="internationalization19">
<el-input
v-model="form.internationalization19"
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization19')"/>
</el-form-item>
<el-form-item :label="t('test.test.internationalization20')" prop="internationalization20">
<el-input
v-model="form.internationalization20"
:placeholder="t('common.pleaseEnter') + t('test.test.internationalization20')"/>
</el-form-item>
<el-form-item :label="t('common.isRemove')" prop="isDelete">
<el-input
v-model="form.isDelete"
:placeholder="t('common.pleaseEnter') + t('common.isRemove')"/>
</el-form-item>
<el-form-item :label="t('common.createTime')" prop="createTime">
<el-date-picker
v-model="form.createTime"
:placeholder="t('common.PleaseSelect') + t('common.createTime')"
clearable
format="YYYY/MM/DD"
type="date"
value-format="YYYY-MM-DD"
/>
</el-form-item>
<el-form-item :label="t('common.creatorId')" prop="createId">
<el-input
v-model="form.createId"
:placeholder="t('common.pleaseEnter') + t('common.creatorId')"/>
</el-form-item>
<el-form-item :label="t('common.createBy')" prop="createBy">
<el-input
v-model="form.createBy"
:placeholder="t('common.pleaseEnter') + t('common.createBy')"/>
</el-form-item>
<el-form-item :label="t('common.creatorName')" prop="createName">
<el-input
v-model="form.createName"
:placeholder="t('common.pleaseEnter') + t('common.creatorName')"/>
</el-form-item>
<el-form-item :label="t('common.editTime')" prop="modifyTime">
<el-date-picker
v-model="form.modifyTime"
:placeholder="t('common.PleaseSelect') + t('common.editTime')"
clearable
format="YYYY/MM/DD"
type="date"
value-format="YYYY-MM-DD"
/>
</el-form-item>
<el-form-item :label="t('common.editID')" prop="modifyId">
<el-input
v-model="form.modifyId"
:placeholder="t('common.pleaseEnter') + t('common.editID')"/>
</el-form-item>
<el-form-item :label="t('common.editBy')" prop="modifyBy">
<el-input
v-model="form.modifyBy"
:placeholder="t('common.pleaseEnter') + t('common.editBy')"/>
</el-form-item>
<el-form-item :label="t('common.editName')" prop="modifyName">
<el-input
v-model="form.modifyName"
:placeholder="t('common.pleaseEnter') + t('common.editName')"/>
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submitForm">{{ t('option.ok') }}</el-button>
<el-button @click="cancel">{{ t('option.cancel') }}</el-button>
</div>
</template>
</el-dialog>
</div>
</template>
@ -353,25 +134,15 @@ const {t} = useI18n();
const locale = (Cookies.get('language') || 'zhCn') === 'zhCn'
const {proxy} = getCurrentInstance();
//
const postList = ref([]);
//
const open = ref(false);
//
const loading = ref(true);
//
const showSearch = ref(true);
// id
const ids = ref([]);
//
const single = ref(true);
//
const multiple = ref(true);
//
const total = ref(0);
//
const title = ref("");
const dateRange = ref([]);
//
const queryParams = ref({
@ -382,78 +153,13 @@ const queryParams = ref({
internationalization3: undefined,
internationalization4: undefined,
internationalization5: undefined,
internationalization6: undefined,
internationalization7: undefined,
internationalization8: undefined,
internationalization9: undefined,
internationalization10: undefined,
internationalization11: undefined,
internationalization12: undefined,
internationalization13: undefined,
internationalization14: undefined,
internationalization15: undefined,
internationalization16: undefined,
internationalization17: undefined,
internationalization18: undefined,
internationalization19: undefined,
internationalization20: undefined,
isDelete: undefined,
createTime: undefined,
createId: undefined,
createBy: undefined,
createName: undefined,
modifyTime: undefined,
modifyId: undefined,
modifyBy: undefined,
modifyName: undefined,
})
//
const rules = {
brand: [{required: true, message: "轮胎品牌不能为空", trigger: "blur"}],
type: [{required: true, message: "轮胎型号不能为空", trigger: "blur"}],
serialNumber: [{required: true, message: "轮胎编号不能为空", trigger: "blur"}],
depth: [{required: true, message: "花纹深度不能为空", trigger: "blur"}],
}
//
const form = ref({
id: null,
internationalization1: null,
internationalization2: null,
internationalization3: null,
internationalization4: null,
internationalization5: null,
internationalization6: null,
internationalization7: null,
internationalization8: null,
internationalization9: null,
internationalization10: null,
internationalization11: null,
internationalization12: null,
internationalization13: null,
internationalization14: null,
internationalization15: null,
internationalization16: null,
internationalization17: null,
internationalization18: null,
internationalization19: null,
internationalization20: null,
isDelete: null,
createTime: null,
createId: null,
createBy: null,
createName: null,
modifyTime: null,
modifyId: null,
modifyBy: null,
modifyName: null,
});
/** 查询岗位列表 */
function getList() {
loading.value = true;
listTest(queryParams.value).then(response => {
listTest(proxy.addDateRange(queryParams.value, dateRange.value)).then(response => {
postList.value = response.rows;
total.value = response.total;
}).finally(() => {
@ -467,43 +173,6 @@ function cancel() {
reset();
}
/** 表单重置 */
function reset() {
form.value = {
id: null,
internationalization1: null,
internationalization2: null,
internationalization3: null,
internationalization4: null,
internationalization5: null,
internationalization6: null,
internationalization7: null,
internationalization8: null,
internationalization9: null,
internationalization10: null,
internationalization11: null,
internationalization12: null,
internationalization13: null,
internationalization14: null,
internationalization15: null,
internationalization16: null,
internationalization17: null,
internationalization18: null,
internationalization19: null,
internationalization20: null,
isDelete: null,
createTime: null,
createId: null,
createBy: null,
createName: null,
modifyTime: null,
modifyId: null,
modifyBy: null,
modifyName: null,
};
proxy.resetForm("postRef");
}
/** 搜索按钮操作 */
function handleQuery() {
queryParams.value.pageNum = 1;
@ -516,67 +185,6 @@ const resetQuery = () => {
handleQuery();
}
/** 多选框选中数据 */
function handleSelectionChange(selection) {
ids.value = selection.map(item => item.id);
single.value = selection.length !== 1;
multiple.value = !selection.length;
}
/** 新增按钮操作 */
function handleAdd() {
reset();
open.value = true;
title.value = t('test.test.addTitle');
}
/** 修改按钮操作 */
function handleUpdate(row) {
reset();
const postId = row.id || ids.value;
getTest(postId).then(response => {
form.value = response.data;
open.value = true;
title.value = t('test.test.editTitle');
});
}
/** 提交按钮 */
function submitForm() {
proxy.$refs["postRef"].validate(valid => {
if (valid) {
if (form.value.id != undefined) {
updateTest(form.value).then(response => {
proxy.$modal.msgSuccess(t('option.modificationSuccessful'));
open.value = false;
getList();
});
} else {
addTest(form.value).then(response => {
proxy.$modal.msgSuccess(t('option.addedSuccessfully'));
open.value = false;
getList();
});
}
}
});
}
/** 删除按钮操作 */
function handleDelete(row) {
const postIds = row.postId || ids.value;
proxy.$modal.confirm(t('option.confirmDeletion', {
key: t('test.test.internationalization1'),
value: postIds
})).then(function () {
return delTest(postIds);
}).then(() => {
getList();
proxy.$modal.msgSuccess(t('option.successfullyDeleted'));
}).catch(() => {
});
}
/** 导出按钮操作 */
function handleExport() {
proxy.download("system/post/export", {

@ -111,7 +111,12 @@
</template>
</el-table-column>
<el-table-column align="center" label="物联网卡号" prop="internetThingsNo" width="150"/>
<el-table-column align="center" label="设备类型" prop="deviceType"/>
<el-table-column align="center" label="设备类型" prop="deviceType">
<template #default="scope">
{{ scope.row.deviceType === 0 ? 'GPS接收机' : '' }}
{{ scope.row.deviceType === 1 ? '胎压传感器' : '' }}
</template>
</el-table-column>
</el-table>
<template #footer>
<div class="dialog-footer">

@ -29,6 +29,7 @@ export default {
data() {
return {
chart: null,
XData:['高温报警', '低压报警', '电池电量报警', '位置报警'],
chartData:[
{value: 320, name: '低压报警'},
{value: 149, name: '高温报警'},
@ -52,6 +53,14 @@ export default {
methods: {
setData(e) {
console.log(e)
let dataRow = Object.keys(e).map(val => {
return {
name:val,
value:e[val]
}
})
this.XData = Object.keys(e)
this.chartData = dataRow
this.initChart()
},
initChart() {
@ -65,7 +74,7 @@ export default {
legend: {
left: 'center',
bottom: '10',
data: ['高温报警', '低压报警', '电池电量报警', '位置报警']
data: this.XData
},
series: [
{

@ -1,10 +1,9 @@
<template>
<div :class="className" :style="{height:height,width:width}" />
<div :class="className" :style="{height:height,width:width}"/>
</template>
<script>
import * as echarts from 'echarts';
// require('echarts/theme/macarons.js') // echarts theme
const echart = inject('echart')
import resize from './mixins/resize'
@ -46,7 +45,6 @@ export default {
methods: {
initChart() {
this.chart = echarts.init(this.$el, 'macarons')
this.chart.setOption({
//
grid: {
@ -63,7 +61,7 @@ export default {
textStyle: {
//
color: '#000',
fontSize:15,
fontSize: 15,
fontWeight: 600,
}
}],
@ -101,9 +99,9 @@ export default {
pointer: {
//
//icon:'none',
width:3,//
length:"60%", //
shadowColor : '#ccc', //
width: 3,//
length: "60%", //
shadowColor: '#ccc', //
shadowBlur: 5
},
axisTick: {
@ -135,11 +133,11 @@ export default {
formatter: '{value} KM',
color: '#040755',
fontSize: 20, //
top:'60%'
top: '60%'
},
data: [{
value: 586 ,
top:'60%' //
value: 586,
top: '60%' //
}]
},
]

@ -8,7 +8,7 @@ import * as echarts from 'echarts'
import resize from './mixins/resize'
export default defineComponent({
mixins: [resize],
// mixins: [resize],
props: {
className: {
type: String,

@ -22,7 +22,7 @@
/>
</el-form-item>
<el-form-item :label="t('baseDevice.baseDevice.deviceType')" prop="deviceType">
<el-select clearable v-model="queryParams.deviceType" :placeholder="t('common.PleaseSelect')" class="m-2">
<el-select v-model="queryParams.deviceType" :placeholder="t('common.PleaseSelect')" class="m-2" clearable>
<el-option
v-for="item in options"
:key="item.value"
@ -32,7 +32,7 @@
</el-select>
</el-form-item>
<el-form-item :label="t('baseDevice.baseDevice.state')" prop="state">
<el-select clearable v-model="queryParams.state" :placeholder="t('common.PleaseSelect')" class="m-2">
<el-select v-model="queryParams.state" :placeholder="t('common.PleaseSelect')" class="m-2" clearable>
<el-option
v-for="item in options1"
:key="item.value"
@ -44,23 +44,23 @@
<el-form-item :label="t('baseDevice.baseDevice.activeTime')" prop="activeTime">
<el-date-picker
v-model="queryParams.activeTime"
value-format="YYYY-MM-DD"
:size="size"
end-placeholder="结束时间"
range-separator="到"
start-placeholder="开始时间"
type="daterange"
value-format="YYYY-MM-DD"
/>
</el-form-item>
<el-form-item :label="t('baseDevice.baseDevice.lastRunTime')" prop="lastRunTime">
<el-date-picker
v-model="queryParams.lastRunTime"
value-format="YYYY-MM-DD"
:size="size"
end-placeholder="结束时间"
range-separator="到"
start-placeholder="开始时间"
type="daterange"
value-format="YYYY-MM-DD"
/>
</el-form-item>
<el-form-item label=" ">

@ -97,7 +97,7 @@
function handleQuery() {
getTempdata(proxy.addDateRange(queryParams.value, dateRange.value)).then(response => {
tempRef.value.setData(response.data);
pieRef.value.setData(response.data);
pieRef.value.setData(response?.data?.WarnData);
}).finally(() => {
//loading.value = false;
});

@ -100,6 +100,9 @@
<el-form-item label="传感器ID" style="width: 100%;">
<el-input v-model="form2.sensorId"/>
</el-form-item>
<el-form-item label="里程" style="width: 100%;">
<el-input v-model="form2.carOnlineMileage"/>
</el-form-item>
<el-form-item label="当前花纹深度" style="width: 100%;">
<el-input-number v-model="form2.currentTextureDepth" :precision="2" :step="0.1"/>
&nbsp; &nbsp;
@ -151,6 +154,7 @@ const form2 = ref({
sensorId: "",
size: "",
tyrePositionVal: '',
carOnlineMileage:'',
tyrePosition: "",
})
const rules = {
@ -228,6 +232,7 @@ const carQueueChange = (e) => {
size: "",
tyrePositionVal: '',
tyrePosition: "",
carOnlineMileage:'',
tyreiId: ''
}
let option = carQueueList.value.filter(res => res.id === e)[0]?.baseCarList || []
@ -248,6 +253,7 @@ const licenseNumberChange = async (e) => {
sensorId: "",
size: "",
tyrePositionVal: "",
carOnlineMileage:'',
tyrePosition: "",
tyreiId: ''
}
@ -299,7 +305,7 @@ const outerTireNumberSearchClick = async () => {
form2.value.size = data.size
form2.value.sensorId = data.sensorId
form2.value.tyreId = data.id
form2.value.tyrePosition = nowClick.value + '-' + num
form2.value.tyrePosition = nowClick.value
}
const installClick = (e) => {

@ -123,6 +123,11 @@ const getList = () => {
})
wayList.value = arr
repetitiveBackground.value = Math.round(arr.at(-1).step / 10) + 1
arr.push({
// datetime: 1678199843735,
description: '终点',
step: (Math.round(arr.at(-1).step / 10) + 1) * 10 - 1
})
}
const outerTireNumberSearchClick = async () => {
if (!tireInfo.value.title) return

Loading…
Cancel
Save