gaoshp
2024-04-18 cabb42ddb2ee6d5daeb8e6b4cf2142d725dda845
update
已修改2个文件
83 ■■■■ 文件已修改
src/views/mdc/MYTree.vue 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/efficiency-analysis.vue 67 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/MYTree.vue
@@ -1,16 +1,17 @@
<!--
 * @Date: 2024-04-18 19:53:35
 * @LastEditors: Sneed
 * @LastEditTime: 2024-04-18 20:56:37
 * @LastEditTime: 2024-04-18 21:30:19
 * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/mdc/MYTree.vue
-->
<template>
    <el-tree ref="treeRef" v-bind="$attrs" :show-checkbox="showCheckbox" :current-node-key="currentNodeKey"
        node-key="id" :props="defalutProps" :data="data" @check-change="checkChange" @node-click="handleNodeClick"
        highlight-current default-expand-all></el-tree>
        highlight-current default-expand-all :render-content="renderContent"></el-tree>
</template>
<script>
import pmsPng from '@/assets/pms.png'
export default {
    props: {
        showCheckbox: {
@@ -20,6 +21,7 @@
    },
    data() {
        return {
            pmsPng,
            firstWorkKey: '',
            currentNodeKey: '',
            defalutProps: {
@@ -44,6 +46,16 @@
        this.getList()
    },
    methods: {
        renderContent(h, { data }) {
            let img = data.groupTag == 'fms_beltline'
            return h('span', {
            },
                img ? h('img', {
                    src: pmsPng
                }, '') : '',
                data.title)
        },
        getList() {
            this.$HTTP.post('/api/blade-cps/group/groupWorkstation/type', {
                groupCategory: 1,
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])
        }
    }
}