This commit is contained in:
bryan sun
2019-10-24 17:23:01 +08:00
parent ac8079a593
commit 4e538ba9f3
5 changed files with 69 additions and 74 deletions

View File

@@ -2,7 +2,7 @@
<div class="app-container">
<el-card>
<el-row>
<el-select v-model="machineNumberValue" filterable placeholder="机床编号" size="small" style="margin-left: 10px" clearable @change="machineChange()">
<el-select v-model="machineNumberValue" filterable placeholder="机床编号" size="small" style="margin:0px 10px" clearable @change="machineChange()">
<el-option
v-for="item in machineNumber"
:key="item.value"
@@ -12,21 +12,21 @@
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
</el-option>
</el-select>
<el-select v-model="groupNumberValue" filterable placeholder="组号" size="small" clearable>
<el-select v-model="groupNumberValue" filterable placeholder="组号" style="margin:0px 10px" size="small" clearable>
<el-option
v-for="item in groupNumber"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-select v-model="TestValue" filterable placeholder="组号" size="small" clearable>
<el-select v-model="TestValue" filterable placeholder="组号" style="margin:0px 10px" size="small" clearable>
<el-option
v-for="item in Test"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-select v-model="qualityInspectionValue" filterable placeholder="质检情况" size="small" clearable>
<el-select v-model="qualityInspectionValue" filterable placeholder="质检情况" style="margin:0px 10px" size="small" clearable>
<el-option
v-for="item in qualityInspection"
:key="item.value"
@@ -40,7 +40,7 @@
</el-row>
</el-card>
<el-card>
<el-table :data="tableData1" border size="mini" highlight-current-row stripe style="width: 100%" height="600px">
<el-table :data="tableData1" border size="mini" highlight-current-row stripe style="width: 100%" height="830px">
<el-table-column align="center" prop="是否合格" label="检验情况" width="80px">
<template slot-scope="scope">
<el-tag v-if="parseInt(scope.row.是否合格)===0||scope.row.是否合格===''" type="primary" size="small" @click="approvalPass(scope.row)">未检验</el-tag>
@@ -84,16 +84,16 @@
</template>
</el-table-column>
</el-table>
<div class="block">
<el-pagination
:current-page="pageCurrent"
:page-sizes="[10, 20, 30, 40, 100]"
: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, 100]"-->
<!-- :page-size="pageSize"-->
<!-- :total="total"-->
<!-- layout="total, sizes, prev, pager, next, jumper"-->
<!-- @size-change="handleSizeChange"-->
<!-- @current-change="handleCurrentChange"/>-->
<!-- </div>-->
</el-card>
</div>
</template>
@@ -119,10 +119,10 @@ export default {
label: '不合格'
}
],
tableData1: [],
total: 0, // 总条数
pageSize: 10, // 每页显示条数
pageCurrent: 1 // 后台获取页
tableData1: []
// total: 0, // 总条数
// pageSize: 10, // 每页显示条数
// pageCurrent: 1 // 后台获取页
}
},
created() {
@@ -198,23 +198,20 @@ export default {
if (this.groupNumberValue !== '' && this.groupNumberValue !== null) { this.check2 = 1 } else { this.check2 = 0 }
if (this.TestValue !== '' && this.TestValue !== null) { this.check3 = 1 } else { this.check3 = 0 }
if (this.qualityInspectionValue !== '' && this.qualityInspectionValue !== null) { this.check4 = 1 } else { this.check4 = 0 }
selecttable(this.check1, this.machineNumberValue, this.check2, this.groupNumberValue, this.check3, this.TestValue, this.check4, this.qualityInspectionValue, this.pageCurrent, this.pageSize).then(response => {
console.log(response.data.rows, 111)
this.tableData1 = response.data.rows
this.total = response.data.total
console.log(this.tableData1)
selecttable(this.check1, this.machineNumberValue, this.check2, this.groupNumberValue, this.check3, this.TestValue, this.check4, this.qualityInspectionValue).then(response => {
this.tableData1 = response.data
})
},
// 分页
handleSizeChange(val) {
this.pageCurrent = 1
this.pageSize = val
this.selecttable()
},
handleCurrentChange(val) {
this.pageCurrent = val
this.selecttable()
}
// 分页
// handleSizeChange(val) {
// this.pageCurrent = 1
// this.pageSize = val
// this.selecttable()
// },
// handleCurrentChange(val) {
// this.pageCurrent = val
// this.selecttable()
// }
}
}