diff --git a/src/views/business/measure/item/list.vue b/src/views/business/measure/item/list.vue
index 982608a..1dab9ef 100644
--- a/src/views/business/measure/item/list.vue
+++ b/src/views/business/measure/item/list.vue
@@ -357,15 +357,41 @@
}
}
+const tableRef = ref()
+
// 清除检定项配置
const cleanConfig = () => {
if (!checkoutList.value.length) {
ElMessage.warning('请选中数据')
return false
}
- clearConfig({ ids: checkoutList.value.map(item => item.id) }).then(() => {
- ElMessage.warning('清除检定项配置成功')
- })
+ ElMessageBox.confirm(
+ '确认清除检定项配置吗?',
+ '提示',
+ {
+ confirmButtonText: '确认',
+ cancelButtonText: '取消',
+ type: 'warning',
+ },
+ )
+ .then(() => {
+ const ids = checkoutList.value.filter(e => e.id).map(item => item.id)
+ if (ids.length) {
+ clearConfig({ ids }).then(() => {
+ ElMessage.success('清除检定项配置成功')
+ fetchData(true)
+ nextTick(() => {
+ tableRef.value.clearMulti()
+ })
+ })
+ }
+ else {
+ ElMessage.warning('选中的数据均为配置检定项, 不必清除')
+ nextTick(() => {
+ tableRef.value.clearMulti()
+ })
+ }
+ })
}
// 匹配设备名称输入建议
@@ -570,6 +596,7 @@