|
|
|
|
@ -32,6 +32,8 @@
|
|
|
|
|
</div>
|
|
|
|
|
<el-button type="primary" @click="GetItemList()" 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-row>
|
|
|
|
|
</div>
|
|
|
|
|
<el-table ref="checkItemTableRef" :data="tableData" style="width: 100%; margin-top: 10px;" row-key="id" @sort-change="onSortChange" @selection-change="onSelectionChange">
|
|
|
|
|
@ -45,7 +47,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="关联排班">
|
|
|
|
|
@ -118,7 +120,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">
|
|
|
|
|
@ -251,6 +256,14 @@
|
|
|
|
|
<el-button type="primary" @click="SaveRulesFunc">保存</el-button>
|
|
|
|
|
</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>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
@ -272,7 +285,8 @@
|
|
|
|
|
GetHuChiList,
|
|
|
|
|
GetCheckItemList,
|
|
|
|
|
GetCheckItemRules,
|
|
|
|
|
SaveCheckItemRules
|
|
|
|
|
SaveCheckItemRules,
|
|
|
|
|
DeptBatchUpdateNotice
|
|
|
|
|
} from '@/api/api.js'
|
|
|
|
|
import {
|
|
|
|
|
ElMessage,
|
|
|
|
|
@ -300,7 +314,8 @@
|
|
|
|
|
reservation_method: '',
|
|
|
|
|
check_time: '',
|
|
|
|
|
check_begin_time: '',
|
|
|
|
|
check_notice: ''
|
|
|
|
|
check_notice: '',
|
|
|
|
|
warm_tips: ''
|
|
|
|
|
})
|
|
|
|
|
//获取检查项目类别list
|
|
|
|
|
let BigClassList = ref([]);
|
|
|
|
|
@ -382,6 +397,10 @@
|
|
|
|
|
let isBatchLink = ref(false) //是否批量关联模式
|
|
|
|
|
let selectedCheckItems = ref([]) //勾选的检查项目
|
|
|
|
|
let checkItemTableRef = ref(null) //表格ref
|
|
|
|
|
let batchNoticeDialogVisible = ref(false)
|
|
|
|
|
let batchNoticeField = ref('')
|
|
|
|
|
let batchNoticeTitle = ref('')
|
|
|
|
|
let batchNoticeValue = ref('')
|
|
|
|
|
|
|
|
|
|
// 计算链接对话框标题
|
|
|
|
|
const linkDialogTitle = computed(() => {
|
|
|
|
|
@ -393,6 +412,55 @@
|
|
|
|
|
selectedCheckItems.value = rows
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 打开批量设置弹窗
|
|
|
|
|
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
|
|
|
|
|
DeptBatchUpdateNotice({
|
|
|
|
|
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)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//点击打开设备穿梭框
|
|
|
|
|
const LinkDeviceClick = (row) => {
|
|
|
|
|
isBatchLink.value = false
|
|
|
|
|
@ -524,6 +592,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('')
|
|
|
|
|
|