diff --git a/src/views/work/resource/index.vue b/src/views/work/resource/index.vue index 3d2a709..63e5570 100644 --- a/src/views/work/resource/index.vue +++ b/src/views/work/resource/index.vue @@ -299,11 +299,12 @@ export default { }, removeMaterial() { + let materialId = this.dataList[this.indexSelect].id if (this.indexSelect === 0) { return } else { - this.$modal.confirm('是否确认删除钽靶编号为"' + this.dataList[this.indexSelect].id + '"的数据项?').then(function () { - return deleteMaterial(this.dataList[this.indexSelect].id) + this.$modal.confirm('是否确认删除钽靶编号为"' + materialId + '"的数据项?').then(function () { + return deleteMaterial(materialId) }).then(() => { this.getDataList() this.$modal.msgSuccess("删除成功");