Elizabeth's proactive approach involves introducing urinal toilet attachment , an ingenious concept that optimizes space and functionality.

recordTemplateDetail.vue 14KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379
  1. <template>
  2. <el-dialog
  3. title="病历模板详情"
  4. width="1000px"
  5. :visible.sync="visible"
  6. :before-close="_close"
  7. class="recordDialog"
  8. append-to-body
  9. >
  10. <el-form class="recordForm" :model="form" ref="form" label-width="80px">
  11. <el-form-item label="模板名称: " prop="name" style="width:100%;">
  12. <el-input v-model="form.template_name" placeholder=""></el-input>
  13. </el-form-item>
  14. <el-form-item label="模板说明: " prop="name" style="width:100%;">
  15. <el-input v-model="form.template_remark" placeholder=""></el-input>
  16. </el-form-item>
  17. <el-form-item label="主诉:" class="width50">
  18. <el-select @change="changeMainTemplate" v-model="value" style="width:100%;margin-bottom:10px;">
  19. <el-option
  20. v-for="(item, index) in tabledata"
  21. :label="item.title"
  22. :value="item.content"
  23. :key="index"
  24. ></el-option>
  25. </el-select>
  26. <el-input
  27. type="textarea"
  28. :rows="2"
  29. placeholder="请输入内容"
  30. v-model="form.chief_conplaint">
  31. </el-input>
  32. </el-form-item>
  33. <el-form-item label="现病史:" class="width50">
  34. <el-select @change="changeMainTemplateOne" v-model="valueOne" style="width:100%;margin-bottom:10px;">
  35. <el-option
  36. v-for="(item, index) in tabledataOne"
  37. :label="item.title"
  38. :value="item.content"
  39. :key="index"
  40. ></el-option>
  41. </el-select>
  42. <el-input
  43. type="textarea"
  44. :rows="2"
  45. placeholder="请输入内容"
  46. v-model="form.history_of_present_illness">
  47. </el-input>
  48. </el-form-item>
  49. <el-form-item label="既往史:" class="width50">
  50. <el-select @change="changeMainTemplateTwo" v-model="valueTwo" style="width:100%;margin-bottom:10px;">
  51. <el-option
  52. v-for="(item, index) in tabledataTwo"
  53. :label="item.title"
  54. :value="item.content"
  55. :key="index"
  56. ></el-option>
  57. </el-select>
  58. <el-input
  59. type="textarea"
  60. :rows="2"
  61. placeholder="请输入内容"
  62. v-model="form.past_history">
  63. </el-input>
  64. </el-form-item>
  65. <el-form-item label="个人史:" class="width50">
  66. <el-select @change="changeMainTemplateThree" v-model="valueThree" style="width:100%;margin-bottom:10px;">
  67. <el-option
  68. v-for="(item, index) in tabledataThree"
  69. :label="item.title"
  70. :value="item.content"
  71. :key="index"
  72. ></el-option>
  73. </el-select>
  74. <el-input
  75. type="textarea"
  76. :rows="2"
  77. placeholder="请输入内容"
  78. v-model="form.personal_history">
  79. </el-input>
  80. </el-form-item>
  81. <el-form-item label="家族史:" class="width50">
  82. <el-select @change="changeMainTemplateFour" v-model="valueFour" style="width:100%;margin-bottom:10px;">
  83. <el-option
  84. v-for="(item, index) in tabledataFour"
  85. :label="item.title"
  86. :value="item.content"
  87. :key="index"
  88. ></el-option>
  89. </el-select>
  90. <el-input
  91. type="textarea"
  92. :rows="2"
  93. placeholder="请输入内容"
  94. v-model="form.family_history">
  95. </el-input>
  96. </el-form-item>
  97. <el-form-item label="诊断信息:" class="width50">
  98. <el-select @change="changeMainTemplateFive" v-model="valueFive" style="width:100%;margin-bottom:10px;">
  99. <el-option
  100. v-for="(item, index) in tabledataFive"
  101. :label="item.title"
  102. :value="item.content"
  103. :key="index"
  104. ></el-option>
  105. </el-select>
  106. <el-input
  107. type="textarea"
  108. :rows="2"
  109. placeholder="请输入内容"
  110. v-model="form.diagnostic">
  111. </el-input>
  112. </el-form-item>
  113. <el-form-item label="医嘱:" class="width50">
  114. <el-select @change="changeMainTemplateSix" v-model="valueSix" style="width:100%;margin-bottom:10px;">
  115. <el-option
  116. v-for="(item, index) in tabledataSix"
  117. :label="item.title"
  118. :value="item.content"
  119. :key="index"
  120. ></el-option>
  121. </el-select>
  122. <el-input
  123. type="textarea"
  124. :rows="2"
  125. placeholder="请输入内容"
  126. v-model="form.doctor_advice">
  127. </el-input>
  128. </el-form-item>
  129. <el-form-item label ="备注" prop="name" class="width50">
  130. <el-input
  131. type="textarea"
  132. :rows="2"
  133. placeholder="请输入内容"
  134. v-model="form.remark">
  135. </el-input>
  136. </el-form-item>
  137. </el-form>
  138. <div slot="footer" class="dialog-footer">
  139. <el-button @click="hide">取 消</el-button>
  140. <el-button type="primary" @click="submitAction()">保 存</el-button>
  141. </div>
  142. </el-dialog>
  143. </template>
  144. <script>
  145. import { getTemplateDetail,updateRecordTemplate,getMedicalTemplateList } from "@/api/project/project"
  146. export default {
  147. data(){
  148. return{
  149. visible:false,
  150. form:{
  151. id:0,
  152. template_name:'',
  153. template_remark:"",
  154. chief_conplaint:"",
  155. history_of_present_illness:"",
  156. past_history:"",
  157. personal_history:"",
  158. family_history:"",
  159. diagnostic:"",
  160. remark:'',
  161. doctor_advice:'',
  162. },
  163. textarea:"",
  164. templatedetail:{},
  165. tabledata:[],
  166. tabledataOne:[],
  167. tabledataTwo:[],
  168. tabledataThree:[],
  169. tabledataFour:[],
  170. tabledataFive:[],
  171. tabledataSix:[],
  172. tabledataSeven:[],
  173. value:'',
  174. valueOne:'',
  175. valueTwo:'',
  176. valueThree:'',
  177. valueFour:'',
  178. valueFive:'',
  179. valueSix:'',
  180. valueSeven:''
  181. }
  182. },
  183. methods:{
  184. _close: function(done) {
  185. // this.clear()
  186. done()
  187. },
  188. clear: function() {
  189. this.form.id = 0;
  190. this.form.name = "";
  191. this.form.intro = "";
  192. },
  193. show(id) {
  194. this.getTemplateDetail(id);
  195. this.visible = true
  196. },
  197. hide() {
  198. // this.clear()
  199. this.visible = false
  200. },
  201. getTemplateDetail(id){
  202. getTemplateDetail(id).then(response=>{
  203. if(response.data.state == 1){
  204. var templatedetail = response.data.data.templateDetail;
  205. console.log("templatedetail",templatedetail);
  206. this.form.id = templatedetail.id;
  207. this.form.template_name = templatedetail.template_name;
  208. this.form.template_remark = templatedetail.template_remark;
  209. this.form.chief_conplaint = templatedetail.chief_conplaint;
  210. this.form.history_of_present_illness = templatedetail.history_of_present_illness;
  211. this.form.past_history = templatedetail.past_history;
  212. this.form.personal_history = templatedetail.personal_history;
  213. this.form.family_history = templatedetail.family_history;
  214. this.form.diagnostic = templatedetail.diagnostic;
  215. this.form.doctor_advice = templatedetail.doctor_advice;
  216. this.form.remark = templatedetail.remark
  217. }
  218. })
  219. },
  220. submitAction(){
  221. var params = {
  222. id:this.form.id,
  223. template_name:this.form.template_name,
  224. template_remark:this.form.template_remark,
  225. chief_conplaint:this.form.chief_conplaint,
  226. history_of_present_illness:this.form.history_of_present_illness,
  227. past_history:this.form.past_history,
  228. personal_history:this.form.personal_history,
  229. family_history:this.form.family_history,
  230. diagnostic:this.form.diagnostic,
  231. doctor_advice:this.form.doctor_advice,
  232. remark:this.form.remark
  233. };
  234. updateRecordTemplate(params).then(response=>{
  235. if(response.data.state == 1){
  236. var template = response.data.data.templateDetail;
  237. this.$message.success("保存成功");
  238. this.visible = false
  239. // this.$parents.getlist()
  240. }
  241. })
  242. },
  243. getlist(){
  244. getMedicalTemplateList().then(response=>{
  245. if(response.data.state == 1){
  246. var list = response.data.data.list;
  247. console.log("list",list);
  248. this.tabledata = list;
  249. this.tabledataOne = response.data.data.listOne;
  250. this.tabledataTwo = response.data.data.listTwo;
  251. this.tabledataThree = response.data.data.listThree;
  252. this.tabledataFour = response.data.data.listFour;
  253. this.tabledataFive = response.data.data.listFive;
  254. this.tabledataSix = response.data.data.listSix;
  255. this.tabledataSeven = response.data.data.listSeven
  256. }
  257. })
  258. },
  259. changeMainTemplate(values){
  260. if(this.case_history.chief_conplaint == ''){
  261. this.case_history.chief_conplaint = values
  262. } else {
  263. if (this.case_history.chief_conplaint.indexOf(values) == -1) {
  264. if (this.case_history.chief_conplaint.charAt(this.case_history.chief_conplaint.length - 1).indexOf('。') == -1) {
  265. this.case_history.chief_conplaint = this.case_history.chief_conplaint + ',' + values
  266. } else {
  267. this.case_history.chief_conplaint = this.case_history.chief_conplaint + values
  268. }
  269. }
  270. }
  271. },
  272. changeMainTemplateOne(values){
  273. if(this.case_history.history_of_present_illness == ''){
  274. this.case_history.history_of_present_illness = values
  275. } else {
  276. if (this.case_history.history_of_present_illness.indexOf(values) == -1) {
  277. if (this.case_history.history_of_present_illness.charAt(this.case_history.history_of_present_illness.length - 1).indexOf('。') == -1) {
  278. this.case_history.history_of_present_illness = this.case_history.history_of_present_illness + ',' + values
  279. } else {
  280. this.case_history.history_of_present_illness = this.case_history.history_of_present_illness + values
  281. }
  282. }
  283. }
  284. },
  285. changeMainTemplateTwo(values){
  286. if(this.case_history.past_history == ''){
  287. this.case_history.past_history = values
  288. } else {
  289. if (this.case_history.past_history.indexOf(values) == -1) {
  290. if (this.case_history.past_history.charAt(this.case_history.past_history.length - 1).indexOf('。') == -1) {
  291. this.case_history.past_history = this.case_history.past_history + ',' + values
  292. } else {
  293. this.case_history.past_history = this.case_history.past_history + values
  294. }
  295. }
  296. }
  297. },
  298. changeMainTemplateThree(values){
  299. if(this.case_history.personal_history == ''){
  300. this.case_history.personal_history = values
  301. } else {
  302. if (this.case_history.personal_history.indexOf(values) == -1) {
  303. if (this.case_history.personal_history.charAt(this.case_history.personal_history.length - 1).indexOf('。') == -1) {
  304. this.case_history.personal_history = this.case_history.personal_history + ',' + values
  305. } else {
  306. this.case_history.personal_history = this.case_history.personal_history + values
  307. }
  308. }
  309. }
  310. },
  311. changeMainTemplateFour(values){
  312. if(this.case_history.family_history == ''){
  313. this.case_history.family_history = values
  314. } else {
  315. if (this.case_history.family_history.indexOf(values) == -1) {
  316. if (this.case_history.family_history.charAt(this.case_history.family_history.length - 1).indexOf('。') == -1) {
  317. this.case_history.family_history = this.case_history.family_history + ',' + values
  318. } else {
  319. this.case_history.family_history = this.case_history.family_history + values
  320. }
  321. }
  322. }
  323. },
  324. changeMainTemplateFive(values){
  325. if(this.case_history.diagnostic == ''){
  326. this.case_history.diagnostic = values
  327. } else {
  328. if (this.case_history.diagnostic.indexOf(values) == -1) {
  329. if (this.case_history.diagnostic.charAt(this.case_history.diagnostic.length - 1).indexOf('。') == -1) {
  330. this.case_history.diagnostic = this.case_history.diagnostic + ',' + values
  331. } else {
  332. this.case_history.diagnostic = this.case_history.diagnostic + values
  333. }
  334. }
  335. }
  336. },
  337. changeMainTemplateSix(values){
  338. if(this.case_history.doctor_advice == ''){
  339. this.case_history.doctor_advice = values
  340. } else {
  341. if (this.case_history.doctor_advice.indexOf(values) == -1) {
  342. if (this.case_history.doctor_advice.charAt(this.case_history.doctor_advice.length - 1).indexOf('。') == -1) {
  343. this.case_history.doctor_advice = this.case_history.doctor_advice + ',' + values
  344. } else {
  345. this.case_history.doctor_advice = this.case_history.doctor_advice + values
  346. }
  347. }
  348. }
  349. },
  350. },
  351. created(){
  352. this.getlist()
  353. }
  354. }
  355. </script>
  356. <style lang="scss" scoped>
  357. .recordForm{
  358. display: flex;
  359. flex-wrap: wrap;
  360. .el-form-item{
  361. width:24%;
  362. margin-right: 1%;
  363. }
  364. .width50{
  365. width: 49%;
  366. }
  367. }
  368. </style>