yunxing 4 anni fa
parent
commit
3fa1f79c7a

+ 2 - 2
src/store/index.ts

@@ -12,8 +12,8 @@ export default new Vuex.Store({
         ssoToken: 'admin:maohongru',
         appTitle: '管理说明书', //顶部标题
         // ssoToken: null,
-        // plazaId: '1000772', //项目Id 北京通州
-        plazaId: '1000423', //项目Id 大连高新
+        plazaId: '1000772', //项目Id 北京通州
+        // plazaId: '1000423', //项目Id 大连高新
         fmapID: '',
         haveFengMap: -1, //是否有蜂鸟地图的数据 -1为等待 0 为失败 1 为成功
         isMessage: true, //是否有发布的图

+ 8 - 1
src/views/equipmentFacilities/EquipmentList.vue

@@ -21,7 +21,7 @@
         <div class='equipment-list' v-if='list.length'>
             <van-list v-model='loading' :finished='finished' finished-text='没有更多了' :offset='20' :immediate-check='false' @load='onLoad'>
                 <!-- <van-cell v-for='item in list' :key='item' :title='item' /> -->
-                <van-cell is-link v-for='item in list' :key='item.classstructureid'>
+                <van-cell is-link v-for='item in list' @click='goToDetail(item)' :key='item.classstructureid'>
                     <!-- 使用 title 插槽来自定义标题 -->
                     <template #title>
                         <span class='number'>{{item.classstructureid}}</span>
@@ -225,6 +225,13 @@ export default {
             }
         },
         /**
+         * 跳转设备详情页
+         */
+        goToDetail(item) {
+            const { assetid } = item
+            assetid && this.$router.push({ name: 'AssetDetail', query: { assetid } })
+        },
+        /**
          * 搜索
          */
         onSearch() {

+ 4 - 1
src/views/equipmentFacilities/SystemFloor.vue

@@ -29,10 +29,13 @@ export default {
     },
     created() {
         const { title, fbt, fbtArr } = this.$route.query
-        this.title = title
         // 分布图使用
         this.fbt = fbt || false
         this.fbtArr = fbtArr ? JSON.parse(fbtArr) : []
+        // 如果是分布图,使用分布图的title
+        if (fbt) {
+            this.title = title
+        }
     },
     beforeMount() {},
     mounted() {},

+ 2 - 1
src/views/equipmentFacilities/index.vue

@@ -535,7 +535,7 @@ export default {
          * 点击更多设备卡片,跳转设备列表页面
          */
         goToMoreEquipment() {
-            // this.$router.push({ name: 'MoreEquipmentList', params: {} })
+            this.$router.push({ name: 'MoreEquipmentList', params: {} })
         },
     },
 }
@@ -566,6 +566,7 @@ export default {
                 margin-bottom: 4px;
                 .van-cell__value {
                     width: 40px;
+                    max-width: 50px;
                     flex: none;
                 }
             }

+ 38 - 32
src/views/otherMatter/ComprehensiveMatter.vue

@@ -11,11 +11,12 @@
                 <!-- :immediate-check='false' -->
                 <div class='container' v-for='(item,index) in list' :key='index'>
                     <!-- 政府部门 -->
-                    <div class='government-department' v-if='item.department.indexOf("其他")'>
+                    <div class='government-department'>
+                        <!-- <div class='government-department' v-if='item.department.indexOf("其他")'> -->
                         <van-cell :title='item.department' is-link :value='`${item.count}`' @click='goToMattersFetail(item,1)' />
                     </div>
                     <!-- 其他部门 -->
-                    <div class='other-department' v-else>
+                    <!-- <div class='other-department' v-else>
                         <van-cell title='其他' :arrow-direction='item.arrowDirection ||"up"' is-link @click='changeOtherShowStatus(item)' />
                         <div class='other-container' v-if='item.showOther'>
                             <van-cell
@@ -28,7 +29,7 @@
                                 :key='dIndex'
                             />
                         </div>
-                    </div>
+                    </div>-->
                 </div>
             </van-list>
         </div>
@@ -150,7 +151,7 @@ export default {
             this.count = res.count //TODO: count
             this.currentCount += data.length
             data.map((item) => {
-                item.children = []
+                // item.children = []
 
                 if (item.cnt) {
                     item.count = item.cnt + '项'
@@ -158,36 +159,40 @@ export default {
                     item.count = '--'
                     item.disabled = true
                 }
+                if (item.otherdescription) {
+                    let otherdescription = item.otherdescription.replace(/(\(无\)|\(无\))/g, '')
+                    otherdescription && (item.department = item.department + ' ' + otherdescription)
+                }
             })
-            if (['其他部门', '其他', '其它'].includes(data[0].department)) {
-                let item = data[0]
-                item.showOther = true
-                item.children.push({ department: item.department, count: item.count, cnt: item.cnt, otherdescription: item.otherdescription })
-            }
+            // if (['其他部门', '其他', '其它'].includes(data[0].department)) {
+            //     let item = data[0]
+            //     item.showOther = true
+            //     item.children.push({ department: item.department, count: item.count, cnt: item.cnt, otherdescription: item.otherdescription })
+            // }
             // 处理其他部门,将在一起的其他部门,合并到一起
-            for (let index = 1, len = data.length; index < len; index++) {
-                const item = data[index]
-                // 出现的第一个其他部门加入children
-                if (['其他部门', '其他', '其它'].includes(item.department) && !['其他部门', '其他', '其它'].includes(data[index - 1].department)) {
-                    item.showOther = true
-                    if (
-                        !item.children.some(({ department, count, otherdescription }) => {
-                            return item.otherdescription === otherdescription && item.count === count && item.department === item.department
-                        })
-                    ) {
-                        item.children.push({ department: item.department, count: item.count, cnt: item.cnt, otherdescription: item.otherdescription })
-                    }
-                } else if (data[index - 1].department === item.department && ['其他部门', '其他', '其它'].includes(item.department)) {
-                    data[index - 1].children.push({
-                        department: item.department,
-                        count: item.count,
-                        cnt: item.cnt,
-                        otherdescription: item.otherdescription,
-                    })
-                    data.splice(index--, 1)
-                    len--
-                }
-            }
+            // for (let index = 1, len = data.length; index < len; index++) {
+            //     const item = data[index]
+            //     // 出现的第一个其他部门加入children
+            //     if (['其他部门', '其他', '其它'].includes(item.department) && !['其他部门', '其他', '其它'].includes(data[index - 1].department)) {
+            //         item.showOther = true
+            //         if (
+            //             !item.children.some(({ department, count, otherdescription }) => {
+            //                 return item.otherdescription === otherdescription && item.count === count && item.department === item.department
+            //             })
+            //         ) {
+            //             item.children.push({ department: item.department, count: item.count, cnt: item.cnt, otherdescription: item.otherdescription })
+            //         }
+            //     } else if (data[index - 1].department === item.department && ['其他部门', '其他', '其它'].includes(item.department)) {
+            //         data[index - 1].children.push({
+            //             department: item.department,
+            //             count: item.count,
+            //             cnt: item.cnt,
+            //             otherdescription: item.otherdescription,
+            //         })
+            //         data.splice(index--, 1)
+            //         len--
+            //     }
+            // }
             if (this.page === 1) {
                 this.list = data
             } else {
@@ -297,6 +302,7 @@ export default {
             background: #f1f1f1;
             border-radius: 16px;
             border: 1px solid #dcdcdc;
+            padding: 0 !important;
         }
         .active {
             background-color: #025baa !important;

+ 2 - 1
src/views/otherMatter/ComprehensiveMatterList.vue

@@ -232,7 +232,8 @@ export default {
                     i {
                         position: relative;
                         top: 2px;
-                        width: 20px;
+                        right: 3px;
+                        width: 25px;
                     }
                     span {
                         height: 100%;