employeeHealth.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. <template>
  2. <div class="main-data data-employee-health">
  3. <!-- <div class="title-area">员工健康</div> -->
  4. <div class="content-area">
  5. <div class="content-title">
  6. <span class="title">健康服务</span>
  7. </div>
  8. <div class="content">
  9. <div class="health-cont">
  10. <div class="health-left">
  11. <div class="left-list">
  12. <img src="@/assets/images/service_new/person2.png">
  13. <div class="left-info">
  14. <div class="num">{{participateNum.value}}<span class="unit">人</span></div>
  15. <div class="name">{{participateNum.name}}</div>
  16. </div>
  17. </div>
  18. <div class="left-list">
  19. <img src="@/assets/images/service_new/person.png">
  20. <div class="left-info">
  21. <div class="num">{{actualParticipateNum.value}}<span class="unit">人</span></div>
  22. <div class="name">{{actualParticipateNum.name}}</div>
  23. </div>
  24. </div>
  25. </div>
  26. <div class="health-right">
  27. <el-progress
  28. type="circle"
  29. :width="112"
  30. :stroke-width="8"
  31. :percentage="participateProportionRate.value"
  32. color="#00FFFF"
  33. style="color:rgba(0, 247, 255, 0.18);"
  34. ></el-progress>
  35. <div class="name">检查人数占比</div>
  36. </div>
  37. </div>
  38. </div>
  39. </div>
  40. </div>
  41. </template>
  42. <script>
  43. import PieChart from "@/components/Echarts/PieChart";
  44. import BarChart from "@/components/Echarts/BarChart";
  45. import {getAgePieData, getHealthData, getSexChartData} from "@/api/screen/service";
  46. export default {
  47. name: "EmployeeHealth",
  48. components: {
  49. PieChart,
  50. BarChart,
  51. },
  52. props: {
  53. appOrg: {
  54. type: String,
  55. default: "0000",
  56. },
  57. },
  58. watch:{
  59. appOrg(newValue,oldValue){
  60. this.getHealthData();
  61. },
  62. },
  63. data() {
  64. return {
  65. actualParticipateNum: {},
  66. participateNum: {},
  67. participateProportionRate: {},
  68. };
  69. },
  70. created() {
  71. // 健康服务
  72. this.getHealthData();
  73. },
  74. destroyed() {},
  75. beforeDestroy() {},
  76. mounted() {},
  77. methods: {
  78. //健康服务
  79. getHealthData() {
  80. getHealthData(this.$props.appOrg).then((res) => {
  81. if (Number(res.code) === 200) {
  82. this.actualParticipateNum = res.data.actualParticipateNum;
  83. this.participateNum = res.data.participateNum;
  84. this.participateProportionRate = res.data.participateProportionRate;
  85. } else {
  86. }
  87. });
  88. },
  89. showContent(percent){
  90. return percent;
  91. }
  92. },
  93. };
  94. </script>
  95. <style lang="scss">
  96. .data-employee-health {
  97. .content-area {
  98. padding: 15px 20px 0 15px;
  99. }
  100. .el-progress--circle .el-progress__text, .el-progress--dashboard .el-progress__text{
  101. color: #FFFFFF !important;
  102. font-family: "fashionZh" !important;
  103. font-size: 20px !important;
  104. }
  105. .content-title {
  106. width: 100%;
  107. height: 26px;
  108. background: url("../../../assets/images/main/title_pro_long.png") no-repeat;
  109. background-size: 100% 100%;
  110. font-family: "PingFangSC";
  111. font-size: 16px;
  112. font-weight: bold;
  113. color: #00ffff;
  114. padding-left: 25px;
  115. .title {
  116. display: block;
  117. position: relative;
  118. top:-5px;
  119. }
  120. }
  121. .content {
  122. margin-top: 15px;
  123. }
  124. .health-cont{
  125. width:100%;
  126. display: flex;
  127. justify-content: space-between;
  128. padding: 0 80px 0 30px;
  129. .health-left{
  130. padding-right:100px;
  131. .left-list{
  132. display: flex;
  133. align-items: center;
  134. margin-bottom: 15px;
  135. img{
  136. display: block;
  137. width:60px;
  138. height:60px;
  139. }
  140. .left-info{
  141. padding-left:12px;
  142. .num{
  143. font-size: 25px;
  144. color:#00FFFF;
  145. font-family: "electronicFont";
  146. display: flex;
  147. flex-direction: row;
  148. align-items: baseline;
  149. .unit{
  150. font-size: 12px;
  151. }
  152. }
  153. .name{
  154. font-size: 14px;
  155. color:#FFFFFF;
  156. font-family: 'fashionZh';
  157. padding-top:4px;
  158. }
  159. }
  160. }
  161. }
  162. .health-right{
  163. display: flex;
  164. flex-direction: column;
  165. justify-content: flex-start;
  166. padding-top: 2px;
  167. align-items: center;
  168. .name{
  169. //width:75px;
  170. font-size: 14px;
  171. color:#FFFFFF;
  172. font-family: 'fashionZh';
  173. padding-top:10px;
  174. text-align: center;
  175. }
  176. }
  177. }
  178. .el-progress-circle__track {
  179. color: #FFFFFF;
  180. opacity: 0.1;
  181. }
  182. ::v-deep .el-progress__text {
  183. color: #ffffff !important;
  184. }
  185. ::-webkit-scrollbar {
  186. width: 3px;
  187. height: 3px;
  188. }
  189. ::-webkit-scrollbar-thumb {
  190. //滑块部分
  191. // border-radius: 5px;
  192. background-color: #58cbbb;
  193. }
  194. ::-webkit-scrollbar-track {
  195. //轨道部分
  196. // box-shadow: inset 0 0 5px #ddd;
  197. background: #ddd;
  198. // border-radius: 5px;
  199. }
  200. }
  201. </style>