1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318 |
- <template>
- <div class="patient-container">
- <patient-sidebar :id="patient_id" defaultActive="1-11"></patient-sidebar>
- <div v-loading="loading">
- <div class="patient-app-container advice-container app-container">
-
- <div>
- <span style="margin-left: 10px;float:right;">
- <el-button type="primary" icon="el-icon-circle-plus-outline" size="small"
- @click="addAction">新增</el-button>
-
- <el-button type="primary" icon="el-icon-edit-outline" size="small"
- @click="toEdit">修改</el-button>
- <el-button type="primary" icon="el-icon-printer" size="small"
- @click="print">打印</el-button>
- <el-button size="small" type="danger" @click="deleteAction">删除</el-button>
- </span>
- </div>
-
- <div class="cell clearfix">
- <label class="title"><span class="name">日期查询</span> : </label>
- <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
- type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
- value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
- <span class="">-</span>
- <el-date-picker v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
- type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
- value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
- </div>
- <div class="record">
- <el-row :gutter="15">
- <el-col :span="10">
- <el-table :header-cell-style="{
- backgroundColor: 'rgb(245, 247, 250)',
- color: '#606266'
- }"
- :row-style="{ color: '#303133' }" ref="monthlyPlanTable" :data="tableData"
- border highlight-current-row @current-change="changeCurrentRecordTwo"
- @selection-change="selectSummary"
- :row-class-name="tableRow"
- >
- <el-table-column type="selection" width="60" align="center"></el-table-column>
- <el-table-column label="标题" align="center">
- <template slot-scope="scope">
- {{scope.row.title}}
- </template>
- </el-table-column>
- <el-table-column label="记录日期" align="center">
- <template slot-scope="scope">
- {{getTimeOne(scope.row.record_date)}}
- </template>
- </el-table-column>
- <el-table-column label="记录医师" align="center">
- <template slot-scope="scope">
- {{getDoctor(scope.row.doctor)}}
- </template>
- </el-table-column>
- </el-table>
- </el-col>
- <el-col :span="14">
- <div class="record_content_panel">
- <div style="background-color:rgb(245, 247, 250)" class="title">首次病程内容</div>
- <div style="padding:10px;border-bottom:1px solid #DCDFE6;word-break: break-all;word-wrap: break-word">标题:
- {{hosDetail.title}}
- </div>
-
-
- <div
- style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;
- word-break: break-all;word-wrap: break-word">
- 记录医师:
- {{getDoctor(hosDetail.doctor)}}
- </div>
-
-
-
- <div style="padding:10px;
- border-bottom:1px solid #DCDFE6;line-height:20px;
- word-break: break-all;word-wrap: break-word">主诉内容:
- <span v-html="hosDetail.main_content"></span>
- </div>
- <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;
- word-break: break-all;word-wrap: break-word">病例特点:
- <span v-html="hosDetail.patient_case"></span>
- <div>
- <div v-for="item in hosDetail.template_inspection_content">
- <p style="font-weight: bold;margin: 10px 0;">{{ item.project_name }} 检查日期:{{getTime(item.arr[0].inspect_date)}}</p>
- <div style="display:flex;flex-wrap: wrap;">
- <div v-for="it in item.arr" style="width:33%;margin-bottom:5px;">
- {{ it.item_name }} <span v-if="it.unit!=''">[{{it.unit}}]</span>:
- {{it.inspect_value}}
- <span v-if="parseInt(it.inspect_value) < parseInt(it.range_min)">
- ↓
- </span>
- <span v-if="parseInt(it.inspect_value) > parseInt(it.range_max)">
- ↑
- </span>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;
- word-break: break-all;word-wrap: break-word">初步诊断:
- <span v-html="hosDetail.tentative_diagnosis"></span>
- </div>
- <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;
- word-break: break-all;word-wrap: break-word">诊断依据:
- <span v-html="hosDetail.diagnostic_basis"></span>
- </div>
- <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;
- word-break: break-all;word-wrap: break-word">鉴别诊断:
- <span v-html="hosDetail.differential_diagnosis"></span>
- </div>
- <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;
- word-break: break-all;word-wrap: break-word">诊疗计划:
- <span v-html="hosDetail.treatment_plan"></span>
- </div>
-
- </div>
- </el-col>
- </el-row>
- </div>
- </div>
-
-
-
- <el-dialog title="新增首次病程记录" width="60%" top="5vh" :visible.sync="show_dialog">
- <div>
- <div class="new_record_form">
- <div class="cell clearfix">
- <label class="title"><span class="name">标题</span> : </label>
- <el-input v-model="form.title" style="width:200px"></el-input>
-
- <label class="title"><span class="name">记录医师</span>:</label>
- <el-select v-model="form.doctor" placeholder="请选择">
- <el-option
- v-for="item in doctorList"
- :key="item.admin_user_id"
- :label="item.user_name"
- :value="item.admin_user_id">
- </el-option>
- </el-select>
-
- <label class="title"><span class="name">记录日期</span> : </label>
- <el-date-picker v-model="form.record_date"
- prefix-icon="el-icon-date"
- style="width: 200px;"
- type="datetime" placeholder="选择日期时间" align="right" format="yyyy-MM-dd HH:mm"
- value-format="yyyy-MM-dd HH:mm">
- </el-date-picker>
- </div>
-
-
-
- <div class="cell clearfix" style="margin-top:10px">
- <label class="title"><span class="name">主诉内容</span> : </label>
- <el-select v-model="form.main_content_id" placeholder="可选择病程模板" @change="changeMainContent">
- <el-option v-for="(option, index) in mainContentList" :key="index" :label="option.title"
- :value="option.content"></el-option>
- </el-select>
-
- <div class="textarea_panel">
- <keep-alive>
- <editor ref="editor"
- id="editor"
- style="width: 800px"
- v-bind:r_content="form.main_content">
- </editor>
- </keep-alive>
- </div>
-
- <label class="title"><span class="name">病例特点</span> : </label>
- <el-select v-model="form.patient_case_id" placeholder="可选择病程模板" @change="changePatientCase">
- <el-option v-for="(option, index) in patientCaseList" :key="index" :label="option.title"
- :value="option.content"></el-option>
- </el-select>
-
- <el-button type="primary" @click="toInspection">选择检验检查</el-button>
-
- <div class="textarea_panel">
- <keep-alive>
- <editor ref="editorOne"
- id="editorOne"
- style="width: 800px"
- v-bind:r_content="form.patient_case">
- </editor>
- </keep-alive>
- </div>
-
- <div class="borderBox">
- <div v-for="item in form.patient_case_one">
- <p>{{ item.project_name }}</p>
- <div style="display:flex;flex-wrap: wrap;">
- <div v-for="it in item.arr" style="width:33%;">
- {{ it.item_name }} <span v-if="it.unit!=''"> [{{it.unit}}] </span>:
- {{it.inspect_value}}
- <span v-if="parseInt(it.inspect_value) < parseInt(it.range_min)">
- ↓
- </span>
- <span v-if="parseInt(it.inspect_value) > parseInt(it.range_max)">
- ↑
- </span>
- </div>
- </div>
- </div>
- </div>
-
- <label class="title"><span class="name">初步诊断</span> : </label>
- <el-select v-model="form.tentative_diagnosis_id" placeholder="可选择病程模板" @change="changeTentativeDiagnosis">
- <el-option v-for="(option, index) in tentativeDiagnosisList" :key="index" :label="option.title"
- :value="option.content"></el-option>
- </el-select>
-
- <div class="textarea_panel">
- <keep-alive>
- <editor ref="editorTwo"
- id="editorTwo"
- style="width: 800px"
- v-bind:r_content="form.tentative_diagnosis">
- </editor>
- </keep-alive>
- </div>
-
- <label class="title"><span class="name">诊断依据</span> : </label>
- <el-select v-model="form.diagnostic_basis_id" placeholder="可选择病程模板" @change="changeDiagnosticBasis">
- <el-option v-for="(option, index) in diagnosticBasisList" :key="index" :label="option.title"
- :value="option.content"></el-option>
- </el-select>
-
- <div class="textarea_panel">
- <keep-alive>
- <editor ref="editorThree"
- id="editorThree"
- style="width: 800px"
- v-bind:r_content="form.diagnostic_basis">
- </editor>
- </keep-alive>
- </div>
-
- <label class="title"><span class="name">鉴别诊断</span> : </label>
- <el-select v-model="form.differential_diagnosis_id" placeholder="可选择病程模板" @change="changeDifferentialDiagnosis">
- <el-option v-for="(option, index) in differentialDiagnosisList" :key="index" :label="option.title"
- :value="option.content"></el-option>
- </el-select>
-
- <div class="textarea_panel">
- <keep-alive>
- <editor ref="editorFour"
- id="editorFour"
- style="width: 800px"
- v-bind:r_content="form.differential_diagnosis">
- </editor>
- </keep-alive>
- </div>
-
- <label class="title"><span class="name">诊疗计划</span> : </label>
- <el-select v-model="form.treatment_plan_id" placeholder="可选择病程模板" @change="changeTreateMentContent">
- <el-option v-for="(option, index) in treateMentList" :key="index" :label="option.title"
- :value="option.content"></el-option>
- </el-select>
-
- <div class="textarea_panel">
- <keep-alive>
- <editor ref="editorFive"
- id="editorFive"
- style="width: 800px"
- v-bind:r_content="form.treatment_plan">
- </editor>
- </keep-alive>
- </div>
- </div>
-
-
- <div style="text-align: right; padding-right: 0px; padding-top: 10px; padding-bottom: 10px;">
- <el-button @click="show_dialog = false">取消</el-button>
- <el-button type="primary"
- @click="createAction" :loading="uploading_new_record">保存
- </el-button>
- </div>
- </div>
- </div>
- </el-dialog>
-
- <el-dialog title="编辑首次病程记录" width="60%" top="5vh" :visible.sync="edit_show_dialog">
- <div>
- <div class="new_record_form">
- <div class="cell clearfix">
- <label class="title"><span class="name">标题</span> : </label>
- <el-input v-model="form.title" style="width:200px"></el-input>
-
- <label class="title"><span class="name">记录医师</span>:</label>
- <el-select v-model="form.doctor" placeholder="请选择">
- <el-option
- v-for="item in doctorList"
- :key="item.admin_user_id"
- :label="item.user_name"
- :value="item.admin_user_id">
- </el-option>
- </el-select>
-
- <label class="title"><span class="name">记录日期</span> : </label>
- <el-date-picker v-model="form.record_date"
- prefix-icon="el-icon-date"
- style="width: 200px;"
- type="datetime" placeholder="选择日期时间" align="right" format="yyyy-MM-dd HH:mm"
- value-format="yyyy-MM-dd HH:mm">
- </el-date-picker>
-
-
- </div>
-
- <div class="cell clearfix" style="margin-top:10px">
- <label class="title"><span class="name">主诉内容</span> : </label>
- <el-select v-model="form.main_content_id" placeholder="可选择病程模板" @change="changeMainContent">
- <el-option v-for="(option, index) in mainContentList" :key="index" :label="option.title"
- :value="option.content"></el-option>
- </el-select>
-
- <div class="textarea_panel">
- <keep-alive>
- <editor ref="editorTen"
- id="editorTen"
- style="width: 800px"
- v-bind:r_content="form.main_content">
- </editor>
- </keep-alive>
- </div>
-
- <label class="title"><span class="name">病例特点</span> : </label>
- <el-select v-model="form.patient_case_id" placeholder="可选择病程模板" @change="changePatientCase">
- <el-option v-for="(option, index) in patientCaseList" :key="index" :label="option.title"
- :value="option.content"></el-option>
- </el-select>
- <el-button type="primary" @click="toInspection">选择检验检查</el-button>
-
- <div class="borderBox">
- <div v-for="item in form.patient_case_one">
- <p>{{ item.project_name }}</p>
- <div style="display:flex;flex-wrap: wrap;">
- <div v-for="it in item.arr" style="width:33%;">
- {{ it.item_name }} <span v-if="it.unit!=''"> [{{it.unit}}] </span>:
- {{it.inspect_value}}
- <span v-if="parseInt(it.inspect_value) < parseInt(it.range_min)">
- ↓
- </span>
- <span v-if="parseInt(it.inspect_value) > parseInt(it.range_max)">
- ↑
- </span>
- </div>
- </div>
- </div>
- </div>
- <div class="textarea_panel">
- <keep-alive>
- <editor ref="editorTenOne"
- id="editorTenOne"
- style="width: 800px"
- v-bind:r_content="form.patient_case">
- </editor>
- </keep-alive>
- </div>
-
- <label class="title"><span class="name">初步诊断</span> : </label>
- <el-select v-model="form.tentative_diagnosis_id" placeholder="可选择病程模板" @change="changeTentativeDiagnosis">
- <el-option v-for="(option, index) in tentativeDiagnosisList" :key="index" :label="option.title"
- :value="option.content"></el-option>
- </el-select>
-
- <div class="textarea_panel">
- <keep-alive>
- <editor ref="editorTenTwo"
- id="editorTenTwo"
- style="width: 800px"
- v-bind:r_content="form.tentative_diagnosis">
- </editor>
- </keep-alive>
- </div>
-
- <label class="title"><span class="name">诊断依据</span> : </label>
- <el-select v-model="form.diagnostic_basis_id" placeholder="可选择病程模板" @change="changeDiagnosticBasis">
- <el-option v-for="(option, index) in diagnosticBasisList" :key="index" :label="option.title"
- :value="option.content"></el-option>
- </el-select>
-
- <div class="textarea_panel">
- <keep-alive>
- <editor ref="editorTenThree"
- id="editorTenThree"
- style="width: 800px"
- v-bind:r_content="form.diagnostic_basis">
- </editor>
- </keep-alive>
- </div>
-
- <label class="title"><span class="name">鉴别诊断</span> : </label>
- <el-select v-model="form.differential_diagnosis_id" placeholder="可选择病程模板" @change="changeDifferentialDiagnosis">
- <el-option v-for="(option, index) in differentialDiagnosisList" :key="index" :label="option.title"
- :value="option.content"></el-option>
- </el-select>
-
- <div class="textarea_panel">
- <keep-alive>
- <editor ref="editorTenFour"
- id="editorTenFour"
- style="width: 800px"
- v-bind:r_content="form.differential_diagnosis">
- </editor>
- </keep-alive>
- </div>
-
- <label class="title"><span class="name">诊疗计划</span> : </label>
- <el-select v-model="form.treatment_plan_id" placeholder="可选择病程模板" @change="changeTreateMentContent">
- <el-option v-for="(option, index) in treateMentList" :key="index" :label="option.title"
- :value="option.content"></el-option>
- </el-select>
-
- <div class="textarea_panel">
- <keep-alive>
- <editor ref="editorTenFive"
- id="editorTenFive"
- style="width: 800px"
- v-bind:r_content="form.treatment_plan">
- </editor>
- </keep-alive>
- </div>
- </div>
-
- <div style="text-align: right; padding-right: 0px; padding-top: 10px; padding-bottom: 10px;">
- <el-button @click="edit_show_dialog = false">取消</el-button>
- <el-button type="primary"
- @click="updateAction" :loading="uploading_new_record">保存
- </el-button>
- </div>
- </div>
- </div>
- </el-dialog>
-
-
-
- <el-dialog
- title="提示"
- :visible.sync="dialogVisibleInspection"
- width="80%"
- >
- <span>
- <el-form>
- <el-row>
- <el-form-item>
- <span>选择检验检查时间:</span>
- <div>
-
- <el-form-item label="时间:">
- <el-radio-group style="padding: 10px;" v-model="radio" @change="changeRadio">
- <el-radio :label="1">月份</el-radio>
- <el-radio :label="2">季度</el-radio>
- </el-radio-group>
- </el-form-item>
- <el-form-item v-show="showquarty">
- <el-select v-model="quartype" placeholder="请选择" @change="changetype">
- <el-option
- v-for="item in quarterType"
- :key="item.id"
- :label="item.name"
- :value="item.id">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item v-show="showtime">
- <el-date-picker
- @change="changeYear"
- v-model="startYear"
- class="timePicker"
- type="month"
- placeholder=""
- format="yyyy-MM"
- value-format="yyyy-MM">
- </el-date-picker>
- </el-form-item>
-
- </div>
- </el-form-item>
- </el-row>
- <el-row>
- <span>选择检验检查项目:</span>
- <div class="record">
- <el-row :gutter="15">
- <el-col :span="10">
- <el-table :header-cell-style="{
- backgroundColor: 'rgb(245, 247, 250)',
- color: '#606266'
- }"
- :row-style="{ color: '#303133' }"
- ref="single_table"
- :data="tableList"
- border highlight-current-row
- @current-change="changeCurrentRecord"
- @selection-change="selectionChangeOne"
- :row-class-name="tableRow"
-
- >
- <el-table-column type="selection" width="60" align="center"></el-table-column>
- <el-table-column label="检验项目" align="center">
- <template slot-scope="scope">
- {{scope.row.project_name}}
- </template>
- </el-table-column>
- </el-table>
- </el-col>
- <el-col :span="14">
- <div class="record_content_panel">
- <el-table :header-cell-style="{
- backgroundColor: 'rgb(245, 247, 250)',
- color: '#606266'
- }"
- :row-style="{ color: '#303133' }" :data="tableData"
- border highlight-current-row
- :row-class-name="tableRow"
-
- >
- <el-table-column label="检验项目" align="center">
- <template slot-scope="scope">
- {{scope.row.item_name}}
- </template>
- </el-table-column>
- <el-table-column label="结果" align="center">
- <template slot-scope="scope">
- {{scope.row.inspect_value}}
- <span v-if="parseInt(scope.row.inspect_value) < parseInt(scope.row.range_min)">
- ↓
- </span>
- <span v-if="parseInt(scope.row.inspect_value) > parseInt(scope.row.range_max)">
- ↑
- </span>
- </template>
- </el-table-column>
- <el-table-column label="参考值" align="center">
- <template slot-scope="scope">
- {{scope.row.range_min}} ~ {{scope.row.range_max}}
- </template>
- </el-table-column>
- <el-table-column label="单位" align="center">
- <template slot-scope="scope">
- {{scope.row.unit}}
- </template>
- </el-table-column>
- </el-table>
- </div>
- </el-col>
- </el-row>
- </div>
- </el-row>
- </el-form>
-
- </span>
- <span slot="footer" class="dialog-footer">
- <el-button @click="dialogVisibleInspection = false">取 消</el-button>
- <el-button type="primary" @click="toContent">确 定</el-button>
- </span>
- </el-dialog>
- </div>
- </div>
- </template>
-
- <script>
- import PatientSidebar from './components/PatientSidebar'
- import Editor from '@/components/Editor'
-
- import {getInitDataList,getInspectionMajorItem,getInspectionDetail,getInspectionItemList,createFirstDisease,getFirstDiseaseList,getFirstDetail,updateFirstDisease,deleteFirstDisease} 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'
- import multiSelectBox from '../dialysis/details/dialog/MultiSelectBox'
- import MsgTip from '../dialysis/details/dialog/MsgTip'
- import { getAllDoctorList } from "@/api/device"
- const moment = require('moment')
- export default {
- name: 'hospitalSummary',
- components: {
- PatientSidebar,
- BreadCrumb,
- Editor,
- MsgTip,
- multiSelectBox,
- },
- data() {
- return {
- InnerDialogProps: {
- values: [],
- visibility: false,
- isShowTextArea: true,
- customContent: '',
- titles: '',
- type: '' // 不同弹框类型,用来匹配数据
- },
- loading: false,
- title: '',
- patient_id: 0,
- date: [],
- start_time: '',
- end_time: '',
- course_of_disease_time: '',
- records: [],
- doctors: [],
- current_select_record: null,
- show_dialog: false,
- show_edit_dialog: false,
- uploading_new_record: false,
- edit_show_dialog:false,
- mainContentList: this.$store.getters.configlist.main_content,
- patientCaseList:this.$store.getters.configlist.patient_case,
- tentativeDiagnosisList:this.$store.getters.configlist.tentative_diagnosis,
- diagnosticBasisList:this.$store.getters.configlist.diagnostic_basis,
- differentialDiagnosisList:this.$store.getters.configlist.differential_diagnosis,
- treateMentList:this.$store.getters.configlist.treatment_plan,
- select_template: '',
- new_content: '',
- edit_new_content: '',
- edit_course_of_disease_time: '',
- selectingRows: [],
- table_current_index: -1,
- edit_current_id: 0,
- edit_title: '',
- value:'',
- form:{
- id:0,
- title:"",
- doctor:this.$store.getters.xt_user.user.id,
- record_date:this.getTimeOne(new Date()),
- pathology:"",
- record_time:"",
- main_content_id:"",
- main_content:"",
- patient_case_id:"",
- patient_case:"",
- patient_case_one:"",
- tentative_diagnosis_id:"",
- tentative_diagnosis:"",
- diagnostic_basis_id:"",
- diagnostic_basis:"",
- differential_diagnosis_id:"",
- differential_diagnosis:"",
- treatment_plan_id:"",
- treatment_plan:"",
- radio:1,
- quarter:1,
- start_year:new Date(),
- start_month:new Date(),
- detai_id:0,
- },
- tableData:[],
- docList:[],
- doctorList:[],
- hosDetail:{},
- ids:"",
- patient:{},
- dialogVisibleInspection:false,
- quarterType: [
- { id: 1, name: "第一季度"},
- { id: 2, name: "第二季度"},
- { id: 3, name: "第三季度"},
- { id: 4, name: "第四季度"}
- ],
- quartype:1,
- radio:1,
- showtime:true,
- showquarty:false,
- startYear:moment(new Date()).endOf('month').subtract('month', +1).endOf('month').format("YYYY-MM-DD") ,
- start_date: moment(new Date()).startOf("month").format("YYYY-MM-DD"),
- end_date: moment(new Date()).endOf('month').format("YYYY-MM-DD"),
- summaryList:[],
- planList:[],
- tableList:[],
- projectList:[],
- inspectionList:[],
- org_id:0
- }
- },
- created() {
-
- this.patient_id = this.$route.params && this.$route.params.id
-
-
- 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()-1
- nowMonth = nowDate.getMonth() + 1
- nowDay = nowDate.getDate()
- this.start_time =
- nowYear +
- '-' +
- (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
- '-' +
- (nowDay < 10 ? '0' + nowDay : nowDay)
- this.other_start_time = nowYear +'-' +(nowMonth < 10 ? '0' + nowMonth : nowMonth) +'-' + (nowDay < 10 ? '0' + nowDay : nowDay)
-
- this.getAllDoctorList()
- this.getlist()
- this.getInspectionMajor()
- this.getInitDataList()
- },
- methods: {
- getTime(val) {
- if(val == "" || val == undefined){
- return ""
- }else {
- return uParseTime(val, '{y}-{m}-{d}')
- }
- },
-
- getTimeOne(val) {
- if(val == "" || val == undefined){
- return ""
- }else {
- return uParseTime(val, '{y}-{m}-{d} {h}:{i}')
- }
- },
-
- startTimeChange(val){
-
- this.start_time = val
- this.getlist()
- },
- endTimeChange(val){
- this.end_time = val
- this.getlist()
- },
- print(){
- this.$router.push({path:"/patient/patient/firstDisease/print?id="+this.form.id+"&patient_id="+this.patient_id})
- },
- tableRow(){
-
- },
- changeCurrentRecordTwo(row){
-
- this.form.id = 0
- if(row!=null){
- this.form.id = row.id
- this.getFirstDetail(row.id)
- }
- },
- changeCurrentRecord(val){
- this.tableData = []
- this.getInspectionDetai(val)
- },
- selectionChangeOne(val){
- this.getInspectionItemList(val)
- },
- getInspectionItemList(val){
- this.projectList = []
- this.inspectDataList = []
- for(let i=0;i<val.length;i++){
- this.projectList.push(val[i].project_id)
- this.inspectDataList.push(val[i].inspect_date)
- }
-
- },
- selectSummary(row){
- var arr = []
- for(let i=0;i<row.length;i++){
- arr.push(row[i].id)
- }
- var ids = arr.join(",")
- this.ids = ids
- },
-
- changeMainContent(content){
- this.form.main_content = content
- },
- changePatientCase(content){
- this.form.patient_case = content
- },
- changeTentativeDiagnosis(content){
- this.form.tentative_diagnosis = content
- },
- changeDiagnosticBasis(content){
- this.form.diagnostic_basis =content
- },
- changeDifferentialDiagnosis(content){
- this.form.differential_diagnosis = content
- },
- changeTreateMentContent(content){
- this.form.treatment_plan = content
- },
-
- createAction(){
-
- if(this.form.doctor == ""){
- this.form.doctor = 0
- }
- if(this.projectIndate == undefined){
- this.projectIndate = ""
- }
- if(this.projectStr == undefined){
- this.project_id = ""
- }
- var params = {
- patient_id:parseInt(this.patient_id),
- title:this.form.title,
- main_content:this.$refs.editor.content,
- patient_case:this.$refs.editorOne.content,
- tentative_diagnosis:this.$refs.editorTwo.content,
- diagnostic_basis:this.$refs.editorThree.content,
- differential_diagnosis:this.$refs.editorFour.content,
- treatment_plan:this.$refs.editorFive.content,
- record_date:this.form.record_date,
- doctor:this.form.doctor,
- project_id:this.projectStr,
- inspect_date:this.projectIndate,
-
- }
- if(params.project_id == undefined){
- params.project_id = ""
- }
- console.log("params",params)
-
- createFirstDisease(params).then(response=>{
- if(response.data.state == 1){
- var list = response.data.data.firstDisease
-
- this.$message.success("保存成功!")
- this.show_dialog = false
- this.getlist()
- }
- })
- },
- getAllDoctorList(){
- getAllDoctorList().then(response=>{
- if(response.data.state == 1){
- var list = response.data.data.list
-
- this.doctorList = list
- }
- })
- },
- getTime(val) {
- if(val == ""){
- return ""
- }else {
- return uParseTime(val, '{y}-{m}-{d}')
- }
- },
-
- getlist(){
- var params = {
- start_time:this.start_time,
- end_time:this.end_time,
- patient_id:parseInt(this.patient_id),
- }
- getFirstDiseaseList(params).then(response=>{
- if(response.data.state ==1){
- var list = response.data.data.list
- this.tableData = list
- }
- })
- },
- getDoctor(id){
- var name = ""
- for(let i=0;i<this.doctorList.length;i++){
- if(id == this.doctorList[i].admin_user_id){
- name = this.doctorList[i].user_name
- }
- }
- return name
- },
- getFirstDetail(id){
- getFirstDetail(id).then(response=>{
- if(response.data.state == 1){
- var detail = response.data.data.detail
- this.hosDetail = detail
- var inspectlist = response.data.data.inspectlist
- let arr = this.unique(inspectlist,'project_name')
- this.hosDetail.template_inspection_content = arr
-
- console.log("内容233323232323223",this.hosDetail)
- }
- })
- },
- getHospitalSummaryDetailOne(id){
- getFirstDetail(id).then(response=>{
- if(response.data.state == 1){
- var detail = response.data.data.detail
- console.log("detial------",detail)
- var inspectlist = response.data.data.inspectlist
- let arr = this.unique(inspectlist,'project_name')
- this.form.patient_case_one = arr
- if(detail.doctor == 0){
- this.form.doctor = ""
- }
- this.form.id = detail.id
- this.form.detai_id = detail.id
- this.form.title = detail.title
- this.form.record_date = this.getTimeOne(detail.record_date)
- this.form.doctor = detail.doctor
- this.form.main_content = detail.main_content
- this.form.patient_case = detail.patient_case
- this.form.tentative_diagnosis = detail.tentative_diagnosis
- this.form.diagnostic_basis = detail.diagnostic_basis
- this.form.differential_diagnosis = detail.differential_diagnosis
- this.form.treatment_plan =detail.treatment_plan
- this.projectStr = detail.project_id
- this.projectIndate = detail.inspect_date
- this.edit_show_dialog = true
- }
- })
- },
- toEdit(){
- this.getHospitalSummaryDetailOne(this.form.id)
- },
- updateAction(){
-
- if(this.form.doctor == ""){
- this.form.doctor = 0
- }
- if(this.form.dean == ""){
- this.form.dean = 0
- }
-
- if(this.projectIndate == undefined){
- this.projectIndate = ""
- }
- if(this.projectStr == undefined){
- this.project_id = ""
- }
-
- var main_content = ""
- var patient_case = ""
- var tentative_diagnosis = ""
- var diagnostic_basis = ""
- var differential_diagnosis = ""
- var treatment_plan = ""
- if(this.$refs.editorTen.content == ""){
- main_content = this.hosDetail.main_content
- }else{
- main_content = this.$refs.editorTen.content
- }
-
- if(this.$refs.editorTenOne.content == ""){
- patient_case = this.hosDetail.patient_case
- }else{
- patient_case = this.$refs.editorTenOne.content
- }
-
- if(this.$refs.editorTenTwo.content == ""){
- tentative_diagnosis = this.hosDetail.tentative_diagnosis
- }else{
- tentative_diagnosis = this.$refs.editorTenTwo.content
- }
-
- if(this.$refs.editorTenThree.content == ""){
- diagnostic_basis = this.hosDetail.diagnostic_basis
- }else{
- diagnostic_basis = this.$refs.editorTenThree.content
- }
-
- if(this.$refs.editorTenFour.content == ""){
- differential_diagnosis = this.hosDetail.differential_diagnosis
- }else{
- differential_diagnosis = this.$refs.editorTenFour.content
- }
-
- if(this.$refs.editorTenFive.content == ""){
- treatment_plan = this.hosDetail.treatment_plan
- }else{
- treatment_plan = this.$refs.editorTenFive.content
- }
-
- var params = {
- id:this.form.detai_id,
- patient_id:parseInt(this.patient_id),
- title:this.form.title,
- doctor:this.form.doctor,
- record_date:this.form.record_date,
- main_content:main_content,
- patient_case:patient_case,
- tentative_diagnosis:tentative_diagnosis,
- diagnostic_basis:diagnostic_basis,
- differential_diagnosis:differential_diagnosis,
- treatment_plan:treatment_plan,
- project_id:this.projectStr,
- inspect_date:this.projectIndate,
- }
- console.log("poarams2323322323",params)
- if(params.project_id!=undefined){
- params.project_id = ""
- }
- updateFirstDisease(params).then(response=>{
- if(response.data.state == 1){
- var detail = response.data.data.detail
- this.edit_show_dialog = false
- // this.$refs.monthlyPlanTable.setCurrentRow(detail)
- this.getlist()
- }
- })
- },
- deleteAction(){
- if(this.ids.length == 0){
- this.$message.error("请勾选需要删除的数据")
- return false
- }
- this.$confirm('确认删除吗?', '删除', {
- confirmButtonText: '确 定',
- cancelButtonText: '取 消',
- type: 'warning'
- }).then(() => {
- var params = {
- ids:this.ids,
- }
- deleteFirstDisease(params).then(response => {
- if (response.data.state == 1) {
- var msg = response.data.data.msg
- this.getlist()
- this.$message.success("删除成功")
- } else {
- this.$message.error("删除失败")
- }
- })
- }).catch(() => {
- })
- },
- addAction(){
- this.form.title = ""
- this.form.main_content = ""
- this.form.patient_case = ""
- this.form.tentative_diagnosis = ""
- this.form.diagnostic_basis = ""
- this.form.differential_diagnosis = ""
- this.form.treatment_plan = ""
-
- this.show_dialog = true
- },
- toInspection(){
- this.dialogVisibleInspection = true
- },
- changeRadio(val){
- if(val == 1){
- this.showtime = true
- this.showquarty = false
- this.getInspectionMajor()
- }
- if(val == 2){
- this.showquarty = true
- this.showtime = false
- this.getInspectionMajor()
- }
- },
- //获取大项数据来源
- getInspectionMajor(){
- var start_time = ""
- var end_time = ""
- console.log("radio2332322332",this.radio)
- if(this.radio == 1){
- console.log("start_year",this.startYear)
- console.log("endyaer",this.lastYear)
- end_time = this.startYear
- start_time = this.lastYear
- }
- if(this.radio == 2){
- if(this.quartype == 1){
- start_time = moment().startOf('year').format('YYYY-MM-DD')
- end_time = moment().month(2).endOf('month').format("YYYY-MM-DD")
- }
- if(this.quartype == 2){
- start_time = moment().month(3).startOf('month').format("YYYY-MM-DD")
- end_time = moment().month(5).endOf('month').format("YYYY-MM-DD")
- }
- if(this.quartype == 3){
- start_time = moment().month(6).startOf('month').format("YYYY-MM-DD")
- end_time = moment().month(8).endOf('month').format("YYYY-MM-DD")
- }
- if(this.quartype == 4){
- start_time = moment().month(9).startOf('month').format("YYYY-MM-DD")
- end_time = moment().month(11).endOf('month').format("YYYY-MM-DD")
- }
- }
-
-
- console.log("start_time",start_time)
- console.log("end_time",end_time)
- var params = {
- other_start_time:end_time,
- patient_id:this.patient_id,
- last_time:start_time,
- }
- console.log("开始数据",params)
- getInspectionMajorItem(params).then(response=>{
- if(response.data.state == 1){
- var list = response.data.data.list
- console.log("列表23232232323",list)
- // this.$refs.single_table.setCurrentRow(list[0])
- this.tableList = list
-
- }
- })
- },
- //获取小项的值
- getInspectionDetai(val){
- console.log("val2332232",val)
- var params = {
- project_id:val.project_id,
- patient_id:val.patient_id,
- inspect_date:val.inspect_date,
- }
- // console.log("param2233233223",params)
- getInspectionDetail(params).then(response=>{
- if(response.data.state ==1){
- var list = response.data.data.list
- // console.log("详情222",list)
-
- this.tableData = list
- }
- })
- },
- getInitDataList(){
- var params={
- start_year:this.getTime(this.form.start_year),
- start_month:this.getTime(this.form.start_month),
- quarter:this.form.quarter,
- patient_id:this.patient_id,
- start_time:this.start_date,
- end_time:this.end_date,
- }
- getInitDataList(params).then(response=>{
- if(response.data.state == 1){
-
- var modelist = response.data.data.modelist
- console.log("modelist",modelist)
- var docList = response.data.data.docList
- // console.log("doctlist",docList)
- this.docList = docList
- var summaryList = response.data.data.summaryList
- // console.log("summaryList",summaryList)
- this.summaryList = summaryList
- var planList = response.data.data.planList
- // console.log("planlist",planList)
- this.planList = planList
- }
- })
- },
- changeYear(val){
- if(val == "2021-02"){
- this.startYear = val+"-" + "28"
- }else if(val == "2021-08"){
- this.startYear = val+"-" + "31"
- }else if(val == "2021-10"){
- this.startYear = val+"-" + "31"
- }else if(val == "2021-12"){
- this.startYear = val+"-" + "31"
- }else{
- this.startYear = val+"-" + "30"
- }
-
- this.lastYear = val+"-"+"01"
- this.getInspectionMajor()
- },
- selectSummary(val){
- console.log("val23232",val)
- var arr = []
- for( let i=0;i<val.length;i++){
- arr.push(val[i].id)
- }
-
- var str = arr.join(",")
- console.log("str",str)
- this.ids = str
- },
- toContent(){
- var str = this.projectList.join(",")
- this.projectStr = str
- var inspe_date = this.inspectDataList.join(",")
- this.projectIndate = inspe_date
- var params = {
- ids:str,
- inspect_date:inspe_date,
- patient_id:this.patient_id,
- }
- getInspectionItemList(params).then(response=>{
- if(response.data.state == 1){
- var list = response.data.data.list
- let arr = this.unique(list,'project_name')
-
- this.form.patient_case_one = arr
- this.dialogVisibleInspection = false
-
- console.log("2323232owowowowowow",this.form.id)
- }
- })
- },
- unique(data, key) {
- let lastData = [];
- data.forEach(item => {
- let status = lastData.some(project_name => project_name[key] == item[key]);
- if (!status) {
- let obj = {
- project_name:'',
- arr:[]
- }
- obj.project_name = item.project_name
- obj.arr.push(item);
- lastData.push(obj);
- } else {
- lastData.forEach((project_name, index) => {
- if (project_name[key] === item[key]) {
- project_name.arr.push(item);
- }
- });
- }
- });
- return lastData;
- },
- changetype(){
- this.getInspectionMajor()
- },
- },
- watch: {
- tableData: function() {
- this.$nextTick(function() {
- this.$refs.monthlyPlanTable.setCurrentRow(this.tableData[0])
- })
- }
- },
-
-
- }
- </script>
-
- <style rel="stylesheet/css" lang="scss" scoped>
- .borderBox{
- border: 1px solid #DCDFE6;
- padding: 10px;
- margin-top: 10px;
- border-radius: 4px;
- p{
- font-weight: bold;
- font-size: 20px;
- margin: 10px 0;
- }
- }
- .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;
- }
-
- }
- </style>
- <style>
- .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;
- }
- .el-select-dropdown {
- max-width: 1000px !important;
- }
- </style>
|