1
lzhe
2024-12-20 2b5e32409797633ded79422d1e6ccbd213c8d9c6
1
已修改4个文件
43 ■■■■ 文件已修改
src/views/mdc/components/process-charts.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/first-workpiece-detail.vue 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/first-workpiece-process.vue 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/first-workpiece.vue 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/components/process-charts.vue
@@ -1,7 +1,7 @@
<!--
 * @Date: 2024-04-18 21:52:18
 * @LastEditors: lzhe lzhe@example.com
 * @LastEditTime: 2024-12-06 17:54:28
 * @LastEditTime: 2024-12-20 14:56:14
 * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/mdc/components/TimeAlarm.vue
-->
<template>
@@ -69,7 +69,6 @@
                if (res.code === 200) {
                    if(res.data.length == 0) return;
                    var timeRange = {};
                    console.log(res.data,1111111)
                    timeRange.startTime = res.data[0].startTime;
                    timeRange.endTime = res.data[res.data.length - 1].endTime;
                    var total = Math.abs(moment(timeRange.startTime).diff(moment(timeRange.endTime)));
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-12-06 17:27:03
 * @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>
@@ -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;
src/views/mdc/first-workpiece-process.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-22 18:45:06
 * @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
-->
@@ -17,7 +17,7 @@
                <el-table-column prop="deviceStatus" label="状态"></el-table-column>
            </el-table>
            <el-footer>
                <el-button type="primary">输出</el-button>
                <el-button type="primary" @click="exportBtn">输出</el-button>
            </el-footer>
        </el-card>
    </el-main>
@@ -46,6 +46,13 @@
        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) {
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;