dataPage.html
5.38 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
<!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"/> 图片
</div>
<div class="content" style="float: right;margin-right: 10px;"><span class="picNum">4</span>张 <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;"/> -->
<!--<img src="src/img/jinmao.jpg" class="item"/> -->
<!--<img src="src/img/184.jpg" class="item"> -->
<!--<img src="src/img/41.jpg" class="item"/>-->
</div>
</div>
<!--灰色分割线-->
<hr class="layui-progress">
<!--下方表格-->
<div><img id="icon2" src="src/image/icon2.png"> 字段</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>