From 94d8911295da5beb72e68eabe72ecfd6f727acb2 Mon Sep 17 00:00:00 2001 From: tianq Date: Fri, 31 Mar 2023 17:29:40 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=A9=E5=93=81=EF=BC=8C=E5=9C=BA=E6=89=80?= =?UTF-8?q?=E5=88=97=E8=A1=A8=EF=BC=8C=E4=BA=BA=E5=88=97=E8=A1=A8mock?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dataBoard/sida/zy/goodsRes-detail.vue | 874 +----------------- src/views/dataBoard/sida/zy/goodsResList.vue | 5 +- .../dataBoard/sida/zy/peopleRes-detail.vue | 8 +- src/views/dataBoard/sida/zy/peopleResList.vue | 27 +- src/views/dataBoard/sida/zy/placeResList.vue | 166 +++- 5 files changed, 211 insertions(+), 869 deletions(-) diff --git a/src/views/dataBoard/sida/zy/goodsRes-detail.vue b/src/views/dataBoard/sida/zy/goodsRes-detail.vue index 4dd8f124e..f9956aac5 100644 --- a/src/views/dataBoard/sida/zy/goodsRes-detail.vue +++ b/src/views/dataBoard/sida/zy/goodsRes-detail.vue @@ -1,736 +1,81 @@ @@ -774,56 +119,18 @@ export default { }, mounted() { - this.getApiData(); - }, - computed: { - currentTab() { - return this.tabList[this.currentTabIndex]; - }, - currentTab2() { - return this.tabList2[this.currentTabIndex2]; - } + this.getInfo(); }, + computed: {}, methods: { - addStartTabIndex() { - const { startTabIndex, tabList } = this; - if (startTabIndex < tabList.length - 7) { - this.startTabIndex = startTabIndex + 1; - } else { - this.startTabIndex = tabList.length - 7; - } - }, - subStartTabIndex() { - const { startTabIndex, tabList } = this; - if (startTabIndex > 0) { - this.startTabIndex = startTabIndex - 1; - } else { - this.startTabIndex = 0; - } - }, - addStartTabIndex2() { - const { startTabIndex2, tabList2 } = this; - if (startTabIndex2 < tabList2.length - 7) { - this.startTabIndex2 = startTabIndex2 + 1; - } else { - this.startTabIndex2 = tabList2.length - 7; - } - }, - subStartTabIndex2() { - const { startTabIndex2, tabList2 } = this; - if (startTabIndex2 > 0) { - this.startTabIndex2 = startTabIndex2 - 1; - } else { - this.startTabIndex2 = 0; - } - }, iniMap() { const scene = new Scene({ id: 'map', map: new GaodeMap({ pitch: 35.210526315789465, style: 'dark', - center: [this.info.latitude, this.info.longitude], + // center: [this.info.latitude, this.info.longitude], + center: [120.0, 36.1], zoom: 4.4 }) }); @@ -832,74 +139,21 @@ export default { this.$emit('close'); }, - async getApiData() { - this.getInfo(); - }, - - gettab() { - this.info.group_rental.forEach(item => { - this.getUserInfo(item.user_id); - }); - }, - - getUserInfo(id) { - const url = 'resident_info'; - - requestPostBi( - url, - { - queryParam: { - resident_id: id - } - }, - { - // mockId: 61172054, - } - ).then(res => { - console.log(res); - if (res.code === 0) { - this.userArray.push(res.data[0]); - if (this.userArray.length == 1) { - this.gettab2(this.userArray[0]); - } - } - }); - }, - - gettab2(item) { - this.userList = { ...item }; - console.log("当前人员信息",this.userList) - let tabList = this.BaseTabList; - this.userList.crowd && tabList.push('党员'); - this.userList.srs && tabList.push('保障房'); - this.userList.unemployed && tabList.push('失业'); - this.userList.exs && tabList.push('退役军人'); - this.userList.ufs && tabList.push('统战人员'); - this.userList.volunteer && tabList.push('志愿者'); - this.userList.aged && tabList.push('老年人'); - this.userList.special_popu && tabList.push('特殊人群'); - tabList.push('出生信息'); - tabList.push('死亡信息'); - tabList.push('迁出'); - this.tabList = tabList; - }, // 根据房屋id获取详情 async getInfo() { let url = ''; let queryParam = {}; - - if (this.detailType == '生产隐患') { + let mockId = 0; + if (this.detailType == '安全应急设备') { url = 'enterprise_info'; - this.title = '安全生产巡查详情'; + this.title = '安全应急设备详情'; queryParam.enterprise_id = this.detailId; - } else if (this.detailType == '群租房') { + mockId = 70046202; + } else if (this.detailType == '公共服务设备') { url = 'group_tenant_info'; - this.title = '群租房详情'; + this.title = '公共服务设备详情'; queryParam.room_id = this.detailId; - } else if (this.detailType == '发现问题') { - url = 'group_tenant_info'; - this.title = '发现问题详情'; - queryParam.hidden_danger_id = this.detailId; + mockId = 70070940; } const { data, code, msg } = await requestPostBi( @@ -908,53 +162,13 @@ export default { queryParam: queryParam }, { - // mockId: 60235478, + mockId: mockId } ); if (code === 0) { this.info = { ...this.info, ...data[0] }; + this.iniMap(); console.log('this.info', this.info); - // this.info = { - // group_rental: [ - // { - // user_id: '1501821708368089090' - // }, - // { - // user_id: '1501821708569415681' - // }, - // { - // user_id: '1501821708368089090' - // }, - // { - // user_id: '1501821708569415681' - // }, - // { - // user_id: '1501821708368089090' - // }, - // { - // user_id: '1501821708569415681' - // }, - // { - // user_id: '1501821708368089090' - // }, - // { - // user_id: '1501821708569415681' - // } - // ], - // house_state: null, - // homeowner_idcard: '53', - // homeowner: 'elit', - // room_id: '52', - // house_usage: 'ullamco culpa dolor', - // homeowner_telep: 'sed', - // house_type: 'mollit est eu commodo in' - // }; - - if (this.detailType == '生产隐患') { - this.iniMap(); - } else if (this.detailType == '群租房') { - this.gettab(); - } } else { this.$message.error(msg); } diff --git a/src/views/dataBoard/sida/zy/goodsResList.vue b/src/views/dataBoard/sida/zy/goodsResList.vue index 65a35fb69..9b03871ef 100644 --- a/src/views/dataBoard/sida/zy/goodsResList.vue +++ b/src/views/dataBoard/sida/zy/goodsResList.vue @@ -187,7 +187,8 @@ export default { showInfo(index) { let item = this.srcTableData[index]; - this.detailType = item.child_thing_type; + // this.detailType = item.child_thing_type; + this.detailType =this.type2; this.detailId = item.thing_id; }, @@ -224,7 +225,7 @@ export default { } }, { - // mockId: 60068051, + mockId: 69679253, } ); diff --git a/src/views/dataBoard/sida/zy/peopleRes-detail.vue b/src/views/dataBoard/sida/zy/peopleRes-detail.vue index 3957f50bd..09b3e609a 100644 --- a/src/views/dataBoard/sida/zy/peopleRes-detail.vue +++ b/src/views/dataBoard/sida/zy/peopleRes-detail.vue @@ -151,7 +151,7 @@ export default { async getApiData() { this.getInfo(); - this.getList(); + // this.getList(); }, gettab() { @@ -164,19 +164,23 @@ export default { async getInfo() { let url = ''; let queryParam = {}; + let mockId=0; console.log('this.detailId', this.detailId); if (this.detailType == '志愿者') { url = 'resident_info'; this.title = '志愿者详情'; queryParam.resident_id = this.detailId; + mockId=0; } else if (this.detailType == '社区自组织') { url = 'self_org'; this.title = '社区自组织详情'; queryParam.self_org_id = this.detailId; + mockId=69828071; } else if (this.detailType == '联建单位') { url = 'party_unit'; this.title = '联建单位详情'; queryParam.party_unit_id = this.detailId; + mockId=69802377; } const { data, code, msg } = await requestPostBi( @@ -185,7 +189,7 @@ export default { queryParam: queryParam }, { - // mockId: 60235478, + mockId: mockId, } ); if (code === 0) { diff --git a/src/views/dataBoard/sida/zy/peopleResList.vue b/src/views/dataBoard/sida/zy/peopleResList.vue index cfa143ad7..6f9a068a8 100644 --- a/src/views/dataBoard/sida/zy/peopleResList.vue +++ b/src/views/dataBoard/sida/zy/peopleResList.vue @@ -173,14 +173,13 @@ export default { handleSearch() {}, showInfo(index) { - // let item = this.srcTableData[index]; + let item = this.srcTableData[index]; // this.detailType = item.peop_child_type; - // this.detailId = item.peop_id; - - // ceshi - - this.detailType ='志愿者'; - this.detailId = '1501821704551272449'; + this.detailType = this.type2 + this.detailId = item.peop_id; + console.log("item",item) + // this.detailType = '志愿者'; + // this.detailId = '1501821704551272449'; }, handlePageNoChange(page_num) { @@ -216,7 +215,7 @@ export default { } }, { - // mockId: 60068051, + mockId: 69636829 } ); @@ -245,18 +244,6 @@ export default { } else { this.$message.error(msg); } - this.list = [ - { - index: 1, - peop_name: '置南于可', - peop_child_type: 'in nostrud commodo dolore', - service_num: 57, - service_ratio: 94, - avg_satisfaction: 65, - sum_point: 63, - '': { type: 'operate', list: ['查看'] } - } - ]; }, async getCount() { diff --git a/src/views/dataBoard/sida/zy/placeResList.vue b/src/views/dataBoard/sida/zy/placeResList.vue index e85fb8683..f97ce20bd 100644 --- a/src/views/dataBoard/sida/zy/placeResList.vue +++ b/src/views/dataBoard/sida/zy/placeResList.vue @@ -8,9 +8,8 @@
- 全部 安全生产场所 - 城市管理 + 城市管理场所 应急场所 @@ -186,7 +185,19 @@ export default { let danger_name = this.type2; this.loading = true; - const url = 'hidden_danger_list'; + let url = ''; + let mockId = 0; + if (this.type2 == '安全生产场所') { + url = 'place_resour_safe_product'; + mockId = '69692497'; + } else if (this.type2 == '城市管理场所') { + url = 'place_resour_safe_product'; + mockId = '69784325'; + } else { + url = 'place_resour_safe_product'; + mockId = '69776621'; + } + const { data, code, msg } = await requestPostBi( url, { @@ -195,12 +206,11 @@ export default { page_size, start_date, end_date, - org_id, - danger_name + org_id } }, { - // mockId: 60068051, + mockId: mockId } ); @@ -209,18 +219,144 @@ export default { if (code === 0) { this.srcTableData = data; console.log('this.srcTableData ', this.srcTableData); - // this.total = data.total; + if (this.type2 == '安全生产场所') { + (this.colList = [ + { + align: 'left', + width: '5%' + }, + { + align: 'left', + width: '10%' + }, + { + align: 'left' + }, + + { + align: 'left', + width: '10%' + }, + { + align: 'left', + width: '10%' + }, + { + align: 'left', + width: '10%' + }, + { + align: 'left', + width: '10%' + }, + { + align: 'left', + width: '10%' + } + ]), + (this.header = ['序号', '场所名称', '场所类型', '场所规模', '负责人', '手机号', '最新检查时间', '最新检查结果', '故障次数', '操作']); + this.list = data.map((item, index) => { + return [ + index + 1, + item.place_org_name ? item.place_org_name : '--', + item.place_type ? item.place_type : '--', + item.scale_total ? item.scale_total : '--', + item.person_in_charge ? item.person_in_charge : '--', + item.mobile ? item.mobile : '--', + item.latest_patrol_time ? item.latest_patrol_time : '--', + item.latest_result ? item.latest_result : '--', + item.failure_num ? item.failure_num : '--', - this.list = data.map((item, index) => { - return [ - index + 1, - item.danger_name ? item.danger_name : '--', - item.detailed ? item.detailed : '--', + { type: 'operate', list: ['查看'] } + ]; + }); + } else if (this.type2 == '城市管理场所') { + this.header = ['序号', '场所名称', '场所类型', '所属组织', '场所地址', '操作']; + this.list = data.map((item, index) => { + // city_management_id + return [ + index + 1, + item.name ? item.name : '--', + item.category ? item.category : '--', + item.agency ? item.agency : '--', + item.address ? item.address : '--', - item.created_time ? item.created_time : '--', - { type: 'operate', list: ['查看'] } + { type: 'operate', list: ['查看'] } + ]; + }); + this.colList = [ + { + align: 'left', + width: '5%' + }, + { + align: 'left', + width: '10%' + }, + + { + align: 'left', + width: '10%' + }, + { + align: 'left', + width: '10%' + }, + { + align: 'left' + }, + { + align: 'left', + width: '10%' + } + ]; + } else { + this.header = ['序号', '场所名称', '场所类型', '占地面积', '容纳人数', '场所地址', '操作']; + this.list = data.map((item, index) => { + // emergency_sites_id + return [ + index + 1, + item.name ? item.name : '--', + item.category ? item.category : '--', + item.area_covered ? item.area_covered : '--', + item.capacity ? item.capacity : '--', + + item.address ? item.address : '--', + + { type: 'operate', list: ['查看'] } + ]; + }); + this.colList = [ + { + align: 'left', + width: '5%' + }, + { + align: 'left', + width: '10%' + }, + + { + align: 'left', + width: '10%' + }, + { + align: 'left', + width: '10%' + }, + { + align: 'left', + + }, + { + align: 'left' + }, + { + align: 'left', + width: '10%' + } ]; - }); + } console.log('this.list', this.list); } else {