yangys
2025-11-18 831cfa4c439c6d073d706a82d2a439f8b1818498
src/views/mdc/first-workpiece.vue
@@ -2,7 +2,7 @@
 * @Author: lzhe lzhe@example.com
 * @Date: 2024-04-26 09:36:18
 * @LastEditors: lzhe lzhe@example.com
 * @LastEditTime: 2024-12-09 13:39:49
 * @LastEditTime: 2024-12-20 15:10:08
 * @FilePath: /smart-web/src/views/mdc/status-record.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
@@ -88,12 +88,16 @@
                                </template>
                            </el-table-column>
                            <el-table-column prop="amount" label="数量" width="60"></el-table-column>
                            <el-table-column label="操作" width="100">
                                <template #default="scope">
                                    <el-button type="primary" @click="exportBtn(scope)">输出</el-button>
                                </template>
                            </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>
                        <el-button type="primary">输出</el-button>
                    </el-footer>
                </el-container>
            </el-container>
@@ -141,6 +145,13 @@
        this.getTableData();
    },
    methods: {
        exportBtn(scope) {
            this.$HTTP.get(`/api/workinghour/export?id=${scope.row.id}`).then(res => {
                if (res.code == 200) {
                    this.$TOOL.downFile(res.data.link,res.data.originalName);
                }
            })
        },
        setDate() {
            var date = new Date();
            var threeDaysInMilliseconds = 3 * 24 * 60 * 60 * 1000;