|
@@ -26,7 +26,7 @@
|
|
<!-- 分割线 -->
|
|
<!-- 分割线 -->
|
|
<div class='divider'></div>
|
|
<div class='divider'></div>
|
|
<!-- 设备卡片 -->
|
|
<!-- 设备卡片 -->
|
|
- <div class='card-container'>
|
|
|
|
|
|
+ <div class='card-container' :key='`card_${key}`'>
|
|
<m-card
|
|
<m-card
|
|
class='card'
|
|
class='card'
|
|
:type='item.type'
|
|
:type='item.type'
|
|
@@ -48,7 +48,7 @@
|
|
:unit='item.unit'
|
|
:unit='item.unit'
|
|
:total='item.total'
|
|
:total='item.total'
|
|
:number='item.number'
|
|
:number='item.number'
|
|
- v-for='(item,index) in cardList'
|
|
|
|
|
|
+ v-for='(item,index) in moreCardList'
|
|
:key='index'
|
|
:key='index'
|
|
@click.native='goToEquipment(item)'
|
|
@click.native='goToEquipment(item)'
|
|
/>
|
|
/>
|
|
@@ -64,7 +64,7 @@ import Vue from 'vue'
|
|
import { Cell, Toast } from 'vant'
|
|
import { Cell, Toast } from 'vant'
|
|
Vue.use(Cell).use(Toast)
|
|
Vue.use(Cell).use(Toast)
|
|
import { mapGetters, mapMutations } from 'vuex'
|
|
import { mapGetters, mapMutations } from 'vuex'
|
|
-import { querySystemCount, querySystemCard, querySystemImage, querySystemTuJianImage, queryRoomCount, queryMoreAsset } from '@/api/equipmentList'
|
|
|
|
|
|
+import { querySystemCount, querySystemCard, querySystemImage, querySystemTuJianImage, queryRoomCount, queryMoreSystemCard } from '@/api/equipmentList'
|
|
|
|
|
|
import { appGraphElementQuery } from '@/api/public'
|
|
import { appGraphElementQuery } from '@/api/public'
|
|
import MCard from '@/components/equipmentFacilities/Card'
|
|
import MCard from '@/components/equipmentFacilities/Card'
|
|
@@ -179,6 +179,7 @@ export default {
|
|
],
|
|
],
|
|
},
|
|
},
|
|
listKey: `list_${new Date().getTime()}`,
|
|
listKey: `list_${new Date().getTime()}`,
|
|
|
|
+ key: new Date().getTime(),
|
|
cardList: [],
|
|
cardList: [],
|
|
moreCardList: [],
|
|
moreCardList: [],
|
|
showMoreCardList: false,
|
|
showMoreCardList: false,
|
|
@@ -211,7 +212,7 @@ export default {
|
|
},
|
|
},
|
|
},
|
|
},
|
|
async created() {
|
|
async created() {
|
|
- window.vm = this
|
|
|
|
|
|
+ // window.vm = this
|
|
// let initSys = {
|
|
// let initSys = {
|
|
// text: '供电',
|
|
// text: '供电',
|
|
// categoryId: 'GDXT',
|
|
// categoryId: 'GDXT',
|
|
@@ -238,7 +239,9 @@ export default {
|
|
* @param { String } currentSmsxt 系统id? 1001 - 1008
|
|
* @param { String } currentSmsxt 系统id? 1001 - 1008
|
|
*/
|
|
*/
|
|
async changeSystem({ text, categoryId, smsxt }) {
|
|
async changeSystem({ text, categoryId, smsxt }) {
|
|
|
|
+ this.key = new Date().getTime()
|
|
this.showMoreCardList = false
|
|
this.showMoreCardList = false
|
|
|
|
+ this.moreCardList = []
|
|
this.showRight = false
|
|
this.showRight = false
|
|
this.currentSmsxt = smsxt
|
|
this.currentSmsxt = smsxt
|
|
this.systemText = text + '系统'
|
|
this.systemText = text + '系统'
|
|
@@ -633,30 +636,45 @@ export default {
|
|
* 点击更多设备卡片,跳转设备列表页面
|
|
* 点击更多设备卡片,跳转设备列表页面
|
|
*/
|
|
*/
|
|
async goToMoreEquipment(e) {
|
|
async goToMoreEquipment(e) {
|
|
- // this.$router.push({ name: 'MoreEquipmentList', params: {} })
|
|
|
|
- console.log(e.target)
|
|
|
|
- // TODO: 更多设备
|
|
|
|
- return false
|
|
|
|
this.showMoreCardList = true
|
|
this.showMoreCardList = true
|
|
- this.moreCardList = cloneDeep(this.cardList)
|
|
|
|
- console.log()
|
|
|
|
- //
|
|
|
|
- // let data = {
|
|
|
|
- // // page: 1,
|
|
|
|
- // // size: 400,
|
|
|
|
- // // subPage: 1,
|
|
|
|
- // // subSize: 100,
|
|
|
|
- // plazaId: this.plazaId,
|
|
|
|
- // onlyMainAsset: true,
|
|
|
|
- // }
|
|
|
|
- // let postParams = {
|
|
|
|
- // system_code: this.smsxt,
|
|
|
|
- // }
|
|
|
|
- // let res = await queryMoreAsset({ data, postParams })
|
|
|
|
- // if (!res?.data?.data) {
|
|
|
|
- // return false
|
|
|
|
- // }
|
|
|
|
- // console.log(res.data.data)
|
|
|
|
|
|
+ let getParams = {
|
|
|
|
+ plazaId: this.plazaId,
|
|
|
|
+ system_code: this.smsxt,
|
|
|
|
+ }
|
|
|
|
+ let res = await queryMoreSystemCard({ getParams })
|
|
|
|
+ console.log(res)
|
|
|
|
+ if (!res?.data) {
|
|
|
|
+ return false
|
|
|
|
+ }
|
|
|
|
+ let moreCardList = res.data
|
|
|
|
+ moreCardList.map((item) => {
|
|
|
|
+ item.total = item.asset_num // card 第二行台数
|
|
|
|
+ item.name = item.category_name //card 第一行名称
|
|
|
|
+ // 设备卡片单位处理
|
|
|
|
+ if (item.name === '屋面logo') {
|
|
|
|
+ item.unit = '个'
|
|
|
|
+ } else if (item.name === '玻璃护栏') {
|
|
|
|
+ item.unit = '段'
|
|
|
|
+ } else {
|
|
|
|
+ item.unit = '台'
|
|
|
|
+ }
|
|
|
|
+ /**
|
|
|
|
+ * type 1: 正常运维 2:重要维保 3:重要维修
|
|
|
|
+ */
|
|
|
|
+ // 默认正常
|
|
|
|
+ item.type = 1
|
|
|
|
+ item.number = 0
|
|
|
|
+ if (item.is_exception_num) {
|
|
|
|
+ // 有异常
|
|
|
|
+ item.type = 3
|
|
|
|
+ item.number = item.is_exception_num
|
|
|
|
+ } else if (item.is_detecting_num) {
|
|
|
|
+ // 检测中
|
|
|
|
+ item.type = 2
|
|
|
|
+ item.number = item.is_detecting_num
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ this.moreCardList = moreCardList
|
|
},
|
|
},
|
|
},
|
|
},
|
|
}
|
|
}
|
|
@@ -752,13 +770,15 @@ export default {
|
|
.close {
|
|
.close {
|
|
position: fixed;
|
|
position: fixed;
|
|
background-color: #fff;
|
|
background-color: #fff;
|
|
|
|
+ color: #025baa;
|
|
width: 50px;
|
|
width: 50px;
|
|
height: 50px;
|
|
height: 50px;
|
|
|
|
+ box-shadow: 0px 2px 10px 0px rgba(31, 36, 41, 0.1);
|
|
line-height: 50px;
|
|
line-height: 50px;
|
|
border-radius: 50px;
|
|
border-radius: 50px;
|
|
text-align: center;
|
|
text-align: center;
|
|
- bottom: 80px;
|
|
|
|
- right: 30px;
|
|
|
|
|
|
+ bottom: 70px;
|
|
|
|
+ right: 20px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|