@ -16,83 +16,67 @@
< el -col :span ="8" class = "item" style = "margin-left: 50px;" >
< div class = "listtop" style = "width: 100%" >
< div class = "tit" > 关联人员 < / div >
< div
<!-- < div
style = "display: flex;flex-direction: row; align-items: center; justify-content: space-between;padding-left: 20px;padding-right: 20px;" >
< img src = "../../../public/image/association.png" style = "width: 35px;height: 25px; margin-right: 10px;" / >
< img src = "../../../public/image/association.png"
style = "width: 35px;height: 25px; margin-right: 10px;" / >
< span > 为已绑定微信公众号人员 < / span >
< / div >
< / div > -- >
< / div >
< div class = "org-tree" >
< el -tree :data ="sysorganList" node -key = " sid " :props ="props" ref = "tree" highlight -current check -strictly
: default - checked - keys = "uploadData.users"
: default - expanded - keys = "['2','fd6435f2-0005-11ec-a033-48452053aa33','3042d730-64e8-4e34-b08a-44adca4da3a5']"
@ node - click = "handleNodeClick" >
: default - checked - keys = "uploadData.users" : default - expand - all = "true"
: default - expanded - keys = "defaultExpandedKeys" @ node - click = "handleNodeClick" >
< div class = "custom-tree-node" slot -scope = " { node , data } "
style = " width: 100%;display: flex;flex-direction: row; align-items: center;flex-shrink: 1;" >
< div : class = "{ 'title': data.psid==='0' }" > { { node . label } } < / div >
< div style = "flex: 1;" > < / div >
< div style = "margin-right: 3 5px;display: flex;flex-direction: row; align-items: center;" >
< div style = "margin-right: 1 5px;display: flex;flex-direction: row; align-items: center;" >
<!-- < span v-if ="node.childNodes.length!=0" :class="{ 'title': data.psid==='0' }" > [ {{ node.childNodes.length }} ] < / span > - - >
< span v-if ="data.psid==='0'" :class="{ 'title': data.psid==='0' }" style="margin-right: 2 0px;" > 微信名称
< span v-if ="data.psid==='0'" :class="{ 'title': data.psid==='0' }" style="margin-right: 1 0px;" > 关联 微信
< / span >
< div v -if = " node.childNodes.length = = 0 "
style = "width: 100%;display: flex;flex-direction: row;align-items: center;" >
< div > < / div >
< img v -if = " data.isOpenId = = ' 2 ' " src = "../../../public/image/association.png"
style = "width: 35px;height: 25px;" / >
< span style = " margin -left : 30px ; width : 100px ; overflow : hidden ; text -align : center ;
< img v -if = " data.isOpenId = = ' 2 ' " src = "../../../public/image/link.png"
style = "width: 35px;height: 25px;margin-right: 30px;" / >
< img v -if = " data.isOpenId = = ' 1 ' " src = "../../../public/image/unlink.png"
style = "width: 35px;height: 25px;margin-right: 30px;" / >
<!-- < span style = " margin -left : 30px ; width : 100px ; overflow : hidden ; text -align : center ;
white - space : nowrap ;
text - overflow : ellipsis ; " > 正在完善 < / span >
text - overflow : ellipsis ; " > 正在完善 < / span > -- >
< / div >
< / div >
<!-- < span
v - if = "node.childNodes.length===0"
class = "history"
@ click = "jumpHistory(node.data)"
> 查看历史录像
< / span > -- >
< / div >
< / e l - t r e e >
< / div >
<!-- < el -table ref = "multipleTable" :data ="dataListOne" highlight -current -row border max -height = " 500px "
style = "width: 400px;height: 500px;" @ row - click = "singleElection2" tooltip - effect = "dark"
: row - style = "{height:'50px'}" >
< el -table -column label = "ID" align = "center" >
< template slot -scope = " scope " >
< div
style = "display: flex;flex-direction: row; align-items: center; justify-content: space-between;padding-left: 20px;padding-right: 20px;" >
< span > { { scope . row . name } } < / span >
< img src = "../../../public/image/association.png" style = "width: 45px;height: 35px;"
v - show = "scope.row.isOpenId=='2'" / >
< / div >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column prop = "orgName" label = "单位" align = "center" / >
< / e l - t a b l e > - - >
< / e l - c o l >
< el -col :span ="8" class = "item" style = "margin-left: 50px;width:700px;" >
< div class = "listtop" >
< div class = "tit" > 微信推送 < / div >
< div
style = "display: flex;flex-direction: row;align-items: center; height: 50px;padding: 10px;margin-left: -10px;" >
< el -checkbox style = "zoom: 150%;" :value ="Wxstate" v-model ="Wxstate" @change="Wxtitlecheckbox($event)" > < / el -checkbox >
< div class = "tit" style = "margin-left: 10px;" > 微信推送设置 < / div >
< span style = "margin-left: 5px;" > { { Wxtitle } } < / span >
< / div >
< div >
< span
style = "color: #fff;background: #018AD2; font-size: 16px; margin-right: 20px; border-radius: 5px;padding: 4px 12px;"
@ click = "saveData()" > 保存 < / span >
@ click = "saveData()" v - show = "sysorganList2.length>0" > 保存 < / span >
< / div >
< / div >
@ -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 )
/ / t h i s . u p l o a d D a t a . u s e r P r o j e c t S i d = r e s . d a t a [ 0 ] . s i d
/ / r e q . t e m p l a t e M e s s a g e ( t h i s . d a t a L i s t O n e [ 0 ] . s i d ) . t h e n ( r e s = > {
@ -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 )
/ / t h i s . u p l o a d D a t a . u s e r P r o j e c t S i d = r e s . d a t a [ 0 ] . s i d
/ / r e q . t e m p l a t e M e s s a g e ( t h i s . d a t a L i s t O n e [ 0 ] . s i d ) . t h e n ( r e s = > {
/ / r e q . t e m p l a t e M e s s a g e ( r e s . d a t a [ 0 ] . s i d ) . t h e n ( r e s = > {
/ / i f ( r e s . s u c c e s s ) {
/ / t h i s . s y s o r g a n L i s t = r e s . d a t a
/ / t h i s . s y s o r g a n L i s t 2 = r e s . d a t a
/ / / / t h i s . A r r a y 为 数 组 名
/ / t h i s . s y s o r g a n L i s t . f o r E a c h ( i t e m = > {
/ / t h i s . s y s o r g a n L i s t 2 . f o r E a c h ( i t e m = > {
/ / t h i s . $ s e t ( i t e m , ' S h o w ' , t r u e )
/ / } )
/ / } )
/ / }
/ / } )
} )
} ,
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
/ / t h i s . A r r a y 为 数 组 名
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 ;
}
< / style >
< / style >