Browse Source

Merge branch 'develop' of http://39.106.8.246:3003/web/wanda-bm-guide into develop

shaun-sheep 4 years ago
parent
commit
4a9ce7d0e2

BIN
public/favicon.ico


+ 1 - 1
src/App.vue

@@ -171,7 +171,7 @@ table {
 
 body ::-webkit-scrollbar {
   width: 5px;
-  height: 5px;
+  height: 8px;
 }
 
 body ::-webkit-scrollbar-track {

+ 1 - 0
src/api/httputils.js

@@ -24,6 +24,7 @@ axiosservice.interceptors.request.use(
         if (token) {
             config.headers = {
                 'sso-token': token,
+                'isPreview': false //默认false,当预览开启的时候是true
             }
         }
         return config

+ 1 - 1
src/api/login.js

@@ -9,5 +9,5 @@ export function queryFloor(params) {
     return httputils.getJson(`/data/data/plaza/floor`, params)
 }
 export function queryfmapID(params) {
-    return httputils.getJson(`/version`, params)
+    return httputils.getJson(`http://mapapp.wanda.cn/sgmap/mapversion`, params)
 }

+ 32 - 8
src/components/Legend/src/legend.vue

@@ -10,7 +10,18 @@
             <div v-show='show' class='legend2' @click='showTl' v-if='(type==1 || floors.length>0)&& isMessage'>图例</div>
             <el-collapse-transition v-if='(type==1 || floors.length>0)&& isMessage'>
                 <div class='legend-tab' v-if='show'>
-                    <div class='legend-table'>
+                    <div class='legend-table2' v-if='systemName=="土建系统"'>
+                        <lengend-view
+                            v-if='viewTable.length>=0'
+                            :loading='loading'
+                            :viewTable='viewTable'
+                            @changeSwitch='handleSwich'
+                            :remarksText='remarksText'
+                            ref='viewLengend'
+                            :systemName='systemName'
+                        ></lengend-view>
+                    </div>
+                    <div class='legend-table' v-else>
                         <lengend-view
                             v-if='viewTable.length>=0'
                             :loading='loading'
@@ -202,6 +213,7 @@ export default {
         // 点击展示图例框
         showTl() {
             this.show = !this.show
+            this.queryView(false)
             if (this.show) {
                 this.show2 = false
             }
@@ -337,15 +349,13 @@ export default {
             this.goToEditer()
         }
     },
-    mounted() {
-        this.queryView(false)
-    }
+    mounted() {}
 }
 </script>
 <style lang="less" scoped>
 .legend-container {
     position: relative;
-    top: -13px;
+    top: -15px;
     .legend {
         text-align: center;
         line-height: 44px;
@@ -359,14 +369,11 @@ export default {
         border-radius: 2px;
         cursor: pointer;
         line-height: 44px;
-        text-align: center;
     }
     .legend2 {
         text-align: center;
         line-height: 44px;
         cursor: pointer;
-        line-height: 44px;
-        text-align: center;
         width: 44px;
         height: 44px;
         background: linear-gradient(180deg, rgba(54, 156, 247, 1) 0%, rgba(2, 91, 170, 1) 100%);
@@ -397,6 +404,23 @@ export default {
                 display: none;
             }
         }
+        .legend-table2 {
+            padding: 16px;
+            height: 356px;
+            width: 385px;
+            // width: 420px;
+            overflow: auto;
+            overflow: hidden;
+            overflow-y: auto;
+            position: relative;
+            background: rgba(255, 255, 255, 1);
+            box-shadow: 0px 2px 8px 0px rgba(31, 36, 41, 0.06);
+            border-radius: 2px;
+            border: 1px solid rgba(228, 229, 231, 1);
+            &::-webkit-scrollbar {
+                display: none;
+            }
+        }
     }
 }
 .edit_map {

+ 9 - 4
src/components/PicLarge/src/picLarge.vue

@@ -79,8 +79,10 @@ export default {
                 border-radius: 4px;
                 border: 4px solid rgba(245, 246, 247, 1);
                 img {
-                    width: 100%;
-
+                    max-width: 100%;
+                    max-height: 100%;
+                    display: block;
+                    margin: auto;
                     border-radius: 4px;
                 }
             }
@@ -101,7 +103,7 @@ export default {
         flex: 1;
         background: rgba(245, 246, 247, 1);
         border-radius: 0px 0px 4px 0px;
-        padding: 20px 50px;
+        padding: 60px 50px;
         margin: auto auto;
         display: flex;
         justify-content: center;
@@ -111,7 +113,10 @@ export default {
             height: 540px;
             text-align: center;
             img {
-                width: 100%;
+                max-width: 100%;
+                max-height: 100%;
+                display: block;
+                margin: auto;
             }
         }
     }

+ 8 - 2
src/components/Rotation/src/rotation.vue

@@ -36,12 +36,18 @@ export default {
     width: 100%;
     height: 100%;
     overflow: hidden;
+    display: flex;
+    justify-content: center;
+    align-items: center;
     .rotationCon {
         height: 100%;
+        display: flex;
     }
     img {
-        width: 100%;
-       
+        max-width: 100%;
+        max-height: 100%;
+        display: block;
+        margin: auto;
     }
 }
 </style>

+ 24 - 2
src/components/floorMap/index.vue

@@ -17,7 +17,7 @@ import { FloorView } from '@/lib/FloorView'
 import { FloorScene } from '@/lib/FloorScene'
 import RoomBox from '@/views/room/index'
 import canvasFun from '@/components/floorMap/canvasFun'
-import { readGroup } from '@/api/public'
+import { readGroup, queryStatis } from '@/api/public'
 import { STopologyParser } from '@/lib/parsers/STopologyParser'
 import { mapGetters, mapActions } from 'vuex'
 import { SImageItem } from '@saga-web/graph/lib'
@@ -113,11 +113,11 @@ export default {
                         this.fParser.columnList.forEach(t => this.scene.addItem(t))
                         this.fParser.casementList.forEach(t => this.scene.addItem(t))
                         this.view.scene = this.scene
+                        this.view.fitSceneToView()
                         this.view.minScale = this.view.scale
                         if (this.$refs.canvasFun) {
                             this.$refs.canvasFun.everyScale = this.view.scale
                         }
-                        this.view.fitSceneToView()
                     })
                 } else {
                     console.log('楼层不正确')
@@ -140,8 +140,14 @@ export default {
                     scpzTable = data.Data[0].Elements.Nodes || []
                     this.$store.commit('SETSCPZTABLE', scpzTable)
                 }
+                //
+                //
+
                 // 放到后边 $cookie graphId
                 this.$cookie.set('graphId', data.Data[0].ID, 3)
+                if (this.$cookie.get('graphId')) {
+                    this.queryView()
+                }
                 this.topologyParser = new STopologyParser(null)
                 this.topologyParser.parseData(data.Data[0].Elements)
                 // 多边形
@@ -172,6 +178,22 @@ export default {
                 this.view.fitSceneToView()
             })
         },
+        // 查询图例
+        queryView() {
+            let postParams = {}
+            let data = {
+                graphId: this.$cookie.get('graphId'),
+                projectId: this.plazaId,
+                flag: false
+            }
+            queryStatis({ data, postParams }).then(res => {
+                this.loading = false
+                console.log('图例图例图例图例', res)
+                let viewTable = []
+                viewTable = res.data.Data ? res.data.Data : []
+                this.$store.commit('SETLEGENDTABLE', viewTable)
+            })
+        },
         clearGraphy() {
             if (this.view) {
                 this.view.scene = null

+ 7 - 5
src/components/viewLengend.vue

@@ -5,7 +5,7 @@
 */
 <template>
     <div class='view'>
-        <div v-if='systemName=="土建系统"' style='height:300px'>
+        <div v-if='systemName=="土建系统"'>
             <el-table
                 ref='dataTable'
                 :data='scpzTable'
@@ -27,9 +27,9 @@
         </div>
         <div v-else>
             <el-table
-                v-loading='loading'
                 ref='dataTable'
-                :data='viewTable'
+                v-if='legendTable.length>=0||viewTable.length>=0'
+                :data='legendTable ||viewTable'
                 tooltip-effect='dark'
                 style='width:100%;'
                 @selection-change='handleSelectionChange'
@@ -97,9 +97,11 @@ export default {
         }
     },
     computed: {
-        ...mapGetters(['scpzTable'])
+        ...mapGetters(['scpzTable', 'legendTable'])
     },
-    mounted() {}
+    mounted() {
+        console.log(this.legendTable)
+    }
 }
 </script>
 <style lang="less" scoped>

+ 2 - 2
src/views/equipment/eqDialog.vue

@@ -14,9 +14,9 @@
                 />
             </div>
             <!-- 没有tab的页面 -->
-            <div v-if='Object.keys(dialogInfo).length>0 && dialogInfo.children.length==0' style='margin:16px 0 0 24px'>
+            <div v-if='Object.keys(dialogInfo).length>0 && dialogInfo.children.length==0' style='margin:16px 0 0 24px;height:90%'>
                 <!-- 原理图 -->
-                <div v-if='dialogInfo.id.slice(2,4)=="YL"' style='width:90%;overflow:hidden'>
+                <div v-if='dialogInfo.id.slice(2,4)=="YL"' style='width:90%;overflow:hidden;height:100%'>
                     <rotation :rotationImg='rotationImg'></rotation>
                 </div>
                 <!-- 土建系统主要材料清单 -->

+ 11 - 9
src/views/equipment/index.vue

@@ -73,7 +73,7 @@ export default {
             dialogInfo: {},
             brand: [], //品牌
             manufacturer: [],
-            show: true,
+            show: false,
             fqPic: [],
             loadName: '',
             type: '',
@@ -86,8 +86,8 @@ export default {
             let data = {
                 plazaId: '1000423'
             }
-            let postParams = []
-            queryBrand({ data, postParams }).then(res => {
+            // let postParams = []
+            queryBrand({ data }).then(res => {
                 console.log(res)
             })
         },
@@ -225,7 +225,7 @@ export default {
                 margin-right: 10px;
             }
             .hanzi {
-                padding: 10px 6px;
+                padding: 10px 0 10px 6px;
                 width: 200px;
                 display: inline-block;
                 &:hover {
@@ -286,7 +286,7 @@ export default {
                             border-radius: 2px;
                             position: fixed;
                             right: 32px;
-                            top: 471px;
+                            top: 510px;
                             z-index: 2;
                             display: flex;
                             justify-content: center;
@@ -299,7 +299,7 @@ export default {
                         }
                         .add-img {
                             width: 560px;
-                            height: 325px;
+                            height: 360px;
                             background: #ffffff;
                             -webkit-box-shadow: 0px 2px 8px 0px rgba(31, 36, 41, 0.06);
                             box-shadow: 0px 2px 8px 0px rgba(31, 36, 41, 0.06);
@@ -307,11 +307,13 @@ export default {
                             border: 1px solid #e4e5e7;
                             position: absolute;
                             right: 77px;
-                            bottom: 421px;
+                            bottom: 381px;
                             z-index: 2;
                             img {
-                                width: 100%;
-                                height: 100%;
+                                max-width: 100%;
+                                max-height: 100%;
+                                display: block;
+                                margin: 0 auto;
                             }
                         }
                     }

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

@@ -48,7 +48,7 @@
             <input-dialog :type='1' @confirm='confirm'></input-dialog>
         </div>
         <el-table :data='tableData' :border='true' style='width: 100%;amrgin-bottom:30px'>
-            <el-table-column type='index' label='序号' width='60'></el-table-column>
+            <el-table-column type='index' label='序号' width='60' :index="indexMethod"></el-table-column>
             <el-table-column prop='sbjc' label='设备名称' show-overflow-tooltip resizable min-width="150">
                 <template slot-scope='{row}'>{{row.sbjc || '--'}}</template>
             </el-table-column>
@@ -141,6 +141,10 @@ export default {
         this.tabFind()
     },
     methods: {
+        //序号的方法
+        indexMethod(index) {
+            return (this.page - 1) * this.size + index + 1
+        },
         //多余输入框监听
         confirm(fws, manufacturer) {
             //console.log(fws, manufacturer, '------')

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

@@ -20,7 +20,16 @@
                 v-model='keyword'
                 style='width:192px;margin-right:12px'
             ></el-input>
-            <Select @change='getList' @cancel='getList' v-model='floor' style='margin-right:12px;' width='120' tipPlace='top' caption='楼层 :' :selectdata='floorSelect'></Select>
+            <Select
+                @change='getList'
+                @cancel='getList'
+                v-model='floor'
+                style='margin-right:12px;'
+                width='120'
+                tipPlace='top'
+                caption='楼层 :'
+                :selectdata='floorSelect'
+            ></Select>
             <el-input
                 placeholder='搜索生产厂商'
                 clearable
@@ -32,7 +41,7 @@
             ></el-input>
         </div>
         <el-table :data='tableData' style='width: 100%' :border='true' @row-click='rowHandle'>
-            <el-table-column type='index' label='序号' width='60'></el-table-column>
+            <el-table-column type='index' label='序号' width='60' :index='indexMethod'></el-table-column>
             <el-table-column prop='type_name' label='设备名称' show-overflow-tooltip resizable width='250'>
                 <template slot-scope='{row}'>{{row.type_name || '--'}}</template>
             </el-table-column>
@@ -99,6 +108,9 @@ export default {
     },
     props: ['param', 'major'],
     methods: {
+        indexMethod(index) {
+            return (this.currentPage - 1) * this.size + index + 1
+        },
         rowHandle(row) {
             //console.log(row)
             this.innerVisible = true
@@ -119,7 +131,7 @@ export default {
                 major: this.major
             }
             //下拉
-            if (this.floor) {             
+            if (this.floor) {
                 postParams.gname = this.floor
             }
             //输入框搜索

+ 8 - 3
src/views/equipment/table/lookPageTable.vue

@@ -12,10 +12,10 @@
                 style='width:192px;margin-right:12px'
             ></el-input>
             <Select @change='getList' v-model='floor' style='margin-right:12px;' width='120' tipPlace='top' caption='楼层 :' :selectdata='floorSelect'></Select>
-            <Select @change='getList' v-model='floor' width='120' tipPlace='top' caption='文件类型 :' :selectdata='floorSelect'></Select>
+            <Select @change='getList' v-model='fileType' width='140' tipPlace='top' caption='文件类型 :' :selectdata='floorSelect'></Select>
         </div>
         <el-table :data='tableData' style='width: 100%'>
-            <el-table-column type='index' label='序号' width='80'></el-table-column>
+            <el-table-column type='index' label='序号' width='60' :index="indexMethod"></el-table-column>
             <el-table-column prop='lb' label='分类' width='160'>
                 <template slot-scope='{row}'>{{row.assetnum || '--'}}</template>
             </el-table-column>
@@ -60,7 +60,8 @@ export default {
             currentPage: 1,
             size: 11,
             keyword: '',
-            floor: ''
+            floor: '',
+            fileType:''
         }
     },
     props: ['major'],
@@ -68,6 +69,10 @@ export default {
         ...mapGetters(['floorSelect'])
     },
     methods: {
+        //序号的方法
+        indexMethod(index) {
+            return (this.currentPage - 1) * this.size + index +1
+        },
         pageChanged(page, size) {
             this.currentPage = page
             this.getList()

+ 5 - 1
src/views/equipment/table/otherTable.vue

@@ -37,7 +37,7 @@
             ></Select>
         </div>
         <el-table :data='tableData' :border='true' style='width: 100%'>
-            <el-table-column type='index' label='序号' width='60'></el-table-column>
+            <el-table-column type='index' label='序号' width='60' :index="indexMethod"></el-table-column>
             <el-table-column prop='lb' label='其他事项详情' show-overflow-tooltip resizable>
                 <el-table-column prop='zlwfwe' label='记录事项' show-overflow-tooltip resizable>
                     <template slot-scope='{row}'>{{row.jlsx || '--'}}</template>
@@ -107,6 +107,10 @@ export default {
         ...mapGetters(['floorSelect'])
     },
     methods: {
+        //序号的方法
+        indexMethod(index) {
+            return (this.currentPage - 1) * this.size + index +1
+        },
         pageChanged(page) {
             this.currentPage = page
             this.getList()

+ 4 - 2
src/views/equipment/table/standTable.vue

@@ -41,7 +41,7 @@
             ></el-input>
         </div>
         <el-table :data='tableData' :border='true' style='width: 100%' @row-click='rowHandle'>
-            <el-table-column type='index' label='序号' width='60'></el-table-column>
+            <el-table-column type='index' label='序号' width='60' :index='indexMethod'></el-table-column>
             <el-table-column prop label='设备名称' show-overflow-tooltip resizable width='300'>
                 <template slot-scope='{row}'>{{row.type_name || '--'}}</template>
             </el-table-column>
@@ -89,7 +89,6 @@ export default {
     data() {
         return {
             innerVisible: false,
-            pageSize: 10,
             tableData: [],
             total: 0,
             currentPage: 1,
@@ -107,6 +106,9 @@ export default {
         ...mapGetters(['floorSelect'])
     },
     methods: {
+        indexMethod(index) {
+            return (this.currentPage-1) * this.size + index +1
+        },
         rowHandle(row) {
             console.log(row)
             this.innerVisible = true

+ 5 - 1
src/views/equipment/table/tjTable.vue

@@ -14,7 +14,7 @@
             <el-input clearable placeholder='搜索品牌' size='small' @blur='getList' prefix-icon='el-icon-search' v-model='brand' style='width:192px'></el-input>
         </div>
         <el-table :data='tableData' style='width: 100%' :border='true'>
-            <el-table-column type='index' label='序号' width='60'></el-table-column>
+            <el-table-column type='index' label='序号' width='60' :index="indexMethod"></el-table-column>
             <el-table-column prop='category' label='类别'  show-overflow-tooltip resizable>
                 <template slot-scope='{row}'>{{row.category || '--'}}</template>
             </el-table-column>
@@ -61,6 +61,10 @@ export default {
         ...mapGetters(['floorSelect'])
     },
     methods: {
+        //序号的方法
+        indexMethod(index) {
+            return (this.currentPage - 1) * this.size + index +1
+        },
         pageChanged(page, size) {
             this.currentPage = page
             this.getList()

+ 7 - 3
src/views/equipment/table/wbTable.vue

@@ -63,7 +63,7 @@
             <input-dialog :type='2' @confirm='confirm'></input-dialog>
         </div>
         <el-table :data='tableData' :border='true' style='width: 100%'>
-            <el-table-column type='index' label='序号' width='60'></el-table-column>
+            <el-table-column type='index' label='序号' width='60' :index='indexMethod'></el-table-column>
             <el-table-column prop='sbmc' label='设备名称' show-overflow-tooltip resizable min-width='150'>
                 <template slot-scope='{row}'>{{row.sbmc || '--'}}</template>
             </el-table-column>
@@ -87,10 +87,10 @@
                     <template slot-scope='{row}'>{{row.sl>=0?row.sl:'--'}}</template>
                 </el-table-column>
                 <el-table-column prop='cost' label='费用(万元)' width='80'>
-                    <template slot-scope='{row}'>{{row.cost || '--'}}</template>
+                    <template slot-scope='{row}'>{{number_format(row.cost,2) || '--'}}</template>
                 </el-table-column>
                 <el-table-column prop='source' label='费用出处' show-overflow-tooltip resizable width='80'>
-                    <template slot-scope='{row}'>{{number_format(row.source,2) || '--'}}</template>
+                    <template slot-scope='{row}'>{{row.source|| '--'}}</template>
                 </el-table-column>
             </el-table-column>
             <el-table-column prop='brand' label='现场照片' width='70'>
@@ -164,6 +164,10 @@ export default {
         ...mapGetters(['floorSelect'])
     },
     methods: {
+        //序号的方法
+        indexMethod(index) {
+            return (this.currentPage - 1) * this.size + index + 1
+        },
         //多余输入框监听
         confirm(gzglid) {
             this.gzglid = gzglid

+ 5 - 1
src/views/equipment/table/wxTable.vue

@@ -63,7 +63,7 @@
             <input-dialog :type='3' @confirm='confirm'></input-dialog>
         </div>
         <el-table :data='tableData' :border='true' style='width: 100%'>
-            <el-table-column type='index' label='序号' width='60'></el-table-column>
+            <el-table-column type='index' label='序号' width='60' :index="indexMethod"></el-table-column>
             <el-table-column prop='sbmc' label='设备名称' show-overflow-tooltip resizable min-width='150'>
                 <template slot-scope='{row}'>{{row.sbmc || '--'}}</template>
             </el-table-column>
@@ -164,6 +164,10 @@ export default {
     },
     props: ['smsxt', 'major', 'diff', 'tabLabel'],
     methods: {
+        //序号的方法
+        indexMethod(index) {
+            return (this.currentPage - 1) * this.size + index + 1
+        },
         //多余输入框监听
         confirm(wonum) {
             this.wonum = wonum

+ 5 - 1
src/views/equipment/table/zwTable.vue

@@ -61,7 +61,7 @@
             <input-dialog v-if='statusOption.length>0' :statusOption='statusOption' :type='4' @confirm='confirm'></input-dialog>
         </div>
         <el-table :data='tableData' :border='true' style='width: 100%'>
-            <el-table-column type='index' label='序号' width='60'></el-table-column>
+            <el-table-column type='index' label='序号' width='60' :index='indexMethod'></el-table-column>
             <el-table-column prop='nd' label='年度' show-overflow-tooltip resizable width='80'>
                 <template slot-scope='{row}'>{{row.nd || '--'}}</template>
             </el-table-column>
@@ -148,6 +148,10 @@ export default {
     },
     props: ['smsxt', 'major', 'diff', 'tabLabel'],
     methods: {
+        //序号的方法
+        indexMethod(index) {
+            return (this.currentPage - 1) * this.size + index +1
+        },
         //多余输入框监听
         confirm(status, yssjwcsj) {
             this.yssjwcsj = yssjwcsj

+ 2 - 1
src/views/other/gcfz2.vue

@@ -84,7 +84,8 @@
     </div>
 </template>
 <script>
-import Select from '@/components/Select/Select.vue'
+// import Select from '@/components/Select/Select.vue'
+import { Select } from 'meri-design'
 import { mapGetters } from 'vuex'
 import moment from 'moment'
 

+ 2 - 1
src/views/other/gcfzDialog.vue

@@ -21,7 +21,8 @@
     </div>
 </template>
 <script>
-import Select from '@/components/Select/Select.vue'
+// import Select from '@/components/Select/Select.vue'
+import { Select } from 'meri-design'
 import gcfzTable1 from './gcfz1'
 import gcfzTable2 from './gcfz2'
 import { querygcfzyfhz, queryfzyfchange } from '@/api/other.js'

+ 2 - 1
src/views/other/zhsxOther.vue

@@ -25,7 +25,8 @@
 </template>
 <script>
 import moment from 'moment'
-import Select from '@/components/Select/Select.vue'
+import { Select } from 'meri-design'
+// import Select from '@/components/Select/Select.vue'
 import ZhsxDialog from './zhsxDialog'
 import zhsxOtherTable1 from './zhsxOtherTable1'
 import zhsxOtherTable2 from './zhsxOtherTable2'

+ 4 - 3
src/views/other/zhsxOtherTable1.vue

@@ -47,10 +47,10 @@
             <el-table-column prop label='记录事项' :show-overflow-tooltip='true'>
                 <template slot-scope='{row}'>{{row.recordsx||'--'}}</template>
             </el-table-column>
-            <el-table-column prop label='工作要求' width="160">
+            <el-table-column prop label='工作要求' width='160'>
                 <template slot-scope='{row}'>{{row.workyq||'--'}}</template>
             </el-table-column>
-            <el-table-column prop label='整改要求' width="160">
+            <el-table-column prop label='整改要求' width='160'>
                 <template slot-scope='{row}'>{{row.zgyq||'--'}}</template>
             </el-table-column>
             <el-table-column prop label='附件' width='80'>
@@ -89,7 +89,8 @@
 </template>
 <script>
 import moment from 'moment'
-import Select from '@/components/Select/Select.vue'
+import { Select } from 'meri-design'
+// import Select from '@/components/Select/Select.vue'
 import { queryGlams } from '@/api/other.js'
 import { querySelect } from '@/api/public.js'
 import pdf from 'vue-pdf'

+ 2 - 1
src/views/other/zhsxOtherTable2.vue

@@ -83,7 +83,8 @@
     </div>
 </template>
 <script>
-import Select from '@/components/Select/Select.vue'
+// import Select from '@/components/Select/Select.vue'
+import { Select } from 'meri-design'
 import { queryDsfrw } from '@/api/other.js'
 import { querySelect } from '@/api/public.js'
 

+ 6 - 2
src/views/room/detail.vue

@@ -110,7 +110,7 @@
             style='width:100%;margin-top:12px'
             :header-cell-style='{background:"rgba(245,246,247,1)",fontFamily:"MicrosoftYaHei",color:"rgba(100,108,115,1)",lineHeight:"16px",fontSize:"12px"}'
         >
-            <el-table-column type='index' label='序号' width='50'></el-table-column>
+            <el-table-column type='index' label='序号' width='50' :index='indexMethod'></el-table-column>
             <el-table-column prop='sbjc' label='设备名称' min-width='150' :show-overflow-tooltip='true' resizable>
                 <template slot-scope='{row}'>{{row.sbjc||'--'}}</template>
             </el-table-column>
@@ -159,7 +159,8 @@
     </div>
 </template>
 <script>
-import Select from '@/components/Select/Select.vue'
+import { Select } from 'meri-design'
+// import Select from '@/components/Select/Select.vue'
 import { querySelect } from '@/api/public.js'
 import { mapGetters } from 'vuex'
 import { queryHxsbDetail } from '@/api/room.js'
@@ -215,6 +216,9 @@ export default {
         }
     },
     methods: {
+        indexMethod(index) {
+            return (this.page - 1) * this.size + index + 1
+        },
         show() {
             this.dialogFormVisible = !this.dialogFormVisible
         },

+ 23 - 2
src/views/room/index.vue

@@ -12,7 +12,7 @@
             </el-tooltip>
 
             <div class='compute-tab'>
-                <el-tabs v-model='activeName' @tab-click='handleClick'>
+                <el-tabs v-model='activeName' @tab-click='handleClick' ref='elTabs'>
                     <el-tab-pane label='机房布置图' name='1' v-if='tableImg.length>0'>
                         <room-table1 v-if='tableImg.length>=0' :tableImg='tableImg'></room-table1>
                     </el-tab-pane>
@@ -411,6 +411,7 @@ import roomTable4 from './room4'
 import roomTable5 from './room5'
 import { mapGetters } from 'vuex'
 import { querySelect, queryPic } from '@/api/public.js'
+import { Select } from 'meri-design'
 
 export default {
     data() {
@@ -534,6 +535,13 @@ export default {
             queryPic({ getParams }).then(res => {
                 //console.log('机房布置图', res)
                 this.tableImg = res.data ? res.data : []
+                //判断有没有图片,有图片默认显示按钮是第一个tab,没有图片显示的是第二个tab
+                if (this.tableImg.length > 0) {
+                    this.activeName = '1'
+                } else {
+                    this.activeName = '2'
+                    this.Index1()
+                }
             })
         },
         // 明细表
@@ -836,6 +844,7 @@ export default {
         },
         // 机房右上角的跳转 如果是在楼层功能打开的机房则要跳转到设备设施对应的系统\楼层 反之亦然
         jumpFloor() {
+            console.log(this.smsxtArr.smsxt)
             if (this.smsxtArr.smsxt) {
                 if (location.pathname.split('/')[3] == 'equipment') {
                     this.$router.push({ path: '/home/floorFunc' })
@@ -846,7 +855,19 @@ export default {
         }
     },
     mounted() {
-        // this.Index()
+        this.Index()
+        if (this.tableImg.length == 0) {
+            this.Index1()
+            if (this.table2.length == 0) {
+                this.Index2()
+                if (this.table3.length == 0) {
+                    this.Index3()
+                    if (this.table4.length == 0) {
+                        this.Index4()
+                    }
+                }
+            }
+        }
     }
 }
 </script>

+ 2 - 1
src/views/room/room1.vue

@@ -4,7 +4,8 @@
     </div>
 </template>
 <script>
-import Select from '@/components/Select/Select.vue'
+// import Select from '@/components/Select/Select.vue'
+import { Select } from 'meri-design'
 
 export default {
     props: ['tableImg', 'loading'],

+ 6 - 3
src/views/room/room2.vue

@@ -9,7 +9,7 @@
                 style='width: 100%'
                 :header-cell-style='{background:"rgba(245,246,247,1)",fontFamily:"MicrosoftYaHei",color:"rgba(100,108,115,1)",lineHeight:"16px",fontSize:"12px"}'
             >
-                <el-table-column type='index' label='序号' width='50'></el-table-column>
+                <el-table-column type='index' label='序号' width='50' :index='indexMethod'></el-table-column>
                 <el-table-column prop='a' label='抽屉编号' :show-overflow-tooltip='true' resizable>
                     <template slot-scope='{row}'>{{row.drawernum||'--'}}</template>
                 </el-table-column>
@@ -47,7 +47,8 @@
     </div>
 </template>
 <script>
-import Select from '@/components/Select/Select.vue'
+import { Select } from 'meri-design'
+// import Select from '@/components/Select/Select.vue'
 import { mapGetters } from 'vuex'
 export default {
     props: ['table2', 'total', 'page', 'size', 'loading'],
@@ -67,8 +68,10 @@ export default {
     },
     components: { Select },
     methods: {
+        indexMethod(index) {
+            return (this.page - 1) * this.size + index + 1
+        },
         pageChanged(page) {
-            console.log(page)
             this.$emit('Index1Emit', page)
         }
     },

+ 8 - 4
src/views/room/room3.vue

@@ -9,17 +9,17 @@
                 style='width: 100%'
                 :header-cell-style='{background:"rgba(245,246,247,1)",fontFamily:"MicrosoftYaHei",color:"rgba(100,108,115,1)",lineHeight:"16px",fontSize:"12px"}'
             >
-                <el-table-column type='index' label='序号' width='60'></el-table-column>
+                <el-table-column type='index' label='序号' width='60' :index='indexMethod'></el-table-column>
                 <el-table-column prop :show-overflow-tooltip='true' label='设备简称' resizable min-width='150'>
                     <template slot-scope='{row}'>{{row.classqc||'--'}}</template>
                 </el-table-column>
                 <el-table-column prop label='数量' :show-overflow-tooltip='true' width='80'>
                     <template slot-scope='{row}'>{{row.sl||'--'}}</template>
                 </el-table-column>
-                <el-table-column prop label='品牌' :show-overflow-tooltip='true' width="120">
+                <el-table-column prop label='品牌' :show-overflow-tooltip='true' width='120'>
                     <template slot-scope='{row}'>{{row.brand||'--'}}</template>
                 </el-table-column>
-                <el-table-column prop label='型号' :show-overflow-tooltip='true' width="150">
+                <el-table-column prop label='型号' :show-overflow-tooltip='true' width='150'>
                     <template slot-scope='{row}'>{{row.sbxh||'--'}}</template>
                 </el-table-column>
                 <el-table-column prop label='楼层' :show-overflow-tooltip='true' width='100'>
@@ -48,7 +48,8 @@
 </template>
 
 <script>
-import Select from '@/components/Select/Select.vue'
+// import Select from '@/components/Select/Select.vue'
+import { Select } from 'meri-design'
 import Detail from './detail'
 
 export default {
@@ -62,6 +63,9 @@ export default {
 
     components: { Select, Detail },
     methods: {
+        indexMethod(index) {
+            return (this.page - 1) * this.size + index + 1
+        },
         modalClose() {
             this.innerVisible = false
         },

+ 16 - 12
src/views/room/room4.vue

@@ -8,41 +8,41 @@
                 style='width: 100%'
                 :header-cell-style='{background:"rgba(245,246,247,1)",fontFamily:"MicrosoftYaHei",color:"rgba(100,108,115,1)",lineHeight:"16px",fontSize:"12px"}'
             >
-                <el-table-column type='index' label='序号' width='60'></el-table-column>
-                <el-table-column prop label='设备名称' show-overflow-tooltip resizable min-width='150'>
+                <el-table-column type='index' label='序号' width='60' :index='indexMethod'></el-table-column>
+                <el-table-column prop label='设备名称' show-overflow-tooltip resizable min-width='200'>
                     <template slot-scope='{row}'>{{row.sbmc||'--'}}</template>
                 </el-table-column>
-                <el-table-column prop label='设备编号' show-overflow-tooltip resizable width="80"> 
+                <el-table-column prop label='设备编号' show-overflow-tooltip resizable width='80'>
                     <template slot-scope='{row}'>{{row.location||'--'}}</template>
                 </el-table-column>
-                <el-table-column prop label='重要事项记录'  show-overflow-tooltip resizable>
+                <el-table-column prop label='重要事项记录' show-overflow-tooltip resizable min-width='120'>
                     <template slot-scope='{row}'>{{row.matters||'--'}}</template>
                 </el-table-column>
                 <el-table-column prop label='描述' show-overflow-tooltip resizable min-width='150'>
                     <template slot-scope='{row}'>{{row.description||'--'}}</template>
                 </el-table-column>
                 <el-table-column prop label='更换配件信息' align='center' show-overflow-tooltip resizable>
-                    <el-table-column prop label='是/否更换' show-overflow-tooltip resizable width="80">
+                    <el-table-column prop label='是/否更换' show-overflow-tooltip resizable width='80'>
                         <template slot-scope='{row}'>
                             <div v-if='row.ismodel==0'>否</div>
                             <div v-else-if='row.ismodel==1'>是</div>
                             <div v-else>'--'</div>
                         </template>
                     </el-table-column>
-                    <el-table-column prop label='配件名称型号'  min-width='100' show-overflow-tooltip resizable>
+                    <el-table-column prop label='配件名称型号' min-width='100' show-overflow-tooltip resizable>
                         <template slot-scope='{row}'>{{row.model||'--'}}</template>
                     </el-table-column>
-                    <el-table-column prop label='数量' show-overflow-tooltip resizable width="80">
+                    <el-table-column prop label='数量' show-overflow-tooltip resizable width='80'>
                         <template slot-scope='{row}'>{{row.sl>=0?row.sl:'--'}}</template>
                     </el-table-column>
-                    <el-table-column prop label='费用(万元)' min-width='80' show-overflow-tooltip resizable>
+                    <el-table-column prop label='费用(万元)' min-width='110' show-overflow-tooltip resizable>
                         <template slot-scope='{row}'>{{row.cost?number_format(row.cost):'--'}}</template>
                     </el-table-column>
-                    <el-table-column prop label='费用出处' show-overflow-tooltip resizable width="80">
+                    <el-table-column prop label='费用出处' show-overflow-tooltip resizable width='80'>
                         <template slot-scope='{row}'>{{row.source||'--'}}</template>
                     </el-table-column>
                 </el-table-column>
-                <el-table-column prop label='现场照片' show-overflow-tooltip resizable width="80">
+                <el-table-column prop label='现场照片' show-overflow-tooltip resizable width='80'>
                     <template slot-scope='{row}'>{{row.pics || '--'}}</template>
                 </el-table-column>
                 <el-table-column prop label='填报时间' show-overflow-tooltip resizable width='130'>
@@ -51,7 +51,7 @@
                 <el-table-column prop label='验收时间' show-overflow-tooltip width='130' resizable>
                     <template slot-scope='{row}'>{{row.sjjssj?formatter(row.sjjssj):'--'}}</template>
                 </el-table-column>
-                <el-table-column prop label='工单编号' show-overflow-tooltip resizable width="80">
+                <el-table-column prop label='工单编号' show-overflow-tooltip resizable width='80'>
                     <template slot-scope='{row}'>{{row.wonum||'--'}}</template>
                 </el-table-column>
             </el-table>
@@ -70,7 +70,8 @@
     </div>
 </template>
 <script>
-import Select from '@/components/Select/Select.vue'
+// import Select from '@/components/Select/Select.vue'
+import { Select } from 'meri-design'
 import moment from 'moment'
 import { number_format } from '@/utils/format.js'
 
@@ -86,6 +87,9 @@ export default {
     },
     components: { Select },
     methods: {
+        indexMethod(index) {
+            return (this.page - 1) * this.size + index + 1
+        },
         formatter(date) {
             return moment.unix(date / 1000).format('YYYY.MM.DD HH:mm')
         },

+ 8 - 4
src/views/room/room5.vue

@@ -8,17 +8,17 @@
                 style='width: 100%'
                 :header-cell-style='{background:"rgba(245,246,247,1)",fontFamily:"MicrosoftYaHei",color:"rgba(100,108,115,1)",lineHeight:"16px",fontSize:"12px"}'
             >
-                <el-table-column type='index' label='序号' width='60'></el-table-column>
+                <el-table-column type='index' label='序号' width='60' :index='indexMethod'></el-table-column>
                 <el-table-column prop label='设备名称' show-overflow-tooltip resizable min-width='150'>
                     <template slot-scope='{row}'>{{row.sbmc||'--'}}</template>
                 </el-table-column>
-                <el-table-column prop label='设备编号' :show-overflow-tooltip='true' width="80">
+                <el-table-column prop label='设备编号' :show-overflow-tooltip='true' width='80'>
                     <template slot-scope='{row}'>{{row.assetnum||'--'}}</template>
                 </el-table-column>
                 <el-table-column prop label='核心维保事项记录' :show-overflow-tooltip='true' min-width='150'>
                     <template slot-scope='{row}'>{{row.matters||'--'}}</template>
                 </el-table-column>
-                <el-table-column prop label='现场照片' :show-overflow-tooltip='true' width="80">
+                <el-table-column prop label='现场照片' :show-overflow-tooltip='true' width='80'>
                     <template slot-scope='{row}'>
                         <div
                             style='cursor:pointer;color: #0091ff;'
@@ -82,7 +82,8 @@
     </div>
 </template>
 <script>
-import Select from '@/components/Select/Select.vue'
+// import Select from '@/components/Select/Select.vue'
+import { Select } from 'meri-design'
 import moment from 'moment'
 
 export default {
@@ -98,6 +99,9 @@ export default {
     components: { Select },
     mounted() {},
     methods: {
+        indexMethod(index) {
+            return (this.page - 1) * this.size + index + 1
+        },
         pageChanged(page) {
             this.page = page
             this.$emit('Index4Emit', page)