叶松
2023-12-06 1b004047f00cc846924209051ee654619c56a249
web/src/views/MixingInfo/mixRatio.vue
@@ -1,7 +1,7 @@
<template>
    <div class="wrap">
        <div class="header">
            <div class="header_name">中铁十四局通甬站前I标管片场拌合站</div>
            <div class="header_name">中铁十四局通甬站前I标管片场拌和站</div>
        </div>
        <div class="table">
            <div class="row title">{{ info.signboardName }}</div>
@@ -45,7 +45,7 @@
            fn()
            return fn
        })(),
        1000 * 60 * 5
        1000 * 60 * 1
    )
    if (Vue) {
        Vue.$once('hook:beforeDestroy', function () {
@@ -98,10 +98,14 @@
            $html.style.fontSize = `${fontsize}px`
        }
    },
    beforeDestroy() {
        let $html = document.getElementsByTagName('html')[0]
        $html.style.fontSize = ''
    },
    methods: {
        async getLists() {
        getLists() {
            const params = {
                pageNum: --this.type, // 传 0 1对应两个页面
                pageNum: this.type, // 传 1 2对应两个页面
                pageSize: 1,
            }
            this.$api.Infos.getMixRatio(params).then(res => {
@@ -113,12 +117,19 @@
                        this.info.signboardName = item.signboardName
                        this.info.proName = item.proName
                        this.info.constructionUnit = item.constructionUnit
                        if (tmixingConsumes && tmixingConsumes.length) {
                            this.info.constructionUnit = tmixingConsumes[0].constructionUnit
                            this.info.saveStamp = tmixingConsumes[0].saveStamp
                            this.info.construction = tmixingConsumes[0].construction
                            this.dataLists = [
                                {name: '材料名称', type: 'dictName', value: []}, // 材料名称
                                {name: '规格型号', type: 'spec', value: []}, // 规格型号
                                {name: '生产厂家', type: 'manufacturer', value: []}, // 生产厂家
                                {name: '材料含水率(%)', type: 'watFull', value: []}, // 含水率
                                {name: '理论用量(kg/m³)', type: 'planAmnt', value: []}, // 理论用量
                                {name: '实际用量(kg/m³)', type: 'factAmnt', value: []}, // 实际用量
                            ]
                            tmixingConsumes.forEach(item => {
                                this.dataLists.forEach(val => {
                                    item[val.type] && val.value.push(item[val.type])
@@ -135,7 +146,7 @@
    }
}
</script>
<style scoped>
<style lang="scss" scoped>
.wrap {
    position: absolute;
    width: 100%;
@@ -156,7 +167,7 @@
    background-size: 100% auto;
    .header_name {
        font-size: 1.6rem;
        font-size: 1.4rem;
        font-weight: bold;
        line-height: 3.2rem;
        letter-spacing: 2px;
@@ -175,7 +186,7 @@
    bottom: 2rem;
    left: 2rem;
    right: 2rem;
    font-size: 0.8rem;
    font-size: 0.74rem;
    color: #fff;
    .title {
@@ -189,10 +200,9 @@
    .row {
        flex: 1;
        width: 100%;
        height: 2rem;
        margin: 0 -1px -1px 0;
        text-align: center;
        line-height: 2rem;
        line-height: 1.1rem;
        border: 1px solid #01B3EF;
        .name {
@@ -235,7 +245,7 @@
    .row.line {
        display: flex;
        >div {
        > div {
            flex: 1;
        }
    }