diff --git a/supervise-crm-ui/src/views/projectSet/WechatPush/index.vue b/supervise-crm-ui/src/views/projectSet/WechatPush/index.vue index 0ea7931d..6fe016b0 100644 --- a/supervise-crm-ui/src/views/projectSet/WechatPush/index.vue +++ b/supervise-crm-ui/src/views/projectSet/WechatPush/index.vue @@ -16,12 +16,12 @@
关联人员
-
- 为已绑定微信公众号人员 -
+
--> @@ -35,64 +35,48 @@
{{ node.label }}
-
+
- 关联微信 + 关联微信
-
- - + +
-
-
-
微信推送
+
+ +
微信推送设置
+ {{Wxtitle}} +
+ +
保存 + @click="saveData()" v-show="sysorganList2.length>0">保存
@@ -201,7 +185,9 @@ ValSids: [], sysorganList: [], sysorganList2: [], - defaultExpandedKeys: [] // 默认展开 + defaultExpandedKeys: [], // 默认展开 + Wxtitle: '', + Wxstate: false } }, watch: { @@ -239,11 +225,13 @@ } }, 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 = [] @@ -278,7 +266,12 @@ }, singleElection(row) { 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.defaultExpandedKeys = [] @@ -291,20 +284,20 @@ console.log("sysorganList", this.sysorganList) - this.uploadData.userProjectSid = res.data[0].sid - req.templateMessage(this.dataListOne[0].sid).then(res => { - if (res.success) { - this.sysorganList2 = res.data + // this.uploadData.userProjectSid = res.data[0].sid + // req.templateMessage(res.data[0].sid).then(res => { + // if (res.success) { + // this.sysorganList2 = res.data - //this.Array为数组名 - this.sysorganList2.forEach(item => { + // //this.Array为数组名 + // this.sysorganList2.forEach(item => { - this.$set(item, 'Show', true) + // this.$set(item, 'Show', true) - }) - } - }) + // }) + // } + // }) }) @@ -320,7 +313,13 @@ this.$set(item, 'Show', true) + if (item.state == '2') { + count++ + } + }) + + this.Wxstate = count == this.sysorganList2.length } }) @@ -339,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)) @@ -356,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 }, @@ -384,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() { @@ -421,6 +455,8 @@ console.log("aaaaaaaaaa", val) + this.Wxtitle = " - " + val.name+" - " + val.orgAllName + console.log("aaaaaaaaaa", num) @@ -431,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 + } }) } diff --git a/supervise-crm-ui/src/views/projectSet/projectStaff/index.vue b/supervise-crm-ui/src/views/projectSet/projectStaff/index.vue index 41e6ff44..80a0bebe 100644 --- a/supervise-crm-ui/src/views/projectSet/projectStaff/index.vue +++ b/supervise-crm-ui/src/views/projectSet/projectStaff/index.vue @@ -52,6 +52,7 @@
import APPUpdate from "plugins/APPUpdate/index.js"; + import config from "common/config.js"; export default { globalData: { // wxSilentLoginURL: "https://supervise.yxtsoft.com/portal/v1/wxuser/wxSilentLogin", // wxSilentLoginURL: "https://supervise.yxtsoft.com/api/portal/v1/wxuser/wxSilentLogin",// 静默登录 - wxSilentLoginURL: "http://192.168.1.104:7009/v1/app/wxuser/wxSilentLogin", + wxSilentLoginURL: config.baseUrl+"/v1/app/wxuser/wxSilentLogin", wxAuthLoginURL: "https://supervise.yxtsoft.com/api/portal/v1/wxuser/wxAuthLogin", SilentLoginURL: "https://supervise.yxtsoft.com/api/portal/v1/wxuser/SilentLogin", // 注册 token: "", diff --git a/supervise-uniapp/common/config.js b/supervise-uniapp/common/config.js index c30b5b20..4695ee77 100644 --- a/supervise-uniapp/common/config.js +++ b/supervise-uniapp/common/config.js @@ -6,9 +6,9 @@ * loginTimeoutPage = "/pages/login/index", // 登录超时或失效的情况下,跳转到的登录页面 */ module.exports = { - // baseUrl: 'http://jg.yyundong.com',// 测试 - // baseUrl: 'https://supervise.yxtsoft.com/reportwxmpapi',//正式 - baseUrl: 'http://192.168.1.104:7009', + // baseUrl: 'http://jg.yyundong.com/reportwxmpapi',// 测试 + baseUrl: 'https://supervise.yxtsoft.com/reportwxmpapi',//正式 + // baseUrl: 'http://192.168.1.104:7009', // baseUrl: 'http://192.168.1.110:8112', tokenName: "Authorization", // 请求头中token的名字,与服务器端对应 loginTimeoutCode: "5001", // 登录超时或失效的情况下,服务器端返回的错误码