| | |
| | | <el-form-item label="关键词" prop="bayonetNumber"> |
| | | <el-input v-model="queryParams.keyword" placeholder="关键词搜索" clearable @input="handleQuery"/> |
| | | </el-form-item> |
| | | <el-form-item label="时间范围" prop="timeRange"> |
| | | <el-date-picker |
| | | v-model="queryParams.timeRange" |
| | | type="daterange" |
| | | range-separator="至" |
| | | value-format="yyyy-MM-dd" |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期"> |
| | | </el-date-picker> |
| | | <el-form-item label="时间" prop="date"> |
| | | <el-date-picker |
| | | v-model="queryParams.date" |
| | | type="date" |
| | | placeholder="选择日期" |
| | | value-format="yyyy-MM-dd"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">搜索</el-button> |
| | |
| | | |
| | | <script> |
| | | import {dataCenter} from "@/api/platform/data-center"; |
| | | import {videoData, carData, faceData, equipment} from "./list"; |
| | | import {carData, equipment, faceData, videoData} from "./list"; |
| | | import {listSecurity, updateSecurity} from '@/api/platform/resource-security'; |
| | | import {getToken} from "@/utils/auth"; |
| | | |
| | |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | keyword: '', |
| | | timeRange: [], |
| | | date: '', |
| | | dataType: 0, |
| | | }, |
| | | // 表单参数 |
| | |
| | | // 获取当前日期 |
| | | const today = new Date(); |
| | | |
| | | // 将日期减去一天 |
| | | const yesterday = new Date(today.getTime() - 24 * 60 * 60 * 1000); |
| | | |
| | | // 获取年、月、日 |
| | | const year = yesterday.getFullYear(); |
| | | let month = (yesterday.getMonth() + 1).toString().padStart(2, '0'); // 月份是从0开始的,所以加1 |
| | | let day = yesterday.getDate().toString().padStart(2, '0'); |
| | | const year = today.getFullYear(); |
| | | let month = (today.getMonth() + 1).toString().padStart(2, '0'); // 月份是从0开始的,所以加1 |
| | | let day = today.getDate().toString().padStart(2, '0'); |
| | | |
| | | // 拼接成 yyyy-MM-dd 格式 |
| | | let yesterday1 = `${year}-${month}-${day}`; |
| | | this.queryParams.timeRange = [yesterday1, yesterday1] |
| | | this.index = this.$route.query.index; |
| | | this.queryParams.date = `${year}-${month}-${day}`; |
| | | if (this.$route.query.type === '1') { |
| | | let data = videoData.table.filter(item => item.index === this.$route.query.index)[0] |
| | | this.tableHead = data.columns; |
| | |
| | | this.cardList = data.card; |
| | | this.showList = data.showList; |
| | | } |
| | | this.getDicts(this.$route.query.dict) |
| | | this.getList(); |
| | | }, |
| | | methods: { |
| | |
| | | this.loading = true; |
| | | if (this.index === 'image_resource_security') { |
| | | this.getSecurityCard() |
| | | } |
| | | if (this.queryParams.timeRange && this.queryParams.timeRange.length > 0) { |
| | | this.queryParams.startTime = this.queryParams.timeRange[0] |
| | | this.queryParams.endTime = this.queryParams.timeRange[1] |
| | | } |
| | | dataCenter(url, this.queryParams).then(response => { |
| | | response.data.list = response.data.list && response.data.list.length > 0 ? response.data.list : [] |
| | |
| | | width: 200, |
| | | }, |
| | | { |
| | | label: '最近监测在线状态', |
| | | label: '设备状态', |
| | | align: 'center', |
| | | prop: 'onlineStr', |
| | | width: 200, |
| | | }, |
| | | { |
| | | label: '最近Ping监测状态', |
| | | align: 'center', |
| | | prop: 'pingOnlineStr', |
| | | width: 200, |
| | | }, |
| | | { |
| | |
| | | width: 200, |
| | | }, |
| | | { |
| | | label: '最近监测在线状态', |
| | | label: '设备状态', |
| | | align: 'center', |
| | | prop: 'onlineStr', |
| | | width: 200, |
| | | }, |
| | | { |
| | | label: '最近Ping监测状态', |
| | | align: 'center', |
| | | prop: 'pingOnlineStr', |
| | | width: 200, |
| | | }, |
| | | { |
| | |
| | | { key: 3, label: `省厅标签`, visible: false }, |
| | | { key: 3, label: `省厅标签列表`, visible: false }, |
| | | ], |
| | | dict: [ |
| | | |
| | | ] |
| | | }, |
| | | { |
| | | title: "录像可用率", |
| | |
| | | width: 200, |
| | | }, |
| | | { |
| | | label: '最近监测在线状态', |
| | | label: '设备状态', |
| | | align: 'center', |
| | | prop: 'onlineStr', |
| | | width: 200, |
| | | }, |
| | | { |
| | | label: '最近Ping监测状态', |
| | | align: 'center', |
| | | prop: 'pingOnlineStr', |
| | | width: 200, |
| | | }, |
| | | { |
| | |
| | | width: 200, |
| | | }, |
| | | { |
| | | label: '最近监测在线状态', |
| | | label: '设备状态', |
| | | align: 'center', |
| | | prop: 'onlineStr', |
| | | width: 200, |
| | | }, |
| | | { |
| | | label: '最近Ping监测状态', |
| | | align: 'center', |
| | | prop: 'pingOnlineStr', |
| | | width: 200, |
| | | }, |
| | | { |
| | |
| | | width: 200, |
| | | }, |
| | | { |
| | | label: '最近监测在线状态', |
| | | label: '设备状态', |
| | | align: 'center', |
| | | prop: 'onlineStr', |
| | | width: 200, |
| | | }, |
| | | { |
| | | label: '最近Ping监测状态', |
| | | align: 'center', |
| | | prop: 'pingOnlineStr', |
| | | width: 200, |
| | | }, |
| | | { |
| | |
| | | width: 200, |
| | | }, |
| | | { |
| | | label: '最近监测在线状态', |
| | | label: '设备状态', |
| | | align: 'center', |
| | | prop: 'onlineStr', |
| | | width: 200, |
| | | }, |
| | | { |
| | | label: '最近Ping监测状态', |
| | | align: 'center', |
| | | prop: 'pingOnlineStr', |
| | | width: 200, |
| | | }, |
| | | { |
| | | label: '当日监测次数', |
| | | align: 'center', |
| | | prop: 'checkCount', |
| | |
| | | :style="item.ruleName == '' ? 'display:none' : ''" |
| | | class="col-margin" |
| | | > |
| | | <el-link @click="handleDetail(item, item.ruleIndex, item.apiUrl, item.ruleName)" style="width: 100%"> |
| | | <el-link @click="handleDetail(item, item.ruleIndex, item.apiUrl, item.ruleName,item.dict)" style="width: 100%"> |
| | | <el-card |
| | | style="min-width: 150px;width:100%; height: 150px; text-align: center" |
| | | > |
| | |
| | | path: '/equipment' |
| | | }); |
| | | }, |
| | | handleDetail(item, index, url, ruleName) { |
| | | handleDetail(item, index, url, ruleName,dict) { |
| | | this.$router.push({ |
| | | path: `/data-manage/data-detail/index/1/1?type=${item.ruleCategory}&index=${index}&url=${url}&ruleName=${ruleName}` |
| | | path: `/data-manage/data-detail/index/1/1?type=${item.ruleCategory}&index=${index}&url=${url}&ruleName=${ruleName}&dict=${dict}` |
| | | }); |
| | | }, |
| | | }, |