From ee2882cff02d3545b66c7591f88ed4800f730a9a Mon Sep 17 00:00:00 2001 From: spring <2396852758@qq.com> Date: 星期三, 21 五月 2025 10:00:17 +0800 Subject: [PATCH] 消息通知数据自动筛选 --- src/components/do/a6-personnel-collect/personnel-list.vue | 34 +++++++++++++++++++++++++++------- 1 files changed, 27 insertions(+), 7 deletions(-) diff --git a/src/components/do/a6-personnel-collect/personnel-list.vue b/src/components/do/a6-personnel-collect/personnel-list.vue index 57330cf..c0317c7 100644 --- a/src/components/do/a6-personnel-collect/personnel-list.vue +++ b/src/components/do/a6-personnel-collect/personnel-list.vue @@ -243,7 +243,7 @@ }) .then(() => { this.$axios - .post(this.$api.user.delUserDepardLimsId + '?id=' + row.id) + .post(this.$api.user.delUserDepardLimsId + '?id=' + row.userId) .then(res => { if (res.code === 201) { return; @@ -320,13 +320,33 @@ if (res.code === 201) { return; } - this.$message.success('涓嬭浇鎴愬姛') const blob = new Blob([res],{ type: 'application/octet-stream' }); - const url = URL.createObjectURL(blob); - const link = document.createElement('a'); - link.href = url; - link.download = '浜哄憳淇℃伅.xlsx'; - link.click(); + //灏咮lob 瀵硅薄杞崲鎴愬瓧绗︿覆 + let reader = new FileReader(); + reader.readAsText(blob, 'utf-8'); + reader.onload = () => { + try { + let result = JSON.parse(reader.result); + if (result.message) { + this.$message.error(result.message); + } else { + const url = URL.createObjectURL(blob); + const link = document.createElement('a'); + link.href = url; + link.download = '浜哄憳淇℃伅.xlsx'; + link.click(); + this.$message.success('瀵煎嚭鎴愬姛') + } + } catch (err) { + console.log(err); + const url = URL.createObjectURL(blob); + const link = document.createElement('a'); + link.href = url; + link.download = '浜哄憳淇℃伅.xlsx'; + link.click(); + this.$message.success('瀵煎嚭鎴愬姛') + } + } }); }, downPerson(row){ -- Gitblit v1.9.3