信呼OA版本v2.3.8

This commit is contained in:
雨中磐石
2022-08-14 16:47:40 +08:00
parent 4640677d27
commit e3fcd913e3
1405 changed files with 133635 additions and 73 deletions

View File

@@ -0,0 +1,43 @@
<?php
class inforClassAction extends Action
{
public function publicbeforesave($table, $cans, $id)
{
$num = $cans['num'];
if($num=='')$num = $this->db->ranknum($this->T($table),'num');
return array('rows'=>array('num'=>$num));
}
public function loaddataAjax()
{
$id = (int)$this->get('id');
$data = m('infor')->getone($id);
$arr = array(
'data' => $data,
'infortype' => $this->option->getdata('infortype')
);
echo json_encode($arr);
}
//导入题库提交
public function tikuimportAjax()
{
$rows = c('html')->importdata('title,typeid,type,ana,anb,anc,and,answer,explain','title,typeid,type,ana,anb,answer');
$oi = 0;
$db = m('knowtiku');
foreach($rows as $k=>$rs){
$rs['typeid'] = $this->option->gettypeid('knowtikutype',$rs['typeid']);
$rs['type'] = contain($rs['type'],'单') ? 0 : 1;
$rs['adddt'] = $this->now;
$rs['optdt'] = $this->now;
$rs['optid'] = $this->adminid;
$rs['status'] = 1;
$db->insert($rs);
$oi++;
}
backmsg('','成功导入'.$oi.'条数据');
}
}

View File

@@ -0,0 +1,104 @@
<?php if(!defined('HOST'))die('not access');?>
<script >
$(document).ready(function(){
var a = $('#view_{rand}').bootstable({
tablename:'infor',fanye:true,sort:'sort',dir:'asc',celleditor:true,
url:publicstore('{mode}','{dir}'),storeafteraction:'inforafter',storebeforeaction:'inforbefore',
columns:[{
text:'类型',dataIndex:'typename',sortable:true
},{
text:'名称',dataIndex:'title',align:'left'
},{
text:'序号',dataIndex:'sort',editor:true
},{
text:'显示首页',dataIndex:'isshow',type:'checkbox',editor:true,sortable:true
},{
text:'操作人',dataIndex:'optname',sortable:true
},{
text:'发布者',dataIndex:'zuozhe'
},{
text:'时间',dataIndex:'indate',sortable:true,sortable:true,renderer:function(v){
return v.replace(' ','<br>');
}
},{
text:'发布给',dataIndex:'recename'
},{
text:'修改时间',dataIndex:'optdt',sortable:true,renderer:function(v){
return v.replace(' ','<br>');
}
}],
itemclick:function(d){
btn(false, d);
},
beforeload:function(){
btn(true);
}
});
function btn(bo, d){
get('edit_{rand}').disabled = bo;
get('del_{rand}').disabled = bo;
}
var c = {
del:function(){
a.del();
},
reload:function(){
at.reload();
},
clickwin:function(o1,lx){
var icon='plus',name='新增信息',id=0;
if(lx==1){
id = a.changeid;
icon='edit';
name='编辑信息';
};
guaninforlist = a;
addtabs({num:'inforedit'+id+'',url:'system,infor,edit,id='+id+'',icons:icon,name:name});
},
getcans:function(){
var can = {key:get('key_{rand}').value};
return can;
},
search:function(o1){
a.setparams(this.getcans(), true);
},
view:function(ids){
this.openview(a.changedata.id);
},
openview:function(ids){
openwork(ids);
}
};
js.initbtn(c);
});
</script>
<div>
<table width="100%">
<tr>
<td align="left" width="100">
<button class="btn btn-warning" click="clickwin,0" type="button"><i class="icon-plus"></i> 新增</button>
</td>
<td align="left" style="padding:0px 10px;">
<div class="input-group" style="width:300px;">
<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 align="right">
<button class="btn btn-info" id="edit_{rand}" click="clickwin,1" disabled type="button"><i class="icon-edit"></i> 编辑 </button>&nbsp;
<button class="btn btn-danger" click="del" disabled id="del_{rand}" type="button"><i class="icon-trash"></i> 删除</button>
</td>
</tr>
</table>
</div>
<div class="blank10"></div>
<div id="view_{rand}"></div>

View File

@@ -0,0 +1,111 @@
<?php if(!defined('HOST'))die('not access');?>
<script >
$(document).ready(function(){
var modenum='knowtiku';
var a = $('#view_{rand}').bootstable({
tablename:modenum,celleditor:true,autoLoad:false,modenum:modenum,fanye:true,params:{atype:'guan'},
columns:[{
text:'题名',dataIndex:'title',editor:false,align:'left'
},{
text:'分类',dataIndex:'typename'
},{
text:'类型',dataIndex:'type'
},{
text:'A',dataIndex:'ana'
},{
text:'B',dataIndex:'anb'
},{
text:'C',dataIndex:'anc'
},{
text:'D',dataIndex:'and'
},{
text:'E',dataIndex:'ane'
},{
text:'答案',dataIndex:'answer',editor:true
},{
text:'排序',dataIndex:'sort',sortable:true,editor:true
},{
text:'状态',dataIndex:'status',type:'checkbox',editor:true,sortable:true
},{
text:'',dataIndex:'caozuo'
}],
itemdblclick:function(d){
openxiangs(d.title,modenum, d.id);
}
});
var c = {
del:function(){
a.del();
},
daochu:function(){
a.exceldown();
},
adds:function(){
openinput('知识题库',modenum);
},
search:function(){
var s=get('key_{rand}').value;
a.setparams({key:s},true);
},
daoru:function(){
managelistknowtiku = a;
addtabs({num:'daoruknowtiku',url:'flow,input,daoru,modenum=knowtiku',icons:'plus',name:'导入题库'});
},
mobj:a,
title:'题库分类',
stable:'knowtiku',
optionview:'optionview_{rand}',
optionnum:'knowtikutype',
rand:'{rand}'
};
var c = new optionclass(c);
js.initbtn(c);
});
</script>
<table width="100%">
<tr valign="top">
<td>
<div style="border:1px #cccccc solid;width:220px">
<div id="optionview_{rand}" style="height:400px;overflow:auto;"></div>
</div>
</td>
<td width="10" nowrap><div style="width:10px">&nbsp;</div></td>
<td width="95%">
<div>
<table width="100%"><tr>
<td align="left" nowrap>
<button class="btn btn-primary" click="adds" type="button"><i class="icon-plus"></i> 新增</button>&nbsp;
<button class="btn btn-default" click="allshow" type="button">所有题库</button>&nbsp;
</td>
<td style="padding-left:10px">
<input class="form-control" style="width:200px" id="key_{rand}" placeholder="题名/分类">
</td>
<td style="padding-left:10px">
<button class="btn btn-default" click="search" type="button">搜索</button>
</td>
<td width="90%">
&nbsp;&nbsp;<span id="megss{rand}"></span>
</td>
<td align="right" nowrap>
<button class="btn btn-default" click="daoru" type="button">导入题库</button>&nbsp;
<button class="btn btn-default" click="daochu" type="button">导出</button>
</td>
</tr></table>
</div>
<div class="blank10"></div>
<div id="view_{rand}"></div>
</td>
</tr>
</table>

View File

@@ -0,0 +1,117 @@
<?php if(!defined('HOST'))die('not access');?>
<script >
$(document).ready(function(){
{params};
var num = params.num,pid,optlx=0;
var typeid=0,sspid=0;
var at = $('#optionview_{rand}').bootstree({
url:js.getajaxurl('gettreedata','option','system',{'num':'knowtikutype'}),
columns:[{
text:'题库分类',dataIndex:'name',align:'left',xtype:'treecolumn'
}],
load:function(d){
if(sspid==0){
typeid = d.pid;
sspid = d.pid;
c.loadfile('0','所有题库');
}
},
itemdblclick:function(d){
typeid = d.id;
c.loadfile(d.id,d.name);
}
});;
var modenum='knowtiku';
var a = $('#view_{rand}').bootstable({
tablename:modenum,celleditor:false,autoLoad:false,modenum:modenum,fanye:true,params:{atype:'xuexi'},
columns:[{
text:'题名',dataIndex:'title',editor:false,align:'left'
},{
text:'分类',dataIndex:'typename'
},{
text:'类型',dataIndex:'type'
},{
text:'A',dataIndex:'ana'
},{
text:'B',dataIndex:'anb'
},{
text:'C',dataIndex:'anc'
},{
text:'D',dataIndex:'and'
},{
text:'E',dataIndex:'ane'
},{
text:'答案',dataIndex:'answer',renderer:function(v,d,oi){
return '<a href="javascript:;" onclick="openxiangs(\'知识学习\',\'knowtiku\','+d.id+')">查看</a>';
}
}],
itemdblclick:function(d){
openxiangs(d.title,modenum, d.id);
}
});
var c = {
reload:function(){
at.reload();
},
loadfile:function(spd,nsd){
$('#megss{rand}').html(nsd);
a.setparams({'typeid':spd}, true);
},
genmu:function(){
typeid = sspid;
at.changedata={};
this.loadfile('0','所有题库');
},
daochu:function(){
a.exceldown();
},
search:function(){
var s=get('key_{rand}').value;
a.setparams({key:s},true);
}
};
js.initbtn(c);
$('#optionview_{rand}').css('height',''+(viewheight-70)+'px');
});
</script>
<table width="100%">
<tr valign="top">
<td width="220">
<div style="border:1px #cccccc solid">
<div id="optionview_{rand}" style="height:400px;overflow:auto;"></div>
<div class="panel-footer">
<a href="javascript:" click="reload" onclick="return false"><i class="icon-refresh"></i></a>
</div>
</div>
</td>
<td width="10" nowrap><div style="width:10px">&nbsp;</div></td>
<td>
<div>
<table width="100%"><tr>
<td align="left" nowrap>
<button class="btn btn-default" click="genmu" type="button">所有题库</button>&nbsp;
</td>
<td style="padding-left:10px">
<input class="form-control" style="width:200px" id="key_{rand}" placeholder="题名/分类">
</td>
<td style="padding-left:10px">
<button class="btn btn-default" click="search" type="button">搜索</button>
</td>
<td width="90%">
&nbsp;&nbsp;<span id="megss{rand}"></span>
</td>
<td align="right">
<button class="btn btn-default" click="daochu" type="button">导出</button>
</td>
</tr></table>
</div>
<div class="blank10"></div>
<div id="view_{rand}"></div>
</td>
</tr>
</table>

View File

@@ -0,0 +1,97 @@
<?php if(!defined('HOST'))die('not access');?>
<script >
$(document).ready(function(){
var a = $('#view_{rand}').bootstable({
tablename:'knowledge',celleditor:true,autoLoad:false,modenum:'knowledge',fanye:true,
columns:[{
text:'标题',dataIndex:'title',editor:false,align:'left'
},{
text:'分类',dataIndex:'typename'
},{
text:'添加时间',dataIndex:'adddt',sortable:true
},{
text:'操作时间',dataIndex:'optdt',sortable:true
},{
text:'操作人',dataIndex:'optname'
},{
text:'排序',dataIndex:'sort',sortable:true,editor:true
},{
text:'ID',dataIndex:'id'
},{
text:'',dataIndex:'caozuo'
}],
itemdblclick:function(d){
openxiangs(d.title,'knowledge', d.id);
}
});
var c = {
del:function(){
a.del();
},
adds:function(){
openinput('知识','knowledge');
},
search:function(){
var s=get('key_{rand}').value;
a.setparams({key:s},true);
},
daochu:function(){
a.exceldown();
},
mobj:a,
title:'知识分类',
stable:'knowledge',
optionview:'optionview_{rand}',
optionnum:'knowledgetype',
rand:'{rand}'
};
var c = new optionclass(c);
js.initbtn(c);
});
</script>
<table width="100%">
<tr valign="top">
<td>
<div style="border:1px #cccccc solid;width:220px">
<div id="optionview_{rand}" style="height:400px;overflow:auto;"></div>
</div>
</td>
<td width="10" nowrap><div style="width:10px">&nbsp;</div></td>
<td width="95%">
<div>
<table width="100%"><tr>
<td align="left" nowrap>
<button class="btn btn-primary" click="adds" type="button"><i class="icon-plus"></i> 新增</button>&nbsp;
<button class="btn btn-default" click="allshow" type="button">所有知识</button>&nbsp;
</td>
<td style="padding-left:10px">
<input class="form-control" style="width:180px" id="key_{rand}" placeholder="标题/分类">
</td>
<td style="padding-left:10px">
<button class="btn btn-default" click="search" type="button">搜索</button>
</td>
<td width="90%">
&nbsp;&nbsp;<span id="megss{rand}"></span>
</td>
<td align="right">
<button class="btn btn-default" click="daochu" type="button">导出</button>
</td>
</tr></table>
</div>
<div class="blank10"></div>
<div id="view_{rand}"></div>
</td>
</tr>
</table>

View File

@@ -0,0 +1,118 @@
<?php if(!defined('HOST'))die('not access');?>
<script >
$(document).ready(function(){
{params};
var num = params.num,pid,optlx=0;
var typeid=0,sspid=0;
var at = $('#optionview_{rand}').bootstree({
url:js.getajaxurl('gettreedata','option','system',{'num':'knowledgetype'}),
columns:[{
text:'知识分类',dataIndex:'name',align:'left',xtype:'treecolumn',width:'79%'
},{
text:'ID',dataIndex:'id',width:'20%'
}],
load:function(d){
if(sspid==0){
typeid = d.pid;
sspid = d.pid;
c.loadfile('0','所有知识');
}
},
itemdblclick:function(d){
typeid = d.id;
c.loadfile(d.id,d.name);
}
});;
var a = $('#view_{rand}').bootstable({
tablename:'knowledge',celleditor:true,autoLoad:false,modenum:'knowledge',
columns:[{
text:'标题',dataIndex:'title',editor:false,align:'left'
},{
text:'分类',dataIndex:'typename'
},{
text:'添加时间',dataIndex:'adddt',sortable:true
},{
text:'操作时间',dataIndex:'optdt',sortable:true
},{
text:'操作人',dataIndex:'optname',sortable:true
},{
text:'排序',dataIndex:'sort',sortable:true
},{
text:'ID',dataIndex:'id'
},{
text:'',dataIndex:'opt',renderer:function(v,d,oi){
return '<a href="javascript:;" onclick="openxiangs(\'知识\',\'knowledge\','+d.id+')">查看</a>';
}
}],
itemdblclick:function(d){
openxiangs(d.title,'knowledge', d.id);
}
});
var c = {
reload:function(){
at.reload();
},
loadfile:function(spd,nsd){
$('#megss{rand}').html(nsd);
a.setparams({'typeid':spd}, true);
},
genmu:function(){
typeid = sspid;
at.changedata={};
this.loadfile('0','所有知识');
},
daochu:function(){
a.exceldown();
},
search:function(){
var s=get('key_{rand}').value;
a.setparams({key:s},true);
}
};
js.initbtn(c);
$('#optionview_{rand}').css('height',''+(viewheight-70)+'px');
});
</script>
<table width="100%">
<tr valign="top">
<td width="220">
<div style="border:1px #cccccc solid">
<div id="optionview_{rand}" style="height:400px;overflow:auto;"></div>
<div class="panel-footer">
<a href="javascript:" click="reload" onclick="return false"><i class="icon-refresh"></i></a>
</div>
</div>
</td>
<td width="10" nowrap><div style="width:10px">&nbsp;</div></td>
<td>
<div>
<table width="100%"><tr>
<td align="left" nowrap>
<button class="btn btn-default" click="genmu" type="button">所有知识</button>&nbsp;
</td>
<td style="padding-left:10px">
<input class="form-control" style="width:180px" id="key_{rand}" placeholder="标题/分类">
</td>
<td style="padding-left:10px">
<button class="btn btn-default" click="search" type="button">搜索</button>
</td>
<td width="90%">
&nbsp;&nbsp;<span id="megss{rand}"></span>
</td>
<td align="right">
<button class="btn btn-default" click="daochu" type="button">导出</button>
</td>
</tr></table>
</div>
<div class="blank10"></div>
<div id="view_{rand}"></div>
</td>
</tr>
</table>