dataPage.html 5.38 KB
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8" name="viewport" content="width=device-width, initial-scale=1">
		<title>网点数据</title>
		<script src=""></script>
		<link rel="stylesheet" href="dist/layui/css/layui.css">
		<script src="dist/layui/layui.js"></script>
		<style>
			#title{
				text-align: center;
				line-height:60px;
				height: 50px;
				font-size: large;
				font-family: "微软雅黑";
			}
			
			#backimage{
				display: inline;
				float: left;
				margin-top: 20px;
				/*height: 20px;*/
				margin-left: 15px;
			}
			.container{
			    width: 100%;
			    overflow-x: hidden;
			    overflow-y: hidden;
			    white-space: nowrap;
			    margin-top: 5px;
			   font-family: "微软雅黑";
			}
			.container .item{
			    display:inline-block;
			    box-sizing: border-box;
			    width:33%;
			    
			}
			#icon1{
				margin-left: 15px;
				height: 20px;
			}
			.content{
				float: left;
				display: inline;
				font-family: "微软雅黑";
			}
			img{
				border-radius:5px
			}
			#icon2{
				margin-left: 15px;
				height: 20px;
			}
			.key{
				border: none;
				float: left;
				margin-top: -5px;
				margin-left: 20px;
				padding-top: 20px;
			}
			.value{
				border: none;
				float: right;
				margin-top: -5px;
				width: 100px;
				font-family: "微软雅黑";
			}
			#submit{
				background: #27B1A4;
            	color: #FFFFFF;
            	width: 200px;
            	height: 40px;
			}
			#picdiv{
				overflow: scroll;
			}
			#picdiv:first-child{
				margin-left: 12px;
			}
			#picdiv::-webkit-scrollbar{
				width: 0;
				height: 0;
			}
			#form .value{
				color:#c1c1c1;
				background: url("src/image/btn1.png") no-repeat 80% 50%;
			}
		</style>
		<script src="src/js/saasService.js"></script>
	</head>
	<body>
		<!--最上方-->
		<div><div id="title"><img src="src/image/btn_back.png" id="backimage"/>网点数据</div></div>
		<!--灰色分割线-->
		<hr class="layui-bg-gray">
		<!--图片展示区-->
		<div style="height: 20px;">
				<div style="float: left;">
					<img id="icon1" class="content" src="src/image/icon1.png"/>&nbsp;&nbsp;图片
				</div>
				<div class="content" style="float: right;margin-right: 10px;"><span class="picNum">4</span>&nbsp;&nbsp;<img src="src/image/btn1.png" onclick="editPic()"></div>
			</div>
		<div class="container">
			<div id="picdiv">
				<!--<img src="src/img/macsierra-012.jpg" class="item" style="margin-left: 12px;"/>&nbsp;-->
				<!--<img src="src/img/jinmao.jpg" class="item"/>&nbsp;-->
				<!--<img src="src/img/184.jpg" class="item">&nbsp;-->
				<!--<img src="src/img/41.jpg" class="item"/>-->
			</div>
		</div>
		<!--灰色分割线-->
		<hr class="layui-progress">
		<!--下方表格-->
		<div><img id="icon2" src="src/image/icon2.png">&nbsp;&nbsp;字段</div>
		<!--表格-->
		<form action="" id="form" method="post" target="_blank">
			<!--<input type="text" name="key01" class="key" value="名称"/><br>-->
			<!--<input type="text" name="value01" class="value"value="请输入..."/><br>-->
			<!--灰色分割线-->
			<!--<hr class="layui-bg-gray">-->
			<!--<input type="text" name="key02" class="key" value="名称"/><br>-->
			<!--<input type="text" name="value02" class="value"value="请输入..."/><br>-->
			
			<!--<hr class="layui-bg-gray">-->
			<!--<input type="text" name="key03" class="key" value="名称"/><br>-->
			<!--<input type="text" name="value03" class="value"value="请输入..."/><br>-->
			<!---->
			<!--<hr class="layui-bg-gray">-->
			<!--<input type="text" name="key04" class="key" value="名称"/><br>-->
			<!--<input type="text" name="value04" class="value"value="请输入..."/><br>-->
		<!---->
			<!--<hr class="layui-bg-gray"><br>-->
			<!--<p style=" margin:5px; text-align:center;"><input type="submit" value="保   存" id="submit"/></p>-->
		</form>
	</body>
	<script src="./src/js/saasService.js"></script>
	<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.js"></script>
	<script>
		function editPic(){
			alert(123);
		}
		// console.log('enter')
		saas.saasHttpRequest('/v1/point/getPointById',{
			pointId:localStorage.getItem('pointId'),
			needExtCols:true
		},function (data) {
			console.log(data)
			if(data.code == 'S001'){
				var msg = data.result.infos
				// console.log(msg)
				var str = ''
				var strImg = ''
				var Imgarr = []
                var photo = data.result.photos
				console.log(photo)
				for(var i=0;i<msg.length;i++){
					// console.log(msg[i])
					var num = i+1
					str += "<input type=\"text\" name=\"key0"+num+"\" class=\"key\" value="+(msg[i].fieldName?msg[i].fieldName:'')+"><br>\n" +
						"\t\t\t<input type=\"text\" name=\"value0"+num+"\" class=\"value\" value="+(msg[i].fieldValue?msg[i].fieldValue:'')+"><br>\n" +
						"\t\t\t\n" +
						"\t\t\t<hr class=\"layui-bg-gray\">"
				}
				for(var i=0;i<photo.length;i++){
					photo[i].photoPath = "http://114.55.43.0:16907/v1/point/getFile?ak=30bdc45ee00940cda7917d134fdb1523&filePath="+photo[i].photoPath
                    strImg += "<img src="+photo[i].photoPath+" class=\"item\"/>"
                    Imgarr.push(photo[i].photoPath)
				}
				console.log(Imgarr)
				localStorage.setItem('Imgarr',Imgarr.join('@'))
				$('.picNum').html(photo.length)
				$('#form').append(str)
				$('#picdiv').append(strImg)
			}
		},function (err) {

		});
		$('#picdiv').on('click',function (e) {
			if(e.target.className == 'item'){
			    window.location.href = './uploadImage.html'
			}
        })
	</script>
</html>