Commit 0e773de3 authored by 高滢's avatar 高滢

feat(任务概览): 统计

parent 5559fa10
......@@ -84,11 +84,11 @@
<div>
<el-tabs v-model="activeName" @tab-click="tabClick">
<el-tab-pane label="数据统计" name="dataStatistics">
<div class="tip-navigation">
<div v-if="dataStatistic.systemExist" class="tip-navigation">
<div class="tip"></div>
<div class="tip-title">体系审查</div>
</div>
<el-row :gutter="40">
<el-row v-if="dataStatistic.systemExist" :gutter="40">
<el-col :span="12">
<div style="border: 1px solid #ebebeb; padding: 24px 0 24px 24px">
<el-row class="prograss-title"> 用例维度 </el-row>
......@@ -132,18 +132,26 @@
:text-inside="true"
:stroke-width="16"
:percentage="
percentageChange(dataStatistic.systemDetails)
roundToInt(
dataStatistic.systemDetails,
dataStatistic.systemDetails
)
"
:format="progressLine"
:format="progressLine(dataStatistic.systemDetails)"
text-color="#fff"
></el-progress>
<el-progress
:text-inside="true"
:stroke-width="16"
:percentage="
percentageChange(dataStatistic.systemDetailsPassNum)
roundToInt(
dataStatistic.systemDetails,
dataStatistic.systemDetailsPassNum
)
"
:format="
progressLine(dataStatistic.systemDetailsPassNum)
"
:format="progressLine"
status="success"
text-color="#fff"
></el-progress>
......@@ -151,9 +159,14 @@
:text-inside="true"
:stroke-width="16"
:percentage="
percentageChange(dataStatistic.systemDetailsNoPassNum)
roundToInt(
dataStatistic.systemDetails,
dataStatistic.systemDetailsNoPassNum
)
"
:format="
progressLine(dataStatistic.systemDetailsNoPassNum)
"
:format="progressLine"
status="warning"
text-color="#fff"
></el-progress>
......@@ -161,9 +174,14 @@
:text-inside="true"
:stroke-width="16"
:percentage="
percentageChange(dataStatistic.systemDetailsUnderNum)
roundToInt(
dataStatistic.systemDetails,
dataStatistic.systemDetailsUnderNum
)
"
:format="
progressLine(dataStatistic.systemDetailsUnderNum)
"
:format="progressLine"
status="exception"
color="#f98921"
text-color="#fff"
......@@ -205,7 +223,7 @@
>标准条款通过(个)</span
>
<span class="line-prograss-title"
>标准条款未通过(</span
>标准条款未通过(</span
>
<span class="line-prograss-title">审查中(个)</span>
</div>
......@@ -216,18 +234,26 @@
:text-inside="true"
:stroke-width="16"
:percentage="
percentageChange(dataStatistic.systemStandards)
roundToInt(
dataStatistic.systemStandards,
dataStatistic.systemStandards
)
"
:format="progressLine"
:format="progressLine(dataStatistic.systemStandards)"
text-color="#fff"
></el-progress>
<el-progress
:text-inside="true"
:stroke-width="16"
:percentage="
percentageChange(dataStatistic.systemStandardsPassNum)
roundToInt(
dataStatistic.systemStandards,
dataStatistic.systemStandardsPassNum
)
"
:format="
progressLine(dataStatistic.systemStandardsPassNum)
"
:format="progressLine"
status="success"
text-color="#fff"
></el-progress>
......@@ -235,11 +261,14 @@
:text-inside="true"
:stroke-width="16"
:percentage="
percentageChange(
roundToInt(
dataStatistic.systemStandards,
dataStatistic.systemStandardsNoPassNum
)
"
:format="progressLine"
:format="
progressLine(dataStatistic.systemStandardsNoPassNum)
"
status="warning"
text-color="#fff"
></el-progress>
......@@ -247,11 +276,14 @@
:text-inside="true"
:stroke-width="16"
:percentage="
percentageChange(
roundToInt(
dataStatistic.systemStandards,
dataStatistic.systemStandardsUnderNum
)
"
:format="progressLine"
:format="
progressLine(dataStatistic.systemStandardsUnderNum)
"
status="exception"
color="#f98921"
text-color="#fff"
......@@ -263,11 +295,11 @@
</el-col>
</el-row>
<div class="tip-navigation">
<div v-if="dataStatistic.carExist" class="tip-navigation">
<div class="tip"></div>
<div class="tip-title">车型审查</div>
</div>
<el-row :gutter="40">
<el-row v-if="dataStatistic.carExist" :gutter="40">
<el-col :span="12">
<div style="border: 1px solid #ebebeb; padding: 24px 0 24px 24px">
<el-row class="prograss-title"> 用例维度 </el-row>
......@@ -308,17 +340,25 @@
<el-progress
:text-inside="true"
:stroke-width="16"
:percentage="percentageChange(dataStatistic.carDetails)"
:format="progressLine"
:percentage="
roundToInt(
dataStatistic.carDetails,
dataStatistic.carDetails
)
"
:format="progressLine(dataStatistic.carDetails)"
text-color="#fff"
></el-progress>
<el-progress
:text-inside="true"
:stroke-width="16"
:percentage="
percentageChange(dataStatistic.carDetailsPassNum)
roundToInt(
dataStatistic.carDetails,
dataStatistic.carDetailsPassNum
)
"
:format="progressLine"
:format="progressLine(dataStatistic.carDetailsPassNum)"
status="success"
text-color="#fff"
></el-progress>
......@@ -326,9 +366,14 @@
:text-inside="true"
:stroke-width="16"
:percentage="
percentageChange(dataStatistic.carDetailsNoPassNum)
roundToInt(
dataStatistic.carDetails,
dataStatistic.carDetailsNoPassNum
)
"
:format="
progressLine(dataStatistic.carDetailsNoPassNum)
"
:format="progressLine"
status="warning"
text-color="#fff"
></el-progress>
......@@ -336,9 +381,12 @@
:text-inside="true"
:stroke-width="16"
:percentage="
percentageChange(dataStatistic.carDetailsUnderNum)
roundToInt(
dataStatistic.carDetails,
dataStatistic.carDetailsUnderNum
)
"
:format="progressLine"
:format="progressLine(dataStatistic.carDetailsUnderNum)"
status="exception"
color="#f98921"
text-color="#fff"
......@@ -380,7 +428,7 @@
>标准条款通过(个)</span
>
<span class="line-prograss-title"
>标准条款未通过(</span
>标准条款未通过(</span
>
<span class="line-prograss-title">审查中(个)</span>
</div>
......@@ -391,18 +439,26 @@
:text-inside="true"
:stroke-width="16"
:percentage="
percentageChange(dataStatistic.carStandards)
roundToInt(
dataStatistic.carStandards,
dataStatistic.carStandards
)
"
:format="progressLine"
:format="progressLine(dataStatistic.carStandards)"
text-color="#fff"
></el-progress>
<el-progress
:text-inside="true"
:stroke-width="16"
:percentage="
percentageChange(dataStatistic.carStandardsPassNum)
roundToInt(
dataStatistic.carStandards,
dataStatistic.carStandardsPassNum
)
"
:format="
progressLine(dataStatistic.carStandardsPassNum)
"
:format="progressLine"
status="success"
text-color="#fff"
></el-progress>
......@@ -410,9 +466,14 @@
:text-inside="true"
:stroke-width="16"
:percentage="
percentageChange(dataStatistic.carStandardsNoPassNum)
roundToInt(
dataStatistic.carStandards,
dataStatistic.carStandardsNoPassNum
)
"
:format="
progressLine(dataStatistic.carStandardsNoPassNum)
"
:format="progressLine"
status="warning"
text-color="#fff"
></el-progress>
......@@ -420,9 +481,14 @@
:text-inside="true"
:stroke-width="16"
:percentage="
percentageChange(dataStatistic.carStandardsUnderNum)
roundToInt(
dataStatistic.carStandards,
dataStatistic.carStandardsUnderNum
)
"
:format="
progressLine(dataStatistic.carStandardsUnderNum)
"
:format="progressLine"
status="exception"
color="#f98921"
text-color="#fff"
......@@ -433,11 +499,11 @@
</div>
</el-col>
</el-row>
<div class="tip-navigation">
<div v-if="dataStatistic.testExist" class="tip-navigation">
<div class="tip"></div>
<div class="tip-title">车型试验</div>
</div>
<el-row :gutter="40">
<el-row v-if="dataStatistic.testExist" :gutter="40">
<el-col :span="12">
<div style="border: 1px solid #ebebeb; padding: 24px 0 24px 24px">
<el-row class="prograss-title"> 用例维度 </el-row>
......@@ -477,18 +543,24 @@
:text-inside="true"
:stroke-width="16"
:percentage="
percentageChange(dataStatistic.testDetails)
roundToInt(
dataStatistic.testDetails,
dataStatistic.testDetails
)
"
:format="progressLine"
:format="progressLine(dataStatistic.testDetails)"
text-color="#fff"
></el-progress>
<el-progress
:text-inside="true"
:stroke-width="16"
:percentage="
percentageChange(dataStatistic.testDetailsPassNum)
roundToInt(
dataStatistic.testDetails,
dataStatistic.testDetailsPassNum
)
"
:format="progressLine"
:format="progressLine(dataStatistic.testDetailsPassNum)"
status="success"
text-color="#fff"
></el-progress>
......@@ -496,9 +568,14 @@
:text-inside="true"
:stroke-width="16"
:percentage="
percentageChange(dataStatistic.testDetailsNoPassNum)
roundToInt(
dataStatistic.testDetails,
dataStatistic.testDetailsNoPassNum
)
"
:format="
progressLine(dataStatistic.testDetailsNoPassNum)
"
:format="progressLine"
status="warning"
text-color="#fff"
></el-progress>
......@@ -506,9 +583,14 @@
:text-inside="true"
:stroke-width="16"
:percentage="
percentageChange(dataStatistic.testDetailsUnderNum)
roundToInt(
dataStatistic.testDetails,
dataStatistic.testDetailsUnderNum
)
"
:format="
progressLine(dataStatistic.testDetailsUnderNum)
"
:format="progressLine"
status="exception"
color="#f98921"
text-color="#fff"
......@@ -557,18 +639,28 @@
:text-inside="true"
:stroke-width="16"
:percentage="
percentageChange(dataStatistic.testDetailsUnderNum)
roundToInt(
dataStatistic.testDetailsUnderNum,
dataStatistic.testDetailsUnderNum
)
"
:format="
progressLine(dataStatistic.testDetailsUnderNum)
"
:format="progressLine"
text-color="#fff"
></el-progress>
<el-progress
:text-inside="true"
:stroke-width="16"
:percentage="
percentageChange(dataStatistic.testStandardsPassNum)
roundToInt(
dataStatistic.testDetailsUnderNum,
dataStatistic.testStandardsPassNum
)
"
:format="
progressLine(dataStatistic.testStandardsPassNum)
"
:format="progressLine"
status="success"
text-color="#fff"
></el-progress>
......@@ -576,9 +668,14 @@
:text-inside="true"
:stroke-width="16"
:percentage="
percentageChange(dataStatistic.testStandardsNoPassNum)
roundToInt(
dataStatistic.testDetailsUnderNum,
dataStatistic.testStandardsNoPassNum
)
"
:format="
progressLine(dataStatistic.testStandardsNoPassNum)
"
:format="progressLine"
status="warning"
text-color="#fff"
></el-progress>
......@@ -586,9 +683,14 @@
:text-inside="true"
:stroke-width="16"
:percentage="
percentageChange(dataStatistic.testStandardsUnderNum)
roundToInt(
dataStatistic.testDetailsUnderNum,
dataStatistic.testStandardsUnderNum
)
"
:format="
progressLine(dataStatistic.testStandardsUnderNum)
"
:format="progressLine"
status="exception"
color="#f98921"
text-color="#fff"
......@@ -861,13 +963,23 @@ export default {
},
methods: {
dict,
roundToInt(a, b) {
if (a === null) {
a = 0
return 0
}
if (b === null) {
b = 0
}
return Math.round((b / a) * 100)
},
dictValueReturn(item) {
if (item === 'sraifv') {
return '汽车信息安全管理体系要求'
return '信息安全管理体系要求'
} else if (item === 'grfis') {
return '汽车信息安全一般要求'
return '信息安全一般要求'
} else {
return '汽车信息安全技术要求'
return '信息安全技术要求'
}
},
getDataStatistics() {
......@@ -892,8 +1004,16 @@ export default {
return data.split(',')
},
tabClick() {},
progressLine(percentage) {
return (percentage = `${percentage}`)
progressLine(data) {
if (data) {
return () => {
return data
}
} else {
return () => {
return 0
}
}
},
percentageChange(data) {
if (data) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment