Commit 64b2e3d0 authored by “yiyousong”'s avatar “yiyousong”

pref:修改页面

parent 81ff4226
......@@ -232,27 +232,27 @@ const routes = [
},
],
},
{
path: "Impossible",
name: "Impossible",
redirect: "/home/dataManagement/Impossible/ImpossibleForm",
component: () =>
import(
/* webpackChunkName: "oneYardPass" */ "@/views/dataAdmin/components/Impossible/module.vue"
),
meta: { title: "办不成事报表" },
children: [
{
path: "ImpossibleForm",
name: "ImpossibleForm",
component: () =>
import(
/* webpackChunkName: "reportForm" */ "@/views/dataAdmin/components/Impossible/index.vue"
),
meta: { title: "办不成事报表" },
},
],
},
{
path: "Impossible",
name: "Impossible",
redirect: "/home/dataManagement/Impossible/ImpossibleForm",
component: () =>
import(
/* webpackChunkName: "oneYardPass" */ "@/views/dataAdmin/components/Impossible/module.vue"
),
meta: { title: "办不成事报表" },
children: [
{
path: "ImpossibleForm",
name: "ImpossibleForm",
component: () =>
import(
/* webpackChunkName: "reportForm" */ "@/views/dataAdmin/components/Impossible/index.vue"
),
meta: { title: "办不成事报表" },
},
],
},
{
path: "AIEfficiency",
name: "AIEfficiency",
......
<template>
<!-- 事件分析 -->
<div class="page">
<a-form-model :model="queryform" :label-col="labelCol" :wrapper-col="wrapperCol" layout="inline">
<a-form-model-item>
<a-select v-model="queryform.productId" style="width: 200px" placeholder="选择产品">
<a-select-option :value="item.id" v-for="(item,index) in product" :key="index">
{{item.title}}
</a-select-option>
</a-select>
</a-form-model-item>
<a-form-model-item>
<a-range-picker valueFormat="yyyy-MM-DD" v-model="time" style="width: 300px" :allowClear="false"/>
</a-form-model-item>
<a-form-model-item>
<a-button type="primary" @click="getList">
开始分析
</a-button>
</a-form-model-item>
</a-form-model>
<div class="mt20">
<a-table :columns="columns" :data-source="data" :scroll="{ y: 590 }" :pagination="false">
</a-table>
</div>
</div>
<!-- 事件分析 -->
<div class="page">
<a-form-model
:model="queryform"
:label-col="labelCol"
:wrapper-col="wrapperCol"
layout="inline"
>
<a-form-model-item>
<a-select
v-model="queryform.productId"
style="width: 200px"
placeholder="选择产品"
>
<a-select-option
:value="item.id"
v-for="(item, index) in product"
:key="index"
>
{{ item.title }}
</a-select-option>
</a-select>
</a-form-model-item>
<a-form-model-item>
<a-range-picker
valueFormat="yyyy-MM-DD"
v-model="time"
style="width: 300px"
:allowClear="false"
/>
</a-form-model-item>
<a-form-model-item>
<a-button type="primary" @click="getList"> 开始分析 </a-button>
</a-form-model-item>
</a-form-model>
<div class="mt20">
<a-table
:columns="columns"
:data-source="data"
:scroll="{ y: 590 }"
:pagination="false"
>
</a-table>
</div>
</div>
</template>
<script>
import {getEventCensus} from '@/api/dataActuary.js'
import moment from 'moment';
export default {
data() {
return {
queryform: {
productId: 1,
dateTimeStart:moment().format('yyyy-MM-DD'),
dateTimeEnd:moment().format('yyyy-MM-DD')
},
time:[moment().format('yyyy-MM-DD'),moment().format('yyyy-MM-DD')],
labelCol: {
span: 1
},
wrapperCol: {
span: 14
},
product:[{
title:'排队机',
id:1
}],
columns: [{
title: "序号",
width: "70px",
customRender: (text, record, index) => `${index+1}`,
align: "center",
},
{
title: "事件",
dataIndex: "eventName",
align: "center",
},
{
title: '事件ID',
dataIndex: 'eventCode',
align: "center",
},
{
title: '事件数量(日均)',
dataIndex: 'dayAvg',
align: "center",
},
{
title: '事件平均使用时长(单次)',
dataIndex: 'takeTimeAvg',
align: "center",
}
],
data: [],
}
},
mounted() {
this.getList()
},
methods:{
getList() {
this.queryform.dateTimeStart = this.time ? this.time[0] : null
this.queryform.dateTimeStart = this.time ? this.time[1] : null
getEventCensus(this.queryform).then(res=>{
this.data = res.data.data
})
}
}
};
<script>
import { getEventCensus } from "@/api/dataActuary.js";
import moment from "moment";
export default {
data() {
return {
queryform: {
productId: 1,
dateTimeStart: moment().format("yyyy-MM-DD"),
dateTimeEnd: moment().format("yyyy-MM-DD"),
},
time: [moment().format("yyyy-MM-DD"), moment().format("yyyy-MM-DD")],
labelCol: {
span: 1,
},
wrapperCol: {
span: 14,
},
product: [
{
title: "排队机",
id: 1,
},
],
columns: [
{
title: "序号",
width: "70px",
customRender: (text, record, index) => `${index + 1}`,
align: "center",
},
{
title: "事件",
dataIndex: "eventName",
align: "center",
},
{
title: "事件ID",
dataIndex: "eventCode",
align: "center",
},
{
title: "事件数量(日均)",
dataIndex: "dayAvg",
align: "center",
},
{
title: "事件平均使用时长(单次)",
dataIndex: "takeTimeAvg",
align: "center",
},
],
data: [],
};
},
mounted() {
this.getList();
},
methods: {
getList() {
this.queryform.dateTimeStart = this.time ? this.time[0] : null;
this.queryform.dateTimeStart = this.time ? this.time[1] : null;
getEventCensus(this.queryform).then((res) => {
this.data = res.data.data;
});
},
},
};
</script>
<style lang="less" scoped>
.page{
padding: 15px;
}
<style lang="less" scoped>
.page {
padding: 15px;
}
</style>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment