|
@@ -86,6 +86,9 @@
|
|
margin: 0 auto;
|
|
margin: 0 auto;
|
|
width: 800px;
|
|
width: 800px;
|
|
}
|
|
}
|
|
|
|
+ .imageBox{
|
|
|
|
+ display: none;
|
|
|
|
+ }
|
|
</style>
|
|
</style>
|
|
</head>
|
|
</head>
|
|
<body class="white-bg">
|
|
<body class="white-bg">
|
|
@@ -103,8 +106,19 @@
|
|
<label class="col-sm-3 control-label">弹框图片:</label>
|
|
<label class="col-sm-3 control-label">弹框图片:</label>
|
|
<div class="col-sm-8">
|
|
<div class="col-sm-8">
|
|
<input id="input_bgUrl" name="bgUrl" type="hidden"/>
|
|
<input id="input_bgUrl" name="bgUrl" type="hidden"/>
|
|
- <div class="thumbnail slideshow_span" id="div-bgUrl" onclick="javascript:bgUpload('bg')">
|
|
|
|
- <i class="fa fa-plus"></i>
|
|
|
|
|
|
+ <!--<div class="thumbnail slideshow_span" id="div-bgUrl" onclick="javascript:bgUpload('bg')">-->
|
|
|
|
+ <!--<i class="fa fa-plus"></i>-->
|
|
|
|
+ <!--</div>-->
|
|
|
|
+ <div class="imageBox">
|
|
|
|
+ <div class="thumbBox" style="width:200px;height:200px;"></div>
|
|
|
|
+ <div class="spinner" style="display: none">Loading...</div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="action">
|
|
|
|
+ <div class="new-contentarea tc">
|
|
|
|
+ <a href="javascript:void(0)" class=""><label for="avatar">选择图片</label> </a>
|
|
|
|
+ <input type="file" class="" name="avatar" id="avatar" accept="image/*"/>
|
|
|
|
+ </div>
|
|
|
|
+ <input type="button" id="submitbuttonBg" onclick="upBg()" class="" value="上传"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -180,21 +194,21 @@
|
|
</form>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
-<div class="wrapper wrapper-content animated fadeInRight ibox-content" id="div2" style="display: none">
|
|
|
|
- <div class="imageBox">
|
|
|
|
- <div class="thumbBox" style="width:200px;height:200px;"></div>
|
|
|
|
- <div class="spinner" style="display: none">Loading...</div>
|
|
|
|
- </div>
|
|
|
|
- <div class="action" style="margin: 10px auto;">
|
|
|
|
- <div class="new-contentarea tc">
|
|
|
|
- <a href="javascript:void(0)" class="upload-img"> <label for="avatar">选择图片</label> </a>
|
|
|
|
- <input type="file" class="" name="avatar" id="avatar" accept="image/*"/>
|
|
|
|
- </div>
|
|
|
|
- <input type="button" id="submitbuttonBg" onclick="upBg()" class="btn-info Btnsty_peyton" value="上传"/>
|
|
|
|
- <input type="button" id="submitbuttonQr" onclick="upQr()" class="btn-info Btnsty_peyton" value="上传"/>
|
|
|
|
- <input type="button" onclick="back()" class="btn-info Btnsty_peyton " value="返回"/>
|
|
|
|
- </div>
|
|
|
|
-</div>
|
|
|
|
|
|
+<!--<div class="wrapper wrapper-content animated fadeInRight ibox-content" id="div2" style="display: none">-->
|
|
|
|
+ <!--<div class="imageBox">-->
|
|
|
|
+ <!--<div class="thumbBox" style="width:200px;height:200px;"></div>-->
|
|
|
|
+ <!--<div class="spinner" style="display: none">Loading...</div>-->
|
|
|
|
+ <!--</div>-->
|
|
|
|
+ <!--<div class="action" style="margin: 10px auto;">-->
|
|
|
|
+ <!--<div class="new-contentarea tc">-->
|
|
|
|
+ <!--<a href="javascript:void(0)" class="upload-img"> <label for="avatar">选择图片</label> </a>-->
|
|
|
|
+ <!--<input type="file" class="" name="avatar" id="avatar" accept="image/*"/>-->
|
|
|
|
+ <!--</div>-->
|
|
|
|
+ <!--<input type="button" id="submitbuttonBg" onclick="upBg()" class="btn-info Btnsty_peyton" value="上传"/>-->
|
|
|
|
+ <!--<input type="button" id="submitbuttonQr" onclick="upQr()" class="btn-info Btnsty_peyton" value="上传"/>-->
|
|
|
|
+ <!--<input type="button" onclick="back()" class="btn-info Btnsty_peyton " value="返回"/>-->
|
|
|
|
+ <!--</div>-->
|
|
|
|
+<!--</div>-->
|
|
<th:block th:include="include :: footer" />
|
|
<th:block th:include="include :: footer" />
|
|
<th:block th:include="include :: datetimepicker-js" />
|
|
<th:block th:include="include :: datetimepicker-js" />
|
|
<th:block th:include="include :: bootstrap-select-js" />
|
|
<th:block th:include="include :: bootstrap-select-js" />
|
|
@@ -204,6 +218,7 @@
|
|
// var getCompanyListPrefix = "http://localhost:10001/wxportal-api/sysuser/searchOrg";
|
|
// var getCompanyListPrefix = "http://localhost:10001/wxportal-api/sysuser/searchOrg";
|
|
var getCompanyListPrefix = "http://suishenbangtest.nipponpaint.com.cn/wxportal-api/sysuser/searchOrg";
|
|
var getCompanyListPrefix = "http://suishenbangtest.nipponpaint.com.cn/wxportal-api/sysuser/searchOrg";
|
|
var cropper;
|
|
var cropper;
|
|
|
|
+ var photoUrl;
|
|
var options = {
|
|
var options = {
|
|
thumbBox: '.thumbBox',
|
|
thumbBox: '.thumbBox',
|
|
spinner: '.spinner',
|
|
spinner: '.spinner',
|
|
@@ -334,6 +349,13 @@
|
|
}
|
|
}
|
|
|
|
|
|
function upBg() {
|
|
function upBg() {
|
|
|
|
+ var imgUrl = ctx + 'img/profile.jpg';
|
|
|
|
+ options = {
|
|
|
|
+ thumbBox: '.thumbBox',
|
|
|
|
+ spinner: '.spinner',
|
|
|
|
+ imgSrc: imgUrl
|
|
|
|
+ }
|
|
|
|
+ cropper = $('.imageBox').cropbox(options);
|
|
var img = cropper.getBlob();
|
|
var img = cropper.getBlob();
|
|
var formdata = new FormData();
|
|
var formdata = new FormData();
|
|
formdata.append("file", img);
|
|
formdata.append("file", img);
|
|
@@ -345,6 +367,7 @@
|
|
contentType: false,
|
|
contentType: false,
|
|
success: function (result) {
|
|
success: function (result) {
|
|
if (result.code == 0) {
|
|
if (result.code == 0) {
|
|
|
|
+ photoUrl = result.data.url;
|
|
$("#input_bgUrl").val(result.data.fileName);
|
|
$("#input_bgUrl").val(result.data.fileName);
|
|
$("#div-bgUrl").html("<img src='" + result.data.url + "' style='width;100%;height:100%;'>");
|
|
$("#div-bgUrl").html("<img src='" + result.data.url + "' style='width;100%;height:100%;'>");
|
|
$("#div1").show();
|
|
$("#div1").show();
|
|
@@ -358,39 +381,17 @@
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
- function sizeChange() {
|
|
|
|
- size = $("#sel_magnetSize").val();
|
|
|
|
- $("#div-bgUrl").removeClass("bg-sm");
|
|
|
|
- $("#div-bgUrl").removeClass("bg-md");
|
|
|
|
- $("#div-bgUrl").removeClass("bg-lg");
|
|
|
|
- $("#imageBox").removeClass();
|
|
|
|
- $("#thumbBox").removeClass();
|
|
|
|
- if (size == "l" || size == "L") {
|
|
|
|
- $("#div-bgUrl").addClass("bg-lg");
|
|
|
|
- size = "L";
|
|
|
|
- $("#imageBox").addClass("imageBox imageBox_L");
|
|
|
|
- $("#thumbBox").addClass("thumbBox_L");
|
|
|
|
- } else if (size == "m" || size == "M") {
|
|
|
|
- $("#div-bgUrl").addClass("bg-md");
|
|
|
|
- size = "M";
|
|
|
|
- $("#imageBox").addClass("imageBox imageBox_M");
|
|
|
|
- $("#thumbBox").addClass("thumbBox_M");
|
|
|
|
- } else if (size == "s" || size == "S") {
|
|
|
|
- $("#div-bgUrl").addClass("bg-sm");
|
|
|
|
- size = "S";
|
|
|
|
- $("#imageBox").addClass("imageBox imageBox_S");
|
|
|
|
- $("#thumbBox").addClass("thumbBox_S");
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
function submitHandler() {
|
|
function submitHandler() {
|
|
if ($.validate.form()) {
|
|
if ($.validate.form()) {
|
|
|
|
+ var alertType = $('#alertType').val();
|
|
var contentVal = $('#alertContent').val();
|
|
var contentVal = $('#alertContent').val();
|
|
var startTime = $('#alertStartTime').val();
|
|
var startTime = $('#alertStartTime').val();
|
|
var endTime = $('#alertEndTime').val();
|
|
var endTime = $('#alertEndTime').val();
|
|
var alertNum = $('#alertNum').val();
|
|
var alertNum = $('#alertNum').val();
|
|
var userType = $('#userType').val().join();
|
|
var userType = $('#userType').val().join();
|
|
var objSubmit = {
|
|
var objSubmit = {
|
|
|
|
+ alertType:alertType,
|
|
|
|
+ photoUrl:photoUrl,
|
|
alertContent:contentVal,
|
|
alertContent:contentVal,
|
|
alertStartTime:startTime,
|
|
alertStartTime:startTime,
|
|
alertEndTime:endTime,
|
|
alertEndTime:endTime,
|