From 9a9a6aa9c4094d75fe893dfc721f5dcb60d2da88 Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Mon, 29 Dec 2025 16:43:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../face-query/components/rightTable.vue | 54 +++++++++++++------ 1 file changed, 37 insertions(+), 17 deletions(-) diff --git a/src/views/construction-person/face-query/components/rightTable.vue b/src/views/construction-person/face-query/components/rightTable.vue index df7146a..3ae99c8 100644 --- a/src/views/construction-person/face-query/components/rightTable.vue +++ b/src/views/construction-person/face-query/components/rightTable.vue @@ -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() {