修改提交

This commit is contained in:
jingna 2026-05-19 09:14:37 +08:00
parent 388f436226
commit c93af16eee
13 changed files with 77 additions and 73 deletions

View File

@ -32,7 +32,7 @@ import SidebarView from './components/sidebar.vue'
display: flex; display: flex;
} }
.app-layout__main-content { .app-layout__main-content {
width: calc(100% - 240px); width: calc(100% - 200px);
} }
} }
</style> </style>

View File

@ -97,7 +97,7 @@ onUnmounted(() => {
color: rgb(31, 41, 55); color: rgb(31, 41, 55);
display: flex; display: flex;
align-items: center; align-items: center;
padding: 0 30px; padding: 0 20px;
gap: 20px; gap: 20px;
box-shadow: 0px 2px 8px rgb(219, 225, 236); box-shadow: 0px 2px 8px rgb(219, 225, 236);
position: relative; position: relative;
@ -111,16 +111,17 @@ onUnmounted(() => {
font-style: normal; font-style: normal;
font-size: 18px; font-size: 18px;
color: #1F2937; color: #1F2937;
width: 210px; width: 160px;
} }
.header-container-center { .header-container-center {
display: flex; display: flex;
align-items: center; align-items: center;
width: calc(100% - 300px); width: calc(100% - 300px);
gap: 40px; gap: 20px;
font-weight: 400; font-weight: 400;
color: #505050; color: #505050;
font-size: 14px;
} }
.header-container-right-time { .header-container-right-time {

View File

@ -178,7 +178,7 @@ const isActive = (path: any) => {
<style scoped lang="scss"> <style scoped lang="scss">
.sidebar-container { .sidebar-container {
width: 240px; width: 200px;
height: calc(100vh - 60px); height: calc(100vh - 60px);
background-color: #ffffff; background-color: #ffffff;
box-sizing: border-box; box-sizing: border-box;

View File

@ -115,7 +115,7 @@ onMounted(() => {
.ai-alarm-container { .ai-alarm-container {
width: 100%; width: 100%;
height: 100%; height: 100%;
padding: 20px; padding: 15px;
.panel { .panel {
background: #fff; background: #fff;

View File

@ -118,17 +118,17 @@ onMounted(() => {
.ai-channel-container { .ai-channel-container {
width: 100%; width: 100%;
height: 100%; height: 100%;
padding: 20px; padding: 15px;
.panel { .panel {
background: #fff; background: #fff;
border-radius: 6px; border-radius: 6px;
padding: 16px; padding: 12px;
box-shadow: 0px 0px 10px rgba(219, 225, 236, 1); box-shadow: 0px 0px 10px rgba(219, 225, 236, 1);
} }
.title { .title {
margin: 0 0 16px 0; margin: 0 0 10px 0;
font-weight: 700; font-weight: 700;
font-style: normal; font-style: normal;
font-size: 16px; font-size: 16px;
@ -205,7 +205,7 @@ onMounted(() => {
} }
.btn-wrap { .btn-wrap {
margin-top: 20px; margin-top: 10px;
} }
.save-btn { .save-btn {

View File

@ -118,7 +118,7 @@ onMounted(() => {
.ai-container { .ai-container {
width: 100%; width: 100%;
height: 100%; height: 100%;
padding: 20px; padding: 15px;
.top-title { .top-title {
font-weight: 700; font-weight: 700;

View File

@ -235,7 +235,7 @@ onMounted(() => {
.analog-quantity-container { .analog-quantity-container {
width: 100%; width: 100%;
height: 100%; height: 100%;
padding: 20px; padding: 15px;
.top-title { .top-title {
font-weight: 700; font-weight: 700;
@ -285,6 +285,7 @@ onMounted(() => {
border-radius: 4px; border-radius: 4px;
padding: 0px 24px; padding: 0px 24px;
text-align: center; text-align: center;
} }
.nav-box-line-item-checked { .nav-box-line-item-checked {
@ -335,6 +336,7 @@ onMounted(() => {
border-radius: 4px; border-radius: 4px;
background: #ffffff; background: #ffffff;
color: #363636; color: #363636;
overflow: hidden;
} }
} }
} }

View File

@ -119,17 +119,17 @@ onMounted(() => {
.ao-channel-contaoner { .ao-channel-contaoner {
width: 100%; width: 100%;
height: 100%; height: 100%;
padding: 20px; padding: 15px;
.panel { .panel {
background: #fff; background: #fff;
border-radius: 6px; border-radius: 6px;
padding: 16px; padding: 12px;
box-shadow: 0px 0px 10px rgba(219, 225, 236, 1); box-shadow: 0px 0px 10px rgba(219, 225, 236, 1);
} }
.title { .title {
margin: 0 0 16px 0; margin: 0 0 12px 0;
font-weight: 700; font-weight: 700;
font-style: normal; font-style: normal;
font-size: 16px; font-size: 16px;
@ -206,7 +206,7 @@ onMounted(() => {
} }
.btn-wrap { .btn-wrap {
margin-top: 20px; margin-top: 10px;
} }
.save-btn { .save-btn {

View File

@ -239,7 +239,7 @@ onMounted(() => {
.communication-container { .communication-container {
width: 100%; width: 100%;
height: 100%; height: 100%;
padding: 20px; padding: 15px;
.form-wrapper { .form-wrapper {
background: #fff; background: #fff;

View File

@ -68,12 +68,12 @@ onUnmounted(() => {
} }
.dashboard-container-left { .dashboard-container-left {
width: 240px; width: 200px;
height: 100vh; height: 100vh;
} }
.dashboard-container-header { .dashboard-container-header {
width: 100%; width: 200px;
height: 60px; height: 60px;
background-color: #ffffff; background-color: #ffffff;
border-width: 1px; border-width: 1px;
@ -92,7 +92,7 @@ onUnmounted(() => {
} }
.dashboard-container-right { .dashboard-container-right {
width: calc(100% - 240px); width: calc(100% - 200px);
background: url('@/assets/images/dashboard/bg.png') no-repeat; background: url('@/assets/images/dashboard/bg.png') no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
display: flex; display: flex;

View File

@ -74,7 +74,7 @@ onMounted(() => {
.device-info-container { .device-info-container {
width: 100%; width: 100%;
height: 100%; height: 100%;
padding: 20px; padding: 15px;
.container-box { .container-box {
display: flex; display: flex;
@ -85,9 +85,7 @@ onMounted(() => {
box-shadow: 0px 0px 10px rgba(219, 225, 236, 1); box-shadow: 0px 0px 10px rgba(219, 225, 236, 1);
align-items: center; align-items: center;
justify-content: center; justify-content: center;
gap: 100px; gap: 50px;
min-height: 480px;
min-width: 820px;
} }
.box-item { .box-item {

View File

@ -19,10 +19,11 @@ const handleQuery = () => {
const params: any = { const params: any = {
page: pagination.value.currentPage, page: pagination.value.currentPage,
size: pagination.value.pageSize, size: pagination.value.pageSize,
// no: formData.value.no, type: formData.value.type,
// type: formData.value.type, }
// start_time: formData.value.timeRange[0], if (formData.value.timeRange && formData.value.timeRange.length > 0) {
// end_time: formData.value.timeRange[1], params.start_time = formData.value.timeRange[0]
params.end_time = formData.value.timeRange[1]
} }
fetchAlarmHistory(params).then((res: any) => { fetchAlarmHistory(params).then((res: any) => {
tableData.value = res tableData.value = res
@ -32,12 +33,12 @@ const handleQuery = () => {
const handleSizeChange = (val: number) => { const handleSizeChange = (val: number) => {
pagination.value.pageSize = val pagination.value.pageSize = val
pagination.value.currentPage = 1 pagination.value.currentPage = 1
init() handleQuery()
} }
const handleCurrentChange = (val: number) => { const handleCurrentChange = (val: number) => {
pagination.value.currentPage = val pagination.value.currentPage = val
init() handleQuery()
} }
function init() { function init() {
const params: any = { const params: any = {
@ -59,14 +60,15 @@ onMounted(() => {
<template> <template>
<div class="event-report-container"> <div class="event-report-container">
<div class="search-box"> <div class="search-box">
<el-select v-model="formData.no" placeholder="所属线路" style="width: 180px"> <!-- <el-select v-model="formData.no" placeholder="所属线路" style="width: 180px">
<el-option label="线路一" value="线路一" /> <el-option label="线路一" value="线路一" />
<el-option label="线路二" value="线路二" /> <el-option label="线路二" value="线路二" />
</el-select> </el-select> -->
<el-select v-model="formData.type" placeholder="事件类型" style="width: 180px; margin-left: 15px"> <!-- <el-select v-model="formData.type" placeholder="事件类型" style="width: 180px; margin-left: 15px">
<el-option label="操作事件" value="操作事件" /> <el-option label="操作事件" value="操作事件" />
<el-option label="报警事件" value="报警事件" /> <el-option label="报警事件" value="报警事件" />
</el-select> </el-select> -->
<el-input v-model="formData.type" placeholder="请输入事件类型" style="width: 180px" />
<div> <div>
<el-date-picker v-model="formData.timeRange" type="datetimerange" start-placeholder="开始时间" <el-date-picker v-model="formData.timeRange" type="datetimerange" start-placeholder="开始时间"
end-placeholder="结束时间" format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" end-placeholder="结束时间" format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
@ -88,14 +90,14 @@ onMounted(() => {
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="事件类型" prop="type" align="center" /> <el-table-column label="事件类型" prop="type" align="center" />
<el-table-column label="事件等级" prop="level" align="center" /> <el-table-column label="事件等级" prop="level" width="80" align="center" />
<el-table-column label="事件详情" prop="content" align="center" /> <el-table-column label="事件详情" prop="content" min-width="120px" align="center" />
<el-table-column label="发生时间" prop="time" align="center" /> <el-table-column label="发生时间" prop="time" min-width="100px" align="center" />
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination v-model:current-page="pagination.currentPage" v-model:page-size="pagination.pageSize" <el-pagination v-model:current-page="pagination.currentPage" v-model:page-size="pagination.pageSize"
:page-sizes="[10, 20, 30, 40]" @size-change="handleSizeChange" @current-change="handleCurrentChange" :page-sizes="[10, 20, 30, 40]" @size-change="handleSizeChange" @current-change="handleCurrentChange"
:total="pagination.total" layout="prev, pager, next, total, sizes" /> :total="pagination.total" layout="prev, pager, next, sizes" />
</div> </div>
</div> </div>
</div> </div>

View File

@ -1,7 +1,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, reactive,onMounted } from 'vue' import { ref, reactive,onMounted } from 'vue'
import type { FormInstance, FormRules } from 'element-plus' import type { FormInstance, FormRules } from 'element-plus'
import { verifyAccessPassword,saveDeviceConfig } from '@/api/platform' import { verifyAccessPassword,saveDeviceConfig,fetchDeviceConfig } from '@/api/platform'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
const formRef = ref<FormInstance>() const formRef = ref<FormInstance>()
@ -11,7 +11,7 @@ const form = reactive({
newPassword: '', newPassword: '',
confirmPassword: '' confirmPassword: ''
}) })
const deviceConfig: any = ref({})
// //
const rules: FormRules = { const rules: FormRules = {
oldPassword: [ oldPassword: [
@ -45,35 +45,35 @@ const handleSubmit = async () => {
isSubmit.value = true isSubmit.value = true
verifyAccessPassword(form.oldPassword).then(res => { verifyAccessPassword(form.oldPassword).then(res => {
if (res.data) { if (res.data) {
ElMessage({ // ElMessage({
type: 'success', // type: 'success',
message: '原密码验证成功', // message: '',
})
// saveDeviceConfig({
// password: form.newPassword,
// hardware_version: '',
// software_version: '',
// net: '',
// uart: '',
// }).then(res => {
// if (res.data) {
// ElMessage({
// type: 'success',
// message: '',
// })
// isSubmit.value = false
// } else {
// ElMessage({
// type: 'info',
// message: '',
// })
// isSubmit.value = false
// return
// }
// }) // })
saveDeviceConfig({
password: form.newPassword,
hardware_version: deviceConfig.value.hardware_version,
software_version: deviceConfig.value.software_version,
net: deviceConfig.value.net,
uart: deviceConfig.value.uart,
}).then(res => {
if (res.data) {
ElMessage({
type: 'success',
message: '密码设置成功',
})
isSubmit.value = false
} else {
ElMessage({
type: 'info',
message: '密码设置失败',
})
isSubmit.value = false
return
}
})
} else { } else {
ElMessage({ ElMessage({
type: 'info', type: 'error',
message: '原密码验证失败', message: '原密码验证失败',
}) })
isSubmit.value = false isSubmit.value = false
@ -83,12 +83,13 @@ const handleSubmit = async () => {
} }
}) })
} }
function init() {
// getDeviceConfig().then(res => {
// if (res.data) {
// } function init() {
// }) fetchDeviceConfig().then(res => {
if (res) {
deviceConfig.value = res
}
})
} }
onMounted(() => { onMounted(() => {
init() init()
@ -104,7 +105,7 @@ onMounted(() => {
密码设置 密码设置
</div> </div>
<!-- 表单 --> <!-- 表单 -->
<el-form ref="formRef" :model="form" :rules="rules" label-width="90px" class="password-form"> <el-form ref="formRef" :model="form" :rules="rules" label-width="100px" class="password-form">
<el-form-item label="原密码" prop="oldPassword"> <el-form-item label="原密码" prop="oldPassword">
<el-input v-model="form.oldPassword" type="password" placeholder="请输入原密码" show-password /> <el-input v-model="form.oldPassword" type="password" placeholder="请输入原密码" show-password />
</el-form-item> </el-form-item>
@ -131,7 +132,7 @@ onMounted(() => {
.password-container { .password-container {
width: 100%; width: 100%;
height: 100%; height: 100%;
padding: 20px; padding: 15px;
.password-container-content { .password-container-content {
width: 100%; width: 100%;