gaoshp
2024-04-23 f28363d03c3539b0219c5b58ea8b7db37d50be6f
src/views/mdc/status-record.vue
@@ -3,13 +3,13 @@
      <div class="aposcope-left">
         <div class="left-title">查询条件</div>
         <div class="left-title-col">日期</div>
            <el-date-picker v-model="time" type="daterange" :shortcuts="shortcuts" range-separator="-" size="small" style="width: 100%;"/>
            <el-date-picker v-model="time" type="daterange" :shortcuts="shortcuts" range-separator="-" size="small" style="width: 100%;" value-format="YYYY-MM-DD"/>
            <div class="left-title-col">工位</div>
            <div class="MYTree">
                <MYTree v-model="treeChecked" show-checkbox class="MYTree-content"></MYTree>
            </div>
            <div class="footer">
                <el-button @click="query">查询</el-button>
                <el-button @click="query" type="primary">查询</el-button>
                <el-button>导出</el-button>
            </div>
      </div>
@@ -32,6 +32,7 @@
                            </div>
                        </div>
                    </div>
                    <el-pagination layout="prev, pager, next" :total="total" :page-count="size" :default-page-size="size"/>
                </el-tab-pane>
                <el-tab-pane label="按工位查看" name="time">
                    按工位查看
@@ -46,7 +47,6 @@
import MYTree from './MYTree.vue'
import Shift from './components/Shift.vue'
import Time from './components/Time.vue'
export default {
    components: {
       time: "",
@@ -113,13 +113,15 @@
            treeChecked: [],
            achievements: [],
         collectionstatus: [],
            current: "1",
            size: "6",
            total: 0
        }
    },
    created() {
        
    },
    mounted() {
        this.query();
        this.init();
    },
    methods: {
@@ -151,15 +153,31 @@
                }
            })
        },
        getCharts() {
            var obj = {
                date: this.time[0],
                humanFeedback: true,
                machineFeedback: true,
                workstationInfoList: []
            }
            this.$HTTP.post(`/api/blade-mdc/status-record/status-record-by-date?current=${this.current}&size=${this.size}`,obj).then(res => {
                if (res.code === 200) {
                    console.log(res.data.records)
                    this.total = res.data.total;
                }
            })
        },
        init() {
            this.time = [moment().subtract(2, 'days').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')];
            this.getTime({endDate: this.time[1],startDate: this.time[0],statisticalMethod: 'SHIFT'});  //日期sort
            this.getachievements();  //采集状态or人工反馈状态
            this.getCharts();
        },
        timeBtnChange() {
        },
        query() {
            this.getTime({endDate: this.time[1],startDate: this.time[0],statisticalMethod: 'SHIFT'})
            // this.$refs[this.activeName].init({
            //     endDate: this.time[1],
            //     startDate: this.time[0],