From 3411f5df0053107acac59b93f78114e7f7b959c3 Mon Sep 17 00:00:00 2001
From: xy <271556543@qq.com>
Date: Fri, 17 Jan 2025 09:36:26 +0800
Subject: [PATCH] =?UTF-8?q?=E7=9F=AD=E4=BF=A1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/flow/components/assign.vue | 26 ++++++++++++++++++++++++--
1 file changed, 24 insertions(+), 2 deletions(-)
diff --git a/src/views/flow/components/assign.vue b/src/views/flow/components/assign.vue
index 25b7d0c..023edce 100644
--- a/src/views/flow/components/assign.vue
+++ b/src/views/flow/components/assign.vue
@@ -47,7 +47,7 @@
-
承办人员
+
承办人员
(是否短信通知)
@@ -57,7 +57,10 @@
{{ group.name }}
-
{{ user.name }}
+
+ {{ user.name }}
+ smsUserChange(e, user.id)">
+
@@ -144,11 +147,13 @@ export default {
cc_users: [],
user_id: [],
next_node_id: "",
+ sms_config: []
},
node: {},
node2Users: new Map(),
pickUsers: [],
+ smsUsers: [],
shareConfig: {},
ccIsIndeterminate: false,
@@ -156,6 +161,11 @@ export default {
};
},
methods: {
+ smsUserChange(e, id) {
+ let index = this.smsUsers.indexOf(id)
+ index === -1 ? this.smsUsers.push(id) : this.smsUsers.splice(index, 1)
+ },
+
nodePick() {
this.pickUsers = this.node2Users.get(this.form.next_node_id)
this.form.user_id = ''
@@ -244,6 +254,18 @@ export default {
this.$router.push("/flow/list/handled");
}
} else {
+ if (typeof this.form.user_id === 'number') {
+ this.form.sms_config = [
+ {
+ [this.form.user_id]: (this.smsUsers.indexOf(this.form.user_id) !== -1) ? 1 : 0
+ }
+ ]
+ } else {
+ this.form.sms_config = this.form.user_id.map(id => ({
+ [id]: (this.smsUsers.indexOf(id) !== -1) ? 1 : 0
+ }))
+ }
+ // this.form.sms_config = this.form.user_id
if (this.multiple) {
await Promise.all(this.multipleIds.map(i => assign(i, this.form)))
} else {