Jelajahi Sumber

人员组织导入导出

luojing 5 tahun lalu
induk
melakukan
d206fc4e2c

+ 2 - 2
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/inputperson/ActionWipeAll.java

@@ -88,11 +88,11 @@ public class ActionWipeAll extends BaseAction {
 			ApplicationCache.notify(Person.class);
 			ApplicationCache.notify(Unit.class);
 			
-			wo.setFlag("success");
+			wo.setFlag("导入人员数据成功");
 			System.out.println("开始删除人员组织所有数据--------end");
 		} catch (Exception e) {
 			logger.info("系统在查询所有组织人员信息时发生异常。" );
-			wo.setFlag("fail");
+			wo.setFlag("导入人员数据失败");
 			e.printStackTrace();
 		}
 		

+ 1 - 0
o2web/source/o2_core/o2/xAction/services/x_organization_assemble_control.json

@@ -218,6 +218,7 @@
   "getImportPersonTemplate": {"uri": "/jaxrs/inputperson/template"},
   "getImportPersonResault": {"uri": "/jaxrs/inputperson/result/flag/{flag}"},
   "importPerson": {"uri": "/jaxrs/inputperson", "method": "POST", "enctype": "formData"},
+  "wipeAll": {"uri": "/jaxrs/inputperson/wipe"},
 
   "clazz": "x_organization_assemble_control"
 }

+ 12 - 0
o2web/source/x_component_Org/$Main/default/importCss.css

@@ -2,6 +2,18 @@
     padding: 20px;
     margin: 20px 40px;
 }
+.importPersonCleanNode {
+    margin: 10px 0px 30px 0px;
+    height: 30px;
+    line-height: 30px;
+    width: 120px;
+    border: 1px solid #999999;
+    border-radius: 8px;
+    background-color: #3c76b7;
+    color: #ffffff;
+    text-align: center;
+    cursor: pointer;
+}
 .importPersonTitleNode {
     height: 40px;
     line-height: 40px;

+ 1 - 0
o2web/source/x_component_Org/$Main/default/importView.html

@@ -1,4 +1,5 @@
 <div class="importPersonAreaNode">
+    <div class="importPersonCleanNode"></div>
     <div class="importPersonTitleNode"></div>
     <div class="importPersonTemplateNode"></div>
     <div class="importPersonNode"></div>

+ 11 - 0
o2web/source/x_component_Org/Main.js

@@ -169,6 +169,7 @@ MWF.xApplication.Org.Main = new Class({
             "styles": this.css.rightContentNode
         }).inject(this.node);
         this.importConfiguratorContentNode.set("load", {"onSuccess": function(){
+        	this.importPersonCleanNode = this.importConfiguratorContentNode.getElement(".importPersonCleanNode");
         	this.importPersonTitleNode = this.importConfiguratorContentNode.getElement(".importPersonTitleNode");
             this.importPersonTemplateNode = this.importConfiguratorContentNode.getElement(".importPersonTemplateNode");
             this.importPersonNode = this.importConfiguratorContentNode.getElement(".importPersonNode");
@@ -183,10 +184,20 @@ MWF.xApplication.Org.Main = new Class({
         var url = action.action.address + action.action.actions.getImportPersonTemplate.uri;
         var infor = this.lp.importPersonInfor.replace("{url}", url);
 
+		this.importPersonCleanNode.set("text", this.lp.importPersonCleanNode);
         this.importPersonTitleNode.set("text", this.lp.importPersonTitle);
         this.importPersonTemplateNode.set("html", infor);
         this.importPersonNode.set("text", this.lp.importPersonAction);
 
+		this.importPersonCleanNode.addEvent("click", function(){
+			this.importPersonResultNode.hide();
+			this.restActions.wipeAll(function( json ){
+				if (json.type && json.type=="success"){
+					this.importPersonResultNode.set("html", json.data.flag);
+					this.importPersonResultNode.show();
+				}
+			}.bind(this),null,false);
+		}.bind(this));
 
         this.importPersonNode.addEvent("click", function(){
             this.importPersonResultNode.hide();

+ 1 - 0
o2web/source/x_component_Org/lp/zh-cn.js

@@ -239,6 +239,7 @@ MWF.xApplication.Org.LP = {
     "resetPasswordText": "您确定要为用户 {name} 重置密码吗?",
     "resetPasswordSuccess": "用户 {name} 的密码已重置",
 
+    "importPersonClean": "清空人员组织数据",
     "importPersonTitle": "人员导入",
     "importPersonInfor": "您可以通过Excel批量导入人员,<a target='_blank' href='{url}' >点击此处</a>获取人员导入模板",
     "importPersonAction": "上传Excel文件,导入人员",