Explorar el Código

feat:消息推送

lsw hace 8 meses
padre
commit
225eafdec9

+ 11 - 8
admin-ui/src/views/work/follow/record/index.vue

@@ -1,6 +1,9 @@
 <template>
 <template>
   <div class="app-container">
   <div class="app-container">
     <el-form :model="queryParams" ref="queryForm" :inline="true" @submit.native.prevent>
     <el-form :model="queryParams" ref="queryForm" :inline="true" @submit.native.prevent>
+      <el-form-item label="科室" prop="deptId">
+        <dtree v-model="queryParams.deptId" @handleQuery="handleQuery" :tree="false"></dtree>
+      </el-form-item>
       <el-form-item label="患者姓名" prop="patientName">
       <el-form-item label="患者姓名" prop="patientName">
         <el-input v-model="queryParams.patientName" placeholder="请输入患者姓名" @keyup.enter.native="handleQuery" clearable class="inp" />
         <el-input v-model="queryParams.patientName" placeholder="请输入患者姓名" @keyup.enter.native="handleQuery" clearable class="inp" />
       </el-form-item>
       </el-form-item>
@@ -16,8 +19,8 @@
 
 
     <el-table :data="response.rows" border @selection-change="selects" height="calc(100vh - 270px)">
     <el-table :data="response.rows" border @selection-change="selects" height="calc(100vh - 270px)">
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column :label="queryParams.type == 0 ? '提醒标题' : '模板名称'" align="center" prop="templateName" />
-      <el-table-column label="患者姓名" align="center" prop="patientName" />
+      <el-table-column :label="queryParams.type == 0 ? '提醒标题' : '模板名称'" align="left" prop="templateName" />
+      <el-table-column label="患者姓名" align="center" prop="patientName" width="160" />
       <el-table-column label="状态" align="center" prop="state" width="140">
       <el-table-column label="状态" align="center" prop="state" width="140">
         <template slot-scope="scope">
         <template slot-scope="scope">
           <div v-if="queryParams.type == 0">
           <div v-if="queryParams.type == 0">
@@ -29,12 +32,12 @@
           </div>
           </div>
         </template>
         </template>
       </el-table-column>
       </el-table-column>
-      <el-table-column label="创建人" align="center" prop="createBy" width="130" />
+      <el-table-column label="创建人" align="center" prop="createBy" width="160" />
       <el-table-column label="创建时间" align="center" prop="createTime" width="160" />
       <el-table-column label="创建时间" align="center" prop="createTime" width="160" />
       <el-table-column label="所属科室" align="center" prop="deptName" width="160" />
       <el-table-column label="所属科室" align="center" prop="deptName" width="160" />
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+      <el-table-column label="操作" align="center" width="180">
         <template slot-scope="scope">
         <template slot-scope="scope">
-          <el-button size="mini" type="text" icon="el-icon-edit" @click="op('detail', scope.row)" v-hasPermi="['work:record:list']">查看</el-button>
+          <el-button size="mini" type="text" icon="el-icon-view" @click="op('detail', scope.row)" v-hasPermi="['work:record:list']">查看</el-button>
           <el-button size="mini" type="text" icon="el-icon-edit" @click="op('edit', scope.row)" v-hasPermi="['work:knowledge:edit']">编辑</el-button>
           <el-button size="mini" type="text" icon="el-icon-edit" @click="op('edit', scope.row)" v-hasPermi="['work:knowledge:edit']">编辑</el-button>
           <el-button size="mini" type="text" icon="el-icon-delete" @click="del(scope.row)" v-hasPermi="['work:record:remove']">删除</el-button>
           <el-button size="mini" type="text" icon="el-icon-delete" @click="del(scope.row)" v-hasPermi="['work:record:remove']">删除</el-button>
         </template>
         </template>
@@ -87,13 +90,13 @@ export default {
     },
     },
     op(tag, row) {
     op(tag, row) {
       if (tag == 'add') {
       if (tag == 'add') {
-        this.iframe({ obj: edit, param: { type: this.queryParams.type }, title: this.queryParams.type == 0 ? '新增提醒' : '新增回访', width: '55%', height: '75%' });
+        this.iframe({ obj: edit, param: { type: this.queryParams.type }, title: this.queryParams.type == 0 ? '新增提醒' : '新增回访', width: '55%', height: '77%' });
       }
       }
       if (tag == 'edit') {
       if (tag == 'edit') {
-        this.iframe({ obj: edit, param: { id: row.id, type: this.queryParams.type, patientName: row.patientName }, title: '编辑', width: '55%', height: '75%' });
+        this.iframe({ obj: edit, param: { id: row.id, type: this.queryParams.type, patientName: row.patientName }, title: '编辑', width: '55%', height: '77%' });
       }
       }
       if (tag == 'detail') {
       if (tag == 'detail') {
-        this.iframe({ obj: edit, param: { id: row.id, detail: true, patientName: row.patientName }, title: '查看详情', width: '55%', height: '75%' });
+        this.iframe({ obj: edit, param: { id: row.id, detail: true, patientName: row.patientName }, title: '查看详情', width: '55%', height: '77%' });
       }
       }
     },
     },
     del(row) {
     del(row) {

+ 4 - 1
admin-ui/src/views/work/follow/template/index.vue

@@ -8,7 +8,10 @@
         <el-input v-model="queryParams.title" placeholder="请输入标题" @keyup.enter.native="handleQuery" clearable class="inp" />
         <el-input v-model="queryParams.title" placeholder="请输入标题" @keyup.enter.native="handleQuery" clearable class="inp" />
       </el-form-item>
       </el-form-item>
       <el-form-item label="状态" prop="state">
       <el-form-item label="状态" prop="state">
-        <el-input v-model="queryParams.state" placeholder="请输入状态" @keyup.enter.native="handleQuery" clearable class="inp" />
+        <el-select v-model="queryParams.state" placeholder="请选择状态" clearable class="se">
+          <el-option value="0" label="启用"></el-option>
+          <el-option value="1" label="停用"></el-option>
+        </el-select>
       </el-form-item>
       </el-form-item>
       <el-form-item>
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
         <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>

+ 2 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/work/service/impl/FollowRecordServiceImpl.java

@@ -1,6 +1,7 @@
 package com.ruoyi.web.work.service.impl;
 package com.ruoyi.web.work.service.impl;
 
 
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ruoyi.common.annotation.DataScope;
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.exception.ServiceException;
 import com.ruoyi.common.exception.ServiceException;
 import com.ruoyi.web.work.api.util.AppUtil;
 import com.ruoyi.web.work.api.util.AppUtil;
@@ -25,6 +26,7 @@ public class FollowRecordServiceImpl extends ServiceImpl<FollowRecordMapper, Fol
     @Autowired
     @Autowired
     private FollowRecordMapper followRecordMapper;
     private FollowRecordMapper followRecordMapper;
 
 
+    @DataScope(deptAlias = "k")
     @Override
     @Override
     public List<FollowRecord> selectList(FollowRecord followRecord) {
     public List<FollowRecord> selectList(FollowRecord followRecord) {
         return followRecordMapper.selectList(followRecord);
         return followRecordMapper.selectList(followRecord);

+ 3 - 0
ruoyi-admin/src/main/resources/mapper/work/FollowRecordMapper.xml

@@ -23,6 +23,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="userId != null "> and k.user_id = #{userId}</if>
             <if test="userId != null "> and k.user_id = #{userId}</if>
             <if test="state != null "> and k.state = #{state}</if>
             <if test="state != null "> and k.state = #{state}</if>
             <if test="deptId != null "> and k.dept_id = #{deptId}</if>
             <if test="deptId != null "> and k.dept_id = #{deptId}</if>
+            <if test="deptId != null and deptId != 0">AND (k.dept_id = #{deptId} OR k.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId}, ancestors) ))</if>
+            <!-- 数据范围过滤 -->
+            ${params.dataScope}
     </select>
     </select>
 
 
     <select id="selectAppList" resultType="com.ruoyi.web.work.domain.FollowRecord">
     <select id="selectAppList" resultType="com.ruoyi.web.work.domain.FollowRecord">