|
|
|
|
@ -16,10 +16,16 @@
|
|
|
|
|
:value="item.id" />
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
|
|
<el-select clearable v-model="searchInfo.deviceBind" placeholder="关联检查室" style="margin-left: 10px;">
|
|
|
|
|
<el-select clearable v-model="searchInfo.deviceBind" placeholder="关联排班" style="margin-left: 10px;">
|
|
|
|
|
<el-option label="全部" value="" />
|
|
|
|
|
<el-option label="已关联检查室" :value="1" />
|
|
|
|
|
<el-option label="未关联检查室" :value="0" />
|
|
|
|
|
<el-option label="已关联排班" :value="1" />
|
|
|
|
|
<el-option label="未关联排班" :value="0" />
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
|
|
<el-select clearable v-model="searchInfo.hisExecDepts" placeholder="执行科室" style="margin-left: 10px;">
|
|
|
|
|
<el-option label="全部" value="" />
|
|
|
|
|
<el-option label="有执行科室" value="1" />
|
|
|
|
|
<el-option label="无执行科室" value="0" />
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
|
|
<el-input v-model="searchInfo.name" placeholder="请输入项目编号/名称" style="margin-left: 10px;" />
|
|
|
|
|
@ -27,7 +33,7 @@
|
|
|
|
|
<el-button type="primary" @click="GetItemList()" style="margin-left: 10px;">查询</el-button>
|
|
|
|
|
<el-button type="warning" @click="GetHisItemClass()" style="margin-left: 10px; margin-left: 40px;">同步分类</el-button>
|
|
|
|
|
<el-button type="warning" @click="GetHisCheckItem()" style="margin-left: 10px;">同步检查项目</el-button>
|
|
|
|
|
<el-button type="primary" @click="BatchLinkDevice()" style="margin-left: 10px;">批量关联检查室</el-button>
|
|
|
|
|
<el-button type="primary" @click="BatchLinkDevice()" style="margin-left: 10px;">批量关联排班</el-button>
|
|
|
|
|
</el-row>
|
|
|
|
|
</div>
|
|
|
|
|
<el-table ref="checkItemTableRef" :data="tableData" style="width: 100%; margin-top: 10px;" row-key="id" @sort-change="onSortChange" @selection-change="onSelectionChange">
|
|
|
|
|
@ -44,7 +50,7 @@
|
|
|
|
|
<el-table-column prop="check_notice" label="检查须知" />
|
|
|
|
|
<el-table-column prop="check_time" label="检查时间" width="100" />
|
|
|
|
|
<el-table-column prop="check_begin_time" label="开始预约时间" width="120" />
|
|
|
|
|
<el-table-column prop="devicesInfo" label="关联检查室">
|
|
|
|
|
<el-table-column prop="devicesInfo" label="关联排班">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<span v-for="(item,index) in scope.row.devicesInfo " :key="index">
|
|
|
|
|
<el-tag v-if="item.status==1 && item.is_del==0" class="ml-2"
|
|
|
|
|
@ -54,9 +60,9 @@
|
|
|
|
|
</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="" label="医嘱关联检查室" width="150">
|
|
|
|
|
<el-table-column prop="" label="医嘱关联排班" width="150">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<el-button size="small" @click="LinkDeviceClick(scope.row)">关联检查室</el-button>
|
|
|
|
|
<el-button size="small" @click="LinkDeviceClick(scope.row)">关联排班</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="" label="操作" width="220">
|
|
|
|
|
@ -75,7 +81,7 @@
|
|
|
|
|
|
|
|
|
|
<el-dialog v-model="DevicedialogVisible" :title="linkDialogTitle" width="40%">
|
|
|
|
|
<div class="chuansuokuang">
|
|
|
|
|
<el-transfer v-model="selectedDevice" :titles="['可选检查室', '已关联检查室']"
|
|
|
|
|
<el-transfer v-model="selectedDevice" :titles="['可选排班', '已关联排班']"
|
|
|
|
|
:props="{ key: 'id',label: 'device_name'}" :data="deviceList" />
|
|
|
|
|
</div>
|
|
|
|
|
<div v-if="isBatchLink && batchProgressShow" style="padding: 0 20px 12px; margin-top: 10px;">
|
|
|
|
|
@ -299,7 +305,9 @@
|
|
|
|
|
smallClass: '',
|
|
|
|
|
name: '',
|
|
|
|
|
orderField: '',
|
|
|
|
|
orderDirection: ''
|
|
|
|
|
orderDirection: '',
|
|
|
|
|
hisExecDepts: '1',
|
|
|
|
|
deviceBind: ''
|
|
|
|
|
})
|
|
|
|
|
//选中的项目信息
|
|
|
|
|
let selectedItemInfo = ref({
|
|
|
|
|
@ -399,7 +407,7 @@
|
|
|
|
|
|
|
|
|
|
// 计算链接对话框标题
|
|
|
|
|
const linkDialogTitle = computed(() => {
|
|
|
|
|
return isBatchLink.value ? '批量关联检查室' : '关联检查室'
|
|
|
|
|
return isBatchLink.value ? '批量关联排班' : '关联排班'
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// 表格勾选变化
|
|
|
|
|
@ -413,34 +421,47 @@
|
|
|
|
|
selectedDevice.value = []
|
|
|
|
|
DevicedialogVisible.value = true
|
|
|
|
|
selectedItemInfo.value.id = row.id
|
|
|
|
|
row.devicesInfo.forEach(function(v, i) {
|
|
|
|
|
deviceList.value.forEach(function(v2, i2) {
|
|
|
|
|
if (v.id == v2.id) {
|
|
|
|
|
selectedDevice.value.push(v.id)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
//根据 hisExecDepts 获取设备列表
|
|
|
|
|
GetEnableDeviceList({ hisExecDepts: row.hisExecDepts }).then(res => {
|
|
|
|
|
if (res.status) {
|
|
|
|
|
deviceList.value = res.data
|
|
|
|
|
}
|
|
|
|
|
// 设备列表更新后,再初始化已选设备
|
|
|
|
|
if (row.devicesInfo && row.devicesInfo.length > 0) {
|
|
|
|
|
row.devicesInfo.forEach(function(v) {
|
|
|
|
|
if (deviceList.value.find(function(d) { return d.id == v.id })) {
|
|
|
|
|
selectedDevice.value.push(v.id)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 批量关联检查室
|
|
|
|
|
// 批量关联排班
|
|
|
|
|
const BatchLinkDevice = () => {
|
|
|
|
|
if (selectedCheckItems.value.length === 0) {
|
|
|
|
|
ElMessage.error('请先勾选要批量关联的检查项目')
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
isBatchLink.value = true
|
|
|
|
|
// 计算所有勾选项目的共有检查室
|
|
|
|
|
let common = []
|
|
|
|
|
if (selectedCheckItems.value.length > 0) {
|
|
|
|
|
common = selectedCheckItems.value[0].devicesInfo.map(d => d.id)
|
|
|
|
|
for (let i = 1; i < selectedCheckItems.value.length; i++) {
|
|
|
|
|
const ids = selectedCheckItems.value[i].devicesInfo.map(d => d.id)
|
|
|
|
|
common = common.filter(id => ids.includes(id))
|
|
|
|
|
// 取第一个项目的 hisExecDepts 进行过滤
|
|
|
|
|
const hisExecDepts = selectedCheckItems.value[0].hisExecDepts
|
|
|
|
|
GetEnableDeviceList({ hisExecDepts: hisExecDepts }).then(res => {
|
|
|
|
|
if (res.status) {
|
|
|
|
|
deviceList.value = res.data
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
selectedDevice.value = common
|
|
|
|
|
DevicedialogVisible.value = true
|
|
|
|
|
// 设备列表更新后,再计算共有排班
|
|
|
|
|
let common = []
|
|
|
|
|
if (selectedCheckItems.value.length > 0) {
|
|
|
|
|
common = selectedCheckItems.value[0].devicesInfo.map(d => d.id)
|
|
|
|
|
for (let i = 1; i < selectedCheckItems.value.length; i++) {
|
|
|
|
|
const ids = selectedCheckItems.value[i].devicesInfo.map(d => d.id)
|
|
|
|
|
common = common.filter(id => ids.includes(id))
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
selectedDevice.value = common
|
|
|
|
|
DevicedialogVisible.value = true
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let selectedDevice = ref([]) //选中的设备
|
|
|
|
|
|