fangshi-detail-5.html 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>产后访视记录表</title>
  6. <meta name="author" content="yihu.com" />
  7. <meta name="format-detection" content="telephone=no" />
  8. <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"
  9. />
  10. <meta name="apple-mobile-web-app-capable" content="yes" />
  11. <meta name="apple-mobile-web-app-status-bar-style" content="black" />
  12. <link rel="shortcut icon" href="../../../../favicon.ico">
  13. <link rel="stylesheet" type="text/css" href="../../../../css/element-ui.css" />
  14. <link rel="stylesheet" type="text/css" href="../../../../css/cross.css" />
  15. <link rel="stylesheet" type="text/css" href="../../../../css/bootstrap.min.css" />
  16. <link href="../../../../plugins/toastr/toastr.min.css" rel="stylesheet">
  17. <link href="../css/fangshi-detail.css" rel="stylesheet">
  18. </head>
  19. <style>
  20. .el-radio {
  21. margin-bottom: 0;
  22. }
  23. .setPicker .el-input--prefix .el-input__inner {
  24. text-align: center
  25. }
  26. div.ui-col-1 {
  27. line-height: 27px;
  28. }
  29. .setinput .el-input__inner {
  30. padding: 0;
  31. border-bottom: 1px solid #e1e1e1;
  32. text-align: center;
  33. }
  34. </style>
  35. <body>
  36. <div id="app">
  37. <button class="button" @click="editBtn()">&nbsp;</button>
  38. <p class="c-f20 mb10" style="text-align: center;">产后访视记录表</p>
  39. <div class="ui-grid p10">
  40. <div class="ui-col-1">
  41. <div class="ui-grid">
  42. <div class="ui-col-0">姓名:</div>
  43. <div class="ui-col-1">
  44. <el-input :readonly="!editable" v-model="postpartumVisitDetails.name" placeholder="" clearable></el-input>
  45. </div>
  46. </div>
  47. </div>
  48. <div class="ui-col-1">
  49. <div class="ui-grid">
  50. <div class="ui-col-0">编号:</div>
  51. <div class="ui-col-1">
  52. <el-input :readonly="!editable" v-model="postpartumVisitDetails.number" placeholder="" clearable></el-input>
  53. </div>
  54. </div>
  55. </div>
  56. </div>
  57. <table class="table table-bordered">
  58. <tr>
  59. <td class="col-w120 c-t-center">随访日期</td>
  60. <td colspan="3">
  61. <el-date-picker :readonly="!editable" v-model="postpartumVisitDetails.followup_date" type="date" value-format="yyyy-MM-dd"
  62. placeholder="选择日期">
  63. </el-date-picker>
  64. </td>
  65. </tr>
  66. <tr>
  67. <td class="col-w120 c-t-center">分娩日期</td>
  68. <td>
  69. <el-date-picker type="date" :readonly="!editable" v-model="postpartumVisitDetails.parturition_date" value-format="yyyy-MM-dd"
  70. placeholder="选择日期">
  71. </el-date-picker>
  72. </td>
  73. <td class="col-w120 c-t-center">出院日期</td>
  74. <td>
  75. <el-date-picker :readonly="!editable" v-model="postpartumVisitDetails.discharged_date" value-format="yyyy-MM-dd" type="date"
  76. placeholder="选择日期">
  77. </el-date-picker>
  78. </td>
  79. </tr>
  80. <tr>
  81. <td class="col-w120 c-t-center">体 温(℃)</td>
  82. <td colspan="3">
  83. <el-input type="number" :readonly="!editable" v-model="postpartumVisitDetails.body_temperature" placeholder=""></el-input>
  84. </td>
  85. </tr>
  86. <tr>
  87. <td class="col-w120 c-t-center">一般健康情况</td>
  88. <td colspan="3">
  89. <el-input type="textarea" :readonly="!editable" v-model="postpartumVisitDetails.healthy_condition" placeholder="" clearable></el-input>
  90. </td>
  91. </tr>
  92. <tr>
  93. <td class="col-w120 c-t-center">一般心理状况</td>
  94. <td colspan="3">
  95. <el-input :readonly="!editable" v-model="postpartumVisitDetails.psychologic_status" placeholder="" clearable></el-input>
  96. </td>
  97. </tr>
  98. <tr>
  99. <td class="col-w120 c-t-center">血 压(mmHg)</td>
  100. <td colspan="3">
  101. <div class="setinput">
  102. <el-input type="number" class="col-w80" :readonly="!editable" v-model="postpartumVisitDetails.blood_pressure_low" placeholder=""></el-input>mmHg /
  103. <el-input type="number" class="col-w80" :readonly="!editable" v-model="postpartumVisitDetails.blood_pressure_high" placeholder=""></el-input>mmHg
  104. </div>
  105. </td>
  106. </tr>
  107. <tr>
  108. <td class="col-w120 c-t-center">乳 房</td>
  109. <td colspan="3">
  110. <el-radio-group v-model="postpartumVisitDetails.breast_status">
  111. <el-radio :disabled="!editable" label="1">未见异常</el-radio>
  112. <el-radio :disabled="!editable" label="2">异常</el-radio>
  113. </el-radio-group>
  114. </td>
  115. </tr>
  116. <tr>
  117. <td class="col-w120 c-t-center">恶 露</td>
  118. <td colspan="3">
  119. <el-radio-group v-model="postpartumVisitDetails.lochia_status">
  120. <el-radio :disabled="!editable" label="1">未见异常</el-radio>
  121. <el-radio :disabled="!editable" label="2">异常</el-radio>
  122. </el-radio-group>
  123. </td>
  124. </tr>
  125. <tr>
  126. <td class="col-w120 c-t-center">子 宫</td>
  127. <td colspan="3">
  128. <el-radio-group v-model="postpartumVisitDetails.uterus_status">
  129. <el-radio :disabled="!editable" label="1">未见异常</el-radio>
  130. <el-radio :disabled="!editable" label="2">异常</el-radio>
  131. </el-radio-group>
  132. </td>
  133. </tr>
  134. <tr>
  135. <td class="col-w120 c-t-center">伤 口</td>
  136. <td colspan="3">
  137. <el-radio-group v-model="postpartumVisitDetails.wound_status">
  138. <el-radio :disabled="!editable" label="1">未见异常</el-radio>
  139. <el-radio :disabled="!editable" label="2">异常</el-radio>
  140. </el-radio-group>
  141. </td>
  142. </tr>
  143. <tr>
  144. <td class="col-w120 c-t-center">其 他</td>
  145. <td colspan="3">
  146. <el-input type="textarea" :readonly="!editable" v-model="postpartumVisitDetails.other" placeholder="" clearable></el-input>
  147. </td>
  148. </tr>
  149. <tr>
  150. <td class="col-w120 c-t-center">分 类</td>
  151. <td colspan="3">
  152. <el-radio-group v-model="postpartumVisitDetails.category">
  153. <el-radio :disabled="!editable" label="1">未见异常</el-radio>
  154. <el-radio :disabled="!editable" label="2">异常</el-radio>
  155. </el-radio-group>
  156. </td>
  157. </tr>
  158. <tr>
  159. <td class="col-w120 c-t-center">指 导</td>
  160. <td colspan="3">
  161. <el-checkbox-group v-model="check" :disabled="!editable">
  162. <el-checkbox label="1">个人卫生</el-checkbox>
  163. <el-checkbox label="2">心理</el-checkbox>
  164. <el-checkbox label="3">营养</el-checkbox>
  165. <el-checkbox label="4">母乳喂养</el-checkbox>
  166. <el-checkbox label="5">新生儿护理与喂养</el-checkbox>
  167. <el-checkbox class="setinput" label="6">
  168. <el-input type="text" :readonly="other_guide||!editable" v-model="postpartumVisitDetails.other_guide_content" placeholder="其他"
  169. clearable></el-input>
  170. </el-checkbox>
  171. </el-checkbox-group>
  172. </td>
  173. </tr>
  174. <tr>
  175. <td class="col-w120 c-t-center">转 诊</td>
  176. <td colspan="3">
  177. <el-radio-group v-model="postpartumVisitDetails.referral">
  178. <el-radio :disabled="!editable" :label="0">无</el-radio>
  179. <el-radio :disabled="!editable" :label="1">有</el-radio>
  180. </el-radio-group>
  181. <div class="mt20 ui-grid">
  182. <div class="ui-col-0" for="">原因:</div>
  183. <div class="ui-col-1">
  184. <el-input :readonly="!editable" v-model="postpartumVisitDetails.referral_REASON" placeholder="" clearable></el-input>
  185. </div>
  186. </div>
  187. <div class="mt20 ui-grid">
  188. <div class="ui-col-0">机构:</div>
  189. <div class="ui-col-1">
  190. <el-input :readonly="!editable" v-model="postpartumVisitDetails.organization_ORG_NAME" placeholder="" clearable></el-input>
  191. </div>
  192. <div class="ui-col-0">科室:</div>
  193. <div class="ui-col-1">
  194. <el-input :readonly="!editable" v-model="postpartumVisitDetails.organization" placeholder="" clearable></el-input>
  195. </div>
  196. </div>
  197. </td>
  198. </tr>
  199. <tr>
  200. <td class="col-w120 c-t-center">下次随访日期</td>
  201. <td colspan="3">
  202. <el-date-picker :readonly="!editable" v-model="postpartumVisitDetails.next_visiting_date" value-format="yyyy-MM-dd" type="date"
  203. placeholder="选择日期">
  204. </el-date-picker>
  205. </td>
  206. </tr>
  207. <tr>
  208. <td class="col-w120 c-t-center">随访医生签名</td>
  209. <td colspan="3">
  210. <el-input :readonly="!editable" v-model="postpartumVisitDetails.visiting_doctor_name" placeholder="" clearable></el-input>
  211. </td>
  212. </tr>
  213. </table>
  214. <follow-bottom :followupId="followupId"></follow-bottom>
  215. </div>
  216. <script src="../../../../js/vue.js" type="text/javascript" charset="utf-8"></script>
  217. <script src="../../../../js/jquery-2.2.4.js" type="text/javascript" charset="utf-8"></script>
  218. <script src="../../../../js/util.js" type="text/javascript" charset="utf-8"></script>
  219. <script src="../../../../plugins/toastr/toastr.min.js"></script>
  220. <script src="../../../../js/es6-promise.js" type="text/javascript" charset="utf-8"></script>
  221. <script src="../../../../js/underscore.js" type="text/javascript" charset="utf-8"></script>
  222. <script src="../../../../js/element-ui.js" type="text/javascript" charset="utf-8"></script>
  223. <script src="../../../../component/followup/follow-bottom.js"></script>
  224. <script src="../../../../component/followup/fangshi-detail-6.js"></script>
  225. <script src="../../../../component/followup/finish-followup-btn.js"></script>
  226. <script src="../../../../api/http-request.js" type="text/javascript" charset="utf-8"></script>
  227. <script src="../../../../api/fangshi-api.js"></script>
  228. <script>
  229. var Request = GetRequest();
  230. new Vue({
  231. el: "#app",
  232. data: function () {
  233. return {
  234. finishedStatus: null, //随访完成状态
  235. editable: false,
  236. other_guide: true,
  237. isEditBtn: true,
  238. data2: "",
  239. radio: "",
  240. input: '',
  241. check: [],
  242. postpartumVisitDetails: {
  243. personal_hygiene: '0',
  244. mentality: '0',
  245. nutrition: '0',
  246. breast_feeding: '0',
  247. newborn_care_and_feeding: '0',
  248. other_guide: '0',
  249. followup_date:'',
  250. next_visiting_date:''
  251. },
  252. followupId: Request['id'],
  253. version: Request['version'],
  254. patientCode:'',
  255. followupClass:''
  256. }
  257. },
  258. mounted: function () {
  259. this.getData() //获取随访状态
  260. },
  261. watch: {
  262. check: function (i) {
  263. var a = i.indexOf('6')
  264. if (a > -1) {
  265. this.other_guide = false
  266. } else {
  267. this.other_guide = true
  268. this.postpartumVisitDetails.other_guide_content = ''
  269. }
  270. }
  271. },
  272. methods: {
  273. getData: function () {
  274. var vm = this
  275. fangshiAPI.getPostpartumVisitDetails({ followupId: this.followupId || '3' }).then(function (res) {
  276. if (res.status == 200) {
  277. var data = res.data
  278. if (data != null) {
  279. vm.postpartumVisitDetails = data
  280. vm.dealData(data)
  281. vm.getStatus(false)
  282. }else{
  283. vm.getStatus(true)
  284. }
  285. } else {
  286. top.toastr.error(res.msg);
  287. }
  288. })
  289. },
  290. dealData: function (data) {
  291. var vm=this
  292. var vmP = vm.postpartumVisitDetails
  293. vmP.breast_status = data.breast_status ? data.breast_status.toString() : ''
  294. vmP.lochia_status = data.lochia_status ? data.lochia_status.toString() : ''
  295. vmP.uterus_status = data.uterus_status ? data.uterus_status.toString() : ''
  296. vmP.wound_status = data.wound_status ? data.wound_status.toString() : ''
  297. vmP.category = data.category ? data.category.toString() : ''
  298. vmP.other = data.other
  299. if (data.personal_hygiene == '1') {
  300. vm.check.push('1')
  301. } if (data.mentality == '1') {
  302. vm.check.push('2')
  303. } if (data.nutrition == '1') {
  304. vm.check.push('3')
  305. } if (data.breast_feeding == '1') {
  306. vm.check.push('4')
  307. } if (data.newborn_care_and_feeding == '1') {
  308. vm.check.push('5')
  309. } if (data.other_guide == '1') {
  310. vm.check.push('6')
  311. }
  312. vmP.other_guide_content = data.other_guide_content
  313. // vmP.REFERRAL_REASON = data.referral_REASON
  314. vmP.organization_ORG_NAME = data.organization_ORG_NAME
  315. vmP.organization = data.organization
  316. vmP.next_visiting_date = data.next_visiting_date
  317. vmP.visiting_doctor_name = data.visiting_doctor_name
  318. },
  319. getLastData:function(doctorName,name){
  320. var vm=this
  321. fangshiAPI.getLastVisitRecord({ followupClass: vm.followupClass,patientCode:vm.patientCode }).then(function (res) {
  322. if (res.status == 200) {
  323. var data = res.data.detail
  324. // finishedStatus:true 随访完成,false 随访未完成
  325. //默认随访医生签名
  326. vm.postpartumVisitDetails.visiting_doctor_name=doctorName
  327. vm.postpartumVisitDetails.name=name
  328. // 居民存在上次历史记录,则代入默认信息
  329. if (res.data.detail) {
  330. vm.postpartumVisitDetails = res.data.detail
  331. vm.dealData(data)
  332. }
  333. //默认随访时间为当前时间
  334. vm.postpartumVisitDetails.followup_date = new Date().format("yyyy-MM-dd")
  335. vm.postpartumVisitDetails.next_visiting_date=null
  336. }
  337. })
  338. },
  339. // 完成随访状态修改
  340. finish: function () {
  341. var vm=this
  342. fangshiAPI.updateFollowStatus({ followupId: this.followupId }).then(function (res) {
  343. if (res.status == 200) {
  344. vm.finishedStatus=true
  345. vm.setEditBtn()
  346. top.toastr.info("完成随访成功")
  347. } else {
  348. top.toastr.error(res.msg);
  349. }
  350. })
  351. },
  352. editData: function () {
  353. var vm = this
  354. vm.check.map(function(i) {
  355. if (i == '1') {
  356. vm.postpartumVisitDetails.personal_hygiene = '1'
  357. } else if (i == '2') {
  358. vm.postpartumVisitDetails.mentality = '1'
  359. } else if (i == '3') {
  360. vm.postpartumVisitDetails.nutrition = '1'
  361. } else if (i == '4') {
  362. vm.postpartumVisitDetails.breast_feeding = '1'
  363. } else if (i == '5') {
  364. vm.postpartumVisitDetails.newborn_care_and_feeding = '1'
  365. } else if (i == '6') {
  366. vm.postpartumVisitDetails.other_guide = '1'
  367. }
  368. })
  369. this.postpartumVisitDetails.create_time = null
  370. this.postpartumVisitDetails.version = this.version //版本号
  371. fangshiAPI.savePostpartumVisitDetails({ followupId: this.followupId || '3', postpartumVisitDetails: JSON.stringify(this.postpartumVisitDetails) }).then(function (res) {
  372. if (res.status == 200) {
  373. vm.finishedStatus ? '' : vm.finish()
  374. vm.finishedStatus ? top.toastr.info('保存成功') :''
  375. } else {
  376. top.toastr.error(res.msg);
  377. }
  378. })
  379. },
  380. //获取当前随访状态信息 Request['id']||'1'
  381. getStatus: function (getLast) {
  382. var vm = this
  383. fangshiAPI.getFollowupInfo({ followupId: this.followupId || '1888107' }).then(function (res) {
  384. if (res.status == 200) {
  385. res.data.status!=1?vm.finishedStatus=false:vm.finishedStatus=true
  386. vm.patientCode=res.data.patientCode
  387. vm.followupClass=res.data.followupClass
  388. var doctorName=res.data.doctorName
  389. var name=res.data.patient.name
  390. if(getLast){
  391. vm.getLastData(doctorName,name)//获取patientCode,followupClass 获取上一次数据
  392. }
  393. vm.setEditBtn()
  394. } else {
  395. top.toastr.error(res.msg);
  396. }
  397. })
  398. },
  399. setEditBtn: function () {
  400. var btn = document.getElementsByClassName('button')[0]
  401. if(!this.finishedStatus){
  402. btn.innerHTML='完成随访'
  403. this.editable = true
  404. return
  405. }
  406. if (this.isEditBtn == true) {
  407. btn.innerHTML = '编辑'
  408. this.editable = false
  409. } else if (this.isEditBtn == false) {
  410. btn.innerHTML='保存'
  411. this.editable = true
  412. }
  413. },
  414. editBtn: function () {
  415. if (this.finishedStatus) {
  416. this.isEditBtn = !this.isEditBtn
  417. }
  418. this.setEditBtn()
  419. this.isEditBtn || !this.finishedStatus?this.editData():''//保存数据
  420. }
  421. }
  422. })
  423. </script>
  424. </body>
  425. </html>