|
@@ -16,22 +16,26 @@
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<el-button type="primary" @click="downloadSceneData"
|
|
|
- >下载MP场景数据</el-button>
|
|
|
+ >下载MP场景数据</el-button
|
|
|
+ >
|
|
|
</el-row>
|
|
|
<!-- 生成大场景someData -->
|
|
|
<el-row type="flex" class="addScene">
|
|
|
- <el-button type="primary">下载四维看看场景数据</el-button>
|
|
|
- <el-button type="primary">下载大场景数据</el-button>
|
|
|
- <el-button type="warning" style="margin-right: 20px" @click="logout">登出</el-button>
|
|
|
- <!-- <el-input placeholder="输入编码生成someData" v-model="url">
|
|
|
- <template slot="append">
|
|
|
- <a :href="'/getSomeData?url=https://my.matterportvr.cn/api/player/models/'+url+'/?format=json'" target="_block">生成</a>
|
|
|
- </template>
|
|
|
- </el-input> -->
|
|
|
+ <el-button type="primary" @click="handModelDownload(mutiTargetObj,'age')"
|
|
|
+ >下载四维看看场景数据</el-button
|
|
|
+ >
|
|
|
+ <el-button type="primary" @click="handModelDownload(mutiTargetObj,'bigScene')" >下载大场景数据</el-button>
|
|
|
+ <el-button type="warning" style="margin-right: 20px" @click="logout"
|
|
|
+ >登出</el-button
|
|
|
+ >
|
|
|
</el-row>
|
|
|
</el-row>
|
|
|
<!-- 表格 -->
|
|
|
- <el-table :data="scenes" style="width: 100%" @selection-change="handleSelectionChange">
|
|
|
+ <el-table
|
|
|
+ :data="scenes"
|
|
|
+ style="width: 100%"
|
|
|
+ @selection-change="handleSelectionChange"
|
|
|
+ >
|
|
|
<el-table-column type="selection" width="50"></el-table-column>
|
|
|
<el-table-column type="index" width="50" label="序号"></el-table-column>
|
|
|
<el-table-column prop="sceneTitle" width="200" label="场景名称">
|
|
@@ -61,10 +65,10 @@
|
|
|
<el-table-column fixed="right" label="操作" width="200">
|
|
|
<template slot-scope="scope">
|
|
|
<a :href="scope.row.webSite" target="_blank">查看</a>
|
|
|
- <a @click="handModelDownload(scope.row,'obj')">模型下载</a>
|
|
|
- <a @click="handModelUpload(scope.row,'obj')">模型上传</a>
|
|
|
- <a @click="handModelDownload(scope.row,'pano')">全景图下载</a>
|
|
|
- <a @click="handModelUpload(scope.row,'pano')">全景图上传</a>
|
|
|
+ <a @click="handModelDownload(scope.row, 'obj')">模型下载</a>
|
|
|
+ <a @click="handModelUpload(scope.row, 'obj')">模型上传</a>
|
|
|
+ <a @click="handModelDownload(scope.row, 'pano')">全景图下载</a>
|
|
|
+ <a @click="handModelUpload(scope.row, 'pano')">全景图上传</a>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -178,6 +182,7 @@ export default {
|
|
|
uploadUrl: "",
|
|
|
fullscreenLoading: false,
|
|
|
targetObj: null,
|
|
|
+ mutiTargetObj:[],
|
|
|
manage_scene_status: MANAGE_SCENE_STATUS,
|
|
|
dialogFormVisible: false,
|
|
|
dialogFilesVisible: false,
|
|
@@ -207,8 +212,10 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 处理勾选
|
|
|
handleSelectionChange(val) {
|
|
|
console.log("val", val);
|
|
|
+ this.mutiTargetObj = val;
|
|
|
},
|
|
|
handleRemove(file) {
|
|
|
let index = this.fileList.findIndex((item) => {
|
|
@@ -312,24 +319,45 @@ export default {
|
|
|
this.total = res.data.total;
|
|
|
this.currentPage = res.data.pageNum;
|
|
|
},
|
|
|
- //模型下载 全景下载
|
|
|
+ //模型下载 全景下载 下载四维看看数据 下载大场景数据
|
|
|
async handModelDownload(item,type) {
|
|
|
console.log("item", item,'type',type);
|
|
|
- this.fullscreenLoading = true;
|
|
|
- let res = await this.$http.get(
|
|
|
- `/manage/scene/download/${type}/${item.sceneCode}`,{ params: { code: item.sceneCode } });
|
|
|
- this.fullscreenLoading = false;
|
|
|
- if (res && res["code"] === 0) {
|
|
|
- window.open(`http://${res["data"]}`);
|
|
|
- } else {}
|
|
|
+ if(!Array.isArray(item)){
|
|
|
+ this.fullscreenLoading = true;
|
|
|
+ try{
|
|
|
+ let res = await this.$http.get(`/manage/scene/download/${type}/${item.sceneCode}`,{ params: { code: item.sceneCode } });
|
|
|
+ this.fullscreenLoading = false;
|
|
|
+ if (res && res["code"] === 0) {
|
|
|
+ window.open(`http://${res["data"]}`);
|
|
|
+ } else {}
|
|
|
+ }
|
|
|
+ catch(e){
|
|
|
+ this.fullscreenLoading = false;
|
|
|
+ console.log('e',e)
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ let target = item;
|
|
|
+ if(target.length === 0) {
|
|
|
+ this.$message('请勾选选项');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ target.forEach(item=>{
|
|
|
+ this.$http.get(`/manage/scene/download/${type}/${item.sceneCode}`,{ params: { code: item.sceneCode } }).then(res=>{
|
|
|
+ if (res && res["code"] === 0) {
|
|
|
+ window.open(`http://${res["data"]}`);
|
|
|
+ } else {}
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
handModelUpload(item,type) {
|
|
|
this.dialogFilesVisible = true;
|
|
|
this.targetObj = {...item,uploadType:type};
|
|
|
this.fileList = [];
|
|
|
},
|
|
|
- handPanoramaDownload() {},
|
|
|
- handPanoramaUpload() {},
|
|
|
async delScene(name) {
|
|
|
if (confirm("删除后将无法恢复!你确定要删除这个场景吗?")) {
|
|
|
await this.$http.get(`/manage/scene/removes/${name}`);
|