修改 查询详情页
This commit is contained in:
parent
1f184dfe12
commit
3d0b1dcf44
@ -69,6 +69,7 @@ public class indexWebController extends DefaultBaseController {
|
||||
for (RoleSimpleDTO role : roles) {
|
||||
if(ROLE_CODE_1.equals(role.getRoleCode())){
|
||||
mv.setViewName("default-home");
|
||||
|
||||
//mv.setViewName("count_role_1");
|
||||
break;
|
||||
}
|
||||
|
@ -77,6 +77,8 @@ public class HeartTalkDTO {
|
||||
private String talkDateTime2;
|
||||
@ApiModelProperty(name = "talkPlace2", value = "谈话地点二")
|
||||
private String talkPlace2;
|
||||
@ApiModelProperty(name = "talkPhotos", value = "谈话图片附件")
|
||||
private String talkPhotos;
|
||||
|
||||
|
||||
public String getDutyIndexLibName() {
|
||||
@ -319,4 +321,12 @@ public class HeartTalkDTO {
|
||||
public void setTalkPlace2(String talkPlace2) {
|
||||
this.talkPlace2 = talkPlace2;
|
||||
}
|
||||
|
||||
public String getTalkPhotos() {
|
||||
return talkPhotos;
|
||||
}
|
||||
|
||||
public void setTalkPhotos(String talkPhotos) {
|
||||
this.talkPhotos = talkPhotos;
|
||||
}
|
||||
}
|
||||
|
@ -191,6 +191,7 @@
|
||||
<result column="talk_person_org_Job_2" property="talkPersonOrgJob2"/>
|
||||
<result column="talk_date_time_2" property="talkDateTime2"/>
|
||||
<result column="talk_place_2" property="talkPlace2"/>
|
||||
<result column="talk_photos" property="talkPhotos"/>
|
||||
|
||||
|
||||
|
||||
@ -269,12 +270,12 @@
|
||||
report_id,duty_index_lib_id,duty_title,org_name,talk_obj,political_status,org_job,talk_reason,
|
||||
talk_person,talk_person_org_job,note_taker,talk_date_time,talk_place,talk_content,
|
||||
talk_obj_opinion,talk_obj_sign,sign_data_time,audit_status,creator,gmt_create,modifier,gmt_modified,is_delete,talk_type,
|
||||
talk_person_2,talk_person_org_Job_2,talk_date_time_2,talk_place_2
|
||||
talk_person_2,talk_person_org_Job_2,talk_date_time_2,talk_place_2,talk_photos
|
||||
) VALUES (
|
||||
#{reportId},#{dutyIndexLibId},#{dutyTitle},#{orgName},#{talkObj},#{politicalStatus},#{orgJob},#{talkReason},
|
||||
#{talkPerson},#{talkPersonOrgJob},#{noteTaker},#{talkDateTime},#{talkPlace},#{talkContent},
|
||||
#{talkObjOpinion},#{talkObjSign},#{signDataTime},#{auditStatus},#{creator},#{gmtCreate},#{modifier},#{gmtModified},#{isDelete},#{talkType},
|
||||
#{talkPerson2},#{talkPersonOrgJob2},#{talkDateTime2},#{talkPlace2}
|
||||
#{talkPerson2},#{talkPersonOrgJob2},#{talkDateTime2},#{talkPlace2},#{talkPhotos}
|
||||
)
|
||||
</insert>
|
||||
|
||||
@ -353,7 +354,10 @@
|
||||
talk_date_time_2 = #{talkDateTime2},
|
||||
</if>
|
||||
<if test="talkPlace2 != null and talkPlace2 != ''">
|
||||
talk_place_2 = #{talkPlace2}
|
||||
talk_place_2 = #{talkPlace2},
|
||||
</if>
|
||||
<if test="talkPhotos != null and talkPhotos != ''">
|
||||
talk_photos = #{talkPhotos}
|
||||
</if>
|
||||
WHERE report_id = #{reportId}
|
||||
</update>
|
||||
|
@ -171,10 +171,9 @@
|
||||
{{# 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>
|
||||
|
||||
<span class="upload-image-span">
|
||||
<img src="route/file/download/false/{{item.fileId}}" align="加载失败">
|
||||
</span>
|
||||
</div>
|
||||
{{# } }}
|
||||
{{# } }}
|
||||
@ -187,6 +186,27 @@
|
||||
<input readonly="readonly" type="text" id="signDataTime" name="signDataTime" class="layui-input" value="" placeholder="请选择签字日期" readonly style="cursor: pointer;" lay-verify="required">
|
||||
</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="talkPhotos" name="talkPhotos">
|
||||
<div class="layui-btn-container" id="talkPhotosFileBox" style="border: 1px solid #e6e6e6;"></div>
|
||||
<script id="talkPhotosFileDownload" type="text/html">
|
||||
{{# var fileName = 'talkPhotos'; }}
|
||||
{{# 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>
|
||||
</div>
|
||||
{{# } }}
|
||||
{{# } }}
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@ -235,6 +255,7 @@
|
||||
form.val('dataForm', dataFormData);
|
||||
form.render(null, 'dataForm');
|
||||
initTalkObjSignUploadFile();
|
||||
inittalkPhotosUploadFile();
|
||||
initNationTemplate();
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
@ -296,6 +317,57 @@
|
||||
});
|
||||
});
|
||||
}
|
||||
// 初始化附加图片图片上传
|
||||
function inittalkPhotosUploadFile() {
|
||||
var files = $('#talkPhotos').val();
|
||||
initFileList('talkPhotos', files, function(fileName) {
|
||||
var viewer = new Viewer(document.getElementById(fileName +'FileBox'), {navbar: false});
|
||||
viewerObj[fileName] = viewer;
|
||||
});
|
||||
|
||||
form.on('button(talkPhotosUploadFile)', 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(talkPhotosRemoveFile)', 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 initFileList(fileName, ids, callback) {
|
||||
|
@ -193,6 +193,36 @@
|
||||
<input type="text" id="signDataTime" name="signDataTime" class="layui-input" value="" placeholder="请选择签字日期" readonly style="cursor: pointer;" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">图片附件(最多8张)</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="hidden" id="talkPhotos" name="talkPhotos">
|
||||
<div class="layui-btn-container" id="talkPhotosFileBox" style="border: 1px solid #e6e6e6;"></div>
|
||||
<script id="talkPhotosFileDownload" type="text/html">
|
||||
{{# var fileName = 'talkPhotos'; }}
|
||||
{{# 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="talkPhotosRemoveFile">
|
||||
<i class="fa fa-trash-o"></i>
|
||||
</a>
|
||||
</div>
|
||||
{{# } }}
|
||||
{{# } }}
|
||||
{{# if(d[fileName].length < 8) { }}
|
||||
<div class="upload-image-box" style="width: auto; height: auto; padding: 5px;">
|
||||
<a href="javascript:void(0);" lay-form-button data-explain="附加图片" data-name="talkPhotos" lay-filter="talkPhotosUploadFile">
|
||||
<i class="fa fa-plus-square-o" style="font-size: 70px;"></i>
|
||||
</a>
|
||||
</div>
|
||||
{{# } }}
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item layui-layout-admin">
|
||||
<div class="layui-input-block">
|
||||
@ -265,6 +295,7 @@
|
||||
form.val('dataForm', dataFormData);
|
||||
form.render(null, 'dataForm');
|
||||
initTalkObjSignUploadFile();
|
||||
initTalkPhotosUploadFile();
|
||||
initNationTemplate(data.talkType);
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
@ -327,6 +358,57 @@
|
||||
});
|
||||
}
|
||||
|
||||
function initTalkPhotosUploadFile() {
|
||||
var files = $('#talkPhotos').val();
|
||||
initFileList('talkPhotos', files, function(fileName) {
|
||||
var viewer = new Viewer(document.getElementById(fileName +'FileBox'), {navbar: false});
|
||||
viewerObj[fileName] = viewer;
|
||||
});
|
||||
|
||||
form.on('button(talkPhotosUploadFile)', 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(talkPhotosRemoveFile)', 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 initFileList(fileName, ids, callback) {
|
||||
var dataForm = {};
|
||||
|
@ -144,6 +144,20 @@
|
||||
<td class="tableTitle">签字时间</td>
|
||||
<td class="tableTitle" colspan="3">{{ d.signDataTime}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tableTitle">图片附件</td>
|
||||
<td class="tableTitle" style="height: 100px" colspan="7">
|
||||
<div class="layui-btn-container" id="talkPhotosFileBox" style="border: 1px solid #e6e6e6;">
|
||||
{{# layui.each(d.talkPhotosList, function(index, item){ }}
|
||||
<div class="upload-image-box">
|
||||
<span class="upload-image-span">
|
||||
<img src="route/file/download/false/{{item.fileId}}" align="加载失败">
|
||||
</span>
|
||||
</div>
|
||||
{{# }); }}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="btn-box">
|
||||
@ -186,6 +200,7 @@
|
||||
view.innerHTML = html;
|
||||
});
|
||||
var viewer = new Viewer(document.getElementById('indexGeneralImagesFileBox'), {navbar: false});
|
||||
var viewer = new Viewer(document.getElementById('talkPhotosFileBox'), {navbar: false});
|
||||
}
|
||||
|
||||
function initImages(formdata){
|
||||
@ -193,17 +208,28 @@
|
||||
ids: formdata.talkObjSign
|
||||
}, null, function(code, data) {
|
||||
formdata['imagesList'] = data;
|
||||
initImages2(formdata)
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function initImages2(formdata){
|
||||
top.restAjax.get(top.restAjax.path('api/file/list', []), {
|
||||
ids: formdata.talkPhotos
|
||||
}, null, function(code, data) {
|
||||
formdata['talkPhotosList'] = data;
|
||||
dataTemplet(formdata)
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 初始化内容
|
||||
function initData() {
|
||||
var loadLayerIndexl;
|
||||
|
@ -193,6 +193,38 @@
|
||||
<input type="text" id="signDataTime" name="signDataTime" class="layui-input" value="" placeholder="请选择签字日期" readonly style="cursor: pointer;" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">图片附件(最多8张)</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="hidden" id="talkPhotos" name="talkPhotos">
|
||||
<div class="layui-btn-container" id="talkPhotosFileBox" style="border: 1px solid #e6e6e6;"></div>
|
||||
<script id="talkPhotosFileDownload" type="text/html">
|
||||
{{# var fileName = 'talkPhotos'; }}
|
||||
{{# 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="talkPhotosRemoveFile">
|
||||
<i class="fa fa-trash-o"></i>
|
||||
</a>
|
||||
</div>
|
||||
{{# } }}
|
||||
{{# } }}
|
||||
{{# if(d[fileName].length < 8) { }}
|
||||
<div class="upload-image-box" style="width: auto; height: auto; padding: 5px;">
|
||||
<a href="javascript:void(0);" lay-form-button data-explain="附加图片" data-name="talkPhotos" lay-filter="talkPhotosUploadFile">
|
||||
<i class="fa fa-plus-square-o" style="font-size: 70px;"></i>
|
||||
</a>
|
||||
</div>
|
||||
{{# } }}
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="layui-form-item layui-layout-admin">
|
||||
<div class="layui-input-block">
|
||||
@ -320,6 +352,7 @@
|
||||
initSignDataTimeDateTime();
|
||||
initNationTemplate();
|
||||
initTalkObjSignUploadFile();
|
||||
initTalkPhotosUploadFile();
|
||||
}
|
||||
initData();
|
||||
|
||||
@ -384,6 +417,57 @@
|
||||
});
|
||||
});
|
||||
}
|
||||
// 初始化附加图片图片上传
|
||||
function initTalkPhotosUploadFile() {
|
||||
var files = $('#talkPhotos').val();
|
||||
initFileList('talkPhotos', files, function(fileName) {
|
||||
var viewer = new Viewer(document.getElementById(fileName +'FileBox'), {navbar: false});
|
||||
viewerObj[fileName] = viewer;
|
||||
});
|
||||
|
||||
form.on('button(talkPhotosUploadFile)', 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(talkPhotosRemoveFile)', 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();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -155,6 +155,26 @@
|
||||
</div>
|
||||
</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="talkPhotos" name="talkPhotos">
|
||||
<div class="layui-btn-container" id="talkPhotosFileBox" style="border: 1px solid #e6e6e6;"></div>
|
||||
<script id="talkPhotosFileDownload" type="text/html">
|
||||
{{# var fileName = 'talkPhotos'; }}
|
||||
{{# 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>
|
||||
</div>
|
||||
{{# } }}
|
||||
{{# } }}
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@ -191,6 +211,7 @@
|
||||
form.val('dataForm', dataFormData);
|
||||
form.render(null, 'dataForm');
|
||||
initTalkObjSignUploadFile();
|
||||
inittalkPhotosUploadFile();
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function() {
|
||||
@ -252,6 +273,58 @@
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化附加图片图片上传
|
||||
function inittalkPhotosUploadFile() {
|
||||
var files = $('#talkPhotos').val();
|
||||
initFileList('talkPhotos', files, function(fileName) {
|
||||
var viewer = new Viewer(document.getElementById(fileName +'FileBox'), {navbar: false});
|
||||
viewerObj[fileName] = viewer;
|
||||
});
|
||||
|
||||
form.on('button(talkPhotosUploadFile)', 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(talkPhotosRemoveFile)', 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 initFileList(fileName, ids, callback) {
|
||||
var dataForm = {};
|
||||
|
Loading…
Reference in New Issue
Block a user