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()
})

View File

@@ -20,7 +20,7 @@
<el-input v-model="machineToolNumber" placeholder="请双击选择" size="small" clearable style="width:200px" @change="empty1" @dblclick.native="SearchMachine"/>
<span>组号:</span>
<el-input v-model="groupNumber" placeholder="请双击选择" size="small" clearable style="width:200px" @dblclick.native="searchGroupList"/>
<el-button type="success" icon="el-icon-search" size="small" style="margin-top: 15px;margin-left: 10px" @click="total=0;pageSize=10;pageCurrent=1;searchData();searchTable()">查询</el-button>
<el-button type="success" icon="el-icon-search" size="small" style="margin-top: 15px;margin-left: 10px" @click="total=0;pageSize=1000;pageCurrent=1;searchData();searchTable()">查询</el-button>
</el-card>
<el-card>
<h3 style="text-align: center;">车间生产</h3>
@@ -82,7 +82,7 @@
:page-sizes="[10, 20, 30, 40, 50]"
:page-size="pageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
layout="total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
@@ -140,7 +140,7 @@
:page-size="pageSize00"
:total="total00"
style="margin-top:10px;display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
layout="total"
@size-change="handleSizeChange00"
@current-change="handleCurrentChange00"/>
</div>
@@ -195,7 +195,7 @@
:page-size="pageSize01"
:total="total01"
style="margin-top:10px;display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
layout="total"
@size-change="handleSizeChange01"
@current-change="handleCurrentChange01"/>
</div>
@@ -255,7 +255,7 @@
:page-size="pageSize02"
:total="total02"
style="margin-top:10px;display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
layout="total"
@size-change="handleSizeChange02"
@current-change="handleCurrentChange02"/>
</div>
@@ -312,7 +312,7 @@
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize5"
:total="total5"
layout="total, sizes, prev, pager, next, jumper"
layout="total"
@size-change="handleSizeChange5"
@current-change="handleCurrentChange5"/>
</div>
@@ -495,13 +495,13 @@ export default {
num: null,
PartType: '标准件',
pageCurrent00: 1,
pageSize00: 10,
pageSize00: 1000,
pageCurrent01: 1,
pageSize01: 10,
pageCurrent02: 1,
pageSize02: 10,
pageSize02: 1000,
pageCurrent: 1,
pageSize: 10,
pageSize: 1000,
pageCurrent1: 1,
pageSize1: 10,
pageCurrent2: 1,
@@ -726,12 +726,16 @@ export default {
this.dialogFormVisible3 = false
},
searchTable() {
if (this.PartType === '标准件') {
this.searchTable0()
} else if (this.PartType === '外购件') {
this.searchTable1()
} else if (this.PartType === '基本件') {
this.searchTable2()
if (this.machine === '' || this.machine === null) {
this.$message.warning('请先选择机床组号')
} else {
if (this.PartType === '标准件') {
this.searchTable0()
} else if (this.PartType === '外购件') {
this.searchTable1()
} else if (this.PartType === '基本件') {
this.searchTable2()
}
}
},
searchTable0() { // 查询标准件
@@ -744,11 +748,10 @@ export default {
})
},
searchTable1() { // 查询外购件
let check1, check2, check3
let check1, check2
this.machine ? check1 = 1 : check1 = 0
this.groupNum ? check2 = 1 : check2 = 0
this.entryNameValue ? check3 = 1 : check3 = 0
searchTable01(check3, this.entryNameValue, check1, this.machine, check2, this.groupNum, this.pageCurrent01, this.pageSize01, 2).then(response => {
searchTable01(check1, this.machine, check2, this.groupNum, this.pageCurrent01, this.pageSize01, 2).then(response => {
this.tableData01 = response.data.rows
this.total01 = response.data.total
})

View File

@@ -53,7 +53,7 @@
v-loading="loading0"
:data="tableData"
style="width: 100%"
height="780"
height="820"
stripe
size="mini"
highlight-current-row

View File

@@ -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>