datav.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  1. <template>
  2. <div class="hc-datav-main hc-full">
  3. <img class="hc-datav-bg" :src="bgPng" alt="bg">
  4. <div class="hc-datav-header">
  5. <img id="datav-header-bg" :src="png2" alt="头部图">
  6. <div class="header-title hc-flex-center w-full">
  7. <div ref="nameRef" class="name hc-flex" @click="toHomePage">
  8. <i class="i-solar-graph-outline" />
  9. 项目数据看板
  10. </div>
  11. </div>
  12. <div class="hc-datav-search-select hc-flex w-full">
  13. <div ref="searchRef" class="relative">
  14. <HcDatavSelect v-model="searchForm.year" :datas="yearArr" />
  15. <HcDatavSelect v-model="searchForm.quarter" :datas="quarterArr" />
  16. <HcDatavSelect v-model="searchForm.level" :datas="levelArr" />
  17. <HcDatavSelect v-model="searchForm.stage" :datas="stageArr" />
  18. <HcDatavSelect v-model="searchForm.type" :datas="typeArr" />
  19. </div>
  20. </div>
  21. </div>
  22. <div class="hc-datav-total relative p-4">
  23. <el-row :gutter="24">
  24. <el-col :span="6">
  25. <HcDatavCard title="项目总量" num="860" unit="" color="#D5DEFF" />
  26. </el-col>
  27. <el-col :span="6">
  28. <HcDatavCard title="计划总投资额" num="1590" unit="亿" color="#EEB500" />
  29. </el-col>
  30. <el-col :span="6">
  31. <HcDatavCard title="目前实际完成投资额" num="590" unit="亿" color="#0DD70C" />
  32. </el-col>
  33. <el-col :span="6">
  34. <HcDatavCard title="未完成投资额" num="1000" unit="亿" color="#FF0000" />
  35. </el-col>
  36. </el-row>
  37. </div>
  38. <div class="hc-datav-divider" />
  39. <div class="hc-datav-row-total relative p-4">
  40. <el-row :gutter="24" class="h-full">
  41. <el-col :span="8" class="h-full">
  42. <div class="hc-datav-row-column h-full">
  43. <div class="title">投资数据</div>
  44. <div class="notes">
  45. <span>(已完成/</span>
  46. <span class="red">未完成</span>
  47. <span>)</span>
  48. </div>
  49. <div class="gird-card-box relative mt-4">
  50. <hc-row :gutter="20">
  51. <hc-col :span="12">
  52. <div class="gird-card hc-flex p-[14px]">
  53. <div class="upper-num a1 hc-flex-center h-[52px] w-[52px] text-[30px]">Ⅰ</div>
  54. <div class="content relative ml-[12px] h-[52px] flex-1">
  55. <div class="name mb-[10px] text-center text-[16px]">一季度</div>
  56. <div class="data text-center text-[24px]">
  57. <span class="num font-bold">130</span>
  58. <span class="line">/</span>
  59. <span class="red font-bold">60</span>
  60. <span class="unit ml-[5px] text-[14px]">(亿)</span>
  61. </div>
  62. </div>
  63. </div>
  64. </hc-col>
  65. <hc-col :span="12">
  66. <div class="gird-card hc-flex p-[14px]">
  67. <div class="upper-num a2 hc-flex-center h-[52px] w-[52px] text-[30px]">Ⅱ</div>
  68. <div class="content relative ml-[12px] h-[52px] flex-1">
  69. <div class="name mb-[10px] text-center text-[16px]">二季度</div>
  70. <div class="data text-center text-[24px]">
  71. <span class="num font-bold">130</span>
  72. <span class="line">/</span>
  73. <span class="red font-bold">60</span>
  74. <span class="unit ml-[5px] text-[14px]">(亿)</span>
  75. </div>
  76. </div>
  77. </div>
  78. </hc-col>
  79. <hc-col :span="12">
  80. <div class="gird-card hc-flex p-[14px]">
  81. <div class="upper-num a3 hc-flex-center h-[52px] w-[52px] text-[30px]">Ⅲ</div>
  82. <div class="content relative ml-[12px] h-[52px] flex-1">
  83. <div class="name mb-[10px] text-center text-[16px]">三季度</div>
  84. <div class="data text-center text-[24px]">
  85. <span class="num font-bold">130</span>
  86. <span class="line">/</span>
  87. <span class="red font-bold">60</span>
  88. <span class="unit ml-[5px] text-[14px]">(亿)</span>
  89. </div>
  90. </div>
  91. </div>
  92. </hc-col>
  93. <hc-col :span="12">
  94. <div class="gird-card hc-flex p-[14px]">
  95. <div class="upper-num a4 hc-flex-center h-[52px] w-[52px] text-[30px]">Ⅳ</div>
  96. <div class="content relative ml-[12px] h-[52px] flex-1">
  97. <div class="name mb-[10px] text-center text-[16px]">四季度</div>
  98. <div class="data text-center text-[24px]">
  99. <span class="num font-bold">130</span>
  100. <span class="line">/</span>
  101. <span class="red font-bold">60</span>
  102. <span class="unit ml-[5px] text-[14px]">(亿)</span>
  103. </div>
  104. </div>
  105. </div>
  106. </hc-col>
  107. </hc-row>
  108. </div>
  109. <div class="hc-datav-divider" />
  110. <div class="hc-datav-table relative">
  111. <HcDatavTable1 :datas="tableData1" />
  112. </div>
  113. </div>
  114. </el-col>
  115. <el-col :span="8" class="h-full">
  116. <div class="hc-datav-row-charts relative text-center">
  117. <div class="row-charts relative inline-block h-[335px] w-[520px]">
  118. <div class="title-box a1">
  119. <span>常规项目</span>
  120. <span class="num">122</span>
  121. </div>
  122. <div class="title-box a2">
  123. <span>超进度项目</span>
  124. <span class="num">333</span>
  125. </div>
  126. <div class="title-box a3">
  127. <span>滞后项目</span>
  128. <span class="num">21</span>
  129. </div>
  130. </div>
  131. </div>
  132. <div class="hc-datav-row-line relative">
  133. <div class="title">项目数据</div>
  134. <div class="hc-full relative">
  135. <HcDatavCharts />
  136. </div>
  137. </div>
  138. </el-col>
  139. <el-col :span="8" class="h-full">
  140. <div class="hc-datav-row-column h-full">
  141. <div class="title">进度数据</div>
  142. <div class="notes">
  143. <span>(已完成/</span>
  144. <span class="red">未完成</span>
  145. <span>)</span>
  146. </div>
  147. <div class="gird-card-box relative mt-4">
  148. <hc-row :gutter="20">
  149. <hc-col :span="12">
  150. <div class="gird-card hc-flex p-[14px]">
  151. <div class="upper-num a1 hc-flex-center h-[52px] w-[52px] text-[30px]">Ⅰ</div>
  152. <div class="content relative ml-[12px] h-[52px] flex-1">
  153. <div class="name mb-[10px] text-center text-[16px]">一季度</div>
  154. <div class="data text-center text-[24px]">
  155. <span class="num font-bold">130</span>
  156. <span class="line">/</span>
  157. <span class="red font-bold">60</span>
  158. </div>
  159. </div>
  160. </div>
  161. </hc-col>
  162. <hc-col :span="12">
  163. <div class="gird-card hc-flex p-[14px]">
  164. <div class="upper-num a2 hc-flex-center h-[52px] w-[52px] text-[30px]">Ⅱ</div>
  165. <div class="content relative ml-[12px] h-[52px] flex-1">
  166. <div class="name mb-[10px] text-center text-[16px]">二季度</div>
  167. <div class="data text-center text-[24px]">
  168. <span class="num font-bold">130</span>
  169. <span class="line">/</span>
  170. <span class="red font-bold">60</span>
  171. </div>
  172. </div>
  173. </div>
  174. </hc-col>
  175. <hc-col :span="12">
  176. <div class="gird-card hc-flex p-[14px]">
  177. <div class="upper-num a3 hc-flex-center h-[52px] w-[52px] text-[30px]">Ⅲ</div>
  178. <div class="content relative ml-[12px] h-[52px] flex-1">
  179. <div class="name mb-[10px] text-center text-[16px]">三季度</div>
  180. <div class="data text-center text-[24px]">
  181. <span class="num font-bold">130</span>
  182. <span class="line">/</span>
  183. <span class="red font-bold">60</span>
  184. </div>
  185. </div>
  186. </div>
  187. </hc-col>
  188. <hc-col :span="12">
  189. <div class="gird-card hc-flex p-[14px]">
  190. <div class="upper-num a4 hc-flex-center h-[52px] w-[52px] text-[30px]">Ⅳ</div>
  191. <div class="content relative ml-[12px] h-[52px] flex-1">
  192. <div class="name mb-[10px] text-center text-[16px]">四季度</div>
  193. <div class="data text-center text-[24px]">
  194. <span class="num font-bold">130</span>
  195. <span class="line">/</span>
  196. <span class="red font-bold">60</span>
  197. </div>
  198. </div>
  199. </div>
  200. </hc-col>
  201. </hc-row>
  202. </div>
  203. <div class="hc-datav-divider" />
  204. <div class="hc-datav-table relative">
  205. <HcDatavTable2 :datas="tableData2" />
  206. </div>
  207. </div>
  208. </el-col>
  209. </el-row>
  210. </div>
  211. <el-tour v-model="tourOpen" @close="tourFinishClose">
  212. <el-tour-step :target="nameRef" title="操作提示" description="点击这里,进入数据分析工具" />
  213. <el-tour-step :target="searchRef" title="操作提示" description="这里进行数据筛选查询" />
  214. </el-tour>
  215. </div>
  216. </template>
  217. <script setup>
  218. import { onMounted, ref } from 'vue'
  219. import router from '~src/router/index'
  220. import { useAppStore } from '~src/store'
  221. import { getStore, setStore } from 'hc-vue3-ui'
  222. import bgPng from '~src/assets/images/datav-bg.png'
  223. import png2 from '~src/assets/images/datav-2.png'
  224. import HcDatavSelect from './modules/select.vue'
  225. import HcDatavCard from './modules/card.vue'
  226. import HcDatavTable1 from './modules/table1.vue'
  227. import HcDatavTable2 from './modules/table2.vue'
  228. import HcDatavCharts from './modules/charts.vue'
  229. import { isNullES } from 'js-fast-way'
  230. const store = useAppStore()
  231. //引导
  232. const nameRef = ref(null)
  233. const searchRef = ref(null)
  234. const tourOpen = ref(false)
  235. onMounted(() => {
  236. const isTourOpen = getStore('isTourOpen')
  237. if (isNullES(isTourOpen)) {
  238. setTimeout(() => {
  239. tourOpen.value = true
  240. }, 500)
  241. }
  242. })
  243. //关闭引导提示
  244. const tourFinishClose = () => {
  245. console.log('关闭引导提示')
  246. setStore('isTourOpen', true)
  247. }
  248. //搜索表单
  249. const searchForm = ref({ year: '2024', quarter: '1', level: '0', stage: '1', type: '1' })
  250. const yearArr = [{ id: '2024', name: '2024年' }, { id: '2023', name: '2023年' }, { id: '2022', name: '2022年' }]
  251. const quarterArr = [{ id: '1', name: '一季度' }, { id: '2', name: '二季度' }, { id: '3', name: '三季度' }, { id: '4', name: '四季度' }, { id: '0', name: '所有' }]
  252. const levelArr = [{ id: '1', name: '一级' }, { id: '2', name: '二级' }, { id: '3', name: '三级' }, { id: '0', name: '所有' }]
  253. const stageArr = [{ id: '1', name: '项目阶段' }, { id: '2', name: '在建项目' }, { id: '3', name: '新开工项目' }, { id: '4', name: '建成项目' }]
  254. const typeArr = [{ id: '1', name: '公路' }, { id: '2', name: '水利' }, { id: '3', name: '房建' }, { id: '4', name: '铁路' }]
  255. //表格1
  256. const tableData1 = ref([
  257. { key1: '在建项目', key2: '铁路', key3: '12000', key4: '12000', key5: 2000 },
  258. { key1: '在建项目', key2: '民航', key3: '12000', key4: '12000', key5: 2000 },
  259. { key1: '在建项目', key2: 'xx', key3: '12000', key4: '12000', key5: 2000 },
  260. { key1: '在建项目', key2: 'xx', key3: '12000', key4: '12000', key5: 2000 },
  261. { key1: '在建项目', key2: 'xx', key3: '12000', key4: '12000', key5: 2000 },
  262. { key1: '在建项目', key2: 'xx', key3: '12000', key4: '12000', key5: 2000 },
  263. { key1: '在建项目', key2: 'xx', key3: '12000', key4: '12000', key5: 2000 },
  264. { key1: '在建项目', key2: 'xx', key3: '12000', key4: '12000', key5: 2000 },
  265. { key1: '在建项目', key2: 'xx', key3: '12000', key4: '12000', key5: 2000 },
  266. { key1: '在建项目', key2: 'xx', key3: '12000', key4: '12000', key5: 2000 },
  267. { key1: '在建项目', key2: 'xx', key3: '12000', key4: '12000', key5: 2000 },
  268. { key1: '在建项目', key2: 'xx', key3: '12000', key4: '12000', key5: 2000 },
  269. { key1: '在建项目', key2: 'xx', key3: '12000', key4: '12000', key5: 2000 },
  270. { key1: '在建项目', key2: 'xx', key3: '12000', key4: '12000', key5: 2000 },
  271. { key1: '在建项目', key2: 'xx', key3: '12000', key4: '12000', key5: 2000 },
  272. ])
  273. //表格2
  274. const tableData2 = ref([
  275. { key1: '在建项目', key2: '铁路', key3: '12', key4: '12', key5: 12, key6: 12 },
  276. { key1: '在建项目', key2: '民航', key3: '12', key4: '12', key5: 12, key6: 12 },
  277. { key1: '在建项目', key2: 'xx', key3: '12', key4: '12', key5: 12, key6: 12 },
  278. { key1: '在建项目', key2: 'xx', key3: '12', key4: '12', key5: 12, key6: 12 },
  279. ])
  280. //跳转到首页
  281. const toHomePage = () => {
  282. router.push({ name: store.home })
  283. }
  284. </script>
  285. <style lang="scss">
  286. @import '~src/styles/view/datav';
  287. </style>