a4db9b9ff4ccec4de63cddb55a1010ea6664a663.svn-base 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <!-- -->
  2. <template>
  3. <div style="width:100%;padding:0px 0px;" :style="{'height' : tableHeight + 'px'}" >
  4. <iframe :src="tableSrc + '&rgstrId=' + currentNodeId + '&persId=' + persId + '&unitName=' + projectName +'&hasPriv=' + hasPriv + '&width=1920&height=592'" frameborder="0" width="100%" height="100%" style="overflow: auto"></iframe>
  5. </div>
  6. </template>
  7. <script>
  8. //这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
  9. //例如:import 《组件名称》 from '《组件路径》';
  10. export default {
  11. //import引入的组件需要注入到对象中才能使用
  12. props:['currentNodeId','tableSrc','projectName','hasPriv'],
  13. components: {},
  14. data() {
  15. //这里存放数据
  16. return {
  17. tableHeight:window.innerHeight - 180
  18. };
  19. },
  20. //监听属性 类似于data概念
  21. computed: {
  22. persId() {
  23. return localStorage.getItem("userid")
  24. ? localStorage.getItem("userid")
  25. : "1098101939614724096";
  26. },
  27. },
  28. //监控data中的数据变化
  29. watch: {
  30. tableSrc(n,o){
  31. this.tableSrc = n;
  32. },
  33. currentNodeId(n,o){
  34. this.currentNodeId = n;
  35. }
  36. },
  37. //方法集合
  38. methods: {
  39. },
  40. //生命周期 - 创建完成(可以访问当前this实例)
  41. created() {
  42. },
  43. //生命周期 - 挂载完成(可以访问DOM元素)
  44. mounted() {
  45. console.log(this.tableSrc,'eeeeeeeeeeeeeeeeeee')
  46. },
  47. beforeCreate() {}, //生命周期 - 创建之前
  48. beforeMount() {}, //生命周期 - 挂载之前
  49. beforeUpdate() {}, //生命周期 - 更新之前
  50. updated() {}, //生命周期 - 更新之后
  51. beforeDestroy() {}, //生命周期 - 销毁之前
  52. destroyed() {}, //生命周期 - 销毁完成
  53. activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
  54. }
  55. </script>
  56. <style scoped lang="scss">
  57. </style>