|
@@ -133,7 +133,7 @@
|
|
|
<script>
|
|
|
import {apiSandTableList,apiSandTableDetail} from "../api/sandTable.js"
|
|
|
import {apiReportIndexPageAuthList} from "../api/report.js"
|
|
|
- import {apiGetPoster} from "../api/common.js"
|
|
|
+ import {apiGetPoster,apiGetSceneToParams} from "../api/common.js"
|
|
|
import {apiApplyPermission} from "../api/user.js"
|
|
|
export default {
|
|
|
data() {
|
|
@@ -180,19 +180,7 @@
|
|
|
}
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
- // 有sandbox_id 说明是单个分享进来的
|
|
|
- if(options.sandbox_id){
|
|
|
- this.selectedFirstId = options.firstClassifyId || 0
|
|
|
- this.selectedSecondId = options.chart_permission_id || 0
|
|
|
- this.getSandBoxDetail(options.sandbox_id)
|
|
|
- }else{
|
|
|
- this.sandTableQuery.keyword = options.keyword || ""
|
|
|
- this.selectedFirstId = options.firstClassifyId || 0
|
|
|
- this.sandTableQuery.chart_permission_id = this.selectedSecondId = options.chart_permission_id || 0
|
|
|
- this.sandTableQuery.is_high_light = options.is_high_light || false
|
|
|
- this.getSandBoxList()
|
|
|
- }
|
|
|
- this.getClassifyList()
|
|
|
+ this.init(options)
|
|
|
},
|
|
|
onShow(options) {
|
|
|
// 预览图片结束时,会触发onShow,切回竖屏
|
|
@@ -237,6 +225,28 @@
|
|
|
this.getSandBoxList()
|
|
|
},
|
|
|
methods: {
|
|
|
+ async init(options){
|
|
|
+ let obj={}
|
|
|
+ if(options.scene){
|
|
|
+ let res = await apiGetSceneToParams({scene_key:options.scene})
|
|
|
+ if(res.code==200){
|
|
|
+ obj=JSON.parse(res.data)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 有sandbox_id 说明是单个分享进来的
|
|
|
+ if(obj.sandbox_id){
|
|
|
+ this.selectedFirstId = obj.firstClassifyId || 0
|
|
|
+ this.selectedSecondId = obj.chart_permission_id || 0
|
|
|
+ this.getSandBoxDetail(obj.sandbox_id)
|
|
|
+ }else{
|
|
|
+ this.sandTableQuery.keyword = obj.keyword || ""
|
|
|
+ this.selectedFirstId = obj.firstClassifyId || 0
|
|
|
+ this.sandTableQuery.chart_permission_id = this.selectedSecondId = obj.chart_permission_id || 0
|
|
|
+ this.sandTableQuery.is_high_light = obj.is_high_light || false
|
|
|
+ this.getSandBoxList()
|
|
|
+ }
|
|
|
+ this.getClassifyList()
|
|
|
+ },
|
|
|
// 获取沙盘图数据
|
|
|
getSandBoxList(option){
|
|
|
this.isRequseting=true
|
|
@@ -416,7 +426,7 @@
|
|
|
},
|
|
|
async handleCreatePoster(type,item){
|
|
|
this.show=true
|
|
|
- let code_scene = '',source='',parsJson={}
|
|
|
+ let code_scene_json = {},source='',parsJson={},code_scene=''
|
|
|
if(type == 'detail'){
|
|
|
// 分享单个
|
|
|
let {chart_permission_id} = item
|
|
@@ -430,7 +440,12 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- code_scene=`{sandbox_id:${item.sandbox_id},chart_permission_id:${chart_permission_id},firstClassifyId:${first_permission_id}}`
|
|
|
+ code_scene_json={
|
|
|
+ sandbox_id:item.sandbox_id,
|
|
|
+ chart_permission_id,
|
|
|
+ firstClassifyId:first_permission_id
|
|
|
+ }
|
|
|
+ code_scene=JSON.stringify(code_scene_json)
|
|
|
source = 'sandbox_detail'
|
|
|
parsJson = {title_1:item.name,img_1:item.pic_url}
|
|
|
}else{
|
|
@@ -450,7 +465,13 @@
|
|
|
firstImageUrl = this.list[0].pic_url
|
|
|
secondImageUrl = this.list[1].pic_url
|
|
|
}
|
|
|
- code_scene=`{keyword:${keyword},chart_permission_id:${chart_permission_id},is_high_light:${is_high_light},firstClassifyId:${this.selectedFirstId}}}`
|
|
|
+ code_scene_json={
|
|
|
+ keyword,
|
|
|
+ chart_permission_id,
|
|
|
+ is_high_light,
|
|
|
+ firstClassifyId:this.selectedFirstId
|
|
|
+ }
|
|
|
+ code_scene=JSON.stringify(code_scene_json)
|
|
|
source = 'sandbox_list'
|
|
|
parsJson = {title_1:'沙盘推演',img_1:firstImageUrl,img_2:secondImageUrl}
|
|
|
}
|