Compare commits
18 Commits
dev-cjl
...
5c6c3df4d0
| Author | SHA1 | Date | |
|---|---|---|---|
| 5c6c3df4d0 | |||
| acdcc670de | |||
| 9472c5ea56 | |||
| 4f150b0912 | |||
| f76d6dce66 | |||
| dd4bdb0786 | |||
| 477a279867 | |||
| c87637cc78 | |||
| a544840679 | |||
| 247c6ed4a0 | |||
| 769c901954 | |||
| 18bfc7d353 | |||
| fb6b341242 | |||
| fea69da8ed | |||
| 125f6f28ad | |||
| 39cddaa8e0 | |||
| ffd15e2433 | |||
| 2bebd0480e |
@@ -4,7 +4,7 @@ VITE_NODE_ENV=development
|
|||||||
VITE_DEV=true
|
VITE_DEV=true
|
||||||
|
|
||||||
# 请求路径
|
# 请求路径
|
||||||
VITE_BASE_URL='http://118.31.23.45:48080'
|
VITE_BASE_URL='http://localhost:48080'
|
||||||
# VITE_BASE_URL='http://114.55.169.15:48080'
|
# VITE_BASE_URL='http://114.55.169.15:48080'
|
||||||
|
|
||||||
# 上传路径
|
# 上传路径
|
||||||
|
|||||||
@@ -71,10 +71,3 @@ export const getAppInfo = (instanceId: number) => {
|
|||||||
url: '/admin-api/system/serviceInstance/getInstanceInfo?instanceId=' + instanceId
|
url: '/admin-api/system/serviceInstance/getInstanceInfo?instanceId=' + instanceId
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export const bindWx = (data: any) => {
|
|
||||||
return request.post({
|
|
||||||
url: '/admin-api/system/user/bind/wx',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -15,12 +15,12 @@ export interface NotifyMessageVO {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 查询站内信消息列表
|
// 查询站内信消息列表
|
||||||
export const getNotifyMessagePage = async (params: any) => {
|
export const getNotifyMessagePage = async (params: PageParam) => {
|
||||||
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: any) => {
|
export const getMyNotifyMessagePage = async (params: PageParam) => {
|
||||||
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,8 +205,6 @@ 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: 5px 0;
|
padding: 0;
|
||||||
border-bottom: 1px solid var(--el-border-color-light);
|
border-bottom: 1px solid var(--el-border-color-light);
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
|
|||||||
@@ -23,11 +23,7 @@
|
|||||||
<el-table-column prop="name" label="部门名称" />
|
<el-table-column prop="name" label="部门名称" />
|
||||||
<el-table-column prop="leader" label="负责人" width="120" />
|
<el-table-column prop="leader" label="负责人" width="120" />
|
||||||
<el-table-column prop="sort" label="排序" width="200" />
|
<el-table-column prop="sort" label="排序" width="200" />
|
||||||
<el-table-column prop="status" label="状态" width="100">
|
<el-table-column prop="status" label="状态" width="100" />
|
||||||
<template #default="{ row }">
|
|
||||||
{{ ['启用', '禁用'][row.status] }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="创建时间" prop="createTime" width="180" :formatter="dateFormatter" />
|
<el-table-column label="创建时间" prop="createTime" width="180" :formatter="dateFormatter" />
|
||||||
<el-table-column label="操作" class-name="fixed-width" width="240">
|
<el-table-column label="操作" class-name="fixed-width" width="240">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
<el-form :model="form" ref="formRef" :rules="rules" label-width="auto" v-loading="formLoading">
|
<el-form :model="form" ref="formRef" :rules="rules" label-width="auto" v-loading="formLoading">
|
||||||
<el-form-item label="开启通知">
|
<el-form-item label="开启通知">
|
||||||
<el-radio-group v-model="form.status">
|
<el-radio-group v-model="form.status">
|
||||||
<el-radio :label="0"> 开启 </el-radio>
|
<el-radio :label="1"> 开启 </el-radio>
|
||||||
<el-radio :label="1"> 关闭 </el-radio>
|
<el-radio :label="0"> 关闭 </el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,11 @@
|
|||||||
<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"
|
||||||
@@ -19,6 +26,7 @@ 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,8 +139,7 @@ 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' }],
|
||||||
@@ -193,14 +192,8 @@ 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') {
|
||||||
const resp = await UserApi.createUser(data)
|
await UserApi.createUser(data)
|
||||||
if (resp.code == 18888) {
|
message.success(t('common.createSuccess'))
|
||||||
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'))
|
||||||
@@ -227,8 +220,7 @@ 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: false
|
|
||||||
}
|
}
|
||||||
formRef.value?.resetFields()
|
formRef.value?.resetFields()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,9 +7,6 @@
|
|||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-input v-model="searchForm.name" placeholder="线索名称" clearable />
|
<el-input v-model="searchForm.name" placeholder="线索名称" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
|
||||||
<el-input v-model="searchForm.mobile" placeholder="联系方式" clearable />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-select v-model="searchForm.state" placeholder="审核状态" clearable style="width: 120px">
|
<el-select v-model="searchForm.state" placeholder="审核状态" clearable style="width: 120px">
|
||||||
<el-option label="待审核" :value="1" />
|
<el-option label="待审核" :value="1" />
|
||||||
@@ -136,8 +133,8 @@
|
|||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleSelectionChange"
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" width="60" :selectable="(row) => row.state == 1" />
|
<el-table-column type="selection" width="60" :selectable="(row) => row.state == 1" />
|
||||||
<el-table-column prop="signId" label="成交单号" min-width="150px" />
|
<el-table-column prop="signId" label="成交单号" min-width="180px" />
|
||||||
<el-table-column prop="name" label="线索名称" width="120px" />
|
<el-table-column prop="name" label="线索名称" width="150px" />
|
||||||
<el-table-column prop="phone" label="联系方式" width="120px" />companyProfit
|
<el-table-column prop="phone" label="联系方式" width="120px" />companyProfit
|
||||||
<el-table-column prop="money" label="回款金额" min-width="120px">
|
<el-table-column prop="money" label="回款金额" min-width="120px">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
@@ -210,12 +207,6 @@
|
|||||||
label="转化人"
|
label="转化人"
|
||||||
min-width="90"
|
min-width="90"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
|
||||||
v-if="appStore.getAppInfo?.instanceType == 1"
|
|
||||||
prop="area"
|
|
||||||
label="区域"
|
|
||||||
min-width="90"
|
|
||||||
/>
|
|
||||||
<el-table-column prop="signUserName" label="登记人" min-width="90" />
|
<el-table-column prop="signUserName" label="登记人" min-width="90" />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="dealDate"
|
prop="dealDate"
|
||||||
@@ -340,7 +331,6 @@ const searchForm = ref({
|
|||||||
applyTime: [],
|
applyTime: [],
|
||||||
applyUser: undefined,
|
applyUser: undefined,
|
||||||
checkTime: [],
|
checkTime: [],
|
||||||
phone: undefined,
|
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 20
|
pageSize: 20
|
||||||
})
|
})
|
||||||
@@ -368,7 +358,6 @@ function handleReset() {
|
|||||||
applyTime: [],
|
applyTime: [],
|
||||||
applyUser: undefined,
|
applyUser: undefined,
|
||||||
checkTime: [],
|
checkTime: [],
|
||||||
mobile: undefined,
|
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 20
|
pageSize: 20
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,17 +9,12 @@
|
|||||||
<el-input v-model="form.password" placeholder="请输入密码" show-password type="password" />
|
<el-input v-model="form.password" placeholder="请输入密码" show-password type="password" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-button type="primary" :disabled="formLoading" class="w-full" @click="onSubmit">
|
<el-button type="primary" class="w-full" @click="onSubmit">授权登陆</el-button>
|
||||||
授权登陆
|
<div v-if="form.code">code: {{ form.code }}</div>
|
||||||
</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup name="MPLogin">
|
<script setup name="MPLogin">
|
||||||
import { bindWx } from '@/api/login'
|
|
||||||
|
|
||||||
const message = useMessage() // 消息弹窗
|
|
||||||
|
|
||||||
const form = ref({
|
const form = ref({
|
||||||
code: undefined,
|
code: undefined,
|
||||||
username: undefined,
|
username: undefined,
|
||||||
@@ -43,29 +38,13 @@ const params = ref({
|
|||||||
scope: 'snsapi_base' // snsapi_base 静默授权获取 open id ;snsapi_userinfo 需要用户授权,获取详细信息
|
scope: 'snsapi_base' // snsapi_base 静默授权获取 open id ;snsapi_userinfo 需要用户授权,获取详细信息
|
||||||
// state:'code', // a-zA-Z0-9的参数值,最多128字节
|
// state:'code', // a-zA-Z0-9的参数值,最多128字节
|
||||||
})
|
})
|
||||||
|
function onSubmit() {
|
||||||
const formLoading = ref(false)
|
|
||||||
async function onSubmit() {
|
|
||||||
// 这些需要判断没有 code 情况拉起授权登陆,有就结束放在重复拉起授权登陆
|
// 这些需要判断没有 code 情况拉起授权登陆,有就结束放在重复拉起授权登陆
|
||||||
if (!form.value.code) {
|
if (!form.value.code) {
|
||||||
const access_url = WX_AUTH_URL + `${new URLSearchParams(params.value)}` + REDIRECT
|
const access_url = WX_AUTH_URL + `${new URLSearchParams(params.value)}` + REDIRECT
|
||||||
location.href = access_url
|
location.href = access_url
|
||||||
} else {
|
} else {
|
||||||
// 校验表单
|
alert(`授权成功!`)
|
||||||
if (!formRef.value) return
|
|
||||||
const valid = await formRef.value.validate()
|
|
||||||
if (!valid) return
|
|
||||||
// 提交请求
|
|
||||||
formLoading.value = true
|
|
||||||
try {
|
|
||||||
await bindWx(form.value)
|
|
||||||
message.success('绑定成功')
|
|
||||||
window.close()
|
|
||||||
} catch (error) {
|
|
||||||
console.log(error)
|
|
||||||
} finally {
|
|
||||||
formLoading.value = false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
@row-dblclick="handleDetail"
|
@row-dblclick="handleDetail"
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" :selectable="selectable" reserve-selection width="60px" />
|
<el-table-column type="selection" :selectable="selectable" reserve-selection width="60px" />
|
||||||
<el-table-column label="类型" align="left" prop="messageTypeName" width="200px" />
|
<el-table-column label="类型" align="left" prop="messageType" width="200px" />
|
||||||
<el-table-column label="标题" align="left" prop="title" />
|
<el-table-column label="标题" align="left" prop="title" />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="时间"
|
label="时间"
|
||||||
@@ -100,10 +100,7 @@ const queryFormRef = ref() // 搜索的表单
|
|||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
try {
|
try {
|
||||||
const data = await NotifyMessageApi.getMyNotifyMessagePage({
|
const data = await NotifyMessageApi.getNotifyMessagePage(queryParams)
|
||||||
...queryParams,
|
|
||||||
roleId: userStore.getUser?.currentRole
|
|
||||||
})
|
|
||||||
list.value = data.list
|
list.value = data.list
|
||||||
total.value = data.total
|
total.value = data.total
|
||||||
} finally {
|
} finally {
|
||||||
@@ -122,10 +119,11 @@ const handleQuery = () => {
|
|||||||
getList()
|
getList()
|
||||||
}
|
}
|
||||||
|
|
||||||
async function handleDetail(row: any) {
|
function handleDetail(row: any) {
|
||||||
if (!row.readStatus) {
|
if (!row.readStatus) {
|
||||||
await handleReadOne(row.id)
|
handleReadOne(row.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
const url = router.resolve({
|
const url = router.resolve({
|
||||||
path: '/nm-detail',
|
path: '/nm-detail',
|
||||||
query: { id: row.id }
|
query: { id: row.id }
|
||||||
@@ -136,14 +134,6 @@ async function handleDetail(row: any) {
|
|||||||
const tableRef = ref() // 表格的 Ref
|
const tableRef = ref() // 表格的 Ref
|
||||||
const selectedIds = ref<number[]>([]) // 表格的选中 ID 数组
|
const selectedIds = ref<number[]>([]) // 表格的选中 ID 数组
|
||||||
|
|
||||||
/** 标记一条站内信已读 */
|
|
||||||
const handleReadOne = async (id: number) => {
|
|
||||||
await NotifyMessageApi.updateNotifyMessageRead({
|
|
||||||
ids: [id]
|
|
||||||
})
|
|
||||||
await getList()
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 标记全部站内信已读 **/
|
/** 标记全部站内信已读 **/
|
||||||
const handleUpdateAll = async () => {
|
const handleUpdateAll = async () => {
|
||||||
await NotifyMessageApi.updateAllNotifyMessageRead({
|
await NotifyMessageApi.updateAllNotifyMessageRead({
|
||||||
@@ -168,6 +158,15 @@ const handleUpdateList = async () => {
|
|||||||
await getList()
|
await getList()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 标记一条站内信已读 */
|
||||||
|
const handleReadOne = async (id: number) => {
|
||||||
|
await NotifyMessageApi.updateNotifyMessageRead({
|
||||||
|
ids: [id],
|
||||||
|
roleId: userStore.getUser?.currentRole
|
||||||
|
})
|
||||||
|
await getList()
|
||||||
|
}
|
||||||
|
|
||||||
/** 当表格选择项发生变化时会触发该事件 */
|
/** 当表格选择项发生变化时会触发该事件 */
|
||||||
const handleSelectionChange = (array: NotifyMessageApi.NotifyMessageVO[]) => {
|
const handleSelectionChange = (array: NotifyMessageApi.NotifyMessageVO[]) => {
|
||||||
selectedIds.value = []
|
selectedIds.value = []
|
||||||
|
|||||||
@@ -1,12 +1,5 @@
|
|||||||
<!--
|
|
||||||
* @Author: riverQiu
|
|
||||||
* @Date: 2024-09-11 18:42:37
|
|
||||||
* @LastEditors: riverQiu
|
|
||||||
* @LastEditTime: 2024-09-11 19:03:23
|
|
||||||
* @Description:
|
|
||||||
-->
|
|
||||||
<template>
|
<template>
|
||||||
<div class="container">
|
<div class="p-20px">
|
||||||
<ContentWrap style="max-width: 1000px; margin: 0 auto">
|
<ContentWrap style="max-width: 1000px; margin: 0 auto">
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<div class="mb-10px" style="font-size: 24px; letter-spacing: 2px">
|
<div class="mb-10px" style="font-size: 24px; letter-spacing: 2px">
|
||||||
@@ -24,7 +17,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup name="NMDetail">
|
<script setup name="NMDetail">
|
||||||
import { getNotifyMessageDetail, updateNotifyMessageRead } from '@/api/system/notify/message'
|
import { getNotifyMessageDetail } from '@/api/system/notify/message'
|
||||||
import { formatDate } from '@/utils/formatTime'
|
import { formatDate } from '@/utils/formatTime'
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
@@ -33,32 +26,15 @@ const info = ref({})
|
|||||||
function init() {
|
function init() {
|
||||||
getNotifyMessageDetail(route.query.id).then((data) => {
|
getNotifyMessageDetail(route.query.id).then((data) => {
|
||||||
info.value = data
|
info.value = data
|
||||||
if (!data.readStatus) {
|
|
||||||
handleReadOne(data.id)
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 标记一条站内信已读 */
|
|
||||||
const handleReadOne = async (id) => {
|
|
||||||
await updateNotifyMessageRead({
|
|
||||||
ids: [id]
|
|
||||||
// roleId: userStore.getUser?.currentRole
|
|
||||||
})
|
|
||||||
await getList()
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
init()
|
init()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.container {
|
|
||||||
padding: 20px;
|
|
||||||
max-height: 100%;
|
|
||||||
overflow-y: auto;
|
|
||||||
}
|
|
||||||
:deep(p) {
|
:deep(p) {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user