12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376 |
- <template>
- <!-- <div class="main-contain">
- <div class="position">
- <bread-crumb></bread-crumb>
- </div> -->
- <div class="patient-container">
- <PatientSidebar :id="patient_id" defaultActive="3-5"></PatientSidebar>
- <div v-loading="loading">
- <div class="patient-app-container advice-container app-container" style="">
- <div style="display: flex;">
- <div style="width: 34%;">
- <div style="display: flex;">
- <div style="flex: 1.1;">
- <span style="display: inline-block;border-left: 5px solid #3891f1f5;padding-left: 5px;">病史列表</span>
- </div>
- <div style="flex: 0.9;text-align: right;">
- <el-button type="primary" size="small" @click="add_click">添加</el-button>
- </div>
- </div>
- <div>
- <el-table class="table"
- ref="phy_table"
- :data="tableData"
- :highlight-current-row="true"
- @current-change="getCurrentChangeOne"
- style="width: 100%">
-
- <el-table-column prop="index" label="序号" width="50">
- <template slot-scope="scope">
- {{ scope.$index + 1 }}
- </template>
- </el-table-column>
- <el-table-column prop="date" label="时间" width="">
- <template slot-scope="scope">
- {{ getTime(scope.row.record_time) }}
- </template>
- </el-table-column>
- <el-table-column prop="doctor" label="医生">
- <template slot-scope="scope">
- {{ getDocName(scope.row.recorder) }}
- </template>
- </el-table-column>
- </el-table>
- </div>
- </div>
- <div style="width: 65%;margin-left: 10px;">
- <div style="display: flex;">
- <div style="flex: 1;">
- <span style="display: inline-block;border-left: 5px solid #3891f1f5;padding-left: 5px;">详情</span>
- </div>
- <div style="flex: 1;text-align: right;">
- <div v-if='add_index == 0'>
- <el-button type="primary" size="small" @click="showEdit">修改</el-button>
- <el-button size="small" type="danger" @click="deleteAction">删除</el-button>
- <el-button type="primary" size="small" @click="prints">打印</el-button>
- </div>
- <div v-if="add_index == 1">
- <el-button type="primary" size="small" @click="showSave">保存</el-button>
- <el-button size="small" @click="showCancel">取消</el-button>
- </div>
- </div>
- </div>
- <div style="display: flex;margin: 10px 0;">
- <div style="flex: 1;">
- 记录时间:
- <el-date-picker v-model="record_date" prefix-icon="el-icon-date" :editable="false"
- style="width: 250px;"
- type="datetime" placeholder="选择日期时间" align="right" format="yyyy-MM-dd HH:mm:ss"
- value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
- </div>
- <div style="flex: 1;">
- 病程医生:
- <el-select v-model="admin_user_id" placeholder="请选择" :disabled="disabled">
- <el-option
- v-for="item in doctorOptions"
- :key="item.id"
- :label="item.name"
- :value="item.id">
- </el-option>
- </el-select>
- </div>
- </div>
- <div>
- <span style="display: inline-block;border-left: 5px solid #3891f1f5;padding-left: 5px;margin-bottom: 5px;">
- 病程内容
- </span>
- <div style="display:flex;">
- <div>
- 取值时间:
- <el-select v-model="quzhi_date" @change="datachange" placeholder="请选择" style="width: 120px;">
- <el-option
- v-for="item in quzhi_options"
- :key="item.value"
- :label="item.label"
- :value="item.value">
- </el-option>
- </el-select>
- </div>
- <div style="margin:0 10px">
- <el-date-picker
- @change="changStartDate"
- v-model="start_date"
- type="date"
- value-format="yyyy-MM-dd"
- placeholder="选择日期"
- style="width: 150px;">
- </el-date-picker>
- <span>-</span>
- <el-date-picker
- @change="changEndDate"
- v-model="end_date"
- type="date"
- value-format="yyyy-MM-dd"
- placeholder="选择日期"
- style="width: 150px;">
- </el-date-picker>
- </div>
- <!-- <div>
- <el-button type="primary" size="small" @click="autotext_click">
- 生成
- </el-button>
- <el-button type="primary" size="small" @click="auto_dialog=false">
- 取消
- </el-button>
- </div> -->
- </div>
- <div style="margin: 10px 0;">
- <el-button type="primary" size="small" @click="template_click">
- {{ add_index ==0 ? '设置模板' : '模板库' }}
- </el-button>
- <el-button type="primary" size="small" @click="auto_click">
- 自动生成
- </el-button>
- </div>
- <ueditor ref="editor" id="editors" :content="new_content"></ueditor>
- </div>
- </div>
- </div>
- </div>
-
-
- <el-dialog
- title="设置模板"
- :visible.sync="template_dialog"
- width="20%"
- center>
- <div>
- 模板名称:
- <el-input v-model="title" placeholder="请输入内容" style="width: 160px;"></el-input>
- </div>
- <span slot="footer" class="dialog-footer">
- <el-button @click="template_dialog = false">取 消</el-button>
- <el-button type="primary" @click="saveTemplate">确 定</el-button>
- </span>
- </el-dialog>
- <el-dialog
- title="模板库"
- :visible.sync="library_dialog"
- width="70%"
- class="lirary"
- >
- <div>
- <div style="display: flex;">
- <div style="width: 27%;">
- <el-table
- :data="templateList"
- :highlight-current-row="true"
- @row-click="rowclick"
- ref="record_table_one"
- @current-change="getCurrentChangeTwo"
- style="width: 100%">
- <el-table-column prop="index" label="序号" width="">
- <template slot-scope="scope">
- {{ scope.$index + 1 }}
- </template>
- </el-table-column>
- <el-table-column prop="name" label="模板名称" width="">
- <template slot-scope="scope">
- {{ scope.row.title }}
- </template>
- </el-table-column>
- </el-table>
- </div>
- <div style="width: 72%;margin-left: 10px;">
- <div class="Second_title">模板内容</div>
- <div style="">
- <keep-alive>
- <ueditor ref="editorOne" id="editors" :content="new_content"></ueditor>
- </keep-alive>
- </div>
- </div>
- </div>
- </div>
- <span slot="footer" class="dialog-footer" style="text-align: center;">
- <el-button type="danger" @click="template_dele">删除模板</el-button>
- <el-button type="primary" @click="template_save">保存模板</el-button>
- <el-button type="primary" @click="toContentPint">应用</el-button>
- <el-button @click="library_dialog = false">取消</el-button>
- </span>
- </el-dialog>
- <el-dialog
- title="提示"
- :visible.sync="auto_dialog"
- width="70%"
- top="0"
- >
- <div>
- <!-- <div style="display:flex;"> -->
- <!-- <div>
- 取值时间:
- <el-select v-model="quzhi_date" @change="datachange" placeholder="请选择" style="width: 120px;">
- <el-option
- v-for="item in quzhi_options"
- :key="item.value"
- :label="item.label"
- :value="item.value">
- </el-option>
- </el-select>
- </div>
- <div style="margin:0 10px">
- <el-date-picker
- @change="changStartDate"
- v-model="start_date"
- type="date"
- value-format="yyyy-MM-dd"
- placeholder="选择日期"
- style="width: 150px;">
- </el-date-picker>
- <span>-</span>
- <el-date-picker
- @change="changEndDate"
- v-model="end_date"
- type="date"
- value-format="yyyy-MM-dd"
- placeholder="选择日期"
- style="width: 150px;">
- </el-date-picker>
- </div> -->
- <div style="text-align: right;margin-bottom: 10px;">
- <el-button type="primary" size="small" @click="autotext_click">
- 生成
- </el-button>
- <el-button type="primary" size="small" @click="auto_dialog=false">
- 取消
- </el-button>
- </div>
- <!-- </div> -->
- <div v-show="AuToShow">
- <text_content @new_content="newcontent" :patient="patient" :prescription="prescription" :berforList="berforList"
- :monitorList="monitorList" :dryweightList="dryweightList" :inpectionList="inpectionList" :dialysisOrderList="dialysisOrderList"
- :start_date="start_date" :end_date="end_date" :patient_id="patient_id" :num="num" :longAdvice="longAdvice" :groupPrescriptionList="groupPrescriptionList" :afterList="afterList" :max_blood_flow_volume="max_blood_flow_volume"
- :max_befor_systolic_blood_pressure="max_befor_systolic_blood_pressure" :min_befor_systolic_blood_pressure="min_befor_systolic_blood_pressure" :max_befor_diastolic_blood_pressure="max_befor_diastolic_blood_pressure" :min_befor_diastolic_blood_pressure="min_befor_diastolic_blood_pressure"
- :max_after_systolic_blood_pressure="max_after_systolic_blood_pressure" :min_after_systolic_blood_pressure="min_after_systolic_blood_pressure" :max_after_diastolic_blood_pressure="max_after_diastolic_blood_pressure" :min_after_diastolic_blood_pressure="min_after_diastolic_blood_pressure"
- :max_monitor_systolic_blood_pressure="max_monitor_systolic_blood_pressure" :min_monitor_systolic_blood_pressure="min_monitor_systolic_blood_pressure" :max_monitor_diastolic_blood_pressure="max_monitor_diastolic_blood_pressure" :min_monitor_diastolic_blood_pressure="min_monitor_diastolic_blood_pressure"
- :lastDryWeight="lastDryWeight" :patientVascularAccess="patientVascularAccess" :lastBefor="lastBefor"></text_content>
- </div>
- </div>
-
- </el-dialog>
-
-
- </div>
- </div>
-
-
- </template>
-
- <script>
- import PatientSidebar from './components/PatientSidebar'
- import PatientSidebar_new from './components/PatientSidebar_new'
- import Editor from '@/components/Editor'
- import ueditor from '@/components/Uedtior'
- import text_content from './text_content'
- const moment = require('moment')
- import { getDataConfig } from "@/utils/data";
- import {
- createNewCourseOfDiseaseRecord,
- deleteNewCouseOfDisease,
- modifyCourseOfDiseaseRecord,
- getPatientCourseOfDiseaseList,
- saveCoureseTemplateTitle,
- getPatientCoureOfTempalate,
- saveCourseOfNewTemplate,
- deleteCourseTempalte,
- getAutoPatientContent
- } from '@/api/patient'
- import { fetchAllDoctorAndNurse } from "@/api/doctor";
- import { parseTime } from '@/utils'
- import BreadCrumb from '@/xt_pages/components/bread-crumb'
- import { uParseTime } from '@/utils/tools'
- export default {
- name: 'CourseOfDisease',
- components: {
- PatientSidebar,
- BreadCrumb,
- Editor,
- PatientSidebar_new,
- ueditor,
- text_content,
- },
- data() {
- return {
- loading: false,
- title: '',
- patient_id: 0,
- date: [],
- start_time: '',
- end_time: '',
- course_of_disease_time: moment(new Date()).format('YYYY-MM-DD HH:mm:ss'),
- records: [],
- doctors: [],
- current_select_record: null,
- show_dialog: false,
- show_edit_dialog: false,
- uploading_new_record: false,
- templates: this.$store.getters.configlist.course_disease,
- select_template: '',
- new_content: '',
- edit_new_content: '',
- edit_course_of_disease_time: '',
- selectingRows: [],
- table_current_index: -1,
- edit_current_id: 0,
- edit_title: '',
- ids:"",
- idArr:[],
- org_id:0,
- add_index:0,
- disabled:true,
- template_dialog:false,
- library_dialog:false,
- auto_dialog:false,
- quzhi_date:1,
- start_date:'',
- end_date:'',
- quzhi_options:[{value:1,label:'本周'},{value:2,label:'上周'},{value:3,label:'本月'},{value:4,label:'上周'},],
- tableData:[],
- admin_user_id:0,
- record_date:moment(new Date()).format('YYYY-MM-DD HH:mm:ss'),
- template_name:"",
- id:0,
- doctorOptions:[],
- template_content:"",
- template_id:0,
- title:"",
- templateList:[],
- prescription:[],
- berforList:[],
- monitorList:[],
- dryweightList:[],
- inpectionList:[],
- dialysisOrderList:[],
- patient:{},
- AuToShow:false,
- num:"",
- longAdvice:[],
- groupPrescriptionList:[],
- afterList:[],
- max_blood_flow_volume:"",
- max_befor_systolic_blood_pressure:"",
- min_befor_systolic_blood_pressure:"",
- max_befor_diastolic_blood_pressure:"",
- min_befor_diastolic_blood_pressure:"",
- max_after_systolic_blood_pressure:"",
- min_after_systolic_blood_pressure:"",
- max_after_diastolic_blood_pressure:"",
- min_after_diastolic_blood_pressure:"",
- max_monitor_systolic_blood_pressure:"",
- min_monitor_systolic_blood_pressure:"",
- max_monitor_diastolic_blood_pressure:"",
- min_monitor_diastolic_blood_pressure:"",
- lastDryWeight:{},
- patientVascularAccess:{},
- lastBefor:{}
- }
- },
- created() {
- this.admin_user_id = this.$store.getters.xt_user.user.id
-
- this.patient_id = parseInt(this.$route.query.id)
- this.org_id = this.$store.getters.xt_user.template_info.org_id;
- if (isNaN(this.patient_id) || this.patient_id <= 0) {
- this.$notify.error({
- title: '错误',
- message: '无效的id'
- })
- this.$router.push('/patients/patients')
- return
- }
- // const ceshi = ``
-
- // // const ceshi=`hellow word`
- // this.new_content = ceshi
- // this.$refs.editor.contents=ceshi
- this.fetchAllDoctorAndNurse()
- this.getlist()
- },
- methods: {
- changStartDate(val){
- this.start_date = val
- },
- changEndDate(val){
- this.end_date = val
- },
- datachange(val){
- if(val ==1){
- this.start_date = this.getFirstDayOfWeek(new Date())
- this.end_date = this.getTime(new Date())
- }else if(val ==2){
- this.getlastweek(new Date())
- }else if(val ==3){
- this.start_date = this.getFirstDayOfMonth(new Date())
- this.end_date = this.getTime(new Date())
- }else if(val ==4){
- this.getLastMonthFirstDay()
- this.getLastMonthLastDay()
- }
- },
- toContentPint(){
- this.$refs.editor.contents = this.template_content
- this.library_dialog = false
- },
- getCurrentChangeOne(val){
- this.$refs.editor.contents = val.content
- this.record_date = this.getTime(val.record_time)
- this.id = val.id
- },
- getCurrentChangeTwo(val){
-
- this.$refs.editorOne.contents = val.content
- this.template_content = ""
- this.template_content = val.content
- this.template_id = val.id
- },
- template_dele(){
- deleteCourseTempalte(this.template_id).then(response=>{
- if(response.data.state == 1){
- var msg = response.data.data.msg
- this.$message.success("删除成功!")
- this.library_dialog = false
- this.getPatientCoureOfTempalateOne()
- }
- })
- },
- getPatientCoureOfTempalateOne(){
-
- },
- rowclick(){
-
- },
- prints(){
-
- },
- saveTemplate(){
-
- var params = {
- title:this.title,
- content: this.$refs.editor.contents,
- }
- saveCoureseTemplateTitle(params).then(response=>{
- if(response.data.state == 1){
- var courseTemplate = response.data.data.courseTemplate
- this.$message.success("保存成功!")
- this.template_dialog = false
- }
- })
- },
- template_save(){
- var params = {
- template_id:this.template_id,
- content:this.$refs.editorOne.contents
- }
-
- saveCourseOfNewTemplate(params).then(response=>{
- if(response.data.state == 1){
- var msg = response.data.data.msg
- this.$message.success("保存成功")
- this.library_dialog = false
- }
- })
- },
- getDocName(admin_user_id){
- var user_name = ""
- for(let i=0;i<this.doctorOptions.length;i++){
- if(admin_user_id == this.doctorOptions[i].id){
- user_name = this.doctorOptions[i].name
- }
- }
- return user_name
- },
- getlist(){
- var params = {
- patient_id:this.patient_id
- }
- getPatientCourseOfDiseaseList(params).then(response=>{
- if(response.data.state == 1){
- var list = response.data.data.list
- this.tableData = []
- this.tableData = list
-
- }
- })
- },
- fetchAllDoctorAndNurse() {
- fetchAllDoctorAndNurse().then(response => {
- if (response.data.state == 1) {
- this.doctorOptions= []
- this.doctorOptions = response.data.data.doctors;
- }
- });
- },
- add_click(){
- this.admin_user_id = ""
- this.admin_user_id = this.$store.getters.xt_user.user.id
- this.fetchAllDoctorAndNurse()
- this.$refs.editor.contents = ""
- this.id = 0
- this.disabled = false
- this.add_index = 1
- },
- showCancel(){
- this.add_index = 0
- this.disabled = true
- },
- showSave(){
- this.add_index = 0
- this.disabled = true
- console.log("haaaaaaaaaaaaaaa",this.$refs)
- this.new_content = this.$refs.editor.contents
- if (this.new_content.length == 0) {
- this.$message.error('请填写病程内容')
- return
- }
- var params = {
- id:this.id,
- patient_id:this.patient_id,
- record_date:this.record_date,
- content:this.new_content,
- admin_user_id:this.admin_user_id,
- }
- console.log("params",params)
- createNewCourseOfDiseaseRecord(params).then(response => {
- if(response.data.state == 1){
- var msg = response.data.data.msg
- this.$message.success("保存成功!")
- this.getlist()
- }
-
- }).catch(error => {
-
- })
- },
- template_click(){
- console.log('this.add_index',this.add_index);
-
- if(this.add_index ==0){
- this.template_dialog = true
- }else{
- getPatientCoureOfTempalate().then(response=>{
- if(response.data.state == 1){
- this.library_dialog = true
- this.templateList = response.data.data.templateList
- console.log("hahhahahaha",this.$refs)
- if(this.templateList!=null && this.templateList.length>0){
- this.$refs.record_table_one.setCurrentRow(this.templateList[0])
- }
- console.log("haaaaaaaaaaaaa",this.templateList)
-
- }
- })
-
- }
- },
- auto_click(){
- this.start_date = this.getFirstDayOfWeek(new Date())
- this.end_date = this.getTime(new Date())
- this.getAutoPatientContent()
- // this.auto_dialog = true
- },
- autotext_click(){
-
- // 医嘱
- if(this.longAdvice!=null && this.longAdvice.length>0){
- for(let i=0;i<this.longAdvice.length;i++){
- this.longAdvice[i].advice_type_name = ""
- if(this.longAdvice[i].advice_type == 1){
- this.longAdvice[i].advice_type_name = "长期医嘱"
- }
- if(this.longAdvice[i].stop_state == 1){
- this.longAdvice[i].stop_state_name = "停用"
- }
- if(this.longAdvice[i].stop_state == 2){
- this.longAdvice[i].stop_state_name = "未停用"
- }
- }
- }
-
-
- if(this.inpectionList!=null && this.inpectionList.length>0){
- let dataInfo = {}
- this.inpectionList.forEach((item, index) => {
- let { group_no } = item
- if (!dataInfo[group_no]) {
- dataInfo[group_no] = {
- group_no:group_no,
- project_id:item.project_id,
- name:item.project_name,
- date:this.getTime(item.inspect_date),
- child:[],
- left: [],
- right:[]
- }
- }
- })
- let arr = Object.values(dataInfo)
- console.log("arr----------------------",arr)
-
- if(arr!=null && arr.length>0){
- for(let i=0;i<arr.length;i++){
- for(let j=0;j<this.inpectionList.length;j++){
- if(arr[i].group_no == this.inpectionList[j].group_no){
- arr[i].child.push(this.inpectionList[j])
- }
- }
- }
- }
-
- for(let i=0;i<arr.length;i++){
- for(let j=0;j<arr[i].child.length;j++){
- if(j%2 ==0){
- arr[i].left.push(arr[i].child[j])
- }
- if(j%2 == 1){
- arr[i].right.push(arr[i].child[j])
- }
- }
- }
-
- this.Inspect = []
- this.Inspect = arr
- console.log("newarr----------------",arr)
- }
-
- this.$nextTick(()=>{
- const iframeDoc = document.getElementsByClassName('edui-editor-iframeholder')[0].getElementsByTagName('iframe')[0].contentDocument.getElementsByTagName('tbody')[0].children[9].children[1]
-
- const jiancDoc = document.getElementById('editer').getElementsByTagName('tbody')[0].children[8].children[1]
-
- if(this.Inspect.length<1){
- let newList = document.createElement('p');
- newList.style.cssText = 'padding: 5px;'
- newList.textContent = '无';
- jiancDoc.appendChild(newList)
- }else{
- let newList = document.createElement('p');
- newList.style.cssText='display: flex;text-align: center;border-bottom: 1px solid black;';
- let newListItem1 = document.createElement('span');
- newListItem1.style.cssText= 'width: 20%;display: inline-block;padding: 5px 0;border-right: 1px solid black;'
- let newListItem2 = document.createElement('span');
- newListItem2.style.cssText= 'width: 20%;display: inline-block;padding: 5px 0;border-right: 1px solid black;'
- let newListItem3 = document.createElement('span');
- newListItem3.style.cssText= 'width: 20%;display: inline-block;padding: 5px 0;border-right: 1px solid black;'
- let newListItem4 = document.createElement('span');
- newListItem4.style.cssText= 'width: 20%;display: inline-block;padding: 5px 0;border-right: 1px solid black;'
- let newListItem5 = document.createElement('span');
- newListItem5.style.cssText= 'width: 20%;display: inline-block;padding: 5px 0;border-right: 1px solid black;'
- let newListItem6 = document.createElement('span');
- newListItem6.style.cssText= 'width: 20%;display: inline-block;padding: 5px 0;'
- newListItem1.textContent = '检验项目';
- newListItem2.textContent = '检验时间';
- newListItem3.textContent = '检验内容';
- newListItem4.textContent = '结果';
- newListItem5.textContent = '检验内容';
- newListItem6.textContent = '结果';
- newList.appendChild(newListItem1);
- newList.appendChild(newListItem2);
- newList.appendChild(newListItem3);
- newList.appendChild(newListItem4);
- newList.appendChild(newListItem5);
- newList.appendChild(newListItem6);
- jiancDoc.appendChild(newList)
- for(let i in this.Inspect){
- let newList1 = document.createElement('p');
- const child1 = document.createElement('p')
- const child2 = document.createElement('p')
- const child3 = document.createElement('p')
- newList1.appendChild(child1);
- newList1.appendChild(child2);
- newList1.appendChild(child3);
- newList1.style.cssText='display: flex;text-align: center;border-bottom: 1px solid black;';
- child1.style.cssText= 'width: 40%;display: inline-block;border-right: 1px solid black;display: flex;'
- child2.style.cssText= 'width: 40%;display: inline-block;border-right: 1px solid black;display: flex;flex-wrap: wrap;'
- child3.style.cssText= 'width: 40%;display: inline-block;display: flex;flex-wrap: wrap;'
-
- let newListItem1 = document.createElement('span');
- newListItem1.style.cssText= 'flex:1;display: inline-block;padding: 5px 0;border-right: 1px solid black;'
- let newListItem2 = document.createElement('span');
- newListItem2.style.cssText= 'flex:1;display: inline-block;padding: 5px 0;'
- newListItem1.textContent = this.Inspect[i].name;
- newListItem2.textContent = this.Inspect[i].date;
- child1.appendChild(newListItem1);
- child1.appendChild(newListItem2);
- for(let j in this.Inspect[i].left){
- let newListItem3 = document.createElement('span');
- newListItem3.style.cssText= 'border-bottom: 1px solid black;width:50%;display: inline-block;padding: 5px 0;border-right: 1px solid black;'
- let newListItem4 = document.createElement('span');
- newListItem4.style.cssText= 'border-bottom: 1px solid black;width:50%;display: inline-block;padding: 5px 0;'
- newListItem3.textContent = this.Inspect[i].left[j].item_name;
- newListItem4.textContent = this.Inspect[i].left[j].inspect_value;
- child2.appendChild(newListItem3);
- child2.appendChild(newListItem4);
- }
- for(let x in this.Inspect[i].right){
- let newListItem5 = document.createElement('span');
- newListItem5.style.cssText= 'width: 50%;display: inline-block;padding: 5px 0;border-right: 1px solid black;border-bottom: 1px solid black;'
- let newListItem6 = document.createElement('span');
- newListItem6.style.cssText= 'width: 50%;display: inline-block;padding: 5px 0;border-bottom: 1px solid black;'
- newListItem5.textContent = this.Inspect[i].right[x].item_name;
- newListItem6.textContent = this.Inspect[i].right[x].inspect_value;
- child3.appendChild(newListItem5);
- child3.appendChild(newListItem6);
- }
- jiancDoc.appendChild(newList1)
- }
- }
-
-
- var newListArr =[]
- for(let j in this.longAdvice){
- const obj={
- id:this.longAdvice[j].id,
- newlist:'newList'+j
- }
- newListArr.push(obj)
- }
- for(let i in this.longAdvice){
- for(let j in newListArr){
- if(this.longAdvice[i].id==newListArr[j].id){
- let newList = document.createElement('p');
- newList.style.cssText='display: flex;text-align: center;border-bottom: 1px solid black;';
- let newListItem1 = document.createElement('span');
- newListItem1.style.cssText= 'width: 30%;display: inline-block;padding: 5px 0;border-right: 1px solid black;'
- let newListItem2 = document.createElement('span');
- newListItem2.style.cssText= 'width: 20%;display: inline-block;padding: 5px 0;border-right: 1px solid black;'
- let newListItem3 = document.createElement('span');
- newListItem3.style.cssText= 'width: 20%;display: inline-block;padding: 5px 0;border-right: 1px solid black;'
- let newListItem4 = document.createElement('span');
- newListItem4.style.cssText= 'width: 20%;display: inline-block;padding: 5px 0;border-right: 1px solid black;'
- let newListItem5 = document.createElement('span');
- newListItem5.style.cssText= 'width: 20%;display: inline-block;padding: 5px 0;border-right: 1px solid black;'
- let newListItem6 = document.createElement('span');
- newListItem6.style.cssText= 'width: 10%;display: inline-block;padding: 5px 0;'
- newListItem1.textContent = this.longAdvice[i].advice_name;
- newListItem2.textContent = this.longAdvice[i].advice_type_name;
- newListItem3.textContent = this.getTime(this.longAdvice[i].start_time)
- newListItem4.textContent = this.longAdvice[i].single_dose +this.longAdvice[i].single_dose_unit ;
- newListItem5.textContent = this.longAdvice[i].execution_frequency;
- newListItem6.textContent = this.longAdvice[i].stop_state_name;
- newList.appendChild(newListItem1);
- newList.appendChild(newListItem2);
- newList.appendChild(newListItem3);
- newList.appendChild(newListItem4);
- newList.appendChild(newListItem5);
- newList.appendChild(newListItem6);
- iframeDoc.appendChild(newList)
- }
- }
- }
- })
-
-
- this.AuToShow = true
-
- // this.getAutoPatientContent()
- },
- // 本周
- getFirstDayOfWeek(date){
- var weekday = date.getDay()
- date.setDate(date.getDate()-weekday+1);//往前算(weekday-1)天,年份、月份会自动变化
- return this.timeFormat(date);
- },
- // 上周
- getlastweek(date){
- date.setDate(date.getDate()-7 - date.getDay() + 1);
- var m =''
- var d = ''
- if(date.getMonth() + 1<10){
- m = '0'+(date.getMonth() + 1)
- }else{
- m = date.getMonth() + 1
- }
- if(date.getDate()<10){
- d = '0'+date.getDate()
- }else{
- d = date.getDate()
- }
- // this.start_date = date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate() ;
- this.start_date = date.getFullYear() + "-" + m + "-" + d ;
- date.setDate(date.getDate() +6);
- var mm = ''
- var dd = ''
- if(date.getMonth() + 1<10){
- mm = '0'+(date.getMonth() + 1)
- }else{
- mm = date.getMonth() + 1
- }
- if(date.getDate()<10){
- dd = '0'+date.getDate()
- }else{
- dd = date.getDate()
- }
- // if(date.getMonth() + 1<10)
- // this.end_date = date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate();
- this.end_date = date.getFullYear() + "-" + mm + "-" + dd ;
- console.log('this.end_date',this.end_date);
- },
- // 本月
- getFirstDayOfMonth (date) {
- date.setDate(1);
- return this.timeFormat(date);
- },
- //上个月第一天
- getLastMonthFirstDay() {
- var date = new Date();
- date.setDate(0);
- var y = date.getFullYear(); //获取年份
- var m = date.getMonth() + 1; //获取月份
- m = m < 10 ? "0" + m : m;
- this.start_date = [y, m, '01'].join("-")
- // return [y, m, '01'].join("-");
- },
- // 上个月最后一天
- getLastMonthLastDay() {
- var date = new Date();
- date.setDate(0);
- var y = date.getFullYear(); //获取年份
- var m = date.getMonth() + 1; //获取月份
- var d = new Date(y, m, 0).getDate(); //获取当月最后一日
- m = m < 10 ? "0" + m : m; //月份补 0
- d = d < 10 ? "0" + d : d; //日数补 0
- this.end_date = [y, m, d].join("-")
- // return [y, m, d].join("-");
- },
- // 日期格式化
- timeFormat(date) {
- if (!date || typeof(date) === "string") {
- this.error("参数异常,请检查...");
- }
- var y = date.getFullYear(); //年
- if(date.getMonth() + 1<10){
- var m ='0'+(date.getMonth() + 1); //月
- }else{
- var m =date.getMonth() + 1; //月
- }
- if(date.getDate()<10){
- var d ='0'+date.getDate(); //日
- }else{
- var d = date.getDate(); //日
- }
- // var d = date.getDate(); //日
-
- return y + "-" + m + "-" + d;
- },
-
-
- requestCourseRecords: function() {
- this.loading = true
- getCourseOfDiseaseRecords(this.patient_id, this.start_time, this.end_time).then(rs => {
- this.loading = false
- var resp = rs.data
- if (resp.state == 1) {
- this.current_select_record = null
- this.records = resp.data.records
- console.log("records232322332323232323223",this.records)
- this.doctors = resp.data.doctors
-
- } else {
- this.$message.error(resp.msg)
- }
- }).catch(error => {
- this.loading = false
- this.$message.error(error)
- })
- },
-
- didChangeCurrentRecord: function(record) {
- this.current_select_record = record
- },
- recordTime: function(timestamp) {
- var time = new Date(timestamp * 1000)
- return parseTime(time, '{y}-{m}-{d} {h}:{i}:{s}')
- },
- doctorName: function(doctor_id) {
- for (let index = 0; index < this.doctors.length; index++) {
- const doctor = this.doctors[index]
- if (doctor.id == doctor_id) {
- return doctor.name
- }
- }
- return ''
- },
- modifyAction: function() {
-
- this.edit_new_content = this.$refs.edit_neditor.content
- if (this.edit_new_content.length == 0) {
- this.$message.error('请填写病程内容')
- return
- }
- this.uploading_new_record = true
- modifyCourseOfDiseaseRecord(this.patient_id, this.edit_new_content, this.edit_course_of_disease_time, this.edit_current_id, this.edit_title).then(rs => {
- this.uploading_new_record = false
- var resp = rs.data
- if (resp.state == 1) {
- this.records[this.table_current_index].content = resp.data.record.content
- this.records[this.table_current_index].record_time = resp.data.record.record_time
- this.records[this.table_current_index].recorder = resp.data.record.recorder
- this.records[this.table_current_index].title = resp.data.record.title
-
- this.show_edit_dialog = false
- this.edit_new_content = ''
- this.table_current_index = -1
-
- } else {
- this.table_current_index = -1
- this.$message.error(resp.msg)
- }
-
- }).catch(error => {
- this.table_current_index = -1
- this.uploading_new_record = false
- this.$message.error(error)
- })
-
- },
-
- getAutoPatientContent(){
- if(this.start_date == ""){
- this.$message.error("请选择开始时间")
- }
- if(this.end_date == ""){
- this.$message.error("请选择结束时间")
- }
- var params = {
- start_time:this.start_date,
- end_time:this.end_date,
- patient_id:this.patient_id,
- }
- console.log("start_time==============",params)
- getAutoPatientContent(params).then(response=>{
- if(response.data.state == 1){
-
- var prescription = response.data.data.prescription
- this.prescription=[]
- this.prescription = prescription
-
- var berfor = response.data.data.berfor
- this.berforList = []
- this.berforList = berfor
-
- var monitorList = response.data.data.monitorList
- this.monitorList = []
- this.monitorList = monitorList
-
- var dryweightList = response.data.data.dryweightList
-
- this.dryweightList = []
- this.dryweightList = dryweightList
-
- var inpectionList = response.data.data.inpectionList
-
- this.inpectionList = []
-
- this.inpectionList = inpectionList
-
-
- var patient = response.data.data.patient
-
- if(patient.gender == 1){
- patient.gender_name = "男"
- }
- if(patient.gender == 2){
- patient.gender_name = "女"
- }
-
- this.patient = patient
- var dialysisOrderList =response.data.data.dialysisOrder
-
- this.dialysisOrderList = []
- this.dialysisOrderList = dialysisOrderList
-
- var longAdvice = response.data.data.longAdvice
-
- this.longAdvice = []
- this.longAdvice = longAdvice
-
- this.groupPrescriptionList = []
- this.groupPrescriptionList = response.data.data.groupPrescriptionList
-
- this.afterList = response.data.data.after
-
- this.max_blood_flow_volume = response.data.data.max_blood_flow_volume
-
- this.max_befor_systolic_blood_pressure = response.data.data.max_befor_systolic_blood_pressure
-
- this.min_befor_systolic_blood_pressure = response.data.data.min_befor_systolic_blood_pressure
-
- this.max_befor_diastolic_blood_pressure = response.data.data.max_befor_diastolic_blood_pressure
-
- this.min_befor_diastolic_blood_pressure = response.data.data.min_befor_diastolic_blood_pressure
-
-
- this.max_after_systolic_blood_pressure = response.data.data.max_after_systolic_blood_pressure
-
- this.min_after_systolic_blood_pressure = response.data.data.min_after_systolic_blood_pressure
-
- this.max_after_diastolic_blood_pressure = response.data.data.max_after_diastolic_blood_pressure
-
-
- this.min_after_diastolic_blood_pressure = response.data.data.min_after_diastolic_blood_pressure
-
- this.max_monitor_systolic_blood_pressure = response.data.data.max_monitor_systolic_blood_pressure
-
-
- this.min_monitor_systolic_blood_pressure = response.data.data.min_monitor_systolic_blood_pressure
-
-
- this.max_monitor_diastolic_blood_pressure = response.data.data.max_monitor_diastolic_blood_pressure
-
-
- this.min_monitor_diastolic_blood_pressure = response.data.data.min_monitor_diastolic_blood_pressure
-
-
- this.lastDryWeight = response.data.data.lastDryWeight
-
- this.patientVascularAccess = response.data.data.patientVascularAccess
-
- this.lastBefor = response.data.data.lastBefor
-
- this.auto_dialog = true
-
-
-
- }
- })
-
- },
- didSelectTemplate: function(templateContent) {
- this.new_content = this.new_content.length > 0 ? (this.new_content + templateContent) : templateContent
-
- }, didEditSelectTemplate: function(templateContent) {
- this.edit_new_content = this.edit_new_content.length > 0 ? (this.edit_new_content + templateContent) : templateContent
- },
-
- didSelectionChange: function(selectRows) {
-
- var arr = []
- for(let i=0;i<selectRows.length;i++){
- arr.push(selectRows[i].id)
- }
- var newArr = arr.join(',')
- this.ids = newArr
- console.log("select23322332",this.ids)
- this.selectingRows = selectRows
- },
- deleteAction(){
- if(this.id == 0){
- this.$message.error("请选择要删除的信息!")
- return false
- }
- this.$confirm('确定要取消吗?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- deleteNewCouseOfDisease(this.id).then(response=>{
- if (response.data.state==1) {
- var msg = response.data.data.msg
- this.$message.success("删除成功!")
- this.getlist()
- }
- });
- }).catch(() => {
-
- });
-
-
- },
- showEdit() {
-
- this.add_index =1
- this.disabled = false
-
- }, tableRow({ row, rowIndex }) {
- // 把每一行的索引放进row
- row.index = rowIndex
- }, onRowClick(row, event, column) {
- this.table_current_index = row.index
- },
- print(){
- if(this.ids.length == 0){
- this.$message.error('请选择要打印的病程')
- return
- }
- this.$router.push({ path: "/course/print?ids="+this.ids+"&patient_id="+this.patient_id});
-
- },
- getModeId(mode_id){
- var mode_name = ""
- if(mode_id == 1){
- mode_name ="HD"
- }
- if(mode_id == 2){
- mode_name ="HDF"
- }
- if(mode_id == 3){
- mode_name ="HD+HP"
- }
- if(mode_id == 4){
- mode_name ="HP"
- }
- if(mode_id == 5){
- mode_name ="HF"
- }
- if(mode_id == 6){
- mode_name ="SCUF"
- }
- if(mode_id == 7){
- mode_name ="IUF"
- }
- if(mode_id == 8){
- mode_name ="HFHD"
- }
- if(mode_id == 9){
- mode_name ="HFHD+HP"
- }
- if(mode_id == 10){
- mode_name ="PHF"
- }
- if(mode_id == 11){
- mode_name ="HFR"
- }
- if(mode_id == 12){
- mode_name ="HDF+HP"
- }
- if(mode_id == 13){
- mode_name ="CRRT"
- }
- if(mode_id == 14){
- mode_name ="腹水回输"
- }
- if(mode_id == 19){
- mode_name ="IUF+HD"
- }
- if(mode_id == 20){
- mode_name ="UF"
- }
- if(mode_id == 21){
- mode_name ="HD+"
- }
- if(mode_id == 22){
- mode_name ="血浆胆红素吸附+HDF"
- }
- if(mode_id == 23){
- mode_name ="血浆胆红素吸附"
- }
- if(mode_id == 24){
- mode_name ="I-HDF"
- }
- if(mode_id == 25){
- mode_name ="HD高通"
- }
- if(mode_id == 26){
- mode_name ="CVVH"
- }
- if(mode_id == 27){
- mode_name ="CVVHD"
- }
- if(mode_id == 28){
- mode_name ="CVVHDF"
- }
- if(mode_id == 29){
- mode_name ="PE"
- }
- if(mode_id == 30){
- mode_name ="血浆胆红素吸附+HP"
- }
- if(mode_id == 31){
- mode_name ="HPD"
- }
- if(mode_id == 32){
- mode_name ="HDP"
- }
- return mode_name
- },
- GetAnticoagulant(id){
- var anticoagulant_name = ""
- if(id == 1){
- anticoagulant_name = "无肝素"
- }
- if(id == 2){
- anticoagulant_name = "普通肝素"
- }
- if(id == 3){
- anticoagulant_name = "低分子肝素"
- }
- if(id == 4){
- anticoagulant_name = "阿加曲班"
- }
-
- if(id == 5){
- anticoagulant_name = "枸橼酸钠"
- }
- if(id == 6){
- anticoagulant_name = "低分子肝素钙"
- }
- if(id == 7){
- anticoagulant_name = "低分子肝素钠"
- }
- if(id == 8){
- anticoagulant_name = "依诺肝素"
- }
-
- if(id == 9){
- anticoagulant_name = "达肝素"
- }
- if(id == 10){
- anticoagulant_name = "体外抗凝"
- }
-
- if(id == 11){
- anticoagulant_name = "那屈肝素"
- }
- if(id == 12){
- anticoagulant_name = "无抗凝剂"
- }
-
- if(id == 13){
- anticoagulant_name = "那屈肝素钙"
- }
- if(id == 14){
- anticoagulant_name = "肝素钙注射液"
- }
- if(id == 15){
- anticoagulant_name = "甲磺酸萘莫司他"
- }
-
- return anticoagulant_name
- },
- getTime (time) {
- return uParseTime(time, '{y}-{m}-{d}')
- },
- getTimeOne (time) {
- return uParseTime(time, '{y}-{m}-{d}')
- },
-
- newcontent(val){
- this.new_content =''
- this.new_content = val
- // console.log('1111112323',this.new_content);
- this.$refs.editor.contents = this.new_content
- }
- },
-
- }
- </script>
-
- <style rel="stylesheet/css" lang="scss" scoped>
- .container {
- margin-left: 180px;
- padding: 20px;
- background: #fff;
- min-height: calc(100vh - 173px);
- margin-bottom: 15px;
-
- .record {
- padding-top: 20px;
- }
-
- }
- .record_content_panel {
- border-width: 1px;
- border-style: solid;
- border-color: #ebeef5;
- min-height: 200px;
-
- .title {
- font-size: 14px;
- font-weight: 500;
- color: #909399;
- line-height: 44px;
- height: 44px;
- text-align: center;
- border-bottom-width: 1px;
- border-bottom-style: solid;
- border-bottom-color: #ebeef5;
- }
-
- .content {
- padding: 12px 15px;
- font-size: 15px;
- color: gray;
- line-height: 22px;
- }
-
- }
-
- .new_record_form {
-
- /*/ / padding: 10 px, 25 px;*/
-
- .textarea_panel {
- margin-top: 10px;
- }
-
- }
- .eldialog{
- .el-dialog{
- .el-dialog__body{
- max-height: calc(100vh - 80px) !important;
- padding: 0px 20px;
- }
- }
-
- }
- .Second_title{
- border-left: 5px solid #3891f1f5;
- text-align: left;
- padding-left: 5px;
- // margin-left: 10px;
- margin-bottom: 5px;
- font-size: 16px;
- }
-
- .text_margin{
- display: block;
- }
- </style>
- <style lang="scss">
- .el-table td,
- .el-table th.is-leaf,
- .el-table--border,
- .el-table--group {
- border-color: #d0d3da;
- }
- .el-table--border::after,
- .el-table--group::after,
- .el-table::before {
- background-color: #d0d3da;
- }
-
- .eldialog{
- .el-dialog{
- .el-dialog__body{
- max-height: calc(100vh - 80px) !important;
- padding: 0px 20px;
- }
- }
-
- }
- .lirary{
- .el-dialog__body{
- padding: 0px 20px !important;
- }
- .el-dialog__footer{
- text-align: center;
- }
- }
- .course{
- .el-dialog{
- height: 90%;
- // position: fixed !important;
- // top: 10% !important;
- }
- }
- </style>
|