1 <script type="text/javascript">
2 $(document).ready(function () {
3 $('.dateinput').datepicker();
4 });
5
6 $('#uploader1').FileUpload({
7 'subfolder': 'Disaster',
8 'callback': function (msg) {
9 //msg.url为图片地址
10 $("#photo1").val(msg.url);
11 $("#preview1").popover({ trigger: 'hover', html: true, placement: 'right ', content: "<img src='" + getBaseUrl(msg.url) + "'/>" });
12
13 $('#photo1').attr("servername", msg.url);
14 $("#ReportPicPath").val($('#photo1').attr("servername") + "#" + $('#photo2').attr("servername"));
15 }
16 });
17
18 $('#uploader2').FileUpload({
19 'subfolder': 'Disaster',
20 'callback': function (msg) {
21 //msg.url为图片地址
22 $("#photo2").val(msg.url);
23 $("#preview2").popover({ trigger: 'hover', html: true, placement: 'right ', content: "<img src='" + getBaseUrl(msg.url) + "'/>" });
24
25 $('#photo2').attr("servername", msg.url);
26 $("#ReportPicPath").val($('#photo1').attr("servername") + "#" + $('#photo2').attr("servername"));
27 }
28 });
29 </script>
1 <div class="control-group">
2 <label class="control-label"><span class="required">*</span>地灾点地址:</label>
3 <div class="controls">
4 @Html.DropDownList("MineDisasterInfId", ViewBag.AllAddress as SelectList, new { @class = "m-wrap medium" })
5 </div>
6 </div>
7
8 <div class="control-group">
9 <label class="control-label"><span class="required">*</span>巡查日期:</label>
10 <div class="controls">
11 @Html.TextBoxFor(m => m.ReportTime, "{0:yyyy-MM-dd}", new { @class = "m-wrap large dateinput" })
12 <span class="help-inline">@Html.ValidationMessageFor(m => m.ReportTime)</span>
13 </div>
14 </div>
15
16 <div class="control-group">
17 <label class="control-label"><span class="required">*</span>巡查描述:</label>
18 <div class="controls">
19 @Html.TextAreaFor(m => m.ReportDesc, new { @class = "m-wrap large" })
20 <span class="help-inline">@Html.ValidationMessageFor(m => m.ReportDesc)</span>
21 </div>
22 </div>
23
24 <div class="control-group">
25 <label class="control-label"><span class="required">*</span>巡查照片:</label>
26 <div class="controls">
27 @Html.TextBoxFor(m => m.ReportPicPath, new { @class = "m-wrap large",@style = "display:none" })
28
29 <div class="input-append">
30 <input id="photo1" class="m-wrap large" type="text" servername="">
31 <span class="add-on" title="预览" id="preview1"><i class="icon-picture"></i></span>
32 </div>
33 <div id="uploader1"></div>
34
35 <div class="input-append">
36 <input id="photo2" class="m-wrap large" type="text" servername="">
37 <span class="add-on" title="预览" id="preview2"><i class="icon-picture"></i></span>
38 </div>
39 <div id="uploader2"></div>
40
41 <div id="fileQueue"></div>
42 <span class="help-inline">@Html.ValidationMessageFor(m => m.ReportPicPath)</span>