risk-task-overview.vue 37 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346
  1. <template>
  2. <sd-detail-form
  3. ref="form"
  4. v-sd-watermark="waterMark"
  5. page-id="risk/task/dutie/riskDutie"
  6. form-id="riskDutie"
  7. :record-id="this.$route.query.taskId ? parseInt(this.$route.query.taskId) : null"
  8. :class="$style.form"
  9. :read-only="true"
  10. @sdFormReady="
  11. () => {
  12. this.initData()
  13. }
  14. "
  15. >
  16. <template v-slot="{ model, fields }">
  17. <div :class="[$style.charts, $style.mainDiv]">
  18. <div>
  19. <div :class="$style.content">
  20. <div>基本信息</div>
  21. <a-divider :class="$style.divider" />
  22. <div :class="$style.projectBrief">
  23. <div>
  24. <div :class="$style.infoDiv">
  25. <span :class="$style.label"
  26. >任务年度:<font>{{ model.year }}</font></span
  27. >
  28. <span :class="$style.label"
  29. >任务类型:<font>{{ fields.dutieType.attr.displayValue }}</font></span
  30. >
  31. <span :class="$style.label"
  32. >发起机构:<font>{{ model.inspectUnitName }}</font></span
  33. >
  34. </div>
  35. <div :class="$style.dateDiv">
  36. <div :class="$style.steps + ' ' + $style.process">
  37. <span>
  38. <a-icon
  39. type="sd-audit-overview-plan"
  40. theme="filled"
  41. :class="$style.icon + ' ' + $style.passed"
  42. />
  43. </span>
  44. <span>
  45. <span>任务起止日期:</span>
  46. <span>{{ model.dutieStartDate | sdDateFormat('YYYY-MM-DD') }}</span
  47. >至<span>{{ model.dutieEndDate | sdDateFormat('YYYY-MM-DD') }}</span>
  48. </span>
  49. </div>
  50. </div>
  51. </div>
  52. </div>
  53. </div>
  54. </div>
  55. <div>
  56. <div :class="$style.content + ' ' + $style.process">
  57. <div>风险识别进度</div>
  58. <a-divider :class="$style.divider" />
  59. <template v-if="firstProcess.resData.length > 0">
  60. <div
  61. ><sd-echart
  62. :key="firstKey"
  63. :class="$style.echarts"
  64. :options="firstProcess.chart"
  65. autoresize
  66. /></div>
  67. <div>
  68. <span @click="firstClick('all')">
  69. <span>{{ firstProcess.data.totalNum }} </span>
  70. <br />
  71. <span>任务总数 </span>
  72. </span>
  73. <span :class="$style['no-start']" @click="firstClick('0')">
  74. <span>{{ firstProcess.data.noStartNum }} </span>
  75. <br />
  76. <span>未开始 </span>
  77. </span>
  78. <span :class="$style['going']" @click="firstClick('1')">
  79. <span>{{ firstProcess.data.executingNum }} </span>
  80. <br />
  81. <span>执行中</span>
  82. </span>
  83. <span :class="$style['finished']" @click="firstClick('5')">
  84. <span>{{ firstProcess.data.finishedNum }} </span>
  85. <br />
  86. <span>已完成</span>
  87. </span>
  88. </div>
  89. </template>
  90. <template v-else>
  91. <div :class="$style.emptyecharts"> </div>
  92. <div> </div>
  93. </template>
  94. </div>
  95. </div>
  96. <div>
  97. <div :class="$style.content">
  98. <div>风险识别结果</div>
  99. <a-divider :class="$style.divider" />
  100. <template v-if="secondProcess.resData.length > 0">
  101. <div
  102. ><sd-echart
  103. ref="secondChart"
  104. :key="secondKey"
  105. :class="$style.secondEcharts"
  106. :options="secondProcess.chart"
  107. autoresize
  108. @click="secondClick"
  109. /></div>
  110. </template>
  111. <template v-else>
  112. <div :class="$style.emptyecharts"> </div>
  113. </template>
  114. </div>
  115. </div>
  116. <div>
  117. <div :class="$style.content + ' ' + $style.process">
  118. <div>风险评估进度</div>
  119. <a-divider :class="$style.divider" />
  120. <template v-if="threeProcess.resData.length > 0">
  121. <div
  122. ><sd-echart
  123. :key="threeKey"
  124. :class="$style.echarts"
  125. :options="threeProcess.chart"
  126. autoresize
  127. /></div>
  128. <div>
  129. <span @click="threeClick('all')">
  130. <span>{{ threeProcess.data.totalNum }} </span>
  131. <br />
  132. <span>任务总数 </span>
  133. </span>
  134. <span :class="$style['no-start']" @click="threeClick('0')">
  135. <span>{{ threeProcess.data.noStartNum }} </span>
  136. <br />
  137. <span>未开始 </span>
  138. </span>
  139. <span :class="$style['going']" @click="threeClick('1')">
  140. <span>{{ threeProcess.data.executingNum }} </span>
  141. <br />
  142. <span>执行中</span>
  143. </span>
  144. <span :class="$style['finished']" @click="threeClick('5')">
  145. <span>{{ threeProcess.data.finishedNum }} </span>
  146. <br />
  147. <span>已完成</span>
  148. </span>
  149. </div>
  150. </template>
  151. <template v-else>
  152. <div :class="$style.emptyecharts"> </div>
  153. <div> </div>
  154. </template>
  155. </div>
  156. </div>
  157. <div>
  158. <div :class="$style.content">
  159. <div>风险评估结果</div>
  160. <a-divider :class="$style.divider" />
  161. <template v-if="fourProcess.resData.length > 0">
  162. <div
  163. ><sd-echart
  164. ref="fourChart"
  165. :key="fourKey"
  166. :class="$style.fourEcharts"
  167. :options="fourProcess.chart"
  168. autoresize
  169. @click="fourClick"
  170. /></div>
  171. </template>
  172. <template v-else>
  173. <div :class="$style.emptyecharts"> </div>
  174. </template>
  175. </div>
  176. </div>
  177. <div :class="$style.bottomDiv">
  178. <div>
  179. <div :class="$style.content + ' ' + $style.process">
  180. <div>风险应对进度</div>
  181. <a-divider :class="$style.divider" />
  182. <template v-if="fiveProcess.resData.length > 0">
  183. <div
  184. ><sd-echart
  185. :key="fiveKey"
  186. :class="$style.echarts"
  187. :options="fiveProcess.chart"
  188. autoresize
  189. /></div>
  190. <div>
  191. <span @click="fiveClick('all')">
  192. <span>{{ fiveProcess.data.totalNum }} </span>
  193. <br />
  194. <span>任务总数 </span>
  195. </span>
  196. <span :class="$style['no-start']" @click="fiveClick('0')">
  197. <span>{{ fiveProcess.data.noStartNum }} </span>
  198. <br />
  199. <span>未开始 </span>
  200. </span>
  201. <span :class="$style['going']" @click="fiveClick('1')">
  202. <span>{{ fiveProcess.data.executingNum }} </span>
  203. <br />
  204. <span>执行中</span>
  205. </span>
  206. <span :class="$style['finished']" @click="fiveClick('5')">
  207. <span>{{ fiveProcess.data.finishedNum }} </span>
  208. <br />
  209. <span>已完成</span>
  210. </span>
  211. </div>
  212. </template>
  213. <template v-else>
  214. <div :class="$style.emptyecharts"> </div>
  215. <div> </div>
  216. </template>
  217. </div>
  218. </div>
  219. <div :class="$style.middleDiv">
  220. <div :class="$style.content">
  221. <div>风险应对策略</div>
  222. <a-divider :class="$style.divider" />
  223. <template v-if="sixProcess.resData.length > 0">
  224. <div
  225. ><sd-echart
  226. ref="sixChart"
  227. :key="sixKey"
  228. :class="$style.sixEcharts"
  229. :options="sixProcess.chart"
  230. autoresize
  231. @click="sixClick"
  232. /></div>
  233. </template>
  234. <template v-else>
  235. <div :class="$style.emptyecharts"> </div>
  236. </template>
  237. </div>
  238. </div>
  239. <div>
  240. <div :class="$style.content">
  241. <div>风险应对完成状态</div>
  242. <a-divider :class="$style.divider" />
  243. <template v-if="sevenProcess.resData.length > 0">
  244. <div
  245. ><sd-echart
  246. ref="sevenChart"
  247. :key="sevenKey"
  248. :class="$style.sevenEcharts"
  249. :options="sevenProcess.chart"
  250. autoresize
  251. @click="sevenClick"
  252. /></div>
  253. </template>
  254. <template v-else>
  255. <div :class="$style.emptyecharts"> </div>
  256. </template>
  257. </div>
  258. </div>
  259. </div>
  260. </div>
  261. </template>
  262. </sd-detail-form>
  263. </template>
  264. <script>
  265. import 'echarts/lib/chart/pie'
  266. import 'echarts/lib/chart/bar'
  267. import 'echarts/lib/chart/gauge'
  268. import 'echarts/lib/component/polar'
  269. import 'echarts/lib/component/legend'
  270. import 'echarts/lib/component/tooltip'
  271. import 'echarts/lib/component/title'
  272. import crossWindowWatcher from '@/common/services/cross-window-watcher'
  273. import systemManage from '@/system-manage/system-manage'
  274. import riskTaskOverviewServices from './risk-task-overview-services'
  275. import components from './_import-components/risk-task-overview-import'
  276. export default {
  277. name: 'RiskTaskOverview',
  278. metaInfo: {
  279. title: '任务概况',
  280. },
  281. components: {
  282. ...components,
  283. },
  284. data() {
  285. return {
  286. firstKey: 0,
  287. secondKey: 0,
  288. threeKey: 0,
  289. fourKey: 0,
  290. fiveKey: 0,
  291. sixKey: 0,
  292. sevenKey: 0,
  293. params: {},
  294. taskInfo: {},
  295. waterMark: systemManage.getFormWaterMark(),
  296. taskId: '',
  297. currenStep: 0,
  298. avatars: {
  299. groupLeader: {
  300. src: '',
  301. },
  302. projectPrincipal: {
  303. src: '',
  304. },
  305. },
  306. steps: [],
  307. firstProcess: {
  308. selectVal: 'all',
  309. resData: [],
  310. data: {},
  311. chart: {
  312. title: [
  313. {
  314. text: '95%',
  315. textStyle: {
  316. color: '#8675FF',
  317. fontSize: 40,
  318. },
  319. itemGap: 20,
  320. x: 'center',
  321. top: '50%',
  322. },
  323. {
  324. text: '完成率',
  325. textStyle: {
  326. color: '#444444',
  327. fontSize: 25,
  328. fontWeight: 'normal',
  329. },
  330. itemGap: 20,
  331. x: 'center',
  332. top: '40%',
  333. },
  334. ],
  335. angleAxis: {
  336. polarIndex: 0,
  337. min: 0,
  338. max: 100,
  339. show: false,
  340. boundaryGap: ['40%', '40%'],
  341. startAngle: 90,
  342. },
  343. radiusAxis: {
  344. type: 'category',
  345. show: true,
  346. axisLabel: {
  347. show: false,
  348. },
  349. axisLine: {
  350. show: false,
  351. },
  352. axisTick: {
  353. show: false,
  354. },
  355. },
  356. polar: [{}],
  357. series: [
  358. {
  359. type: 'bar',
  360. z: 10,
  361. name: '完成度',
  362. data: [50],
  363. showBackground: false,
  364. backgroundStyle: {
  365. borderWidth: 10,
  366. width: 10,
  367. },
  368. coordinateSystem: 'polar',
  369. roundCap: true,
  370. barWidth: 20, // 大的占比环
  371. itemStyle: {
  372. normal: {
  373. opacity: 1,
  374. color: '#8675FF',
  375. },
  376. },
  377. },
  378. {
  379. type: 'pie',
  380. name: '内层细圆环',
  381. radius: ['45%', '35%'],
  382. startAngle: 90,
  383. hoverAnimation: false,
  384. clockWise: true,
  385. silent: true,
  386. itemStyle: {
  387. normal: {
  388. color: '#DCE0FA',
  389. shadowBlur: 0,
  390. shadowColor: '#66666a',
  391. },
  392. },
  393. tooltip: {
  394. show: false,
  395. },
  396. label: {
  397. show: false,
  398. },
  399. data: [100],
  400. },
  401. ],
  402. },
  403. },
  404. secondProcess: {
  405. selectVal: 'all',
  406. resData: [],
  407. data: {},
  408. chart: {
  409. color: ['#5470c6', '#91cc75', '#fac858'],
  410. tooltip: {
  411. trigger: 'item',
  412. },
  413. legend: {
  414. top: '5%',
  415. left: 'center',
  416. },
  417. series: [
  418. {
  419. name: '风险识别结果',
  420. type: 'pie',
  421. radius: ['40%', '70%'],
  422. avoidLabelOverlap: false,
  423. itemStyle: {
  424. borderRadius: 100,
  425. borderColor: '#fff',
  426. borderWidth: 2,
  427. },
  428. label: {
  429. show: false,
  430. position: 'center',
  431. },
  432. emphasis: {
  433. label: {
  434. show: true,
  435. fontSize: '40',
  436. fontWeight: 'bold',
  437. },
  438. },
  439. labelLine: {
  440. show: false,
  441. },
  442. data: [],
  443. },
  444. ],
  445. },
  446. },
  447. threeProcess: {
  448. selectVal: 'all',
  449. resData: [],
  450. data: {},
  451. chart: {
  452. title: [
  453. {
  454. text: '95%',
  455. textStyle: {
  456. color: '#8675FF',
  457. fontSize: 40,
  458. },
  459. itemGap: 20,
  460. x: 'center',
  461. top: '50%',
  462. },
  463. {
  464. text: '完成率',
  465. textStyle: {
  466. color: '#444444',
  467. fontSize: 25,
  468. fontWeight: 'normal',
  469. },
  470. itemGap: 20,
  471. x: 'center',
  472. top: '40%',
  473. },
  474. ],
  475. angleAxis: {
  476. polarIndex: 0,
  477. min: 0,
  478. max: 100,
  479. show: false,
  480. boundaryGap: ['40%', '40%'],
  481. startAngle: 90,
  482. },
  483. radiusAxis: {
  484. type: 'category',
  485. show: true,
  486. axisLabel: {
  487. show: false,
  488. },
  489. axisLine: {
  490. show: false,
  491. },
  492. axisTick: {
  493. show: false,
  494. },
  495. },
  496. polar: [{}],
  497. series: [
  498. {
  499. type: 'bar',
  500. z: 10,
  501. name: '完成度',
  502. data: [50],
  503. showBackground: false,
  504. backgroundStyle: {
  505. borderWidth: 10,
  506. width: 10,
  507. },
  508. coordinateSystem: 'polar',
  509. roundCap: true,
  510. barWidth: 20, // 大的占比环
  511. itemStyle: {
  512. normal: {
  513. opacity: 1,
  514. color: '#8675FF',
  515. },
  516. },
  517. },
  518. {
  519. type: 'pie',
  520. name: '内层细圆环',
  521. radius: ['45%', '35%'],
  522. startAngle: 90,
  523. hoverAnimation: false,
  524. clockWise: true,
  525. silent: true,
  526. itemStyle: {
  527. normal: {
  528. color: '#DCE0FA',
  529. shadowBlur: 0,
  530. shadowColor: '#66666a',
  531. },
  532. },
  533. tooltip: {
  534. show: false,
  535. },
  536. label: {
  537. show: false,
  538. },
  539. data: [100],
  540. },
  541. ],
  542. },
  543. },
  544. fourProcess: {
  545. selectVal: 'all',
  546. resData: [],
  547. data: {},
  548. chart: {
  549. color: ['#5470c6', '#91cc75', '#fac858'],
  550. tooltip: {
  551. trigger: 'item',
  552. },
  553. legend: {
  554. top: '5%',
  555. left: 'center',
  556. },
  557. series: [
  558. {
  559. name: '风险识别结果',
  560. type: 'pie',
  561. radius: ['40%', '70%'],
  562. avoidLabelOverlap: false,
  563. itemStyle: {
  564. borderRadius: 100,
  565. borderColor: '#fff',
  566. borderWidth: 2,
  567. },
  568. label: {
  569. show: false,
  570. position: 'center',
  571. },
  572. emphasis: {
  573. label: {
  574. show: true,
  575. fontSize: '40',
  576. fontWeight: 'bold',
  577. },
  578. },
  579. labelLine: {
  580. show: false,
  581. },
  582. data: [],
  583. },
  584. ],
  585. },
  586. },
  587. fiveProcess: {
  588. selectVal: 'all',
  589. resData: [],
  590. data: {},
  591. chart: {
  592. title: [
  593. {
  594. text: '95%',
  595. textStyle: {
  596. color: '#8675FF',
  597. fontSize: 40,
  598. },
  599. itemGap: 20,
  600. x: 'center',
  601. top: '50%',
  602. },
  603. {
  604. text: '完成率',
  605. textStyle: {
  606. color: '#444444',
  607. fontSize: 25,
  608. fontWeight: 'normal',
  609. },
  610. itemGap: 20,
  611. x: 'center',
  612. top: '40%',
  613. },
  614. ],
  615. angleAxis: {
  616. polarIndex: 0,
  617. min: 0,
  618. max: 100,
  619. show: false,
  620. boundaryGap: ['40%', '40%'],
  621. startAngle: 90,
  622. },
  623. radiusAxis: {
  624. type: 'category',
  625. show: true,
  626. axisLabel: {
  627. show: false,
  628. },
  629. axisLine: {
  630. show: false,
  631. },
  632. axisTick: {
  633. show: false,
  634. },
  635. },
  636. polar: [{}],
  637. series: [
  638. {
  639. type: 'bar',
  640. z: 10,
  641. name: '完成度',
  642. data: [50],
  643. showBackground: false,
  644. backgroundStyle: {
  645. borderWidth: 10,
  646. width: 10,
  647. },
  648. coordinateSystem: 'polar',
  649. roundCap: true,
  650. barWidth: 20, // 大的占比环
  651. itemStyle: {
  652. normal: {
  653. opacity: 1,
  654. color: '#8675FF',
  655. },
  656. },
  657. },
  658. {
  659. type: 'pie',
  660. name: '内层细圆环',
  661. radius: ['45%', '35%'],
  662. startAngle: 90,
  663. hoverAnimation: false,
  664. clockWise: true,
  665. silent: true,
  666. itemStyle: {
  667. normal: {
  668. color: '#DCE0FA',
  669. shadowBlur: 0,
  670. shadowColor: '#66666a',
  671. },
  672. },
  673. tooltip: {
  674. show: false,
  675. },
  676. label: {
  677. show: false,
  678. },
  679. data: [100],
  680. },
  681. ],
  682. },
  683. },
  684. sixProcess: {
  685. selectVal: 'all',
  686. resData: [],
  687. data: {},
  688. chart: {
  689. color: ['#91cc75', '#fac858', '#ee6666', '#5470c6'],
  690. tooltip: {
  691. trigger: 'item',
  692. },
  693. legend: {
  694. top: '5%',
  695. left: 'center',
  696. },
  697. series: [
  698. {
  699. name: '风险识别结果',
  700. type: 'pie',
  701. radius: ['40%', '70%'],
  702. avoidLabelOverlap: false,
  703. itemStyle: {
  704. borderRadius: 100,
  705. borderColor: '#fff',
  706. borderWidth: 2,
  707. },
  708. label: {
  709. show: false,
  710. position: 'center',
  711. },
  712. emphasis: {
  713. label: {
  714. show: true,
  715. fontSize: '40',
  716. fontWeight: 'bold',
  717. },
  718. },
  719. labelLine: {
  720. show: false,
  721. },
  722. data: [],
  723. },
  724. ],
  725. },
  726. },
  727. sevenProcess: {
  728. selectVal: 'all',
  729. resData: [],
  730. data: {},
  731. chart: {
  732. color: [],
  733. tooltip: {
  734. trigger: 'item',
  735. },
  736. series: [
  737. {
  738. stillShowZeroSum: false,
  739. name: '风险识别结果',
  740. type: 'pie',
  741. labelLine: { length: 50 },
  742. radius: [35, 145],
  743. roseType: 'area',
  744. data: [],
  745. },
  746. ],
  747. },
  748. },
  749. }
  750. },
  751. created() {
  752. const taskId = this.$route.query.taskId
  753. if (taskId) {
  754. this.taskId = taskId
  755. }
  756. },
  757. mounted() {},
  758. methods: {
  759. // 第一个图表点击钻取
  760. firstClick(type) {
  761. const url = `/risk-task-overview-list?taskId=${this.taskId}&listType=first${
  762. type === 'all' ? '' : '&endType=' + type
  763. }`
  764. crossWindowWatcher.waitForChanged(url)
  765. },
  766. // 第二个图表点击钻取
  767. secondClick(params) {
  768. let type
  769. if (params.data.name === '新增') {
  770. type = 'insert'
  771. }
  772. if (params.data.name === '修改') {
  773. type = 'update'
  774. }
  775. if (params.data.name === '废弃') {
  776. type = 'delete'
  777. }
  778. const url = `/risk-task-overview-list?taskId=${this.taskId}&listType=second&dataType=${type}`
  779. crossWindowWatcher.waitForChanged(url)
  780. },
  781. // 第三个图表点击钻取
  782. threeClick(type) {
  783. const url = `/risk-task-overview-list?taskId=${this.taskId}&listType=three${
  784. type === 'all' ? '' : '&endType=' + type
  785. }`
  786. crossWindowWatcher.waitForChanged(url)
  787. },
  788. // 第四个图表点击钻取
  789. fourClick(params) {
  790. let type
  791. if (params.data.name === '高风险') {
  792. type = '高风险'
  793. }
  794. if (params.data.name === '中风险') {
  795. type = '中风险'
  796. }
  797. if (params.data.name === '低风险') {
  798. type = '低风险'
  799. }
  800. const url = `/risk-task-overview-list?taskId=${this.taskId}&listType=four&dataType=${type}`
  801. crossWindowWatcher.waitForChanged(url)
  802. },
  803. // 第五个图表点击钻取
  804. fiveClick(type) {
  805. const url = `/risk-task-overview-list?taskId=${this.taskId}&listType=five${
  806. type === 'all' ? '' : '&endType=' + type
  807. }`
  808. crossWindowWatcher.waitForChanged(url)
  809. },
  810. // 第六个图表点击钻取
  811. sixClick(params) {
  812. let type
  813. if (params.data.name === '接受') {
  814. type = 'accept'
  815. }
  816. if (params.data.name === '规避') {
  817. type = 'avoid'
  818. }
  819. if (params.data.name === '降低') {
  820. type = 'reduce'
  821. }
  822. if (params.data.name === '转移') {
  823. type = 'transfer'
  824. }
  825. const url = `/risk-task-overview-list?taskId=${this.taskId}&listType=six&dataType=${type}`
  826. crossWindowWatcher.waitForChanged(url)
  827. },
  828. // 第七个图表点击钻取
  829. sevenClick(params) {
  830. let type
  831. if (params.data.name === '尚未应对') {
  832. type = 'noYetResponded'
  833. }
  834. if (params.data.name === '进行中') {
  835. type = 'progress'
  836. }
  837. if (params.data.name === '已完成') {
  838. type = 'completed'
  839. }
  840. if (params.data.name === '不应对') {
  841. type = 'notResponded'
  842. }
  843. const url = `/risk-task-overview-list?taskId=${this.taskId}&listType=seven&dataType=${type}`
  844. crossWindowWatcher.waitForChanged(url)
  845. },
  846. getStepName(stepId) {
  847. const steps = this.steps.filter((item) => {
  848. return item.id === stepId
  849. })
  850. if (steps.length !== 0) {
  851. return steps[0].name
  852. }
  853. return ''
  854. },
  855. getUserAvatar(account) {
  856. return riskTaskOverviewServices.getUserAvatar(account).then((res) => {
  857. return URL.createObjectURL(res.data)
  858. })
  859. },
  860. initData() {
  861. // 获取第一个图表
  862. this.getFirstData({ taskId: this.taskId, columnValue: 'identifyProgress' })
  863. // 获取第二个图表
  864. this.getSecondData({ taskId: this.taskId, columnValue: 'identifyResult' })
  865. // 获取第三个图表
  866. this.getThreeData({ taskId: this.taskId, columnValue: 'assessmentProgress' })
  867. // 获取第四个图表
  868. this.getFourData({ taskId: this.taskId, columnValue: 'assessmentResult' })
  869. // 获取第五个图表
  870. this.getFiveData({ taskId: this.taskId, columnValue: 'responseProgress' })
  871. // 获取第六个图表
  872. this.getSixData({ taskId: this.taskId, columnValue: 'responseStrategy' })
  873. // 获取第七个图表
  874. this.getSevenData({ taskId: this.taskId, columnValue: 'responseState' })
  875. },
  876. // 获取第一个图表
  877. getFirstData(params) {
  878. // 风险识别进度
  879. riskTaskOverviewServices.getEchartsData(params).then((res) => {
  880. this.firstProcess.resData = res.data.data
  881. if (res.data.data.length > 0) {
  882. this.firstProcess.chart.series[0].data = [Math.round(res.data.data[0].TYPE5)]
  883. if (res.data.data[0].TYPES === 0) {
  884. this.firstProcess.chart.title[0].text = '0%'
  885. } else {
  886. this.firstProcess.chart.title[0].text =
  887. Math.round((res.data.data[0].TYPE5 / res.data.data[0].TYPES) * 100) + '%'
  888. }
  889. this.firstProcess.chart.series[0].data = [
  890. Math.round((res.data.data[0].TYPE5 / res.data.data[0].TYPES) * 100),
  891. ]
  892. this.firstKey++
  893. this.firstProcess.data = {
  894. totalNum: res.data.data[0].TYPES,
  895. noStartNum: res.data.data[0].TYPE0,
  896. executingNum: res.data.data[0].TYPE1,
  897. finishedNum: res.data.data[0].TYPE5,
  898. }
  899. }
  900. })
  901. },
  902. // 获取第二个图表
  903. getSecondData(params) {
  904. riskTaskOverviewServices.getEchartsData(params).then((res) => {
  905. this.secondProcess.resData = res.data.data
  906. if (res.data.data.length > 0) {
  907. this.secondProcess.chart.series[0].data.push(
  908. { value: res.data.data[0].INSERTS, name: '新增' },
  909. { value: res.data.data[0].UPDATES, name: '修改' },
  910. { value: res.data.data[0].DELETES, name: '废弃' }
  911. )
  912. }
  913. })
  914. },
  915. // 获取第三个图表
  916. getThreeData(params) {
  917. // 风险识别进度
  918. riskTaskOverviewServices.getEchartsData(params).then((res) => {
  919. this.threeProcess.resData = res.data.data
  920. if (res.data.data.length > 0) {
  921. this.threeProcess.chart.series[0].data = [Math.round(res.data.data[0].TYPE5)]
  922. if (res.data.data[0].TYPES === 0) {
  923. this.threeProcess.chart.title[0].text = '0%'
  924. } else {
  925. this.threeProcess.chart.title[0].text =
  926. Math.round((res.data.data[0].TYPE5 / res.data.data[0].TYPES) * 100) + '%'
  927. }
  928. this.threeProcess.chart.series[0].data = [
  929. Math.round((res.data.data[0].TYPE5 / res.data.data[0].TYPES) * 100),
  930. ]
  931. this.threeKey++
  932. this.threeProcess.data = {
  933. totalNum: res.data.data[0].TYPES,
  934. noStartNum: res.data.data[0].TYPE0,
  935. executingNum: res.data.data[0].TYPE1,
  936. finishedNum: res.data.data[0].TYPE5,
  937. }
  938. }
  939. })
  940. },
  941. // 获取第四个图表
  942. getFourData(params) {
  943. riskTaskOverviewServices.getEchartsData(params).then((res) => {
  944. this.fourProcess.resData = res.data.data
  945. if (res.data.data.length === 0) return
  946. if (res.data.data.length > 0) {
  947. this.fourProcess.chart.series[0].data.push(
  948. { value: res.data.data[0]['高风险'], name: '高风险' },
  949. { value: res.data.data[0]['中风险'], name: '中风险' },
  950. { value: res.data.data[0]['低风险'], name: '低风险' }
  951. )
  952. }
  953. })
  954. },
  955. // 获取第五个图表
  956. getFiveData(params) {
  957. riskTaskOverviewServices.getEchartsData(params).then((res) => {
  958. this.fiveProcess.resData = res.data.data
  959. if (res.data.data.length > 0) {
  960. this.fiveProcess.chart.series[0].data = [Math.round(res.data.data[0].TYPE5)]
  961. if (res.data.data[0].TYPES === 0) {
  962. this.fiveProcess.chart.title[0].text = '0%'
  963. } else {
  964. this.fiveProcess.chart.title[0].text =
  965. Math.round((res.data.data[0].TYPE5 / res.data.data[0].TYPES) * 100) + '%'
  966. }
  967. this.fiveProcess.chart.series[0].data = [
  968. Math.round((res.data.data[0].TYPE5 / res.data.data[0].TYPES) * 100),
  969. ]
  970. this.fiveKey++
  971. this.fiveProcess.data = {
  972. totalNum: res.data.data[0].TYPES,
  973. noStartNum: res.data.data[0].TYPE0,
  974. executingNum: res.data.data[0].TYPE1,
  975. finishedNum: res.data.data[0].TYPE5,
  976. }
  977. }
  978. })
  979. },
  980. // 获取第六个图表
  981. getSixData(params) {
  982. riskTaskOverviewServices.getEchartsData(params).then((res) => {
  983. this.sixProcess.resData = res.data.data
  984. if (res.data.data.length === 0) return
  985. if (res.data.data.length > 0) {
  986. this.sixProcess.chart.series[0].data.push(
  987. { value: res.data.data[0]['接受'], name: '接受' },
  988. { value: res.data.data[0]['规避'], name: '规避' },
  989. { value: res.data.data[0]['降低'], name: '降低' },
  990. { value: res.data.data[0]['转移'], name: '转移' }
  991. )
  992. }
  993. })
  994. },
  995. // 获取第七个图表
  996. getSevenData(params) {
  997. riskTaskOverviewServices.getEchartsData(params).then((res) => {
  998. this.sevenProcess.resData = res.data.data
  999. if (res.data.data.length === 0) return
  1000. if (res.data.data.length > 0) {
  1001. if (res.data.data[0]['尚未应对'] !== 0) {
  1002. this.sevenProcess.chart.color.push('#ea7ccc')
  1003. this.sevenProcess.chart.series[0].data.push({
  1004. value: res.data.data[0]['尚未应对'],
  1005. name: '尚未应对',
  1006. })
  1007. }
  1008. if (res.data.data[0]['进行中'] !== 0) {
  1009. this.sevenProcess.chart.color.push('#5470c6')
  1010. this.sevenProcess.chart.series[0].data.push({
  1011. value: res.data.data[0]['进行中'],
  1012. name: '进行中',
  1013. })
  1014. }
  1015. if (res.data.data[0]['已完成'] !== 0) {
  1016. this.sevenProcess.chart.color.push('#91cc75')
  1017. this.sevenProcess.chart.series[0].data.push({
  1018. value: res.data.data[0]['已完成'],
  1019. name: '已完成',
  1020. })
  1021. }
  1022. if (res.data.data[0]['不应对'] !== 0) {
  1023. this.sevenProcess.chart.color.push('#fac858')
  1024. this.sevenProcess.chart.series[0].data.push({
  1025. value: res.data.data[0]['不应对'],
  1026. name: '不应对',
  1027. })
  1028. }
  1029. }
  1030. })
  1031. },
  1032. },
  1033. }
  1034. </script>
  1035. <style module lang="scss">
  1036. @use '@/common/design' as *;
  1037. @import '@/webflow/sd-flow-form.scss';
  1038. .main-div {
  1039. display: inline-block;
  1040. background: #ededed;
  1041. width: 100%;
  1042. }
  1043. .radio-div {
  1044. position: absolute;
  1045. margin: 0px 30px;
  1046. top: 65px;
  1047. z-index: 200;
  1048. }
  1049. :global(.title_sd-detail-form_common) {
  1050. visibility: hidden;
  1051. }
  1052. .res-div {
  1053. position: absolute;
  1054. bottom: 30px;
  1055. width: 100%;
  1056. display: flex;
  1057. flex-direction: row;
  1058. justify-content: space-evenly;
  1059. padding: 0px 30%;
  1060. font-size: 18px;
  1061. font-weight: bold;
  1062. }
  1063. .four-echarts {
  1064. width: 100%;
  1065. }
  1066. .test-div {
  1067. position: absolute;
  1068. right: 0;
  1069. width: 100%;
  1070. display: flex;
  1071. font-size: 16px;
  1072. font-weight: bold;
  1073. flex-direction: column;
  1074. color: #000;
  1075. align-items: flex-end;
  1076. margin: 0 30px;
  1077. z-index: 100;
  1078. span {
  1079. cursor: pointer;
  1080. }
  1081. }
  1082. .form {
  1083. // background-color: rgb(232, 232, 232);
  1084. .title_sd-detail-form_common .buttons_sd-detail-form_common {
  1085. display: none;
  1086. }
  1087. :global(.buttons_sd-detail-form_common) {
  1088. visibility: hidden;
  1089. display: none;
  1090. }
  1091. }
  1092. .process > div:last-child {
  1093. position: absolute;
  1094. bottom: 30px;
  1095. width: 100%;
  1096. text-align: center;
  1097. display: flex;
  1098. flex-direction: row;
  1099. justify-content: space-evenly;
  1100. padding: 0px 30%;
  1101. & > span {
  1102. display: inline-block;
  1103. margin: 0 5px;
  1104. color: #000;
  1105. cursor: pointer;
  1106. &.no-start {
  1107. color: grey;
  1108. }
  1109. &.going {
  1110. color: green;
  1111. }
  1112. &.finished {
  1113. color: blue;
  1114. }
  1115. }
  1116. }
  1117. .find > div:last-child {
  1118. position: absolute;
  1119. span {
  1120. display: inline-block;
  1121. margin: 0 5px;
  1122. }
  1123. }
  1124. .charts {
  1125. padding: 10px 0 0 10px;
  1126. .icon {
  1127. position: relative;
  1128. top: 20%;
  1129. // margin-right: 10px;
  1130. font-size: 25px;
  1131. color: #e9e9e9;
  1132. }
  1133. .emptyecharts {
  1134. width: 600px;
  1135. height: 400px;
  1136. margin: auto auto;
  1137. text-align: center;
  1138. &::after {
  1139. display: block;
  1140. padding-top: 150px;
  1141. content: '无数据';
  1142. }
  1143. }
  1144. & > div {
  1145. float: left;
  1146. width: 50%;
  1147. padding: 0 10px 10px 0;
  1148. }
  1149. & > div:first-child {
  1150. width: 100%;
  1151. .content > div:first-child {
  1152. margin-left: 0;
  1153. }
  1154. .content > div {
  1155. margin-left: 20px;
  1156. // height: 30px;
  1157. & > span {
  1158. margin-right: 50px;
  1159. }
  1160. &.projectBrief {
  1161. position: relative;
  1162. height: 140px;
  1163. & > div {
  1164. position: absolute;
  1165. }
  1166. .info-div {
  1167. display: flex;
  1168. justify-content: space-between;
  1169. font {
  1170. color: #000000;
  1171. }
  1172. }
  1173. .date-div {
  1174. display: flex;
  1175. justify-content: space-evenly;
  1176. }
  1177. & > div:first-child {
  1178. top: 10px;
  1179. right: 150px;
  1180. left: 150px;
  1181. width: 50%;
  1182. margin: auto;
  1183. .user {
  1184. display: block;
  1185. float: left;
  1186. margin: 10px 0;
  1187. & > span {
  1188. float: left;
  1189. margin-right: 5px;
  1190. }
  1191. & > span > span {
  1192. display: block;
  1193. font-size: 14px;
  1194. color: #1e1e1e;
  1195. }
  1196. & > span > span:last-child {
  1197. font-size: 10px;
  1198. color: #b8b9be;
  1199. }
  1200. }
  1201. }
  1202. .label {
  1203. margin-left: 20px;
  1204. color: #c0c0c6;
  1205. }
  1206. .label:first-child {
  1207. margin-left: 0;
  1208. }
  1209. .steps.process {
  1210. & > span:first-child {
  1211. border-color: #6dcded;
  1212. }
  1213. .icon {
  1214. color: #6dcded;
  1215. }
  1216. }
  1217. .steps {
  1218. position: relative;
  1219. float: left;
  1220. width: 260px;
  1221. padding: 20px 10px;
  1222. &::before {
  1223. position: absolute;
  1224. right: 5px;
  1225. display: block;
  1226. width: 1px;
  1227. height: 56px;
  1228. content: '';
  1229. border: 1px solid rgb(246, 246, 246);
  1230. }
  1231. &:last-child::before {
  1232. display: none;
  1233. }
  1234. & > span:first-child {
  1235. display: inline-block;
  1236. width: 50px;
  1237. height: 50px;
  1238. margin: 0;
  1239. margin-right: 10px;
  1240. text-align: center;
  1241. border: 2px solid #e9e9e9;
  1242. border-radius: 50%;
  1243. }
  1244. & > span {
  1245. display: inline-block;
  1246. float: left;
  1247. font-size: 14px;
  1248. line-height: 25px;
  1249. color: #1e1e1e;
  1250. word-break: keep-all;
  1251. }
  1252. & > span > span:first-child {
  1253. display: block;
  1254. font-size: 14px;
  1255. color: #c0c0c6;
  1256. }
  1257. }
  1258. }
  1259. &.divider {
  1260. height: 1px;
  1261. margin: 10px 0;
  1262. }
  1263. }
  1264. .status {
  1265. display: block;
  1266. height: 100%;
  1267. background-color: #54c5eb;
  1268. border-radius: 10%;
  1269. .icon {
  1270. top: 20px;
  1271. font-size: 100px;
  1272. color: #76d1ef;
  1273. }
  1274. span {
  1275. position: absolute;
  1276. top: 60px;
  1277. left: 40px;
  1278. font-size: 18px;
  1279. color: #fbfdfe;
  1280. }
  1281. }
  1282. }
  1283. .echarts {
  1284. margin: auto auto;
  1285. }
  1286. .second-echarts {
  1287. width: 100%;
  1288. height: 400px;
  1289. }
  1290. .find-echarts {
  1291. width: 100%;
  1292. }
  1293. .content {
  1294. position: relative;
  1295. padding: 10px;
  1296. background-color: #fff;
  1297. & > div:first-child {
  1298. font-weight: bold;
  1299. }
  1300. & > div:first-child::before {
  1301. display: inline-block;
  1302. width: 3px;
  1303. height: 0;
  1304. // margin: 0 10px;
  1305. vertical-align: bottom;
  1306. content: '';
  1307. background-color: #1890ff;
  1308. }
  1309. }
  1310. .divider {
  1311. margin: 10px 0;
  1312. }
  1313. .bottom-div {
  1314. width: 100%;
  1315. display: flex;
  1316. flex-direction: row;
  1317. justify-content: space-between;
  1318. .middle-div {
  1319. padding: 0 10px;
  1320. }
  1321. & > div {
  1322. width: 100%;
  1323. }
  1324. }
  1325. }
  1326. </style>