Browse Source

忘记密码页面样式和检验次数判断

master_hella_20240701
zhang_li 7 months ago
parent
commit
41a1eaf59f
  1. 27
      src/views/login/forgetPassword.vue
  2. 41
      src/views/login/updatePassword.vue
  3. 16
      src/views/qms/inspection/inspectionJob/addForm.vue

27
src/views/login/forgetPassword.vue

@ -1,22 +1,22 @@
<template>
<div v-loading="loading" style="display: flex; justify-content: center; align-items: center;">
<div v-loading="loading" class="box">
<el-form ref="formSmsLogin" :model="loginData" :rules="rules" label-width="130px" label-position="top" size="large">
<div class="title" style="font-size:25px" margin-left="0px">忘记密码</div>
<div class="title">忘记密码</div>
<el-row type="flex" justify="center" align="middle">
<el-col :span="13">
<el-form-item label="请输入用户名" prop="username" align="center">
<el-col>
<el-form-item label="用户名" prop="username" align="center">
<el-input v-model="loginData.username" placeholder="请输入用户名" />
</el-form-item>
</el-col>
<el-col :span="13">
<el-form-item label="请输入邮箱" prop="email">
<el-col>
<el-form-item label="邮箱" prop="email">
<el-input v-model="loginData.email" placeholder="请输入邮箱" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button type="primary" @click="submitForm" style="width: 100%;height: 40px;line-height: 40px;"> </el-button>
</div>
</div>
</template>
@ -69,4 +69,17 @@
.smsbtn {
margin-top: 33px;
}
.box{
border: 1px solid #dedede;
width: 500px;
margin: 100px auto 0px;
padding: 20px;
box-shadow: 0px 0px 20px rgba($color: #000000, $alpha: 0.1);
}
.title{
text-align: center;
font-size: 20px;
font-weight: bold;
padding-bottom: 20px;
}
</style>

41
src/views/login/updatePassword.vue

@ -1,22 +1,30 @@
<template>
<div v-loading="loading" style="display: flex; justify-content: center; align-items: center;">
<div v-loading="loading" class="box">
<el-form ref="formSmsLogin" :model="loginData" :rules="rules" label-width="130px" label-position="top" size="large">
<div class="title" style="font-size:25px" margin-left="0px">重置密码</div>
<el-row type="flex" justify="center" align="middle">
<el-col :span="13">
<el-col>
<el-form-item label="新密码" prop="password" align="center">
<el-input v-model="loginData.password" placeholder="请输入新密码" />
<el-input v-model="loginData.password" placeholder="请输入新密码" :type="isShowPassword?'text':'password'"/>
<el-icon style="position: absolute; right: 10px;cursor: pointer;" color="#a5a5a5" size="18" @click="isShowPassword = !isShowPassword">
<View v-if="!isShowPassword"/>
<Hide v-if="isShowPassword"/>
</el-icon>
</el-form-item>
</el-col>
<el-col :span="13">
<el-col>
<el-form-item label="确认新密码" prop="againPassword">
<el-input v-model="loginData.againPassword" placeholder="请再次新密码" />
<el-input v-model="loginData.againPassword" placeholder="请再次新密码" :type="isShowAgainPassword?'text':'password'"/>
<el-icon style="position: absolute; right: 10px;cursor: pointer;" color="#a5a5a5" size="18" @click="isShowAgainPassword = !isShowAgainPassword">
<View v-if="!isShowAgainPassword"/>
<Hide v-if="isShowAgainPassword"/>
</el-icon>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button type="primary" @click="submitForm" style="width: 100%;height: 40px;line-height: 40px;"> </el-button>
</div>
</div>
</template>
@ -27,7 +35,7 @@
import { usePermissionStore } from '@/store/modules/permission'
import { getTenantIdByName, sendSmsCode, smsLogin } from '@/api/login'
import * as UserApi from '@/api/system/user'
import { View,Hide } from '@element-plus/icons-vue'
const { t } = useI18n()
const message = useMessage()
const permissionStore = usePermissionStore()
@ -46,6 +54,9 @@
againPassword: '',
mailKey: '',
})
const isShowPassword = ref(false)
const isShowAgainPassword = ref(false)
const loading = ref(false);
const submitForm = async () => {
try {
@ -75,4 +86,20 @@
.smsbtn {
margin-top: 33px;
}
.box{
border: 1px solid #dedede;
width: 500px;
margin: 100px auto 0px;
padding: 20px;
box-shadow: 0px 0px 20px rgba($color: #000000, $alpha: 0.1);
}
.title{
text-align: center;
font-size: 20px;
font-weight: bold;
padding-bottom: 20px;
}
::v-deep(.el-input--large .el-input__inner){
padding-right: 30px;
}
</style>

16
src/views/qms/inspection/inspectionJob/addForm.vue

@ -61,6 +61,14 @@
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="检验次数" prop="inspectionJobCharacteristicsUpdateReqVO.inspectionQty">
<div style="display: flex; width: 100%">
<el-input v-model=" item.inspectionJobCharacteristicsUpdateReqVO.inspectionQty" disabled placeholder="请输入检验次数" />
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否允许修改特征值" prop="inspectionJobCharacteristicsUpdateReqVO.isCanUpdate">
<el-switch v-model="item.inspectionJobCharacteristicsUpdateReqVO.isCanUpdate" disabled />
@ -320,6 +328,9 @@ const rules = ref({
'inspectionJobCharacteristicsUpdateReqVO.estimateCode': [
{ required: true, message: '请选择评估代码', trigger: 'blur' }
],
'inspectionJobCharacteristicsUpdateReqVO.inspectionQty': [
{ required: true, message: '请输入检验次数', trigger: 'blur' }
],
qualifiedQuantity: [{ required: true, message: '请输入选择结束时间', trigger: 'blur' }]
})
@ -534,7 +545,7 @@ const submitForm = async () => {
number += parseFloat(cur.sampleAmount)
})
if(number != data.value.sampleTotalAmount){
message.error(`采样数量之和不等于总数量`)
message.error(`采样数量之和不等于采样总数量`)
return
}
}
@ -594,6 +605,9 @@ const submitForm = async () => {
numberList.push(
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some(
(cur, key) => {
console.log(12,cur.qualifiedQuantity)
console.log(13,cur.unqualifiedQuantity)
console.log(14,item.inspectionJobCharacteristicsUpdateReqVO.inspectionQty)
return parseFloat(cur.qualifiedQuantity) + parseFloat(cur.unqualifiedQuantity) != parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.inspectionQty)
}
)

Loading…
Cancel
Save