shareStation.vue 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359
  1. <template>
  2. <div class="main-data data-share-station">
  3. <!-- <div class="title-area">共享驿站</div> -->
  4. <div class="content-area" v-if="flag >= 2">
  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. flag: 0,
  115. pieData: [],
  116. pieLegend: {
  117. top: 50,
  118. orient: "vertical",
  119. right: 0,
  120. itemWidth: 8, // 设置图例标记的宽度
  121. itemHeight: 8, // 设置图例标记的高度
  122. textStyle: {
  123. color: "#FFF",
  124. },
  125. },
  126. pieTitle: {},
  127. constructionQuantityNum: {name: '', value: 0},
  128. // 服务内容
  129. serviceContent :{},
  130. completedNum: {},
  131. participateProportionRate: {
  132. name: '',
  133. value:0
  134. },
  135. fwData: [],
  136. fwLegend: {
  137. top: 115,
  138. orient: "vertical",
  139. left: 10,
  140. itemWidth: 10, // 设置图例标记的宽度
  141. itemHeight: 10, // 设置图例标记的高度
  142. textStyle: {
  143. color: "#FFF",
  144. },
  145. },
  146. };
  147. },
  148. created() {
  149. //建设完成率
  150. this.getOverviewData();
  151. // 服务内容
  152. this.getSelfTestAndConsultation()
  153. },
  154. destroyed() {},
  155. beforeDestroy() {},
  156. mounted() {},
  157. methods: {
  158. //建设完成率
  159. getOverviewData() {
  160. getOverviewData(this.$props.appOrg).then((res) => {
  161. if (Number(res.code) === 200) {
  162. this.constructionQuantityNum = res.data.constructionQuantityNum;
  163. this.completedNum = res.data.completedNum;
  164. this.participateProportionRate = res.data.participateProportionRate;
  165. this.flag++
  166. }
  167. });
  168. },
  169. // 服务内容
  170. getSelfTestAndConsultation(){
  171. getSelfTestAndConsultation(this.$props.appOrg).then((res) => {
  172. if (Number(res.code) === 200) {
  173. this.serviceContent = res.data;
  174. this.fwData = res.data;
  175. this.flag++
  176. }
  177. });
  178. },
  179. // //工具箱二具数量
  180. // getToolsChartsList() {
  181. // getToolsChartsList(this.$props.appOrg).then((res) => {
  182. // if (Number(res.code) === 200) {
  183. // this.pieData = res.data;
  184. // }
  185. // });
  186. // },
  187. },
  188. };
  189. </script>
  190. <style lang="scss">
  191. .data-share-station {
  192. overflow: hidden;
  193. .content-area {
  194. display: flex;
  195. flex-direction: row;
  196. align-items: flex-start;
  197. justify-content: space-between;
  198. padding: 15px 20px 0 15px;
  199. .content-left, .content-right{
  200. width:calc(50% - 20px);
  201. }
  202. }
  203. .content-title {
  204. width: 230px;
  205. height: 26px;
  206. background: url("../../../assets/images/main/title_pro.png") no-repeat;
  207. background-size: 100% 100%;
  208. font-family: "PingFangSC";
  209. font-size: 16px;
  210. font-weight: bold;
  211. color: #00ffff;
  212. padding-left: 25px;
  213. .title {
  214. display: block;
  215. position: relative;
  216. top:-5px;
  217. }
  218. }
  219. .content {
  220. margin-top: 20px;
  221. .data-content{
  222. display: flex;
  223. justify-content: space-between;
  224. // padding-top:10px;
  225. .mar{
  226. margin-bottom: 15px;
  227. }
  228. .data-left{
  229. width: auto;
  230. .data-item{
  231. width:auto;
  232. margin-bottom: 23px;
  233. .data-fir{
  234. display: flex;
  235. align-items: center;
  236. .icon{
  237. width: 15px;
  238. height: 15px;
  239. margin-right: 6px;
  240. }
  241. .name{
  242. font-size: 14px;
  243. color:#FFFFFF;
  244. }
  245. }
  246. .data-snd{
  247. display: flex;
  248. align-items: center;
  249. padding-top:2px;
  250. .num{
  251. font-size: 32px;
  252. color:#00FFFF;
  253. font-family: 'electronicFont';
  254. }
  255. .unit{
  256. font-size:12px;
  257. color:#00FFFF;
  258. font-weight: 500;
  259. position: relative;
  260. top:5px;
  261. left:2px;
  262. }
  263. }
  264. }
  265. }
  266. .data-right{
  267. display: flex;
  268. flex-direction: column;
  269. align-items: center;
  270. margin-top: -50px;
  271. .name{
  272. font-size:13px;
  273. color:#fff;
  274. }
  275. .circle{
  276. width: 100px;
  277. height:100px;
  278. background: url("../../../assets/images/service_new/circle_2.png") no-repeat;
  279. background-size: 100% 100%;
  280. display: flex;
  281. justify-content: space-around;
  282. align-items:center;
  283. flex-direction: column;
  284. .revo{
  285. display: flex;
  286. flex-direction: column;
  287. align-items: center;
  288. }
  289. .value{
  290. display: flex;
  291. align-items: center;
  292. font-size: 32px;
  293. color:#00FFFF;
  294. font-family: 'electronicFont';
  295. position: relative;
  296. top:15px;
  297. }
  298. .unit{
  299. font-size:12px;
  300. color:#00FFFF;
  301. font-weight: 500;
  302. position: relative;
  303. top:5px;
  304. left:2px;
  305. }
  306. }
  307. }
  308. }
  309. }
  310. .data-content{
  311. display: flex;
  312. justify-content:space-around;
  313. align-items: center;
  314. overflow: visible;
  315. padding:10px 0px 0px 0px;
  316. margin-left: 10px;
  317. .imgPos{
  318. padding-left: 15px;
  319. padding-right: 15px;
  320. }
  321. }
  322. ::-webkit-scrollbar {
  323. width: 3px;
  324. height: 3px;
  325. }
  326. ::-webkit-scrollbar-thumb {
  327. //滑块部分
  328. // border-radius: 5px;
  329. background-color: #58cbbb;
  330. }
  331. ::-webkit-scrollbar-track {
  332. //轨道部分
  333. // box-shadow: inset 0 0 5px #ddd;
  334. background: #ddd;
  335. // border-radius: 5px;
  336. }
  337. }
  338. </style>