<!doctype html>
<meta name= "viewport" content= "initial-scale=1, user-scalable=0, Minimal-ui" charset= "GBK" >
<title> follow-up plan and follow-up record app</title>
<style>
*{
margin:0;
padding:0;
-webkit-tap-highlight-color:rgba (0,0,0,0);
-webkit-text-size-adjust:none;
}
html{
font-size:10px;
}
body{
Background-color: #f5f5f5;
Font-size:1.2em;
}
. tab{
Display:-webkit-box;
Display:-webkit-flex;
Display:-ms-flexbox;
Display:flex;
height:44px;
line-height:44px;
/*border-bottom:1px solid #1097E1;
Background-color: #eee;
}
. tab. item{
Display:block;
-webkit-box-flex:1;
-webkit-flex:1;
-ms-flex:1;
Flex:1;
width:100%;
font-size:14px;
Text-align:center;
Color: #333;
Text-decoration:none;
}
. tab. cur{
height:42px;
border-bottom:2px solid #1097E1;
Color: #1097E1;
}
. content{
Background-color: #fff;
}
. Content. item{
Display:-webkit-box;
Display:-webkit-flex;
Display:-ms-flexbox;
Display:flex;
-ms-flex-align:center;
-webkit-box-align:center;
Box-align:center;
-webkit-align-items:center;
Align-items:center;
padding:3.125%;
border-bottom:1px solid #ddd;
Color: #333;
Text-decoration:none;
}
. Content. Item img{
Display:block;
width:40px;
height:40px;
border:1px solid #ddd;
}
. Content. Item h3{
Display:block;
-webkit-box-flex:1;
-webkit-flex:1;
-ms-flex:1;
Flex:1;
width:100%;
max-height:40px;
Overflow:hidden;
line-height:20px;
Margin:0 10px;
Font-size:1.2rem;
}
. Content. Item. date{
Display:block;
height:20px;
line-height:20px;
Color: #999;
}
. opacity{
-webkit-animation:opacity 0.3s linear;
Animation:opacity 0.3s linear;
}
@-webkit-keyframes Opacity {
0% {
opacity:0;
}
100% {
Opacity:1;
}
}
@keyframes Opacity {
0% {
opacity:0;
}
100% {
Opacity:1;
}
}
i{
Height:auto!important;
}
</style>
<link rel= "stylesheet" href= ". /css/bootstrap.min.css "/>
<link rel= "stylesheet" href= ". /css/dropload.css ">
<body>
<div class= "tab" >
<a href= "javascript:;" class= "Item cur" > Follow-up plan </a>
<a href= "javascript:;" class= "Item" > Follow-up record </a>
</div>
<div class= "Content" style= "font-size:15px;" >
<div class= "lists" style= "Background-color: #eee;" ></div>
<div class= "lists" style= "Background-color: #eee;" ></div>
</div>
<!--case Address
Http://www.jq22.com/jquery-info6960-->
<!--jQuery1.7 or Zepto Two select one, do not both reference--
<script src= ". /js/jquery-1.7.2.min.js "></script>
<script src= ". /js/dropload.min.js "></script>
<script>
$ (function () {
var itemIndex = 0;
var tab1loadend = false;
var tab2loadend = false;
var loginusrid= window.localStorage.getItem ("Xmidware_app_usrguid");
var loginusrid= "590f10d447dc4ecee050007f01003690";
tab
$ ('. tab. Item '). On (' click ', function () {
var $this = $ (this);
ItemIndex = $this. Index ();
$this. addclass (' cur '). Siblings ('. Item '). Removeclass (' cur ');
$ ('. Lists '). EQ (ItemIndex). Show (). Siblings ('. Lists '). Hide ();
If the selected dish is single
if (ItemIndex = = ' 0 ') {
If the data is not finished loading
if (!tab1loadend) {
Unlock
Dropload.unlock ();
Dropload.nodata (FALSE);
}else{
Lock
Dropload.lock (' Down ');
Dropload.nodata ();
}
If menu two is selected
}else if (ItemIndex = = ' 1 ') {
if (!tab2loadend) {
Unlock
Dropload.unlock ();
Dropload.nodata (FALSE);
}else{
Lock
Dropload.lock (' Down ');
Dropload.nodata ();
}
}
Reset
Dropload.resetload ();
});
var counter = 0;
var counter1=0;
Show 4 per page
Dropload
var dropload = $ ('. Content '). Dropload ({
Scrollarea:window,
Loaddownfn:function (Me) {
Loading single-dish data
if (ItemIndex = = ' 0 ') {
counter++;
$.ajax ({
Type: ' Post ',
URL: ' https://tsch.fromfuture.cn:7714/GZ/v1/cloud/queryPageHzsfjh?usrguid= ' +loginusrid+ ' &pageSize=3& Pageno= ' +counter,
Success:function (data) {
data = Data.trim ();
data = Data.replace (/\n/g, ");
data = json.parse (data)
Console.log (Data.data)
var data=data.data;
var result = ';
/* pageend = num * counter;
Pagestart = pageend-num;*/
Console.log (data.parameterType.length);
if (data.parametertype.length>0) {
for (var i = 0; i < data.parameterType.length; i++) {
DOM Fetch database Data
var followdatetime = Data.parametertype[i].followdatetime;
var name = Data.parametertype[i].name;
var deptnam = Data.parametertype[i].deptnam;
var followoption = data.parametertype[i].followoption;
var STRs = new Array (); Define an array
STRs = Followoption.split (","); Character segmentation
Console.log (STRs);
var ss = ';
Insert I
for (j = 0; J < Strs.length; J + +) {
Console.log (Strs[j]);
SS + = ' <i style= "margin-top:5px;border:1px solid #1097E1; font-style:normal;display:inline-block;height:25px; line-height:24px;padding:0 8px;border-radius:10px;color: #1097E1; margin-left:5px;font-size:13px; " > ' + strs[j] + ' </i> ';
Console.log (ss);
}
Console.log (followoption);
Result + = ' <div class= "opacity" style= "padding:0 30px;background: #fff;" > ';
Result + = ' <p class= ' > ';
Result + = ' <span class= ' > Date:</span> ';
Result + = ' <span class= ' > ' + followdatetime + ' </span> ';
Result + = ' </p> ';
Result + = ' <p class= ' > ';
Result + = ' <span class= ' > Doctor:</span> ';
Result + = ' <span class= ' > ' + name + ' </span> ';
Result + = ' </p> ';
Result + = ' <p class= ' > ';
Result + = ' <span class= ' > Department:</span> ';
Result + = ' <span class= ' > ' + deptnam + ' </span> ';
Result + = ' </p> ';
Result + = ' <p style= "padding-bottom:10px;" > ';
Result + = ' <span class= ' > Follow-up content:</span> ';
Result + = ' <span style= "width:77%;margin-top: -3px;" Id= "Followoption" > ";
Result + = SS
Result + = ' </span> ';
Result + = ' </p> ';
Result + = ' </div> ';
Result + = ' <p style= ' margin-top:13px;background: #fff;p adding-top:11px;padding-bottom:11px;padding-left:30px; Text-align:right;cursor:pointer; " > ';
Result + = ' <span style= ' color: #00A8EC; " > Enter the follow-up clinic </span> ';
Result + = ' <i class= "Glyphicon glyphicon-menu-right" style= "Margin-right:25px;height:40px;line-height:40px;color : #E2E2E2; " ></i> ';
Result + = ' </p> ';
}
}else{
Data is finished loading
Tab1loadend = true;
Lock
Me.lock ();
Countless data
Me.nodata ();
}
For testing, delay 1 seconds to load
SetTimeout (function () {
$ ('. Lists '). EQ (itemIndex). append (result);
Each time the data is loaded, it must be reset
Me.resetload ();
},1000);
},
Error:function (XHR, type) {
Alert (' Ajax error! ');
Reset even if loading is wrong
Me.resetload ();
}
});
Load the data for menu two
}else if (ItemIndex = = ' 1 ') {
counter1++;
Console.log (111);
$.ajax ({
Type: ' Post ',
URL: ' https://tsch.fromfuture.cn:7714/GZ/Docpre/GetDTfollowupRecordPC?usrguid= ' +loginusrid+ ' &pagesize=3 &pageno= ' +counter1,
Success:function (data) {
Console.log (data)
data = Data.trim ();
data = Data.replace (/\n/g, ");
data = json.parse (data)
Console.log (Data.data.parameterType)
var A=data.data.parametertype;
var result = ';
if (a.length>0) {
for (var i = 0; I <a.length; i++) {
DOM Fetch database Data
var followdatetime = A[i].followdatetime;
var name = A[i].name;
var department = A[i].department;
var followoption = a[i].followoption;
var guid = A[i].guid;
var STRs = new Array (); Define an array
STRs = Followoption.split (","); Character segmentation
Console.log (followoption);
var ss = ';
Insert I
for (j = 0; J < Strs.length; J + +) {
Console.log (Strs[j]);
SS + = ' <i style= "margin-top:5px;border:1px solid #1097E1; font-style:normal;display:inline-block;height:25px; line-height:24px;padding:0 8px;border-radius:10px;color: #1097E1; margin-left:5px;font-size:13px; " > ' + strs[j] + ' </i> ';
Console.log (ss);
}
Result + = ' <div class= "opacity" style= "padding:0 30px;background: #fff;" > ';
Result + = ' <p class= ' > ';
Result + = ' <span class= ' > Date:</span> ';
Result + = ' <span class= ' > ' +followdatetime+ ' </span> ';
Result + = ' </p> ';
Result + = ' <p class= ' > ';
Result + = ' <span class= ' > Doctor:</span> ';
Result + = ' <span class= ' > ' +name+ ' </span> ';
Result + = ' </p> ';
Result + = ' <p class= ' > ';
Result + = ' <span class= ' > Department:</span> ';
Result + = ' <span class= ' > ' +department+ ' </span> ';
Result + = ' </p> ';
Result + = ' <p style= "padding-bottom:10px;" > ';
Result + = ' <span class= ' > Follow-up content:</span> ';
Result + = ' <span style= "width:77%;margin-top: -3px; id=" followoption ">";
Result + = SS
Result + = ' </span> ';
Result + = ' </p> ';
Result + = ' </div> ';
Result + = ' <p class= "detail" value= "' +guid+ '" style= "Margin-top:13px;background: #fff;p adding-top:11px; Padding-bottom:11px;padding-left:30px;text-align:right;cursor:pointer; " > ';
Result + = ' <span style= ' color: #00A8EC; " > View Details </span> ';
Result + = ' <i class= "Glyphicon glyphicon-menu-right" style= "Margin-right:25px;height:40px;line-height:40px;color : #E2E2E2; " ></i> ';
Result + = ' </p> ';
}
If there is no data
}else{
Tab2loadend = true;
Lock
Me.lock ();
Countless data
Me.nodata ();
}
For testing, delay 1 seconds to load
SetTimeout (function () {
$ ('. Lists '). EQ (itemIndex). append (result);
$ ('. Detail '). Click (function () {
The GUID that the interface gets, the GUID that is passed to the detail page
var Currentguid = $ (this). attr (' value ');
alert (CURRENTGUID);
window.open ("Followupdetails_app.html? Currentguid= "+ currentguid);
})
Each time the data is loaded, it must be reset
Me.resetload ();
},1000);
},
Error:function (XHR, type) {
Alert (' Ajax error! ');
Reset even if loading is wrong
Me.resetload ();
}
});
}
}
});
});
</script>
</body>
Mobile two div toggle, up-Slide loading