123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313 |
- <template>
- <el-form ref="shouShuBiaoGe" :model="props.data" :rules="jiaoYanGuiZe" label-width="80px">
- <el-row>
- <el-col :span="12">
- <el-form-item label="手术" prop="opCode">
- <xc-combo-grid-v2 v-model="props.data"
- code="opCode"
- @row-click="clickToSelectSurgery"
- :table-header="tableHeader"
- name="opName"
- :query-data-func="queryOperation">
- </xc-combo-grid-v2>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="申请时间" prop="applyDate">
- {{ props.data.applyDate }}
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="手术时间" prop="opDatetime">
- <el-date-picker v-model="props.data.opDatetime"
- @change="buildOrderName"
- format="YYYY-MM-DD HH:mm:ss"
- placeholder="time"
- type="datetime"
- value-format="YYYY-MM-DD HH:mm:ss"/>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="情况">
- <el-switch
- v-model="props.data.urgentClinicFlag"
- :active-value="1"
- :inactive-value="0"
- active-color="#13ce66"
- active-text="急诊"
- inactive-color="#ff4949"
- inactive-text="择期">
- </el-switch>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="班次">
- <el-switch
- v-model="props.data.ssbc"
- :active-value="1"
- :inactive-value="2"
- active-color="#13ce66"
- active-text="正常"
- inactive-color="#ff4949"
- inactive-text="加班">
- </el-switch>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="术前诊断" prop="diagBeforeCode">
- <xc-combo-grid-v2
- v-model="props.data"
- code="diagBeforeCode"
- name="diagBeforeOp"
- :query-data-func="diagnosisInOurHospital"
- />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="自费">
- <el-switch
- v-model="props.data.ybSelfFlag"
- :active-value="1"
- :inactive-value="0"
- active-color="#13ce66"
- active-text="是"
- inactive-color="#ff4949"
- inactive-text="否">
- </el-switch>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="手术部位" prop="partCode">
- <xc-combo-grid-v2 v-model="props.data" code="partCode" name="partCodeName"
- :data="props.surgicalSiteList"
- filterable/>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="手术等级" prop="opScale">
- <el-select v-model="props.data.opScale"
- :disabled="disabledOpScale">
- <xc-el-option :data="shouShuDengJi"/>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="麻醉方式">
- <xc-combo-grid-v2 v-model="props.data"
- @row-click="buildOrderName"
- filterable
- :data="props.anestheticMode"
- code-name="hocusCode"/>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="主刀医生" prop="doctorZd">
- <xc-combo-grid-v2 v-model="props.data"
- code-name="doctorZd"
- filterable
- :table-header="personnel"
- :data="designateASurgeonInChief.length > 0 ? designateASurgeonInChief : props.personnelList"/>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="第一助手">
- <xc-combo-grid-v2 v-model="props.data"
- code="doctor1" name="doctor1Name"
- filterable
- clearable
- :table-header="personnel"
- :data="props.personnelList"/>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="第二助手">
- <xc-combo-grid-v2 v-model="props.data"
- code-name="doctor2"
- filterable
- clearable
- :table-header="personnel"
- :data="props.personnelList"/>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="第三助手">
- <xc-combo-grid-v2 v-model="props.data"
- code-name="doctor3"
- filterable
- clearable
- :table-header="personnel"
- :data="props.personnelList"/>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="麻醉医生">
- <xc-combo-grid-v2 v-model="props.data"
- code-name="doctorMz"
- filterable
- clearable
- :table-header="personnel"
- :data="props.personnelList"/>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="器械护士">
- <xc-combo-grid-v2 v-model="props.data"
- code-name="nurseQx"
- filterable
- clearable
- :table-header="personnel"
- :data="props.personnelList"/>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="巡回护士">
- <xc-combo-grid-v2 v-model="props.data"
- code-name="nurseXh"
- filterable
- clearable
- :table-header="personnel"
- :data="props.personnelList"/>
- </el-form-item>
- </el-col>
- <el-col :span="24">
- <el-form-item label="医嘱名:">
- <el-input style="width: 220px"
- :rows="3"
- type="textarea"
- show-word-limit
- maxlength="50"
- v-model="props.data.orderName"/>
- </el-form-item>
- </el-col>
- <el-col :span="24">
- <el-form-item label="附注说明">
- <el-input v-model="props.data.remark" :rows="6" maxlength="50" show-word-limit
- style="width: 450px;"
- type="textarea"/>
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- </template>
- <script setup name="BianJiShouShu">
- import {ref} from "vue";
- import {diagnosisInOurHospital} from "@/api/zhu-yuan-yi-sheng/jian-yan-jian-cha-shen-qing";
- import {getDoctorByOpCode, huoQuShouShuBuWei, obtainSurgicalItems} from "@/api/zhu-yuan-yi-sheng/shou-shu-shen-qing";
- import {getRenYuan} from "@/api/public-api";
- import moment from "moment";
- import XcSelectV3 from "@/components/xiao-chan/select-v3/XcSelectV3.vue";
- import XcTableColumn from "@/components/xiao-chan/select-v3/XcTableColumn";
- import {getFormatDatetime} from "@/utils/date";
- import XcComboGrid from "@/components/xiao-chan/combo-grid/XcComboGrid.vue";
- import XcElOption from "@/components/xiao-chan/xc-el-option/XcElOption.vue";
- import XEUtils from 'xe-utils'
- import {xcMessage} from "@/utils/xiaochan-element-plus";
- import {isDev} from "@/utils/public";
- import XcComboGridV2 from "@/components/xiao-chan/combo-grid/XcComboGridV2.vue";
- const props = defineProps({
- anestheticMode: {
- type: Array,
- },
- data: Object,
- index: Number,
- personnelList: Array,
- surgicalSiteList: Array,
- })
- const tableHeader = [
- {label: '编码', prop: 'code', width: 120},
- {label: '名称', prop: 'name', width: 200},
- {label: '类型', prop: 'opTypeName', width: 100},
- {label: '等级', prop: 'opScale', width: 40},
- ]
- const emit = defineEmits(['qu-xiao'])
- const queryOperation = (val) => {
- return obtainSurgicalItems(val, 0)
- }
- const selectOpRow = ref({})
- const designateASurgeonInChief = ref([])
- const clickToSelectSurgery = async (val) => {
- designateASurgeonInChief.value = []
- disabledOpScale.value = false
- selectOpRow.value = val
- let res = await getDoctorByOpCode(val.code)
- designateASurgeonInChief.value = res
- yiShengShuJu.value = res
- if (designateASurgeonInChief.value.length > 0) {
- xcMessage.warning('医务部锁定手术主刀医生无法修改');
- }
- if (val.opScale !== null) {
- disabledOpScale.value = true
- props.data.opScale = gradeToCode(val.opScale)
- xcMessage.warning('医务部锁定手术等级无法修改')
- }
- buildOrderName()
- }
- const disabledOpScale = ref(false)
- // 医生信息
- const yiShengShuJu = ref([])
- const personnel = [
- {label: '编码', prop: 'code', width: 46},
- {label: '名称', prop: 'name', width: 56},
- {label: '科室', prop: 'deptName', width: 92},
- {label: '级别', prop: 'empTitName', width: 105},
- ]
- const shouShuBiaoGe = ref()
- // 时间校验
- const shenQingShiJian = (rule, value, callback) => {
- const oDate1 = moment(value).format('YYYY-MM-DD HH:mm:ss')
- const oDate2 = moment(props.data.applyDate).format('YYYY-MM-DD HH:mm:ss')
- if (moment(oDate1).isBefore(moment(oDate2))) {
- callback(new Error('手术时间不能小于申请时间'))
- } else {
- callback()
- }
- }
- // 校验数据
- const jiaoYanGuiZe = ref({
- opCode: [{required: true, message: '项目编码不能为空', trigger: 'blur'}],
- opName: [{required: true, message: '项目名称不能为空', trigger: 'blur'}],
- applyDate: [{required: true, message: '申请时间不能为空', trigger: 'blur'}],
- opDatetime: [{required: true, message: '手术时间不能为空', trigger: 'blur'},
- {validator: shenQingShiJian, trigger: 'blur'}],
- diagBeforeCode: [{required: true, message: '术前诊断不能为空', trigger: 'blur'}],
- partCode: [{required: true, message: '手术部位不能为空', trigger: 'blur'}],
- doctorZd: [{required: true, message: '主刀医生不能为空', trigger: 'blur'}],
- opScale: [{required: true, message: '手术等级不能为空', trigger: 'blur'}],
- })
- const buildOrderName = () => {
- props.data.orderName =
- `拟于${getFormatDatetime(props.data.opDatetime, 'YYYY-MM-DD HH:mm')}在${props.data.hocusCodeName === null ? '' : props.data.hocusCodeName}下行${props.data.opName}`
- }
- const shouShuDengJi = [
- {code: 1, name: '四级', value: 4},
- {code: 2, name: '三级', value: 3},
- {code: 3, name: '二级', value: 2},
- {code: 4, name: '一级', value: 1},
- ]
- const gradeToCode = (val) => {
- return XEUtils.filter(shouShuDengJi, (item) => {
- return item.value === val
- })[0].code
- }
- </script>
- <style scoped>
- </style>
|