|
@@ -505,17 +505,22 @@ const tableFileColumn = ref([
|
|
|
]);
|
|
|
const tableFileData = ref([]);
|
|
|
const tableDelButton = (index) => {
|
|
|
- window?.$messageBox?.alert('确定删除该文件吗?', '删除提醒', {
|
|
|
- type: 'warning',
|
|
|
- showCancelButton: true,
|
|
|
- confirmButtonText: '确定删除',
|
|
|
- cancelButtonText: '取消',
|
|
|
- callback: (action) => {
|
|
|
- if (action === 'confirm') {
|
|
|
- tableFileData.value.splice(index, 1)
|
|
|
+ const arr = tableFileData.value
|
|
|
+ if (arr.length > 1) {
|
|
|
+ window?.$messageBox?.alert('确定删除该文件吗?', '删除提醒', {
|
|
|
+ type: 'warning',
|
|
|
+ showCancelButton: true,
|
|
|
+ confirmButtonText: '确定删除',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ callback: (action) => {
|
|
|
+ if (action === 'confirm') {
|
|
|
+ tableFileData.value.splice(index, 1)
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- })
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ window?.$message?.warning('至少保留一个文件')
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
//填报数据保存
|