Browse Source

场所接口

V1.0
tianq 3 years ago
parent
commit
86292dbb87
  1. 14
      src/views/dataBoard/sida/cpts/zyqd.vue
  2. 38
      src/views/dataBoard/sida/zy/goodsRes-detail.vue
  3. 6
      src/views/dataBoard/sida/zy/goodsResList.vue
  4. 10
      src/views/dataBoard/sida/zy/placeRes-detail.vue
  5. 50
      src/views/dataBoard/sida/zy/placeResList.vue

14
src/views/dataBoard/sida/cpts/zyqd.vue

@ -79,7 +79,18 @@ export default {
}
},
handleClickItem(item) {
let typeArr = { "全部": "all", "志愿者": "volunteer", "社区自组织": "community_org", "联建单位": "party_unit" };
let typeArr = { "全部": "all",
"志愿者": "volunteer",
"社区自组织": "community_org",
"联建单位": "party_unit",
"安全应急设备":"安全应急设备",
"公共服务设备":"公共服务设备",
"安全生产场所":"enterprise",
"应急场所":"emergency_sites",
"城市管理":"city_management" };
//
let path = '';
if (this.currentTab == '人资源') {
@ -90,6 +101,7 @@ export default {
path = 'placeResList';
}
this.getInfo();
console.log("item.name",item.name)
this.$router.push({
path: `/dataBoard/sida/zy/${path}`,
query: {

38
src/views/dataBoard/sida/zy/goodsRes-detail.vue

@ -1,7 +1,7 @@
<template>
<popup :title="title" @close="handleClose">
<template v-slot:cnt>
<div class="m-info" v-if="detailType == '安全应急设备'">
<div class="m-info" v-if="detailType == 'monitoring_equipment' || detailType == 'safety_equipment' || detailType == 'emergency_equipment'">
<div class="row">
<div class="item">
<div class="field">设备名称</div>
@ -31,14 +31,9 @@
<div class="field">所处位置</div>
<div class="value">{{ info.location }}</div>
</div>
<div class="item">
<div class="field">上报时间</div>
<div class="value">{{ info.report_time }}</div>
</div>
</div>
</div>
<div class="m-info" v-if="detailType == '公共服务设备'">
<div class="m-info" v-else>
<div class="row">
<div class="item">
<div class="field">设备名称</div>
@ -68,11 +63,6 @@
<div class="field">所处位置</div>
<div class="value">{{ info.location }}</div>
</div>
<div class="item">
<div class="field">上报时间</div>
<div class="value">{{ info.report_time }}</div>
</div>
</div>
</div>
<div style="position: relative;height: 300px;margin: 20px;" id="map"></div>
@ -89,7 +79,7 @@ import { requestPostBi } from '@/js/dai/request-bipass';
export default {
name: 'eventdetail',
props: {
eventId: {
detailId: {
type: String,
default: ''
},
@ -105,7 +95,7 @@ export default {
return {
progress: [],
info: {},
title: '事件',
title: '',
currentTabIndex: 0,
startTabIndex: 0,
currentTabIndex2: 0,
@ -129,8 +119,8 @@ export default {
map: new GaodeMap({
pitch: 35.210526315789465,
style: 'dark',
// center: [this.info.latitude, this.info.longitude],
center: [120.0, 36.1],
center: [this.info.latitude, this.info.longitude],
// center: [120.0, 36.1],
zoom: 4.4
})
});
@ -141,18 +131,22 @@ export default {
// id
async getInfo() {
console.log('物资源详情', this.detailId, this.detailType);
let url = '';
let queryParam = {};
let mockId = 0;
if (this.detailType == '安全应急设备') {
url = 'enterprise_info';
// monitoring_equipmentsafety_equipmentemergency_equipment
if (this.detailType == 'monitoring_equipment' || this.detailType == 'safety_equipment' || this.detailType == 'emergency_equipment') {
url = 'safe_emergency_intro';
this.title = '安全应急设备详情';
queryParam.enterprise_id = this.detailId;
queryParam.safe_emergency_equipment_id = this.detailId;
queryParam.parent_safe_emergency = this.detailType;
mockId = 70046202;
} else if (this.detailType == '公共服务设备') {
url = 'group_tenant_info';
} else {
url = 'common_service_equipment_intro';
this.title = '公共服务设备详情';
queryParam.room_id = this.detailId;
queryParam.common_service_equipment_id = this.detailId;
mockId = 70070940;
}

6
src/views/dataBoard/sida/zy/goodsResList.vue

@ -9,8 +9,8 @@
<div class="second-select" style="position:absolute;margin-left:300px;">
<el-select v-model="type2" @change="init" :clearable="true">
<el-option value="全部">全部</el-option>
<el-option value="公共服务设备">公共服务设备</el-option>
<el-option value="安全应急设备">安全应急设备</el-option>
<el-option value="公共服务设备" label="公共服务设备"></el-option>
<el-option value="安全应急设备" label="安全应急设备"></el-option>
<!-- <el-option value="发现问题">发现问题</el-option> -->
</el-select>
@ -188,8 +188,8 @@ export default {
showInfo(index) {
let item = this.srcTableData[index];
this.detailType = item.child_thing_type;
// this.detailType =this.type2;
this.detailId = item.thing_id;
console.log(item,this.detailType,this.detailId );
},
handlePageNoChange(page_num) {

10
src/views/dataBoard/sida/zy/placeRes-detail.vue

@ -62,7 +62,7 @@ import { requestPostBi } from '@/js/dai/request-bipass';
export default {
name: 'eventdetail',
props: {
eventId: {
detailId: {
type: String,
default: ''
},
@ -104,8 +104,8 @@ export default {
map: new GaodeMap({
pitch: 35.210526315789465,
style: 'dark',
// center: [this.info.latitude, this.info.longitude],
center: [120.00, 36.00],
center: [this.info.latitude, this.info.longitude],
// center: [120.00, 36.00],
zoom: 4.4
})
});
@ -116,9 +116,9 @@ export default {
// id
async getInfo() {
let url = '';
let url = 'place_resources_intro';
let queryParam = {};
this.title = this.detailType + '详情';
this.title = '场所详情';
queryParam.place_id = this.detailId;
queryParam.parent_place_type = this.detailType;
const { data, code, msg } = await requestPostBi(

50
src/views/dataBoard/sida/zy/placeResList.vue

@ -8,9 +8,9 @@
<div class="title_line"></div>
<div class="second-select" style="position:absolute;margin-left:300px;">
<el-select v-model="type2" @change="init" :clearable="true">
<el-option value="安全生产场所">安全生产场所</el-option>
<el-option value="城市管理场所">城市管理场所</el-option>
<el-option value="应急处置场所">应急处置场所</el-option>
<el-option value="enterprise" label="安全生产场所"></el-option>
<el-option value="city_management" label="城市管理"></el-option>
<el-option value="emergency_sites" label="应急场所"></el-option>
</el-select>
<div class="m-search2 left10" style="display: inline-block;">
@ -149,7 +149,7 @@ export default {
this.searchDate = [`${year}-${1}-${1}`, `${year}-${month}-${day}`];
},
changList() {
this.type2 = '全部';
// this.type2 = '';
this.getList();
},
handleClickBreadItem({ item }) {
@ -162,8 +162,21 @@ export default {
showInfo(index) {
let item = this.srcTableData[index];
this.detailType = item.danger_name;
this.detailId = item.hidden_danger_id;
console.log('item', item);
if (this.type2 == 'enterprise') {
this.detailId = item.enterprise_id;
} else if (this.type2 == 'city_management') {
this.detailId = item.city_management_id;
} else {
this.detailId = item.emergency_sites_id;
}
// enterprisecity_managementemergency_sites
this.detailType = this.type2;
console.log("this.detailId",this.detailId)
},
handlePageNoChange(page_num) {
@ -187,14 +200,14 @@ export default {
this.loading = true;
let url = '';
let mockId = 0;
if (this.type2 == '安全生产场所') {
if (this.type2 == 'enterprise') {
url = 'place_resour_safe_product';
mockId = '69692497';
} else if (this.type2 == '城市管理场所') {
url = 'place_resour_safe_product';
} else if (this.type2 == 'city_management') {
url = 'place_resour_city_management';
mockId = '69784325';
} else {
url = 'place_resour_safe_product';
url = 'place_resour_emergency_sites';
mockId = '69776621';
}
@ -219,7 +232,7 @@ export default {
if (code === 0) {
this.srcTableData = data;
console.log('this.srcTableData ', this.srcTableData);
if (this.type2 == '安全生产场所') {
if (this.type2 == 'enterprise') {
(this.colList = [
{
align: 'left',
@ -270,7 +283,7 @@ export default {
{ type: 'operate', list: ['查看'] }
];
});
} else if (this.type2 == '城市管理场所') {
} else if (this.type2 == 'city_management') {
this.header = ['序号', '场所名称', '场所类型', '所属组织', '场所地址', '操作'];
this.list = data.map((item, index) => {
// city_management_id
@ -345,8 +358,7 @@ export default {
width: '10%'
},
{
align: 'left',
align: 'left'
},
{
align: 'left'
@ -368,7 +380,15 @@ export default {
const { org_id, listType, page_num, page_size, searchDate } = this;
const start_date = searchDate[0];
const end_date = searchDate[1];
const url = 'hidden_danger_list_num';
let url = '';
if (this.type2 == 'enterprise') {
url = 'place_resour_safe_product_total';
} else if (this.type2 == 'city_management') {
url = 'place_resour_safe_product_total';
} else {
url = 'place_resour_safe_product_total';
}
let danger_name = this.type2;
const { data, code, msg } = await requestPostBi(
url,

Loading…
Cancel
Save