<!--
|
* @Author: lzhe lzhe@example.com
|
* @Date: 2024-04-26 09:36:18
|
* @LastEditors: lzhe lzhe@example.com
|
* @LastEditTime: 2024-12-20 14:52:10
|
* @FilePath: /smart-web/src/views/mdc/status-record.vue
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
-->
|
<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>
|
<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" @click="exportBtn">输出</el-button>
|
</el-footer>
|
</el-card>
|
</el-main>
|
</template>
|
|
<script>
|
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
|
let icons = []
|
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
|
icons.push(key)
|
}
|
import * as echarts from 'echarts';
|
export default {
|
components: {
|
...ElementPlusIconsVue
|
},
|
data() {
|
return {
|
tableData: []
|
}
|
},
|
created() {
|
|
},
|
mounted() {
|
this.getTableData();
|
},
|
methods: {
|
exportBtn() {
|
this.$HTTP.get(`/api/workinghour/working-process-export?id=${this.$route.query.id}`).then(res => {
|
if (res.code == 200) {
|
this.$TOOL.downFile(res.data.link,res.data.originalName);
|
}
|
})
|
},
|
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>
|
|
<style scoped>
|
|
</style>
|