24小时设备数据-报废数据删除,质量管理-监测统计数据-按时间查询

This commit is contained in:
范志钦 2023-09-28 13:48:40 +05:30
parent 5511837e90
commit e117388027
2 changed files with 24 additions and 7 deletions

View File

@ -1,21 +1,34 @@
<template> <template>
<div class="mod-config"> <div class="mod-config">
<el-form :inline="true" @keyup.enter.native="getDataList()" class="blueTip" size="small"> <el-form :inline="true" @keyup.enter.native="getDataList()" class="blueTip" size="small">
<el-form-item> <!-- <el-form-item>
{{ $t('time') }} {{ $t('time') }}
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<!-- type="datetimerange" --> type="datetimerange"
:default-time="['00:00:00', '23:59:59']"
<el-date-picker <el-date-picker
type="daterange" type="daterange"
v-model="datetime" v-model="datetime"
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-ddTHH:mm:ss" value-format="yyyy-MM-ddTHH:mm:ss"
:start-placeholder="$t('startTime')" :start-placeholder="$t('startTime')"
:end-placeholder="$t('endTime')" :end-placeholder="$t('endTime')"
:range-separator="$t('to')" :range-separator="$t('to')"
:default-time="['00:00:00', '23:59:59']"
:picker-options="quickOptions" :picker-options="quickOptions"
clearable /> clearable />
</el-form-item> -->
<el-form-item>
{{ $t('startTime') }}
</el-form-item>
<el-form-item>
<el-date-picker v-model="startTime" type="datetime" :placeholder="$t('hints.date')" format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-ddTHH:mm:ss" />
</el-form-item>
<el-form-item>
{{ $t('endTime') }}
</el-form-item>
<el-form-item>
<el-date-picker v-model="endTime" type="datetime" :placeholder="$t('hints.date')" format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-ddTHH:mm:ss" />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button class="buttonColor" @click="getDataList()">{{ $t('query') }}</el-button> <el-button class="buttonColor" @click="getDataList()">{{ $t('query') }}</el-button>
@ -222,6 +235,8 @@ export default {
dataType: dict[0], // | dataType: dict[0], // |
showGraph: false, showGraph: false,
datetime: [], datetime: [],
startTime: '',
endTime: '',
quickOptions: { quickOptions: {
shortcuts: [ shortcuts: [
{ {
@ -267,8 +282,10 @@ export default {
this.echartCategories = null this.echartCategories = null
this.echartCheckTypes.splice(0) this.echartCheckTypes.splice(0)
/** 设置默认日期 */ /** 设置默认日期 */
const startTime = this.datetime[0] || moment().set({ hour: 0, minute: 0, second: 0 }).format('yyyy-MM-DDTHH:mm:ss') // const startTime = this.datetime[0] || moment().set({ hour: 0, minute: 0, second: 0 }).format('yyyy-MM-DDTHH:mm:ss')
const endTime = this.datetime[1] || moment().set({ hour: 23, minute: 59, second: 59 }).format('yyyy-MM-DDTHH:mm:ss') // const endTime = this.datetime[1] || moment().set({ hour: 23, minute: 59, second: 59 }).format('yyyy-MM-DDTHH:mm:ss')
const startTime = this.startTime
const endTime = this.endTime
/** [1] 获取上下片数据 */ /** [1] 获取上下片数据 */
this.fetchList('sx', startTime, endTime).then(({ data: res }) => { this.fetchList('sx', startTime, endTime).then(({ data: res }) => {

View File

@ -134,8 +134,8 @@ export default {
children: [ children: [
{ prop: obj.recordTime + '-inputNum', label: i18n.t('realtime.in') }, { prop: obj.recordTime + '-inputNum', label: i18n.t('realtime.in') },
{ prop: obj.recordTime + '-outputNum', label: i18n.t('realtime.out') }, { prop: obj.recordTime + '-outputNum', label: i18n.t('realtime.out') },
{ prop: obj.recordTime + '-scrapNum', label: i18n.t('realtime.data') }, // { prop: obj.recordTime + '-scrapNum', label: i18n.t('realtime.data') },
{ prop: obj.recordTime + '-scrapRate', label: i18n.t('realtime.rate'), filter: val => (val !== '-' ? `${val.toFixed(2)}%` : '-') } // { prop: obj.recordTime + '-scrapRate', label: i18n.t('realtime.rate'), filter: val => (val !== '-' ? `${val.toFixed(2)}%` : '-') }
] ]
}) })
} }