足迹统计
parent
74ee0ac89f
commit
ec1294ac2f
|
|
@ -90,6 +90,9 @@ const noticeShows = () => {
|
||||||
noticeShow.value = !noticeShow.value;
|
noticeShow.value = !noticeShow.value;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
const goStatistics = () => {
|
||||||
|
push({ name: 'statistics' });
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -115,6 +118,17 @@ const noticeShows = () => {
|
||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
</NIcon>
|
</NIcon>
|
||||||
|
<div
|
||||||
|
v-if="flgs"
|
||||||
|
class="bg-#fff/20 b-1px b-solid b-#fff rd-12px flex items-center h-52px px12px cursor-pointer mr10px"
|
||||||
|
>
|
||||||
|
<div size="small" @click="goStatistics">
|
||||||
|
足迹
|
||||||
|
<!-- <span class="ml8px pl5px pr5px rounded-20px bg-#002FA7">{{
|
||||||
|
store.user.reviewCount ?? 0
|
||||||
|
}}</span> -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div
|
<div
|
||||||
v-if="flgs"
|
v-if="flgs"
|
||||||
class="bg-#fff/20 b-1px b-solid b-#fff rd-12px flex items-center h-52px px12px cursor-pointer"
|
class="bg-#fff/20 b-1px b-solid b-#fff rd-12px flex items-center h-52px px12px cursor-pointer"
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,12 @@ const router = createRouter({
|
||||||
meta: { title: "修改密码" },
|
meta: { title: "修改密码" },
|
||||||
component: () => import("@/views/company/modifys.vue"),
|
component: () => import("@/views/company/modifys.vue"),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: "/statistics",
|
||||||
|
name: "statistics",
|
||||||
|
meta: { title: "足迹统计" },
|
||||||
|
component: () => import("@/views/company/statistics.vue"),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: "/login",
|
path: "/login",
|
||||||
name: "Login",
|
name: "Login",
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,149 @@
|
||||||
|
<!-- 外部情报 > 情报详情 -->
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { updatePwd } from "@/api/daikin/base";
|
||||||
|
import { NForm, NFormItem, NInput, NButton } from "naive-ui";
|
||||||
|
import { useDate } from "@/views/home/hooks/useDate";
|
||||||
|
import { message } from "@/utils/message";
|
||||||
|
const { push } = useRouter();
|
||||||
|
const route = useRoute();
|
||||||
|
const { day, week } = useDate();
|
||||||
|
const formValue = ref({
|
||||||
|
newPassword: "",
|
||||||
|
oldPassword: "",
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log(route, route.path);
|
||||||
|
async function submitSave() {
|
||||||
|
let formdata = new FormData();
|
||||||
|
const { newPassword, oldPassword } = formValue.value;
|
||||||
|
console.log(formValue.value, newPassword, oldPassword);
|
||||||
|
if (!newPassword) {
|
||||||
|
message.error("新密码不能为空");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!oldPassword) {
|
||||||
|
message.error("旧密码不能为空");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!isStrongPassword(newPassword)) {
|
||||||
|
message.error(
|
||||||
|
"新密码必须为8位及以上,包含大写字母、小写字母、数字、特殊字符中至少3种组合"
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
formdata.append("oldPassword", oldPassword);
|
||||||
|
formdata.append("newPassword", newPassword);
|
||||||
|
const { code, msg } = await updatePwd(formdata, {
|
||||||
|
headers: { "Content-Type": "application/form-data" },
|
||||||
|
});
|
||||||
|
if (code === 200) {
|
||||||
|
message.success("修改成功 请重新登录");
|
||||||
|
push({ name: "Entry" });
|
||||||
|
} else message.error(msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
function isStrongPassword(password) {
|
||||||
|
// 至少包含8个字符
|
||||||
|
if (password.length < 8) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 至少包含大写字母、小写字母、数字、特殊字符中的三种组合
|
||||||
|
const hasUpperCase = /[A-Z]/.test(password);
|
||||||
|
const hasLowerCase = /[a-z]/.test(password);
|
||||||
|
const hasDigit = /[0-9]/.test(password);
|
||||||
|
const hasSpecialChar = /[!@#$%^&*()_+{}\[\]:;<>,.?~\\-]/.test(password);
|
||||||
|
|
||||||
|
const combinations = [hasUpperCase, hasLowerCase, hasDigit, hasSpecialChar];
|
||||||
|
const validCombinations = combinations.filter((value) => value);
|
||||||
|
|
||||||
|
return validCombinations.length >= 3;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="page">
|
||||||
|
<div class="back" @click="push({ name: 'Home' })">返回首页</div>
|
||||||
|
<div class="topt ml30px">
|
||||||
|
<div class="font-600 flex items-end mt30px">
|
||||||
|
<div class="text-36px">足迹统计</div>
|
||||||
|
<div class="text-18px ml40px mr25px">{{ day }}</div>
|
||||||
|
<div class="text-18px">{{ week }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="page-main">
|
||||||
|
<el-tabs type="border-card" class="demo-tabs h100% color" style="color:black">
|
||||||
|
<el-tab-pane>
|
||||||
|
<template #label>
|
||||||
|
<span class="custom-tabs-label">
|
||||||
|
<el-icon><calendar /></el-icon>
|
||||||
|
<span>首页看板</span>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
首页看板11111
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="部门查询">
|
||||||
|
画页面
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped lang="less">
|
||||||
|
.demo-tabs > .el-tabs__content {
|
||||||
|
padding: 32px;
|
||||||
|
color: #6b778c;
|
||||||
|
font-size: 32px;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
.demo-tabs .custom-tabs-label .el-icon {
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
.demo-tabs .custom-tabs-label span {
|
||||||
|
vertical-align: middle;
|
||||||
|
margin-left: 4px;
|
||||||
|
}
|
||||||
|
.topt {
|
||||||
|
position: absolute;
|
||||||
|
top: 50px;
|
||||||
|
}
|
||||||
|
.back {
|
||||||
|
position: absolute;
|
||||||
|
// width: 300px;
|
||||||
|
height: 50px;
|
||||||
|
top: 25px;
|
||||||
|
left: 25px;
|
||||||
|
color: #fff;
|
||||||
|
// z-index: 500;
|
||||||
|
font-size: 25px;
|
||||||
|
font-weight: bold;
|
||||||
|
text-align: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
font-family: "PingFang SC";
|
||||||
|
user-select: none;
|
||||||
|
|
||||||
|
background-position: 0 0;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-size: cover;
|
||||||
|
color: #fff;
|
||||||
|
|
||||||
|
line-height: 1;
|
||||||
|
|
||||||
|
.page-main {
|
||||||
|
width: 90%;
|
||||||
|
height: 834px;
|
||||||
|
background-color: #fff;
|
||||||
|
position: absolute;
|
||||||
|
top: 150px;
|
||||||
|
left: 4%;
|
||||||
|
border-radius: 50px;
|
||||||
|
padding: 30px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Loading…
Reference in New Issue