更新
This commit is contained in:
@@ -15,8 +15,8 @@
|
||||
<el-button type="primary" plain size="small" icon="el-icon-search" style="margin-left: 10px" @click="total1=0;pageCurrent1=1;pageSize1=50;searchTable()">查询</el-button>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table v-loading="loading" :data="tableData" :row-class-name="tableRowClassName" style="width: 100%;" size="mini" height="700" highlight-current-row border>
|
||||
<el-table-column align="center" label="报警工位">
|
||||
<el-table v-loading="loading" :data="tableData" :row-class-name="tableRowClassName" style="width: 100%;" size="mini" height="700" highlight-current-row border @sort-change="sortChange">
|
||||
<el-table-column align="center" label="报警工位" prop="工位号" sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工位号 }}
|
||||
</template>
|
||||
@@ -31,7 +31,7 @@
|
||||
{{ scope.row.编号描述 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="报警内容">
|
||||
<el-table-column align="center" label="报警内容" prop="安东明细描述" sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.安东明细描述 }}
|
||||
</template>
|
||||
@@ -46,7 +46,7 @@
|
||||
{{ scope.row.解除时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="处理时长">
|
||||
<el-table-column align="center" label="处理时长" prop="处理时长" sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.处理时长 }}
|
||||
</template>
|
||||
@@ -78,7 +78,9 @@ export default {
|
||||
loading: false,
|
||||
total1: 0,
|
||||
pageCurrent1: 1,
|
||||
pageSize1: 50
|
||||
pageSize1: 50,
|
||||
order: '',
|
||||
partName: ''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -87,12 +89,29 @@ export default {
|
||||
this.searchTable()
|
||||
},
|
||||
methods: {
|
||||
sortChange(column, prop, order) {
|
||||
if (column.prop === '工位号') {
|
||||
this.partName = 1
|
||||
} else if (column.prop === '安东明细描述') {
|
||||
this.partName = 2
|
||||
} else if (column.prop === '处理时长') {
|
||||
this.partName = 3
|
||||
} else {
|
||||
this.partName = ''
|
||||
}
|
||||
if (column.order === 'ascending') {
|
||||
this.order = 1
|
||||
} else if (column.order === 'descending') { this.order = 2 } else {
|
||||
this.order = ''
|
||||
}
|
||||
this.searchTable()
|
||||
},
|
||||
searchTable() {
|
||||
this.loading = true
|
||||
this.tableData = []
|
||||
var check1
|
||||
this.dateRange ? check1 = 1 : (check1 = 0, this.dateRange = '')
|
||||
searchTable(check1, this.dateRange[0], this.dateRange[1], this.pageCurrent1, this.pageSize1).then(response => {
|
||||
searchTable(check1, this.dateRange[0], this.dateRange[1], this.order, this.partName, this.pageCurrent1, this.pageSize1).then(response => {
|
||||
this.tableData = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
this.loading = false
|
||||
|
||||
Reference in New Issue
Block a user