runData.vue 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  1. <template>
  2. <div class="operation-data">
  3. <div class="row">
  4. <ChannelCheckChart :chartsData="channelCheckData" />
  5. </div>
  6. <div class="row">
  7. <div class="col">
  8. <SeizedInfo :chartsData="countSeizureInfoItemData" />
  9. </div>
  10. <div class="col">
  11. <SeizedItems :chartsData="countSeizeSubjectCategoryQuantityData" />
  12. </div>
  13. </div>
  14. <div class="row">
  15. <div class="col">
  16. <SeizedNumAll :chartsData="countSeizureTotalQuantityData" />
  17. </div>
  18. <div class="col">
  19. <SeizedNum :chartsData="countSeizureSingleQuantityData" />
  20. </div>
  21. </div>
  22. <div class="row">
  23. <SeizedWorkArea :chartsData="countSeizeAreaQuantityData" />
  24. </div>
  25. <div class="row">
  26. <div class="col">
  27. <EventItems :chartsData="countSeizureStatsItemData" />
  28. </div>
  29. <div class="col">
  30. <EventType :chartsData="countSeizureStatsTypeData" />
  31. </div>
  32. <div class="col">
  33. <EventWorkArea :chartsData="countSeizureStatsPostData" />
  34. </div>
  35. </div>
  36. <div class="row">
  37. <div class="col">
  38. <TestItems :chartsData="securityTestItemClassificationData" />
  39. </div>
  40. <div class="col">
  41. <TestResult :chartsData="securityTestPassingStatusData" />
  42. </div>
  43. <div class="col">
  44. <TestArea :chartsData="securityTestRegionData" />
  45. </div>
  46. </div>
  47. <div class="row">
  48. <div class="col">
  49. <SupervisionDistribution :chartsData="supervisionData" />
  50. </div>
  51. <div class="col">
  52. <InterceptionDistribution :chartsData="interceptionData" />
  53. </div>
  54. </div>
  55. </div>
  56. </template>
  57. <script setup>
  58. import { watch } from 'vue'
  59. import ChannelCheckChart from '../../components/ChannelCheckChart.vue';
  60. import SeizedInfo from '../../components/SeizedInfo.vue';
  61. import SeizedItems from '../../components/SeizedItems.vue';
  62. import SeizedNumAll from '../../components/SeizedNumAll.vue';
  63. import SeizedNum from '../../components/SeizedNum.vue';
  64. import SeizedWorkArea from '../../components/SeizedWorkArea.vue';
  65. import EventItems from '../../components/EventItems.vue';
  66. import EventType from '../../components/EventType.vue';
  67. import EventWorkArea from '../../components/EventWorkArea.vue';
  68. import TestItems from '../../components/TestItems.vue';
  69. import TestResult from '../../components/TestResult.vue';
  70. import TestArea from '../../components/TestArea.vue';
  71. import SupervisionDistribution from '../../components/SupervisionDistribution.vue';
  72. import InterceptionDistribution from '../../components/InterceptionDistribution.vue';
  73. import {
  74. countLanePeakThroughput,
  75. countStationHourlyThroughput,
  76. countSeizureInfoItem,
  77. countSeizeSubjectCategoryQuantity,
  78. countSeizureTotalQuantity,
  79. countSeizureSingleQuantity,
  80. countSeizeAreaQuantity,
  81. countSeizureStatsItem,
  82. countSeizureStatsType,
  83. countSeizureStatsPost,
  84. securityTestItemClassification,
  85. securityTestPassingStatus,
  86. securityTestRegion,
  87. realtimeInterceptionItem,
  88. supervisionProblemPosition,
  89. } from '@/api/portraitManagement/portraitManagement';
  90. const props = defineProps({
  91. queryParams: {
  92. type: Object,
  93. default: () => ({})
  94. }
  95. })
  96. const channelCheckData = ref([])
  97. const invokerCountLanePeakThroughput = () => {
  98. countLanePeakThroughput(props.queryParams).then(res => {
  99. if (res.code === 200 && res.data) {
  100. channelCheckData.value = res.data || []
  101. }
  102. })
  103. }
  104. const countSeizureInfoItemData = ref({ totalSeizeNum: 0, itemList: [] })
  105. const invokerCountSeizureInfoItem = () => {
  106. countSeizureInfoItem(props.queryParams).then(res => {
  107. if (res.code === 200 && res.data) {
  108. countSeizureInfoItemData.value = res.data || { totalSeizeNum: 0, itemList: [] }
  109. }
  110. })
  111. }
  112. const countSeizeSubjectCategoryQuantityData = ref([])
  113. const invokerCountSeizeSubjectCategoryQuantity = () => {
  114. countSeizeSubjectCategoryQuantity(props.queryParams).then(res => {
  115. if (res.code === 200 && res.data) {
  116. countSeizeSubjectCategoryQuantityData.value = res.data || []
  117. }
  118. })
  119. }
  120. const countSeizureTotalQuantityData = ref([])
  121. const invokerCountSeizureTotalQuantity = () => {
  122. countSeizureTotalQuantity(props.queryParams).then(res => {
  123. if (res.code === 200 && res.data) {
  124. countSeizureTotalQuantityData.value = res.data || []
  125. }
  126. })
  127. }
  128. const countSeizureSingleQuantityData = ref([])
  129. const invokerCountSeizureSingleQuantity = () => {
  130. countSeizureSingleQuantity(props.queryParams).then(res => {
  131. if (res.code === 200 && res.data) {
  132. countSeizureSingleQuantityData.value = res.data || []
  133. }
  134. })
  135. }
  136. const countSeizeAreaQuantityData = ref([])
  137. const invokerCountSeizeAreaQuantity = () => {
  138. countSeizeAreaQuantity(props.queryParams).then(res => {
  139. if (res.code === 200 && res.data) {
  140. countSeizeAreaQuantityData.value = res.data || []
  141. }
  142. })
  143. }
  144. const countSeizureStatsItemData = ref([])
  145. const invokerCountSeizureStatsItem = () => {
  146. countSeizureStatsItem(props.queryParams).then(res => {
  147. if (res.code === 200 && res.data) {
  148. countSeizureStatsItemData.value = res.data || []
  149. }
  150. })
  151. }
  152. const countSeizureStatsTypeData = ref([])
  153. const invokerCountSeizureStatsType = () => {
  154. countSeizureStatsType(props.queryParams).then(res => {
  155. if (res.code === 200 && res.data) {
  156. countSeizureStatsTypeData.value = res.data || []
  157. }
  158. })
  159. }
  160. const countSeizureStatsPostData = ref([])
  161. const invokerCountSeizureStatsPost = () => {
  162. countSeizureStatsPost(props.queryParams).then(res => {
  163. if (res.code === 200 && res.data) {
  164. countSeizureStatsPostData.value = res.data || []
  165. }
  166. })
  167. }
  168. const securityTestItemClassificationData = ref([])
  169. const invokerSecurityTestItemClassification = () => {
  170. securityTestItemClassification(props.queryParams).then(res => {
  171. if (res.code === 200 && res.data) {
  172. securityTestItemClassificationData.value = res.data || []
  173. }
  174. })
  175. }
  176. const securityTestPassingStatusData = ref([])
  177. const invokerSecurityTestPassingStatus = () => {
  178. securityTestPassingStatus(props.queryParams).then(res => {
  179. if (res.code === 200 && res.data) {
  180. securityTestPassingStatusData.value = res.data || []
  181. }
  182. })
  183. }
  184. const securityTestRegionData = ref([])
  185. const invokerSecurityTestRegion = () => {
  186. securityTestRegion(props.queryParams).then(res => {
  187. if (res.code === 200 && res.data) {
  188. securityTestRegionData.value = res.data || []
  189. }
  190. })
  191. }
  192. const supervisionData = ref([])
  193. const fetchSupervisionData = async () => {
  194. try {
  195. const res = await supervisionProblemPosition(props.queryParams)
  196. if (res.code === 200 && res.data) {
  197. supervisionData.value = res.data.map(item => ({
  198. num: item.total,
  199. name: item.name
  200. }))
  201. }
  202. } catch (error) {
  203. console.error('获取各岗位监察问题分布数据失败', error)
  204. }
  205. }
  206. const interceptionData = ref([])
  207. const fetchInterceptionData = async () => {
  208. try {
  209. const res = await realtimeInterceptionItem(props.queryParams)
  210. if (res.code === 200 && res.data) {
  211. interceptionData.value = res.data.map(item => ({
  212. num: item.total,
  213. name: item.name
  214. }))
  215. }
  216. } catch (error) {
  217. console.error('获取实时质控拦截物品分布数据失败', error)
  218. }
  219. }
  220. const fetchData = () => {
  221. invokerCountLanePeakThroughput()
  222. invokerCountSeizureInfoItem()
  223. invokerCountSeizeSubjectCategoryQuantity()
  224. invokerCountSeizureTotalQuantity()
  225. invokerCountSeizureSingleQuantity()
  226. invokerCountSeizeAreaQuantity()
  227. invokerCountSeizureStatsItem()
  228. invokerCountSeizureStatsType()
  229. invokerCountSeizureStatsPost()
  230. invokerSecurityTestItemClassification()
  231. invokerSecurityTestPassingStatus()
  232. invokerSecurityTestRegion()
  233. fetchSupervisionData()
  234. fetchInterceptionData()
  235. }
  236. watch(() => props.queryParams, () => {
  237. fetchData()
  238. }, { deep: true, immediate: true })
  239. </script>
  240. <style lang="scss" scoped>
  241. .operation-data {
  242. padding: 20px;
  243. .row {
  244. display: flex;
  245. column-gap: 15px;
  246. height: 360px;
  247. width: 100%;
  248. overflow: hidden;
  249. margin-bottom: 15px;
  250. .col {
  251. flex: 1;
  252. height: 100%;
  253. min-width: 0px;
  254. :deep(.info-card) {
  255. height: 100%;
  256. }
  257. }
  258. }
  259. }
  260. </style>