闸门小程序接口
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
<div class="cbox">
|
||||
<img class="close" src="static/image/cross.png" onclick="hide_pop_box();"/>
|
||||
<?php
|
||||
$tfile = 'view' . DS . 'layout' . DS . g('layout') . DS . g('c') . DS . g('a') . '.tpl.html' ;
|
||||
if( file_exists( AROOT . $tfile ) ) include( AROOT . $tfile );
|
||||
else @include( CROOT . $tfile );
|
||||
?>
|
||||
</div>
|
||||
@@ -0,0 +1 @@
|
||||
<?=$info?>
|
||||
@@ -0,0 +1,4 @@
|
||||
<div class="cbox">
|
||||
<img class="close" src="static/image/cross.png" onclick="hide_pop_box();"/>
|
||||
<?=$info;?>
|
||||
</div>
|
||||
@@ -0,0 +1,21 @@
|
||||
<!DOCTYPE html><!--HTML5 doctype-->
|
||||
<html>
|
||||
<head>
|
||||
<title><?=$top_title?></title>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
|
||||
<script type="text/javascript" src="http://lib.sinaapp.com/js/jq.mobi/1.0/jq.mobi.min.js"></script>
|
||||
<script type="text/javascript" src="http://lib.sinaapp.com/js/jq.mobi/1.0/jq.ui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="jQUi">
|
||||
<?php
|
||||
$tfile = 'view' . DS . 'layout' . DS . g('layout') . DS . g('c') . DS . g('a') . '.tpl.html' ;
|
||||
if( file_exists( AROOT . $tfile ) ) include( AROOT . $tfile );
|
||||
else @include( CROOT . $tfile );
|
||||
?>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1 @@
|
||||
mobile version of LP3. Modify AROOT/view/layout/mobile/default/index.tpl.html to change this.
|
||||
@@ -0,0 +1 @@
|
||||
<div class="cbox">这是一个for Mobile设备的页面,加载了JQ.Mobi</div>
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
if( $code == 0 )
|
||||
{
|
||||
$array = array();
|
||||
$array['error_code'] = 0;
|
||||
$array['data'] = $data;
|
||||
ajax_echo( json_encode( $array ));
|
||||
}
|
||||
else
|
||||
{
|
||||
$array = array();
|
||||
$array['error_code'] = intval($code);
|
||||
$array['error_message'] = $message;
|
||||
ajax_echo( json_encode( $array ));
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,14 @@
|
||||
<footer class="footer" style="background-color: #1F2227;">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<script>document.write(new Date().getFullYear())</script> © 消毒灭菌在线监测系统.
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="text-sm-right d-none d-sm-block">
|
||||
ICP许可证号 © 京ICP备15050184号-3
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
@@ -0,0 +1,53 @@
|
||||
<header id="page-topbar">
|
||||
<div class="navbar-header">
|
||||
<div class="d-flex">
|
||||
<!-- LOGO -->
|
||||
<div class="navbar-brand-box">
|
||||
<a href="?c=index&a=returnHomePage" class="logo logo-dark">
|
||||
<span class="logo-sm">
|
||||
<img src="assets/images/logo-light-C.png" alt="" height="22">
|
||||
</span>
|
||||
<span class="logo-lg" style="color: white;font-size:17px;font-weight:600;">
|
||||
消毒灭菌在线监测系统
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<a href="?c=index&a=returnHomePage" class="logo logo-light">
|
||||
<span class="logo-sm">
|
||||
<img src="assets/images/logo-light-C.png" alt="" height="22">
|
||||
</span>
|
||||
<span class="logo-lg" style="color: white;font-size:17px;font-weight:600;">
|
||||
消毒灭菌在线监测系统
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<button type="button" class="btn btn-sm px-3 font-size-24 header-item waves-effect" id="vertical-menu-btn">
|
||||
<i class="ri-menu-2-line align-middle"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="d-flex">
|
||||
|
||||
<div class="dropdown d-none d-lg-inline-block ml-1">
|
||||
<button type="button" class="btn header-item noti-icon waves-effect" data-toggle="fullscreen">
|
||||
<i class="ri-fullscreen-line"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="dropdown d-inline-block user-dropdown">
|
||||
<button type="button" class="btn header-item waves-effect" id="page-header-user-dropdown"
|
||||
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<img class="rounded-circle header-profile-user" src="assets/images/head-photo.jpg"
|
||||
alt="Header Avatar">
|
||||
<span class="d-none d-xl-inline-block ml-1">超级管理员</span>
|
||||
<i class="mdi mdi-chevron-down d-none d-xl-inline-block"></i>
|
||||
</button>
|
||||
<div class="dropdown-menu dropdown-menu-right">
|
||||
<!-- item-->
|
||||
<a class="dropdown-item text-danger" href="?c=login&a=postLoginOut"><i class="ri-shut-down-line align-middle mr-1 text-danger"></i> 退出登录</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
@@ -0,0 +1,427 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
|
||||
<meta charset="utf-8" />
|
||||
<title>首页 | 消毒灭菌在线监测系统</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta content="Premium Multipurpose Admin & Dashboard Template" name="description" />
|
||||
<meta content="Themesdesign" name="author" />
|
||||
<!-- App favicon -->
|
||||
<link rel="shortcut icon" href="assets/images/tub1.png">
|
||||
|
||||
<!-- jquery.vectormap css -->
|
||||
<link href="assets/libs/admin-resources/jquery.vectormap/jquery-jvectormap-1.2.2.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<!-- DataTables -->
|
||||
<link href="assets/libs/datatables.net-bs4/css/dataTables.bootstrap4.min.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<!-- Responsive datatable examples -->
|
||||
<link href="assets/libs/datatables.net-responsive-bs4/css/responsive.bootstrap4.min.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<!-- Bootstrap Css -->
|
||||
<link href="assets/css/bootstrap-dark.min.css" id="bootstrap-style" rel="stylesheet" type="text/css" />
|
||||
<!-- Icons Css -->
|
||||
<link href="assets/css/icons.min.css" rel="stylesheet" type="text/css" />
|
||||
<!-- App Css-->
|
||||
<link href="assets/css/app-dark.min.css" id="app-style" rel="stylesheet" type="text/css" />
|
||||
|
||||
<!-- 引入vue.js -->
|
||||
<script src="assets/js/pages/vue2.6.11.js"></script>
|
||||
|
||||
</head>
|
||||
|
||||
<body data-topbar="dark" data-layout="horizontal">
|
||||
|
||||
<!-- Begin page -->
|
||||
<div id="layout-wrapper">
|
||||
|
||||
<!-- 头部开始 -->
|
||||
<?php include_once('header_admin.tpl.html'); ?>
|
||||
<!-- 头部结束 -->
|
||||
<!-- 头部导航栏 -->
|
||||
<!-- ============================================================== -->
|
||||
<!-- Start right Content here -->
|
||||
<!-- ============================================================== -->
|
||||
<div class="main-content" id="app">
|
||||
|
||||
<div class="page-content" style="margin-top: 10px;">
|
||||
<div class="container-fluid" style="max-width: 100%;">
|
||||
<div class="row">
|
||||
<div class="col-xl-3">
|
||||
<div class="card">
|
||||
<div class="card-body" style="padding: 15px;">
|
||||
<div class="media">
|
||||
<div class="media-body overflow-hidden">
|
||||
<h6 class="mb-2" style="font-size:16px;">消毒灭菌概况</h6>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body" style="padding-top: 5px;">
|
||||
<div class="media">
|
||||
<div class="media-body overflow-hidden" style="text-align: center;height: 90px;background: #1E232F;">
|
||||
<div style="margin-top: 10px;">
|
||||
<a href="?c=device&a=returnDeviceRunPage"><h2 title="展示消毒灭菌传感器今日消毒次数" class="mb-2" style="font-weight: 600;">{{indexCount.todayCount}}</h2></a>
|
||||
<a href="?c=device&a=returnDeviceRunPage"><h4 title="展示消毒灭菌传感器今日消毒次数" class="text-truncate font-size-14 mb-2">今日次数</h4></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="media-body overflow-hidden" style="text-align: center;margin-left: 20px;height: 90px;background: #1E232F;">
|
||||
<div style="margin-top: 10px;">
|
||||
<a href="?c=device&a=returnDeviceRunPage"><h2 title="展示消毒灭菌传感器本周消毒次数" class="mb-2" style="font-weight: 600;">{{indexCount.weekCount}}</h2></a>
|
||||
<a href="?c=device&a=returnDeviceRunPage"><h4 title="展示消毒灭菌传感器本周消毒次数" class="text-truncate font-size-14 mb-2">本周次数</h4></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body" style="padding-top: 5px;">
|
||||
<div class="media">
|
||||
<div class="media-body overflow-hidden" style="text-align: center;height: 90px;background: #1E232F;">
|
||||
<div style="margin-top: 10px;">
|
||||
<a href="?c=device&a=returnDeviceRunPage"><h2 title="展示消毒灭菌传感器本月消毒次数" class="mb-2" style="font-weight: 600;">{{indexCount.monthCount}}</h2></a>
|
||||
<a href="?c=device&a=returnDeviceRunPage"><h4 title="展示消毒灭菌传感器本月消毒次数" class="text-truncate font-size-14 mb-2">本月次数</h4></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="media-body overflow-hidden" style="text-align: center;margin-left: 20px;height: 90px;background: #1E232F;">
|
||||
<div style="margin-top: 10px;">
|
||||
<a href="?c=device&a=returnDeviceRunPage"><h2 title="展示消毒灭菌传感器本年消毒次数" class="mb-2" style="font-weight: 600;">{{indexCount.yearCount}}</h2></a>
|
||||
<a href="?c=device&a=returnDeviceRunPage"><h4 title="展示消毒灭菌传感器本年消毒次数" class="text-truncate font-size-14 mb-2">本年次数</h4></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body" style="padding: 15px;">
|
||||
<div class="media">
|
||||
<div class="media-body overflow-hidden">
|
||||
<h6 class="mb-2" style="font-size:16px;">消毒灭菌锅概况</h6>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body" style="padding-top: 5px;">
|
||||
<div class="media" v-for="item in indexRunStatus">
|
||||
<div class="media-body overflow-hidden" style="height: 60px;border: 2px solid #1E232F;border-radius: 10px;">
|
||||
<div style="float: left;">
|
||||
<p style="font-size: 13px;margin-top: 10px;margin-left: 10px;margin-bottom: 0px;">{{item.description}}</p>
|
||||
<p style="font-size: 13px;margin-top: 2px;margin-left: 10px;margin-bottom: 0px;color: white;">{{item.name}}</p>
|
||||
</div>
|
||||
<a href="?c=device&a=returnDeviceRunPage"><div style="float: right;border: 2px solid #5663D2;margin-top: 15px;margin-right: 10px;width: 60px;height: 30px;text-align: center;border-radius: 15px;line-height: 30px;font-size: 12px;font-weight: 700;color: #5663D2;">
|
||||
{{item.status}}
|
||||
</div></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xl-6">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="media">
|
||||
<div class="media-body overflow-hidden">
|
||||
<h6 class="mb-2" style="font-size:16px;">消毒灭菌统计</h6>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div>
|
||||
<div id="line-column-chart" class="apex-charts"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="media">
|
||||
<div class="media-body overflow-hidden">
|
||||
<h6 class="mb-2" style="font-size:16px;">事件数据</h6>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="media">
|
||||
<div style="height: 100px;width: 25%;text-align: center;background: rgb(30, 35, 47);border-radius: 10px;margin-left:-20px;">
|
||||
<div style="margin-top: 10px;">
|
||||
<h1 style="font-weight: 600;">{{indexEvent.noStandard}}</h1>
|
||||
<h4 class="text-truncate font-size-14 mb-2">灭菌不达标</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div style="height: 100px;width: 25%;text-align: center;background: rgb(30, 35, 47);border-radius: 10px;margin-left:20px;">
|
||||
<div style="margin-top: 10px;">
|
||||
<h1 style="font-weight: 600;">{{indexEvent.LowFrequency}}</h1>
|
||||
<h4 class="text-truncate font-size-14 mb-2">灭菌频率低</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xl-3">
|
||||
<div class="card">
|
||||
<div class="card-body" style="padding: 15px;">
|
||||
<div class="media">
|
||||
<div class="media-body overflow-hidden">
|
||||
<h6 class="mb-2" style="font-size:16px;">预警概览</h6>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body" style="padding-top: 5px;">
|
||||
<div class="media">
|
||||
<div class="media-body overflow-hidden" style="text-align: center;height: 90px;background: #1E232F;">
|
||||
<div style="margin-top: 10px;">
|
||||
<a href="?c=warn&a=returnWarnRecordPage"><h2 class="mb-2" style="font-weight: 600;">{{indexWarnCount.warnCount}}</h2></a>
|
||||
<a href="?c=warn&a=returnWarnRecordPage"><h4 class="text-truncate font-size-14 mb-2">预警次数</h4></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="media-body overflow-hidden" style="text-align: center;margin-left: 20px;height: 90px;background: #1E232F;">
|
||||
<div style="margin-top: 10px;">
|
||||
<a href="?c=warn&a=returnWarnRecordPage"><h2 class="mb-2" style="font-weight: 600;">{{indexWarnCount.warnDealCount}}</h2></a>
|
||||
<a href="?c=warn&a=returnWarnRecordPage"><h4 class="text-truncate font-size-14 mb-2">处理次数</h4></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body" style="padding: 15px;">
|
||||
<div class="media">
|
||||
<div class="media-body overflow-hidden">
|
||||
<h6 class="mb-2" style="font-size:16px;">预警分布</h6>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
<div id="donut-chart" class="apex-charts"></div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<div class="text-center mt-4">
|
||||
<h6 class="mb-2 text-truncate"><i class="mdi mdi-circle text-primary font-size-2"></i> 温度预警</h6>
|
||||
<h5>{{indexWarnTypePieInfo.temperature}} %</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="text-center mt-4">
|
||||
<h6 class="mb-2 text-truncate"><i class="mdi mdi-circle text-success font-size-2"></i> 压力预警</h6>
|
||||
<h5>{{indexWarnTypePieInfo.pressure}} %</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="text-center mt-4">
|
||||
<h6 class="mb-2 text-truncate"><i class="mdi mdi-circle text-warning font-size-2"></i> 时间预警</h6>
|
||||
<h5>{{indexWarnTypePieInfo.time}} %</h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body" style="padding: 15px;">
|
||||
<div class="media">
|
||||
<div class="media-body overflow-hidden">
|
||||
<h6 class="mb-2" style="font-size:16px;">预警设备</h6>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body" style="padding-top: 5px;padding-left:0px;">
|
||||
<div class="media" v-for="item in IndexWarnDeviceList">
|
||||
<div class="media-body overflow-hidden" style="height: 60px;">
|
||||
<div style="float: left;">
|
||||
<p style="font-size: 13px;margin-top: 10px;margin-left: 10px;margin-bottom: 0px;color: white;">{{item.hospital}} {{item.name}}</p>
|
||||
<p style="font-size: 13px;margin-top: 2px;margin-left: 10px;margin-bottom: 0px;">{{item.type}}({{item.level}}) {{item.notification_time}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 尾部开始 -->
|
||||
<?php include_once('footer.tpl.html'); ?>
|
||||
<!-- 尾部结束 -->
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Right Sidebar -->
|
||||
<!-- /Right-bar -->
|
||||
|
||||
<!-- Right bar overlay-->
|
||||
<div class="rightbar-overlay"></div>
|
||||
|
||||
<!-- JAVASCRIPT -->
|
||||
<script src="assets/libs/jquery/jquery.min.js"></script>
|
||||
<script src="assets/libs/bootstrap/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="assets/libs/metismenu/metisMenu.min.js"></script>
|
||||
<script src="assets/libs/simplebar/simplebar.min.js"></script>
|
||||
<script src="assets/libs/node-waves/waves.min.js"></script>
|
||||
|
||||
<!-- apexcharts -->
|
||||
<script src="assets/libs/apexcharts/apexcharts.min.js"></script>
|
||||
<script src="assets/libs/chart.js/Chart.bundle.min.js"></script>
|
||||
|
||||
|
||||
<!-- jquery.vectormap map -->
|
||||
<script src="assets/libs/admin-resources/jquery.vectormap/jquery-jvectormap-1.2.2.min.js"></script>
|
||||
<script src="assets/libs/admin-resources/jquery.vectormap/maps/jquery-jvectormap-us-merc-en.js"></script>
|
||||
|
||||
<!-- Required datatable js -->
|
||||
<script src="assets/libs/datatables.net/js/jquery.dataTables.min.js"></script>
|
||||
<script src="assets/libs/datatables.net-bs4/js/dataTables.bootstrap4.min.js"></script>
|
||||
|
||||
<!-- Responsive examples -->
|
||||
<script src="assets/libs/datatables.net-responsive/js/dataTables.responsive.min.js"></script>
|
||||
<script src="assets/libs/datatables.net-responsive-bs4/js/responsive.bootstrap4.min.js"></script>
|
||||
|
||||
<script src="assets/js/pages/dashboard_1.init.js"></script>
|
||||
|
||||
<script src="assets/js/app.js"></script>
|
||||
|
||||
<!--数据绑定-->
|
||||
<script type="text/javascript">
|
||||
var vm = new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
indexCount: [],
|
||||
indexRunStatus: [],
|
||||
indexWarnCount: [],
|
||||
indexWarnTypePieInfo: [],
|
||||
IndexWarnDeviceList: [],
|
||||
indexEvent:[]
|
||||
},
|
||||
created: function () {
|
||||
this.getIndexCount();
|
||||
this.getIndexRunStatus();
|
||||
this.getIndexWarnCount();
|
||||
this.getIndexWarnTypePie();
|
||||
this.getIndexWarnTypePieInfo();
|
||||
this.getIndexWarnDeviceList();
|
||||
this.getIndexEvent();
|
||||
this.getIndexLine();
|
||||
},
|
||||
methods: {
|
||||
// 消毒灭菌次数详情
|
||||
getIndexCount: function () {
|
||||
let _this = this;
|
||||
$.ajax({
|
||||
url: '?c=index&a=getIndexCount',
|
||||
type: 'get',
|
||||
dataType: 'json',
|
||||
success: function(mes) {
|
||||
_this.indexCount = mes.data
|
||||
},
|
||||
error: function (msg) {
|
||||
console.info('ajax请求失败!')
|
||||
}
|
||||
})
|
||||
},
|
||||
// 查看当前设备运行状态
|
||||
getIndexRunStatus: function () {
|
||||
let _this = this;
|
||||
$.ajax({
|
||||
url: '?c=index&a=getIndexRunStatus',
|
||||
type: 'get',
|
||||
dataType: 'json',
|
||||
success: function(mes) {
|
||||
_this.indexRunStatus = mes.data
|
||||
},
|
||||
error: function (msg) {
|
||||
console.info('ajax请求失败!')
|
||||
}
|
||||
})
|
||||
},
|
||||
// 查看消毒灭菌统计
|
||||
getIndexLine: function () {
|
||||
let _this = this;
|
||||
$.ajax({
|
||||
url: '?c=index&a=getIndexLine',
|
||||
type: 'get',
|
||||
dataType: 'json',
|
||||
success: function(mes) {
|
||||
var options={chart:{height:350,type:"bar",toolbar:{show:!1}},plotOptions:{bar:{horizontal:!1,columnWidth:"45%",endingShape:"rounded"}},dataLabels:{enabled:!1},stroke:{show:!0,width:2,colors:["transparent"]},series:[{name:"灭菌次数",data:mes.data.count},{name:"合格灭菌次数",data:mes.data.qualifiedCount}],colors:["#5664d2","#1cbb8c","#fcb92c"],xaxis:{categories:mes.data.time},grid:{borderColor:"#f1f1f1",padding:{bottom:10}},fill:{opacity:1},tooltip:{y:{formatter:function(e){return e}}},legend:{offsetY:7}};(chart=new ApexCharts(document.querySelector("#line-column-chart"),options)).render();
|
||||
},
|
||||
error: function (msg) {
|
||||
console.info('ajax请求失败!')
|
||||
}
|
||||
})
|
||||
},
|
||||
// 预警详情
|
||||
getIndexWarnCount: function () {
|
||||
let _this = this;
|
||||
$.ajax({
|
||||
url: '?c=index&a=getIndexWarnCount',
|
||||
type: 'get',
|
||||
dataType: 'json',
|
||||
success: function(mes) {
|
||||
_this.indexWarnCount = mes.data
|
||||
},
|
||||
error: function (msg) {
|
||||
console.info('ajax请求失败!')
|
||||
}
|
||||
})
|
||||
},
|
||||
getIndexWarnTypePie: function () {
|
||||
let _this = this;
|
||||
$.ajax({
|
||||
url: '?c=index&a=getIndexWarnTypePie',
|
||||
type: 'get',
|
||||
dataType: 'json',
|
||||
success: function(mes) {
|
||||
var options={series:mes.data,chart:{height:230,type:"donut"},labels:["温度预警","压力预警","时间预警"],plotOptions:{pie:{donut:{size:"75%"}}},dataLabels:{enabled:!1},legend:{show:!1},colors:["#5664d2","#1cbb8c","#eeb902"]};(chart=new ApexCharts(document.querySelector("#donut-chart"),options)).render();
|
||||
},
|
||||
error: function (msg) {
|
||||
console.info('ajax请求失败!')
|
||||
}
|
||||
})
|
||||
},
|
||||
getIndexWarnTypePieInfo: function () {
|
||||
let _this = this;
|
||||
$.ajax({
|
||||
url: '?c=index&a=getIndexWarnTypePieInfo',
|
||||
type: 'get',
|
||||
dataType: 'json',
|
||||
success: function(mes) {
|
||||
_this.indexWarnTypePieInfo = mes.data
|
||||
},
|
||||
error: function (msg) {
|
||||
console.info('ajax请求失败!')
|
||||
}
|
||||
})
|
||||
},
|
||||
// 报警设备列表
|
||||
getIndexWarnDeviceList: function () {
|
||||
let _this = this;
|
||||
$.ajax({
|
||||
url: '?c=index&a=getIndexWarnDeviceList',
|
||||
type: 'get',
|
||||
dataType: 'json',
|
||||
success: function(mes) {
|
||||
_this.IndexWarnDeviceList = mes.data
|
||||
},
|
||||
error: function (msg) {
|
||||
console.info('ajax请求失败!')
|
||||
}
|
||||
})
|
||||
},
|
||||
// 事件数据
|
||||
getIndexEvent: function () {
|
||||
let _this = this;
|
||||
$.ajax({
|
||||
url: '?c=index&a=getIndexEvent',
|
||||
type: 'get',
|
||||
dataType: 'json',
|
||||
success: function(mes) {
|
||||
_this.indexEvent = mes.data
|
||||
},
|
||||
error: function (msg) {
|
||||
console.info('ajax请求失败!')
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
</script>
|
||||
<!--数据绑定-->
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,48 @@
|
||||
<div class="hero-unit">
|
||||
<h1>TRY LazyPHP3 !</h1>
|
||||
<p></p>
|
||||
<p>LazyPHP是一个轻框架.</p>
|
||||
<p>
|
||||
之所以开发这么一个框架,是因为其他框架给的太多。在高压力的情况下,ORM和盘根错节的对象树反而将简单的页面请求处理复杂化,在调试和性能上带来反面效果。</p>
|
||||
|
||||
<p>
|
||||
LP采用函数式接口封装对象,对内通过面向对象实现代码重用,对外则提供简明扼要的操作函数。开发者甚至不用理解面向对象就能很好的使用,这让一些初级程序员很容易就开发出强壮的应用。</p>
|
||||
</p>
|
||||
<p><a class="btn btn-primary btn-large" href="http://ftqq.com/lazyphp/" target="_blank">帮助文档 »</a></p>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<div class="span4">
|
||||
<h2>Ajax</h2>
|
||||
<p><div id="iii"><a href="javascript:loadit()">点我通过Ajax加载页面</a></div> </p>
|
||||
<p><a href="?a=test" target="_blank">通过Web请求test Action</a></p>
|
||||
|
||||
<form action="?a=test" id="theform" class="well">
|
||||
<input type="text" name="user" value="LazyPHP" />
|
||||
<input type="button" class="btn" value="通过Ajax请求test Action(弹窗)" onclick="send_form_pop( 'theform' )" />
|
||||
</form>
|
||||
<form action="?a=ajax_test" id="theform2" class="well">
|
||||
<input type="text" name="user" value="LazyPHP" />
|
||||
<input type="button" class="btn" value="通过Ajax提交form,form内显示提示" onclick="send_form_in( 'theform2' )" />
|
||||
</form>
|
||||
</div><!--/span-->
|
||||
<div class="span4">
|
||||
<h2>多层Layout</h2>
|
||||
<p> <a href="?a=rest" target="_blank">Rest Layout 正确返回值</a></p>
|
||||
<p><a href="?a=rest&o=1" target="_blank">错误返回值</a></p>
|
||||
<p><a href="?a=mobile" target="_blank">移动Layout</a></p>
|
||||
|
||||
</div><!--/span-->
|
||||
<div class="span4">
|
||||
<h2>单元测试</h2>
|
||||
<p> <a href="test/index.html" target="_blank">集成JSUnit测试框架:Qunit</a></p>
|
||||
<p><a href="test/index.php" target="_blank">集成PHPUnit测试框架:SimpleTest</a> </p>
|
||||
</div><!--/span-->
|
||||
</div><!--/row-->
|
||||
|
||||
|
||||
<script>
|
||||
function loadit()
|
||||
{
|
||||
$("#iii").load( '?a=ajax_load' );
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1 @@
|
||||
<div class="cbox">测试页面</div>
|
||||
@@ -0,0 +1,20 @@
|
||||
<div class="well sidebar-nav">
|
||||
<ul class="nav nav-list">
|
||||
<li class="nav-header">Sidebar</li>
|
||||
<li class="active"><a href="#">Link</a></li>
|
||||
<li><a href="#">Link</a></li>
|
||||
<li><a href="#">Link</a></li>
|
||||
<li><a href="#">Link</a></li>
|
||||
<li class="nav-header">Sidebar</li>
|
||||
<li><a href="#">Link</a></li>
|
||||
<li><a href="#">Link</a></li>
|
||||
<li><a href="#">Link</a></li>
|
||||
<li><a href="#">Link</a></li>
|
||||
<li><a href="#">Link</a></li>
|
||||
<li><a href="#">Link</a></li>
|
||||
<li class="nav-header">Sidebar</li>
|
||||
<li><a href="#">Link</a></li>
|
||||
<li><a href="#">Link</a></li>
|
||||
<li><a href="#">Link</a></li>
|
||||
</ul>
|
||||
</div><!--/.well -->
|
||||
Reference in New Issue
Block a user