From 90e34584ec0b26b70c70f4e1917a0550362692cf Mon Sep 17 00:00:00 2001 From: g7hoo Date: Wed, 10 Aug 2022 14:12:23 +0800 Subject: [PATCH] =?UTF-8?q?hint=20DELETE=E6=8E=A5=E5=8F=A3=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E5=8A=A0=E4=B8=8Aapplication/json=E5=A4=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/monitoring/product.vue | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/views/modules/monitoring/product.vue b/src/views/modules/monitoring/product.vue index 22e394e..af57a4d 100644 --- a/src/views/modules/monitoring/product.vue +++ b/src/views/modules/monitoring/product.vue @@ -54,7 +54,7 @@ - + @@ -73,7 +73,7 @@ const ProductTypeDictTypeId = '1557179530308616193' const tableConfigs = [ { type: 'index', name: '序号' }, { prop: 'updateTime', name: '添加时间', filter: val => (val ? moment(val).format('YYYY-MM-DD hh:mm:ss') : '-') }, - { prop: 'name', name: '产品名称'}, + { prop: 'name', name: '产品名称' }, { prop: 'code', name: '产品编码' }, { prop: 'specifications', name: '规格' }, { prop: 'unitDictValue', name: '单位', filter: dictFilter(UnitDictTypeId) }, @@ -264,10 +264,11 @@ export default { }, // 删除 deleteHandle(id) { + console.log('id is: ', id) var ids = id ? [id] - // ? [1556817256347828335] - : this.dataListSelections.map(item => { + : // ? [1556817256347828335] + this.dataListSelections.map(item => { return item.id }) this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', { @@ -278,6 +279,9 @@ export default { this.$http({ url: this.$http.adornUrl('/monitoring/product'), method: 'delete', + headers: { + 'Content-Type': 'application/json' + }, data: this.$http.adornData(ids, false) }).then(({ data }) => { if (data && data.code === 0) {