修改数据可视化中得bug,修改后台管理员数量统计功能

This commit is contained in:
Li Jianxuan 2014-06-13 03:21:57 +00:00
parent 29604ab761
commit 775b0ee360
3 changed files with 125 additions and 107 deletions

View File

@ -24,7 +24,7 @@ class Admin_UserController extends Zend_Controller_Action
$uq=$this->db->query($sql);
$row=$uq->fetch();
$sqlt="select count(id) as total from users where usertype='administrator'";
$sqlt="select count(id) as total from users where usertype='{$this->view->config->auth->identifier}'";
$uqt=$this->db->query($sqlt);
$adminrow=$uqt->fetch();

View File

@ -27,7 +27,8 @@
<p class="content"><?= $item['description']; ?></p>
<p>
操作:
<a href="/admin/data/visual/uuid/<?php echo $item['uuid'];?>">编辑可视化要素</a>
<a href="/admin/data/visual/uuid/<?php echo $item['uuid'];?>">编辑可视化要素</a> |
<a href="/visual/view/uuid/<?= $item['uuid'] ?>">前台预览</a>
</p>
</li>
<?php endforeach; ?>

View File

@ -12,7 +12,11 @@ $this->breadcrumb()->setSeparator(' > ');
<div class="row">
<div class="span12">
<h3><?= $this->info['title'] ?> <small>数据可视化查看</small></h3>
<h4><small>请在需要查看的可视化要素上点击以描绘图表,再次点击可取消显示</small></h4>
<h4><small>请在需要查看的可视化要素上点击以描绘图表,再次点击可取消显示,绘制图像前可自主选择图像类型</small></h4>
<div class="btn-group linetypes" data-toggle="buttons-radio">
<button type="button" class="btn active" value="line">折线图</button>
<button type="button" class="btn" value="column">柱状图</button>
</div>
<hr />
<?php $vars = (new \Westdc\Visual\VariableEncoder)->normaldecode($this->data['vars']);?>
@ -35,8 +39,13 @@ $this->breadcrumb()->setSeparator(' > ');
</div>
<script>
_this = {};
_this.linetype = 'line';
$(function() {
$('.linetypes button').click(function(e) {
_this.linetype = $(this).val();
});
$('#datachart').highcharts('StockChart', {
rangeSelector : {
@ -46,6 +55,10 @@ $(function() {
credits : {
enabled : false
},
xAxis : {
allowDecimals : true
}
});
@ -77,7 +90,11 @@ $(function() {
chart.addSeries({
name: seriename,
data: data,
type : 'column'
type : _this.linetype,
dataGrouping: {
enabled: false,
forced: false,
}
});
},
'timeout': 30000,