104 lines
3.6 KiB
HTML
104 lines
3.6 KiB
HTML
<div class="easyui-layout" id="result" style="width:100%;height:100%"></div>
|
||
<script type="text/html" id="text">
|
||
{% verbatim %}
|
||
<div data-options="region:'south'" id='southdiv' style="height:50px;text-align:center;padding:5px">
|
||
<!-- <a id="exportword" onclick="exportword()" class="easyui-linkbutton" data-options="iconCls: 'fa-download'">导出</a> -->
|
||
<a iconCls="fa-close" class="easyui-linkbutton" onclick="closeForm()">关闭</a>
|
||
</div>
|
||
<div data-options="region:'center'" style="height:100%;padding:15px 15px;">
|
||
<!-- <div class="labeldiv">设备概况</div> -->
|
||
<table class='detailtable'>
|
||
<tr>
|
||
<td>当前状态:{{state}}</td>
|
||
<td>设备信息:{{inspect__equipment__num + '-' + inspect__equipment__name}}</td>
|
||
</tr>
|
||
<tr>
|
||
<td style="width:50%">检查项目:{{checkitem__name}}</td>
|
||
<td>检查内容:{{checkitem__content}}</td>
|
||
</tr>
|
||
<tr>
|
||
<td>巡检人:{{inspect__user__name}}</td>
|
||
<td>处理人:{{todouser__name}}</td>
|
||
</tr>
|
||
<tr>
|
||
<td>巡检信息:{{desc}}</td>
|
||
<td>处理信息:{{desc2}}</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<div>异常图片</div>
|
||
{{if img}}
|
||
<img onclick='bigger(this)' class='tp' width="250" height="200" src='{{img}}' />
|
||
{{/if}}
|
||
</td>
|
||
<td>
|
||
<div>处理图片</div>
|
||
{{if img2}}
|
||
<img onclick='bigger(this)' class='tp' width="250" height="200" src='{{img2}}' />
|
||
{{/if}}
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
|
||
</div>
|
||
{% endverbatim %}
|
||
</script>
|
||
<script type="text/javascript" src="/static/safesite/mystatic/js/template-web.js"></script>
|
||
<script>
|
||
var html;
|
||
var formid = {{ id }};
|
||
var formdata
|
||
template.defaults.imports.dateFormat = function (date, format) {
|
||
date = new Date(date);
|
||
var map = {
|
||
"M": date.getMonth() + 1, //月份
|
||
"d": date.getDate(), //日
|
||
"h": date.getHours(), //小时
|
||
"m": date.getMinutes(), //分
|
||
"s": date.getSeconds(), //秒
|
||
"q": Math.floor((date.getMonth() + 3) / 3), //季度
|
||
"S": date.getMilliseconds() //毫秒
|
||
};
|
||
format = format.replace(/([yMdhmsqS])+/g, function (all, t) {
|
||
var v = map[t];
|
||
if (v !== undefined) {
|
||
if (all.length > 1) {
|
||
v = '0' + v;
|
||
v = v.substr(v.length - 2);
|
||
}
|
||
return v;
|
||
}
|
||
else if (t === 'y') {
|
||
return (date.getFullYear() + '').substr(4 - all.length);
|
||
}
|
||
return all;
|
||
});
|
||
return format;
|
||
};
|
||
template.defaults.imports.gfilename = function(value){
|
||
x = value.split('/').pop();
|
||
return x;
|
||
}
|
||
$.ajax({
|
||
type: "get",
|
||
url: "api/inspectitem?a=detail",
|
||
data: { id: formid },
|
||
async: false, // ajax同步使用false
|
||
success: function (data) {
|
||
html = template('text', data);
|
||
}
|
||
});
|
||
|
||
$('#result').html(html);
|
||
// function exportword(){
|
||
// $.ajax({
|
||
// type: "post",
|
||
// url: "gchandle?a=exportword",
|
||
// contentType:'application/json; charset=utf-8',
|
||
// data: JSON.stringify(formdata),
|
||
// success: function (data) {
|
||
// window.open(data.downloadurl);
|
||
// }
|
||
// });
|
||
// }
|
||
</script> |