This commit is contained in:
parent
f3315db76a
commit
9a9a6aa9c4
|
|
@ -572,24 +572,44 @@ export default {
|
|||
* 设计决策:使用 unSendPersonIds 作为提交参数,因为表单绑定的是该字段
|
||||
*/
|
||||
handleSendDownSubmit() {
|
||||
this.$refs.sendDownFormRef.validate((valid) => {
|
||||
if (valid) {
|
||||
const params = {
|
||||
deviceCode: this.macNo,
|
||||
workerIds: this.sendDownFormData.unSendPersonIds,
|
||||
}
|
||||
sendDownAPI(params)
|
||||
.then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.$modal.msgSuccess('下发成功')
|
||||
this.handleCloseSendDownDialog()
|
||||
// this.handleRefresh()
|
||||
this.getTableList()
|
||||
}
|
||||
})
|
||||
.catch(() => {})
|
||||
if (this.sendDownFormData.sentPersonIds.length > 0) {
|
||||
const params = {
|
||||
deviceCode: this.macNo,
|
||||
workerIds: [
|
||||
...this.sendDownFormData.sentPersonIds,
|
||||
...this.sendDownFormData.unSendPersonIds,
|
||||
],
|
||||
}
|
||||
})
|
||||
sendDownAPI(params)
|
||||
.then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.$modal.msgSuccess('下发成功')
|
||||
this.handleCloseSendDownDialog()
|
||||
// this.handleRefresh()
|
||||
this.getTableList()
|
||||
}
|
||||
})
|
||||
.catch(() => {})
|
||||
} else {
|
||||
this.$refs.sendDownFormRef.validate((valid) => {
|
||||
if (valid) {
|
||||
const params = {
|
||||
deviceCode: this.macNo,
|
||||
workerIds: this.sendDownFormData.unSendPersonIds,
|
||||
}
|
||||
sendDownAPI(params)
|
||||
.then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.$modal.msgSuccess('下发成功')
|
||||
this.handleCloseSendDownDialog()
|
||||
// this.handleRefresh()
|
||||
this.getTableList()
|
||||
}
|
||||
})
|
||||
.catch(() => {})
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
// 关闭配置弹框
|
||||
handleCloseConfigDialog() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue