分页
This commit is contained in:
@@ -2,27 +2,26 @@
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-row>
|
||||
<span style="margin-left: 10px">操作者:</span>
|
||||
<el-input v-model="workerName" placeholder="操作者" size="small" clearable style="width:200px"/>
|
||||
<span class="demonstration">完成加工时间:</span>
|
||||
<el-input v-model="workerName" placeholder="操作者" size="small" clearable style="width:200px;margin:0px 10px"/>
|
||||
<!-- <span class="demonstration">完成加工时间:</span>-->
|
||||
<el-date-picker
|
||||
v-model="startTime"
|
||||
value-format="yyyy-MM-dd"
|
||||
size="small"
|
||||
style="width: 160px"
|
||||
style="width: 170px;margin:0px 10px"
|
||||
type="date"
|
||||
placeholder="选择日期"/>
|
||||
placeholder="选择开始加工日期"/>
|
||||
<span class="demonstration">~</span>
|
||||
<el-date-picker
|
||||
v-model="endTime"
|
||||
value-format="yyyy-MM-dd"
|
||||
size="small"
|
||||
style="width: 160px"
|
||||
style="width: 170px;margin:0px 10px"
|
||||
type="date"
|
||||
placeholder="选择日期"/>
|
||||
<el-button type="success" class="el-icon-search" size="small" style="margin: 10px 0 0 10px" @click="pageCurrent=1;total = 0;searchTable();">查询</el-button>
|
||||
placeholder="选择加工完成日期"/>
|
||||
<el-button type="success" class="el-icon-search" size="small" style="margin:0px 10px" @click="pageCurrent=1;total = 0;searchTable();">查询</el-button>
|
||||
<el-tooltip :open-delay="1000" content="导出人员工时统计表" placement="right">
|
||||
<el-button type="primary" size="small" icon="el-icon-download" style="margin-left:10px" @click="exportUninquirySheet1()">导出</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-download" style="margin:0px 10px" @click="exportUninquirySheet1()">导出</el-button>
|
||||
</el-tooltip>
|
||||
</el-row>
|
||||
</el-card>
|
||||
@@ -61,7 +60,7 @@
|
||||
:current-page="pageCurrent"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
layout="total, prev, pager, next"
|
||||
layout="total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
@@ -117,8 +116,8 @@
|
||||
</el-col>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<span style="margin-left: 10px">机床编号:</span>
|
||||
<el-select v-model="machineNumberValue" filterable placeholder="机床编号" size="small" style="margin-top: 10px" clearable @change="searchTable4();searchTable6()">
|
||||
<!-- <span style="margin-left: 10px">机床编号:</span>-->
|
||||
<el-select v-model="machineNumberValue" filterable placeholder="机床编号" size="small" style="margin:0px 10px" clearable @change="searchTable4();searchTable6()">
|
||||
<el-option
|
||||
v-for="item in machineNumber"
|
||||
:key="item.value"
|
||||
@@ -154,16 +153,16 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div style="margin: 10px">
|
||||
<el-pagination
|
||||
v-if="!loading3"
|
||||
:current-page="pageCurrent3"
|
||||
:page-size="pageSize3"
|
||||
:total="total3"
|
||||
layout="total, prev, pager, next"
|
||||
@size-change="handleSizeChange3"
|
||||
@current-change="handleCurrentChange3"/>
|
||||
</div>
|
||||
<!-- <div style="margin: 10px">-->
|
||||
<!-- <el-pagination-->
|
||||
<!-- v-if="!loading3"-->
|
||||
<!-- :current-page="pageCurrent3"-->
|
||||
<!-- :page-size="pageSize3"-->
|
||||
<!-- :total="total3"-->
|
||||
<!-- layout="total"-->
|
||||
<!-- @size-change="handleSizeChange3"-->
|
||||
<!-- @current-change="handleCurrentChange3"/>-->
|
||||
<!-- </div>-->
|
||||
</el-col>
|
||||
<el-col :span="17" style="margin-left: 30px;">
|
||||
<el-table v-loading="loading4" :data="tableData4" size="mini" height="380" stripe highlight-current-row style="width: 100%;" border element-loading-text="拼命加载中">
|
||||
@@ -188,16 +187,16 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div style="margin: 10px">
|
||||
<el-pagination
|
||||
v-if="!loading4"
|
||||
:current-page="pageCurrent4"
|
||||
:page-size="pageSize4"
|
||||
:total="total4"
|
||||
layout="total, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange4"
|
||||
@current-change="handleCurrentChange4"/>
|
||||
</div>
|
||||
<!-- <div style="margin: 10px">-->
|
||||
<!-- <el-pagination-->
|
||||
<!-- v-if="!loading4"-->
|
||||
<!-- :current-page="pageCurrent4"-->
|
||||
<!-- :page-size="pageSize4"-->
|
||||
<!-- :total="total4"-->
|
||||
<!-- layout="total"-->
|
||||
<!-- @size-change="handleSizeChange4"-->
|
||||
<!-- @current-change="handleCurrentChange4"/>-->
|
||||
<!-- </div>-->
|
||||
</el-col>
|
||||
</el-card>
|
||||
</div>
|
||||
@@ -214,7 +213,7 @@ export default {
|
||||
loading: false,
|
||||
tableData: [], // 表格数据
|
||||
total: null, // 总条数
|
||||
pageSize: 10, // 每页显示条数
|
||||
pageSize: 1000, // 每页显示条数
|
||||
pageCurrent: 1, // 后台获取页
|
||||
gongzuozhebianhao: '',
|
||||
machinenumber: '',
|
||||
@@ -224,17 +223,17 @@ export default {
|
||||
loading2: false,
|
||||
tableData2: [], // 表格数据
|
||||
total2: null, // 总条数
|
||||
pageSize2: 10, // 每页显示条数
|
||||
pageSize2: 1000, // 每页显示条数
|
||||
pageCurrent2: 1, // 后台获取页
|
||||
loading3: false,
|
||||
tableData3: [], // 表格数据
|
||||
total3: null, // 总条数
|
||||
pageSize3: 10, // 每页显示条数
|
||||
pageSize3: 1000, // 每页显示条数
|
||||
pageCurrent3: 1, // 后台获取页
|
||||
loading4: false,
|
||||
tableData4: [], // 表格数据
|
||||
total4: null, // 总条数
|
||||
pageSize4: 10, // 每页显示条数
|
||||
pageSize4: 1000, // 每页显示条数
|
||||
pageCurrent4: 1 // 后台获取页
|
||||
}
|
||||
},
|
||||
@@ -414,12 +413,12 @@ export default {
|
||||
this.tableData4 = []
|
||||
this.total3 = 0
|
||||
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) { this.check1 = 1 } else { this.check1 = 0 }
|
||||
searchtable4(this.check1, this.machineNumberValue, this.pageCurrent, this.pageSize).then(response => {
|
||||
searchtable4(this.check1, this.machineNumberValue).then(response => {
|
||||
if (response.data.total === 0) {
|
||||
this.loading3 = false
|
||||
} else {
|
||||
this.total3 = response.data.total
|
||||
this.tableData3 = response.data.rows
|
||||
this.tableData3 = response.data
|
||||
}
|
||||
}).then(() => {
|
||||
this.loading3 = false
|
||||
@@ -430,12 +429,12 @@ export default {
|
||||
this.tableData4 = []
|
||||
this.pageCurrent4 = 1
|
||||
this.machineNumberValue = parseInt(row.机床流水号)
|
||||
searchtable5(this.machineNumberValue, this.pageCurrent4, this.pageSize4).then(response => {
|
||||
searchtable5(this.machineNumberValue).then(response => {
|
||||
if (response.data.total === 0) {
|
||||
this.loading4 = false
|
||||
} else {
|
||||
this.total4 = response.data.total
|
||||
this.tableData4 = response.data.rows
|
||||
this.tableData4 = response.data
|
||||
}
|
||||
}).then(() => {
|
||||
this.loading4 = false
|
||||
@@ -473,26 +472,26 @@ export default {
|
||||
handleCurrentChange2(val) {
|
||||
this.pageCurrent2 = val
|
||||
this.searchTable3()
|
||||
},
|
||||
// 分页
|
||||
handleSizeChange3(val) {
|
||||
this.pageCurrent3 = 1
|
||||
this.pageSize3 = val
|
||||
this.searchTable4()
|
||||
},
|
||||
handleCurrentChange3(val) {
|
||||
this.pageCurrent3 = val
|
||||
this.searchTable4()
|
||||
},
|
||||
handleSizeChange4(val) {
|
||||
this.pageCurrent4 = 1
|
||||
this.pageSize4 = val
|
||||
this.searchTable6()
|
||||
},
|
||||
handleCurrentChange4(val) {
|
||||
this.pageCurrent4 = val
|
||||
this.searchTable6()
|
||||
}
|
||||
// 分页
|
||||
// handleSizeChange3(val) {
|
||||
// this.pageCurrent3 = 1
|
||||
// this.pageSize3 = val
|
||||
// this.searchTable4()
|
||||
// },
|
||||
// handleCurrentChange3(val) {
|
||||
// this.pageCurrent3 = val
|
||||
// this.searchTable4()
|
||||
// },
|
||||
// handleSizeChange4(val) {
|
||||
// this.pageCurrent4 = 1
|
||||
// this.pageSize4 = val
|
||||
// this.searchTable6()
|
||||
// },
|
||||
// handleCurrentChange4(val) {
|
||||
// this.pageCurrent4 = val
|
||||
// this.searchTable6()
|
||||
// }
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user