12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346 |
- <template>
- <sd-detail-form
- ref="form"
- v-sd-watermark="waterMark"
- page-id="risk/task/dutie/riskDutie"
- form-id="riskDutie"
- :record-id="this.$route.query.taskId ? parseInt(this.$route.query.taskId) : null"
- :class="$style.form"
- :read-only="true"
- @sdFormReady="
- () => {
- this.initData()
- }
- "
- >
- <template v-slot="{ model, fields }">
- <div :class="[$style.charts, $style.mainDiv]">
- <div>
- <div :class="$style.content">
- <div>基本信息</div>
- <a-divider :class="$style.divider" />
- <div :class="$style.projectBrief">
- <div>
- <div :class="$style.infoDiv">
- <span :class="$style.label"
- >任务年度:<font>{{ model.year }}</font></span
- >
- <span :class="$style.label"
- >任务类型:<font>{{ fields.dutieType.attr.displayValue }}</font></span
- >
- <span :class="$style.label"
- >发起机构:<font>{{ model.inspectUnitName }}</font></span
- >
- </div>
- <div :class="$style.dateDiv">
- <div :class="$style.steps + ' ' + $style.process">
- <span>
- <a-icon
- type="sd-audit-overview-plan"
- theme="filled"
- :class="$style.icon + ' ' + $style.passed"
- />
- </span>
- <span>
- <span>任务起止日期:</span>
- <span>{{ model.dutieStartDate | sdDateFormat('YYYY-MM-DD') }}</span
- >至<span>{{ model.dutieEndDate | sdDateFormat('YYYY-MM-DD') }}</span>
- </span>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div>
- <div :class="$style.content + ' ' + $style.process">
- <div>风险识别进度</div>
- <a-divider :class="$style.divider" />
- <template v-if="firstProcess.resData.length > 0">
- <div
- ><sd-echart
- :key="firstKey"
- :class="$style.echarts"
- :options="firstProcess.chart"
- autoresize
- /></div>
- <div>
- <span @click="firstClick('all')">
- <span>{{ firstProcess.data.totalNum }} </span>
- <br />
- <span>任务总数 </span>
- </span>
- <span :class="$style['no-start']" @click="firstClick('0')">
- <span>{{ firstProcess.data.noStartNum }} </span>
- <br />
- <span>未开始 </span>
- </span>
- <span :class="$style['going']" @click="firstClick('1')">
- <span>{{ firstProcess.data.executingNum }} </span>
- <br />
- <span>执行中</span>
- </span>
- <span :class="$style['finished']" @click="firstClick('5')">
- <span>{{ firstProcess.data.finishedNum }} </span>
- <br />
- <span>已完成</span>
- </span>
- </div>
- </template>
- <template v-else>
- <div :class="$style.emptyecharts"> </div>
- <div> </div>
- </template>
- </div>
- </div>
- <div>
- <div :class="$style.content">
- <div>风险识别结果</div>
- <a-divider :class="$style.divider" />
- <template v-if="secondProcess.resData.length > 0">
- <div
- ><sd-echart
- ref="secondChart"
- :key="secondKey"
- :class="$style.secondEcharts"
- :options="secondProcess.chart"
- autoresize
- @click="secondClick"
- /></div>
- </template>
- <template v-else>
- <div :class="$style.emptyecharts"> </div>
- </template>
- </div>
- </div>
- <div>
- <div :class="$style.content + ' ' + $style.process">
- <div>风险评估进度</div>
- <a-divider :class="$style.divider" />
- <template v-if="threeProcess.resData.length > 0">
- <div
- ><sd-echart
- :key="threeKey"
- :class="$style.echarts"
- :options="threeProcess.chart"
- autoresize
- /></div>
- <div>
- <span @click="threeClick('all')">
- <span>{{ threeProcess.data.totalNum }} </span>
- <br />
- <span>任务总数 </span>
- </span>
- <span :class="$style['no-start']" @click="threeClick('0')">
- <span>{{ threeProcess.data.noStartNum }} </span>
- <br />
- <span>未开始 </span>
- </span>
- <span :class="$style['going']" @click="threeClick('1')">
- <span>{{ threeProcess.data.executingNum }} </span>
- <br />
- <span>执行中</span>
- </span>
- <span :class="$style['finished']" @click="threeClick('5')">
- <span>{{ threeProcess.data.finishedNum }} </span>
- <br />
- <span>已完成</span>
- </span>
- </div>
- </template>
- <template v-else>
- <div :class="$style.emptyecharts"> </div>
- <div> </div>
- </template>
- </div>
- </div>
- <div>
- <div :class="$style.content">
- <div>风险评估结果</div>
- <a-divider :class="$style.divider" />
- <template v-if="fourProcess.resData.length > 0">
- <div
- ><sd-echart
- ref="fourChart"
- :key="fourKey"
- :class="$style.fourEcharts"
- :options="fourProcess.chart"
- autoresize
- @click="fourClick"
- /></div>
- </template>
- <template v-else>
- <div :class="$style.emptyecharts"> </div>
- </template>
- </div>
- </div>
- <div :class="$style.bottomDiv">
- <div>
- <div :class="$style.content + ' ' + $style.process">
- <div>风险应对进度</div>
- <a-divider :class="$style.divider" />
- <template v-if="fiveProcess.resData.length > 0">
- <div
- ><sd-echart
- :key="fiveKey"
- :class="$style.echarts"
- :options="fiveProcess.chart"
- autoresize
- /></div>
- <div>
- <span @click="fiveClick('all')">
- <span>{{ fiveProcess.data.totalNum }} </span>
- <br />
- <span>任务总数 </span>
- </span>
- <span :class="$style['no-start']" @click="fiveClick('0')">
- <span>{{ fiveProcess.data.noStartNum }} </span>
- <br />
- <span>未开始 </span>
- </span>
- <span :class="$style['going']" @click="fiveClick('1')">
- <span>{{ fiveProcess.data.executingNum }} </span>
- <br />
- <span>执行中</span>
- </span>
- <span :class="$style['finished']" @click="fiveClick('5')">
- <span>{{ fiveProcess.data.finishedNum }} </span>
- <br />
- <span>已完成</span>
- </span>
- </div>
- </template>
- <template v-else>
- <div :class="$style.emptyecharts"> </div>
- <div> </div>
- </template>
- </div>
- </div>
- <div :class="$style.middleDiv">
- <div :class="$style.content">
- <div>风险应对策略</div>
- <a-divider :class="$style.divider" />
- <template v-if="sixProcess.resData.length > 0">
- <div
- ><sd-echart
- ref="sixChart"
- :key="sixKey"
- :class="$style.sixEcharts"
- :options="sixProcess.chart"
- autoresize
- @click="sixClick"
- /></div>
- </template>
- <template v-else>
- <div :class="$style.emptyecharts"> </div>
- </template>
- </div>
- </div>
- <div>
- <div :class="$style.content">
- <div>风险应对完成状态</div>
- <a-divider :class="$style.divider" />
- <template v-if="sevenProcess.resData.length > 0">
- <div
- ><sd-echart
- ref="sevenChart"
- :key="sevenKey"
- :class="$style.sevenEcharts"
- :options="sevenProcess.chart"
- autoresize
- @click="sevenClick"
- /></div>
- </template>
- <template v-else>
- <div :class="$style.emptyecharts"> </div>
- </template>
- </div>
- </div>
- </div>
- </div>
- </template>
- </sd-detail-form>
- </template>
- <script>
- import 'echarts/lib/chart/pie'
- import 'echarts/lib/chart/bar'
- import 'echarts/lib/chart/gauge'
- import 'echarts/lib/component/polar'
- import 'echarts/lib/component/legend'
- import 'echarts/lib/component/tooltip'
- import 'echarts/lib/component/title'
- import crossWindowWatcher from '@/common/services/cross-window-watcher'
- import systemManage from '@/system-manage/system-manage'
- import riskTaskOverviewServices from './risk-task-overview-services'
- import components from './_import-components/risk-task-overview-import'
- export default {
- name: 'RiskTaskOverview',
- metaInfo: {
- title: '任务概况',
- },
- components: {
- ...components,
- },
- data() {
- return {
- firstKey: 0,
- secondKey: 0,
- threeKey: 0,
- fourKey: 0,
- fiveKey: 0,
- sixKey: 0,
- sevenKey: 0,
- params: {},
- taskInfo: {},
- waterMark: systemManage.getFormWaterMark(),
- taskId: '',
- currenStep: 0,
- avatars: {
- groupLeader: {
- src: '',
- },
- projectPrincipal: {
- src: '',
- },
- },
- steps: [],
- firstProcess: {
- selectVal: 'all',
- resData: [],
- data: {},
- chart: {
- title: [
- {
- text: '95%',
- textStyle: {
- color: '#8675FF',
- fontSize: 40,
- },
- itemGap: 20,
- x: 'center',
- top: '50%',
- },
- {
- text: '完成率',
- textStyle: {
- color: '#444444',
- fontSize: 25,
- fontWeight: 'normal',
- },
- itemGap: 20,
- x: 'center',
- top: '40%',
- },
- ],
- angleAxis: {
- polarIndex: 0,
- min: 0,
- max: 100,
- show: false,
- boundaryGap: ['40%', '40%'],
- startAngle: 90,
- },
- radiusAxis: {
- type: 'category',
- show: true,
- axisLabel: {
- show: false,
- },
- axisLine: {
- show: false,
- },
- axisTick: {
- show: false,
- },
- },
- polar: [{}],
- series: [
- {
- type: 'bar',
- z: 10,
- name: '完成度',
- data: [50],
- showBackground: false,
- backgroundStyle: {
- borderWidth: 10,
- width: 10,
- },
- coordinateSystem: 'polar',
- roundCap: true,
- barWidth: 20, // 大的占比环
- itemStyle: {
- normal: {
- opacity: 1,
- color: '#8675FF',
- },
- },
- },
- {
- type: 'pie',
- name: '内层细圆环',
- radius: ['45%', '35%'],
- startAngle: 90,
- hoverAnimation: false,
- clockWise: true,
- silent: true,
- itemStyle: {
- normal: {
- color: '#DCE0FA',
- shadowBlur: 0,
- shadowColor: '#66666a',
- },
- },
- tooltip: {
- show: false,
- },
- label: {
- show: false,
- },
- data: [100],
- },
- ],
- },
- },
- secondProcess: {
- selectVal: 'all',
- resData: [],
- data: {},
- chart: {
- color: ['#5470c6', '#91cc75', '#fac858'],
- tooltip: {
- trigger: 'item',
- },
- legend: {
- top: '5%',
- left: 'center',
- },
- series: [
- {
- name: '风险识别结果',
- type: 'pie',
- radius: ['40%', '70%'],
- avoidLabelOverlap: false,
- itemStyle: {
- borderRadius: 100,
- borderColor: '#fff',
- borderWidth: 2,
- },
- label: {
- show: false,
- position: 'center',
- },
- emphasis: {
- label: {
- show: true,
- fontSize: '40',
- fontWeight: 'bold',
- },
- },
- labelLine: {
- show: false,
- },
- data: [],
- },
- ],
- },
- },
- threeProcess: {
- selectVal: 'all',
- resData: [],
- data: {},
- chart: {
- title: [
- {
- text: '95%',
- textStyle: {
- color: '#8675FF',
- fontSize: 40,
- },
- itemGap: 20,
- x: 'center',
- top: '50%',
- },
- {
- text: '完成率',
- textStyle: {
- color: '#444444',
- fontSize: 25,
- fontWeight: 'normal',
- },
- itemGap: 20,
- x: 'center',
- top: '40%',
- },
- ],
- angleAxis: {
- polarIndex: 0,
- min: 0,
- max: 100,
- show: false,
- boundaryGap: ['40%', '40%'],
- startAngle: 90,
- },
- radiusAxis: {
- type: 'category',
- show: true,
- axisLabel: {
- show: false,
- },
- axisLine: {
- show: false,
- },
- axisTick: {
- show: false,
- },
- },
- polar: [{}],
- series: [
- {
- type: 'bar',
- z: 10,
- name: '完成度',
- data: [50],
- showBackground: false,
- backgroundStyle: {
- borderWidth: 10,
- width: 10,
- },
- coordinateSystem: 'polar',
- roundCap: true,
- barWidth: 20, // 大的占比环
- itemStyle: {
- normal: {
- opacity: 1,
- color: '#8675FF',
- },
- },
- },
- {
- type: 'pie',
- name: '内层细圆环',
- radius: ['45%', '35%'],
- startAngle: 90,
- hoverAnimation: false,
- clockWise: true,
- silent: true,
- itemStyle: {
- normal: {
- color: '#DCE0FA',
- shadowBlur: 0,
- shadowColor: '#66666a',
- },
- },
- tooltip: {
- show: false,
- },
- label: {
- show: false,
- },
- data: [100],
- },
- ],
- },
- },
- fourProcess: {
- selectVal: 'all',
- resData: [],
- data: {},
- chart: {
- color: ['#5470c6', '#91cc75', '#fac858'],
- tooltip: {
- trigger: 'item',
- },
- legend: {
- top: '5%',
- left: 'center',
- },
- series: [
- {
- name: '风险识别结果',
- type: 'pie',
- radius: ['40%', '70%'],
- avoidLabelOverlap: false,
- itemStyle: {
- borderRadius: 100,
- borderColor: '#fff',
- borderWidth: 2,
- },
- label: {
- show: false,
- position: 'center',
- },
- emphasis: {
- label: {
- show: true,
- fontSize: '40',
- fontWeight: 'bold',
- },
- },
- labelLine: {
- show: false,
- },
- data: [],
- },
- ],
- },
- },
- fiveProcess: {
- selectVal: 'all',
- resData: [],
- data: {},
- chart: {
- title: [
- {
- text: '95%',
- textStyle: {
- color: '#8675FF',
- fontSize: 40,
- },
- itemGap: 20,
- x: 'center',
- top: '50%',
- },
- {
- text: '完成率',
- textStyle: {
- color: '#444444',
- fontSize: 25,
- fontWeight: 'normal',
- },
- itemGap: 20,
- x: 'center',
- top: '40%',
- },
- ],
- angleAxis: {
- polarIndex: 0,
- min: 0,
- max: 100,
- show: false,
- boundaryGap: ['40%', '40%'],
- startAngle: 90,
- },
- radiusAxis: {
- type: 'category',
- show: true,
- axisLabel: {
- show: false,
- },
- axisLine: {
- show: false,
- },
- axisTick: {
- show: false,
- },
- },
- polar: [{}],
- series: [
- {
- type: 'bar',
- z: 10,
- name: '完成度',
- data: [50],
- showBackground: false,
- backgroundStyle: {
- borderWidth: 10,
- width: 10,
- },
- coordinateSystem: 'polar',
- roundCap: true,
- barWidth: 20, // 大的占比环
- itemStyle: {
- normal: {
- opacity: 1,
- color: '#8675FF',
- },
- },
- },
- {
- type: 'pie',
- name: '内层细圆环',
- radius: ['45%', '35%'],
- startAngle: 90,
- hoverAnimation: false,
- clockWise: true,
- silent: true,
- itemStyle: {
- normal: {
- color: '#DCE0FA',
- shadowBlur: 0,
- shadowColor: '#66666a',
- },
- },
- tooltip: {
- show: false,
- },
- label: {
- show: false,
- },
- data: [100],
- },
- ],
- },
- },
- sixProcess: {
- selectVal: 'all',
- resData: [],
- data: {},
- chart: {
- color: ['#91cc75', '#fac858', '#ee6666', '#5470c6'],
- tooltip: {
- trigger: 'item',
- },
- legend: {
- top: '5%',
- left: 'center',
- },
- series: [
- {
- name: '风险识别结果',
- type: 'pie',
- radius: ['40%', '70%'],
- avoidLabelOverlap: false,
- itemStyle: {
- borderRadius: 100,
- borderColor: '#fff',
- borderWidth: 2,
- },
- label: {
- show: false,
- position: 'center',
- },
- emphasis: {
- label: {
- show: true,
- fontSize: '40',
- fontWeight: 'bold',
- },
- },
- labelLine: {
- show: false,
- },
- data: [],
- },
- ],
- },
- },
- sevenProcess: {
- selectVal: 'all',
- resData: [],
- data: {},
- chart: {
- color: [],
- tooltip: {
- trigger: 'item',
- },
- series: [
- {
- stillShowZeroSum: false,
- name: '风险识别结果',
- type: 'pie',
- labelLine: { length: 50 },
- radius: [35, 145],
- roseType: 'area',
- data: [],
- },
- ],
- },
- },
- }
- },
- created() {
- const taskId = this.$route.query.taskId
- if (taskId) {
- this.taskId = taskId
- }
- },
- mounted() {},
- methods: {
- // 第一个图表点击钻取
- firstClick(type) {
- const url = `/risk-task-overview-list?taskId=${this.taskId}&listType=first${
- type === 'all' ? '' : '&endType=' + type
- }`
- crossWindowWatcher.waitForChanged(url)
- },
- // 第二个图表点击钻取
- secondClick(params) {
- let type
- if (params.data.name === '新增') {
- type = 'insert'
- }
- if (params.data.name === '修改') {
- type = 'update'
- }
- if (params.data.name === '废弃') {
- type = 'delete'
- }
- const url = `/risk-task-overview-list?taskId=${this.taskId}&listType=second&dataType=${type}`
- crossWindowWatcher.waitForChanged(url)
- },
- // 第三个图表点击钻取
- threeClick(type) {
- const url = `/risk-task-overview-list?taskId=${this.taskId}&listType=three${
- type === 'all' ? '' : '&endType=' + type
- }`
- crossWindowWatcher.waitForChanged(url)
- },
- // 第四个图表点击钻取
- fourClick(params) {
- let type
- if (params.data.name === '高风险') {
- type = '高风险'
- }
- if (params.data.name === '中风险') {
- type = '中风险'
- }
- if (params.data.name === '低风险') {
- type = '低风险'
- }
- const url = `/risk-task-overview-list?taskId=${this.taskId}&listType=four&dataType=${type}`
- crossWindowWatcher.waitForChanged(url)
- },
- // 第五个图表点击钻取
- fiveClick(type) {
- const url = `/risk-task-overview-list?taskId=${this.taskId}&listType=five${
- type === 'all' ? '' : '&endType=' + type
- }`
- crossWindowWatcher.waitForChanged(url)
- },
- // 第六个图表点击钻取
- sixClick(params) {
- let type
- if (params.data.name === '接受') {
- type = 'accept'
- }
- if (params.data.name === '规避') {
- type = 'avoid'
- }
- if (params.data.name === '降低') {
- type = 'reduce'
- }
- if (params.data.name === '转移') {
- type = 'transfer'
- }
- const url = `/risk-task-overview-list?taskId=${this.taskId}&listType=six&dataType=${type}`
- crossWindowWatcher.waitForChanged(url)
- },
- // 第七个图表点击钻取
- sevenClick(params) {
- let type
- if (params.data.name === '尚未应对') {
- type = 'noYetResponded'
- }
- if (params.data.name === '进行中') {
- type = 'progress'
- }
- if (params.data.name === '已完成') {
- type = 'completed'
- }
- if (params.data.name === '不应对') {
- type = 'notResponded'
- }
- const url = `/risk-task-overview-list?taskId=${this.taskId}&listType=seven&dataType=${type}`
- crossWindowWatcher.waitForChanged(url)
- },
- getStepName(stepId) {
- const steps = this.steps.filter((item) => {
- return item.id === stepId
- })
- if (steps.length !== 0) {
- return steps[0].name
- }
- return ''
- },
- getUserAvatar(account) {
- return riskTaskOverviewServices.getUserAvatar(account).then((res) => {
- return URL.createObjectURL(res.data)
- })
- },
- initData() {
- // 获取第一个图表
- this.getFirstData({ taskId: this.taskId, columnValue: 'identifyProgress' })
- // 获取第二个图表
- this.getSecondData({ taskId: this.taskId, columnValue: 'identifyResult' })
- // 获取第三个图表
- this.getThreeData({ taskId: this.taskId, columnValue: 'assessmentProgress' })
- // 获取第四个图表
- this.getFourData({ taskId: this.taskId, columnValue: 'assessmentResult' })
- // 获取第五个图表
- this.getFiveData({ taskId: this.taskId, columnValue: 'responseProgress' })
- // 获取第六个图表
- this.getSixData({ taskId: this.taskId, columnValue: 'responseStrategy' })
- // 获取第七个图表
- this.getSevenData({ taskId: this.taskId, columnValue: 'responseState' })
- },
- // 获取第一个图表
- getFirstData(params) {
- // 风险识别进度
- riskTaskOverviewServices.getEchartsData(params).then((res) => {
- this.firstProcess.resData = res.data.data
- if (res.data.data.length > 0) {
- this.firstProcess.chart.series[0].data = [Math.round(res.data.data[0].TYPE5)]
- if (res.data.data[0].TYPES === 0) {
- this.firstProcess.chart.title[0].text = '0%'
- } else {
- this.firstProcess.chart.title[0].text =
- Math.round((res.data.data[0].TYPE5 / res.data.data[0].TYPES) * 100) + '%'
- }
- this.firstProcess.chart.series[0].data = [
- Math.round((res.data.data[0].TYPE5 / res.data.data[0].TYPES) * 100),
- ]
- this.firstKey++
- this.firstProcess.data = {
- totalNum: res.data.data[0].TYPES,
- noStartNum: res.data.data[0].TYPE0,
- executingNum: res.data.data[0].TYPE1,
- finishedNum: res.data.data[0].TYPE5,
- }
- }
- })
- },
- // 获取第二个图表
- getSecondData(params) {
- riskTaskOverviewServices.getEchartsData(params).then((res) => {
- this.secondProcess.resData = res.data.data
- if (res.data.data.length > 0) {
- this.secondProcess.chart.series[0].data.push(
- { value: res.data.data[0].INSERTS, name: '新增' },
- { value: res.data.data[0].UPDATES, name: '修改' },
- { value: res.data.data[0].DELETES, name: '废弃' }
- )
- }
- })
- },
- // 获取第三个图表
- getThreeData(params) {
- // 风险识别进度
- riskTaskOverviewServices.getEchartsData(params).then((res) => {
- this.threeProcess.resData = res.data.data
- if (res.data.data.length > 0) {
- this.threeProcess.chart.series[0].data = [Math.round(res.data.data[0].TYPE5)]
- if (res.data.data[0].TYPES === 0) {
- this.threeProcess.chart.title[0].text = '0%'
- } else {
- this.threeProcess.chart.title[0].text =
- Math.round((res.data.data[0].TYPE5 / res.data.data[0].TYPES) * 100) + '%'
- }
- this.threeProcess.chart.series[0].data = [
- Math.round((res.data.data[0].TYPE5 / res.data.data[0].TYPES) * 100),
- ]
- this.threeKey++
- this.threeProcess.data = {
- totalNum: res.data.data[0].TYPES,
- noStartNum: res.data.data[0].TYPE0,
- executingNum: res.data.data[0].TYPE1,
- finishedNum: res.data.data[0].TYPE5,
- }
- }
- })
- },
- // 获取第四个图表
- getFourData(params) {
- riskTaskOverviewServices.getEchartsData(params).then((res) => {
- this.fourProcess.resData = res.data.data
- if (res.data.data.length === 0) return
- if (res.data.data.length > 0) {
- this.fourProcess.chart.series[0].data.push(
- { value: res.data.data[0]['高风险'], name: '高风险' },
- { value: res.data.data[0]['中风险'], name: '中风险' },
- { value: res.data.data[0]['低风险'], name: '低风险' }
- )
- }
- })
- },
- // 获取第五个图表
- getFiveData(params) {
- riskTaskOverviewServices.getEchartsData(params).then((res) => {
- this.fiveProcess.resData = res.data.data
- if (res.data.data.length > 0) {
- this.fiveProcess.chart.series[0].data = [Math.round(res.data.data[0].TYPE5)]
- if (res.data.data[0].TYPES === 0) {
- this.fiveProcess.chart.title[0].text = '0%'
- } else {
- this.fiveProcess.chart.title[0].text =
- Math.round((res.data.data[0].TYPE5 / res.data.data[0].TYPES) * 100) + '%'
- }
- this.fiveProcess.chart.series[0].data = [
- Math.round((res.data.data[0].TYPE5 / res.data.data[0].TYPES) * 100),
- ]
- this.fiveKey++
- this.fiveProcess.data = {
- totalNum: res.data.data[0].TYPES,
- noStartNum: res.data.data[0].TYPE0,
- executingNum: res.data.data[0].TYPE1,
- finishedNum: res.data.data[0].TYPE5,
- }
- }
- })
- },
- // 获取第六个图表
- getSixData(params) {
- riskTaskOverviewServices.getEchartsData(params).then((res) => {
- this.sixProcess.resData = res.data.data
- if (res.data.data.length === 0) return
- if (res.data.data.length > 0) {
- this.sixProcess.chart.series[0].data.push(
- { value: res.data.data[0]['接受'], name: '接受' },
- { value: res.data.data[0]['规避'], name: '规避' },
- { value: res.data.data[0]['降低'], name: '降低' },
- { value: res.data.data[0]['转移'], name: '转移' }
- )
- }
- })
- },
- // 获取第七个图表
- getSevenData(params) {
- riskTaskOverviewServices.getEchartsData(params).then((res) => {
- this.sevenProcess.resData = res.data.data
- if (res.data.data.length === 0) return
- if (res.data.data.length > 0) {
- if (res.data.data[0]['尚未应对'] !== 0) {
- this.sevenProcess.chart.color.push('#ea7ccc')
- this.sevenProcess.chart.series[0].data.push({
- value: res.data.data[0]['尚未应对'],
- name: '尚未应对',
- })
- }
- if (res.data.data[0]['进行中'] !== 0) {
- this.sevenProcess.chart.color.push('#5470c6')
- this.sevenProcess.chart.series[0].data.push({
- value: res.data.data[0]['进行中'],
- name: '进行中',
- })
- }
- if (res.data.data[0]['已完成'] !== 0) {
- this.sevenProcess.chart.color.push('#91cc75')
- this.sevenProcess.chart.series[0].data.push({
- value: res.data.data[0]['已完成'],
- name: '已完成',
- })
- }
- if (res.data.data[0]['不应对'] !== 0) {
- this.sevenProcess.chart.color.push('#fac858')
- this.sevenProcess.chart.series[0].data.push({
- value: res.data.data[0]['不应对'],
- name: '不应对',
- })
- }
- }
- })
- },
- },
- }
- </script>
- <style module lang="scss">
- @use '@/common/design' as *;
- @import '@/webflow/sd-flow-form.scss';
- .main-div {
- display: inline-block;
- background: #ededed;
- width: 100%;
- }
- .radio-div {
- position: absolute;
- margin: 0px 30px;
- top: 65px;
- z-index: 200;
- }
- :global(.title_sd-detail-form_common) {
- visibility: hidden;
- }
- .res-div {
- position: absolute;
- bottom: 30px;
- width: 100%;
- display: flex;
- flex-direction: row;
- justify-content: space-evenly;
- padding: 0px 30%;
- font-size: 18px;
- font-weight: bold;
- }
- .four-echarts {
- width: 100%;
- }
- .test-div {
- position: absolute;
- right: 0;
- width: 100%;
- display: flex;
- font-size: 16px;
- font-weight: bold;
- flex-direction: column;
- color: #000;
- align-items: flex-end;
- margin: 0 30px;
- z-index: 100;
- span {
- cursor: pointer;
- }
- }
- .form {
- // background-color: rgb(232, 232, 232);
- .title_sd-detail-form_common .buttons_sd-detail-form_common {
- display: none;
- }
- :global(.buttons_sd-detail-form_common) {
- visibility: hidden;
- display: none;
- }
- }
- .process > div:last-child {
- position: absolute;
- bottom: 30px;
- width: 100%;
- text-align: center;
- display: flex;
- flex-direction: row;
- justify-content: space-evenly;
- padding: 0px 30%;
- & > span {
- display: inline-block;
- margin: 0 5px;
- color: #000;
- cursor: pointer;
- &.no-start {
- color: grey;
- }
- &.going {
- color: green;
- }
- &.finished {
- color: blue;
- }
- }
- }
- .find > div:last-child {
- position: absolute;
- span {
- display: inline-block;
- margin: 0 5px;
- }
- }
- .charts {
- padding: 10px 0 0 10px;
- .icon {
- position: relative;
- top: 20%;
- // margin-right: 10px;
- font-size: 25px;
- color: #e9e9e9;
- }
- .emptyecharts {
- width: 600px;
- height: 400px;
- margin: auto auto;
- text-align: center;
- &::after {
- display: block;
- padding-top: 150px;
- content: '无数据';
- }
- }
- & > div {
- float: left;
- width: 50%;
- padding: 0 10px 10px 0;
- }
- & > div:first-child {
- width: 100%;
- .content > div:first-child {
- margin-left: 0;
- }
- .content > div {
- margin-left: 20px;
- // height: 30px;
- & > span {
- margin-right: 50px;
- }
- &.projectBrief {
- position: relative;
- height: 140px;
- & > div {
- position: absolute;
- }
- .info-div {
- display: flex;
- justify-content: space-between;
- font {
- color: #000000;
- }
- }
- .date-div {
- display: flex;
- justify-content: space-evenly;
- }
- & > div:first-child {
- top: 10px;
- right: 150px;
- left: 150px;
- width: 50%;
- margin: auto;
- .user {
- display: block;
- float: left;
- margin: 10px 0;
- & > span {
- float: left;
- margin-right: 5px;
- }
- & > span > span {
- display: block;
- font-size: 14px;
- color: #1e1e1e;
- }
- & > span > span:last-child {
- font-size: 10px;
- color: #b8b9be;
- }
- }
- }
- .label {
- margin-left: 20px;
- color: #c0c0c6;
- }
- .label:first-child {
- margin-left: 0;
- }
- .steps.process {
- & > span:first-child {
- border-color: #6dcded;
- }
- .icon {
- color: #6dcded;
- }
- }
- .steps {
- position: relative;
- float: left;
- width: 260px;
- padding: 20px 10px;
- &::before {
- position: absolute;
- right: 5px;
- display: block;
- width: 1px;
- height: 56px;
- content: '';
- border: 1px solid rgb(246, 246, 246);
- }
- &:last-child::before {
- display: none;
- }
- & > span:first-child {
- display: inline-block;
- width: 50px;
- height: 50px;
- margin: 0;
- margin-right: 10px;
- text-align: center;
- border: 2px solid #e9e9e9;
- border-radius: 50%;
- }
- & > span {
- display: inline-block;
- float: left;
- font-size: 14px;
- line-height: 25px;
- color: #1e1e1e;
- word-break: keep-all;
- }
- & > span > span:first-child {
- display: block;
- font-size: 14px;
- color: #c0c0c6;
- }
- }
- }
- &.divider {
- height: 1px;
- margin: 10px 0;
- }
- }
- .status {
- display: block;
- height: 100%;
- background-color: #54c5eb;
- border-radius: 10%;
- .icon {
- top: 20px;
- font-size: 100px;
- color: #76d1ef;
- }
- span {
- position: absolute;
- top: 60px;
- left: 40px;
- font-size: 18px;
- color: #fbfdfe;
- }
- }
- }
- .echarts {
- margin: auto auto;
- }
- .second-echarts {
- width: 100%;
- height: 400px;
- }
- .find-echarts {
- width: 100%;
- }
- .content {
- position: relative;
- padding: 10px;
- background-color: #fff;
- & > div:first-child {
- font-weight: bold;
- }
- & > div:first-child::before {
- display: inline-block;
- width: 3px;
- height: 0;
- // margin: 0 10px;
- vertical-align: bottom;
- content: '';
- background-color: #1890ff;
- }
- }
- .divider {
- margin: 10px 0;
- }
- .bottom-div {
- width: 100%;
- display: flex;
- flex-direction: row;
- justify-content: space-between;
- .middle-div {
- padding: 0 10px;
- }
- & > div {
- width: 100%;
- }
- }
- }
- </style>
|