diff --git a/src/views/overviewLargeScreen/components/center/chart/draw.tsx b/src/views/overviewLargeScreen/components/center/chart/draw.tsx deleted file mode 100644 index 6ed09ec..0000000 --- a/src/views/overviewLargeScreen/components/center/chart/draw.tsx +++ /dev/null @@ -1,92 +0,0 @@ -import { defineComponent, watch, shallowReactive } from 'vue' - -// 声明类型 -const PropsType = { - tips: { - type: Number, - default: 50, - require: true - }, - colorObj: { - type: Object, - default: () => ({ - textStyle: "#3fc0fb", - series: { - color: ["#00bcd44a", "transparent"], - dataColor: { - normal: "#03a9f4", - shadowColor: "#97e2f5" - } - } - }) - } -} as const - -// 定义主体 -export default defineComponent({ - props: PropsType, - setup(props) { - // 配置项 - let options = shallowReactive({title:null,series:null}) - - watch( - () => props.tips, - (val: any) => { - options = { - title: { - text: val * 1 + "%", - x: "center", - y: "center", - textStyle: { - color: props.colorObj.textStyle, - fontSize: 16 - } - }, - series: [ - { - type: "pie", - radius: ["75%", "80%"], - center: ["50%", "50%"], - hoverAnimation: false, - color: props.colorObj.series.color, - label: { - normal: { - show: false - } - }, - data: [ - { - value: val, - itemStyle: { - normal: { - color: props.colorObj.series.dataColor.normal, - shadowBlur: 10, - shadowColor: props.colorObj.series.dataColor.shadowColor - } - } - }, - { - value: 100 - val - } - ] - } - ] - } - }, - { - immediate: true, - deep: true - } - ) - - return () => { - const height = "100px" - const width = "120px" - - return
- -
- } - } -}) - diff --git a/src/views/overviewLargeScreen/components/center/chart/draw.vue b/src/views/overviewLargeScreen/components/center/chart/draw.vue new file mode 100644 index 0000000..0af2b90 --- /dev/null +++ b/src/views/overviewLargeScreen/components/center/chart/draw.vue @@ -0,0 +1,103 @@ + + + + + \ No newline at end of file diff --git a/src/views/overviewLargeScreen/components/center/index.vue b/src/views/overviewLargeScreen/components/center/index.vue index fc78c07..7d71452 100644 --- a/src/views/overviewLargeScreen/components/center/index.vue +++ b/src/views/overviewLargeScreen/components/center/index.vue @@ -20,7 +20,7 @@ - 年度负责人组件达标榜 + 年度负责人组件达标榜 import { reactive, onMounted } from "vue"; - import Chart from "../center/chart/draw"; + import Chart from "./chart/draw.vue"; // 下层数据 const titleDate = [ diff --git a/src/views/overviewLargeScreen/index.vue b/src/views/overviewLargeScreen/index.vue index 20cd72b..b8978ea 100644 --- a/src/views/overviewLargeScreen/index.vue +++ b/src/views/overviewLargeScreen/index.vue @@ -74,7 +74,7 @@
- +
@@ -115,9 +115,10 @@ import CenterRight2 from "./components/centerRight2/index.vue"; import CenterLeft1 from './components/centerLeft1/index.vue' import CenterRight1 from "./components/centerRight1/index.vue"; + import Center from "./components/center/index.vue"; // 未修改的组件 // import CenterLeft2 from "./components/centerLeft2/index.vue"; - // import Center from "./components/center/index.vue"; + // * 颜色