yangys
2025-11-18 831cfa4c439c6d073d706a82d2a439f8b1818498
src/views/mdc/first-workpiece-detail.vue
@@ -2,7 +2,7 @@
 * @Author: lzhe lzhe@example.com
 * @Date: 2024-04-26 09:36:18
 * @LastEditors: lzhe lzhe@example.com
 * @LastEditTime: 2024-11-25 14:32:50
 * @LastEditTime: 2024-12-20 15:06:05
 * @FilePath: /smart-web/src/views/mdc/status-record.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
@@ -36,14 +36,12 @@
                            <process-charts :index="index" :tableData="tableData"></process-charts>
                            <div class="modelBtn">
                                <el-button type="primary" @click="goFirstWorkProcess(item,index)">过程分析</el-button>
                                <el-button type="primary" @click="exportBtn(item,index)">输出</el-button>
                            </div>
                        </el-card>
                    </div>
                </div>
            </div>
            <el-footer>
                <el-button type="primary">输出</el-button>
            </el-footer>
        </el-card>
    </el-main>
</template>
@@ -69,8 +67,8 @@
                {title:'零件号',width: '80px'},
                {title:'工序号',width: '80px'},
                {title:'版次',width: '60px'},
                {title:'机床',width: '100px'},
                {title:'开机时间',width: '145px'},
                {title:'工位',width: '100px'},
                {title:'开始时间',width: '145px'},
                {title:'结束时间',width: '145px'},
                {title:'占机时间',width: '100px'},
                {title:'装夹调试时间',width: '100px'},
@@ -94,6 +92,14 @@
        })
    },
    methods: {
        exportBtn(item,index) {
            var id = this.tableData[index - 1].id;
            this.$HTTP.get(`/api/workinghour/export?id=${id}`).then(res => {
                if (res.code == 200) {
                    this.$TOOL.downFile(res.data.link,res.data.originalName);
                }
            })
        },
        convertSeconds(seconds) {  //转换时间
            // 定义时间单位转换关系
            const daysInSeconds = 24 * 60 * 60;