1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168 |
- <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"></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:[]
- }
- },
- 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(){
-
- // this.$nextTick(()=>{
- // const iframeDoc = document.getElementsByClassName('edui-editor-iframeholder')[0].getElementsByTagName('iframe')[0].contentDocument.getElementsByTagName('tbody')[0].children[9].children[1]
- // var newListArr =[]
- // for(let j in this.tab){
- // const obj={
- // id:this.tab[j].id,
- // newlist:'newList'+j
- // }
- // newListArr.push(obj)
- // }
- // for(let i in this.tab){
- // for(let j in newListArr){
- // if(this.tab[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.tab[i].name;
- // newListItem2.textContent = this.tab[i].type;
- // newListItem3.textContent = this.tab[i].start;
- // newListItem4.textContent = this.tab[i].dosage;
- // newListItem5.textContent = this.tab[i].pinlv;
- // newListItem6.textContent = this.tab[i].status;
- // 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 = response.data.data.groupPrescriptionList
-
- 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>
|