虽然好像到现在为止只有几个人看了,但是心塞的作者还是给大家放一下网站的目录伐,
其中两个文件夹中可以忽略,存放css和js样式的,但是实践证明必须导入外部文件中的内容,额,js和css存放在图片2所示。
所以接下来就到了正文,先放一下登陆和注册的界面代码以及图片吧,首先是注册界面,需要注意的有什么呢,<input name=“count” type=“text” 这个代表的是输入框,name和视图中的对应。a href="/denglu/">登陆!这个算是链接的一种方式,可以引导入url中的denglu,另一种就是常规的登陆formbutton形式
<button id=“btn” type=“submit” ; style=“position:absolute;margin-left:1080px;margin-top:-411px;background-color:#0088CC;color:white;width:100px;height:35px;z-index:50”>
登陆
这个样子
<!doctype html>
<html class="fixed">
<head>
<!-- Basic -->
<meta charset="UTF-8">
<meta name="keywords" content="HTML5 Admin Template" />
<meta name="description" content="Porto Admin - Responsive HTML5 Template">
<meta name="author" content="okler.net">
<!-- Mobile Metas -->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<!-- Web Fonts -->
<link href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800|Shadows+Into+Light" rel="stylesheet" type="text/css">
<!-- Vendor CSS -->
<link rel="stylesheet" href="../static/style/style1/assets/vendor/bootstrap/css/bootstrap.css" />
<link rel="stylesheet" href="../static/style/style1/assets/vendor/font-awesome/css/font-awesome.css" />
<link rel="stylesheet" href="../static/style/style1/assets/vendor/magnific-popup/magnific-popup.css" />
<link rel="stylesheet" href="../static/style/style1/assets/vendor/bootstrap-datepicker/css/datepicker3.css" />
<!-- Theme CSS -->
<link rel="stylesheet" href="../static/style/style1/assets/stylesheets/theme.css" />
<!-- Skin CSS -->
<link rel="stylesheet" href="../static/style/style1/assets/stylesheets/skins/default.css" />
<!-- Theme Custom CSS -->
<link rel="stylesheet" href="../static/style/style1/assets/stylesheets/theme-custom.css">
<!-- Head Libs -->
<script src="../static/style/style1/assets/vendor/modernizr/modernizr.js"></script>
</head>
<body>
{% if a == 1 %}
<h1 style="position:absolute;margin-left:810px;margin-top:600px;color:black;background-color:#FFFFF0; font-size:20px">
注册失败,请保证两次密码相同
</h1>
{%endif%}
{% if a == 2 %}
<h1 style="position:absolute;margin-left:810px;margin-top:600px;color:black;background-color:#FFFFF0; font-size:20px">
注册失败,该账户ID已被注册
</h1>
{%endif%}
<!-- start: page -->
<section class="body-sign">
<div class="center-sign">
<div class="panel panel-sign">
<div class="panel-title-sign mt-xl text-right">
<h2 class="title text-uppercase text-bold m-none"><i class="fa fa-user mr-xs"></i> 注册</h2>
</div>
<div class="panel-body">
<form method="post" action="/zhuce2/">
<div class="form-group mb-lg">
<label>账号</label>
<input name="count" type="text" autocomplete="off" class="form-control input-lg" />
</div>
<div class="form-group mb-lg">
<label>邮箱</label>
<input name="username" type="email" autocomplete="off" class="form-control input-lg" />
</div>
<div class="form-group mb-none">
<div class="row">
<div class="col-sm-6 mb-lg">
<label>密码</label>
<input name="mima" type="password" autocomplete="off" class="form-control input-lg" />
</div>
<div class="col-sm-6 mb-lg">
<label>密码确认</label>
<input name="mima2" type="password" autocomplete="off" class="form-control input-lg" />
</div>
</div>
</div>
<div class="row">
<div class="col-sm-8">
<div class="checkbox-custom checkbox-default">
<input id="AgreeTerms" name="agreeterms" type="checkbox" />
</div>
</div>
<div class="col-sm-4 text-right">
<button type="submit" class="btn btn-primary hidden-xs">注册</button>
<button type="submit" class="btn btn-primary btn-block btn-lg visible-xs mt-lg">注册</button>
</div>
</div>
<span class="mt-lg mb-lg line-thru text-center text-uppercase">
<span>or</span>
</span>
<p class="text-center">
已有帐户? <a href="/denglu/">登陆!</a>
</p>
<h1 style="position:absolute;margin-left:120px;margin-top:-480px;color:black; font-size:20px">
汽轮机故障告警系统
</h1>
</form>
</div>
</div>
<p class="text-center text-muted mt-md mb-md"> </p>
</div>
</section>
<!-- end: page -->
<!-- Vendor -->
<script src="../static/style/style1/assets/vendor/jquery/jquery.js"></script>
<script src="../static/style/style1/assets/vendor/jquery-browser-mobile/jquery.browser.mobile.js"></script>
<script src="../static/style/style1/assets/vendor/bootstrap/js/bootstrap.js"></script>
<script src="../static/style/style1/assets/vendor/nanoscroller/nanoscroller.js"></script>
<script src="../static/style/style1/assets/vendor/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
<script src="../static/style/style1/assets/vendor/magnific-popup/magnific-popup.js"></script>
<script src="../static/style/style1/assets/vendor/jquery-placeholder/jquery.placeholder.js"></script>
<!-- Theme Base, Components and Settings -->
<script src="../static/style/style1/assets/javascripts/theme.js"></script>
<!-- Theme Custom -->
<script src="../static/style/style1/assets/javascripts/theme.custom.js"></script>
<!-- Theme Initialization Files -->
<script src="../static/style/style1/assets/javascripts/theme.init.js"></script>
</body>
</html>
其次是登陆界面
<!doctype html>
<html class="fixed">
<head>
<!-- Basic -->
<meta charset="UTF-8">
<meta name="keywords" content="HTML5 Admin Template" />
<meta name="description" content="Porto Admin - Responsive HTML5 Template">
<meta name="author" content="okler.net">
<!-- Mobile Metas -->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<!-- Web Fonts -->
<link href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800|Shadows+Into+Light" rel="stylesheet" type="text/css">
<!-- Vendor CSS -->
<link rel="stylesheet" href="../static/style/style1/assets/vendor/bootstrap/css/bootstrap.css" />
<link rel="stylesheet" href="../static/style/style1/assets/vendor/font-awesome/css/font-awesome.css" />
<link rel="stylesheet" href="../static/style/style1/assets/vendor/magnific-popup/magnific-popup.css" />
<link rel="stylesheet" href="../static/style/style1/assets/vendor/bootstrap-datepicker/css/datepicker3.css" />
<!-- Theme CSS -->
<link rel="stylesheet" href="../static/style/style1/assets/stylesheets/theme.css" />
<!-- Skin CSS -->
<link rel="stylesheet" href="../static/style/style1/assets/stylesheets/skins/default.css" />
<!-- Theme Custom CSS -->
<link rel="stylesheet" href="../static/style/style1/assets/stylesheets/theme-custom.css">
<!-- Head Libs -->
<script src="../static/style/style1/assets/vendor/modernizr/modernizr.js"></script>
</head>
<body>
<section class="body-sign">
<div class="center-sign">
<div class="panel panel-sign">
<div class="panel-title-sign mt-xl text-right">
<h2 class="title text-uppercase text-bold m-none"><i class="fa fa-user mr-xs"></i>登陆</h2>
</div>
<div class="panel-body">
<div class="form-group mb-lg">
<label>账号</label>
<div class="input-group input-group-icon">
<!--账户-->
<input name="a" type="text" class="form-control input-lg" />
<span class="input-group-addon">
<span class="icon icon-lg">
<i class="fa fa-user"></i>
</span>
</span>
</div>
</div>
<div class="form-group mb-lg">
<div class="clearfix">
<label class="pull-left">密码</label>
</div>
<div class="input-group input-group-icon">
<!--密码-->
<input name="b" type="text" class="form-control input-lg" />
<span class="input-group-addon">
<span class="icon icon-lg">
<i class="fa fa-lock"></i>
</span>
</span>
</div>
</div>
<div class="row">
<div class="col-sm-8">
<div class="checkbox-custom checkbox-default">
</div>
</div>
<div class="col-sm-4 text-right">
<button type="submit" class="btn btn-primary hidden-xs">&ntsp</button>
<button type="submit" class="btn btn-primary btn-block btn-lg visible-xs mt-lg">&ntsp</button>
</div>
</div>
<span class="mt-lg mb-lg line-thru text-center text-uppercase">
<span>or</span>
</span>
<p class="text-center">没有账户? <a href="/zhuce/">注册!</a></p>
</div>
</div>
<p class="text-center text-muted mt-md mb-md"> </p>
</div>
</section>
<!-- end: page -->
<!-- Vendor -->
<script src="../static/style/style1/assets/vendor/jquery/jquery.js"></script>
<script src="../static/style/style1/assets/vendor/jquery-browser-mobile/jquery.browser.mobile.js"></script>
<script src="../static/style/style1/assets/vendor/bootstrap/js/bootstrap.js"></script>
<script src="../static/style/style1/assets/vendor/nanoscroller/nanoscroller.js"></script>
<script src="../static/style/style1/assets/vendor/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
<script src="../static/style/style1/assets/vendor/magnific-popup/magnific-popup.js"></script>
<script src="../static/style/style1/assets/vendor/jquery-placeholder/jquery.placeholder.js"></script>
<!-- Theme Base, Components and Settings -->
<script src="../static/style/style1/assets/javascripts/theme.js"></script>
<!-- Theme Custom -->
<script src="../static/style/style1/assets/javascripts/theme.custom.js"></script>
<!-- Theme Initialization Files -->
<script src="../static/style/style1/assets/javascripts/theme.init.js"></script>
<form method="post" action="/getuser3/">
<button id="btn" type="submit" ; style="position:absolute;margin-left:1080px;margin-top:-411px;background-color:#0088CC;color:white;width:100px;height:35px;z-index:50">
登陆
</button>
<input name="username" type="text"; style="position:absolute;margin-left:750px;margin-top:-569px;color:silver;font-size:20px;z-index:50;width:405px;height:46px" />
<!--对应着账号的输入框-->
<input name="password" type="text" autocomplete="off"; style="position:absolute;margin-left:750px;margin-top:-475px;color:silver;font-size:20px;z-index:50;width:405px;height:46px" />
<!--对应着密码的输入框-->
<h1 style="position:absolute;margin-left:850px;margin-top:-670px;color:black; font-size:20px">
汽轮机故障告警系统
</h1>
</form>
{% if a == 1 %}
<h1 style="position:absolute;margin-left:830px;margin-top:-300px;color:black;background-color:#FFFFF0; font-size:20px">
登陆失败,用户名或密码错误
</h1>
{%endif%}
{% if a == 2 %}
<h1 style="position:absolute;margin-left:920px;margin-top:-300px;color:black;background-color:#FFFFF0; font-size:20px">
注册成功!
</h1>
{%endif%}
</body>
</html>
总结一下,都是在调用了模板的前提下,将自己的核心代码附在上面,需要效果吗,我把最后答辩录制的视频放在更靠后的文档里,如何写一个完整的django网站:配置环境啥的不讲(python+mysql+html相关) 陆,继续看就好。
额,接下来我们还需要有一个比较特殊的内容提一下。
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" type="image/png" sizes="16x16" href="/static/style2/images/favicon.png">
<title>My Admin - is a responsive admin template</title>
<!-- Bootstrap Core CSS -->
<link href="/static/style2/bower_components/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
<!-- Menu CSS -->
<link href="/static/style2/bower_components/metisMenu/dist/metisMenu.min.css" rel="stylesheet">
<!-- Custom CSS -->
<link href="/static/style2/css/style.css" rel="stylesheet">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<script language="JavaScript">
function myrefresh() {
window.location.reload();
}
setTimeout('myrefresh()', 10000);
</script>
<!-- Preloader -->
<div class="preloader">
<div class="cssload-speeding-wheel"></div>
</div>
<div id="wrapper">
<!-- Navigation -->
<nav class="navbar navbar-default navbar-static-top" style="margin-bottom: 0">
<div class="navbar-header">
<a class="navbar-toggle hidden-sm hidden-md hidden-lg " href="javascript:void(0)" data-toggle="collapse" data-target=".navbar-collapse"><i class="ti-menu"></i></a>
<div class="top-left-part"><a class="logo" href="dashboard.html"><i class="glyphicon glyphicon-fire"></i> <span class="hidden-xs"></span></a></div>
<ul class="nav navbar-top-links navbar-left hidden-xs">
<li><a href="javascript:void(0)" class="open-close hidden-xs hidden-lg waves-effect waves-light"><i class="ti-arrow-circle-left ti-menu"></i></a></li>
</ul>
<ul class="nav navbar-top-links navbar-right pull-right">
<li>
<form role="search" class="app-search hidden-xs">
<input type="text" placeholder="Search..." class="form-control">
<a href=""><i class="ti-search"></i></a>
</form>
</li>
<li>
<a class="profile-pic" href="#"> <img src="/static/style2/images/users/hritik.jpg" alt="user-img" width="36" class="img-circle"><b class="hidden-xs">Maruti</b> </a>
</li>
</ul>
</div>
<!-- /.navbar-header -->
<!-- /.navbar-top-links -->
<!-- /.navbar-static-side -->
</nav>
<div class="navbar-default sidebar nicescroll" role="navigation">
<div class="sidebar-nav navbar-collapse ">
<ul class="nav" id="side-menu">
<li class="sidebar-search hidden-sm hidden-md hidden-lg">
<div class="input-group custom-search-form">
<input type="text" class="form-control" placeholder="Search...">
<span class="input-group-btn">
<button class="btn btn-default" type="button"><i class="ti-search"></i> </button>
</span>
</div>
</li>
<li>
<a href="/yuan/" class="waves-effect"><i class="glyphicon glyphicon-fire fa-fw"></i> 汽轮机故障告警系统</a>
</li>
<li>
<a href="/history/" class="waves-effect"><i class="ti-user fa-fw"></i>历史信息查看</a>
</li>
<li>
</li>
<li>
</li>
<li>
</li>
<li>
</li>
<li>
</li>
</ul>
<div class="center p-20">
</div>
</div>
<!-- /.sidebar-collapse -->
</div>
<!-- Page Content -->
<div id="page-wrapper">
<div class="container-fluid">
<div class="row bg-title">
<div class="col-lg-12">
<h4 class="page-title">汽轮机故障告警系统</h4>
<ol class="breadcrumb">
<li></li>
<li />
</ol>
</div>
<!-- /.col-lg-12 -->
</div>
<!-- row -->
<div class="row">
<div class="col-sm-12">
<div class="white-box">
<h3></h3>
<p class="text-muted"></p>
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th> </th>
<th>机组号</th>
<th>故障名称</th>
<th> </th>
<th>时间</th>
</tr>
</thead>
<tbody>
<tr>
<td> </td>
<td>{{a1.quid}}号机组</td>
{% if a1.quenum == 1 %}
<td class="txt-oflo">冷再热压力故障</td>
{%endif%}
{% if a1.quenum == 2 %}
<td class="txt-oflo">再热主汽阀门故障</td>
{%endif%}
{% if a1.quenum == 3 %}
<td class="txt-oflo">高压主汽阀门故障</td>
{%endif%}
{% if a1.quenum == 4 %}
<td class="txt-oflo">中压排气压力故障</td>
{%endif%}
{% if a1.quenum == 5 %}
<td class="txt-oflo">高压排气压力故障</td>
{%endif%}
{% if a1.quenum == 6 %}
<td class="txt-oflo">气封母管蒸汽压力故障</td>
{%endif%}
{% if a1.quenum == 7 %}
<td class="txt-oflo">气封蒸汽压力故障</td>
{%endif%}
{% if a1.quenum == 8 %}
<td class="txt-oflo">电导率故障</td>
{%endif%}
{% if a1.quenum == 9 %}
<td class="txt-oflo">饱和温度偏差故障</td>
{%endif%}
{% if a1.quenum == 10 %}
<td class="txt-oflo">气缸上下半缸温差故障</td>
{%endif%}
{% if a1.quenum == 11 %}
<td class="txt-oflo">轴承巴氏合金温度故障</td>
{%endif%}
{% if a1.quenum == 12 %}
<td class="txt-oflo">蒸气室内外壁温差故障</td>
{%endif%}
{% if a1.quenum == 13 %}
<td class="txt-oflo">进出水口温差故障</td>
{%endif%}
{% if a1.quenum == 14 %}
<td class="txt-oflo">进出水口压差故障</td>
{%endif%}
{% if a1.quenum == 15 %}
<td class="txt-oflo">工作油温</td>
{%endif%}
{% if a1.quenum == 16 %}
<td class="txt-oflo">交流顶轴工作油泵故障</td>
{%endif%}
{% if a1.quenum == 17 %}
<td class="txt-oflo">低压缸轴温度故障</td>
{%endif%}
{% if a1.quenum == 18 %}
<td class="txt-oflo">主蒸汽压力故障</td>
{%endif%}
<td> </td>
<td>{{a1.jlsj}}</td>
</tr>
<tr>
<td> </td>
<td>{{a2.quid}}号机组</td>
{% if a2.quenum == 1 %}
<td class="txt-oflo">冷再热压力故障</td>
{%endif%}
{% if a2.quenum == 2 %}
<td class="txt-oflo">再热主汽阀门故障</td>
{%endif%}
{% if a2.quenum == 3 %}
<td class="txt-oflo">高压主汽阀门故障</td>
{%endif%}
{% if a2.quenum == 4 %}
<td class="txt-oflo">中压排气压力故障</td>
{%endif%}
{% if a2.quenum == 5 %}
<td class="txt-oflo">高压排气压力故障</td>
{%endif%}
{% if a2.quenum == 6 %}
<td class="txt-oflo">气封母管蒸汽压力故障</td>
{%endif%}
{% if a2.quenum == 7 %}
<td class="txt-oflo">气封蒸汽压力故障</td>
{%endif%}
{% if a2.quenum == 8 %}
<td class="txt-oflo">电导率故障</td>
{%endif%}
{% if a2.quenum == 9 %}
<td class="txt-oflo">饱和温度偏差故障</td>
{%endif%}
{% if a2.quenum == 10 %}
<td class="txt-oflo">气缸上下半缸温差故障</td>
{%endif%}
{% if a2.quenum == 11 %}
<td class="txt-oflo">轴承巴氏合金温度故障</td>
{%endif%}
{% if a2.quenum == 12 %}
<td class="txt-oflo">蒸气室内外壁温差故障</td>
{%endif%}
{% if a2.quenum == 13 %}
<td class="txt-oflo">进出水口温差故障</td>
{%endif%}
{% if a2.quenum == 14 %}
<td class="txt-oflo">进出水口压差故障</td>
{%endif%}
{% if a2.quenum == 15 %}
<td class="txt-oflo">工作油温</td>
{%endif%}
{% if a2.quenum == 16 %}
<td class="txt-oflo">交流顶轴工作油泵故障</td>
{%endif%}
{% if a2.quenum == 17 %}
<td class="txt-oflo">低压缸轴温度故障</td>
{%endif%}
{% if a2.quenum == 18 %}
<td class="txt-oflo">主蒸汽压力故障</td>
{%endif%}
<td> </td>
<td>{{a2.jlsj}}</td>
</tr>
<tr>
<td> </td>
<td>{{a3.quid}}号机组</td>
{% if a3.quenum == 1 %}
<td class="txt-oflo">冷再热压力故障</td>
{%endif%}
{% if a3.quenum == 2 %}
<td class="txt-oflo">再热主汽阀门故障</td>
{%endif%}
{% if a3.quenum == 3 %}
<td class="txt-oflo">高压主汽阀门故障</td>
{%endif%}
{% if a3.quenum == 4 %}
<td class="txt-oflo">中压排气压力故障</td>
{%endif%}
{% if a3.quenum == 5 %}
<td class="txt-oflo">高压排气压力故障</td>
{%endif%}
{% if a3.quenum == 6 %}
<td class="txt-oflo">气封母管蒸汽压力故障</td>
{%endif%}
{% if a3.quenum == 7 %}
<td class="txt-oflo">气封蒸汽压力故障</td>
{%endif%}
{% if a3.quenum == 8 %}
<td class="txt-oflo">电导率故障</td>
{%endif%}
{% if a3.quenum == 9 %}
<td class="txt-oflo">饱和温度偏差故障</td>
{%endif%}
{% if a3.quenum == 10 %}
<td class="txt-oflo">气缸上下半缸温差故障</td>
{%endif%}
{% if a3.quenum == 11 %}
<td class="txt-oflo">轴承巴氏合金温度故障</td>
{%endif%}
{% if a3.quenum == 12 %}
<td class="txt-oflo">蒸气室内外壁温差故障</td>
{%endif%}
{% if a3.quenum == 13 %}
<td class="txt-oflo">进出水口温差故障</td>
{%endif%}
{% if a3.quenum == 14 %}
<td class="txt-oflo">进出水口压差故障</td>
{%endif%}
{% if a3.quenum == 15 %}
<td class="txt-oflo">工作油温</td>
{%endif%}
{% if a3.quenum == 16 %}
<td class="txt-oflo">交流顶轴工作油泵故障</td>
{%endif%}
{% if a3.quenum == 17 %}
<td class="txt-oflo">低压缸轴温度故障</td>
{%endif%}
{% if a3.quenum == 18 %}
<td class="txt-oflo">主蒸汽压力故障</td>
{%endif%}
<td> </td>
<td>{{a3.jlsj}}</td>
</tr>
<tr>
<td> </td>
<td>{{a4.quid}}号机组</td>
{% if a4.quenum == 1 %}
<td class="txt-oflo">冷再热压力故障</td>
{%endif%}
{% if a4.quenum == 2 %}
<td class="txt-oflo">再热主汽阀门故障</td>
{%endif%}
{% if a4.quenum == 3 %}
<td class="txt-oflo">高压主汽阀门故障</td>
{%endif%}
{% if a4.quenum == 4 %}
<td class="txt-oflo">中压排气压力故障</td>
{%endif%}
{% if a4.quenum == 5 %}
<td class="txt-oflo">高压排气压力故障</td>
{%endif%}
{% if a4.quenum == 6 %}
<td class="txt-oflo">气封母管蒸汽压力故障</td>
{%endif%}
{% if a4.quenum == 7 %}
<td class="txt-oflo">气封蒸汽压力故障</td>
{%endif%}
{% if a4.quenum == 8 %}
<td class="txt-oflo">电导率故障</td>
{%endif%}
{% if a4.quenum == 9 %}
<td class="txt-oflo">饱和温度偏差故障</td>
{%endif%}
{% if a4.quenum == 10 %}
<td class="txt-oflo">气缸上下半缸温差故障</td>
{%endif%}
{% if a4.quenum == 11 %}
<td class="txt-oflo">轴承巴氏合金温度故障</td>
{%endif%}
{% if a4.quenum == 12 %}
<td class="txt-oflo">蒸气室内外壁温差故障</td>
{%endif%}
{% if a4.quenum == 13 %}
<td class="txt-oflo">进出水口温差故障</td>
{%endif%}
{% if a4.quenum == 14 %}
<td class="txt-oflo">进出水口压差故障</td>
{%endif%}
{% if a4.quenum == 15 %}
<td class="txt-oflo">工作油温</td>
{%endif%}
{% if a4.quenum == 16 %}
<td class="txt-oflo">交流顶轴工作油泵故障</td>
{%endif%}
{% if a4.quenum == 17 %}
<td class="txt-oflo">低压缸轴温度故障</td>
{%endif%}
{% if a4.quenum == 18 %}
<td class="txt-oflo">主蒸汽压力故障</td>
{%endif%}
<td> </td>
<td>{{a4.jlsj}}</td>
</tr>
<tr>
<td> </td>
<td>{{a5.quid}}号机组</td>
{% if a5.quenum == 1 %}
<td class="txt-oflo">冷再热压力故障</td>
{%endif%}
{% if a5.quenum == 2 %}
<td class="txt-oflo">再热主汽阀门故障</td>
{%endif%}
{% if a5.quenum == 3 %}
<td class="txt-oflo">高压主汽阀门故障</td>
{%endif%}
{% if a5.quenum == 4 %}
<td class="txt-oflo">中压排气压力故障</td>
{%endif%}
{% if a5.quenum == 5 %}
<td class="txt-oflo">高压排气压力故障</td>
{%endif%}
{% if a5.quenum == 6 %}
<td class="txt-oflo">气封母管蒸汽压力故障</td>
{%endif%}
{% if a5.quenum == 7 %}
<td class="txt-oflo">气封蒸汽压力故障</td>
{%endif%}
{% if a5.quenum == 8 %}
<td class="txt-oflo">电导率故障</td>
{%endif%}
{% if a5.quenum == 9 %}
<td class="txt-oflo">饱和温度偏差故障</td>
{%endif%}
{% if a5.quenum == 10 %}
<td class="txt-oflo">气缸上下半缸温差故障</td>
{%endif%}
{% if a5.quenum == 11 %}
<td class="txt-oflo">轴承巴氏合金温度故障</td>
{%endif%}
{% if a5.quenum == 12 %}
<td class="txt-oflo">蒸气室内外壁温差故障</td>
{%endif%}
{% if a5.quenum == 13 %}
<td class="txt-oflo">进出水口温差故障</td>
{%endif%}
{% if a5.quenum == 14 %}
<td class="txt-oflo">进出水口压差故障</td>
{%endif%}
{% if a5.quenum == 15 %}
<td class="txt-oflo">工作油温</td>
{%endif%}
{% if a5.quenum == 16 %}
<td class="txt-oflo">交流顶轴工作油泵故障</td>
{%endif%}
{% if a5.quenum == 17 %}
<td class="txt-oflo">低压缸轴温度故障</td>
{%endif%}
{% if a5.quenum == 18 %}
<td class="txt-oflo">主蒸汽压力故障</td>
{%endif%}
<td> </td>
<td>{{a5.jlsj}}</td>
</tr>
<tr>
<td> </td>
<td>{{a6.quid}}号机组</td>
{% if a6.quenum == 1 %}
<td class="txt-oflo">冷再热压力故障</td>
{%endif%}
{% if a6.quenum == 2 %}
<td class="txt-oflo">再热主汽阀门故障</td>
{%endif%}
{% if a6.quenum == 3 %}
<td class="txt-oflo">高压主汽阀门故障</td>
{%endif%}
{% if a6.quenum == 4 %}
<td class="txt-oflo">中压排气压力故障</td>
{%endif%}
{% if a6.quenum == 5 %}
<td class="txt-oflo">高压排气压力故障</td>
{%endif%}
{% if a6.quenum == 6 %}
<td class="txt-oflo">气封母管蒸汽压力故障</td>
{%endif%}
{% if a6.quenum == 7 %}
<td class="txt-oflo">气封蒸汽压力故障</td>
{%endif%}
{% if a6.quenum == 8 %}
<td class="txt-oflo">电导率故障</td>
{%endif%}
{% if a6.quenum == 9 %}
<td class="txt-oflo">饱和温度偏差故障</td>
{%endif%}
{% if a6.quenum == 10 %}
<td class="txt-oflo">气缸上下半缸温差故障</td>
{%endif%}
{% if a6.quenum == 11 %}
<td class="txt-oflo">轴承巴氏合金温度故障</td>
{%endif%}
{% if a6.quenum == 12 %}
<td class="txt-oflo">蒸气室内外壁温差故障</td>
{%endif%}
{% if a6.quenum == 13 %}
<td class="txt-oflo">进出水口温差故障</td>
{%endif%}
{% if a6.quenum == 14 %}
<td class="txt-oflo">进出水口压差故障</td>
{%endif%}
{% if a6.quenum == 15 %}
<td class="txt-oflo">工作油温</td>
{%endif%}
{% if a6.quenum == 16 %}
<td class="txt-oflo">交流顶轴工作油泵故障</td>
{%endif%}
{% if a6.quenum == 17 %}
<td class="txt-oflo">低压缸轴温度故障</td>
{%endif%}
{% if a6.quenum == 18 %}
<td class="txt-oflo">主蒸汽压力故障</td>
{%endif%}
<td> </td>
<td>{{a6.jlsj}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<!-- /.container-fluid -->
</div>
</div>
<!-- /#wrapper -->
<!-- jQuery -->
<script src="/static/style2/bower_components/jquery/dist/jquery.min.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="/static/style2/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<!-- Menu Plugin JavaScript -->
<script src="/static/style2/bower_components/metisMenu/dist/metisMenu.min.js"></script>
<!--Nice scroll JavaScript -->
<script src="/static/style2/js/jquery.nicescroll.js"></script>
<!--Wave Effects -->
<script src="/static/style2/js/waves.js"></script>
<!-- Custom Theme JavaScript -->
<script src="/static/style2/js/myadmin.js"></script>
<form method="post" action="/save/">
<select name="jizu" method="post" runat="server" style="position:absolute;margin-left:900px;margin-top:-200px;background-color:white;color:black;width:200px">
<option id="one" value="one" selected="selected">1号机组</option>
<option id="two" value="two">2号机组</option>
<option id="three" value="three">3号机组</option>
<option id="four" value="four">4号机组</option>
<option id="five" value="five">5号机组</option>
</select>
<select name="zhoucheng" method="post" runat="server" style="position:absolute;margin-left:1200px;margin-top:-200px;background-color:white;color:black;width:200px">
<option id="one" value="one" selected="selected">再热压力比值</option>
<option id="two" value="two">再热主汽阀门进口温差</option>
<option id="three" value="three">高压主汽阀进口温差</option>
<option id="four" value="four">中压排汽压力</option>
<option id="five" value="five">高压排汽压力</option>
<option id="six" value="six">汽封母管蒸汽压力</option>
<option id="seven" value="seven">汽封蒸汽压力</option>
<option id="eight" value="eight">电导率</option>
<option id="nine" value="nine">饱和温度偏差</option>
<option id="ten" value="ten">汽缸上下半缸温差</option>
<option id="ele" value="ele">轴承巴氏合金温度</option>
<option id="twe" value="twe">蒸汽室内壁和外壁温差</option>
<option id="thi" value="thi">疏水口与给水进口温差</option>
<option id="for" value="for">进出水口压差</option>
<option id="fiv" value="fiv">工作油温</option>
<option id="sixt" value="sixt">交流顶轴油泵工作油压</option>
<option id="sev" value="sev">低压缸轴封供汽温度</option>
<option id="eig" value="eig">主蒸汽压力</option>
</select>
<button id="btn" type="submit" ; style="position:absolute;margin-left:1550px;margin-top:-200px;background-color:dodgerblue;color:white; width:100px">
查 看
</button>
</form>
</body>
</html>
最下面这串代码是一个选择框效果,放图的话还需要开服务器就省略了,大家参见陆中信息查看界面的选择效果就好。
最后推一下echat,强推,非常好用的图形,具体的可以见官网,接下来放代码,额,顺带提一下,在html中譬如{{a}}就代表调用视图中传递过来的a这个参数,下面的详细代码可以具体理解,看不懂可以加q939889912,心情好会解答,就这样了,然后下一个里面会放完整的代码,敬请期待。
<!--图表-->
<script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="http://code.highcharts.com/highcharts.js"></script>
<div id="container10" style="position:absolute;width: 1665px; height:500px; margin-left: 235px;margin-top:-730px"></div>
<script type='text/javascript' language="JavaScript">
$(document).ready(function () {
var title = {
text: '机组故障值'
};
var subtitle = {
text: '折线图'
};
var xAxis = {
categories: ['{{t6}}', '{{t5}}', '{{t4}}', '{{t3}}', '{{t2}}', '{{t1}}'
]
};
var yAxis = {
title: {
text: 'Question num'
},
plotLines: [{
value: 0,
width: 1,
color: '#808080'
}]
};
var tooltip = {
valueSuffix: ''
}
var legend = {
layout: 'vertical',
align: 'right',
verticalAlign: 'middle',
borderWidth: 0
};
var series = [
{
name: '{{n}}号机组',
data: [{{ j6 }}, {{ j5 }}, {{ j4 }}, {{ j3 }}, {{ j2 }}, {{ j1 }} ,]
},
];
var json = {};
json.title = title;
json.subtitle = subtitle;
json.xAxis = xAxis;
json.yAxis = yAxis;
json.tooltip = tooltip;
json.legend = legend;
json.series = series;
$('#container10').highcharts(json);
});
</script>