Bläddra i källkod

设备看板样式调整

cyy 11 månader sedan
förälder
incheckning
8cbad10b60

+ 16 - 6
src/views/business/deviceManagement/components/CarouselTabl.vue

@@ -1,10 +1,10 @@
 <template>
     <div style="width: 98%;height: 98%;overflow: hidden;padding: 1%;">
-        <div class="title" style="vertical-align: top; height: 10%;font-size: 24px;color: white;font-weight:600;">{{ title }}</div>
-        <div v-show="showChart" style="width:100%;height: 87%;display: flex;justify-content: center;">
-            <dv-scroll-board :key="scrollBoardKey" :config="configData" style="width:100%;height:100%;font-size: 12px" />
+        <div class="title" style="vertical-align: top; height: 10%;font-size: 1.5em;color: white;font-weight:600;">{{ title }}</div>
+        <div v-show="showChart" class="deviceManagementTableRowStyle20250611105728" style="width:100%;height: 87%;display: flex;justify-content: center;">
+            <dv-scroll-board :key="scrollBoardKey" :config="configData" style="width:100%;height:100%;font-size: 0.75em" />
         </div>
-        <div v-show="!showChart" :class="$style.nullShow">暂无数据</div>
+        <div v-show="!showChart" class="nullShow">暂无数据</div>
     </div>
 </template>
 
@@ -51,12 +51,22 @@ export default {
 
 }
 </script>
-<style lang="scss" module>
+<style lang="scss" scoped>
     .nullShow{
         display: flex;
         align-items: center;
         justify-content: center;
-        font-size: 18px;
+        font-size: 1.12em;
         height: 85%;
     }
 </style>
+<style lang="scss">
+.deviceManagementTableRowStyle20250611105728 .dv-scroll-board{
+    .header{
+        font-size: 1.325em !important;
+    }
+    .rows .row-item{
+        font-size: 1.125em !important;
+    }
+}
+</style>

+ 14 - 4
src/views/business/deviceManagement/components/barCharto.vue

@@ -2,7 +2,7 @@
     <div :class="$style.statisticsPage" :style="{width:width,height:height}">
         <div v-show="show" :id="'staff'+id" :style="{height:'100%'}" />
         <div v-show="!show" :style="{height:'100%'}">
-            <div style="height:8%;font-size:24px;font-weight: 600;"> {{ title }} </div>
+            <div style="height:8%;font-size:1.5em;font-weight: 600;"> {{ title }} </div>
             <div :class="$style.nullShow">暂无数据</div>
         </div>
     </div>
@@ -154,14 +154,15 @@ export default {
                 title: {
                     text: this.title,
                     left: 'left',
-                    textStyle: { fontSize: 24, color: this.colorw }
+                    textStyle: { fontSize: '1.5em', color: this.colorw }
                 },
                 legend: {
                     left: 'left',
                     top: '40',
                     show: this.legendVal,
                     textStyle: {
-                        color: '#fff'
+                        color: '#fff',
+                        fontSize: '0.8em'
                     },
                     formatter: function (name) {
                         return that.correspondence[name] || that.correspondenceUn[name] || that.dynamicMappingCondition[that.correspondenceCondition[name]]
@@ -202,6 +203,7 @@ export default {
                         interval: 0,
                         rotate: 20,
                         margin: 15,
+                        fontSize: '0.8em',
                         formatter: function (params) {
                             let str = ''
                             const paramsLen = params.length
@@ -230,6 +232,7 @@ export default {
                     axisLabel: {
                         color: '#fff',
                         min: 0,
+                        fontSize: '0.8em',
                         formatter: function (value) {
                             const mid = (value + '').indexOf('.') === -1 ? value + '' : ''
                             let str = ''
@@ -272,11 +275,18 @@ export default {
       box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
       padding: 1%;
       /* background-color: rgba(6, 30, 93, 0.5); */
+    //   font-size: 16px;
+    //   @media only screen and (max-width: 1680px) {
+    //     font-size: 14px;
+    //   }
+    //   @media only screen and (max-width: 1366px) {
+    //     font-size: 12px;
+    //   }
       .nullShow{
         display: flex;
         align-items: center;
         justify-content: center;
-        font-size: 18px;
+        font-size: 1.125em;
         height: 92%;
       }
   }

+ 7 - 7
src/views/business/deviceManagement/components/entirety.vue

@@ -14,8 +14,8 @@
                             </div>
                         </div>
                         <div>
-                            <div style="font-size:17px;font-weight:600;">{{ captionArr[n] }}</div>
-                            <div style="font-weight:600;font-size:28px;color: rgb(255,255,0);margin-top: 1vh;text-align: center;">{{ item }}</div>
+                            <div style="font-size:1.0625em;font-weight:600;">{{ captionArr[n] }}</div>
+                            <div style="font-weight:600;font-size:1.75em;color: rgb(255,255,0);margin-top: 1vh;text-align: center;">{{ item }}</div>
                         </div>
                     </div>
                     <div v-else-if="i!=='sum'&&n==='upKeep'" class="mySty">
@@ -144,7 +144,7 @@ export default {
       .titleSty{
         width: 100%;
         height: 15%;
-        font-size: 24px;
+        font-size: 1.5em;
         font-weight: 600;
       }
       .bodySty{
@@ -158,7 +158,7 @@ export default {
           padding: 1%;
           // border: solid 1px rgb(233, 233, 233);
           background-color: rgba(14, 34, 93, 0.9);
-          border-radius: 10px;
+          border-radius: 0.625em;
           display: flex;
           flex-flow: column;
           .itemSty{
@@ -182,8 +182,8 @@ export default {
               display: flex;
               align-items: center;
               justify-content: center;
-              border-radius: 200px;
-              padding: 15px;
+              border-radius: 12.5em;
+              padding: 0.975em;
               // background-color: rgb(16, 142, 255);
             }
           }
@@ -221,7 +221,7 @@ export default {
         display: flex;
         align-items: center;
         justify-content: center;
-        font-size: 18px;
+        font-size: 1.125em;
         height: 92%;
       }
   }

+ 28 - 27
src/views/business/deviceManagement/components/getPieView.vue

@@ -1,8 +1,8 @@
 <template>
     <div class="statisticsPage" :style="{width:width,height:height}">
-        <div v-show="show" :id="'mid'+id" :style="{height:'100%'}"/>
-        <div v-show="!show"  :style="{height:'100%'}">
-            <div style="height:8%;font-size:24px;font-weight: 600;"> {{ title }} </div>
+        <div v-show="show" :id="'mid'+id" :style="{height:'100%'}" />
+        <div v-show="!show" :style="{height:'100%'}">
+            <div style="height:8%;font-size:1.5em;font-weight: 600;"> {{ title }} </div>
             <div class="nullShow">暂无数据</div>
         </div>
     </div>
@@ -16,25 +16,25 @@ export default {
             type: Array,
             default: []
         },
-        width:{
-            type:String,
-            default:"100%"
+        width: {
+            type: String,
+            default: '100%'
         },
-        height:{
-            type:String,
-            default: "100%"
+        height: {
+            type: String,
+            default: '100%'
         },
-        title:{
+        title: {
             type: String
         },
-        id:{
-            type:Number,
-            default:0
-        },
-        colorw:{
-            type:String,
-            default:'#fff'
+        id: {
+            type: Number,
+            default: 0
         },
+        colorw: {
+            type: String,
+            default: '#fff'
+        }
     },
     data () {
         return {
@@ -44,17 +44,16 @@ export default {
     watch: {
         value: {
             handler (newVal, oldVal) {
-                if(newVal.length>0){
+                if (newVal.length > 0) {
                     this.show = true
                     setTimeout(() => {
                         this.getMiddleLeft()
                     }, 100)
-                }else{
+                } else {
                     this.show = false
                 }
-                
             },
-            deep: true,
+            deep: true
             // immediate: true
         }
     },
@@ -66,15 +65,15 @@ export default {
     },
     methods: {
         getMiddleLeft () {
-            const chartDom = document.getElementById('mid'+this.id)
-            let myChart = echarts.init(chartDom)
+            const chartDom = document.getElementById('mid' + this.id)
+            const myChart = echarts.init(chartDom)
             const radius = window.innerWidth > 1600 ? '60%' : '45%'
             let option
             option = {
                 title: {
                     text: this.title,
                     left: 'left',
-                    textStyle:{ fontSize:24,color: this.colorw }
+                    textStyle: { fontSize: '1.5em', color: this.colorw }
                 },
                 color: ['#339933', '#3366CC', '#FF9933', '#FFFF00'],
                 tooltip: {
@@ -85,7 +84,7 @@ export default {
                     formatter: '{c},{d}%\n{b}',
                     edgeDistance: '20%',
                     color: '#fff',
-                    fontSize: '12px'
+                    fontSize: '0.75em'
                 },
 
                 legend: {
@@ -96,7 +95,9 @@ export default {
                     left: 'left',
                     top: '45',
                     textStyle: {
-                        color: '#fff'
+                        color: '#fff',
+                        fontSize: '0.8em'
+
                     }
                 },
                 series: [
@@ -137,7 +138,7 @@ export default {
         display: flex;
         align-items: center;
         justify-content: center;
-        font-size: 18px;
+        font-size: 1.12em;
         height: 92%;
     }
 }

+ 155 - 156
src/views/business/deviceManagement/components/pieChart.vue

@@ -1,182 +1,181 @@
 <template>
-  <div class="statisticsPage" :style="{width:width,height:height}">
-    <div v-show="show" :id="'pie'+id" :style="{height:'100%'}"/>
-    <div v-show="!show"  :style="{height:'100%'}">
-      <div :style="{height:'8%','font-size':this.titleFontSize+'px','font-weight': '600'}"> {{ title }} </div>
-      <div class="nullShow">暂无数据</div>
+    <div class="statisticsPage" :style="{width:width,height:height}">
+        <div v-show="show" :id="'pie'+id" :style="{height:'100%'}" />
+        <div v-show="!show" :style="{height:'100%'}">
+            <div :style="{height:'8%','font-size':this.titleFontSize+'em','font-weight': '600'}"> {{ title }} </div>
+            <div class="nullShow">暂无数据</div>
+        </div>
     </div>
-  </div>
 </template>
 
 <script>
-  import * as echarts from 'echarts'
-  import {GetTotality} from '../utils/config'
-  export default {
+import * as echarts from 'echarts'
+import { GetTotality } from '../utils/config'
+export default {
     props: {
-      value: {
-        type: Array,
-      },
-      width:{
-        type:String,
-        default:"100%"
-      },
-      height:{
-        type:String,
-        default: "100%"
-      },
-      id:{
-        type:Number,
-        default:0
-      },
-      click:{
-        type:String,
-        default:'true'
-      },
-      colorw:{
-        type:String,
-        default:'#fff'
-      },
-      title:{
-        type: String
-      }
+        value: {
+            type: Array
+        },
+        width: {
+            type: String,
+            default: '100%'
+        },
+        height: {
+            type: String,
+            default: '100%'
+        },
+        id: {
+            type: Number,
+            default: 0
+        },
+        click: {
+            type: String,
+            default: 'true'
+        },
+        colorw: {
+            type: String,
+            default: '#fff'
+        },
+        title: {
+            type: String
+        }
     },
     data () {
-      return {
-        show: false,
-        titleFontSize: 24
-      }
+        return {
+            show: false,
+            titleFontSize: 1.5
+        }
     },
     watch: {
         value: {
             handler (newVal) {
-              if(newVal.length>0){
-                this.show = true
-                setTimeout(() => {
-                  this.drawLine()
-                }, 100)
-              }else{
-                this.show = false
-              }              
+                if (newVal.length > 0) {
+                    this.show = true
+                    setTimeout(() => {
+                        this.drawLine()
+                    }, 100)
+                } else {
+                    this.show = false
+                }
             },
             deep: true
         }
     },
-    mounted(){
-      // setTimeout(() => {
-      //   this.drawLine()
-      // }, 100);
-      let clientWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
-      // this.titleFontSize = clientWidth * 0.0052083 * 24
+    mounted () {
+        // setTimeout(() => {
+        //   this.drawLine()
+        // }, 100);
+        const clientWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth
+        // this.titleFontSize = clientWidth * 0.0052083 * 24
     },
     methods: {
-      drawLine(){
-        const totality = GetTotality(this.value)
-        const that = this
-        
-        let pie = echarts.init(document.getElementById('pie'+this.id))
-        let option;
-        option = {
-          title: {
-            text: this.title,
-            left: 'left',
-            textStyle:{ fontSize:this.titleFontSize,color: this.colorw }
-          },
-          tooltip: {
-            trigger: 'item'
-          },
-          legend:{
-            type: 'scroll',
-            selectedMode: false,
-            orient: 'vertical',
-            itemWidth: 18, // 图例标记的图形宽度,默认为24
-            itemHeight: 18, // 图例标记的图形高度,默认为18
-            icon: 'circle',
-            right: '0',
-            top: '60',
-            formatter: function (name) {
-                let strn = ""
-                let mid = that.value.find(i => i.name === name)
-                let rate = ((mid.value/totality)*100).toFixed(2)
-                let leng = 4
-                let rowNumber = Math.ceil(name.length / leng)
-                if(name.length > leng){
-                  for (let i = 0; i < rowNumber; i++) {
-                    let temp = ""
-                    let start = i * leng
-                    let end = start + leng
-                    if (i == rowNumber - 1) {
-                      temp = name.substring(start, name.length)
-                    } else {
-                      temp = name.substring(start, end) + "\n"
-                    }
-                    strn += temp
-                  }
-                }
+        drawLine () {
+            const totality = GetTotality(this.value)
+            const that = this
 
-                let str = `{a|${strn===""?name:strn}} | {b|${rate}%}{c|${mid.value}}`
-                return str
-            },
-            textStyle: {
-              
-              color: '#fff',
-              // align: 'right',
-              rich: {
-                a: {
-                  width:80,
-                  align: 'left',
-                  fontSize: 12,
-                  lineHeight: 18
-                },
-                b: {
-                  width:60,
-                  align: 'right',
-                  fontSize: 12,
-                  fontWeight: 300
+            const pie = echarts.init(document.getElementById('pie' + this.id))
+            const option = {
+                title: {
+                    text: this.title,
+                    left: 'left',
+                    textStyle: { fontSize: this.titleFontSize + 'em', color: this.colorw }
                 },
-                c: {
-                  width:50,
-                  align: 'right',
-                  fontSize: 12
-                }
-              }
-            }
-          },
-          series: [
-            {
-              type: 'pie',
-              radius: ['35%', '55%'],
-              center: ['20%', '55%'],
-              label: {
-                show: false,
-                formatter: (data, type) => {
-                  let str = `{a|总培训数}\n\n {b|${totality}}` //这里对不同的内容进行标识 a,b,或者可以随便自己起个别的名字
-                  return str;
-                },
-                rich: { //在rich中对两个标识进行样式修改
-                  a: {
-                    fontSize: 16,
-                    fontWeight: 300
-                  },
-                  b: {
-                    fontSize: 28
-                  }
+                tooltip: {
+                    trigger: 'item'
                 },
-                color: this.colorw,
-                position: 'center'
-              },
-              data: this.value,
-              labelLine: {
-                normal: {
-                    show: false,
+                legend: {
+                    type: 'scroll',
+                    selectedMode: false,
+                    orient: 'vertical',
+                    itemWidth: 18, // 图例标记的图形宽度,默认为24
+                    itemHeight: 18, // 图例标记的图形高度,默认为18
+                    icon: 'circle',
+                    right: '0',
+                    top: '60',
+                    formatter: function (name) {
+                        let strn = ''
+                        const mid = that.value.find(i => i.name === name)
+                        const rate = ((mid.value / totality) * 100).toFixed(2)
+                        const leng = 4
+                        const rowNumber = Math.ceil(name.length / leng)
+                        if (name.length > leng) {
+                            for (let i = 0; i < rowNumber; i++) {
+                                let temp = ''
+                                const start = i * leng
+                                const end = start + leng
+                                if (i == rowNumber - 1) {
+                                    temp = name.substring(start, name.length)
+                                } else {
+                                    temp = name.substring(start, end) + '\n'
+                                }
+                                strn += temp
+                            }
+                        }
+
+                        const str = `{a|${strn === '' ? name : strn}} | {b|${rate}%}{c|${mid.value}}`
+                        return str
+                    },
+                    textStyle: {
+
+                        color: '#fff',
+                        // align: 'right',
+                        rich: {
+                            a: {
+                                width: 80,
+                                align: 'left',
+                                fontSize: '0.75em',
+                                lineHeight: 18
+                            },
+                            b: {
+                                width: 60,
+                                align: 'right',
+                                fontSize: '0.75em',
+                                fontWeight: 300
+                            },
+                            c: {
+                                width: 50,
+                                align: 'right',
+                                fontSize: '0.75em'
+                            }
+                        }
+                    }
                 },
-              },
+                series: [
+                    {
+                        type: 'pie',
+                        radius: ['35%', '55%'],
+                        center: ['20%', '55%'],
+                        label: {
+                            show: false,
+                            formatter: (data, type) => {
+                                const str = `{a|总培训数}\n\n {b|${totality}}` // 这里对不同的内容进行标识 a,b,或者可以随便自己起个别的名字
+                                return str
+                            },
+                            rich: { // 在rich中对两个标识进行样式修改
+                                a: {
+                                    fontSize: '1em',
+                                    fontWeight: 300
+                                },
+                                b: {
+                                    fontSize: '1.75em'
+                                }
+                            },
+                            color: this.colorw,
+                            position: 'center'
+                        },
+                        data: this.value,
+                        labelLine: {
+                            normal: {
+                                show: false
+                            }
+                        }
+                    }
+                ]
             }
-          ]
-       }
-       option && pie.setOption(option);
-      }
+            option && pie.setOption(option)
+        }
     }
-  }
+}
 </script>
 <style lang="scss" scoped>
   .statisticsPage{
@@ -187,7 +186,7 @@
         display: flex;
         align-items: center;
         justify-content: center;
-        font-size: 18px;
+        font-size: 1.125em;
         height: 92%;
       }
   }

+ 19 - 12
src/views/business/deviceManagement/index.vue

@@ -262,6 +262,13 @@ export default {
         position: absolute;
         color: #fff;
         z-index: 999;
+        font-size: 16px;
+        @media only screen and (max-width: 1680px) {
+            font-size: 14px;
+        }
+        @media only screen and (max-width: 1366px) {
+            font-size: 12px;
+        }
         :global {
             #dv-full-screen-container {
                 background-image: url('~@/assets/images/screen/bg.png');
@@ -341,10 +348,10 @@ export default {
             }
             .title {
                 position: absolute;
-                font-size: 30px;
+                font-size: 1.875em;
                 font-weight: bold;
                 left: 50%;
-                top: 15px;
+                top: 0.9375em;
                 transform: translateX(-50%);
             }
             .daterange, .cycle, .back, .parse {
@@ -371,7 +378,7 @@ export default {
                         background: rgba(255, 255, 255, 0);
                         border: none;
                         color: #fff;
-                        font-size: 16px;
+                        font-size: 1em;
                         cursor: pointer;
                         // padding-left: 0;
                         padding-right: 0;
@@ -381,7 +388,7 @@ export default {
                         background: rgba(255, 255, 255, 0);
                         border: none;
                         color: #fff;
-                        font-size: 12px;
+                        font-size: 0.75em;
                         cursor: pointer;
                         // padding-left: 0;
                         padding-right: 0;
@@ -390,7 +397,7 @@ export default {
                         width: 100% !important;
                         background: rgba(255, 255, 255, 0);
                         border: none;
-                        font-size: 16px;
+                        font-size: 1em;
                         cursor: pointer;
                         // padding-left: 0;
                         padding-right: 0;
@@ -406,20 +413,20 @@ export default {
                         }
                     }
                     .el-cascader .el-input--suffix .el-input__inner{
-                        font-size: 12px;
+                        font-size: 0.75em;
                         color: #fff;
                     }
                 }
             }
             .cycle {
                 display: flex;
-                min-width: 150px;
+                min-width: 9.375em;
                 justify-content: flex-end;
                 // width: 125px;
                 right: 75%;
-                padding-left: 10px;
+                padding-left: 0.625em;
                 color: #fff;
-                font-size: 22px;
+                font-size: 1.5em;
                 font-weight: 400;
                 :global {
                     .el-dropdown {
@@ -435,15 +442,15 @@ export default {
             }
             .back {
                 width: 5%;
-                left: calc(75% + 80px);
+                left: calc(75% + 5em);
             }
             .parse {
                 width: 2%;
                 left: 75%;
                 align-items: center;
-                padding: 5px;
+                padding: 0.3125em;
                 > img {
-                    height: calc(100% - 10px);
+                    height: calc(100% - 0.625em);
                 }
             }
             @media only screen and (max-width: 1680px) {