xushiting %!s(int64=4) %!d(string=hai) anos
pai
achega
5c0050cbc6
Modificáronse 3 ficheiros con 4 adicións e 200 borrados
  1. 0 197
      components/upload-Pointclound/index.js
  2. 2 2
      index.html
  3. 2 1
      main.js

+ 0 - 197
components/upload-Pointclound/index.js

@@ -1,197 +0,0 @@
-(() => {
-    Vue.component('uploadPointclound', {
-        props: [],
-        name: 'uploadPointclound',
-        template: `<div id="uploadBox" >
-                    <div class="headerBack">
-                        <div class="topBox">
-                            <i class="backIcon" @click="back"></i>
-                            <p class="headerTitle">添加数据集</p>
-                        </div>
-                    </div>
-                    
-                    <div class="selectBox">
-                        <el-select v-model="value" filterable @click.native="options = dataList" :filter-method="searchScene" placeholder="请选择">
-                            <el-option v-for="item in options" :key="item.id" :label="item.title" :value="item.id">
-                                <div class="sceneName">
-                                    <p class="code">{{item.title}}</p>
-                                    <span class="name">数据集:{{item.id}}</span>
-                                </div>
-
-                            </el-option>
-                        </el-select>
-
-                    </div>
-                    <div class="uploadBtn" @click="openUpload" :class="{disabled:value==''}">
-                        <i class="fa fa-plus ng-scope"></i>&nbsp;&nbsp;添加到场景
-                    </div>
-
-                    <p class="itemTitle">已添加的数据集 </p>
-                    <div class="listBox">
-                        <ul class="sceneList">
-                            <li class="sceneItem" v-for="i in hasList">
-                                <div class="sceneName">
-                                    <p class="code">{{i.sceneNum}}</p>
-                                    <span class="name">来自场景:{{i.title}}</span>
-                                </div>
-                                <div class="scene_control">
-                                   
-
-                                    <el-popconfirm placement="top" title="是否要删除该数据集?" :hide-icon="true" @confirm="delConfirm(i.id)">
-                                        <el-button class="delBtn" title="删除" slot="reference"></el-button>
-                                    </el-popconfirm>
-                                    <!-- <div class="delBtn" title="删除"></div> -->
-                                </div>
-                            </li>
-                        </ul>
-                    </div>
-
-                </div>`,
-        data() {
-            return {
-                dataList: [],
-                options: [],
-                hasList: [],
-                value: '',
-            }
-        },
-        methods: {
-
-            getSceneData() {
-                let params = {
-                    "pageNum": 0,
-                    "pageSize": 999,
-                    "searchKey": "",
-                }
-
-                axios({
-                    url: '/indoor/scene/list',
-                    method: 'post',
-                    data: params
-                }).then(res => {
-                    console.log(res)
-                    this.dataList = res.data.data.content
-                    this.options = res.data.data.content
-                }).catch(err => {
-
-                })
-            },
-            getHasSceneList() {
-                axios({
-                    url: `/indoor/${sceneNum}/api/merge/exist`,
-                    method: 'get',
-                }).then(res => {
-                    if (res.data.code == 0) {
-                        this.hasList = res.data.data
-                    }
-                }).catch(err => {
-
-                })
-            },
-            searchScene(e) {
-                console.log(e)
-                let res = this.dataList.filter(i => {
-                    if (i.id.indexOf(e) != -1 || i.title.indexOf(e) != -1) {
-                        return i
-                    }
-                })
-                console.log(res)
-                this.options = res
-
-            },
-            openUpload() {
-                // 
-
-                this.$parent.showLoading('上传中...')
-                let res = this.hasList.filter(i => {
-                    console.log(i.sceneNum)
-                    if (this.value == i.sceneNum) {
-                        return i
-                    }
-                })
-                if (res.length > 0) {
-                    this.$parent.hideLoading()
-                    this.$message({
-                        message: '请勿重复添加数据集',
-                        type: 'error',
-                        duration: 2000,
-                    });
-                    return
-
-                }
-
-                axios.post(`/indoor/${sceneNum}/api/merge/${this.value}`).then(res => {
-                    this.$parent.hideLoading()
-                    this.value = ''
-                    if (res.data.code == 0) {
-                        this.getHasSceneList()
-                        this.$message({
-                            message: '数据集添加成功',
-                            type: 'success',
-                            duration: 2000,
-                        });
-                        IV.api.AuthenticationService.sendAuthenticationChanged()
-                    } else {
-                        this.$message({
-                            message: '数据集添加失败',
-                            type: 'error',
-                            duration: 2000,
-                        });
-                    }
-
-                }).catch(err => {
-                    this.value = ''
-                    this.$parent.hideLoading()
-                    this.$message({
-                        message: '数据集添加失败',
-                        type: 'error',
-                        duration: 2000,
-                    });
-
-                })
-
-
-            },
-            delConfirm(id) {
-                axios({
-                    // url: `/indoor/${sceneNum}/api/merge/exist`,
-                    url: `/indoor/${sceneNum}/api/merge/remove/${id}`,
-                    method: 'get',
-                }).then(res => {
-                    if (res.data.code == 0) {
-                        this.getHasSceneList()
-                        this.$message({
-                            message: '数据集删除成功',
-                            type: 'success',
-                            duration: 2000,
-                        });
-                        IV.api.AuthenticationService.sendAuthenticationChanged()
-                    }
-                }).catch(err => {
-
-                })
-            },
-            back() {
-                this.$parent.showType = 0
-            }
-
-        },
-        computed: {
-
-        },
-        destroyed() {
-
-        },
-        mounted() {
-            // window.eventBus.off('openMap', openMap);
-            // window.eventBus.on('openMap', openMap);
-
-            // function openMap() {
-            //     IV.swapScenes()
-            // }
-
-            this.getSceneData()
-            this.getHasSceneList()
-        },
-    })
-})();

+ 2 - 2
index.html

@@ -23,8 +23,8 @@
 <script type="text/javascript">
     const ossPrefix = 'https://laser.4dkankan.com/data/';
     const ossPrefixDep = 'https://laser.4dkankan.com/public/';
-    const sceneNum = '@replace';
-    //const sceneNum = 't-vZkqRV8';
+    //const sceneNum = '@replace';
+    const sceneNum = 't-vZkqRV8';
     // const sceneNum = 't-iksBApb';
 </script>
 <script src="./bus/bus.js"></script>

+ 2 - 1
main.js

@@ -52888,6 +52888,7 @@ and limitations under the License.
         
            let matchingUrls = [
                'api/images',
+               'api/site_model',
                'api/site_model/within',
                'api/site_model/within_polygon',
                'api/search/site_model',
@@ -152995,7 +152996,7 @@ and limitations under the License.
                        else if(a.indexOf('/poi/icon')>-1||a.indexOf('/poi/image')>-1){
                           a = '../../indoor/'+sceneNum+a.substring(a.indexOf('/poi/'));
                        }
-                               else if(a.indexOf('/api/jobs')>-1||a.indexOf('/api/site_model/validate')>-1||a.indexOf('/api/pointcloud/crop')>-1||a.indexOf('/api/newmeasurements')>-1||a.indexOf('/api/datasets')>-1||a.indexOf('/api/site_model/within_polygon')>-1||a.indexOf('/api/pois')>-1||a.indexOf('/api/poi_types')>-1||a.indexOf('/api/poi_type_groups')>-1||a.indexOf('/api/auth/token')>-1){
+                               else if(a.indexOf('/api/site_model')>-1||a.indexOf('/api/jobs')>-1||a.indexOf('/api/site_model/validate')>-1||a.indexOf('/api/pointcloud/crop')>-1||a.indexOf('/api/newmeasurements')>-1||a.indexOf('/api/datasets')>-1||a.indexOf('/api/site_model/within_polygon')>-1||a.indexOf('/api/pois')>-1||a.indexOf('/api/poi_types')>-1||a.indexOf('/api/poi_type_groups')>-1||a.indexOf('/api/auth/token')>-1){
                                    a = '../../indoor/'+sceneNum+a.substring(a.indexOf('/api/'));
                                }
                                y.open(o, a, !0),