| | |
| | | * @Author: lzhe lzhe@example.com |
| | | * @Date: 2024-04-26 09:36:18 |
| | | * @LastEditors: lzhe lzhe@example.com |
| | | * @LastEditTime: 2024-11-22 18:45:06 |
| | | * @LastEditTime: 2024-11-25 14:24:43 |
| | | * @FilePath: /smart-web/src/views/mdc/status-record.vue |
| | | * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE |
| | | --> |
| | |
| | | <el-input v-model="searchInfo.workstationName"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="开始时间"> |
| | | <el-date-picker v-model="searchInfo.startDate" format="YYYY-MM-DD" value-format="YYYY-MM-DD" @change="changeStartDate" type="date" placeholder="选择日期"></el-date-picker> |
| | | <el-date-picker v-model="searchInfo.startDate" format="YYYY-MM-DD" value-format="YYYY-MM-DD" type="date" placeholder="选择日期"></el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="结束时间"> |
| | | <el-date-picker v-model="searchInfo.endDate" format="YYYY-MM-DD" value-format="YYYY-MM-DD" type="date" placeholder="选择日期"></el-date-picker> |
| | |
| | | </el-table-column> |
| | | <el-table-column prop="amount" label="数量" width="60"></el-table-column> |
| | | </el-table> |
| | | <el-pagination background layout="total, prev, pager, next" :total="total" style="margin-top: 12px;" @current-change="handleCurrentChange"></el-pagination> |
| | | </el-main> |
| | | <el-footer> |
| | | <el-button type="primary" @click="goFirstWorkDetail">详情</el-button> |
| | |
| | | }, |
| | | tabPosition: "设备结构树", |
| | | tableData: [], |
| | | treeChecked: [] |
| | | treeChecked: [], |
| | | workstationIdList: [], |
| | | total: 0, |
| | | current: 1, |
| | | size: 20 |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | //this.getTableData(); |
| | | }, |
| | | methods: { |
| | | handleCurrentChange(val) { |
| | | this.current = val; |
| | | this.getTableData(); |
| | | }, |
| | | convertSeconds(seconds) { //转换时间 |
| | | // 定义时间单位转换关系 |
| | | const daysInSeconds = 24 * 60 * 60; |
| | |
| | | console.log(val,111) |
| | | }, |
| | | searchBtn() { |
| | | if(!this.searchInfo.startDate || !this.searchInfo.endDate) { |
| | | this.$message.error('选择开始、结束时间查询'); |
| | | return; |
| | | } |
| | | this.getTableData(); |
| | | }, |
| | | getTableData() { |
| | | console.log(this.searchInfo,111) |
| | | this.$HTTP.post('/workinghour/page?current=1&size=20', this.searchInfo).then(res => { |
| | | this.$HTTP.post(`/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; |
| | | }) |
| | | this.tableData = res.data.records; |
| | | this.total = res.data.total; |
| | | } |
| | | }) |
| | | }, |
| | | goFirstWorkDetail() { |
| | | this.$router.push({path: `/mdc/first-workpiece-detail`,query: {id:1}}) |
| | | if(this.workstationIdList.length == 0) { |
| | | this.$message.error("请先选择数据"); |
| | | return; |
| | | } |
| | | this.$router.push({path: `/mdc/first-workpiece-detail`,query: {idList: this.workstationIdList.join(',')}}) |
| | | }, |
| | | handleSelectionChange(val) { |
| | | console.log(val); |
| | | this.workstationIdList = []; |
| | | val.forEach(item=> { |
| | | this.workstationIdList.push(item.workstationId); |
| | | }) |
| | | }, |
| | | query() { |
| | | |