<template>
|
<a-card
|
title="设备故障次数统计"
|
:bordered="true"
|
>
|
<!-- 查询区域 -->
|
<div class="table-page-search-wrapper">
|
<a-form
|
layout="inline"
|
@keyup.enter.native="searchQuery"
|
>
|
<a-row :gutter="24">
|
<a-col
|
:md="6"
|
:sm="8"
|
>
|
<a-form-item label="统一编码">
|
<a-input
|
placeholder="请输入统一编码"
|
v-model="queryParam.equipmentNum"
|
></a-input>
|
</a-form-item>
|
</a-col>
|
<a-col
|
:md="6"
|
:sm="8"
|
>
|
<a-form-item label="使用部门">
|
<j-dict-select-tag
|
allow-clear
|
placeholder='请选择使用部门'
|
:triggerChange='true'
|
dictCode="sys_depart,depart_name,id,del_flag!='1'"
|
v-model='queryParam.useId'
|
/>
|
</a-form-item>
|
</a-col>
|
<a-col
|
:md="6"
|
:sm="8"
|
>
|
<a-form-item label="维修时间">
|
<a-range-picker
|
style="width: 100%;"
|
format="YYYY-MM-DD HH:mm:ss"
|
v-model="faultTime"
|
@change="timeChange"
|
/>
|
</a-form-item>
|
</a-col>
|
<a-col
|
:md="6"
|
:sm="8"
|
>
|
<span
|
style="float: left;overflow: hidden;"
|
class="table-page-search-submitButtons"
|
>
|
<a-button
|
type="primary"
|
@click="searchQuery"
|
icon="search"
|
>查询</a-button>
|
<a-button
|
type="primary"
|
@click="searchReset"
|
icon="reload"
|
style="margin-left: 8px"
|
>重置</a-button>
|
</span>
|
</a-col>
|
</a-row>
|
</a-form>
|
</div>
|
<!-- 查询区域-END -->
|
|
<a-row>
|
<a-col :span="24">
|
<a-card
|
:loading="loading"
|
:bordered="false"
|
title="最近一月设备故障次数统计"
|
:style="{ marginTop: '24px' }"
|
>
|
<!--<a-row>
|
<a-col :span="6">
|
<head-info title="今日IP" :content="loginfo.todayIp"></head-info>
|
</a-col>
|
<a-col :span="2">
|
<a-spin class='circle-cust'>
|
<a-icon slot="indicator" type="environment" style="font-size: 24px" />
|
</a-spin>
|
</a-col>
|
<a-col :span="6">
|
<head-info title="今日访问" :content="loginfo.todayVisitCount"></head-info>
|
</a-col>
|
<a-col :span="2">
|
<a-spin class='circle-cust'>
|
<a-icon slot="indicator" type="team" style="font-size: 24px" />
|
</a-spin>
|
</a-col>
|
<a-col :span="6">
|
<head-info title="总访问量" :content="loginfo.totalVisitCount"></head-info>
|
</a-col>
|
<a-col :span="2">
|
<a-spin class='circle-cust'>
|
<a-icon slot="indicator" type="rise" style="font-size: 24px" />
|
</a-spin>
|
</a-col>
|
</a-row> -->
|
<line-chart-multid
|
:dataSource="visitInfo"
|
:fields="visitFields"
|
></line-chart-multid>
|
</a-card>
|
</a-col>
|
</a-row>
|
</a-card>
|
</template>
|
|
<script>
|
|
import '@/assets/less/TableExpand.less'
|
import { mixinDevice } from '@/utils/mixin'
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
import { getAction, deleteAction, postAction } from '@/api/manage'
|
import LineChartMultid from '@/components/chart/LineChartMultid'
|
import moment from 'moment'
|
|
export default {
|
name: 'FaultCauseChartEquipment',
|
mixins: [JeecgListMixin, mixinDevice],
|
components: {
|
LineChartMultid
|
},
|
data() {
|
return {
|
description: 'FaultCauseChartEquipment',
|
visitFields: ['设备故障次数'],
|
// visitInfo: [{ '设备故障次数': '5', type: '07-28' }, { '设备故障次数': '6', type: '07-29' }],
|
visitInfo: [],
|
url: {
|
list: "/eam/repairOrder/getEquipmentFaultCause",
|
},
|
// 表头
|
faultTime: [],
|
dictOptions: {},
|
superFieldList: [],
|
queryParam: {}
|
}
|
},
|
// created() {
|
// this.loadData2(1);
|
// },
|
methods: {
|
|
timeChange() {
|
this.queryParam.faultStartTime = moment(this.faultTime[0]).format("YYYY-MM-DD HH:mm:ss")
|
this.queryParam.faultEndTime = moment(this.faultTime[1]).format("YYYY-MM-DD HH:mm:ss")
|
},
|
|
searchQuery() {
|
this.loadData(1);
|
},
|
|
searchReset() {
|
this.faultTime = []
|
this.queryParam = {}
|
this.loadData(1);
|
},
|
|
loadData(arg) {
|
this.loading = true;
|
getAction(this.url.list, this.queryParam).then((res) => {
|
if (res.success) {
|
this.visitInfo = res.result.records || res.result;
|
} else {
|
this.$message.warning(res.message)
|
}
|
}).finally(() => {
|
this.loading = false
|
})
|
},
|
}
|
}
|
</script>
|
<style scoped>
|
@import '~@assets/less/common.less';
|
</style>
|