ソースを参照

Merge branch 'master' of https://172.16.32.165/lighter/vue-intergration-platform

xiaochan 2 年 前
コミット
ce5befba0f

+ 18 - 0
src/api/outpatient/comments.js

@@ -0,0 +1,18 @@
+import request from '../../utils/request'
+
+export function getComments(data) {
+    return request({
+        url: '/comments/getComments',
+        method: 'post',
+        data
+    })
+}
+
+export function updateCommentStatus(id, deleted) {
+    return request({
+        url: '/comments/updateCommentStatus',
+        method: 'get',
+        params: { id, deleted }
+    })
+}
+

+ 6 - 1
src/router/modules/dashboard.js

@@ -671,9 +671,14 @@ const route = [
             },
             {
                 path: 'complaintsAndSuggestions',
-                component: createNameComponent(() => import('@/views/clinic/ComplaintsAndSuggestions.vue')),
+                component: createNameComponent(() => import('@/views/clinic/interactive/ComplaintsAndSuggestions.vue')),
                 meta: {title: '服务号投诉'},
             },
+            {
+                path: 'comments',
+                component: createNameComponent(() => import('@/views/clinic/interactive/Comments.vue')),
+                meta: {title: '服务号患者评价'},
+            },
             {
                 path: 'transferInOfExpenses',
                 component: createNameComponent(() => import('@/views/clinic/TransferInOfExpenses.vue')),

+ 140 - 0
src/views/clinic/interactive/Comments.vue

@@ -0,0 +1,140 @@
+<template>
+  <page-layer>
+    <template #header>
+      <el-date-picker type="daterange" v-model="dateRange" style="width: 200px" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
+      <el-select v-model="inquiry.commentLevel" :clearable="true" style="width: 90px" placeholder="评价星级">
+        <el-option v-for="item in commentsLevels" :value="item.value" :label="item.label"></el-option>
+      </el-select>
+      <el-select v-model="inquiry.deleted" :clearable="true" style="width: 80px" placeholder="状态">
+        <el-option label="全部" value=""></el-option>
+        <el-option label="未删除" :value="0"></el-option>
+        <el-option label="已删除" :value="1"></el-option>
+      </el-select>
+      <el-input v-model="inquiry.doctorName" placeholder="医生姓名" clearable style="width: 90px"></el-input>
+      <el-divider direction="vertical"></el-divider>
+      <el-button icon="Search" type="primary" @click="handleClickSearch">检索</el-button>
+    </template>
+    <template #main>
+      <el-table :data="comments.list" stripe :height="tableHeight" highlight-current-row>
+        <el-table-column prop="doctorCode" label="医生编码" width="80"></el-table-column>
+        <el-table-column prop="doctorCodeRs" label="医生工号" width="80"></el-table-column>
+        <el-table-column prop="doctorName" label="医生姓名" width="80"></el-table-column>
+        <el-table-column prop="department" label="医生科室" width="120"></el-table-column>
+        <el-table-column label="评价星级" width="140">
+          <template #default="scope">
+            <el-rate disabled size="small" v-model="scope.row.commentLevel" :colors="levelColors" />
+          </template>
+        </el-table-column>
+        <el-table-column label="评价内容">
+          <template #default="scope">
+            <div class="ellipsis-text" :title="scope.row.commentContent">
+              {{ scope.row.commentContent }}
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="commentTime" label="评价时间" width="80"></el-table-column>
+        <el-table-column prop="patientId" label="患者ID" width="80"></el-table-column>
+        <el-table-column prop="patientName" label="患者姓名" width="80"></el-table-column>
+        <el-table-column prop="patPhoneNo" label="患者电话" width="90"></el-table-column>
+        <el-table-column label="评价状态" width="80">
+          <template #default="scope">
+            {{ scope.row.deleted === 0 ? '未删除' : '已删除' }}
+          </template>
+        </el-table-column>
+        <el-table-column label="操作" width="80">
+          <template #default="scope">
+            <el-button v-if="scope.row.deleted === 0" icon="Delete" type="danger" @click="changeCommentStatus(scope.row, 1)">删除</el-button>
+            <el-button v-else icon="Refresh" type="success" @click="changeCommentStatus(scope.row, 0)">恢复</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <el-pagination
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :current-page="inquiry.pageNum"
+          :page-sizes="[15, 30, 45, 70, 100]"
+          :page-size="inquiry.pageSize"
+          layout="total, sizes, prev, pager, next"
+          :total="comments.totalSize"
+          style="margin-top: 5px"
+      ></el-pagination>
+    </template>
+  </page-layer>
+</template>
+<script setup>
+import PageLayer from "@/layout/PageLayer.vue";
+import {getComments,updateCommentStatus} from "@/api/outpatient/comments";
+import {getDateRangeFormatDate} from "@/utils/date";
+import store from "@/store";
+import {ElMessage} from "element-plus";
+
+const windowSize = store.state.app.windowSize
+const tableHeight = windowSize.h - 55
+
+const commentsLevels = [
+  { label: '5星最好评', value: 5 },
+  { label: '4星好评', value: 4 },
+  { label: '3星中评', value: 3 },
+  { label: '2星差评', value: 2 },
+  { label: '1星最差评', value: 1 },
+]
+
+const levelColors = ref(['#99A9BF', '#F7BA2A', '#FF9900'])
+
+const dateRange = ref([])
+
+const formatDateRange = () => {
+  if (dateRange.value.length === 2) {
+    const format = getDateRangeFormatDate(dateRange.value)
+    inquiry.startTime = format.startTime
+    inquiry.endTime = format.endTime
+  }
+}
+
+const inquiry = reactive({
+  startTime: null,
+  endTime: null,
+  commentLevel: null,
+  doctorName: null,
+  deleted: null,
+  pageNum: 1,
+  pageSize: 15,
+})
+
+const comments = reactive({
+  totalSize: 0,
+  list: []
+})
+const handleClickSearch = () => {
+  formatDateRange()
+  getComments(inquiry).then(res => {
+    comments.totalSize = res.totalSize
+    comments.list = res.list
+  }).catch(() => {
+    comments.totalSize = 0
+    comments.list = []
+  })
+}
+
+const handleSizeChange = (val) => {
+  inquiry.pageSize = val
+  handleClickSearch()
+}
+const handleCurrentChange = (val) => {
+  inquiry.pageNum = val
+  handleClickSearch()
+}
+
+const changeCommentStatus = (row, deleted) => {
+  updateCommentStatus(row.id, deleted).then(res => {
+    row.deleted = deleted
+    ElMessage({
+      message: res,
+      type: 'success',
+      showClose: true,
+      duration: 2000
+    })
+  })
+}
+
+</script>

+ 0 - 1
src/views/clinic/ComplaintsAndSuggestions.vue → src/views/clinic/interactive/ComplaintsAndSuggestions.vue

@@ -68,7 +68,6 @@ import store from "@/store";
 import {ref} from "@vue/reactivity";
 import {getDateRangeFormatDate, getOneMonthOffset} from "@/utils/date";
 import {ElMessage, ElMessageBox} from "element-plus";
-import {updateDeleted} from "@/api/adverse-event";
 
 const windowSize = store.state.app.windowSize
 const tableHeight = windowSize.h - 55

+ 0 - 8
src/views/medical-insurance/inpatient/AdmRegistration.vue

@@ -294,14 +294,6 @@
     <el-tag>{{ injuryMode ? '工伤信息' : '参保信息' }}</el-tag>
     <div v-if="injuryMode">
       <el-table :data="injuryinfo" height="180" stripe @row-click="handleClickInjuryinfo">
-<!--        <el-table-column label="电脑号" prop="indiId"></el-table-column>-->
-<!--        <el-table-column label="工伤个人业务序号" prop="serialPers"></el-table-column>-->
-<!--        <el-table-column label="工伤认定号" prop="identifyCode"></el-table-column>-->
-<!--        <el-table-column label="认定申请时间" prop="identyDate"></el-table-column>-->
-<!--        <el-table-column label="受伤部位" prop="injuryPart"></el-table-column>-->
-<!--        <el-table-column label="报告时间" prop="reportDate"></el-table-column>-->
-<!--        <el-table-column label="事故发生时间" prop="accidentDate"></el-table-column>-->
-<!--        <el-table-column label="事故详细情况" prop="accidentDetail"></el-table-column>-->
         <el-table-column label="证件号码" prop="aac002"></el-table-column>
         <el-table-column label="姓名" prop="aac003"></el-table-column>
         <el-table-column label="单位名称" prop="aab004"></el-table-column>