修改医生通知 和留言板相关
This commit is contained in:
parent
74ec9fb972
commit
fe6ed7a2e6
@ -11,6 +11,8 @@ export interface FeedbackVO {
|
|||||||
backTime: Date | number // 医生回复时间(支持Date对象或时间戳)
|
backTime: Date | number // 医生回复时间(支持Date对象或时间戳)
|
||||||
orgid: number // 机构ID
|
orgid: number // 机构ID
|
||||||
orgname: string // 机构名称
|
orgname: string // 机构名称
|
||||||
|
status: number // 回复状态
|
||||||
|
deviceid: number // 设备号
|
||||||
}
|
}
|
||||||
|
|
||||||
// 留言板 API
|
// 留言板 API
|
||||||
|
@ -390,12 +390,12 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// 检查用户是否为会员
|
// // 检查用户是否为会员
|
||||||
const userResponse = await PersonApi.getPerson(this.selectedPerson.userid)
|
// const userResponse = await PersonApi.getPerson(this.selectedPerson.userid)
|
||||||
if (!userResponse || userResponse.isvip === 0) {
|
// if (!userResponse || userResponse.isvip === 0) {
|
||||||
this.message.warning('该用户不是会员,无法发送通知')
|
// this.message.warning('该用户不是会员,无法发送通知')
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
|
|
||||||
// 构建通知数据
|
// 构建通知数据
|
||||||
const noticeData = {
|
const noticeData = {
|
||||||
|
@ -299,12 +299,12 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { dateFormatter, formatDate } from '@/utils/formatTime'
|
import { dateFormatter, formatDate } from '@/utils/formatTime'
|
||||||
import * as DoctornoticeApi from '@/api/doctornotice'
|
import * as DoctornoticeApi from '@/api/doctornotice'
|
||||||
|
import { getUserProfile } from '@/api/system/user/profile'
|
||||||
defineOptions({ name: 'DoctorNotice' })
|
defineOptions({ name: 'DoctorNotice' })
|
||||||
|
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
const { t } = useI18n() // 国际化
|
const { t } = useI18n() // 国际化
|
||||||
|
const userProfile = ref()
|
||||||
// 响应式数据
|
// 响应式数据
|
||||||
const loading = ref(true) // 列表加载状态
|
const loading = ref(true) // 列表加载状态
|
||||||
const list = ref<DoctornoticeApi.DoctornoticeVO[]>([]) // 通知列表
|
const list = ref<DoctornoticeApi.DoctornoticeVO[]>([]) // 通知列表
|
||||||
@ -319,7 +319,8 @@ const queryParams = reactive({
|
|||||||
noticetype: undefined as number | undefined,
|
noticetype: undefined as number | undefined,
|
||||||
noticelevel: undefined as number | undefined,
|
noticelevel: undefined as number | undefined,
|
||||||
readstatus: undefined as number | undefined,
|
readstatus: undefined as number | undefined,
|
||||||
datatime: [] as string[]
|
datatime: [] as string[],
|
||||||
|
orgid: undefined as number | undefined
|
||||||
})
|
})
|
||||||
|
|
||||||
const queryFormRef = ref() // 查询表单引用
|
const queryFormRef = ref() // 查询表单引用
|
||||||
@ -341,6 +342,7 @@ const unreadCount = computed(() => {
|
|||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
try {
|
try {
|
||||||
|
queryParams.orgid = userProfile.value.dept.orgid
|
||||||
const data = await DoctornoticeApi.DoctornoticeApi.getDoctornoticePage(queryParams)
|
const data = await DoctornoticeApi.DoctornoticeApi.getDoctornoticePage(queryParams)
|
||||||
list.value = data.list
|
list.value = data.list
|
||||||
total.value = data.total
|
total.value = data.total
|
||||||
@ -509,7 +511,9 @@ const handleRowClick = (row: DoctornoticeApi.DoctornoticeVO) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 生命周期
|
// 生命周期
|
||||||
onMounted(() => {
|
onMounted(async () => {
|
||||||
|
//首先获取用户信息
|
||||||
|
userProfile.value = await getUserProfile()
|
||||||
getList()
|
getList()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
<p>{{ feedbackData.content }}</p>
|
<p>{{ feedbackData.content }}</p>
|
||||||
<div class="message-info">
|
<div class="message-info">
|
||||||
<span>客户ID: {{ feedbackData.userId }}</span>
|
<span>客户ID: {{ feedbackData.userId }}</span>
|
||||||
<span>机构: {{ feedbackData.orgname }}</span>
|
<span>设备号: {{ feedbackData.deviceid }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -89,7 +89,9 @@ const replyForm = reactive<FeedbackVO>({
|
|||||||
doctorId: 0,
|
doctorId: 0,
|
||||||
backTime: Date.now(),
|
backTime: Date.now(),
|
||||||
orgid: 0,
|
orgid: 0,
|
||||||
orgname: ''
|
orgname: '',
|
||||||
|
status: 0,
|
||||||
|
deviceid: 0
|
||||||
})
|
})
|
||||||
|
|
||||||
// 表单验证规则
|
// 表单验证规则
|
||||||
@ -126,7 +128,8 @@ const handleSubmit = async () => {
|
|||||||
const submitData = {
|
const submitData = {
|
||||||
...replyForm,
|
...replyForm,
|
||||||
backTime: Date.now(),
|
backTime: Date.now(),
|
||||||
doctorName: props.doctorName || '未知医生'
|
doctorName: props.doctorName || '未知医生',
|
||||||
|
status:2 // 回复状态
|
||||||
}
|
}
|
||||||
|
|
||||||
await FeedbackApi.updateFeedback(submitData)
|
await FeedbackApi.updateFeedback(submitData)
|
||||||
|
@ -182,7 +182,9 @@ const currentFeedback = ref<FeedbackVO>({
|
|||||||
doctorId: 0,
|
doctorId: 0,
|
||||||
backTime: Date.now(),
|
backTime: Date.now(),
|
||||||
orgid: 0,
|
orgid: 0,
|
||||||
orgname: ''
|
orgname: '',
|
||||||
|
status: 0,
|
||||||
|
deviceid: 0
|
||||||
})
|
})
|
||||||
const userProfile = ref<any>({})
|
const userProfile = ref<any>({})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user