ResponsibilityImplementation.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. <template>
  2. <div class="responsibility-implementation">
  3. <div class="title">
  4. <span class="line"></span>
  5. <span class="text">安全责任落实</span>
  6. </div>
  7. <div class="responsibility-implementation__content">
  8. <div class="content-title">责任书签订情况</div>
  9. <div class="signing-rate">
  10. <span>签订率</span>
  11. <span class="signing-rate-value">
  12. <span class="signing-rate-value-bar" :style="{ width: `${signingRate}%` }"></span>
  13. </span>
  14. <span class="signing-rate-unit">{{ signingRate }}%</span>
  15. </div>
  16. <div class="signing-nums">
  17. <div class="signing-nums__item" v-for="item in signingList" :key="item.name">
  18. <span class="name">{{ item.name }}</span>
  19. <span class="num">{{ item.num }}</span>
  20. </div>
  21. </div>
  22. </div>
  23. </div>
  24. </template>
  25. <script setup lang="ts">
  26. import { onMounted, ref } from 'vue';
  27. interface SigningList {
  28. name: string;
  29. num: number;
  30. }
  31. const signingRate = ref<number>(0);
  32. const signingList = ref<SigningList[]>([]);
  33. onMounted(() => {
  34. signingRate.value = 10;
  35. signingList.value = [
  36. { name: '所/中心', num: 28 },
  37. { name: '科室', num: 347 },
  38. { name: '员工', num: 3368 },
  39. { name: '常驻供应商', num: 19 },
  40. ];
  41. });
  42. </script>
  43. <style scoped lang="scss">
  44. .title {
  45. display: flex;
  46. align-items: center;
  47. gap: 10px;
  48. margin-bottom: 16px;
  49. .line {
  50. width: 3px;
  51. height: 16px;
  52. background: #1777ff;
  53. }
  54. .text {
  55. font-weight: 500;
  56. font-size: 16px;
  57. color: #000000;
  58. line-height: 22px;
  59. }
  60. }
  61. .responsibility-implementation__content {
  62. width: 310px;
  63. height: 160px;
  64. margin: 0 10px;
  65. background: linear-gradient(90deg, #ebf3ff 0%, #fafcff 100%);
  66. border-radius: 4px;
  67. padding-top: 14px;
  68. .content-title {
  69. margin: 0 12px;
  70. font-weight: 500;
  71. font-size: 16px;
  72. color: #333333;
  73. line-height: 22px;
  74. }
  75. .signing-rate {
  76. margin: 20px 16px;
  77. font-weight: 400;
  78. font-size: 14px;
  79. color: #333333;
  80. display: flex;
  81. align-items: center;
  82. justify-content: space-between;
  83. .signing-rate-value {
  84. width: 192px;
  85. height: 6px;
  86. background: #d8d8d8;
  87. border-radius: 4px;
  88. position: relative;
  89. .signing-rate-value-bar {
  90. width: 0;
  91. height: 100%;
  92. background: #1777ff;
  93. border-radius: 4px;
  94. position: absolute;
  95. left: 0;
  96. top: 0;
  97. }
  98. }
  99. .signing-rate-unit {
  100. font-weight: 600;
  101. }
  102. }
  103. .signing-nums {
  104. display: flex;
  105. align-items: center;
  106. justify-content: center;
  107. gap: 28px;
  108. .signing-nums__item {
  109. display: flex;
  110. flex-direction: column;
  111. .name {
  112. font-weight: 400;
  113. font-size: 14px;
  114. color: #666666;
  115. line-height: 20px;
  116. }
  117. .num {
  118. font-family: DINAlternate;
  119. font-weight: 600;
  120. font-size: 22px;
  121. color: #333333;
  122. line-height: 26px;
  123. }
  124. }
  125. }
  126. }
  127. </style>