vascularAccess.vue 38KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980
  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.other_vascular}}</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.stop_time>0">{{ getTime(scope.row.stop_time, "{y}-{m}-{d}")}}</span>
  43. <span v-if="scope.row.stop_time<0"></span>
  44. </template>
  45. </el-table-column>
  46. <el-table-column prop="date" label="停用原因" align="center" width="120">
  47. <template slot-scope="scope">
  48. <span>{{scope.row.stop_reason}}</span>
  49. </template>
  50. </el-table-column>
  51. <el-table-column prop="date" label="使用寿命(天)" align="center" width="120">
  52. <template slot-scope="scope">
  53. <span v-if="scope.row.stop_time>0&&(scope.row.stop_time - scope.row.start_time)/86400 == 0"></span>
  54. <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>
  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.ci_type == 1">拔管</span>
  60. <span v-if="scope.row.ci_type == 2">治愈</span>
  61. <span v-if="scope.row.ci_type == 3">死亡</span>
  62. <span v-if="scope.row.ci_type == 4">放弃</span>
  63. <span v-if="scope.row.ci_type == 9">其它</span>
  64. </template>
  65. </el-table-column>
  66. <el-table-column prop="date" label="血培养检查结果" align="center" width="120">
  67. <template slot-scope="scope">
  68. <span v-if="scope.row.blood_cultupe == 0">阴性</span>
  69. <span v-if="scope.row.blood_cultupe == 1">阳性</span>
  70. <span v-if="scope.row.blood_cultupe == 9">未查</span>
  71. </template>
  72. </el-table-column>
  73. <el-table-column prop="date" label="患者导管转归类型" align="center" width="120">
  74. <template slot-scope="scope">
  75. <span v-if="scope.row.sequelae_type == 1">局部感染</span>
  76. <span v-if="scope.row.sequelae_type == 2">静脉炎</span>
  77. <span v-if="scope.row.sequelae_type == 3">导管细菌定植</span>
  78. <span v-if="scope.row.sequelae_type == 4">导管相关血型感染</span>
  79. </template>
  80. </el-table-column>
  81. <el-table-column prop="date" label="备注" align="center" width="180">
  82. <template slot-scope="scope">
  83. <span>{{scope.row.remark}}</span>
  84. </template>
  85. </el-table-column>
  86. <el-table-column prop="date" label="创始人" align="center" width="100">
  87. <template slot-scope="scope">
  88. <span>{{getDoctor(scope.row.creator)}}</span>
  89. </template>
  90. </el-table-column>
  91. <el-table-column prop="date" fixed="right" label="操作" width="140" align="center">
  92. <template slot-scope="scope">
  93. <el-tooltip class="item" effect="dark" content="编辑" placement="top">
  94. <el-button
  95. type="primary"
  96. size="small"
  97. icon="el-icon-edit-outline"
  98. @click="handleUpdateAdviceTemplate(scope.row.id)"
  99. >
  100. </el-button>
  101. </el-tooltip>
  102. <el-tooltip class="item" effect="dark" content="删除" placement="top">
  103. <el-button
  104. size="small"
  105. type="danger"
  106. icon="el-icon-delete"
  107. @click="handleDeleteAdviceTemplate(scope.row.id, scope.$index)"
  108. >
  109. </el-button>
  110. </el-tooltip>
  111. </template>
  112. </el-table-column>
  113. </el-table>
  114. <el-pagination
  115. @size-change="handleSizeChange"
  116. @current-change="handleCurrentChange"
  117. :page-sizes="[10,20,50,100]"
  118. :page-size="10"
  119. background
  120. style="margin-top:20px;"
  121. align="right"
  122. layout="total, sizes, prev, pager, next, jumper"
  123. :total="total"></el-pagination>
  124. <el-dialog
  125. title="新增通路"
  126. :visible.sync="dialogVisible"
  127. width="65%"
  128. center>
  129. <el-form label-width="120px" :model="form" ref="form" :rules="rules" >
  130. <el-row :gutter="24">
  131. <el-col :span="24">
  132. <el-form-item label="通路项目:" :required="true" prop="access_project" >
  133. <el-radio-group style="padding: 10px;" v-model="form.access_project" @change="changeRadio">
  134. <el-radio label="1">内瘘</el-radio>
  135. <el-radio label="2">导管</el-radio>
  136. </el-radio-group>
  137. </el-form-item>
  138. </el-col>
  139. </el-row>
  140. <el-row :gutter="24">
  141. <el-col :span="8">
  142. <el-form-item label="建立日期:" :required="true" prop="start_time">
  143. <el-date-picker
  144. type="datetime"
  145. format="yyyy-MM-dd"
  146. value-format="yyyy-MM-dd"
  147. placeholder="选择时间"
  148. v-model="form.start_time"
  149. style="width:150px">
  150. </el-date-picker>
  151. </el-form-item>
  152. </el-col>
  153. <el-col :span="8">
  154. <el-form-item label="血管通路类型:" :required="true" prop="blood_access_part_opera_id">
  155. <el-select v-model="form.blood_access_part_opera_id" placeholder="请选择" style="width:150px">
  156. <el-option
  157. v-for="item in blood_access_part_opera"
  158. :key="item.id"
  159. :label="item.name"
  160. :value="item.id"
  161. >
  162. </el-option>
  163. </el-select>
  164. </el-form-item>
  165. </el-col>
  166. <el-col :span="8">
  167. <el-form-item label="血管通路部位:" :required="true" prop="blood_access_part_id">
  168. <el-input v-model="form.blood_access_part_id" readonly @focus="showInnerDialog('17')" style="width:150px"></el-input>
  169. </el-form-item>
  170. </el-col>
  171. </el-row>
  172. <el-row :gutter="24">
  173. <el-col :span="8">
  174. <el-form-item label="血管通路部位(其他):" prop="inflow_pass">
  175. <!-- <el-select v-model="form.inflow_pass" placeholder="请选择" style="width:150px">
  176. <el-option
  177. v-for="item in optionsPass"
  178. :key="item.id"
  179. :label="item.name"
  180. :value="item.id">
  181. </el-option>
  182. </el-select> -->
  183. <el-input v-model="form.other_vascular" style="width:200"></el-input>
  184. </el-form-item>
  185. </el-col>
  186. <el-col :span="8">
  187. <el-form-item label="首次启用日期:" :required="true" prop="first_start_time">
  188. <el-date-picker
  189. type="datetime"
  190. format="yyyy-MM-dd"
  191. value-format="yyyy-MM-dd"
  192. placeholder="选择时间"
  193. v-model="form.first_start_time"
  194. style="width:150px">
  195. </el-date-picker>
  196. </el-form-item>
  197. </el-col>
  198. <el-col :span="8">
  199. <el-form-item label="使用状态:" :required="true" prop="user_status">
  200. <el-select v-model="form.user_status" placeholder="请选择" style="width:150px" @change="changeStatus">
  201. <el-option
  202. v-for="item in options"
  203. :key="item.id"
  204. :label="item.name"
  205. :value="item.id">
  206. </el-option>
  207. </el-select>
  208. </el-form-item>
  209. </el-col>
  210. </el-row>
  211. <el-row v-show="showOne">
  212. <el-col :span="8">
  213. <el-form-item label="导管感染转归:">
  214. <el-select v-model="form.ci_type" placeholder="请选择" style="width:150px" @change="changeStatus">
  215. <el-option
  216. v-for="item in optionsTwo"
  217. :key="item.id"
  218. :label="item.name"
  219. :value="item.id">
  220. </el-option>
  221. </el-select>
  222. </el-form-item>
  223. </el-col>
  224. <el-col :span="8">
  225. <el-form-item label="血培养检查结果:">
  226. <el-select v-model="form.blood_cultupe" placeholder="请选择" style="width:150px" @change="changeStatus">
  227. <el-option
  228. v-for="item in optionsThree"
  229. :key="item.id"
  230. :label="item.name"
  231. :value="item.id">
  232. </el-option>
  233. </el-select>
  234. </el-form-item>
  235. </el-col>
  236. <el-col :span="8">
  237. <el-form-item label="患者导管转归类型:">
  238. <el-select v-model="form.sequelae_type" placeholder="请选择" style="width:150px" @change="changeStatus">
  239. <el-option
  240. v-for="item in optionsOne"
  241. :key="item.id"
  242. :label="item.name"
  243. :value="item.id">
  244. </el-option>
  245. </el-select>
  246. </el-form-item>
  247. </el-col>
  248. </el-row>
  249. <el-row v-show="show">
  250. <el-col :span="8">
  251. <el-form-item label="停用日期:">
  252. <el-date-picker
  253. type="datetime"
  254. format="yyyy-MM-dd"
  255. value-format="yyyy-MM-dd"
  256. placeholder="选择时间"
  257. v-model="form.stop_time"
  258. style="width:150px">
  259. </el-date-picker>
  260. </el-form-item>
  261. </el-col>
  262. </el-row>
  263. <el-row v-show="show">
  264. <el-col>
  265. <el-form-item label="停用原因:">
  266. <el-input v-model="form.stop_reason"></el-input>
  267. </el-form-item>
  268. </el-col>
  269. </el-row>
  270. <el-row>
  271. <el-col>
  272. <el-form-item label="备注:">
  273. <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="form.remark"></el-input>
  274. </el-form-item>
  275. </el-col>
  276. </el-row>
  277. </el-form>
  278. <span slot="footer" class="dialog-footer">
  279. <el-button @click="dialogVisible = false">取 消</el-button>
  280. <el-button type="primary" @click="saveVasularAccess('form')">保存</el-button>
  281. </span>
  282. </el-dialog>
  283. <el-dialog
  284. title="编辑通路"
  285. :visible.sync="editDialogVisible"
  286. width="60%"
  287. center>
  288. <el-form label-width="120px" :model="form" ref="form" :rules="rules" >
  289. <el-row :gutter="24">
  290. <el-col :span="24">
  291. <el-form-item label="通路项目:" :required="true" prop="access_project">
  292. <el-radio-group style="padding: 10px;" v-model="form.access_project" @change="changeRadio">
  293. <el-radio label="1">内瘘</el-radio>
  294. <el-radio label="2">导管</el-radio>
  295. </el-radio-group>
  296. </el-form-item>
  297. </el-col>
  298. </el-row>
  299. <el-row :gutter="24">
  300. <el-col :span="8">
  301. <el-form-item label="建立日期:" :required="true" prop="start_time">
  302. <el-date-picker
  303. type="datetime"
  304. format="yyyy-MM-dd"
  305. value-format="yyyy-MM-dd"
  306. placeholder="选择时间"
  307. v-model="form.start_time"
  308. style="width:150px">
  309. </el-date-picker>
  310. </el-form-item>
  311. </el-col>
  312. <el-col :span="8">
  313. <el-form-item label="血管通路类型:" :required="true" prop="blood_access_part_opera_id">
  314. <el-select v-model="form.blood_access_part_opera_id" placeholder="请选择" style="width:150px">
  315. <el-option
  316. v-for="item in blood_access_part_opera"
  317. :key="item.id"
  318. :label="item.name"
  319. :value="item.id"
  320. >
  321. </el-option>
  322. </el-select>
  323. </el-form-item>
  324. </el-col>
  325. <el-col :span="8">
  326. <el-form-item label="血管通路部位:" :required="true" prop="blood_access_part_id">
  327. <!-- <el-select v-model="form.blood_access_part_id" placeholder="请选择" style="width:150px">
  328. <el-option
  329. v-for="item in blood_access_part"
  330. :key="item.id"
  331. :label="item.name"
  332. :value="item.id">
  333. </el-option>
  334. </el-select> -->
  335. <el-input v-model="form.blood_access_part_id" readonly @focus="showInnerDialog('17')" style="width:150px"></el-input>
  336. </el-form-item>
  337. </el-col>
  338. </el-row>
  339. <el-row :gutter="24">
  340. <el-col :span="8">
  341. <el-form-item label="血管通路部位(其他):" :required="true" prop="inflow_pass">
  342. <!-- <el-select v-model="form.inflow_pass" placeholder="请选择" style="width:150px">
  343. <el-option
  344. v-for="item in optionsPass"
  345. :key="item.id"
  346. :label="item.name"
  347. :value="item.id">
  348. </el-option>
  349. </el-select> -->
  350. <el-input v-model="form.other_vascular"></el-input>
  351. </el-form-item>
  352. </el-col>
  353. <el-col :span="8">
  354. <el-form-item label="首次启用日期:" :required="true" prop="first_start_time">
  355. <el-date-picker
  356. type="datetime"
  357. format="yyyy-MM-dd"
  358. value-format="yyyy-MM-dd"
  359. placeholder="选择时间"
  360. v-model="form.first_start_time"
  361. style="width:150px">
  362. </el-date-picker>
  363. </el-form-item>
  364. </el-col>
  365. <el-col :span="8">
  366. <el-form-item label="使用状态:" :required="true" prop="user_status">
  367. <el-select v-model="form.user_status" placeholder="请选择" style="width:150px" @change="changeStatus">
  368. <el-option
  369. v-for="item in options"
  370. :key="item.id"
  371. :label="item.name"
  372. :value="item.id">
  373. </el-option>
  374. </el-select>
  375. </el-form-item>
  376. </el-col>
  377. </el-row>
  378. <el-row v-show="showOne">
  379. <el-col :span="8">
  380. <el-form-item label="导管感染转归:">
  381. <el-select v-model="form.ci_type" placeholder="请选择" style="width:150px" @change="changeStatus">
  382. <el-option
  383. v-for="item in optionsTwo"
  384. :key="item.id"
  385. :label="item.name"
  386. :value="item.id">
  387. </el-option>
  388. </el-select>
  389. </el-form-item>
  390. </el-col>
  391. <el-col :span="8">
  392. <el-form-item label="血培养检查结果:">
  393. <el-select v-model="form.blood_cultupe" placeholder="请选择" style="width:150px" @change="changeStatus">
  394. <el-option
  395. v-for="item in optionsThree"
  396. :key="item.id"
  397. :label="item.name"
  398. :value="item.id">
  399. </el-option>
  400. </el-select>
  401. </el-form-item>
  402. </el-col>
  403. <el-col :span="8">
  404. <el-form-item label="患者导管转归类型:">
  405. <el-select v-model="form.sequelae_type" placeholder="请选择" style="width:150px" @change="changeStatus">
  406. <el-option
  407. v-for="item in optionsOne"
  408. :key="item.id"
  409. :label="item.name"
  410. :value="item.id">
  411. </el-option>
  412. </el-select>
  413. </el-form-item>
  414. </el-col>
  415. </el-row>
  416. <el-row v-show="show">
  417. <el-col :span="8">
  418. <el-form-item label="停用日期:">
  419. <el-date-picker
  420. type="datetime"
  421. format="yyyy-MM-dd"
  422. value-format="yyyy-MM-dd"
  423. placeholder="选择时间"
  424. v-model="form.stop_time"
  425. style="width:150px">
  426. </el-date-picker>
  427. </el-form-item>
  428. </el-col>
  429. </el-row>
  430. <el-row v-show="show">
  431. <el-col>
  432. <el-form-item label="停用原因:">
  433. <el-input v-model="form.stop_reason"></el-input>
  434. </el-form-item>
  435. </el-col>
  436. </el-row>
  437. <el-row>
  438. <el-col>
  439. <el-form-item label="备注:">
  440. <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="form.remark"></el-input>
  441. </el-form-item>
  442. </el-col>
  443. </el-row>
  444. </el-form>
  445. <span slot="footer" class="dialog-footer">
  446. <el-button @click="editDialogVisible= false">取 消</el-button>
  447. <el-button type="primary" @click="updatedVasularAccess('form')">保存</el-button>
  448. </span>
  449. </el-dialog>
  450. </div>
  451. <multi-select-box
  452. :propsForm="InnerDialogProps"
  453. v-on:dialog-comfirm="innerDialogComfirm"
  454. v-on:dialog-cancle="innerDialogCancle"
  455. ></multi-select-box>
  456. </div>
  457. </template>
  458. <script>
  459. const moment = require('moment')
  460. import PatientSidebar from './components/PatientSidebar'
  461. import { fetchAllAdminUsers, fetchAllDoctorAndNurse } from '@/api/doctor'
  462. import { saveVasularAccess,getAllVascularAccessList,getVascularAccessByDetail,updatedVasularAccess,DeleteVascularAccess,getAccessList } from '@/api/patient'
  463. import { jsGetAge, uParseTime } from '@/utils/tools'
  464. import { getDataConfig } from '@/utils/data'
  465. import multiSelectBox from '../dialysis/details/dialog/MultiSelectBox'
  466. export default {
  467. name: 'doctorAdvice',
  468. components: {
  469. PatientSidebar,
  470. multiSelectBox
  471. },
  472. data() {
  473. return {
  474. tableData: [],
  475. nowtime: moment(new Date()).format('YYYY-MM-DD'),
  476. page: 1,
  477. limit: 10,
  478. total: 0,
  479. rules: {
  480. start_time: [{ required: true, message: '请输入建立日期' }],
  481. access_project: [{ required: true, message: '请选择通路项目' }],
  482. blood_access_part_opera_id:[{required:true,message:'请选择血管通路类型'}],
  483. blood_access_part_id:[{required:true,message:"请选择血管通路"}],
  484. first_start_time:[{required:true,message:"请选择首次启用日期"}],
  485. user_status:[{required:true,message:"请选择使用状态"}]
  486. },
  487. dialogVisible:false,
  488. editDialogVisible:false,
  489. form:{
  490. id:0,
  491. access_project:"1",
  492. blood_access_part_id:"",
  493. blood_access_part_opera_id:"",
  494. inflow_pass:"",
  495. start_time:moment(new Date()).format('YYYY-MM-DD'),
  496. first_start_time:moment(new Date()).format('YYYY-MM-DD'),
  497. stop_reason:"",
  498. user_status:1,
  499. remark:"",
  500. stop_time:"",
  501. other_vascular:"",
  502. ci_type:"",//导管感染转归
  503. blood_cultupe:"", //血培养检查结果
  504. sequelae_type:"",//患者导管转归类型
  505. },
  506. options:[
  507. {id:1,name:"启用"},
  508. {id:2,name:"停用"}
  509. ],
  510. optionsPass:[
  511. {id:1,name:"流入-动脉"},
  512. {id:2,name:"流出-静脉"},
  513. ],
  514. blood_access_part_opera:[],
  515. blood_access_part:[],
  516. show:false,
  517. doctorList:[],
  518. InnerDialogProps: {
  519. values: [],
  520. visibility: false,
  521. isShowTextArea: true,
  522. customContent: '',
  523. titles: '',
  524. type: '' // 不同弹框类型,用来匹配数据
  525. },
  526. new_blood_access_part_opera:[],
  527. new_blood_access_part:[],
  528. // 导管感染类型
  529. optionsOne:[
  530. {id:1,name:"局部感染"},
  531. {id:2,name:"静脉炎"},
  532. {id:3,name:"导管细菌定植"},
  533. {id:4,name:"导管相关血型感染"},
  534. ],
  535. // 导管转归类型
  536. optionsTwo:[
  537. {id:1,name:"拔管"},
  538. {id:2,name:"治愈"},
  539. {id:3,name:"死亡"},
  540. {id:4,name:"放弃"},
  541. {id:9,name:"其它"},
  542. ],
  543. // 血培养检查结果
  544. optionsThree:[
  545. {id:0,name:"阴性"},
  546. {id:1,name:"阳性"},
  547. {id:9,name:"未查"}
  548. ],
  549. showOne:false
  550. }
  551. },
  552. methods: {
  553. clickuseradvicecell(row, column, cell, event) {
  554. },
  555. onTranPatient: function(tranPatient) {
  556. this.currentPatient = tranPatient
  557. },
  558. CreateTime(time) {
  559. return uParseTime(time, '{y}-{m}-{d} {h}:{i}:{s}')
  560. },
  561. handleSizeChange(limit) {
  562. this.limit = limit
  563. this.getlist()
  564. },
  565. handleCurrentChange(page) {
  566. this.page = page
  567. this.getlist()
  568. },
  569. changeStatus(val){
  570. if(val == 1 ){
  571. this.show = false
  572. }
  573. if(val == 2){
  574. this.show = true
  575. }
  576. },
  577. saveVasularAccess(formName){
  578. this.$refs[formName].validate((valid)=>{
  579. if(valid){
  580. var blood_name = ""
  581. for(let i=0;i<this.blood_access_part_opera.length;i++){
  582. if(this.blood_access_part_opera[i].id == this.form.blood_access_part_opera_id){
  583. blood_name = this.blood_access_part_opera[i].name
  584. }
  585. }
  586. var inflow_pass = ""
  587. for(let i=0;i<this.optionsPass.length;i++){
  588. if(this.optionsPass[i].id == this.form.inflow_pass){
  589. inflow_pass = this.optionsPass[i].name
  590. }
  591. }
  592. console.log("params",this.form.blood_access_part_id)
  593. var params = {
  594. patient_id:this.patientID,
  595. access_project:parseInt(this.form.access_project),
  596. start_time:this.form.start_time,
  597. blood_access_part_opera_id:blood_name,
  598. blood_access_part_id:this.form.blood_access_part_id,
  599. inflow_pass:inflow_pass,
  600. first_start_time:this.form.first_start_time,
  601. user_status:this.form.user_status,
  602. stop_reason:this.form.stop_reason,
  603. remark:this.form.remark,
  604. stop_time:this.form.stop_time,
  605. other_vascular:this.form.other_vascular,
  606. ci_type:this.form.ci_type,
  607. blood_cultupe:this.form.blood_cultupe,
  608. sequelae_type:this.form.sequelae_type,
  609. }
  610. console.log("params",params)
  611. saveVasularAccess(params).then(response=>{
  612. if(response.data.state == 1){
  613. var access = response.data.data.access
  614. console.log("access",access)
  615. this.$message.success("保存成功")
  616. this.dialogVisible = false
  617. this.getlist()
  618. this.form.blood_access_part_opera_id=""
  619. this.form.blood_access_part_id = ""
  620. this.inflow_pass = ""
  621. this.user_status = ""
  622. this.stop_reason = ""
  623. this.remark = ""
  624. }else{
  625. this.$message.error("该日期数据已存在!")
  626. }
  627. })
  628. }
  629. })
  630. },
  631. getlist(){
  632. var params = {
  633. page:this.page,
  634. limit:this.limit,
  635. patient_id:this.patientID,
  636. }
  637. getAllVascularAccessList(params).then(response=>{
  638. if(response.data.state == 1){
  639. var list = response.data.data.list
  640. console.log("list",list)
  641. this.tableData = list
  642. var total = response.data.data.total
  643. console.log("total",total)
  644. this.total = total
  645. var doctor = response.data.data.doctor
  646. console.log("doctor",doctor)
  647. this.doctorList = doctor
  648. }
  649. })
  650. },
  651. getTime(value, temp) {
  652. if (value != undefined) {
  653. return uParseTime(value, temp);
  654. }
  655. return "";
  656. },
  657. handleUpdateAdviceTemplate(id){
  658. getVascularAccessByDetail(id).then(response=>{
  659. if(response.data.state ==1){
  660. var accessDetail = response.data.data.accessDetail
  661. console.log("accessDetail",accessDetail)
  662. this.form.id = accessDetail.id
  663. this.form.access_project = accessDetail.access_project.toString()
  664. var arr = []
  665. var arrOne = []
  666. var arrThree = []
  667. var arrFour = []
  668. if(accessDetail.access_project == "1"){
  669. for(let i=0;i<this.new_blood_access_part_opera.length;i++){
  670. if(this.new_blood_access_part_opera[i].field_type == 1){
  671. arr.push(this.new_blood_access_part_opera[i])
  672. }
  673. }
  674. this.blood_access_part_opera = arr
  675. for(let j=0;j<this.new_blood_access_part.length;j++){
  676. if(this.new_blood_access_part[j].field_type == 1){
  677. arrThree.push(this.new_blood_access_part[j])
  678. }
  679. }
  680. this.blood_access_part = arrThree
  681. }
  682. if(accessDetail.access_project == "2"){
  683. this.showOne = true
  684. for(let i=0;i<this.new_blood_access_part_opera.length;i++){
  685. if(this.new_blood_access_part_opera[i].field_type == 2){
  686. arrOne.push(this.new_blood_access_part_opera[i])
  687. }
  688. }
  689. this.blood_access_part_opera = arrOne
  690. for(let j=0;j<this.new_blood_access_part.length;j++){
  691. if(this.new_blood_access_part[j].field_type == 2){
  692. arrFour.push(this.new_blood_access_part[j])
  693. }
  694. }
  695. this.blood_access_part = arrFour
  696. }
  697. this.form.blood_access_part_id = accessDetail.blood_access_part_id
  698. var blood_part = 0
  699. for(let i=0;i<this.blood_access_part_opera.length;i++){
  700. if(accessDetail.blood_access_part_opera_id == this.blood_access_part_opera[i].name){
  701. blood_part = this.blood_access_part_opera[i].id
  702. }
  703. }
  704. this.form.blood_access_part_opera_id = blood_part
  705. this.form.first_start_time = this.getTime(accessDetail.first_start_time,"{y}-{m}-{d}")
  706. var inflow_id = 0
  707. for(let i=0;i<this.optionsPass.length;i++){
  708. if(this.optionsPass[i].name == accessDetail.inflow_pass){
  709. inflow_id = this.optionsPass[i].id
  710. }
  711. }
  712. this.form.inflow_pass = inflow_id
  713. this.form.remark = accessDetail.remark
  714. this.form.start_time = this.getTime(accessDetail.start_time,"{y}-{m}-{d}")
  715. this.form.stop_reason = accessDetail.stop_reason
  716. this.form.stop_time = this.getTime(accessDetail.stop_time,"{y}-{m}-{d}")
  717. this.form.user_status = accessDetail.user_status
  718. this.form.other_vascular = accessDetail.other_vascular
  719. this.form.ci_type = accessDetail.ci_type
  720. this.form.blood_cultupe = accessDetail.blood_cultupe
  721. this.form.sequelae_type = accessDetail.sequelae_type
  722. if(accessDetail.user_status == 1){
  723. this.show = false
  724. }
  725. if(accessDetail.user_status == 2){
  726. this.show = true
  727. }
  728. this.editDialogVisible = true
  729. }
  730. })
  731. },
  732. getDoctor(id){
  733. var name = ""
  734. for(let i=0;i<this.doctorList.length;i++){
  735. if(id == this.doctorList[i].admin_user_id){
  736. name = this.doctorList[i].user_name
  737. }
  738. }
  739. return name
  740. },
  741. handleDeleteAdviceTemplate(id,index){
  742. this.$confirm("确认删除吗?", "删除", {
  743. confirmButtonText: "确 定",
  744. cancelButtonText: "取 消",
  745. type: "warning"
  746. })
  747. .then(() => {
  748. DeleteVascularAccess(id).then(response => {
  749. if(response.data.state == 1){
  750. var msg = response.data.data.msg
  751. this.tableData.splice(index, 1);
  752. this.$message.success("删除成功!")
  753. }
  754. });
  755. })
  756. .catch(() => {});
  757. },
  758. updatedVasularAccess(formName){
  759. this.$refs[formName].validate((valid)=>{
  760. if(valid){
  761. var blood_name = ""
  762. for(let i=0;i<this.blood_access_part_opera.length;i++){
  763. if(this.blood_access_part_opera[i].id == this.form.blood_access_part_opera_id){
  764. blood_name = this.blood_access_part_opera[i].name
  765. }
  766. }
  767. // var blood_part = ""
  768. // for(let i=0;i<this.blood_access_part.length;i++){
  769. // if(this.form.blood_access_part_id == this.blood_access_part[i].id){
  770. // blood_part = this.blood_access_part[i].name
  771. // }
  772. // }
  773. var inflow_pass = ""
  774. for(let i=0;i<this.optionsPass.length;i++){
  775. if(this.optionsPass[i].id == this.form.inflow_pass){
  776. inflow_pass = this.optionsPass[i].name
  777. }
  778. }
  779. var params = {
  780. id:this.form.id,
  781. patient_id:this.patientID,
  782. access_project:parseInt(this.form.access_project),
  783. start_time:this.form.start_time,
  784. blood_access_part_opera_id:blood_name,
  785. blood_access_part_id:this.form.blood_access_part_id,
  786. inflow_pass:inflow_pass,
  787. first_start_time:this.form.first_start_time,
  788. user_status:this.form.user_status,
  789. stop_reason:this.form.stop_reason,
  790. remark:this.form.remark,
  791. stop_time:this.form.stop_time,
  792. patient_id:this.patientID,
  793. other_vascular:this.form.other_vascular,
  794. ci_type:this.form.ci_type,
  795. blood_cultupe:this.form.blood_cultupe,
  796. sequelae_type:this.form.sequelae_type
  797. }
  798. updatedVasularAccess(params).then(response=>{
  799. if(response.data.state == 1){
  800. var access = response.data.data.access
  801. console.log("access",access)
  802. this.$message.success("保存成功")
  803. this.editDialogVisible = false
  804. this.getlist()
  805. }else{
  806. this.$message.error("该日期数据已存在!")
  807. }
  808. })
  809. }
  810. })
  811. },
  812. rowClick(row){
  813. console.log("row",row)
  814. this.$router.push({path:'/patients/patient/'+this.patientID+'/vascularAccessDetail/'+row.id})
  815. },
  816. showInnerDialog: function(val) {
  817. this.InnerDialogProps.visibility = true
  818. switch (val) {
  819. case '17': // 血管通路
  820. this.InnerDialogProps.values = this.blood_access_part
  821. this.InnerDialogProps.titles = '血管通路部位'
  822. this.InnerDialogProps.type = 'blood_access_part_id'
  823. this.InnerDialogProps.selected = this.form.blood_access_part_id
  824. this.InnerDialogProps.isShowTextArea = false
  825. break
  826. }
  827. },
  828. innerDialogComfirm: function(val) {
  829. this.InnerDialogProps.visibility = false
  830. switch (val.type) {
  831. case 'blood_access_part_id':
  832. this.form.blood_access_part_id = val.value.join(',')
  833. break
  834. }
  835. },
  836. innerDialogCancle: function() {
  837. this.InnerDialogProps.visibility = false
  838. },
  839. getAccessList(){
  840. getAccessList().then(response=>{
  841. if(response.data.state == 1){
  842. var blood_access_part_opera = response.data.data.blood_access_part_opera
  843. console.log("blood_access_part_operahhahs",blood_access_part_opera)
  844. this.new_blood_access_part_opera = blood_access_part_opera
  845. var blood_access_part = response.data.data.blood_access_part
  846. console.log("blood_access",blood_access_part)
  847. this.new_blood_access_part = blood_access_part
  848. console.log("通路项目",this.form.access_project)
  849. var arr = []
  850. var arrOne = []
  851. if(this.form.access_project == 1 ){
  852. for(let i=0;i<this.new_blood_access_part_opera.length;i++){
  853. if(this.new_blood_access_part_opera[i].field_type == 1){
  854. arr.push(this.new_blood_access_part_opera[i])
  855. }
  856. }
  857. for(let i=0;i<this.new_blood_access_part.length;i++){
  858. if(this.new_blood_access_part[i].field_type == 1){
  859. arrOne.push(this.new_blood_access_part[i])
  860. }
  861. }
  862. }
  863. this.blood_access_part_opera = arr
  864. this.blood_access_part = arrOne
  865. }
  866. })
  867. },
  868. changeRadio(val){
  869. console.log("val",val)
  870. var arr = []
  871. var arrOne = []
  872. var arrTwo = []
  873. var arrThree = []
  874. for(let i=0;i<this.new_blood_access_part_opera.length;i++){
  875. if(this.new_blood_access_part_opera[i].field_type == 1){
  876. arr.push(this.new_blood_access_part_opera[i])
  877. }
  878. if(this.new_blood_access_part_opera[i].field_type == 2){
  879. arrOne.push(this.new_blood_access_part_opera[i])
  880. }
  881. }
  882. for(let i=0;i<this.new_blood_access_part.length;i++){
  883. if(this.new_blood_access_part[i].field_type == 1){
  884. arrTwo.push(this.new_blood_access_part[i])
  885. }
  886. if(this.new_blood_access_part[i].field_type == 2){
  887. arrThree.push(this.new_blood_access_part[i])
  888. }
  889. }
  890. if(val == 1){
  891. this.blood_access_part_opera = arr
  892. this.blood_access_part = arrTwo
  893. this.showOne = false
  894. }
  895. if(val == 2){
  896. this.blood_access_part_opera = arrOne
  897. this.blood_access_part = arrThree
  898. this.showOne = true
  899. }
  900. console.log("arr",arr)
  901. console.log("arrOne",arrOne)
  902. }
  903. },
  904. created() {
  905. const id = this.$route.params && this.$route.params.id
  906. this.patientID = parseInt(id)
  907. this.getlist()
  908. //获取血管通路
  909. this.getAccessList()
  910. },
  911. }
  912. </script>
  913. <style>
  914. .oictable ::-webkit-scrollbar {
  915. height: 15px;
  916. }
  917. </style>
  918. <style rel="stylesheet/scss" lang="scss">
  919. ::-webkit-scrollbar{
  920. height:15px;
  921. }
  922. </style>