123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866 |
- 'use strict';
- var app = angular.module('app', [
- ]);
- app.controller("formeditCtrl", ["$scope", "$http", "$timeout", "$sce", function ($scope, $http, $timeout, $sce) {
- var self = this;
- var s4 = new SM4Util();
- self.userId = $.cookie("GlWorkPlatform-userid");
- self.userName = $.cookie("GlWorkPlatform-chineseName");
- self.get_AccessToken = localStorage.getItem("GlWorkPlatform-AccessToken");
- self.routeid = sp.getUrlName("routeid");
- self.routeinfoid = sp.getUrlName("routeinfoid");
- self.copyrightid = sp.getUrlName("copyrightid");
- self.directionid = sp.getUrlName("directionid");
- self.formeditid = sp.getUrlName("formeditid");
- self.mbid = sp.getUrlName("mbid");
- self.fjid = sp.getUrlName("fjid");
- self.docmode = sp.getUrlName("docmode");
- self.dotype = sp.getUrlName("dotype");
- self.get_lastReturnPageno = sp.getUrlName("lastReturnPageno");
- self.get_lastReturnPage = sp.getUrlName("lastReturnPage");
- self.get_type = sp.getUrlName("type");
- self.return = "../list.html?lastReturnPageno=" + self.get_lastReturnPageno + "&type=" + self.get_type
- self.deviceType = localStorage.getItem("tjJxtGoldenlinkWork-deviceType");
- var postCfg = {
- headers: {
- 'Content-Type': 'application/json',
- 'Authorization': "Bearer " + self.get_AccessToken
- }
- };
- self.FormTitle = $.cookie("GlWorkPlatform-SYSNAME");
- //初始化右上角按钮
- self.buttonList = []
- self.upload_zw = function () {
- var uploadformat = strToJson(s4.decryptData_CBC(apiurljs.uploadformat)).data.map(function (item) {
- return item.CNAME
- })
- $('#fileupload-zw').fileupload({
- url: apiurljs.login + 'g2app/fawenfiles/uploadFileWithForm',
- dataType: 'json',
- beforeSend: function (xhr, data) {
- xhr.setRequestHeader("Authorization", "Bearer " + self.get_AccessToken);
- xhr.setRequestHeader("File-Argument", s4.encryptData_CBC("tablename=FAWEN_FILES,routeinfoid=" + self.routeinfoid + ",gwtype=" + self.data.GWZL + ",dockind=D01"));
- },
- add: function (e, data) {
- var num = 0;
- var acceptFileTypes = eval('/(' + uploadformat.join("|") + ')$/i')
- //文件类型判断
- $.each(data.originalFiles, function (index, item) {
- if (item['type'].length > 0 && !acceptFileTypes.test(item['name'])) {
- sp.dialog("您好,请上传" + uploadformat.join("/") + "格式的文件!");
- return;
- } else {
- num++
- }
- })
- if (num == data.originalFiles.length) {
- self.uploading_zw = true;
- data.submit();
- $scope.$apply();
- }
- },
- // 上传完成后的执行逻辑
- done: function (e, data) {
- self.uploading_zw = false;
- self.getGCG()
- }
- })
- $timeout(function () {
- $("#fileupload-zw").trigger("click")
- }, 1)
- }
- //上层附件、业务参考、共享沟通组件
- self.uploading = false;
- self.upload = function () {
- var uploadformat = strToJson(s4.decryptData_CBC(apiurljs.uploadformat)).data.map(function (item) {
- return item.CNAME
- })
- $('#fileupload').fileupload({
- //url: apiurljs.login + 'g2app/abase/uploadFileWithFormWithSaveRouteinfo',
- url: apiurljs.login + 'g2app/abase/uploadFileWithForm',
- dataType: 'json',
- beforeSend: function (xhr, data) {
- xhr.setRequestHeader("Authorization", "Bearer " + self.get_AccessToken);
- //xhr.setRequestHeader("File-Argument", s4.encryptData_CBC("copyrightid=" + self.copyrightid + ",directionid=" + self.directionid + ",formeditid=" + self.formeditid + ",routeinfoid=" + self.routeinfoid + ",routeid=" + self.routeid + ",tablename=FILE_ATTACH,ATTACHTYPE=专报,data=[{\"ZT\":\"" + self.data.ZT + "\"}]"));
- xhr.setRequestHeader("File-Argument", s4.encryptData_CBC("tablename=FILE_ATTACH,routeinfoid=" + self.routeinfoid + ",ATTACHTYPE=专报"));
- },
- add: function (e, data) {
- var num = 0;
- var acceptFileTypes = eval('/(' + uploadformat.join("|") + ')$/i')
- //文件类型判断
- $.each(data.originalFiles, function (index, item) {
- if (item['type'].length > 0 && !acceptFileTypes.test(item['name'])) {
- sp.dialog("您好,请上传" + uploadformat.join("/") + "格式的文件!");
- return;
- } else {
- num++
- }
- })
- if (num == data.originalFiles.length) {
- self.uploading = true;
- data.submit();
- $scope.$apply();
- }
- },
- // 上传完成后的执行逻辑
- done: function (e, data) {
- self.uploading = false;
- //var res = strToJson(s4.decryptData_CBC(data.result.data));
- //self.data.ID = res.data2.ID;
- //self.routeid = res.data2.ROUTEID;
- //self.routeinfoid = res.data2.ROUTEINFOID;
- //self.getSwenList(0)
- self.getOther()
- }
- })
- }
- self.downLoad = function (item) {
- window.open(apiurljs.login + "g2work/files/" + item.FILEURL.slice(7))
- }
- self.deleteFile = function (file) {
- var dialogHead = "<span class=\"sp-dialog-head\"><span class=\"sp-dialog-tip\">温馨提示</span><span class=\"sp-dialog-close sp-closeDialog\" title=\"关闭\">×</span></span>";
- var dialogBody = "<div class=\"sp-dialog-body\">删除后不可恢复,您确认要删除吗?</div>";
- var dialogFoot = "<div class=\"sp-dialog-foot\"><input id='delDataTrue' type='button' value='确 认' class='sp-dialog-btnTrue' /><input type='button' value='取 消' class='sp-dialog-btnCancle sp-closeDialog' /></div>";
- $('.sp-dialog').html(dialogHead + dialogBody + dialogFoot);
- sp.openCenter(".sp-dialog");
- ///取消按钮
- $('.sp-closeDialog').click(function (event) {
- sp.closeCenter(".sp-dialog");
- event.preventDefault();
- event.stopPropagation();
- });
- //post消息的id
- $("#delDataTrue").click(function () {
- var data = {
- tablename: "FILE_ATTACH",
- id: file.ID
- };
- $http.post(apiurljs.login + "g2app/dataabase/delDataById", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
- .success(function (obj) {
- var res = strToJson(s4.decryptData_CBC(obj.data));
- sp.dialoghide();
- if (res.success) {
- self.getOther();
- } else {
- sp.dialog("删除失败,请联系管理员!");
- }
- });
- });
- }
- self.seeFile = function (obj) {
- self.seeFileItem = obj;
- var set_convertType = 0;
- if (obj.FILEEXT == "doc") {
- set_convertType = 0;
- } else if (obj.FILEEXT == "pdf") {
- set_convertType = 20;
- } else if (obj.FILEEXT == "ofd") {
- set_convertType = 570;
- } else {
- set_convertType = 0;
- }
- let postData = {
- convertType: set_convertType,
- isSignature: 1,
- fileUrl: apiurljs.login + "g2work/files2/inline/" + obj.FILEURL.slice(7)
- };
- var postCfg_transfer = {
- headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
- transformRequest: function (data) {
- return $.param(data);
- }
- };
- $http.post(apiurljs.login.split("glwork/")[0] + "fcscloud/composite/httpfile", postData, postCfg_transfer)
- .success(function (res) {
- if (res.errorcode === 0) {
- //$("#iframe_book").css("height", $(".ibox-content").height() - 103)
- $("#iframe_book").attr("src", res.data.viewUrl)
- } else {
- sp.dialog(res.message);
- }
- });
- }
- self.goAttach = function (obj) {
- if (obj) {
- if (apiurljs.zhType.indexOf(obj.FILEEXT) == -1) {
- sp.dialog("文件暂不支持在线预览,请点击下载查看!")
- return
- }
- $("#attachlist")[0].contentWindow.openFile(obj)
- if ($(".fa-chevron-down").is(":hidden") == true) {
- showToggle(document.getElementById("toggleButton"))
- }
- } else {
- $("#attachlist").attr("src", "attachlist.html?routeinfoid=" + self.routeinfoid)
- }
- }
- self.readonly = {
- JJLB: false,
- FWZH: false,
- WLDQFL: false,
- WLDSSL: false,
- XXGKSH: false,
- SFXYJD: false,
- FLSH: false,
- GPJZSC: false,
- BGSFHYJ: false,
- SX: false,
- BMFZRYJ: false,
- NGR: false,
- NGSJ: false,
- HBCSYJ: false,
- GWZL: false,
- YF: false,
- BT: false,
- ZS: false,
- CS: false,
- USAGE: false
- }
- self.show = {
- JJLB: false,
- FWZH: false,
- WLDQFL: false,
- WLDSSL: false,
- XXGKSH: false,
- SFXYJD: false,
- FLSH: false,
- GPJZSC: false,
- BGSFHYJ: false,
- SX: false,
- BMFZRYJ: false,
- NGR: false,
- NGSJ: false,
- HBCSYJ: false,
- GWZL: false,
- YF: false,
- BT: false,
- ZS: false,
- CS: false,
- USAGE: false
- }
- self.type = 1;
- self.getSwenList = function (n) {
- self.SwenList = [];
- var data = {
- directionid: self.directionid,
- userid: self.userId,
- routeinfoid: self.routeinfoid,
- routeid: self.routeid,
- formeditid: ""
- }
- $http.post(apiurljs.login + "g2app/abase/queryDataLink", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
- .success(function (obj) {
- var res = strToJson(s4.decryptData_CBC(obj.data));
- if (self.copyrightid == "") {
- self.copyrightid = res.data.LINKS[0].COPYRIGHTID
- }
- $.each(res.data.LINKS, function (index, item) {
- item.TEMPFORM = item.TEMPFORM + "&flowid=" + sp.getUrlName("flowid")
- if (item.TEMPFORM.indexOf("formeditZW.html") > -1) {
- self.Title = item.VNAME;
- }
- if (item.TEMPFORM.indexOf("?docmode") > 0) {
- item.TEMPFORM = item.TEMPFORM + "&dotype=" + self.dotype + "&type=" + self.get_type + "&lastReturnPageno=" + self.get_lastReturnPageno + "&lastReturnPage=" + self.get_lastReturnPage;
- } else {
- item.TEMPFORM = "#";
- }
- self.SwenList.push(item)
- })
- self.SwenList.push({
- VNAME: "流程图",
- DIRECTIONID: self.SwenList[0].DIRECTIONID,
- TEMPFORM: "modeler_read.html?" + self.SwenList[0].TEMPFORM.split("?")[1]
- })
- if (n == 0) {
- self.getFLOW()
- } else {
- self.getData()
- }
- })
- }
- self.getSwenList(0)
- self.getFLOW = function () {
- var data = {
- copyrightid: self.copyrightid
- }
- $http.post(apiurljs.login + "g2work/flow/queryDataByCopyrightid", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
- .success(function (obj) {
- var res = strToJson(s4.decryptData_CBC(obj.data));
- self.flowTitle = res.data.CNAME;
- self.getJJLB()
- })
- }
- self.getJJLB = function () {
- var data = {
- ckey: "CODE_JJCD",
- routeinfoid: self.routeinfoid
- }
- $http.post(apiurljs.login + "g2app/abase/queryDataCode", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
- .success(function (obj) {
- var res = strToJson(s4.decryptData_CBC(obj.data));
- self.JJLB = res.data.CODE_JJCD;
- self.getXXGKSH()
- })
- }
- self.getXXGKSH = function () {
- var data = {
- ckey: "CODE_XXGKSH",
- routeinfoid: self.routeinfoid
- }
- $http.post(apiurljs.login + "g2app/abase/queryDataCode", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
- .success(function (obj) {
- var res = strToJson(s4.decryptData_CBC(obj.data));
- self.XXGKSH = res.data.CODE_XXGKSH;
- self.getGWZL()
- })
- }
- self.getGWZL = function () {
- var data = {
- tablename: "CODE_GWTYPE",
- colums: "ID,CODE,CNAME,FLOWID,DOCFILE,REDFILE",
- order: "ID desc",
- sqlwhere: {
- USEMARK: 1,
- FLOWID:sp.getUrlName("flowid")
- },
- sqlinwhere: "",
- sqllikewhere: ""
- }
- $http.post(apiurljs.login + "g2app/dataabase/queryDataByCol", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
- .success(function (obj) {
- var res = strToJson(s4.decryptData_CBC(obj.data));
- console.log('GWZL',res.data)
- self.GWZL = res.data;
- self.getSFXYJD()
- })
- }
- self.getSFXYJD = function () {
- var data = {
- ckey: "CODE_SFXYJD",
- routeinfoid: self.routeinfoid
- }
- $http.post(apiurljs.login + "g2app/abase/queryDataCode", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
- .success(function (obj) {
- var res = strToJson(s4.decryptData_CBC(obj.data));
- self.SFXYJD = res.data.CODE_SFXYJD;
- self.getZDGKLM()
- })
- }
- self.getZDGKLM = function () {
- var data = {
- ckey: "CODE_ZDGKLM",
- routeinfoid: self.routeinfoid
- }
- $http.post(apiurljs.login + "g2app/abase/queryDataCode", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
- .success(function (obj) {
- var res = strToJson(s4.decryptData_CBC(obj.data));
- self.ZDGKLM = res.data.CODE_ZDGKLM;
- self.getZDGKZT()
- })
- }
- self.getZDGKZT = function () {
- var data = {
- ckey: "CODE_ZDGKZT",
- routeinfoid: self.routeinfoid
- }
- $http.post(apiurljs.login + "g2app/abase/queryDataCode", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
- .success(function (obj) {
- var res = strToJson(s4.decryptData_CBC(obj.data));
- self.ZDGKZT = res.data.CODE_ZDGKZT;
- self.getBGSFHYJ()
- })
- }
- self.getBGSFHYJ = function () {
- var data = {
- ckey: "CODE_BGSFHYJ",
- routeinfoid: self.routeinfoid
- }
- $http.post(apiurljs.login + "g2app/abase/queryDataCode", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
- .success(function (obj) {
- var res = strToJson(s4.decryptData_CBC(obj.data));
- self.BGSFHYJ = res.data.CODE_BGSFHYJ;
- self.getUSAGE(0)
- })
- }
- //标签
- self.getUSAGE = function (n) {self.gaoTypeArrayFirst
- var data = {
- ckey: "CODE_SHOUWENLABEL",
- routeinfoid: self.routeinfoid
- }
- $http.post(apiurljs.login + "g2app/abase/queryDataCode", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
- .success(function (obj) {
- var res = strToJson(s4.decryptData_CBC(obj.data));
- self.USAGE = res.data.CODE_SHOUWENLABEL;
- $.each(self.USAGE, function (index, item) {
- item.checked = false;
- })
- if (n == 0) {
- self.getDP()
- }
- if (n == 1) {
- $.each(self.USAGE, function (index, item) {
- if (self.data.USAGE.indexOf(item.CODE) != -1) {
- item.checked = true;
- }
- })
- $timeout(function () {
- $(".sp-checkbox-blue input[name=USAGE]").each(function () {
- if (self.data.USAGE.indexOf($(this).val()) != -1) {
- $(this).attr("checked", true);
- $(this).parent("label").addClass("chb-blue-checked");
- }
- })
- }, 1)
- }
- })
- }
- //管理标签
- self.ManageUSAGE = function (n) {
- self.addUSAGENAME = "";
- var data = {
- tablename: "CODE_SHOUWENLABEL"
- }
- $http.post(apiurljs.login + "g2app/shouwen/queryLabelCode", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
- .success(function (obj) {
- var res = strToJson(s4.decryptData_CBC(obj.data));
- self.USAGELIST = res.data;
- $.each(self.USAGELIST, function (index, item) {
- item.change = false;
- item.CNAME1 = item.CNAME;
- item.USAGE = item.USAGE == 0 ? "隐藏" : "显示";
- })
- if (n == 0) {
- $timeout(function () {
- sp.layer("#USAGE");
- }, 1)
- }
- })
- }
- //新增标签
- self.addUSAGE = function () {
- if (self.addUSAGENAME == "") {
- sp.dialog("标签名称不可为空!");
- return;
- }
- var data = {
- tablename: "CODE_SHOUWENLABEL",
- data: {
- CODE: "C0" + (self.USAGELIST.length + 1),
- CNAME: self.addUSAGENAME,
- USERID: self.userId,
- TABLENAME: "FW_JGDWFW",
- USAGE: "1"
- }
- }
- $http.post(apiurljs.login + "g2app/shouwen/insertCode", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
- .success(function (obj) {
- var res = strToJson(s4.decryptData_CBC(obj.data));
- if (res.success) {
- self.ManageUSAGE(1);
- self.getUSAGE(1);
- } else {
- sp.dialog(res.message);
- }
- })
- }
- //标签排序上下移
- self.btnSort = function ($index, tip) {
- var set_id = "";
- var set_sortid = "";
- if (tip == "上移") {
- var set_index = parseInt($index - 1);
- set_id = self.USAGELIST[set_index].ID;
- set_sortid = self.USAGELIST[set_index].SORTID;
- } else {
- var set_index = parseInt($index + 1);
- set_id = self.USAGELIST[set_index].ID;
- set_sortid = self.USAGELIST[set_index].SORTID;
- }
- var data = {
- tablename: "CODE_SHOUWENLABEL",
- id: self.USAGELIST[$index].ID,
- sortid: self.USAGELIST[$index].SORTID,
- id_other: set_id,
- sortid_other: set_sortid
- };
- $http.post(apiurljs.login + "g2app/shouwen/MoveCode", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
- .success(function (obj) {
- var res = strToJson(s4.decryptData_CBC(obj.data));
- if (res.success) {
- self.ManageUSAGE(1);
- } else {
- sp.dialog(res.message);
- }
- });
- };
- //更新标签
- self.updataUSAGE = function (item, str) {
- if (str == "CNAME") {
- var data = {
- tablename: "FW_JGDWFW",
- code: item.CODE,
- }
- $http.post(apiurljs.login + "g2app/shouwen/querynumCode", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
- .success(function (obj) {
- var res = strToJson(s4.decryptData_CBC(obj.data));
- if (res.success) {
- var data = {
- tablename: "CODE_SHOUWENLABEL",
- id: item.ID,
- data: {
- "cname": item.CNAME1
- }
- }
- $http.post(apiurljs.login + "g2app/shouwen/upCode", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
- .success(function (obj) {
- var res = strToJson(s4.decryptData_CBC(obj.data));
- if (res.success) {
- item.change = false;
- self.ManageUSAGE(1);
- self.getUSAGE(1);
- } else {
- sp.dialog(res.message);
- }
- });
- } else {
- var dialogHead = "<span class=\"sp-dialog-head\"><span class=\"sp-dialog-tip\">温馨提示</span><span class=\"sp-dialog-close sp-closeDialog\" title=\"关闭\">×</span></span>";
- var dialogBody = "<div class=\"sp-dialog-body\">该标签已被使用,您确认要修改吗?</div>";
- var dialogFoot = "<div class=\"sp-dialog-foot\"><input id='upDataTrue' type='button' value='确 认' class='sp-dialog-btnTrue' /><input type='button' value='取 消' class='sp-dialog-btnCancle sp-closeDialog' /></div>";
- $('.sp-dialog').html(dialogHead + dialogBody + dialogFoot);
- sp.openCenter(".sp-dialog");
- $('.sp-closeDialog').click(function (event) {
- sp.dialoghide();
- $timeout(function () {
- item.CNAME1 = item.CNAME;
- }, 1)
- //sp.closeCenter(".sp-dialog");
- event.preventDefault(); event.stopPropagation();
- });
- $("#upDataTrue").click(function () {
- var data = {
- tablename: "CODE_SHOUWENLABEL",
- id: item.ID,
- data: {
- "cname": item.CNAME1
- }
- }
- $http.post(apiurljs.login + "g2app/shouwen/upCode", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
- .success(function (obj) {
- var res = strToJson(s4.decryptData_CBC(obj.data));
- if (res.success) {
- sp.dialoghide();
- item.change = false;
- self.ManageUSAGE(1);
- self.getUSAGE(1);
- } else {
- sp.dialog(res.message);
- }
- });
- });
- }
- })
- } else if (str == "显示") {
- var data = {
- tablename: "CODE_SHOUWENLABEL",
- id: item.ID,
- data: {
- "USAGE": "1"
- }
- }
- $http.post(apiurljs.login + "g2app/shouwen/upCode", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
- .success(function (obj) {
- var res = strToJson(s4.decryptData_CBC(obj.data));
- if (res.success) {
- item.change = false;
- self.ManageUSAGE(1);
- self.getUSAGE(1);
- } else {
- sp.dialog(res.message);
- }
- });
- } else {
- var data = {
- tablename: "CODE_SHOUWENLABEL",
- id: item.ID,
- data: {
- "USAGE": "0"
- }
- }
- $http.post(apiurljs.login + "g2app/shouwen/upCode", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
- .success(function (obj) {
- var res = strToJson(s4.decryptData_CBC(obj.data));
- if (res.success) {
- item.change = false;
- self.ManageUSAGE(1);
- self.getUSAGE(1);
- } else {
- sp.dialog(res.message);
- }
- });
- }
- }
- //删除标签
- self.deleteUSAGE = function (item) {
- var data = {
- tablename: "CODE_SHOUWENLABEL",
- tablename_form: "FW_JGDWFW",
- id: item.ID,
- code: item.CODE
- }
- $http.post(apiurljs.login + "g2app/shouwen/delCode", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
- .success(function (obj) {
- var res = strToJson(s4.decryptData_CBC(obj.data));
- if (res.success) {
- self.ManageUSAGE(1);
- self.getUSAGE(1);
- } else {
- sp.dialog("此标签已被使用");
- }
- });
- }
- self.getDP = function () {
- var data = {
- userid: self.userId
- }
- $http.post(apiurljs.login + "g2app/richang/queryDpInfo", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
- .success(function (obj) {
- var res = strToJson(s4.decryptData_CBC(obj.data));
- self.userDpName = res.data.length == 0 ? "" : res.data[0].SECTION;
- self.userDpCode = res.data.length == 0 ? "" : res.data[0].CODE;
- self.getData();
- })
- }
- //获取数据
- self.getData = function () {
- var data = {
- ckey: "FW_JGDWFW",
- id: 0,
- directionid: self.directionid,
- formeditid: self.formeditid,
- routeid: self.routeid,
- routeinfoid: self.routeinfoid
- }
- $http.post(apiurljs.login + "g2app/abase/queryData", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
- .success(function (obj) {
- var res = strToJson(s4.decryptData_CBC(obj.data));
- self.data = {
- ID: res.data.FW_JGDWFW.ID,
- APPCODE: res.data.FW_JGDWFW.APPCODE,
- WZYFZTZSQ: res.data.FW_JGDWFW.WZYFZTZSQ,
- ZBBMQCR: res.data.FW_JGDWFW.ZBBMQCR == "" ? self.userName : res.data.FW_JGDWFW.ZBBMQCR,
- ZBBMQCRUSERID: res.data.FW_JGDWFW.ZBBMQCRUSERID == "" ? self.userId : res.data.FW_JGDWFW.ZBBMQCRUSERID,
- GWZL: res.data.FW_JGDWFW.GWZL == "" ? self.GWZL[0].CODE : res.data.FW_JGDWFW.GWZL,
- JJLB: res.data.FW_JGDWFW.JJLB == "" ? self.JJLB[0].CODE : res.data.FW_JGDWFW.JJLB,
- JGDWSJYJ: res.data.FW_JGDWFW.JGDWSJYJ ,
- JGDWZZFSJSH: res.data.FW_JGDWFW.JGDWZZFSJSH,
- HQBMFZRSH: res.data.FW_JGDWFW.HQBMFZRSH,
- FWBT: res.data.FW_JGDWFW.FWBT,
- FWZH: res.data.FW_JGDWFW.FWZH,
- YF: res.data.FW_JGDWFW.YF,
- ZTC: res.data.FW_JGDWFW.ZTC,
- F: res.data.FW_JGDWFW.F,
- B: res.data.FW_JGDWFW.B,
- BZ: res.data.FW_JGDWFW.BZ,
- }
- self.readonly = {
- JJLB:res.data.FW_JGDWFW["JJLB.EREADONLY"] == "true",
- WZYFZTZSQ:res.data.FW_JGDWFW["WZYFZTZSQ.EREADONLY"] == "true",
- ZBBMQCR: res.data.FW_JGDWFW["ZBBMQCR.EREADONLY"] == "true",
- GWZL: res.data.FW_JGDWFW["GWZL.EREADONLY"] == "true",
- JGDWSJYJ: res.data.FW_JGDWFW["JGDWSJYJ"] == "true",
- JGDWZZFSJSH: res.data.FW_JGDWFW["JGDWZZFSJSH.EREADONLY"] == "true",
- HQBMFZRSH: res.data.FW_JGDWFW["HQBMFZRSH.EREADONLY"] == "true",
- FWBT: res.data.FW_JGDWFW["FWBT.EREADONLY"] == "true",
- FWZH:res.data.FW_JGDWFW["FWZH.EREADONLY"] == "true",
- YF: res.data.FW_JGDWFW["YF.EREADONLY"] == "true",
- ZTC: res.data.FW_JGDWFW["ZTC.EREADONLY"] == "true",
- F: res.data.FW_JGDWFW["F.EREADONLY"] == "true",
- B: res.data.FW_JGDWFW["B.EREADONLY"] == "true",
- BZ: res.data.FW_JGDWFW["BZ.EREADONLY"] == "true",
- }
- self.show = {
- JJLB:res.data.FW_JGDWFW["JJLB.ESHOW"] == "true",
- WZYFZTZSQ:res.data.FW_JGDWFW["WZYFZTZSQ.ESHOW"] == "true",
- ZBBMQCR: res.data.FW_JGDWFW["ZBBMQCR.ESHOW"] == "true",
- GWZL: res.data.FW_JGDWFW["GWZL.ESHOW"] == "true",
- JGDWSJYJ: res.data.FW_JGDWFW["JGDWSJYJ.ESHOW"] == "true",
- JGDWZZFSJSH: res.data.FW_JGDWFW["JGDWZZFSJSH.ESHOW"] == "true",
- HQBMFZRSH: res.data.FW_JGDWFW["HQBMFZRSH.ESHOW"] == "true",
- FWBT: res.data.FW_JGDWFW["FWBT.ESHOW"] == "true",
- FWZH:res.data.FW_JGDWFW["FWZH.ESHOW"] == "true",
- YF: res.data.FW_JGDWFW["YF.ESHOW"] == "true",
- ZTC: res.data.FW_JGDWFW["ZTC.ESHOW"] == "true",
- F: res.data.FW_JGDWFW["F.ESHOW"] == "true",
- B: res.data.FW_JGDWFW["B"] == "true",
- BZ: res.data.FW_JGDWFW["BZ.ESHOW"] == "true",
-
- }
- self.selectUSAGEs = self.data.USAGE != "" && self.data.USAGE != null ? self.data.USAGE.split(",") : [];
- // $.each(self.USAGE, function (index, item) {
- // if (self.data.USAGE.indexOf(item.CODE) != -1) {
- // item.checked = true;
- // }
- // })
- // $timeout(function () {
- // $(".sp-checkbox-blue input[name=USAGE]").each(function () {
- // if (self.data.USAGE.indexOf($(this).val()) != -1) {
- // $(this).attr("checked", true);
- // $(this).parent("label").addClass("chb-blue-checked");
- // }
- // })
- // }, 0)
- if (self.data.ID == 0) {
- self.filedChange = true;
- } else {
- self.filedChange = false;
- }
- self.buttonList = res.data["FW_JGDWFW.FUNCLIST"];
- self.getOpinion1()
- self.getOther()
- self.getGCG()
- self.getFWZH()
- self.opinionList = [{
- name: "委主要负责通知审签",
- col: "WZYFZTZSQ",
- show: !self.hide("show", "WZYFZTZSQ") && !self.hide("readonly", "WZYFZTZSQ")
- }, {
- name: "机关党委书记意见",
- col: "JGDWSJYJ",
- show: !self.hide("show", "JGDWSJYJ") && !self.hide("readonly", "JGDWSJYJ")
- }, {
- name: "机关党委专职副书记审核",
- col: "JGDWXXFSJSH",
- show: !self.hide("show", "JGDWXXFSJSH") && !self.hide("readonly", "JGDWXXFSJSH")
- }, {
- name: "会签部门负责人审核",
- col: "HQBMFZRSH",
- show: !self.hide("show", "HQBMFZRSH") && !self.hide("readonly", "HQBMFZRSH")
- }]
- self.opinionList1 = [];
- self.opinionList.forEach(function (item) {
- if (item.show == true) {
- self.opinionList1.push(item)
- }
- })
- if (self.opinionList1.length > 0) {
- self.opiniontype = self.opinionList1[0].col;
- }
- })
- }
- self.getFWZH = function () {
- var data = {
- flowid: sp.getUrlName("flowid"),
- code: "",
- cyear: sp.currentYear(),
- routeinfoidmark: self.routeinfoid,
- zihao: self.data.FWZH
- }
- $http.post(apiurljs.login + "g2app/fawen/queryZiHaoCode", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
- .success(function (obj) {
- var res = strToJson(s4.decryptData_CBC(obj.data));
- self.FWZH = res.data.map(function (item) {
- return { CNAME: item.split("|")[0], CODE: item.split("|")[0], CNAMEMARK: item.split("|")[1] }
- });
- if (self.data.FWZH == "") { self.data.FWZH = self.FWZH[0].CODE }
- })
- }
- //转换
- self.Loaling = false;
- self.pdfContent = [];
- self.getContent = function () {
- if (self.Loaling == true) {
- return;
- }
- self.Loaling = true;
- //$("#pdfContent").nextAll("div").addClass("sp-page-loading")
- self.pdfContent = [];
- var data = {
- fileurl: self.seeFileItem.FILEURL
- }
- $http.post(apiurljs.login + "g2app/dataabase/queryPDFContent", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
- .success(function (obj) {
- var res = strToJson(s4.decryptData_CBC(obj.data));
- self.Loaling = false;
- //$("#pdfContent").nextAll("div").removeClass("sp-page-loading")
- for (var i in res.data) {
- self.pdfContent.push({ id: parseInt(i.slice(i.indexOf("_") + 1)), content: res.data[i] })
- }
- self.pdfContent.sort(function (a, b) {
- return a.id - b.id;
- })
- })
- }
- //获取意见(不上表)
- self.getOpinion1 = function () {
- var data = {
- cmanid: self.userId,
- routeinfoid: self.routeinfoid,
- routeid: "",//self.routeid,
- tableid: "FW_JGDWFW",
- colid: "",
- opiniontype: "",//self.opiniontype,
- orderbycol: "CDATE desc"
- }
- $http.post(apiurljs.login + "g2app/abase/queryDataOpinionWithRouteAttach", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
- .success(function (obj) {
- var res = strToJson(s4.decryptData_CBC(obj.data));
- if (res.success == true) {
- self.YJ.nulla = res.data;
- self.YJ.nullaSTATUS = false;
- self.YJ.nulla.forEach(function (item) {
- item.CDATE = sp.datefmt("yyyy-MM-dd", item.CDATE);
- if (self.activeOpinion != null) {
- self.activeOpinion.FILEDATA = item.FILEDATA
- }
- })
- } else {
- sp.dialog(res.message)
- }
- })
- }
- //获取附件和插件
- self.getOther = function () {
- var data = {
- tablename: "FILE_ATTACH",
- colums: "*",
- order: "ID desc",
- sqlwhere: { ROUTEINFOID: self.routeinfoid },
- sqlinwhere: "",
- sqllikewhere: ""
- }
- $http.post(apiurljs.login + "g2app/dataabase/queryDataByCol", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
- .success(function (obj) {
- var res = strToJson(s4.decryptData_CBC(obj.data));
- self.arrayFile1 = [];
- if (res.data.length > 0) {
- res.data.forEach(function (item) {
- if (item.ATTACHTYPE.indexOf("-正文") > -1) {
- self.arrayFile = item;
- self.seeFile(self.arrayFile)
- } else {
- self.arrayFile1.push(item)
- }
- })
- self.goAttach()
- }
- })
- }
- //发文打开过程稿在线编辑
- self.getGCG = function () {
- var data = {
- dockind: "D01",
- routeinfoid: self.routeinfoid
- }
- $http.post(apiurljs.login + "g2app/fawenfiles/queryDataList", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
- .success(function (obj) {
- var res = strToJson(s4.decryptData_CBC(obj.data));
- self.gaoTypeArrayFirst = res.data;
- if (self.gaoTypeArrayFirst.length > 1) {
- var data = {
- id: self.gaoTypeArrayFirst[0].ID
- }
- $http.post(apiurljs.login + "g2app/fawenfiles/deleteDataFile", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
- .success(function (obj) {
- var res = strToJson(s4.decryptData_CBC(obj.data));
- if (res.success) {
- self.getGCG()
- }
- });
- } else if (self.gaoTypeArrayFirst.length > 0) {
- if (self.gaoTypeArrayFirst[0].FILENAMES.split(".").length == 1) {
- self.gaoTypeArrayFirst[0].FILENAMES = self.gaoTypeArrayFirst[0].FILENAMES + "." + self.gaoTypeArrayFirst[0].FILEEXT
- }
- if (self.gaoTypeArrayFirst[0].FILEURL.indexOf("files") > -1) {
- var set_filepath = apiurljs.login + "g2work/files/" + self.gaoTypeArrayFirst[0].FILEURL.slice(7);
- } else {
- var set_filepath = apiurljs.login.split("glwork/")[0] + "glworkweb/" + self.gaoTypeArrayFirst[0].FILEURL;
- }
- self.getFileWo(self.gaoTypeArrayFirst[0].ID, self.gaoTypeArrayFirst[0].FILENAMES, set_filepath);
- }
- console.log(self.gaoTypeArrayFirst)
- })
- }
- //生成正文三种方式:空白模板,红头模板,上传本地文件
- self.newMoBan1 = function () {
- if (self.gaoTypeArrayFirst.length > 0) {
- var data = {
- id: self.gaoTypeArrayFirst[0].ID
- }
- $http.post(apiurljs.login + "g2app/fawenfiles/deleteDataFile", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
- .success(function (obj) {
- var res = strToJson(s4.decryptData_CBC(obj.data));
- if (res.success) {
- var data = {
- dockind: "D01",
- routeinfoid: self.routeinfoid,
- gwtype: self.data.GWZL,
- filekind: "DOCFILE"
- }
- $http.post(apiurljs.login + "g2app/fawenfiles/newDataFile", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
- .success(function (obj) {
- var res = strToJson(s4.decryptData_CBC(obj.data));
- if (res.success) {
- self.getGCG()
- } else {
- sp.dialog("创建失败,请联系管理员!");
- }
- });
- } else {
- sp.dialog("创建失败,请联系管理员!");
- }
- });
- } else {
- var data = {
- dockind: "D01",
- routeinfoid: self.routeinfoid,
- gwtype: self.data.GWZL,
- filekind: "DOCFILE"
- }
- $http.post(apiurljs.login + "g2app/fawenfiles/newDataFile", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
- .success(function (obj) {
- var res = strToJson(s4.decryptData_CBC(obj.data));
- if (res.success) {
- self.getGCG()
- } else {
- sp.dialog("创建失败,请联系管理员!");
- }
- });
- }
- }
- self.newMoBan2 = function () {
- if (self.gaoTypeArrayFirst.length > 0) {
- var data = {
- id: self.gaoTypeArrayFirst[0].ID
- }
- $http.post(apiurljs.login + "g2app/fawenfiles/deleteDataFile", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
- .success(function (obj) {
- var res = strToJson(s4.decryptData_CBC(obj.data));
- if (res.success) {
- var data = {
- dockind: "D01",
- routeinfoid: self.routeinfoid,
- gwtype: self.data.GWZL,
- filekind: "REDFILE"
- }
- $http.post(apiurljs.login + "g2app/fawenfiles/newDataFile", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
- .success(function (obj) {
- var res = strToJson(s4.decryptData_CBC(obj.data));
- if (res.success) {
- self.getGCG()
- } else {
- sp.dialog("创建失败,请联系管理员!");
- }
- });
- } else {
- sp.dialog("创建失败,请联系管理员!");
- }
- });
- } else {
- var data = {
- dockind: "D01",
- routeinfoid: self.routeinfoid,
- gwtype: self.data.GWZL,
- filekind: "REDFILE"
- }
- $http.post(apiurljs.login + "g2app/fawenfiles/newDataFile", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
- .success(function (obj) {
- var res = strToJson(s4.decryptData_CBC(obj.data));
- if (res.success) {
- self.getGCG()
- } else {
- sp.dialog("创建失败,请联系管理员!");
- }
- });
- }
- }
- //套红
- self.toRed = function () {
- var redfile = "";
- self.GWZL.forEach(function (item) {
- if (item.CODE == self.data.GWZL) {
- redfile = item.REDFILE
- }
- })
- var data = {
- method: 30000,
- params: {
- userId: self.userName,
- fileId: self.gaoTypeArrayFirst[0].ID,
- bookmarkName: "hongtou",
- templatePath: "/opt/TongWeb7.0/applications/glworkweb/templates/redfile/" + redfile
- }
- }
- $.ajax({
- url: apiurljs.yzFileWo + "api.do",
- data: {
- jsonParams: encodeURIComponent(JSON.stringify(data))
- },
- type: "POST",
- dataType: "json",
- general: false,
- async: false,
- success: function (data) {
- console.log(data);
- },
- });
- }
- self.browse = function () {
- let postData = {
- convertType: 0,
- bookMark: "",//"hongtou,测试33333",//模板插入
- fileUrl: apiurljs.login.split("glwork/")[0] + "glworkweb/" + self.gaoTypeArrayFirst[0].FILEURL
- };
- var postCfg_transfer = {
- headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
- transformRequest: function (data) {
- return $.param(data);
- }
- };
- $http.post(apiurljs.login.split("glwork/")[0] + "fcscloud/composite/httpfile", postData, postCfg_transfer)
- .success(function (res) {
- console.log(res)
- window.open(res.data.viewUrl)
- })
- }
- self.getFileWo = function (fileid, filename, filepath) {
- var data = {
- method: 1,
- params: {
- userId: self.userName,
- fileId: fileid,
- fileName: filename,
- filePath: filepath,
- userRight: self.dotype == 1 ? 0 : 1,// 用户权限 编辑:UserRightEdit = 0; 只读:UserRightReadonly = 1; 临时只读:UserRightTempReadonly = 2;此时页面上编辑—临时只读按钮,打开只能临时只读,不打开可以进行编辑
- //saveFlag: true, /// true:自动保存文档 false:不自动保存文档 (默认为true)
- callbackUrl: apiurljs.login + "g2app/fawenfiles/uploadFile"
- }
- };
- $.ajax({
- url: apiurljs.yzFileWo + "api.do",
- data: {
- jsonParams: encodeURIComponent(JSON.stringify(data))
- },
- type: "POST",
- dataType: "json",
- general: false,
- async: false,
- success: function (data) {
- console.log(data);
- if (data) {
- if (data.errorCode === "0") {
- let rst = data.result;
- console.log(rst.urls);
- if (rst && rst.urls) {
- var get_urls = rst.urls;
- console.log(get_urls);
- if (typeof (get_urls) === "string") {
- $timeout(function () {
- //$("#iframe_book").css("height", $(".ibox-content").height() - 123)
- $("#iframe_book").attr("src", get_urls)
- })
- } else {
- console.warn("无效的urls:" + get_urls);
- }
- } else {
- console.warn("ajax响应内容data.result有问题:" + rst);
- }
- } else {
- alert(data.errorMessage);
- }
- } else {
- console.warn("ajax响应内容为空!");
- }
- },
- });
- }
- //永中保存
- self.btnSaveYZ = function () {
- ////调用永中保存函数--zyg--**********************************--2023
- var data = {
- method: 2,
- params: {
- fileId: self.gaoTypeArrayFirst[0].ID
- }
- };
- $.ajax({
- url: apiurljs.yzFileWo + "api.do",
- data: {
- jsonParams: encodeURIComponent(JSON.stringify(data))
- },
- type: "POST",
- dataType: "json",
- general: false,
- async: false,
- success: function (data) {
- if (data && data.errorCode === "0") {
- sp.dialog("保存成功");
- }
- },
- });
- }
- //判断页面字段是否只读readonly、是否隐藏show
- self.hide = function (type, field) {
- if (self.dotype == 0 && type == "readonly") {
- return true;
- } else {
- if (self[type][field] == true) {
- return true;
- } else {
- return false;
- }
- }
- }
- //右上角按钮调用方法
- self.btnEvent = function (item) {
- if (item.CODE == "NEWFLOWQB") {
- var data = {
- flowid: "AA65",
- userid: self.userId,
- routeinfoid: self.routeinfoid,
- directionid: self.directionid,
- copyrightid: self.copyrightid
- }
- $http.post(apiurljs.login + "g2app/fawenfiles/createNewWorkFlowWithGwtype", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
- .success(function (obj) {
- var res = strToJson(s4.decryptData_CBC(obj.data));
- console.log(res)
- window.top.sp.addTabNav(item.FUNCID, item.CNAME, "tpl/qianbaomgr/" + res.data.FILEN + "&dotype=1&flowid=AA65")
- $timeout(function () {
- window.top.sp.restoreWorkLayer("#wrapper_tabs_box_col_" + item.FUNCID)
- }, 1000)
- })
- return
- } else if (item.CODE == "NEWFLOWDW") {
- var data = {
- flowid: "AA95",
- userid: self.userId,
- routeinfoid: self.routeinfoid,
- directionid: self.directionid,
- copyrightid: self.copyrightid
- }
- $http.post(apiurljs.login + "g2app/fawenfiles/createNewWorkFlowWithGwtype", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
- .success(function (obj) {
- var res = strToJson(s4.decryptData_CBC(obj.data));
- console.log(res)
- window.top.sp.addTabNav(item.FUNCID, item.CNAME, "tpl/DWHYTCB/" + res.data.FILEN + "&dotype=1&flowid=AA95")
- $timeout(function () {
- window.top.sp.restoreWorkLayer("#wrapper_tabs_box_col_" + item.FUNCID)
- }, 1000)
- })
- return
- } else if (item.CODE == "NEWFLOWXZ") {
- var data = {
- flowid: "AA10",
- userid: self.userId,
- routeinfoid: self.routeinfoid,
- directionid: self.directionid,
- copyrightid: self.copyrightid
- }
- $http.post(apiurljs.login + "g2app/fawenfiles/createNewWorkFlowWithGwtype", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
- .success(function (obj) {
- var res = strToJson(s4.decryptData_CBC(obj.data));
- console.log(res)
- window.top.sp.addTabNav(item.FUNCID, item.CNAME, "tpl/fawenbg/" + res.data.FILEN + "&dotype=1&flowid=AA10")
- $timeout(function () {
- window.top.sp.restoreWorkLayer("#wrapper_tabs_box_col_" + item.FUNCID)
- }, 1000)
- })
- return
- }
- switch (item.CODE) {
- case "SAVEITEM": self.btnSave(0); break;
- case "PRINTITEM": self.btnPrint(); break;
- case "PRINTITEMEXTEND": self.btnPrint1(); break;
- case "MEETITEM": self.Meet(); break;
- case "SENDLOG": self.RouteList(); break;
- default: self.forward(item); break;
- }
- }
- //保存提交
- self.btnSave = function (n) {
- if (spngvld.submit(".formedit")) {
- var dataArray = [];
- dataArray.push(self.data);
- var data = {
- ckey: "FW_JGDWFW",
- id: self.data.ID,
- routeid: self.routeid,
- routeinfoid: self.routeinfoid,
- routeinfotitle: self.data.FWBT.replace(/\n/g, '').replace(/\s/g, ''),//self.data.ZT,
- directionid: self.directionid,
- formeditid: self.formeditid,
- data: JSON.stringify(dataArray)
- }
- $http.post(apiurljs.login + "g2app/abase/saveData", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
- .success(function (obj) {
- var res = strToJson(s4.decryptData_CBC(obj.data));
- if (res.code == 0) {
- self.data.ID = res.data.ID;
- self.routeid = res.data.ROUTEID;
- self.routeinfoid = res.data.ROUTEINFOID;
- self.filedChange = false;
- if (self.gaoTypeArrayFirst.length == 0) {
- var data = {
- dockind: "D01",
- routeinfoid: self.routeinfoid,
- gwtype: self.data.GWZL,
- filekind: "DOCFILE"
- }
- console.log('newDataFile',data)
- $http.post(apiurljs.login + "g2app/fawenfiles/newDataFile", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
- .success(function (obj) {
- var res = strToJson(s4.decryptData_CBC(obj.data));
- if (res.success) {
- if (n == 0) {
- sp.dialog("保存成功!");
- $timeout(function () {
- sp.dialoghide()
- }, 1500)
- self.getSwenList(1)
- } else if (n == 1) {
- self.forward(self.btnItem);
- } else if (n == 2) {
- self.sendAll();
- } else if (n == 3) {
- self.btnPrint();
- }
- } else {
- sp.dialog("文稿创建失败,请联系管理员!");
- }
- });
- } else {
- var YZdata = {
- method: 2,
- params: {
- fileId: self.gaoTypeArrayFirst[0].ID
- }
- };
- $.ajax({
- url: apiurljs.yzFileWo + "api.do",
- data: {
- jsonParams: encodeURIComponent(JSON.stringify(YZdata))
- },
- type: "POST",
- dataType: "json",
- general: false,
- async: false,
- success: function (resp) {
- if (n == 0) {
- sp.dialog("保存成功!");
- $timeout(function () {
- sp.dialoghide()
- }, 1500)
- self.getSwenList(1)
- } else if (n == 1) {
- self.forward(self.btnItem);
- } else if (n == 2) {
- self.sendAll();
- } else if (n == 3) {
- self.btnPrint();
- }
- }
- });
- }
- } else {
- sp.dialog(res.message)
- }
- })
- }
- }
- /*综合打印*/
- self.printFiled = 1;
- self.btnPrint1 = function () {
- if (self.filedChange == true) {
- self.btnSave(3)
- } else {
- sp.layer("#print")
- }
- }
- self.printSubmit = function () {
- if (self.printFiled == 1) {
- var templatefilename = "moban29"
- } else if (self.printFiled == 2) {
- var templatefilename = "mobanoption"
- } else {
- var templatefilename = "moban29_all"
- }
- var data = {
- templatefilename: templatefilename + ".ftl",
- outfilepath: "/tmp/专报" + sp.datefmt('yyyyMMddHHmmss', sp.getLocalDate()) + ".wps",
- routeinfoid: self.routeinfoid,
- tablename: "FW_JGDWFW",
- printtype: self.printFiled,
- printdate: "NGSJ"
- }
- console.log(s4.encryptData_CBC(JSON.stringify(data)))
- $http.post(apiurljs.login + "g2app/dataabase/PrintWordExtend", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
- .success(function (obj) {
- var res = strToJson(s4.decryptData_CBC(obj.data));
- //window.open("../../../printPreview.html?url=" + apiurljs.login + "g2work" + res.data[0].url)
- sp.openNewWindow("../../../printPreview.html?url=" + apiurljs.yzFcscloud + "g2work" + res.data[0].url, '打印预览')
- })
- sp.layerhide()
- }
- //签写意见编辑状态
- self.opinion = {
- WLDQFL: false,
- WLDQFLImg: false,
- WLDSSL: false,
- WLDSSLImg: false,
- FLSH: false,
- FLSHImg: false,
- SX: false,
- SXImg: false,
- GPJZSC: false,
- GPJZSCImg: false,
- BMFZRYJ: false,
- BMFZRYJImg: false,
- HBCSYJ: false,
- HBCSYJImg: false,
- nulla: false
- }
- self.YJ = {
- WLDQFL: false,
- WLDQFLSTATUS: [],
- WLDSSL: false,
- WLDSSLSTATUS: [],
- FLSH: false,
- FLSHSTATUS: [],
- SX: false,
- SXSTATUS: [],
- GPJZSC: false,
- GPJZSCSTATUS: [],
- BMFZRYJ: false,
- BMFZRYJSTATUS: [],
- HBCSYJ: false,
- HBCSYJSTATUS: [],
- nulla: [],
- nullaSTATUS: false
- }
- //意见(下表)
- self.openOptionList = function () {
- if (self.routeinfoid == 0 && self.routeid == 0) {
- sp.dialog("请先保存!")
- return;
- }
- if (self.dotype == 0) {
- return
- }
- if (self.opinion.nulla == true) {
- return;
- }
- self.nulla = "";
- self.opinion.nulla = true;
- }
- self.openOptionList1 = function () {
- self.openOptionList()
- self.activeOpinion = null;
- self.showBottom = "opinion";
- self.YJ.nulla.forEach(function (item) {
- if (item.ROUTEID == self.routeid) {
- self.activeOpinion = item;
- self.nulla = item.OPINION;
- }
- })
- $(".toggle").trigger("click")
- }
- self.closeOptionList = function () {
- self.opinion.nulla = false;
- self.activeOpinion = null;
- $(".toggle").trigger("click")
- }
- self.submitOptionList = function () {
- var data = {
- cmanid: self.userId,
- routeinfoid: self.routeinfoid,
- routeid: self.routeid,
- tableid: "FW_JGDWFW",
- colid: self.opiniontype,
- opiniontype: self.opiniontype == "nulla" ? 99 : 0,
- cresult: "",
- opinion: self.nulla,
- opinionimage: ""
- }
- $http.post(apiurljs.login + "g2app/abase/saveDataOpinion", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
- .success(function (obj) {
- var res = strToJson(s4.decryptData_CBC(obj.data));
- if (res.success == true) {
- self.getOpinion1();
- self.opinion.nulla = false;
- $(".toggle").trigger("click")
- } else {
- sp.dialog(res.message)
- }
- })
- }
- self.changeOptionList = function (item) {
- self.showBottom = "opinion";
- self.opinion.nulla = true;
- self.nulla = item.OPINION;
- self.activeOpinion = item;
- $(".toggle").trigger("click")
- }
- //意见附件(下表)
- self.uploading1 = false;
- self.upload1 = function () {
- $('#fileupload1').fileupload({
- url: apiurljs.login + 'g2app/abase/UploadWholeFileWithRouteAttach',
- dataType: 'json',
- beforeSend: function (xhr, data) {
- xhr.setRequestHeader("Authorization", "Bearer " + self.get_AccessToken);
- xhr.setRequestHeader("File-Argument", s4.encryptData_CBC("tablename=SYS_ROUTE_ATTACHLIST,userid=" + self.userId + ",routeinfoid=" + self.routeinfoid
- + ",routeid=" + self.routeid + ",tableid=FW_JGDWFW,colid=" + self.opiniontype));
- },
- // 上传完成后的执行逻辑
- done: function (e, data) {
- self.uploading1 = false;
- self.getOpinion1()
- }
- })
- }
- //意见附件(下表)
- self.uploading2 = false;
- self.upload2 = function (str) {
- $('#fileupload2').fileupload({
- url: apiurljs.login + 'g2app/abase/UploadWholeFileWithRouteAttach',
- dataType: 'json',
- beforeSend: function (xhr, data) {
- xhr.setRequestHeader("Authorization", "Bearer " + self.get_AccessToken);
- xhr.setRequestHeader("File-Argument", s4.encryptData_CBC("tablename=SYS_ROUTE_ATTACHLIST,userid=" + self.userId + ",routeinfoid=" + self.routeinfoid
- + ",routeid=" + self.routeid + ",tableid=FW_JGDWFW,colid=" + str));
- },
- // 上传完成后的执行逻辑
- done: function (e, data) {
- self.uploading1 = false;
- self.getOpinion1()
- }
- })
- }
- //下载意见表附件
- self.downLoadOption = function (item) {
- window.open(apiurljs.login + "g2work/files/" + item.FILEPATH.slice(7))
- }
- //删除意见表附件
- self.deleteOptionFile = function (file) {
- var data = {
- routeid: file.ROUTEID,
- tableid: "FW_JGDWFW",
- colid: file.COLID,
- fileid: file.FILEID
- };
- $http.post(apiurljs.login + "g2app/abase/deleteDataOpinionWithRouteAttach", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
- .success(function (obj) {
- var res = strToJson(s4.decryptData_CBC(obj.data));
- sp.dialoghide();
- if (res.success) {
- self.getOpinion1();
- } else {
- sp.dialog("删除失败,请联系管理员!");
- }
- });
- }
- //删除意见
- self.Dopinion = function (item) {
- var data = {
- cmanid: self.userId,
- routeid: self.routeid,
- tableid: "FW_JGDWFW",
- colid: item.COLID,
- }
- $http.post(apiurljs.login + "g2app/abase/deleteDataOpinion", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
- .success(function (obj) {
- var res = strToJson(s4.decryptData_CBC(obj.data));
- if (res.success == true) {
- self.getOpinion1();
- self.nulla = "";
- self.activeOpinion = null;
- self.changeFiled(item.COLID)
- } else {
- sp.dialog(res.message)
- }
- })
- }
- self.phraseText = "";//添加常用语
- self.phraseList = []//常用语列表
- //获取常用语库
- self.phrase = function (colid) {
- sp.layer("#phrase");
- self.colid = colid;
- self.getPhrase();
- }
- //添加常用语到常用语库
- self.Aphrase = function () {
- if (self.phraseText == "") {
- return;
- }
- var data = {
- cmanid: self.userId,
- tableid: "FW_JGDWFW",
- colid: self.colid,
- contents: self.phraseText
- }
- $http.post(apiurljs.login + "g2app/abase/insertDataPatterns", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
- .success(function (obj) {
- var res = strToJson(s4.decryptData_CBC(obj.data));
- if (res.success == true) {
- self.phraseText = "";
- self.getPhrase();
- } else {
- sp.dialog(res.message)
- }
- })
- }
- //获取常用语库
- self.getPhrase = function () {
- var data = {
- cmanid: self.userId,
- tableid: "FW_JGDWFW",
- colid: self.colid
- }
- $http.post(apiurljs.login + "g2app/abase/queryDataPatterns", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
- .success(function (obj) {
- var res = strToJson(s4.decryptData_CBC(obj.data));
- self.phraseList = res.data;
- self.phraseSelect = self.phraseList[0].CONTENTS;
- })
- }
- //从常用语库删除
- self.Dphrase = function () {
- var id = null;
- $.each(self.phraseList, function (index, item) {
- if (item.CONTENTS == self.phraseSelect) {
- id = item.ID;
- }
- })
- var data = {
- id: id
- }
- $http.post(apiurljs.login + "g2app/abase/deleteDataPatterns", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
- .success(function (obj) {
- var res = strToJson(s4.decryptData_CBC(obj.data));
- self.getPhrase();
- })
- }
- //常用语确认为意见
- self.btnPhrase = function () {
- self.nulla = self.phraseSelect;
- sp.layerhide();
- }
- self.selectUSAGE = function (item) {
- item.checked = !item.checked;
- self.selectUSAGEs = [];
- $.each(self.USAGE, function (index, item) {
- if (item.checked == true) {
- self.selectUSAGEs.push(item.CODE)
- }
- })
- self.changeFiled('USAGE')
- }
- //发生修改
- self.changeFiled = function (str) {
- self.filedChange = true;
- }
- //转发
- self.forward = function (obj) {
- self.btnItem = obj;
- if (self.filedChange == true) {
- self.btnSave(1)
- } else {
- $("#forwardWin").attr("src", "../../forward/forward.html?routeid=" + self.routeid + "&routeinfoid=" + self.routeinfoid + "©rightid=" + self.copyrightid + "&directionid=" + self.directionid + "&formeditid=" + self.formeditid + "&codefuncbutton=" + obj.CODE + "&directionidtarget=" + obj.DIRECTIONIDTARGET + "&cookie=fawenbg")
- sp.layer("#forward")
- }
- }
- self.openLC = function (n) {
- }
- //查看流转记录
- self.RouteList = function () {
- sp.openNewWindow("../../forward/modeler_read.html?" + self.SwenList[0].TEMPFORM.split("?")[1], "流程图")
- //var data = {
- // directionid: self.directionid,
- // userid: self.userId,
- // routeid: self.routeid,
- // routeinfoid: self.routeinfoid,
- //}
- //$http.post(apiurljs.login + "g2app/abase/queryDataRouteList", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
- //.success(function (obj) {
- // var res = strToJson(s4.decryptData_CBC(obj.data));
- // self.routeList = res.data;
- // $.each(self.routeList, function (index, item) {
- // item.mainUser = [];
- // item.copyUsers = [];
- // $.each(item.USERS, function (index1, item1) {
- // if (item1.KIND == 0) {
- // item.mainUser.push(item1.USERNAME);
- // } else {
- // item.copyUsers.push(item1.USERNAME);
- // }
- // })
- // item.mainUser = item.mainUser.join(",");
- // item.copyUsers = item.copyUsers.join(",");
- // })
- // setTimeout(function (item) {
- // sp.layer("#RouteList");
- // }, 100);
- //})
- }
- ////头部关键字搜索---20230905
- self.headBtnSearchKeyword = "";
- self.headSearchResult = [];
- self.headSearchResult_view = false;
- self.headBtnSearch = function () {
- if (sp.isval(self.headBtnSearchKeyword)) {
- self.headSearchResult = [];
- var data = {
- "url": "/basic/api/StatSelect/selectCodeList",
- "data": { "keyWord": self.headBtnSearchKeyword }
- }
- //console.log(JSON.stringify(data));
- $http.post(apiurljs.login + "g2app/yizhangtu/selectCodeList", { data: s4.encryptData_CBC(JSON.stringify(data)) }, postCfg)
- .success(function (obj) {
- var res = strToJson(s4.decryptData_CBC(obj.data));
- //console.log(JSON.stringify(res.data));
- self.headSearchResult = res.data.build;
- if (sp.isval(self.headSearchResult)) {
- self.headSearchResult_view = true;
- } else {
- self.headSearchResult_view = false;
- }
- })
- } else {
- self.headSearchResult_view = false;
- }
- };
- self.headKeywordPage = function (itemdata) {
- var get_token = localStorage.getItem("main-token");
- var set_url = apiurljs.onePic + "wholeProcessPage/?token=" + get_token + "&name=" + itemdata.name + "&type=" + itemdata.type + "&id=" + itemdata.id;
- $('#attachlist')[0].contentWindow.openTool(set_url, '一张图');
- self.headSearchResult_view = false;
- };
- self.onePic = function () {
- $('#attachlist')[0].contentWindow.openTool(apiurljs.onePic + "wholeProcessPage/?token=" + localStorage.getItem("main-token"), "地图搜索")
- }
- self.reSize = function (n) {
- var leftbox = document.getElementsByClassName("page-item")[n - 1];
- var rightbox = document.getElementsByClassName("page-item")[n];
- var line = document.getElementsByClassName("iframe-border-right")[n - 1];
- document.getElementsByClassName("iframe-border-right")[n - 1].addEventListener("mousedown", function (event) {
- $(".mousemove").show()
- var leftboxW = leftbox.clientWidth;//leftbox.style.width.slice(0, leftbox.style.width.length - 2);
- var rightboxW = rightbox.clientWidth;//rightbox.style.width.slice(0, rightbox.style.width.length - 2);
- var x = event.pageX - line.offsetLeft;
- document.addEventListener("mousemove", boxMove)
- function boxMove(event) {
- if (leftboxW * 1 + (event.pageX - x) * 1 <= 200) {
- //$(".leftBox").children().not(".iframe-border-right").hide()
- } else if (rightboxW * 1 - (event.pageX - x) * 1 <= 200) {
- //$(".rightBox").children().not(".iframe-border-right").hide()
- } else {
- leftbox.style.width = leftboxW * 1 + (event.pageX - x) * 1 + "px";
- leftbox.getElementsByTagName("iframe")[0].style.width = leftboxW * 1 + (event.pageX - x) * 1 - 10 + "px";
- //$(".leftBox").children().not(".iframe-border-right").show()
- rightbox.style.width = rightboxW * 1 - (event.pageX - x) * 1 + "px";
- //rightbox.getElementsByTagName("iframe")[0].style.width = rightboxW * 1 - (event.pageX - x) * 1 - 10 + "px";
- //$(".rightBox").children().not(".iframe-border-right").show()
- }
- }
- document.addEventListener("mouseup", function () {
- $(".mousemove").hide()
- document.removeEventListener("mousemove", boxMove)
- })
- })
- }
- self.reSizeRow = function () {
- var bodybox = document.getElementById("bodyDiv");
- var topbox = document.getElementById("topDiv");
- var bottombox = document.getElementById("bottomDiv");
- var line = document.getElementById("lineDiv");
- document.getElementById("lineDiv").addEventListener("mousedown", function (event) {
- $(".mousemove").show()
- var bodyboxH = bodybox.clientHeight;
- var topboxH = topbox.clientHeight;
- var bottomboxH = bottombox.clientHeight;
- //var y = event.pageY - line.offsetTop;
- var y = event.pageY - line.clientHeight;
- document.addEventListener("mousemove", boxMove)
- function boxMove(event) {
- if (topboxH * 1 + (event.pageY - y) * 1 - 36 <= 45) {
- //
- } else if (bottomboxH * 1 - (event.pageY - y) * 1 - 36 <= 45) {
- //
- } else {
- topbox.style.height = topboxH * 1 + (event.pageY - y) * 1 - 36 + "px";
- topbox.getElementsByTagName("iframe")[0].style.height = topboxH * 1 + (event.pageY - y) * 1 - 45 + "px";
- bottombox.style.height = bodyboxH * 1 - topboxH * 1 - (event.pageY - y) * 1 + 36 - 45 + "px";
- bottombox.getElementsByTagName("iframe")[0].style.height = bodyboxH * 1 - topboxH * 1 - (event.pageY - y) * 1 + 36 - 75 + "px";
- }
- }
- document.addEventListener("mouseup", function () {
- $(".mousemove").hide()
- document.removeEventListener("mousemove", boxMove)
- })
- })
- }
- $scope.closeToggle = function () {
- $timeout(function () {
- self.opinion.nulla = false;
- self.activeOpinion = null;
- })
- }
- //头部下滚冻结
- $(function () {
- //页面高度撑满
- setTimeout(function () {
- $(".formedit").css("height", $(window).height() - 70)
- //$("#iframe_book").css("height", $(window).height() - 135)
- $(".iframe-border-right").css("height", $(window).height() - 34)
- $(".mousemove").css("top", 0).css("left", 0).css("width", $(window).width()).css("height", $(window).height() - 10)
- }, 1)
- })
- }])
- app.directive('treeView', [function () {
- return {
- restrict: 'EA',
- templateUrl: '/treeView.html',
- scope: {
- treeData: '=',///声明数据
- textField: '@',
- itemAdd: '&', ///声明新增变量
- itemEdit: '&',///声明修改变量
- itemCheck: '&',///声明修改变量
- itemDelete: '&',///声明修改变量
- itemUp: '&',
- itemDown: '&'
- },
- controller: ['$scope', function ($scope) {
- $scope.itemExpended = function (item, $event) {
- item.$$isExpend = !item.$$isExpend;
- $event.stopPropagation();
- };
- ///展开折叠图标设置
- $scope.getItemIcon = function (item) {
- var isEnd = $scope.isEnd(item);
- if (isEnd) {
- return 'fa fa-paper-plane-o';
- }
- return item.$$isExpend ? 'fa fa-plus-square-o' : 'fa fa-minus-square-o';
- };
- ///判断是否是最后一级菜单
- $scope.isEnd = function (item) {
- return !item.C_H_I_L_D_DATA || !item.C_H_I_L_D_DATA.length;
- };
- ///事件调用返回
- $scope.warpCallback = function (callback, item, $index, $event) {
- ($scope[callback] || angular.noop)({
- $item: item,
- $index: $index,
- $event: $event
- });
- };
- }]
- };
- }]);
- app.directive("repeatFinish", function () {
- return {
- link: function (scope) {
- if (scope.$last == true) {
- $(".toggle").trigger("click")
- }
- }
- };
- });
- app.directive("spCheckboxBlueItem", function () {
- return {
- restrict: "A",
- link: function (scope, elem, attrs) {
- if (!scope == false) {
- spng.funcheckbox(elem, "chb-blue", "chb-blue-checked"); //蓝色checkbox
- }
- }
- }
- });
- app.filter('trustHtml', function ($sce) {
- return function (input) {
- return $sce.trustAsHtml(input.replace(/\n/g, '<br/>').replace(/\s/g, ' '));
- };
- });
- function showRight(e) {
- if ($(e).children(".fa-angle-left").is(":hidden")) {
- $(".leftBox").css("width", "99.5%");
- $("#iframe_book").css("width", "100%")
- $(".rightBox").css("width", "0%");
- $(".rightBox").hide()
- $(e).children(".fa-angle-left").show()
- $(e).children(".fa-angle-right").hide()
- } else {
- $(".leftBox").css("width", "69.5%");
- $("#iframe_book").css("width", "100%")
- $(".rightBox").css("width", "30%");
- $(".rightBox").show()
- $(e).children(".fa-angle-left").hide()
- $(e).children(".fa-angle-right").show()
- }
- }
- function showToggle(e) {
- $(e).children().toggle()
- $(e).next().toggle()
- }
- function toggleYJL(e) {
- //if ($("#pdfContent").val() == 0) {
- // return
- //}
- if ($(e).children(".fa-angle-double-down").is(":hidden") == true) {
- $(e).parent().css("height", 320)
- } else {
- $(e).parent().css("height", 10)
- angular.element(document.getElementById("app")).scope().closeToggle()
- }
- $(e).children().toggle()
- }
- function toggleForm(e) {
- $(e).children().toggle()
- $(".toggleForm").toggle()
- }
- //文字不可被选中
- document.body.onselectstart = function () {
- return false;
- }
|