|
@@ -51,14 +51,11 @@
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="术前诊断" prop="diagBeforeCode">
|
|
|
- <!-- TODO v2 选择器中我绑定了 value 是对象记得搞 -->
|
|
|
- <XcSelectV2
|
|
|
- v-model="data"
|
|
|
- :data="shouShuZhenDuan"
|
|
|
- value="diagBeforeCode"
|
|
|
- label="diagBeforeOp"
|
|
|
- :remote-method="souSuoZhenDuan"
|
|
|
- />
|
|
|
+ <xc-table-v3 v-model="data"
|
|
|
+ :data="shouShuZhenDuan"
|
|
|
+ code="diagBeforeCode"
|
|
|
+ name="diagBeforeOp"
|
|
|
+ :remote-method="souSuoZhenDuan"/>
|
|
|
<el-switch
|
|
|
v-model="zhenDuanLaiYuan"
|
|
|
:active-value="true"
|
|
@@ -85,160 +82,106 @@
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="手术部位" prop="partCodeObj">
|
|
|
- <el-select v-model="data.partCodeObj" :remote-method="souSuoBuWei" clearable filterable remote
|
|
|
- style="width: 220px" @change="huoQuXialaKuangMing">
|
|
|
- <el-option v-for="item in shouShuBuWeiShuJu" :key="item.code" :label="item.name"
|
|
|
- :value="{label:item.name,value:item.code,laiYuan:'手术部位'}">
|
|
|
- <span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
|
|
|
- <el-divider direction="vertical"></el-divider>
|
|
|
- <span>{{ item.name }}</span>
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
+ <xc-table-v3 v-model="data" code="partCode" name="partCodeName"
|
|
|
+ :data="shouShuBuWeiShuJu"
|
|
|
+ :remote-method="souSuoBuWei" clearable/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="手术等级" prop="opScale">
|
|
|
- <el-select v-model="data.opScale" :remote-method="souSuoBuWei" clearable filterable remote
|
|
|
- style="width: 220px" @change="huoQuXialaKuangMing">
|
|
|
- <el-option v-for="item in shouShuDengJi" :key="item.code" :label="item.name"
|
|
|
- :value="item.code">
|
|
|
- <span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
|
|
|
- <el-divider direction="vertical"></el-divider>
|
|
|
- <span>{{ item.name }}</span>
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
+ <xc-table-v3 v-model="data" code="opScale" name="opScaleName" :data="shouShuDengJi">
|
|
|
+ <xc-table-column label="编码" prop="code"/>
|
|
|
+ <xc-table-column label="名称" prop="name"/>
|
|
|
+ </xc-table-v3>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="麻醉方式">
|
|
|
- <el-select v-model="data.hocusCodeObj" clearable filterable style="width: 220px"
|
|
|
- @change="huoQuXialaKuangMing">
|
|
|
- <el-option v-for="item in maZuiFangShiShuJu" :key="item.code" :label="item.name"
|
|
|
- :value="{label:item.name,value:item.code,laiYuan:'麻醉方式'}">
|
|
|
- <span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
|
|
|
- <el-divider direction="vertical"></el-divider>
|
|
|
- <span>{{ item.name }}</span>
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
+ <xc-table-v3 v-model="data" code="hocusCode" name="hocusCodeName" :data="maZuiFangShiShuJu"/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="主刀医生" prop="doctorZdObj">
|
|
|
- <el-select v-model="data.doctorZdObj" :remote-method="suoSouYiShen" clearable filterable remote
|
|
|
- style="width: 220px" @change="huoQuXialaKuangMing">
|
|
|
- <el-option v-for="item in yiShengShuJu" :key="item.code" :label="item.name"
|
|
|
- :value="{label:item.name,value:item.code,laiYuan:'主刀医生'}">
|
|
|
- <span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
|
|
|
- <el-divider direction="vertical"></el-divider>
|
|
|
- <span style="color:#67C23A">{{ item.name }}</span>
|
|
|
- <el-divider direction="vertical"></el-divider>
|
|
|
- <span style="color:#E6A23C">{{ item.deptName }}</span>
|
|
|
- <el-divider direction="vertical"></el-divider>
|
|
|
- <span style="color:#a5673f">{{ item.empTitName }}</span>
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
+ <xc-table-v3 v-model="data" code="doctorZd" name="doctorZdName"
|
|
|
+ :remote-method="suoSouYiShen" clearable
|
|
|
+ :data="yiShengShuJu">
|
|
|
+ <xc-table-column label="编码" prop="code"/>
|
|
|
+ <xc-table-column label="姓名" prop="name"/>
|
|
|
+ <xc-table-column label="科室" prop="deptName"/>
|
|
|
+ <xc-table-column label="级别" prop="empTitName"/>
|
|
|
+ </xc-table-v3>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="第一助手">
|
|
|
- <el-select v-model="data.doctor1Obj" :remote-method="suoSouYiShen" clearable filterable remote
|
|
|
- style="width: 220px" @change="huoQuXialaKuangMing">
|
|
|
- <el-option v-for="item in yiShengShuJu" :key="item.code" :label="item.name"
|
|
|
- :value="{label:item.name,value:item.code,laiYuan:'第一助手'}">
|
|
|
- <span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
|
|
|
- <el-divider direction="vertical"></el-divider>
|
|
|
- <span style="color:#67C23A">{{ item.name }}</span>
|
|
|
- <el-divider direction="vertical"></el-divider>
|
|
|
- <span style="color:#E6A23C">{{ item.deptName }}</span>
|
|
|
- <el-divider direction="vertical"></el-divider>
|
|
|
- <span style="color:#a5673f">{{ item.empTitName }}</span>
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
+ <xc-table-v3 v-model="data" code="doctor1" name="doctor1Name"
|
|
|
+ :remote-method="suoSouYiShen" clearable
|
|
|
+ :data="yiShengShuJu">
|
|
|
+ <xc-table-column label="编码" prop="code"/>
|
|
|
+ <xc-table-column label="姓名" prop="name"/>
|
|
|
+ <xc-table-column label="科室" prop="deptName"/>
|
|
|
+ <xc-table-column label="级别" prop="empTitName"/>
|
|
|
+ </xc-table-v3>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="第二助手">
|
|
|
- <el-select v-model="data.doctor2Obj" :remote-method="suoSouYiShen" clearable filterable remote
|
|
|
- style="width: 220px" @change="huoQuXialaKuangMing">
|
|
|
- <el-option v-for="item in yiShengShuJu" :key="item.code" :label="item.name"
|
|
|
- :value="{label:item.name,value:item.code,laiYuan:'第二助手'}">
|
|
|
- <span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
|
|
|
- <el-divider direction="vertical"></el-divider>
|
|
|
- <span style="color:#67C23A">{{ item.name }}</span>
|
|
|
- <el-divider direction="vertical"></el-divider>
|
|
|
- <span style="color:#E6A23C">{{ item.deptName }}</span>
|
|
|
- <el-divider direction="vertical"></el-divider>
|
|
|
- <span style="color:#a5673f">{{ item.empTitName }}</span>
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
+ <xc-table-v3 v-model="data" code="doctor2" name="doctor2Name"
|
|
|
+ :remote-method="suoSouYiShen" clearable
|
|
|
+ :data="yiShengShuJu">
|
|
|
+ <xc-table-column label="编码" prop="code"/>
|
|
|
+ <xc-table-column label="姓名" prop="name"/>
|
|
|
+ <xc-table-column label="科室" prop="deptName"/>
|
|
|
+ <xc-table-column label="级别" prop="empTitName"/>
|
|
|
+ </xc-table-v3>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="第三助手">
|
|
|
- <el-select v-model="data.doctor3Obj" :remote-method="suoSouYiShen" clearable filterable remote
|
|
|
- style="width: 220px" @change="huoQuXialaKuangMing">
|
|
|
- <el-option v-for="item in yiShengShuJu" :key="item.code" :label="item.name"
|
|
|
- :value="{label:item.name,value:item.code,laiYuan:'第三助手'}">
|
|
|
- <span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
|
|
|
- <el-divider direction="vertical"></el-divider>
|
|
|
- <span style="color:#67C23A">{{ item.name }}</span>
|
|
|
- <el-divider direction="vertical"></el-divider>
|
|
|
- <span style="color:#E6A23C">{{ item.deptName }}</span>
|
|
|
- <el-divider direction="vertical"></el-divider>
|
|
|
- <span style="color:#a5673f">{{ item.empTitName }}</span>
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
+ <xc-table-v3 v-model="data" code="doctor3" name="doctor3Name"
|
|
|
+ :remote-method="suoSouYiShen" clearable
|
|
|
+ :data="yiShengShuJu">
|
|
|
+ <xc-table-column label="编码" prop="code"/>
|
|
|
+ <xc-table-column label="姓名" prop="name"/>
|
|
|
+ <xc-table-column label="科室" prop="deptName"/>
|
|
|
+ <xc-table-column label="级别" prop="empTitName"/>
|
|
|
+ </xc-table-v3>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="麻醉医生">
|
|
|
- <el-select v-model="data.doctorMzObj" :remote-method="suoSouYiShen" clearable filterable remote
|
|
|
- style="width: 220px" @change="huoQuXialaKuangMing">
|
|
|
- <el-option v-for="item in yiShengShuJu" :key="item.code" :label="item.name"
|
|
|
- :value="{label:item.name,value:item.code,laiYuan:'麻醉医生'}">
|
|
|
- <span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
|
|
|
- <el-divider direction="vertical"></el-divider>
|
|
|
- <span style="color:#67C23A">{{ item.name }}</span>
|
|
|
- <el-divider direction="vertical"></el-divider>
|
|
|
- <span style="color:#E6A23C">{{ item.deptName }}</span>
|
|
|
- <el-divider direction="vertical"></el-divider>
|
|
|
- <span style="color:#a5673f">{{ item.empTitName }}</span>
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
+ <xc-table-v3 v-model="data" code="doctorMz" name="doctorMzName"
|
|
|
+ :remote-method="suoSouYiShen" clearable
|
|
|
+ :data="yiShengShuJu">
|
|
|
+ <xc-table-column label="编码" prop="code"/>
|
|
|
+ <xc-table-column label="姓名" prop="name"/>
|
|
|
+ <xc-table-column label="科室" prop="deptName"/>
|
|
|
+ <xc-table-column label="级别" prop="empTitName"/>
|
|
|
+ </xc-table-v3>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="器械护士">
|
|
|
- <el-select v-model="data.nurseQxObj" :remote-method="suoSouYiShen" clearable filterable remote
|
|
|
- style="width: 220px" @change="huoQuXialaKuangMing">
|
|
|
- <el-option v-for="item in yiShengShuJu" :key="item.code" :label="item.name"
|
|
|
- :value="{label:item.name,value:item.code,laiYuan:'器械护士'}">
|
|
|
- <span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
|
|
|
- <el-divider direction="vertical"></el-divider>
|
|
|
- <span style="color:#67C23A">{{ item.name }}</span>
|
|
|
- <el-divider direction="vertical"></el-divider>
|
|
|
- <span style="color:#E6A23C">{{ item.deptName }}</span>
|
|
|
- <el-divider direction="vertical"></el-divider>
|
|
|
- <span style="color:#a5673f">{{ item.empTitName }}</span>
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
+ <xc-table-v3 v-model="data" code="nurseQx" name="nurseQxName"
|
|
|
+ :remote-method="suoSouYiShen" clearable
|
|
|
+ :data="yiShengShuJu">
|
|
|
+ <xc-table-column label="编码" prop="code"/>
|
|
|
+ <xc-table-column label="姓名" prop="name"/>
|
|
|
+ <xc-table-column label="科室" prop="deptName"/>
|
|
|
+ <xc-table-column label="级别" prop="empTitName"/>
|
|
|
+ </xc-table-v3>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="巡回护士">
|
|
|
- <el-select v-model="data.nurseXhObj" :remote-method="suoSouYiShen" clearable filterable remote
|
|
|
- style="width: 220px" @change="huoQuXialaKuangMing">
|
|
|
- <el-option v-for="item in yiShengShuJu" :key="item.code" :label="item.name"
|
|
|
- :value="{label:item.name,value:item.code,laiYuan:'巡回护士'}">
|
|
|
- <span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
|
|
|
- <el-divider direction="vertical"></el-divider>
|
|
|
- <span style="color:#67C23A">{{ item.name }}</span>
|
|
|
- <el-divider direction="vertical"></el-divider>
|
|
|
- <span style="color:#E6A23C">{{ item.deptName }}</span>
|
|
|
- <el-divider direction="vertical"></el-divider>
|
|
|
- <span style="color:#a5673f">{{ item.empTitName }}</span>
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
+ <xc-table-v3 v-model="data" code="nurseXh" name="nurseXhName"
|
|
|
+ :remote-method="suoSouYiShen" clearable
|
|
|
+ :data="yiShengShuJu">
|
|
|
+ <xc-table-column label="编码" prop="code"/>
|
|
|
+ <xc-table-column label="姓名" prop="name"/>
|
|
|
+ <xc-table-column label="科室" prop="deptName"/>
|
|
|
+ <xc-table-column label="级别" prop="empTitName"/>
|
|
|
+ </xc-table-v3>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
@@ -272,192 +215,178 @@
|
|
|
</el-dialog>
|
|
|
</template>
|
|
|
|
|
|
-<script>
|
|
|
+<script setup name="BianJiShouShu">
|
|
|
import {onMounted, ref, unref} from "vue";
|
|
|
import {huoQuLinChuangZhenDuan} from "@/api/zhu-yuan-yi-sheng/jian-yan-jian-cha-shen-qing";
|
|
|
import {huoQuShouShuBuWei} from "@/api/zhu-yuan-yi-sheng/shou-shu-shen-qing";
|
|
|
import {getRenYuan, maZuiFangShi} from "@/api/public-api";
|
|
|
import moment from "moment";
|
|
|
import {ElMessage, ElMessageBox} from "element-plus";
|
|
|
+import XcTableV3 from "@/components/xc/table-v3/XcTableV3";
|
|
|
+import XcTableColumn from "@/components/xc/table-v3/XcTableColumn";
|
|
|
|
|
|
-export default {
|
|
|
- name: "BianJiShouShu",
|
|
|
- emits: ['qu-xiao'],
|
|
|
- setup(props, cxt) {
|
|
|
- const data = ref({});
|
|
|
- const dialog = ref(false)
|
|
|
- const zhenDuanLaiYuan = ref(1)
|
|
|
- const zhenDuanDangQianYe = ref(1)
|
|
|
+const emit = defineEmits(['qu-xiao'])
|
|
|
|
|
|
- // 手术部位
|
|
|
- const shouShuBuWeiShuJu = ref([])
|
|
|
- // 手术诊断
|
|
|
- const shouShuZhenDuan = ref([])
|
|
|
- // 麻醉方式
|
|
|
- const maZuiFangShiShuJu = ref([])
|
|
|
- // 医生信息
|
|
|
- const yiShengShuJu = ref([])
|
|
|
+const data = ref({});
|
|
|
+const dialog = ref(false)
|
|
|
+const zhenDuanLaiYuan = ref(1)
|
|
|
+const zhenDuanDangQianYe = ref(1)
|
|
|
|
|
|
+// 手术部位
|
|
|
+const shouShuBuWeiShuJu = ref([])
|
|
|
+// 手术诊断
|
|
|
+const shouShuZhenDuan = ref([])
|
|
|
+// 麻醉方式
|
|
|
+const maZuiFangShiShuJu = ref([])
|
|
|
+// 医生信息
|
|
|
+const yiShengShuJu = ref([])
|
|
|
|
|
|
- // 搜索手术部位
|
|
|
- const souSuoBuWei = (val) => {
|
|
|
- if (val.length > 1) {
|
|
|
- huoQuShouShuBuWei(val).then((res) => {
|
|
|
- shouShuBuWeiShuJu.value = res
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
|
|
|
- // 搜索诊断
|
|
|
- const souSuoZhenDuan = (val) => {
|
|
|
- if (val.length > 1) {
|
|
|
- huoQuLinChuangZhenDuan(val, zhenDuanLaiYuan.value).then(res => {
|
|
|
- shouShuZhenDuan.value = res
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- const zhenDuanFanYe = (val) => {
|
|
|
- zhenDuanDangQianYe.value = val
|
|
|
- }
|
|
|
- // 搜索医生
|
|
|
- const suoSouYiShen = (val) => {
|
|
|
- if (val.length > 1) {
|
|
|
- getRenYuan(val).then(res => {
|
|
|
- yiShengShuJu.value = res
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
+// 搜索手术部位
|
|
|
+const souSuoBuWei = (val) => {
|
|
|
+ if (val.length > 1) {
|
|
|
+ huoQuShouShuBuWei(val).then((res) => {
|
|
|
+ shouShuBuWeiShuJu.value = res
|
|
|
+ })
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
- const huoQuXialaKuangMing = (val) => {
|
|
|
- switch (val.laiYuan) {
|
|
|
- case '麻醉方式':
|
|
|
- data.value.hocusCode = val.value
|
|
|
- data.value.hocusCodeName = val.label
|
|
|
- return;
|
|
|
- case '主刀医生':
|
|
|
- data.value.doctorZd = val.value
|
|
|
- data.value.doctorZdName = val.label
|
|
|
- return;
|
|
|
- case '第一助手':
|
|
|
- data.value.doctor1 = val.value
|
|
|
- data.value.doctor1Name = val.label
|
|
|
- return;
|
|
|
- case '第二助手':
|
|
|
- data.value.doctor2 = val.value
|
|
|
- data.value.doctor2Name = val.label
|
|
|
- return;
|
|
|
- case '第三助手':
|
|
|
- data.value.doctor3 = val.value
|
|
|
- data.value.doctor3Name = val.label
|
|
|
- return;
|
|
|
- case '麻醉医生':
|
|
|
- data.value.doctorMz = val.value
|
|
|
- data.value.doctorMzName = val.label
|
|
|
- return;
|
|
|
- case '器械护士':
|
|
|
- data.value.nurseQx = val.value
|
|
|
- data.value.nurseQxName = val.label
|
|
|
- return;
|
|
|
- case '巡回护士':
|
|
|
- data.value.nurseXh = val.value
|
|
|
- data.value.nurseXhName = val.label
|
|
|
- return;
|
|
|
- case '手术部位':
|
|
|
- data.value.partCode = val.value
|
|
|
- data.value.partCodeName = val.label
|
|
|
- return;
|
|
|
- }
|
|
|
- }
|
|
|
+// 搜索诊断
|
|
|
+const souSuoZhenDuan = (val) => {
|
|
|
+ if (val.length > 1) {
|
|
|
+ huoQuLinChuangZhenDuan(val, zhenDuanLaiYuan.value).then(res => {
|
|
|
+ shouShuZhenDuan.value = res
|
|
|
+ })
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
- const huoQuShuJu = (val) => {
|
|
|
- data.value = val
|
|
|
- dialog.value = true
|
|
|
- }
|
|
|
+const zhenDuanFanYe = (val) => {
|
|
|
+ zhenDuanDangQianYe.value = val
|
|
|
+}
|
|
|
+// 搜索医生
|
|
|
+const suoSouYiShen = (val) => {
|
|
|
+ if (val.length > 1) {
|
|
|
+ getRenYuan(val).then(res => {
|
|
|
+ yiShengShuJu.value = res
|
|
|
+ })
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
- const shouShuBiaoGe = ref()
|
|
|
+const huoQuXialaKuangMing = (val) => {
|
|
|
+ switch (val.laiYuan) {
|
|
|
+ case '麻醉方式':
|
|
|
+ data.value.hocusCode = val.value
|
|
|
+ data.value.hocusCodeName = val.label
|
|
|
+ return;
|
|
|
+ case '主刀医生':
|
|
|
+ data.value.doctorZd = val.value
|
|
|
+ data.value.doctorZdName = val.label
|
|
|
+ return;
|
|
|
+ case '第一助手':
|
|
|
+ data.value.doctor1 = val.value
|
|
|
+ data.value.doctor1Name = val.label
|
|
|
+ return;
|
|
|
+ case '第二助手':
|
|
|
+ data.value.doctor2 = val.value
|
|
|
+ data.value.doctor2Name = val.label
|
|
|
+ return;
|
|
|
+ case '第三助手':
|
|
|
+ data.value.doctor3 = val.value
|
|
|
+ data.value.doctor3Name = val.label
|
|
|
+ return;
|
|
|
+ case '麻醉医生':
|
|
|
+ data.value.doctorMz = val.value
|
|
|
+ data.value.doctorMzName = val.label
|
|
|
+ return;
|
|
|
+ case '器械护士':
|
|
|
+ data.value.nurseQx = val.value
|
|
|
+ data.value.nurseQxName = val.label
|
|
|
+ return;
|
|
|
+ case '巡回护士':
|
|
|
+ data.value.nurseXh = val.value
|
|
|
+ data.value.nurseXhName = val.label
|
|
|
+ return;
|
|
|
+ case '手术部位':
|
|
|
+ data.value.partCode = val.value
|
|
|
+ data.value.partCodeName = val.label
|
|
|
+ return;
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
- // 时间校验
|
|
|
- const shenQingShiJian = (rule, value, callback) => {
|
|
|
- const oDate1 = moment(value).format('YYYY-MM-DD HH:mm:ss')
|
|
|
- const oDate2 = moment(data.value.applyDate).format('YYYY-MM-DD HH:mm:ss')
|
|
|
- if (moment(oDate1).isBefore(moment(oDate2))) {
|
|
|
- callback(new Error('手术时间不能小于申请时间'))
|
|
|
- } else {
|
|
|
- callback()
|
|
|
- }
|
|
|
- }
|
|
|
+const huoQuShuJu = (val) => {
|
|
|
+ data.value = val
|
|
|
+ dialog.value = true
|
|
|
+}
|
|
|
|
|
|
- // 校验数据
|
|
|
- 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'}],
|
|
|
- partCodeObj: [{required: true, message: '手术部位不能为空', trigger: 'blur'}],
|
|
|
- doctorZdObj: [{required: true, message: '主刀医生不能为空', trigger: 'blur'}],
|
|
|
- opScale: [{required: true, message: '手术等级不能为空', trigger: 'blur'}],
|
|
|
- })
|
|
|
|
|
|
+const shouShuBiaoGe = ref()
|
|
|
|
|
|
- const jiaoYanShuJu = async () => {
|
|
|
- const form = unref(shouShuBiaoGe);
|
|
|
- if (!form) return
|
|
|
- try {
|
|
|
- await form.validate()
|
|
|
- dialog.value = false
|
|
|
- } catch (e) {
|
|
|
- ElMessage.error('请检查数据。')
|
|
|
- }
|
|
|
- }
|
|
|
+// 时间校验
|
|
|
+const shenQingShiJian = (rule, value, callback) => {
|
|
|
+ const oDate1 = moment(value).format('YYYY-MM-DD HH:mm:ss')
|
|
|
+ const oDate2 = moment(data.value.applyDate).format('YYYY-MM-DD HH:mm:ss')
|
|
|
+ if (moment(oDate1).isBefore(moment(oDate2))) {
|
|
|
+ callback(new Error('手术时间不能小于申请时间'))
|
|
|
+ } else {
|
|
|
+ callback()
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
- const quXiaoBianJi = async () => {
|
|
|
- await ElMessageBox.confirm('点击取消您的手术申请将会被删除。', '提示', {
|
|
|
- type: 'warning',
|
|
|
- confirmButtonText: '退出并删除',
|
|
|
- }).then(() => {
|
|
|
- cxt.emit('qu-xiao', data.value.opCode, -1)
|
|
|
- dialog.value = false
|
|
|
- }).catch((e) => {
|
|
|
- })
|
|
|
+// 校验数据
|
|
|
+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'}],
|
|
|
+})
|
|
|
|
|
|
- }
|
|
|
|
|
|
- onMounted(() => {
|
|
|
- maZuiFangShi().then(res => {
|
|
|
- maZuiFangShiShuJu.value = res
|
|
|
- })
|
|
|
- })
|
|
|
- return {
|
|
|
- data,
|
|
|
- dialog,
|
|
|
- shouShuBuWeiShuJu,
|
|
|
- souSuoBuWei,
|
|
|
- shouShuZhenDuan,
|
|
|
- souSuoZhenDuan,
|
|
|
- zhenDuanLaiYuan,
|
|
|
- zhenDuanDangQianYe,
|
|
|
- zhenDuanFanYe,
|
|
|
- maZuiFangShiShuJu,
|
|
|
- yiShengShuJu,
|
|
|
- suoSouYiShen,
|
|
|
- huoQuXialaKuangMing,
|
|
|
- huoQuShuJu,
|
|
|
- jiaoYanShuJu,
|
|
|
- jiaoYanGuiZe,
|
|
|
- shouShuBiaoGe,
|
|
|
- quXiaoBianJi,
|
|
|
- shouShuDengJi: [
|
|
|
- {code: 1, name: '四级'},
|
|
|
- {code: 2, name: '三级'},
|
|
|
- {code: 3, name: '二级'},
|
|
|
- {code: 4, name: '一级'},
|
|
|
- ]
|
|
|
- }
|
|
|
+const jiaoYanShuJu = async () => {
|
|
|
+ const form = unref(shouShuBiaoGe);
|
|
|
+ if (!form) return
|
|
|
+ try {
|
|
|
+ await form.validate()
|
|
|
+ dialog.value = false
|
|
|
+ } catch (e) {
|
|
|
+ ElMessage.error('请检查数据。')
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+const quXiaoBianJi = async () => {
|
|
|
+ await ElMessageBox.confirm('点击取消您的手术申请将会被删除。', '提示', {
|
|
|
+ type: 'warning',
|
|
|
+ confirmButtonText: '退出并删除',
|
|
|
+ }).then(() => {
|
|
|
+ emit('qu-xiao', data.value.opCode, -1)
|
|
|
+ dialog.value = false
|
|
|
+ }).catch((e) => {
|
|
|
+ })
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+onMounted(() => {
|
|
|
+ maZuiFangShi().then(res => {
|
|
|
+ maZuiFangShiShuJu.value = res
|
|
|
+ })
|
|
|
+})
|
|
|
+
|
|
|
+const shouShuDengJi = [
|
|
|
+ {code: 1, name: '四级'},
|
|
|
+ {code: 2, name: '三级'},
|
|
|
+ {code: 3, name: '二级'},
|
|
|
+ {code: 4, name: '一级'},
|
|
|
+]
|
|
|
+
|
|
|
+
|
|
|
+defineExpose({
|
|
|
+ huoQuShuJu
|
|
|
+})
|
|
|
+
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|