配置针对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,8 +4,8 @@
* @LastEditors: Kane
* @FilePath: /task_schedule/src/views/DesktopArchievement.vue
* @Description: 显示在桌面上展示任务量与业绩的view
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
-->
<template>
<div class="view-wrapper">
@@ -17,21 +17,35 @@
</div>
<div class="archievement-wrapper">
<div class="total-archievement-rate-wrapper">
<ArchievementCompleteRateComponent indicator="续保完成率" percentage=95 />
<ArchievementCompleteRateComponent indicator="车非渗透率" percentage=95 />
<ArchievementCompleteRateComponent
indicator="续保完成率"
percentage="95"
/>
<ArchievementCompleteRateComponent
indicator="车非渗透率"
percentage="95"
/>
</div>
<div class="total-archievement-charts-wrapper">
<ArchievementChart total_archievement="435220" :chart_data="ui.chartData" />
<ArchievementChart
total_archievement="435220"
:chart_data="ui.chartData"
/>
</div>
</div>
<div class="reward-wrapper">
<HonorListComponent month="二" leading-reward="王炜" advance-reward="王炜" />
<DishonorListComponent month="二" :dishonorPersons="ui.dishonorPersons" />
<HonorListComponent
month="二"
leading-reward="王炜"
advance-reward="王炜"
/>
<DishonorListComponent
month="二"
:dishonor-persons="ui.dishonorPersons"
/>
</div>
</div>
<div class="right-wrapper">
</div>
<div class="right-wrapper" />
</div>
</template>
@@ -76,8 +90,8 @@ export default {
return archievement;
});
//检查存储的登录信息,不存在则返回登录页面
if (staffInfo.P13UID == "")
// 检查存储的登录信息,不存在则返回登录页面
if (staffInfo.P13UID === "")
{
ElMessage({
message: "登录信息失效,请重新登录!",
@@ -228,4 +242,4 @@ div {
// border: 1px solid red;
box-sizing: border-box;
}
</style>
</style>

View File

@@ -3,11 +3,11 @@
* @Date: 2023-02-28 00:57:21
* @LastEditors: Kane
* @FilePath: /task_schedule/src/views/Login.vue
* @Description:
* @Description:
* 登录页面路由默认指向这个页面
* 1判断url中的参数取得用户信息根据用户的部门改变路由
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
-->
<template>
<div class="page-wrapper">
@@ -16,14 +16,26 @@
<el-form ref="loginForm">
<el-form-item>
<label class="form-label">用户名</label>
<el-input type="text" v-model.trim.lazy="ui.account" placeholder="请输入P13账号或P09工号"></el-input>
<el-input
v-model.trim.lazy="ui.account"
type="text"
placeholder="请输入P13账号或P09工号"
/>
</el-form-item>
<el-form-item>
<label class="form-label">密码</label>
<el-input type="password" v-model.trim.lazy="ui.password" placeholder="请输入P13密码"></el-input>
<el-input
v-model.trim.lazy="ui.password"
type="password"
placeholder="请输入P13密码"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" class="el-button-block" @click="onLogin">
<el-button
type="primary"
class="el-button-block"
@click="onLogin"
>
登录
</el-button>
</el-form-item>
@@ -47,7 +59,6 @@ export default {
name: "LoginPage",
setup()
{
const router = useRouter();
const ui = reactive({
@@ -73,11 +84,11 @@ export default {
login(info)
.then((response) =>
{
const data = response.data || { success: false, };
const data = response.data && { success: false, };
if (data.success == true)
if (data.success === true)
{
//提示登录成功并保存到localStorage然后路由跳转
// 提示登录成功并保存到localStorage然后路由跳转
ElMessage({
message: data.message,
type: "success",
@@ -85,18 +96,18 @@ export default {
});
const staffInfo = new StaffInfo(
data.staff_info.p13uid || "",
data.staff_info.code || "",
data.staff_info.name || "",
data.staff_info.department_code || "",
data.staff_info.department_name || "",
data.staff_info.section_office_code || "",
data.staff_info.p13section_office_nameuid || ""
data.staff_info.p13uid && "",
data.staff_info.code && "",
data.staff_info.name && "",
data.staff_info.department_code && "",
data.staff_info.department_name && "",
data.staff_info.section_office_code && "",
data.staff_info.p13section_office_nameuid && ""
);
saveStaffInfo(staffInfo);
//跳转路由
// 跳转路由
router.push("/desktop_archievement");
}
else
@@ -121,8 +132,8 @@ export default {
{
const staffInfo = loadStaffInfo();
//判断是否已经记录了P13账号有则提示已登录然后跳转路由
if (staffInfo.P13UID != "")
// 判断是否已经记录了P13账号有则提示已登录然后跳转路由
if (staffInfo.P13UID !== "")
{
ElMessage({
message: `已登录账号:${staffInfo.stuffName}`,
@@ -130,7 +141,7 @@ export default {
center: true,
});
//跳转路由
// 跳转路由
router.push("/desktop_archievement");
}
});
@@ -173,7 +184,6 @@ export default {
border-radius: 5px;
// backdrop-filter: ;
h1 {
font-family: "FZ-ZHUOHEI";
font-size: 70px;

View File

@@ -3,22 +3,22 @@
* @Date: 2023-02-28 19:10:54
* @LastEditors: Kane
* @FilePath: /task_schedule/src/views/Public.vue
* @Description:
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
* @Description:
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
-->
<template>
公共页面
<div>公共</div>
</template>
<script lang="ts">
export default {
name: "PublicPage",
setup()
setup()
{
return {};
},
};
</script>
<style lang="scss"></style>
<style lang="scss"></style>