index.vue 29 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007
  1. <route lang="yaml">
  2. name: home
  3. meta:
  4. title: 主页
  5. icon: ant-design:home-twotone
  6. </route>
  7. <script setup lang="ts">
  8. import * as echarts from 'echarts'
  9. import api from '@/api'
  10. import { useRouter } from 'vue-router'
  11. import up from '@/assets/images/home/up.png'
  12. import down from '@/assets/images/home/down.png'
  13. import cxcd from '@/assets/images/home/cxcd.png'
  14. import bldd from '@/assets/images/home/bldd.png'
  15. import ddcx from '@/assets/images/home/ddcx.png'
  16. import xygl from '@/assets/images/home/xygl.png'
  17. import fygl from '@/assets/images/home/fygl.png'
  18. import bxgs from '@/assets/images/home/bxgs.png'
  19. import bxgszh from '@/assets/images/home/bxgszh.png'
  20. import ywygl from '@/assets/images/home/ywygl.png'
  21. import chinaMap from '@/assets/json/china.Json';
  22. import anhui from '@/assets/json/anhui.json'
  23. import aomen from '@/assets/json/aomen.json'
  24. import beijing from '@/assets/json/beijing.json'
  25. import chongqing from '@/assets/json/chongqing.json'
  26. import fujian from '@/assets/json/fujian.json'
  27. import gansu from '@/assets/json/gansu.json'
  28. import guangdong from '@/assets/json/guangdong.json'
  29. import guangxi from '@/assets/json/guangxi.json'
  30. import guizhou from '@/assets/json/guizhou.json'
  31. import hainan from '@/assets/json/hainan.json'
  32. import hebei from '@/assets/json/hebei.json'
  33. import heilongjiang from '@/assets/json/heilongjiang.json'
  34. import henan from '@/assets/json/henan.json'
  35. import hubei from '@/assets/json/hubei.json'
  36. import hunan from '@/assets/json/hunan.json'
  37. import jiangsu from '@/assets/json/jiangsu.json'
  38. import jiangxi from '@/assets/json/jiangxi.json'
  39. import jilin from '@/assets/json/jilin.json'
  40. import liaoning from '@/assets/json/liaoning.json'
  41. import neimenggu from '@/assets/json/neimenggu.json'
  42. import ningxia from '@/assets/json/ningxia.json'
  43. import qinghai from '@/assets/json/qinghai.json'
  44. import shandong from '@/assets/json/shandong.json'
  45. import shanghai from '@/assets/json/shanghai.json'
  46. import shanxi from '@/assets/json/shanxi.json'
  47. import shanxi1 from '@/assets/json/shanxi1.json'
  48. import sichuan from '@/assets/json/sichuan.json'
  49. import tianjin from '@/assets/json/tianjin.json'
  50. import xianggang from '@/assets/json/xianggang.json'
  51. import xinjiang from '@/assets/json/xinjiang.json'
  52. import xizang from '@/assets/json/xizang.json'
  53. import yunnan from '@/assets/json/yunnan.json'
  54. import zhejiang from '@/assets/json/zhejiang.json'
  55. echarts.registerMap('china', chinaMap)
  56. echarts.registerMap('安徽', anhui)
  57. echarts.registerMap('澳门', aomen)
  58. echarts.registerMap('北京', beijing)
  59. echarts.registerMap('重庆', chongqing)
  60. echarts.registerMap('福建', fujian)
  61. echarts.registerMap('甘肃', gansu)
  62. echarts.registerMap('广东', guangdong)
  63. echarts.registerMap('广西', guangxi)
  64. echarts.registerMap('贵州', guizhou)
  65. echarts.registerMap('海南', hainan)
  66. echarts.registerMap('河北', hebei)
  67. echarts.registerMap('黑龙江', heilongjiang)
  68. echarts.registerMap('河南', henan)
  69. echarts.registerMap('湖北', hubei)
  70. echarts.registerMap('湖南', hunan)
  71. echarts.registerMap('江苏', jiangsu)
  72. echarts.registerMap('江西', jiangxi)
  73. echarts.registerMap('吉林', jilin)
  74. echarts.registerMap('辽宁', liaoning)
  75. echarts.registerMap('内蒙', neimenggu)
  76. echarts.registerMap('宁夏', ningxia)
  77. echarts.registerMap('青海', qinghai)
  78. echarts.registerMap('山东', shandong)
  79. echarts.registerMap('上海', shanghai)
  80. echarts.registerMap('山西', shanxi)
  81. echarts.registerMap('陕西', shanxi1)
  82. echarts.registerMap('四川', sichuan)
  83. echarts.registerMap('天津', tianjin)
  84. echarts.registerMap('香港', xianggang)
  85. echarts.registerMap('新疆', xinjiang)
  86. echarts.registerMap('西藏', xizang)
  87. echarts.registerMap('云南', yunnan)
  88. echarts.registerMap('浙江', zhejiang)
  89. let myRouter = useRouter()
  90. function open(url: string) {
  91. window.open(url, '_blank')
  92. }
  93. // 常用功能
  94. let functionList = ref([
  95. {
  96. id: 1,
  97. name: '车险出单',
  98. icon: cxcd
  99. },
  100. {
  101. id: 2,
  102. name: '补录订单',
  103. icon: bldd
  104. },
  105. {
  106. id: 3,
  107. name: '订单查询',
  108. icon: ddcx
  109. },
  110. {
  111. id: 4,
  112. name: '协议管理',
  113. icon: xygl
  114. },
  115. {
  116. id: 5,
  117. name: '费用管理',
  118. icon: fygl
  119. },
  120. {
  121. id: 6,
  122. name: '保险公司',
  123. icon: bxgs
  124. },
  125. {
  126. id: 7,
  127. name: '保险公司账号',
  128. icon: bxgszh
  129. },
  130. {
  131. id: 8,
  132. name: '业务员管理',
  133. icon: ywygl
  134. },
  135. ])
  136. // 地图
  137. let ChinaMap = ref()
  138. const initChinaMap = () => {
  139. const myChart = echarts.init(ChinaMap.value)
  140. let option = {
  141. tooltip: {
  142. formatter: function(e, t, n) {
  143. // return .5 == e.value ? e.name + ":有疑似病例" : e.seriesName + "<br />" + e.name + ":" + e.value
  144. return e.name + "<br />" +
  145. "业务员数量:" + e.value + "<br />" +
  146. "个代业务员数量:" + e.data.personalAgentCount + "<br />" +
  147. "渠道业务员数量:" + e.data.channelSalesmanCount
  148. }
  149. },
  150. visualMap: {
  151. min: 0,
  152. max: 1000,
  153. left: 26,
  154. bottom: 40,
  155. showLabel: !0,
  156. text: ["高", "低"],
  157. pieces: [{
  158. gt: 150,
  159. label: ">150",
  160. color: "#0485FF"
  161. }, {
  162. gte: 100,
  163. lte: 150,
  164. label: "100-150",
  165. color: "#2E9AFF"
  166. }, {
  167. gte: 50,
  168. lt: 100,
  169. label: "50-100",
  170. color: "#81C2FF"
  171. }, {
  172. gt: 0,
  173. lt: 50,
  174. label: "<50",
  175. color: "#BCDFFF"
  176. }, {
  177. value: 0,
  178. color: "#DCEEFF"
  179. }],
  180. show: !0
  181. },
  182. geo: {
  183. map: "china",
  184. roam: !1,
  185. scaleLimit: {
  186. min: 1,
  187. max: 2
  188. },
  189. zoom: 1.23,
  190. top: 120,
  191. label: {
  192. normal: {
  193. show: false,
  194. fontSize: "14",
  195. color: "rgba(0,0,0,0.7)"
  196. }
  197. },
  198. itemStyle: {
  199. normal: {
  200. //shadowBlur: 50,
  201. //shadowColor: 'rgba(0, 0, 0, 0.2)',
  202. borderColor: "rgba(0, 0, 0, 0.2)"
  203. },
  204. emphasis: {
  205. areaColor: "#f2d5ad",
  206. shadowOffsetX: 0,
  207. shadowOffsetY: 0,
  208. borderWidth: 0
  209. }
  210. }
  211. },
  212. series: [{
  213. name: "",
  214. type: "map",
  215. geoIndex: 0,
  216. data: chinaMapData.value
  217. }]
  218. };
  219. myChart.setOption(option)
  220. myChart.on('click', function (a) {
  221. provinceStr.value = a.data.code
  222. provinceName.value = a.name
  223. initBusinessDistribution()
  224. })
  225. window.addEventListener('resize', () => {
  226. myChart.resize()
  227. })
  228. }
  229. // 市级地图
  230. let CityMap = ref()
  231. const initCityMap = (name) => {
  232. let str = ''
  233. if(name.length == 3) {
  234. str = name.substring(0,2)
  235. initMap(str)
  236. } else if(name.length == 4) {
  237. str = name.substring(0,3)
  238. initMap(str)
  239. } else if(name.length > 4) {
  240. str = name.substring(0,2)
  241. initMap(str)
  242. }
  243. }
  244. const initMap = (str) => {
  245. const myChart = echarts.init(CityMap.value)
  246. let option = {
  247. tooltip: {
  248. formatter: function(e, t, n) {
  249. // return .5 == e.value ? e.name + ":有疑似病例" : e.seriesName + "<br />" + e.name + ":" + e.value
  250. return e.name + "<br />" +
  251. "业务员数量:" + e.value + "<br />" +
  252. "个代业务员数量:" + e.data.personalAgentCount + "<br />" +
  253. "渠道业务员数量:" + e.data.channelSalesmanCount
  254. }
  255. },
  256. geo: {
  257. map: str,
  258. roam: !1,
  259. scaleLimit: {
  260. min: 1,
  261. max: 2
  262. },
  263. zoom: 1,
  264. top: 30,
  265. label: {
  266. normal: {
  267. show: true,
  268. fontSize: "14",
  269. color: "rgba(0,0,0,0.7)"
  270. }
  271. },
  272. itemStyle: {
  273. normal: {
  274. //shadowBlur: 50,
  275. //shadowColor: 'rgba(0, 0, 0, 0.2)',
  276. borderColor: "rgba(0, 0, 0, 0.2)"
  277. },
  278. emphasis: {
  279. areaColor: "#f2d5ad",
  280. shadowOffsetX: 0,
  281. shadowOffsetY: 0,
  282. borderWidth: 0
  283. }
  284. }
  285. },
  286. series: [{
  287. name: "",
  288. type: "map",
  289. geoIndex: 0,
  290. data: subMapData.value
  291. }]
  292. };
  293. myChart.setOption(option)
  294. window.addEventListener('resize', () => {
  295. myChart.resize()
  296. })
  297. }
  298. // 出单趋势
  299. let TrendRef = ref()
  300. const initTrend = () => {
  301. const myChart = echarts.init(TrendRef.value)
  302. let option = {
  303. grid: {
  304. left: '20',
  305. right: '20',
  306. top:'20%',
  307. bottom: '15%',
  308. containLabel: true
  309. },
  310. tooltip: {
  311. trigger: 'axis',
  312. axisPointer: {
  313. type: 'cross',
  314. label: {
  315. backgroundColor: '#6a7985'
  316. }
  317. }
  318. },
  319. legend: {
  320. show:true,
  321. right:'10',
  322. top:'10',
  323. icon: 'stack',
  324. itemWidth:10,
  325. itemHeight:10,
  326. textStyle:{
  327. color:'#333333'
  328. },
  329. data:['订单数','保费']
  330. },
  331. xAxis : [
  332. {
  333. type : 'category',
  334. boundaryGap : false,
  335. axisLabel:{
  336. color: '#666666'
  337. },
  338. axisLine:{
  339. show:true,
  340. lineStyle:{
  341. color:'#999999'
  342. }
  343. },
  344. axisTick:{
  345. show:false,
  346. },
  347. data : orderTrend.value.xAxis
  348. }
  349. ],
  350. yAxis : [
  351. {
  352. type : 'value',
  353. name : '信息量',
  354. min:0,
  355. max:1000,
  356. axisLabel : {
  357. formatter: '{value}',
  358. textStyle:{
  359. color:'#666666'
  360. }
  361. },
  362. axisTick:{
  363. show:false,
  364. }
  365. }
  366. ],
  367. series : [
  368. {
  369. name:'订单数',
  370. type:'line',
  371. stack: '总量',
  372. symbol:'circle',
  373. symbolSize: 8,
  374. itemStyle: {
  375. normal: {
  376. color:'#15EB87',
  377. lineStyle: {
  378. color: "#15EB87",
  379. width:1
  380. },
  381. areaStyle: {
  382. //color: '#94C9EC'
  383. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  384. offset: 0,
  385. color: 'rgba(21,235,135,0.3)'
  386. }, {
  387. offset: 1,
  388. color: 'rgba(21,235,135,0.1)'
  389. }]),
  390. }
  391. }
  392. },
  393. markPoint:{
  394. itemStyle:{
  395. normal:{
  396. color:'red'
  397. }
  398. }
  399. },
  400. data:orderTrend.value.orderCount
  401. },
  402. {
  403. name:'保费',
  404. type:'line',
  405. stack: '总量',
  406. symbol:'circle',
  407. symbolSize: 8,
  408. itemStyle: {
  409. normal: {
  410. color:'#14D5E1',
  411. lineStyle: {
  412. color: "#14D5E1",
  413. width:1
  414. },
  415. areaStyle: {
  416. //color: '#94C9EC'
  417. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  418. offset: 0,
  419. color: 'rgba(20,213,225,0.3)'
  420. }, {
  421. offset: 1,
  422. color: 'rgba(20,213,225,0.1)'
  423. }]),
  424. }
  425. }
  426. },
  427. data:orderTrend.value.premium
  428. }
  429. ]
  430. };
  431. myChart.setOption(option)
  432. window.addEventListener('resize', () => {
  433. myChart.resize()
  434. })
  435. }
  436. // 业务漏斗
  437. let FunnelRef = ref()
  438. const initFunnel = () => {
  439. const myChart = echarts.init(FunnelRef.value)
  440. let colors=['#20c8ff','#2cb7ff','#1785ef'];
  441. let option = {
  442. backgroundColor:'#ffffff',
  443. color:colors,
  444. tooltip: {
  445. trigger: "axis",
  446. axisPointer: {
  447. type: "cross",
  448. label: {
  449. backgroundColor: "red"
  450. },
  451. lineStyle: {
  452. color: "#9eb2cb"
  453. }
  454. }
  455. },
  456. legend: {
  457. show:false,
  458. top: "top",
  459. left: "2%",
  460. textStyle: {
  461. color: "#000"
  462. },
  463. itemHeight: 2,
  464. data: ['报价订单','核保订单','承保订单']
  465. },
  466. grid: {
  467. top: 24,
  468. left: "2%",
  469. right: 20,
  470. bottom: 30,
  471. containLabel: true,
  472. borderWidth: 0.5
  473. },
  474. series: [
  475. {
  476. top:40,
  477. type: 'funnel',
  478. left: '10%',
  479. width: '80%',
  480. bottom: 0,
  481. gap: 16,
  482. minSize: 150,
  483. maxSize: 410,
  484. label: {
  485. show: true,
  486. color: '#ffffff',
  487. position: 'inside',
  488. formatter: '{c}%'
  489. },
  490. data: businessFunnelRadio.value
  491. },
  492. {
  493. top:40,
  494. type: 'funnel',
  495. left: '10%',
  496. width: '80%',
  497. gap: 16,
  498. bottom: 0,
  499. z:1,
  500. minSize: 150,
  501. maxSize: 150,
  502. label: {
  503. normal: {
  504. color: '#333333',
  505. position: 'right',
  506. formatter: '{b}{c}'
  507. },
  508. },
  509. //右侧的百分比显示的地方
  510. labelLine: {
  511. show:true,
  512. normal: {
  513. length: 200,
  514. position: 'right',
  515. lineStyle: {
  516. width: 1,
  517. color:'#999999',
  518. type:'solid'
  519. },
  520. },
  521. },
  522. //主体是透明的
  523. itemStyle: {
  524. normal: {
  525. color: 'transparent',
  526. borderWidth:0,
  527. opacity: 1
  528. }
  529. },
  530. data: businessFunnel.value
  531. }
  532. ]
  533. };
  534. myChart.setOption(option)
  535. window.addEventListener('resize', () => {
  536. myChart.resize()
  537. })
  538. }
  539. // 业务类型分布
  540. let PieRef = ref()
  541. const initPie = () => {
  542. const myChart = echarts.init(PieRef.value)
  543. let option = {
  544. legend: {
  545. top: 'bottom'
  546. },
  547. series: [
  548. {
  549. name: 'Nightingale Chart',
  550. type: 'pie',
  551. radius: [40, 100],
  552. center: ['50%', '50%'],
  553. roseType: 'area',
  554. color: ["#3BD5DC", "#26A8FF", "#FFC61B"],
  555. data: distributionData.value,
  556. label: {
  557. show: true,
  558. formatter: '{b}{c}%'
  559. }
  560. }
  561. ]
  562. };
  563. myChart.setOption(option)
  564. window.addEventListener('resize', () => {
  565. myChart.resize()
  566. })
  567. }
  568. // 今日数据
  569. let dailyData = ref({
  570. insuranceIssuersCount: '',
  571. insuranceIssuersCountChange: '',
  572. orderQuantity: '',
  573. orderQuantityChange: '',
  574. premium: '',
  575. premiumChange: '',
  576. quoteCount: '',
  577. quoteCountChange: ''
  578. })
  579. const initDailyData = () => {
  580. api.homeApi.dailyData().then((res: any) => {
  581. if(res.code == 200) {
  582. dailyData.value = res.data
  583. } else {
  584. dailyData.value = {
  585. insuranceIssuersCount: '',
  586. insuranceIssuersCountChange: '',
  587. orderQuantity: '',
  588. orderQuantityChange: '',
  589. premium: '',
  590. premiumChange: '',
  591. quoteCount: '',
  592. quoteCountChange: ''
  593. }
  594. }
  595. })
  596. }
  597. let orderTrend = ref({
  598. xAxis: [],
  599. orderCount: [],
  600. premium: []
  601. })
  602. const initOrderTrend = () => {
  603. api.homeApi.orderTrend().then((res: any) => {
  604. if(res.code == 200) {
  605. res.data?.forEach(item => {
  606. orderTrend.value.xAxis.push(`${item.month}月`)
  607. orderTrend.value.orderCount.push(item.orderCount)
  608. orderTrend.value.premium.push(item.premium)
  609. })
  610. } else {
  611. orderTrend.value = {
  612. xAxis: [],
  613. orderCount: [],
  614. premium: []
  615. }
  616. }
  617. initTrend()
  618. })
  619. }
  620. let businessFunnel = ref([])
  621. let businessFunnelRadio = ref([])
  622. const initBusinessFunnel = () => {
  623. api.homeApi.businessFunnel().then((res: any) => {
  624. if(res.code == 200) {
  625. businessFunnel.value = [
  626. {
  627. value: res.data.quoteCount,
  628. name: '报价订单'
  629. },{
  630. value: res.data.underwriteCount,
  631. name: '核保订单'
  632. },{
  633. value: res.data.orderCount,
  634. name: '承保订单'
  635. },
  636. ]
  637. businessFunnelRadio.value = [
  638. {
  639. value: res.data.quoteToUnderwriteRatio,
  640. name: '报价订单'
  641. },{
  642. value: res.data.underwriteToOrderRatio,
  643. name: '核保订单'
  644. },{
  645. value: res.data.quoteToOrderRatio,
  646. name: '承保订单'
  647. },
  648. ]
  649. } else {
  650. businessFunnel.value = []
  651. businessFunnelRadio.value = []
  652. }
  653. initFunnel();
  654. })
  655. }
  656. let distributionData = ref([])
  657. const initDistribution = () => {
  658. api.homeApi.distribution().then((res: any) => {
  659. if(res.code == 200) {
  660. distributionData.value = [
  661. {
  662. name: '交强险',
  663. value: res.data.ciProportion || 0
  664. },{
  665. name: '商业险',
  666. value: res.data.biProportion || 0
  667. },{
  668. name: '驾意险',
  669. value: res.data.niProportion || 0
  670. },
  671. ]
  672. } else {
  673. distributionData.value = []
  674. }
  675. initPie()
  676. })
  677. }
  678. let chinaMapData = ref([])
  679. let subMapData = ref([])
  680. let provinceStr = ref('')
  681. let provinceName = ref('')
  682. const initBusinessDistribution = () => {
  683. api.homeApi.businessDistribution(provinceStr.value).then((res: any) => {
  684. if(!provinceStr.value) {
  685. if(res.code == 200) {
  686. chinaMapData.value = res.data?.map(item => {
  687. return {
  688. name: item.areaCname,
  689. code: item.areaCode,
  690. value: item.totalSalesmanCount,
  691. personalAgentCount: item.personalAgentCount,
  692. channelSalesmanCount: item.channelSalesmanCount
  693. }
  694. })
  695. } else {
  696. chinaMapData.value = []
  697. }
  698. initChinaMap()
  699. } else {
  700. if(res.code == 200) {
  701. subMapData.value = res.data?.map(item => {
  702. return {
  703. name: item.areaCname,
  704. code: item.areaCode,
  705. value: item.totalSalesmanCount,
  706. personalAgentCount: item.personalAgentCount,
  707. channelSalesmanCount: item.channelSalesmanCount
  708. }
  709. })
  710. } else {
  711. subMapData.value = []
  712. }
  713. initCityMap(provinceName.value)
  714. }
  715. })
  716. }
  717. let functionsList = ref([])
  718. const initCommonFunctions = () => {
  719. api.homeApi.commonFunctions().then((res:any) => {
  720. if(res.code == 200) {
  721. functionsList.value = res.data
  722. } else {
  723. functionsList.value = []
  724. }
  725. })
  726. }
  727. const handleRouterChange = (item, index) => {
  728. myRouter.push({
  729. name: item.name,
  730. })
  731. }
  732. onMounted(() => {
  733. let userInfo = JSON.parse(localStorage.getItem('userInfo'))
  734. if(userInfo?.province) {
  735. initCityMap(userInfo?.province);
  736. }
  737. initDailyData();
  738. initOrderTrend();
  739. initBusinessFunnel();
  740. initDistribution();
  741. initBusinessDistribution();
  742. initCommonFunctions();
  743. // initChinaMap();
  744. // initTrend();
  745. // initFunnel();
  746. // initPie();
  747. })
  748. </script>
  749. <template>
  750. <div>
  751. <!-- <PageHeader>
  752. <template #title>
  753. <div class="flex items-center gap-4">
  754. 欢迎使用 Fantastic-admin
  755. </div>
  756. </template>
  757. <template #content>
  758. <div class="text-sm/6">
  759. <div>
  760. 这是一款<b class="text-emphasis">开箱即用</b>的中后台框架,同时它也经历过数十个真实项目的技术沉淀,确保框架在开发中可落地、可使用、可维护
  761. </div>
  762. <div>
  763. 注:在作者就职过的公司,本框架已在电商、直播、OA、ERP等多个不同领域的中后台系统中应用并稳定运行
  764. </div>
  765. </div>
  766. </template>
  767. <HButton outline @click="open('https://fantastic-admin.hurui.me')">
  768. <SvgIcon name="i-ri:file-text-line" />
  769. 开发文档
  770. </HButton>
  771. <HDropdownMenu
  772. :items="[
  773. [
  774. { label: 'Gitee', handle: () => open('https://gitee.com/fantastic-admin/basic') },
  775. { label: 'Github', handle: () => open('https://github.com/fantastic-admin/basic') },
  776. ],
  777. ]"
  778. >
  779. <HButton class="ml-2">
  780. <SvgIcon name="i-ri:code-s-slash-line" />
  781. 代码仓库
  782. <SvgIcon name="i-ep:arrow-down" />
  783. </HButton>
  784. </HDropdownMenu>
  785. </PageHeader>-->
  786. <div class="w-full">
  787. <PageMain class="ecology">
  788. <div class="title">今日数据</div>
  789. <div class="dataList">
  790. <div class="item">
  791. <div class="name">
  792. 今日保费(万元)
  793. </div>
  794. <div class="data">
  795. <span class="number">
  796. {{ dailyData.premium }}
  797. </span>
  798. <span class="line">
  799. 较昨日<img :src="dailyData.premiumChange > 0?up: down" />{{ dailyData.premiumChange || 0 }}%
  800. </span>
  801. </div>
  802. </div>
  803. <div class="item">
  804. <div class="name">
  805. 今日承保订单数(笔)
  806. </div>
  807. <div class="data">
  808. <span class="number">
  809. {{ dailyData.orderQuantity }}
  810. </span>
  811. <span class="line">
  812. 较昨日<img :src="dailyData.orderQuantityChange > 0?up: down" />{{ dailyData.orderQuantityChange || 0 }}%
  813. </span>
  814. </div>
  815. </div>
  816. <div class="item">
  817. <div class="name">
  818. 今日出单业务员(人)
  819. </div>
  820. <div class="data">
  821. <span class="number">
  822. {{ dailyData.insuranceIssuersCount }}
  823. </span>
  824. <span class="line">
  825. 较昨日<img :src="dailyData.insuranceIssuersCountChange > 0?up: down" />{{ dailyData.insuranceIssuersCountChange || 0 }}%
  826. </span>
  827. </div>
  828. </div>
  829. <div class="item">
  830. <div class="name">
  831. 今日报价次数(次)
  832. </div>
  833. <div class="data">
  834. <span class="number">
  835. {{ dailyData.quoteCount }}
  836. </span>
  837. <span class="line">
  838. 较昨日<img :src="dailyData.quoteCountChange > 0?up: down" />{{ dailyData.quoteCountChange || 0 }}%
  839. </span>
  840. </div>
  841. </div>
  842. </div>
  843. </PageMain>
  844. <PageMain class="ecology">
  845. <div class="title">常用功能</div>
  846. <div class="functionList">
  847. <div class="item" v-for="(item, index) in functionsList" :key="item.id" @click="handleRouterChange(item, index)">
  848. <img class="icon" :src="item.ican" />
  849. <div class="name">{{ item.title }}</div>
  850. </div>
  851. </div>
  852. </PageMain>
  853. <div class="mapBox">
  854. <div class="map">
  855. <div class="title">业务员分布</div>
  856. <div class="chinaMap" ref="ChinaMap"></div>
  857. </div>
  858. <div class="level">
  859. <div class="title">市级</div>
  860. <div class="cityMap" ref="CityMap"></div>
  861. </div>
  862. </div>
  863. <PageMain class="ecology">
  864. <div class="title">出单趋势</div>
  865. <div class="orderTrend" ref="TrendRef"></div>
  866. </PageMain>
  867. <div class="otherBox">
  868. <div class="funnel">
  869. <div class="title">业务漏斗</div>
  870. <div class="chinaMap" ref="FunnelRef"></div>
  871. </div>
  872. <div class="pie">
  873. <div class="title">业务类型分布</div>
  874. <div class="cityMap" ref="PieRef"></div>
  875. </div>
  876. </div>
  877. </div>
  878. </div>
  879. </template>
  880. <style lang="scss">
  881. .w-full {
  882. .title{
  883. border-left: 4px solid #0083FF;
  884. height: 18px;
  885. color: #333333;
  886. font-size: 18px;
  887. font-weight: 500;
  888. display: flex;
  889. align-items: center;
  890. padding-left: 10px;
  891. }
  892. .dataList{
  893. display: flex;
  894. align-items: center;
  895. justify-content: space-between;
  896. margin-top: 24px;
  897. .item{
  898. background: #F9FCFF;
  899. padding: 16px 12px;
  900. border-radius: 6px;
  901. width: calc(25% - 5px);
  902. .name{
  903. color: #666666;
  904. font-weight: 400;
  905. font-size: 16px;
  906. margin-bottom: 12px;
  907. }
  908. .data{
  909. display: flex;
  910. justify-content: flex-start;
  911. .number{
  912. color: #333333;
  913. font-weight: 600;
  914. font-size: 24px;
  915. }
  916. .line{
  917. display: flex;
  918. align-items: center;
  919. justify-content: flex-start;
  920. font-size: 14px;
  921. color: #666666;
  922. margin-left: 10px;
  923. img{
  924. width: 14px;
  925. height: 14px;
  926. margin: 0 2px;
  927. }
  928. }
  929. }
  930. }
  931. }
  932. .functionList{
  933. display: flex;
  934. align-items: center;
  935. justify-content: space-between;
  936. margin-top: 24px;
  937. .item{
  938. .icon{
  939. display: block;
  940. width: 60px;
  941. height: 60px;
  942. margin: 0 auto 12px;
  943. }
  944. .name{
  945. color: #333333;
  946. font-size: 18px;
  947. }
  948. }
  949. }
  950. .mapBox, .otherBox{
  951. display: flex;
  952. align-items: center;
  953. justify-content: space-between;
  954. margin: 16px;
  955. .map, .level{
  956. width: calc(50% - 5px);
  957. background: #ffffff;
  958. padding: 24px;
  959. .chinaMap, .cityMap{
  960. width: 100%;
  961. height: 550px;
  962. }
  963. }
  964. .funnel, .pie{
  965. width: calc(50% - 5px);
  966. background: #ffffff;
  967. padding: 24px;
  968. .chinaMap, .cityMap{
  969. width: 100%;
  970. height: 300px;
  971. }
  972. }
  973. }
  974. .orderTrend{
  975. width: 100%;
  976. height: 400px;
  977. margin-top: 24px;
  978. }
  979. }
  980. </style>