配置针对vue文件eslint

This commit is contained in:
2023-03-17 14:40:04 +08:00
parent 884641abbf
commit 8053360878
16 changed files with 1282 additions and 841 deletions

View File

@@ -4,12 +4,12 @@
* @LastEditors: Kane
* @FilePath: /task_schedule/src/components/ArchievementChartComponent.vue
* @Description: 业绩图表组件
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
-->
<template>
<div class="archievement-wrapper">
<div id="chartWrapper"></div>
<div id="chartWrapper" />
</div>
</template>
@@ -18,58 +18,58 @@ import { reactive, onMounted } from "vue";
import * as echarts from "echarts";
export default {
name: "ArchievementChartComponent",
props: {
chart_data: {
type: Array,
require: true,
},
name: "ArchievementChartComponent",
props: {
chartData: {
type: Array,
require: true,
default: () => [],
},
setup(props)
},
setup (props)
{
const ui = reactive({
chart_data: props.chartData,
});
// 设置图表
const initCharts = () =>
{
const ui = reactive({
chart_data: props.chart_data,
});
const chartDom = document.getElementById("chartWrapper");
const myChart = echarts.init(chartDom as HTMLDivElement);
const option = {
xAxis: {
type: "category",
data: ["一", "二", "三", "四", "五", "六", "七", "八", "九", "十", "十一", "十二",],
},
yAxis: {
type: "value",
data: [200, 400, 600, 800, 1000,],
},
series: [
{
data: props.chartData,
type: "line",
},
],
};
//设置图表
const initCharts = () =>
{
const chartDom = document.getElementById("chartWrapper");
// @ts-ignore
const myChart = echarts.init(chartDom);
const option = {
xAxis: {
type: "category",
data: ["一", "二", "三", "四", "五", "六", "七", "八", "九", "十", "十一", "十二",],
},
yAxis: {
type: "value",
data: [200, 400, 600, 800, 1000,],
},
series: [
{
data: props.chart_data,
type: "line",
},
],
};
option && myChart.setOption(option);
option && myChart.setOption(option);
window.onresize = function ()
{
// 自适应大小
myChart.resize();
};
};
window.onresize = function ()
{
//自适应大小
myChart.resize();
};
};
onMounted(() =>
{
initCharts();
});
onMounted(() =>
{
initCharts();
});
return { ui, initCharts, };
},
return { ui, initCharts, };
},
};
</script>
@@ -105,4 +105,4 @@ export default {
border-radius: 5px;
}
}
</style>
</style>

View File

@@ -9,8 +9,11 @@
-->
<template>
<div class="complete-rate-wrapper">
<el-progress type="circle" :percentage="ui.percentage">
<template #default="{ percentage }">
<el-progress
type="circle"
:percentage="ui.percentage"
>
<template #default>
<span class="percentage-label">{{ ui.indicator }}</span>
<span class="percentage-value">{{ percentage }}%</span>
</template>
@@ -26,6 +29,7 @@ export default {
percentage: {
type: String,
require: true,
default:()=>"0",
},
indicator: {
type: String,

View File

@@ -3,14 +3,17 @@
* @Date: 2023-03-08 18:32:13
* @LastEditors: Kane
* @FilePath: /task_schedule/src/components/DishonorListComponent.vue
* @Description:
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
* @Description:
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
-->
<template>
<div class="dishonorlist-wrapper">
<div class="banner-wrapper">
<img src="@/assets/img/ranking/stop.png" alt="">
<img
src="@/assets/img/ranking/stop.png"
alt=""
>
<div class="title-wrapper">
<span>"消7灭6"突围战</span>
<span>二月入营坐席</span>
@@ -21,18 +24,23 @@
<script lang="ts">
export default {
name: "DishonorListComponent",
props: {
month: {
type: String,
require: true,
},
dishonorPersons: {
type: Array,
require: true,
},
name: "DishonorListComponent",
props: {
month: {
type: String,
require: true,
default: () => "本",
},
setup() { },
dishonorPersons: {
type: Array,
require: true,
default: () => [],
},
},
setup ()
{
return {};
},
};
</script>
@@ -72,4 +80,4 @@ export default {
}
}
}
</style>
</style>

View File

@@ -13,13 +13,19 @@
<div class="reward-wrapper">
<div class="leading-reward-wrapper">
<div class="banner-wrapper">
<img src="@/assets/img/ranking/medal.png" alt="领跑奖">
<img
src="@/assets/img/ranking/medal.png"
alt="领跑奖"
>
<span>领跑奖</span>
</div>
</div>
<div class="advance-reward-wrapper">
<div class="banner-wrapper">
<img src="@/assets/img/ranking/copper_medal.png" alt="飞跃奖">
<img
src="@/assets/img/ranking/copper_medal.png"
alt="飞跃奖"
>
<span>飞跃奖</span>
</div>
</div>
@@ -34,17 +40,20 @@ export default {
month: {
type: String,
require: true,
default:()=>"本",
},
leadingReward: {
type: String,
require: true,
default:()=>"",
},
advanceReward: {
type: String,
require: true,
default:()=>"",
},
},
setup(props)
setup()
{
return {};
},