Sfoglia il codice sorgente

优化表格,调整手势位置

shaun-sheep 4 anni fa
parent
commit
601a285271

+ 1 - 1
src/router/index.js

@@ -236,4 +236,4 @@ function redirectGetToken (to) {
     }
     window.location.href = `${ssoServer}/login?systemcode=${systemcode}&signal=${signal}&version=${version}`
 }
-export default router
+export default router

+ 7 - 1
src/views/equipment/eqDialog.vue

@@ -170,6 +170,7 @@ export default {
         },
         //点击tab函数
         handleClick(tab) {
+            console.log(tab)
             if (this.param) {
                 this.param = tab.name
             } else if (this.smsxt) {
@@ -178,7 +179,12 @@ export default {
             this.activeName = tab.name
             //原理图的tab怎么传typecode
             if (this.dialogInfo.children.length > 0) {
-                this.typecode = this.dialogInfo.children[`${tab.index}`].param.type_code
+                this.dialogInfo.children.forEach(el=>{
+                    if(tab.label == el.label){
+                        this.typecode = el.param.type_code
+                    }
+                })
+                //this.typecode = this.dialogInfo.children[`${tab.index}`].param.type_code
                 this.diff = this.dialogInfo.children[`${tab.index}`].param.diff
                 this.difference = this.dialogInfo.children[`${tab.index}`].param.difference
             }

+ 7 - 5
src/views/equipment/table/eqDetaileDialog.vue

@@ -126,7 +126,7 @@ export default {
                 { id: 'test3', name: '下级分项' },
                 { id: 'test4', name: '滑动平均滑动平均' },
             ],
-            page: 1,
+            // page: 1,
             size: 10,
             total: 1,
             sbjc: '',
@@ -149,7 +149,7 @@ export default {
     computed: {
         ...mapGetters(['floorSelect']),
     },
-    props: ['row', 'major'],
+    props: ['row', 'major', 'sonpage'],
     mounted() {
         this.queryTableList()
         this.tabFind()
@@ -164,7 +164,9 @@ export default {
         },
         //序号的方法
         indexMethod(index) {
-            return (this.page - 1) * this.size + index + 1
+            if (this.sonpage) {
+                return (this.sonpage - 1) * this.size + index + 1
+            }
         },
         //多余输入框监听
         confirm(fws, manufacturer) {
@@ -231,7 +233,7 @@ export default {
             })
         },
         pageChanged(page) {
-            this.page = page
+            this.sonpage = page
             this.queryTableList()
         },
         queryTableList() {
@@ -252,7 +254,7 @@ export default {
             let data = {
                 major: major,
                 plazaId: this.$store.state.plazaId,
-                page: this.page,
+                page: this.sonpage,
                 size: this.size,
             }
             //输入框搜索

+ 3 - 1
src/views/equipment/table/eqListTable.vue

@@ -88,7 +88,7 @@
             :visible.sync='innerVisible'
             append-to-body
         >
-            <eq-detail ref='qdDialog' :row='row' :major='major'></eq-detail>
+            <eq-detail ref='qdDialog' :row='row' :major='major' :sonpage='sonpage'></eq-detail>
         </el-dialog>
     </div>
 </template>
@@ -106,6 +106,7 @@ export default {
             tableData: [],
             total: 0,
             currentPage: 1,
+            sonpage:1,
             size: 10,
             innerVisible: false, //详情弹框
             keyword: '',
@@ -130,6 +131,7 @@ export default {
             this.type_name = row.type_name
             this.innerVisible = true
             this.row = row
+            this.sonpage = 1
         },
         pageChanged(page) {
             this.currentPage = page

+ 3 - 1
src/views/equipment/table/standTable.vue

@@ -80,7 +80,7 @@
         </div>
         <!-- 标准表格详情钻取表 -->
         <el-dialog width='90%' style='height:900px;overflow: hidden;' :title='`${InfoName}-${type_name}`' :visible.sync='innerVisible' append-to-body>
-            <eq-detail ref='qdDialog' :row='row' :major='major'></eq-detail>
+            <eq-detail ref='qdDialog' :row='row' :major='major' :sonpage='sonpage'></eq-detail>
         </el-dialog>
     </div>
 </template>
@@ -99,6 +99,7 @@ export default {
             tableData: [],
             total: 0,
             currentPage: 1,
+            sonpage:1,
             size: 10,
             keyword: '',
             floor: '1',
@@ -123,6 +124,7 @@ export default {
             this.type_name = row.type_name
             this.innerVisible = true
             this.row = row
+            this.sonpage = 1
         },
         pageChanged(page, size) {
             this.currentPage = page

+ 24 - 19
src/views/statistics/index.vue

@@ -62,8 +62,10 @@
                             <div class='system-equipments' v-if='item.assetTypeList'>
                                 <div class='number' v-for='(equip , index) in item.assetTypeList' :key='index'>
                                     <div class="title">
-                                        <P :title="equip.category_name">{{equip.category_name}}</p>
-                                        <span :style="{right: equip.is_exception_num > 99 ? '-2rem' :  equip.is_exception_num > 9 ? '-1.5rem' :'-1rem'}" v-if='equip.is_exception_num'>{{equip.is_exception_num}}</span>
+                                        <div class="exception" :title="equip.category_name">
+                                            {{equip.category_name}}
+                                            <span style="right:-1rem;" v-if='equip.is_exception_num'>{{equip.is_exception_num}}</span>
+                                        </div>
                                     </div>
                                     <p>
                                         <span>{{equip.asset_num}}</span>
@@ -1247,7 +1249,7 @@ export default {
         }
         
         .system-general {
-            width: 25.4%;
+            width: 29.4%;
             box-sizing: border-box;
             background: white;
             .system-main-title {
@@ -1310,27 +1312,30 @@ export default {
                                 width: 33.3%;
                                 .title{
                                     display: inline-block;
-                                    position: relative;
-                                    p{
-                                        display: inline-block;
+                                    width: 100%;
+                                    white-space: nowrap;
+                                    text-overflow: ellipsis;
+                                    overflow: hidden;
+                                    div.exception{
                                         position: relative;
-                                        width: 12rem;
+                                        display: inline;
                                         color: #1f2429;
                                         font-size: 1.4rem;
-                                        line-height: 2rem;
+                                        line-height: 4rem;
                                         white-space: nowrap;
                                         text-overflow: ellipsis;
                                         overflow: hidden;
-                                    }
-                                    span {
-                                        position: absolute;
-                                        top: -1.6rem;
-                                        right: -2rem;
-                                        padding: 2px 4px;
-                                        border-radius: 0.9rem;
-                                        font-size: 1.2rem;
-                                        color: #f54e45;
-                                        background: #fde3e2;
+                                        span {
+                                            position: absolute;
+                                            top: -1rem;
+                                            right: -1rem;
+                                            line-height: 1.6rem;
+                                            padding: 2px 4px;
+                                            border-radius: 0.9rem;
+                                            font-size: 1.2rem;
+                                            color: #f54e45;
+                                            background: #fde3e2;
+                                        }
                                     }
                                 }
                                 p:nth-of-type(2) {
@@ -1359,7 +1364,7 @@ export default {
             }
         }
         .map-box {
-            width: calc(56.6% - 2.4rem);
+            width: calc(52.6% - 2.4rem);
             margin: 0 12px;
             .cards-list {
                 display: flex;