| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> |
| | | <el-form-item label="设备名称" prop="name"> |
| | | <el-card class="box-card" > |
| | | <el-row type="flex" align="middle" justify="space-between"> |
| | | <el-col :xl="8" :lg="8" :md="10" :sm="8" :xs="6"> |
| | | <div class="icon-container" style="background-color: #5599F7"> |
| | | <i class="el-icon-truck"></i> |
| | | </div> |
| | | </el-col> |
| | | <el-col :xl="14" :lg="14" :md="12" :sm="14" :xs="16"> |
| | | <div class="dashboard"> |
| | | <div class="dashboard-item"> |
| | | <h3 style="color: #5C9BF8">{{ count.totalPosts }}</h3> |
| | | <p>设备总数</p > |
| | | </div> |
| | | <div class="dashboard-item"> |
| | | <h3 style="color: #3eba45">{{ count.totalMembers }}</h3> |
| | | <p>正常数</p > |
| | | </div> |
| | | <div class="dashboard-item"> |
| | | <h3 style="color: #fe640d">{{ count.postsPercentage }}</h3> |
| | | <p>异常数</p > |
| | | </div> |
| | | <div class="dashboard-item"> |
| | | <h3>{{ count.totalViews }}</h3> |
| | | <p>生成异常工单数</p > |
| | | </div> |
| | | <div class="dashboard-item"> |
| | | <h3>{{ count.totalCar }}</h3> |
| | | <p>过车数据总量</p > |
| | | </div> |
| | | <div class="dashboard-item"> |
| | | <h3>{{ count.viewsPercentage }}%</h3> |
| | | <p>设备运行率</p > |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | </el-card> |
| | | |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"> |
| | | <el-form-item label="关键字" prop="name"> |
| | | <el-input |
| | | v-model="queryParams.name" |
| | | placeholder="请输入设备名称" |
| | | placeholder="请输入关键字" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="区域" prop="onState"> |
| | | <el-select |
| | | v-model="queryParams.address" |
| | | placeholder="请选择区域" |
| | | clearable |
| | | > |
| | | <el-option label="自贡市" value="自贡市"/> |
| | | <el-option label="沿滩区" value="沿滩区"/> |
| | | <el-option label="大安区" value="大安区"/> |
| | | <el-option label="贡井区" value="贡井区"/> |
| | | <el-option label="自流井区" value="自流井区"/> |
| | | <el-option label="高新区" value="高新区"/> |
| | | <el-option label="荣县" value="荣县"/> |
| | | <el-option label="富顺县" value="富顺县"/> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="设备状态" prop="onState"> |
| | | <el-select |
| | |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="地址" prop="address"> |
| | | <el-input |
| | | v-model="queryParams.address" |
| | | placeholder="请输入行政区域" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="安装时间" prop="installedTime"> |
| | | <el-date-picker clearable |
| | | v-model="queryParams.installedTime" |
| | | type="date" |
| | | value-format="yyyy-MM-dd" |
| | | placeholder="请选择安装时间"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="管理单位" prop="managementUnit"> |
| | | <el-input |
| | | v-model="queryParams.managementUnit" |
| | | placeholder="请输入管理单位" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="是否生成异常工单" prop="defaultOrder" label-width="130px"> |
| | | <el-select |
| | | v-model="queryParams.defaultOrder" |
| | |
| | | icon="el-icon-download" |
| | | size="mini" |
| | | @click="handleExport" |
| | | v-hasPermi="['system:monitor:export']" |
| | | >导出</el-button> |
| | | </el-col> |
| | | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| | | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar> |
| | | </el-row> |
| | | |
| | | <el-table v-loading="loading" :data="monitorList" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column label="设备编码" align="center" prop="serialNumber" /> |
| | | <el-table-column label="设备名称" align="center" prop="name" /> |
| | | <el-table-column label="设备状态" align="center" prop="onState"> |
| | | <el-table-column type="selection" align="center" /> |
| | | <el-table-column label="设备名称" align="center" prop="name" width="280" fixed/> |
| | | <el-table-column label="设备编码" align="center" prop="serialNumber" width="180"/> |
| | | <el-table-column label="标签" align="center" prop="publicSecurity" width="180" v-if="columns[0].visible"/> |
| | | <el-table-column label="区域" align="center" prop="address" width="180" v-if="columns[1].visible"/> |
| | | <el-table-column label="设备状态" align="center" prop="onState" v-if="columns[2].visible"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.camera_state" :value="scope.row.onState"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="地址" align="center" prop="address" /> |
| | | <el-table-column label="是否生成异常工单" align="center" prop="defaultOrder"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.platform_yes_no" :value="scope.row.defaultOrder"/> |
| | | </template> |
| | | <el-table-column label="是否生成异常工单" align="center" prop="defaultOrder" width="180" v-if="columns[3].visible"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.platform_yes_no" :value="scope.row.defaultOrder"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="异常原因" align="center" prop="reason" /> |
| | | <el-table-column label="安装时间" align="center" prop="installedTime" width="180"> |
| | | </el-table-column> |
| | | <el-table-column label="管理单位" align="center" prop="managementUnit" /> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-view" |
| | | @click="handleView(scope.row,scope.index)" |
| | | v-hasPermi="['system:monitor:query']" |
| | | >详细</el-button> |
| | | </template> |
| | | <el-table-column label="数据时间" align="center" prop="installedTime" width="180" v-if="columns[4].visible"/> |
| | | <el-table-column label="管理单位" align="center" prop="managementUnit" width="180" v-if="columns[5].visible"/> |
| | | <el-table-column label="过车数据量" align="center" prop="a" width="180" v-if="columns[6].visible"/> |
| | | <el-table-column label="持续无数据天数" align="center" prop="a" width="180" v-if="columns[7].visible"/> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-view" |
| | | @click="handleView(scope.row,scope.index)" |
| | | >详细</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | |
| | | <el-col :span="12"> |
| | | <el-form-item label="设备编码:">{{ form.serialNumber }}</el-form-item> |
| | | <el-form-item label="设备名称:">{{ form.name }} </el-form-item> |
| | | <el-form-item label="地区:">{{ form.address }} </el-form-item> |
| | | <el-form-item label="上报部门:">{{ form.deptName }} </el-form-item> |
| | | <el-form-item label="设备状态:"> |
| | | <div v-if="form.onState === 1">可用</div> |
| | | <div v-else-if="form.onState === 2">不可用</div> |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="地址:">{{ form.address }}</el-form-item> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="异常原因:">{{ form.reason }}</el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="安装时间:">{{ form.installedTime }}</el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="管理单位:">{{ form.managementUnit }}</el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="过车数据量:">{{ form.a }}</el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="持续无数据天数:">{{ form.a }}</el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { listMonitor, getMonitor, delMonitor, addMonitor, updateMonitor } from "@/api/platform/monitor"; |
| | | import { videoCount, listMonitor, getMonitor, delMonitor, addMonitor, updateMonitor } from "@/api/platform/monitor"; |
| | | |
| | | export default { |
| | | name: "Monitor", |
| | | dicts: ['sys_normal_disable','platform_yes_no','camera_state'], |
| | | data() { |
| | | return { |
| | | // 列信息 |
| | | columns: [ |
| | | { key: 0, label: `标签`, visible: true }, |
| | | { key: 1, label: `区域`, visible: true }, |
| | | { key: 2, label: `设备状态`, visible: true }, |
| | | { key: 3, label: `是否生成异常工单`, visible: true }, |
| | | { key: 4, label: `数据时间`, visible: true }, |
| | | { key: 5, label: `管理单位`, visible: true }, |
| | | { key: 6, label: `过车数据量`, visible: true }, |
| | | { key: 7, label: `持续无数据天数`, visible: true }, |
| | | ], |
| | | count: { |
| | | totalPosts: 0, |
| | | totalMembers: 0, |
| | | postsPercentage: 0, |
| | | totalViews: 0, |
| | | viewsPercentage: 0, |
| | | totalCar: 0, |
| | | }, |
| | | // 遮罩层 |
| | | loading: true, |
| | | // 选中数组 |
| | |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getVideoCount(); |
| | | this.getList(); |
| | | }, |
| | | methods: { |
| | |
| | | this.monitorList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | /** 查询设备资产统计数 */ |
| | | getVideoCount() { |
| | | videoCount('2').then(response => { |
| | | this.count = response.data; |
| | | }); |
| | | }, |
| | | // 取消按钮 |
| | |
| | | this.queryParams.pageNum = 1; |
| | | this.queryParams.cameraFunType = 2; |
| | | this.getList(); |
| | | this.getVideoCount(); |
| | | }, |
| | | /** 重置按钮操作 */ |
| | | resetQuery() { |
| | |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | |
| | | .box-card { |
| | | background-color: #F5F9FE; |
| | | width: 100%; |
| | | margin-bottom: 20px; |
| | | height: 120px |
| | | } |
| | | .icon-container { |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | border-radius: 20px; |
| | | width: 20%; |
| | | height: 80px; |
| | | margin-left: 5%; |
| | | } |
| | | .el-icon-truck { |
| | | font-size: 50px; |
| | | color: #FFFFFF; |
| | | } |
| | | |
| | | .dashboard { |
| | | display: flex; |
| | | gap: 10%; |
| | | align-items: center; |
| | | margin-left: -50%; |
| | | } |
| | | |
| | | .dashboard-item { |
| | | text-align: center; |
| | | } |
| | | </style> |