inquiriesDetail.vue 9.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301
  1. <template>
  2. <el-dialog
  3. title="详情"
  4. width="1000px"
  5. :visible.sync="visible"
  6. :before-close="_close"
  7. class="detailDialog"
  8. >
  9. <el-tabs v-model="activeName">
  10. <el-tab-pane label="处方详情" name="first">
  11. <el-tabs class="preTabs" v-model="editableTabsValue" type="card" @tab-click="tabclickEvent">
  12. <el-tab-pane
  13. v-for="(item, index) in prescriptions"
  14. :key="index"
  15. :label="item.name"
  16. :name="item.name"
  17. >
  18. </el-tab-pane>
  19. <div class="RP">
  20. Rp
  21. </div>
  22. <new-prescription-table ref="prescription_tables"
  23. :prescription="curPrescriptions"></new-prescription-table>
  24. </el-tabs>
  25. </el-tab-pane>
  26. <el-tab-pane label="病历详情" name="second">
  27. <div class="detailMain">
  28. <span style="width:240px;">处方号:{{order.prescription_number}}</span>
  29. <span style="width:200px;">医生:{{order.doctor}}</span>
  30. <span style="width:200px;">科室:{{order.departments}}</span>
  31. <span style="width:200px;">创建时间: {{getTimes(order.ctime,"{y}-{m}-{d} {h}:{i}")}}</span>
  32. </div>
  33. <div class="commonCell">
  34. <p>基本信息</p>
  35. <div class="detailMain">
  36. <span style="width:240px;">疾病名称:{{case_history.diagnostic}}</span>
  37. <span style="width:200px;">症状:{{case_history.diagnostic}}</span>
  38. <span style="width:200px;">发病日期:{{getTimes(case_history.sick_date,"{y}-{m}-{d}")}}</span>
  39. <span style="width:200px;" v-if="case_history.is_infect== 1">是否传染:是</span>
  40. <span style="width:200px;" v-if="case_history.is_infect != 1">是否传染:否</span>
  41. </div>
  42. </div>
  43. <div class="commonCell">
  44. <p>体格信息</p>
  45. <div class="detailMain">
  46. <span style="width:140px;">体温:{{case_history.temperature}}℃</span>
  47. <span style="width:140px;">呼吸:{{case_history.breathing}} 次/分</span>
  48. <span style="width:140px;">脉搏:{{case_history.pulse}} 次/分</span>
  49. <span style="width:200px;">血压:{{case_history.sbp}}~{{case_history.dbp}} mmHg</span>
  50. </div>
  51. </div>
  52. <div class="commonCell">
  53. <p></p>
  54. <div class="detailMain">
  55. <span style="width:140px;">血糖:{{case_history.blood_sugar}} mmol/L</span>
  56. <span style="width:140px;">血脂:{{case_history.blood_fat}} mmol/L</span>
  57. <span style="width:140px;">身高:{{case_history.height}} cm</span>
  58. <span style="width:200px;">体重: kg</span>
  59. </div>
  60. </div>
  61. <div class="commonCell">
  62. <p>主诉</p>
  63. <div>{{case_history.chief_conplaint}}</div>
  64. </div>
  65. <div class="commonCell">
  66. <p>现病史</p>
  67. <div>{{case_history.history_of_present_illness}}</div>
  68. </div>
  69. <div class="commonCell">
  70. <p>门诊诊断</p>
  71. <div>{{case_history.diagnostic}}</div>
  72. </div>
  73. <div class="commonCell">
  74. <p>门诊医嘱</p>
  75. <div>{{case_history.doctor_advice}}</div>
  76. </div>
  77. <div class="commonCell">
  78. <p>过敏史</p>
  79. <div>{{order.sick_history}}</div>
  80. </div>
  81. <div class="commonCell">
  82. <p>既往史</p>
  83. <div>{{case_history.past_history}}</div>
  84. </div>
  85. <div class="commonCell">
  86. <p>个人史</p>
  87. <div>{{case_history.personal_history}}</div>
  88. </div>
  89. <div class="commonCell">
  90. <p>家族史</p>
  91. <div>{{case_history.family_history}}</div>
  92. </div>
  93. </el-tab-pane>
  94. </el-tabs>
  95. <div slot="footer" class="dialog-footer">
  96. <el-button @click="hide">取 消</el-button>
  97. <!--<el-button type="primary" :loading="submitLoading" @click="hide">确定</el-button>-->
  98. </div>
  99. </el-dialog>
  100. </template>
  101. <script>
  102. import { getDictionaryDataConfig} from "@/utils/data";
  103. import { getHisPrescriptionInfo } from '@/api/his/his'
  104. import NewPrescriptionTable from './newPrescriptionTable'
  105. import { uParseTime } from '@/utils/tools'
  106. export default {
  107. components: { NewPrescriptionTable },
  108. data() {
  109. return {
  110. visible: false,
  111. activeName: 'first',
  112. curPrescriptions: {},
  113. prescriptions: [],
  114. record_date: '',
  115. editableTabsValue: '1',
  116. loadingone: false,
  117. editableTabs: [{
  118. title: '处方1',
  119. name: '1'
  120. }],
  121. tabIndex: 1,
  122. hisPatientInfo: {},
  123. loadingtwo: false,
  124. patientTableData: [{
  125. name: '杨美英',
  126. mdtrt_id: '1709946'
  127. }],
  128. patientInfo: { id: 0 },
  129. doctor: {},
  130. total: 0,
  131. state: '未收费',
  132. radio: 1,
  133. radioStatus: 1,
  134. search_input: '',
  135. case_history:{},
  136. order:{},
  137. }
  138. },
  139. methods: {
  140. getTimes(time,temp) {
  141. return uParseTime(time, temp);
  142. },
  143. tabclickEvent(val) {
  144. for (let i = 0; i < this.prescriptions.length; i++) {
  145. if (this.prescriptions[i].name == val.name) {
  146. this.curPrescriptions = {}
  147. var temp = this.deepClone(this.prescriptions[i])
  148. this.curPrescriptions = temp
  149. }
  150. }
  151. },
  152. deepClone(source) {
  153. if (!source && typeof source !== 'object') {
  154. throw new Error('error arguments', 'shallowClone')
  155. }
  156. const targetObj = source.constructor === Array ? [] : {}
  157. Object.keys(source).forEach((keys) => {
  158. if (source[keys] && typeof source[keys] === 'object') {
  159. targetObj[keys] = this.deepClone(source[keys])
  160. } else {
  161. targetObj[keys] = source[keys]
  162. }
  163. })
  164. return targetObj
  165. },
  166. moreState(tab, event) {
  167. if (tab == 'more') {
  168. return false
  169. }
  170. },
  171. _close: function(done) {
  172. // this.clear()
  173. done()
  174. },
  175. clear: function() {
  176. this.form.id = 0
  177. this.form.name = ''
  178. this.form.intro = ''
  179. },
  180. show(id) {
  181. let params={
  182. id:id,
  183. }
  184. getHisPrescriptionInfo(params).then(response => {
  185. if (response.data.state == 0) {
  186. this.$message.error(response.data.msg)
  187. return false
  188. } else {
  189. this.patientInfo = response.data.data.order.patient
  190. this.hisPatientInfo = response.data.data.order.his_patient
  191. this.case_history = response.data.data.order.case_history
  192. this.order = response.data.data.order
  193. this.prescriptions = []
  194. for (let i = 0; i < response.data.data.prescription.length; i++) {
  195. var prescription = response.data.data.prescription[i]
  196. let tempAdvice = []
  197. let tempProject = []
  198. for (let b = 0; b < prescription.advices.length; b++) {
  199. let obj = {
  200. advice_id: prescription.advices[b].id,
  201. drug_name: prescription.advices[b].advice_name,
  202. single_dose: prescription.advices[b].single_dose,
  203. delivery_way: prescription.advices[b].delivery_way,
  204. execution_frequency: prescription.advices[b].execution_frequency,
  205. retail_price: prescription.advices[b].price.toString(),
  206. remark: prescription.advices[b].remark,
  207. prescribing_number: prescription.advices[b].prescribing_number.toString(),
  208. single_dose_unit: prescription.advices[b].single_dose_unit,
  209. prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
  210. medical_insurance_number: prescription.advices[b].med_list_codg
  211. }
  212. tempAdvice.push(obj)
  213. }
  214. for (let b = 0; b < prescription.project.length; b++) {
  215. let obj = {
  216. id: prescription.project[b].id,
  217. project_id: prescription.project[b].project.id,
  218. project_name: prescription.project[b].project.project_name,
  219. statistical_classification: prescription.project[b].project.statistical_classification,
  220. single_dose: prescription.project[b].single_dose,
  221. delivery_way: prescription.project[b].delivery_way,
  222. execution_frequency: prescription.project[b].execution_frequency,
  223. number_days: prescription.project[b].day,
  224. total: prescription.project[b].count.toString(),
  225. price: prescription.project[b].price,
  226. remark: prescription.project[b].remark,
  227. medical_code: prescription.project[b].project.medical_code
  228. }
  229. tempProject.push(obj)
  230. }
  231. let index = i + 1
  232. let obj = {
  233. id: prescription.id,
  234. name: '处方' + index,
  235. advices: tempAdvice,
  236. project: tempProject,
  237. type: response.data.data.prescription[i].type
  238. }
  239. this.prescriptions.push(obj)
  240. console.log(this.prescriptions)
  241. this.curPrescriptions = this.prescriptions[0]
  242. }
  243. }
  244. })
  245. // this.clear()
  246. this.visible = true
  247. },
  248. hide() {
  249. // this.clear()
  250. this.visible = false
  251. }
  252. }
  253. }
  254. </script>
  255. <style lang="scss">
  256. .detailDialog {
  257. .el-dialog__body {
  258. padding: 0 20px 30px;
  259. }
  260. .detailMain {
  261. span {
  262. display: inline-block;
  263. }
  264. }
  265. .commonCell {
  266. display: flex;
  267. line-height: 40px;
  268. > p {
  269. font-weight: bold;
  270. color: #000;
  271. width: 80px;
  272. }
  273. }
  274. }
  275. </style>