projectPath.vue 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. <template>
  2. <!-- 项目流程 -->
  3. <div class="projectPath" style="width: 100%;height:100%;">
  4. <span>项目流程</span>
  5. <el-divider></el-divider>
  6. <svg viewBox="0 0 1800 400" width="100%" height="100%">
  7. <g transform=translate(0,0) class="svgG">
  8. <rect width="200" height="120" :fill="getColor('创新点流程')" @click="toFilePage('创新点流程')"> </rect>
  9. <text x="30" y="65">创新点流程</text>
  10. <circle cx="150" cy="60" r="16" stroke-width="1" stroke="#fff" :fill="getColor('创新点流程')" />
  11. <text :x="getNumber('创新点流程') >9? '140':'145'" y="65" fill="#fff">{{ getNumber('创新点流程') }}</text>
  12. <line x1="200" y1="60" x2="350" y2="60" stroke='#333'></line>
  13. <polygon points="350,55,360,60,350,65"></polygon>
  14. </g>
  15. <g transform="translate(360,0)" class="svgG">
  16. <rect width="200" height="120" :fill="getColor('查新检索')" @click="toFilePage('查新检索')"> </rect>
  17. <text x="30" y="65">查新检索</text>
  18. <circle cx="150" cy="60" r="15" stroke-width="1" stroke="#fff" :fill="getColor('查新检索')" />
  19. <text :x="getNumber('查新检索') >9? '140':'145'" y="65" fill="#fff">{{ getNumber('查新检索') }}</text>
  20. <line x1="200" y1="60" x2="350" y2="60" stroke='#333'></line>
  21. <polygon points="350,55,360,60,350,65"></polygon>
  22. </g>
  23. <g transform="translate(720,0)" class="svgG">
  24. <rect width="200" height="120" :fill="getColor('保护主题规划')" @click="toFilePage('保护主题规划')"> </rect>
  25. <text x="30" y="65">保护主题规划</text>
  26. <circle cx="150" cy="60" r="15" stroke-width="1" stroke="#fff" :fill="getColor('保护主题规划')" />
  27. <text x="145" y="65" fill="#fff">{{ getNumber('保护主题规划') }}</text>
  28. <line x1="200" y1="60" x2="350" y2="60" stroke='#333'></line>
  29. <polygon points="350,55,360,60,350,65"></polygon>
  30. </g>
  31. <g transform="translate(1080,0)" class="svgG">
  32. <rect width="200" height="120" :fill="getColor('独权撰写')" @click="toFilePage('独权撰写')"> </rect>
  33. <text x="30" y="65">独权撰写</text>
  34. <circle cx="150" cy="60" r="15" stroke-width="1" stroke="#fff" :fill="getColor('独权撰写')" />
  35. <text x="145" y="65" fill="#fff">{{ getNumber('独权撰写') }}</text>
  36. <line x1="200" y1="60" x2="350" y2="60" stroke='#333'></line>
  37. <polygon points="350,55,360,60,350,65"></polygon>
  38. </g>
  39. <g transform="translate(1440,0)" class="svgG">
  40. <rect width="200" height="120" :fill="getColor('从权撰写')" @click="toFilePage('从权撰写')"> </rect>
  41. <text x="30" y="65">从权撰写</text>
  42. <circle cx="150" cy="60" r="15" stroke-width="1" stroke="#fff" :fill="getColor('从权撰写')" />
  43. <text x="145" y="65" fill="#fff">{{ getNumber('从权撰写') }}</text>
  44. <line x1="100" y1="120" x2="100" y2="190" stroke='#333'></line>
  45. <polygon points="95,190,100,200,105,190"></polygon>
  46. </g>
  47. <!-- <g transform="translate(1080,200)" class="svgG">
  48. <rect width="200" height="120" :fill="getColor('从权撰写')" @click="toFilePage('从权撰写')"> </rect>
  49. <text x="30" y="65">从权撰写</text>
  50. <circle cx="150" cy="60" r="15" stroke-width="1" stroke="#fff" :fill="getColor('从权撰写')" />
  51. <text x="145" y="65" fill="#fff">{{ getNumber('从权撰写') }}</text>
  52. <line x1="0" y1="60" x2="-150" y2="60" stroke='#333'></line>
  53. <polygon points="-150,55,-160,60,-150,65"></polygon>
  54. </g> -->
  55. <g transform="translate(1440,200)" class="svgG">
  56. <rect width="200" height="120" :fill="getColor('申请文件定稿')" @click="toFilePage('申请文件定稿')"> </rect>
  57. <text x="30" y="65">申请文件定稿</text>
  58. <circle cx="150" cy="60" r="15" stroke-width="1" stroke="#fff" :fill="getColor('申请文件定稿')" />
  59. <text x="145" y="65" fill="#fff">{{ getNumber('申请文件定稿') }}</text>
  60. <line x1="0" y1="60" x2="-150" y2="60" stroke='#333'></line>
  61. <polygon points="-150,55,-160,60,-150,65"></polygon>
  62. </g>
  63. <g transform="translate(1080,200)" class="svgG">
  64. <rect width="200" height="120" :fill="getColor('说明书规划撰写')" @click="toFilePage('说明书规划撰写')"> </rect>
  65. <text x="15" y="65" xml:space='preserve'>说明书规划撰写
  66. </text>
  67. <circle cx="150" cy="60" r="15" stroke-width="1" stroke="#fff" :fill="getColor('说明书规划撰写')" />
  68. <text x="145" y="65" fill="#fff">{{ getNumber('说明书规划撰写') }}</text>
  69. </g>
  70. </svg>
  71. </div>
  72. </template>
  73. <script>
  74. export default {
  75. data() {
  76. return {
  77. numObj: {
  78. '创新点流程':12,
  79. '查新检索': 0,
  80. '保护主题规划': 0,
  81. '独权撰写': 0,
  82. '从权撰写': 0,
  83. '申请文件定稿': 0,
  84. '说明书规划撰写': 0,
  85. },
  86. }
  87. },
  88. computed: {},
  89. mounted() {
  90. },
  91. methods: {
  92. // 获取文件数量
  93. getNumber(str) {
  94. return this.numObj[str]
  95. },
  96. // 获取背景颜色
  97. getColor(str) {
  98. return this.getNumber(str)>0?'#5ed325':'pink'
  99. },
  100. // 跳转文件列表界面
  101. toFilePage(str) {
  102. console.log(str);
  103. },
  104. },
  105. }
  106. </script>
  107. <style lang="scss">
  108. .projectPath {
  109. .el-divider--horizontal {
  110. margin: 10px 0;
  111. }
  112. }
  113. </style>
  114. <style lang="scss" scoped>
  115. .projectPath{
  116. .svgG{
  117. cursor: pointer;
  118. }
  119. }
  120. </style>