safesite/safesite/templates/troubledetail.html

169 lines
6.2 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<div class="easyui-layout" id="result" style="width:100%;height:100%"></div>
<script type="text/html" id="text">
{% verbatim %}
<div id='southdiv' data-options="region:'south'" style="height:50px;text-align:center;padding:5px">
<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>
<p><span id="1">-----待评估</span><span id="7">-----/</span><span id="2">-----/</span><span id="3">-----</span><span
id="4">-----待审核</span><span id="5">-----</span><span id="6">-----</span></p>
<div class="labeldiv">隐患详情</div>
<table class='detailtable'>
<tr>
<td style="width:50%">隐患等级{{yhdj__dickeyname}}</td>
<td style="width:50%">隐患类型{{yhlx__dicname}}</td>
</tr>
<tr>
<td>隐患类别{{yhlb__dickeyname}}</td>
<td>检查类型{{jclx__dickeyname}}</td>
</tr>
<tr>
<td>发现时间{{fxsj| dateFormat 'yyyy-MM-dd hh:mm:ss'}}</td>
<td>隐患地点{{yhdd}}</td>
</tr>
<tr>
<td>发现部门{{fxbm__partname}}</td>
<td>发现人{{fxr__name}}</td>
</tr>
<tr>
<td>隐患评估{{yhpg__dickeyname}}</td>
<td>填报时间{{tbsj| dateFormat 'yyyy-MM-dd hh:mm:ss'}}</td>
</tr>
<tr>
<td colspan="2">隐患描述 {{yhms}} </td>
</tr>
</table>
<div class="labeldiv">整改详情</div>
<table class='detailtable'>
<tr>
<td style="width:50%">整改部门{{zgbm__partname}}</td>
<td>整改人{{zgr__name}}</td>
</tr>
<tr>
<td colspan="2">整改期限
{{if zgqx}}
{{zgqx|dateFormat 'yyyy-MM-dd hh:mm:ss'}}
{{/if}}
</td>
</tr>
<tr>
<td colspan="2">隐患形成原因{{yyfx}}</td>
</tr>
<tr>
<td colspan="2">整改措施{{zgcs}}</td>
</tr>
<tr>
<td colspan="2">整改描述{{zgms}}</td>
</tr>
</table>
<div class="labeldiv">流程详情</div>
<table class='detailtable'>
<thead>
<tr>
<th style="width:10%">
处理人
</th>
<th style="width:30%">
评估/审核意见
</th>
<th style="width:40%">
流程状态
</th>
<th style="width:20%">
时间
</th>
</tr>
</thead>
{{each lcxq}}
<tr>
<td>{{$value.clr__name}}</td>
<td>{{$value.opinion}}</td>
<td>{{$value.action}}</td>
<td>{{$value.accesssj|dateFormat 'yyyy-MM-dd hh:mm:ss'}}</td>
</tr>
{{/each}}
</table>
<div class="labeldiv">图片信息</div>
<table class='detailtable'>
<tr>
<td>
<table>
<thead>
<tr>
<th>隐患照片</th>
</tr>
</thead>
{{each yhtp value index}}
<tr>
<td><img onclick='bigger(this)' class='tp' width="250" height="200" src='{{value}}' /></td>
</tr>
{{/each}}
</table>
</td>
<td>
<table>
<thead>
<tr>
<th>整改后照片</th>
</tr>
</thead>
{{each zghtp value index}}
<tr>
<td><img onclick='bigger(this)' class='tp' width="250" height="200" src='{{value}}' /></td>
</tr>
{{/each}}
</table>
</td>
</tr>
</table>
<div id="duibiaodg"></div>
</div>
{% endverbatim %}
</script>
<script type="text/javascript" src="/static/safesite/mystatic/js/template-web.js"></script>
<script>
var html;
var troubleid = {{ troubleid }};
var yhzt;
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;
};
$.ajax({
type: "get",
url: "troublehandle?a=detail",
async:false,
data: { troubleid: troubleid },
success: function (data) {
html = template('text', data);
yhzt = data.yhzt;
}
});
$('#result').html(html);
$("#"+yhzt).css({"color":"red","font-weight":"bold"});
</script>