修改提交
This commit is contained in:
parent
388f436226
commit
c93af16eee
@ -32,7 +32,7 @@ import SidebarView from './components/sidebar.vue'
|
||||
display: flex;
|
||||
}
|
||||
.app-layout__main-content {
|
||||
width: calc(100% - 240px);
|
||||
width: calc(100% - 200px);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -97,7 +97,7 @@ onUnmounted(() => {
|
||||
color: rgb(31, 41, 55);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 30px;
|
||||
padding: 0 20px;
|
||||
gap: 20px;
|
||||
box-shadow: 0px 2px 8px rgb(219, 225, 236);
|
||||
position: relative;
|
||||
@ -111,16 +111,17 @@ onUnmounted(() => {
|
||||
font-style: normal;
|
||||
font-size: 18px;
|
||||
color: #1F2937;
|
||||
width: 210px;
|
||||
width: 160px;
|
||||
}
|
||||
|
||||
.header-container-center {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: calc(100% - 300px);
|
||||
gap: 40px;
|
||||
gap: 20px;
|
||||
font-weight: 400;
|
||||
color: #505050;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.header-container-right-time {
|
||||
|
||||
@ -178,7 +178,7 @@ const isActive = (path: any) => {
|
||||
|
||||
<style scoped lang="scss">
|
||||
.sidebar-container {
|
||||
width: 240px;
|
||||
width: 200px;
|
||||
height: calc(100vh - 60px);
|
||||
background-color: #ffffff;
|
||||
box-sizing: border-box;
|
||||
|
||||
@ -115,7 +115,7 @@ onMounted(() => {
|
||||
.ai-alarm-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 20px;
|
||||
padding: 15px;
|
||||
|
||||
.panel {
|
||||
background: #fff;
|
||||
|
||||
@ -118,17 +118,17 @@ onMounted(() => {
|
||||
.ai-channel-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 20px;
|
||||
padding: 15px;
|
||||
|
||||
.panel {
|
||||
background: #fff;
|
||||
border-radius: 6px;
|
||||
padding: 16px;
|
||||
padding: 12px;
|
||||
box-shadow: 0px 0px 10px rgba(219, 225, 236, 1);
|
||||
}
|
||||
|
||||
.title {
|
||||
margin: 0 0 16px 0;
|
||||
margin: 0 0 10px 0;
|
||||
font-weight: 700;
|
||||
font-style: normal;
|
||||
font-size: 16px;
|
||||
@ -205,7 +205,7 @@ onMounted(() => {
|
||||
}
|
||||
|
||||
.btn-wrap {
|
||||
margin-top: 20px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.save-btn {
|
||||
|
||||
@ -118,7 +118,7 @@ onMounted(() => {
|
||||
.ai-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 20px;
|
||||
padding: 15px;
|
||||
|
||||
.top-title {
|
||||
font-weight: 700;
|
||||
|
||||
@ -235,7 +235,7 @@ onMounted(() => {
|
||||
.analog-quantity-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 20px;
|
||||
padding: 15px;
|
||||
|
||||
.top-title {
|
||||
font-weight: 700;
|
||||
@ -285,6 +285,7 @@ onMounted(() => {
|
||||
border-radius: 4px;
|
||||
padding: 0px 24px;
|
||||
text-align: center;
|
||||
|
||||
}
|
||||
|
||||
.nav-box-line-item-checked {
|
||||
@ -335,6 +336,7 @@ onMounted(() => {
|
||||
border-radius: 4px;
|
||||
background: #ffffff;
|
||||
color: #363636;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -119,17 +119,17 @@ onMounted(() => {
|
||||
.ao-channel-contaoner {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 20px;
|
||||
padding: 15px;
|
||||
|
||||
.panel {
|
||||
background: #fff;
|
||||
border-radius: 6px;
|
||||
padding: 16px;
|
||||
padding: 12px;
|
||||
box-shadow: 0px 0px 10px rgba(219, 225, 236, 1);
|
||||
}
|
||||
|
||||
.title {
|
||||
margin: 0 0 16px 0;
|
||||
margin: 0 0 12px 0;
|
||||
font-weight: 700;
|
||||
font-style: normal;
|
||||
font-size: 16px;
|
||||
@ -206,7 +206,7 @@ onMounted(() => {
|
||||
}
|
||||
|
||||
.btn-wrap {
|
||||
margin-top: 20px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.save-btn {
|
||||
|
||||
@ -239,7 +239,7 @@ onMounted(() => {
|
||||
.communication-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 20px;
|
||||
padding: 15px;
|
||||
|
||||
.form-wrapper {
|
||||
background: #fff;
|
||||
|
||||
@ -68,12 +68,12 @@ onUnmounted(() => {
|
||||
}
|
||||
|
||||
.dashboard-container-left {
|
||||
width: 240px;
|
||||
width: 200px;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.dashboard-container-header {
|
||||
width: 100%;
|
||||
width: 200px;
|
||||
height: 60px;
|
||||
background-color: #ffffff;
|
||||
border-width: 1px;
|
||||
@ -92,7 +92,7 @@ onUnmounted(() => {
|
||||
}
|
||||
|
||||
.dashboard-container-right {
|
||||
width: calc(100% - 240px);
|
||||
width: calc(100% - 200px);
|
||||
background: url('@/assets/images/dashboard/bg.png') no-repeat;
|
||||
background-size: 100% 100%;
|
||||
display: flex;
|
||||
|
||||
@ -74,7 +74,7 @@ onMounted(() => {
|
||||
.device-info-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 20px;
|
||||
padding: 15px;
|
||||
|
||||
.container-box {
|
||||
display: flex;
|
||||
@ -85,9 +85,7 @@ onMounted(() => {
|
||||
box-shadow: 0px 0px 10px rgba(219, 225, 236, 1);
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 100px;
|
||||
min-height: 480px;
|
||||
min-width: 820px;
|
||||
gap: 50px;
|
||||
}
|
||||
|
||||
.box-item {
|
||||
|
||||
@ -19,10 +19,11 @@ const handleQuery = () => {
|
||||
const params: any = {
|
||||
page: pagination.value.currentPage,
|
||||
size: pagination.value.pageSize,
|
||||
// no: formData.value.no,
|
||||
// type: formData.value.type,
|
||||
// start_time: formData.value.timeRange[0],
|
||||
// end_time: formData.value.timeRange[1],
|
||||
type: formData.value.type,
|
||||
}
|
||||
if (formData.value.timeRange && formData.value.timeRange.length > 0) {
|
||||
params.start_time = formData.value.timeRange[0]
|
||||
params.end_time = formData.value.timeRange[1]
|
||||
}
|
||||
fetchAlarmHistory(params).then((res: any) => {
|
||||
tableData.value = res
|
||||
@ -32,12 +33,12 @@ const handleQuery = () => {
|
||||
const handleSizeChange = (val: number) => {
|
||||
pagination.value.pageSize = val
|
||||
pagination.value.currentPage = 1
|
||||
init()
|
||||
handleQuery()
|
||||
}
|
||||
|
||||
const handleCurrentChange = (val: number) => {
|
||||
pagination.value.currentPage = val
|
||||
init()
|
||||
handleQuery()
|
||||
}
|
||||
function init() {
|
||||
const params: any = {
|
||||
@ -59,14 +60,15 @@ onMounted(() => {
|
||||
<template>
|
||||
<div class="event-report-container">
|
||||
<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-select>
|
||||
<el-select v-model="formData.type" placeholder="事件类型" style="width: 180px; margin-left: 15px">
|
||||
</el-select> -->
|
||||
<!-- <el-select v-model="formData.type" placeholder="事件类型" style="width: 180px; margin-left: 15px">
|
||||
<el-option label="操作事件" value="操作事件" />
|
||||
<el-option label="报警事件" value="报警事件" />
|
||||
</el-select>
|
||||
</el-select> -->
|
||||
<el-input v-model="formData.type" placeholder="请输入事件类型" style="width: 180px" />
|
||||
<div>
|
||||
<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"
|
||||
@ -88,14 +90,14 @@ onMounted(() => {
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="事件类型" prop="type" align="center" />
|
||||
<el-table-column label="事件等级" prop="level" align="center" />
|
||||
<el-table-column label="事件详情" prop="content" align="center" />
|
||||
<el-table-column label="发生时间" prop="time" align="center" />
|
||||
<el-table-column label="事件等级" prop="level" width="80" align="center" />
|
||||
<el-table-column label="事件详情" prop="content" min-width="120px" align="center" />
|
||||
<el-table-column label="发生时间" prop="time" min-width="100px" align="center" />
|
||||
</el-table>
|
||||
<div class="pagination">
|
||||
<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"
|
||||
:total="pagination.total" layout="prev, pager, next, total, sizes" />
|
||||
:total="pagination.total" layout="prev, pager, next, sizes" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive,onMounted } from 'vue'
|
||||
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'
|
||||
const formRef = ref<FormInstance>()
|
||||
|
||||
@ -11,7 +11,7 @@ const form = reactive({
|
||||
newPassword: '',
|
||||
confirmPassword: ''
|
||||
})
|
||||
|
||||
const deviceConfig: any = ref({})
|
||||
// 校验规则
|
||||
const rules: FormRules = {
|
||||
oldPassword: [
|
||||
@ -45,35 +45,35 @@ const handleSubmit = async () => {
|
||||
isSubmit.value = true
|
||||
verifyAccessPassword(form.oldPassword).then(res => {
|
||||
if (res.data) {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
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
|
||||
// }
|
||||
// message: '原密码验证成功',
|
||||
// })
|
||||
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 {
|
||||
ElMessage({
|
||||
type: 'error',
|
||||
message: '原密码验证失败',
|
||||
})
|
||||
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(() => {
|
||||
init()
|
||||
@ -104,7 +105,7 @@ onMounted(() => {
|
||||
密码设置
|
||||
</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-input v-model="form.oldPassword" type="password" placeholder="请输入原密码" show-password />
|
||||
</el-form-item>
|
||||
@ -131,7 +132,7 @@ onMounted(() => {
|
||||
.password-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 20px;
|
||||
padding: 15px;
|
||||
|
||||
.password-container-content {
|
||||
width: 100%;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user