From a2f4e3abf15a41876fc1c9f36fe33f5f5449e0e0 Mon Sep 17 00:00:00 2001 From: WangXu10 Date: Fri, 17 Mar 2023 18:14:00 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA)?= =?UTF-8?q?=EF=BC=9A=E9=A6=96=E9=A1=B5=E7=94=A8=E4=BE=8B=E8=AF=84=E5=AE=A1?= =?UTF-8?q?=E5=88=86=E5=B8=83=E7=BB=93=E6=9E=9C=E7=BB=9F=E8=AE=A1=E5=B1=95?= =?UTF-8?q?=E7=A4=BA=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1023471 --user=王旭 【测试跟踪】首页 - 用例评审 结果分布 统计错误 https://www.tapd.cn/55049933/s/1352438 --- .../src/components/yrogress/MsYanProgress.vue | 144 ++++++++++++++++++ .../frontend/src/components/yrogress/index.js | 61 ++++++++ .../business/case/components/BatchMove.vue | 6 +- .../business/home/components/ReviewList.vue | 17 ++- 4 files changed, 220 insertions(+), 8 deletions(-) create mode 100644 framework/sdk-parent/frontend/src/components/yrogress/MsYanProgress.vue create mode 100644 framework/sdk-parent/frontend/src/components/yrogress/index.js diff --git a/framework/sdk-parent/frontend/src/components/yrogress/MsYanProgress.vue b/framework/sdk-parent/frontend/src/components/yrogress/MsYanProgress.vue new file mode 100644 index 0000000000..e9d0228df7 --- /dev/null +++ b/framework/sdk-parent/frontend/src/components/yrogress/MsYanProgress.vue @@ -0,0 +1,144 @@ + + + diff --git a/framework/sdk-parent/frontend/src/components/yrogress/index.js b/framework/sdk-parent/frontend/src/components/yrogress/index.js new file mode 100644 index 0000000000..a797eca933 --- /dev/null +++ b/framework/sdk-parent/frontend/src/components/yrogress/index.js @@ -0,0 +1,61 @@ +import Comp from './MsYanProgress'; + +const CONF = { + tip: [ + { + text: "通过", + fillStyle: "#ccc", + }, { + text: "不通过", + fillStyle: "#9c3", + }, { + text: "评审中", + fillStyle: "#080" + }, { + text: "重新评审", + fillStyle: "#000" + } + ] +}; + +let YanProgress1 = { + install(Vue) { + Vue.component('ms-yan-progress', Object.assign({}, Comp, { + props: { + "total": { + type: Number, + default: 0 + }, + "pass": { + type: Number, + default: 0 + }, + "unPass": { + type: Number, + default: 0 + }, + "again": { + type: Number, + default: 0 + }, + "underway": { + type: Number, + default: 0 + }, + "tip": { + type: Array, + default() { + return CONF.tip; + } + } + }, + })); + } +}; + +if (window && window.Vue) { + window.Vue.use(YanProgress1); +} + +export default YanProgress1; + diff --git a/test-track/frontend/src/business/case/components/BatchMove.vue b/test-track/frontend/src/business/case/components/BatchMove.vue index d3c1289770..b980546a4c 100644 --- a/test-track/frontend/src/business/case/components/BatchMove.vue +++ b/test-track/frontend/src/business/case/components/BatchMove.vue @@ -143,8 +143,8 @@ export default { if (!value) { return ''; } - if (value.length > 20) { - return value.slice(0, 20) + '...'; + if (value.length > 25) { + return value.slice(0, 25) + '...'; } return value; } @@ -226,6 +226,6 @@ export default { height:34px; display: inline-block; title:content; - font-size: x-large; + font-size: large; } diff --git a/test-track/frontend/src/business/home/components/ReviewList.vue b/test-track/frontend/src/business/home/components/ReviewList.vue index 60f2c6bf25..911d1b65c7 100644 --- a/test-track/frontend/src/business/home/components/ReviewList.vue +++ b/test-track/frontend/src/business/home/components/ReviewList.vue @@ -54,7 +54,12 @@ @@ -83,10 +88,11 @@ import {getRelateTestCaseReview} from "@/api/test-review"; import HomePagination from "@/business/home/components/pagination/HomePagination"; import BasicStatusLabel from "metersphere-frontend/src/components/BasicStatusLabel"; import {hasPermission} from "@/business/utils/sdk-utils"; +import MsYanProgress from 'metersphere-frontend/src/components/yrogress/MsYanProgress'; export default { name: "ReviewList", - components: {MsTableOperator, HomeBaseComponent, MsTableButton, HomePagination, BasicStatusLabel}, + components: {MsTableOperator, HomeBaseComponent, MsTableButton, HomePagination, BasicStatusLabel,MsYanProgress}, data() { return { loading: false, @@ -97,9 +103,10 @@ export default { pageSize: 5, total: 0, tip: [ - {text: "X", fillStyle: '#1F232926'}, - {text: "X", fillStyle: '#F76964'}, - {text: "X", fillStyle: '#AA4FBF'} + {text: "X", fillStyle: '#AA4FBF'},//评审中 + {text: "X", fillStyle: '#55B040'},//通过 + {text: "X", fillStyle: '#F76964'},//不通过 + {text: "X", fillStyle: '#FFD131'} ] } },