修改医生通知 和留言板相关

This commit is contained in:
lxd 2025-09-02 22:35:18 +08:00
parent 74ec9fb972
commit fe6ed7a2e6
5 changed files with 25 additions and 14 deletions

View File

@ -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

View File

@ -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 = {

View File

@ -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>

View File

@ -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)

View File

@ -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>({})