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