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 00000000..5eff8421 Binary files /dev/null and b/supervise-crm-ui/public/image/link.png differ diff --git a/supervise-crm-ui/public/image/unlink.png b/supervise-crm-ui/public/image/unlink.png new file mode 100644 index 00000000..8c52320f Binary files /dev/null and b/supervise-crm-ui/public/image/unlink.png differ diff --git a/supervise-crm-ui/src/main.js b/supervise-crm-ui/src/main.js index 33b5f26e..51552868 100644 --- a/supervise-crm-ui/src/main.js +++ b/supervise-crm-ui/src/main.js @@ -50,9 +50,9 @@ VueAMap.initAMapApiLoader({ Vue.config.productionTip = false -let token = null -// let token ='eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiI4NWUwYWY0Yi1lMGJhLTQyM2UtOTIxMS1kYjI2MDg2NTgwM2YiLCJpc3MiOiJXQksiLCJleHAiOjE2OTkzNDQ4OTZ9.R2iCiCKfnz2b66b7uv_5CQg5URPe5AvQLlE59mITUu0' -token = GetQueryString('token') +// let token = null +let token ='eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiI4NWUwYWY0Yi1lMGJhLTQyM2UtOTIxMS1kYjI2MDg2NTgwM2YiLCJpc3MiOiJXQksiLCJleHAiOjE2OTk0MDQxNTl9.9Qd_4J137TADwjJragatzBVBXl79HgjmGP_GZeXCLQQ' +// token = GetQueryString('token') if (token) { console.log('token》》》》》',token) setStorage(token) diff --git a/supervise-crm-ui/src/views/WechatPush/index.vue b/supervise-crm-ui/src/views/WechatPush/index.vue index f1b8d405..9cb68ced 100644 --- a/supervise-crm-ui/src/views/WechatPush/index.vue +++ b/supervise-crm-ui/src/views/WechatPush/index.vue @@ -16,83 +16,67 @@
关联人员
-
- + 为已绑定微信公众号人员 -
+
-->
+ :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 @@