信呼OA版本v2.3.8
This commit is contained in:
175
webmain/system/reimplat/reimplatAction.php
Normal file
175
webmain/system/reimplat/reimplatAction.php
Normal file
@@ -0,0 +1,175 @@
|
||||
<?php
|
||||
class reimplatClassAction extends Action
|
||||
{
|
||||
|
||||
public function setsaveAjax()
|
||||
{
|
||||
$this->option->setval('reimplat_purl@-7', $this->post('purl'));
|
||||
$this->option->setval('reimplat_cnum@-7', $this->post('cnum'));
|
||||
$this->option->setval('reimplat_secret@-7', $this->post('secret'));
|
||||
$this->option->setval('reimplat_devnum@-7', $this->post('devnum'));
|
||||
$this->option->setval('reimplat_huitoken@-7', $this->post('huitoken'));
|
||||
return 'ok';
|
||||
}
|
||||
|
||||
public function getsetAjax()
|
||||
{
|
||||
$arr= array();
|
||||
$arr['purl'] = $this->option->getval('reimplat_purl');
|
||||
$arr['cnum'] = $this->option->getval('reimplat_cnum');
|
||||
$arr['secret'] = $this->option->getval('reimplat_secret');
|
||||
$arr['devnum'] = $this->option->getval('reimplat_devnum');
|
||||
$arr['huitoken'] = $this->option->getval('reimplat_huitoken');
|
||||
$arr['huiurl'] = ''.URL.'api.php?m=reimplat';
|
||||
if(COMPANYNUM)$arr['huiurl'].='&dwnum='.COMPANYNUM.'';
|
||||
echo json_encode($arr);
|
||||
}
|
||||
|
||||
//获取信呼系统上部门
|
||||
public function deptdataAjax()
|
||||
{
|
||||
$this->rows = array();
|
||||
$this->getdept(0, 1);
|
||||
|
||||
$this->returnjson(array(
|
||||
'totalCount'=> 0,
|
||||
'rows' => $this->rows
|
||||
));
|
||||
}
|
||||
private function getdept($pid, $oi)
|
||||
{
|
||||
$db = m('dept');
|
||||
$menu = $db->getall("`pid`='$pid' order by `sort`",'*');
|
||||
foreach($menu as $k=>$rs){
|
||||
$sid = $rs['id'];
|
||||
|
||||
$rs['level'] = $oi;
|
||||
$rs['stotal'] = $db->rows("`pid`='$sid'");
|
||||
|
||||
$rs['zt'] = 1;
|
||||
$this->rows[] = $rs;
|
||||
$this->getdept($rs['id'], $oi+1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function deptwxdataAjax()
|
||||
{
|
||||
$barr = m('reimplat:dept')->getdeptlist();
|
||||
if(!$barr['success'])return $barr;
|
||||
$rows = $barr['data'];
|
||||
|
||||
$this->returnjson(array(
|
||||
'totalCount'=> 0,
|
||||
'rows' => $rows
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
|
||||
//微信上用户操作
|
||||
public function beforeusershow($table)
|
||||
{
|
||||
$fields = 'id,name,`user`,deptname,status,tel,ranking,superman,loginci,deptid,sex,mobile,email,sort,face';
|
||||
$fields.=',deptids,deptnames';
|
||||
$s = '';
|
||||
$key = $this->post('key');
|
||||
if($key!=''){
|
||||
$s = " and (`name` like '%$key%' or `user` like '%$key%' or `ranking` like '%$key%' or `deptname` like '%$key%' ";
|
||||
$s.=" or `deptnames` like '%$key%'";
|
||||
$s.= ')';
|
||||
}
|
||||
|
||||
return array(
|
||||
'fields'=> $fields,
|
||||
'where' => $s
|
||||
);
|
||||
}
|
||||
|
||||
private function isgcstr($urs, $purs)
|
||||
{
|
||||
if(!$urs || !$purs)array(0,'');
|
||||
|
||||
$isgc = 0;
|
||||
$isgcstr = '';
|
||||
if($urs['mobile']!=$purs['mobile']){$isgc = 1;$isgcstr = '手机号';}
|
||||
if($urs['deptid']!=$purs['deptid']){$isgc = 1;$isgcstr = '部门';}
|
||||
if($urs['ranking']!=$purs['position']){$isgc = 1;$isgcstr = '职位';}
|
||||
if($urs['name']!=$purs['name']){$isgc = 1;$isgcstr = '姓名';}
|
||||
if($urs['email']!=$purs['email']){$isgc = 1;$isgcstr = '邮箱';}
|
||||
if($urs['tel']!=$purs['tel']){$isgc = 1;$isgcstr = '办公电话';}
|
||||
|
||||
return array($isgc, $isgcstr);
|
||||
}
|
||||
|
||||
public function afterusershow($table, $rows)
|
||||
{
|
||||
$obj = m('reimplat:dept');
|
||||
foreach($rows as $k=>$rs){
|
||||
$iscj = 0;
|
||||
$yurs = $obj->getuinfo($rs['user']);
|
||||
if($yurs){
|
||||
$iscj = 1;
|
||||
$rows[$k]['isgz'] = $yurs['status'];
|
||||
$nars = $this->isgcstr($rs, $yurs);
|
||||
$rows[$k]['isgc'] = $nars[0];
|
||||
$rows[$k]['isgcstr'] = $nars[1];
|
||||
}
|
||||
$rows[$k]['iscj'] = $iscj;
|
||||
$rows[$k]['yurs'] = $yurs;
|
||||
$rows[$k]['mobile'] = substr($rs['mobile'],0,3).'****'.substr($rs['mobile'],-4);
|
||||
}
|
||||
$noarr = $obj->notinadmin();
|
||||
return array('rows'=>$rows,'notstr'=>join(',', $noarr));
|
||||
}
|
||||
|
||||
public function reloaduserAjax()
|
||||
{
|
||||
return m('reimplat:dept')->getuserlist();
|
||||
}
|
||||
|
||||
public function delalluserAjax()
|
||||
{
|
||||
return m('reimplat:dept')->deleteuserall();
|
||||
}
|
||||
|
||||
public function updateuserAjax()
|
||||
{
|
||||
$id = (int)$this->get('id','0');
|
||||
$urs = m('admin')->getone($id,'`user`,`name`,`ranking`,`superman`,`isvcard`,`tel`,`mobile`,`email`,`deptid`,`deptname`,`sex`,`sort`,`pingyin`');
|
||||
$barr = m('reimplat:dept')->userupdate($urs);
|
||||
return $barr;
|
||||
}
|
||||
|
||||
public function updatealldeptAjax()
|
||||
{
|
||||
$barr = m('reimplat:dept')->deptallupdate();
|
||||
return $barr;
|
||||
}
|
||||
|
||||
public function agentdataAjax()
|
||||
{
|
||||
$barr =m('reimplat:agent')->listdata();
|
||||
$rows = array();
|
||||
if($barr['success'])$rows = $barr['data'];
|
||||
|
||||
$this->returnjson(array(
|
||||
'totalCount'=> 0,
|
||||
'rows' => $rows
|
||||
));
|
||||
}
|
||||
|
||||
public function sendmsgAjax()
|
||||
{
|
||||
$name = $this->post('name');
|
||||
$msg = $this->post('msg');
|
||||
return m('reimplat:agent')->sendxiao($this->adminid, $name, $msg);
|
||||
}
|
||||
|
||||
public function senduserAjax()
|
||||
{
|
||||
$id = (int)$this->post('id');
|
||||
$msg = $this->post('msg');
|
||||
return m('reimplat:agent')->sendxiao($id, '', $msg);
|
||||
}
|
||||
}
|
||||
108
webmain/system/reimplat/rock_reimplat_cog.php
Normal file
108
webmain/system/reimplat/rock_reimplat_cog.php
Normal file
@@ -0,0 +1,108 @@
|
||||
<?php if(!defined('HOST'))die('not access');?>
|
||||
<script >
|
||||
$(document).ready(function(){
|
||||
|
||||
var c={
|
||||
init:function(){
|
||||
$.get(js.getajaxurl('getset','{mode}','{dir}'), function(s){
|
||||
var a=js.decode(s);
|
||||
get('reimplatpurl_{rand}').value=a.purl;
|
||||
get('reimplatcnum_{rand}').value=a.cnum;
|
||||
get('reimplatsecret_{rand}').value=a.secret;
|
||||
get('reimplatdevnum_{rand}').value=a.devnum;
|
||||
get('reimplathuitoken_{rand}').value=a.huitoken;
|
||||
get('reimplathuiurl_{rand}').value=a.huiurl;
|
||||
|
||||
});
|
||||
},
|
||||
save:function(o){
|
||||
var d={};
|
||||
d.purl = get('reimplatpurl_{rand}').value;
|
||||
d.cnum = get('reimplatcnum_{rand}').value;
|
||||
d.secret = get('reimplatsecret_{rand}').value;
|
||||
d.devnum = get('reimplatdevnum_{rand}').value;
|
||||
d.huitoken = get('reimplathuitoken_{rand}').value;
|
||||
js.msg('wait','保存中...');
|
||||
js.ajax(js.getajaxurl('setsave','{mode}','{dir}'), d, function(s){
|
||||
if(s!='ok'){
|
||||
js.msg('msg',s);
|
||||
}else{
|
||||
js.msg('success','保存成功');
|
||||
}
|
||||
},'post');
|
||||
},
|
||||
cleareshe:function(){
|
||||
|
||||
}
|
||||
};
|
||||
js.initbtn(c);
|
||||
c.init();
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
<div align="left">
|
||||
<div style="padding:10px;">
|
||||
|
||||
|
||||
|
||||
<table cellspacing="0" width="600" border="0" cellpadding="0">
|
||||
|
||||
<tr>
|
||||
<td align="right"><font color=red>*</font> 平台地址:</td>
|
||||
<td class="tdinput"><input onblur="this.value=strreplace(this.value)" id="reimplatpurl_{rand}" class="form-control"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align="right"><font color=red>*</font> 单位编号:</td>
|
||||
<td class="tdinput"><input onblur="this.value=strreplace(this.value)" id="reimplatcnum_{rand}" class="form-control"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align="right" width="190"><font color=red>*</font> 单位secret:</td>
|
||||
<td class="tdinput">
|
||||
<textarea id="reimplatsecret_{rand}" placeholder="设置了不要暴露给他人,防止企业信息泄漏" onblur="this.value=strreplace(this.value)" style="height:60px" class="form-control"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td align="right">默认推送应用编号:</td>
|
||||
<td class="tdinput"><input placeholder="如不设置默认第一个应用" onblur="this.value=strreplace(this.value)" id="reimplatdevnum_{rand}" class="form-control"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right"></td>
|
||||
<td ><div class="tishi">这个是对接<a href="<?=URLY?>view_rockreim.html" target="_blank">REIM即时通讯平台</a>的,请到对应单位下获取</a></div></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2"><div class="inputtitle">回调Token设置(没有回调就不需要设置)</div></td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td align="right">回调URL:</td>
|
||||
<td class="tdinput"><input onfocus="this.select()" id="reimplathuiurl_{rand}" readonly class="form-control"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align="right">回调密钥:</td>
|
||||
<td class="tdinput"><input id="reimplathuitoken_{rand}" onblur="this.value=strreplace(this.value)" class="form-control"></td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
<td align="right"></td>
|
||||
<td style="padding:15px 0px" colspan="3" align="left"><button click="save" class="btn btn-success" type="button"><i class="icon-save"></i> 保存</button>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
82
webmain/system/reimplat/rock_reimplat_dept.php
Normal file
82
webmain/system/reimplat/rock_reimplat_dept.php
Normal file
@@ -0,0 +1,82 @@
|
||||
<?php if(!defined('HOST'))die('not access');?>
|
||||
<script >
|
||||
$(document).ready(function(){
|
||||
var a = $('#view1_{rand}').bootstable({
|
||||
url:js.getajaxurl('deptwxdata','{mode}','{dir}'),
|
||||
tree:true,celleditor:true,tablename:'dept',
|
||||
columns:[{
|
||||
text:'名称',dataIndex:'name',align:'left'
|
||||
},{
|
||||
text:'上级id',dataIndex:'pid'
|
||||
},{
|
||||
text:'排序号',dataIndex:'sort'
|
||||
},{
|
||||
text:'ID',dataIndex:'id'
|
||||
}]
|
||||
});
|
||||
|
||||
var b = $('#view2_{rand}').bootstable({
|
||||
url:js.getajaxurl('deptdata','{mode}','{dir}'),
|
||||
tree:true,
|
||||
columns:[{
|
||||
text:'名称',dataIndex:'name',align:'left'
|
||||
},{
|
||||
text:'上级id',dataIndex:'pid'
|
||||
},{
|
||||
text:'负责人',dataIndex:'headman'
|
||||
},{
|
||||
text:'排序号',dataIndex:'sort'
|
||||
},{
|
||||
text:'ID',dataIndex:'id'
|
||||
}]
|
||||
});
|
||||
var c = {
|
||||
relad:function(){
|
||||
a.reload();
|
||||
b.reload();
|
||||
},
|
||||
anaytodept:function(){
|
||||
js.loading('更新中...');
|
||||
js.ajax(js.getajaxurl('updatealldept','{mode}', '{dir}'),false, function(ret){
|
||||
if(ret.success){
|
||||
js.msgok('更新成功');
|
||||
a.reload();
|
||||
}else{
|
||||
js.msgerror(ret.msg);
|
||||
}
|
||||
},'get,json');
|
||||
}
|
||||
}
|
||||
js.initbtn(c);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<table width="100%">
|
||||
<tr valign="top">
|
||||
<td width="50%">
|
||||
<div>
|
||||
<button class="btn btn-default" click="relad,0" type="button">刷新</button>
|
||||
</div>
|
||||
<div class="blank10"></div>
|
||||
<div class="panel panel-info">
|
||||
<div class="panel-heading"><h3 class="panel-title">REIM即时通讯平台上组织结构</h3></div>
|
||||
<div id="view1_{rand}"></div>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
<td width="10"><div style="width:10px;overflow:hidden"></div></td>
|
||||
<td width="50%">
|
||||
<div>
|
||||
<button class="btn btn-default" click="anaytodept" type="button">系统上部门一键同步到REIM平台上</button>
|
||||
</div>
|
||||
<div class="blank10"></div>
|
||||
<div class="panel panel-success">
|
||||
<div class="panel-heading"><h3 class="panel-title">系统上组织结构</h3></div>
|
||||
|
||||
<div id="view2_{rand}"></div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
181
webmain/system/reimplat/rock_reimplat_user.php
Normal file
181
webmain/system/reimplat/rock_reimplat_user.php
Normal file
@@ -0,0 +1,181 @@
|
||||
<?php if(!defined('HOST'))die('not access');?>
|
||||
<script >
|
||||
$(document).ready(function(){
|
||||
var a = $('#view_{rand}').bootstable({
|
||||
tablename:'admin',sort:'sort',dir:'asc',celleditor:false,fanye:true,checked:true,
|
||||
storebeforeaction:'beforeusershow',storeafteraction:'afterusershow',url:publicstore('{mode}','{dir}'),
|
||||
columns:[{
|
||||
text:'头像',dataIndex:'face',renderer:function(v){
|
||||
if(isempt(v))v='images/noface.png';
|
||||
return '<img src="'+v+'" height="24" width="24">';
|
||||
}
|
||||
},{
|
||||
text:'用户名',dataIndex:'user'
|
||||
},{
|
||||
text:'姓名',dataIndex:'name'
|
||||
},{
|
||||
text:'部门',dataIndex:'deptname'
|
||||
},{
|
||||
text:'多部门',dataIndex:'deptnames'
|
||||
},{
|
||||
text:'职位',dataIndex:'ranking'
|
||||
},{
|
||||
text:'启用',dataIndex:'status',type:'checkbox',sortable:true
|
||||
},{
|
||||
text:'性别',dataIndex:'sex'
|
||||
},{
|
||||
text:'平台状态',dataIndex:'zt',align:'left',renderer:function(v,d){
|
||||
var s='';
|
||||
if(d.iscj==1){
|
||||
s='<a href="javascript:;" onclick="upsse{rand}.upuser('+d.id+')">[更新]</a>';
|
||||
if(d.isgz==1)s+='<font color=green>已关注</font>';
|
||||
if(d.isgz==0)s+='未关注';
|
||||
if(d.isgz==2)s+='<font color=#888888>已禁用</font>';
|
||||
if(d.isgc>0)s+='<font color=red>需更新('+d.isgcstr+')</font>';
|
||||
}else{
|
||||
s='<a href="javascript:;" style="color:red" onclick="upsse{rand}.upuser('+d.id+')">[创建]</a>';
|
||||
}
|
||||
return s;
|
||||
}
|
||||
},{
|
||||
text:'手机号',dataIndex:'mobile'
|
||||
},{
|
||||
text:'邮箱',dataIndex:'email'
|
||||
},{
|
||||
text:'排序号',dataIndex:'sort'
|
||||
},{
|
||||
text:'ID',dataIndex:'id'
|
||||
}],
|
||||
load:function(d){
|
||||
var s='';
|
||||
if(d.notstr!='')s='REIM即时通讯漂亮有系统有不存在的用户:<font color=red>'+d.notstr+'</font>,请点按钮删除';
|
||||
$('#showmsg{rand}').html(s);
|
||||
}
|
||||
});
|
||||
|
||||
var c = {
|
||||
search:function(){
|
||||
var s=get('key_{rand}').value;
|
||||
a.setparams({key:s},true);
|
||||
},
|
||||
faxiaox:function(){
|
||||
|
||||
},
|
||||
getlist:function(){
|
||||
js.msg('wait','获取中...');
|
||||
js.ajax(js.getajaxurl('reloaduser','{mode}', '{dir}'),{}, function(d){
|
||||
if(d.success){
|
||||
js.msg('success', '获取成功');
|
||||
a.reload();
|
||||
}else{
|
||||
js.msg('msg', d.msg);
|
||||
}
|
||||
},'get,json');
|
||||
},
|
||||
delaluser:function(){
|
||||
js.confirm('确定要要一键删除不存在用户吗?',function(jg){
|
||||
if(jg=='yes')c.deleteusers();
|
||||
});
|
||||
},
|
||||
deleteusers:function(){
|
||||
js.loading('删除中...');
|
||||
js.ajax(js.getajaxurl('delalluser','{mode}', '{dir}'),false, function(ret){
|
||||
if(ret.success){
|
||||
js.msgok('删除成功');
|
||||
a.reload();
|
||||
}else{
|
||||
js.msgerror(ret.msg);
|
||||
}
|
||||
},'get,json');
|
||||
},
|
||||
upuser:function(id){
|
||||
js.loading('更新中...');
|
||||
js.ajax(js.getajaxurl('updateuser','{mode}', '{dir}'),{id:id}, function(ret){
|
||||
if(ret.success){
|
||||
js.msgok('更新成功');
|
||||
a.reload();
|
||||
}else{
|
||||
js.msgerror(ret.msg);
|
||||
}
|
||||
},'get,json');
|
||||
},
|
||||
updatess:function(){
|
||||
if(this.plbool)return;
|
||||
var d = a.getcheckdata();
|
||||
if(d.length<=0){
|
||||
js.msg('msg','请先用复选框选中行');
|
||||
return;
|
||||
}
|
||||
this.checkd = d;
|
||||
this.plliangsos(0);
|
||||
},
|
||||
plliangsos:function(oi){
|
||||
var len = this.checkd.length;
|
||||
if(!get('plchushumm'))js.loading('<span id="plchushumm"></span>');
|
||||
$('#plchushumm').html('更新中('+len+'/'+(oi+1)+')...');
|
||||
if(oi>=len){
|
||||
js.msgok('更新完成');
|
||||
a.reload();
|
||||
this.plbool=false;
|
||||
return;
|
||||
}
|
||||
var ds = this.checkd[oi];
|
||||
js.ajax(js.getajaxurl('updateuser','{mode}', '{dir}'),{id:ds.id}, function(ret){
|
||||
if(ret.success){
|
||||
c.plliangsos(oi+1);
|
||||
}else{
|
||||
c.plbool=false;
|
||||
$('#plchushumm').html('<font color=red>['+ds.name+']更新失败:'+ret.msg+'</font>');
|
||||
}
|
||||
},'get,json');
|
||||
},
|
||||
faxiaox:function(){
|
||||
var d=a.changedata;
|
||||
if(!d.id){js.msg('msg','请先选中人');return;}
|
||||
js.prompt('向人员['+d.name+']发送消息','消息内容',function(lx,txt){
|
||||
if(lx=='yes'&&txt)c.sheniokx(d.id,txt)
|
||||
});
|
||||
},
|
||||
sheniokx:function(id,txt){
|
||||
js.loading('发送中...');
|
||||
js.ajax(js.getajaxurl('senduser','{mode}', '{dir}'),{id:id,msg:txt}, function(d){
|
||||
if(d.success){
|
||||
js.msgok('发送成功');
|
||||
}else{
|
||||
js.msgerror(d.msg);
|
||||
}
|
||||
},'post,json');
|
||||
}
|
||||
};
|
||||
|
||||
upsse{rand} = c;
|
||||
|
||||
js.initbtn(c);
|
||||
|
||||
});
|
||||
</script>
|
||||
<div>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td><button class="btn btn-default" click="updatess" type="button">更新用户</button></td>
|
||||
<td style="padding-left:10px"><button class="btn btn-default" click="getlist" type="button">获取REIM通信平台用户</button></td>
|
||||
|
||||
<td style="padding-left:10px">
|
||||
<div class="input-group" style="width:220px;">
|
||||
<input class="form-control" id="key_{rand}" placeholder="姓名/部门/职位/用户名">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" click="search" type="button"><i class="icon-search"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
<td width="90%" style="padding-left:10px"></td>
|
||||
<td align="right" nowrap>
|
||||
<button class="btn btn-info" click="faxiaox" type="button">发消息</button>
|
||||
<button class="btn btn-danger" click="delaluser" type="button">删除REIM通信平台上系统不存在的用户</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="blank10"></div>
|
||||
<div id="view_{rand}"></div>
|
||||
<div id="showmsg{rand}" class="tishi"></div>
|
||||
87
webmain/system/reimplat/rock_reimplat_ying.php
Normal file
87
webmain/system/reimplat/rock_reimplat_ying.php
Normal file
@@ -0,0 +1,87 @@
|
||||
<?php if(!defined('HOST'))die('not access');?>
|
||||
<script >
|
||||
$(document).ready(function(){
|
||||
var a = $('#view_{rand}').bootstable({
|
||||
tablename:'dept',sort:'sort',dir:'asc',
|
||||
url:js.getajaxurl('agentdata','{mode}','{dir}'),
|
||||
columns:[{
|
||||
text:'应用Logo',dataIndex:'picurl',renderer:function(v){
|
||||
if(isempt(v))v='images/noface.png';
|
||||
return '<img src="'+v+'" height="30" width="30">';
|
||||
}
|
||||
},{
|
||||
text:'编号',dataIndex:'num'
|
||||
},{
|
||||
text:'名称',dataIndex:'name'
|
||||
},{
|
||||
text:'类型',dataIndex:'types'
|
||||
},{
|
||||
text:'状态',dataIndex:'status',renderer:function(v){
|
||||
if(v=='0')return '停用';
|
||||
if(v=='1')return '启用';
|
||||
if(v=='2')return '仅PC端';
|
||||
if(v=='3')return '仅手机端';
|
||||
}
|
||||
},{
|
||||
text:'应用地址',dataIndex:'url',align:'left',renderer:function(v,d){
|
||||
var str='';
|
||||
if(d.url)str='PC端:'+d.url+'<br>';
|
||||
if(d.murl)str+='手机端:'+d.murl+'';
|
||||
return str;
|
||||
}
|
||||
},{
|
||||
text:'直接打开',dataIndex:'iszy',sortable:true,type:'checkbox'
|
||||
},{
|
||||
text:'适用对象',dataIndex:'recename'
|
||||
}],
|
||||
itemclick:function(){
|
||||
btn(false);
|
||||
}
|
||||
});
|
||||
|
||||
function btn(bo){
|
||||
get('faxis_{rand}').disabled = bo;
|
||||
//get('del_{rand}').disabled = bo;
|
||||
//get('edit_{rand}').disabled = bo;
|
||||
}
|
||||
|
||||
var c = {
|
||||
reloads:function(){
|
||||
a.reload();
|
||||
},
|
||||
faxiaox:function(){
|
||||
var d=a.changedata;
|
||||
js.prompt('向应用['+d.name+']发送消息','消息内容,接收人是“<b>'+adminname+'</b>”',function(lx,txt){
|
||||
if(lx=='yes'&&txt)c.sheniokx(d.name,txt)
|
||||
});
|
||||
},
|
||||
sheniokx:function(na,txt){
|
||||
js.loading('发送中...');
|
||||
js.ajax(js.getajaxurl('sendmsg','{mode}', '{dir}'),{name:na,msg:txt}, function(d){
|
||||
if(d.success){
|
||||
js.msgok('发送成功');
|
||||
}else{
|
||||
js.msgerror(d.msg);
|
||||
}
|
||||
},'post,json');
|
||||
},
|
||||
};
|
||||
|
||||
js.initbtn(c);
|
||||
});
|
||||
</script>
|
||||
<div>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td nowrap>
|
||||
<button class="btn btn-default" click="reloads,0" type="button">刷新</button>
|
||||
</td>
|
||||
<td width="90%" style="padding-left:10px">应用管理请到REIM即时通讯平台下操作</td>
|
||||
<td align="right" nowrap>
|
||||
<button class="btn btn-info" click="faxiaox" disabled id="faxis_{rand}" type="button">发送消息</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="blank10"></div>
|
||||
<div id="view_{rand}"></div>
|
||||
Reference in New Issue
Block a user