| | |
| | | * @Author: lzhe lzhe@example.com |
| | | * @Date: 2024-04-26 09:36:18 |
| | | * @LastEditors: lzhe lzhe@example.com |
| | | * @LastEditTime: 2024-11-25 14:24:43 |
| | | * @LastEditTime: 2024-11-27 15:44:14 |
| | | * @FilePath: /smart-web/src/views/mdc/status-record.vue |
| | | * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE |
| | | --> |
| | |
| | | {{ convertSeconds(scope.row.firstWorkingSecs || 0) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="firstWorkingSecs" label="首件切削时间" width="100"> |
| | | <el-table-column prop="firstMeasureSecs" label="首件计量时间" width="100"> |
| | | <template #default="scope"> |
| | | {{ convertSeconds(scope.row.firstWorkingSecs || 0) }} |
| | | {{ convertSeconds(scope.row.firstMeasureSecs || 0) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="lastRemoveSecs" label="末件拆卸时间" width="100"> |
| | | <template #default="scope"> |
| | | {{ convertSeconds(scope.row.lastRemoveSecs || 0) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="firstMeasureSecs" label="首件计量时间" width="100"> |
| | | <template #default="scope"> |
| | | {{ convertSeconds(scope.row.firstMeasureSecs || 0) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="processingSecs" label="加工时间" width="80"> |
| | |
| | | tabPosition: "设备结构树", |
| | | tableData: [], |
| | | treeChecked: [], |
| | | workstationIdList: [], |
| | | ids: [], |
| | | total: 0, |
| | | current: 1, |
| | | size: 20 |
| | |
| | | // } |
| | | }, |
| | | mounted() { |
| | | //this.getTableData(); |
| | | var date = new Date(); |
| | | var threeDaysInMilliseconds = 3 * 24 * 60 * 60 * 1000; |
| | | var threeDaysAgo = new Date(date.getTime() - threeDaysInMilliseconds); |
| | | this.searchInfo.startDate = threeDaysAgo.toLocaleDateString().replace(/\//g,"-"); |
| | | this.searchInfo.endDate = date.toLocaleDateString().replace(/\//g,"-"); |
| | | this.getTableData(); |
| | | }, |
| | | methods: { |
| | | handleCurrentChange(val) { |
| | |
| | | return result.join(' '); |
| | | }, |
| | | changeStartDate(val) { |
| | | console.log(val,111) |
| | | }, |
| | | searchBtn() { |
| | | if(!this.searchInfo.startDate || !this.searchInfo.endDate) { |
| | |
| | | this.getTableData(); |
| | | }, |
| | | getTableData() { |
| | | this.$HTTP.post(`/workinghour/page?current=${this.current}&size=${this.size}`, this.searchInfo).then(res => { |
| | | this.$HTTP.post(`/api/workinghour/page?current=${this.current}&size=${this.size}`, this.searchInfo).then(res => { |
| | | if (res.code === 200) { |
| | | res.data.records.forEach((item,index)=> { |
| | | item.index = index + 1; |
| | |
| | | }) |
| | | }, |
| | | goFirstWorkDetail() { |
| | | if(this.workstationIdList.length == 0) { |
| | | if(this.ids.length == 0) { |
| | | this.$message.error("请先选择数据"); |
| | | return; |
| | | } |
| | | this.$router.push({path: `/mdc/first-workpiece-detail`,query: {idList: this.workstationIdList.join(',')}}) |
| | | this.$router.push({path: `/mdc/first-workpiece-detail`,query: {ids: this.ids.join(',')}}) |
| | | }, |
| | | handleSelectionChange(val) { |
| | | this.workstationIdList = []; |
| | | this.ids = []; |
| | | val.forEach(item=> { |
| | | this.workstationIdList.push(item.workstationId); |
| | | this.ids.push(item.id); |
| | | }) |
| | | }, |
| | | query() { |