operater_log_win.html
6.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
<meta name="referrer" content="no-referrer">
<title>操作日志_win</title>
<link rel="stylesheet" type="text/css" href="http://iot.uccc.cc:9090/app/css/api.css"/>
<link rel="stylesheet" type="text/css" href="http://iot.uccc.cc:9090/app/css/aui.css"/>
<link rel="stylesheet" type="text/css" href="http://iot.uccc.cc:9090/app/css/style.css"/>
<style>
html,
body{
background-color: #F4F6F9;
}
</style>
</head>
<body>
<header class="aui-header-bar" style="padding-top:30px;background-color:#5B7FF8">
<div class="aui-header-left" tapmode onclick="closeWin();">
<i class="aui-iconfont aui-icon-left" style="color:#FFFFFF;font-size:16px;">返回</i>
</div>
<div class="aui-title title-font">操作日志</div>
<div class="aui-header-right">
</div>
</header>
<div style="height:94px;background-color:#FFFFFF;box-shadow:0px 0px 16px 0px rgba(55,57,78,0.05);">
<div class="store01001-operate-protect-title">
<div style="margin-left:15px;margin-right:15.5px;">
<div class="aui-row aui-row-flex">
<div class="aui-col aui-col-span-1" style="margin-top: 1rem;">
<div class="store01001-operate-log-title-sign"></div>
</div>
<div class="aui-col aui-col-span-23">
<span class="store01001-operate-log-device-name" id="device_imei">设备编号:000000000000000</span>
</div>
</div>
</div>
</div>
<div style="margin-left:15px;margin-right:15.5px;margin-top:0.1rem;height:1px;background:rgba(240,245,255,1);"></div>
<div class="search-view-inline">
<div class="select-list aui-ellipsis-1" style="width: 100%;" tapmode onclick="selectDate();">
<span class="store01001-operate-choose-device-title" id="select_date">请选择日期</span>
<i></i>
</div>
<!-- <label style="background-color:rgba(240,245,255,1);"></label>
<div class="select-list aui-ellipsis-1" style="width: 50%;" tapmode onclick="selectActionType();">
<span class="store01001-operate-choose-device-title" id="select_status">设备控制</span>
<i></i>
</div> -->
</div>
</div>
<footer></footer>
</body>
<script type="text/javascript" src="http://iot.uccc.cc:9090/app/js/api.js"></script>
<script type="text/javascript" src="http://iot.uccc.cc:9090/app/js/common.js"></script>
<script type="text/javascript">
var defaultImei;
var h;
var f;
var selected_status = '设备控制';
var selected_time = '';
var statusList = get_ty401_operateTypes()
apiready = function(){
api.parseTapmode();
var header = $api.dom('header'); // 获取 header 标签元素
var footer = $api.dom('footer'); // 获取 footer 标签元素
var headerH = $api.fixStatusBar(header);
var footerH = $api.fixTabBar(footer);
h = headerH;
f = footerH;
defaultImei = api.pageParam.imei
$api.html($api.byId("device_imei"), '设备编号:'+ defaultImei);
var openJson = {
name: 'operaterLog_frm',
url: 'http://iot.uccc.cc:9090/app_html/store02000/operaterLog_frm.html',
// url: './operaterLog_frm.html',
rect: {
x: 0,
y: headerH+94,
w: api.winWidth,
h: api.winHeight-headerH-footerH-94
},
bounces: true,
bgColor: '#F4F6F9',
pageParam: {
f: footerH,
h: headerH,
productId: api.pageParam.productId,
imei: api.pageParam.imei
},
hScrollBarEnabled: true,
vScrollBarEnabled: true
};
api.openFrame(openJson);
api.addEventListener({
name: 'changeOperaterType4Log'
}, function(ret, err){
if( ret ){
selected_status = ret.value.curName;
$api.html($api.byId('select_status'), selected_status);
}
});
api.addEventListener({
name: 'cleanOperaterCondition'
}, function(ret, err){
if( ret ){
selected_time = '';
$api.html($api.byId('select_date'), '请选择日期');
}
});
};
function selectDate() {
var date_;
if (selected_time == '') {
date_ = new Date();
}else {
date_ = selected_time;
}
api.openPicker({
type: 'date',
date: selected_time,
title: '操作日期'
}, function(ret, err) {
if (ret) {
var allDate = timeFormater(ret.year,ret.month,ret.day);
var date = new Date(allDate);
var curdate = new Date();
if (curdate.getTime() >= date.getTime()) {
api.sendEvent({
name: 'chanegOperateSearchDate',
extra: {
selected_time: allDate,
}
});
selected_time = allDate;
$api.html($api.byId('select_date'), selected_time);
}else {
addAlert('请选择有效查询日期');
}
}
});
}
function selectActionType() {
var openSelectJson = {
name: 'operaterTypeSelecter',
url: 'http://iot.uccc.cc:9090/app_html/store03001/operaterTypeSelecter.html',
// url: './operaterTypeSelecter.html',
rect: {
x: 0,
// y: api.winHeight-203,
y: h,
w: api.winWidth,
h: api.winHeight-h-f
},
pageParam: {
from: 1,
},
bounces: false,
animation: {
type:"fade", //动画类型(详见动画类型常量)
subType:"from_bottom", //动画子类型(详见动画子类型常量)
duration:300 //动画过渡时间,默认300毫秒
}
};
api.openFrame(openSelectJson);
}
function closeWin() {
api.closeWin();
}
</script>
</html>