This commit is contained in:
bryan sun
2019-10-24 15:45:13 +08:00
parent a6fee1fea0
commit f65eb643fb
20 changed files with 520 additions and 532 deletions

View File

@@ -1,8 +1,8 @@
<template>
<div class="app-container">
<el-card>
<span>工位号:</span>
<el-select v-model="MachineValue" filterable size="small" style="width:160px;margin-bottom:10px" placeholder="工位号">
<!-- <span>工位号:</span>-->
<el-select v-model="MachineValue" filterable size="small" style="width:160px;margin:0px 10px" placeholder="工位号">
<el-option
v-for="item in Machine"
:key="item.value"
@@ -12,7 +12,7 @@
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.value2 }}</div>
</el-option>
</el-select>
<span>日期:</span>
<!-- <span>日期:</span>-->
<el-date-picker
v-model="Time"
value-format="yyyy-MM-dd"
@@ -20,7 +20,7 @@
style="width: 160px"
type="date"
placeholder="选择日期"/>
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 15px" @click="pageSize=10; pageCurrent= 1;searchData()">查询</el-button>
<el-button type="success" size="small" icon="el-icon-search" style="margin:0px 10px" @click="pageSize=10; pageCurrent= 1;searchData()">查询</el-button>
</el-card>
<el-card>
<el-table
@@ -71,16 +71,16 @@
</template>
</el-table-column>
</el-table>
<div class="block">
<el-pagination
:current-page="pageCurrent"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
<!-- <div class="block">-->
<!-- <el-pagination-->
<!-- :current-page="pageCurrent"-->
<!-- :page-sizes="[10, 20, 30, 40]"-->
<!-- :page-size="pageSize"-->
<!-- :total="total"-->
<!-- layout="total, sizes, prev, pager, next, jumper"-->
<!-- @size-change="handleSizeChange"-->
<!-- @current-change="handleCurrentChange"/>-->
<!-- </div>-->
</el-card>
<el-card style="width: 49.8%; float: left;margin-right: 5px">
<div id="myChart1" style="width: 1000px; height: 570px; margin: auto"/>
@@ -187,9 +187,9 @@ export default {
time22: '',
time33: '',
time44: '',
pageCurrent: 1,
pageSize: 10,
total: 0,
// pageCurrent: 1,
// pageSize: 10,
// total: 0,
table: []
}
},
@@ -214,13 +214,13 @@ export default {
})
},
searchData() {
getData(this.MachineValue, this.Time, this.pageCurrent, this.pageSize).then(response => {
this.tableDataA = response.data.rows
this.total = response.data.total
this.time1 = response.data.rows[0].运行持续时间
this.time2 = response.data.rows[0].等待持续时间
this.time3 = response.data.rows[0].停机持续时间
this.time4 = response.data.rows[0].报警持续时间
getData(this.MachineValue, this.Time).then(response => {
this.tableDataA = response.data
// this.total = response.data.total
this.time1 = response.data[0].运行持续时间
this.time2 = response.data[0].等待持续时间
this.time3 = response.data[0].停机持续时间
this.time4 = response.data[0].报警持续时间
}).then(() => {
this.drawLine1()
})