编写前端请求代码
This commit is contained in:
@@ -26,16 +26,16 @@ export default {
|
||||
default: () => [],
|
||||
},
|
||||
},
|
||||
setup( props )
|
||||
setup(props)
|
||||
{
|
||||
const ui = reactive( {
|
||||
} );
|
||||
const ui = reactive({
|
||||
});
|
||||
|
||||
// 设置图表
|
||||
const initCharts = () =>
|
||||
{
|
||||
const chartDom = document.getElementById( "chartWrapper" );
|
||||
const myChart = echarts.init( chartDom as HTMLDivElement );
|
||||
const chartDom = document.getElementById("chartWrapper");
|
||||
const myChart = echarts.init(chartDom as HTMLDivElement);
|
||||
const option = {
|
||||
xAxis: {
|
||||
type: "category",
|
||||
@@ -53,7 +53,7 @@ export default {
|
||||
],
|
||||
};
|
||||
|
||||
option && myChart.setOption( option );
|
||||
option && myChart.setOption(option);
|
||||
|
||||
window.onresize = function ()
|
||||
{
|
||||
@@ -62,12 +62,12 @@ export default {
|
||||
};
|
||||
};
|
||||
|
||||
onMounted( () =>
|
||||
onMounted(() =>
|
||||
{
|
||||
initCharts();
|
||||
} );
|
||||
});
|
||||
|
||||
console.log( props );
|
||||
console.log(props);
|
||||
|
||||
return { ui, initCharts, props, };
|
||||
},
|
||||
|
@@ -4,8 +4,8 @@
|
||||
* @LastEditors: Kane
|
||||
* @FilePath: /task_schedule/src/components/ArchievementCompleteRateComponent.vue
|
||||
* @Description: 业绩完成率组件
|
||||
*
|
||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||
*
|
||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||
-->
|
||||
<template>
|
||||
<div class="complete-rate-wrapper">
|
||||
@@ -29,7 +29,7 @@ export default {
|
||||
percentage: {
|
||||
type: String,
|
||||
require: true,
|
||||
default:()=>"0",
|
||||
default: () => "0",
|
||||
},
|
||||
indicator: {
|
||||
type: String,
|
||||
@@ -41,7 +41,7 @@ export default {
|
||||
const percentage = Number(props.percentage).valueOf();
|
||||
|
||||
const ui = reactive({
|
||||
percentage: percentage,
|
||||
percentage,
|
||||
indicator: props.indicator,
|
||||
});
|
||||
|
||||
@@ -79,6 +79,5 @@ export default {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@@ -24,23 +24,23 @@
|
||||
|
||||
<script lang="ts">
|
||||
export default {
|
||||
name: "DishonorListComponent",
|
||||
props: {
|
||||
month: {
|
||||
type: String,
|
||||
require: true,
|
||||
default: () => "本",
|
||||
name: "DishonorListComponent",
|
||||
props: {
|
||||
month: {
|
||||
type: String,
|
||||
require: true,
|
||||
default: () => "本",
|
||||
},
|
||||
dishonorPersons: {
|
||||
type: Array,
|
||||
require: true,
|
||||
default: () => [],
|
||||
},
|
||||
},
|
||||
dishonorPersons: {
|
||||
type: Array,
|
||||
require: true,
|
||||
default: () => [],
|
||||
setup()
|
||||
{
|
||||
return {};
|
||||
},
|
||||
},
|
||||
setup ()
|
||||
{
|
||||
return {};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
Reference in New Issue
Block a user