From 87b6892d39cdc71a9a5f2b4e9d4180b0e1212115 Mon Sep 17 00:00:00 2001 From: guoxing <1369478551@qq.com> Date: Tue, 7 Nov 2023 13:40:08 +0800 Subject: [PATCH] 2023-11-7 --- supervise-crm-ui/.env.development | 2 +- supervise-crm-ui/public/image/link.png | Bin 0 -> 1302 bytes supervise-crm-ui/public/image/unlink.png | Bin 0 -> 1662 bytes supervise-crm-ui/src/main.js | 6 +- .../src/views/WechatPush/index.vue | 178 ++++++++++++------ .../src/views/projectSet/WechatPush/index.vue | 42 ++++- .../views/projectSet/projectStaff/index.vue | 83 +++++++- .../src/views/projectStaff/index.vue | 112 +++++++++-- supervise-report-ui/src/main.js | 25 ++- 9 files changed, 353 insertions(+), 95 deletions(-) create mode 100644 supervise-crm-ui/public/image/link.png create mode 100644 supervise-crm-ui/public/image/unlink.png diff --git a/supervise-crm-ui/.env.development b/supervise-crm-ui/.env.development index 3fce6f21..c292d031 100644 --- a/supervise-crm-ui/.env.development +++ b/supervise-crm-ui/.env.development @@ -5,5 +5,5 @@ ENV = 'development' VUE_APP_BASE_API = '/api' ## 配置测试和本地开发时的 接口地址 -VUE_APP_URL = "http://192.168.1.103:7004" +VUE_APP_URL = "http://192.168.1.104:7004" ##VUE_APP_URL = "http://8.130.39.13:8112" diff --git a/supervise-crm-ui/public/image/link.png b/supervise-crm-ui/public/image/link.png new file mode 100644 index 0000000000000000000000000000000000000000..5eff8421732a1b1f21bc081cfa2bf83c95055ee9 GIT binary patch literal 1302 zcmcK4{Ug%}0LSs~+&CPO!rgG#VRw%)?^0s}tq1^8B!wxum9y4Tt6;4tHjR zn{_xg&xP1|DCX%5W7^CTj&x0ya(_fWeBQ7B;6wIBx+^O}6afHGMtHzc2ZsMYdAWlo zEI&XW0K%f&&jF0*+F}3zk0IbL=#;DLWg&4#PO1_I=RB?O5pY`tF(M)!bQl$&AR9N1 zq13=a{BC9)t?Oqam>HDvZ&KI8DV_WLFL?`Fdn>bHn`iR=z2OPEVFCfW0->#wA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|;Z)_aj>^LV_55e>E||3fL8}f> z{VAoDR0*VaU3p9ND71=!glF)mazolx3j`1FVTou6jNsBq=wK!G0|Go;I!`gbsx1Vx zlB|KfdLR~xr-Gd~A5kFI&p1B7ob(%Ds5?_2BTe-;NU--DG-UaGPG478I&v; zLV-xMm7%Qy$)IG(5DG-1tqg4yNCqWKhEO09ZDnYyKr$#
关联人员
-
- + 为已绑定微信公众号人员 -
+
-->
+ :default-checked-keys="uploadData.users" :default-expand-all="true" + :default-expanded-keys="defaultExpandedKeys" @node-click="handleNodeClick">
{{ node.label }}
-
+
- 微信名称 + 关联微信
-
- - + +
-
-
-
微信推送
+
+ +
微信推送设置
+ {{Wxtitle}} +
+ +
保存 + @click="saveData()" v-show="sysorganList2.length>0">保存
@@ -201,6 +185,9 @@ ValSids: [], sysorganList: [], sysorganList2: [], + defaultExpandedKeys: [], // 默认展开 + Wxtitle: '', + Wxstate: false } }, watch: { @@ -238,12 +225,24 @@ } }, loadList() { - req.projectinformation().then(res => { - if (res.success) { - this.formobj = res.data + req.projectinformation().then(resp => { + if (resp.success) { + this.formobj = resp.data + console.log("projectinformation", resp.data) - req.associationUserList(res.data[0].sid).then(res => { + req.associationUserList(resp.data[0].sid).then(res => { + console.log("associationUserList", res.data) this.sysorganList = res.data + + this.defaultExpandedKeys = [] + this.sysorganList.forEach(item => { + this.defaultExpandedKeys.push(item.sid) + item.children.forEach(channel => { + this.defaultExpandedKeys.push(channel.sid) + }) + }) + + console.log("sysorganList", this.sysorganList) // this.uploadData.userProjectSid = res.data[0].sid // req.templateMessage(this.dataListOne[0].sid).then(res => { @@ -266,26 +265,41 @@ }, singleElection(row) { - console.log("aaaaaaaaaa", row) - this.uploadData.userProjectSid = row.sid + console.log("aaaaaaaaaa", row) + this.Wxtitle ='' + this.Wxstate=false + this.sysorganList2=[] + req.associationUserList(row.sid).then(res => { + console.log("associationUserList", row.data) this.sysorganList = res.data - this.sysorganList2 = [] + + this.defaultExpandedKeys = [] + this.sysorganList.forEach(item => { + this.defaultExpandedKeys.push(item.sid) + item.children.forEach(channel => { + this.defaultExpandedKeys.push(channel.sid) + }) + }) + + console.log("sysorganList", this.sysorganList) + // this.uploadData.userProjectSid = res.data[0].sid - // req.templateMessage(this.dataListOne[0].sid).then(res => { + // req.templateMessage(res.data[0].sid).then(res => { // if (res.success) { - // this.sysorganList = res.data + // this.sysorganList2 = res.data // //this.Array为数组名 - // this.sysorganList.forEach(item => { + // this.sysorganList2.forEach(item => { // this.$set(item, 'Show', true) - // }) + // }) // } // }) + }) }, singleElection2(row) { @@ -299,7 +313,13 @@ this.$set(item, 'Show', true) + if (item.state == '2') { + count++ + } + }) + + this.Wxstate = count == this.sysorganList2.length } }) @@ -318,12 +338,24 @@ item.Show = !item.Show console.log("aaaaaaaaaa", item) }, - titlecheckbox(id, info) { - console.log("aaaaaaaaaa", id) - console.log("aaaaaaaaaa", info) + Wxtitlecheckbox(checked) { + console.log("Wxtitlecheckbox", checked) + + this.sysorganList2.forEach(item => { + + this.$set(item, 'state', checked ? "2" : '1') + item.list.forEach(item => { + this.$set(item, 'state', checked ? "2" : '1') + }) + }) + + }, + titlecheckbox(id, info) { + console.log("aaaaaaaaaa", id) + console.log("aaaaaaaaaa", info) const item = this.sysorganList2.find((item => item.id == id)) @@ -335,8 +367,17 @@ }) + var count = 0 + this.sysorganList2.forEach(item => { - console.log("aaaaaaaaaa", item) + if (item.state == '2') { + count++ + } + + }) + + console.log("count", count) + this.Wxstate = count == this.sysorganList2.length }, @@ -363,6 +404,20 @@ console.log("aaaaaaaaaa", newList.length) this.sysorganList2[index].state = count == newList.length ? "2" : "1" + var count2 = 0 + + this.sysorganList2.forEach(item => { + + if (item.state == '2') { + count2++ + } + + }) + + console.log("count", count) + this.Wxstate = count2 == this.sysorganList2.length + + }, saveData() { @@ -400,6 +455,8 @@ console.log("aaaaaaaaaa", val) + this.Wxtitle = " - " + val.name+" - " + val.orgAllName + console.log("aaaaaaaaaa", num) @@ -410,12 +467,23 @@ req.templateMessage(userProjectSid).then(res => { if (res.success) { this.sysorganList2 = res.data + + var count = 0 + //this.Array为数组名 this.sysorganList2.forEach(item => { this.$set(item, 'Show', true) + if (item.state == '2') { + count++ + } + }) + + console.log("count", count) + this.Wxstate = count == this.sysorganList2.length + } }) } @@ -511,4 +579,4 @@ ::v-deep .el-collapse-item__content { padding-bottom: 0; } - \ No newline at end of file + diff --git a/supervise-crm-ui/src/views/projectSet/WechatPush/index.vue b/supervise-crm-ui/src/views/projectSet/WechatPush/index.vue index 4c758d53..0ea7931d 100644 --- a/supervise-crm-ui/src/views/projectSet/WechatPush/index.vue +++ b/supervise-crm-ui/src/views/projectSet/WechatPush/index.vue @@ -18,7 +18,8 @@
关联人员
- + 为已绑定微信公众号人员
@@ -26,9 +27,8 @@
+ :default-checked-keys="uploadData.users" :default-expand-all="true" + :default-expanded-keys="defaultExpandedKeys" @node-click="handleNodeClick">
@@ -39,13 +39,14 @@ - 微信名称 + 关联微信
- + 正在完善 @@ -200,6 +201,7 @@ ValSids: [], sysorganList: [], sysorganList2: [], + defaultExpandedKeys: [] // 默认展开 } }, watch: { @@ -243,6 +245,16 @@ req.associationUserList(res.data[0].sid).then(res => { this.sysorganList = res.data + + this.defaultExpandedKeys = [] + this.sysorganList.forEach(item => { + this.defaultExpandedKeys.push(item.sid) + item.children.forEach(channel => { + this.defaultExpandedKeys.push(channel.sid) + }) + }) + + console.log("sysorganList", this.sysorganList) // this.uploadData.userProjectSid = res.data[0].sid // req.templateMessage(this.dataListOne[0].sid).then(res => { @@ -266,25 +278,35 @@ }, singleElection(row) { console.log("aaaaaaaaaa", row) - this.uploadData.userProjectSid = row.sid req.associationUserList(row.sid).then(res => { this.sysorganList = res.data + this.defaultExpandedKeys = [] + this.sysorganList.forEach(item => { + this.defaultExpandedKeys.push(item.sid) + item.children.forEach(channel => { + this.defaultExpandedKeys.push(channel.sid) + }) + }) + + console.log("sysorganList", this.sysorganList) + this.uploadData.userProjectSid = res.data[0].sid req.templateMessage(this.dataListOne[0].sid).then(res => { if (res.success) { - this.sysorganList = res.data + this.sysorganList2 = res.data //this.Array为数组名 - this.sysorganList.forEach(item => { + this.sysorganList2.forEach(item => { this.$set(item, 'Show', true) - }) + }) } }) + }) }, singleElection2(row) { diff --git a/supervise-crm-ui/src/views/projectSet/projectStaff/index.vue b/supervise-crm-ui/src/views/projectSet/projectStaff/index.vue index 41116d63..41e6ff44 100644 --- a/supervise-crm-ui/src/views/projectSet/projectStaff/index.vue +++ b/supervise-crm-ui/src/views/projectSet/projectStaff/index.vue @@ -30,7 +30,8 @@
{ if (res.success) { this.sysorganList = res.data + + this.defaultExpandedKeys1 = [] + this.sysorganList.forEach(item => { + this.defaultExpandedKeys1.push(item.sid) + item.children.forEach(channel => { + this.defaultExpandedKeys1.push(channel.sid) + }) + }) + } }) req.sysorganization(this.uploadData.projectSid).then(res => { if (res.success) { this.sysorganList2 = res.data + + this.defaultExpandedKeys2 = [] + this.sysorganList2.forEach(item => { + this.defaultExpandedKeys2.push(item.sid) + item.children.forEach(channel => { + this.defaultExpandedKeys2.push(channel.sid) + }) + }) + } }) } @@ -190,14 +211,38 @@ this.uploadData.projectSid = row.sid req.associationUserList(this.uploadData.projectSid).then(res => { if (res.success) { + this.$refs.tree.setCheckedKeys([]); this.sysorganList = res.data + + this.defaultExpandedKeys1 = [] + this.sysorganList.forEach(item => { + this.defaultExpandedKeys1.push(item.sid) + item.children.forEach(channel => { + this.defaultExpandedKeys1.push(channel.sid) + }) + }) } }) req.sysorganization(this.uploadData.projectSid).then(res => { if (res.success) { this.sysorganList2 = res.data + + this.defaultExpandedKeys2 = [] + this.sysorganList2.forEach(item => { + this.defaultExpandedKeys2.push(item.sid) + item.children.forEach(channel => { + this.defaultExpandedKeys2.push(channel.sid) + }) + }) } }) + + this.$nextTick(() => { + + this.$refs['tree'].setCheckedKeys([]) + this.$refs['tree2'].setCheckedKeys([]) + + }); }, handleNodeClick1(val, num) { @@ -221,11 +266,29 @@ req.associationUserList(this.uploadData.projectSid).then(res => { if (res.success) { this.sysorganList = res.data + + this.defaultExpandedKeys1 = [] + this.sysorganList.forEach(item => { + this.defaultExpandedKeys1.push(item.sid) + item.children.forEach(channel => { + this.defaultExpandedKeys1.push(channel.sid) + }) + }) + } }) req.sysorganization(this.uploadData.projectSid).then(res => { if (res.success) { this.sysorganList2 = res.data + + this.defaultExpandedKeys2 = [] + this.sysorganList2.forEach(item => { + this.defaultExpandedKeys2.push(item.sid) + item.children.forEach(channel => { + this.defaultExpandedKeys2.push(channel.sid) + }) + }) + } }) @@ -263,6 +326,14 @@ req.associationUserList(this.uploadData.projectSid).then(res => { if (res.success) { this.sysorganList = res.data + this.defaultExpandedKeys1 = [] + this.sysorganList.forEach(item => { + this.defaultExpandedKeys1.push(item.sid) + item.children.forEach(channel => { + this.defaultExpandedKeys1.push(channel.sid) + }) + }) + } }) req.sysorganization(this.uploadData.projectSid).then(res => { @@ -271,6 +342,14 @@ this.sysorganList2 = [] this.sysorganList2 = res.data + this.defaultExpandedKeys2 = [] + this.sysorganList2.forEach(item => { + this.defaultExpandedKeys2.push(item.sid) + item.children.forEach(channel => { + this.defaultExpandedKeys2.push(channel.sid) + }) + }) + } }) } diff --git a/supervise-crm-ui/src/views/projectStaff/index.vue b/supervise-crm-ui/src/views/projectStaff/index.vue index d0763c7d..0f354d7c 100644 --- a/supervise-crm-ui/src/views/projectStaff/index.vue +++ b/supervise-crm-ui/src/views/projectStaff/index.vue @@ -29,8 +29,9 @@