Merge branch 'dev-cjl' of http://114.55.169.15:3000/qiushanhe/ss-crm-manage-web into dev-cl
This commit is contained in:
@@ -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 })
|
||||
}
|
||||
|
||||
// 获得我的站内信分页
|
||||
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 })
|
||||
}
|
||||
|
||||
|
||||
@@ -205,6 +205,8 @@ service.interceptors.response.use(
|
||||
if (msg === '无效的刷新令牌') {
|
||||
// hard coding:忽略这个提示,直接登出
|
||||
console.log(msg)
|
||||
} else if (code == 18888) {
|
||||
return { data }
|
||||
} else {
|
||||
ElNotification.error({ title: msg })
|
||||
if (code == 403) {
|
||||
|
||||
@@ -101,7 +101,7 @@ onUnmounted(() => {
|
||||
.message-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0;
|
||||
padding: 5px 0;
|
||||
border-bottom: 1px solid var(--el-border-color-light);
|
||||
|
||||
&:last-child {
|
||||
|
||||
@@ -1,11 +1,4 @@
|
||||
<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">
|
||||
<el-tree
|
||||
ref="treeRef"
|
||||
@@ -26,7 +19,6 @@ import { ElTree } from 'element-plus'
|
||||
import * as DeptApi from '@/api/system/dept'
|
||||
import { defaultProps, handleTree } from '@/utils/tree'
|
||||
|
||||
const deptName = ref('')
|
||||
const deptList = ref<Tree[]>([]) // 树形结构
|
||||
const treeRef = ref<InstanceType<typeof ElTree>>()
|
||||
|
||||
|
||||
@@ -139,7 +139,8 @@ const formData = ref({
|
||||
remark: '',
|
||||
status: CommonStatusEnum.ENABLE,
|
||||
roleIds: [],
|
||||
hireDate: ''
|
||||
hireDate: '',
|
||||
isNewUserConfirm: false
|
||||
})
|
||||
const formRules = ref<any>({
|
||||
username: [{ required: true, message: '登录账号不能为空', trigger: 'blur' }],
|
||||
@@ -192,8 +193,15 @@ const submitForm = async () => {
|
||||
try {
|
||||
const data = formData.value as unknown as UserApi.UserVO
|
||||
if (formType.value === 'create') {
|
||||
await UserApi.createUser(data)
|
||||
const resp = await UserApi.createUser(data)
|
||||
debugger
|
||||
if (resp.code == 18888) {
|
||||
await message.confirm(resp.msg)
|
||||
formData.value.isNewUserConfirm = true
|
||||
submitForm()
|
||||
} else {
|
||||
message.success(t('common.createSuccess'))
|
||||
}
|
||||
} else {
|
||||
await UserApi.updateUser(data)
|
||||
message.success(t('common.updateSuccess'))
|
||||
@@ -220,7 +228,8 @@ const resetForm = () => {
|
||||
remark: '',
|
||||
status: CommonStatusEnum.ENABLE,
|
||||
roleIds: [],
|
||||
hireDate: formatDate(new Date(), 'YYYY-MM-DD')
|
||||
hireDate: formatDate(new Date(), 'YYYY-MM-DD'),
|
||||
isNewUserConfirm: undefined
|
||||
}
|
||||
formRef.value?.resetFields()
|
||||
}
|
||||
|
||||
@@ -100,7 +100,10 @@ const queryFormRef = ref() // 搜索的表单
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
const data = await NotifyMessageApi.getNotifyMessagePage(queryParams)
|
||||
const data = await NotifyMessageApi.getMyNotifyMessagePage({
|
||||
...queryParams,
|
||||
roleId: userStore.getUser?.currentRole
|
||||
})
|
||||
list.value = data.list
|
||||
total.value = data.total
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user