00ec112ceb18aa1ab1e7c021f69120c756a19281.svn-base 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <template>
  2. <div class="flow_chart_wrapper" id="detailImg" ref="detailImg">
  3. <div style="font-size: 14px;color:#ff2213;position: absolute;top:0px;left:0px;">点击流程图放大</div>
  4. <!-- <el-tag type="info">部交办反馈事项</el-tag>
  5. <i class="el-icon-right"></i>
  6. <el-tag type="info">业务处室新建整改</el-tag>
  7. <i class="el-icon-right"></i>
  8. <el-tag type="info">督查办整改下发</el-tag>
  9. <i class="el-icon-right"></i>
  10. <el-tag type="info">整改反馈</el-tag> -->
  11. <img :src="imgUrl" alt="流程图">
  12. </div>
  13. </template>
  14. <script>
  15. import request from '@util/gw_ajax_request.js'
  16. import Viewer from 'viewerjs';
  17. import 'viewerjs/dist/viewer.css';
  18. export default {
  19. props:{
  20. procInstId:{
  21. type: String,
  22. default: ''
  23. },
  24. isShow:{
  25. type: Boolean,
  26. default: false,
  27. }
  28. },
  29. data() {
  30. return {
  31. imgUrl: ''
  32. }
  33. },
  34. mounted() {
  35. this.getFlowChart()
  36. },
  37. methods: {
  38. getFlowChart(){
  39. request.get(`/bis/insp/pblm/plist/v1/workflow/qryProcessDiagram/${this.procInstId}`).then(res=>{
  40. if(res.success){
  41. this.imgUrl = res.data.base64ImageStr
  42. this.$nextTick(function(){
  43. var ViewerDom = this.$refs.detailImg;
  44. var viewer = new Viewer(ViewerDom, {
  45. // hide:function(){ //在图片消失的时候销毁viewer
  46. // viewer.destroy();
  47. // }
  48. })
  49. });
  50. }
  51. }).catch(err=>{
  52. console.log(err)
  53. })
  54. },
  55. },
  56. watch:{
  57. procInstId(val){
  58. if(val){
  59. this.getFlowChart()
  60. }
  61. }
  62. }
  63. }
  64. </script>
  65. <style lang="scss">
  66. .viewer-container{
  67. background: white !important;
  68. }
  69. .viewer-footer{
  70. background: white !important;
  71. .viewer-toolbar{
  72. background: white !important;
  73. }
  74. }
  75. .flow_chart_wrapper{
  76. width: 100%;
  77. margin: 0 auto;
  78. text-align: center;
  79. position: relative;
  80. cursor: pointer;
  81. img{
  82. width: 100%;
  83. }
  84. .el-icon-right{
  85. font-size: 20px;
  86. margin: 0 10px;
  87. }
  88. .el-tag--mini{
  89. height: 60px;
  90. padding: 20px 10px;
  91. font-size: 16px;
  92. }
  93. .el-tag.el-tag--info{
  94. color: #666;
  95. }
  96. }
  97. </style>