123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134 |
- <template>
- <div class="patient-container">
- <!-- <patient-sidebar :id="patient_id" defaultActive="3-1"></patient-sidebar> -->
- <PatientSidebar :id="patient_id" defaultActive="3-4"></PatientSidebar>
- <!-- <div class="app-container"> -->
- <div v-loading="loading">
- <div class="patient-app-container advice-container app-container">
- <div style="display: flex;">
- <div style="width: 25%;">
- <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="record_table"
- :data="tableData"
- :highlight-current-row="true"
- @current-change="getCurrentChange"
- style="width: 100%">
- <el-table-column prop="index" label="序号" width="50" align="center">
- <template slot-scope="scope">
- {{ scope.$index + 1 }}
- </template>
- </el-table-column>
- <el-table-column prop="date" label="时间" width="" align="center">
- <template slot-scope="scope">
- {{ getTime(scope.row.record_time) }}
- </template>
- </el-table-column>
- <el-table-column prop="doctor" label="医生" align="center">
- <template slot-scope="scope">
- {{ getDocName(scope.row.doctor_id) }}
- </template>
- </el-table-column>
- </el-table>
- </div>
- </div>
- <div style="width: 75%;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="printOne">打印</el-button>
- </div>
- <div v-if="add_index == 1">
- <el-button type="primary" size="small" @click="createAction">保存</el-button>
- <el-button size="small" @click="showCancel">取消</el-button>
- </div>
- </div>
- </div>
- <div style="display: flex;margin: 20px 0;">
- <div style="flex: 1;">
- 日期:
- <el-date-picker
- v-model="start_time"
- type="date"
- format="yyyy-MM-dd"
- :disabled="disabled"
- style="width: 150px;"
- value-format="yyyy-MM-dd"
- placeholder="选择日期">
- </el-date-picker>
- </div>
- <div style="flex: 1;">
- 肾移植史:
- <el-select v-model="shen_yizhi" placeholder="请选择" style="width: 120px;" :disabled="disabled">
- <el-option
- v-for="item in yizhi_options"
- :key="item.value"
- :label="item.label"
- :value="item.value">
- </el-option>
- </el-select>
- </div>
- <div style="flex: 1;">
- 腹膜透析史:
- <el-select v-model="shen_fumo" placeholder="请选择" style="width: 120px;" :disabled="disabled">
- <el-option
- v-for="item in yizhi_options"
- :key="item.value"
- :label="item.label"
- :value="item.value">
- </el-option>
- </el-select>
- </div>
- </div>
- <div style="display: flex;">
- <div style="width: 30%;">
- 医生:
- <el-select v-model="admin_user_id" placeholder="请选择" style="width: 120px;" :disabled="disabled">
- <el-option
- v-for="item in doctorOptions"
- :key="item.admin_user_id"
- :label="item.user_name"
- :value="item.admin_user_id">
- </el-option>
- </el-select>
- </div>
- <div style="width: 30%;">
- 过敏药物:
- <el-select v-model="shen_guomi" placeholder="请选择" style="width: 120px;" :disabled="disabled">
- <el-option
- v-for="item in guomi_options"
- :key="item.value"
- :label="item.label"
- :value="item.value">
- </el-option>
- </el-select>
- </div>
- <div style="width: 50%;" v-if="shen_guomi == 2" >
- 过敏药物备注: <el-input v-model="guominyaowu_desc" style="width: 300px;"></el-input>
- </div>
- </div>
-
- <div style="margin-top: 15px;">
- <span style="display: inline-block;border-left: 5px solid #3891f1f5;padding-left: 5px;margin-bottom: 5px;">详情</span>
- <keep-alive>
- <ueditor ref="editor" :content="new_content" id="editors" :disabled="disabled"></ueditor>
- </keep-alive>
- </div>
- <div style="text-align: right;margin-top:10px ;">
- <el-button type="primary" size="small" @click="template_click">
- {{ add_index == 0 ? '设置模板' : '模板库' }}
- </el-button>
- </div>
- </div>
- </div>
-
- </div>
-
-
- <el-dialog
- title="设置模板"
- :visible.sync="template_dialog"
- width="20%"
- center>
- <div>
- 模板名称:
- <el-input v-model="template_name" 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
- ref="record_table_one"
- :data="templateList"
- :highlight-current-row="true"
- @current-change="getCurrentChangeOne"
- style="width: 100%">
- <el-table-column prop="index" label="序号" width="" align="center">
- <template slot-scope="scope">
- {{ scope.$index + 1 }}
- </template>
- </el-table-column>
- <el-table-column prop="name" label="模板名称" width="" align="center">
- <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>
- </div>
- <!-- 打印 -->
- <div style="display: none;">
- <div id="Physical_print_content" style="font-size: 14px;">
- <div style="width: 100%;text-align: center;margin-bottom: 10px;">
- <h2>{{orgname}}</h2>
- </div>
- <div style="display: flex;padding: 5px 0;border-bottom: 1px solid black;">
- <div style="flex: 1;">姓名:</div>
- <div style="flex: 1;">病历号:</div>
- <div style="flex: 1;">病区-床号:</div>
- <div style="flex: 1;">接收日期:</div>
- </div>
- <div style="display: flex;margin: 5px;">
- <div style="flex: 1;">性别:</div>
- <div style="flex: 1;">年龄:岁 出生日期:</div>
- <div style="flex: 1;">身份证号:340223194809195837</div>
- </div>
- <div style="display: flex;margin: 5px;">
- <div style="flex: 1;">病人来源:</div>
- <div style="flex: 1;">透析号:</div>
- <div style="flex: 1;">首次透析日期:</div>
- </div>
- <div style="display: flex;margin: 5px;">
- <div style="flex: 1;">报销方式:</div>
- <div style="flex: 1;">工作单位:</div>
- <div style="flex: 1;">联系电话:</div>
- </div>
- <div style="display: flex;margin: 5px;">
- <div style="flex: 1;">过敏药物:</div>
- <div style="flex: 1;">肾移植史:</div>
- <div style="flex: 1;">腹膜透析史:</div>
- </div>
- <div style="display: flex;margin: 5px;">
- <div style="flex: 1;">家庭住址: </div>
- <!-- <div style="flex: 1;"></div>
- <div style="flex: 1;"></div> -->
- </div>
- <div style="font-size: 20px;font-weight: bold;text-align: center;margin: 10px;">病史内容</div>
- <div v-html="template_content"></div>
- <div class="content" style="margin-top: 20px;">
- <div style="text-align: center;font-size: 20px;font-weight: bold;margin: 10px;">体格检查单</div>
- <div style="display: flex;justify-content: space-around;padding: 5px;">
- <div style="">T:</div>
- <div style="">P:</div>
- <div style="">R:</div>
- <div style="">BP:</div>
- </div>
- <div >
- <span >{{ }}贫血容貌,</span>
- <span>{{ }}体位,</span>
- <span>{{ }}浮肿,</span>
- <span>出血点/瘀斑/血肿:{{ }},</span>
- <span>发育{{ }},</span>
- <span>营养{{ }},</span>
- <span>神志{{ }}</span> <br/>
-
- <span style="font-weight: bold;">皮肤黏膜:</span>
- <span>皮肤黏膜{{ }},</span>
- <span>{{ }}皮下出血,</span>
- <span>{{ }}紫癜,</span>
- <span>皮肤温度:{{ }}</span><br/>
- <span style="font-weight: bold;">淋巴结:</span>
- <span>浅表淋巴肿大:{{ }}</span>
- <span>部位:{{ }}</span>
- <br/>
- <span style="font-weight: bold;">头部:</span>
- <span>眼睑{{ }}</span>
- <span>瞳孔(等大等圆):{{ }}</span>
- <span>左(mm):{{ }}</span>
- <span>右(mm):{{ }}</span>
- <span>对光反射:{{ }}</span>
- <span>扁桃体:{{ }}</span>
- <span>咽部:{{ }}</span>
- <span>其他:{{ }}</span><br/>
- <span style="font-weight: bold;">颈部:</span>
- <span>颈静脉:{{ }}</span>
- <span>甲状腺:{{ }}</span>
- <span>其他:{{ }}</span><br/>
-
- <span style="font-weight: bold;"> 肺脏:</span>
- <span>呼吸音:{{ }}</span>
- <span>胸膜摩擦音:{{ }}</span>
- <span>部位:{{ }}</span>
- <span>啰音:{{ }}</span>
- <span>描述:{{ }}</span><br/>
- <span style="font-weight: bold;">心脏:</span>
- <span>心脏大小:{{ }}</span>
- <span>心律:{{ }}</span>
- <span>心包摩擦声:{{ }}</span>
- <span>杂音:{{ }}</span>
- <span>附加音:{{ }}</span>
- <span>描述:{{ }}</span><br/>
- <span style="font-weight: bold;">腹部:</span>
- <span>腹水征:{{ }}</span>
- <span>肝颈静脉返流征:{{ }}</span>
- <span>肝脏(压痛):{{ }}</span>
- <span>肝脏(叩痛):{{ }}</span>
- <span>脾脏(压痛):{{ }}</span>
- <span>脾脏(叩痛):{{ }}</span>
- <span>肾脏(压痛):{{ }}</span>
- <span>肾脏(叩痛):{{ }}</span>
- <span>描述:{{ }}</span><br/>
- <span style="font-weight: bold;">其他:</span>
- <span>{{ }}</span>
-
- </div>
- </div>
- <div style="text-align: right;">
- <span>病历书写者:</span>
- <span>日期:</span>
- </div>
- </div>
- </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 { fetchMoibleAllDoctorAndNurse } from "@/api/doctor";
- import print from 'print-js'
- import {
- createNewSickHistoryRecord,
- deleteNewSickHistory,
- getNewSickHistory,
- ModifySickHistoryRecord,
- saveSickHistoryTemplate,
- getSickHistoryTempalate,
- modifySickHistoryTemplate,
- deleteSickHistoryTempalte,
- fetchPatient,
- } from '@/api/patient'
- import { parseTime } from '@/utils'
- import BreadCrumb from '@/xt_pages/components/bread-crumb'
- import { uParseTime } from '@/utils/tools'
- import { getDataConfig } from "@/utils/data";
- export default {
- name: 'CourseOfDisease',
- components: {
- PatientSidebar,
- BreadCrumb,
- Editor,
- ueditor,
- PatientSidebar_new
- },
- data() {
- return {
- loading: false,
- title: '',
- patient_id: 0,
- date: [],
- start_time: '',
- end_time: '',
- sick_history_time: '',
- is_shenyizhishi:'',
- is_fumotouxishi:'',
- is_guominyaowu:'',
- guominyaowu_desc:"",
-
- edit_is_shenyizhishi:'',
- edit_is_fumotouxishi:'',
- edit_is_guominyaowu:'',
- edit_guominyaowu_desc:"",
-
- doctor_id:"",
- doctorOptions:null,
- records: [],
- doctors: [],
- current_select_record: null,
- show_dialog: false,
- show_edit_dialog: false,
- uploading_new_record: false,
- templates: this.$store.getters.configlist.sick_history,
- select_template:"",
- new_content: "",
- edit_new_content: '',
- edit_sick_history_time: '',
- selectingRows: [],
- table_current_index: -1,
- edit_current_id: 0,
- edit_doctor_id:0,
- edit_title: '',
- ids:"",
- idArr:[],
-
- add_index:0,
- disabled:true,
- history_date:'',
- shen_yizhi:'',
- shen_fumo:'',
- shen_yishen:'',
- shen_guomi:'',
- template_name:'',
- template_dialog:false,
- library_dialog:false,
-
- yizhi_options:[{value:1,label:'无'},{value:2,label:'有'}],
- yishen_options:[],
- guomi_options:[{value:1,label:'无'},{value:2,label:'有'},{value:3,label:'不详'}],
- tableData:[],
- admin_user_id:"",
- templateList:[],
- template_content:"",
- template_id:0,
- form:{},
- wayOptions: null,
- patientVascularAccessOne:{},
- orgname:'',
- ids:[]
- }
- },
- created() {
- this.orgname = this.$store.getters.xt_user.org.org_name;
-
-
- this.fetchAllDoctorAndNurse()
- this.wayOptions = getDataConfig("patient", "reimbursement_ways");
- console.log('this.wayOptions',this.wayOptions);
-
- this.admin_user_id = this.$store.getters.xt_user.user.id
-
- if(this.admin_user_id == 0){
- this.admin_user_id = ""
- }
- this.patient_id = parseInt(this.$route.query.id)
-
- if (isNaN(this.patient_id) || this.patient_id <= 0) {
- this.$notify.error({
- title: '错误',
- message: '无效的id'
- })
- this.$router.push('/patients/patients')
- return
- }
- var now = new Date()
- this.date = [now.getTime() - (7 * 24 * 60 * 60 * 1000), now.getTime()]
-
- var nowDate = new Date()
- var nowYear = nowDate.getFullYear()
- var nowMonth = nowDate.getMonth() + 1
- var nowDay = nowDate.getDate()
- this.end_time =
- nowYear +
- '-' +
- (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
- '-' +
- (nowDay < 10 ? '0' + nowDay : nowDay)
- nowDate.setMonth(nowDate.getMonth() - 1)
- nowYear = nowDate.getFullYear()
- nowMonth = nowDate.getMonth() + 1
- nowDay = nowDate.getDate()
- this.start_time =
- nowYear +
- '-' +
- (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
- '-' +
- (nowDay < 10 ? '0' + nowDay : nowDay)
- this.getlist()
- this.fetchPatient(this.patient_id)
-
- },
- methods: {
- printOne(){
- if(this.ids.length == 0){
- this.$message.error('请选择要打印的病程')
- return
- }
- this.$router.push({ path: "/sickhistory/print?ids="+this.ids+"&patient_id="+this.patient_id});
- },
- template_dele(){
- console.log("hahhahahah",this.template_id)
- if(this.template_id == 0){
- this.$message.error("默认模版不能删除!")
- return false
- }
- deleteSickHistoryTempalte(this.template_id).then(response=>{
- if(response.data.state == 1){
- var msg = response.data.data.msg
- this.$message.success("删除成功!")
- this.getSickHistoryTempalateOne()
- }
- })
- },
- getSickHistoryTempalateOne(){
- getSickHistoryTempalate().then(response=>{
- if(response.data.state == 1){
-
- this.templateList = []
- this.templateList = response.data.data.templateList
- if(this.templateList!=null && this.templateList.length>0){
- this.$refs.record_table_one.setCurrentRow(this.templateList[0])
- }
- }
- })
- },
- 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
- },
- showSave(){
- this.disabled = true
- this.add_index = 0
- },
- showCancel(){
- this.disabled = true
- this.add_index = 0
- },
- rowclick(row,column, eventc){
- console.log('row',row);
- this.edit_index = row.index
- },
- template_click(){
-
- console.log('this.add_index',this.getwayoption(this.form.reimbursement_way_id));
- if(this.add_index ==0){
- this.template_dialog = true
- }else{
- const mode=`<p style="font-size: 18px;font-weight: 600;width:100%;margin-bottom: 10px;text-align: center;">血液净化治疗患者首次门诊病历</p>
- <table border="1" style="border-collapse: collapse;text-align: center;">
- <tbody>
- <tr>
- <td style="width:8%;padding: 5px 0px;font-size: 16px;">
- 姓名
- </td>
- <td style="padding: 5px 0px;font-size: 16px;width:15%;">
- ${this.form.name}
- </td>
- <td style="padding: 5px 0px;font-size: 16px;width:7%;">
- 性别
- </td>
- <td style="padding: 5px 0px;font-size: 16px;width:5%;">
- ${this.form.gender==1 ? '男':'女'}
- </td>
- <td style="padding: 5px 0px;font-size: 16px;width:8%;">
- 年龄
- </td>
- <td style="padding: 5px 0px;font-size: 16px;width:10%;">
- ${this.form.age}岁
- </td>
- <td style="padding: 5px 0px;font-size: 16px;width:12%;">
- 医保类型
- </td>
- <td style="padding: 5px 0px;font-size: 16px;width: 15%;">
- ${this.getwayoption(this.form.reimbursement_way_id)}
- </td>
- <td style="padding: 5px 0px;font-size: 16px;width:10%;">
- 透析号
- </td>
- <td style="padding: 5px 0px;font-size: 16px;width:10%;">
- ${this.form.dialysis_no}
- </td>
- </tr>
- <tr>
- <td style="padding: 5px 0px;font-size: 16px;">
- 电话
- </td>
- <td style="padding: 5px 0px;font-size: 16px;">
- ${this.form.phone}
- </td>
- <td style="padding: 5px 0px;font-size: 16px;">
- 民族
- </td>
- <td colspan="3" style="padding: 5px 0px;font-size: 16px;">
- ${this.form.nation}
- </td>
- <td style="padding: 5px 0px;font-size: 16px;">
- 身份证号
- </td>
- <td colspan="3" style="padding: 5px 0px;font-size: 16px;">
- ${this.form.id_card_no}
- </td>
- </tr>
- <tr>
- <td style="padding: 5px 0px;font-size: 16px;">
- 联系人
- </td>
- <td style="padding: 5px 0px;font-size: 16px;">
- ${this.form.contact_name}
- </td>
- <td style="padding: 5px 0px;font-size: 16px;">
- 电话
- </td>
- <td colspan="3" style="padding: 5px 0px;font-size: 16px;">
- ${this.form.home_telephone}
- </td>
- <td style="padding: 5px 0px;font-size: 16px;">
- 联系地址
- </td>
- <td colspan="3" style="padding: 5px 0px;font-size: 16px;">
- ${this.form.home_address}
- </td>
- </tr>
- <tr>
- <td colspan="2" style="padding: 5px 0px;font-size: 16px;">
- 首次透析时间
- </td>
- <td colspan="4" style="padding: 5px 0px;font-size: 16px;">
- ${this.getTime(this.form.first_dialysis_date)}
- </td>
- <td style="padding: 5px 0px;font-size: 16px;">
- 血管通路
- </td>
- <td colspan="3" style="padding: 5px 0px;font-size: 16px;">
- ${this.patientVascularAccessOne.blood_access_part_id } ${ this.patientVascularAccessOne.blood_access_part_opera_id }
- </td>
- </tr>
-
- <tr>
- <td style="padding: 5px 0px;font-size: 16px; ">
- 主诉
- </td>
- <td colspan="9" style="text-align: left; padding:0px 5px ;font-size: 16px;">
- ${this.form.patient_complains}
- </td>
- </tr>
- <tr>
- <td>
- <div class="td_proj_title">现<br />病<br />史</div>
- </td>
- <td colspan="9">${this.form.present_history}</td>
- </tr>
- <tr>
- <td>
- <div class="td_proj_title">既<br />往<br />史</div>
- </td>
- <td colspan="9">${this.form.past_history}</td>
- </tr>
- <tr>
- <td>
- <div class="td_proj_title">过敏史</div>
- </td>
- <td colspan="5">${this.form.allergic_history}</td>
- <td>
- <div class="td_proj_title">家族史</div>
- </td>
- <td colspan="3">${this.form.famality_record}</td>
- </tr>
-
- <tr>
- <td colspan="10"><div class="td_proj_title">体格检查</div></td>
- </tr>
- <tr>
- <td colspan="10">
- T:${this.form.temperature}℃ P:${this.form.pulse}次/分 R:${this.form.respiratory}次/分 BP:${this.form.sbp}/${this.form.dbp}mmHg
- </td>
- </tr>
- <tr>
- <td colspan="10">${this.form.remark}</td>
- </tr>
- <tr>
- <td style="width: 15%;">
- <div class="td_proj_title">辅助检查</div>
- </td>
- <td colspan="9">
- <p style='min-height:30px'></p>
- </td>
- </tr>
- <tr>
- <td>
- <div class="td_proj_title">诊<br />断</div>
- </td>
- <td colspan="9">${this.form.diagnose}</td>
- </tr>
- <tr>
- <td>
- <div class="td_proj_title">诊<br />疗<br />计<br />划</div>
- </td>
- <td colspan="9"><p>${this.form.treatment_plan}</p></td>
- </tr>
- </tbody>
- </table>`
- const obj={
- id:0,
- title:'病史模板',
- status:1,
- content:mode,
- ctime:parseFloat((new Date()).getTime()/1000).toFixed(0),
- mtime: parseFloat((new Date()).getTime()/1000).toFixed(0),
- }
- const arr = []
- arr.push(obj)
- console.log('1111',arr);
- getSickHistoryTempalate().then(response=>{
- if(response.data.state == 1){
- this.library_dialog = true
- this.templateList = response.data.data.templateList
- this.templateList = this.templateList.concat(arr)
- // this.templateList.unshift(obj)
- console.log("hahhahahaha",this.$refs)
- if(this.templateList!=null && this.templateList.length>0){
- this.$nextTick(()=>{
- this.$refs.record_table_one.setCurrentRow(this.templateList[0])
- })
- }
- console.log("haaaaaaaaaaaaa",this.templateList)
- }
- })
-
- // this.templateList.push(obj)
-
- console.log('11111111',obj);
-
- }
- },
- template_save(){
- var params = {
- template_id:this.template_id,
- content:this.$refs.editorOne.contents
- }
- modifySickHistoryTemplate(params).then(response=>{
- if(response.data.state == 1){
- var msg = response.data.data.msg
- this.$message.success("保存成功!")
- this.template_dialog = false
- }
- })
-
-
- },
- prints(){
- const style ='@media print{.content{width:960px;margin:0 auto;}}'
- printJS({
- printable: 'Physical_print_content',
- type: 'html',
- style: style,
- scanStyles: false
- })
- },
-
- fetchAllDoctorAndNurse() {
- fetchMoibleAllDoctorAndNurse().then(response => {
- if (response.data.state == 1) {
- this.doctorOptions= []
- this.doctorOptions = response.data.data.doctors;
- }
- });
- },
-
- 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}')
- },
- modifyAction: function() {
- this.edit_new_content = this.$refs.edit_neditor.content
- if (this.edit_new_content.length == 0) {
- this.$message.error('请填写病程内容')
- return
- }
- if(this.admin_user_id == 0){
- this.$message.error('请选择医生')
- return
- }
- if(this.start_time==""){
- this.$message.error('请选择时间')
- return
- }
- this.uploading_new_record = true
- if(this.shen_yizhi == ""){
- this.shen_yizhi = 0
- }
- if(this.shen_fumo == ""){
- this.shen_fumo = 0
- }
- if(this.shen_guomi == ""){
- this.shen_guomi = 0
- }
-
- if(this.admin_user_id == ""){
- this.admin_user_id = 0
- }
-
- let params = {
- id:this.id,
- patient_id: this.patient_id,
- content: this.new_content,
- record_time: this.sick_history_time +" 00:00:00",
- title: this.title,
- is_shenyizhishi:this.shen_yizhi,
- is_fumotouxishi:this.shen_fumo,
- is_guominyaowu:this.shen_guomi,
- guominyaowu_desc:this.guominyaowu_desc,
- doctor_id: this.admin_user_id
- }
-
- ModifySickHistoryRecord(params).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.records[this.table_current_index].doctor_id = resp.data.record.doctor_id
- this.records[this.table_current_index].is_shenyizhi_history = resp.data.record.is_shenyizhi_history
- this.records[this.table_current_index].is_fumo_dialysis_history = resp.data.record.is_fumo_dialysis_history
- this.records[this.table_current_index].is_hypersusceptibility = resp.data.record.is_hypersusceptibility
- this.records[this.table_current_index].hypersusceptibility_desc = resp.data.record.hypersusceptibility_desc
- 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)
- })
-
- },
-
- createAction: function() {
-
- console.log("hhhhhhhhhhhhhhhhhh",this.$refs)
- this.new_content = this.$refs.editor.contents
- if (this.new_content.length == 0) {
- this.$message.error('请填写病程内容')
- return
- }
- if(this.admin_user_id == 0){
- this.$message.error('请选择医生')
- return
- }
- if(this.start_time == ""){
- this.$message.error('请选择时间')
- return
- }
- if(this.shen_yizhi == ""){
- this.shen_yizhi = 0
- }
- if(this.shen_fumo == ""){
- this.shen_fumo = 0
- }
- if(this.shen_guomi == ""){
- this.shen_guomi = 0
- }
- if(this.admin_user_id == ""){
- this.admin_user_id = 0
- }
-
- let params = {
- id:this.id,
- patient_id: this.patient_id,
- content: this.new_content,
- record_time: this.start_time,
- title: this.title,
- is_shenyizhishi:this.shen_yizhi,
- is_fumotouxishi:this.shen_fumo,
- is_guominyaowu:this.shen_guomi,
- guominyaowu_desc:this.guominyaowu_desc,
- doctor_id: this.admin_user_id
- }
-
- createNewSickHistoryRecord(params).then(response => {
- if(response.data.state == 1){
- var patientSickHistory = response.data.data.patientSickHistory
- this.$message.success("保存成功!")
- this.getlist()
- this.add_index = 0
- this.disabled = true
- }
- }).catch(error => {
- this.uploading_new_record = false
- this.$message.error(error)
- })
- },
- 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(() => {
- deleteNewSickHistory(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
- },
-
- getlist(){
- var params = {
- patient_id:this.patient_id
- }
- getNewSickHistory(params).then(response=>{
- if(response.data.state ==1 ){
- var list = response.data.data.list
- this.tableData = list
- this.$refs.record_table.setCurrentRow(this.tableData[0])
- }
- })
- },
- getDocName(admin_user_id){
- var user_name = ""
- for(let i=0;i<this.doctorOptions.length;i++){
- if(admin_user_id == this.doctorOptions[i].admin_user_id){
- user_name = this.doctorOptions[i].user_name
- }
- }
- return user_name
- },
- getTime (time) {
- if(time <0){
- return ""
- }else{
- return uParseTime(time, '{y}-{m}-{d}')
- }
-
- },
- getCurrentChange(val){
-
- this.ids = []
- this.ids.push(val.id)
- this.$refs.editor.contents = val.content
- this.record_time = this.getTime(val.record_time)
- this.id = val.id
- this.guominyaowu_desc = val.hypersusceptibility_desc
- if(val.is_fumo_dialysis_history>0){
- this.shen_fumo = val.is_fumo_dialysis_history
- }else{
- this.shen_fumo = ""
- }
- if(val.is_shenyizhi_history>0){
- this.shen_yizhi = val.is_shenyizhi_history
- }else{
- this.shen_yizhi = ""
- }
- if(val.is_hypersusceptibility>0){
- this.shen_guomi = val.is_hypersusceptibility
- }else{
- this.shen_guomi = ""
- }
-
- this.patient_id = val.patient_id
- this.admin_user_id = val.doctor_id
- if(this.admin_user_id == 0){
- this.admin_user_id = ""
- }
-
- this.start_time = this.getTime(val.record_date)
-
- },
- getCurrentChangeOne(val){
-
-
- this.$refs.editorOne.contents = val.content
- this.template_content = ""
- this.template_content = val.content
- this.template_id = ""
- this.template_id = val.id
- },
- saveTemplate(){
-
- var params = {
- title:this.template_name,
- content: this.$refs.editor.contents,
- }
- saveSickHistoryTemplate(params).then(response=>{
- if(response.data.state == 1){
- var sickHistoryTemplate = response.data.data.sickHistoryTemplate
- this.$message.success("保存成功!")
- this.template_dialog = false
- }
- })
- },
- toContentPint(){
- this.$refs.editor.contents = this.template_content
- this.library_dialog = false
- },
- fetchPatient(id) {
- fetchPatient(id).then((response) => {
- console.log('fetchPatient11111',response.data.data);
- if(response.data.state ==1){
- this.form = response.data.data.patient;
- this.patientVascularAccessOne = response.data.data.patientVascularAccessOne
- }
- })
- .catch((err) => {
- console.log("patient get err", err);
- this.$notify.error({
- title: "错误",
- message: "网络异常",
- });
- this.$router.push("/patients/patients");
- });
- },
- getwayoption(id){
- if(id != 0){
- for(let i in this.wayOptions){
- if(id == this.wayOptions[i].id){
- console.log('22222',this.wayOptions[i].name);
- return this.wayOptions[i].name
- }
- }
- }else{
- return ''
- }
-
- }
- }
- }
- </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;
- }
-
- }
- .Second_title{
- border-left: 5px solid #3891f1f5;
- text-align: left;
- padding-left: 5px;
- // margin-left: 10px;
- margin-bottom: 5px;
- font-size: 16px;
- }
- </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;
- }
- .lirary{
- .el-dialog__body{
- padding: 0px 20px !important;
- }
- .el-dialog__footer{
- text-align: center;
- }
- }
- </style>
|