对接忘记密码

This commit is contained in:
wangchengming 2025-10-15 12:48:49 +08:00
parent 3a59b67509
commit d1af993016
6 changed files with 183 additions and 24 deletions

View File

@ -135,3 +135,12 @@ export function deptTreeSelect() {
method: 'get'
})
}
// 忘记密码重置 白名单
export function resetPwd(params) {
return request({
url: '/fe/resetUserPwd',
method: 'put',
data: params
})
}

View File

@ -514,7 +514,7 @@ h6 {
}
.myUpdate_popover {
min-width: 430px !important;
min-width: 680px !important;
border-radius: 6px !important;
padding: 8px !important;
background: #FFFFFF !important;

View File

@ -15,8 +15,8 @@
<div class="title-container">
<div class="title-label">{{ title }}</div>
</div>
<el-form-item prop="username">
<el-input v-model="forgetForm.username" type="text" size="large" class="custom-input"
<el-form-item prop="userName">
<el-input v-model="forgetForm.userName" type="text" size="large" class="custom-input"
auto-complete="off" placeholder="账号">
</el-input>
</el-form-item>
@ -50,22 +50,24 @@
</template>
<script setup>
import useUserStore from '@/store/modules/user'
import systemLogo from '@/assets/images/systemLogo.png'
import { onMounted, ref } from 'vue'
import { useRouter } from 'vue-router'
import { ElMessageBox } from "element-plus"
import { resetPwd } from "@/api/system/user"
const title = '忘记密码'
const userStore = useUserStore()
const route = useRoute()
const router = useRouter()
const { proxy } = getCurrentInstance()
const forgetForm = ref({
username: "",
email: ""
userName: undefined,
email: undefined
})
const forgetRules = {
username: [{ required: true, trigger: "blur", message: "请输入您的账号" }],
userName: [{ required: true, trigger: "blur", message: "请输入您的账号" }],
email: [{ required: true, trigger: "blur", message: "请输入您的邮箱" }]
}
const loading = ref(false)
@ -73,10 +75,28 @@ const loading = ref(false)
const handleForgetPassword = () => {
proxy.$refs.forgetRef.validate(valid => {
if (valid) {
// loading.value = true
loading.value = true
resetPwd(forgetForm.value).then(res => {
const _email = registerForm.value.email
ElMessageBox.alert(
`<font color='red'>
恭喜您您的密码重置成功<br>
<br>
稍后会有邮件通知到邮箱${_email}
</font>`,
"系统提示",
{
dangerouslyUseHTMLString: true,
type: "success",
}
).then(() => {
router.push('/login')
}).catch(() => {
loading.value = false
})
}).catch(() => {
loading.value = false
})
}
})
}

View File

@ -53,7 +53,7 @@
<ul class="resource-list" v-if="notices.length > 0">
<li v-for="(notice, index) in notices" :key="index" class="resource-link"
@click="handleGoFormManage(notice.businessId, notice.businessType)">
{{ notice.noticeTitle }}
{{ notice.noticeContent }}
</li>
</ul>
<div class="no_result" v-else>

View File

@ -10,7 +10,7 @@
<el-col :span="12">
<el-form :model="queryParams" ref="queryRef" :inline="true" class="searchInputForm">
<el-form-item label="">
<el-input v-model="queryParams.noticeTitle" placeholder="请输入供应商/媒体名称" :prefix-icon="Search"
<el-input v-model="queryParams.noticeTitle" @keydown.enter.prevent="handleQuery" placeholder="请输入通知标题" :prefix-icon="Search"
style="width: 400px;" />
</el-form-item>
</el-form>
@ -34,7 +34,8 @@
<span v-if="scope.row.businessType == 2">媒体库</span>
</template>
</el-table-column>
<el-table-column label="通知内容" align="left" prop="noticeTitle" min-width="300" />
<el-table-column label="通知标题" align="left" prop="noticeTitle" min-width="300" />
<el-table-column label="通知内容" align="left" prop="noticeContent" min-width="300" />
<el-table-column label="通知时间" align="center" prop="createTime" min-width="210">
<template #default="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>

View File

@ -51,7 +51,7 @@
<el-table-column label="变更字段" align="left" prop="content" min-width="210">
<template #default="scope">
<el-popover popper-class="myUpdate_popover" placement="bottom-start">
<el-table :data="JSON.parse(scope.row.updateContent)" height="230px">
<el-table :data="scope.row.itemUpdatefields" height="230px">
<el-table-column label="字段名称" align="left" prop="fieldDescribe" min-width="100"
:show-overflow-tooltip="true">
<template #default="scope">
@ -61,13 +61,21 @@
<el-table-column label="变更前" align="left" prop="firstVal" min-width="100"
:show-overflow-tooltip="true">
<template #default="scope">
<span class="firstValLale">{{ scope.row.firstVal }}</span>
<template v-if="scope.row.isArray">
<div class="firstValLale" v-for="value in scope.row.firstVal">{{
value.originalFileName }}</div>
</template>
<span v-else class="firstValLale">{{ scope.row.firstVal }}</span>
</template>
</el-table-column>
<el-table-column label="变更后" align="left" prop="secondVal" min-width="100"
:show-overflow-tooltip="true">
<template #default="scope">
<span class="secondValLale">{{ scope.row.secondVal }}</span>
<template v-if="scope.row.isArray">
<div class="firstValLale" v-for="value in scope.row.secondVal">{{
value.originalFileName }}</div>
</template>
<span v-else class="secondValLale">{{ scope.row.secondVal }}</span>
</template>
</el-table-column>
</el-table>
@ -94,8 +102,8 @@
<li>
<span class="logsLable">变更字段</span>
<el-popover popper-class="myUpdate_popover" placement="bottom-start">
<el-table :data="JSON.parse(activity.updateContent)" height="230px">
<el-table-column label="字段名称" align="left" prop="fieldDescribe" min-width="100"
<el-table :data="activity.itemUpdatefields" height="230px">
<el-table-column label="字段名称" align="left" prop="fieldDescribe" width="150"
:show-overflow-tooltip="true">
<template #default="scope">
<span class="fieldDescribeLale">{{ scope.row.fieldDescribe }}</span>
@ -104,13 +112,21 @@
<el-table-column label="变更前" align="left" prop="firstVal" min-width="100"
:show-overflow-tooltip="true">
<template #default="scope">
<span class="firstValLale">{{ scope.row.firstVal }}</span>
<template v-if="scope.row.isArray">
<div class="firstValLale" v-for="value in scope.row.firstVal">{{
value.originalFileName }}</div>
</template>
<span v-else class="firstValLale">{{ scope.row.firstVal }}</span>
</template>
</el-table-column>
<el-table-column label="变更后" align="left" prop="secondVal" min-width="100"
:show-overflow-tooltip="true">
<template #default="scope">
<span class="secondValLale">{{ scope.row.secondVal }}</span>
<template v-if="scope.row.isArray">
<div class="firstValLale" v-for="value in scope.row.secondVal">{{
value.originalFileName }}</div>
</template>
<span v-else class="secondValLale">{{ scope.row.secondVal }}</span>
</template>
</el-table-column>
</el-table>
@ -137,6 +153,7 @@ import iconListChose from '@/assets/images/iconListChose.png'
import iconTimeLineChose from '@/assets/images/iconTimeLineChose.png'
import { busSupplierLogPage, listBusSupplierLog } from "@/api/supplierLogs"
const emit = defineEmits(['handleShowList']);
const ToolOptions = ref([
{ defaultIcon: iconList, activeIcon: iconListChose },
@ -184,18 +201,130 @@ const getSupplierPageList = () => {
busSupplierLogPage(queryParams.value).then(res => {
res.data.list.forEach(item => {
item.supplierName = supplierName.value
var itemUpdatefields = []
const _updateContent = JSON.parse(item.updateContent)
_updateContent.forEach(itemFiled => {
if (itemFiled.fieldDescribe != '供应商附件信息') {
itemUpdatefields.push({ fieldDescribe: itemFiled.fieldDescribe, firstVal: itemFiled.firstVal, secondVal: itemFiled.secondVal, isArray: false })
} else { // // 1- 2- 9-
const _firstVal = itemFiled.firstVal ? JSON.parse(itemFiled.firstVal) : []
const _secondVal = itemFiled.secondVal ? JSON.parse(itemFiled.secondVal) : []
//
const businessLicenseList1 = _firstVal.filter(item => item.fileType == 1)
//
const mediaRightsList1 = _firstVal.filter(item => item.fileType == 2)
//
const otherFileList1 = _firstVal.filter(item => item.fileType == 9)
//
const businessLicenseList2 = _secondVal.filter(item => item.fileType == 1)
//
const mediaRightsList2 = _secondVal.filter(item => item.fileType == 2)
//
const otherFileList2 = _secondVal.filter(item => item.fileType == 9)
if (_firstVal.length == 0 && _secondVal.length > 0) {
//
if (businessLicenseList2.length > 0) itemUpdatefields.push({ fieldDescribe: '营业执照', firstVal: null, secondVal: businessLicenseList2, isArray: true })
if (mediaRightsList2.length > 0) itemUpdatefields.push({ fieldDescribe: '媒体权属', firstVal: null, secondVal: mediaRightsList2, isArray: true })
if (otherFileList2.length > 0) itemUpdatefields.push({ fieldDescribe: '其它附件', firstVal: null, secondVal: otherFileList2, isArray: true })
} else {
//
if (businessLicenseList1.length == businessLicenseList2.length) {
if (!compareSpecificProps(businessLicenseList1, businessLicenseList2, ['fileName', 'originalFileName'])) itemUpdatefields.push({ fieldDescribe: '营业执照', firstVal: businessLicenseList1, secondVal: businessLicenseList2, isArray: true })
} else {
itemUpdatefields.push({ fieldDescribe: '营业执照', firstVal: businessLicenseList1, secondVal: businessLicenseList2, isArray: true })
}
if (mediaRightsList1.length == mediaRightsList2.length) {
if (!compareSpecificProps(mediaRightsList1, mediaRightsList2, ['fileName', 'originalFileName'])) itemUpdatefields.push({ fieldDescribe: '媒体权属', firstVal: mediaRightsList1, secondVal: mediaRightsList2, isArray: true })
} else {
itemUpdatefields.push({ fieldDescribe: '媒体权属', firstVal: mediaRightsList1, secondVal: mediaRightsList2, isArray: true })
}
if (otherFileList1.length == otherFileList2.length) {
if (!compareSpecificProps(otherFileList1, otherFileList2, ['fileName', 'originalFileName'])) itemUpdatefields.push({ fieldDescribe: '其它附件', firstVal: otherFileList1, secondVal: otherFileList2, isArray: true })
} else {
itemUpdatefields.push({ fieldDescribe: '其它附件', firstVal: otherFileList1, secondVal: otherFileList2, isArray: true })
}
}
}
})
item.itemUpdatefields = itemUpdatefields
});
supplierLogList.value = res.data.list
total.value = res.data.total
loading.value = false
})
}
//
const compareSpecificProps = (obj1, obj2, props) => {
return props.every(prop => {
const val1 = obj1[prop];
const val2 = obj2[prop];
// 使
return val1 === val2;
});
}
//
const getSupplierList = () => {
loading.value = true
listBusSupplierLog(queryParams.value).then(res => {
res.data.forEach(item => {
item.supplierName = supplierName.value
item.supplierName = supplierName.value
var itemUpdatefields = []
const _updateContent = JSON.parse(item.updateContent)
_updateContent.forEach(itemFiled => {
if (itemFiled.fieldDescribe != '供应商附件信息') {
itemUpdatefields.push({ fieldDescribe: itemFiled.fieldDescribe, firstVal: itemFiled.firstVal, secondVal: itemFiled.secondVal, isArray: false })
} else { // // 1- 2- 9-
const _firstVal = itemFiled.firstVal ? JSON.parse(itemFiled.firstVal) : []
const _secondVal = itemFiled.secondVal ? JSON.parse(itemFiled.secondVal) : []
//
const businessLicenseList1 = _firstVal.filter(item => item.fileType == 1)
//
const mediaRightsList1 = _firstVal.filter(item => item.fileType == 2)
//
const otherFileList1 = _firstVal.filter(item => item.fileType == 9)
//
const businessLicenseList2 = _secondVal.filter(item => item.fileType == 1)
//
const mediaRightsList2 = _secondVal.filter(item => item.fileType == 2)
//
const otherFileList2 = _secondVal.filter(item => item.fileType == 9)
if (_firstVal.length == 0 && _secondVal.length > 0) {
//
if (businessLicenseList2.length > 0) itemUpdatefields.push({ fieldDescribe: '营业执照', firstVal: null, secondVal: businessLicenseList2, isArray: true })
if (mediaRightsList2.length > 0) itemUpdatefields.push({ fieldDescribe: '媒体权属', firstVal: null, secondVal: mediaRightsList2, isArray: true })
if (otherFileList2.length > 0) itemUpdatefields.push({ fieldDescribe: '其它附件', firstVal: null, secondVal: otherFileList2, isArray: true })
} else {
//
if (businessLicenseList1.length == businessLicenseList2.length) {
if (!compareSpecificProps(businessLicenseList1, businessLicenseList2, ['fileName', 'originalFileName'])) itemUpdatefields.push({ fieldDescribe: '营业执照', firstVal: businessLicenseList1, secondVal: businessLicenseList2, isArray: true })
} else {
itemUpdatefields.push({ fieldDescribe: '营业执照', firstVal: businessLicenseList1, secondVal: businessLicenseList2, isArray: true })
}
if (mediaRightsList1.length == mediaRightsList2.length) {
if (!compareSpecificProps(mediaRightsList1, mediaRightsList2, ['fileName', 'originalFileName'])) itemUpdatefields.push({ fieldDescribe: '媒体权属', firstVal: mediaRightsList1, secondVal: mediaRightsList2, isArray: true })
} else {
itemUpdatefields.push({ fieldDescribe: '媒体权属', firstVal: mediaRightsList1, secondVal: mediaRightsList2, isArray: true })
}
if (otherFileList1.length == otherFileList2.length) {
if (!compareSpecificProps(otherFileList1, otherFileList2, ['fileName', 'originalFileName'])) itemUpdatefields.push({ fieldDescribe: '其它附件', firstVal: otherFileList1, secondVal: otherFileList2, isArray: true })
} else {
itemUpdatefields.push({ fieldDescribe: '其它附件', firstVal: otherFileList1, secondVal: otherFileList2, isArray: true })
}
}
}
})
item.itemUpdatefields = itemUpdatefields
});
supplierLogList.value = res.data
loading.value = false