123
This commit is contained in:
parent
a074e4dca7
commit
7c479bb32e
@ -324,22 +324,22 @@ export const getAdditionIndexManageExamine= function(date: any) {
|
||||
|
||||
// 获取通知公告列表
|
||||
export function noticeList(data: any) {
|
||||
return Http.post('/api/backend/publicAnnouncement/getPublicAnnouncementData', data)
|
||||
return Http.post('/api/backend/public_announcement/getPublicAnnouncementData', data)
|
||||
}
|
||||
|
||||
// 新增通知公告
|
||||
export function noticeAdd(data: any) {
|
||||
return Http.post('/api/backend/publicAnnouncement/create', data)
|
||||
return Http.post('/api/backend/public_announcement/create', data)
|
||||
}
|
||||
|
||||
// 编辑通知公告
|
||||
export function noticeEdit(data: any) {
|
||||
return Http.post('/api/backend/publicAnnouncement/update', data)
|
||||
return Http.post('/api/backend/public_announcement/update', data)
|
||||
}
|
||||
|
||||
// 删除通知公告
|
||||
export function noticeDelete(data: any) {
|
||||
return Http.post('/api/backend/publicAnnouncement/delete', data)
|
||||
return Http.post('/api/backend/public_announcement/delete', data)
|
||||
}
|
||||
|
||||
// 上传图片
|
||||
@ -365,6 +365,15 @@ export function getAnnualFindData(data: any) {
|
||||
return Http.post('/api/backend/Year/getAnnualFindData', data)
|
||||
}
|
||||
|
||||
// 投诉列表
|
||||
export function getPoliticsList(data: any) {
|
||||
return Http.post('/api/backend/Politics/index', data)
|
||||
}
|
||||
// 投诉列表(编辑)
|
||||
export function getPoliticsEdit(data: any) {
|
||||
return Http.post('/api/backend/Politics/update', data)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -3,19 +3,12 @@
|
||||
<lay-row :space="10">
|
||||
<!-- 搜索区域 -->
|
||||
<lay-col :md="24">
|
||||
<lay-card>
|
||||
<!-- <lay-card>
|
||||
<lay-form style="margin-top: 20px">
|
||||
<lay-row>
|
||||
<lay-col :md="5">
|
||||
<lay-form-item label="患者姓名:" label-width="80">
|
||||
<lay-input v-model="searchQuery.patientName" placeholder="请输入患者姓名"
|
||||
:allow-clear="true">
|
||||
</lay-input>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
<lay-col :md="5">
|
||||
<lay-form-item label="投诉类型:" label-width="80">
|
||||
<lay-select v-model="searchQuery.complaintType" placeholder="请选择类型" :allow-clear="true">
|
||||
<lay-form-item label="科室" label-width="80">
|
||||
<lay-select v-model="searchQuery.group_id" placeholder="请选择类型" :allow-clear="true">
|
||||
<lay-select-option value="服务态度" label="服务态度"></lay-select-option>
|
||||
<lay-select-option value="医疗质量" label="医疗质量"></lay-select-option>
|
||||
<lay-select-option value="收费问题" label="收费问题"></lay-select-option>
|
||||
@ -23,15 +16,6 @@
|
||||
</lay-select>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
<lay-col :md="5">
|
||||
<lay-form-item label="处理状态:" label-width="80">
|
||||
<lay-select v-model="searchQuery.status" placeholder="请选择状态" :allow-clear="true">
|
||||
<lay-select-option value="待处理" label="待处理"></lay-select-option>
|
||||
<lay-select-option value="处理中" label="处理中"></lay-select-option>
|
||||
<lay-select-option value="已处理" label="已处理"></lay-select-option>
|
||||
</lay-select>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
<lay-col :md="4">
|
||||
<lay-form-item label-width="0">
|
||||
<lay-button type="primary" @click="toSearch">查询</lay-button>
|
||||
@ -40,7 +24,7 @@
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
</lay-form>
|
||||
</lay-card>
|
||||
</lay-card> -->
|
||||
</lay-col>
|
||||
|
||||
<!-- 列表区域 -->
|
||||
@ -48,45 +32,137 @@
|
||||
<lay-card>
|
||||
<div style="padding: 10px">
|
||||
<span style="font-size: 18px;vertical-align: center;margin-right: 20px">投诉记录列表</span>
|
||||
<lay-button type="primary" @click="changeVisible11('新增', null)" size="sm">新增投诉</lay-button>
|
||||
</div>
|
||||
<lay-table :height="600" size="lg" :columns="columns" :data-source="dataSource" :page="page" @change="change">
|
||||
<lay-table height="600px" :columns="columns" :data-source="dataSource" :page="page" @change="change">
|
||||
<template #status="{ row }">
|
||||
<span v-if="row.status === '待处理'" style="color: #1E9FFF">待处理</span>
|
||||
<span v-if="row.status === '处理中'" style="color: #FFB800">处理中</span>
|
||||
<span v-if="row.status === '已处理'" style="color: #009688">已处理</span>
|
||||
<span v-if="row.acceptance_status == 1" style="color: #FFB800">待处理</span>
|
||||
<span v-if="row.acceptance_status == 2" style="color: #00CC66">已回复</span>
|
||||
</template>
|
||||
<template v-slot:operator="{ row }">
|
||||
<lay-space size="lg">
|
||||
<span style="color: #00A394;cursor: pointer" @click="changeVisible11('编辑', row)">编辑</span>
|
||||
<lay-popconfirm content="确定要删除此投诉记录吗?" @confirm="confirm" @cancel="cancel">
|
||||
<span style="color: #00A394;cursor: pointer">删除</span>
|
||||
</lay-popconfirm>
|
||||
<span v-if="row.acceptance_status == 1" style="color: #00A394;cursor: pointer" @click="addUpdate(row)">处理</span>
|
||||
<span style="color: #00A394;cursor: pointer" @click="changeVisible11(row)">详情</span>
|
||||
</lay-space>
|
||||
</template>
|
||||
</lay-table>
|
||||
</lay-card>
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
|
||||
<lay-layer v-model="addShow" title="投诉处理" :shade="true" :area="['800px', '80%']" :btn="addButton">
|
||||
<lay-container fluid="true" style="padding: 20px">
|
||||
<lay-form :model="addData" label-position="top">
|
||||
<lay-form-item required label="投诉内容:" prop="politics_content">
|
||||
<div>{{ info.politics_content }}</div>
|
||||
<div v-if="info.politics_images != '' && info.politics_images != null" style="margin-top: 10px">
|
||||
<a :href="info.politics_images" target="_blank"><img :src="info.politics_images" style="width: 100px;"></a>
|
||||
</div>
|
||||
</lay-form-item>
|
||||
<lay-form-item required label="处理结果:" prop="acceptance_content">
|
||||
<lay-textarea placeholder="请输入处理结果" v-model="addData.acceptance_content"></lay-textarea>
|
||||
</lay-form-item>
|
||||
</lay-form>
|
||||
</lay-container>
|
||||
</lay-layer>
|
||||
<!-- 添加详情弹窗 -->
|
||||
<lay-layer v-model="detailShow" title="投诉建议详情" :type="4" :shade="true" :area="['700px', '100%']">
|
||||
<div class="detail-container">
|
||||
<div class="detail-content">
|
||||
<div class="detail-item">
|
||||
<div class="detail-label">姓名:</div>
|
||||
<div class="detail-value">{{ detailInfo.user_name }}</div>
|
||||
</div>
|
||||
<div class="detail-item">
|
||||
<div class="detail-label">科室:</div>
|
||||
<div class="detail-value">{{ detailInfo.user_group_name }}</div>
|
||||
</div>
|
||||
<div class="detail-item">
|
||||
<div class="detail-label">投诉时间:</div>
|
||||
<div class="detail-value">{{ detailInfo.createtime }}</div>
|
||||
</div>
|
||||
<div class="detail-item">
|
||||
<div class="detail-label">处理状态:</div>
|
||||
<div class="detail-value">
|
||||
<span v-if="detailInfo.acceptance_status == 1" class="status-pending">待处理</span>
|
||||
<span v-if="detailInfo.acceptance_status == 2" class="status-replied">已回复</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail-item detail-item-full">
|
||||
<div class="detail-label">投诉内容:</div>
|
||||
<div class="detail-value">{{ detailInfo.politics_content }}</div>
|
||||
</div>
|
||||
<div class="detail-item detail-item-full" v-if="detailInfo.politics_images && detailInfo.politics_images !== ''">
|
||||
<div class="detail-label">投诉图片:</div>
|
||||
<div class="detail-value">
|
||||
<a :href="detailInfo.politics_images" target="_blank">
|
||||
<img :src="detailInfo.politics_images" class="complaint-image">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail-item detail-item-full" v-if="detailInfo.acceptance_status == 2">
|
||||
<div class="detail-label">处理结果:</div>
|
||||
<div class="detail-value">{{ detailInfo.acceptance_content }}</div>
|
||||
</div>
|
||||
<div class="detail-item" v-if="detailInfo.acceptance_status == 2">
|
||||
<div class="detail-label">处理时间:</div>
|
||||
<div class="detail-value">{{ detailInfo.acceptance_time }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</lay-layer>
|
||||
</lay-container>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive } from 'vue'
|
||||
import { layer } from '@layui/layui-vue'
|
||||
import { ref, reactive, onMounted } from 'vue'
|
||||
import {
|
||||
getPoliticsList,getPoliticsEdit
|
||||
} from "@/api/module/home";
|
||||
import { layer } from '@layui/layui-vue';
|
||||
|
||||
const addData = reactive({
|
||||
acceptance_content: '',
|
||||
id:0
|
||||
})
|
||||
|
||||
// 添加详情弹窗相关变量和方法
|
||||
const detailShow = ref(false)
|
||||
const detailInfo = ref({})
|
||||
const changeVisible11 = (row: any) => {
|
||||
detailInfo.value = row
|
||||
detailShow.value = true
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getList();
|
||||
})
|
||||
|
||||
const addShow = ref(false)
|
||||
const info = ref({});
|
||||
const addUpdate = (row: any) => {
|
||||
info.value = row;
|
||||
addData.id = row.id;
|
||||
addShow.value = true
|
||||
}
|
||||
const dataSource = ref([])
|
||||
const getList = () => {
|
||||
getPoliticsList({ size: page.limit, page: page.current, ...searchQuery.value }).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
dataSource.value = res.data.list;
|
||||
page.total = res.data.total;
|
||||
} else {
|
||||
dataSource.value = [];
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const searchQuery = ref({
|
||||
patientName: '',
|
||||
complaintType: '',
|
||||
status: '',
|
||||
department: ''
|
||||
group_id: '',
|
||||
})
|
||||
function toReset() {
|
||||
searchQuery.value = {
|
||||
patientName: '',
|
||||
complaintType: '',
|
||||
status: '',
|
||||
department: ''
|
||||
group_id: '',
|
||||
}
|
||||
}
|
||||
|
||||
@ -98,15 +174,14 @@ function toSearch() {
|
||||
const loading = ref(false)
|
||||
const page = reactive({ current: 1, limit: 10, total: 100 })
|
||||
const columns = ref([
|
||||
{ title: '编号', width: '90px', key: 'id' },
|
||||
{ title: '患者姓名', width: '120px', key: 'patientName', align: 'center' },
|
||||
{ title: '投诉类型', width: '120px', key: 'complaintType', align: 'center' },
|
||||
{ title: '投诉内容', width: '300px', key: 'content', align: 'center' },
|
||||
{ title: '科室', width: '120px', key: 'department', align: 'center' },
|
||||
{ title: '相关医生', width: '120px', key: 'doctorName', align: 'center' },
|
||||
{ title: '投诉时间', width: '160px', key: 'complaintTime', align: 'center' },
|
||||
{ title: '编号', width: '90px', key: 'id', align: 'center' },
|
||||
{ title: '姓名', width: '120px', key: 'user_name', align: 'center' },
|
||||
{ title: '投诉内容', width: '300px', key: 'politics_content', align: 'center' },
|
||||
{ title: '科室', width: '120px', key: 'user_group_name', align: 'center' },
|
||||
{ title: '投诉时间', width: '160px', key: 'createtime', align: 'center' },
|
||||
{ title: '处理状态', width: '120px', key: 'status', align: 'center', customSlot: 'status' },
|
||||
{ title: '处理结果', width: '300px', key: 'result', align: 'center' },
|
||||
{ title: '处理结果', width: '300px', key: 'acceptance_content', align: 'center' },
|
||||
{ title: '处理时间', width: '200px', key: 'acceptance_time', align: 'center' },
|
||||
{
|
||||
title: '操作',
|
||||
width: '150px',
|
||||
@ -116,56 +191,39 @@ const columns = ref([
|
||||
align: 'center'
|
||||
}
|
||||
])
|
||||
const change = (page: any) => {
|
||||
const change = (p: any) => {
|
||||
loading.value = true
|
||||
setTimeout(() => {
|
||||
dataSource.value = loadDataSource(page.current, page.limit)
|
||||
loading.value = false
|
||||
}, 1000)
|
||||
page.current = p.current;
|
||||
page.limit = p.limit;
|
||||
getList();
|
||||
}
|
||||
const dataSource = ref([
|
||||
const addButton = ref([
|
||||
{
|
||||
id: '1',
|
||||
patientName: '张三',
|
||||
complaintType: '服务态度',
|
||||
content: '医生服务态度不好,说话很不耐烦',
|
||||
department: '内科',
|
||||
doctorName: '李医生',
|
||||
complaintTime: '2024-03-20 09:34:56',
|
||||
status: '待处理',
|
||||
result: ''
|
||||
text: "确认",
|
||||
callback: async () => {
|
||||
console.log(addData);
|
||||
if (addData.acceptance_content == '') {
|
||||
layer.msg('处理结果不能为空!', { icon: 2 })
|
||||
return;
|
||||
}
|
||||
var res = await getPoliticsEdit(addData);
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
layer.msg('处理成功!', { icon: 1 })
|
||||
addShow.value = false;
|
||||
getList();
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
patientName: '李四',
|
||||
complaintType: '医疗质量',
|
||||
content: '开的药物对症状没有改善',
|
||||
department: '外科',
|
||||
doctorName: '王医生',
|
||||
complaintTime: '2024-03-19 15:24:31',
|
||||
status: '已处理',
|
||||
result: '已与患者沟通,重新进行诊断并调整用药方案'
|
||||
{
|
||||
text: "取消",
|
||||
callback: () => {
|
||||
addShow.value = false;
|
||||
}
|
||||
}
|
||||
])
|
||||
const loadDataSource = (page: number, pageSize: number) => {
|
||||
var response = []
|
||||
var startIndex = (page - 1) * pageSize + 1
|
||||
var endIndex = page * pageSize
|
||||
for (var i = startIndex; i <= endIndex; i++) {
|
||||
response.push({
|
||||
id: `${i}`,
|
||||
patientName: `患者${i}`,
|
||||
complaintType: '服务态度',
|
||||
content: '医生服务态度不好,说话很不耐烦',
|
||||
department: '内科',
|
||||
doctorName: '李医生',
|
||||
complaintTime: '2024-03-20 09:34:56',
|
||||
status: '待处理',
|
||||
result: ''
|
||||
})
|
||||
}
|
||||
return response
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@ -178,4 +236,70 @@ const loadDataSource = (page: number, pageSize: number) => {
|
||||
width: 98%;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.detail-header {
|
||||
padding: 15px 20px;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
}
|
||||
|
||||
.detail-header h3 {
|
||||
margin: 0;
|
||||
color: #333;
|
||||
font-size: 18px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.detail-content {
|
||||
padding: 20px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.detail-item {
|
||||
width: 50%;
|
||||
margin-bottom: 20px;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.detail-item-full {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.detail-label {
|
||||
width: 100px;
|
||||
color: #606266;
|
||||
font-weight: 500;
|
||||
text-align: right;
|
||||
padding-right: 12px;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.detail-value {
|
||||
flex: 1;
|
||||
color: #333;
|
||||
line-height: 24px;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.complaint-image {
|
||||
max-width: 300px;
|
||||
max-height: 300px;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.complaint-image:hover {
|
||||
transform: scale(1.02);
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.status-pending {
|
||||
color: #1E9FFF;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.status-replied {
|
||||
color: #FFB800;
|
||||
font-weight: 500;
|
||||
}
|
||||
</style>
|
@ -4,7 +4,7 @@
|
||||
<div style="padding: 10px">
|
||||
<span style="font-size: 18px;vertical-align: center;margin-right: 20px">登录日志列表</span>
|
||||
</div>
|
||||
<lay-table height="600px" @change="changePage" :page="page" size="lg" ref="tableRef" :columns="columns" :data-source="dataSource">
|
||||
<lay-table height="680px" @change="changePage" :page="page" size="lg" ref="tableRef" :columns="columns" :data-source="dataSource">
|
||||
<template v-slot:event_type="{ data }">
|
||||
<span :style="{ color: data.event_type === '登录' ? '#67C23A' : '#409EFF' }">
|
||||
{{ data.event_type }}
|
||||
@ -92,45 +92,9 @@ const columns = [
|
||||
]
|
||||
|
||||
onMounted(() => {
|
||||
getLoginLogs()
|
||||
getLogList()
|
||||
})
|
||||
|
||||
// 获取登录日志数据
|
||||
const getLoginLogs = () => {
|
||||
// 这里替换为实际的API调用
|
||||
// getLoginLogList().then((res) => {
|
||||
// if (res.code === 1) {
|
||||
// dataSource.value = res.data
|
||||
// } else {
|
||||
// layer.msg(res.msg, {icon: 2})
|
||||
// }
|
||||
// })
|
||||
|
||||
// 模拟数据
|
||||
dataSource.value = [
|
||||
{
|
||||
id: 1,
|
||||
user_id: 10,
|
||||
ip_code: '192.168.1.100',
|
||||
createtime: '2024-03-20 10:30:45',
|
||||
content: '用户登录成功',
|
||||
nickname: '张三',
|
||||
work_number: '111111',
|
||||
name: '大腿骨折2'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
department: '外科',
|
||||
record_time: '2024-03-20 09:15:22',
|
||||
login_name: 'user1',
|
||||
username: '张医生',
|
||||
ip_address: '192.168.1.101',
|
||||
event_type: '登出',
|
||||
event_content: '用户主动登出',
|
||||
device_info: 'Firefox 123.0 / MacOS'
|
||||
}
|
||||
]
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
|
Loading…
x
Reference in New Issue
Block a user