index.vue 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318
  1. <template>
  2. <div class="inspection">
  3. <div class="left_spection">
  4. <HeadlineTag value="巡检点列表"></HeadlineTag>
  5. <div class="box_arch_point">
  6. <div class="point_box" style="margin-top: 10px;">
  7. <el-input v-model="input" placeholder="按巡查点名称搜索" />
  8. </div>
  9. <div style="height: calc(100% - 160px);">
  10. <Empty></Empty>
  11. </div>
  12. <div class="center_in">
  13. <pagination :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize"
  14. layout="total, prev, pager, next" @pagination="getList" />
  15. </div>
  16. </div>
  17. </div>
  18. <div class="right_spection">
  19. <div class="operation_spection">
  20. <HeadlineTag type="right" value="运行统计"></HeadlineTag>
  21. <div class="box_arch">
  22. <div class="image_tubbiness">
  23. <div class="work_num">3714<span>个</span></div>
  24. <div class="work_title">今日总数</div>
  25. </div>
  26. <div class="right_content">
  27. <div class="work_week">
  28. <div class="color_line_xj" style="background-color: rgb(21, 213, 21);"></div>
  29. <span>巡检点数:</span>20
  30. </div>
  31. <div class="work_week">
  32. <div class="color_line_xj" style="background-color: rgb(196, 127, 19);"></div>
  33. <span>巡检计划:</span>10
  34. </div>
  35. <div class="work_week">
  36. <div class="color_line_xj" style="background-color: rgb(195, 56, 56);"></div>
  37. <span>巡检线路:</span>15
  38. </div>
  39. </div>
  40. </div>
  41. </div>
  42. <div class="flex_spection">
  43. <HeadlineTag type="right" value="巡检统计"></HeadlineTag>
  44. <div class="box_arch">
  45. <div ref="chartRouting" style="width: 100%;height: 100%;"></div>
  46. </div>
  47. </div>
  48. <div class="flex_spection">
  49. <HeadlineTag type="right" value="实时巡检"></HeadlineTag>
  50. <div class="box_arch">
  51. <dv-scroll-board :config="config" style="width:100%;height:calc(100% - 10px);margin-top: 10px;" />
  52. </div>
  53. </div>
  54. </div>
  55. </div>
  56. </template>
  57. <script setup>
  58. import HeadlineTag from '@/components/HeadlineTag'
  59. import Empty from '@/components/Empty'
  60. import * as echarts from 'echarts'
  61. const total = ref(0);
  62. const queryParams = ref({
  63. pageNum: 1,
  64. pageSize: 10,
  65. });
  66. const input = ref('')
  67. const config = ref({
  68. headerBGC: '#10285c',
  69. oddRowBGC: '#10285c7f',
  70. evenRowBGC: '#10285c00',
  71. header: ['名称', '位置', '列3'],
  72. data: [
  73. ['行1列1', '行1列2', '行1列3'],
  74. ['行2列1', '行2列2', '行2列3'],
  75. ['行3列1', '行3列2', '行3列3'],
  76. ['行4列1', '行4列2', '行4列3'],
  77. ['行5列1', '行5列2', '行5列3'],
  78. ['行6列1', '行6列2', '行6列3'],
  79. ['行7列1', '行7列2', '行7列3'],
  80. ['行8列1', '行8列2', '行8列3'],
  81. ['行9列1', '行9列2', '行9列3'],
  82. ['行10列1', '行10列2', '行10列3']
  83. ]
  84. })
  85. /** 查询列表 */
  86. function getList() {
  87. };
  88. const chartRouting = ref(null);
  89. let chartInstance = null;
  90. // 初始化图表
  91. const initChart = () => {
  92. chartInstance = echarts.init(chartRouting.value);
  93. chartInstance.setOption({
  94. tooltip: {
  95. trigger: 'axis',
  96. },
  97. legend: {
  98. data: ['产值', '增加值'],
  99. icon: 'rich',
  100. show: true,
  101. itemWidth: 18,
  102. itemHeight: 2,
  103. textStyle: {
  104. color: '#AFBDD1',
  105. fontSize: '12px',
  106. },
  107. top: 8,
  108. right: 10,
  109. itemGap: 34,
  110. },
  111. grid: {
  112. left: '4%',
  113. right: '4%',
  114. bottom: '10%',
  115. top: '16%',
  116. containLabel: true,
  117. },
  118. xAxis: {
  119. data: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
  120. type: 'category',
  121. boundaryGap: false,
  122. axisLine: {
  123. symbol: 'none',
  124. lineStyle: {
  125. color: '#50637A',
  126. },
  127. },
  128. axisTick: {
  129. show: false,
  130. },
  131. axisLabel: {
  132. interval: 0,
  133. color: '#ffffff',
  134. fontSize: 12,
  135. padding: [10, 0, 0, 0],
  136. },
  137. },
  138. yAxis: {
  139. type: 'value',
  140. axisLabel: {
  141. color: '#ffffff',
  142. fontSize: 12,
  143. padding: [0, 10, 0, 0],
  144. },
  145. splitLine: {
  146. show: false,
  147. },
  148. },
  149. series: [
  150. {
  151. name: '增加值',
  152. data: [1, 2, 3, 4, 7, 6, 7, 8, 4, 10],
  153. type: 'line',
  154. smooth: true,
  155. color: '#00F7FF',
  156. lineStyle: {
  157. width: 2,
  158. },
  159. areaStyle: {
  160. color: new echarts.graphic.LinearGradient(
  161. 0,
  162. 0,
  163. 0,
  164. 1,
  165. [{
  166. offset: 0,
  167. color: 'rgba(0, 247, 255, .6)',
  168. },
  169. {
  170. offset: 0.8,
  171. color: 'rgba(0, 247, 255, .2)',
  172. },
  173. ],
  174. false
  175. ),
  176. shadowColor: 'rgba(0, 0, 0, 0.1)',
  177. shadowBlur: 10,
  178. },
  179. symbol: 'circle',
  180. symbolSize: 6,
  181. },
  182. ],
  183. });
  184. };
  185. // 生命周期
  186. onMounted(initChart);
  187. // 窗口自适应
  188. window.addEventListener('resize', () => {
  189. chartInstance?.resize();
  190. });
  191. </script>
  192. <style scoped lang="scss">
  193. .inspection {
  194. position: relative;
  195. width: 100%;
  196. padding-top: 45px;
  197. height: 100vh;
  198. overflow: hidden;
  199. }
  200. .left_spection {
  201. position: absolute;
  202. left: 0;
  203. width: 25%;
  204. height: calc(100% - 45px);
  205. display: flex;
  206. flex-direction: column;
  207. padding-left: 10px;
  208. }
  209. .right_spection {
  210. position: absolute;
  211. right: 0;
  212. width: 25%;
  213. height: calc(100% - 45px);
  214. display: flex;
  215. flex-direction: column;
  216. }
  217. .box_arch_point {
  218. height: calc(100% - 40px);
  219. }
  220. .operation_spection {
  221. height: 250px;
  222. color: #fff;
  223. }
  224. .flex_spection {
  225. flex: 1;
  226. color: #fff;
  227. }
  228. .box_arch {
  229. display: flex;
  230. align-items: center;
  231. height: calc(100% - 40px);
  232. }
  233. .image_tubbiness {
  234. position: relative;
  235. flex: none;
  236. width: 200px;
  237. height: 100%;
  238. background: url("@/assets/images/tubbiness.png");
  239. background-size: 80% 80%;
  240. background-position: center center;
  241. background-repeat: no-repeat;
  242. .work_num {
  243. position: absolute;
  244. top: 60px;
  245. left: 0;
  246. right: 0;
  247. text-align: center;
  248. color: rgb(84, 218, 250);
  249. font-size: 20px;
  250. span {
  251. font-size: 14px;
  252. color: rgb(158, 174, 195);
  253. }
  254. }
  255. .work_title {
  256. position: absolute;
  257. bottom: 36px;
  258. left: 0px;
  259. right: 0px;
  260. text-align: center;
  261. }
  262. }
  263. .right_content {
  264. flex: 1;
  265. height: 100%;
  266. display: flex;
  267. flex-direction: column;
  268. justify-content: space-evenly;
  269. .work_week {
  270. display: flex;
  271. align-items: center;
  272. font-size: 22px;
  273. font-weight: bold;
  274. color: #fff;
  275. span {
  276. padding-right: 10px;
  277. font-size: 16px;
  278. color: rgb(214, 218, 222);
  279. }
  280. }
  281. }
  282. .color_line_xj {
  283. width: 6px;
  284. height: 6px;
  285. margin-right: 10px;
  286. }
  287. </style>
  288. <style lang="scss" scoped>
  289. .point_box :deep(.el-input__wrapper) {
  290. background-color: transparent !important;
  291. box-shadow: 0 0 0 1px rgb(58, 86, 117) inset !important;
  292. }
  293. .point_box :deep(.el-input__wrapper.is-focus) {
  294. box-shadow: 0 0 0 1px #409EFF inset !important;
  295. }
  296. .point_box :deep(.el-input__inner) {
  297. color: #ffffff !important;
  298. }
  299. </style>