employeeProfile.vue 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  1. <template>
  2. <div class="main-data data-employee-profile">
  3. <!-- <div class="title-area">员工概况</div> -->
  4. <div class="content-area">
  5. <div class="content-left">
  6. <div class="content-title">
  7. <div class="title">员工类型</div>
  8. </div>
  9. <div class="content">
  10. <pie-chart
  11. :chart-data="pieData"
  12. :legend="pieLegend"
  13. :title="pieTitle"
  14. width="220px"
  15. height="180px"
  16. />
  17. </div>
  18. </div>
  19. <div class="content-right">
  20. <div class="content-title">
  21. <div class="title">入楼情况(当天)
  22. </div>
  23. </div>
  24. <div class="content">
  25. <div class="data-content">
  26. <div class="data-item">
  27. <span class="data">{{grossNum.value}}</span>
  28. <span class="name">{{ grossNum.name }}</span>
  29. </div>
  30. <div class="data-item">
  31. <span class="data1">{{entryInternalNum.value}}</span>
  32. <span class="name">{{ entryInternalNum.name }}</span>
  33. </div>
  34. <div class="data-item">
  35. <span class="data2">{{visitorNum.value}}</span>
  36. <span class="name">{{ visitorNum.name }}</span>
  37. </div>
  38. </div>
  39. </div>
  40. </div>
  41. </div>
  42. </div>
  43. </template>
  44. <script>
  45. import PieChart from "@/components/Echarts/PieChart";
  46. import { getEnterBuildData, getEmployeePieData } from "@/api/screen/service";
  47. export default {
  48. name: "EmployeeProfile",
  49. components: {
  50. PieChart,
  51. },
  52. props: {
  53. appOrg: {
  54. type: String,
  55. default: "0000",
  56. },
  57. },
  58. watch:{
  59. appOrg(newValue,oldValue){
  60. //员工类型
  61. this.getEmployeePieData();
  62. //入楼情况
  63. this.getEnterBuildData();
  64. },
  65. },
  66. data() {
  67. return {
  68. currentTime: new Date(),
  69. pieData: [],
  70. pieLegend: {
  71. top: 30,
  72. orient: "vertical",
  73. right: 0,
  74. itemWidth: 8, // 设置图例标记的宽度
  75. itemHeight: 8, // 设置图例标记的高度
  76. textStyle: {
  77. color: "#FFF",
  78. },
  79. },
  80. pieTitle: {},
  81. grossNum:{},
  82. entryAssistNum:{},
  83. entryInternalNum:{},
  84. entryPropertyNum:{},
  85. entryToLoanNum:{},
  86. visitorNum:{},
  87. };
  88. },
  89. created() {
  90. //员工类型
  91. this.getEmployeePieData();
  92. //入楼情况
  93. this.getEnterBuildData();
  94. },
  95. destroyed() {},
  96. beforeDestroy() {},
  97. mounted() {},
  98. methods: {
  99. //获取员工类型
  100. getEmployeePieData() {
  101. getEmployeePieData(this.$props.appOrg).then((res) => {
  102. if (Number(res.code) === 200) {
  103. this.pieData = res.data;
  104. } else {
  105. //构造默认数据
  106. this.handlePieChart();
  107. }
  108. });
  109. },
  110. //入楼情况
  111. getEnterBuildData() {
  112. getEnterBuildData(this.$props.appOrg).then((res) => {
  113. if (Number(res.code) === 200) {
  114. this.grossNum = res.data.grossNum;
  115. this.entryToLoanNum = res.data.entryToLoanNum;
  116. this.entryAssistNum = res.data.entryAssistNum;
  117. this.entryInternalNum = res.data.entryInternalNum;
  118. this.entryPropertyNum = res.data.entryPropertyNum;
  119. this.visitorNum = res.data.visitorNum;
  120. } else {
  121. //构造默认数据
  122. this.handleBuildData();
  123. }
  124. });
  125. },
  126. //实例化饼图
  127. handlePieChart() {
  128. },
  129. //构造假数据
  130. handleBuildData(){
  131. }
  132. },
  133. };
  134. </script>
  135. <style lang="scss">
  136. .data-employee-profile {
  137. overflow: hidden;
  138. .content-area {
  139. display: flex;
  140. flex-direction: row;
  141. align-items: flex-start;
  142. justify-content: space-between;
  143. padding: 15px 20px 0 15px;
  144. .content-left, .content-right{
  145. width:calc(50% - 20px);
  146. }
  147. }
  148. .content-title {
  149. width: 230px;
  150. height: 26px;
  151. background: url("../../../assets/images/main/title_pro.png") no-repeat;
  152. background-size: 100% 100%;
  153. font-family: "PingFangSC";
  154. font-size: 16px;
  155. font-weight: bold;
  156. color: #00ffff;
  157. padding-left: 25px;
  158. .title {
  159. display: block;
  160. position: relative;
  161. top:-5px;
  162. }
  163. .smallTitle{
  164. font-size: 10px;
  165. font-weight: 100;
  166. color: #ffffff;
  167. }
  168. }
  169. .content {
  170. margin-top: 20px;
  171. .data-content{
  172. display: flex;
  173. flex-direction: row;
  174. align-items: center;
  175. flex-wrap: wrap;
  176. height: 130px;
  177. .mar{
  178. margin-bottom: 15px;
  179. }
  180. .data-item{
  181. position: relative;
  182. display: flex;
  183. flex-direction: column;
  184. align-items: center;
  185. justify-content: center;
  186. margin-right: 15px;
  187. .data{
  188. width: auto;
  189. font-size: 25px;
  190. color:#00FFFF;
  191. font-family: 'electronicFont';
  192. background: url("../../../assets/images/service_new/data_bgg.png") no-repeat;
  193. background-size: 100% 100%;
  194. background-position: center;
  195. height: 85px;
  196. width: 68px;
  197. text-align: center;
  198. padding-top: 23px;
  199. // position: relative;
  200. // top: 50px;
  201. }
  202. .data1{
  203. width: auto;
  204. font-size: 25px;
  205. color:#00FFDF;
  206. font-family: 'electronicFont';
  207. background: url("../../../assets/images/service_new/data_bgg1.png") no-repeat;
  208. background-size: 100% 100%;
  209. background-position: center;
  210. height: 85px;
  211. width: 68px;
  212. text-align: center;
  213. padding-top: 23px;
  214. // position: relative;
  215. // top: 50px;
  216. }
  217. .data2{
  218. width: auto;
  219. font-size: 25px;
  220. color:#F4CB57;
  221. font-family: 'electronicFont';
  222. background: url("../../../assets/images/service_new/data_bgg2.png") no-repeat;
  223. background-size: 100% 100%;
  224. background-position: center;
  225. height: 85px;
  226. width: 68px;
  227. text-align: center;
  228. padding-top: 23px;
  229. // position: relative;
  230. // top: 50px;
  231. }
  232. .name{
  233. font-size: 12px;
  234. color:#FFFFFF;
  235. }
  236. }
  237. .data-item:nth-child(3n){
  238. margin-right: 0;
  239. }
  240. }
  241. }
  242. ::-webkit-scrollbar {
  243. width: 3px;
  244. height: 3px;
  245. }
  246. ::-webkit-scrollbar-thumb {
  247. //滑块部分
  248. // border-radius: 5px;
  249. background-color: #58cbbb;
  250. }
  251. ::-webkit-scrollbar-track {
  252. //轨道部分
  253. // box-shadow: inset 0 0 5px #ddd;
  254. background: #ddd;
  255. // border-radius: 5px;
  256. }
  257. }
  258. </style>