中建四(指挥中心):设备管理接口对接

This commit is contained in:
骆乐 2022-09-17 17:12:13 +08:00
parent 0d547661ed
commit ec6c77d17f
2 changed files with 19 additions and 5 deletions

View File

@ -5,6 +5,8 @@
export const listProjectInfo = data => post('xmgl/project/getProjectInfoBySn', data);
// 人员概览
export const getPersonnelNumApi = data => get('xmgl/workerInfo/getPersonnelSituationNum',data)
// 设备管理
export const getDevNumberApi = data => get('xmgl/dev/getNumber',data)
// 安全管理
export const resourceManagement = params => get('xmgl/hiddenDangerInspectRecord/getPollingFinishDays', params);
// 质量管理-整改问题

View File

@ -10,20 +10,32 @@
<script>
import echarts from 'echarts4'
import { getDevNumberApi } from '@/assets/js/api/zhongjianFourth'
import Card from '../components/Card'
export default {
components: { Card },
data() {
return {}
return {
towerNumber:"",
lifterNumber:"",
}
},
mounted() {
this.initChart('firstChart', 7, '塔吊设备数', require('../assets/images/command-center/icon-tower.png'))
this.initChart('secondChart', 4, '升降机设备数', require('../assets/images/command-center/icon-lifter.png'))
this.initChart('thirdChart', 5, '视频设备数', require('../assets/images/command-center/icon-video.png'))
this.getData()
},
methods: {
getData(){
getDevNumberApi({ projectSn: this.$store.state.projectSn }).then((res)=>{
if(res.code == 200){
this.towerNumber = res.result.towerNumber
this.lifterNumber = res.result.lifterNumber
this.initChart('firstChart', this.towerNumber, '塔吊设备数', require('../assets/images/command-center/icon-tower.png'))
this.initChart('secondChart', this.lifterNumber, '升降机设备数', require('../assets/images/command-center/icon-lifter.png'))
this.initChart('thirdChart', 5, '视频设备数', require('../assets/images/command-center/icon-video.png'))
}
})
},
initChart(ref, value, title = '默认标题', image) {
const myChart = echarts.init(this.$refs[ref])