sceneReport.vue 55 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934
  1. <template>
  2. <div class="report_box">
  3. <div class="pdf_box" ref="pdfContent">
  4. <!-- 报告封面 -->
  5. <div class="report_banner">
  6. <h1>场景评价报告</h1>
  7. <div class="report_table">
  8. <div class="table_item">
  9. <p>场景测试包:</p>
  10. <span>{{ info.projectName }}</span>
  11. </div>
  12. <div class="table_item">
  13. <p>场景数量:</p>
  14. <span>{{ info.sceneNum }}</span>
  15. </div>
  16. <div class="table_item">
  17. <p>算法名称:</p>
  18. <span>{{ info.algorithmName }}</span>
  19. </div>
  20. <div class="table_item tiem-last">
  21. <p>报告时间:</p>
  22. <span>{{ info.finishTime }}</span>
  23. </div>
  24. </div>
  25. <h4>国汽(北京)智能网联汽车研究院有限公司</h4>
  26. </div>
  27. <!-- 评价报告 -->
  28. <div class="report_content">
  29. <h3>评价报告</h3>
  30. <p class="subtitle">一、测试得分说明</p>
  31. <p class="text">
  32. 针对<span style="border-bottom: 2px solid red">{{
  33. info.algorithmName
  34. }}</span
  35. >,进行场景的算法验证,共有{{
  36. Number(info.scenePassNum)
  37. }}例场景通过,通过率{{ Number(info.passRate) * 100 }}%。其中<span
  38. style="border-bottom: 2px solid red"
  39. >{{ info.packageName }}</span
  40. >的场景复杂度、危险度分布结果如下图所示。
  41. </p>
  42. <!-- 复杂度图表 -->
  43. <div class="echart-box" ref="myChart_complex"></div>
  44. <p class="echart_desc">图1-1 复杂度分布图</p>
  45. <!-- 危险度图表 -->
  46. <div class="echart-box" ref="myChart_risk"></div>
  47. <p class="echart_desc">图1-2 危险度分布图</p>
  48. <p class="text">
  49. 复杂度/危险度分数与复杂度/危险度等级的对应关系见附录。算法在不同复杂度/危险度等级的结果分布图如下。正常情况下评价等级越高则算法通过的数量越少,该图可判断场景评价和算法评价的合理性。
  50. </p>
  51. <!-- 算法不同复杂度等级分布图表 -->
  52. <div class="echart-box" ref="myChart_complex_scale"></div>
  53. <p class="echart_desc">图1-3 算法在不同复杂度等级的结果分布图</p>
  54. <!-- 算法不同危险度等级分布图表 -->
  55. <div class="echart-box" ref="myChart_risk_scale"></div>
  56. <p class="echart_desc">图1-4 算法在不同危险度等级的结果分布图</p>
  57. <p class="subtitle">二、场景分布情况</p>
  58. <p class="text">
  59. 本次场景评价涉及场景{{ Number(info.sceneNum) }}例,共{{
  60. Number(info.sceneNum)
  61. }}类基准场景类别。具体参数分布情况如下:
  62. </p>
  63. <p class="text">1)他车动作</p>
  64. <p class="text">他车动作共涵盖直行、汇入等,分布图如下:</p>
  65. <!-- 他车动作分布图表 -->
  66. <div class="echart-box" ref="myChart_othcar_scale"></div>
  67. <p class="echart_desc">图2-1 他车动作类别分布图</p>
  68. <p class="text">
  69. 危险度或复杂度在不同他车动作类别的结果分布如下图所示,根据分布图可对场景生成算法进行调整。例如对于全部是复杂度高或者复杂度低的场景,需要对参数或类别有所调整,使生成的场景更加合理,更好的服务于算法迭代。
  70. </p>
  71. <!-- 危险度他车分布图表 -->
  72. <div class="echart-box" ref="myChart_risk_othcar_scale"></div>
  73. <p class="echart_desc">图2-2 危险度在不同他车动作类别的结果分布图</p>
  74. <!-- 复杂度他车分布图表 -->
  75. <div class="echart-box" ref="myChart_complex_othcar_scale"></div>
  76. <p class="echart_desc">图2-3 复杂度在不同他车动作类别的结果分布图</p>
  77. <p class="text">2)天气条件</p>
  78. <p class="text">
  79. 天气包含晴天、雨天共{{
  80. Object.keys(info.weatherTypeForNum || {}).length || ''
  81. }}类,分布图如下:
  82. </p>
  83. <!-- 天气分布 -->
  84. <div class="echart-box" ref="myChart_weather_scale"></div>
  85. <p class="echart_desc">图2-4 天气分布图</p>
  86. <p class="text">
  87. 危险度或复杂度在不同他车动作类别的结果分布如下图所示,根据分布图可对场景生成算法进行调整。例如对于全部是复杂度高或者复杂度低的场景,可对参数或类别有所调整,使生成的场景更加合理,更好的服务于算法迭代。
  88. </p>
  89. <!-- 危险度天气分布图表 -->
  90. <div class="echart-box" ref="myChart_risk_weather_scale"></div>
  91. <p class="echart_desc">图2-5 危险度在不同天气类别下的结果分布图</p>
  92. <!-- 复杂度天气分布图表 -->
  93. <div class="echart-box" ref="myChart_complex_weather_scale"></div>
  94. <p class="echart_desc">图2-6 复杂度在不同天气下的结果分布图</p>
  95. <p class="text">3)道路条件</p>
  96. <p class="text">
  97. 覆盖道路类型为城市普通道路、高速道路,运行区域主要为主路…,道路类型、运行区域、平面几何和纵断面几何的场景分布情况如下:
  98. </p>
  99. <!-- 道路类型分布 -->
  100. <div class="echart-box" ref="myChart_roadtype_scale"></div>
  101. <p class="echart_desc">图2-7 道路类型分布图</p>
  102. <!-- 运行区域分布图 -->
  103. <div class="echart-box" ref="myChart_region_scale"></div>
  104. <p class="echart_desc">图2-8 运行区域分布图</p>
  105. <!-- 道路几何-平面分布图 -->
  106. <div class="echart-box" ref="myChart_roadplane_scale"></div>
  107. <p class="echart_desc">图2-9 道路几何-平面分布图</p>
  108. <!-- 道路几何-纵断面分布图 -->
  109. <div class="echart-box" ref="myChart_roadportrait_scale"></div>
  110. <p class="echart_desc">图2-10 道路几何-纵断面分布图</p>
  111. <p class="text">
  112. 危险度或复杂度在不同他车动作类别的结果分布如下图所示,根据分布图可对场景生成算法进行调整。例如对于全部是复杂度高或者复杂度低的场景,可对参数或类别有所调整,使生成的场景更加合理,更好的服务于算法迭代。
  113. </p>
  114. <!-- 危险度不同运行区域分布图 -->
  115. <div class="echart-box" ref="myChart_risk_region_scale"></div>
  116. <p class="echart_desc">图2-11危险度在不同运行区域下的结果分布图</p>
  117. <!-- 复杂度不同运行区域分布图 -->
  118. <div class="echart-box" ref="myChart_complex_region_scale"></div>
  119. <p class="echart_desc">图2-12 复杂度在不同运行区域下的结果分布图</p>
  120. <!-- 危险度不同运行区域分布图 -->
  121. <div class="echart-box" ref="myChart_risk_road_scale"></div>
  122. <p class="echart_desc">图2-13 危险度在不同道路平面下的结果分布图</p>
  123. <!-- 复杂度不同运行区域分布图 -->
  124. <div class="echart-box" ref="myChart_complex_road_scale"></div>
  125. <p class="echart_desc">图2-14复杂度在不同道路平面下的结果分布图</p>
  126. <!-- 危险度不同纵断面分布图 -->
  127. <div class="echart-box" ref="myChart_risk_roadportrait_scale"></div>
  128. <p class="echart_desc">图2-15 危险度在不同道路纵断面下的结果分布图</p>
  129. <!-- 复杂度不同纵断面分布图 -->
  130. <div class="echart-box" ref="myChart_complex_roadportrait_scale"></div>
  131. <p class="echart_desc">图2-16 复杂度在不同道路纵断面下的结果分布图</p>
  132. <p class="subtitle">三、算法表现分析</p>
  133. <p class="text">
  134. 算法在不同他车动作类别的结果分布,主要是看在不同类别下算法的表现是否会不同,通过性场景的多少对于算法以后选择场景类型有指导性意义。
  135. </p>
  136. <!-- 算法在不同他车动作结果分布图 -->
  137. <div class="echart-box" ref="myChart_algorithm_othcar_scale"></div>
  138. <p class="echart_desc">
  139. 图3-1 算法在不同他车动作类别与运行区域的结果分布
  140. </p>
  141. <!-- 算法在不同天气类型结果分布图 -->
  142. <div class="echart-box" ref="myChart_algorithm_weather_scale"></div>
  143. <p class="echart_desc">图3-2 算法在不同天气类别与运行区域的结果分布</p>
  144. <!-- 算法在不同道路结果分布图 -->
  145. <div class="echart-box" ref="myChart_algorithm_road_scale"></div>
  146. <p class="echart_desc">图3-3 算法在不同道路平面与纵断面的结果分布</p>
  147. <p class="subtitle">四、详细评分情况</p>
  148. <p class="text">
  149. {{ info.algorithmName }}算法在{{
  150. Number(info.sceneNum)
  151. }}类场景的详细得分情况见表4-1
  152. </p>
  153. <p class="echart_desc">表4-1 评价结果表</p>
  154. <el-table :data="tableDataA" border style="width: 100%">
  155. <el-table-column
  156. v-for="item in tableColumnA"
  157. :prop="item.key"
  158. :label="item.label"
  159. >
  160. </el-table-column>
  161. </el-table>
  162. <p class="subtitle">附录</p>
  163. <p class="echart_desc">表5-1 评价结果表</p>
  164. <el-table :data="tableDataB" border style="width: 100%">
  165. <el-table-column
  166. v-for="item in tableColumnB"
  167. :prop="item.key"
  168. :label="item.label"
  169. >
  170. </el-table-column>
  171. </el-table>
  172. <el-table
  173. :data="tableDataC"
  174. border
  175. style="width: 100%; margin-top: 50px"
  176. >
  177. <el-table-column
  178. v-for="item in tableColumnC"
  179. :prop="item.key"
  180. :label="item.label"
  181. >
  182. </el-table-column>
  183. </el-table>
  184. </div>
  185. </div>
  186. <el-button @click="down" type="primary">下载</el-button>
  187. </div>
  188. </template>
  189. <script>
  190. import html2canvas from 'html2canvas'
  191. import jsPDF from 'jspdf'
  192. import * as echarts from 'echarts'
  193. export default {
  194. name:'sceneReport',
  195. data() {
  196. return {
  197. tableColumnA: [
  198. {
  199. label: '场景名称',
  200. key: 'sceneName',
  201. },
  202. {
  203. label: '复杂度分值',
  204. key: 'complexity',
  205. },
  206. {
  207. label: '复杂度等级',
  208. key: 'complexityLevel',
  209. },
  210. {
  211. label: '危险度分值',
  212. key: 'risk',
  213. },
  214. {
  215. label: '危险度等级',
  216. key: 'riskLevel',
  217. },
  218. {
  219. label: '算法得分',
  220. key: 'scoreResult',
  221. },
  222. ],
  223. tableColumnB: [
  224. {
  225. label: '复杂度分值',
  226. key: 'a',
  227. },
  228. {
  229. label: '复杂度等级',
  230. key: 'b',
  231. },
  232. ],
  233. tableColumnC: [
  234. {
  235. label: '危险度分值',
  236. key: 'a',
  237. },
  238. {
  239. label: '危险度等级',
  240. key: 'b',
  241. },
  242. ],
  243. tableDataA: [],
  244. tableDataB: [
  245. { a: '(75,inf]', b: 'A' },
  246. { a: '(50,75]', b: 'B' },
  247. { a: '(25,50]', b: 'C' },
  248. { a: '[0,25]', b: 'D' },
  249. ],
  250. tableDataC: [
  251. { a: '(75,inf]', b: 'A' },
  252. { a: '(50,75]', b: 'B' },
  253. { a: '(25,50]', b: 'C' },
  254. { a: '[0,25]', b: 'D' },
  255. ],
  256. info: {}, // 报告数据
  257. }
  258. },
  259. mounted() {
  260. const { id, projectType } = this.$route.query
  261. this.getReportDetail(id, projectType)
  262. },
  263. methods: {
  264. // 获取报告
  265. getReportDetail(id, projectType) {
  266. this.$axios({
  267. method: 'post',
  268. url: this.$api.workManagement.getStandardTestReport,
  269. data: { id, projectType },
  270. }).then((res) => {
  271. if (res.code == 200) {
  272. this.info = res.info
  273. this.tableDataA = res.info.manualProjectTaskVos
  274. this.echartInit(res.info)
  275. } else {
  276. this.$message.error('获取失败', res.message)
  277. }
  278. })
  279. },
  280. // 图表初始化
  281. echartInit(info) {
  282. const chart_complex = echarts.init(this.$refs.myChart_complex) // 复杂度分布图
  283. const chart_risk = echarts.init(this.$refs.myChart_risk) // 危险度分布图
  284. const chart_complex_scale = echarts.init(this.$refs.myChart_complex_scale) // 算法复杂度分布
  285. const chart_risk_scale = echarts.init(this.$refs.myChart_risk_scale) // 算法危险度分布
  286. const chart_othcar_scale = echarts.init(this.$refs.myChart_othcar_scale) // 他车动作类别分布图
  287. const chart_risk_othcar_scale = echarts.init(
  288. this.$refs.myChart_risk_othcar_scale
  289. ) // 危险度他车动作分布
  290. const chart_complex_othcar_scale = echarts.init(
  291. this.$refs.myChart_complex_othcar_scale
  292. ) // 复杂度他车动作分布
  293. const chart_weather_scale = echarts.init(this.$refs.myChart_weather_scale) // 天气分布
  294. const chart_complex_weather_scale = echarts.init(
  295. this.$refs.myChart_complex_weather_scale
  296. ) // 复杂度天气分布
  297. const chart_risk_weather_scale = echarts.init(
  298. this.$refs.myChart_risk_weather_scale
  299. ) // 危险度天气分布
  300. const chart_roadtype_scale = echarts.init(
  301. this.$refs.myChart_roadtype_scale
  302. ) // 道路类型分布
  303. const chart_region_scale = echarts.init(this.$refs.myChart_region_scale) // 运行区域分布图
  304. const chart_roadplane_scale = echarts.init(
  305. this.$refs.myChart_roadplane_scale
  306. ) // 道路平面分布
  307. const chart_roadportrait_scale = echarts.init(
  308. this.$refs.myChart_roadportrait_scale
  309. ) // 道路纵断分布
  310. const chart_risk_region_scale = echarts.init(
  311. this.$refs.myChart_risk_region_scale
  312. ) // 危险度不同运行区域分布
  313. const chart_complex_region_scale = echarts.init(
  314. this.$refs.myChart_complex_region_scale
  315. ) // 复杂度不同运行区域分布
  316. const chart_risk_road_scale = echarts.init(
  317. this.$refs.myChart_risk_road_scale
  318. ) // 危险度不同道路分布
  319. const chart_complex_road_scale = echarts.init(
  320. this.$refs.myChart_complex_road_scale
  321. ) // 复杂度不同道路分布
  322. const chart_risk_roadportrait_scale = echarts.init(
  323. this.$refs.myChart_risk_roadportrait_scale
  324. ) // 危险度不同道路分布
  325. const chart_complex_roadportrait_scale = echarts.init(
  326. this.$refs.myChart_complex_roadportrait_scale
  327. ) // 复杂度不同道路分布
  328. const chart_algorithm_othcar_scale = echarts.init(
  329. this.$refs.myChart_algorithm_othcar_scale
  330. ) // 算法在不同他车动作类别分布
  331. const chart_algorithm_weather_scale = echarts.init(
  332. this.$refs.myChart_algorithm_weather_scale
  333. ) // 算法在不同天气类别分布
  334. const chart_algorithm_road_scale = echarts.init(
  335. this.$refs.myChart_algorithm_road_scale
  336. ) // 算法在不同道路类别分布
  337. /*************************************/
  338. chart_complex.setOption({
  339. tooltip: {
  340. trigger: 'axis',
  341. axisPointer: {
  342. type: 'shadow',
  343. },
  344. },
  345. legend: {},
  346. xAxis: {
  347. type: 'category',
  348. data: [
  349. '0-10',
  350. '10-20',
  351. '20-30',
  352. '30-40',
  353. '40-50',
  354. '50-60',
  355. '60-70',
  356. '70-80',
  357. '80-90',
  358. '90-100',
  359. ],
  360. },
  361. yAxis: {
  362. type: 'value',
  363. },
  364. series: [
  365. {
  366. data: [
  367. info.compRange['[0,10]'] || null,
  368. info.compRange['(10,20]'] || null,
  369. info.compRange['(20,30]'] || null,
  370. info.compRange['(30,40]'] || null,
  371. info.compRange['(40,50]'] || null,
  372. info.compRange['(50,60]'] || null,
  373. info.compRange['(60,70]'] || null,
  374. info.compRange['(70,80]'] || null,
  375. info.compRange['(80,90]'] || null,
  376. info.compRange['(90,100]'] || null,
  377. ],
  378. type: 'bar',
  379. label: {
  380. show: true, // 显示数值
  381. position: 'top', // 数值显示的位置
  382. },
  383. },
  384. ],
  385. })
  386. chart_risk.setOption({
  387. tooltip: {
  388. trigger: 'axis',
  389. axisPointer: {
  390. type: 'shadow',
  391. },
  392. },
  393. legend: {},
  394. xAxis: {
  395. type: 'category',
  396. data: [
  397. '0-10',
  398. '10-20',
  399. '20-30',
  400. '30-40',
  401. '40-50',
  402. '50-60',
  403. '60-70',
  404. '70-80',
  405. '80-90',
  406. '90-100',
  407. '100-inf',
  408. ],
  409. },
  410. yAxis: {
  411. type: 'value',
  412. },
  413. series: [
  414. {
  415. data: [
  416. info.riskRange['[0,10]'] || null,
  417. info.riskRange['(10,20]'] || null,
  418. info.riskRange['(20,30]'] || null,
  419. info.riskRange['(30,40]'] || null,
  420. info.riskRange['(40,50]'] || null,
  421. info.riskRange['(50,60]'] || null,
  422. info.riskRange['(60,70]'] || null,
  423. info.riskRange['(70,80]'] || null,
  424. info.riskRange['(80,90]'] || null,
  425. info.riskRange['(90,100]'] || null,
  426. info.riskRange['(100,+∞)'] || null,
  427. ],
  428. type: 'bar',
  429. label: {
  430. show: true, // 显示数值
  431. position: 'top', // 数值显示的位置
  432. },
  433. },
  434. ],
  435. })
  436. /** */
  437. chart_complex_scale.setOption({
  438. legend: {},
  439. tooltip: {
  440. trigger: 'axis',
  441. axisPointer: {
  442. type: 'shadow',
  443. },
  444. },
  445. legend: {},
  446. grid: {
  447. left: '3%',
  448. right: '4%',
  449. bottom: '3%',
  450. containLabel: true,
  451. },
  452. yAxis: {
  453. type: 'value',
  454. },
  455. xAxis: {
  456. type: 'category',
  457. data: ['A', 'B', 'C', 'D'],
  458. },
  459. series: [
  460. {
  461. name: '不通过',
  462. type: 'bar',
  463. stack: 'total',
  464. label: {
  465. show: true,
  466. },
  467. emphasis: {
  468. focus: 'series',
  469. },
  470. data: [
  471. info.compLevelForPassNum['A']
  472. ? info.compLevelForPassNum['A'].unPassNum
  473. : null,
  474. info.compLevelForPassNum['B']
  475. ? info.compLevelForPassNum['B'].unPassNum
  476. : null,
  477. info.compLevelForPassNum['C']
  478. ? info.compLevelForPassNum['C'].unPassNum
  479. : null,
  480. info.compLevelForPassNum['D']
  481. ? info.compLevelForPassNum['D'].unPassNum
  482. : null,
  483. ],
  484. },
  485. {
  486. name: '通过',
  487. type: 'bar',
  488. stack: 'total',
  489. label: {
  490. show: true,
  491. },
  492. emphasis: {
  493. focus: 'series',
  494. },
  495. data: [
  496. info.compLevelForPassNum['A']
  497. ? info.compLevelForPassNum['A'].passNum
  498. : null,
  499. info.compLevelForPassNum['B']
  500. ? info.compLevelForPassNum['B'].passNum
  501. : null,
  502. info.compLevelForPassNum['C']
  503. ? info.compLevelForPassNum['C'].passNum
  504. : null,
  505. info.compLevelForPassNum['D']
  506. ? info.compLevelForPassNum['D'].passNum
  507. : null,
  508. ],
  509. },
  510. ],
  511. })
  512. chart_risk_scale.setOption({
  513. tooltip: {
  514. trigger: 'axis',
  515. axisPointer: {
  516. type: 'shadow',
  517. },
  518. },
  519. legend: {},
  520. grid: {
  521. left: '3%',
  522. right: '4%',
  523. bottom: '3%',
  524. containLabel: true,
  525. },
  526. yAxis: {
  527. type: 'value',
  528. },
  529. xAxis: {
  530. type: 'category',
  531. data: ['A', 'B', 'C', 'D'],
  532. },
  533. series: [
  534. {
  535. name: '不通过',
  536. type: 'bar',
  537. stack: 'total',
  538. label: {
  539. show: true,
  540. },
  541. emphasis: {
  542. focus: 'series',
  543. },
  544. data: [
  545. info.riskLevelForPassNum['A']
  546. ? info.riskLevelForPassNum['A'].unPassNum
  547. : null,
  548. info.riskLevelForPassNum['B']
  549. ? info.riskLevelForPassNum['B'].unPassNum
  550. : null,
  551. info.riskLevelForPassNum['C']
  552. ? info.riskLevelForPassNum['C'].unPassNum
  553. : null,
  554. info.riskLevelForPassNum['D']
  555. ? info.riskLevelForPassNum['D'].unPassNum
  556. : null,
  557. ],
  558. },
  559. {
  560. name: '通过',
  561. type: 'bar',
  562. stack: 'total',
  563. label: {
  564. show: true,
  565. },
  566. emphasis: {
  567. focus: 'series',
  568. },
  569. data: [
  570. info.riskLevelForPassNum['A']
  571. ? info.riskLevelForPassNum['A'].passNum
  572. : null,
  573. info.riskLevelForPassNum['B']
  574. ? info.riskLevelForPassNum['B'].passNum
  575. : null,
  576. info.riskLevelForPassNum['C']
  577. ? info.riskLevelForPassNum['C'].passNum
  578. : null,
  579. info.riskLevelForPassNum['D']
  580. ? info.riskLevelForPassNum['D'].passNum
  581. : null,
  582. ],
  583. },
  584. ],
  585. })
  586. /** */
  587. chart_othcar_scale.setOption({
  588. tooltip: {
  589. trigger: 'axis',
  590. axisPointer: {
  591. type: 'shadow',
  592. },
  593. },
  594. xAxis: {
  595. type: 'value',
  596. boundaryGap: [0, 0.01],
  597. },
  598. grid: {
  599. left: '3%',
  600. right: '4%',
  601. bottom: '3%',
  602. containLabel: true,
  603. },
  604. yAxis: {
  605. type: 'category',
  606. data: Object.keys(info.otherBehaviorTypeForNum),
  607. },
  608. series: {
  609. type: 'bar',
  610. data: Object.values(info.otherBehaviorTypeForNum),
  611. },
  612. })
  613. chart_risk_othcar_scale.setOption({
  614. tooltip: {
  615. trigger: 'axis',
  616. axisPointer: {
  617. type: 'shadow',
  618. },
  619. },
  620. legend: {},
  621. grid: {
  622. left: '3%',
  623. right: '4%',
  624. bottom: '3%',
  625. containLabel: true,
  626. },
  627. xAxis: {
  628. type: 'value',
  629. },
  630. yAxis: {
  631. type: 'category',
  632. data: Object.keys(info.otherBehaviorForCompLevelNum),
  633. },
  634. series: [
  635. {
  636. name: 'A',
  637. type: 'bar',
  638. stack: 'total',
  639. label: {
  640. show: true,
  641. },
  642. emphasis: {
  643. focus: 'series',
  644. },
  645. data: Object.keys(info.otherBehaviorForCompLevelNum).map(
  646. (item) => info.otherBehaviorForCompLevelNum[item].A
  647. ),
  648. },
  649. {
  650. name: 'B',
  651. type: 'bar',
  652. stack: 'total',
  653. label: {
  654. show: true,
  655. },
  656. emphasis: {
  657. focus: 'series',
  658. },
  659. data: Object.keys(info.otherBehaviorForCompLevelNum).map(
  660. (item) => info.otherBehaviorForCompLevelNum[item].B
  661. ),
  662. },
  663. {
  664. name: 'C',
  665. type: 'bar',
  666. stack: 'total',
  667. label: {
  668. show: true,
  669. },
  670. emphasis: {
  671. focus: 'series',
  672. },
  673. data: Object.keys(info.otherBehaviorForCompLevelNum).map(
  674. (item) => info.otherBehaviorForCompLevelNum[item].C
  675. ),
  676. },
  677. {
  678. name: 'D',
  679. type: 'bar',
  680. stack: 'total',
  681. label: {
  682. show: true,
  683. },
  684. emphasis: {
  685. focus: 'series',
  686. },
  687. data: Object.keys(info.otherBehaviorForCompLevelNum).map(
  688. (item) => info.otherBehaviorForCompLevelNum[item].D
  689. ),
  690. },
  691. ],
  692. })
  693. chart_complex_othcar_scale.setOption({
  694. tooltip: {
  695. trigger: 'axis',
  696. axisPointer: {
  697. type: 'shadow',
  698. },
  699. },
  700. legend: {},
  701. grid: {
  702. left: '3%',
  703. right: '4%',
  704. bottom: '3%',
  705. containLabel: true,
  706. },
  707. xAxis: {
  708. type: 'value',
  709. },
  710. yAxis: {
  711. type: 'category',
  712. data: Object.keys(info.otherBehaviorForRiskLevelNum),
  713. },
  714. series: [
  715. {
  716. name: 'A',
  717. type: 'bar',
  718. stack: 'total',
  719. label: {
  720. show: true,
  721. },
  722. emphasis: {
  723. focus: 'series',
  724. },
  725. data: Object.keys(info.otherBehaviorForRiskLevelNum).map(
  726. (item) => info.otherBehaviorForRiskLevelNum[item].A
  727. ),
  728. },
  729. {
  730. name: 'B',
  731. type: 'bar',
  732. stack: 'total',
  733. label: {
  734. show: true,
  735. },
  736. emphasis: {
  737. focus: 'series',
  738. },
  739. data: Object.keys(info.otherBehaviorForRiskLevelNum).map(
  740. (item) => info.otherBehaviorForRiskLevelNum[item].B
  741. ),
  742. },
  743. {
  744. name: 'C',
  745. type: 'bar',
  746. stack: 'total',
  747. label: {
  748. show: true,
  749. },
  750. emphasis: {
  751. focus: 'series',
  752. },
  753. data: Object.keys(info.otherBehaviorForRiskLevelNum).map(
  754. (item) => info.otherBehaviorForRiskLevelNum[item].C
  755. ),
  756. },
  757. {
  758. name: 'D',
  759. type: 'bar',
  760. stack: 'total',
  761. label: {
  762. show: true,
  763. },
  764. emphasis: {
  765. focus: 'series',
  766. },
  767. data: Object.keys(info.otherBehaviorForRiskLevelNum).map(
  768. (item) => info.otherBehaviorForRiskLevelNum[item].D
  769. ),
  770. },
  771. ],
  772. })
  773. chart_weather_scale.setOption({
  774. tooltip: {
  775. trigger: 'axis',
  776. axisPointer: {
  777. type: 'shadow',
  778. },
  779. },
  780. legend: {
  781. top: '5%',
  782. left: 'center',
  783. },
  784. series: [
  785. {
  786. name: '天气类型',
  787. type: 'pie',
  788. radius: ['40%', '70%'],
  789. avoidLabelOverlap: false,
  790. label: {
  791. show: false,
  792. position: 'center',
  793. },
  794. emphasis: {
  795. label: {
  796. show: true,
  797. fontSize: 20,
  798. fontWeight: 'bold',
  799. },
  800. },
  801. labelLine: {
  802. show: false,
  803. },
  804. data: Object.keys(info.weatherTypeForNum).map((item) => {
  805. return {
  806. value: info.weatherTypeForNum[item],
  807. name: item,
  808. }
  809. }),
  810. },
  811. ],
  812. })
  813. chart_complex_weather_scale.setOption({
  814. tooltip: {
  815. trigger: 'axis',
  816. axisPointer: {
  817. type: 'shadow',
  818. },
  819. },
  820. legend: {},
  821. grid: {
  822. left: '3%',
  823. right: '4%',
  824. bottom: '3%',
  825. containLabel: true,
  826. },
  827. xAxis: {
  828. type: 'value',
  829. },
  830. yAxis: {
  831. type: 'category',
  832. data: Object.keys(info.weatherForCompLevelNum),
  833. },
  834. series: [
  835. {
  836. name: 'A',
  837. type: 'bar',
  838. stack: 'total',
  839. label: {
  840. show: true,
  841. },
  842. emphasis: {
  843. focus: 'series',
  844. },
  845. data: Object.keys(info.weatherForCompLevelNum).map(
  846. (item) => info.weatherForCompLevelNum[item].A
  847. ),
  848. },
  849. {
  850. name: 'B',
  851. type: 'bar',
  852. stack: 'total',
  853. label: {
  854. show: true,
  855. },
  856. emphasis: {
  857. focus: 'series',
  858. },
  859. data: Object.keys(info.weatherForCompLevelNum).map(
  860. (item) => info.weatherForCompLevelNum[item].B
  861. ),
  862. },
  863. {
  864. name: 'C',
  865. type: 'bar',
  866. stack: 'total',
  867. label: {
  868. show: true,
  869. },
  870. emphasis: {
  871. focus: 'series',
  872. },
  873. data: Object.keys(info.weatherForCompLevelNum).map(
  874. (item) => info.weatherForCompLevelNum[item].C
  875. ),
  876. },
  877. {
  878. name: 'D',
  879. type: 'bar',
  880. stack: 'total',
  881. label: {
  882. show: true,
  883. },
  884. emphasis: {
  885. focus: 'series',
  886. },
  887. data: Object.keys(info.weatherForCompLevelNum).map(
  888. (item) => info.weatherForCompLevelNum[item].D
  889. ),
  890. },
  891. ],
  892. })
  893. chart_risk_weather_scale.setOption({
  894. tooltip: {
  895. trigger: 'axis',
  896. axisPointer: {
  897. type: 'shadow',
  898. },
  899. },
  900. legend: {},
  901. grid: {
  902. left: '3%',
  903. right: '4%',
  904. bottom: '3%',
  905. containLabel: true,
  906. },
  907. xAxis: {
  908. type: 'value',
  909. },
  910. yAxis: {
  911. type: 'category',
  912. data: Object.keys(info.weatherForRiskLevelNum),
  913. },
  914. series: [
  915. {
  916. name: 'A',
  917. type: 'bar',
  918. stack: 'total',
  919. label: {
  920. show: true,
  921. },
  922. emphasis: {
  923. focus: 'series',
  924. },
  925. data: Object.keys(info.weatherForRiskLevelNum).map(
  926. (item) => info.weatherForRiskLevelNum[item].A
  927. ),
  928. },
  929. {
  930. name: 'B',
  931. type: 'bar',
  932. stack: 'total',
  933. label: {
  934. show: true,
  935. },
  936. emphasis: {
  937. focus: 'series',
  938. },
  939. data: Object.keys(info.weatherForRiskLevelNum).map(
  940. (item) => info.weatherForRiskLevelNum[item].B
  941. ),
  942. },
  943. {
  944. name: 'C',
  945. type: 'bar',
  946. stack: 'total',
  947. label: {
  948. show: true,
  949. },
  950. emphasis: {
  951. focus: 'series',
  952. },
  953. data: Object.keys(info.weatherForRiskLevelNum).map(
  954. (item) => info.weatherForRiskLevelNum[item].C
  955. ),
  956. },
  957. {
  958. name: 'D',
  959. type: 'bar',
  960. stack: 'total',
  961. label: {
  962. show: true,
  963. },
  964. emphasis: {
  965. focus: 'series',
  966. },
  967. data: Object.keys(info.weatherForRiskLevelNum).map(
  968. (item) => info.weatherForRiskLevelNum[item].D
  969. ),
  970. },
  971. ],
  972. })
  973. chart_roadtype_scale.setOption({
  974. tooltip: {
  975. trigger: 'axis',
  976. axisPointer: {
  977. type: 'shadow',
  978. },
  979. },
  980. legend: {
  981. top: '5%',
  982. left: 'center',
  983. },
  984. series: [
  985. {
  986. name: '道路类型',
  987. type: 'pie',
  988. radius: ['40%', '70%'],
  989. avoidLabelOverlap: false,
  990. label: {
  991. show: false,
  992. position: 'center',
  993. },
  994. emphasis: {
  995. label: {
  996. show: true,
  997. fontSize: 20,
  998. fontWeight: 'bold',
  999. },
  1000. },
  1001. labelLine: {
  1002. show: false,
  1003. },
  1004. data: Object.keys(info.roadTypeForNum).map((item) => {
  1005. return {
  1006. value: info.roadTypeForNum[item],
  1007. name: item,
  1008. }
  1009. }),
  1010. },
  1011. ],
  1012. })
  1013. chart_region_scale.setOption({
  1014. tooltip: {
  1015. trigger: 'axis',
  1016. axisPointer: {
  1017. type: 'shadow',
  1018. },
  1019. },
  1020. xAxis: {
  1021. type: 'value',
  1022. boundaryGap: [0, 0.01],
  1023. },
  1024. grid: {
  1025. left: '3%',
  1026. right: '4%',
  1027. bottom: '3%',
  1028. containLabel: true,
  1029. },
  1030. yAxis: {
  1031. type: 'category',
  1032. data: Object.keys(info.operationAreaTypeForNum),
  1033. },
  1034. series: {
  1035. type: 'bar',
  1036. data: Object.values(info.operationAreaTypeForNum),
  1037. },
  1038. })
  1039. chart_roadplane_scale.setOption({
  1040. tooltip: {
  1041. trigger: 'axis',
  1042. axisPointer: {
  1043. type: 'shadow',
  1044. },
  1045. },
  1046. xAxis: {
  1047. type: 'category',
  1048. data: Object.keys(info.roadGeometryPlaneTypeForNum),
  1049. },
  1050. yAxis: {
  1051. type: 'value',
  1052. },
  1053. series: [
  1054. {
  1055. data: Object.values(info.roadGeometryPlaneTypeForNum),
  1056. type: 'bar',
  1057. },
  1058. ],
  1059. })
  1060. chart_roadportrait_scale.setOption({
  1061. tooltip: {
  1062. trigger: 'axis',
  1063. axisPointer: {
  1064. type: 'shadow',
  1065. },
  1066. },
  1067. xAxis: {
  1068. type: 'category',
  1069. data: Object.keys(info.roadGeometryVerticalTypeForNum),
  1070. },
  1071. yAxis: {
  1072. type: 'value',
  1073. },
  1074. series: [
  1075. {
  1076. data: Object.values(info.roadGeometryVerticalTypeForNum),
  1077. type: 'bar',
  1078. },
  1079. ],
  1080. })
  1081. chart_risk_region_scale.setOption({
  1082. tooltip: {
  1083. trigger: 'axis',
  1084. axisPointer: {
  1085. type: 'shadow',
  1086. },
  1087. },
  1088. grid: {
  1089. left: '3%',
  1090. right: '4%',
  1091. bottom: '3%',
  1092. containLabel: true,
  1093. },
  1094. legend: {},
  1095. xAxis: {
  1096. type: 'value',
  1097. },
  1098. yAxis: {
  1099. type: 'category',
  1100. data: Object.keys(info.operationAreaForRiskLevelNum),
  1101. },
  1102. series: [
  1103. {
  1104. name: 'A',
  1105. type: 'bar',
  1106. stack: 'total',
  1107. label: {
  1108. show: true,
  1109. },
  1110. emphasis: {
  1111. focus: 'series',
  1112. },
  1113. data: Object.keys(info.operationAreaForRiskLevelNum).map(
  1114. (item) => info.operationAreaForRiskLevelNum[item].A
  1115. ),
  1116. },
  1117. {
  1118. name: 'B',
  1119. type: 'bar',
  1120. stack: 'total',
  1121. label: {
  1122. show: true,
  1123. },
  1124. emphasis: {
  1125. focus: 'series',
  1126. },
  1127. data: Object.keys(info.operationAreaForRiskLevelNum).map(
  1128. (item) => info.operationAreaForRiskLevelNum[item].B
  1129. ),
  1130. },
  1131. {
  1132. name: 'C',
  1133. type: 'bar',
  1134. stack: 'total',
  1135. label: {
  1136. show: true,
  1137. },
  1138. emphasis: {
  1139. focus: 'series',
  1140. },
  1141. data: Object.keys(info.operationAreaForRiskLevelNum).map(
  1142. (item) => info.operationAreaForRiskLevelNum[item].C
  1143. ),
  1144. },
  1145. {
  1146. name: 'D',
  1147. type: 'bar',
  1148. stack: 'total',
  1149. label: {
  1150. show: true,
  1151. },
  1152. emphasis: {
  1153. focus: 'series',
  1154. },
  1155. data: Object.keys(info.operationAreaForRiskLevelNum).map(
  1156. (item) => info.operationAreaForRiskLevelNum[item].D
  1157. ),
  1158. },
  1159. ],
  1160. })
  1161. chart_complex_region_scale.setOption({
  1162. tooltip: {
  1163. trigger: 'axis',
  1164. axisPointer: {
  1165. type: 'shadow',
  1166. },
  1167. },
  1168. grid: {
  1169. left: '3%',
  1170. right: '4%',
  1171. bottom: '3%',
  1172. containLabel: true,
  1173. },
  1174. legend: {},
  1175. xAxis: {
  1176. type: 'value',
  1177. },
  1178. yAxis: {
  1179. type: 'category',
  1180. data: Object.keys(info.operationAreaForCompLevelNum),
  1181. },
  1182. series: [
  1183. {
  1184. name: 'A',
  1185. type: 'bar',
  1186. stack: 'total',
  1187. label: {
  1188. show: true,
  1189. },
  1190. emphasis: {
  1191. focus: 'series',
  1192. },
  1193. data: Object.keys(info.operationAreaForCompLevelNum).map(
  1194. (item) => info.operationAreaForCompLevelNum[item].A
  1195. ),
  1196. },
  1197. {
  1198. name: 'B',
  1199. type: 'bar',
  1200. stack: 'total',
  1201. label: {
  1202. show: true,
  1203. },
  1204. emphasis: {
  1205. focus: 'series',
  1206. },
  1207. data: Object.keys(info.operationAreaForCompLevelNum).map(
  1208. (item) => info.operationAreaForCompLevelNum[item].B
  1209. ),
  1210. },
  1211. {
  1212. name: 'C',
  1213. type: 'bar',
  1214. stack: 'total',
  1215. label: {
  1216. show: true,
  1217. },
  1218. emphasis: {
  1219. focus: 'series',
  1220. },
  1221. data: Object.keys(info.operationAreaForCompLevelNum).map(
  1222. (item) => info.operationAreaForCompLevelNum[item].C
  1223. ),
  1224. },
  1225. {
  1226. name: 'D',
  1227. type: 'bar',
  1228. stack: 'total',
  1229. label: {
  1230. show: true,
  1231. },
  1232. emphasis: {
  1233. focus: 'series',
  1234. },
  1235. data: Object.keys(info.operationAreaForCompLevelNum).map(
  1236. (item) => info.operationAreaForCompLevelNum[item].D
  1237. ),
  1238. },
  1239. ],
  1240. })
  1241. chart_risk_road_scale.setOption({
  1242. tooltip: {
  1243. trigger: 'axis',
  1244. axisPointer: {
  1245. type: 'shadow',
  1246. },
  1247. },
  1248. grid: {
  1249. left: '3%',
  1250. right: '4%',
  1251. bottom: '3%',
  1252. containLabel: true,
  1253. },
  1254. legend: {},
  1255. xAxis: {
  1256. type: 'value',
  1257. },
  1258. yAxis: {
  1259. type: 'category',
  1260. data: Object.keys(info.roadGeometryPlaneForRiskLevelNum),
  1261. },
  1262. series: [
  1263. {
  1264. name: 'A',
  1265. type: 'bar',
  1266. stack: 'total',
  1267. label: {
  1268. show: true,
  1269. },
  1270. emphasis: {
  1271. focus: 'series',
  1272. },
  1273. data: Object.keys(info.roadGeometryPlaneForRiskLevelNum).map(
  1274. (item) => info.roadGeometryPlaneForRiskLevelNum[item].A
  1275. ),
  1276. },
  1277. {
  1278. name: 'B',
  1279. type: 'bar',
  1280. stack: 'total',
  1281. label: {
  1282. show: true,
  1283. },
  1284. emphasis: {
  1285. focus: 'series',
  1286. },
  1287. data: Object.keys(info.roadGeometryPlaneForRiskLevelNum).map(
  1288. (item) => info.roadGeometryPlaneForRiskLevelNum[item].B
  1289. ),
  1290. },
  1291. {
  1292. name: 'C',
  1293. type: 'bar',
  1294. stack: 'total',
  1295. label: {
  1296. show: true,
  1297. },
  1298. emphasis: {
  1299. focus: 'series',
  1300. },
  1301. data: Object.keys(info.roadGeometryPlaneForRiskLevelNum).map(
  1302. (item) => info.roadGeometryPlaneForRiskLevelNum[item].C
  1303. ),
  1304. },
  1305. {
  1306. name: 'D',
  1307. type: 'bar',
  1308. stack: 'total',
  1309. label: {
  1310. show: true,
  1311. },
  1312. emphasis: {
  1313. focus: 'series',
  1314. },
  1315. data: Object.keys(info.roadGeometryPlaneForRiskLevelNum).map(
  1316. (item) => info.roadGeometryPlaneForRiskLevelNum[item].D
  1317. ),
  1318. },
  1319. ],
  1320. })
  1321. chart_complex_road_scale.setOption({
  1322. tooltip: {
  1323. trigger: 'axis',
  1324. axisPointer: {
  1325. type: 'shadow',
  1326. },
  1327. },
  1328. grid: {
  1329. left: '3%',
  1330. right: '4%',
  1331. bottom: '3%',
  1332. containLabel: true,
  1333. },
  1334. legend: {},
  1335. xAxis: {
  1336. type: 'value',
  1337. },
  1338. yAxis: {
  1339. type: 'category',
  1340. data: Object.keys(info.roadGeometryPlaneForCompLevelNum),
  1341. },
  1342. series: [
  1343. {
  1344. name: 'A',
  1345. type: 'bar',
  1346. stack: 'total',
  1347. label: {
  1348. show: true,
  1349. },
  1350. emphasis: {
  1351. focus: 'series',
  1352. },
  1353. data: Object.keys(info.roadGeometryPlaneForCompLevelNum).map(
  1354. (item) => info.roadGeometryPlaneForCompLevelNum[item].A
  1355. ),
  1356. },
  1357. {
  1358. name: 'B',
  1359. type: 'bar',
  1360. stack: 'total',
  1361. label: {
  1362. show: true,
  1363. },
  1364. emphasis: {
  1365. focus: 'series',
  1366. },
  1367. data: Object.keys(info.roadGeometryPlaneForCompLevelNum).map(
  1368. (item) => info.roadGeometryPlaneForCompLevelNum[item].B
  1369. ),
  1370. },
  1371. {
  1372. name: 'C',
  1373. type: 'bar',
  1374. stack: 'total',
  1375. label: {
  1376. show: true,
  1377. },
  1378. emphasis: {
  1379. focus: 'series',
  1380. },
  1381. data: Object.keys(info.roadGeometryPlaneForCompLevelNum).map(
  1382. (item) => info.roadGeometryPlaneForCompLevelNum[item].C
  1383. ),
  1384. },
  1385. {
  1386. name: 'D',
  1387. type: 'bar',
  1388. stack: 'total',
  1389. label: {
  1390. show: true,
  1391. },
  1392. emphasis: {
  1393. focus: 'series',
  1394. },
  1395. data: Object.keys(info.roadGeometryPlaneForCompLevelNum).map(
  1396. (item) => info.roadGeometryPlaneForCompLevelNum[item].D
  1397. ),
  1398. },
  1399. ],
  1400. })
  1401. chart_risk_roadportrait_scale.setOption({
  1402. tooltip: {
  1403. trigger: 'axis',
  1404. axisPointer: {
  1405. type: 'shadow',
  1406. },
  1407. },
  1408. grid: {
  1409. left: '3%',
  1410. right: '4%',
  1411. bottom: '3%',
  1412. containLabel: true,
  1413. },
  1414. legend: {},
  1415. xAxis: {
  1416. type: 'value',
  1417. },
  1418. yAxis: {
  1419. type: 'category',
  1420. data: Object.keys(info.roadGeometryVerticalForRiskLevelNum),
  1421. },
  1422. series: [
  1423. {
  1424. name: 'A',
  1425. type: 'bar',
  1426. stack: 'total',
  1427. label: {
  1428. show: true,
  1429. },
  1430. emphasis: {
  1431. focus: 'series',
  1432. },
  1433. data: Object.keys(info.roadGeometryVerticalForRiskLevelNum).map(
  1434. (item) => info.roadGeometryVerticalForRiskLevelNum[item].A
  1435. ),
  1436. },
  1437. {
  1438. name: 'B',
  1439. type: 'bar',
  1440. stack: 'total',
  1441. label: {
  1442. show: true,
  1443. },
  1444. emphasis: {
  1445. focus: 'series',
  1446. },
  1447. data: Object.keys(info.roadGeometryVerticalForRiskLevelNum).map(
  1448. (item) => info.roadGeometryVerticalForRiskLevelNum[item].B
  1449. ),
  1450. },
  1451. {
  1452. name: 'C',
  1453. type: 'bar',
  1454. stack: 'total',
  1455. label: {
  1456. show: true,
  1457. },
  1458. emphasis: {
  1459. focus: 'series',
  1460. },
  1461. data: Object.keys(info.roadGeometryVerticalForRiskLevelNum).map(
  1462. (item) => info.roadGeometryVerticalForRiskLevelNum[item].C
  1463. ),
  1464. },
  1465. {
  1466. name: 'D',
  1467. type: 'bar',
  1468. stack: 'total',
  1469. label: {
  1470. show: true,
  1471. },
  1472. emphasis: {
  1473. focus: 'series',
  1474. },
  1475. data: Object.keys(info.roadGeometryVerticalForRiskLevelNum).map(
  1476. (item) => info.roadGeometryVerticalForRiskLevelNum[item].D
  1477. ),
  1478. },
  1479. ],
  1480. })
  1481. chart_complex_roadportrait_scale.setOption({
  1482. tooltip: {
  1483. trigger: 'axis',
  1484. axisPointer: {
  1485. type: 'shadow',
  1486. },
  1487. },
  1488. grid: {
  1489. left: '3%',
  1490. right: '4%',
  1491. bottom: '3%',
  1492. containLabel: true,
  1493. },
  1494. legend: {},
  1495. xAxis: {
  1496. type: 'value',
  1497. },
  1498. yAxis: {
  1499. type: 'category',
  1500. data: Object.keys(info.roadGeometryVerticalForCompLevelNum),
  1501. },
  1502. series: [
  1503. {
  1504. name: 'A',
  1505. type: 'bar',
  1506. stack: 'total',
  1507. label: {
  1508. show: true,
  1509. },
  1510. emphasis: {
  1511. focus: 'series',
  1512. },
  1513. data: Object.keys(info.roadGeometryVerticalForCompLevelNum).map(
  1514. (item) => info.roadGeometryVerticalForCompLevelNum[item].A
  1515. ),
  1516. },
  1517. {
  1518. name: 'B',
  1519. type: 'bar',
  1520. stack: 'total',
  1521. label: {
  1522. show: true,
  1523. },
  1524. emphasis: {
  1525. focus: 'series',
  1526. },
  1527. data: Object.keys(info.roadGeometryVerticalForCompLevelNum).map(
  1528. (item) => info.roadGeometryVerticalForCompLevelNum[item].B
  1529. ),
  1530. },
  1531. {
  1532. name: 'C',
  1533. type: 'bar',
  1534. stack: 'total',
  1535. label: {
  1536. show: true,
  1537. },
  1538. emphasis: {
  1539. focus: 'series',
  1540. },
  1541. data: Object.keys(info.roadGeometryVerticalForCompLevelNum).map(
  1542. (item) => info.roadGeometryVerticalForCompLevelNum[item].C
  1543. ),
  1544. },
  1545. {
  1546. name: 'D',
  1547. type: 'bar',
  1548. stack: 'total',
  1549. label: {
  1550. show: true,
  1551. },
  1552. emphasis: {
  1553. focus: 'series',
  1554. },
  1555. data: Object.keys(info.roadGeometryVerticalForCompLevelNum).map(
  1556. (item) => info.roadGeometryVerticalForCompLevelNum[item].D
  1557. ),
  1558. },
  1559. ],
  1560. })
  1561. chart_algorithm_othcar_scale.setOption(
  1562. {
  1563. tooltip: {
  1564. trigger: 'axis',
  1565. axisPointer: {
  1566. type: 'shadow',
  1567. },
  1568. },
  1569. legend: {},
  1570. grid: {
  1571. left: '3%',
  1572. right: '4%',
  1573. bottom: '3%',
  1574. containLabel: true,
  1575. },
  1576. legend: {},
  1577. xAxis: {
  1578. type: 'value',
  1579. },
  1580. yAxis: {
  1581. type: 'category',
  1582. data: Object.keys(info.otherBehaviorAndAreaPassNum),
  1583. },
  1584. series: [
  1585. {
  1586. name: '通过',
  1587. type: 'bar',
  1588. stack: 'total',
  1589. label: {
  1590. show: true,
  1591. },
  1592. emphasis: {
  1593. focus: 'series',
  1594. },
  1595. data: Object.keys(info.otherBehaviorAndAreaPassNum).map(
  1596. (item) => info.otherBehaviorAndAreaPassNum[item].passNum
  1597. ),
  1598. },
  1599. {
  1600. name: '不通过',
  1601. type: 'bar',
  1602. stack: 'total',
  1603. label: {
  1604. show: true,
  1605. },
  1606. emphasis: {
  1607. focus: 'series',
  1608. },
  1609. data: Object.keys(info.otherBehaviorAndAreaPassNum).map(
  1610. (item) => info.otherBehaviorAndAreaPassNum[item].unPassNum
  1611. ),
  1612. },
  1613. ],
  1614. }
  1615. // {
  1616. // legend: {},
  1617. // tooltip: {
  1618. // trigger: 'axis',
  1619. // axisPointer: {
  1620. // type: 'shadow',
  1621. // },
  1622. // },
  1623. // grid: {
  1624. // left: '3%',
  1625. // right: '4%',
  1626. // bottom: '3%',
  1627. // containLabel: true,
  1628. // },
  1629. // yAxis: {
  1630. // type: 'value',
  1631. // },
  1632. // xAxis: {
  1633. // type: 'category',
  1634. // data: Object.keys(info.otherBehaviorAndAreaPassNum),
  1635. // },
  1636. // series: [
  1637. // {
  1638. // name: '不通过',
  1639. // type: 'bar',
  1640. // stack: 'total',
  1641. // label: {
  1642. // show: true,
  1643. // },
  1644. // emphasis: {
  1645. // focus: 'series',
  1646. // },
  1647. // data: Object.keys(info.otherBehaviorAndAreaPassNum).map(item=>{
  1648. // return info.otherBehaviorAndAreaPassNum[item]?info.otherBehaviorAndAreaPassNum[item]['unPassNum'] :null
  1649. // }),
  1650. // },
  1651. // {
  1652. // name: '通过',
  1653. // type: 'bar',
  1654. // stack: 'total',
  1655. // label: {
  1656. // show: true,
  1657. // },
  1658. // emphasis: {
  1659. // focus: 'series',
  1660. // },
  1661. // data: Object.keys(info.otherBehaviorAndAreaPassNum).map(item=>{
  1662. // return info.otherBehaviorAndAreaPassNum[item]?info.otherBehaviorAndAreaPassNum[item]['passNum'] : null
  1663. // }),
  1664. // },
  1665. // ],
  1666. // }
  1667. )
  1668. chart_algorithm_weather_scale.setOption({
  1669. tooltip: {
  1670. trigger: 'axis',
  1671. axisPointer: {
  1672. type: 'shadow',
  1673. },
  1674. },
  1675. legend: {},
  1676. grid: {
  1677. left: '3%',
  1678. right: '4%',
  1679. bottom: '3%',
  1680. containLabel: true,
  1681. },
  1682. legend: {},
  1683. xAxis: {
  1684. type: 'value',
  1685. },
  1686. yAxis: {
  1687. type: 'category',
  1688. data: Object.keys(info.weatherAndAreaPassNum),
  1689. },
  1690. series: [
  1691. {
  1692. name: '通过',
  1693. type: 'bar',
  1694. stack: 'total',
  1695. label: {
  1696. show: true,
  1697. },
  1698. emphasis: {
  1699. focus: 'series',
  1700. },
  1701. data: Object.keys(info.weatherAndAreaPassNum).map(
  1702. (item) => info.weatherAndAreaPassNum[item].passNum
  1703. ),
  1704. },
  1705. {
  1706. name: '不通过',
  1707. type: 'bar',
  1708. stack: 'total',
  1709. label: {
  1710. show: true,
  1711. },
  1712. emphasis: {
  1713. focus: 'series',
  1714. },
  1715. data: Object.keys(info.weatherAndAreaPassNum).map(
  1716. (item) => info.weatherAndAreaPassNum[item].unPassNum
  1717. ),
  1718. },
  1719. ],
  1720. })
  1721. chart_algorithm_road_scale.setOption({
  1722. tooltip: {
  1723. trigger: 'axis',
  1724. axisPointer: {
  1725. type: 'shadow',
  1726. },
  1727. },
  1728. legend: {},
  1729. grid: {
  1730. left: '3%',
  1731. right: '4%',
  1732. bottom: '3%',
  1733. containLabel: true,
  1734. },
  1735. legend: {},
  1736. xAxis: {
  1737. type: 'value',
  1738. },
  1739. yAxis: {
  1740. type: 'category',
  1741. data: Object.keys(info.roadPlanePassNum),
  1742. },
  1743. series: [
  1744. {
  1745. name: '通过',
  1746. type: 'bar',
  1747. stack: 'total',
  1748. label: {
  1749. show: true,
  1750. },
  1751. emphasis: {
  1752. focus: 'series',
  1753. },
  1754. data: Object.keys(info.roadPlanePassNum).map(
  1755. (item) => info.roadPlanePassNum[item].passNum
  1756. ),
  1757. },
  1758. {
  1759. name: '不通过',
  1760. type: 'bar',
  1761. stack: 'total',
  1762. label: {
  1763. show: true,
  1764. },
  1765. emphasis: {
  1766. focus: 'series',
  1767. },
  1768. data: Object.keys(info.roadPlanePassNum).map(
  1769. (item) => info.roadPlanePassNum[item].unPassNum
  1770. ),
  1771. },
  1772. ],
  1773. })
  1774. },
  1775. // 下载报告
  1776. down() {
  1777. const content = this.$refs.pdfContent
  1778. html2canvas(content).then((canvas) => {
  1779. var contentWidth = canvas.width
  1780. var contentHeight = canvas.height
  1781. //一页pdf显示html页面生成的canvas高度;
  1782. var pageHeight = (contentWidth / 592.28) * 841.89
  1783. //未生成pdf的html页面高度
  1784. var leftHeight = contentHeight
  1785. //页面偏移
  1786. var position = 0
  1787. //a4纸的尺寸[595.28,841.89],html页面生成的canvas在pdf中图片的宽高
  1788. var imgWidth = 595.28
  1789. var imgHeight = (592.28 / contentWidth) * contentHeight
  1790. var pageData = canvas.toDataURL('image/jpeg', 1.0)
  1791. var pdf = new jsPDF('', 'pt', 'a4')
  1792. //有两个高度需要区分,一个是html页面的实际高度,和生成pdf的页面高度(841.89)
  1793. //当内容未超过pdf一页显示的范围,无需分页
  1794. if (leftHeight < pageHeight) {
  1795. pdf.addImage(pageData, 'JPEG', 0, 0, imgWidth, imgHeight)
  1796. } else {
  1797. while (leftHeight > 0) {
  1798. pdf.addImage(pageData, 'JPEG', 0, position, imgWidth, imgHeight)
  1799. leftHeight -= pageHeight
  1800. position -= 841.89
  1801. //避免添加空白页
  1802. if (leftHeight > 0) {
  1803. pdf.addPage()
  1804. }
  1805. }
  1806. }
  1807. pdf.save('报告.pdf')
  1808. })
  1809. },
  1810. },
  1811. }
  1812. </script>
  1813. <style lang="less" scoped>
  1814. .report_box {
  1815. width: 100% !important;
  1816. height: 100% !important;
  1817. display: flex !important;
  1818. flex-direction: column !important;
  1819. align-items: center !important;
  1820. .pdf_box {
  1821. box-sizing: border-box;
  1822. width: 80%;
  1823. height: 100%;
  1824. padding: 20px;
  1825. display: flex;
  1826. flex-direction: column;
  1827. align-content: center;
  1828. .report_banner {
  1829. width: 100%;
  1830. height: 2000px;
  1831. background-image: url('../../assets/common/image/report_banner.png');
  1832. background-repeat: no-repeat;
  1833. background-position: center;
  1834. display: flex;
  1835. flex-direction: column;
  1836. align-items: center;
  1837. h1 {
  1838. margin-top: 350px;
  1839. font-size: 82px;
  1840. font-weight: bold;
  1841. color: #000;
  1842. }
  1843. .report_table {
  1844. margin-top: 250px;
  1845. width: 500px;
  1846. height: auto;
  1847. .table_item {
  1848. width: 100%;
  1849. height: 40px;
  1850. border-bottom: none;
  1851. display: flex;
  1852. align-items: center;
  1853. p {
  1854. width: 200px;
  1855. text-align: center;
  1856. font-size: 18px;
  1857. }
  1858. span {
  1859. width: 100%;
  1860. text-align: left;
  1861. padding-left: 50px;
  1862. font-size: 18px;
  1863. }
  1864. }
  1865. }
  1866. h4 {
  1867. margin-top: 100px;
  1868. font-size: 18px;
  1869. }
  1870. }
  1871. .report_content {
  1872. box-sizing: border-box;
  1873. padding: 0 30px;
  1874. width: 100%;
  1875. min-height: 500px;
  1876. h3 {
  1877. margin-top: 50px;
  1878. text-align: center;
  1879. font-size: 26px;
  1880. color: #3397ff;
  1881. }
  1882. }
  1883. }
  1884. .subtitle {
  1885. font-size: 18px;
  1886. font-weight: bold;
  1887. color: #000;
  1888. margin: 30px 0 30px;
  1889. }
  1890. .text {
  1891. font-size: 16px;
  1892. text-indent: 36px;
  1893. margin-bottom: 10px;
  1894. }
  1895. .echart-box {
  1896. width: 100%;
  1897. min-height: 300px;
  1898. display: flex;
  1899. flex-direction: column;
  1900. align-items: center;
  1901. margin-top: 30px;
  1902. }
  1903. .echart_desc {
  1904. font-size: 12px;
  1905. text-align: center;
  1906. margin-bottom: 30px;
  1907. }
  1908. }
  1909. </style>