Compare commits
No commits in common. "d1af993016c3e3b7b0da2007111dd7033fe3bb7c" and "849d4652b8aeaeda90030ed7537d19e2aa420c4e" have entirely different histories.
d1af993016
...
849d4652b8
|
|
@ -135,12 +135,3 @@ export function deptTreeSelect() {
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 忘记密码重置 白名单
|
|
||||||
export function resetPwd(params) {
|
|
||||||
return request({
|
|
||||||
url: '/fe/resetUserPwd',
|
|
||||||
method: 'put',
|
|
||||||
data: params
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -514,7 +514,7 @@ h6 {
|
||||||
}
|
}
|
||||||
|
|
||||||
.myUpdate_popover {
|
.myUpdate_popover {
|
||||||
min-width: 680px !important;
|
min-width: 430px !important;
|
||||||
border-radius: 6px !important;
|
border-radius: 6px !important;
|
||||||
padding: 8px !important;
|
padding: 8px !important;
|
||||||
background: #FFFFFF !important;
|
background: #FFFFFF !important;
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import usePermissionStore from '@/store/modules/permission'
|
||||||
|
|
||||||
NProgress.configure({ showSpinner: false })
|
NProgress.configure({ showSpinner: false })
|
||||||
|
|
||||||
const whiteList = ['/login', '/register', '/forgetPassword']
|
const whiteList = ['/login', '/register']
|
||||||
|
|
||||||
const isWhiteList = (path) => {
|
const isWhiteList = (path) => {
|
||||||
return whiteList.some(pattern => isPathMatch(pattern, path))
|
return whiteList.some(pattern => isPathMatch(pattern, path))
|
||||||
|
|
|
||||||
|
|
@ -47,11 +47,6 @@ export const constantRoutes = [
|
||||||
component: () => import('@/views/register'),
|
component: () => import('@/views/register'),
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: '/forgetPassword',
|
|
||||||
component: () => import('@/views/forgetPassword'),
|
|
||||||
hidden: true
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: "/:pathMatch(.*)*",
|
path: "/:pathMatch(.*)*",
|
||||||
component: () => import('@/views/error/404'),
|
component: () => import('@/views/error/404'),
|
||||||
|
|
|
||||||
|
|
@ -1,351 +0,0 @@
|
||||||
<template>
|
|
||||||
<div class="login-container">
|
|
||||||
<div class="loginRoot">
|
|
||||||
<div class="login">
|
|
||||||
<div class="leftLogo">
|
|
||||||
<div class="left-logo-container">
|
|
||||||
<img :src="systemLogo" />
|
|
||||||
<div class="shortBar"></div>
|
|
||||||
<div class="welcome-message">Welcome to log in and use this system platform</div>
|
|
||||||
<div class="welcome-label">欢迎登录</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="rightForm">
|
|
||||||
<el-form ref="forgetRef" :model="forgetForm" :rules="forgetRules" class="login-form">
|
|
||||||
<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"
|
|
||||||
auto-complete="off" placeholder="账号">
|
|
||||||
</el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item prop="email">
|
|
||||||
<el-input v-model="forgetForm.email" type="email" size="large" class="custom-input"
|
|
||||||
auto-complete="off" placeholder="邮箱">
|
|
||||||
</el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<div style="float: right;margin-bottom: 35px;">
|
|
||||||
<router-link to="/login" custom v-slot="{ href }">
|
|
||||||
<a class="routeLinkText" :href="href">返回登录</a>
|
|
||||||
</router-link>
|
|
||||||
</div>
|
|
||||||
<el-form-item style="width:100%;">
|
|
||||||
<el-button :loading="loading" size="large" type="primary" class="myLoginBtn"
|
|
||||||
style="width:100%;" @click.prevent="handleForgetPassword">
|
|
||||||
<span v-if="!loading">确 认</span>
|
|
||||||
<span v-else>提 交 中...</span>
|
|
||||||
</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 底部 -->
|
|
||||||
<!-- <div class="el-login-footer">
|
|
||||||
<span>Copyright © 2018-2025 ruoyi.vip All Rights Reserved.</span>
|
|
||||||
</div> -->
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup>
|
|
||||||
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 router = useRouter()
|
|
||||||
const { proxy } = getCurrentInstance()
|
|
||||||
|
|
||||||
const forgetForm = ref({
|
|
||||||
userName: undefined,
|
|
||||||
email: undefined
|
|
||||||
})
|
|
||||||
|
|
||||||
const forgetRules = {
|
|
||||||
userName: [{ required: true, trigger: "blur", message: "请输入您的账号" }],
|
|
||||||
email: [{ required: true, trigger: "blur", message: "请输入您的邮箱" }]
|
|
||||||
}
|
|
||||||
const loading = ref(false)
|
|
||||||
|
|
||||||
const handleForgetPassword = () => {
|
|
||||||
proxy.$refs.forgetRef.validate(valid => {
|
|
||||||
if (valid) {
|
|
||||||
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
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang='scss' scoped>
|
|
||||||
.login-container {
|
|
||||||
position: relative;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
background-image: url("../assets/images/login-background.png");
|
|
||||||
background-size: cover;
|
|
||||||
}
|
|
||||||
|
|
||||||
.loginRoot {
|
|
||||||
position: absolute;
|
|
||||||
top: calc(50% - 290px);
|
|
||||||
left: calc(50% - 500px);
|
|
||||||
z-index: 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
.login {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
width: 1000px;
|
|
||||||
height: 580px;
|
|
||||||
border-radius: 6px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leftLogo {
|
|
||||||
width: 500px;
|
|
||||||
height: 580px;
|
|
||||||
display: flex;
|
|
||||||
/* 垂直居中 */
|
|
||||||
align-items: center;
|
|
||||||
/* 水平居中(可选) */
|
|
||||||
justify-content: center;
|
|
||||||
background-image: url("../assets/images/login-leftBg.png");
|
|
||||||
background-size: cover;
|
|
||||||
|
|
||||||
|
|
||||||
.left-logo-container {
|
|
||||||
width: 302px;
|
|
||||||
height: 154px;
|
|
||||||
margin: 0 auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.shortBar {
|
|
||||||
width: 40px;
|
|
||||||
height: 6px;
|
|
||||||
border-radius: 3px 3px 3px 3px;
|
|
||||||
background: #ffffff;
|
|
||||||
margin: 10px auto 24px auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.welcome-message {
|
|
||||||
margin: 0 auto;
|
|
||||||
font-family: Arial;
|
|
||||||
font-weight: 400;
|
|
||||||
width: 203px;
|
|
||||||
height: 29px;
|
|
||||||
font-size: 14px;
|
|
||||||
text-align: center;
|
|
||||||
color: #FFFFFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
.welcome-label {
|
|
||||||
padding-top: 12px;
|
|
||||||
margin: 0 auto;
|
|
||||||
font-family: Alibaba PuHuiTi;
|
|
||||||
font-weight: 400;
|
|
||||||
width: 66px;
|
|
||||||
height: 14px;
|
|
||||||
font-size: 14px;
|
|
||||||
text-align: center;
|
|
||||||
color: #FFFFFF;
|
|
||||||
letter-spacing: 1px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.rightForm {
|
|
||||||
width: 500px;
|
|
||||||
height: 580px;
|
|
||||||
display: flex;
|
|
||||||
/* 垂直居中 */
|
|
||||||
align-items: center;
|
|
||||||
background: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.title-label {
|
|
||||||
font-family: Alibaba PuHuiTi;
|
|
||||||
font-weight: 500;
|
|
||||||
height: 32px;
|
|
||||||
font-size: 32px;
|
|
||||||
text-align: center;
|
|
||||||
color: #3B3B3B;
|
|
||||||
letter-spacing: 2px;
|
|
||||||
display: inline-flex;
|
|
||||||
}
|
|
||||||
|
|
||||||
.title-container {
|
|
||||||
margin: 0px auto 70px auto;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.el-form-item--default) {
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.el-form-item__error) {
|
|
||||||
font-family: Microsoft YaHei;
|
|
||||||
font-weight: 400;
|
|
||||||
font-size: 16px;
|
|
||||||
letter-spacing: 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.el-input .el-input__password) {
|
|
||||||
font-size: 18px;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 输入框样式
|
|
||||||
.custom-input {
|
|
||||||
width: 310px;
|
|
||||||
height: 50px;
|
|
||||||
border-left: 5px solid #1A75E6;
|
|
||||||
font-family: Microsoft YaHei;
|
|
||||||
font-weight: 400;
|
|
||||||
font-size: 18px;
|
|
||||||
text-align: center;
|
|
||||||
color: #DCDCDC;
|
|
||||||
letter-spacing: 1px;
|
|
||||||
|
|
||||||
/* Vue 3 方式 */
|
|
||||||
:deep(.el-input__wrapper.is-focus) {
|
|
||||||
box-shadow: 0 0 0 1px #A6C9FF inset;
|
|
||||||
background: #ffffff;
|
|
||||||
font-family: Arial;
|
|
||||||
font-weight: 400;
|
|
||||||
font-size: 18px;
|
|
||||||
color: #000000;
|
|
||||||
letter-spacing: 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.el-input__wrapper:hover) {
|
|
||||||
box-shadow: 0 0 0 1px #A6C9FF inset;
|
|
||||||
background: #ffffff;
|
|
||||||
font-family: Arial;
|
|
||||||
font-weight: 400;
|
|
||||||
font-size: 18px;
|
|
||||||
color: #000000;
|
|
||||||
letter-spacing: 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.el-input__wrapper) {
|
|
||||||
background: #f7f7f7;
|
|
||||||
border-radius: 0px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.captcha-input {
|
|
||||||
:deep(.el-input__inner) {
|
|
||||||
position: absolute;
|
|
||||||
left: 15px;
|
|
||||||
width: 170px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.routeLinkText {
|
|
||||||
font-family: Microsoft YaHei;
|
|
||||||
font-weight: 400;
|
|
||||||
font-size: 16px;
|
|
||||||
color: #0090FF;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.login-form {
|
|
||||||
width: 310px;
|
|
||||||
height: 416px;
|
|
||||||
margin: 0 auto;
|
|
||||||
z-index: 1;
|
|
||||||
|
|
||||||
.el-input {
|
|
||||||
height: 50px;
|
|
||||||
--el-input-border-color: transparent;
|
|
||||||
|
|
||||||
input {
|
|
||||||
height: 50px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.input-icon {
|
|
||||||
height: 39px;
|
|
||||||
width: 18px;
|
|
||||||
margin-left: 0px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.login-tip {
|
|
||||||
font-size: 13px;
|
|
||||||
text-align: center;
|
|
||||||
color: #bfbfbf;
|
|
||||||
}
|
|
||||||
|
|
||||||
.login-code {
|
|
||||||
width: 33%;
|
|
||||||
height: 40px;
|
|
||||||
position: absolute;
|
|
||||||
right: 22px;
|
|
||||||
z-index: 2;
|
|
||||||
|
|
||||||
img {
|
|
||||||
cursor: pointer;
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.myLoginBtn {
|
|
||||||
width: 310px;
|
|
||||||
height: 50px;
|
|
||||||
margin-top: 6px;
|
|
||||||
border-radius: 25px 25px 25px 25px;
|
|
||||||
background: #1a75e6;
|
|
||||||
font-family: Microsoft YaHei;
|
|
||||||
font-weight: 400;
|
|
||||||
font-size: 24px;
|
|
||||||
text-align: center;
|
|
||||||
color: #FFFFFF;
|
|
||||||
letter-spacing: 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-login-footer {
|
|
||||||
height: 40px;
|
|
||||||
line-height: 40px;
|
|
||||||
position: fixed;
|
|
||||||
bottom: 0;
|
|
||||||
width: 100%;
|
|
||||||
text-align: center;
|
|
||||||
color: #fff;
|
|
||||||
font-family: Arial;
|
|
||||||
font-size: 12px;
|
|
||||||
letter-spacing: 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.login-code-img {
|
|
||||||
height: 40px;
|
|
||||||
padding-left: 12px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
@ -53,7 +53,7 @@
|
||||||
<ul class="resource-list" v-if="notices.length > 0">
|
<ul class="resource-list" v-if="notices.length > 0">
|
||||||
<li v-for="(notice, index) in notices" :key="index" class="resource-link"
|
<li v-for="(notice, index) in notices" :key="index" class="resource-link"
|
||||||
@click="handleGoFormManage(notice.businessId, notice.businessType)">
|
@click="handleGoFormManage(notice.businessId, notice.businessType)">
|
||||||
{{ notice.noticeContent }}
|
{{ notice.noticeTitle }}
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="no_result" v-else>
|
<div class="no_result" v-else>
|
||||||
|
|
|
||||||
|
|
@ -35,11 +35,6 @@
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox> -->
|
<!-- <el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox> -->
|
||||||
<div style="float: right;margin-bottom: 35px;">
|
|
||||||
<router-link to="/forgetPassword" custom v-slot="{ href }">
|
|
||||||
<a class="routeLinkText" :href="href">忘记密码?</a>
|
|
||||||
</router-link>
|
|
||||||
</div>
|
|
||||||
<el-form-item style="width:100%;">
|
<el-form-item style="width:100%;">
|
||||||
<el-button :loading="loading" size="large" type="primary" class="myLoginBtn" style="width:100%;"
|
<el-button :loading="loading" size="large" type="primary" class="myLoginBtn" style="width:100%;"
|
||||||
@click.prevent="handleLogin">
|
@click.prevent="handleLogin">
|
||||||
|
|
@ -337,14 +332,6 @@ getCookie()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.routeLinkText {
|
|
||||||
font-family: Microsoft YaHei;
|
|
||||||
font-weight: 400;
|
|
||||||
font-size: 16px;
|
|
||||||
color: #0090FF;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.login-form {
|
.login-form {
|
||||||
width: 310px;
|
width: 310px;
|
||||||
height: 416px;
|
height: 416px;
|
||||||
|
|
@ -389,7 +376,7 @@ getCookie()
|
||||||
.myLoginBtn {
|
.myLoginBtn {
|
||||||
width: 310px;
|
width: 310px;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
margin-top: 6px;
|
margin-top: 46px;
|
||||||
border-radius: 25px 25px 25px 25px;
|
border-radius: 25px 25px 25px 25px;
|
||||||
background: #1a75e6;
|
background: #1a75e6;
|
||||||
font-family: Microsoft YaHei;
|
font-family: Microsoft YaHei;
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form :model="queryParams" ref="queryRef" :inline="true" class="searchInputForm">
|
<el-form :model="queryParams" ref="queryRef" :inline="true" class="searchInputForm">
|
||||||
<el-form-item label="">
|
<el-form-item label="">
|
||||||
<el-input v-model="queryParams.noticeTitle" @keydown.enter.prevent="handleQuery" placeholder="请输入通知标题" :prefix-icon="Search"
|
<el-input v-model="queryParams.noticeTitle" placeholder="请输入供应商/媒体名称" :prefix-icon="Search"
|
||||||
style="width: 400px;" />
|
style="width: 400px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
@ -34,8 +34,7 @@
|
||||||
<span v-if="scope.row.businessType == 2">媒体库</span>
|
<span v-if="scope.row.businessType == 2">媒体库</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</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">
|
<el-table-column label="通知时间" align="center" prop="createTime" min-width="210">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@
|
||||||
<el-table-column label="变更字段" align="left" prop="content" min-width="210">
|
<el-table-column label="变更字段" align="left" prop="content" min-width="210">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-popover popper-class="myUpdate_popover" placement="bottom-start">
|
<el-popover popper-class="myUpdate_popover" placement="bottom-start">
|
||||||
<el-table :data="scope.row.itemUpdatefields" height="230px">
|
<el-table :data="JSON.parse(scope.row.updateContent)" height="230px">
|
||||||
<el-table-column label="字段名称" align="left" prop="fieldDescribe" min-width="100"
|
<el-table-column label="字段名称" align="left" prop="fieldDescribe" min-width="100"
|
||||||
:show-overflow-tooltip="true">
|
:show-overflow-tooltip="true">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
|
@ -61,21 +61,13 @@
|
||||||
<el-table-column label="变更前" align="left" prop="firstVal" min-width="100"
|
<el-table-column label="变更前" align="left" prop="firstVal" min-width="100"
|
||||||
:show-overflow-tooltip="true">
|
:show-overflow-tooltip="true">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<template v-if="scope.row.isArray">
|
<span class="firstValLale">{{ scope.row.firstVal }}</span>
|
||||||
<div class="firstValLale" v-for="value in scope.row.firstVal">{{
|
|
||||||
value.originalFileName }}</div>
|
|
||||||
</template>
|
|
||||||
<span v-else class="firstValLale">{{ scope.row.firstVal }}</span>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="变更后" align="left" prop="secondVal" min-width="100"
|
<el-table-column label="变更后" align="left" prop="secondVal" min-width="100"
|
||||||
:show-overflow-tooltip="true">
|
:show-overflow-tooltip="true">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<template v-if="scope.row.isArray">
|
<span class="secondValLale">{{ scope.row.secondVal }}</span>
|
||||||
<div class="firstValLale" v-for="value in scope.row.secondVal">{{
|
|
||||||
value.originalFileName }}</div>
|
|
||||||
</template>
|
|
||||||
<span v-else class="secondValLale">{{ scope.row.secondVal }}</span>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
@ -102,8 +94,8 @@
|
||||||
<li>
|
<li>
|
||||||
<span class="logsLable">变更字段:</span>
|
<span class="logsLable">变更字段:</span>
|
||||||
<el-popover popper-class="myUpdate_popover" placement="bottom-start">
|
<el-popover popper-class="myUpdate_popover" placement="bottom-start">
|
||||||
<el-table :data="activity.itemUpdatefields" height="230px">
|
<el-table :data="JSON.parse(activity.updateContent)" height="230px">
|
||||||
<el-table-column label="字段名称" align="left" prop="fieldDescribe" width="150"
|
<el-table-column label="字段名称" align="left" prop="fieldDescribe" min-width="100"
|
||||||
:show-overflow-tooltip="true">
|
:show-overflow-tooltip="true">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span class="fieldDescribeLale">{{ scope.row.fieldDescribe }}</span>
|
<span class="fieldDescribeLale">{{ scope.row.fieldDescribe }}</span>
|
||||||
|
|
@ -112,21 +104,13 @@
|
||||||
<el-table-column label="变更前" align="left" prop="firstVal" min-width="100"
|
<el-table-column label="变更前" align="left" prop="firstVal" min-width="100"
|
||||||
:show-overflow-tooltip="true">
|
:show-overflow-tooltip="true">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<template v-if="scope.row.isArray">
|
<span class="firstValLale">{{ scope.row.firstVal }}</span>
|
||||||
<div class="firstValLale" v-for="value in scope.row.firstVal">{{
|
|
||||||
value.originalFileName }}</div>
|
|
||||||
</template>
|
|
||||||
<span v-else class="firstValLale">{{ scope.row.firstVal }}</span>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="变更后" align="left" prop="secondVal" min-width="100"
|
<el-table-column label="变更后" align="left" prop="secondVal" min-width="100"
|
||||||
:show-overflow-tooltip="true">
|
:show-overflow-tooltip="true">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<template v-if="scope.row.isArray">
|
<span class="secondValLale">{{ scope.row.secondVal }}</span>
|
||||||
<div class="firstValLale" v-for="value in scope.row.secondVal">{{
|
|
||||||
value.originalFileName }}</div>
|
|
||||||
</template>
|
|
||||||
<span v-else class="secondValLale">{{ scope.row.secondVal }}</span>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
@ -153,7 +137,6 @@ import iconListChose from '@/assets/images/iconListChose.png'
|
||||||
import iconTimeLineChose from '@/assets/images/iconTimeLineChose.png'
|
import iconTimeLineChose from '@/assets/images/iconTimeLineChose.png'
|
||||||
import { busSupplierLogPage, listBusSupplierLog } from "@/api/supplierLogs"
|
import { busSupplierLogPage, listBusSupplierLog } from "@/api/supplierLogs"
|
||||||
|
|
||||||
|
|
||||||
const emit = defineEmits(['handleShowList']);
|
const emit = defineEmits(['handleShowList']);
|
||||||
const ToolOptions = ref([
|
const ToolOptions = ref([
|
||||||
{ defaultIcon: iconList, activeIcon: iconListChose },
|
{ defaultIcon: iconList, activeIcon: iconListChose },
|
||||||
|
|
@ -201,130 +184,18 @@ const getSupplierPageList = () => {
|
||||||
busSupplierLogPage(queryParams.value).then(res => {
|
busSupplierLogPage(queryParams.value).then(res => {
|
||||||
res.data.list.forEach(item => {
|
res.data.list.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.list
|
supplierLogList.value = res.data.list
|
||||||
total.value = res.data.total
|
total.value = res.data.total
|
||||||
loading.value = false
|
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 = () => {
|
const getSupplierList = () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
listBusSupplierLog(queryParams.value).then(res => {
|
listBusSupplierLog(queryParams.value).then(res => {
|
||||||
res.data.forEach(item => {
|
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
|
supplierLogList.value = res.data
|
||||||
loading.value = false
|
loading.value = false
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user