增加字段
This commit is contained in:
parent
027799b38b
commit
683ff67711
@ -21,6 +21,7 @@
|
||||
<result column="institution_type" property="institutionType"/>
|
||||
<result column="creator" property="creator"/>
|
||||
<result column="gmt_create" property="gmtCreate"/>
|
||||
<result column="sign_photo" property="signPhoto"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="institutionBO" type="cn.com.tenlion.institutionmanagement.pojo.bos.institution.InstitutionBO">
|
||||
@ -130,7 +131,8 @@
|
||||
gmt_create,
|
||||
modifier,
|
||||
gmt_modified,
|
||||
is_delete
|
||||
is_delete,
|
||||
sign_photo
|
||||
) VALUES(
|
||||
#{institutionId},
|
||||
#{institutionName},
|
||||
@ -152,7 +154,8 @@
|
||||
#{gmtCreate},
|
||||
#{modifier},
|
||||
#{gmtModified},
|
||||
#{isDelete}
|
||||
#{isDelete},
|
||||
#{signPhoto}
|
||||
)
|
||||
</insert>
|
||||
|
||||
@ -207,7 +210,8 @@
|
||||
institution_region_village = #{institutionRegionVillage},
|
||||
institution_region_street = #{institutionRegionStreet},
|
||||
gmt_modified = #{gmtModified},
|
||||
modifier = #{modifier}
|
||||
modifier = #{modifier},
|
||||
sign_photo = #{signPhoto}
|
||||
WHERE
|
||||
institution_id = #{institutionId}
|
||||
</update>
|
||||
@ -230,7 +234,8 @@
|
||||
t1.institution_region_village,
|
||||
t1.institution_region_street,
|
||||
t1.institution_type,
|
||||
t1.institution_id
|
||||
t1.institution_id,
|
||||
t1.sign_photo
|
||||
FROM
|
||||
m_institution t1
|
||||
WHERE
|
||||
@ -329,7 +334,8 @@
|
||||
t1.institution_region_street,
|
||||
t1.institution_type,
|
||||
t1.creator,
|
||||
t1.gmt_create
|
||||
t1.gmt_create,
|
||||
t1.sign_photo
|
||||
FROM
|
||||
m_institution t1
|
||||
WHERE
|
||||
|
@ -132,6 +132,36 @@
|
||||
<input type="text" id="institutionAddress" name="institutionAddress" class="layui-input" value="" placeholder="请输入机构地址" maxlength="50">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">水印</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="hidden" id="signPhoto" name="signPhoto">
|
||||
<div class="layui-btn-container" id="signPhotoFileBox" style="border: 1px solid #e6e6e6;"></div>
|
||||
<script id="signPhotoFileDownload" type="text/html">
|
||||
{{# var fileName = 'signPhoto'; }}
|
||||
{{# if(d[fileName].length > 0) { }}
|
||||
{{# var files = d[fileName];}}
|
||||
{{# for(var i = 0, item = files[i]; item = files[i++];) { }}
|
||||
<div class="upload-image-box">
|
||||
<span class="upload-image-span">
|
||||
<img src="route/file/download/false/{{item.fileId}}" align="加载失败">
|
||||
</span>
|
||||
<a class="layui-btn layui-btn-xs layui-btn-danger text-danger remove-image" href="javascript:void(0);" lay-form-button data-id="{{item.fileId}}" data-name="{{fileName}}" lay-filter="signPhotoRemoveFile">
|
||||
<i class="fa fa-trash-o"></i>
|
||||
</a>
|
||||
</div>
|
||||
{{# } }}
|
||||
{{# } }}
|
||||
{{# if(d[fileName].length < 1) { }}
|
||||
<div class="upload-image-box" style="width: auto; height: auto; padding: 5px;">
|
||||
<a href="javascript:void(0);" lay-form-button data-explain="机构图片" data-name="signPhoto" lay-filter="signPhotoUploadFile">
|
||||
<i class="fa fa-plus-square-o" style="font-size: 70px;"></i>
|
||||
</a>
|
||||
</div>
|
||||
{{# } }}
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-md12 layui-col-sm12" style="padding: 0 0px;">
|
||||
<div id="mapContainer" style="width: 100%;height: 350px;"></div>
|
||||
@ -274,6 +304,57 @@
|
||||
});
|
||||
}
|
||||
|
||||
function initSignPhotoUploadFile() {
|
||||
var files = $('#signPhoto').val();
|
||||
initFileList('signPhoto', files, function(fileName) {
|
||||
var viewer = new Viewer(document.getElementById(fileName +'FileBox'), {navbar: false});
|
||||
viewerObj[fileName] = viewer;
|
||||
});
|
||||
|
||||
form.on('button(signPhotoUploadFile)', function(obj) {
|
||||
var name = this.dataset.name;
|
||||
var explain = this.dataset.explain;
|
||||
top.dialog.file({
|
||||
type: 'image',
|
||||
title: '上传'+ explain,
|
||||
width: '400px',
|
||||
height: '420px',
|
||||
maxFileCount: '1',
|
||||
onClose: function() {
|
||||
var uploadFileArray = top.dialog.dialogData.uploadFileArray;
|
||||
if(typeof(uploadFileArray) != 'undefined' && uploadFileArray.length > 0) {
|
||||
var files = $('#'+ name).val();
|
||||
for(var j = 0, file = uploadFileArray[j]; file = uploadFileArray[j++];) {
|
||||
if(files.length > 0) {
|
||||
files += ',';
|
||||
}
|
||||
files += file.data;
|
||||
}
|
||||
initFileList(name, files, function(fileName) {
|
||||
viewerObj[fileName].update();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
form.on('button(signPhotoRemoveFile)', function(obj) {
|
||||
var name = this.dataset.name;
|
||||
var id = this.dataset.id;
|
||||
var files = $('#'+ name).val().replace(id, '');
|
||||
files = files.replace(/\,+/g, ',');
|
||||
if(files.charAt(0) == ',') {
|
||||
files = files.substring(1);
|
||||
}
|
||||
if(files.charAt(files.length - 1) == ',') {
|
||||
files = files.substring(0, files.length - 1);
|
||||
}
|
||||
initFileList(name, files, function(fileName) {
|
||||
viewerObj[fileName].update();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化机构成立时间时间戳
|
||||
function initInstitutionFoundingTimeDateTime() {
|
||||
laydate.render({
|
||||
@ -287,6 +368,7 @@
|
||||
// 初始化内容
|
||||
function initData() {
|
||||
initInstitutionImageUploadFile();
|
||||
initSignPhotoUploadFile();
|
||||
initInstitutionFoundingTimeDateTime();
|
||||
initMap('109.85017859252311', '40.66017700460503');
|
||||
initDataDict(dictId,'institutionRegionProvince');
|
||||
|
@ -124,6 +124,36 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">水印</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="hidden" id="signPhoto" name="signPhoto">
|
||||
<div class="layui-btn-container" id="signPhotoFileBox" style="border: 1px solid #e6e6e6;"></div>
|
||||
<script id="signPhotoFileDownload" type="text/html">
|
||||
{{# var fileName = 'signPhoto'; }}
|
||||
{{# if(d[fileName].length > 0) { }}
|
||||
{{# var files = d[fileName];}}
|
||||
{{# for(var i = 0, item = files[i]; item = files[i++];) { }}
|
||||
<div class="upload-image-box">
|
||||
<span class="upload-image-span">
|
||||
<img src="route/file/download/false/{{item.fileId}}" align="加载失败">
|
||||
</span>
|
||||
<a class="layui-btn layui-btn-xs layui-btn-danger text-danger remove-image" href="javascript:void(0);" lay-form-button data-id="{{item.fileId}}" data-name="{{fileName}}" lay-filter="signPhotoRemoveFile">
|
||||
<i class="fa fa-trash-o"></i>
|
||||
</a>
|
||||
</div>
|
||||
{{# } }}
|
||||
{{# } }}
|
||||
{{# if(d[fileName].length < 1) { }}
|
||||
<div class="upload-image-box" style="width: auto; height: auto; padding: 5px;">
|
||||
<a href="javascript:void(0);" lay-form-button data-explain="机构图片" data-name="signPhoto" lay-filter="signPhotoUploadFile">
|
||||
<i class="fa fa-plus-square-o" style="font-size: 70px;"></i>
|
||||
</a>
|
||||
</div>
|
||||
{{# } }}
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">机构详细地址</label>
|
||||
<div class="layui-input-block">
|
||||
@ -277,6 +307,57 @@
|
||||
});
|
||||
}
|
||||
|
||||
function initSignPhotoUploadFile() {
|
||||
var files = $('#signPhoto').val();
|
||||
initFileList('signPhoto', files, function(fileName) {
|
||||
var viewer = new Viewer(document.getElementById(fileName +'FileBox'), {navbar: false});
|
||||
viewerObj[fileName] = viewer;
|
||||
});
|
||||
|
||||
form.on('button(signPhotoUploadFile)', function(obj) {
|
||||
var name = this.dataset.name;
|
||||
var explain = this.dataset.explain;
|
||||
top.dialog.file({
|
||||
type: 'image',
|
||||
title: '上传'+ explain,
|
||||
width: '400px',
|
||||
height: '420px',
|
||||
maxFileCount: '1',
|
||||
onClose: function() {
|
||||
var uploadFileArray = top.dialog.dialogData.uploadFileArray;
|
||||
if(typeof(uploadFileArray) != 'undefined' && uploadFileArray.length > 0) {
|
||||
var files = $('#'+ name).val();
|
||||
for(var j = 0, file = uploadFileArray[j]; file = uploadFileArray[j++];) {
|
||||
if(files.length > 0) {
|
||||
files += ',';
|
||||
}
|
||||
files += file.data;
|
||||
}
|
||||
initFileList(name, files, function(fileName) {
|
||||
viewerObj[fileName].update();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
form.on('button(signPhotoRemoveFile)', function(obj) {
|
||||
var name = this.dataset.name;
|
||||
var id = this.dataset.id;
|
||||
var files = $('#'+ name).val().replace(id, '');
|
||||
files = files.replace(/\,+/g, ',');
|
||||
if(files.charAt(0) == ',') {
|
||||
files = files.substring(1);
|
||||
}
|
||||
if(files.charAt(files.length - 1) == ',') {
|
||||
files = files.substring(0, files.length - 1);
|
||||
}
|
||||
initFileList(name, files, function(fileName) {
|
||||
viewerObj[fileName].update();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化机构成立时间时间戳
|
||||
function initInstitutionFoundingTimeDateTime(v) {
|
||||
laydate.render({
|
||||
@ -299,6 +380,7 @@
|
||||
form.val('dataForm', dataFormData);
|
||||
form.render(null, 'dataForm');
|
||||
initInstitutionImageUploadFile();
|
||||
initSignPhotoUploadFile();
|
||||
initInstitutionFoundingTimeDateTime(data.institutionFoundingTime);
|
||||
initMap(data.institutionX,data.institutionY);
|
||||
initDataDict(dictId,'institutionRegionProvince',data.institutionRegionProvince);
|
||||
|
@ -50,6 +50,8 @@ public class InstitutionDTO {
|
||||
private String creator;
|
||||
@ApiModelProperty(name = "gmtCreate", value = "创建时间")
|
||||
private String gmtCreate;
|
||||
@ApiModelProperty(name = "signPhoto", value = "水印")
|
||||
private String signPhoto;
|
||||
|
||||
public String getInstitutionId() {
|
||||
return institutionId == null ? "" : institutionId.trim();
|
||||
@ -194,4 +196,12 @@ public class InstitutionDTO {
|
||||
public void setInstitutionType(String institutionType) {
|
||||
this.institutionType = institutionType;
|
||||
}
|
||||
|
||||
public String getSignPhoto() {
|
||||
return signPhoto == null ? "" : signPhoto.trim();
|
||||
}
|
||||
|
||||
public void setSignPhoto(String signPhoto) {
|
||||
this.signPhoto = signPhoto;
|
||||
}
|
||||
}
|
||||
|
@ -46,6 +46,8 @@ public class InstitutionVO {
|
||||
private String institutionRegionStreet;
|
||||
@ApiModelProperty(name = "institutionType", value = "机构类型")
|
||||
private String institutionType;
|
||||
@ApiModelProperty(name = "signPhoto", value = "水印")
|
||||
private String signPhoto;
|
||||
|
||||
public String getInstitutionName() {
|
||||
return institutionName == null ? "" : institutionName.trim();
|
||||
@ -166,4 +168,12 @@ public class InstitutionVO {
|
||||
public void setInstitutionType(String institutionType) {
|
||||
this.institutionType = institutionType;
|
||||
}
|
||||
|
||||
public String getSignPhoto() {
|
||||
return signPhoto == null ? "" : signPhoto.trim();
|
||||
}
|
||||
|
||||
public void setSignPhoto(String signPhoto) {
|
||||
this.signPhoto = signPhoto;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user