7 changed files with 487 additions and 44 deletions
			
			
		| @ -0,0 +1,413 @@ | |||
| <template> | |||
|   <div id="operation-record" style=" background: #fff; padding: 10px 20px 50px 20px;page-break-after:always"> | |||
|     <div class="btnBox"> | |||
|       <div v-if="!onlyRead && isPlatform"> | |||
|         <el-button v-print="'#reportForm'" size="small" @click="handlePrint">打印</el-button> | |||
|         <template v-if="isCreator"> | |||
|           <el-button type="primary" size="small" @click="handleSaveTable">保存</el-button> | |||
|           <el-button type="danger" size="small" @click="formDelete">删除</el-button> | |||
|         </template> | |||
|       </div> | |||
|       <div v-if="creator" style="margin: 10px 0;text-align: left;color: #409EFF"> | |||
|         <div> | |||
|           操作者:{{ creator.doctorName }} | |||
|         </div> | |||
|         <div> | |||
|           工号:{{ creator.doctorCode }} | |||
|         </div> | |||
|       </div> | |||
|     </div> | |||
|     <div style="width: 840px"> | |||
|       <div id="reportForm" style="width: 100%;padding-right: 8px;text-align: left"> | |||
|         <div v-if="!isDev" class="flex j-c" style="padding-bottom: 8px"> | |||
|           <img width="650" src="@/assets/img/xianganlogo2.jpg"> | |||
|         </div> | |||
|         <p style="color:#000000;font-size:24px;font-weight: 700;letter-spacing: 10px;text-align:center;margin-bottom: 10px;word-spacing: 3px"> | |||
|           视力筛查报告单 | |||
|         </p> | |||
|         <div class="flex"> | |||
|           <div class="flex a-c">登记号:<el-input v-model="confirmData.patientId" style="flex: 1" /></div> | |||
|           <div class="flex" style="width: 240px">姓名:<el-input v-model="confirmData.patientName" style="flex: 1" /></div> | |||
|           <div class="flex" style="width: 240px">性别:<el-input v-model="confirmData.patientSex" style="flex: 1" /></div> | |||
|           <div class="flex a-c">年龄:<el-input v-model="confirmData.patientAge" style="flex: 1" /></div> | |||
|         </div> | |||
|         <table class="treatAction"> | |||
|           <tbody> | |||
|             <tr> | |||
|               <td> | |||
|                 瞳孔 | |||
|               </td> | |||
|               <td colspan="2"> | |||
|                 <el-select v-model="confirmData.tk" filterable allow-create placeholder="" clearable> | |||
|                   <el-option | |||
|                     v-for="item in tkList" | |||
|                     :key="item.id" | |||
|                     :label="item.name" | |||
|                     :value="item.name" | |||
|                   /> | |||
|                 </el-select> | |||
|               </td> | |||
|             </tr> | |||
|             <tr> | |||
|               <td>眼别</td> | |||
|               <td>右眼</td> | |||
|               <td>左眼</td> | |||
|             </tr> | |||
|             <tr> | |||
|               <td>屈光不正度(D)</td> | |||
|               <td> | |||
|                 <div class="flex"> | |||
|                   <el-input v-model="confirmData.qgbzdSphOd" placeholder="" /> | |||
|                   <span>/</span> | |||
|                   <el-input v-model="confirmData.qgbzdCylOd" placeholder="" /> | |||
|                   <span>/</span> | |||
|                   <el-input v-model="confirmData.qgbzdAxisOd" placeholder="" /> | |||
|                 </div> | |||
|               </td> | |||
|               <td> | |||
|                 <div class="flex"> | |||
|                   <el-input v-model="confirmData.qgbzdSphOs" placeholder="" /> | |||
|                   <span>/</span> | |||
|                   <el-input v-model="confirmData.qgbzdCylOs" placeholder="" /> | |||
|                   <span>/</span> | |||
|                   <el-input v-model="confirmData.qgbzdAxisOs" placeholder="" /> | |||
|                 </div> | |||
|               </td> | |||
|             </tr> | |||
|             <tr> | |||
|               <td>眼位</td> | |||
|               <td><el-input v-model="confirmData.ywOd" /></td> | |||
|               <td><el-input v-model="confirmData.ywOs" /></td> | |||
|             </tr> | |||
|             <tr> | |||
|               <td>瞳孔大小(mm)</td> | |||
|               <td> | |||
|                 <el-input v-model="confirmData.tkdxOd" /> | |||
|               </td> | |||
|               <td> | |||
|                 <el-input v-model="confirmData.tkdxOs" /> | |||
|               </td> | |||
|             </tr> | |||
|             <tr> | |||
|               <td>结果</td> | |||
|               <td colspan="2"> | |||
|                 <el-checkbox-group v-model="jgSelect"> | |||
|                   <el-checkbox label="正常" /> | |||
|                   <el-checkbox label="远视" /> | |||
|                   <el-checkbox label="近视" /> | |||
|                   <el-checkbox label="散光" /> | |||
|                   <el-checkbox label="屈光不正" /> | |||
|                   <el-checkbox label="斜视" /> | |||
|                   <el-checkbox label="其他"> | |||
|                     其他<el-input v-model="confirmData.jgOther" /> | |||
|                   </el-checkbox> | |||
|                 </el-checkbox-group> | |||
|               </td> | |||
|             </tr> | |||
|             <tr> | |||
|               <td>建议</td> | |||
|               <td colspan="2"> | |||
|                 <el-select v-model="confirmData.jy" filterable allow-create placeholder="" clearable> | |||
|                   <el-option | |||
|                     v-for="item in jyList" | |||
|                     :key="item.id" | |||
|                     :label="item.name" | |||
|                     :value="item.name" | |||
|                   /> | |||
|                 </el-select> | |||
|               </td> | |||
|             </tr> | |||
|           </tbody> | |||
|         </table> | |||
|       </div> | |||
|     </div> | |||
|   </div> | |||
| </template> | |||
| 
 | |||
| <script> | |||
| export default { | |||
|   name: 'ScreenReport', | |||
|   props: { | |||
|     onlyRead: { | |||
|       type: Boolean, | |||
|       default: false | |||
|     }, | |||
|     isDev: { | |||
|       type: Boolean | |||
|     }, | |||
|     isPlatform: { | |||
|       type: Boolean, | |||
|       default: true | |||
|     }, | |||
|     patientId: { | |||
|       type: String | |||
|     }, | |||
|     caseId: { | |||
|       type: String, | |||
|       default: '' | |||
|     }, | |||
|     isCreator: { | |||
|       type: Boolean, | |||
|       default: true | |||
|     }, | |||
|     // 操作者 | |||
|     creator: { | |||
|       type: Object | |||
|     } | |||
|   }, | |||
|   data() { | |||
|     return { | |||
|       origin: {}, | |||
|       originForm: {}, | |||
|       tkList: [ | |||
|         { | |||
|           name: '正常', | |||
|           id: 1 | |||
|         }, { | |||
|           name: '复方托吡卡胺', | |||
|           id: 2 | |||
|         }, { | |||
|           name: '赛飞杰', | |||
|           id: 3 | |||
|         }, { | |||
|           name: '阿托品', | |||
|           id: 4 | |||
|         } | |||
|       ], | |||
|       jyList: [ | |||
|         { | |||
|           name: '随访', | |||
|           id: '1' | |||
|         }, { | |||
|           name: '进一步检查', | |||
|           id: '2' | |||
|         } | |||
|       ], | |||
|       jgSelect: [], | |||
|       confirmData: { | |||
|         tk: '正常', | |||
|         jg: '', | |||
|         jgOther: '', | |||
|         jy: '', | |||
|         tkdxOd: '', | |||
|         tkdxOs: '', | |||
|         ywOd: '', | |||
|         ywOs: '', | |||
|         qgbzdSphOd: '', | |||
|         qgbzdSphOs: '', | |||
|         qgbzdCylOd: '', | |||
|         qgbzdCylOs: '', | |||
|         qgbzdAxisOd: '', | |||
|         qgbzdAxisOs: '', | |||
|         jzNumber: '', | |||
|         patientName: '', | |||
|         patientAge: '', | |||
|         patientSex: '', | |||
|         patientId: '', | |||
|         idList: [] | |||
|       } | |||
|     } | |||
|   }, | |||
|   watch: { | |||
|     caseId(val) { | |||
|       if (val) { | |||
|         this.getReportInfo() | |||
|       } | |||
|     } | |||
|   }, | |||
|   created() { | |||
|     this.getReportInfo() | |||
|   }, | |||
|   methods: { | |||
|     async getPatientData() { | |||
|       const { data: res } = await this.$http.get( | |||
|         '/slscbg/getSlscbgInfo', | |||
|         { | |||
|           params: { | |||
|             patientId: this.patientId | |||
|           } | |||
|         } | |||
|       ) | |||
|       if (res.code === 0) { | |||
|         this.confirmData.patientId = res.data.patientId | |||
|         this.confirmData.patientAge = res.data.patientAge | |||
|         this.confirmData.patientSex = res.data.patientSex | |||
|         this.confirmData.patientName = res.data.patientName | |||
|       } else { | |||
|         this.$message.error(res.msg) | |||
|       } | |||
|     }, | |||
|     // 获取详情数据展示 | |||
|     handleResValue(val, change) { | |||
|       if (!val) { | |||
|         return | |||
|       } | |||
|       change.forEach(item => { | |||
|         item.isSelect = false | |||
|         item.remark = '' | |||
|       }) | |||
|       const list = val.split('/') | |||
|       change.forEach(item => { | |||
|         list.forEach(lis => { | |||
|           if (lis === item.name) { | |||
|             item.isSelect = true | |||
|           } | |||
|           if (lis.includes('其他') && item.name === '其他:') { | |||
|             item.isSelect = true | |||
|             item.remark = lis.split(':')[1] | |||
|           } | |||
|         }) | |||
|         // 如果未选中,默认后面注释不保存 | |||
|         if (!item.isSelect && item.name === '其他:') { | |||
|           item.remark = '' | |||
|         } | |||
|       }) | |||
|     }, | |||
|     handlePrint() { | |||
|       if (!this.isCreator) { | |||
|         return | |||
|       } | |||
|       this.handleSaveTable() | |||
|     }, | |||
|     // 保存 | |||
|     handleSaveTable() { | |||
|       this.confirmData.jg = this.jgSelect.join('/') | |||
|       this.confirmData.jzNumber = window.sessionStorage.getItem('jzNumber') | |||
|       this.$http.post('/slscbg/saveSlscbg', { | |||
|         caseId: this.caseId, | |||
|         ...this.confirmData | |||
|       }).then(() => { | |||
|         this.getReportInfo() | |||
|         this.$emit('handleSaveTable') | |||
|       }) | |||
|     }, | |||
|     getReportInfo() { | |||
|       const params = { | |||
|         patientId: this.patientId, | |||
|         caseId: this.caseId | |||
|       } | |||
|       this.$http.get('/slscbg/getSlscbgInfo', { params }).then(data => { | |||
|         const res = data.data.data | |||
|         this.setData(res) | |||
|       }) | |||
|     }, | |||
|     setData(res) { | |||
|       this.confirmData = res | |||
|       this.jgSelect = this.confirmData.jg.split('/') | |||
|       if (!res.jzNumber) { | |||
|         this.getPatientData() | |||
|         const userData = JSON.parse(window.sessionStorage.getItem('qg-userData')) | |||
|         this.confirmData.operator = userData.signImgBase | |||
|         this.confirmData.operateDate = this.$moment().format('YYYY-MM-DD') | |||
|       } | |||
|     }, | |||
|     // 获取项目id列表 | |||
|     async queryProject() { | |||
|       const project = window.sessionStorage.getItem('projectItem') ? JSON.parse(window.sessionStorage.getItem('projectItem')) : [] | |||
|       const { data: res } = await this.$http.get( | |||
|         '/patient/getZlItemDict', | |||
|         { | |||
|           params: { | |||
|             caseName: '报告' | |||
|           } | |||
|         } | |||
|       ) | |||
|       if (res.code === 0) { | |||
|         const data = res.data || [] | |||
|         const list = [] | |||
|         if (data.length) { | |||
|           for (let i = 0; i < data.length; i++) { | |||
|             for (let j = 0; j < project.length; j++) { | |||
|               if (data[i].itemId === project[j].porjectCode) { | |||
|                 list.push(project[j].id) | |||
|               } | |||
|             } | |||
|           } | |||
|           this.confirmData.idList = list | |||
|         } | |||
|       } else { | |||
|         this.$message.error(res.msg) | |||
|       } | |||
|     }, | |||
|     formDelete() { | |||
|       this.$confirmFun('确定删除吗?').then(() => { | |||
|         this.$http.post('/slscbg/delSlscbgInfo', { | |||
|           id: this.caseId | |||
|         }).then(() => { | |||
|           this.$message.success('删除成功') | |||
|           this.$emit('formDelete', 'del') | |||
|         }) | |||
|       }) | |||
|     } | |||
|   } | |||
| } | |||
| </script> | |||
| 
 | |||
| <style lang="scss" scoped> | |||
| #operation-record{ | |||
|   background: #fff; | |||
|   padding: 10px 20px 50px 20px; | |||
|   page-break-after:always; | |||
|   height: 100%; | |||
|   overflow: auto; | |||
| } | |||
| .btnBox{ | |||
|   position: fixed; | |||
|   z-index: 999; | |||
|   right: 90px; | |||
| } | |||
| .check { | |||
|   cursor: pointer; | |||
|   user-select: none; | |||
|   display: flex; | |||
|   input{ | |||
|     -webkit-appearance: checkbox !important; | |||
|     margin-right: 5px; | |||
|   } | |||
| } | |||
| .flex{ | |||
|   display: flex; | |||
| } | |||
| .a-c{ | |||
|   align-items: center; | |||
| } | |||
| .j-b{ | |||
|   justify-content: space-between; | |||
| } | |||
| .treatAction{ | |||
|   width: 100%; | |||
|   margin-top: 10px; | |||
|   tr td,tr th{ | |||
|     border: 1px solid #ccc; | |||
|     padding: 5px; | |||
|   } | |||
|   td{ | |||
|     width: 25%; | |||
|     text-align: center; | |||
|   } | |||
| } | |||
| ::v-deep .el-input__inner { | |||
|   border: none; | |||
|   height: 26px !important; | |||
|   line-height: 26px !important; | |||
|   text-align: center; | |||
|   font-size: 16px; | |||
| } | |||
| ::v-deep .el-input__icon{ | |||
|   line-height: 26px !important; | |||
| } | |||
| ::v-deep .el-checkbox-group{ | |||
|   text-align: left; | |||
| } | |||
| ::v-deep .el-input__inner { | |||
|   border-bottom: 1px solid #ccc; | |||
|   border-radius: 0; | |||
|   padding: 0; | |||
| } | |||
| ::v-deep .el-input__prefix { | |||
|   display: none; | |||
| } | |||
| ::v-deep .el-checkbox__label{ | |||
|   font-size: 16px !important; | |||
| } | |||
| </style> | |||
					Loading…
					
					
				
		Reference in new issue