shareStation.vue 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355
  1. <template>
  2. <div class="main-data data-share-station">
  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. <div class="data-content">
  11. <div class="data-left">
  12. <div class="data-item">
  13. <div class="data-fir">
  14. <img src="@/assets/images/service_new/img_1.png" class="icon" />
  15. <div class="name">{{constructionQuantityNum.name}}</div>
  16. </div>
  17. <div class="data-snd">
  18. <div class="num">{{constructionQuantityNum.value}}</div>
  19. <div class="unit">个</div>
  20. </div>
  21. </div>
  22. <div class="data-item">
  23. <div class="data-fir">
  24. <img src="@/assets/images/service_new/img_2.png" class="icon" />
  25. <div class="name">{{completedNum.name}}</div>
  26. </div>
  27. <div class="data-snd">
  28. <div class="num">{{completedNum.value}}</div>
  29. <div class="unit">个</div>
  30. </div>
  31. </div>
  32. </div>
  33. <div class="data-right">
  34. <div class="circle">
  35. <div class="value">
  36. <div>{{parseFloat(participateProportionRate.value).toFixed(0)}}</div>
  37. <div class="unit">%</div>
  38. </div>
  39. <div class="revo">
  40. <div class="name">完成</div>
  41. <div class="name">达标率</div>
  42. </div>
  43. </div>
  44. </div>
  45. </div>
  46. </div>
  47. </div>
  48. <div class="content-right">
  49. <div class="content-title">
  50. <div class="title">服务内容</div>
  51. </div>
  52. <div class="content">
  53. <div class="data-content">
  54. <div class="data-left">
  55. <div class="data-item">
  56. <div class="data-fir">
  57. <img src="@/assets/images/service_new/img_1.png" class="icon" />
  58. <div class="name">{{serviceContent[0].name}}</div>
  59. </div>
  60. <div class="data-snd">
  61. <div class="num">{{serviceContent[0].value}}</div>
  62. <div class="unit">个</div>
  63. </div>
  64. </div>
  65. <div class="data-item">
  66. <div class="data-fir">
  67. <img src="@/assets/images/service_new/img_1.png" class="icon" />
  68. <div class="name">{{serviceContent[1].name}}</div>
  69. </div>
  70. <div class="data-snd">
  71. <div class="num">{{serviceContent[1].value}}</div>
  72. <div class="unit">个</div>
  73. </div>
  74. </div>
  75. </div>
  76. <div class="data-right">
  77. <pie-chart
  78. position="left"
  79. :chart-data="fwData"
  80. :legend="fwLegend"
  81. :center="['40%','45%']"
  82. width="120px"
  83. height="160px"
  84. />
  85. </div>
  86. </div>
  87. </div>
  88. </div>
  89. </div>
  90. </div>
  91. </template>
  92. <script>
  93. import {getOverviewData,getSelfTestAndConsultation} from "@/api/screen/service";
  94. import PieChart from "@/components/Echarts/PieChart.vue";
  95. export default {
  96. name: "ShareStation",
  97. components: {PieChart},
  98. props: {
  99. appOrg: {
  100. type: String,
  101. default: "0000",
  102. },
  103. },
  104. watch:{
  105. appOrg(newValue,oldValue){
  106. //建设完成率
  107. // this.getOverviewData();
  108. // //工具箱二具数量
  109. // this.getToolsChartsList();
  110. },
  111. },
  112. data() {
  113. return {
  114. pieData: [],
  115. pieLegend: {
  116. top: 50,
  117. orient: "vertical",
  118. right: 0,
  119. itemWidth: 8, // 设置图例标记的宽度
  120. itemHeight: 8, // 设置图例标记的高度
  121. textStyle: {
  122. color: "#FFF",
  123. },
  124. },
  125. pieTitle: {},
  126. constructionQuantityNum: {},
  127. // 服务内容
  128. serviceContent :{},
  129. completedNum: {},
  130. participateProportionRate: {
  131. value:0
  132. },
  133. fwData: [],
  134. fwLegend: {
  135. top: 115,
  136. orient: "vertical",
  137. left: 10,
  138. itemWidth: 10, // 设置图例标记的宽度
  139. itemHeight: 10, // 设置图例标记的高度
  140. textStyle: {
  141. color: "#FFF",
  142. },
  143. },
  144. };
  145. },
  146. created() {
  147. //建设完成率
  148. this.getOverviewData();
  149. // 服务内容
  150. this.getSelfTestAndConsultation()
  151. },
  152. destroyed() {},
  153. beforeDestroy() {},
  154. mounted() {},
  155. methods: {
  156. //建设完成率
  157. getOverviewData() {
  158. getOverviewData(this.$props.appOrg).then((res) => {
  159. if (Number(res.code) === 200) {
  160. this.constructionQuantityNum = res.data.constructionQuantityNum;
  161. this.completedNum = res.data.completedNum;
  162. this.participateProportionRate = res.data.participateProportionRate;
  163. }
  164. });
  165. },
  166. // 服务内容
  167. getSelfTestAndConsultation(){
  168. getSelfTestAndConsultation(this.$props.appOrg).then((res) => {
  169. if (Number(res.code) === 200) {
  170. this.serviceContent = res.data;
  171. this.fwData = res.data;
  172. }
  173. });
  174. },
  175. // //工具箱二具数量
  176. // getToolsChartsList() {
  177. // getToolsChartsList(this.$props.appOrg).then((res) => {
  178. // if (Number(res.code) === 200) {
  179. // this.pieData = res.data;
  180. // }
  181. // });
  182. // },
  183. },
  184. };
  185. </script>
  186. <style lang="scss">
  187. .data-share-station {
  188. overflow: hidden;
  189. .content-area {
  190. display: flex;
  191. flex-direction: row;
  192. align-items: flex-start;
  193. justify-content: space-between;
  194. padding: 15px 20px 0 15px;
  195. .content-left, .content-right{
  196. width:calc(50% - 20px);
  197. }
  198. }
  199. .content-title {
  200. width: 230px;
  201. height: 26px;
  202. background: url("../../../assets/images/main/title_pro.png") no-repeat;
  203. background-size: 100% 100%;
  204. font-family: "PingFangSC";
  205. font-size: 16px;
  206. font-weight: bold;
  207. color: #00ffff;
  208. padding-left: 25px;
  209. .title {
  210. display: block;
  211. position: relative;
  212. top:-5px;
  213. }
  214. }
  215. .content {
  216. margin-top: 20px;
  217. .data-content{
  218. display: flex;
  219. justify-content: space-between;
  220. // padding-top:10px;
  221. .mar{
  222. margin-bottom: 15px;
  223. }
  224. .data-left{
  225. width: auto;
  226. .data-item{
  227. width:auto;
  228. margin-bottom: 23px;
  229. .data-fir{
  230. display: flex;
  231. align-items: center;
  232. .icon{
  233. width: 15px;
  234. height: 15px;
  235. margin-right: 6px;
  236. }
  237. .name{
  238. font-size: 14px;
  239. color:#FFFFFF;
  240. }
  241. }
  242. .data-snd{
  243. display: flex;
  244. align-items: center;
  245. padding-top:2px;
  246. .num{
  247. font-size: 32px;
  248. color:#00FFFF;
  249. font-family: 'electronicFont';
  250. }
  251. .unit{
  252. font-size:12px;
  253. color:#00FFFF;
  254. font-weight: 500;
  255. position: relative;
  256. top:5px;
  257. left:2px;
  258. }
  259. }
  260. }
  261. }
  262. .data-right{
  263. display: flex;
  264. flex-direction: column;
  265. align-items: center;
  266. margin-top: -50px;
  267. .name{
  268. font-size:13px;
  269. color:#fff;
  270. }
  271. .circle{
  272. width: 100px;
  273. height:100px;
  274. background: url("../../../assets/images/service_new/circle_2.png") no-repeat;
  275. background-size: 100% 100%;
  276. display: flex;
  277. justify-content: space-around;
  278. align-items:center;
  279. flex-direction: column;
  280. .revo{
  281. display: flex;
  282. flex-direction: column;
  283. align-items: center;
  284. }
  285. .value{
  286. display: flex;
  287. align-items: center;
  288. font-size: 32px;
  289. color:#00FFFF;
  290. font-family: 'electronicFont';
  291. position: relative;
  292. top:15px;
  293. }
  294. .unit{
  295. font-size:12px;
  296. color:#00FFFF;
  297. font-weight: 500;
  298. position: relative;
  299. top:5px;
  300. left:2px;
  301. }
  302. }
  303. }
  304. }
  305. }
  306. .data-content{
  307. display: flex;
  308. justify-content:space-around;
  309. align-items: center;
  310. overflow: visible;
  311. padding:10px 0px 0px 0px;
  312. margin-left: 10px;
  313. .imgPos{
  314. padding-left: 15px;
  315. padding-right: 15px;
  316. }
  317. }
  318. ::-webkit-scrollbar {
  319. width: 3px;
  320. height: 3px;
  321. }
  322. ::-webkit-scrollbar-thumb {
  323. //滑块部分
  324. // border-radius: 5px;
  325. background-color: #58cbbb;
  326. }
  327. ::-webkit-scrollbar-track {
  328. //轨道部分
  329. // box-shadow: inset 0 0 5px #ddd;
  330. background: #ddd;
  331. // border-radius: 5px;
  332. }
  333. }
  334. </style>