| | |
| | | <template> |
| | | <el-main style="height: 100%;" class="timeAnalysis"> |
| | | <el-card body-style="height: 100%;padding: 0;" style="margin-bottom: 12px;"> |
| | | <el-table :data="tableData" border @selection-change="handleSelectionChange"> |
| | | <el-table-column prop="test" label="程序名称"></el-table-column> |
| | | <el-table-column prop="test" label="开机时间"></el-table-column> |
| | | <el-table-column prop="test" label="结束时间"></el-table-column> |
| | | <el-table-column prop="test" label="持续时长"></el-table-column> |
| | | <el-table-column prop="test" label="状态"></el-table-column> |
| | | <el-table :data="tableData" border> |
| | | <el-table-column prop="progName" label="程序名称"></el-table-column> |
| | | <el-table-column prop="startTime" label="开机时间"></el-table-column> |
| | | <el-table-column prop="endTime" label="结束时间"></el-table-column> |
| | | <el-table-column prop="duration" label="持续时长"></el-table-column> |
| | | <el-table-column prop="deviceStatus" label="状态"></el-table-column> |
| | | </el-table> |
| | | <el-footer> |
| | | <el-button type="primary">输出</el-button> |
| | |
| | | } |
| | | }, |
| | | created() { |
| | | for(var i=0;i<10;i++) { |
| | | this.tableData.push({test: 1}) |
| | | } |
| | | |
| | | }, |
| | | mounted() { |
| | | this.getTableData(); |
| | | }, |
| | | methods: { |
| | | handleSelectionChange() { |
| | | |
| | | } |
| | | getTableData() { |
| | | this.$HTTP.get(`/api/workinghour/working-process`, {id: this.$route.query.id}).then(res => { |
| | | if (res.code === 200) { |
| | | this.getprocess(res); |
| | | } |
| | | }) |
| | | }, |
| | | getprocess(res) { //颜色状态 |
| | | this.$HTTP.get(`/api/smis/global_wcs/list?code=&name=`).then(resp => { |
| | | if (resp.code == 200) { |
| | | res.data.forEach(item=> { |
| | | resp.data.forEach(item1=> { |
| | | if(item.deviceStatus == item1.code) { |
| | | item.deviceStatus = item1.name; |
| | | } |
| | | }) |
| | | }) |
| | | this.tableData = res.data; |
| | | console.log(JSON.stringify(res.data),111) |
| | | } |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | </script> |