|
@@ -5,11 +5,11 @@
|
|
<div class="base-info">
|
|
<div class="base-info">
|
|
<span>关键词:</span>
|
|
<span>关键词:</span>
|
|
<el-input
|
|
<el-input
|
|
- @keyup.enter.native="currentPage=1&&_getSceneData()"
|
|
|
|
|
|
+ @keyup.enter.native="()=>{currentPage=1;_getSceneData()}"
|
|
v-model="searchKey"
|
|
v-model="searchKey"
|
|
placeholder="关键词"
|
|
placeholder="关键词"
|
|
></el-input>
|
|
></el-input>
|
|
- <el-button type="primary" @click="currentPage=1&&_getSceneData()" color="red">搜索</el-button>
|
|
|
|
|
|
+ <el-button type="primary" @click="()=>{currentPage=1;_getSceneData()}" color="red">搜索</el-button>
|
|
<span style="margin-left:10px;">SN码:</span>
|
|
<span style="margin-left:10px;">SN码:</span>
|
|
<el-input
|
|
<el-input
|
|
@keyup.enter.native="getSceneBySN"
|
|
@keyup.enter.native="getSceneBySN"
|
|
@@ -17,10 +17,11 @@
|
|
placeholder="输入SN码下载场景数据"
|
|
placeholder="输入SN码下载场景数据"
|
|
></el-input>
|
|
></el-input>
|
|
<el-button type="primary" @click="getSceneBySN" color="red">下载场景数据</el-button>
|
|
<el-button type="primary" @click="getSceneBySN" color="red">下载场景数据</el-button>
|
|
|
|
+
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- 全部 -->
|
|
<!-- 全部 -->
|
|
- <div class="scene-management_bottom" v-if="tabIndex==0">
|
|
|
|
|
|
+ <div class="scene-management_bottom">
|
|
<div class="order-management-table">
|
|
<div class="order-management-table">
|
|
<div class="scene-management_tab">
|
|
<div class="scene-management_tab">
|
|
<ul>
|
|
<ul>
|
|
@@ -37,10 +38,12 @@
|
|
>/</span>
|
|
>/</span>
|
|
</li>
|
|
</li>
|
|
</ul>
|
|
</ul>
|
|
- <!-- <div style="float: right;vertical-align: middle;">
|
|
|
|
- <el-button type="primary" icon="el-icon-upload" @click="" color='red'>恢复</el-button>
|
|
|
|
- <el-button type="danger" icon="el-icon-delete" @click="" color='red'>删除</el-button>
|
|
|
|
- </div>-->
|
|
|
|
|
|
+ <div style="float: right;vertical-align: middle;">
|
|
|
|
+ <el-button type="primary" @click="openTransfer" color="red">迁移</el-button>
|
|
|
|
+ <el-button type="success" @click="downloadMultipleScene" color="red">下载</el-button>
|
|
|
|
+ <el-button type="danger" @click="_deleMultipleScene" color="red">删除</el-button>
|
|
|
|
+
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<el-table
|
|
<el-table
|
|
@@ -49,7 +52,12 @@
|
|
class="e-table"
|
|
class="e-table"
|
|
:data="scenes"
|
|
:data="scenes"
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
|
|
+ @selection-change="handleSelectionChange"
|
|
>
|
|
>
|
|
|
|
+ <el-table-column
|
|
|
|
+ type="selection"
|
|
|
|
+ width="55">
|
|
|
|
+ </el-table-column>
|
|
<el-table-column label="场景封面" width="120">
|
|
<el-table-column label="场景封面" width="120">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<a :href="scope.row.webSite" target="_blank" style="cursor: pointer;">
|
|
<a :href="scope.row.webSite" target="_blank" style="cursor: pointer;">
|
|
@@ -89,7 +97,7 @@
|
|
<el-table-column prop="sceneType" label="平台展示">
|
|
<el-table-column prop="sceneType" label="平台展示">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-switch
|
|
<el-switch
|
|
- @change="_updateSceneStatus(scope.row.id,scope.row.status)"
|
|
|
|
|
|
+ @change="_updateSceneStatus(scope.row.num,scope.row.status)"
|
|
v-model="scope.row.statusBoo"
|
|
v-model="scope.row.statusBoo"
|
|
active-color="#13ce66"
|
|
active-color="#13ce66"
|
|
inactive-color="#ff4949"
|
|
inactive-color="#ff4949"
|
|
@@ -104,7 +112,7 @@
|
|
@click="_showDownloadSelect(scope.row.num);"
|
|
@click="_showDownloadSelect(scope.row.num);"
|
|
class="download_btn"
|
|
class="download_btn"
|
|
>下载</el-button>
|
|
>下载</el-button>
|
|
- <el-button type="text" @click="_deleScene(scope.row.id)" class="delete_btn">删除</el-button>
|
|
|
|
|
|
+ <el-button type="text" @click="_deleScene(scope.row.num)" class="delete_btn">删除</el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -119,172 +127,26 @@
|
|
></el-pagination>
|
|
></el-pagination>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <!-- 展示中 -->
|
|
|
|
- <div class="scene-management_bottom" v-if="tabIndex==1">
|
|
|
|
- <div class="order-management-table">
|
|
|
|
- <div class="scene-management_tab">
|
|
|
|
- <ul>
|
|
|
|
- <li
|
|
|
|
- v-for="(item,index) in tabs"
|
|
|
|
- :key="index"
|
|
|
|
- :class="{'scene-management_tab_li_active':item.idx==tabIndex}"
|
|
|
|
- @click="clickTabItem(item.idx)"
|
|
|
|
- >
|
|
|
|
- {{item.name}}
|
|
|
|
- <span
|
|
|
|
- v-if="item.idx != -2"
|
|
|
|
- style="margin:0 10px;color: #999;font-weight: normal;"
|
|
|
|
- >/</span>
|
|
|
|
- </li>
|
|
|
|
- </ul>
|
|
|
|
- <!-- <div style="float: right;vertical-align: middle;">
|
|
|
|
- <el-button type="primary" icon="el-icon-upload" @click="" color='red'>恢复</el-button>
|
|
|
|
- <el-button type="danger" icon="el-icon-delete" @click="" color='red'>删除</el-button>
|
|
|
|
- </div>-->
|
|
|
|
- </div>
|
|
|
|
- <el-table
|
|
|
|
- key="order_table1"
|
|
|
|
- ref="order_table1"
|
|
|
|
- class="e-table"
|
|
|
|
- :data="scenes"
|
|
|
|
- style="width: 100%"
|
|
|
|
- >
|
|
|
|
- <el-table-column label="场景封面" width="120">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <a :href="scope.row.webSite" target="_blank" style="cursor: pointer;">
|
|
|
|
- <img :src="scope.row.thumb" width="100%" height />
|
|
|
|
- </a>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column prop="sceneType" label="分类"></el-table-column>
|
|
|
|
- <el-table-column prop="sceneName" width="200" label="标题"></el-table-column>
|
|
|
|
- <el-table-column label="拍摄时间" width="200">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <div>{{new Date(scope.row.createTime).format('yyyy-MM-dd hh:mm:ss')}}</div>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column label="经纬度" width="200">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <div v-if="scope.row.longitude">经度:{{scope.row.longitude}}</div>
|
|
|
|
- <div v-if="scope.row.latitude">维度:{{scope.row.latitude }}</div>
|
|
|
|
- <span v-if="!scope.row.latitude&&!scope.row.longitude">/</span>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column prop="childName" width="150" label="设备ID"></el-table-column>
|
|
|
|
- <el-table-column prop="userName" width="150" label="用户名"></el-table-column>
|
|
|
|
- <el-table-column prop="scenekey" label="权限"></el-table-column>
|
|
|
|
- <el-table-column prop="viewCount" label="浏览数"></el-table-column>
|
|
|
|
- <el-table-column prop="sceneType" label="平台展示">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <el-switch
|
|
|
|
- @change="_updateSceneStatus(scope.row.id,scope.row.status)"
|
|
|
|
- v-model="scope.row.statusBoo"
|
|
|
|
- active-color="#13ce66"
|
|
|
|
- inactive-color="#ff4949"
|
|
|
|
- ></el-switch>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column prop="status" label="操作">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <el-button type="text" @click="_deleScene(scope.row.id)" class="delete_btn">删除</el-button>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- </el-table>
|
|
|
|
- </div>
|
|
|
|
- <div class="order-management-pagination">
|
|
|
|
- <el-pagination
|
|
|
|
- @current-change="handleCurrentChange"
|
|
|
|
- :current-page.sync="currentPage"
|
|
|
|
- :page-size="10"
|
|
|
|
- layout="total, prev, pager, next, jumper"
|
|
|
|
- :total="total"
|
|
|
|
- ></el-pagination>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <!-- 已隐藏 -->
|
|
|
|
- <div class="scene-management_bottom" v-if="tabIndex==-2">
|
|
|
|
- <div class="order-management-table">
|
|
|
|
- <div class="scene-management_tab">
|
|
|
|
- <ul>
|
|
|
|
- <li
|
|
|
|
- v-for="(item,index) in tabs"
|
|
|
|
- :key="index"
|
|
|
|
- :class="{'scene-management_tab_li_active':item.idx==tabIndex}"
|
|
|
|
- @click="clickTabItem(item.idx)"
|
|
|
|
- >
|
|
|
|
- {{item.name}}
|
|
|
|
- <span
|
|
|
|
- v-if="item.idx != -2"
|
|
|
|
- style="margin:0 10px;color: #999;font-weight: normal;"
|
|
|
|
- >/</span>
|
|
|
|
- </li>
|
|
|
|
- </ul>
|
|
|
|
- <!-- <div style="float: right;vertical-align: middle;">
|
|
|
|
- <el-button type="primary" icon="el-icon-upload" @click="" color='red'>恢复</el-button>
|
|
|
|
- <el-button type="danger" icon="el-icon-delete" @click="" color='red'>删除</el-button>
|
|
|
|
- </div>-->
|
|
|
|
- </div>
|
|
|
|
- <el-table
|
|
|
|
- key="order_table2"
|
|
|
|
- ref="order_table2"
|
|
|
|
- class="e-table"
|
|
|
|
- :data="scenes"
|
|
|
|
- style="width: 100%"
|
|
|
|
- >
|
|
|
|
- <el-table-column label="场景封面" width="120">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <a :href="scope.row.webSite" target="_blank" style="cursor: pointer;">
|
|
|
|
- <img :src="scope.row.thumb" width="100%" height />
|
|
|
|
- </a>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column prop="sceneType" label="分类"></el-table-column>
|
|
|
|
- <el-table-column prop="sceneName" width="200" label="标题"></el-table-column>
|
|
|
|
- <el-table-column label="拍摄时间" width="200">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <div>{{new Date(scope.row.createTime).format('yyyy-MM-dd hh:mm:ss')}}</div>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column label="经纬度" width="200">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <div v-if="scope.row.longitude">经度:{{scope.row.longitude}}</div>
|
|
|
|
- <div v-if="scope.row.latitude">维度:{{scope.row.latitude }}</div>
|
|
|
|
- <span v-if="!scope.row.latitude&&!scope.row.longitude">/</span>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column prop="childName" width="150" label="设备ID"></el-table-column>
|
|
|
|
- <el-table-column prop="userName" width="150" label="用户名"></el-table-column>
|
|
|
|
- <el-table-column prop="scenekey" label="权限"></el-table-column>
|
|
|
|
- <el-table-column prop="viewCount" label="浏览数"></el-table-column>
|
|
|
|
- <el-table-column prop="sceneType" label="平台展示">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <el-switch
|
|
|
|
- @change="_updateSceneStatus(scope.row.id,scope.row.status)"
|
|
|
|
- v-model="scope.row.statusBoo"
|
|
|
|
- active-color="#13ce66"
|
|
|
|
- inactive-color="#ff4949"
|
|
|
|
- ></el-switch>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column prop="status" label="操作">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <el-button type="text" @click="_deleScene(scope.row.id)" class="delete_btn">删除</el-button>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- </el-table>
|
|
|
|
- </div>
|
|
|
|
- <div class="order-management-pagination">
|
|
|
|
- <el-pagination
|
|
|
|
- @current-change="handleCurrentChange"
|
|
|
|
- :current-page.sync="currentPage"
|
|
|
|
- :page-size="10"
|
|
|
|
- layout="total, prev, pager, next, jumper"
|
|
|
|
- :total="total"
|
|
|
|
- ></el-pagination>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
+ <el-dialog width="450px" title="迁移场景" :visible.sync="dialogTransferVisible">
|
|
|
|
+ <el-form >
|
|
|
|
+ <el-form-item label="当前SN码:" width="100%">
|
|
|
|
+ <div style="max-height:300px;overflow: auto;">
|
|
|
|
+ <p v-for="(item,i) in multipleSelection" :key="i">{{item.snCode||item.childName}}</p>
|
|
|
|
+ </div>
|
|
|
|
+ </el-form-item>
|
|
|
|
+
|
|
|
|
+ <el-form-item label="迁往SN码:" width="100%">
|
|
|
|
+ <el-input v-model="transferSN"></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
|
+ <el-button @click="dialogTransferVisible = false">取 消</el-button>
|
|
|
|
+ <el-button type="primary" @click="transferScene">确 定</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </el-dialog>
|
|
|
|
+
|
|
<el-dialog
|
|
<el-dialog
|
|
width="500px"
|
|
width="500px"
|
|
title="场景下载"
|
|
title="场景下载"
|
|
@@ -339,8 +201,8 @@ const _sceneTypeName = {
|
|
}
|
|
}
|
|
|
|
|
|
// const serverName = 'https://test.4dkankan.com'
|
|
// const serverName = 'https://test.4dkankan.com'
|
|
-// const serverName = 'http://192.168.0.208:8887'
|
|
|
|
-const serverName = 'https://www.4dage.com'
|
|
|
|
|
|
+const serverName = 'http://192.168.0.28:8887'
|
|
|
|
+// const serverName = 'https://www.4dage.com'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
data () {
|
|
data () {
|
|
@@ -357,6 +219,7 @@ export default {
|
|
timer: 0
|
|
timer: 0
|
|
},
|
|
},
|
|
downloadDialogVisible: false,
|
|
downloadDialogVisible: false,
|
|
|
|
+ dialogTransferVisible: false,
|
|
progressColor: '#09e1c0',
|
|
progressColor: '#09e1c0',
|
|
tabs: [
|
|
tabs: [
|
|
{ name: '全部', idx: 0 },
|
|
{ name: '全部', idx: 0 },
|
|
@@ -381,7 +244,9 @@ export default {
|
|
tabIndex: 0,
|
|
tabIndex: 0,
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
value2: true,
|
|
value2: true,
|
|
- downloadOptions: {}
|
|
|
|
|
|
+ multipleSelection: '',
|
|
|
|
+ downloadOptions: {},
|
|
|
|
+ transferSN: ''
|
|
}
|
|
}
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
@@ -397,12 +262,15 @@ export default {
|
|
this.fullscreenLoading = true
|
|
this.fullscreenLoading = true
|
|
await this.$http.post('/manager/scene/updateSceneType', {
|
|
await this.$http.post('/manager/scene/updateSceneType', {
|
|
sceneType: item.sceneType,
|
|
sceneType: item.sceneType,
|
|
- sceneId: item.id
|
|
|
|
|
|
+ sceneNum: item.num
|
|
})
|
|
})
|
|
|
|
|
|
this._getSceneData()
|
|
this._getSceneData()
|
|
this.fullscreenLoading = false
|
|
this.fullscreenLoading = false
|
|
},
|
|
},
|
|
|
|
+ handleSelectionChange (val) {
|
|
|
|
+ this.multipleSelection = val
|
|
|
|
+ },
|
|
|
|
|
|
handleCurrentChange (val) {
|
|
handleCurrentChange (val) {
|
|
let page = val
|
|
let page = val
|
|
@@ -419,10 +287,38 @@ export default {
|
|
this.total = 0
|
|
this.total = 0
|
|
this.hasClickSearch = false
|
|
this.hasClickSearch = false
|
|
this.currentPage = 0
|
|
this.currentPage = 0
|
|
- this.$refs.searchKey.currentValue = this.key_input = ''
|
|
|
|
|
|
+ this.$refs.searchKey = this.key_input = ''
|
|
this._getSceneData(1)
|
|
this._getSceneData(1)
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ async downloadMultipleScene () {
|
|
|
|
+ if (!this.multipleSelection && this.multipleSelection.length === 0) {
|
|
|
|
+ return this.$alert('请选择场景', '提示', {
|
|
|
|
+ confirmButtonText: '确定'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ let arr = []
|
|
|
|
+ arr = this.multipleSelection.map((item) => item.num)
|
|
|
|
+ this.fullscreenLoading = true
|
|
|
|
+
|
|
|
|
+ this.$confirm(`此操作将下载您选择的${arr.length}个场景, 是否继续?`, '提示', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ })
|
|
|
|
+ .then(() => {
|
|
|
|
+ this._downloadScene('', arr, this.downloadOptions.isTiles)
|
|
|
|
+ })
|
|
|
|
+ .catch(() => {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'info',
|
|
|
|
+ message: '已取消'
|
|
|
|
+ })
|
|
|
|
+ this.fullscreenLoading = false
|
|
|
|
+ })
|
|
|
|
+ console.log(arr)
|
|
|
|
+ },
|
|
|
|
+
|
|
async getSceneBySN () {
|
|
async getSceneBySN () {
|
|
if (!this.snKey) {
|
|
if (!this.snKey) {
|
|
return
|
|
return
|
|
@@ -461,6 +357,38 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ openTransfer () {
|
|
|
|
+ if (!this.multipleSelection && this.multipleSelection.length === 0) {
|
|
|
|
+ return this.$alert('请选择场景', '提示', {
|
|
|
|
+ confirmButtonText: '确定'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ this.dialogTransferVisible = true
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ async transferScene () {
|
|
|
|
+ let sceneNumArr = this.multipleSelection.map(item => {
|
|
|
|
+ return item.num
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ let res = await this.$http.post('/manager/scene/moveScene', {
|
|
|
|
+ snCode: this.transferSN,
|
|
|
|
+ sceneNum: sceneNumArr.join(',')
|
|
|
|
+ })
|
|
|
|
+ if (res.code === 0) {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'success',
|
|
|
|
+ message: '迁移成功!'
|
|
|
|
+ })
|
|
|
|
+ this._getSceneData()
|
|
|
|
+ } else {
|
|
|
|
+ this.$alert(`迁移失败,${res.msg}`, '提示', {
|
|
|
|
+ confirmButtonText: '确定'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ this.dialogTransferVisible = false
|
|
|
|
+ },
|
|
|
|
+
|
|
async _getSceneData () {
|
|
async _getSceneData () {
|
|
this.fullscreenLoading = true
|
|
this.fullscreenLoading = true
|
|
let status = this.tabIndex === 0 ? null : this.tabIndex
|
|
let status = this.tabIndex === 0 ? null : this.tabIndex
|
|
@@ -503,7 +431,7 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
this.scenes = temp
|
|
this.scenes = temp
|
|
- this.total = res.data.total ? res.data.total : this.total
|
|
|
|
|
|
+ this.total = res.data.total
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
|
|
@@ -530,7 +458,7 @@ export default {
|
|
this.fullscreenLoading = true
|
|
this.fullscreenLoading = true
|
|
await this.$http.post('/manager/scene/updateStatus', {
|
|
await this.$http.post('/manager/scene/updateStatus', {
|
|
type: tempStatus,
|
|
type: tempStatus,
|
|
- sceneId: num
|
|
|
|
|
|
+ sceneNum: num
|
|
})
|
|
})
|
|
|
|
|
|
this._getSceneData()
|
|
this._getSceneData()
|
|
@@ -571,7 +499,8 @@ export default {
|
|
let temp = []
|
|
let temp = []
|
|
res.forEach(ele => {
|
|
res.forEach(ele => {
|
|
if (ele && ele.code === 0) {
|
|
if (ele && ele.code === 0) {
|
|
- ele.data.sceneScheme = 1 // 禁止本地端放大缩小
|
|
|
|
|
|
+ this.$http.get(`/scene/addDownloadNum?sceneNum=${ele.data.num}&t=${new Date().getTime()}`)
|
|
|
|
+ ele.data.sceneScheme = ele.data.sceneScheme === 11 ? 2 : 1 // 禁止本地端放大缩小
|
|
temp.push({
|
|
temp.push({
|
|
sceneCode: ele.data.num,
|
|
sceneCode: ele.data.num,
|
|
sceneInfo: JSON.stringify(ele)
|
|
sceneInfo: JSON.stringify(ele)
|
|
@@ -581,7 +510,6 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
|
|
- console.log('------temp----', temp)
|
|
|
|
if (temp.length <= 0) {
|
|
if (temp.length <= 0) {
|
|
this.downloadDialogVisible = false
|
|
this.downloadDialogVisible = false
|
|
this.fullscreenLoading = false
|
|
this.fullscreenLoading = false
|
|
@@ -592,12 +520,18 @@ export default {
|
|
}
|
|
}
|
|
|
|
|
|
let snCode = SNCode ? ('SN_' + SNCode) : temp[0].sceneCode
|
|
let snCode = SNCode ? ('SN_' + SNCode) : temp[0].sceneCode
|
|
|
|
+ let version = ''
|
|
|
|
+ try {
|
|
|
|
+ console.log(JSON.parse(temp[0].sceneInfo))
|
|
|
|
+
|
|
|
|
+ version = JSON.parse(temp[0].sceneInfo).data.buildType.toLowerCase() === 'v2' ? 'v2/' : ''
|
|
|
|
+ } catch (error) {
|
|
|
|
+ }
|
|
|
|
|
|
- console.log('-snCode---', snCode)
|
|
|
|
this.downloadDialogVisible = false
|
|
this.downloadDialogVisible = false
|
|
this.fullscreenLoading = false
|
|
this.fullscreenLoading = false
|
|
this.$http
|
|
this.$http
|
|
- .post(`${serverName}/downloadData/`, {
|
|
|
|
|
|
+ .post(`${serverName}/downloadData/${version}`, {
|
|
sceneCodeArr: temp,
|
|
sceneCodeArr: temp,
|
|
isTiles: isTiles,
|
|
isTiles: isTiles,
|
|
snCode
|
|
snCode
|
|
@@ -622,7 +556,7 @@ export default {
|
|
this.download.timer = setInterval(() => {
|
|
this.download.timer = setInterval(() => {
|
|
this.$http
|
|
this.$http
|
|
.get(
|
|
.get(
|
|
- `${serverName}/downloadData/process?snCode=${snCode}`
|
|
|
|
|
|
+ `${serverName}/downloadData/process/${version}?snCode=${snCode}`
|
|
)
|
|
)
|
|
.then(resp => {
|
|
.then(resp => {
|
|
console.log(resp)
|
|
console.log(resp)
|
|
@@ -677,7 +611,48 @@ export default {
|
|
a.click()
|
|
a.click()
|
|
document.body.removeChild(a)
|
|
document.body.removeChild(a)
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+ _deleMultipleScene () {
|
|
|
|
+ if (!this.multipleSelection && this.multipleSelection.length === 0) {
|
|
|
|
+ return this.$alert('请选择场景', '提示', {
|
|
|
|
+ confirmButtonText: '确定'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ let sceneIdArr = this.multipleSelection.map(item => {
|
|
|
|
+ return item.num
|
|
|
|
+ })
|
|
|
|
+ this.$confirm('此操作将删除您选择的多个场景, 是否继续?', '提示', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ })
|
|
|
|
+ .then(async () => {
|
|
|
|
+ this.fullscreenLoading = true
|
|
|
|
+ let res = await this.$http.post('/manager/scene/delete', {
|
|
|
|
+ sceneNum: sceneIdArr.join(',')
|
|
|
|
+ })
|
|
|
|
+ if (res.code === 0) {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'success',
|
|
|
|
+ message: '删除成功!'
|
|
|
|
+ })
|
|
|
|
+ this._getSceneData()
|
|
|
|
+ } else {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'error',
|
|
|
|
+ message: res.msg
|
|
|
|
+ })
|
|
|
|
+ this._getSceneData()
|
|
|
|
+ }
|
|
|
|
+ this.fullscreenLoading = false
|
|
|
|
+ })
|
|
|
|
+ .catch(() => {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'info',
|
|
|
|
+ message: '已取消删除'
|
|
|
|
+ })
|
|
|
|
+ this.fullscreenLoading = false
|
|
|
|
+ })
|
|
|
|
+ },
|
|
_deleScene (num) {
|
|
_deleScene (num) {
|
|
this.$confirm('此操作将删除该场景, 是否继续?', '提示', {
|
|
this.$confirm('此操作将删除该场景, 是否继续?', '提示', {
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|
|
@@ -687,7 +662,7 @@ export default {
|
|
.then(async () => {
|
|
.then(async () => {
|
|
this.fullscreenLoading = true
|
|
this.fullscreenLoading = true
|
|
let res = await this.$http.post('/manager/scene/delete', {
|
|
let res = await this.$http.post('/manager/scene/delete', {
|
|
- sceneId: num
|
|
|
|
|
|
+ sceneNum: num
|
|
})
|
|
})
|
|
if (res.code === 0) {
|
|
if (res.code === 0) {
|
|
this.$message({
|
|
this.$message({
|