123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116 |
- <template>
- <div>
- <el-dialog
- title="透析上机"
- class="newDialog"
- :visible.sync="visible"
- width="854px"
- :modal-append-to-body="false"
- >
- <div class="warnTxt" v-if="showTxt != ''">{{ showTxt }}</div>
-
- <multi-select-box
- :propsForm="InnerDialogProps"
- v-on:dialog-comfirm="innerDialogComfirm"
- v-on:dialog-cancle="innerDialogCancle"
- ></multi-select-box>
-
- <el-form :model="form" ref="form" label-width="100px">
- <el-form-item
- label="班次"
- v-if="isShowFiled('班次')"
- :prop="isName('班次')"
- :rules="isCheckmust('班次')"
- >
- <el-select
- v-model="form.schedual_type"
- placeholder="请选择班次"
- @change="changeSchedualType"
- >
- <el-option
- v-for="(item, index) in schedules_type"
- :key="index"
- :value="item.id"
- :label="item.name"
- ></el-option>
- </el-select>
- </el-form-item>
-
- <el-form-item
- label="上机床位"
- v-if="isShowFiled('上机床位')"
- :prop="isName('上机床位')"
- :rules="isCheckmust('上机床位')"
- >
- <el-select v-model="form.bed_id" placeholder="请选择上机床位">
- <el-option
- v-for="(bed, index) in zone_beds"
- :key="index"
- :value="bed.id"
- :label="bed.number"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item
- label="上机护士"
- v-if="isShowFiled('上机护士')"
- prop="nurse_id"
- :rules="isCheckmust('上机护士')"
- >
- <el-select v-model="form.nurse_id" placeholder="请选择上机护士">
- <el-option
- v-for="(admin, index) in admins"
- :key="index"
- :value="admin.id"
- :label="admin.name"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item
- label="穿刺者"
- v-if="isShowFiled('穿刺者')"
- prop="puncture_nurse_id"
- :rules="isCheckmust('穿刺者')"
- >
- <el-select
- v-model="form.puncture_nurse_id"
- placeholder="请选择穿刺护士"
- >
- <el-option
- v-for="(admin, index) in adminRoles"
- :key="index"
- :value="admin.id"
- :label="admin.name"
- ></el-option>
- </el-select>
- </el-form-item>
-
- <el-form-item
- label="质控护士"
- v-if="isShowFiled('质控护士')"
- prop="quality_nurse_id"
- :rules="isCheckmust('质控护士')"
- >
- <el-select
- v-model="form.quality_nurse_id"
- placeholder="请选择质控护士"
- >
- <el-option
- v-for="(admin, index) in adminRoles"
- :key="index"
- :value="admin.id"
- :label="admin.name"
- ></el-option>
- </el-select>
- </el-form-item>
-
- <el-form-item
- label="换药护士"
- v-if="isShowFiled('换药护士')"
- :prop="isName('换药护士')"
- :rules="isCheckmust('换药护士')"
- >
- <el-select v-model="form.change_nurse" placeholder="换药护士">
- <el-option
- v-for="(admin, index) in adminRoles"
- :key="index"
- :value="admin.id"
- :label="admin.name"
- ></el-option>
- </el-select>
- </el-form-item>
-
- <el-form-item
- label="冲管护士"
- v-if="isShowFiled('冲管护士')"
- :prop="isName('冲管护士')"
- :rules="isCheckmust('冲管护士')"
- >
- <el-select v-model="form.washpipe_nurse" placeholder="请选择冲管护士">
- <el-option
- v-for="(admin, index) in admins"
- :key="index"
- :value="admin.id"
- :label="admin.name"
- ></el-option>
- </el-select>
- </el-form-item>
-
- <el-form-item
- label="疑难穿刺护士"
- v-if="isShowFiled('疑难穿刺护士')"
- :prop="isName('疑难穿刺护士')"
- :rules="isCheckmust('疑难穿刺护士')"
- >
- <el-select
- v-model="form.difficult_puncture_nurse"
- placeholder="请选择疑难穿刺护士"
- >
- <el-option
- v-for="(admin, index) in adminRoles"
- :key="index"
- :value="admin.id"
- :label="admin.name"
- ></el-option>
- </el-select>
- </el-form-item>
-
- <el-form-item
- label="新开瘘护士"
- v-if="isShowFiled('新开瘘护士')"
- :prop="isName('新开瘘护士')"
- :rules="isCheckmust('新开瘘护士')"
- >
- <el-select
- v-model="form.new_fistula_nurse"
- placeholder="请选择新开瘘护士"
- >
- <el-option
- v-for="(admin, index) in adminRoles"
- :key="index"
- :value="admin.id"
- :label="admin.name"
- ></el-option>
- </el-select>
- </el-form-item>
-
- <el-form-item
- label="引血(ml/min)"
- v-if="isShowFiled('引血')"
- :prop="isName('引血')"
- :rules="isCheckmust('引血')"
- >
- <el-input
- type="number"
- v-model="form.blood_drawing"
- style="width: 200px"
- ></el-input>
- </el-form-item>
-
- <el-form-item
- label="穿刺针"
- v-if="isShowFiled('穿刺针')"
- :prop="isName('穿刺针')"
- :rules="isCheckmust('穿刺针')"
- >
- <el-input
- v-model="form.puncture_needle"
- @focus="showInnerDialog('11')"
- style="width: 200px"
- ></el-input>
- </el-form-item>
-
- <el-form-item
- label="穿刺方式: "
- v-if="isShowFiled('穿刺方式')"
- :prop="isName('穿刺方式')"
- :rules="isCheckmust('穿刺方式')"
- >
- <el-input
- v-model="form.puncture_way"
- readonly
- style="width: 200px"
- @focus="showInnerDialog('13')"
- >
- </el-input>
- </el-form-item>
-
- <el-form-item
- label="透析器:"
- v-if="isShowFiled('透析器')"
- :prop="isName('透析器')"
- :rules="isCheckmust('透析器')"
- >
- <el-input
- v-model="form.dialysis_dialyszers"
- style="width: 200px"
- @focus="showInnerDialog('7')"
- ></el-input>
- </el-form-item>
-
- <el-form-item
- label="灌流器:"
- v-if="isShowFiled('灌流器')"
- :prop="isName('灌流器')"
- :rules="isCheckmust('灌流器')"
- >
- <el-input
- v-model="form.dialysis_irrigation"
- style="width: 200px"
- @focus="showInnerDialog('8')"
- ></el-input>
- </el-form-item>
-
- <el-form-item
- label="血管通路:"
- v-if="isShowFiled('血管通路')"
- prop="blood_access_id"
- :rules="isCheckmust('血管通路')"
- >
- <el-select v-model="form.blood_access_id" placeholder="请选择" @change="changeBloodAccessOpion">
- <el-option :key="0" label="请选择" :value="0"></el-option>
-
- <el-option
- v-for="(option, index) in blood_access_option"
- :key="index + 'i'"
- :label="option.name"
- :value="option.id"
- ></el-option>
- </el-select>
- </el-form-item>
-
-
- <el-form-item
- label="导管备注:"
- :prop="isName('导管备注')"
- :rules="isCheckmust('导管备注')"
- v-if="isShowFiled('导管备注') && blood_access_option_name!=undefined&&blood_access_option_name.indexOf('置管') !== -1"
- >
- <el-select @change="dialysisSummarySelectChange" v-model="value2">
- <el-option
- v-for="(item, index) in summary"
- :label="item.text"
- :value="item.value"
- :key="index"
- ></el-option>
- </el-select>
- </el-form-item>
-
-
- <el-form-item
- :prop="isName('导管备注')"
- :rules="isCheckmust('导管备注')"
- v-if="isShowFiled('导管备注') && blood_access_option_name!=undefined&&blood_access_option_name.indexOf('置管') !== -1"
- >
- <el-input
- type="textarea"
- v-model="form.catheter_operation"
- :rows="4"
- ></el-input>
- </el-form-item>
-
-
- <el-form-item
- label="核酸检测日期:"
- style="width: 300px"
- :prop="isName('核酸检测日期')"
- :rules="isCheckmust('核酸检测日期')"
- v-if="isShowFiled('核酸检测日期')"
- >
- <el-date-picker
- type="date"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- placeholder="选择时间"
- v-model="form.nuclein_date"
- style="width: 100%"
- ></el-date-picker>
- </el-form-item>
-
- <el-form-item
- label="上机时间 :"
- style="width: 300px"
- :prop="isName('上机时间')"
- :rules="isCheckmust('上机时间')"
- v-if="isShowFiled('上机时间')"
- >
- <el-date-picker
- type="datetime"
- format="yyyy-MM-dd HH:mm"
- value-format="yyyy-MM-dd HH:mm"
- placeholder="选择时间"
- v-model="form.start_time"
- style="width: 100%"
- ></el-date-picker>
- </el-form-item>
-
- <el-form-item>
- <el-button
- v-if="dialysis_order.id == 0"
- @click="submit('form')"
- type="primary"
- :loading="loading"
- >执行上机</el-button
- >
- <el-button v-else type="info" :disabled="true">已上机</el-button>
- <el-button
- v-if="dialysis_order.id > 0"
- type="primary"
- @click="editOrder('form')"
- >修改上机
- </el-button>
- </el-form-item>
- </el-form>
- </el-dialog>
- </div>
- </template>
-
- <script>
- import axios from "axios";
- import {
- GetSchedualNumber,
- PostModifyStartDialysis,
- startDialysis,
- } from "@/api/dialysis_record";
- import { uParseTime } from "@/utils/tools";
- import { getDataConfig } from "@/utils/data";
- import { parseTime } from "@/utils";
- import store from "@/store";
- import multiSelectBox from "./MultiSelectBox";
- import request from "@/utils/request";
- const moment = require("moment");
- export default {
- name: "ComputerDialog",
- components: {
- multiSelectBox,
- },
- data() {
- return {
- showTxt: "",
- hasPermission: true,
- zone_beds: [],
- visible: false,
- loading: false,
- template_id: 0,
- patient_id: 0,
- schedule_date: 0,
- start_time: 0,
- creator: 0,
- form: {
- washpipe_nurse: "",
- bed_id: "",
- nurse_id: "",
- start_time: "",
- puncture_nurse_id: "",
- blood_drawing: 100,
- change_nurse: "",
- difficult_puncture_nurse: "",
- new_fistula_nurse: "",
- quality_nurse_id: "",
- puncture_needle: "",
- puncture_way: "",
- dialysis_dialyszers: "",
- dialysis_irrigation: "",
- blood_access_id: "",
- nuclein_date: moment(new Date()).add("year", 0).format("YYYY-MM-DD"),
- catheter_operation:""
- },
- blood_access_option: [],
- schedual_type: 0,
- schedules_type: [
- { id: 1, name: "上午" },
- { id: 2, name: "下午" },
- { id: 3, name: "晚上" },
- ], // 该排班的区里的床位
- isPremission: false,
- adminRoles: [{ id: 0, name: "请选择" }],
- org_id: 0,
- punctureNeedleOptions: [],
- puncture_ways: [],
- InnerDialogProps: {
- values: [],
- visibility: false,
- isShowTextArea: true,
- customContent: "",
- titles: "",
- type: "", // 不同弹框类型,用来匹配数据
- },
- dialyzers: [],
- irrigations: [],
- summary:[],
- blood_access_option_name:"",
- value2:""
- };
- },
- props: {
- dialysis_order: {
- type: Object,
- },
- schedule: {
- type: Object,
- },
- admins: {
- type: Array,
- },
- device_numbers: {
- type: Array,
- },
- special_premission: {
- type: Array,
- },
- patient: {
- type: Object,
- },
- stockType: {
- type: Array,
- default: () => {
- return [];
- },
- },
- lastOrder: {
- type: Object,
- },
- },
- mounted() {},
- created() {
- this.template_id = this.$store.getters.xt_user.template_info.template_id;
- this.org_id = this.$store.getters.xt_user.template_info.org_id;
- this.patient_id = this.$route.query.patient_id;
- this.schedule_date = this.$route.query.date;
- this.form.nurse_id =
- this.dialysis_order.id == 0
- ? this.$store.getters.xt_user.user.id
- : this.dialysis_order.start_nurse;
- this.form.puncture_nurse_id =
- this.dialysis_order.id == 0
- ? this.$store.getters.xt_user.user.id
- : this.dialysis_order.puncture_nurse;
- this.form.washpipe_nurse =
- this.dialysis_order.id == 0
- ? this.$store.getters.xt_user.user.id
- : this.dialysis_order.washpipe_nurse;
-
- if (this.form.puncture_nurse_id == 0) {
- this.form.puncture_nurse_id = this.$store.getters.xt_user.user.id;
- }
-
- if (this.form.change_nurse == 0) {
- this.form.change_nurse = this.$store.getters.xt_user.user.id;
- }
-
- if (this.form.washpipe_nurse == 0) {
- this.form.washpipe_nurse = this.$store.getters.xt_user.user.id;
- }
- if (this.form.difficult_puncture_nurse == 0) {
- this.form.difficult_puncture_nurse = this.$store.getters.xt_user.user.id;
- }
- if (this.form.new_fistula_nurse == 0) {
- this.form.new_fistula_nurse = this.$store.getters.xt_user.user.id;
- }
- console.log("dialysis_order9999999999wo", this.dialysis_order);
- this.form.puncture_needle = this.dialysis_order.puncture_needle;
- this.form.puncture_way = this.dialysis_order.puncture_way;
- this.form.dialysis_dialyszers = this.dialysis_order.dialysis_dialyszers;
- this.form.dialysis_irrigation = this.dialysis_order.dialysis_irrigation;
- this.form.blood_access_id = this.dialysis_order.blood_access_id;
- this.blood_access_option_name = this.changeBloodAccessOpion(this.dialysis_order.blood_access_id)
- this.punctureNeedleOptions = getDataConfig(
- "hemodialysis",
- "puncture_needle"
- );
- this.puncture_ways = getDataConfig("hemodialysis", "puncture_method");
- this.blood_access_option = getDataConfig(
- "hemodialysis",
- "vascular_access_desc"
- );
- this.summary = getDataConfig('catheter_operation', 'catheter_operation')
- },
- watch: {
- patient: {
- handler(newVal) {
- this.patient_id = newVal.id;
- },
- deep: true,
- },
- "schedule.id": function () {},
- "dialysis_order.id": function () {
- this.form.nurse_id =
- this.dialysis_order.id == 0
- ? this.$store.getters.xt_user.user.id
- : this.dialysis_order.start_nurse;
- this.form.puncture_nurse_id =
- this.dialysis_order.id == 0
- ? this.$store.getters.xt_user.user.id
- : this.dialysis_order.puncture_nurse;
- this.form.washpipe_nurse =
- this.dialysis_order.id == 0
- ? this.$store.getters.xt_user.user.id
- : this.dialysis_order.washpipe_nurse;
- this.form.change_nurse =
- this.dialysis_order.id == 0
- ? this.$store.getters.xt_user.user.id
- : this.dialysis_order.change_nurse;
- this.form.difficult_puncture_nurse =
- this.dialysis_order.id == 0
- ? this.$store.getters.xt_user.user.id
- : this.dialysis_order.difficult_puncture_nurse;
- this.form.new_fistula_nurse =
- this.dialysis_order.id == 0
- ? this.$store.getters.xt_user.user.id
- : this.dialysis_order.new_fistula_nurse;
- this.form.quality_nurse_id =
- this.dialysis_order.id == 0
- ? this.$store.getters.xt_user.user.id
- : this.dialysis_order.quality_nurse_id;
- this.form.puncture_needle = this.dialysis_order.puncture_needle;
- this.form.puncture_way = this.dialysis_order.puncture_way;
- this.form.dialysis_dialyszers = this.dialysis_order.dialysis_dialyszers;
- this.form.dialysis_irrigation = this.dialysis_order.dialysis_irrigation;
- this.form.blood_access_id = this.dialysis_order.blood_access_id;
-
- var blood_access_option_name = this.changeBloodAccessOpionOne(this.dialysis_order.blood_access_id)
-
- this.blood_access_option_name = blood_access_option_name
- this.form.catheter_operation = this.dialysis_order.catheter_operation
- this.form.nuclein_date =
- this.dialysis_order.id == 0
- ? this.getTimeOne(this.lastOrder.nuclein_date)
- : this.getTimeOne(this.dialysis_order.nuclein_date);
- var nowDate = new Date();
- var nowYear = nowDate.getFullYear();
- var nowMonth = nowDate.getMonth() + 1;
- var nowDay = nowDate.getDate();
- var nowHours = nowDate.getHours();
- var nowMinutes = nowDate.getMinutes();
- var nowSeconds = nowDate.getSeconds();
- var time =
- nowYear +
- "-" +
- (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
- "-" +
- (nowDay < 10 ? "0" + nowDay : nowDay) +
- " " +
- (nowHours < 10 ? "0" + nowHours : nowHours) +
- ":" +
- (nowMinutes < 10 ? "0" + nowMinutes : nowMinutes);
- this.form.start_time =
- this.dialysis_order.id == 0
- ? time
- : this.getTime(this.dialysis_order.start_time, "{y}-{m}-{d} {h}:{i}");
- },
- admins: function () {
- console.log("admins", this.admins);
- if (this.admins.length > 0) {
- for (let i = 0; i < this.admins.length; i++) {
- this.adminRoles.push(this.admins[i]);
- }
- }
- console.log("人员", this.adminRoles);
- },
- stockType: function () {
- console.log("stockType", this.stockType);
- var arr = [];
- var arrTwo = [];
- for (let i = 0; i < this.stockType.length; i++) {
- if (this.stockType[i].stock_attribute == 2) {
- arr.push(this.stockType[i]);
- }
- if (this.stockType[i].stock_attribute == 3) {
- arrTwo.push(this.stockType[i]);
- }
- }
- var dialyzator = [];
- var irrigation = [];
- for (let i = 0; i < arr.length; i++) {
- for (let j = 0; j < arr[i].GoodInfo.length; j++) {
- dialyzator.push(arr[i].GoodInfo[j]);
- }
- }
- this.dialyzers = dialyzator;
-
- for (let i = 0; i < arrTwo.length; i++) {
- for (let j = 0; j < arrTwo[i].GoodInfo.length; j++) {
- irrigation.push(arrTwo[i].GoodInfo[j]);
- }
- }
- this.irrigations = irrigation;
- },
- },
- computed: {},
- methods: {
- isName(name) {
- let filedList = store.getters.xt_user.fileds;
- for (let i = 0; i < filedList.length; i++) {
- if (filedList[i].module == 7 && filedList[i].filed_name_cn == name) {
- return filedList[i].filed_name;
- }
- }
- },
-
- isCheckmust(name) {
- let filedList = store.getters.xt_user.fileds;
- for (let i = 0; i < filedList.length; i++) {
- if (
- filedList[i].module == 7 &&
- filedList[i].filed_name_cn == name &&
- filedList[i].is_show == 1&&
- filedList[i].is_write == 1
- ) {
- return [{ required: true, message: `请输入${name}` }];
- }
- if (
- name == "穿刺者" ||
- name == "质控护士" ||
- name == "换药护士" ||
- name == "血管通路"
- ) {
-
- return [
- { required: true, message: `请输入${name}`,trigger: ['blur','change'] },
- { required: true, pattern: /^[1-9]\d*$/, message: `请输入${name}`,trigger: ['blur','change'] },
- ];
- }
-
- }
- },
- isShowFiled(name) {
- var filedList = store.getters.xt_user.fileds;
- for (let i = 0; i < filedList.length; i++) {
- if (
- filedList[i].module == 7 &&
- filedList[i].filed_name_cn == name &&
- filedList[i].is_show == 1
- ) {
- return true;
- }
- }
- return false;
- },
- changeSchedualType: function (schedual_type) {
- let ParamsQuery = {};
- ParamsQuery["schedual_type"] = schedual_type;
- ParamsQuery["record_date"] = this.$route.query.date;
- GetSchedualNumber(ParamsQuery).then((response) => {
- if (response.data.state == 0) {
- return false;
- } else {
- this.temp_device_numbers = response.data.data.number;
- for (
- let index = 0;
- index < this.temp_device_numbers.length;
- index++
- ) {
- const device_number = this.temp_device_numbers[index];
- this.temp_device_numbers[index]["number"] =
- device_number["zone_name"] + "-" + device_number["number"];
- }
- this.zone_beds = this.temp_device_numbers;
- this.form.bed_id = this.zone_beds[0].id;
- }
- });
- },
- GetSchedualNumber: function () {
- let ParamsQuery = {};
- ParamsQuery["schedual_type"] = this.schedual_type;
- ParamsQuery["record_date"] = this.$route.query.date;
- console.log("列表33333333333333333333", ParamsQuery);
- // console.log("路由",this.$route.query.date)
-
- GetSchedualNumber(ParamsQuery).then((response) => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg);
- return false;
- } else {
- this.temp_device_numbers = response.data.data.number;
- for (
- let index = 0;
- index < this.temp_device_numbers.length;
- index++
- ) {
- const device_number = this.temp_device_numbers[index];
- this.temp_device_numbers[index]["number"] =
- device_number["zone_name"] + "-" + device_number["number"];
- }
- this.zone_beds = this.temp_device_numbers;
-
- this.form.bed_id =
- this.dialysis_order.id == 0
- ? this.schedule.bed_id
- : this.dialysis_order.bed_id;
- if (this.dialysis_order.id == 0) {
- let isFilter = true;
- for (let i = 0; i < this.zone_beds.length; i++) {
- if (this.zone_beds[i].id == this.schedule.bed_id) {
- isFilter = false;
- }
- }
- if (isFilter) {
- this.form.bed_id = this.zone_beds[0].id;
- }
- } else {
- for (let i = 0; i < this.device_numbers.length; i++) {
- if (this.device_numbers[i].id == this.dialysis_order.bed_id) {
- let obj = {};
- obj = this.device_numbers[i];
- if (
- obj["number"].indexOf(this.device_numbers[i]["zone_name"]) ==
- -1
- ) {
- obj["number"] =
- this.device_numbers[i]["zone_name"] +
- "-" +
- this.device_numbers[i]["number"];
- }
- this.zone_beds.unshift(obj);
- this.zone_beds.sort((a, b) => a.id - b.id);
- }
- }
- }
- }
- });
- },
- getTime(value, temp) {
- if (value != undefined) {
- return parseTime(value, temp);
- }
- return "";
- },
- getTimeOne(val) {
- if (val == "") {
- return "";
- } else {
- return uParseTime(val, "{y}-{m}-{d}");
- }
- },
- show: function (dialysis, lastOrder) {
- this.record = dialysis;
-
- this.getPermission();
- this.visible = true;
-
- var nowDate = new Date();
- var nowYear = nowDate.getFullYear();
- var nowMonth = nowDate.getMonth() + 1;
- var nowDay = nowDate.getDate();
- var nowHours = nowDate.getHours();
- var nowMinutes = nowDate.getMinutes();
- var nowSeconds = nowDate.getSeconds();
- this.form.nuclein_date =
- this.dialysis_order.id == 0
- ? this.getTimeOne(lastOrder.nuclein_date)
- : this.getTimeOne(this.dialysis_order.nuclein_date);
- if (this.dialysis_order.id != 0) {
- this.form.start_time = this.getTime(
- this.dialysis_order.start_time,
- "{y}-{m}-{d} {h}:{i}"
- );
- } else {
- this.form.start_time =
- nowYear +
- "-" +
- (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
- "-" +
- (nowDay < 10 ? "0" + nowDay : nowDay) +
- " " +
- (nowHours < 10 ? "0" + nowHours : nowHours) +
- ":" +
- (nowMinutes < 10 ? "0" + nowMinutes : nowMinutes);
- }
-
- if (this.dialysis_order.id == 0) {
- let now = new Date();
- let hour = now.getHours();
- if (hour >= 6 && hour < 12) {
- this.schedual_type = 1;
- } else if (hour >= 12 && hour < 18) {
- this.schedual_type = 2;
- } else if (hour >= 18) {
- this.schedual_type = 3;
- }
- } else {
- this.schedual_type = this.dialysis_order.schedual_type;
- }
-
- if (this.dialysis_order.id > 0) {
- if (this.dialysis_order.creator == 0) {
- this.creator = this.dialysis_order.start_nurse;
- } else {
- this.creator = this.dialysis_order.creator;
- }
- }
-
- this.GetSchedualNumber();
- },
- hide: function () {
- this.visible = false;
- },
- submit: function (formName) {
- console.log(this.form,'this.form')
- this.$refs.form.validate((valid) => {
- if (valid) {
- if (this.form.start_time == "" || this.form.start_time == null) {
- this.$message.error("开始时间不能为空");
- return;
- }
- console.log(this.dialysis_order);
- this.loading = true;
- let mode = "1";
- var blood_drawing = this.form.blood_drawing.toString();
- console.log("质控护士", this.form.quality_nurse_id);
- console.log("this.form.nuclein_date", this.form.nuclein_date);
-
- startDialysis(
- this.patient_id,
- this.schedule_date
- ? parseTime(this.schedule_date, "{y}-{m}-{d}")
- : parseTime(new Date(), "{y}-{m}-{d}"),
- this.form.nurse_id,
- this.form.bed_id,
- this.form.lood_drawing,
- this.form.puncture_nurse_id,
- this.form.start_time,
- this.schedual_type,
- mode,
- this.form.washpipe_nurse,
- this.form.change_nurse,
- this.form.difficult_puncture_nurse,
- this.form.new_fistula_nurse,
- blood_drawing,
- this.form.quality_nurse_id,
- this.form.puncture_needle,
- this.form.puncture_way,
- this.form.dialysis_dialyszers,
- this.form.dialysis_irrigation,
- this.form.blood_access_id,
- this.form.nuclein_date,
- this.form.catheter_operation
- ).then((rs) => {
- this.loading = false;
- var resp = rs.data;
- if (resp.state == 1) {
- var resp_dialysis_order = resp.data.dialysis_order;
- var this_order = this.dialysis_order;
- for (const key in resp_dialysis_order) {
- this.$set(this_order, key, resp_dialysis_order[key]);
- }
- let orgId = parseInt(sessionStorage.getItem("org_id"));
- // axios.get('/api/index/uppatient?org_id='+ orgId + '&admin_user_id='+ this.form.nurse_id + '&patient_id=' + this.patient_id + '&up_time=' + (new Date(this.form.start_time).getTime() / 1000)).then((res) => {
- // console.log('res',res.data)
-
- // })
- this.hide();
- this.$emit("monitor", resp.data.monitor);
- this.$message.success("上机成功");
- } else {
- this.$message.error(resp.msg);
- }
- });
- } else {
- return false;
- }
- });
- },
- editOrder() {
- let ParamsQuery = {};
- ParamsQuery["schedual_type"] = this.schedual_type;
- ParamsQuery["id"] = this.dialysis_order.id;
- ParamsQuery["nurse"] = this.form.nurse_id;
- ParamsQuery["bed"] = this.form.bed_id;
- ParamsQuery["start_time"] = this.form.start_time;
- ParamsQuery["puncture_nurse"] = this.form.puncture_nurse_id;
- ParamsQuery["washpipe_nurse"] = this.form.washpipe_nurse;
- ParamsQuery["change_nurse"] = this.form.change_nurse;
- ParamsQuery["difficult_puncture_nurse"] =
- this.form.difficult_puncture_nurse;
- ParamsQuery["new_fistula_nurse"] = this.form.new_fistula_nurse;
- ParamsQuery["blood_drawing"] = this.form.blood_drawing;
- ParamsQuery["quality_nurse"] = this.form.quality_nurse_id;
- ParamsQuery["puncture_needle"] = this.form.puncture_needle;
- ParamsQuery["puncture_way"] = this.form.puncture_way;
- ParamsQuery["dialysis_dialyszers"] = this.form.dialysis_dialyszers;
- ParamsQuery["dialysis_irrigation"] = this.form.dialysis_irrigation;
- ParamsQuery["blood_access_id"] = this.form.blood_access_id;
- ParamsQuery["nuclein_date"] = this.form.nuclein_date;
- ParamsQuery["mode"] = "2";
- ParamsQuery['catheter_operation'] = this.form.catheter_operation
- if (this.dialysis_order.creator != this.$store.getters.xt_user.user.id) {
- ParamsQuery["mode"] = "3";
- }
- console.log(this.form,'this.form')
- this.$refs.form.validate((valid) => {
- if (valid) {
- PostModifyStartDialysis(ParamsQuery).then((rs) => {
- var resp = rs.data;
- if (resp.state == 1) {
- this.$message.success("修改成功");
- this.hide();
- var resp_dialysis_order = resp.data.dialysis_order;
- var this_order = this.dialysis_order;
- for (const key in resp_dialysis_order) {
- this.$set(this_order, key, resp_dialysis_order[key]);
- this.$emit("assessmentAfterDislysis", resp.data.after);
- }
- } else {
- this.$message.error(resp.msg);
- }
- });
- }else{
- return false;
- }
- })
-
- },
- getPermission() {
- request
- .get("/api/func_per/get", {
- params: {
- create_url: "/api/dialysis/start_record?mode=1",
- modify_url: "/api/start_dialysis/modify?mode=2",
- modify_other_url: "/api/start_dialysis/modify?mode=3",
- module: 0,
- },
- })
- .then((res) => {
- console.log(res);
- console.log("上机", this.record);
- if (res.data.state == 0) {
- this.hasPermission = false;
- } else if (res.data.state == 1) {
- if (this.record.id != "" && this.record.creater != 0) {
- //有数据
- if (this.record.creater == this.$store.getters.xt_user.user.id) {
- //创建人是自己
- if (res.data.data.is_has_modify == false) {
- this.hasPermission = false;
- this.showTxt = "你没有修改执行上机权限";
- }
- } else {
- //创建人不是自己
- if (res.data.data.is_has_modify_other == false) {
- this.hasPermission = false;
- this.showTxt = "你没有修改他人执行上机权限";
- }
- }
- } else if (this.record.id == "" || this.record.creater == 0) {
- if (res.data.data.is_has_create == false) {
- this.hasPermission = false;
- this.showTxt = "你没有执行上机权限";
- }
- }
- }
- });
- },
- showInnerDialog: function (val) {
- console.log("val32323223232323wi", val);
- this.InnerDialogProps.visibility = true;
- switch (val) {
- case "7": // 透析器
- for (let i = 0; i < this.dialyzers.length; i++) {
- this.dialyzers[i].name = this.dialyzers[i].specification_name;
- }
- this.InnerDialogProps.values = this.dialyzers;
- this.InnerDialogProps.titles = "透析器";
- this.InnerDialogProps.type = "dialyzers";
- this.InnerDialogProps.selected = this.form.dialysis_dialyszers;
- this.InnerDialogProps.isShowTextArea = false;
- break;
- case "8":
- for (let i = 0; i < this.irrigations.length; i++) {
- this.irrigations[i].name = this.irrigations[i].specification_name;
- }
- this.InnerDialogProps.values = this.irrigations;
- this.InnerDialogProps.titles = "灌流器";
- this.InnerDialogProps.type = "irrigations";
- this.InnerDialogProps.selected = this.form.dialysis_irrigation;
- this.InnerDialogProps.isShowTextArea = false;
- break;
- case "11": //穿刺针
- this.InnerDialogProps.values = this.punctureNeedleOptions;
- this.InnerDialogProps.titles = "穿刺针";
- this.InnerDialogProps.type = "puncture_needle";
- this.InnerDialogProps.selected = this.form.puncture_needle;
- this.InnerDialogProps.isShowTextArea = false;
- break;
- case "13": // 穿刺方式
- this.InnerDialogProps.values = this.puncture_ways;
- this.InnerDialogProps.titles = "穿刺方式";
- this.InnerDialogProps.type = "puncture_way";
- this.InnerDialogProps.selected = this.form.puncture_way;
- this.InnerDialogProps.isShowTextArea = false;
-
- break;
- }
- },
- innerDialogComfirm: function (val) {
- this.InnerDialogProps.visibility = false;
- switch (val.type) {
- case "puncture_needle":
- this.form.puncture_needle = val.value.join(",");
- break;
- case "puncture_way":
- this.form.puncture_way = val.value.join(",");
- break;
- case "dialyzers":
- this.form.dialysis_dialyszers = val.value.join(",");
- break;
- case "irrigations":
- this.form.dialysis_irrigation = val.value.join(",");
- break;
- }
- },
- innerDialogCancle: function () {
- this.InnerDialogProps.visibility = false;
- },
-
- dialysisSummarySelectChange: function (values) {
- if (this.form.catheter_operation == "") {
- this.form.catheter_operation = values;
- } else {
-
- if (this.form.catheter_operation.indexOf(values) == -1) {
- if (
- this.form.catheter_operation
- .charAt(this.form.catheter_operation.length - 1)
- .indexOf("。") == -1
- ) {
- this.form.catheter_operation =
- this.form.catheter_operation+ "," + values;
- } else {
- this.form.catheter_operation =
- this.form.catheter_operation + "," + values;
- this.form.catheter_operation =
- this.form.catheter_operation+ values;
- }
- }
- }
- },
- changeBloodAccessOpion(id){
- var name = ""
- for(let i=0;i<this.blood_access_option.length;i++){
- console.log("id9999",this.blood_access_option[i].id)
- if(id == this.blood_access_option[i].id){
- name = this.blood_access_option[i].name
- }
- }
-
- this.blood_access_option_name = name
- },
- changeBloodAccessOpionOne(id){
- var name = ""
- for(let i=0;i<this.blood_access_option.length;i++){
- console.log("id9999",this.blood_access_option[i].id)
- if(id == this.blood_access_option[i].id){
- name = this.blood_access_option[i].name
- }
- }
-
- return name
- }
- },
- };
- </script>
-
- <style scoped>
- .txsj {
- text-align: center;
- margin-bottom: 20px;
- }
- .warnTxt {
- text-align: center;
- margin: 0 auto;
- background: #faa331;
- max-width: 240px;
- padding: 10px 20px;
- border-radius: 4px;
- margin-bottom: 10px;
- color: #fff;
- }
- </style>
- <style lang="scss">
- .newDialog {
- .el-dialog__body {
- padding: 10px 20px 30px;
- }
- }
- </style>
|