lzhe
2024-06-21 b1ac0c149564d4873a8b6ef075029fcaa7c83960
Merge branch 'master' of http://www.beijingsoft.cn:9090/r/smart-web
已修改7个文件
185 ■■■■■ 文件已修改
src/views/mdc/alarm-statistics.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/components/ShiftAlarm.vue 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/components/Time.vue 37 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/components/TimeAlarm.vue 81 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/efficiency-analysis.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/output-statistics.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/processParam/index.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/alarm-statistics.vue
@@ -1,7 +1,7 @@
<!--
 * @Date: 2024-04-09 22:11:21
 * @LastEditors: Sneed
 * @LastEditTime: 2024-05-14 20:40:54
 * @LastEditTime: 2024-06-20 23:54:23
 * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/mdc/alarm-statistics.vue
 * 效率分析
-->
@@ -25,8 +25,8 @@
                            <MYTree v-model="treeChecked" @loaded="query"></MYTree>
                        </el-main>
                        <el-footer>
                            <el-button @click="query()">查询</el-button>
                            <!-- <el-button>导出</el-button> -->
                            <el-button type="primary" @click="query()">查询</el-button>
                            <el-button @click="exportExcel">导出</el-button>
                        </el-footer>
                    </el-container>
                </el-aside>
src/views/mdc/components/ShiftAlarm.vue
@@ -1,7 +1,7 @@
<!--
 * @Date: 2024-04-18 21:52:18
 * @LastEditors: Sneed
 * @LastEditTime: 2024-05-14 20:42:32
 * @LastEditTime: 2024-06-20 23:13:35
 * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/mdc/components/ShiftAlarm.vue
-->
<template>
@@ -9,8 +9,8 @@
        <el-row>
            <el-col>
                <el-button-group>
                    <el-button size="small" @click="btnListActive = item.id"
                        :type="btnListActive == item.id ? 'primary' : ''" v-for="item in btnList" :key="item.id">{{
                    <el-button size="small" @click="change(item)" :type="btnListActive == item.id ? 'primary' : ''"
                        v-for="item in btnList" :key="item.id">{{
                            item.title }}</el-button>
                </el-button-group>
            </el-col>
@@ -80,27 +80,32 @@
            ],
        }
    },
    watch: {
        btnListActive(val) {
    // watch: {
    //     btnListActive(val) {
    //         this.queryChart({
    //             ...this.params,
    //         })
    //     }
    // },
    methods: {
        change(item) {
            this.btnListActive = item.id
            this.queryChart({
                ...this.params,
            })
        }
    },
    methods: {
        },
        init(params) {
            this.btnListActive = ''
            console.log('++++++')
            this.params = {
                ...this.params,
                workstationId: params.workstationId.toString()
            }
            this.getTime({
                endDate: params.endDate,
                startDate: params.startDate,
            }).then(res => {
            this.$nextTick(() => {
                this.params = {
                    ...this.params,
                    workstationId: params.workstationId.toString()
                }
                this.getTime({
                    endDate: params.endDate,
                    startDate: params.startDate,
                })
            })
        },
        getTime(data) {
            return new Promise(resolve => {
@@ -118,7 +123,7 @@
                    })
                }
                this.btnList = arr;
                this.btnListActive = arr[0].id
                this.change(arr[0])
                resolve(arr)
            })
        },
src/views/mdc/components/Time.vue
@@ -1,7 +1,7 @@
<!--
 * @Date: 2024-04-18 21:52:18
 * @LastEditors: Sneed
 * @LastEditTime: 2024-06-18 20:09:02
 * @LastEditTime: 2024-06-21 00:15:44
 * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/mdc/components/Time.vue
-->
<template>
@@ -117,8 +117,10 @@
                startDate: params.startDate,
                statisticalMethod: this.statisticalMethod
            }).then(res => {
                let startDate = Math.min(...res.data.map(v => new Date(v.startDate).getTime()))
                let endDate = Math.max(...res.data.map(v => new Date(v.startDate).getTime()))
                if (!res?.length) return
                let startDate = Math.min(...res?.map(v => new Date(v.startDate).getTime()))
                let endDate = Math.max(...res?.map(v => new Date(v.endDate).getTime()))
                console.log('------')
                let data = {
                    ...params,
                    statisticalMethod: this.statisticalMethod
@@ -126,6 +128,7 @@
                if (this.statisticalMethod !== 'Day') {
                    data = {
                        ...data,
                        startDate: moment(startDate).format('YYYY-MM-DD'),
                        endDate: moment(endDate).format('YYYY-MM-DD'),
                        statisticalMethod: this.statisticalMethod
                    }
@@ -135,8 +138,8 @@
                    ...data
                })
                this.queryChart({
                    ...params,
                    statisticalMethod: this.statisticalMethod
                    ...data,
                    // statisticalMethod: this.statisticalMethod
                })
            })
@@ -148,7 +151,25 @@
            }).then(res => {
                if (res.code === 200) {
                    this.btnListNew = res.data
                    return res
                    if (data.statisticalMethod === 'MONTH') {
                        return res?.data?.map(v => {
                            return {
                                ...v,
                                startDate: moment(v.id).startOf('month').format('YYYY-MM-DD'),
                                endDate: moment(v.id).endOf('month').format('YYYY-MM-DD')
                            }
                        })
                    } else if (data.statisticalMethod === 'DAY') {
                        return res?.data?.map(v => {
                            return {
                                ...v,
                                startDate: v.id,
                                endDate: v.id
                            }
                        })
                    } else {
                        return res.data
                    }
                }
            })
        },
@@ -222,7 +243,7 @@
                console.log(option2)
            })
        },
        query() {
        query(res) {
            this.apiObj = {
                get: async (data) => {
                    let params = {
@@ -230,7 +251,7 @@
                        size: data.size
                    }
                    let dataSend = {
                        ...data,
                        ...res,
                        queryType: 1,
                        statisticalMethod: this.statisticalMethod
                    }
src/views/mdc/components/TimeAlarm.vue
@@ -1,7 +1,7 @@
<!--
 * @Date: 2024-04-18 21:52:18
 * @LastEditors: Sneed
 * @LastEditTime: 2024-04-22 22:32:05
 * @LastEditTime: 2024-06-20 23:37:09
 * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/mdc/components/TimeAlarm.vue
-->
<template>
@@ -29,7 +29,7 @@
                </el-collapse-item>
                <el-collapse-item title="周 按周查看" name="2">
                    <el-button-group style="margin-bottom: 14px">
                        <el-button size="small" @click="queryWeek(item)"
                        <el-button :title="`${item.startDate} -${item.endDate} `" size="small" @click="queryWeek(item)"
                            :type="valueWeek == item.value ? 'primary' : ''" v-for="item in btnListWeek"
                            :key="item.value">{{ item.label
                            }}</el-button>
@@ -45,7 +45,7 @@
                </el-collapse-item>
                <el-collapse-item title="月 按月查看" name="3">
                    <el-button-group style="margin-bottom: 14px">
                        <el-button size="small" @click="queryMonth(item)"
                        <el-button :title="`${item.startDate} -${item.endDate} `" size="small" @click="queryMonth(item)"
                            :type="valueMonth == item.value ? 'primary' : ''" v-for="item in btnListMonth"
                            :key="item.value">{{ item.label
                            }}</el-button>
@@ -109,14 +109,15 @@
    },
    methods: {
        init(params) {
            this.params.workstationId = params.workstationId.toString()
            if (params) {
                this.params.workstationId = params?.workstationId?.toString()
                this.params.startDate = params.startDate
                this.params.endDate = params.endDate
            }
            this.getTime({
                endDate: params.endDate,
                startDate: params.startDate,
            }).then(res => {
            })
        },
        getTime(data) {
            return Promise.all([
@@ -125,15 +126,18 @@
                    statisticalMethod: "DAY"
                }).then(res => {
                    if (res.code === 200) {
                        this.btnListDay = res.data.map(item => ({
                            label: item.title,
                            value: item.id,
                            startDate: item.startDate,
                            endDate: item.endDate,
                            week: moment(item.id).week(),
                            month: moment(item.id).month() + 1,
                            year: moment(item.id).year()
                        })).reverse()
                        this.btnListDay = res.data.map(item => {
                            return {
                                label: item.title,
                                value: item.id,
                                startDate: item.startDate,
                                endDate: item.endDate,
                                week: moment(item.id).week(),
                                month: moment(item.id).month() + 1,
                                year: moment(item.id).year()
                            }
                        }).reverse()
                    }
                    this.queryDay(this.btnListDay[0])
                }),
@@ -142,15 +146,18 @@
                    statisticalMethod: "WEEK"
                }).then(res => {
                    if (res.code === 200) {
                        this.btnListWeek = res.data.map(item => ({
                            label: item.title,
                            value: item.id,
                            startDate: item.startDate,
                            endDate: item.endDate,
                            week: moment(item.startDate).week(),
                            month: moment(item.startDate).month() + 1,
                            year: moment(item.startDate).year()
                        })).reverse()
                        this.btnListWeek = res.data.map(item => {
                            return {
                                label: item.title,
                                value: item.id,
                                startDate: item.startDate,
                                endDate: item.endDate,
                                week: moment(item.startDate).week(),
                                month: moment(item.startDate).month() + 1,
                                year: moment(item.startDate).year()
                            }
                        }).reverse()
                    }
                }),
@@ -159,15 +166,20 @@
                    statisticalMethod: "MONTH"
                }).then(res => {
                    if (res.code === 200) {
                        this.btnListMonth = res.data.map(item => ({
                            label: item.title,
                            value: item.id,
                            startDate: item.startDate,
                            endDate: item.endDate,
                            week: moment(item.id + '-1').week(),
                            month: moment(item.id + '-1').month() + 1,
                            year: moment(item.id + '-1').year()
                        })).reverse()
                        this.btnListMonth = res.data.map(item => {
                            let startDate = moment(item.id).startOf('month').format('YYYY-MM-DD')
                            let endDate = moment(item.id).endOf('month').format('YYYY-MM-DD')
                            return {
                                label: item.title,
                                value: item.id,
                                startDate,
                                endDate,
                                week: moment(item.id + '-1').week(),
                                month: moment(item.id + '-1').month() + 1,
                                year: moment(item.id + '-1').year()
                            }
                        }).reverse()
                    }
                })
@@ -217,7 +229,6 @@
            })
        },
        query(data, flag) {
            console.log('--------')
            this.queryTableData(data, flag)
            return this.$HTTP.post(this.url, data, {}).then(res => {
                return this.setOptions(res.data.res)
src/views/mdc/efficiency-analysis.vue
@@ -1,7 +1,7 @@
<!--
 * @Date: 2024-04-09 22:11:21
 * @LastEditors: Sneed
 * @LastEditTime: 2024-06-17 22:29:44
 * @LastEditTime: 2024-06-20 23:53:51
 * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/mdc/efficiency-analysis.vue
 * 效率分析
-->
@@ -32,8 +32,8 @@
                            <MYTree v-model="treeChecked" show-checkbox></MYTree>
                        </el-main>
                        <el-footer>
                            <el-button @click="query">查询</el-button>
                            <el-button>导出</el-button>
                            <el-button type="primary" @click="query">查询</el-button>
                            <el-button @click="exportExcel">导出</el-button>
                        </el-footer>
                    </el-container>
                </el-aside>
src/views/mdc/output-statistics.vue
@@ -1,7 +1,7 @@
<!--
 * @Date: 2024-04-09 22:11:21
 * @LastEditors: Sneed
 * @LastEditTime: 2024-06-17 23:32:46
 * @LastEditTime: 2024-06-20 23:54:27
 * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/mdc/output-statistics.vue
 * 效率分析
-->
@@ -25,8 +25,8 @@
                            <MYTree v-model="treeChecked" show-checkbox></MYTree>
                        </el-main>
                        <el-footer>
                            <el-button @click="query">查询</el-button>
                            <el-button>导出</el-button>
                            <el-button type="primary" @click="query">查询</el-button>
                            <el-button @click="exportExcel">导出</el-button>
                        </el-footer>
                    </el-container>
                </el-aside>
src/views/mdc/processParam/index.vue
@@ -287,7 +287,7 @@
                    {
                        data: yAxisData,
                        type: 'line',
                        step: 'start',
                    }
                ],
                xAxis: {
@@ -313,8 +313,8 @@
        setDeviceStatusOptions(data, myname) {
            let total = Math.abs(moment(this.timeRange.startTime).diff(moment(this.timeRange.endTime)))
            let start = this.timeRange.startTime
            let len = data.data.length
            if (moment(data.data[len - 1].time).unix() < moment(this.timeRange.endTime).unix()) {
            let len = data?.data?.length
            if (len > 0 && moment(data.data[len - 1].time).unix() < moment(this.timeRange.endTime).unix()) {
                let addItem = {
                    time: this.timeRange.endTime,
                    value: data.data[len - 1].value