gaoshp
2024-05-20 d882e6774b7d96df39d6a6683d9e305da2d34c7c
update
已修改4个文件
144 ■■■■■ 文件已修改
src/views/mdc/components/Shift.vue 47 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/efficiency-analysis.vue 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/output-statistics.vue 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/processParam/index.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/components/Shift.vue
@@ -1,7 +1,7 @@
<!--
 * @Date: 2024-04-18 21:52:18
 * @LastEditors: Sneed
 * @LastEditTime: 2024-04-27 23:31:53
 * @LastEditTime: 2024-05-20 21:05:43
 * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/mdc/components/Shift.vue
-->
<template>
@@ -61,6 +61,11 @@
        colname: {
            default: '',
            type: String,
        },
        options: {
            default() {
                return {}
            },
        }
    },
    components: {
@@ -134,45 +139,7 @@
            return this.$HTTP.post(this.url, dataSend, { params }).then(res => {
                this.chartsData = res.data.items.records
                let option2 = {
                    legend: {
                        type: 'plain',
                    },
                    title: {
                        text: '统计图表',
                        subtext: '',
                    },
                    grid: {
                        top: '80px'
                    },
                    tooltip: {
                        trigger: 'axis'
                    },
                    xAxis: {
                        type: 'category',
                    },
                    yAxis: {
                        type: 'value',
                        axisLabel: {
                            formatter: (value) => {
                                return value + '%'
                            }
                        },
                    },
                    dataZoom: [
                        { type: 'slider' }
                    ],
                    dataset: {
                        source: [
                            ['product', '班次1', '班次2'],
                        ]
                    },
                    series: [{
                        type: 'bar',
                    },
                    {
                        type: 'bar',
                    }]
                    ...this.options
                }
                option2.dataset.source = [['product', '班次1', '班次2']]
                res.data.items.records.forEach(v => {
src/views/mdc/efficiency-analysis.vue
@@ -1,7 +1,7 @@
<!--
 * @Date: 2024-04-09 22:11:21
 * @LastEditors: Sneed
 * @LastEditTime: 2024-04-20 21:04:13
 * @LastEditTime: 2024-05-20 21:04:56
 * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/mdc/efficiency-analysis.vue
 * 效率分析
-->
@@ -41,7 +41,7 @@
                    <el-main>
                        <el-tabs tab-position="top" v-model="activeName" type="card">
                            <el-tab-pane label="按班次统计" name="shift">
                                <Shift colname="效率" ref="shift" v-if="activeName == 'shift'" />
                                <Shift :options="chartOption" colname="效率" ref="shift" v-if="activeName == 'shift'" />
                            </el-tab-pane>
                            <el-tab-pane label="按时间周期统计" name="time">
                                <Time ref="time" v-if="activeName == 'time'" />
@@ -80,6 +80,46 @@
            productivityType: 'OEE',
            time: [],
            treeChecked: [],
            chartOption: {
                legend: {
                    type: 'plain',
                },
                title: {
                    text: '统计图表',
                    subtext: '',
                },
                grid: {
                    top: '80px'
                },
                tooltip: {
                    trigger: 'axis'
                },
                xAxis: {
                    type: 'category',
                },
                yAxis: {
                    type: 'value',
                    axisLabel: {
                        formatter: (value) => {
                            return value + '%'
                        }
                    },
                },
                dataZoom: [
                    { type: 'slider' }
                ],
                dataset: {
                    source: [
                        ['product', '班次1', '班次2'],
                    ]
                },
                series: [{
                    type: 'bar',
                },
                {
                    type: 'bar',
                }]
            },
            options: [
                {
                    label: '稼动率',
src/views/mdc/output-statistics.vue
@@ -1,7 +1,7 @@
<!--
 * @Date: 2024-04-09 22:11:21
 * @LastEditors: Sneed
 * @LastEditTime: 2024-04-20 21:04:01
 * @LastEditTime: 2024-05-20 21:04:40
 * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/mdc/output-statistics.vue
 * 效率分析
-->
@@ -34,7 +34,7 @@
                    <el-main>
                        <el-tabs tab-position="top" v-model="activeName" type="card">
                            <el-tab-pane label="按班次统计" name="shift">
                                <Shift colname="产量" url="/api/blade-mdc/output" ref="shift"
                                <Shift :options="chartOption" colname="产量" url="/api/blade-mdc/output" ref="shift"
                                    v-if="activeName == 'shift'">
                                </Shift>
                            </el-tab-pane>
@@ -76,6 +76,46 @@
            activeName: 'shift',
            time: [],
            treeChecked: [],
            chartOption: {
                legend: {
                    type: 'plain',
                },
                title: {
                    text: '统计图表',
                    subtext: '',
                },
                grid: {
                    top: '80px'
                },
                tooltip: {
                    trigger: 'axis'
                },
                xAxis: {
                    type: 'category',
                },
                yAxis: {
                    type: 'value',
                    axisLabel: {
                        formatter: (value) => {
                            return value
                        }
                    },
                },
                dataZoom: [
                    { type: 'slider' }
                ],
                dataset: {
                    source: [
                        ['product', '班次1', '班次2'],
                    ]
                },
                series: [{
                    type: 'bar',
                },
                {
                    type: 'bar',
                }]
            },
            options: [
                {
                    label: '稼动率',
src/views/mdc/processParam/index.vue
@@ -76,7 +76,7 @@
                                <!-- <el-switch v-model="isShowTable" class="mb-2" active-text="数据表" inactive-text="统计图" /> -->
                            </el-col>
                            <el-col :span="20" style='text-align: right;'>
                                <el-date-picker :max-range="3" :clearable="false" value-format="YYYY-MM-DD"
                                <el-date-picker :max-range="3" :clearable="true" value-format="YYYY-MM-DD"
                                    style="width: 250px" v-model="time" type="daterange" range-separator="-"
                                    start-placeholder="" end-placeholder="" :disabled-date="disabledDate"
                                    @calendar-change="change" />
@@ -133,7 +133,8 @@
        treeChecked() {
            this.query()
        },
        time() {
        time(val) {
            if (!val?.[0]) return
            this.query()
        },
        timeRange(val) {
@@ -153,9 +154,11 @@
            activeList: [0, 1, 2, 3, 4, 5, 6, 7, 8],
            timeRange: '',
            treeChecked: [],
            timeStart: moment().format('YYYY-MM-DD'),
            timeStart: '',
            time: [moment().format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')],
            disabledDate: Date => {
                if (!this.timeStart) return false
                console.log(this.timeStart, '????????')
                let max = moment(this.timeStart, 'YYYY-MM-DD').add(3, 'd').format('YYYY-MM-DD')
                let min = moment(this.timeStart, 'YYYY-MM-DD').subtract(3, 'd').format('YYYY-MM-DD')
                return !moment(Date).isBetween(min, max);