gaoshp
2024-04-18 cabb42ddb2ee6d5daeb8e6b4cf2142d725dda845
src/views/mdc/efficiency-analysis.vue
@@ -1,31 +1,52 @@
<!--
 * @Date: 2024-04-09 22:11:21
 * @LastEditors: Sneed
 * @LastEditTime: 2024-04-18 20:57:46
 * @LastEditTime: 2024-04-18 21:48:13
 * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/mdc/efficiency-analysis.vue
 * 效率分析
-->
<template>
    <el-main>
        <el-card shadow="never">
            <el-container>
                <el-aside width="200px" v-loading="showGrouploading">
    <el-main style="height: 100%;">
        <el-card shadow="never" style="height: 100%;" body-style="height: 100%">
            <el-container style="height: 100%;">
                <el-aside width="300px" style="height: 100%;">
                    <el-container>
                        <el-main class="nopadding">
                            <el-row>
                                <el-col>统计数据</el-col>
                                <el-col>
                                    <el-select></el-select>
                                    <el-select style="width: 250px" v-model="productivityType">
                                        <el-option v-for="(item, index) in options" :key="index" :label="item.label"
                                            :value="item.value"></el-option>
                                    </el-select>
                                </el-col>
                                <el-col>日期</el-col>
                                <el-col style="margin-top: 14px;">日期</el-col>
                                <el-col>
                                    <el-select></el-select>
                                    <el-date-picker style="width: 250px" v-model="time" type="daterange"
                                        range-separator="-" start-placeholder="" end-placeholder="" />
                                </el-col>
                            </el-row>
                            <el-row style="margin-top: 14px;">
                                工位
                            </el-row>
                            <MYTree v-model="treeChecked" show-checkbox></MYTree>
                        </el-main>
                        <el-footer>
                            <el-button>查询</el-button>
                            <el-button>导出</el-button>
                        </el-footer>
                    </el-container>
                </el-aside>
                <el-container>
                    <el-tabs tab-position="top" v-model="activeName">
                        <el-tab-pane label="按班次统计" name="ban">
                        </el-tab-pane>
                        <el-tab-pane label="按时间周期统计" name="time">
                        </el-tab-pane>
                    </el-tabs>
                </el-container>
            </el-container>
        </el-card>
    </el-main>
@@ -44,12 +65,40 @@
    },
    data() {
        return {
            treeChecked: []
            activeName: '',
            productivityType: '',
            time: [],
            options: [
                {
                    label: '稼动率',
                    value: 'OEE',
                },
                {
                    label: '报警率',
                    value: 'ALARM',
                },
                {
                    label: '运行率',
                    value: 'RUNNING',
                },
            ]
        }
    },
    methods: {
        query(vals) {
            console.log([...vals])
            this.$HTTP.post('/api/blade-mdc/efficiency-analysis/interval', {
                endDate: this.time[0],
                startDate: this.time[1],
                statisticalMethod: 'SHIFT'
            })
            this.$HTTP.post('/api/blade-mdc/efficiency-analysis?size=-1', {
            })
            this.$HTTP.post('/api/blade-mdc/efficiency-analysis?current=1&size=15', {
            })
            this.$HTTP.post('/api/blade-cps/workstation-wcs-feedback/feedback-status', [...vals])
        }
    }
}