ing.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. <template>
  2. <div class="implementing-container">
  3. <div class="implementing-title">
  4. <img src="@/assets/images/nz.png" class="title-icon" />
  5. 进行中的实施服务
  6. </div>
  7. <vueSeamless
  8. :data="data"
  9. :class-option="optionScroll"
  10. class="implementing-list"
  11. >
  12. <div
  13. v-for="(item, index) in data"
  14. :key="index"
  15. class="implementing-item"
  16. :class="{ 'even-item': index % 2 === 1 }"
  17. >
  18. <div class="item-content">
  19. <div class="item-date">{{ dayjs(item.created_at).format("YYYY-MM-DD") }}</div>
  20. <div class="item-city">{{ item.residence.location.region_name }}</div>
  21. <div class="project-info">
  22. <div class="project-name">{{ item.residence.residence_name }}</div>
  23. <div class="company-name">{{ item.service.customer.customer_name }}</div>
  24. </div>
  25. <div class="project-stats">
  26. <div class="stat-item">
  27. <span class="stat-value">{{ item.householdCount }}</span>
  28. <span class="stat-label">户</span>
  29. </div>
  30. <div class="stat-item">
  31. <span class="stat-value">{{ item.service.liable_person.real_name }}</span>
  32. </div>
  33. <div class="stat-item">
  34. <div class="progress-wrapper">
  35. <span class="progress-text">{{ item.service.perform_ratio }}%</span>
  36. </div>
  37. </div>
  38. <div class="stat-item service-item">
  39. <span class="service-content">{{ item.service.work_template.display_name }}</span>
  40. </div>
  41. <div class="stat-item">
  42. <span class="period">{{ item.updated_at }}</span>
  43. </div>
  44. </div>
  45. </div>
  46. </div>
  47. </vueSeamless>
  48. </div>
  49. </template>
  50. <script>
  51. import dayjs from "dayjs"
  52. import { mapState } from "vuex"
  53. import vueSeamless from "vue-seamless-scroll"
  54. export default {
  55. name: "ImplementingServices",
  56. components: {
  57. vueSeamless,
  58. },
  59. props: {
  60. data: {
  61. type: Object,
  62. default: () => ([]),
  63. },
  64. },
  65. data() {
  66. return {
  67. }
  68. },
  69. computed: {
  70. ...mapState(["entCode", "communityId"]),
  71. optionScroll() {
  72. return {
  73. step: 0.5,
  74. }
  75. },
  76. },
  77. methods: {
  78. },
  79. }
  80. </script>
  81. <style lang="scss" scoped>
  82. @import "@/assets/css/theme.scss";
  83. .implementing-container {
  84. background: var(--content-bg);
  85. border-radius: halfW(4);
  86. display: flex;
  87. flex-direction: column;
  88. }
  89. .implementing-title {
  90. background: var(--title-bg);
  91. font-size: halfW(18);
  92. font-weight: 500;
  93. color: var(--title-primary);
  94. padding: halfH(4) halfW(10);
  95. border-radius: halfW(4);
  96. display: flex;
  97. align-items: center;
  98. }
  99. .implementing-list {
  100. flex: 1;
  101. overflow-y: auto;
  102. padding: 0px halfW(10);
  103. height: calc(100% - halfH(36));
  104. }
  105. .implementing-item {
  106. background: var(--content-bg); // 第一个项目使用--content-bg
  107. padding: 16px;
  108. &:last-child {
  109. margin-bottom: 0;
  110. }
  111. }
  112. // 偶数项使用--title-bg作为背景色
  113. .implementing-item.even-item {
  114. background: var(--title-bg);
  115. }
  116. .item-content {
  117. display: flex;
  118. justify-content: space-between;
  119. align-items: center;
  120. gap: halfW(16);
  121. .item-date {
  122. color: var(--title-secondary);
  123. font-size: halfW(14);
  124. margin-right: halfW(16);
  125. }
  126. .item-city {
  127. color: var(--title-primary);
  128. font-size: halfW(14);
  129. font-weight: 500;
  130. padding: halfH(2) halfW(8);
  131. border-radius: halfW(4);
  132. }
  133. .project-info {
  134. flex: 1;
  135. min-width: halfW(200);
  136. margin-right: halfW(20);
  137. .project-name {
  138. flex: 0 0 1;
  139. color: var(--title-primary);
  140. font-size: halfW(14);
  141. margin-bottom: halfH(4);
  142. font-weight: 400;
  143. }
  144. .company-name {
  145. color: var(--title-secondary);
  146. font-size: halfW(14);
  147. }
  148. }
  149. .project-stats {
  150. display: flex;
  151. align-items: center;
  152. flex-wrap: wrap;
  153. gap: halfW(20);
  154. }
  155. .stat-item {
  156. display: flex;
  157. align-items: center;
  158. &:first-child {
  159. .stat-value {
  160. color: var(--primary);
  161. }
  162. }
  163. .stat-value {
  164. color: #fff;
  165. font-size: halfW(16);
  166. font-weight: 500;
  167. margin-right: halfW(4);
  168. }
  169. .stat-label {
  170. color: #fff;
  171. font-size: halfW(14);
  172. }
  173. .progress-wrapper {
  174. display: flex;
  175. align-items: center;
  176. gap: halfW(8);
  177. .progress-text {
  178. color: #40d9ac;
  179. font-size: halfW(14);
  180. font-weight: 500;
  181. min-width: halfW(35);
  182. }
  183. }
  184. .service-content {
  185. color: #ffffff;
  186. font-size: halfW(14);
  187. }
  188. .period {
  189. color: #a0b3d6;
  190. font-size: halfW(14);
  191. }
  192. }
  193. .service-item {
  194. flex: 1;
  195. }
  196. }
  197. </style>