|
|
@@ -1,9 +1,10 @@
|
|
|
<!-- 物联感知数据 -->
|
|
|
<template>
|
|
|
<CategoryMenu :type="'iot'" v-model:currVal="currCategory"></CategoryMenu>
|
|
|
- <div class="data" v-if="currCategory && currCategory!==''">
|
|
|
+ <div class="data" v-if="currCategory.id && currCategory.id!==''">
|
|
|
<el-button v-if="auth" type="primary" @click="addDataClick">录入物联感知数据</el-button>
|
|
|
<el-button v-if="auth" type="warning" @click="batchDelete">批量删除</el-button>
|
|
|
+ <el-button v-if="auth && isAllView" type="info" @click="handleAllGltfView">全部预览</el-button>
|
|
|
<div class="operation">
|
|
|
<el-form :model="filterForm" :inline="true">
|
|
|
<el-form-item label="标题:" style="width: 22%">
|
|
|
@@ -42,7 +43,7 @@
|
|
|
<el-table-column prop="content" label="描述" width="250"/>
|
|
|
<el-table-column prop="menuNameTwo" label="类别" width="80"/>
|
|
|
<el-table-column prop="mediaType" label="媒体类型" width="120"/>
|
|
|
- <el-table-column prop="url" label="媒体路径" width="120"/>
|
|
|
+ <el-table-column prop="modelUrl" label="媒体路径" width="230"/>
|
|
|
<el-table-column prop="lon" label="位置" width="180">
|
|
|
<template #default="scope">
|
|
|
[
|
|
|
@@ -103,13 +104,22 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <IotDataDetail v-if="isDetailShow" :is-show="isDetailShow" :item="currRow" :close="handleDetailShow"></IotDataDetail>
|
|
|
+ <IotDataDetail v-if="isDetailShow" :is-show="isDetailShow" :item="currRow" :curr-category="currCategory" :close="handleDetailShow"></IotDataDetail>
|
|
|
+
|
|
|
+ <CesiumMap v-if="isMapShow"
|
|
|
+ :is-show="isMapShow"
|
|
|
+ :item="mapUrl"
|
|
|
+ :extra-params="extraParams"
|
|
|
+ :type="mapType"
|
|
|
+ :close="()=>{this.isMapShow=false}">
|
|
|
+ </CesiumMap>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import api from '@/api/data/IotData'
|
|
|
import IotDataDetail from "@/components/dataManage/dataDetail/IotDataDetail";
|
|
|
import CategoryMenu from "@/components/dataManage/CategoryMenu";
|
|
|
+import CesiumMap from "@/components/map/CesiumMap.vue";
|
|
|
|
|
|
export default {
|
|
|
data() {
|
|
|
@@ -126,14 +136,23 @@ export default {
|
|
|
total: 0,
|
|
|
},
|
|
|
|
|
|
- currCategory: '',
|
|
|
+ currCategory: {
|
|
|
+ id: ''
|
|
|
+ },
|
|
|
|
|
|
isDetailShow: false,
|
|
|
+
|
|
|
+ isAllView: false,
|
|
|
+ isMapShow: false,
|
|
|
+ mapUrl: '',
|
|
|
+ extraParams: {},
|
|
|
+ mapType: 33,
|
|
|
}
|
|
|
},
|
|
|
components: {
|
|
|
IotDataDetail,
|
|
|
CategoryMenu,
|
|
|
+ CesiumMap,
|
|
|
},
|
|
|
created() {
|
|
|
let userInfo = this.$store.state.userInfo;
|
|
|
@@ -158,7 +177,7 @@ export default {
|
|
|
app.pageInfo.page = 1;
|
|
|
}, 50)
|
|
|
},
|
|
|
- "currCategory": function () {
|
|
|
+ "currCategory.id": function () {
|
|
|
this.resetCategory();
|
|
|
this.getData();
|
|
|
}
|
|
|
@@ -183,12 +202,12 @@ export default {
|
|
|
},
|
|
|
getData() {
|
|
|
let app = this;
|
|
|
- if (!(app.currCategory && app.currCategory!=='')) {
|
|
|
+ if (app.currCategory && (!app.currCategory.id || app.currCategory.id==='')) {
|
|
|
return;
|
|
|
}
|
|
|
app.tableData = [];
|
|
|
let params = {
|
|
|
- menuId: app.currCategory,
|
|
|
+ menuId: app.currCategory.id,
|
|
|
page: app.pageInfo.page,
|
|
|
pageSize: app.pageInfo.pageSize,
|
|
|
}
|
|
|
@@ -198,6 +217,7 @@ export default {
|
|
|
if (res.code === 200) {
|
|
|
app.pageInfo.total = res.total;
|
|
|
app.tableData = res.content
|
|
|
+ app.isAllView = res.total>0 && res.content[0].menuNameTwo==='视频点位';
|
|
|
}
|
|
|
app.handleLoading(false)
|
|
|
}).catch(err => {
|
|
|
@@ -228,7 +248,8 @@ export default {
|
|
|
// 批量删除数据
|
|
|
batchDelete() {
|
|
|
let app = this;
|
|
|
- if (!this.selectedRows) {
|
|
|
+ if (!this.selectedRows || this.selectedRows.length===0) {
|
|
|
+ app.$message({message:'请选择数据', type: 'warning'})
|
|
|
return;
|
|
|
}
|
|
|
let ids = this.selectedRows.map(i=> {return i.id}).join(',');
|
|
|
@@ -263,7 +284,7 @@ export default {
|
|
|
editData(item) {
|
|
|
let app = this;
|
|
|
let params = {
|
|
|
- latlonDataId: item.id
|
|
|
+ IOTDataId: item.id
|
|
|
}
|
|
|
app.$util.loading.handleLoading(true);
|
|
|
api.getDataById(params).then(res=>{
|
|
|
@@ -297,6 +318,12 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
+ handleAllGltfView() {
|
|
|
+ this.mapUrl = this.$constant.dtbserverProxy+'/iotData/selectIOTDataData?page=0&pageSize=9999&menuId='+this.currCategory.id;
|
|
|
+ this.extraParams.lon = this.tableData[0].lon
|
|
|
+ this.extraParams.lat = this.tableData[0].lat
|
|
|
+ this.isMapShow = true;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|