diff --git a/public/pages/examine/editExamineStaff/editExamineStaff.html b/public/pages/examine/editExamineStaff/editExamineStaff.html
index 150aeeaac..80e8d8f83 100644
--- a/public/pages/examine/editExamineStaff/editExamineStaff.html
+++ b/public/pages/examine/editExamineStaff/editExamineStaff.html
@@ -26,6 +26,30 @@
+
+
diff --git a/public/pages/examine/editExamineStaff/editExamineStaff.js b/public/pages/examine/editExamineStaff/editExamineStaff.js
index 8c33168d9..5a3d8fb1a 100644
--- a/public/pages/examine/editExamineStaff/editExamineStaff.js
+++ b/public/pages/examine/editExamineStaff/editExamineStaff.js
@@ -6,6 +6,9 @@
esId: '',
staffName: '',
staffId: '',
+ post: '',
+ introduction: '',
+ headerImg: '',
allProjects: [],
projectIds: []
@@ -13,13 +16,20 @@
},
_initMethod: function() {
$that.editExamineStaffInfo.esId = vc.getParam('esId');
+ $that._initTextArea();
$that._listExamineProjects();
$that._listExamineStaffs();
},
_initEvent: function() {
-
+ vc.on("editExamineStaff", "notifyUploadImage", function(_param) {
+ if (_param.length > 0) {
+ vc.component.editExamineStaffInfo.headerImg = _param[0].fileId;
+ } else {
+ vc.component.editExamineStaffInfo.headerImg = ''
+ }
+ });
},
methods: {
editExamineStaffValidate() {
@@ -110,6 +120,10 @@
$that.editExamineStaffInfo.projectIds.push(item.projectId);
});
+ $(".summernote").summernote('code', vc.component.editExamineStaffInfo.introduction);
+ var photos = [];
+ photos.push(vc.component.editExamineStaffInfo.headerImg);
+ vc.emit('editExamineStaff', 'uploadImageUrl', 'notifyPhotos', photos);
},
function(errInfo, error) {
console.log('请求失败处理');
@@ -118,7 +132,64 @@
},
_goBack: function() {
vc.goBack();
- }
+ },
+ _initTextArea: function() {
+ var $summernote = $('.summernote').summernote({
+ lang: 'zh-CN',
+ height: 300,
+ placeholder: '必填,请输入员工简介',
+ callbacks: {
+ onImageUpload: function(files, editor, $editable) {
+ $that.sendFile($summernote, files);
+ },
+ onChange: function(contents, $editable) {
+ vc.component.editExamineStaffInfo.introduction = contents;
+ }
+ },
+ toolbar: [
+ ['style', ['style']],
+ ['font', ['bold', 'italic', 'underline', 'clear']],
+ ['fontname', ['fontname']],
+ ['color', ['color']],
+ ['para', ['ul', 'ol', 'paragraph']],
+ ['height', ['height']],
+ ['table', ['table']],
+ ['insert', ['link', 'picture']],
+ ['view', ['fullscreen', 'codeview']],
+ ],
+ });
+ },
+ sendFile: function($summernote, files) {
+ console.log('上传图片', files);
+ var param = new FormData();
+ param.append("uploadFile", files[0]);
+ param.append('communityId', vc.getCurrentCommunity().communityId);
+ vc.http.upload(
+ 'uploadFile',
+ 'uploadImage',
+ param, {
+ emulateJSON: true,
+ //添加请求头
+ headers: {
+ "Content-Type": "multipart/form-data"
+ }
+ },
+ function(json, res) {
+ //vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
+ if (res.status == 200) {
+ var data = JSON.parse(json);
+ //关闭model
+ //$summernote.summernote('insertImage', "/callComponent/download/getFile/file?fileId=" + data.fileId + "&communityId=" + vc.getCurrentCommunity().communityId);
+ $summernote.summernote('insertImage', data.url);
+ return;
+ }
+ vc.toast(json);
+ },
+ function(errInfo, error) {
+ console.log('请求失败处理');
+ vc.toast(errInfo);
+ });
+ },
}
});
diff --git a/public/pages/examine/examineStaffManage/examineStaffManage.html b/public/pages/examine/examineStaffManage/examineStaffManage.html
index 50f416fc5..a1288012b 100644
--- a/public/pages/examine/examineStaffManage/examineStaffManage.html
+++ b/public/pages/examine/examineStaffManage/examineStaffManage.html
@@ -46,16 +46,27 @@