From 0de297e5b9aba43632a18de32318fcbd2ce32e95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=AE=BF=E6=98=95?= Date: Tue, 16 Mar 2021 11:44:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BE=E8=A1=A8+=E5=AE=A1=E6=89=B9=E5=8F=AF?= =?UTF-8?q?=E4=BB=A5=E4=B8=8D=E5=A1=AB=E6=84=8F=E8=A7=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/e-charts/multiple_circle.vue | 77 ++++++++++--------- .../fwgl/approval_service_detail.vue | 2 +- src/pages/workbench/workPlace.vue | 3 +- .../workbench/yygl/approval_app_detail.vue | 2 +- 4 files changed, 44 insertions(+), 40 deletions(-) diff --git a/src/components/e-charts/multiple_circle.vue b/src/components/e-charts/multiple_circle.vue index 59e42d5..0ace527 100644 --- a/src/components/e-charts/multiple_circle.vue +++ b/src/components/e-charts/multiple_circle.vue @@ -11,37 +11,37 @@ export default { type: Array, default: () => { return []; - } + }, }, text: { type: String, - default: "" + default: "", }, show_center_data: { type: Boolean, - default: true + default: true, }, bar_width: { type: Number, - default: 5 + default: 5, }, isFwsp: { type: Boolean, - default: false + default: false, }, isPercent: { type: Boolean, - default: true + default: true, }, color: { type: Array, - default: null - } + default: null, + }, }, components: {}, data() { return { - yylx_asy: uuidv1() + yylx_asy: uuidv1(), }; }, watch: { @@ -50,7 +50,7 @@ export default { this.init_yylx_asy(this.data, this.text); }, deep: true, - } + }, }, computed: {}, created() {}, @@ -71,29 +71,31 @@ export default { white: { color: "#ddd", align: "center", - padding: [3, 0] - } + padding: [3, 0], + }, }; var placeHolderStyle = { normal: { label: { - show: false + show: false, }, labelLine: { - show: false + show: false, }, color: "rgba(0, 0, 0, 0)", borderColor: "rgba(0, 0, 0, 0)", - borderWidth: 0 - } + borderWidth: 0, + }, }; var data = []; var total = 0; - var color = this.color?this.color:["#274fee", "#f5ab4c", "#e15260", "#a9aec0", "#e56600"]; + var color = this.color + ? this.color + : ["#274fee", "#f5ab4c", "#e15260", "#a9aec0", "#e56600"]; var color2 = ["#ef9433", "#515fe7"]; var legendarr = []; var temp2_data = 0; - data_val.forEach(e => { + data_val.forEach((e) => { temp2_data = temp2_data + e.value; }); for (var i = 0; i < data_val.length; i++) { @@ -105,15 +107,15 @@ export default { normal: { borderWidth: this.bar_width, // shadowBlur: 20, - borderColor: this.isFwsp ? color2[i] : color[i] + borderColor: this.isFwsp ? color2[i] : color[i], // shadowColor: color[i], - } - } + }, + }, }, { value: temp2_data / 30, name: "", - itemStyle: placeHolderStyle + itemStyle: placeHolderStyle, } ); legendarr.push(data_val[i].name); @@ -136,7 +138,7 @@ export default { show: true, position: "outside", color: "#58617a", - formatter: params => { + formatter: (params) => { if (this.isPercent) { var percent = 0; percent = @@ -156,12 +158,12 @@ export default { } } }, - rich: rich - } - } + rich: rich, + }, + }, }, - data: data - } + data: data, + }, ]; var options = { title: { @@ -169,19 +171,20 @@ export default { textStyle: { color: "#000", fontSize: 40, - fontWeight: 200 + fontWeight: 200, }, subtext: text, subtextStyle: { - color: "#c9cedd" + color: "#c9cedd", }, itemGap: 0, // 主副标题距离 left: "center", - top: "32%" + top: "32%", }, color: this.isFwsp ? color2 : color, tooltip: { - show: false + trigger: "item", + formatter: "{b}: {c} ({d}%)", }, legend: { bottom: -5, @@ -190,17 +193,17 @@ export default { itemHeight: 10, orient: "horizontal", data: legendarr, - backgroundColor: "#f4f7fc" + backgroundColor: "#f4f7fc", }, toolbox: { - show: false + show: false, }, - series: seriesObj + series: seriesObj, }; return options; - } - } + }, + }, }; diff --git a/src/pages/workbench/fwgl/approval_service_detail.vue b/src/pages/workbench/fwgl/approval_service_detail.vue index 60a66e3..a0f0285 100644 --- a/src/pages/workbench/fwgl/approval_service_detail.vue +++ b/src/pages/workbench/fwgl/approval_service_detail.vue @@ -111,7 +111,7 @@ export default { rules: { result: [{ required: true, message: "请选择意见", trigger: "change" }], option: [ - { required: true, message: "请输入意见", trigger: "blur" }, + // { required: true, message: "请输入意见", trigger: "blur" }, { min: 0, max: 200, diff --git a/src/pages/workbench/workPlace.vue b/src/pages/workbench/workPlace.vue index 1799571..d42fafd 100644 --- a/src/pages/workbench/workPlace.vue +++ b/src/pages/workbench/workPlace.vue @@ -1740,7 +1740,8 @@ export default { var options = { color: color, tooltip: { - show: false + trigger: "item", + formatter: "{b}: {c} ({d}%)", }, // legend: { // bottom: -5, diff --git a/src/pages/workbench/yygl/approval_app_detail.vue b/src/pages/workbench/yygl/approval_app_detail.vue index 9176ea5..5b3a4e3 100644 --- a/src/pages/workbench/yygl/approval_app_detail.vue +++ b/src/pages/workbench/yygl/approval_app_detail.vue @@ -78,7 +78,7 @@ export default { { required: true, message: '请选择意见', trigger: 'change' }, ], option:[ - { required: true, message: '请输入意见', trigger: 'blur' }, + // { required: true, message: '请输入意见', trigger: 'blur' }, { min: 0,max:200, message: '长度应小于200个字符', trigger: 'blur' } -- 2.26.0