chunk-4c28708a.56ed6412.js 94 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4c28708a","chunk-fbbdd47a"],{"5e0c":function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return WebOffice2015}));var core_js_modules_es6_array_find__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("7514"),core_js_modules_es6_array_find__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(core_js_modules_es6_array_find__WEBPACK_IMPORTED_MODULE_0__),core_js_modules_es6_regexp_split__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("28a5"),core_js_modules_es6_regexp_split__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(core_js_modules_es6_regexp_split__WEBPACK_IMPORTED_MODULE_1__),core_js_modules_es6_regexp_to_string__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("6b54"),core_js_modules_es6_regexp_to_string__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(core_js_modules_es6_regexp_to_string__WEBPACK_IMPORTED_MODULE_2__),core_js_modules_es6_regexp_replace__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("a481"),core_js_modules_es6_regexp_replace__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(core_js_modules_es6_regexp_replace__WEBPACK_IMPORTED_MODULE_3__),D_lcjyjOA_LCJYJOASystemWeb_node_modules_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("ade3"),core_js_modules_es6_typed_uint8_array__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("34ef"),core_js_modules_es6_typed_uint8_array__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(core_js_modules_es6_typed_uint8_array__WEBPACK_IMPORTED_MODULE_5__);function base64toBlob(t,e){e=e||"";for(var i=1024,s=atob(t),o=s.length,n=Math.ceil(o/i),a=new Array(n),r=0;r<n;++r){for(var c=r*i,h=Math.min(c+i,o),l=new Array(h-c),u=c,d=0;u<h;++d,++u)l[d]=s[u].charCodeAt(0);a[r]=new Uint8Array(l)}return new Blob(a,{type:e})}function WebOffice2015(){var _this$DocSuffixType,ISO,root,rootValue,MenuFile;this.SaveServlet="",this.ServerUrl="ServerUrl",this.dVersion="5.0.0.12",this.dUpdateDate="2019-05-22",this.PASSWORD="123456",this.Ashell=null,this.BookMark="",this.ImageName="",this.obj,this.DownloadedFileTempPathName="",this.DOWN="\\WebOffice\\Down\\",this.UP="\\WebOffice\\UP\\",this.FilePath=null,this.TmpFile=null,this.tempInsertName="",this.DocTypeValue={DOC:0,DOCX:16,XLS:56,XLSX:51,WPS:0,ET:56,PDF:41,OFD:42},this.DocSuffixType=(_this$DocSuffixType={0:".doc",12:".docx",56:".xls",51:".xlsx"},Object(D_lcjyjOA_LCJYJOASystemWeb_node_modules_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_4__["a"])(_this$DocSuffixType,"0",".wps"),Object(D_lcjyjOA_LCJYJOASystemWeb_node_modules_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_4__["a"])(_this$DocSuffixType,"56",".et"),Object(D_lcjyjOA_LCJYJOASystemWeb_node_modules_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_4__["a"])(_this$DocSuffixType,41,".pdf"),Object(D_lcjyjOA_LCJYJOASystemWeb_node_modules_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_4__["a"])(_this$DocSuffixType,42,".ofd"),_this$DocSuffixType),this.setVersion=-1,this.OfficeVersion={v2003:1,vOther:0},this.sendMode=null,this.iWebOfficeTempName="iWebOfficeTempName.doc",this.WebUrl="",this.getResultJson="",this.RecordID="",this.Template="",this.SingleFileName="",this.FileName="",this.UserName="",this.OfficeUserName="",this.FileType="",this.EditType="",this.DataBase="",this.WebObject=null,this.ShowToolBar=1,this.CopyType="1",this.ShowMenu="1",this.Status="",this.MaxFileSize=8192,this.ShowWindow=!0,this.RibbonUIXML="",this.UIControl=!1,this.HiddenDirectory=!1,this.DelFileAfterSave=!0,this.Charset=!0,this.INetSetCookie=function(t,e){this.obj.INetSetCookie(t,e)},this.SetCaption=function(t){this.obj.Caption=t},this.GetFileType=function(t){var e=t,i=e.lastIndexOf("."),s=e.length,o=e.substring(i,s);this.FileType=o},this.GetSingleFileName=function(t){var e=t,i=e.lastIndexOf("/"),s=e.length,o=e.substring(i+1,s);this.SingleFileName=o},this.WebOpen2=function(t){this.Status="成功";var e=this.obj.Http;if(this.FileName=t,this.GetFileType(t),this.GetSingleFileName(t),e.Open(this.HttpMethod.Get,this.ServerUrl+t,!1)&&e.Send()){if(!this.hiddenSaveLocal(e,this,!1,!1))return this.Status="保存文档到本地 失败",!1;var i=this.WebOpenLocalFile(this.DownloadedFileTempPathName);if(0==i)return this.getOfficeVersion(),!0;if(1==i){var s=window.confirm("可能当前授权码错误,请确认iWebOffice2015.js的授权是否正确(或乱码)\r\r单击“确定”关闭。单击“取消”继续。");if(this.Status="可能当前授权码错误,请确认iWebOffice2015.js的授权是否正确(或乱码)",1==s)return window.close(),!1}else if(2==i){s=window.confirm("没有找到文档,请确认WebOpenLocalFile打开文档的路径是否正确\r\r单击“确定”关闭。单击“取消”继续。");if(this.Status="有找到文档,请确认WebOpenLocalFile打开文档的路径是否正确",1==s)return window.close(),!1}else if(3==i){s=window.confirm("没有权限导致文档打开失败,请用管理员身份运行浏览器后重试\r\r单击“确定”关闭。单击“取消”继续。");if(this.Status="没有权限导致文档打开失败,请用管理员身份运行浏览器后重试",1==s)return window.close(),!1}else if(4==i){s=window.confirm("文件可能损坏,请确定服务器文档是否已经损坏\r\r单击“确定”关闭。单击“取消”继续。");if(this.Status="文件可能损坏,请确定服务器文档是否已经损坏",1==s)return window.close(),!1}else if(5==i){s=window.confirm("未安装Office或者注册表有损坏\r\r单击“确定”关闭。单击“取消”继续。");if(this.Status="未安装Office或者注册表有损坏",1==s)return window.close(),!1}else if(6==i){s=window.confirm("文件被占用,请结束Office进程后重试\r\r单击“确定”关闭。单击“取消”继续。");if(this.Status="文件被占用,请结束Office进程后重试",1==s)return window.close(),!1}else{s=window.confirm("打开文档时未知错误!错误码为: "+i+"\r\r单击“确定”关闭。单击“取消”继续。");if(this.Status="打开文档时未知错误!错误码为: "+i,1==s)return window.close(),!1}}},this.WebOpen3=function(t){this.Status="成功";var e=this.obj.Http;if(this.ShowMenuBar(this.ShowMenu),this.NewShowToolBar(this.ShowToolBar),this.GetFileType(this.FileName),this.GetSingleFileName(this.FileName),e.Open(this.HttpMethod.Get,t,!1)&&e.Send()){if(!this.hiddenSaveLocal(e,this,!1,!1))return this.Status="保存文档到本地 失败",!1;var i=this.WebOpenLocalFile(this.DownloadedFileTempPathName);if(0==i)return this.getOfficeVersion(),!0;if(1==i){var s=window.confirm("可能当前授权码错误,请确认iWebOffice2015.js的授权是否正确(或乱码)\r\r单击“确定”关闭。单击“取消”继续。");if(this.Status="可能当前授权码错误,请确认iWebOffice2015.js的授权是否正确(或乱码)",1==s)return window.close(),!1}else if(2==i){s=window.confirm("没有找到文档,请确认WebOpenLocalFile打开文档的路径是否正确\r\r单击“确定”关闭。单击“取消”继续。");if(this.Status="有找到文档,请确认WebOpenLocalFile打开文档的路径是否正确",1==s)return window.close(),!1}else if(3==i){s=window.confirm("没有权限导致文档打开失败,请用管理员身份运行浏览器后重试\r\r单击“确定”关闭。单击“取消”继续。");if(this.Status="没有权限导致文档打开失败,请用管理员身份运行浏览器后重试",1==s)return window.close(),!1}else if(4==i){s=window.confirm("文件可能损坏,请确定服务器文档是否已经损坏\r\r单击“确定”关闭。单击“取消”继续。");if(this.Status="文件可能损坏,请确定服务器文档是否已经损坏",1==s)return window.close(),!1}else if(5==i){s=window.confirm("未安装Office或者注册表有损坏\r\r单击“确定”关闭。单击“取消”继续。");if(this.Status="未安装Office或者注册表有损坏",1==s)return window.close(),!1}else if(6==i){s=window.confirm("文件被占用,请结束Office进程后重试\r\r单击“确定”关闭。单击“取消”继续。");if(this.Status="文件被占用,请结束Office进程后重试",1==s)return window.close(),!1}else{s=window.confirm("打开文档时未知错误!错误码为: "+i+"\r\r单击“确定”关闭。单击“取消”继续。");if(this.Status="打开文档时未知错误!错误码为: "+i,1==s)return window.close(),!1}}},this.WebOpen=function(t){this.Status="成功";var e=this.obj.Http;return e.Clear(),this.GetSingleFileName(this.FileName),this.WebSetMsgByName("USERNAME",this.UserName),this.WebSetMsgByName("FILENAME",this.FileName),this.WebSetMsgByName("FILETYPE",this.FileType),this.WebSetMsgByName("RECORDID",this.RecordID),this.WebSetMsgByName("EDITTYPE",this.EditType),this.WebSetMsgByName("DATABASE",this.DataBase),this.WebSetMsgByName("OPTION","LOADFILE"),e.AddForm("FormData",this.GetMessageString()),this.WebClearMessage(),this.sendMode="OpenFile",this.ShowMenuBar(this.ShowMenu),this.NewShowToolBar(this.ShowToolBar),!!this.LOADFILE(e)&&(this.NewCopyType(this.CopyType),this.NewUIControl(this.UIControl),".ppt"!=this.FileType&&".pptx"!=this.FileType&&".pdf"!=this.FileType&&".ofd"!=this.FileType&&(this.VBASetUserName(this.UserName),this.setEditType(this.EditType)),this.Status="打开文档成功",!0)},this.WebOpenBase64=function(){var t=this,e=this.obj,i=this.FileName,s=this.DownFilePath(),o="OPTION=LOADFILE&FILENAME="+this.FileName+"&FILETYPE="+this.FileType+"&RECORDID="+this.RecordID+"&EDITTYPE="+this.EditType;return $.ajax({type:"POST",url:"../../AJAXServer",data:o,cache:!1,processData:!1,xhr:function(){console.log("xhr function eee");var t=jQuery.ajaxSettings.xhr();return console.log(t),t.onprogress=function(t){if(t.lengthComputable){var e=t.loaded/t.total;console.log(e)}},t},success:function(o){var n=s;n+="\\",n+=i,e.Base64Text2File(o,n),t.WebOpenLocalFile(n)}}),!0},this.WebSave2=function(t){var e=Math.round(1e6*Math.random()),i=this.getFilePath()+e+this.FileName,s=this.WebSaveLocalFile(i);if(0!=s)return this.Status="保存本地文档失败!错误代码为:"+s,!1;var o=this,n=this.obj,a=this.FileName,r=n.File2Base64Text(i),c=new FormData,h=((new Date).getTime(),base64toBlob(r));(new Date).getTime();c.append("FileData",h,"myFileName");var l=o.WebUrl+"/AJAXServer?OPTION=MultiPartUpload&FILENAME="+a;return $.ajax({url:l,type:"POST",data:c,contentType:!1,cache:!1,processData:!1,xhr:function(){console.log("xhr function");var t=jQuery.ajaxSettings.xhr();return console.log(t),t.upload.onprogress=function(t){if(t.lengthComputable){var e=t.loaded/t.total;console.log(e)}},t},success:function(e,i){console.log("success"),console.log("textStatus: "+i),console.log("data: "+e),t(0)},error:function(e,i,s){console.log("essor"),console.log(e),console.log("textStatus: "+i),console.log("errorThrown: "+s),t(1)}}),!0},this.WebSaveBase64=function(){var t=Math.round(1e6*Math.random()),i=this.getFilePath()+t+this.FileName,s=this.WebSaveLocalFile(i);if(0!=s)return this.Status="保存本地文档失败!错误代码为:"+s,!1;var o=this.obj,n=(this.FileName,o.File2Base64Text(i)),a=n.replace(/\+/g,"%2B");if(window.XMLHttpRequest)xmlhttp=new XMLHttpRequest,xmlhttp.overrideMineType&&xmlhttp.overrideMineType("text/xml");else if(window.ActiveXObject)for(var r=["MSXML2.XMLHTTP","Microsoft.XMLHTTP"],c=0;c<activeName.length;c++)try{xmlhttp=new ActiveXObject(r[c]);break}catch(e){}if(!xmlhttp)return!1;o=this.obj,this.FileName;var h="OPTION=SAVEFILE&FILENAME="+this.FileName+"&FILETYPE="+this.FileType+"&RECORDID="+this.RecordID+"&EDITTYPE="+this.EditType+"&TEMPLATE="+this.Template+"&SUBJECT="+this.Subject+"&AUTHOR="+this.Author+"&BASE64FILE="+a;return xmlhttp.open("POST","../../AJAXServer?name=",!1),xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),xmlhttp.send(h),this.Status="成功将文档保存到服务器",!0},this.WebSave2Servelt=function(){var t=this.obj.Http;t.Clear();var e=this.getFilePath()+1e5*Math.random()+this.SingleFileName;if(this.sendMode="SaveFile",this.WebSetMaxFileSize(e)){if(this.SAVEFILE(t,e)){var i=t.status;return 200==i&&alert("保存成功"),this.Status="成功将文档保存到服务器",!0}return!1}return this.Status="保存失败:MaxFileSize只能允许保存:<"+this.MaxFileSize/1024+">M",!1},this.WebSave=function(t){this.Status="";var e=this.obj.Http;if(e.Clear(),this.WebSetMsgByName("USERNAME",this.UserName),this.WebSetMsgByName("RECORDID",this.RecordID),this.WebSetMsgByName("TEMPLATE",this.Template),this.WebSetMsgByName("SUBJECT",this.Subject),this.WebSetMsgByName("AUTHOR",this.Author),this.WebSetMsgByName("HTMLPATH",this.HTMLPath),this.WebSetMsgByName("FILETYPE",this.FileType),this.WebSetMsgByName("OPTION","SAVEFILE"),this.WebSetMsgByName("DATABASE",this.DataBase),this.WebSetMsgByName("FILENAME",this.FileName),this.WebSetAllowEmpty()){this.GetSingleFileName(this.FileName);var i=this.getFilePath()+1e5*Math.random()+this.SingleFileName,s=this.WebSaveLocalFile(i);if(0!=s)return this.Status="保存本地文档失败!错误代码为:"+s,!1}else alert("文档没有内容,是否确定保存");if(this.sendMode="SaveFile",this.WebSetMaxFileSize(i)){if(this.SAVEFILE(e,i,t)){e.status;return this.Status="成功将文档保存到服务器",!0}return!1}return this.Status="保存失败:MaxFileSize只能允许保存:<"+this.MaxFileSize/1024+">M",!1},this.WebClose=function(){return!!this.Close()},this.WebSetMsgByName=function(t,e){this.ht.Add(t,e)},this.WebGetMsgByName=function(t){return this.ht.Get(t)},this.WebSendMessage=function(){var t=this.obj.Http;return t.Clear(),this.WebSetMsgByName("OPTION","SENDMESSAGE"),this.sendMode="SendMessage",t.ShowProgressUI=this.ShowWindow,t.AddForm("FormData",this.GetMessageString()),t.Open(this.HttpMethod.Post,this.WebUrl,!1)?t.Send()?(this.GetDataToSend(),t.Clear(),this.Status=this.WebGetMsgByName("STATUS"),!0):(this.Status=this.WebGetMsgByName("STATUS"),!1):(this.Status="网络通信异常",!1)},this.WebClearMessage=function(){this.ht.Clear()},this.WebSavePDF=function(){var t=this.obj.Http;return t.Clear(),this.WebSetMsgByName("RECORDID",this.RecordID),this.WebSetMsgByName("OPTION","SAVEPDF"),this.WebSetMsgByName("FILENAME",this.RecordID+".pdf"),this.SaveAsPdf(this.getFilePath()+this.RecordID+".pdf"),this.SAVEFILE(t,this.getFilePath()+this.RecordID+".pdf")?(this.Status="保存PDF文件成功",!0):(this.Status="保存PDF文件失败",!1)},this.WebSaveAsHtml=function(){if(this.SaveAsHtml(this.getFilePath()+this.RecordID+".html")){var t=this.getFilePath()+this.RecordID+".files",e=this.obj.FileSystem.FindToDirAsFileEx(t),i=e.split("\r\n"),s=this.obj.Http;s.Clear(),this.WebSetMsgByName("RECORDID",this.RecordID),this.WebSetMsgByName("OPTION","SAVEHTML"),this.WebSetMsgByName("DIRECTORY",this.RecordID+".files");for(var o=0;o<i.length;o++){var n=i[o];if(this.WebSetMsgByName("FILENAME",n),!this.SAVEFILE(s,t+"\\"+n))return this.Status="保存HTML文件失败",!1}return this.WebSetMsgByName("DIRECTORY",""),this.WebSetMsgByName("FILENAME",this.RecordID+".html"),this.SAVEFILE(s,this.getFilePath()+this.RecordID+".html")?(this.Status="保存HTML文件成功",!0):(this.Status="保存HTML文件失败",!1)}return this.Status="保存HTML文件失败!",!1},this.WebSaveTemplate=function(){this.Status="";var t=this.obj.Http;t.Clear(),this.WebSetMsgByName("OPTION","SAVETEMPLATE"),this.WebSetMsgByName("TEMPLATE",this.Template);var e=this.WebSaveLocalFile(this.getFilePath()+this.FileName);return 0!=e?(this.Status="保存本地文档失败!错误代码为:"+e,!1):(this.sendMode="WebSaveTemplate",!!this.SAVEFILE(t,this.FilePath+this.FileName)&&(this.Status="保存模板文件成功",!0))},this.WebUseTemplate=function(){this.ClearRevisions(),this.WebDelLocalFile(this.getFilePath()+this.iWebOfficeTempName);var t=this.WebSaveLocalFile(this.getFilePath()+this.iWebOfficeTempName);if(0!=t)return this.Status="保存本地文档失败!错误代码为:"+t,!1;var e=this.obj.Http;return this.WebSetMsgByName("OPTION","LOADTEMPLATE"),this.WebSetMsgByName("RECORDID",this.RecordID),this.WebSetMsgByName("TEMPLATE",this.Template),e.AddForm("FormData",this.GetMessageString()),this.WebClearMessage(),this.LOADFILE(e)?!!this.VBAInsertFile("Content",this.getFilePath()+this.iWebOfficeTempName)&&(this.Status="套红成功",!0):(this.Status="打开套红文档失败",!1)},this.WebSaveImage=function(t,e){if(".doc"==this.FileType||".docx"==this.FileType||".wps"==this.FileType){var i=this.getFilePath()+this.RecordID+".htm",s=this.getFilePath()+this.RecordID+".files";this.obj.ActiveDocument.SaveAs(i,10,!1,"",!1,"",!1,!1,!1,!1,!1,0),this.obj.ActiveDocument.Application.ActiveWindow.View.type=3;var o=new VBArray(this.obj.FileSystem.FindToDirAsFile(s)).toArray(),n=this.obj.Http;n.Clear(),this.WebSetMsgByName("RECORDID",this.RecordID),this.WebSetMsgByName("OPTION","SAVEIMAGE"),this.WebSetMsgByName("DIRECTORY",this.RecordID+".files");for(var a=0;a<o.length;a++){var r=o[a];if(this.WebSetMsgByName("FILENAME",r),!this.SAVEFILE(n,s+"\\"+r))return this.Status="保存HTML图片文件失败",!1}return this.WebSetMsgByName("DIRECTORY",""),this.WebSetMsgByName("FILENAME",this.RecordID+".htm"),this.SAVEFILE(n,this.getFilePath()+this.RecordID+".htm")?(this.Status="保存HTML图片文件成功",!0):(this.Status="保存HTML图片文件失败",!1)}return this.Status="保存HTML图片文件失败!",!1},this.WebInsertFile=function(){var t=this.obj.Http;this.WebSetMsgByName("TEMPLATE",this.Template),this.WebSetMsgByName("OPTION","INSERTFILE"),t.AddForm("FormData",this.GetMessageString()),this.WebClearMessage();var e=this.WebUrl.substring(0,this.WebUrl.lastIndexOf("/"));return t.ShowProgressUI=this.ShowWindow,t.Open(this.HttpMethod.Post,e+"/Document/"+this.Template,!1)?t.Send()?200==t.Status?this.hiddenSaveLocal(t,this,!1,!1,this.Template)?this.obj.ActiveDocument.BookMarks.Exists(this.BookMark)?!!this.VBAInsertFile(this.BookMark,this.DownloadedFileTempPathName)&&(this.Status="插入成功",t.Clear(),!0):(this.Status="文档里没有对应书签",!1):(this.Status="文档保存到本地失败",!1):(this.Status="数据接收错误",!1):(this.Status="数据包发送失败",!1):(this.Status="打开连接失败",!1)},this.WebInsertImage=function(t,e,i,s){if(".doc"==this.FileType||".docx"==this.FileType){if("-1"==this.obj.ActiveDocument.ProtectionType){var o=this.obj.Http;return this.BookMark=t,this.ImageName=e,this.WebSetMsgByName("OPTION","INSERTIMAGE"),this.WebSetMsgByName("IMAGENAME",this.ImageName),o.AddForm("FormData",this.GetMessageString()),this.WebClearMessage(),o.ShowProgressUI=this.ShowWindow,o.Open(this.HttpMethod.Post,this.WebUrl,!1)?o.Send()?200==o.Status?this.hiddenSaveLocal(o,this,!1,!1,this.ImageName)?this.InsertImageByBookMark(i,s)?(this.ImageName=null,this.BookMark=null,o.Clear(),this.Status="插入服务器图片成功",!0):(this.Status="书签插入图片失败",!1):(this.Status="文档保存到本地失败",!1):(this.Status="数据接收错误",!1):(this.Status="发送数据包失败",!1):(this.Status="打开连接失败",!1)}return this.Status="文档锁定,插入失败",!1}return this.Status="非Word文档,插入失败",!1},this.WebSaveBookMarks=function(){var t=this.obj.Http;t.Clear();for(var e=this.obj.ActiveDocument.Bookmarks.Count,i=1;i<=e;i++){var s=this.obj.ActiveDocument.Bookmarks.Item(i).Name,o=this.obj.ActiveDocument.Bookmarks.Item(s).Range.text;this.WebSetMsgByName(s,o)}return this.WebSetMsgByName("OPTION","SAVEBOOKMARKS"),this.WebSetMsgByName("TEMPLATE",this.RecordID),t.AddForm("FormData",this.GetMessageString()),this.WebClearMessage(),t.ShowProgressUI=this.ShowWindow,t.Open(this.HttpMethod.Post,this.WebUrl,!1)?t.Send()?(this.Status="书签保存成功",t.Clear(),!0):(this.Status="数据包发送失败",t.Clear(),!1):(this.Status="打开连接失败",t.Clear(),!1)},this.WebOpenBookMarks=function(){return".doc"==this.FileType||".docx"==this.FileType?"-1"==this.obj.ActiveDocument.ProtectionType?(this.obj.ActiveDocument.Application.Dialogs.Item(168).Show(),!0):(this.Status="文档被锁定,操作失败",!1):(this.Status="非Word文档,操作失败",!1)},this.WebLoadBookMarks=function(){var httpclient=this.obj.Http;if(httpclient.Clear(),this.WebSetMsgByName("RECORDID",this.RecordID),this.WebSetMsgByName("TEMPLATE",this.Template),this.WebSetMsgByName("FILENAME",this.FileName),this.WebSetMsgByName("FILETYPE",this.FileType),this.WebSetMsgByName("OPTION","LOADBOOKMARKS"),httpclient.AddForm("FormData",this.GetMessageString()),this.WebClearMessage(),this.sendMode="WebLoadBookMarks",httpclient.ShowProgressUI=this.ShowWindow,httpclient.Open(this.HttpMethod.Post,this.WebUrl,!1)){if(httpclient.Send()){var ReturnValue=httpclient.GetResponseHeader("RName"),jsonObj=eval("("+ReturnValue+")");try{for(var i in jsonObj){var BookName=i,BookValue=jsonObj[i];if(!this.obj.ActiveDocument.BookMarks.Exists(BookName))return this.Status="没有找到"+BookName+"书签",!1;var mBookRange=this.obj.ActiveDocument.Bookmarks.Item(BookName).Range;mBookRange.text=BookValue}}catch(e){return this.Status=e.description,!1}return this.Status="书签内容已插入到书签",!0}return this.Status="向后台发送数据包错误",!1}return this.Status="打开链接错误",!1},this.WebOpenSignature=function(){var t=this.obj.FuncExtModule;return t.SetServerType(1),1!=this.Charset&&t.SetCharset("UTF-8"),t.WebUrl=this.WebUrl,t.UserName=this.UserName,t.FileName=this.FileName,t.RecordID=this.RecordID,t.FileType=this.FileType,t.SetDocument(this.obj.ActiveDocument),t.WebSetMsgByName("USERID","123456"),t.WebSetMsgByName("USERIDONE","123456"),t.WebSetMsgByName("USERIDTWO","123456"),t.WebOpenSignature(),this.Status=t.Status,!0},this.WebCheckSignature=function(){var t=this.obj.FuncExtModule;t.SetServerType(1),1!=this.Charset&&t.SetCharset("UTF-8"),t.WebUrl=this.WebUrl,t.UserName=this.UserName,t.FileName=this.FileName,t.RecordID=this.RecordID,t.FileType=this.FileType,t.SetDocument(this.obj.ActiveDocument);var e=t.WebCheckSignature();return t.Alert("检测结果:"+e+"\r\n 注释: (=-1 有非法印章) (=0 没有任何印章) (>=1 有多个合法印章)"),this.Status=t.Status,!0},this.WebShowSignature=function(){var t=this.obj.FuncExtModule;return t.SetServerType(1),1!=this.Charset&&t.SetCharset("UTF-8"),t.WebUrl=this.WebUrl,t.UserName=this.UserName,t.FileName=this.FileName,t.RecordID=this.RecordID,t.FileType=this.FileType,t.SetDocument(this.obj.ActiveDocument),t.WebShowSignature(),this.Status=t.Status,!0},this.WebGetFile=function(t,e){var i=this.obj.Http;return i.Clear(),this.WebSetMsgByName("RECORDID",this.RecordID),this.WebSetMsgByName("LOCALFILE",t),this.WebSetMsgByName("REMOTEFILE",e),this.WebSetMsgByName("OPTION","GETFILE"),i.AddForm("FormData",this.GetMessageString()),this.WebClearMessage(),i.ShowProgressUI=!0,i.Open(this.HttpMethod.Post,this.WebUrl,!1)?i.Send()?"404"==i.GetResponseHeader("MsgError")?(this.Status="后台未找到对应文档",i.Clear(),!1):(i.ResponseSaveToFile(t),this.Status="文档下载到本地成功",i.Clear(),!0):(this.Status="数据包发送失败",!1):(this.Status="打开连接失败",i.Clear(),!1)},this.WebPutFile=function(t,e){var i=this.obj.Http;return i.Clear(),this.WebSetMsgByName("REMOTEFILE",e),this.WebSetMsgByName("OPTION","PUTFILE"),i.AddForm("FormData",this.GetMessageString()),i.AddFile("FileData",t),this.WebClearMessage(),i.ShowProgressUI=!1,i.Open(this.HttpMethod.Post,this.WebUrl,!1)?i.Send()?(this.Status="文档上传成功",i.Clear(),!0):(this.Status="文档上传失败",i.Clear(),!1):(this.Status="打开链接失败",i.Clear(),!1)},this.WebDelFile=function(t,e){if(""==t){if(""!=e){var i=this.obj.Http;return i.Clear(),this.WebSetMsgByName("REMOTEFILE",e),this.WebSetMsgByName("OPTION","DELFILE"),i.AddForm("FormData",this.GetMessageString()),this.WebClearMessage(),i.ShowProgressUI=!1,i.Open(this.HttpMethod.Post,this.WebUrl,!1)?i.Send()?"成功"==this.WebGetMsgByName("DelFileState")?(this.Status="文档删除成功",i.Clear(),!0):(this.Status="文档不存在",i.Clear(),!1):(this.Status="向后台发送数据包失败",i.Clear(),!1):(this.Status="打开链接失败",!1)}return this.Status="文件名为空,请输入要删除的文件名",!1}var s=this.obj.FileSystem;return s.DeleteFile(t)?(this.Status="删除本地文件成功",!0):(this.Status="该文档不存在或者没有权限删除",!1)},this.CreateFile=function(){var t=this.getDocType(this.FileType);switch(t){case this.DocType.WORD:this.obj.CreateNew("Word.Document"),this.Status="新建WORD成功";break;case this.DocType.EXECL:this.obj.CreateNew("Excel.Sheet"),this.Status="新建EXECL成功";break;case this.DocType.PICTURE:this.obj.CreateNew("iWebPicture.iWebPictureMain"),this.Status="新建TIF成功";break;case this.DocType.PPT:this.obj.CreateNew("PowerPoint.Show"),this.Status="新建PPT成功";break;default:this.obj.CreateNew("Word.Document"),this.Status="新建WORD成功";break}},this.FullSize=function(t){this.obj.FullSize=t},this.WebSaveLocal=function(){var t;if(".doc"==this.FileType||".docx"==this.FileType){var i="所有支持的文件格式(*.docx;*.doc)|*.docx;*.doc";i+="|Word 文档(*.docx)|*.docx",i+="|Word 97-2003文档(*.doc)|*.doc",i+="||"}else if(".xls"==this.FileType||".xlsx"==this.FileType){i="所有支持的文件格式(*.xlsx;*.xls)|*.xlsx;*.xls";i+="|Excel 工作簿(*.xlsx)|*.xlsx",i+="|Excel 97-2003工作簿(*.xls)|*.xls",i+="||"}t=this.obj.FileSystem.FileSaveAs(i,this.FileName);t.substring(t.length-3,t.length);if(""==t)return!0;try{this.obj.Save(t,0)}catch(e){return this.Status=e.description,alert(e.description),!1}return!0},this.WebOpenLocal=function(){this.setShowDialog(this.ShowDialog.DialogOpen,this.getOpenDocSuffix(this.FileType)),this.Status="打开本地文档成功"},this.WebSaveLocalFile=function(t){try{if(this.WebDelLocalFile(t),".pdf"!=this.FileType)var i=this.Save(t,this.getOfficeVersion(),this.FileType.substring(1).toUpperCase());else i=this.Save(t,0,this.FileType.substring(1).toUpperCase());return i}catch(e){return this.Status=e.description,this.Status="保存本地文档失败",-1}},this.WebOpenLocalFile=function(t){if(this.getDocType(this.FileType)==this.DocType.PICTURE)try{return this.obj.ActiveDocument.WebOpenLocalFile(t),this.Status="打开本地文档成功",0}catch(e){return this.Status="打开本地文档失败",-1}return this.obj.Open(t)},this.WebGetBookMarks=function(t){return this.obj.ActiveDocument.BookMarks.Exists(t)?this.obj.ActiveDocument.Bookmarks.Item(t).Range.Text:(this.Status="名称为"+t+"的书签在文档中不存在","")},this.WebAddBookMarks=function(t,e){if(".doc"==this.FileType||".docx"==this.FileType){if("-1"==this.obj.ActiveDocument.ProtectionType){if(this.obj.ActiveDocument.BookMarks.Exists(t))return this.Status="名称为"+t+"的书签在文档中已存在",this.WebFindBookMarks(t),!1;var i=e.length;this.obj.ActiveDocument.Application.Selection.TypeText(e),this.obj.ActiveDocument.Application.Selection.MoveLeft(Unit=1,Count=i);var s=this.obj.ActiveDocument.Application.Selection.Start,o=this.obj.ActiveDocument.Application.Selection.Start+i;return this.obj.ActiveDocument.Range(Start=s,End=o).Select(),this.obj.ActiveDocument.Bookmarks.Add(t),this.Status="光标处添加书签成功",!0}return this.Status="文档被锁定,操作失败",!1}return this.Status="非Word文档,操作失败",!1},this.WebFindBookMarks=function(t){if(".doc"==this.FileType||".docx"==this.FileType){if("-1"==this.obj.ActiveDocument.ProtectionType){if(this.obj.ActiveDocument.BookMarks.Exists(t)){var e=this.obj.Range;return e=this.obj.ActiveDocument.Bookmarks.Item(t).Range,e.Select(),this.Status="已定位到书签",!0}return this.Status="名称为"+t+"的书签在文档中不存在",!1}return this.Status="文档被锁定,操作失败",!1}return this.Status="非Word文档,操作失败",!1},this.WebDelBookMarks=function(t){return".doc"==this.FileType||".docx"==this.FileType?"-1"==this.obj.ActiveDocument.ProtectionType?this.obj.ActiveDocument.BookMarks.Exists(t)?(this.obj.ActiveDocument.Bookmarks.Item(t).Delete(),this.Status="删除书签成功",!0):(this.Status="名称为"+t+"的书签在文档中不存在",!1):(this.Status="文档被锁定,操作失败",!1):(this.Status="非Word文档,操作失败",!1)},this.WebSetBookmarks=function(t,i){if(".doc"!=this.FileType&&".docx"!=this.FileType&&".wps"!=this.FileType)return this.Status="非Word文档,插入失败",!1;if("-1"!=this.obj.ActiveDocument.ProtectionType)return this.Status="插入失败,文档被锁定",!1;try{if(this.obj.ActiveDocument.BookMarks.Exists(t)){var s=this.obj.ActiveDocument.Bookmarks.Item(t).Range;return s.text=i,this.obj.ActiveDocument.Bookmarks.Add(t,s),this.Status="书签赋值成功",!0}return this.Status="名称为"+t+"的书签在文档中不存在",!1}catch(e){return this.Status=e.description,!1}},this.SetBookMarksFont=function(t,e,i,s,o,n){this.WebObject.ActiveDocument.Bookmarks.Item(t).Range.Select();var a=this.WebObject.ActiveDocument.Application.Selection;a.Font.Color=e,a.Font.Size=i,a.Font.Name=s,a.Font.Bold=o,a.Font.Italic=n},this.WebToolsVisible=function(t,e){return this.Status="该功能暂未提供!",!1},this.WebToolsEnable=function(t,e,i){return this.Status="该功能暂未提供!",!1},this.WebOpenPrint=function(){this.setShowDialog(this.ShowDialog.DialogPrint)},this.WebOpenPicture=function(){if(".doc"==this.FileType||".docx"==this.FileType||".wps"==this.FileType){var t=this.obj.ActiveDocument.Application.Dialogs.Item(163);t.Show()}else if(".xls"==this.FileType||".xlsx"==this.FileType||".et"==this.FileType){t=this.obj.ActiveDocument.Application.Dialogs.Item(342);t.Show()}},this.WebRefresh=function(){this.obj.Activate(!0)},this.WebSetRevision=function(t,e,i,s){var o;return o='<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui" onLoad="OnLoad" loadImage="LoadImage"> <ribbon startFromScratch="false"> <tabs> <tab idMso="TabReviewWord" visible="false"> </tab> </tabs> </ribbon> </customUI>',this.getDocType(this.FileType)==this.DocType.WORD&&"-1"==this.obj.ActiveDocument.ProtectionType?(this.obj.ActiveDocument.TrackRevisions=e,this.obj.ActiveDocument.ShowRevisions=t,this.obj.ActiveDocument.PrintRevisions=i,s?(this.obj.RibbonCustomUI=o,this.Status="设置痕迹成功",!0):(this.Status="设置痕迹成功",!0)):(this.Status="非word文档,无法执行",!1)},this.WebSetProtect=function(t,e){var i=this.getDocType(this.FileType);""==e&&(e=this.PASSWORD),t?this.VBAProtectDocument(i,e):this.VBAUnProtectDocument(i,e)},this.WebDownLoadFile=function(t,e){var i=0,s=this.obj.Http;s.Clear(),s.ShowProgressUI=!0,s.Hidden=!1;var o=s.Open(i,t,!1);if(o){var n=s.Send();return n?200==s.Status?(s.ResponseSaveToFile(e),this.Status="下载成功",!0):(this.Status="下载失败请检查URL是否正确",!1):(this.Status="数据包发送失败",!1)}return this.Status="打开连接失败",s.Clear(),!1},this.WebMkDirectory=function(t){var e=this.obj.FileSystem;return e.CreateDirectory(t)?(this.Status="创建目录成功",!0):(this.Status="创建目录失败检查是否已经有此目录或者路径不对",!1)},this.WebRmDirectory=function(t){var e=this.obj.FileSystem;return e.ClearDirectory(t),this.Status="删除目录成功",!0},this.WebFileExists=function(t){return this.Status="该功能暂未提供!",!1},this.WebFileSize=function(t){var e=this.obj.FileSystem,i=e.GetFileSize(t);return 0==i?(this.Status="请检查文件路径是否有误",0):(this.Status="获取成功大小为"+i+"字节",i)},this.WebFileDate=function(t){return this.Status="该功能暂未提供!",!1},this.DisableMenu=function(t){var e=this.obj.CustomMenu;return e.DisableMenu(MenuFile,t)},this.EnableMenu=function(t){var e=this.obj.CustomMenu;return e.EnableMenu(MenuFile,t)},this.DisableKey=function(t){return this.Status="该功能暂未提供!",!1},this.WebOpenKey=function(t,e){root=t,rootValue=e;var i=this.obj.Register,s=i.QueryStringValue(root,rootValue,"");return s?(this.Status="建立注册对象成功",!0):(i.SetStringValue(root,rootValue,"",""),this.Status="建立注册对象失败,已新建注册表对象",s)},this.WebWriteString=function(t,e){var i=this.obj.Register;if(void 0!=root&&void 0!=rootValue){var s=i.SetStringValue(root,rootValue,t,e);return this.Status="写入注册表成功",s}return this.Status="写入注册表失败,请先调用WebOpenKey接口",!1},this.WebReadString=function(t){var e=this.obj.Register;if(void 0!=root&&void 0!=rootValue){var i=e.QueryStringValue(root,rootValue,t);return null!=i||""!=i?(this.Status="读取注册表成功",i):(this.Status="读取失败,没有对应的注册表",i)}return this.Status="读取注册表失败,请先调用WebOpenKey接口",!1},this.WebWriteInteger=function(t,e){var i=this.obj.Register;if(void 0!=root&&void 0!=rootValue){var s=i.SetDWordValue(root,rootValue,t,e);return this.Status="写入注册表成功",s}return this.Status="写入注册表失败,请先调用WebOpenKey接口",!1},this.WebReadInteger=function(t){var e=this.obj.Register;if(void 0!=root&&void 0!=rootValue){var i=e.QueryDWORDValue(root,rootValue,t);return null!=i||""!=i?(this.Status="读取注册表成功",i):(this.Status="读取失败,没有对应的注册表",i)}return this.Status="读取注册表失败,请先调用WebOpenKey接口",!1},this.ShowDate=function(t,e){return this.Status="该功能暂未提供!",!1},this.SignatureColor=function(t){return this.Status="该功能暂未提供!",!1},this.SignatureCount=function(t){return this.Status="该功能暂未提供!",0},this.GetSignature=function(t){return this.Status="该功能暂未提供!",!1},this.ClearRevisions=function(){if(this.getDocType(this.FileType)!=this.DocType.WORD||"-1"!=this.obj.ActiveDocument.ProtectionType)return this.Status="痕迹接受失败,错误原因:"+e.description,!1;try{return this.obj.Activate(!0),this.obj.ActiveDocument.AcceptAllRevisions(),this.obj.ActiveDocument.Revisions.AcceptAll(),this.Status="痕迹接受成功",this.obj.ActiveDocument.Revisions.Count>=0}catch(e){return this.Status="痕迹接受失败,错误原因:"+e.description,!1}},this.WebDelTree=function(t){var e=this.obj.FileSystem;return e.ClearDirectory(t),!0},this.Version=function(){return this.obj.Version},this.VersionEx=function(){return this.Status="该功能暂未提供!",!1},this.PrintByCopies=function(t,e){var i,s;return parseInt(t),s=this.obj.ActiveDocument.Application.Name,"Microsoft Word"==s?(i=this.obj.ActiveDocument.Application.Dialogs.Item(88),e?(i.NumCopies=t,-1==i.Display?(i.Execute,this.Status="打印成功",!0):(this.Status="启用打印机窗口失败",!1)):(i.NumCopies=t,i.Execute,this.Status="打印成功",!0)):(this.Status="文档不是word类型",!1)},this.WebGetCpuID=function(){return this.Status="该功能暂未提供!",!1},this.WebGetIdeID=function(){return this.Status="该功能暂未提供!",!1},this.BuildContentFromHTML=function(t){return this.Status="该功能暂未提供!",!1},this.WebRunMacro=function(t,i){try{var s=i,o=this.obj.ActiveDocument.VBProject.VBComponents.Add(1);return o.CodeModule.AddFromString(s),this.obj.ActiveDocument.Application.Run(t),!0}catch(e){return!1}},this.WebDocumentCompare=function(t,e){this.Status="";this.obj.FileSystem;var i=this.DownFilePath(),s=i+Math.round(1e8*Math.random())+".doc";if(null==t||""==t){if(null==e||""===e)return this.Status="【FileName2】不能为空!",!1;if(this.WebDownloadFile_int(e)){t=this.FileName,this.WebSaveLocalFile(i+t),this.WebClose();var o=this.obj.FuncExtModule.WebDocumentCompare(i+t,this.DownloadedFileTempPathName,s);return 1==o?(this.obj.Open(s),this.obj.ActiveDocument.Application.ActiveWindow.View.type=3,this.obj.ActiveDocument.Application.ActiveWindow.View.SplitSpecial=20,!0):(this.Status="文档对比失败,请确认待对比的文档是否能够正常打开!",!1)}return this.Status="文件【"+e+"】下载失败,该文档可能在服务器不存在!",!1}if(null==e||""==e)return this.Status="【FileName2】不能为空!",!1;if(this.WebDownloadFile_int(t)){if(this.WebDownloadFile_int(e)){this.WebClose();o=this.obj.FuncExtModule.WebDocumentCompare(i+t,i+e,s);return 1==o?(this.obj.Open(s),this.obj.ActiveDocument.Application.ActiveWindow.View.type=3,this.obj.ActiveDocument.Application.ActiveWindow.View.SplitSpecial=20,!0):(this.Status="文档对比失败,请确认待对比的文档是否能够正常打开!",!1)}return this.Status="文件【"+e+"】下载失败,该文档可能在服务器不存在!",!1}return this.Status="文件【"+t+"】下载失败,该文档可能在服务器不存在!",!1},this.WebSetSkin=function(t,i,s,o,n,a,r){this.Status="";var c=this.obj.Style;try{return c.TitleBarColor=t,c.TitleBarTextColor=void 0==r||""==r?0:r,t=15923711,a=15923711,i=15923711,s=9489396,o=9489396,n=9489396,c.MenuBarStartColor=i,c.MenuBarEndColor=16777215,c.MenuBarTextColor=0,c.MenuBarHighlightTextColor=0,c.MenuBarButtonStartColor=s,c.MenuBarButtonEndColor=o,c.MenuBarButtonFrameColor=n,c.CustomToolbarStartColor=a,c.CustomToolbarEndColor=a,c.Invalidate(),!0}catch(e){return this.Status="皮肤设置错误,错误信息为:"+e.description,!1}},this.WebEnableCopy=function(t){switch(t){case 0:case!1:case"0":this.obj.CopyEnabled=!1,this.Status="禁止复制";break;case 1:case"1":case!0:this.obj.CopyEnabled=!0,this.Status="允许复制";break;default:return}},this.VBAShowRevisions=function(t){return this.getDocType(this.FileType)==this.DocType.WORD&&"-1"==this.obj.ActiveDocument.ProtectionType?(this.obj.ActiveDocument.TrackRevisions=t,this.obj.ActiveDocument.ShowRevisions=t,this.Status="隐藏痕迹成功",!0):(this.Status="非Office文档或文档已被锁定,无法执行操作",!1)},this.VBAProtectDocument=function(t,e){return t==this.DocType.WORD?"-1"==this.obj.ActiveDocument.ProtectionType?(this.obj.ActiveDocument.Protect(2,!1,e),this.Status="文档已被锁定",!0):(this.Status="文档锁定失败",!1):t!=this.DocType.EXECL?(this.Status="非Office文档,无法执行锁定操作",!1):this.obj.ActiveDocument.Application.Sheets(1).ProtectContents?(this.Status="文档已锁定",!1):(this.obj.ActiveDocument.Application.Sheets(1).Protect(e),void(this.Status="文档锁定成功"))},this.VBAUnProtectDocument=function(t,e){t=this.getDocType(this.FileType);return t==this.DocType.WORD?(this.obj.ActiveDocument.Unprotect(e),this.Status="WORD解除保护",!0):t==this.DocType.EXECL?(this.obj.ActiveDocument.Application.Sheets(1).Unprotect(e),this.Status="解除保护",!0):(this.Status="非Office文档,无法执行解锁操作",!1)},this.VBAInsertFile=function(t,i){try{var s=this.getDocType(this.FileType);return s==this.DocType.WORD?(this.obj.Activate(!0),this.obj.ActiveDocument.BookMarks.Exists(t)&&setTimeout(this.obj.ActiveDocument.Application.Selection.GoTo(-1,0,0,t),200),this.obj.Activate(!0),this.obj.ActiveDocument.Application.Selection.InsertFile(i,"",!1,!1,!1),!0):(this.Status="非Office文档,无法执行插入文档操作",!1)}catch(e){return this.Status="插入文档失败,错误原因:"+e.description,!1}},this.WebAcceptAllRevisions=function(t){return this.obj.FuncExtModule.WebAcceptAllRevisions(t),this.Status="接受所有痕迹成功!",!1},this.VBASetUserName=function(t){if(".ppt"!=this.FileType&&".pptx"!=this.FileType)try{this.obj.ActiveDocument.Application.UserName=t,".xls"!=this.FileType&&".xlsx"!=this.FileType&&(this.WebObject.ActiveDocument.Application.Options.UseLocalUserInfo=!0,this.obj.ActiveDocument.Application.UserInitials=t)}catch(e){this.OfficeUserName=this.obj.ActiveDocument.Application.UserName,this.obj.ActiveDocument.Application.UserName=t,".xls"!=this.FileType&&".xlsx"!=this.FileType&&(this.obj.ActiveDocument.Application.UserInitials=t)}},this.ShowField=function(){try{return this.obj.ActiveDocument.ActiveWindow.View.ShowDrawings=!0,this.obj.ActiveDocument.ActiveWindow.View.ShowFieldCodes=!1,!0}catch(e){return this.Status="设置域失败,错误原因:"+e.description,!1}},this.WebAreaProtect=function(t){if(".doc"==this.FileType||".docx"==this.FileType){if("-1"==this.obj.ActiveDocument.ProtectionType){for(var e=t.split(","),i="",s=0;s<=e.length;s++)if(this.obj.ActiveDocument.BookMarks.Exists(e[s])){var o=this.obj.Range;o=this.obj.ActiveDocument.Bookmarks.Item(e[s]).Range,o.Select(),this.obj.ActiveDocument.bookmarks.Item(e[s]).range.editors.add(-1)}else i+=e[s];return this.obj.ActiveDocument.Protect(3,!1,"123",!1,!1),this.obj.ActiveDocument.Application.Selection.MoveLeft(Unit=1,Count=1),this.obj.ActiveDocument.ActiveWindow.View.ShadeEditableRanges=!1,this.Status=""!=i?i+"书签名不存在":"操作成功,书签区域可编辑",!0}return this.Status="文档以被保护,请解除保护后操作!",!1}return this.Status="非Office文档,无法执行区域保护操作!",!1},this.WebAreaUnprotect=function(t){if(".doc"!=this.FileType&&".docx"!=this.FileType)return this.Status="非Office文档,无法执行取消区域保护操作!",!1;for(var i=t.split(","),s=0;s<=i.length;s++){if(!this.obj.ActiveDocument.BookMarks.Exists(i[s]))return this.Status="文档中不存在<"+i[s]+">的书签",!1;try{this.obj.ActiveDocument.Unprotect("123");var o=this.obj.Range;return o=this.obj.ActiveDocument.Bookmarks.Item(i[s]).Range,o.Select(),this.obj.ActiveDocument.DeleteAllEditableRanges(-1),this.Status="书签区域"+i[s]+"可以编辑",!0}catch(e){return this.Status="执行取消区域保护时出现错误,错误原因:"+e.description,!1}}},this.Activate=function(t){this.obj.Activate(t)},this.WebPageCode=function(){this.obj.ActiveDocument.Application.Dialogs.Item(294).Show()},this.ShowTitleBar=function(t){var e=this.obj.Style;e.ShowTitleBar=t},this.ShowCustomToolBar=function(t){var e=this.obj.Style;e.ShowCustomToolbar=t},this.ShowMenuBar=function(t){var e=this.obj.Style;switch(t){case 0:case!1:case"0":e.ShowMenuBar=!1;break;case 1:case"1":case!0:e.ShowMenuBar=!0;break;default:return}},this.ShowToolBars=function(t){var e=this.obj.Style;e.ShowToolBars=t,e.ShowToolSpace=t},this.ShowStatusBar=function(t){var e=this.obj.Style;e.ShowStatusBar=t},this.ShowCustomToolbar=function(t){this.obj.Style.ShowCustomToolbar=t},this.WebShow=function(t){this.getDocType(this.FileType)==this.DocType.WORD&&this.VBAShowRevisions(t)},this.SaveEnabled=function(t){this.obj.SaveEnabled=t},this.PrintEnabled=function(t){this.obj.PrintEnabled=t},this.HookEnabled=function(){this.getDocType(this.FileType)==this.DocType.WORD&&(this.obj.Style.ShowToolSpace=!0,this.obj.SelectionInformationEnabled=!1),void 0!=window.ActiveXObject||null!=window.ActiveXObject||"ActiveXObject"in window||(this.obj.HookEnabled=!1)},this.ClearDirectory=function(){var t=this.obj.FileSystem;t.ClearDirectory(this.DownFilePath()),t.ClearDirectory(this.getFilePath())},this.WebDelLocalFile=function(t){var e=this.obj.FileSystem;e.DeleteFile(t)},this.GetMessageString=function(){return this.ht.toString()},this.WebSetRibbonUIXML=function(t){this.obj.RibbonCustomUI=t},this.WebSetMaxFileSize=function(t){return!(this.WebFileSize(t)>1024*this.MaxFileSize)},this.DownFilePath=function(){var t,e=this.obj.FileSystem;return t=this.HiddenDirectory?e.GetSpecialFolderLocation(32)+this.DOWN+e.GetFolderEncryptCode(1)+"\\":e.GetSpecialFolderPath(26)+this.DOWN,t},this.getFilePath=function(){var t,e=this.obj.FileSystem;return t=this.HiddenDirectory?e.GetSpecialFolderLocation(32)+this.UP+e.GetFolderEncryptCode(1)+"\\":e.GetSpecialFolderLocation(26)+this.UP,e.CreateDirectory(t),this.FilePath=t,this.FilePath},this.WebSetAllowEmpty=function(){if(".doc"==this.FileType||".docx"==this.FileType){var t=this.WebObject.ActiveDocument.Content.Text;return 1!=t.length}return!0},this.NewCopyType=function(t){switch(t){case 0:case!1:case"0":this.obj.CopyEnabled=!1;break;case 1:case"1":case!0:this.obj.CopyEnabled=!0;break;default:return}},this.NewShowToolBar=function(t){var e=this.obj.Style;switch(t){case!1:case 0:e.ShowCustomToolbar=!1,e.ShowToolBars=!0;break;case!0:case 1:e.ShowCustomToolbar=!0,e.ShowToolBars=!0;break;case 2:e.ShowCustomToolbar=!1,e.ShowToolBars=!1;break;case 3:e.ShowCustomToolbar=!0,e.ShowToolBars=!1;break}},this.NewUIControl=function(t){var e;switch(t){case!1:e='<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui" onLoad="OnLoad" loadImage="LoadImage"> \t\t\t <commands> \t\t\t \t \t<command idMso="FileSave" enabled="false" /> \t\t\t \t \t\t<command idMso="FileSaveAs" enabled="false" /> \t\t\t </commands> \t\t \t\t</customUI>';break;case!0:e='<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui" onLoad="OnLoad" loadImage="LoadImage"> \t\t\t\t <commands> \t\t\t\t \t \t<command idMso="FileSave" enabled="true" /> \t\t\t\t \t \t\t<command idMso="FileSaveAs" enabled="true" /> \t\t\t\t </commands> \t\t\t\t\t</customUI>';break}this.obj.RibbonCustomUI=e},this.ModifyReview=function(){var t='<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui" onLoad="OnLoad" loadImage="LoadImage"> \t <commands> \t \t <command idMso="ReviewReviewingPaneMenu" enabled="false"/> \t \t\t<command idMso="ReviewShowMarkupMenu" enabled="false"/> \t \t<command idMso="ReviewTrackChangesMenu" enabled="false"/> \t \t<command idMso="ReviewRejectChangeMenu" enabled="false"/> \t\t\t\t<command idMso="ReviewAcceptChangeMenu" enabled="false"/> \t \t<command idMso="ReviewNewComment" enabled="false"/> \t \t\t<command idMso="ReviewDeleteCommentsMenu" enabled="false"/> \t </commands> \t </customUI>';for(i=1;i<=this.obj.ActiveDocument.Application.CommandBars.Item("Track Changes").Controls.Count;i++)1715==this.obj.ActiveDocument.Application.CommandBars.Item("Track Changes").Controls.Item(i).ID&&(this.obj.ActiveDocument.Application.CommandBars.Item("Track Changes").Controls.Item(i).Enabled=!1),1716==this.obj.ActiveDocument.Application.CommandBars.Item("Track Changes").Controls.Item(i).ID&&(this.obj.ActiveDocument.Application.CommandBars.Item("Track Changes").Controls.Item(i).Enabled=!1),2041==this.obj.ActiveDocument.Application.CommandBars.Item("Track Changes").Controls.Item(i).ID&&(this.obj.ActiveDocument.Application.CommandBars.Item("Track Changes").Controls.Item(i).Enabled=!1);this.obj.RibbonCustomUI=t},this.OfficeFastUI=function(){var t='<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui" onLoad="OnLoad" loadImage="LoadImage"> \t <commands> \t\t\t\t<command idMso="PrintPreviewAndPrint" enabled="false" /> \t \t<command idMso="TabReviewWord" enabled="false" /> \t \t \t<command idMso="FileSave" enabled="false" /> \t \t \t\t<command idMso="FileSaveAs" enabled="false" /> \t \t \t\t<command idMso="FileNewDefault" enabled="false" /> \t \t \t\t<command idMso="FileOpen" enabled="false" /> \t \t \t\t<command idMso="FilePrintQuick" enabled="false" /> \t \t \t\t<command idMso="RedoOrRepeat" enabled="false" /> \t \t \t\t<command idMso="Undo" enabled="false" /> \t </commands> \t\t</customUI>';this.obj.RibbonCustomUI=t},this.WebSetRibbonUIXML=function(){var t='<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui" onLoad="OnLoad" loadImage="LoadImage"> \t\t<ribbon startFromScratch="false"> \t\t\t<tabs> \t\t \t\t<tab idMso="TabReviewWord" visible="false" /> \t\t\t\t<tab idMso="TabInsert" visible="false" /> \t\t\t\t<tab idMso="TabHome" visible="false" /> \t\t\t</tabs> \t\t</ribbon> \t\t</customUI>';this.obj.RibbonCustomUI=t},this.ShowDialog={DialogNew:0,DialogOpen:1,DialogSaveAs:2,DialogSaveCopyAs:3,DialogPrint:4,DialogPageSetup:5,DialogProperties:6},this.setObj=function(t){return this.obj=t,this.WebObject=this.obj,!0},this.DocType={WORD:0,EXECL:1,PPT:2,PDF:3,OFD:4},this.HttpMethod={Get:0,Post:1},this.SaveAsPdf=function(t){var i=this.obj.ActiveDocument.Application.Version;if("11.0"!=i){if(".doc"==this.FileType||".docx"==this.FileType||".wps"==this.FileType)try{return this.obj.ActiveDocument.ExportAsFixedFormat(t,17,!1,0,0,1,1,0,!0,!0,0,!0,!0,!0),this.Status="保存PDF到本地成功",!0}catch(e){return this.Status=e.description,alert("保存PDF异常,可能Office没有保存PDF功能,建议安装SaveAsPDFandXPS插件"),!1}else if(".xls"==this.FileType||".xlsx"==this.FileType||".et"==this.FileType)try{return this.obj.ActiveDocument.Application.ActiveSheet.ExportAsFixedFormat(0,t,0),this.Status="保存PDF到本地成功",!0}catch(e){return this.Status=e.description,alert("保存PDF异常,可能Office没有保存PDF功能,建议安装SaveAsPDFandXPS插件"),!1}}else this.Status="保存PDF异常,Office没有保存PDF功能",alert("保存PDF异常,Office没有保存PDF功能")},this.SaveAsHtml=function(t){if(".doc"==this.FileType||".docx"==this.FileType||".wps"==this.FileType)try{this.obj.ActiveDocument.SaveAs(t,8,!1,"",!1,"",!1,!1,!1,!1,!1,0);return this.obj.ActiveDocument.Application.ActiveWindow.View.type=3,!0}catch(e){return this.Status=e.description,!1}},this.ArrayList=function(){this.ObjArr={},this.Count=0,this.Add=function(t,e){return this.ObjArr[t]=e,this.Count++,!0},this.Get=function(t){return this.ObjArr[t]},this.Clear=function(){this.ObjArr={},this.Count=0},this.toString=function(){var t=new Array,e=0;for(var e in this.ObjArr)t.push("'"+e+"':'"+this.ObjArr[e]+"'");return"{"+t+"}"}},this.ht=new this.ArrayList,this.getOpenDocSuffix=function(t){var e;return 5==t.length&&(t=t.substring(0,4)),e="",!this.isWPS()&&this.getOfficeVersion()||(e+="*"+t+"x|*"+t+"x|"),e+="*"+t+"|*"+t+"|",e+=this.getOpenSuffixName(t)+"(*"+t,!this.isWPS()&&this.getOfficeVersion()||(e+=";*"+t+"x"),e+=")|*"+t,!this.isWPS()&&this.getOfficeVersion()||(e+=";*"+t+"x"),e+="|",e},this.WebDownloadFile_int=function(t){this.Status="";var e=this.obj.Http;if(e.Clear(),this.WebSetMsgByName("USERNAME",this.UserName),this.WebSetMsgByName("FILENAME",t),this.WebSetMsgByName("FILETYPE",this.FileType),this.WebSetMsgByName("RECORDID",this.RecordID),this.WebSetMsgByName("OPTION","LOADFILE"),e.AddForm("FormData",this.GetMessageString()),this.WebClearMessage(),e.ShowProgressUI=this.ShowWindow,e.Open(this.HttpMethod.Post,this.WebUrl,!1)&&e.Send())return"404"==e.GetResponseHeader("MsgError")?(this.Status="文档【"+t+"】下载失败,请确认该文档在服务器上是否存在",e.Clear(),!1):(e.Clear(),this.hiddenSaveLocal(e,this,!1,!1,t)?(this.Status="文档下载成功",!0):(this.Status="文档下载失败",!1))},this.SAVEFILE=function(t,e,i){return t.AddFile("file",e),this.WebClearMessage(),t.ShowProgressUI=this.ShowWindow,this.WebUrl=this.ServerUrl+this.SaveServlet,t.Open(this.HttpMethod.Post,this.WebUrl,!1)?(t.setRequestHeader("Authorization",i),t.Send()?(this.Status=t.status,this.getResultJson=JSON.parse(t.responseText),console.log(this.getResultJson),"302"!=this.getResultJson.code):(this.Status=t.status,!1)):(this.Status=t.status,!1)},this.LOADFILE=function(t){if(this.Status="",t.ShowProgressUI=this.ShowWindow,this.WebUrl=this.ServerUrl+this.FileName,t.Clear(),t.Open(this.HttpMethod.Get,encodeURI(this.WebUrl,"utf-8"),!1)){if(t.Send()){var e=t.status;if(404==e)return this.CreateFile(),this.getOfficeVersion(),t.Clear(),!0;if(405==e)return this.CreateFile(),this.getOfficeVersion(),t.Clear(),!0;if(t.Clear(),this.hiddenSaveLocal(t,this,!1,!1)){var i=this.WebOpenLocalFile(this.DownloadedFileTempPathName);return 0==i?(this.getOfficeVersion(),!0):1==i?(this.obj.FuncExtModule.Alert("可能当前授权码错误,请确认iWebOffice2015.js的授权是否正确(或乱码)!"),this.Status="可能当前授权码错误,请确认iWebOffice2015.js的授权是否正确(或乱码)",window.close(),!1):2==i?(this.obj.FuncExtModule.Alert("没有找到文档,请确认WebOpenLocalFile打开文档的路径是否正确!"),this.Status="有找到文档,请确认WebOpenLocalFile打开文档的路径是否正确",window.close(),!1):3==i?(this.obj.FuncExtModule.Alert("没有权限导致文档打开失败,请用管理员身份运行浏览器后重试!"),this.Status="没有权限导致文档打开失败,请用管理员身份运行浏览器后重试",window.close(),!1):4==i?(this.obj.FuncExtModule.Alert("文件可能损坏,请确定服务器文档是否已经损坏!"),this.Status="文件可能损坏,请确定服务器文档是否已经损坏",window.close(),!1):5==i?(this.obj.FuncExtModule.Alert("未安装Office或者注册表有损坏!"),this.Status="未安装Office或者注册表有损坏",window.close(),!1):6==i?(this.obj.FuncExtModule.Alert("文件被占用,请结束Office进程后重试!"),this.Status="文件被占用,请结束Office进程后重试",window.close(),!1):(this.obj.FuncExtModule.Alert("打开文档时未知错误!错误码为: "+i),this.Status="打开文档时未知错误!错误码为: "+i,window.close(),!1)}return this.Status="保存文档到本地 失败",!1}return alert("数据包发送失败!请检查链接<"+this.WebUrl+">是否正确或网络是否畅通。"),this.Status="数据包发送失败!请检查链接<"+this.WebUrl+">是否正确或网络是否畅通。",!1}return alert("打开链接<"+this.WebUrl+">失败!请检查网络是否畅通。"),this.Status="打开链接<"+this.WebUrl+">失败!请检查网络是否畅通。",!1},this.hiddenSaveLocal=function(t,i,s,o,n){try{this.Status="",s&&(t.Hidden=!0);var a="",r=i.obj.FileSystem,c=this.DownFilePath();return r.CreateDirectory(c),this.FilePath=c,void 0!=o&&1!=o||(a="temp"+i.RecordID,this.tempInsertName=a+this.FileName),void 0!=n&&""!=n||(n=this.FileName,n=1e5*Math.random()+this.FileType),this.DownloadedFileTempPathName=c+a+n,t.ResponseSaveToFile(this.DownloadedFileTempPathName),t.Clear(),!0}catch(e){return!1}},this.Save=function(FileName,is2003,FileType){if(this.getDocType(this.FileType)==this.DocType.PICTURE)return this.obj.ActiveDocument.WebSaveLocalFile(FileName)?0:-1;if(is2003)return this.obj.Save(FileName);var SaveFalg=this.obj.Save(FileName,eval("this.DocTypeValue."+FileType),!0);return 80==SaveFalg?"文件路径无效":81==SaveFalg?"参数无效":82==SaveFalg?"文件创建失败":SaveFalg},this.blnIE=function(){return void 0!=window.ActiveXObject||null!=window.ActiveXObject||"ActiveXObject"in window},this.isWPS=function(){return".WPS"==this.FileType.toUpperCase()||".ET"==this.FileType.toUpperCase()},this.getOfficeVersion=function(){var t=0;try{return-1==this.setVersion?(t=parseFloat(this.obj.ActiveDocument.Application.Version),this.setVersion=t):t=this.setVersion,11==t?this.OfficeVersion.v2003:this.OfficeVersion.vOther}catch(e){return this.OfficeVersion.v2003}},this.getDocType=function(t){return".doc"==t||".docx"==t||".wps"==t?this.DocType.WORD:".xls"==t||".xlsx"==t||".et"==t?this.DocType.EXECL:".tif"==t||".jpg"==t?this.DocType.PICTURE:".ppt"==t||".pptx"==t?this.DocType.PPT:".pdf"==t?this.DocType.PDF:".ofd"==t?this.DocType.OFD:void 0},this.getOpenSuffixName=function(t){var e;switch(t){case this.DocType.WORD:e="Word Files";break;case this.DocType.EXECL:e="Excel Files";break;default:e="Word Files";break}return e},this.setShowDialog=function(t,e){switch(t){case this.ShowDialog.DialogOpen:this.obj.ShowDialog(t,e,0);break;case this.ShowDialog.DialogNew:case this.ShowDialog.DialogPageSetup:case this.ShowDialog.DialogPrint:case this.ShowDialog.DialogProperties:case this.ShowDialog.DialogSaveCopyAs:case this.ShowDialog.DialogSaveAs:this.obj.ShowDialog(t);break;default:break}},this.setEditType=function(t){try{switch(t){case 0:case"0":this.VBAProtectDocument(this.getDocType(this.FileType),"123");break;case 1:case"1":this.WebShow(!1);break;case 2:case"2":this.WebShow(!0);break;default:}}catch(e){return!1}},this.getEditVersion=function(){return this.obj.AppName},this.SetUser=function(t){this.obj.User=t},this.CheckFile=function(t){this.obj.bCheckFile=t},this.EnableSignature=function(t){try{this.obj.ActiveDocument.Application.COMAddIns.Item("iSignatureWord.WordApp").Connect=t}catch(e){return}},this.AddWaterMark=function(t){if(".doc"==this.FileType||".docx"==this.FileType){if(this.blnIE())var i=this.WebObject.ActiveDocument.Application.ActiveDocument.BuiltInDocumentProperties(14);else i=this.WebObject.ActiveDocument.Application.ActiveDocument.BuiltInDocumentProperties.Item(14).Value();intPage=parseInt(i);var s=this.WebObject.ActiveDocument.Application.Selection;if("-1"==this.obj.ActiveDocument.ProtectionType){this.DelWaterMark(t);for(var o=1;o<=intPage;o++){s.GoTo(What=1,Which=1,Count=o);try{this.WebObject.ActiveDocument.ActiveWindow.ActivePane.View.SeekView=9,this.WebObject.ActiveDocument.Application.Selection.ClearFormatting(),s.HeaderFooter.Shapes.AddTextEffect(0,"金格科技","宋体",36,!1,!1,0,0).Select();var n=s.ShapeRange;n.Name=t+o,n.TextEffect.NormalizedHeight=!1,n.Line.Visible=!1,n.Fill.Visible=!0,n.Fill.Solid(),n.Fill.ForeColor.RGB=255,n.Fill.Transparency=.5,n.Rotation=-45,n.LockAspectRatio=!0,n.Height=144,n.Width=576,n.WrapFormat.AllowOverlap=!0,n.WrapFormat.Side=3,n.WrapFormat.type=3,n.RelativeHorizontalPosition=0,n.RelativeVerticalPosition=0,n.Left=-999995,n.Top=-999995,this.WebObject.ActiveDocument.ActiveWindow.ActivePane.View.SeekView=0,this.Status="插入水印成功"}catch(e){return this.Status="插入水印失败"+e.description,!1}}return!0}return this.Status="文档被锁定,插入水印失败",!1}return this.Status="非Word文档,插入水印失败",!1},this.DelWaterMark=function(t){if(".doc"==this.FileType||".docx"==this.FileType){if("-1"==this.obj.ActiveDocument.ProtectionType){this.WebObject.ActiveDocument.ActiveWindow.ActivePane.View.SeekView=9;var e=this.WebObject.ActiveDocument.Application.Selection,i=e.HeaderFooter.Shapes.Count;if(i>0)for(var s=i;s>=1;s--)(e.HeaderFooter.Shapes.Item(s).Name=t+s)&&e.HeaderFooter.Shapes.Item(s).Delete();return this.WebObject.ActiveDocument.ActiveWindow.ActivePane.View.SeekView=0,this.Status="删除水印成功",!0}return this.Status="文档被锁定,删除水印失败",!1}return this.Status="非Word文档,删除水印失败",!1},this.AddGraphicWaterMark=function(t){if(".doc"==this.FileType||".docx"==this.FileType){if(this.blnIE())var i=this.WebObject.ActiveDocument.Application.ActiveDocument.BuiltInDocumentProperties(14);else i=this.WebObject.ActiveDocument.Application.ActiveDocument.BuiltInDocumentProperties.Item(14).Value();intPage=parseInt(i);var s=this.WebObject.ActiveDocument.Application.Selection;if("-1"==this.obj.ActiveDocument.ProtectionType){this.DelWaterMark(t);for(var o=1;o<=intPage;o++){s.GoTo(What=1,Which=1,Count=o);try{this.WebObject.ActiveDocument.ActiveWindow.ActivePane.View.SeekView=9,this.WebObject.ActiveDocument.Application.Selection.ClearFormatting();var n=this.DownFilePath(),a="WaterMark.jpg";this.DownloadToFile(a,n),s.HeaderFooter.Shapes.AddPicture(n+a,!1,!0).Select();var r=s.ShapeRange;r.Name=t+o,r.PictureFormat.Brightness=.85,r.PictureFormat.Contrast=.15,r.LockAspectRatio=!0,r.Height=60.95*72,r.Width=2925.36,r.WrapFormat.AllowOverlap=!0,r.WrapFormat.Side=3,r.WrapFormat.Type=3,r.RelativeHorizontalPosition=0,r.RelativeVerticalPosition=0,r.Left=-999995,r.Top=-999995,this.WebObject.ActiveDocument.ActiveWindow.ActivePane.View.SeekView=0,this.Status="水印添加成功"}catch(e){return this.Status="水印添加成功"+e.description,!1}}return!0}return this.Status="文档被锁定,插入水印失败",!1}return this.Status="非Word文档,插入水印失败",!1},this.ParagraphSettings=function(){var t=this.WebObject.ActiveDocument.Application.Selection.ParagraphFormat;t.Alignment=3,t.OutlineLevel=10,t.CharacterUnitLeftIndent=0,t.CharacterUnitRightIndent=0,t.CharacterUnitFirstLineIndent=0,t.MirrorIndents=!1,t.AutoAdjustRightIndent=!0,t.LineUnitBefore=0,t.LineUnitAfter=0,t.LineSpacingRule=1,t.DisableLineHeightGrid=!1,t.WidowControl=!1,t.KeepWithNext=!1,t.KeepTogether=!1,t.PageBreakBefore=!1,t.NoLineNumber=!1,t.Hyphenation=!0,t.FarEastLineBreakControl=!0,t.WordWrap=!0,t.HangingPunctuation=!0,t.HalfWidthPunctuationOnTopOfLine=!1,t.AddSpaceBetweenFarEastAndAlpha=!0,t.AddSpaceBetweenFarEastAndDigit=!0,t.BaseLineAlignment=4,this.WebObject.ActiveDocument.Application.Selection.MoveLeft(Unit=1,Count=1)},this.CleanBackground=function(){this.WebObject.ActiveDocument.Application.Selection.WholeStory();var t=this.WebObject.ActiveDocument.Application.Selection.Font.Shading;t.Texture=0,t.ForegroundPatternColor=-16777216,t.BackgroundPatternColor=-16777216;var e=this.WebObject.ActiveDocument.Application.Selection.ParagraphFormat.Shading;e.Texture=0,e.ForegroundPatternColor=-16777216,e.BackgroundPatternColor=-16777216,this.WebObject.ActiveDocument.Application.Selection.MoveLeft(Unit=1,Count=1)},this.WordFontSet=function(){if(".doc"==this.FileType||".docx"==this.FileType){var t=this.WebObject.ActiveDocument.Application.Selection.Font;t.Name="微软雅黑",t.Size=10.5,t.Bold=!1,t.Italic=!1,t.Underline=0,t.UnderlineColor=0,t.StrikeThrough=!1,t.DoubleStrikeThrough=!1,t.Hidden=!1,t.SmallCaps=!1,t.AllCaps=!1,t.Color=-16777216,t.Superscript=!1,t.Subscript=!1,t.Spacing=0,t.Scaling=100,t.Position=0,t.DisableCharacterSpaceGrid=!1,t.EmphasisMark=0,t.Ligatures=0,t.NumberSpacing=0,t.NumberForm=0,t.StylisticSet=0,t.ContextualAlternates=0,this.WebObject.ActiveDocument.Application.Selection.MoveLeft(Unit=1,Count=1)}else this.Status="文档不是word类型"},this.HyperDelete=function(){if(".doc"==this.FileType||".docx"==this.FileType){var t=this.WebObject.ActiveDocument.Application.Selection;t.WholeStory();for(var e=this.WebObject.ActiveDocument.Hyperlinks.Count,i=1;i<=e;i++)this.WebObject.ActiveDocument.Hyperlinks.Item(1).Delete();t.MoveLeft(Unit=1,Count=1)}else".xls"!=this.FileType&&".xlsx"!=this.FileType||this.WebObject.ActiveDocument.Application.Cells.Hyperlinks.Delete()},this.Close=function(){return 0==this.obj.Close()},this.WebPageSetup=function(){this.setShowDialog(this.ShowDialog.DialogPageSetup)},this.WebOpenPrint=function(){this.setShowDialog(this.ShowDialog.DialogPrint)},this.PrintPreview=function(){this.obj.PrintPreview()},this.PrintPreviewExit=function(){this.obj.PrintPreviewExit(),this.obj.ActiveDocument.ActiveWindow.View.ShowFieldCodes=!1},this.AppendTools=function(t,e,i){parseInt(t);var s=this.obj.CustomToolbar;s.AddToolButton(t,e,i,e,0)},this.DisableTools=function(t,e){var i=this.obj.CustomToolbar;i.DisableToolsButton(t,e),this.obj.Style.Invalidate()},this.VisibleTools=function(t,e){var i=this.obj.CustomToolbar;i.VisibleToolsButton(t,e),this.obj.Style.Invalidate()},this.AppendMenu=function(t,e){var i=this.obj.CustomMenu;void 0!=MenuFile&&null!=MenuFile||(i.Clear(),MenuFile=i.CreatePopupMenu(),i.Add(MenuFile,"文件(&F)")),i.AppendMenu(MenuFile,t,!1,e),i.Update()},this.AddCustomMenu=function(){var t=this.obj.CustomMenu,e=t.CreatePopupMenu(),i=t.CreatePopupMenu();t.AppendMenu(i,6,!1,"自定义二级菜单一"),t.AppendMenu(i,7,!1,"自定义二级菜单二"),t.AppendMenu(i,0,!1,"-");var s=t.CreatePopupMenu();t.AppendMenu(s,8,!1,"自定义三级菜单一"),t.AppendMenu(s,0,!1,"-"),t.AppendMenu(s,9,!1,"自定义三级菜单二"),t.AppendMenu(i,s,!0,"自定义三级菜单"),t.AppendMenu(i,10,!1,"自定义二级菜单三"),t.AppendMenu(e,i,!0,"自定义二级菜单"),t.AppendMenu(e,17,!1,"启用保存"),t.AppendMenu(e,18,!1,"禁止保存"),t.AppendMenu(e,0,!1,"-"),t.AppendMenu(e,19,!1,"启用打印"),t.AppendMenu(e,20,!1,"禁止打印"),t.Add(e,"编辑(&E)"),t.Update()},this.WebGetDocSuffix=function(){try{var t=this.getDocType(this.FileType),i=0;return t==this.DocType.WORD&&(this.Activate(!0),i=this.obj.ActiveDocument.SaveFormat),t==this.DocType.EXECL&&(this.obj.ExitExcelEditMode(),i=this.obj.ActiveDocument.FileFormat,i<0&&(i=56)),this.DocSuffixType[i]}catch(e){return this.FileType}},this.WebFullName=function(){return this.obj.FullName},this.InsertImageByBookMark=function(t,e){this.obj.ActiveDocument.BookMarks.Exists(this.BookMark)&&this.obj.ActiveDocument.Bookmarks.Item(this.BookMark).Select();var i=this.obj.ActiveDocument.Application.Selection.InlineShapes.AddPicture(this.DownloadedFileTempPathName);i.Select(),i.PictureFormat.TransparentBackground=t;var s=i.ConvertToShape();return s.WrapFormat.Type=3,s.ZOrder(e),!0},this.DownloadToFile=function(t,e){var i=this.obj.Http,s=this.WebUrl.substring(0,this.WebUrl.lastIndexOf("/"));return i.ShowProgressUI=this.ShowWindow,i.Open(this.HttpMethod.Get,s+"/Document/"+t,!1)&&i.Send()&&200==i.Status?(i.ResponseSaveToFile(e+t),i.Clear(),!0):(i.Close(),!1)},this.HandWriting=function(t,e){var i=this.obj.Handwritting,s=i.DrawingSetting;s.PenThicker=e,s.PenColor=t,i.AnnotateDraw(),this.ShowMenuBar(!1),this.ShowToolBars(!1)},this.StopHandWriting=function(){var t=this.obj.Handwritting;t.StopAnnotate(),this.ShowMenuBar(!0),this.ShowToolBars(!0)},this.TextWriting=function(){var t=this.obj.Handwritting,e=t.TextSetting;e.TextSize=32,e.TextColor=12255487,e.FontName="宋体",t.AnnotateText(),this.ShowMenuBar(!1),this.ShowToolBars(!1)},this.ShapeWriting=function(){var t=this.obj.Handwritting,e=t.ShapeSetting;e.ShapeType=0,e.BackgroundColor=16777215,e.BorderColor=16711680,e.BorderWidth=6,t.AnnotateShape(),this.ShowMenuBar(!1),this.ShowToolBars(!1)},this.RemoveLastWriting=function(){var t=this.obj.Handwritting;t.RemoveLast()},this.ShowWritingUser=function(bVal,username){var strxml=this.obj.GetAnnotations(),json=eval("("+strxml+")");if(""!=username&&null!=username&&void 0!=username){for(var i=0;i<json.Annotations.length;i++)if(json.Annotations[i].Annotation.User!=username){var id=json.Annotations[i].Annotation.ID;this.obj.GetAnnotationByID(id).Visible=bVal}}else for(var i=0;i<json.Annotations.length;i++){var id=json.Annotations[i].Annotation.ID;this.obj.GetAnnotationByID(id).Visible=bVal}},this.GetDataToSend=function(){var httpclient=this.obj.Http;httpclient.Clear();var ReturnValue=httpclient.GetResponseHeader("RName"),jsonObj=eval("("+ReturnValue+")");for(var i in jsonObj)this.WebSetMsgByName(i,jsonObj[i])},this.IWR=null,this.CreateRevision=function(){if(null==this.obj)return this.Status="iWebOffice2015对象未初始化",!1;if(null!=this.IWR)return this.Status="手写组件对象已存在",!1;var t=this.obj.CreateNew("iWebRevision.iWebRevisionCtrl.1");return 0!=t?(this.Status="创建手写组件对象失败",!1):(this.ShowTitleBar(!1),this.ShowMenuBar(!1),this.ShowStatusBar(!1),this.ShowCustomToolbar(!1),this.obj.Style.BorderStyle=0,this.IWR=this.obj.Application,!0)},this.OleDialogPrint=function(t,e){if(1==t)this.obj.ShowDialog(0);else if(2==t){var i;i="Word Files(*.doc;*.docx;*.docm;*.dot;*.dotx;*.dotm;*.rtf)|*.doc;*.docx;*.docm;*.dot;*.dotx;*.dotm;*.rtf",i+="|Excel Files(*.xls;*.xlsx;*.xlsm;*.xlt;*.xltx;*.xltm)|*.xls;*.xlsx;*.xlsm;*.xlt;*.xltx;*.xltm",i+="|PowerPoint Files(*.ppt;*.pptx;*.pptm;*.pot;*.potx;*.potm)|*.ppt;*.pptx;*.pptm;*.pot;*.potx;*.potm",i+="|Project Files(*.mpp;*.mpt)|*.mpp;*.mpt",i+="|Visio Files(*.vsd;*.vdx;*.vss;*.vsx;*.vst;*.vtx;*.vsw;*.vdw;*.vsdx;*.vssx;*.vstx;*.vsdm;*.vssm;*.vstm)|*.vsd;*.vdx;*.vss;*.vsx;*.vst;*.vtx;*.vsw;*.vdw;*.vsdx;*.vssx;*.vstx;*.vsdm;*.vssm;*.vstm",i+="|All File(*.*)|*.*",i+="||",this.obj.ShowDialog(1,i,0)}else 4==t?this.obj.ShowDialog(2):8==t?this.obj.ShowDialog(3):16==t?this.obj.ShowDialog(4):32==t?this.obj.ShowDialog(5):64==t?this.obj.ShowDialog(6):128==t&&this.obj.ActiveDocument.PrintPreview()},this.Alert=function(t){this.obj.FuncExtModule.Alert(t)},this.HidePlugin=function(t){this.blnIE()||this.obj.HidePlugin(t)}}function basePath(){var t=window.document.location.href,e=window.document.location.pathname,i=t.indexOf(e),s=t.substring(0,i),o=e.substring(0,e.substr(1).indexOf("/")+1),n=s+o+"/";return n}function KGBrowser(){var kgbrowser=this;this.uuid="",this.getUUID=function(){return""==this.uuid&&(this.uuid=this.kg_uuid(16,32)),this.uuid},this.openWindowSPE=function(t,e,i){void 0==i&&(i=!0);var s="KGBrowser://$link:"+basePath()+t+e;location.href=s,this.LongConnect()},this.openWindow=function(url,param,onlyONE){void 0==onlyONE&&(onlyONE=!0),$.ajax({type:"get",async:!1,url:"http://"+document.location.hostname+":9588/QueryOpen",jsonp:"hookback",dataType:"jsonp",success:function success(data){var jsonobj=eval(data);if("none"==jsonobj.ret||0==onlyONE){var link="KGBrowser://$link:"+basePath()+url+param;location.href=link,kgbrowser.LongConnect()}else alert("有已打开的金格浏览器!")},error:function(){var t=confirm("未安装支持多浏览器应用程序是否点击安装\n提示:安装的时候360全部点击允许程序所有操作");if(t){var e=window.document.location.href,i=window.document.location.pathname,s=e.indexOf(i),o=e.substring(0,s),n=i.substring(0,i.substr(1).indexOf("/")+1),a=o+n;window.location.href=a+"/KGBrowserSetup.exe"}}});var head=document.head||$("head")[0]||document.documentElement,script=$(head).find("script")[0];script.onerror=function(t){var e=confirm("未安装支持多浏览器应用程序是否点击安装\n提示:安装的时候360全部点击允许程序所有操作");if(e){var i=window.document.location.href,s=window.document.location.pathname,o=i.indexOf(s),n=i.substring(0,o),a=s.substring(0,s.substr(1).indexOf("/")+1),r=n+a;window.location.href=r+"/KGBrowserSetup.exe"}script.parentNode&&script.parentNode.removeChild(script);var c=script.src||"",h=c.indexOf("hookback=");if(-1!=h){var l=c.indexOf("&");-1==l&&(l=c.length);var u=c.substring(h+13,l);delete window[u]}}},this.LongConnect=function(){var strUrl="http://"+document.location.hostname+":9588/LongListen?id="+kgbrowser.uuid;$.ajax({type:"get",async:!1,url:strUrl,jsonp:"hookback",dataType:"jsonp",success:function success(data){var jsonobj=eval(data);if(console.log(jsonobj.ret),"save"==jsonobj.ret)setTimeout("location.reload();",100);else if("returnlist"==jsonobj.ret)alert("returnlist"),setTimeout("location.reload();",100);else if("none"==jsonobj.ret||"unload"==jsonobj.ret)kgbrowser.LongConnect();else{console.log(jsonobj.ret);var jsonobj2=eval(jsonobj.ret);console.log(jsonobj2.action),console.log(jsonobj2.func),"save"==jsonobj2.action?setTimeout("location.reload();",100):"CallParentFunc"==jsonobj2.action?(alert(jsonobj2.action),alert(jsonobj2.func),eval(jsonobj2.func),kgbrowser.LongConnect()):"ReturnList"==jsonobj2.action&&(alert(jsonobj2.action),setTimeout("location.reload();",100))}},error:function(t,e,i){}})},this.kg_uuid=function(t,e){var i,s,o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),n=[];if(e=e||o.length,t)for(i=0;i<t;i++)n[i]=o[0|Math.random()*e];else for(n[8]=n[13]=n[18]=n[23]="-",n[14]="4",i=0;i<36;i++)n[i]||(s=0|16*Math.random(),n[i]=o[19==i?3&s|8:s]);return n.join("")}}window.console=window.console||function(){var t={};return t.log=t.warn=t.debug=t.info=t.error=t.time=t.dir=t.profile=t.clear=t.exception=t.trace=t.assert=function(){},t}()},73332:function(t,e,i){},7988:function(t,e,i){"use strict";i.d(e,"g",(function(){return o})),i.d(e,"d",(function(){return n})),i.d(e,"a",(function(){return a})),i.d(e,"i",(function(){return r})),i.d(e,"b",(function(){return c})),i.d(e,"c",(function(){return h})),i.d(e,"h",(function(){return l})),i.d(e,"e",(function(){return u})),i.d(e,"f",(function(){return d}));var s=i("b775");function o(t){return Object(s["a"])({url:"/system/contacts/list",method:"get",params:t})}function n(t){return Object(s["a"])({url:"/system/contacts/"+t,method:"get"})}function a(t){return Object(s["a"])({url:"/system/contacts",method:"post",data:t})}function r(t){return Object(s["a"])({url:"/system/contacts",method:"put",data:t})}function c(t){return Object(s["a"])({url:"/system/contacts/"+t,method:"delete"})}function h(t){return Object(s["a"])({url:"/system/contacts/export",method:"get",params:t})}function l(){return Object(s["a"])({url:"/system/contacts/treelist",method:"get"})}function u(t,e){return Object(s["a"])({url:"/system/contacts/group/"+t,method:"get",params:e})}function d(t,e){return Object(s["a"])({url:"/system/contacts/groupUserAll/"+t,method:"get",params:e})}},"8d30":function(t,i,s){"use strict";s.r(i);var o,n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("el-button",{attrs:{type:"success",value:"保存文档到服务器"},on:{click:function(e){return t.SaveDocument()}}},[t._v("保存文档到服务器")]),i("el-button",{attrs:{type:"primary",value:"打开本地文档(有窗口)"},on:{click:function(e){t.OnUnLoad(),t.openlocal()}}},[t._v("打开本地文档(有窗口)")]),i("el-button",{attrs:{type:"info",value:"锁定文档"},on:{click:function(e){return t.WebSetProtect(!0,"123456")}}},[t._v("锁定文档")]),i("el-button",{attrs:{type:"warning",value:"解锁文档"},on:{click:function(e){return t.WebSetProtect(!1,"123456")}}},[t._v("解锁文档")]),i("el-button",{attrs:{type:"danger",value:"添加区域保护"},on:{click:function(e){return t.WebAreaProtect()}}},[t._v("添加区域保护")]),i("el-button",{staticStyle:{background:"#6E30B4"},attrs:{type:"info",value:"解除区域保护"},on:{click:function(e){return t.WebAreaUnProtect()}}},[t._v("解除区域保护")]),i("el-button",{staticStyle:{background:"#303133"},attrs:{type:"info",value:"禁止拷贝"},on:{click:function(e){return t.WebEnableCopy()}}},[t._v("禁止拷贝")]),i("el-button",{staticStyle:{background:"#19868E"},attrs:{type:"info",value:"允许拷贝"},on:{click:function(e){return t.WebEnableCopy()}}},[t._v("允许拷贝")]),t._m(0)],1)},a=[function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticStyle:{width:"100%",height:"700px",bottom:"20px"}},[i("div",{attrs:{id:"office"}})])}],r=(s("28a5"),s("ba4c")),c=s.n(r),h=navigator.userAgent,l=/(msie\s|trident.*rv:)([\w.]+)/,u=/(firefox)\/([\w.]+)/,d=/(opera).+version\/([\w.]+)/,b=/(chrome)\/([\w.]+)/,f=/version\/([\w.]+).*(safari)/;h.toLowerCase();function p(t){var e=l.exec(t);if(null!=e)return{browser:"IE",version:e[2]||"0"};e=u.exec(t);if(null!=e)return{browser:e[1]||"",version:e[2]||"0"};e=d.exec(t);if(null!=e)return{browser:e[1]||"",version:e[2]||"0"};e=b.exec(t);if(null!=e)return{browser:e[1]||"",version:e[2]||"0"};e=f.exec(t);return null!=e?{browser:e[2]||"",version:e[1]||"0"}:null!=e?{browser:"",version:"0"}:void 0}var m=p(h.toLowerCase());m.browser&&(o=m.browser,m.version);var S="",v="金格科技iWebOffice2015智能文档中间件[演示版];V5.0S0xGAAEAAAAAAAAAEAAAAJEBAACgAQAALAAAAA6pYlMzV7TN91Xx798YyA3x0u7LWQ4ZDi5RPkXZ9Dd2JIkW3LKly7r83j4f7C5/1vwyZb+//c+FThV1Lu9DCSy41ElQ06BzFwZcLrBMOlVwKJtWamoXOrRERgDuq83foZI1Isj8SxD4uU213MvZckNJKycrI5BngcM7JHdRR4M2ubyYvrqzMzRZyY8RQ/OFMf9tSGQieZvRWvShQOV0UlhibtSwLB6/Fnun08TZIDcUrsiiE2WbN9qBvQQXMDaOau2+ZFGhgdMqvZxFXDSUumWgNoLcA1t9NQ7tkAwbZKpuIC0OP44ZR6ZeaetLdUx9scPmVGxEevaQo845aCZo9PSf433NKr9hIAGfTj30SV+dRS4x4lpRO5p9/FkgGyvmdaQi+v/j8eH+brVThKZOrA4LEpyBCHo/5NhAmi5gPGeoPIy5Iu1ZeqJRBSR1EATavePwpQYgXG3gVVE7R1MqcM9lYzw4gxhStZI/hKgjgw7Jqj9CVp4GbMs+aY5V6aBJ90gwfku8RLcPFYW6BdMibLCKMDMkl4fwFE8azlTWPb8DcXubJ/obg6ffxbXUW59lJQ==";S+='<object id="WebOffice" ',S+=' width="100%"',S+=' height="100%"',void 0!=window.ActiveXObject||null!=window.ActiveXObject||"ActiveXObject"in window?("Win32"==window.navigator.platform&&(S+=' CLASSID="CLSID:D89F482C-5045-4DB5-8C53-D2C9EE71D025" codebase="../../iWebOffice2015.cab#version=0,0,0,0"'),"Win64"==window.navigator.platform&&(S+=' CLASSID="CLSID:D89F482C-5045-4DB5-8C53-D2C9EE71D024" codebase="../../iWebOffice2015.cab#version=0,0,0,0"'),S+=">",S+='<param name="Copyright" value="'+v+'">'):"chrome"==o?(S+=' clsid="CLSID:D89F482C-5045-4DB5-8C53-D2C9EE71D025"',S+=' type="application/kg-plugin"',S+=' OnReady="OnReady"',S+=' OnCommand="OnCommand"',S+=' OnRightClickedWhenAnnotate="OnRightClickedWhenAnnotate"',S+=' OnSending="OnSending"',S+=' OnSendEnd="OnSendEnd"',S+=' OnRecvStart="OnRecvStart"',S+=' OnRecving="OnRecving"',S+=' OnRecvEnd="OnRecvEnd"',S+=' OnFullSizeBefore="OnFullSizeBefore"',S+=' OnFullSizeAfter="OnFullSizeAfter"',S+=' Copyright="'+v+'"',S+=">"):"firefox"==o&&(S+=' clsid="CLSID:D89F482C-5045-4DB5-8C53-D2C9EE71D025"',S+=' type="application/kg-activex"',S+=' OnCommand="OnCommand"',S+=' OnReady="OnReady"',S+=' OnOLECommand="OnOLECommand"',S+=' OnExecuteScripted="OnExecuteScripted"',S+=' OnQuit="OnQuit"',S+=' OnSendStart="OnSendStart"',S+=' OnSending="OnSending"',S+=' OnSendEnd="OnSendEnd"',S+=' OnRecvStart="OnRecvStart"',S+=' OnRecving="OnRecving"',S+=' OnRecvEnd="OnRecvEnd"',S+=' OnRightClickedWhenAnnotate="OnRightClickedWhenAnnotate"',S+=' OnFullSizeBefore="OnFullSizeBefore"',S+=' OnFullSizeAfter="OnFullSizeAfter"',S+=' Copyright="'+v+'"',S+=">"),S+="</object>";var g=S,O=g,w=s("5e0c"),D=s("5f87"),A={props:{fileData:{}},data:function(){return{webOffice:null,webOfficeObj:null,headers:"Bearer "+Object(D["a"])(),saveResult:""}},beforeCreate:function(){},mounted:function(){var t=this;this.$nextTick((function(){t.initWebOffice(),t.initWebOfficeObject()}))},created:function(){},beforeDestroy:function(){},methods:{openlocal:function(){this.webOfficeObj.WebOpenLocal()},OnUnLoad:function(){this.webOfficeObj.WebClose()},initWebOffice:function(){this.webOffice=new c.a({template:O}).$mount("#office")},initWebOfficeObject:function(){var t=this;this.webOfficeObj=new w["a"],this.webOfficeObj.setObj(document.getElementById("WebOffice"));try{setTimeout((function(){t.webOfficeObj.ServerUrl="http://"+document.location.hostname+"/prod-api",t.webOfficeObj.UserName=t.fileData.user,t.webOfficeObj.FileName=t.fileData.filePath,t.webOfficeObj.getResultJson={},t.webOfficeObj.SaveServlet="/content/upload",t.webOfficeObj.FileType="."+t.fileData.filePath.split(".")[t.fileData.filePath.split(".").length-1],t.webOfficeObj.ShowWindow=!1,t.webOfficeObj.EditType=t.fileData.EditType,t.webOfficeObj.ShowMenu=0,t.webOfficeObj.ShowToolBar=0,t.webOfficeObj.SetCaption(t.webOfficeObj.UserName+"正在编辑文档"),t.webOfficeObj.WebSetSkin(14408667,15395562,15395562,14408667,14408667,14408667,0)||t.msgError("插件加载失败,请新打开!"),t.webOfficeObj.WebOpen()&&t.msgSuccess(t.webOfficeObj.Status),t.webOfficeObj.AppendMenu("1","打开本地文件(&L)"),t.webOfficeObj.AppendMenu("2","保存本地文件(&S)"),t.webOfficeObj.AppendMenu("3","-"),t.webOfficeObj.AppendMenu("4","打印预览(&C)"),t.webOfficeObj.AppendMenu("5","退出打印预览(&E)"),t.webOfficeObj.AddCustomMenu(),t.webOfficeObj.HookEnabled()}),2e3)}catch(e){console.log("catch"),console.log(e.description)}},closeWindow:function(){top.window.opener=top,top.window.open("","_self",""),top.window.close()},StatusMsg:function(t){try{this.msgSuccess(t)}catch(e){return!1}},SaveDocument:function(t){this.webOfficeObj.WebSave(this.headers)?(this.$emit("func",this.webOfficeObj.getResultJson.fileName),this.webOfficeObj.FileName=this.webOfficeObj.getResultJson.fileName,this.webOfficeObj.WebClose()):(this.webOfficeObj.Alert(this.webOfficeObj.Status),this.StatusMsg(this.webOfficeObj.Status))},closeOffice:function(t,e){this.webOfficeObj.WebClose(),this.msgSuccess("关闭插件")},WebSetProtect:function(t,e){this.webOfficeObj.WebSetProtect(t,e),this.msgSuccess(this.webOfficeObj.Status)},WebEnableCopy:function(t){this.webOfficeObj.WebEnableCopy(t),this.msgSuccess(this.webOfficeObj.Status)},WebAreaProtect:function(){this.webOfficeObj.HidePlugin(0);var t=window.prompt("文档里需要先设置保护的书签,示例文档默认添加了KingGrid的书签,请输入书签名称","KingGrid","");null!=t&&this.webOfficeObj.WebAreaProtect(t),this.webOfficeObj.HidePlugin(1)},WebAreaUnProtect:function(){this.webOfficeObj.HidePlugin(0);var t=window.prompt("需要和保护的书签对应,示例文档默认添加了KingGrid的书签,请输入书签名称","KingGrid","");null!=t&&this.webOfficeObj.WebAreaUnprotect(t),this.webOfficeObj.HidePlugin(1)},OnCommand:function(t,e,i){switch(t){case 1:WebOpenLocal();break;case 2:this.webOfficeObj.WebSaveLocal();break;case 4:this.webOfficeObj.PrintPreview();break;case 5:this.webOfficeObj.PrintPreviewExit(),this.webOfficeObj.ShowField();break;case 17:this.webOfficeObj.SaveEnabled(!0),this.StatusMsg("启用保存");break;case 18:this.webOfficeObj.SaveEnabled(!1),this.StatusMsg("关闭保存");break;case 19:this.webOfficeObj.PrintEnabled(!0),this.StatusMsg("启用打印");break;case 20:this.webOfficeObj.PrintEnabled(!1),this.StatusMsg("关闭打印");break;case 301:this.webOfficeObj.HandWriting("255","4"),this.StatusMsg("手写签批");break;case 302:this.webOfficeObj.StopHandWriting(),this.StatusMsg("停止手写签批");break;case 303:this.webOfficeObj.TextWriting(),this.StatusMsg("文字签名");break;case 304:this.webOfficeObj.ShapeWriting(),this.StatusMsg("图形签批");break;case 305:this.webOfficeObj.RemoveLastWriting(),this.StatusMsg("取消上一次签批");break;case 306:this.webOfficeObj.ShowWritingUser(!1,this.webOfficeObj.UserName),this.StatusMsg("显示签批用户");break;default:return}},LoadServlet:function(){this.webOfficeObj=new w["a"];try{this.webOfficeObj.ServerUrl="/prod-api";var t="profile/doc/web.docx";this.webOfficeObj.ShowMenu=1,this.webOfficeObj.ShowToolBar=0,this.SetGraySkin(),this.webOfficeObj.WebOpen3(t)&&this.StatusMsg(this.webOfficeObj.Status)}catch(e){this.StatusMsg(e.description)}},LoadURL:function(){try{this.webOfficeObj.ServerUrl="/prod-api",this.webOfficeObj.ShowMenu=1,this.webOfficeObj.ShowToolBar=0,this.webOfficeObj.UserName="xqx",this.webOfficeObj.FileName="web.docx",this.webOfficeObj.FileType=".docx",this.webOfficeObj.ShowWindow=!0,this.webOfficeObj.EditType="1",this.webOfficeObj.setObj(document.getElementById("WebOffice")),this.webOfficeObj.WebSetSkin(14408667,15395562,15395562,14408667,14408667,14408667,0)||alert(this.webOfficeObj.Status),this.webOfficeObj.WebOpen2("/profile/doc/web.docx")&&this.StatusMsg(this.webOfficeObj.Status)}catch(e){this.StatusMsg(e.description)}},SetGraySkin:function(){this.webOfficeObj.WebSetSkin(14408667,15395562,15395562,14408667,14408667,14408667,0)||this.webOfficeObj.Alert(this.webOfficeObj.Status)}}},j=A,y=s("2877"),F=Object(y["a"])(j,n,a,!1,null,null,null);i["default"]=F.exports},afbd:function(t,e,i){"use strict";i("73332")},c0c7:function(t,e,i){"use strict";i.d(e,"h",(function(){return n})),i.d(e,"e",(function(){return a})),i.d(e,"a",(function(){return r})),i.d(e,"j",(function(){return c})),i.d(e,"c",(function(){return h})),i.d(e,"d",(function(){return l})),i.d(e,"i",(function(){return u})),i.d(e,"b",(function(){return d})),i.d(e,"f",(function(){return b})),i.d(e,"k",(function(){return f})),i.d(e,"l",(function(){return p})),i.d(e,"m",(function(){return m})),i.d(e,"g",(function(){return S}));var s=i("b775"),o=i("c38a");function n(t){return Object(s["a"])({url:"/system/user/list",method:"get",params:t})}function a(t){return Object(s["a"])({url:"/system/user/"+Object(o["f"])(t),method:"get"})}function r(t){return Object(s["a"])({url:"/system/user",method:"post",data:t})}function c(t){return Object(s["a"])({url:"/system/user",method:"put",data:t})}function h(t){return Object(s["a"])({url:"/system/user/"+t,method:"delete"})}function l(t){return Object(s["a"])({url:"/system/user/export",method:"get",params:t})}function u(t,e){var i={userId:t,password:e};return Object(s["a"])({url:"/system/user/resetPwd",method:"put",data:i})}function d(t,e){var i={userId:t,status:e};return Object(s["a"])({url:"/system/user/changeStatus",method:"put",data:i})}function b(){return Object(s["a"])({url:"/system/user/profile",method:"get"})}function f(t){return Object(s["a"])({url:"/system/user/profile",method:"put",data:t})}function p(t,e){var i={oldPassword:t,newPassword:e};return Object(s["a"])({url:"/system/user/profile/updatePwd",method:"put",params:i})}function m(t){return Object(s["a"])({url:"/system/user/profile/avatar",method:"post",data:t})}function S(){return Object(s["a"])({url:"/system/user/importTemplate",method:"get"})}},ebe0:function(t,e,i){"use strict";i.r(e);var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"app-container"},[i("el-form",{ref:"form",attrs:{model:t.form,rules:t.rules,"label-width":"130px",border:""}},[i("table",{attrs:{width:"100%",border:"1"}},[i("tr",[i("td",{attrs:{colspan:"2"}},[i("p",{staticClass:"title"},[t._v("发文起草")])])]),i("tr",[i("td",[i("el-form-item",{attrs:{label:"缓急",prop:"ponderance"}},[i("el-select",{attrs:{placeholder:"请选择"},model:{value:t.form.ponderance,callback:function(e){t.$set(t.form,"ponderance",e)},expression:"form.ponderance"}},[i("el-option",{attrs:{label:"一般",value:"4"}}),i("el-option",{attrs:{label:"平急",value:"3"}}),i("el-option",{attrs:{label:"加急",value:"2"}}),i("el-option",{attrs:{label:"特急",value:"1"}}),i("el-option",{attrs:{label:"特提",value:"0"}})],1)],1)],1),i("td",[i("el-form-item",{attrs:{label:"密级",prop:"securityClass"}},[i("el-select",{attrs:{placeholder:"请选择"},model:{value:t.form.securityClass,callback:function(e){t.$set(t.form,"securityClass",e)},expression:"form.securityClass"}},[i("el-option",{attrs:{label:"一般",value:"3"}}),i("el-option",{attrs:{label:"秘密",value:"2"}}),i("el-option",{attrs:{label:"机密",value:"1"}}),i("el-option",{attrs:{label:"绝密",value:"0"}})],1)],1)],1)]),i("tr",[i("td",{attrs:{colspan:"2"}},[i("el-form-item",{attrs:{label:"标题:",prop:"fwtitle"}},[i("el-input",{attrs:{type:"text",placeholder:""},model:{value:t.form.fwtitle,callback:function(e){t.$set(t.form,"fwtitle",e)},expression:"form.fwtitle"}})],1)],1)]),i("tr",[i("td",{attrs:{colspan:"2"}},[i("el-form-item",{attrs:{label:"发文字号:",prop:"fwtitle"}},[i("el-input",{attrs:{type:"text",placeholder:""},model:{value:t.form.referenceNumber,callback:function(e){t.$set(t.form,"referenceNumber",e)},expression:"form.referenceNumber"}})],1)],1)]),i("tr",[i("td",{attrs:{colspan:"2"}},[i("el-form-item",{attrs:{label:"上传附件:",prop:"accessory"}},[i("el-upload",{attrs:{action:t.upload.url,headers:t.upload.headers,"file-list":t.upload.oldFileList,multiple:"","show-file-list":!0,"on-progress":t.handleFileUploadProgress,"on-preview":t.handlePreview,"http-request":t.submitUpload,"on-remove":t.handleRemove,"before-remove":t.beforeRemove}},[i("el-button",{attrs:{slot:"trigger",size:"small",loading:t.upload.isUploading,type:"primary"},slot:"trigger"},[t._v("上传文件")])],1),i("ul",{directives:[{name:"show",rawName:"v-show",value:!!t.upload.oldFileList.length,expression:"!!upload.oldFileList.length"}],staticClass:"old-file-list"})],1)],1)]),i("tr",[i("td",{attrs:{colspan:"2"}},[i("el-form-item",{attrs:{label:"正文:",prop:"content"}},[i("el-button",{directives:[{name:"loading",rawName:"v-loading.fullscreen.lock",value:t.fullscreenLoading,expression:"fullscreenLoading",modifiers:{fullscreen:!0,lock:!0}}],attrs:{size:"small",type:"primary"},on:{click:t.openIweboffice}},[t._v("读取正文 ")])],1)],1)]),i("tr",{directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}]},[i("td",[i("el-form-item",{attrs:{label:"actkey:",prop:"actkey"}},[i("el-input",{attrs:{type:"textarea",placeholder:""},model:{value:t.form.actkey,callback:function(e){t.$set(t.form,"actkey",e)},expression:"form.actkey"}})],1)],1)])])]),i("div",{directives:[{name:"show",rawName:"v-show",value:t.open3,expression:"open3"}],staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.submitForm(1)}}},[t._v("提交")]),i("el-button",{on:{click:t.cancel}},[t._v("取 消")])],1),i("div",{directives:[{name:"show",rawName:"v-show",value:t.open4,expression:"open4"}],staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.submitToDo()}}},[t._v("同意")]),i("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.deleteToDo()}}},[t._v("拒绝")]),i("el-button",{on:{click:t.cancel}},[t._v("取 消")])],1),i("el-dialog",{attrs:{id:"content",title:"正文修改",visible:t.contentOpen,"before-close":t.cancel1,"append-to-body":"",width:"80%",top:"10",height:"900px"},on:{"update:visible":function(e){t.contentOpen=e}}},[t.contentOpen?i("i-web-office",{key:t.timer,ref:"ioffice",attrs:{fileData:t.fileData},on:{func:t.getcontent}}):t._e(),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(e){t.contentOpen=!1}}},[t._v("取 消")])],1)],1),i("el-dialog",{staticStyle:{size:"30px"},attrs:{title:t.title,visible:t.deptOpen,width:"40%","append-to-body":""},on:{"update:visible":function(e){t.deptOpen=e}}},[i("el-tree",{ref:"dept",attrs:{data:t.deptOptions,"show-checkbox":"","default-expand-all":"","node-key":"id","empty-text":"加载中,请稍后",props:t.defaultProps}}),i("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{attrs:{type:"primary"},on:{click:t.getDeptAllCheckedKeys}},[t._v("确 定")]),i("el-button",{on:{click:t.cancelDept}},[t._v("取 消")])],1)],1)],1)},o=[],n=(i("28a5"),i("ac6a"),i("7f7f"),i("6b54"),i("7f56")),a=i("8d30"),r=i("6ce7"),c=i("fcb7"),h=i("5b15"),l=i("ca17"),u=i.n(l),d=i("5f87"),b={components:{SelectUserByDept:n["a"],iWebOffice:a["default"],SelectRen:r["a"],Treeselect:u.a},props:{data:"",actOpen:!1},data:function(){return{Renopen:!1,receiverName:[],timer:"",contentOpen:!1,receiverAccount:[],dialogTableVisible:!1,fullscreenLoading:!1,fileData:{filePath:"/profile/doc/NewCreate.doc",user:"xxx",EditType:"1"},fileList3:[],ids:[],single:!0,multiple:!0,total:0,infoList:[],title:"",open:!1,open1:!1,queryParams:{pageNum:1,pageSize:10,status:void 0,deleteTime:void 0},form:{actkey:"",content:"",fwdept:"",ponderance:"",securityClass:"",referenceNumber:"",copyTo:"",accessory:"",avtiveSend:""},flg:"",rules:{fwtitle:[{required:!0,message:"标题题不能为空",trigger:"blur"}],referenceNumber:[{required:!0,message:"发文字号不能为空",trigger:"blur"}],ponderance:[{required:!0,message:"请选择缓急程度",trigger:"blur"}],securityClass:[{required:!0,message:"请选择密级等级",trigger:"blur"}]},open3:!1,open4:!1,deptOpen:!1,deptOptions:[],defaultProps:{children:"children",label:"label"},depid:[],depname:[],deptflgOptions:[{label:"单位",value:1}],loading:!0,upload:{isUploading:!1,headers:{Authorization:"Bearer "+Object(d["a"])()},url:"/prod-api/common/upload",fileList:[],oldFileList:[]}}},created:function(){this.flg=this.data.flg,this.form.actkey=this.data.getactkey,this.getTreeselect(),void 0==this.flg?this.open3=!0:"1"==this.flg?(this.form=this.data,this.getDetails(),this.open4=!0):(this.form=this.data,this.getDetails())},methods:{handleSelect:function(t){this.deptOpen=!0,this.title=0==t?"主送部门":"抄送部门"},handleSelectDept:function(){this.deptOpen=!0,this.title="发文部门"},closeoffice:function(){this.$refs.ioffice.closeOffice()},getTreeselect:function(){var t=this;Object(c["g"])().then((function(e){t.deptOptions=e.data;for(var i=t.deptOptions,s=0;s<i.length;s++)console.log(t.deptOptions[s].children[0].id),console.log(i[s].id)}))},getDeptAllCheckedKeys:function(){for(var t=this.$refs.dept.getHalfCheckedKeys(),e=this.$refs.dept.getCheckedKeys(),i=this.$refs.dept.getCheckedNodes(),s=this.deptOptions,o="",n=0;n<s.length;n++)o+=s[n].children[n].id;for(var a=0;a<i.length;a++)100!=i[a].id&&i[a].id!=o&&(this.depname.push(i[a].label),this.depid.push(i[a].id));return console.log(i),t.unshift.apply(t,e),"主送部门"==this.title?this.form.avtiveSend=this.depname.toString():"抄送部门"==this.title?this.form.copyTo=this.depname.toString():this.form.fwdept=this.depname.toString(),this.deptOpen=!1,this.depname=[],this.depid=[],e},getcontent:function(t){this.contentOpen=!1,this.form.content=t,this.fileData.filePath=t},submitUpload:function(t){var e=this,i=new FormData;i.append("file",t.file),Object(h["k"])(i).then((function(t){200===t.code&&(e.upload.fileList.push(t.fileName),e.form.accessory=e.upload.fileList.toString(),e.upload.oldFileList.push({name:t.fileName.substring(t.fileName.lastIndexOf("/")+1,t.fileName.length),url:t.url}),e.msgSuccess("上传成功"),e.upload.isUploading=!1)}))},handleFileUploadProgress:function(t,e,i){this.upload.isUploading=!0},handlePreview:function(t){window.open(t.url)},beforeRemove:function(t,e){return this.$confirm("确定移除 ".concat(t.name,"?"))},handleRemove:function(t){var e=this;this.upload.oldFileList.forEach((function(i,s){i.uid===t.uid&&e.mail.oldFileList.splice(s,1)}))},getDetails:function(){var t=this;Object(h["b"])(this.form.formId).then((function(e){if(t.form=e.data,t.fileData.filePath=""==t.form.content?"/profile/doc/NewCreate.doc":t.form.content,t.fileData.user=t.form.user,""!=e.data.accessory)for(var i=e.data.accessory.split(","),s=0;s<i.length;s++){var o={name:i[s].substring(i[s].lastIndexOf("/")+1,i[s].length),url:"/prod-api"+i[s]};t.upload.oldFileList.push(o)}}))},openda:function(){this.open1=!1},openIweboffice:function(){this.timer=(new Date).getTime(),this.contentOpen=!0},cancel:function(){this.$emit("getList"),this.open=!1,this.reset()},cancel1:function(){this.contentOpen=!1},reset:function(){this.form={everyone:void 0},this.resetForm("form")},handleQuery:function(){this.queryParams.pageNum=1},resetQuery:function(){this.resetForm("queryForm"),this.handleQuery()},handleSelectionChange:function(t){this.ids=t.map((function(t){return t.id})),this.single=1!=t.length,this.multiple=!t.length},handleAdd:function(){this.reset(),this.open=!0,this.title="公文发文"},cancelDept:function(){this.deptOpen=!1},handleUpdate:function(t){var e=this;this.reset();var i=t.id||this.ids;getInfo(i).then((function(t){e.form=t.data,e.open=!0,e.title="公文发文"}))},handleUpdate1:function(t){var e=this;this.reset();var i=t.id||this.ids;getInfo(i).then((function(t){e.form=t.data,e.open1=!0,e.title="公文发文"}))},submitForm:function(t){var e=this;this.$refs["form"].validate((function(i){e.$set(e.form,"sendFlg",t),i&&(void 0!=e.form.id?Object(h["j"])(e.form).then((function(t){200===t.code&&e.msgSuccess("修改成功")})):Object(h["e"])(e.form).then((function(t){console.log(t.code),200===t.code&&(console.log(t.code),e.msgSuccess("提交成功"),e.$emit("transferUser",e.open))})))}))},submitToDo:function(){var t=this;Object(h["j"])(this.form).then((function(e){Object(h["f"])(t.form.taskid).then((function(e){t.msgSuccess("提交成功"),console.log(e.code),t.$emit("getList")}))}))},deleteToDo:function(){var t=this;this.$confirm("是否确认拒绝这这个申请吗?","警告",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Object(h["a"])(t.form.taskid).then((function(e){t.msgSuccess("拒绝成功"),t.$emit("getList")}))})).catch((function(){}))},handleDelete:function(t){var e=this,i=t.id||this.ids;this.$confirm("是否确认删除这一封邮件?","警告",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){return delInfo(i)})).then((function(){e.msgSuccess("删除成功")})).catch((function(){}))},handleExport:function(){var t=this,e=this.queryParams;this.$confirm("是否确认导出所有【请填写功能名称】数据项?","警告",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){return exportInfo(e)})).then((function(e){t.download(e.msg)})).catch((function(){}))}}},f=b,p=(i("afbd"),i("2877")),m=Object(p["a"])(f,s,o,!1,null,"618ca735",null);e["default"]=m.exports},fcb7:function(t,e,i){"use strict";i.d(e,"d",(function(){return o})),i.d(e,"e",(function(){return n})),i.d(e,"c",(function(){return a})),i.d(e,"g",(function(){return r})),i.d(e,"f",(function(){return c})),i.d(e,"a",(function(){return h})),i.d(e,"h",(function(){return l})),i.d(e,"b",(function(){return u}));var s=i("b775");function o(t){return Object(s["a"])({url:"/system/dept/list",method:"get",params:t})}function n(t){return Object(s["a"])({url:"/system/dept/list/exclude/"+t,method:"get"})}function a(t){return Object(s["a"])({url:"/system/dept/"+t,method:"get"})}function r(){return Object(s["a"])({url:"/system/dept/treeselect",method:"get"})}function c(t){return Object(s["a"])({url:"/system/dept/roleDeptTreeselect/"+t,method:"get"})}function h(t){return Object(s["a"])({url:"/system/dept",method:"post",data:t})}function l(t){return Object(s["a"])({url:"/system/dept",method:"put",data:t})}function u(t){return Object(s["a"])({url:"/system/dept/"+t,method:"delete"})}}}]);