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

vascularAccess.vue 28KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722
  1. <template>
  2. <div class="patient-container">
  3. <patient-sidebar :id="patientID" defaultActive="1-6" v-on:tran-patient="onTranPatient"></patient-sidebar>
  4. <div class="patient-app-container advice-container app-container">
  5. <div style="display:flex;justify-content: space-between;align-items: center;margin-bottom: 12px;">
  6. <span style="font-weight:bold;">血管通路列表</span>
  7. <el-button size="medium" type="primary" @click="dialogVisible =true">新增</el-button>
  8. </div>
  9. <el-table class="oictable" :data="tableData" border style="width:100%">
  10. <el-table-column prop="start_time" label="建立日期" width="100" align="center">
  11. <template slot-scope="scope">
  12. <span>{{ getTime(scope.row.start_time, "{y}-{m}-{d}")}}</span>
  13. </template>
  14. </el-table-column>
  15. <el-table-column prop="blood_access_part_opera_id" label="血管通路" align="center" width="120">
  16. <template slot-scope="scope">
  17. <router-link
  18. :to="'/patients/patient/' + scope.row.patient_id+'/vascularAccessDetail/'+scope.row.id"
  19. style="color:#409eff;width:100%;display:block;"
  20. >{{ scope.row.blood_access_part_opera_id }}
  21. </router-link
  22. >
  23. </template>
  24. </el-table-column>
  25. <el-table-column prop="blood_access_part_id" label="血管通路部位" width="200" align="center">
  26. <template slot-scope="scope">
  27. <span>{{scope.row.blood_access_part_id}}</span>
  28. </template>
  29. </el-table-column>
  30. <el-table-column prop="inflow_pass" label="流入-流出道" width="100" align="center">
  31. <template slot-scope="scope">
  32. <span>{{scope.row.inflow_pass}}</span>
  33. </template>
  34. </el-table-column>
  35. <el-table-column prop="date" label="首次启用日期" width="120" align="center">
  36. <template slot-scope="scope">
  37. <span>{{ getTime(scope.row.first_start_time, "{y}-{m}-{d}")}}</span>
  38. </template>
  39. </el-table-column>
  40. <el-table-column prop="date" label="默认到处方" align="center" width="100">
  41. <template slot-scope="scope">
  42. <span v-if="scope.row.user_status == 1">启用</span>
  43. <span v-if="scope.row.user_status == 2">停用</span>
  44. </template>
  45. </el-table-column>
  46. <el-table-column prop="date" label="停用日期" align="center" width="100">
  47. <template slot-scope="scope">
  48. <span v-if="scope.row.stop_time>0">{{ getTime(scope.row.stop_time, "{y}-{m}-{d}")}}</span>
  49. <span v-if="scope.row.stop_time<0"></span>
  50. </template>
  51. </el-table-column>
  52. <el-table-column prop="date" label="停用原因" align="center" width="120">
  53. <template slot-scope="scope">
  54. <span>{{scope.row.stop_reason}}</span>
  55. </template>
  56. </el-table-column>
  57. <el-table-column prop="date" label="使用寿命(天)" align="center" width="120">
  58. <template slot-scope="scope">
  59. <span v-if="scope.row.stop_time>0&&(scope.row.stop_time - scope.row.start_time)/86400 == 0"></span>
  60. <span v-if="scope.row.stop_time>0&&(scope.row.stop_time - scope.row.start_time)/86400 != 0">{{(scope.row.stop_time - scope.row.start_time)/86400}}</span>
  61. </template>
  62. </el-table-column>
  63. <el-table-column prop="date" label="备注" align="center" width="180">
  64. <template slot-scope="scope">
  65. <span>{{scope.row.remark}}</span>
  66. </template>
  67. </el-table-column>
  68. <el-table-column prop="date" label="创始人" align="center" width="100">
  69. <template slot-scope="scope">
  70. <span>{{getDoctor(scope.row.creator)}}</span>
  71. </template>
  72. </el-table-column>
  73. <el-table-column prop="date" fixed="right" label="操作" width="140" align="center">
  74. <template slot-scope="scope">
  75. <el-tooltip class="item" effect="dark" content="编辑" placement="top">
  76. <el-button
  77. type="primary"
  78. size="small"
  79. icon="el-icon-edit-outline"
  80. @click="handleUpdateAdviceTemplate(scope.row.id)"
  81. >
  82. </el-button>
  83. </el-tooltip>
  84. <el-tooltip class="item" effect="dark" content="删除" placement="top">
  85. <el-button
  86. size="small"
  87. type="danger"
  88. icon="el-icon-delete"
  89. @click="handleDeleteAdviceTemplate(scope.row.id, scope.$index)"
  90. >
  91. </el-button>
  92. </el-tooltip>
  93. </template>
  94. </el-table-column>
  95. </el-table>
  96. <el-pagination
  97. @size-change="handleSizeChange"
  98. @current-change="handleCurrentChange"
  99. :page-sizes="[10,20,50,100]"
  100. :page-size="10"
  101. background
  102. style="margin-top:20px;"
  103. align="right"
  104. layout="total, sizes, prev, pager, next, jumper"
  105. :total="total"></el-pagination>
  106. <el-dialog
  107. title="新增通路"
  108. :visible.sync="dialogVisible"
  109. width="60%"
  110. center>
  111. <el-form label-width="120px" :model="form" ref="form" :rules="rules" >
  112. <el-row :gutter="24">
  113. <el-col :span="24">
  114. <el-form-item label="通路项目:" :required="true" prop="access_project">
  115. <el-radio v-model="form.access_project" label="1">内瘘</el-radio>
  116. <el-radio v-model="form.access_project" label="2">导管</el-radio>
  117. </el-form-item>
  118. </el-col>
  119. </el-row>
  120. <el-row :gutter="24">
  121. <el-col :span="8">
  122. <el-form-item label="建立日期:" :required="true" prop="start_time">
  123. <el-date-picker
  124. type="datetime"
  125. format="yyyy-MM-dd"
  126. value-format="yyyy-MM-dd"
  127. placeholder="选择时间"
  128. v-model="form.start_time"
  129. style="width:150px">
  130. </el-date-picker>
  131. </el-form-item>
  132. </el-col>
  133. <el-col :span="8">
  134. <el-form-item label="血管通路类型:" :required="true" prop="blood_access_part_opera_id">
  135. <el-select v-model="form.blood_access_part_opera_id" placeholder="请选择" style="width:150px">
  136. <el-option
  137. v-for="item in blood_access_part_opera"
  138. :key="item.id"
  139. :label="item.name"
  140. :value="item.id"
  141. >
  142. </el-option>
  143. </el-select>
  144. </el-form-item>
  145. </el-col>
  146. <el-col :span="8">
  147. <el-form-item label="血管通路部位:" :required="true" prop="blood_access_part_id">
  148. <el-input v-model="form.blood_access_part_id" readonly @focus="showInnerDialog('17')" style="width:150px"></el-input>
  149. </el-form-item>
  150. </el-col>
  151. </el-row>
  152. <el-row :gutter="24">
  153. <el-col :span="8">
  154. <el-form-item label="流入-流出道:" :required="true" prop="inflow_pass">
  155. <el-select v-model="form.inflow_pass" placeholder="请选择" style="width:150px">
  156. <el-option
  157. v-for="item in optionsPass"
  158. :key="item.id"
  159. :label="item.name"
  160. :value="item.id">
  161. </el-option>
  162. </el-select>
  163. </el-form-item>
  164. </el-col>
  165. <el-col :span="8">
  166. <el-form-item label="首次启用日期:" :required="true" prop="first_start_time">
  167. <el-date-picker
  168. type="datetime"
  169. format="yyyy-MM-dd"
  170. value-format="yyyy-MM-dd"
  171. placeholder="选择时间"
  172. v-model="form.first_start_time"
  173. style="width:150px">
  174. </el-date-picker>
  175. </el-form-item>
  176. </el-col>
  177. <el-col :span="8">
  178. <el-form-item label="使用状态:" :required="true" prop="user_status">
  179. <el-select v-model="form.user_status" placeholder="请选择" style="width:150px" @change="changeStatus">
  180. <el-option
  181. v-for="item in options"
  182. :key="item.id"
  183. :label="item.name"
  184. :value="item.id">
  185. </el-option>
  186. </el-select>
  187. </el-form-item>
  188. </el-col>
  189. </el-row>
  190. <el-row v-show="show">
  191. <el-col :span="8">
  192. <el-form-item label="停用日期:">
  193. <el-date-picker
  194. type="datetime"
  195. format="yyyy-MM-dd"
  196. value-format="yyyy-MM-dd"
  197. placeholder="选择时间"
  198. v-model="form.stop_time"
  199. style="width:150px">
  200. </el-date-picker>
  201. </el-form-item>
  202. </el-col>
  203. </el-row>
  204. <el-row v-show="show">
  205. <el-col>
  206. <el-form-item label="停用原因:">
  207. <el-input v-model="form.stop_reason"></el-input>
  208. </el-form-item>
  209. </el-col>
  210. </el-row>
  211. <el-row>
  212. <el-col>
  213. <el-form-item label="备注:">
  214. <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="form.remark"></el-input>
  215. </el-form-item>
  216. </el-col>
  217. </el-row>
  218. </el-form>
  219. <span slot="footer" class="dialog-footer">
  220. <el-button @click="dialogVisible = false">取 消</el-button>
  221. <el-button type="primary" @click="saveVasularAccess('form')">保存</el-button>
  222. </span>
  223. </el-dialog>
  224. <el-dialog
  225. title="编辑通路"
  226. :visible.sync="editDialogVisible"
  227. width="60%"
  228. center>
  229. <el-form label-width="120px" :model="form" ref="form" :rules="rules" >
  230. <el-row :gutter="24">
  231. <el-col :span="24">
  232. <el-form-item label="通路项目:" :required="true" prop="access_project">
  233. <el-radio v-model="form.access_project" label="1">内瘘</el-radio>
  234. <el-radio v-model="form.access_project" label="2">导管</el-radio>
  235. </el-form-item>
  236. </el-col>
  237. </el-row>
  238. <el-row :gutter="24">
  239. <el-col :span="8">
  240. <el-form-item label="建立日期:" :required="true" prop="start_time">
  241. <el-date-picker
  242. type="datetime"
  243. format="yyyy-MM-dd"
  244. value-format="yyyy-MM-dd"
  245. placeholder="选择时间"
  246. v-model="form.start_time"
  247. style="width:150px">
  248. </el-date-picker>
  249. </el-form-item>
  250. </el-col>
  251. <el-col :span="8">
  252. <el-form-item label="血管通路类型:" :required="true" prop="blood_access_part_opera_id">
  253. <el-select v-model="form.blood_access_part_opera_id" placeholder="请选择" style="width:150px">
  254. <el-option
  255. v-for="item in blood_access_part_opera"
  256. :key="item.id"
  257. :label="item.name"
  258. :value="item.id"
  259. >
  260. </el-option>
  261. </el-select>
  262. </el-form-item>
  263. </el-col>
  264. <el-col :span="8">
  265. <el-form-item label="血管通路部位:" :required="true" prop="blood_access_part_id">
  266. <!-- <el-select v-model="form.blood_access_part_id" placeholder="请选择" style="width:150px">
  267. <el-option
  268. v-for="item in blood_access_part"
  269. :key="item.id"
  270. :label="item.name"
  271. :value="item.id">
  272. </el-option>
  273. </el-select> -->
  274. <el-input v-model="form.blood_access_part_id" readonly @focus="showInnerDialog('17')" style="width:150px"></el-input>
  275. </el-form-item>
  276. </el-col>
  277. </el-row>
  278. <el-row :gutter="24">
  279. <el-col :span="8">
  280. <el-form-item label="流入-流出道:" :required="true" prop="inflow_pass">
  281. <el-select v-model="form.inflow_pass" placeholder="请选择" style="width:150px">
  282. <el-option
  283. v-for="item in optionsPass"
  284. :key="item.id"
  285. :label="item.name"
  286. :value="item.id">
  287. </el-option>
  288. </el-select>
  289. </el-form-item>
  290. </el-col>
  291. <el-col :span="8">
  292. <el-form-item label="首次启用日期:" :required="true" prop="first_start_time">
  293. <el-date-picker
  294. type="datetime"
  295. format="yyyy-MM-dd"
  296. value-format="yyyy-MM-dd"
  297. placeholder="选择时间"
  298. v-model="form.first_start_time"
  299. style="width:150px">
  300. </el-date-picker>
  301. </el-form-item>
  302. </el-col>
  303. <el-col :span="8">
  304. <el-form-item label="使用状态:" :required="true" prop="user_status">
  305. <el-select v-model="form.user_status" placeholder="请选择" style="width:150px" @change="changeStatus">
  306. <el-option
  307. v-for="item in options"
  308. :key="item.id"
  309. :label="item.name"
  310. :value="item.id">
  311. </el-option>
  312. </el-select>
  313. </el-form-item>
  314. </el-col>
  315. </el-row>
  316. <el-row v-show="show">
  317. <el-col :span="8">
  318. <el-form-item label="停用日期:">
  319. <el-date-picker
  320. type="datetime"
  321. format="yyyy-MM-dd"
  322. value-format="yyyy-MM-dd"
  323. placeholder="选择时间"
  324. v-model="form.stop_time"
  325. style="width:150px">
  326. </el-date-picker>
  327. </el-form-item>
  328. </el-col>
  329. </el-row>
  330. <el-row v-show="show">
  331. <el-col>
  332. <el-form-item label="停用原因:">
  333. <el-input v-model="form.stop_reason"></el-input>
  334. </el-form-item>
  335. </el-col>
  336. </el-row>
  337. <el-row>
  338. <el-col>
  339. <el-form-item label="备注:">
  340. <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="form.remark"></el-input>
  341. </el-form-item>
  342. </el-col>
  343. </el-row>
  344. </el-form>
  345. <span slot="footer" class="dialog-footer">
  346. <el-button @click="editDialogVisible= false">取 消</el-button>
  347. <el-button type="primary" @click="updatedVasularAccess('form')">保存</el-button>
  348. </span>
  349. </el-dialog>
  350. </div>
  351. <multi-select-box
  352. :propsForm="InnerDialogProps"
  353. v-on:dialog-comfirm="innerDialogComfirm"
  354. v-on:dialog-cancle="innerDialogCancle"
  355. ></multi-select-box>
  356. </div>
  357. </template>
  358. <script>
  359. const moment = require('moment')
  360. import PatientSidebar from './components/PatientSidebar'
  361. import { fetchAllAdminUsers, fetchAllDoctorAndNurse } from '@/api/doctor'
  362. import { saveVasularAccess,getAllVascularAccessList,getVascularAccessByDetail,updatedVasularAccess,DeleteVascularAccess } from '@/api/patient'
  363. import { jsGetAge, uParseTime } from '@/utils/tools'
  364. import { getDataConfig } from '@/utils/data'
  365. import multiSelectBox from '../dialysis/details/dialog/MultiSelectBox'
  366. export default {
  367. name: 'doctorAdvice',
  368. components: {
  369. PatientSidebar,
  370. multiSelectBox
  371. },
  372. data() {
  373. return {
  374. tableData: [],
  375. nowtime: moment(new Date()).format('YYYY-MM-DD'),
  376. page: 1,
  377. limit: 10,
  378. total: 0,
  379. rules: {
  380. start_time: [{ required: true, message: '请输入建立日期' }],
  381. access_project: [{ required: true, message: '请选择通路项目' }],
  382. blood_access_part_opera_id:[{required:true,message:'请选择血管通路类型'}],
  383. blood_access_part_id:[{required:true,message:"请选择血管通路"}],
  384. inflow_pass:[{required:true,message:"请选择流入-流出道"}],
  385. first_start_time:[{required:true,message:"请选择首次启用日期"}],
  386. user_status:[{required:true,message:"请选择使用状态"}]
  387. },
  388. dialogVisible:false,
  389. editDialogVisible:false,
  390. form:{
  391. id:0,
  392. access_project:"1",
  393. blood_access_part_id:"",
  394. blood_access_part_opera_id:"",
  395. inflow_pass:"",
  396. start_time:moment(new Date()).format('YYYY-MM-DD'),
  397. first_start_time:moment(new Date()).format('YYYY-MM-DD'),
  398. stop_reason:"",
  399. user_status:1,
  400. remark:"",
  401. stop_time:"",
  402. },
  403. options:[
  404. {id:1,name:"启用"},
  405. {id:2,name:"停用"}
  406. ],
  407. optionsPass:[
  408. {id:1,name:"流入-动脉"},
  409. {id:2,name:"流出-静脉"},
  410. ],
  411. blood_access_part_opera:[],
  412. blood_access_part:[],
  413. show:false,
  414. doctorList:[],
  415. InnerDialogProps: {
  416. values: [],
  417. visibility: false,
  418. isShowTextArea: true,
  419. customContent: '',
  420. titles: '',
  421. type: '' // 不同弹框类型,用来匹配数据
  422. },
  423. }
  424. },
  425. methods: {
  426. clickuseradvicecell(row, column, cell, event) {
  427. },
  428. onTranPatient: function(tranPatient) {
  429. this.currentPatient = tranPatient
  430. },
  431. CreateTime(time) {
  432. return uParseTime(time, '{y}-{m}-{d} {h}:{i}:{s}')
  433. },
  434. handleSizeChange(limit) {
  435. this.limit = limit
  436. this.getlist()
  437. },
  438. handleCurrentChange(page) {
  439. this.page = page
  440. this.getlist()
  441. },
  442. changeStatus(val){
  443. if(val == 1 ){
  444. this.show = false
  445. }
  446. if(val == 2){
  447. this.show = true
  448. }
  449. },
  450. saveVasularAccess(formName){
  451. this.$refs[formName].validate((valid)=>{
  452. if(valid){
  453. var blood_name = ""
  454. for(let i=0;i<this.blood_access_part_opera.length;i++){
  455. if(this.blood_access_part_opera[i].id == this.form.blood_access_part_opera_id){
  456. blood_name = this.blood_access_part_opera[i].name
  457. }
  458. }
  459. var inflow_pass = ""
  460. for(let i=0;i<this.optionsPass.length;i++){
  461. if(this.optionsPass[i].id == this.form.inflow_pass){
  462. inflow_pass = this.optionsPass[i].name
  463. }
  464. }
  465. console.log("params",this.form.blood_access_part_id)
  466. var params = {
  467. patient_id:this.patientID,
  468. access_project:parseInt(this.form.access_project),
  469. start_time:this.form.start_time,
  470. blood_access_part_opera_id:blood_name,
  471. blood_access_part_id:this.form.blood_access_part_id,
  472. inflow_pass:inflow_pass,
  473. first_start_time:this.form.first_start_time,
  474. user_status:this.form.user_status,
  475. stop_reason:this.form.stop_reason,
  476. remark:this.form.remark,
  477. stop_time:this.form.stop_time
  478. }
  479. console.log("params",params)
  480. saveVasularAccess(params).then(response=>{
  481. if(response.data.state == 1){
  482. var access = response.data.data.access
  483. console.log("access",access)
  484. this.$message.success("保存成功")
  485. this.dialogVisible = false
  486. this.getlist()
  487. this.form.blood_access_part_opera_id=""
  488. this.form.blood_access_part_id = ""
  489. this.inflow_pass = ""
  490. this.user_status = ""
  491. this.stop_reason = ""
  492. this.remark = ""
  493. }
  494. })
  495. }
  496. })
  497. },
  498. getlist(){
  499. var params = {
  500. page:this.page,
  501. limit:this.limit,
  502. patient_id:this.patientID,
  503. }
  504. getAllVascularAccessList(params).then(response=>{
  505. if(response.data.state == 1){
  506. var list = response.data.data.list
  507. console.log("list",list)
  508. this.tableData = list
  509. var total = response.data.data.total
  510. console.log("total",total)
  511. this.total = total
  512. var doctor = response.data.data.doctor
  513. console.log("doctor",doctor)
  514. this.doctorList = doctor
  515. }
  516. })
  517. },
  518. getTime(value, temp) {
  519. if (value != undefined) {
  520. return uParseTime(value, temp);
  521. }
  522. return "";
  523. },
  524. handleUpdateAdviceTemplate(id){
  525. getVascularAccessByDetail(id).then(response=>{
  526. if(response.data.state ==1){
  527. var accessDetail = response.data.data.accessDetail
  528. console.log("accessDetail",accessDetail)
  529. this.form.id = accessDetail.id
  530. this.form.access_project = accessDetail.access_project.toString()
  531. this.form.blood_access_part_id = accessDetail.blood_access_part_id
  532. var blood_part = 0
  533. for(let i=0;i<this.blood_access_part_opera.length;i++){
  534. if(accessDetail.blood_access_part_opera_id == this.blood_access_part_opera[i].name){
  535. blood_part = this.blood_access_part_opera[i].id
  536. }
  537. }
  538. this.form.blood_access_part_opera_id = blood_part
  539. this.form.first_start_time = this.getTime(accessDetail.first_start_time,"{y}-{m}-{d}")
  540. var inflow_id = 0
  541. for(let i=0;i<this.optionsPass.length;i++){
  542. if(this.optionsPass[i].name == accessDetail.inflow_pass){
  543. inflow_id = this.optionsPass[i].id
  544. }
  545. }
  546. this.form.inflow_pass = inflow_id
  547. this.form.remark = accessDetail.remark
  548. this.form.start_time = this.getTime(accessDetail.start_time,"{y}-{m}-{d}")
  549. this.form.stop_reason = accessDetail.stop_reason
  550. this.form.stop_time = this.getTime(accessDetail.stop_time,"{y}-{m}-{d}")
  551. this.form.user_status = accessDetail.user_status
  552. if(accessDetail.user_status == 1){
  553. this.show = false
  554. }
  555. if(accessDetail.user_status == 2){
  556. this.show = true
  557. }
  558. this.editDialogVisible = true
  559. }
  560. })
  561. },
  562. getDoctor(id){
  563. var name = ""
  564. for(let i=0;i<this.doctorList.length;i++){
  565. if(id == this.doctorList[i].admin_user_id){
  566. name = this.doctorList[i].user_name
  567. }
  568. }
  569. return name
  570. },
  571. handleDeleteAdviceTemplate(id,index){
  572. this.$confirm("确认删除吗?", "删除", {
  573. confirmButtonText: "确 定",
  574. cancelButtonText: "取 消",
  575. type: "warning"
  576. })
  577. .then(() => {
  578. DeleteVascularAccess(id).then(response => {
  579. if(response.data.state == 1){
  580. var msg = response.data.data.msg
  581. this.tableData.splice(index, 1);
  582. this.$message.success("删除成功!")
  583. }
  584. });
  585. })
  586. .catch(() => {});
  587. },
  588. updatedVasularAccess(formName){
  589. this.$refs[formName].validate((valid)=>{
  590. if(valid){
  591. var blood_name = ""
  592. for(let i=0;i<this.blood_access_part_opera.length;i++){
  593. if(this.blood_access_part_opera[i].id == this.form.blood_access_part_opera_id){
  594. blood_name = this.blood_access_part_opera[i].name
  595. }
  596. }
  597. // var blood_part = ""
  598. // for(let i=0;i<this.blood_access_part.length;i++){
  599. // if(this.form.blood_access_part_id == this.blood_access_part[i].id){
  600. // blood_part = this.blood_access_part[i].name
  601. // }
  602. // }
  603. var inflow_pass = ""
  604. for(let i=0;i<this.optionsPass.length;i++){
  605. if(this.optionsPass[i].id == this.form.inflow_pass){
  606. inflow_pass = this.optionsPass[i].name
  607. }
  608. }
  609. var params = {
  610. id:this.form.id,
  611. patient_id:this.patientID,
  612. access_project:parseInt(this.form.access_project),
  613. start_time:this.form.start_time,
  614. blood_access_part_opera_id:blood_name,
  615. blood_access_part_id:this.form.blood_access_part_id,
  616. inflow_pass:inflow_pass,
  617. first_start_time:this.form.first_start_time,
  618. user_status:this.form.user_status,
  619. stop_reason:this.form.stop_reason,
  620. remark:this.form.remark,
  621. stop_time:this.form.stop_time
  622. }
  623. console.log("编辑",params)
  624. updatedVasularAccess(params).then(response=>{
  625. if(response.data.state == 1){
  626. var access = response.data.data.access
  627. console.log("access",access)
  628. this.$message.success("保存成功")
  629. this.editDialogVisible = false
  630. this.getlist()
  631. }
  632. })
  633. }
  634. })
  635. },
  636. rowClick(row){
  637. console.log("row",row)
  638. this.$router.push({path:'/patients/patient/'+this.patientID+'/vascularAccessDetail/'+row.id})
  639. },
  640. showInnerDialog: function(val) {
  641. this.InnerDialogProps.visibility = true
  642. switch (val) {
  643. case '17': // 血管通路
  644. this.InnerDialogProps.values = this.blood_access_part
  645. this.InnerDialogProps.titles = '血管通路部位'
  646. this.InnerDialogProps.type = 'blood_access_part_id'
  647. this.InnerDialogProps.selected = this.form.blood_access_part_id
  648. this.InnerDialogProps.isShowTextArea = false
  649. break
  650. }
  651. },
  652. innerDialogComfirm: function(val) {
  653. this.InnerDialogProps.visibility = false
  654. switch (val.type) {
  655. case 'blood_access_part_id':
  656. this.form.blood_access_part_id = val.value.join(',')
  657. break
  658. }
  659. },
  660. innerDialogCancle: function() {
  661. this.InnerDialogProps.visibility = false
  662. },
  663. },
  664. created() {
  665. const id = this.$route.params && this.$route.params.id
  666. console.log('id是设么', id)
  667. this.patientID = parseInt(id)
  668. //血管通路
  669. this.blood_access_part_opera = getDataConfig('hemodialysis', 'vascular_access_desc')
  670. console.log("血管通路",this.blood_access_part_opera)
  671. //血管通路部位
  672. this.blood_access_part = getDataConfig('hemodialysis', 'vascular_access')
  673. console.log("血管通路部位",this.blood_access_part)
  674. this.getlist()
  675. }
  676. }
  677. </script>
  678. <style>
  679. .oictable ::-webkit-scrollbar {
  680. height: 15px;
  681. }
  682. </style>
  683. <style rel="stylesheet/scss" lang="scss">
  684. ::-webkit-scrollbar{
  685. height:15px;
  686. }
  687. </style>