@@ -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');
diff --git a/module-institution-management/src/main/resources/templates/institution/update.html b/module-institution-management/src/main/resources/templates/institution/update.html
index ae290e4..e5c364f 100644
--- a/module-institution-management/src/main/resources/templates/institution/update.html
+++ b/module-institution-management/src/main/resources/templates/institution/update.html
@@ -124,6 +124,36 @@