Procházet zdrojové kódy

Merge remote-tracking branch 'origin/dev1.0' into dev1.0

吴旭宸 před 10 měsíci
rodič
revize
fb3255bb76

+ 1 - 0
admin-ui/src/assets/styles/extend.scss

@@ -390,5 +390,6 @@
     width: 100%;
     background-color: #4581fb;
     border: 0px;
+    margin-top: 10px;
   }
 }

+ 4 - 7
admin-ui/src/views/work/patient/index.vue

@@ -38,11 +38,11 @@
           <el-table-column label="出院时间" align="center" prop="dischargeTime" />
           <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
             <template slot-scope="scope">
-              <el-button size="mini" type="text" icon="el-icon-search" @click="op('search',scope.row)" v-hasPermi="['work:dg:edit']">查看</el-button>
-                        <el-button size="mini" type="text" icon="el-icon-search" @click="()=>{checkWindowShow = true; currentPatientInfo = {id: scope.row.patId, name: scope.row.name}}">
+              <el-button size="mini" type="text" icon="el-icon-search" @click="op('search',scope.row)" v-hasPermi="['work:dg:edit']">查看就诊信息</el-button>
+              <el-button size="mini" type="text" icon="el-icon-search" @click="()=>{checkWindowShow = true; currentPatientInfo = {id: scope.row.patId, name: scope.row.name}}">
                 查看检查项目
               </el-button>
-<!--              检测项目信息弹窗-->
+          <!-- 检测项目信息弹窗 -->
               <patient-check :check-window-show.sync="checkWindowShow" :patient-info="currentPatientInfo" />
             </template>
           </el-table-column>
@@ -83,7 +83,7 @@ export default {
         patientName:undefined,
         departmentName:undefined,
       },
-            /**
+      /**
        * 控制检测项目信息弹窗是否显示
        * @type {boolean} - 取值true显示弹窗
        */
@@ -99,8 +99,6 @@ export default {
       }
     };
   },
-  watch: {
-  },
   created() {
     this.getDepartment();
   },
@@ -131,7 +129,6 @@ export default {
         url:'/work/visit/department'
       }).then((response) => {
         this.deptOptions = response.rows;
-        console.log(this.deptOptions)
       });
     },
     handleNodeClick(department){

+ 47 - 20
admin-ui/src/views/work/patient/search.vue

@@ -4,7 +4,7 @@
       <el-col :span="5">
         <!-- 左边的导航菜单 -->
         <div class="left-body">
-          <el-menu default-active="1">
+          <el-menu :default-active="activeNow" @open="activeIndex">
             <el-menu-item index="1" @click="activePatient(1)">
               <i class="el-icon-user"></i>
               <span>患者基本信息/亲属</span>
@@ -22,7 +22,7 @@
                   <template slot="title">
                     <span>{{month}}月</span>
                   </template>
-                  <el-menu-item v-for="item in days" @click="getCard(item.id); activePatient(2); getDgList()" :key="item.id" :index="item.id">
+                  <el-menu-item v-for="item in days" @click="getCard(item.id); activePatient(2); getDgList()" :key="item.id" :index="item.id.toString()">
                     {{year}}年{{month}}月{{item.day}}日
                   </el-menu-item>
                 </el-submenu>
@@ -39,25 +39,25 @@
             <!-- 患者基本信息 -->
             <div class="patient-info">
               <el-descriptions  style="width: 69vw; margin-top: 10px" title="患者信息" :column="3" border>
-                <el-descriptions-item label="患者标识符">{{patientInfo.patientCode}}</el-descriptions-item>
-                <el-descriptions-item label="就诊卡号">{{patientInfo.cardNumber}}</el-descriptions-item>
-                <el-descriptions-item label="姓名">{{patientInfo.name}}</el-descriptions-item>
-                <el-descriptions-item label="性别">
+                <el-descriptions-item label="患者标识符" v-if="patientInfo">{{patientInfo.patientCode}}</el-descriptions-item>
+                <el-descriptions-item label="就诊卡号" v-if="patientInfo">{{patientInfo.cardNumber}}</el-descriptions-item>
+                <el-descriptions-item label="姓名" v-if="patientInfo">{{patientInfo.name}}</el-descriptions-item>
+                <el-descriptions-item label="性别" v-if="patientInfo">
                   <dict-tag :options="dict.type.patient_sex" :value="patientInfo.sex"/>
                 </el-descriptions-item>
-                <el-descriptions-item label="身份证号" prop="sfzh">{{patientInfo.sfzh}}</el-descriptions-item>
-                <el-descriptions-item label="出生时间" prop="birthDate">{{patientInfo.birthDate}}</el-descriptions-item>
-                <el-descriptions-item label="居住地址" prop="address">{{patientInfo.address}}</el-descriptions-item>
-                <el-descriptions-item label="联系电话" prop="phone">{{patientInfo.phone}}</el-descriptions-item>
-                <el-descriptions-item label="婚姻状况" prop="marital">
+                <el-descriptions-item label="身份证号" v-if="patientInfo">{{patientInfo.sfzh}}</el-descriptions-item>
+                <el-descriptions-item label="出生时间" v-if="patientInfo">{{patientInfo.birthDate}}</el-descriptions-item>
+                <el-descriptions-item label="居住地址" v-if="patientInfo">{{patientInfo.address}}</el-descriptions-item>
+                <el-descriptions-item label="联系电话" v-if="patientInfo">{{patientInfo.phone}}</el-descriptions-item>
+                <el-descriptions-item label="婚姻状况" v-if="patientInfo">
                   <dict-tag :options="dict.type.patient_marital" :value="patientInfo.marital" />
                 </el-descriptions-item>
-                <el-descriptions-item label="民族" prop="nation">{{patientInfo.nation}}</el-descriptions-item>
-                <el-descriptions-item label="职业" prop="career">{{patientInfo.career}}</el-descriptions-item>
-                <el-descriptions-item label="国籍" prop="nationality">{{patientInfo.nationality}}</el-descriptions-item>
-                <el-descriptions-item label="病历号" prop="blh">{{patientInfo.blh}}</el-descriptions-item>
-                <el-descriptions-item label="病人卡号" prop="brkh">{{patientInfo.brkh}}</el-descriptions-item>
-                <el-descriptions-item label="婴儿序号" prop="yexh">{{patientInfo.yexh}}</el-descriptions-item>
+                <el-descriptions-item label="民族" v-if="patientInfo">{{patientInfo.nation}}</el-descriptions-item>
+                <el-descriptions-item label="职业" v-if="patientInfo">{{patientInfo.career}}</el-descriptions-item>
+                <el-descriptions-item label="国籍" v-if="patientInfo">{{patientInfo.nationality}}</el-descriptions-item>
+                <el-descriptions-item label="病历号" v-if="patientInfo">{{patientInfo.blh}}</el-descriptions-item>
+                <el-descriptions-item label="病人卡号" v-if="patientInfo">{{patientInfo.brkh}}</el-descriptions-item>
+                <el-descriptions-item label="婴儿序号" v-if="patientInfo">{{patientInfo.yexh}}</el-descriptions-item>
               </el-descriptions>
             </div>
             <!-- 患者亲属 -->
@@ -128,9 +128,15 @@
 
 <script>
 export default {
+  computed: {
+    index() {
+      return index
+    }
+  },
   dicts: ['patient_category','diagnostic_type', 'diagnostic_category_code','hospital_status','discharge_method','patient_sex','patient_marital'],
   data(){
     return{
+      activeNow:'1',
       //groupDates的变量
       year:undefined,
       month:undefined,
@@ -167,15 +173,33 @@ export default {
   watch:{
   },
   created() {
+    this.getNowDg();
     this.getTime();
     this.getPatient();
-    this.activePatient(1);
     this.getNkList();
   },
   methods:{
+    activeIndex(){
+      this.activeNow = this.pvList.id.toString()
+      this.active = 2
+      this.queryParams.visitId = this.pvList.id;
+      this.getDgList()
+    },
+    /** 获取当前选中的就诊记录 */
+    getNowDg(){
+      this.get({
+        url:'work/visit/list',
+        data:{
+          cardId:this.param.cardId
+        }
+      }).then((response)=>{
+        this.pvList = response.rows[0];
+      })
+    },
     activePatient(sign) {
       if (sign === 1) {
         this.active = sign;
+        this.activeNow = '1';
       }
       if (sign === 2) {
         this.active = sign;
@@ -183,6 +207,9 @@ export default {
     },
     /** 查询某一次的就诊信息 */
     getCard(id){
+      if(id === this.pvList.id){
+        return;
+      }
       this.queryParams.visitId = id;
       this.get({
         url:'/work/visit/list',
@@ -191,6 +218,8 @@ export default {
         }
       }).then((response)=>{
         this.pvList = response.rows[0];
+        this.activeNow = this.pvList.id.toString();
+        this.getDgList();
       })
     },
     /** 查询某科室某个病人的就诊记录 */
@@ -202,9 +231,7 @@ export default {
           department:this.param.department
         }
       }).then( (response) => {
-        console.log(typeof response.rows[0].id)
         this.timeList = response.rows;
-        console.log(this.timeList)
         this.groupDates(this.timeList);
       })
     },

+ 1 - 1
app/App.vue

@@ -30,7 +30,7 @@ button::after {
 /**挂载iconfont字体图标*/
 @font-face {
 	font-family: 'iconfont';
-	src: url('https://at.alicdn.com/t/c/font_4620946_yjys6ggyf8q.ttf?t=1722229086081') format('truetype');
+	src: url('https://at.alicdn.com/t/c/font_4620946_77k3uh0ak7p.ttf?t=1722848437021') format('truetype');
 	/* src: url('~@/static/font/iconfont.ttf') format('truetype'); */
 }
 .icon {

+ 25 - 0
app/common/common.scss

@@ -146,6 +146,7 @@
 		color: $font-c;
 		overflow: hidden;
 		border-bottom: 1px solid #f0f2f7;
+		font-size: 15px;
 		.ic {
 			display: block;
 			float: left;
@@ -352,3 +353,27 @@
 		margin-top: -5px;
 	}
 }
+.message-bubble-received {
+  background: white;
+  border-radius: 10px;
+  padding: 13px;
+  width: 85%;
+  word-wrap: break-word;
+  position: relative;
+  margin-left: 10px;
+  float: left;
+  clear: both;
+  font-size: 14px;
+  color: #262626;
+  margin-bottom: 15px;
+  &::before {
+    content: '';
+    position: absolute;
+    width: 0;
+    height: 0;
+    border-style: solid;
+    border-width: 0 10px 10px 10px;
+    border-color: transparent transparent white transparent;
+    left: -10px;
+  }
+}

+ 8 - 1
app/pages.json

@@ -44,7 +44,7 @@
 		{
 			"path": "pages/follow/detail",
 			"style": {
-				"navigationBarTitleText": "访详情"
+				"navigationBarTitleText": "访详情"
 			}
 		},
 		{
@@ -130,6 +130,13 @@
 			"style": {
 				"navigationBarTitleText": "就诊人信息"
 			}
+		},
+		{
+			"path" : "pages/follow/remind",
+			"style" : 
+			{
+				"navigationBarTitleText" : "复诊提醒"
+			}
 		}
 	],
 	"tabBar": {

+ 4 - 3
app/pages/follow/detail.vue

@@ -10,9 +10,9 @@
 				<text class="dx">({{ item.input }})</text>
 			</view>
 			<view class="mts">
-				<input v-if="item.input == '填空'" v-model="item.s_value" placeholder="请输入" :disabled="item.state != 0" />
-				<input v-if="item.input == '数字'" type="number" v-model="item.s_value" placeholder="请输入" :disabled="item.state != 0" />
-				<textarea v-if="item.input == '多行文本'" v-model="item.s_value" placeholder="请输入" :disabled="item.state != 0" />
+				<input v-if="item.input == '填空'" v-model="item.s_value" placeholder="请输入" :disabled="look" />
+				<input v-if="item.input == '数字'" type="number" v-model="item.s_value" placeholder="请输入" :disabled="look" />
+				<textarea v-if="item.input == '多行文本'" v-model="item.s_value" placeholder="请输入" :disabled="look" />
 				<view class="ops" v-if="item.input == '单选' || item.input == '多选' || item.input == '判断'">
 					<view v-for="(op, i) in item.selects" :key="op.name">
 						<view class="op" :class="{ active: op.check }" @click="check(item, op)">{{ op.name }}</view>
@@ -38,6 +38,7 @@ export default {
 			url: '/app/follow/detail/' + e.id,
 			success: (res) => {
 				this.item = res.data.data;
+				this.look = this.item.state != 0 ? true : false;
 				this.item.op = JSON.parse(this.item.op);
 			}
 		});

+ 19 - 26
app/pages/follow/index.vue

@@ -4,15 +4,15 @@
 			<u-tabs :list="tab" @click="click"></u-tabs>
 		</view>
 		<view class="list">
-			<view class="item" v-for="(item, index) in list" :key="index" @click="go('/pages/follow/detail?id=' + item.id)">
-				<view class="title omit">
-					<text class="icon" v-if="item.top === 1">&#xe61f;</text>
-					<text>{{ item.templateName }}</text>
-				</view>
-				<view class="desc">
-					<text>{{ item.state == 0 ? '待回访' : '已回访' }}</text>
-					<text>{{ item.createTime }}</text>
-				</view>
+			<view class="message-bubble-received" v-for="(item, index) in list" :key="index" @click="go('/pages/follow/detail?id=' + item.id)">
+				<view class="title">{{ item.templateName }}</view>
+				<view class="desc">尊敬的患者,为了更好的改善服务,我们向你发起了一个回访并且希望您认真填写。</view>
+				<view class="desc">{{ item.createTime }}</view>
+				<button class="btn" :style="{ backgroundColor: item.state == 0 ? '#4581fb' : '#4CAF50' }">
+					<text class="icon" v-if="item.state == 0">&#xe749;</text>
+					<text class="icon" v-else>&#xe6c6;</text>
+					<text>{{ item.state == 0 ? '去填写' : '已填写' }}</text>
+				</button>
 			</view>
 			<view class="loading" v-if="loadMore"><u-loadmore :status="loadMore ? 'loading' : 'nomore'" /></view>
 			<u-empty v-if="!loadMore && list.length == 0"></u-empty>
@@ -30,7 +30,7 @@ export default {
 				{ name: '已回访', state: 1 }
 			],
 			list: [],
-			param: { pageNum: 1, pageSize: 10 },
+			param: { pageNum: 1, pageSize: 10, type: 1 },
 			loadMore: true
 		};
 	},
@@ -43,7 +43,7 @@ export default {
 	methods: {
 		click(e) {
 			this.current = e.index;
-			this.param.type = e.dictValue;
+			this.param.state = e.state;
 			this.refresh();
 		},
 		getData() {
@@ -88,26 +88,19 @@ export default {
 <style lang="scss">
 .list {
 	padding: 10px 12px;
-	.item {
-		border-radius: 5px;
-		padding: 13px 12px 13px 12px;
-		margin-bottom: 10px;
-		overflow: hidden;
-		box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
-		background-color: white;
+	.message-bubble-received {
 		.title {
-			font-size: 15px;
+			font-size: 16px;
 			font-weight: bold;
-			.icon {
-				color: orangered;
-				padding-right: 3px;
-			}
 		}
 		.desc {
-			font-size: 14px;
+			font-size: 13px;
 			padding-top: 10px;
-			text {
-				padding-right: 30px;
+			color: $font-c;
+		}
+		.btn {
+			.icon {
+				padding-right: 3px;
 			}
 		}
 	}

+ 85 - 0
app/pages/follow/remind.vue

@@ -0,0 +1,85 @@
+<template>
+	<view>
+		<view class="list">
+			<view class="message-bubble-received" v-for="(item, index) in list" :key="index">
+				<view class="title">
+					<text class="icon">&#xe813;</text>
+					<text>{{ item.templateName }}</text>
+				</view>
+				<view class="desc">{{ item.op }}</view>
+				<view class="desc">{{ item.createTime }}</view>
+			</view>
+			<view class="loading" v-if="loadMore"><u-loadmore :status="loadMore ? 'loading' : 'nomore'" /></view>
+			<u-empty v-if="!loadMore && list.length == 0"></u-empty>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			list: [],
+			param: { pageNum: 1, pageSize: 10, type: 0 },
+			loadMore: true
+		};
+	},
+	onLoad(e) {
+		this.getData();
+	},
+	methods: {
+		getData() {
+			this.http.request({
+				url: '/app/follow/list',
+				data: this.param,
+				loading: 'false',
+				success: (res) => {
+					this.loadMore = res.data.pages > this.param.pageNum ? true : false;
+					this.list.push(...res.data.rows);
+				}
+			});
+		},
+		//刷新数据
+		refresh() {
+			this.loadMore = true;
+			this.param.pageNum = 1;
+			this.list = [];
+			this.getData();
+		}
+	},
+	//下拉刷新
+	onPullDownRefresh() {
+		setTimeout(() => {
+			this.refresh();
+			uni.stopPullDownRefresh();
+		}, 1000);
+	},
+	//上拉加载
+	onReachBottom() {
+		if (this.loadMore) {
+			this.param.pageNum++;
+			this.getData();
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+.list {
+	padding: 10px 12px;
+	.message-bubble-received {
+		.title {
+			font-size: 16px;
+			font-weight: bold;
+			.icon {
+				padding-right: 3px;
+			}
+		}
+		.desc {
+			font-size: 13px;
+			padding-top: 10px;
+			color: $font-c;
+		}
+	}
+}
+</style>

+ 8 - 8
app/pages/index/index.vue

@@ -61,7 +61,7 @@
 			<u-scroll-list :indicator="true" indicatorColor="#e0e0e0">
 				<view class="doctor">
 					<view class="item" v-for="(item, index) in doctorList" :key="index" @click="go('/pages/news/detail?id=' + item.id)">
-						<image :src="ip + item.avatar" mode="scaleToFill" class="avatar"></image>
+						<image :src="item.avatar" mode="scaleToFill" class="avatar"></image>
 						<view class="title">{{ item.name }}</view>
 					</view>
 				</view>
@@ -99,13 +99,13 @@ export default {
 			ip: this.http.ip,
 			noticeList: ['医院开通线上小程序啦,快来体验吧', '首次使用如何绑定就诊卡'],
 			doctorList: [
-				{ name: '梁红斌', avatar: '/profile/upload/2024/07/23/blob_20240723162841A002.jpeg' },
-				{ name: '戴浩华', avatar: '/profile/upload/2024/07/23/blob_20240723153318A001.jpeg' },
-				{ name: '罗肇林', avatar: '/profile/upload/2024/07/23/blob_20240723145549A005.jpeg' },
-				{ name: '覃勇军', avatar: '/profile/upload/2024/07/23/blob_20240723144505A002.jpeg' },
-				{ name: '阿松大', avatar: '/profile/upload/2024/07/23/blob_20240723153318A001.jpeg' },
-				{ name: '阿松大', avatar: '/profile/upload/2024/07/23/blob_20240723153318A001.jpeg' },
-				{ name: '阿松大', avatar: '/profile/upload/2024/07/23/blob_20240723153318A001.jpeg' }
+				{ name: '梁红斌', avatar: 'https://chenglantimes.com/prod-api/profile/upload/2024/08/05/1722848767545.jpg' },
+				{ name: '梁红斌', avatar: 'https://chenglantimes.com/prod-api/profile/upload/2024/08/05/1722848767545.jpg' },
+				{ name: '梁红斌', avatar: 'https://chenglantimes.com/prod-api/profile/upload/2024/08/05/1722848767545.jpg' },
+				{ name: '梁红斌', avatar: 'https://chenglantimes.com/prod-api/profile/upload/2024/08/05/1722848767545.jpg' },
+				{ name: '梁红斌', avatar: 'https://chenglantimes.com/prod-api/profile/upload/2024/08/05/1722848767545.jpg' },
+				{ name: '梁红斌', avatar: 'https://chenglantimes.com/prod-api/profile/upload/2024/08/05/1722848767545.jpg' },
+				{ name: '梁红斌', avatar: 'https://chenglantimes.com/prod-api/profile/upload/2024/08/05/1722848767545.jpg' }
 			],
 			knowledgeList: []
 		};

+ 15 - 10
app/pages/user/index.vue

@@ -16,9 +16,9 @@
 			<view class="icon edit">&#xe62b;</view>
 		</view>
 		<view class="cmd">
-			<view class="s_item" @click="go('/pages/follow/index')">
-				<text class="icon ic" style="color: #607d8b">&#xe60b;</text>
-				<text class="title">我的复诊</text>
+			<view class="s_item" @click="go('/pages/follow/remind')">
+				<text class="icon ic" style="color: #03a9f4">&#xe6a3;</text>
+				<text class="title">复诊提醒</text>
 				<text class="icon arrow">&#xe62b;</text>
 			</view>
 			<view class="s_item" @click="go('/pages/follow/index')">
@@ -27,25 +27,25 @@
 				<text class="icon arrow">&#xe62b;</text>
 			</view>
 			<view class="s_item" @click="go('/pages/visit/index')">
-				<text class="icon ic" style="color: #03a9f4">&#xe614;</text>
+				<text class="icon ic" style="color: #03a9f4">&#xe685;</text>
 				<text class="title">就诊记录</text>
 				<text class="icon arrow">&#xe62b;</text>
 			</view>
 			<view class="s_item" @click="go('/pages/detection/index')">
-				<text class="icon ic" style="color: #607d8b">&#xe615;</text>
+				<text class="icon ic" style="color: #ff9800">&#xe63a;</text>
 				<text class="title">检测报告</text>
 				<text class="icon arrow">&#xe62b;</text>
 			</view>
-			<view class="s_item" @click="go('/pages/help/my')">
+			<button class="s_item" open-type="share" @click="go('/pages/help/my')" hover-class="none">
 				<text class="icon ic" style="color: #f44336">&#xe7c4;</text>
 				<text class="title">分享应用</text>
 				<text class="icon arrow">&#xe62b;</text>
-			</view>
-			<view class="s_item" @click="go('/pages/help/my')">
+			</button>
+			<button class="s_item" open-type="feedback" @click="go('/pages/help/my')">
 				<text class="icon ic" style="color: #4caf50">&#xe62c;</text>
 				<text class="title">建议反馈</text>
 				<text class="icon arrow">&#xe62b;</text>
-			</view>
+			</button>
 			<view class="s_item" @click="go('/pages/other/setting')">
 				<text class="icon ic" style="color: #9e9e9e">&#xe60f;</text>
 				<text class="title">设置</text>
@@ -113,7 +113,7 @@ export default {
 		return {
 			title: '岑溪人民医院小程序',
 			path: '/pages/index/index',
-			imageUrl: 'https://chenglantimes.com/prod-api/profile/upload/2024/06/16/blob_20240616055022A009.jpeg',
+			imageUrl: '../../static/favicon.png',
 			success: (res) => {},
 			fail: (res) => {}
 		};
@@ -153,5 +153,10 @@ export default {
 			margin-top: 14px;
 		}
 	}
+	button {
+		border-radius: 0px;
+		line-height: 1;
+		font-size: 15px;
+	}
 }
 </style>

+ 1 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/work/api/Api_FollowController.java

@@ -27,7 +27,7 @@ public class Api_FollowController extends BaseController {
 
     @GetMapping("/list")
     public TableDataInfo list(FollowRecord followRecord) {
-        followRecord.setPatientId(getUser().getId());
+        followRecord.setPatientId(getUser().getPatientId());
         startPage();
         List<FollowRecord> list = followRecordService.selectAppList(followRecord);
         return getDataTable(list);

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

@@ -35,7 +35,7 @@ public class FollowRecordServiceImpl extends ServiceImpl<FollowRecordMapper, Fol
     @Override
     public AjaxResult detail(Long id) {
         FollowRecord followRecord = getById(id);
-        if (followRecord == null || !followRecord.getPatientId().equals(AppUtil.getUser().getId())) {
+        if (followRecord == null || !followRecord.getPatientId().equals(AppUtil.getUser().getPatientId())) {
             return AjaxResult.error("回访不存在或非法操作");
         }
         return AjaxResult.success(followRecord);
@@ -44,7 +44,7 @@ public class FollowRecordServiceImpl extends ServiceImpl<FollowRecordMapper, Fol
     @Override
     public AjaxResult push(FollowRecordDto dto) {
         FollowRecord followRecord = getById(dto.getId());
-        if (followRecord == null || !followRecord.getPatientId().equals(AppUtil.getUser().getId())) {
+        if (followRecord == null || !followRecord.getPatientId().equals(AppUtil.getUser().getPatientId())) {
             return AjaxResult.error("回访不存在或非法操作");
         }
         followRecord.setOp(dto.getOp());

+ 4 - 2
ruoyi-admin/src/main/resources/mapper/work/FollowRecordMapper.xml

@@ -29,11 +29,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </select>
 
     <select id="selectAppList" resultType="com.ruoyi.web.work.domain.FollowRecord">
-        select id,template_name,state,create_time from tb_follow_record
+        select id,template_name,op,state,create_time from tb_follow_record
         <where>
-            <if test="userId != null "> and user_id = #{userId}</if>
+            <if test="type != null "> and type = #{type}</if>
+            <if test="patientId != null "> AND patient_id = #{patientId}</if>
             <if test="state != null "> and state = #{state}</if>
         </where>
+        ORDER BY id DESC
     </select>
 
     <select id="selectVisitList" resultType="com.ruoyi.web.work.domain.vo.VisitVoList">