Commit d3f549ba authored by 张洋's avatar 张洋

修改时空服务注册功能(如果配置为needLogin则不调用portal注册以及隐藏预览按钮)

parent 96e5a0e9
<template>
<div class="map_view">
<a class="map_view_action" href="#" @click.prevent.stop="viewAction">
<a
v-if="showView"
class="map_view_action"
href="#"
@click.prevent.stop="viewAction"
>
<img :src="require('../../assets/imgs/ic_yulan.png')" />
</a>
......@@ -13,7 +18,11 @@
:before-close="beforeClose"
>
<div class="map_view_container">
<iframe v-if="src" :src="src" frameborder="0"></iframe>
<iframe
v-if="src"
:src="src"
frameborder="0"
></iframe>
</div>
</el-dialog>
</transition>
......@@ -26,25 +35,32 @@ export default {
name: "map-view",
data: () => ({
showDialog: false,
src: "",
showView: false,
src: ""
}),
props: {
id: {
type: [String, Number],
required: true,
},
required: true
}
},
methods: {
viewAction() {
this.src = gisServiceUrl + `/portal/apaasplat/viewer/previewMap.html?id=${this.id}`;
this.src =
gisServiceUrl +
`/portal/apaasplat/viewer/previewMap.html?id=${this.id}`;
this.showDialog = true;
},
beforeClose(done) {
this.src = "";
done();
},
}
},
mounted() {
this.showView =
window.serviceConfig && window.serviceConfig.state == "needLogin";
}
};
</script>
......
<template>
<div class="map_view">
<a class="map_view_action" href="#" @click.prevent.stop="viewAction">
<a
v-if="showView"
class="map_view_action"
href="#"
@click.prevent.stop="viewAction"
>
<img :src="require('../../assets/imgs/ic_yulan.png')" />
</a>
......@@ -13,7 +18,11 @@
:before-close="beforeClose"
>
<div class="map_view_container">
<workflows-view :zoom="0.8" :id="id" :hideDetail="true"></workflows-view>
<workflows-view
:zoom="0.8"
:id="id"
:hideDetail="true"
></workflows-view>
</div>
</el-dialog>
</transition>
......@@ -21,19 +30,20 @@
</template>
<script>
import workflowsView from '@/components/work-flow/workflows-view'
import workflowsView from "@/components/work-flow/workflows-view";
export default {
name: "map-view",
components:{
workflowsView
components: {
workflowsView
},
data: () => ({
showDialog: false,
showView: false
}),
props: {
id: {
type: Number,
required: true,
required: true
}
},
methods: {
......@@ -42,8 +52,12 @@ export default {
},
beforeClose(done) {
done();
},
}
},
mounted() {
this.showView =
window.serviceConfig && window.serviceConfig.state == "needLogin";
}
};
</script>
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment