123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995 |
- <template>
- <div class="patient-container">
- <patient-sidebar :id="patientID" defaultActive="1-6" v-on:tran-patient="onTranPatient"></patient-sidebar>
- <div class="patient-app-container advice-container app-container">
- <div style="display:flex;justify-content: space-between;align-items: center;margin-bottom: 12px;">
- <span style="font-weight:bold;">血管通路列表</span>
- <el-button size="medium" type="primary" @click="dialogVisible =true">新增</el-button>
- </div>
- <el-table class="oictable" :data="tableData" border style="width:100%">
- <el-table-column prop="start_time" label="建立日期" width="100" align="center">
- <template slot-scope="scope">
- <span>{{ getTime(scope.row.start_time)}}</span>
- </template>
- </el-table-column>
- <el-table-column prop="blood_access_part_opera_id" label="血管通路" align="center" width="120">
- <template slot-scope="scope">
- <router-link
- :to="'/patients/patient/' + scope.row.patient_id+'/vascularAccessDetail/'+scope.row.id"
- style="color:#409eff;width:100%;display:block;"
- >{{ scope.row.blood_access_part_opera_id }}
- </router-link
- >
- </template>
- </el-table-column>
- <el-table-column prop="blood_access_part_id" label="血管通路部位" width="200" align="center">
- <template slot-scope="scope">
- <span>{{scope.row.blood_access_part_id}}</span>
- </template>
- </el-table-column>
- <el-table-column prop="inflow_pass" label="血管通路部位(其他)" width="100" align="center">
- <template slot-scope="scope">
- <span>{{scope.row.other_vascular}}</span>
- </template>
- </el-table-column>
- <el-table-column prop="date" label="首次启用日期" width="120" align="center">
- <template slot-scope="scope">
- <span>{{ getTime(scope.row.first_start_time)}}</span>
- </template>
- </el-table-column>
-
- <el-table-column prop="date" label="停用日期" align="center" width="100">
- <template slot-scope="scope">
- <span v-if="scope.row.stop_time>0">{{ getTime(scope.row.stop_time)}}</span>
- <span v-if="scope.row.stop_time<0"></span>
- </template>
- </el-table-column>
- <el-table-column prop="date" label="停用原因" align="center" width="120">
- <template slot-scope="scope">
- <span>{{scope.row.stop_reason}}</span>
- </template>
- </el-table-column>
- <el-table-column prop="date" label="使用寿命(天)" align="center" width="120">
- <template slot-scope="scope">
- <span v-if="scope.row.stop_time>0&&(scope.row.stop_time - scope.row.start_time)/86400 == 0"></span>
- <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>
- </template>
- </el-table-column>
-
- <el-table-column prop="date" label="导管感染转归" align="center" width="120">
- <template slot-scope="scope">
- <span v-if="scope.row.ci_type == 1">拔管</span>
- <span v-if="scope.row.ci_type == 2">治愈</span>
- <span v-if="scope.row.ci_type == 3">死亡</span>
- <span v-if="scope.row.ci_type == 4">放弃</span>
- <span v-if="scope.row.ci_type == 9">其它</span>
- </template>
- </el-table-column>
-
- <el-table-column prop="date" label="血培养检查结果" align="center" width="120">
- <template slot-scope="scope">
- <span v-if="scope.row.blood_cultupe == 0">阴性</span>
- <span v-if="scope.row.blood_cultupe == 1">阳性</span>
- <span v-if="scope.row.blood_cultupe == 9">未查</span>
- </template>
- </el-table-column>
-
- <el-table-column prop="date" label="患者导管转归类型" align="center" width="120">
- <template slot-scope="scope">
- <span v-if="scope.row.sequelae_type == 1">局部感染</span>
- <span v-if="scope.row.sequelae_type == 2">静脉炎</span>
- <span v-if="scope.row.sequelae_type == 3">导管细菌定植</span>
- <span v-if="scope.row.sequelae_type == 4">导管相关血型感染</span>
- </template>
- </el-table-column>
- <el-table-column prop="date" label="备注" align="center" width="180">
- <template slot-scope="scope">
- <span>{{scope.row.remark}}</span>
- </template>
- </el-table-column>
- <el-table-column prop="date" label="创始人" align="center" width="100">
- <template slot-scope="scope">
- <span>{{getDoctor(scope.row.creator)}}</span>
- </template>
- </el-table-column>
- <el-table-column prop="date" fixed="right" label="操作" width="140" align="center">
- <template slot-scope="scope">
- <el-tooltip class="item" effect="dark" content="编辑" placement="top">
- <el-button
- type="primary"
- size="small"
- icon="el-icon-edit-outline"
-
- @click="handleUpdateAdviceTemplate(scope.row.id)"
- >
- </el-button>
- </el-tooltip>
- <el-tooltip class="item" effect="dark" content="删除" placement="top">
- <el-button
- size="small"
- type="danger"
- icon="el-icon-delete"
- @click="handleDeleteAdviceTemplate(scope.row.id, scope.$index)"
- >
- </el-button>
- </el-tooltip>
- </template>
- </el-table-column>
- </el-table>
- <el-pagination
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- :page-sizes="[10,20,50,100]"
- :page-size="10"
- background
- style="margin-top:20px;"
- align="right"
- layout="total, sizes, prev, pager, next, jumper"
- :total="total"></el-pagination>
-
- <el-dialog
- title="新增通路"
- :visible.sync="dialogVisible"
- width="65%"
- center>
- <el-form label-width="150px" :model="form" ref="form" :rules="rules" >
- <el-row :gutter="24">
- <el-col :span="24">
- <el-form-item label="通路项目:" prop="access_project" >
- <el-radio-group style="padding: 10px;" v-model="form.access_project" @change="changeRadio">
- <el-radio label="1">内瘘</el-radio>
- <el-radio label="2">导管</el-radio>
- </el-radio-group>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row :gutter="24">
- <el-col :span="8">
- <el-form-item label="建立日期:" :required="true" prop="start_time">
- <el-date-picker
- type="datetime"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- placeholder="选择时间"
- v-model="form.start_time"
- style="width:200px">
- </el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="血管通路类型:" :required="true" prop="blood_access_part_opera_id">
- <el-select v-model="form.blood_access_part_opera_id" placeholder="请选择" style="width:200px" clearable>
- <el-option
- v-for="item in blood_access_part_opera"
- :key="item.id"
- :label="item.name"
- :value="item.id"
- >
- </el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="血管通路部位:">
- <el-input v-model="form.blood_access_part_id" readonly @focus="showInnerDialog('17')" style="width:200px"></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row :gutter="24">
- <el-col :span="8">
- <el-form-item label="血管通路部位(其他):" prop="inflow_pass">
- <!-- <el-select v-model="form.inflow_pass" placeholder="请选择" style="width:150px">
- <el-option
- v-for="item in optionsPass"
- :key="item.id"
- :label="item.name"
- :value="item.id">
- </el-option>
- </el-select> -->
- <el-input v-model="form.other_vascular" style="width:200px"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="首次启用日期:" prop="first_start_time">
- <el-date-picker
- type="datetime"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- placeholder="选择时间"
- v-model="form.first_start_time"
- style="width:200px">
- </el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="使用状态:" :required="true" prop="user_status">
- <el-select v-model="form.user_status" placeholder="请选择" style="width:200px" @change="changeStatus" clearable>
- <el-option
- v-for="item in options"
- :key="item.id"
- :label="item.name"
- :value="item.id">
- </el-option>
- </el-select>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row :gutter="24" v-show="showOne">
- <el-col :span="8">
- <el-form-item label="导管感染转归:">
- <el-select v-model="form.ci_type" placeholder="请选择" style="width:200px" @change="changeStatus" clearable>
- <el-option
- v-for="item in optionsTwo"
- :key="item.id"
- :label="item.name"
- :value="item.id">
- </el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="血培养检查结果:">
- <el-select v-model="form.blood_cultupe" placeholder="请选择" style="width:200px" @change="changeStatus" clearable>
- <el-option
- v-for="item in optionsThree"
- :key="item.id"
- :label="item.name"
- :value="item.id">
- </el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="患者导管转归类型:">
- <el-select v-model="form.sequelae_type" placeholder="请选择" style="width:200px" @change="changeStatus" clearable>
- <el-option
- v-for="item in optionsOne"
- :key="item.id"
- :label="item.name"
- :value="item.id">
- </el-option>
- </el-select>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row v-show="show">
- <el-col :span="8">
- <el-form-item label="停用日期:">
- <el-date-picker
- type="datetime"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- placeholder="选择时间"
- v-model="form.stop_time"
- style="width:200px">
- </el-date-picker>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row v-show="show">
- <el-col>
- <el-form-item label="停用原因:">
- <el-input v-model="form.stop_reason"></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col>
- <el-form-item label="备注:">
- <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="form.remark"></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
-
- <span slot="footer" class="dialog-footer">
- <el-button @click="dialogVisible = false">取 消</el-button>
- <el-button type="primary" @click="saveVasularAccess('form')">保存</el-button>
- </span>
- </el-dialog>
-
-
-
- <el-dialog
- title="编辑通路"
- :visible.sync="editDialogVisible"
- width="60%"
- center>
- <el-form label-width="120px" :model="form" ref="form" :rules="rules" >
- <el-row :gutter="24">
- <el-col :span="24">
- <el-form-item label="通路项目:" :required="true" prop="access_project">
- <el-radio-group style="padding: 10px;" v-model="form.access_project" @change="changeRadio">
- <el-radio label="1">内瘘</el-radio>
- <el-radio label="2">导管</el-radio>
- </el-radio-group>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row :gutter="24">
- <el-col :span="8">
- <el-form-item label="建立日期:" :required="true" prop="start_time">
- <el-date-picker
- type="datetime"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- placeholder="选择时间"
- v-model="form.start_time"
- style="width:150px">
- </el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="血管通路类型:" :required="true" prop="blood_access_part_opera_id">
- <el-select v-model="form.blood_access_part_opera_id" placeholder="请选择" style="width:150px" clearable>
- <el-option
- v-for="item in blood_access_part_opera"
- :key="item.id"
- :label="item.name"
- :value="item.id"
- >
- </el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="血管通路部位:">
- <!-- <el-select v-model="form.blood_access_part_id" placeholder="请选择" style="width:150px">
- <el-option
- v-for="item in blood_access_part"
- :key="item.id"
- :label="item.name"
- :value="item.id">
- </el-option>
- </el-select> -->
-
- <el-input v-model="form.blood_access_part_id" readonly @focus="showInnerDialog('17')" style="width:150px"></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row :gutter="24">
- <el-col :span="8">
- <el-form-item label="血管通路部位(其他):" :required="true" prop="inflow_pass">
- <!-- <el-select v-model="form.inflow_pass" placeholder="请选择" style="width:150px">
- <el-option
- v-for="item in optionsPass"
- :key="item.id"
- :label="item.name"
- :value="item.id">
- </el-option>
- </el-select> -->
- <el-input v-model="form.other_vascular"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="首次启用日期:" prop="first_start_time">
- <el-date-picker
- type="datetime"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- placeholder="选择时间"
- v-model="form.first_start_time"
- style="width:150px">
- </el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="使用状态:" :required="true" prop="user_status">
- <el-select v-model="form.user_status" placeholder="请选择" style="width:150px" @change="changeStatus" clearable>
- <el-option
- v-for="item in options"
- :key="item.id"
- :label="item.name"
- :value="item.id">
- </el-option>
- </el-select>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row v-show="showOne">
- <el-col :span="8">
- <el-form-item label="导管感染转归:">
- <el-select v-model="form.ci_type" placeholder="请选择" style="width:150px" @change="changeStatus" clearable>
- <el-option
- v-for="item in optionsTwo"
- :key="item.id"
- :label="item.name"
- :value="item.id">
- </el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="血培养检查结果:">
- <el-select v-model="form.blood_cultupe" placeholder="请选择" style="width:150px" @change="changeStatus" clearable>
- <el-option
- v-for="item in optionsThree"
- :key="item.id"
- :label="item.name"
- :value="item.id">
- </el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="患者导管转归类型:">
- <el-select v-model="form.sequelae_type" placeholder="请选择" style="width:150px" @change="changeStatus">
- <el-option
- v-for="item in optionsOne"
- :key="item.id"
- :label="item.name"
- :value="item.id">
- </el-option>
- </el-select>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row v-show="show">
- <el-col :span="8">
- <el-form-item label="停用日期:">
- <el-date-picker
- type="datetime"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- placeholder="选择时间"
- v-model="form.stop_time"
- style="width:150px">
- </el-date-picker>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row v-show="show">
- <el-col>
- <el-form-item label="停用原因:">
- <el-input v-model="form.stop_reason"></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col>
- <el-form-item label="备注:">
- <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="form.remark"></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
-
- <span slot="footer" class="dialog-footer">
- <el-button @click="editDialogVisible= false">取 消</el-button>
- <el-button type="primary" @click="updatedVasularAccess('form')">保存</el-button>
- </span>
- </el-dialog>
- <sitemap> </sitemap>
- </div>
-
- <multi-select-box
- :propsForm="InnerDialogProps"
- v-on:dialog-comfirm="innerDialogComfirm"
- v-on:dialog-cancle="innerDialogCancle"
- ></multi-select-box>
-
- </div>
- </template>
- <script>
- const moment = require('moment')
- import PatientSidebar from './components/PatientSidebar'
- import { fetchAllAdminUsers, fetchAllDoctorAndNurse } from '@/api/doctor'
- import { saveVasularAccess,getAllVascularAccessList,getVascularAccessByDetail,updatedVasularAccess,DeleteVascularAccess,getAccessList } from '@/api/patient'
-
- import { jsGetAge, uParseTime } from '@/utils/tools'
- import { getDataConfig } from '@/utils/data'
- import multiSelectBox from '../dialysis/details/dialog/MultiSelectBox'
- import sitemap from './Sitemap'
- export default {
- name: 'doctorAdvice',
- components: {
- PatientSidebar,
- multiSelectBox,
- sitemap
- },
- data() {
- return {
- tableData: [],
- nowtime: moment(new Date()).format('YYYY-MM-DD'),
- page: 1,
- limit: 10,
- total: 0,
- rules: {
- start_time: [{ required: true, message: '请输入建立日期' }],
- access_project: [{ required: true, message: '请选择通路项目' }],
- blood_access_part_opera_id:[{required:true,message:'请选择血管通路类型'}],
- blood_access_part_id:[{required:true,message:"请选择血管通路"}],
- // first_start_time:[{required:true,message:"请选择首次启用日期"}],
- user_status:[{required:true,message:"请选择使用状态"}]
- },
- dialogVisible:false,
- editDialogVisible:false,
- form:{
- id:0,
- access_project:"1",
- blood_access_part_id:"",
- blood_access_part_opera_id:"",
- inflow_pass:"",
- start_time:moment(new Date()).format('YYYY-MM-DD'),
- first_start_time:moment(new Date()).format('YYYY-MM-DD'),
- stop_reason:"",
- user_status:1,
- remark:"",
- stop_time:"",
- other_vascular:"",
- ci_type:"",//导管感染转归
- blood_cultupe:"", //血培养检查结果
- sequelae_type:"",//患者导管转归类型
- },
- options:[
- {id:1,name:"启用"},
- {id:2,name:"停用"},
- {id:3,name:"备用"}
- ],
- optionsPass:[
- {id:1,name:"流入-动脉"},
- {id:2,name:"流出-静脉"},
- ],
-
- blood_access_part_opera:[],
- blood_access_part:[],
- show:false,
- doctorList:[],
- InnerDialogProps: {
- values: [],
- visibility: false,
- isShowTextArea: true,
- customContent: '',
- titles: '',
- type: '' // 不同弹框类型,用来匹配数据
- },
- new_blood_access_part_opera:[],
- new_blood_access_part:[],
- // 导管感染类型
- optionsOne:[
- {id:1,name:"局部感染"},
- {id:2,name:"静脉炎"},
- {id:3,name:"导管细菌定植"},
- {id:4,name:"导管相关血型感染"},
- ],
- // 导管转归类型
- optionsTwo:[
- {id:1,name:"拔管"},
- {id:2,name:"治愈"},
- {id:3,name:"死亡"},
- {id:4,name:"放弃"},
- {id:9,name:"其它"},
- ],
- // 血培养检查结果
- optionsThree:[
- {id:0,name:"阴性"},
- {id:1,name:"阳性"},
- {id:9,name:"未查"}
- ],
- showOne:false
- }
- },
- methods: {
- clickuseradvicecell(row, column, cell, event) {
- },
- onTranPatient: function(tranPatient) {
- this.currentPatient = tranPatient
- },
- CreateTime(time) {
- return uParseTime(time, '{y}-{m}-{d} {h}:{i}:{s}')
- },
-
-
-
-
- handleSizeChange(limit) {
- this.limit = limit
- this.getlist()
- },
- handleCurrentChange(page) {
- this.page = page
-
- this.getlist()
- },
- changeStatus(val){
- if(val == 1 ){
- this.show = false
- }
- if(val == 2){
- this.show = true
- }
- },
- saveVasularAccess(formName){
- this.$refs[formName].validate((valid)=>{
- if(valid){
- var blood_name = ""
- for(let i=0;i<this.blood_access_part_opera.length;i++){
- if(this.blood_access_part_opera[i].id == this.form.blood_access_part_opera_id){
- blood_name = this.blood_access_part_opera[i].name
- }
- }
- var inflow_pass = ""
- for(let i=0;i<this.optionsPass.length;i++){
- if(this.optionsPass[i].id == this.form.inflow_pass){
- inflow_pass = this.optionsPass[i].name
- }
- }
- console.log("params",this.form.blood_access_part_id)
-
- var params = {
- patient_id:this.patientID,
- access_project:parseInt(this.form.access_project),
- start_time:this.form.start_time,
- blood_access_part_opera_id:blood_name,
- blood_access_part_id:this.form.blood_access_part_id,
- inflow_pass:inflow_pass,
- first_start_time:this.form.first_start_time,
- user_status:this.form.user_status,
- stop_reason:this.form.stop_reason,
- remark:this.form.remark,
- stop_time:this.form.stop_time,
- other_vascular:this.form.other_vascular,
- ci_type:this.form.ci_type,
- blood_cultupe:this.form.blood_cultupe,
- sequelae_type:this.form.sequelae_type,
- }
- console.log("params",params)
-
- saveVasularAccess(params).then(response=>{
- if(response.data.state == 1){
- var access = response.data.data.access
- console.log("access",access)
- this.$message.success("保存成功")
- this.dialogVisible = false
- this.getlist()
- this.form.blood_access_part_opera_id=""
- this.form.blood_access_part_id = ""
- this.inflow_pass = ""
- this.user_status = ""
- this.stop_reason = ""
- this.remark = ""
- }else{
- this.$message.error("该日期数据已存在!")
- }
- })
- }
- })
- },
- getlist(){
- var params = {
- page:this.page,
- limit:this.limit,
- patient_id:this.patientID,
- }
- getAllVascularAccessList(params).then(response=>{
- if(response.data.state == 1){
- var list = response.data.data.list
- console.log("list",list)
- this.tableData = list
- var total = response.data.data.total
- console.log("total",total)
- this.total = total
- var doctor = response.data.data.doctor
- console.log("doctor",doctor)
- this.doctorList = doctor
- }
- })
- },
- // getTime(value, temp) {
-
- // if (value != undefined) {
- // return uParseTime(value, temp);
- // }
-
- // return "";
- // },
- getTime(val) {
- if(val < 0){
- return ""
- }
- if(val == ""){
- return ""
- }else {
- return uParseTime(val, '{y}-{m}-{d}')
- }
- },
- handleUpdateAdviceTemplate(id){
- getVascularAccessByDetail(id).then(response=>{
- if(response.data.state ==1){
- var accessDetail = response.data.data.accessDetail
- console.log("accessDetail",accessDetail)
- this.form.id = accessDetail.id
- this.form.access_project = accessDetail.access_project.toString()
- var arr = []
- var arrOne = []
- var arrThree = []
- var arrFour = []
-
- if(accessDetail.access_project == "1"){
- for(let i=0;i<this.new_blood_access_part_opera.length;i++){
- if(this.new_blood_access_part_opera[i].field_type == 1){
- arr.push(this.new_blood_access_part_opera[i])
- }
- }
- this.blood_access_part_opera = arr
-
-
- for(let j=0;j<this.new_blood_access_part.length;j++){
- if(this.new_blood_access_part[j].field_type == 1){
- arrThree.push(this.new_blood_access_part[j])
- }
-
- }
- this.blood_access_part = arrThree
- }
-
- if(accessDetail.access_project == "2"){
- this.showOne = true
- for(let i=0;i<this.new_blood_access_part_opera.length;i++){
- if(this.new_blood_access_part_opera[i].field_type == 2){
- arrOne.push(this.new_blood_access_part_opera[i])
- }
-
- }
- this.blood_access_part_opera = arrOne
-
- for(let j=0;j<this.new_blood_access_part.length;j++){
- if(this.new_blood_access_part[j].field_type == 2){
- arrFour.push(this.new_blood_access_part[j])
- }
- }
- this.blood_access_part = arrFour
- }
-
-
- this.form.blood_access_part_id = accessDetail.blood_access_part_id
-
-
- var blood_part = 0
- for(let i=0;i<this.blood_access_part_opera.length;i++){
- if(accessDetail.blood_access_part_opera_id == this.blood_access_part_opera[i].name){
- blood_part = this.blood_access_part_opera[i].id
- }
- }
- this.form.blood_access_part_opera_id = blood_part
-
- this.form.first_start_time = this.getTime(accessDetail.first_start_time)
-
- var inflow_id = 0
- for(let i=0;i<this.optionsPass.length;i++){
- if(this.optionsPass[i].name == accessDetail.inflow_pass){
- inflow_id = this.optionsPass[i].id
- }
- }
- this.form.inflow_pass = inflow_id
- this.form.remark = accessDetail.remark
- this.form.start_time = this.getTime(accessDetail.start_time)
- this.form.stop_reason = accessDetail.stop_reason
- this.form.stop_time = this.getTime(accessDetail.stop_time)
-
- this.form.user_status = accessDetail.user_status
- this.form.other_vascular = accessDetail.other_vascular
- this.form.ci_type = accessDetail.ci_type
- this.form.blood_cultupe = accessDetail.blood_cultupe
- this.form.sequelae_type = accessDetail.sequelae_type
- if(accessDetail.user_status == 1){
- this.show = false
- }
- if(accessDetail.user_status == 2){
- this.show = true
- }
- this.editDialogVisible = true
- }
- })
- },
- getDoctor(id){
- var name = ""
- for(let i=0;i<this.doctorList.length;i++){
- if(id == this.doctorList[i].admin_user_id){
- name = this.doctorList[i].user_name
- }
- }
- return name
- },
- handleDeleteAdviceTemplate(id,index){
- this.$confirm("确认删除吗?", "删除", {
- confirmButtonText: "确 定",
- cancelButtonText: "取 消",
- type: "warning"
- })
- .then(() => {
- DeleteVascularAccess(id).then(response => {
- if(response.data.state == 1){
- var msg = response.data.data.msg
- this.tableData.splice(index, 1);
- this.$message.success("删除成功!")
- }
-
-
- });
- })
- .catch(() => {});
- },
- updatedVasularAccess(formName){
- this.$refs[formName].validate((valid)=>{
- if(valid){
- var blood_name = ""
- for(let i=0;i<this.blood_access_part_opera.length;i++){
- if(this.blood_access_part_opera[i].id == this.form.blood_access_part_opera_id){
- blood_name = this.blood_access_part_opera[i].name
- }
- }
- // var blood_part = ""
- // for(let i=0;i<this.blood_access_part.length;i++){
- // if(this.form.blood_access_part_id == this.blood_access_part[i].id){
- // blood_part = this.blood_access_part[i].name
- // }
- // }
- var inflow_pass = ""
- for(let i=0;i<this.optionsPass.length;i++){
- if(this.optionsPass[i].id == this.form.inflow_pass){
- inflow_pass = this.optionsPass[i].name
- }
- }
- var params = {
- id:this.form.id,
- patient_id:this.patientID,
- access_project:parseInt(this.form.access_project),
- start_time:this.form.start_time,
- blood_access_part_opera_id:blood_name,
- blood_access_part_id:this.form.blood_access_part_id,
- inflow_pass:inflow_pass,
- first_start_time:this.form.first_start_time,
- user_status:this.form.user_status,
- stop_reason:this.form.stop_reason,
- remark:this.form.remark,
- stop_time:this.form.stop_time,
- patient_id:this.patientID,
- other_vascular:this.form.other_vascular,
- ci_type:this.form.ci_type,
- blood_cultupe:this.form.blood_cultupe,
- sequelae_type:this.form.sequelae_type
- }
-
- updatedVasularAccess(params).then(response=>{
- if(response.data.state == 1){
- var access = response.data.data.access
- console.log("access",access)
- this.$message.success("保存成功")
- this.editDialogVisible = false
- this.getlist()
- }else{
- this.$message.error("该日期数据已存在!")
- }
- })
- }
- })
- },
- rowClick(row){
- console.log("row",row)
- this.$router.push({path:'/patients/patient/'+this.patientID+'/vascularAccessDetail/'+row.id})
- },
- showInnerDialog: function(val) {
- this.InnerDialogProps.visibility = true
- switch (val) {
-
- case '17': // 血管通路
- this.InnerDialogProps.values = this.blood_access_part
- this.InnerDialogProps.titles = '血管通路部位'
- this.InnerDialogProps.type = 'blood_access_part_id'
- this.InnerDialogProps.selected = this.form.blood_access_part_id
- this.InnerDialogProps.isShowTextArea = false
- break
-
-
- }
- },
- innerDialogComfirm: function(val) {
- this.InnerDialogProps.visibility = false
- switch (val.type) {
- case 'blood_access_part_id':
- this.form.blood_access_part_id = val.value.join(',')
- break
- }
- },
- innerDialogCancle: function() {
- this.InnerDialogProps.visibility = false
- },
- getAccessList(){
- getAccessList().then(response=>{
- if(response.data.state == 1){
- var blood_access_part_opera = response.data.data.blood_access_part_opera
- console.log("blood_access_part_operahhahs",blood_access_part_opera)
- this.new_blood_access_part_opera = blood_access_part_opera
- var blood_access_part = response.data.data.blood_access_part
- console.log("blood_access",blood_access_part)
- this.new_blood_access_part = blood_access_part
-
- console.log("通路项目",this.form.access_project)
-
- var arr = []
- var arrOne = []
- if(this.form.access_project == 1 ){
- for(let i=0;i<this.new_blood_access_part_opera.length;i++){
- if(this.new_blood_access_part_opera[i].field_type == 1){
- arr.push(this.new_blood_access_part_opera[i])
- }
-
- }
-
- for(let i=0;i<this.new_blood_access_part.length;i++){
- if(this.new_blood_access_part[i].field_type == 1){
- arrOne.push(this.new_blood_access_part[i])
- }
- }
- }
- this.blood_access_part_opera = arr
- this.blood_access_part = arrOne
- }
- })
- },
- changeRadio(val){
- console.log("val",val)
- var arr = []
- var arrOne = []
- var arrTwo = []
- var arrThree = []
- for(let i=0;i<this.new_blood_access_part_opera.length;i++){
- if(this.new_blood_access_part_opera[i].field_type == 1){
- arr.push(this.new_blood_access_part_opera[i])
- }
- if(this.new_blood_access_part_opera[i].field_type == 2){
- arrOne.push(this.new_blood_access_part_opera[i])
- }
- }
-
- for(let i=0;i<this.new_blood_access_part.length;i++){
- if(this.new_blood_access_part[i].field_type == 1){
- arrTwo.push(this.new_blood_access_part[i])
- }
- if(this.new_blood_access_part[i].field_type == 2){
- arrThree.push(this.new_blood_access_part[i])
- }
- }
-
- if(val == 1){
- this.blood_access_part_opera = arr
- this.blood_access_part = arrTwo
- this.showOne = false
-
- }
- if(val == 2){
- this.blood_access_part_opera = arrOne
- this.blood_access_part = arrThree
- this.showOne = true
- }
-
- console.log("arr",arr)
- console.log("arrOne",arrOne)
- }
- },
- created() {
- const id = this.$route.params && this.$route.params.id
- this.patientID = parseInt(id)
- this.getlist()
- //获取血管通路
- this.getAccessList()
- },
-
- }
- </script>
-
- <style>
- .oictable ::-webkit-scrollbar {
- height: 15px;
- }
- </style>
-
- <style rel="stylesheet/scss" lang="scss">
- ::-webkit-scrollbar{
- height:15px;
- }
-
- </style>
-
|