Browse Source

检验批量删除文件

wms3.0_pda
lijuncheng 10 months ago
parent
commit
5af52b9d26
  1. 13
      api/request2.js
  2. 22
      pages/inspect/job/inspectDetail.vue
  3. 23
      pages/inspect/job/inspectFullDetail.vue

13
api/request2.js

@ -3550,6 +3550,19 @@ export function deleteFileById(id) {
});
}
/**
* 删除文件(多个文件)
* @param {*}
*
*/
export function deleteFileByTable(tableName, tableId) {
return request({
url: baseApi + "/infra/file/deleteByTable?tableName=" + tableName + "&tableId=" + tableId,
method: "delete",
data: {},
});
}
/**
* 获取文件列表

22
pages/inspect/job/inspectDetail.vue

@ -40,8 +40,8 @@
cancleTakeInspectJob,
getInspectJobDetail,
inspectJobSubmit,
deleteFileById,
getFileList
getFileList,
deleteFileByTable
} from '@/api/request2.js';
import {
goHome,
@ -147,25 +147,15 @@
},
methods: {
deleteFileById(id) {
deleteFileById(id).then(res => {
})
},
getFileList(id) {
getFileList("jobInspectDetail", id).then(res => {
if (res.data) {
res.data.forEach(res => {
this.deleteFileById(res.id)
})
}
deleteFileByTable(id) {
debugger
deleteFileByTable("jobInspectDetail", id).then(res=>{
})
},
clearPicList(subList) {
subList.forEach(item => {
this.getFileList(item.id)
this.deleteFileByTable(item.id)
})
},

23
pages/inspect/job/inspectFullDetail.vue

@ -41,7 +41,8 @@
getInspectJobDetail,
inspectJobSubmit,
deleteFileById,
getFileList
getFileList,
deleteFileByTable
} from '@/api/request2.js';
import {
goHome,
@ -151,27 +152,17 @@
},
methods: {
deleteFileById(id) {
deleteFileById(id).then(res => {
deleteFileByTable(id) {
deleteFileByTable("jobInspectDetail", id).then(res=>{
})
},
getFileList(id) {
getFileList("jobInspectDetail", id).then(res => {
if (res.data) {
res.data.forEach(res => {
this.deleteFileById(res.id)
})
}
})
},
clearPicList(subList) {
subList.forEach(item => {
this.getFileList(item.id)
this.deleteFileByTable(item.id)
})
},
//
receive(callback) {
uni.showLoading({

Loading…
Cancel
Save