Compare commits

...

5 Commits

  1. 4
      src/api/system/notify/message/index.ts
  2. 2
      src/config/axios/service.ts
  3. 2
      src/layout/components/Message/src/Message.vue
  4. 8
      src/views/Basic/User/DeptTree.vue
  5. 17
      src/views/Basic/User/UserForm.vue
  6. 5
      src/views/Profile/NotifyMessage.vue

@ -15,12 +15,12 @@ export interface NotifyMessageVO {
} }
// 查询站内信消息列表 // 查询站内信消息列表
export const getNotifyMessagePage = async (params: PageParam) => { export const getNotifyMessagePage = async (params: any) => {
return await request.get({ url: '/admin-api/system/notify-message/page', params }) return await request.get({ url: '/admin-api/system/notify-message/page', params })
} }
// 获得我的站内信分页 // 获得我的站内信分页
export const getMyNotifyMessagePage = async (params: PageParam) => { export const getMyNotifyMessagePage = async (params: any) => {
return await request.get({ url: '/admin-api/system/notify-message/my-page', params }) return await request.get({ url: '/admin-api/system/notify-message/my-page', params })
} }

@ -205,6 +205,8 @@ service.interceptors.response.use(
if (msg === '无效的刷新令牌') { if (msg === '无效的刷新令牌') {
// hard coding:忽略这个提示,直接登出 // hard coding:忽略这个提示,直接登出
console.log(msg) console.log(msg)
} else if (code == 18888) {
return { data }
} else { } else {
ElNotification.error({ title: msg }) ElNotification.error({ title: msg })
if (code == 403) { if (code == 403) {

@ -101,7 +101,7 @@ onUnmounted(() => {
.message-item { .message-item {
display: flex; display: flex;
align-items: center; align-items: center;
padding: 0; padding: 5px 0;
border-bottom: 1px solid var(--el-border-color-light); border-bottom: 1px solid var(--el-border-color-light);
&:last-child { &:last-child {

@ -1,11 +1,4 @@
<template> <template>
<div class="head-container">
<el-input v-model="deptName" class="mb-20px" clearable placeholder="请输入部门名称">
<template #prefix>
<Icon icon="ep:search" />
</template>
</el-input>
</div>
<div class="head-container"> <div class="head-container">
<el-tree <el-tree
ref="treeRef" ref="treeRef"
@ -26,7 +19,6 @@ import { ElTree } from 'element-plus'
import * as DeptApi from '@/api/system/dept' import * as DeptApi from '@/api/system/dept'
import { defaultProps, handleTree } from '@/utils/tree' import { defaultProps, handleTree } from '@/utils/tree'
const deptName = ref('')
const deptList = ref<Tree[]>([]) // const deptList = ref<Tree[]>([]) //
const treeRef = ref<InstanceType<typeof ElTree>>() const treeRef = ref<InstanceType<typeof ElTree>>()

@ -139,7 +139,8 @@ const formData = ref({
remark: '', remark: '',
status: CommonStatusEnum.ENABLE, status: CommonStatusEnum.ENABLE,
roleIds: [], roleIds: [],
hireDate: '' hireDate: '',
isNewUserConfirm: false
}) })
const formRules = ref<any>({ const formRules = ref<any>({
username: [{ required: true, message: '登录账号不能为空', trigger: 'blur' }], username: [{ required: true, message: '登录账号不能为空', trigger: 'blur' }],
@ -192,8 +193,15 @@ const submitForm = async () => {
try { try {
const data = formData.value as unknown as UserApi.UserVO const data = formData.value as unknown as UserApi.UserVO
if (formType.value === 'create') { if (formType.value === 'create') {
await UserApi.createUser(data) const resp = await UserApi.createUser(data)
message.success(t('common.createSuccess')) debugger
if (resp.code == 18888) {
await message.confirm(resp.msg)
formData.value.isNewUserConfirm = true
submitForm()
} else {
message.success(t('common.createSuccess'))
}
} else { } else {
await UserApi.updateUser(data) await UserApi.updateUser(data)
message.success(t('common.updateSuccess')) message.success(t('common.updateSuccess'))
@ -220,7 +228,8 @@ const resetForm = () => {
remark: '', remark: '',
status: CommonStatusEnum.ENABLE, status: CommonStatusEnum.ENABLE,
roleIds: [], roleIds: [],
hireDate: formatDate(new Date(), 'YYYY-MM-DD') hireDate: formatDate(new Date(), 'YYYY-MM-DD'),
isNewUserConfirm: undefined
} }
formRef.value?.resetFields() formRef.value?.resetFields()
} }

@ -100,7 +100,10 @@ const queryFormRef = ref() // 搜索的表单
const getList = async () => { const getList = async () => {
loading.value = true loading.value = true
try { try {
const data = await NotifyMessageApi.getNotifyMessagePage(queryParams) const data = await NotifyMessageApi.getMyNotifyMessagePage({
...queryParams,
roleId: userStore.getUser?.currentRole
})
list.value = data.list list.value = data.list
total.value = data.total total.value = data.total
} finally { } finally {

Loading…
Cancel
Save