vascularAccess.vue 38KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995
  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)}}</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)}}</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)}}</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="150px" :model="form" ref="form" :rules="rules" >
  130. <el-row :gutter="24">
  131. <el-col :span="24">
  132. <el-form-item label="通路项目:" 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:200px">
  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:200px" clearable>
  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="血管通路部位:">
  168. <el-input v-model="form.blood_access_part_id" readonly @focus="showInnerDialog('17')" style="width:200px"></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:200px"></el-input>
  184. </el-form-item>
  185. </el-col>
  186. <el-col :span="8">
  187. <el-form-item label="首次启用日期:" 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:200px">
  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:200px" @change="changeStatus" clearable>
  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 :gutter="24" v-show="showOne">
  212. <el-col :span="8">
  213. <el-form-item label="导管感染转归:">
  214. <el-select v-model="form.ci_type" placeholder="请选择" style="width:200px" @change="changeStatus" clearable>
  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:200px" @change="changeStatus" clearable>
  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:200px" @change="changeStatus" clearable>
  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:200px">
  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" clearable>
  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="血管通路部位:">
  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="首次启用日期:" 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" clearable>
  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" clearable>
  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" clearable>
  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. <sitemap> </sitemap>
  451. </div>
  452. <multi-select-box
  453. :propsForm="InnerDialogProps"
  454. v-on:dialog-comfirm="innerDialogComfirm"
  455. v-on:dialog-cancle="innerDialogCancle"
  456. ></multi-select-box>
  457. </div>
  458. </template>
  459. <script>
  460. const moment = require('moment')
  461. import PatientSidebar from './components/PatientSidebar'
  462. import { fetchAllAdminUsers, fetchAllDoctorAndNurse } from '@/api/doctor'
  463. import { saveVasularAccess,getAllVascularAccessList,getVascularAccessByDetail,updatedVasularAccess,DeleteVascularAccess,getAccessList } from '@/api/patient'
  464. import { jsGetAge, uParseTime } from '@/utils/tools'
  465. import { getDataConfig } from '@/utils/data'
  466. import multiSelectBox from '../dialysis/details/dialog/MultiSelectBox'
  467. import sitemap from './Sitemap'
  468. export default {
  469. name: 'doctorAdvice',
  470. components: {
  471. PatientSidebar,
  472. multiSelectBox,
  473. sitemap
  474. },
  475. data() {
  476. return {
  477. tableData: [],
  478. nowtime: moment(new Date()).format('YYYY-MM-DD'),
  479. page: 1,
  480. limit: 10,
  481. total: 0,
  482. rules: {
  483. start_time: [{ required: true, message: '请输入建立日期' }],
  484. access_project: [{ required: true, message: '请选择通路项目' }],
  485. blood_access_part_opera_id:[{required:true,message:'请选择血管通路类型'}],
  486. blood_access_part_id:[{required:true,message:"请选择血管通路"}],
  487. // first_start_time:[{required:true,message:"请选择首次启用日期"}],
  488. user_status:[{required:true,message:"请选择使用状态"}]
  489. },
  490. dialogVisible:false,
  491. editDialogVisible:false,
  492. form:{
  493. id:0,
  494. access_project:"1",
  495. blood_access_part_id:"",
  496. blood_access_part_opera_id:"",
  497. inflow_pass:"",
  498. start_time:moment(new Date()).format('YYYY-MM-DD'),
  499. first_start_time:moment(new Date()).format('YYYY-MM-DD'),
  500. stop_reason:"",
  501. user_status:1,
  502. remark:"",
  503. stop_time:"",
  504. other_vascular:"",
  505. ci_type:"",//导管感染转归
  506. blood_cultupe:"", //血培养检查结果
  507. sequelae_type:"",//患者导管转归类型
  508. },
  509. options:[
  510. {id:1,name:"启用"},
  511. {id:2,name:"停用"},
  512. {id:3,name:"备用"}
  513. ],
  514. optionsPass:[
  515. {id:1,name:"流入-动脉"},
  516. {id:2,name:"流出-静脉"},
  517. ],
  518. blood_access_part_opera:[],
  519. blood_access_part:[],
  520. show:false,
  521. doctorList:[],
  522. InnerDialogProps: {
  523. values: [],
  524. visibility: false,
  525. isShowTextArea: true,
  526. customContent: '',
  527. titles: '',
  528. type: '' // 不同弹框类型,用来匹配数据
  529. },
  530. new_blood_access_part_opera:[],
  531. new_blood_access_part:[],
  532. // 导管感染类型
  533. optionsOne:[
  534. {id:1,name:"局部感染"},
  535. {id:2,name:"静脉炎"},
  536. {id:3,name:"导管细菌定植"},
  537. {id:4,name:"导管相关血型感染"},
  538. ],
  539. // 导管转归类型
  540. optionsTwo:[
  541. {id:1,name:"拔管"},
  542. {id:2,name:"治愈"},
  543. {id:3,name:"死亡"},
  544. {id:4,name:"放弃"},
  545. {id:9,name:"其它"},
  546. ],
  547. // 血培养检查结果
  548. optionsThree:[
  549. {id:0,name:"阴性"},
  550. {id:1,name:"阳性"},
  551. {id:9,name:"未查"}
  552. ],
  553. showOne:false
  554. }
  555. },
  556. methods: {
  557. clickuseradvicecell(row, column, cell, event) {
  558. },
  559. onTranPatient: function(tranPatient) {
  560. this.currentPatient = tranPatient
  561. },
  562. CreateTime(time) {
  563. return uParseTime(time, '{y}-{m}-{d} {h}:{i}:{s}')
  564. },
  565. handleSizeChange(limit) {
  566. this.limit = limit
  567. this.getlist()
  568. },
  569. handleCurrentChange(page) {
  570. this.page = page
  571. this.getlist()
  572. },
  573. changeStatus(val){
  574. if(val == 1 ){
  575. this.show = false
  576. }
  577. if(val == 2){
  578. this.show = true
  579. }
  580. },
  581. saveVasularAccess(formName){
  582. this.$refs[formName].validate((valid)=>{
  583. if(valid){
  584. var blood_name = ""
  585. for(let i=0;i<this.blood_access_part_opera.length;i++){
  586. if(this.blood_access_part_opera[i].id == this.form.blood_access_part_opera_id){
  587. blood_name = this.blood_access_part_opera[i].name
  588. }
  589. }
  590. var inflow_pass = ""
  591. for(let i=0;i<this.optionsPass.length;i++){
  592. if(this.optionsPass[i].id == this.form.inflow_pass){
  593. inflow_pass = this.optionsPass[i].name
  594. }
  595. }
  596. console.log("params",this.form.blood_access_part_id)
  597. var params = {
  598. patient_id:this.patientID,
  599. access_project:parseInt(this.form.access_project),
  600. start_time:this.form.start_time,
  601. blood_access_part_opera_id:blood_name,
  602. blood_access_part_id:this.form.blood_access_part_id,
  603. inflow_pass:inflow_pass,
  604. first_start_time:this.form.first_start_time,
  605. user_status:this.form.user_status,
  606. stop_reason:this.form.stop_reason,
  607. remark:this.form.remark,
  608. stop_time:this.form.stop_time,
  609. other_vascular:this.form.other_vascular,
  610. ci_type:this.form.ci_type,
  611. blood_cultupe:this.form.blood_cultupe,
  612. sequelae_type:this.form.sequelae_type,
  613. }
  614. console.log("params",params)
  615. saveVasularAccess(params).then(response=>{
  616. if(response.data.state == 1){
  617. var access = response.data.data.access
  618. console.log("access",access)
  619. this.$message.success("保存成功")
  620. this.dialogVisible = false
  621. this.getlist()
  622. this.form.blood_access_part_opera_id=""
  623. this.form.blood_access_part_id = ""
  624. this.inflow_pass = ""
  625. this.user_status = ""
  626. this.stop_reason = ""
  627. this.remark = ""
  628. }else{
  629. this.$message.error("该日期数据已存在!")
  630. }
  631. })
  632. }
  633. })
  634. },
  635. getlist(){
  636. var params = {
  637. page:this.page,
  638. limit:this.limit,
  639. patient_id:this.patientID,
  640. }
  641. getAllVascularAccessList(params).then(response=>{
  642. if(response.data.state == 1){
  643. var list = response.data.data.list
  644. console.log("list",list)
  645. this.tableData = list
  646. var total = response.data.data.total
  647. console.log("total",total)
  648. this.total = total
  649. var doctor = response.data.data.doctor
  650. console.log("doctor",doctor)
  651. this.doctorList = doctor
  652. }
  653. })
  654. },
  655. // getTime(value, temp) {
  656. // if (value != undefined) {
  657. // return uParseTime(value, temp);
  658. // }
  659. // return "";
  660. // },
  661. getTime(val) {
  662. if(val < 0){
  663. return ""
  664. }
  665. if(val == ""){
  666. return ""
  667. }else {
  668. return uParseTime(val, '{y}-{m}-{d}')
  669. }
  670. },
  671. handleUpdateAdviceTemplate(id){
  672. getVascularAccessByDetail(id).then(response=>{
  673. if(response.data.state ==1){
  674. var accessDetail = response.data.data.accessDetail
  675. console.log("accessDetail",accessDetail)
  676. this.form.id = accessDetail.id
  677. this.form.access_project = accessDetail.access_project.toString()
  678. var arr = []
  679. var arrOne = []
  680. var arrThree = []
  681. var arrFour = []
  682. if(accessDetail.access_project == "1"){
  683. for(let i=0;i<this.new_blood_access_part_opera.length;i++){
  684. if(this.new_blood_access_part_opera[i].field_type == 1){
  685. arr.push(this.new_blood_access_part_opera[i])
  686. }
  687. }
  688. this.blood_access_part_opera = arr
  689. for(let j=0;j<this.new_blood_access_part.length;j++){
  690. if(this.new_blood_access_part[j].field_type == 1){
  691. arrThree.push(this.new_blood_access_part[j])
  692. }
  693. }
  694. this.blood_access_part = arrThree
  695. }
  696. if(accessDetail.access_project == "2"){
  697. this.showOne = true
  698. for(let i=0;i<this.new_blood_access_part_opera.length;i++){
  699. if(this.new_blood_access_part_opera[i].field_type == 2){
  700. arrOne.push(this.new_blood_access_part_opera[i])
  701. }
  702. }
  703. this.blood_access_part_opera = arrOne
  704. for(let j=0;j<this.new_blood_access_part.length;j++){
  705. if(this.new_blood_access_part[j].field_type == 2){
  706. arrFour.push(this.new_blood_access_part[j])
  707. }
  708. }
  709. this.blood_access_part = arrFour
  710. }
  711. this.form.blood_access_part_id = accessDetail.blood_access_part_id
  712. var blood_part = 0
  713. for(let i=0;i<this.blood_access_part_opera.length;i++){
  714. if(accessDetail.blood_access_part_opera_id == this.blood_access_part_opera[i].name){
  715. blood_part = this.blood_access_part_opera[i].id
  716. }
  717. }
  718. this.form.blood_access_part_opera_id = blood_part
  719. this.form.first_start_time = this.getTime(accessDetail.first_start_time)
  720. var inflow_id = 0
  721. for(let i=0;i<this.optionsPass.length;i++){
  722. if(this.optionsPass[i].name == accessDetail.inflow_pass){
  723. inflow_id = this.optionsPass[i].id
  724. }
  725. }
  726. this.form.inflow_pass = inflow_id
  727. this.form.remark = accessDetail.remark
  728. this.form.start_time = this.getTime(accessDetail.start_time)
  729. this.form.stop_reason = accessDetail.stop_reason
  730. this.form.stop_time = this.getTime(accessDetail.stop_time)
  731. this.form.user_status = accessDetail.user_status
  732. this.form.other_vascular = accessDetail.other_vascular
  733. this.form.ci_type = accessDetail.ci_type
  734. this.form.blood_cultupe = accessDetail.blood_cultupe
  735. this.form.sequelae_type = accessDetail.sequelae_type
  736. if(accessDetail.user_status == 1){
  737. this.show = false
  738. }
  739. if(accessDetail.user_status == 2){
  740. this.show = true
  741. }
  742. this.editDialogVisible = true
  743. }
  744. })
  745. },
  746. getDoctor(id){
  747. var name = ""
  748. for(let i=0;i<this.doctorList.length;i++){
  749. if(id == this.doctorList[i].admin_user_id){
  750. name = this.doctorList[i].user_name
  751. }
  752. }
  753. return name
  754. },
  755. handleDeleteAdviceTemplate(id,index){
  756. this.$confirm("确认删除吗?", "删除", {
  757. confirmButtonText: "确 定",
  758. cancelButtonText: "取 消",
  759. type: "warning"
  760. })
  761. .then(() => {
  762. DeleteVascularAccess(id).then(response => {
  763. if(response.data.state == 1){
  764. var msg = response.data.data.msg
  765. this.tableData.splice(index, 1);
  766. this.$message.success("删除成功!")
  767. }
  768. });
  769. })
  770. .catch(() => {});
  771. },
  772. updatedVasularAccess(formName){
  773. this.$refs[formName].validate((valid)=>{
  774. if(valid){
  775. var blood_name = ""
  776. for(let i=0;i<this.blood_access_part_opera.length;i++){
  777. if(this.blood_access_part_opera[i].id == this.form.blood_access_part_opera_id){
  778. blood_name = this.blood_access_part_opera[i].name
  779. }
  780. }
  781. // var blood_part = ""
  782. // for(let i=0;i<this.blood_access_part.length;i++){
  783. // if(this.form.blood_access_part_id == this.blood_access_part[i].id){
  784. // blood_part = this.blood_access_part[i].name
  785. // }
  786. // }
  787. var inflow_pass = ""
  788. for(let i=0;i<this.optionsPass.length;i++){
  789. if(this.optionsPass[i].id == this.form.inflow_pass){
  790. inflow_pass = this.optionsPass[i].name
  791. }
  792. }
  793. var params = {
  794. id:this.form.id,
  795. patient_id:this.patientID,
  796. access_project:parseInt(this.form.access_project),
  797. start_time:this.form.start_time,
  798. blood_access_part_opera_id:blood_name,
  799. blood_access_part_id:this.form.blood_access_part_id,
  800. inflow_pass:inflow_pass,
  801. first_start_time:this.form.first_start_time,
  802. user_status:this.form.user_status,
  803. stop_reason:this.form.stop_reason,
  804. remark:this.form.remark,
  805. stop_time:this.form.stop_time,
  806. patient_id:this.patientID,
  807. other_vascular:this.form.other_vascular,
  808. ci_type:this.form.ci_type,
  809. blood_cultupe:this.form.blood_cultupe,
  810. sequelae_type:this.form.sequelae_type
  811. }
  812. updatedVasularAccess(params).then(response=>{
  813. if(response.data.state == 1){
  814. var access = response.data.data.access
  815. console.log("access",access)
  816. this.$message.success("保存成功")
  817. this.editDialogVisible = false
  818. this.getlist()
  819. }else{
  820. this.$message.error("该日期数据已存在!")
  821. }
  822. })
  823. }
  824. })
  825. },
  826. rowClick(row){
  827. console.log("row",row)
  828. this.$router.push({path:'/patients/patient/'+this.patientID+'/vascularAccessDetail/'+row.id})
  829. },
  830. showInnerDialog: function(val) {
  831. this.InnerDialogProps.visibility = true
  832. switch (val) {
  833. case '17': // 血管通路
  834. this.InnerDialogProps.values = this.blood_access_part
  835. this.InnerDialogProps.titles = '血管通路部位'
  836. this.InnerDialogProps.type = 'blood_access_part_id'
  837. this.InnerDialogProps.selected = this.form.blood_access_part_id
  838. this.InnerDialogProps.isShowTextArea = false
  839. break
  840. }
  841. },
  842. innerDialogComfirm: function(val) {
  843. this.InnerDialogProps.visibility = false
  844. switch (val.type) {
  845. case 'blood_access_part_id':
  846. this.form.blood_access_part_id = val.value.join(',')
  847. break
  848. }
  849. },
  850. innerDialogCancle: function() {
  851. this.InnerDialogProps.visibility = false
  852. },
  853. getAccessList(){
  854. getAccessList().then(response=>{
  855. if(response.data.state == 1){
  856. var blood_access_part_opera = response.data.data.blood_access_part_opera
  857. console.log("blood_access_part_operahhahs",blood_access_part_opera)
  858. this.new_blood_access_part_opera = blood_access_part_opera
  859. var blood_access_part = response.data.data.blood_access_part
  860. console.log("blood_access",blood_access_part)
  861. this.new_blood_access_part = blood_access_part
  862. console.log("通路项目",this.form.access_project)
  863. var arr = []
  864. var arrOne = []
  865. if(this.form.access_project == 1 ){
  866. for(let i=0;i<this.new_blood_access_part_opera.length;i++){
  867. if(this.new_blood_access_part_opera[i].field_type == 1){
  868. arr.push(this.new_blood_access_part_opera[i])
  869. }
  870. }
  871. for(let i=0;i<this.new_blood_access_part.length;i++){
  872. if(this.new_blood_access_part[i].field_type == 1){
  873. arrOne.push(this.new_blood_access_part[i])
  874. }
  875. }
  876. }
  877. this.blood_access_part_opera = arr
  878. this.blood_access_part = arrOne
  879. }
  880. })
  881. },
  882. changeRadio(val){
  883. console.log("val",val)
  884. var arr = []
  885. var arrOne = []
  886. var arrTwo = []
  887. var arrThree = []
  888. for(let i=0;i<this.new_blood_access_part_opera.length;i++){
  889. if(this.new_blood_access_part_opera[i].field_type == 1){
  890. arr.push(this.new_blood_access_part_opera[i])
  891. }
  892. if(this.new_blood_access_part_opera[i].field_type == 2){
  893. arrOne.push(this.new_blood_access_part_opera[i])
  894. }
  895. }
  896. for(let i=0;i<this.new_blood_access_part.length;i++){
  897. if(this.new_blood_access_part[i].field_type == 1){
  898. arrTwo.push(this.new_blood_access_part[i])
  899. }
  900. if(this.new_blood_access_part[i].field_type == 2){
  901. arrThree.push(this.new_blood_access_part[i])
  902. }
  903. }
  904. if(val == 1){
  905. this.blood_access_part_opera = arr
  906. this.blood_access_part = arrTwo
  907. this.showOne = false
  908. }
  909. if(val == 2){
  910. this.blood_access_part_opera = arrOne
  911. this.blood_access_part = arrThree
  912. this.showOne = true
  913. }
  914. console.log("arr",arr)
  915. console.log("arrOne",arrOne)
  916. }
  917. },
  918. created() {
  919. const id = this.$route.params && this.$route.params.id
  920. this.patientID = parseInt(id)
  921. this.getlist()
  922. //获取血管通路
  923. this.getAccessList()
  924. },
  925. }
  926. </script>
  927. <style>
  928. .oictable ::-webkit-scrollbar {
  929. height: 15px;
  930. }
  931. </style>
  932. <style rel="stylesheet/scss" lang="scss">
  933. ::-webkit-scrollbar{
  934. height:15px;
  935. }
  936. </style>