物联网平台 +Web 组态
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

84 lines
2.3 KiB

<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ page import="com.lp.cfg.ProConfig" %>
<!DOCTYPE html>
<html>
<head>
<%@ include file="/WEB-INF/oss/base/common/variable.jsp"%>
<%@ include file="/WEB-INF/oss/base/common/resource_lib.jsp"%>
<%@ include file="/WEB-INF/oss/base/common/variable_js.jsp"%>
<script type="text/javascript" src="<%=basePath%>/lib/webUploader/webuploader.min.js"></script>
<style type="text/css">
.self-base-icon{
padding: 0 10px;
font-size: 14px;
cursor: pointer;
}
.self-base-icon:HOVER {
color: #00aaee;
}
.span-name{
display: inline-block;
width: 70px;
}
.webuploader-element-invisible{
display: none !important;
}
</style>
</head>
<body>
<div class="app-container">
<div class="clearfloat container">
</div>
</div>
<div id="template1" class="hide">
<div style="text-align: center; width: 25%;float:left;padding: 10px 0;">
<p style="font-size: 16px;">单位名称:<span style="color:red;font-size: 16px;">{0}</span></p>
<p style="padding-top: 10px; height: 51px;" >
<img style="width: 41px;height: 41px;" alt="" src="<%=basePath%>/image/oss/iot/{1}.png">
</p>
<p style="margin: 15px 0;">
<div class="upload_img mr10" id="upload_img_{1}" style="display: inline-block;position: relative;width: 100px;">
<button tag="{1}" class="button ml10" style=""><span class="iconfont icon-upload"></span><span> </span>上传底图</button>
</div>
</p>
</div>
</div>
</body>
<script type="text/javascript">
// 初始化传感器
getAjax(localUrl + '/dictionary/20' , function(data){
if(isOK(data)){
var dataT =data.data ;
for(var i=0;i<dataT.length;i++){
$(".container").append( $("#template1").html().format(dataT[i].name , dataT[i].code ) );
imgInit("upload_img_"+ dataT[i].code ,dataT[i].code );
}
}
});
function imgInit(id,code){
//上传模板
UploadInit( localUrl + '/sensor/ico/upload.json' , {"code":code} ,function(file,data){
//
if(isOK(data)){
alert("上传成功,由于存在缓存,图片不会立即刷新,需要多次刷新页面才行,谢谢!");
window.location.reload();
}
}, id ,"","100px", "35px") ;
}
$(function(){
})
</script>
</html>