This commit is contained in:
BianLzhaoMin 2025-12-29 16:43:14 +08:00
parent f3315db76a
commit 9a9a6aa9c4
1 changed files with 37 additions and 17 deletions

View File

@ -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() {