|
|
|
|
@ -35,6 +35,8 @@
|
|
|
|
|
<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="openBatchNotice('check_notice')" style="margin-left: 10px;">批量设置检查须知</el-button>
|
|
|
|
|
<el-button type="primary" @click="openBatchNotice('warm_tips')" style="margin-left: 10px;">批量设置温馨提示</el-button>
|
|
|
|
|
<el-button type="success" @click="ExportItemList()" style="margin-left: 10px;">导出</el-button>
|
|
|
|
|
</el-row>
|
|
|
|
|
</div>
|
|
|
|
|
@ -55,7 +57,7 @@
|
|
|
|
|
<el-tag v-if="scope.row.limosis==0" class="ml-2" type="success">否</el-tag>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="check_notice" label="检查须知" />
|
|
|
|
|
<el-table-column prop="check_notice" label="检查须知" v-if="false" />
|
|
|
|
|
<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="关联排班">
|
|
|
|
|
@ -132,7 +134,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="row"><span class="title">检查须知:</span><el-input v-model="selectedItemInfo.check_notice"
|
|
|
|
|
type="textarea" placeholder="请输入检查须知" style=" width: 500px;" /></div>
|
|
|
|
|
type="textarea" placeholder="请输入检查须知" style="width: 500px;" :rows="8" /></div>
|
|
|
|
|
|
|
|
|
|
<div class="row"><span class="title">温馨提示:</span><el-input v-model="selectedItemInfo.warm_tips"
|
|
|
|
|
type="textarea" placeholder="请输入温馨提示" style="width: 500px;" :rows="8" /></div>
|
|
|
|
|
|
|
|
|
|
<template #footer>
|
|
|
|
|
<span class="dialog-footer">
|
|
|
|
|
@ -143,6 +148,14 @@
|
|
|
|
|
</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
<el-dialog v-model="batchNoticeDialogVisible" :title="batchNoticeTitle" width="40%">
|
|
|
|
|
<el-input v-model="batchNoticeValue" type="textarea" placeholder="请输入内容"
|
|
|
|
|
style="width: 100%;" :rows="8" />
|
|
|
|
|
<template #footer>
|
|
|
|
|
<el-button @click="batchNoticeDialogVisible = false">取消</el-button>
|
|
|
|
|
<el-button type="primary" @click="saveBatchNotice">确定</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
<el-dialog v-model="HuChiDialogVisible" :title="'为 '+SelectedHuChiItemInfo.name+' 设置互斥'" width="80%">
|
|
|
|
|
请输入想要与 <span style="font-weight: 900;font-size: 16px;">{{SelectedHuChiItemInfo.name}}</span> 互斥的项目名称
|
|
|
|
|
|
|
|
|
|
@ -292,6 +305,7 @@
|
|
|
|
|
ItemBindDevice,
|
|
|
|
|
GetYuYueTypes,
|
|
|
|
|
SaveItemInfo,
|
|
|
|
|
BatchUpdateNotice,
|
|
|
|
|
SetHuChi,
|
|
|
|
|
DelHuChi,
|
|
|
|
|
GetHuChiList,
|
|
|
|
|
@ -327,7 +341,8 @@
|
|
|
|
|
reservation_method: '',
|
|
|
|
|
check_time: '',
|
|
|
|
|
check_begin_time: '',
|
|
|
|
|
check_notice: ''
|
|
|
|
|
check_notice: '',
|
|
|
|
|
warm_tips: ''
|
|
|
|
|
})
|
|
|
|
|
//获取检查项目类别list
|
|
|
|
|
let BigClassList = ref([]);
|
|
|
|
|
@ -412,6 +427,10 @@
|
|
|
|
|
let DevicedialogVisible = ref(false); //关联设备弹窗
|
|
|
|
|
let ItemDialogVisible = ref(false); //编辑项目弹窗
|
|
|
|
|
let isBatchLink = ref(false) //是否批量关联模式
|
|
|
|
|
let batchNoticeDialogVisible = ref(false)
|
|
|
|
|
let batchNoticeField = ref('')
|
|
|
|
|
let batchNoticeTitle = ref('')
|
|
|
|
|
let batchNoticeValue = ref('')
|
|
|
|
|
let selectedCheckItems = ref([]) //勾选的检查项目
|
|
|
|
|
let checkItemTableRef = ref(null) //表格ref
|
|
|
|
|
|
|
|
|
|
@ -550,6 +569,55 @@
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const openBatchNotice = (field) => {
|
|
|
|
|
if (selectedCheckItems.value.length === 0) {
|
|
|
|
|
ElMessage.error('请先勾选要批量设置的检查项目')
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
batchNoticeField.value = field
|
|
|
|
|
batchNoticeTitle.value = field === 'check_notice' ? '批量设置检查须知' : '批量设置温馨提示'
|
|
|
|
|
|
|
|
|
|
const valueMap = {}
|
|
|
|
|
selectedCheckItems.value.forEach(row => {
|
|
|
|
|
const val = (row[field] || '').trim()
|
|
|
|
|
if (val) {
|
|
|
|
|
valueMap[val] = (valueMap[val] || 0) + 1
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
let maxCount = 0
|
|
|
|
|
let mostValue = ''
|
|
|
|
|
Object.entries(valueMap).forEach(([val, count]) => {
|
|
|
|
|
if (count > maxCount) {
|
|
|
|
|
maxCount = count
|
|
|
|
|
mostValue = val
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
batchNoticeValue.value = mostValue
|
|
|
|
|
batchNoticeDialogVisible.value = true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const saveBatchNotice = () => {
|
|
|
|
|
const ids = selectedCheckItems.value.map(row => row.id)
|
|
|
|
|
loading.value = true
|
|
|
|
|
BatchUpdateNotice({
|
|
|
|
|
item_ids: ids,
|
|
|
|
|
field: batchNoticeField.value,
|
|
|
|
|
value: batchNoticeValue.value
|
|
|
|
|
}).then(res => {
|
|
|
|
|
loading.value = false
|
|
|
|
|
if (res.status) {
|
|
|
|
|
batchNoticeDialogVisible.value = false
|
|
|
|
|
ElMessage.success(res.msg)
|
|
|
|
|
GetItemList()
|
|
|
|
|
} else {
|
|
|
|
|
ElMessage.error(res.msg)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//获取可用设备列表
|
|
|
|
|
let deviceList = ref([])
|
|
|
|
|
const GetDeviceList = () => {
|
|
|
|
|
@ -575,6 +643,7 @@
|
|
|
|
|
}
|
|
|
|
|
selectedItemInfo.value.check_begin_time = row.check_begin_time
|
|
|
|
|
selectedItemInfo.value.check_notice = row.check_notice
|
|
|
|
|
selectedItemInfo.value.warm_tips = row.warm_tips
|
|
|
|
|
}
|
|
|
|
|
//获取预约方式类型
|
|
|
|
|
let yuyueType = ref('')
|
|
|
|
|
|