浏览代码

首页兼容设备125%比例

SunZehao 1 年之前
父节点
当前提交
e785413ee2

+ 4 - 0
src/App.vue

@@ -7,6 +7,7 @@
 
 <script>
 // import commonHeader from '@/components/commonHeaders.vue'
+import DevicePixelRatio from '@/utils/device'
 export default {
     name: 'App',
     provide() {
@@ -34,6 +35,9 @@ export default {
             immediate: true
         }
     },
+    created() {
+        // new DevicePixelRatio().init()
+    },
     mounted() {
         window.workSpaceVo = {}
         this.loadPage()

+ 1 - 0
src/components/assessment/evaluationAmendmentFrom.vue

@@ -545,6 +545,7 @@ export default {
                         .tableBtn {
                             display: flex;
                             margin-right: 30px;
+                            width: 13%;
                             img{
                                 margin-right: 5px;
                                 margin-top: 1px;

+ 1 - 0
src/components/assessment/evaluationAmendmentNewFrom.vue

@@ -581,6 +581,7 @@ export default {
                                         display: flex;
                                         height: 20px;
                                         margin: 5px 10px 0 10px;
+                                        width: 13%;
                                         img{
                                             margin-right: 5px;
                                             margin-top: 1px;

+ 1 - 0
src/components/assessment/evaluationDeptBusinessFrom.vue

@@ -417,6 +417,7 @@ export default {
                                 display: flex;
                                 height: 20px;
                                 margin: 0 10px;
+                                width: 13%;
                                 img{
                                     margin-right: 5px;
                                     margin-top: 1px;

+ 1 - 0
src/components/assessment/evaluationDeptStartFrom.vue

@@ -511,6 +511,7 @@ export default {
                                 display: flex;
                                 height: 20px;
                                 margin: 0 10px;
+                                width: 13%;
                                 img{
                                     margin-right: 5px;
                                     margin-top: 1px;

+ 1 - 0
src/components/assessment/evaluationStartFrom.vue

@@ -661,6 +661,7 @@ export default {
                         .tableBtn {
                             display: flex;
                             margin-right: 30px;
+                            width: 13%;
                             img{
                                 margin-right: 5px;
                                 margin-top: 1px;

+ 1 - 0
src/components/assessment/evaluationStartNewFrom.vue

@@ -533,6 +533,7 @@ export default {
                                         display: flex;
                                         height: 20px;
                                         margin: 5px 10px 0 10px;
+                                        width: 13%;
                                         img{
                                             margin-right: 5px;
                                             margin-top: 1px;

+ 1 - 1
src/components/assessment/monthQuarterYearFrom.vue

@@ -619,7 +619,7 @@ export default {
                                         display: flex;
                                         height: 20px;
                                         margin: 5px 8px 0 8px;
-                                        width: 11%;
+                                        width: 13%;
                                         img{
                                             margin-right: 5px;
                                             margin-top: 1px;

+ 1 - 0
src/components/evaluationSystem/achievementKDetail.vue

@@ -291,6 +291,7 @@ export default {
                         .tableBtn {
                             display: flex;
                             margin-right: 30px;
+                            width: 13%;
                             img{
                                 margin-right: 5px;
                                 margin-top: 1px;

+ 1 - 0
src/components/evaluationSystem/achievementKPage.vue

@@ -658,6 +658,7 @@ export default {
                                 .tableBtn {
                                     display: flex;
                                     margin-right: 30px;
+                                    width: 13%;
                                     img{
                                         margin-right: 5px;
                                         margin-top: 1px;

+ 1 - 0
src/components/evaluationSystem/evaluationIndexPage.vue

@@ -850,6 +850,7 @@ export default {
                                             display: flex;
                                             justify-content: end;
                                             margin-right: 30px;
+                                            width: 13%;
                                             img{
                                                 margin-right: 5px;
                                                 margin-top: 1px;

+ 210 - 103
src/components/gatewaynNewPage.vue

@@ -4,7 +4,7 @@
             <el-col :span="18" class="quarter">
                 <div class="searchFn">
                     <el-date-picker v-model="changeYear" type="year" value-format="YYYY" placeholder="选择年份"
-                        @change="changeYearFn" />
+                        @change="changeYearFn" :style="getPickerSty()" />
                     <div class="quarterChoose">
                         <el-icon :size="20" color="#3B7AD1" @click="arrowLeft">
                             <ArrowLeft />
@@ -40,18 +40,24 @@
                         <div class="headerComTit">
                             <span class="headerFourTit">考评排行榜</span>
                         </div>
-                        <div class="headerNameTit">
-                            <div class="headerNameTit_left">
+                        <div class="headerNameForeTit">
+                            <div class="headerNameForeTit_left">
                                 <span>单位名称</span>
                             </div>
-                            <div class="headerNameTit_right">
+                            <div class="headerNameForeTit_right">
                                 <span>得分</span>
-                                <span style="margin-left: 20px">加分事项</span>
+                                <!-- <span style="margin-left: 20px">加分事项</span>
                                 <span style="margin-left: 20px">扣分事项</span>
                                 <span style="margin-left: 20px">管理加分</span>
                                 <span style="margin-left: 20px">管理扣分</span>
                                 <span style="margin-left: 20px">高于基准</span>
-                                <span style="margin-left: 20px">低于基准</span>
+                                <span style="margin-left: 20px">低于基准</span> -->
+                                <span>加分事项</span>
+                                <span>扣分事项</span>
+                                <span>管理加分</span>
+                                <span>管理扣分</span>
+                                <span>高于基准</span>
+                                <span>低于基准</span>
                             </div>
                         </div>
                     </div>
@@ -59,13 +65,13 @@
                 <!-- v-for="it in 4" :key="it" -->
                 <div class="tableMain" v-for="(it, index) in cupDataYearArr.section" :key="index">
                     <div class="mainOne">
-                        <span :style="index === 2 ? 'top:45px': ''">{{it.name}}</span>
+                        <span :style="getMainOneSty()">{{it.name}}</span>
                     </div>
                     <div class="mainTwo">
-                        <div class="echartsNum" :style="it.echartsData.allNum < 10 ? 'left:70px': ''">
-                            {{it.echartsData.allNum}}</div>
+                        <!-- <div class="echartsNum" :style="it.echartsData.allNum < 10 ? 'left:70px': ''">
+                            {{it.echartsData.allNum}}</div> -->
                         <div :id="'pieChart'+index" style="height: 100px;width: 100%"></div>
-                        <el-row>
+                        <el-row class="mainTwoMsg" :style="getPos()">
                             <el-col :span="12">
                                 <span class="mainTwoComColor" style="background: #F65177;"></span>
                                 <span class="mainTwoComTit">A级</span>
@@ -90,7 +96,7 @@
                             <div class="mainThreeMsg">
                                 <img :src="item.img" alt="">
                                 <div class="msgProgress">
-                                    <span>{{item.company}}</span>
+                                    <span :style="getFooter12Sty()">{{item.company}}</span>
                                     <span>{{item.grade}}</span>
                                     <span>{{item.score}}</span>
                                 </div>
@@ -101,9 +107,9 @@
                         <div class="mainMore" @click="yearSeeMore(it.nameEn, 'season')"></div>
                         <div style="display: flex" v-for="(item, index) in it.section" :key="index">
                             <div class="mainFourMsg">
-                                <span>{{item.company}}</span>
-                                <span>{{item.score}}</span>
+                                <span class="mainFourcompany" :style="getFooter12Sty()">{{item.company}}</span>
                                 <div class="mainFourImg">
+                                    <span class="mainFourImgSpan">{{item.score}}</span>
                                     <el-popover placement="right-start" :title="item.company +' '+ item.score"
                                         :width="200" trigger="hover" :content="item.matter_heigh_note">
                                         <template #reference>
@@ -153,14 +159,14 @@
                 </div>
                 <div class="tableFooter">
                     <div class="footerOne">
-                        <span>煤电一体化</span>
+                        <span :style="getFooterOneSty()">煤电一体化</span>
                     </div>
                     <div class="footerTwo">
                         <div style="display: flex" v-for="(item, index) in cupDataYearArr.integration" :key="index">
                             <div class="footerTwoMsg">
                                 <img :src="item.img" alt="">
                                 <div class="footerProgress">
-                                    <span class="footerOneSpan">{{item.company}}</span>
+                                    <span class="footerOneSpan" :style="getFooter12Sty()">{{item.company}}</span>
                                     <el-progress :percentage="Math.floor((item.score/item.base_score)*100)"
                                         :stroke-width="5" />
                                     <span class="footerTwoSpan">{{item.grade}}</span>
@@ -171,11 +177,11 @@
                     </div>
                     <div class="footerThree">
                         <div class="mainMore" @click="yearSeeMore(it.nameEn, 'season')"></div>
-                        <div style="display: flex; justify-content: space-between;"
+                        <div style="display: flex; justify-content: space-between;width: 100%"
                             v-for="(item, index) in cupDataSeasonArr.integration" :key="index">
                             <div class="footerThreeMsg" v-for="it in matterMsg" :key="it">
                                 <div class="footerImg">
-                                    <span>{{it}}</span>
+                                    <span :style="getfooterSpan()">{{it}}</span>
                                     <el-popover placement="right-start" :title="item.company +' '+ item.score"
                                         :width="200" trigger="hover" :content="item.matter_heigh_note">
                                         <template #reference>
@@ -227,8 +233,8 @@
             <el-col :span="5" class="report">
                 <div class="gateway_report">
                     <div class="reportTit">
-                        <p>通告栏</p>
-                        <el-icon :size="20" color="#3B7AD1" @click="watchAllNotification">
+                        <p :style="winPix === 1.25? 'font-size: 16px;':''">通告栏</p>
+                        <el-icon :size="20" color="#3B7AD1" :style="winPix === 1.25? 'left: 80px;':''" @click="watchAllNotification">
                             <Plus />
                         </el-icon>
                     </div>
@@ -237,10 +243,9 @@
                             <div class="rightDiv"></div>
                             <div class="rightTitMsg">
                                 <p @click="watchDetail(it)" style="cursor:pointer">{{it.noticeTitle}}</p>
-                                <div style="margin-top: 5px">
-                                    <span
-                                        style="margin-right: 10px">{{it.createTime.substring(0, it.createTime.indexOf(' '))}}</span>
-                                    <span>{{it.releaseDeptName}}</span>
+                                <div style="margin-top: 5px; display: flex">
+                                    <span style="margin-right: 10px">{{it.createTime.substring(0, it.createTime.indexOf(' '))}}</span>
+                                    <span  class="rightTwoSpanMsg" :style="winPix === 1.25? 'width: 50%;':''">{{it.releaseDeptName}}</span>
                                 </div>
                             </div>
                         </div>
@@ -298,7 +303,8 @@
                 cenImg: cenImg,
                 changeYear: '',
                 seasonStr: '',
-                seasonArr: ['第一季度', '第二季度', '第三季度']
+                seasonArr: ['第一季度', '第二季度', '第三季度'],
+                winPix: window.devicePixelRatio
             }
         },
         created() {
@@ -338,6 +344,36 @@
                     })
                 }
             },
+            getPos() {
+                if (this.winPix === 1.25) {
+                    return 'top: -15%;'
+                }
+            },
+            getPickerSty() {
+                if (this.winPix === 1.25) {
+                    return 'margin: 5px 0 0 20px;'
+                }
+            },
+            getMainOneSty() {
+                if (this.winPix === 1.25) {
+                    return 'font-size: 14px'
+                }
+            },
+            getFooterOneSty() {
+                if (this.winPix === 1.25) {
+                    return 'font-size: 12px;line-height: 12px;'
+                }
+            },
+            getFooter12Sty() {
+                if (this.winPix === 1.25) {
+                    return 'font-size: 12px'
+                }
+            },
+            getfooterSpan() {
+                if (this.winPix === 1.25) {
+                    return 'width: 3.2vw;padding: 5px 3px 0;'
+                }
+            },
             changeYearFn(val) {
                 this.changeYear = val
                 this.cupDataYearArr = {
@@ -513,6 +549,10 @@
             },
 
             getEchartsData(data, name) {
+                let total = 0
+                data.forEach(it =>{
+                    total += it.value
+                })
                 let option = {
                     color: ['#F65177', '#50C14E', '#5093E1', '#9DA5BE'],
                     tooltip: {
@@ -524,8 +564,13 @@
                         radius: ['50%', '70%'],
                         avoidLabelOverlap: false,
                         label: {
-                            show: false,
-                            position: 'center'
+                            show: true,
+                            position: 'center',
+                            formatter: () =>{
+                                return total
+                            },
+                            fontSize: 16,
+                            fontWeight: 600
                         },
                         // emphasis: {
                         //     label: {
@@ -574,14 +619,14 @@
 
             // padding-right: 15px;
             .searchFn {
-                height: 50px;
+                // height: 50px;
+                height: 5vh;
                 display: flex;
                 border-bottom: 1px solid #E1E3EA;
 
                 .el-date-editor--year {
                     width: 130px;
                     margin: 10px 0 0 20px;
-
                     .el-input__wrapper {
                         background: #2C7EDC;
                         height: 30px;
@@ -620,10 +665,12 @@
             .tableHeader {
                 display: flex;
                 border-bottom: 1px solid #E1E3EA;
-                height: 75px;
-
+                // height: 75px;
+                height: 9vh;
+                width: 100%;
                 .headerComTit {
-                    height: 40px;
+                    // height: 40px;
+                    height: 5vh;
                     border-bottom: 1px solid #E1E3EA;
 
                     span {
@@ -635,46 +682,71 @@
                 .headerNameTit {
                     display: flex;
                     justify-content: space-between;
-                    padding: 8px 20px;
-                    font-size: 14px;
+                    padding: 8px 10px;
+                    font-size: 12px;
                     color: #414141;
+                    .headerNameTit_left{
+                        width: 73%;
+                    }
+                    .headerNameTit_right{
+                        width: 27%;
+                    }
                 }
 
                 .headerOne {
-                    width: 35px;
+                    // width: 35px;
+                    width: 3%;
                     background: #184FB4;
                 }
 
                 .headerTwo {
-                    width: 150px;
+                    // width: 150px;
+                    width: 12%;
                     border-right: 1px solid #E1E3EA;
 
                     .headerTwoTit {
                         position: relative;
                         top: 10px;
-                        left: 40px;
+                        left: 30%;
                     }
                 }
 
                 .headerThree {
-                    width: 350px;
+                    // width: 350px;
+                    width: 28%;
                     border-right: 1px solid #E1E3EA;
 
                     .headerThreeTit {
                         position: relative;
                         top: 10px;
-                        left: 150px;
+                        left: 40%;
                     }
                 }
 
                 .headerFour {
-                    width: calc(100% - 535px);
+                    // width: calc(100% - 535px);
+                    width: 57%;
 
                     .headerFourTit {
                         position: relative;
                         top: 10px;
                         left: 40%;
                     }
+                    .headerNameForeTit{
+                        display: flex;
+                        justify-content: space-between;
+                        padding: 8px 10px;
+                        font-size: 12px;
+                        color: #414141;
+                        .headerNameForeTit_left{
+                            width: 30%;
+                        }
+                        .headerNameForeTit_right{
+                            width: 72%;
+                            display: flex;
+                            justify-content: space-between;
+                        }
+                    }
                 }
             }
 
@@ -685,7 +757,8 @@
                 height: 16vh;
 
                 .mainOne {
-                    width: 35px;
+                    // width: 35px;
+                    width: 3%;
                     background: #184FB4;
 
                     span {
@@ -697,16 +770,34 @@
                         font-weight: bold;
                         color: #fff;
                         position: relative;
-                        top: 30px;
-                        left: 10px;
+                        top: 20%;
+                        left: 25%;
                     }
                 }
 
                 .mainTwo {
-                    width: 149px;
+                    // width: 149px;
+                    width: 12%;
                     border-right: 1px solid #E1E3EA;
                     position: relative;
+                    .mainTwoMsg{
+                        position: relative;
+                        .mainTwoComColor {
+                            display: inline-block;
+                            width: 6px;
+                            height: 6px;
+                            border-radius: 20px;
+                            margin-left: 15px;
+                            position: relative;
+                            top: -1px;
+                        }
 
+                        .mainTwoComTit {
+                            font-size: 14px;
+                            display: inline-block;
+                            margin-left: 5px;
+                        }
+                    }
                     .echartsNum {
                         font-size: 16px;
                         font-weight: 600;
@@ -715,25 +806,12 @@
                         left: 65px;
                     }
 
-                    .mainTwoComColor {
-                        display: inline-block;
-                        width: 6px;
-                        height: 6px;
-                        border-radius: 20px;
-                        margin-left: 15px;
-                        position: relative;
-                        top: -1px;
-                    }
-
-                    .mainTwoComTit {
-                        font-size: 14px;
-                        display: inline-block;
-                        margin-left: 5px;
-                    }
+                    
                 }
 
                 .mainThree {
-                    width: 350px;
+                    // width: 350px;
+                    width: 28%;
                     padding-top: 13px;
                     border-right: 1px solid #E1E3EA;
                     position: relative;
@@ -756,7 +834,8 @@
                         display: flex;
                         margin: 0 10px;
                         width: 100%;
-                        height: 33px;
+                        // height: 33px;
+                        height: 3.5vh;
                         background: #F6F7FA;
                         margin-bottom: 8px;
                         padding-left: 10px;
@@ -784,6 +863,9 @@
                             span:nth-child(1) {
                                 display: inline-block;
                                 width: 70%;
+                                overflow: hidden;
+                                text-overflow: ellipsis;
+                                white-space: nowrap;
                                 font-weight: 400;
                                 color: #666;
                                 margin-right: 10px;
@@ -804,7 +886,8 @@
                 }
 
                 .mainFour {
-                    width: calc(100% - 536px);
+                    // width: calc(100% - 536px);
+                    width: 57%;
                     padding-top: 13px;
                     position: relative;
 
@@ -824,49 +907,53 @@
 
                     .mainFourMsg {
                         display: flex;
+                        justify-content: space-between;
                         margin: 0 10px;
                         width: 100%;
-                        height: 33px;
+                        // height: 33px;
+                        height: 3.5vh;
                         background: #F6F7FA;
                         margin-bottom: 8px;
                         padding-left: 10px;
                         padding-top: 2px;
                         border-radius: 5px;
 
-                        .mainFourImg {
-                            display: flex;
-                            justify-content: space-around;
-                            width: 65%;
-
-                            img {
-                                width: 20px;
-                                height: 20px;
-                                position: relative;
-                                top: 5px;
-                                margin-right: 33px;
-                                margin-left: 22px;
-                            }
-                        }
-
                         span {
                             font-size: 14px;
                             font-family: Microsoft YaHei;
                             position: relative;
                             top: 6px;
-                        }
-
-                        span:nth-child(1) {
                             display: inline-block;
-                            width: 26%;
+                        }
+                        .mainFourcompany {
+                            width: 27%;
+                            overflow: hidden;
+                            text-overflow: ellipsis;
+                            white-space: nowrap;
                             font-weight: 400;
                             color: #666;
                             margin-right: 17px;
                         }
 
-                        span:nth-child(2) {
-                            font-weight: 600;
-                            margin-right: 15px;
-                            color: #666;
+                        .mainFourImg {
+                            display: flex;
+                            justify-content: space-between;
+                            width: 76%;
+                            .mainFourImgSpan{
+                                width: 5%;
+                                font-weight: 600;
+                                // margin-right: 15px;
+                                color: #666;
+                            }
+                            img {
+                                width: 20px;
+                                height: 20px;
+                                position: relative;
+                                top: 5px;
+                                left: -10px;
+                                // margin-right: 33px;
+                                // margin-left: 22px;
+                            }
                         }
                     }
                 }
@@ -874,16 +961,18 @@
 
             .tableFooter {
                 display: flex;
-                height: 100px;
-
+                // height: 100px;
+                height: 10vh;
                 .footerOne {
-                    width: 35px;
+                    // width: 35px;
+                    width: 3%;
                     background: #7D8297;
                     border-radius: 0 0 0 10px;
 
                     span {
                         display: inline-block;
-                        width: 20px;
+                        // width: 20px;
+                        width: 3%;
                         margin: 0 auto;
                         line-height: 16px;
                         font-size: 16px;
@@ -896,19 +985,21 @@
                 }
 
                 .footerTwo {
-                    width: 500px;
-                    padding-top: 13px;
+                    // width: 500px;
+                    width: 40%;
+                    padding-top: 10px;
                     border-right: 1px solid #E1E3EA;
 
                     .footerTwoMsg {
                         display: flex;
                         margin: 0 10px;
                         width: 100%;
-                        height: 33px;
+                        // height: 33px;
+                        height: 3.5vh;
                         background: #F6F7FA;
                         margin-bottom: 8px;
                         padding-left: 10px;
-                        padding-top: 2px;
+                        // padding-top: 2px;
                         border-radius: 5px;
 
                         img {
@@ -963,7 +1054,8 @@
                 }
 
                 .footerThree {
-                    width: calc(100% - 536px);
+                    // width: calc(100% - 536px);
+                    width: 57%;
                     padding-top: 13px;
                     position: relative;
 
@@ -983,8 +1075,10 @@
 
                     .footerThreeMsg {
                         display: flex;
+                        width: 13%;
                         // margin: 0 10px;
-                        margin-left: 10px;
+                        // margin-left: 10px;
+                        padding: 0 10px;
                         margin-bottom: 8px;
 
                         span {
@@ -998,13 +1092,14 @@
                             display: flex;
                             border-radius: 5px;
                             background: #F6F7FA;
-
                             span {
                                 display: inline-block;
                                 // width: 100%;
-                                width: 48px;
-                                height: 30px;
-                                padding: 5px 11px 0;
+                                // width: 48px;
+                                width: 2.5vw;
+                                // height: 30px;
+                                height: 3vh;
+                                padding: 5px 8px 0;
                                 position: relative;
                                 top: 2px;
                             }
@@ -1014,7 +1109,7 @@
                                 height: 20px;
                                 position: relative;
                                 top: 5px;
-                                margin-right: 10px;
+                                margin-right: 8px;
                                 position: relative;
                                 top: 7px;
                             }
@@ -1029,7 +1124,8 @@
             height: 100%;
 
             .gateway_report {
-                width: 355px;
+                // width: 355px;
+                width: 100%;
                 background: #fff;
                 // margin-right: 30px;
                 margin-right: calc(100% - 355px);
@@ -1063,9 +1159,11 @@
 
                 .reportMain {
                     height: 80vh !important;
+                    overflow-x: hidden;
                     overflow-y: auto;
 
                     .reportMain_msg {
+                        width: 100%;
                         display: flex;
                         padding: 25px 0 25px 27px;
                         border-bottom: 1px solid #D6DBEA;
@@ -1073,6 +1171,7 @@
                         .rightDiv {
                             width: 4px;
                             height: 40px;
+                            // height: 5vh;
                             background: #4883D4;
                             border-radius: 2px;
                             position: relative;
@@ -1081,9 +1180,10 @@
 
                         .rightTitMsg {
                             margin-left: 15px;
-
+                            width: calc(100% - 20px);
                             p {
-                                width: 300px;
+                                // width: 300px;
+                                width: 100%;
                                 overflow: hidden;
                                 text-overflow: ellipsis;
                                 white-space: nowrap;
@@ -1098,6 +1198,13 @@
                                 font-family: Microsoft YaHei;
                                 font-weight: 400;
                                 color: #8991B0;
+                                display: inline-block;
+                            }
+                            .rightTwoSpanMsg{
+                                width: 60%;
+                                overflow: hidden; 
+                                text-overflow: ellipsis;
+                                white-space: nowrap;
                             }
                         }
                     }

+ 1 - 0
src/components/taskCenter/taskApplicationFrom.vue

@@ -481,6 +481,7 @@ export default {
                                 display: flex;
                                 height: 20px;
                                 margin: 0 10px;
+                                width: 13%;
                                 img{
                                     margin-right: 5px;
                                     margin-top: 1px;

+ 1 - 0
src/components/taskCenter/taskCenterDeptBusinessFrom.vue

@@ -481,6 +481,7 @@ export default {
                                 display: flex;
                                 height: 20px;
                                 margin: 0 10px;
+                                width: 13%;
                                 img{
                                     margin-right: 5px;
                                     margin-top: 1px;

+ 1 - 0
src/components/taskCenter/taskCenterDeptStartFrom.vue

@@ -586,6 +586,7 @@ export default {
                                 display: flex;
                                 height: 20px;
                                 margin: 0 10px;
+                                width: 13%;
                                 img{
                                     margin-right: 5px;
                                     margin-top: 1px;

+ 1 - 0
src/components/taskCenter/taskCenterEvlFrom.vue

@@ -758,6 +758,7 @@ export default {
                         .tableBtn {
                             display: flex;
                             margin-right: 30px;
+                            width: 13%;
                             img{
                                 margin-right: 5px;
                                 margin-top: 1px;

+ 1 - 1
src/components/taskCenter/taskCenterEvlNewFrom.vue

@@ -692,7 +692,7 @@ export default {
                                         display: flex;
                                         height: 20px;
                                         margin: 5px 8px 0 8px;
-                                        width: 11%;
+                                        width: 13%;
                                         img{
                                             margin-right: 5px;
                                             margin-top: 1px;

+ 1 - 0
src/components/taskCenter/taskEvaluationStart.vue

@@ -530,6 +530,7 @@ export default {
                                         display: flex;
                                         height: 20px;
                                         margin: 5px 10px 0 10px;
+                                        width: 13%;
                                         img{
                                             margin-right: 5px;
                                             margin-top: 1px;

+ 1 - 1
src/utils/baseUrl.js

@@ -10,7 +10,7 @@ switch (process.env.NODE_ENV) {
     case 'development': 
         baseUrl.ROOT = "/api"  //开发环境url
         // baseUrl.URL = "http://10.65.59.67:28800"
-        baseUrl.URL = "http://192.168.2.10:28800"
+        baseUrl.URL = "http://192.168.2.7:28800"
         // baseUrl.URL = "http://10.65.78.23:28800"  //测试环境
         // baseUrl.URL = "http://10.65.78.81:28800"  // 正式环境
         break

+ 55 - 0
src/utils/device.js

@@ -0,0 +1,55 @@
+class devicePixelRatio {
+    constructor() {
+        // this.flag = false
+    }
+
+    //获取系统类型
+    getSystem() { 
+        let flag = false
+        var agent = navigator.userAgent.toLowerCase();
+        //针对windows处理
+        if (agent.indexOf('windows') >= 0) { 
+            return true
+        }
+    }
+
+    //监听方法兼容写法
+    addHandler(element, type, handler) { 
+        if (element.addEventListener) {
+            element.addEventListener(type, handler, false)
+        } else if (element.attachEvent) {
+            element.attachEvent("on" + type, handler)
+        } else {
+            element["on" + type] = handler
+        }
+    }
+
+    // 校正浏览器缩放比例
+    correct() { 
+        //页面devicePixelRatio(设备像素比例)变化后,计算页面body标签zoom修改其大小,来抵消页面devicePixelRatio带来的变化
+        document.getElementsByTagName('body')[0].style.zoom = 1 / window.devicePixelRatio;
+        console.log('bodyzoom==>',document.getElementsByTagName('body')[0].style.zoom)
+        console.log('devicePixelRatio==>',window.devicePixelRatio)
+        // document.getElementsByTagName('body')[0].style.zoom = 1
+    }
+
+    //监听页面缩放
+    watch() { 
+        this.addHandler(window, 'resize', function () { //注意这个方法是解决全局有两个window.resize
+            //重新校正
+            this.correct()
+        })
+    }
+
+    //初始化页面比例
+    init() { 
+        if (this.getSystem()) { //判断设备,目前只在window系统下校正浏览器缩放比例
+            //初始化页面校正浏览器缩放比例
+            this.correct()
+            // 开启监听页面缩放
+            this.watch()
+        }
+    }
+}
+
+export default devicePixelRatio;