二次确认
This commit is contained in:
@@ -74,6 +74,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import { confirmAction } from '@/utils/utils.js'
|
||||
import {getNextRegions, selectMaterials, blanking} from '@/utils/getData4.js'
|
||||
export default {
|
||||
components: {
|
||||
@@ -229,14 +230,22 @@
|
||||
this.val1 = ''
|
||||
this.index = ''
|
||||
this.dataList = []
|
||||
this.pkId = ''
|
||||
this.pkObj = {}
|
||||
this.currentData = {}
|
||||
this.disabled = false
|
||||
},
|
||||
async handleConfirm() {
|
||||
if (!this.val1 || !this.dataList.length || !this.index) {
|
||||
return
|
||||
}
|
||||
const isConfirmed = await confirmAction("确认操作", "确定要执行此操作吗?")
|
||||
if (isConfirmed) {
|
||||
this._blanking()
|
||||
}
|
||||
},
|
||||
async _blanking () {
|
||||
this.disabled = true
|
||||
if (!this.val1 || !this.dataList.length || !this.index) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await blanking(this.val1, this.dataList, this.index)
|
||||
if (res.code === '200') {
|
||||
|
||||
Reference in New Issue
Block a user