zhouwx
2024-06-07 a309b65e80f3f21b5ab7c182acb9764f47c677f1
1
2
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-55a8246f"],{"1da1":function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));r("d3b7");function n(e,t,r,n,a,i,o){try{var c=e[i](o),s=c.value}catch(l){return void r(l)}c.done?t(s):Promise.resolve(s).then(n,a)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(a,i){var o=e.apply(t,r);function c(e){n(o,a,i,c,s,"next",e)}function s(e){n(o,a,i,c,s,"throw",e)}c(void 0)}))}}},2532:function(e,t,r){"use strict";var n=r("23e7"),a=r("5a34"),i=r("1d80"),o=r("577e"),c=r("ab13");n({target:"String",proto:!0,forced:!c("includes")},{includes:function(e){return!!~o(i(this)).indexOf(o(a(e)),arguments.length>1?arguments[1]:void 0)}})},"403a":function(e,t,r){"use strict";r("884e")},"4df4":function(e,t,r){"use strict";var n=r("0366"),a=r("7b0b"),i=r("9bdd"),o=r("e95a"),c=r("50c4"),s=r("8418"),l=r("35a1");e.exports=function(e){var t,r,u,f,d,p,h=a(e),m="function"==typeof this?this:Array,v=arguments.length,g=v>1?arguments[1]:void 0,y=void 0!==g,b=l(h),w=0;if(y&&(g=n(g,v>2?arguments[2]:void 0,2)),void 0==b||m==Array&&o(b))for(t=c(h.length),r=new m(t);t>w;w++)p=y?g(h[w],w):h[w],s(r,w,p);else for(f=b.call(h),d=f.next,r=new m;!(u=d.call(f)).done;w++)p=y?i(f,g,[u.value,w],!0):u.value,s(r,w,p);return r.length=w,r}},5530:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));r("b64b"),r("a4d3"),r("4de4"),r("e439"),r("159b"),r("dbb4");function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}},"5a34":function(e,t,r){var n=r("44e7");e.exports=function(e){if(n(e))throw TypeError("The method doesn't accept regular expressions");return e}},"62e45":function(e,t,r){"use strict";r.d(t,"c",(function(){return a})),r.d(t,"h",(function(){return i})),r.d(t,"g",(function(){return o})),r.d(t,"d",(function(){return c})),r.d(t,"b",(function(){return s})),r.d(t,"f",(function(){return l})),r.d(t,"e",(function(){return u})),r.d(t,"a",(function(){return f}));var n=r("4020");function a(e){return Object(n["a"])({url:"/published/warninfo/receive/Page",method:"post",data:e})}function i(e){return Object(n["a"])({url:"/published/warninfo/responseById?id="+e,method:"get"})}function o(e){return Object(n["a"])({url:"/published/warninfo/readById?id="+e,method:"get"})}function c(e){return Object(n["a"])({url:"/published/warninfo/publish/Page",method:"post",data:e})}function s(e){return Object(n["a"])({url:"/published/warninfo/history/publish",method:"post",data:e})}function l(e){return Object(n["a"])({url:"/published/warninfo/history/response",method:"post",data:e})}function u(e){return Object(n["a"])({url:"/published/warninfo/responses/page",method:"post",data:e})}function f(e){return Object(n["a"])({url:"/attachment/delete/"+e,method:"get"})}},"6bab":function(e,t,r){"use strict";r.d(t,"d",(function(){return a})),r.d(t,"e",(function(){return i})),r.d(t,"c",(function(){return o})),r.d(t,"b",(function(){return c})),r.d(t,"f",(function(){return s})),r.d(t,"a",(function(){return l}));var n=r("4020");function a(e){return Object(n["a"])({url:"/warning/info/add",method:"post",data:e})}function i(e){return Object(n["a"])({url:"/warning/info/updateById",method:"post",data:e})}function o(e){return Object(n["a"])({url:"/mesmanager/mes/send",method:"post",data:e})}function c(e){return Object(n["a"])({url:"/mesmanager/mes/page",method:"post",data:e})}function s(e){return Object(n["a"])({url:"/warning/info/publishById?id="+e,method:"get"})}function l(e){return Object(n["a"])({url:"/warning/info/deleteById?id="+e,method:"get"})}},"7db0":function(e,t,r){"use strict";var n=r("23e7"),a=r("b727").find,i=r("44d2"),o="find",c=!0;o in[]&&Array(1)[o]((function(){c=!1})),n({target:"Array",proto:!0,forced:c},{find:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}}),i(o)},8418:function(e,t,r){"use strict";var n=r("a04b"),a=r("9bf2"),i=r("5c6c");e.exports=function(e,t,r){var o=n(t);o in e?a.f(e,o,i(0,r)):e[o]=r}},"884e":function(e,t,r){},"96cf":function(e,t,r){var n=function(e){"use strict";var t,r=Object.prototype,n=r.hasOwnProperty,a="function"===typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",o=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(A){s=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof v?t:v,i=Object.create(a.prototype),o=new T(n||[]);return i._invoke=L(e,r,o),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(A){return{type:"throw",arg:A}}}e.wrap=l;var f="suspendedStart",d="suspendedYield",p="executing",h="completed",m={};function v(){}function g(){}function y(){}var b={};s(b,i,(function(){return this}));var w=Object.getPrototypeOf,x=w&&w(w(U([])));x&&x!==r&&n.call(x,i)&&(b=x);var O=y.prototype=v.prototype=Object.create(b);function j(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(a,i,o,c){var s=u(e[a],e,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"===typeof f&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,o,c)}),(function(e){r("throw",e,o,c)})):t.resolve(f).then((function(e){l.value=e,o(l)}),(function(e){return r("throw",e,o,c)}))}c(s.arg)}var a;function i(e,n){function i(){return new t((function(t,a){r(e,n,t,a)}))}return a=a?a.then(i,i):i()}this._invoke=i}function L(e,t,r){var n=f;return function(a,i){if(n===p)throw new Error("Generator is already running");if(n===h){if("throw"===a)throw i;return E()}r.method=a,r.arg=i;while(1){var o=r.delegate;if(o){var c=_(o,r);if(c){if(c===m)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var s=u(e,t,r);if("normal"===s.type){if(n=r.done?h:d,s.arg===m)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n=h,r.method="throw",r.arg=s.arg)}}}function _(e,r){var n=e.iterator[r.method];if(n===t){if(r.delegate=null,"throw"===r.method){if(e.iterator["return"]&&(r.method="return",r.arg=t,_(e,r),"throw"===r.method))return m;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var a=u(n,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function U(e){if(e){var r=e[i];if(r)return r.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var a=-1,o=function r(){while(++a<e.length)if(n.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}return{next:E}}function E(){return{value:t,done:!0}}return g.prototype=y,s(O,"constructor",y),s(y,"constructor",g),g.displayName=s(y,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,c,"GeneratorFunction")),e.prototype=Object.create(O),e},e.awrap=function(e){return{__await:e}},j(k.prototype),s(k.prototype,o,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,a,i){void 0===i&&(i=Promise);var o=new k(l(t,r,n,a),i);return e.isGeneratorFunction(r)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},j(O),s(O,c,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){while(t.length){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=U,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function a(n,a){return c.type="throw",c.arg=e,r.next=n,a&&(r.method="next",r.arg=t),!!a}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],c=o.completion;if("root"===o.tryLoc)return a("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return a(o.catchLoc,!0);if(this.prev<o.finallyLoc)return a(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return a(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return a(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var i=a;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),I(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;I(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:U(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}(e.exports);try{regeneratorRuntime=n}catch(a){"object"===typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},"9bdd":function(e,t,r){var n=r("825a"),a=r("2a62");e.exports=function(e,t,r,i){try{return i?t(n(r)[0],r[1]):t(r)}catch(o){throw a(e),o}}},"9da9":function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"inner"},[1===e.userInfo.role.id?r("a-alert",{staticStyle:{"margin-bottom":"12px"},attrs:{message:"管理员身份无法进行信息编辑操作",banner:"",closable:"",type:"error"}}):e._e(),r("h2",[e._v("预警信息发布")]),r("a-form-model",{ref:"ruleForm",attrs:{model:e.form,rules:e.rules,"wrapper-col":e.wrapperCol}},[r("div",{staticClass:"left"},[r("a-form-model-item",{attrs:{prop:"title"}},[r("a-input",{staticStyle:{height:"50px","font-size":"20px"},attrs:{placeholder:"请输入标题"},model:{value:e.form.title,callback:function(t){e.$set(e.form,"title",t)},expression:"form.title"}})],1),r("a-row",[r("a-col",{attrs:{span:12}},[r("a-form-model-item",{attrs:{prop:"emergType"}},[r("a-radio-group",{attrs:{"button-style":"solid"},model:{value:e.form.emergType,callback:function(t){e.$set(e.form,"emergType",t)},expression:"form.emergType"}},[r("a-radio-button",{attrs:{value:2}},[e._v(" 常规 ")]),r("a-radio-button",{attrs:{value:1}},[e._v(" 紧临 ")])],1)],1)],1),r("a-col",{staticStyle:{display:"flex","align-items":"center","justify-content":"right"},attrs:{span:12}},[r("a-form-model-item",{staticStyle:{"margin-right":"20px"},attrs:{prop:"disasterType"}},[r("a-select",{staticStyle:{width:"240px"},attrs:{placeholder:"请选择相关灾种",allowClear:""},on:{change:e.handleRisk},model:{value:e.form.disasterType,callback:function(t){e.$set(e.form,"disasterType",t)},expression:"form.disasterType"}},e._l(e.riskOptions,(function(t){return r("a-select-option",{key:t.value,attrs:{value:t.value}},[e._v(" "+e._s(t.name)+" ")])})),1)],1),r("a-form-model-item",{attrs:{prop:"warningLevel"}},[r("a-select",{staticStyle:{width:"240px"},attrs:{placeholder:"请选择预警级别",allowClear:""},on:{change:e.handleLevel},model:{value:e.form.warningLevel,callback:function(t){e.$set(e.form,"warningLevel",t)},expression:"form.warningLevel"}},e._l(e.levelOptions,(function(t){return r("a-select-option",{key:t.value,attrs:{value:t.value}},[e._v(" "+e._s(t.name)+" ")])})),1)],1)],1)],1),r("a-form-model-item",{attrs:{prop:"content"}},[r("a-textarea",{attrs:{placeholder:"请输入短信通知内容部分","auto-size":{minRows:3,maxRows:5}},model:{value:e.form.content,callback:function(t){e.$set(e.form,"content",t)},expression:"form.content"}})],1),1==e.userInfo.unittype?r("a-row",[r("a-col",{staticStyle:{display:"flex","align-items":"center"},attrs:{span:24}},[r("b",{staticStyle:{"margin-bottom":"24px"}},[e._v("直览附件URL:")]),r("a-form-model-item",{staticStyle:{width:"50%"},attrs:{prop:"directViewUrl"}},[r("a-textarea",{attrs:{placeholder:"请输入url信息","auto-size":{minRows:1,maxRows:3}},model:{value:e.form.directViewUrl,callback:function(t){e.$set(e.form,"directViewUrl",t)},expression:"form.directViewUrl"}})],1)],1)],1):e._e(),r("a-row",[r("a-col",{attrs:{span:12}},[r("a-upload",{attrs:{action:e.uploadUrl,"file-list":e.fileList,headers:e.header,accept:".doc, .docx, .word, .pdf, .zip, .xlsx, .rar, .jpg, .jpeg, .png",data:{module:"naturalDisasterPath"},remove:function(t){e.removeFile(t)}},on:{change:e.fileChange}},[r("a-button",[r("a-icon",{attrs:{type:"upload"}}),e._v("上传附件")],1)],1)],1),r("a-col",{staticStyle:{display:"flex","align-items":"center","justify-content":"right"},attrs:{span:12}},[r("b",{staticStyle:{"margin-bottom":"24px"}},[e._v("超时设置:")]),r("a-form-model-item",{attrs:{prop:"timeout"}},[r("a-input",{staticStyle:{width:"200px"},attrs:{placeholder:"输入时间",suffix:"分钟"},model:{value:e.form.timeout,callback:function(t){e.$set(e.form,"timeout",t)},expression:"form.timeout"}})],1)],1)],1),r("span",[r("b",[e._v("发布单位:")]),e._v(e._s(e.form.publishingUnit))]),r("br"),r("br"),r("a-row",{attrs:{gutter:24}},[r("a-col",{attrs:{span:12}},[r("div",{staticStyle:{display:"flex","justify-content":"space-between","align-items":"center"}},[r("b",[e._v("选择接收单位:")]),r("a-checkbox",{attrs:{checked:e.checkAll},on:{change:e.checkChange}},[e._v(" 全选 ")])],1),r("a-form-model-item",{staticStyle:{"margin-bottom":"6px"},attrs:{prop:"receiver"}},[r("a-tree-select",{staticStyle:{width:"100%"},attrs:{"show-search":"",maxTagCount:3,"tree-checkable":"",treeCheckStrictly:"","dropdown-style":{maxHeight:"400px",overflow:"auto"},placeholder:"选择工作通知接收单位","allow-clear":"",multiple:"","tree-data":e.areaUsers,replaceFields:e.replaceFields},on:{change:e.depChanges,search:e.onSearch,select:e.onSelect},model:{value:e.form.receiver,callback:function(t){e.$set(e.form,"receiver",t)},expression:"form.receiver"}})],1)],1),r("a-col",{attrs:{span:12}},[r("div",{staticStyle:{display:"flex","justify-content":"space-between","align-items":"center"}},[r("b",[e._v("平级接收人选择:")]),r("a-checkbox",{attrs:{checked:e.checkSlAll},on:{change:e.checkSlChange}},[e._v(" 全选 ")])],1),r("a-form-model-item",{attrs:{prop:"recipient"}},[r("a-select",{attrs:{mode:"multiple",placeholder:"选择平级接收单位",maxTagCount:3},on:{change:e.handle},model:{value:e.form.recipient,callback:function(t){e.$set(e.form,"recipient",t)},expression:"form.recipient"}},e._l(e.filteredOptions,(function(t){return r("a-select-option",{key:t.id,attrs:{value:t.id}},[e._v(" "+e._s(t.recipientName)+"("+e._s(t.company)+" "+e._s(t.phone)+") ")])})),1)],1)],1)],1),r("a-row",{staticStyle:{display:"flex","align-items":"center"},attrs:{gutter:24}},[r("a-col",{attrs:{span:12}},[r("b",{staticStyle:{"margin-bottom":"6px"}},[e._v("选择审批领导:")]),r("a-form-model-item",{attrs:{prop:"reviewId"}},[r("a-select",{staticStyle:{width:"300px"},attrs:{"show-search":"",placeholder:"请选择审批领导"},model:{value:e.form.reviewId,callback:function(t){e.$set(e.form,"reviewId",t)},expression:"form.reviewId"}},e._l(e.leaders,(function(t,n){return r("a-select-option",{key:n,attrs:{value:t.id}},[e._v(e._s(t.realName))])})),1)],1)],1),r("a-col",{staticStyle:{"text-align":"right"},attrs:{span:12}},[r("a-button",{staticStyle:{width:"250px"},attrs:{type:"primary",disabled:1==e.userInfo.role.id},on:{click:function(t){return e.confirmSend()}}},[e._v(" 确认并提交审核 ")])],1)],1)],1),r("div",{staticClass:"right"},[r("h2",[e._v("短信预览")]),r("div",{staticClass:"mobile"},[r("div",{staticClass:"mesg"},[r("P",[e._v("【自然灾害风险预警提示】"+e._s(e.form.content)),r("br"),e._v("发布单位:"+e._s(e.form.publishingUnit))])],1)])])])],1)},a=[],i=r("2909"),o=r("5530"),c=r("15fd"),s=r("b85c"),l=r("1da1"),u=(r("d81d"),r("b0c0"),r("caad"),r("2532"),r("99af"),r("7db0"),r("4de4"),r("a15b"),r("96cf"),r("c24f")),f=r("2b61"),d=r("852e"),p=r.n(d),h=r("6bab"),m=r("62e45"),v=["realName"],g=["id","name","phone"],y=["id","recipientName","phone","company"],b=["receiver","recipient","id"],w=["id","name","phone","company","realName"],x={name:"notice",data:function(){return{userInfo:{},unittype:null,wrapperCol:{span:24},filteredOptions:[],form:{id:null,title:"",emergType:null,disasterType:void 0,warningLevel:void 0,content:"",directViewUrl:"",publishingUnit:"",districtId:null,attachments:[],timeout:null,reviewId:null,receiver:[],recipient:[],acceptingUnitIds:[],peerRecipientIds:[]},sendLeaders:[],leaders:[],checkAll:!1,checkSlAll:!1,withLeaders:!1,areaUsers:[],replaceFields:{children:"children",title:"name",key:"id",value:"id"},riskOptions:[{name:"地震",value:1},{name:"气象",value:3},{name:"地质灾害",value:4},{name:"水旱",value:5},{name:"森林草原火灾",value:6}],levelOptions:[{name:"红色预警",value:1},{name:"橙色预警",value:2},{name:"黄色预警",value:3},{name:"蓝色预警",value:4}],rules:{emergType:[{required:!0,message:"请选择紧急类型",trigger:"change"}],disasterType:[{required:!0,message:"请选择灾种",trigger:"change"}],warningLevel:[{required:!0,message:"请选择预警级别",trigger:"change"}],title:[{required:!0,message:"请输入信息标题",trigger:"blur"}],content:[{required:!0,message:"请输入信息内容",trigger:"blur"}],timeout:[{required:!0,message:"请输入超时时间",trigger:"blur"}],receiver:[{required:!0,message:"请选择接收单位",trigger:"change"}],reviewId:[{required:!0,message:"请选择审批人",trigger:"change"}]},uploadUrl:"",fileList:[],header:{uid:null,tk:p.a.get("resTk")},delList:[]}},components:{},created:function(){var e=this,t=r("12a9"),n=t.baseUrl;e.uploadUrl=n+"/attachment/upload/detail",e.userInfo=Object(f["b"])(),e.header.uid=e.userInfo.uid,e.form.districtId=e.userInfo.districtId,e.form.publishingUnit=e.userInfo.company,e.getSameLevel(),e.getAreaUsers(),e.getLeaders()},computed:{},methods:{getSameLevel:function(){var e=this;return Object(l["a"])(regeneratorRuntime.mark((function t(){var r,n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return r=e,t.next=3,Object(u["m"])();case 3:n=t.sent,100==n.data.code?n.data.data?r.filteredOptions=n.data.data:console.log("暂无数据"):e.$message.warning(n.data.msg);case 5:case"end":return t.stop()}}),t)})))()},getAreaUsers:function(){var e=this;return Object(l["a"])(regeneratorRuntime.mark((function t(){var r,n,a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return r=e,t.next=3,Object(u["j"])();case 3:n=t.sent,100==n.data.code?n.data.data?(r.userTitTree(n.data.data),a=r.findNodeById(n.data.data,r.userInfo.districtId),r.areaUsers=a.children,r.unittype=a.type):console.log("暂无数据"):e.$message.warning(n.data.msg);case 5:case"end":return t.stop()}}),t)})))()},getLeaders:function(){var e=this;return Object(l["a"])(regeneratorRuntime.mark((function t(){var r,n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return r=e,t.next=3,Object(u["l"])();case 3:n=t.sent,100==n.data.code?n.data.data?r.leaders=n.data.data:console.log("暂无数据"):e.$message.warning(n.data.msg);case 5:case"end":return t.stop()}}),t)})))()},depChanges:function(e,t,r){var n=this;0==n.form.receiver.length&&(n.checkAll=!1)},checkChange:function(e){var t=this;t.checkAll=!t.checkAll,1==t.checkAll?t.form.receiver=t.traverseTree(t.areaUsers):t.form.receiver=[]},handle:function(e){var t=this;t.form.recipient.length==t.filteredOptions.length?t.checkSlAll=!0:t.checkSlAll=!1},checkSlChange:function(e){var t=this;t.checkSlAll=!t.checkSlAll,1==t.checkSlAll?t.form.recipient=t.filteredOptions.map((function(e){return e.id})):t.form.recipient=[]},isAddLeaders:function(e){var t=this;if(t.withLeaders=!t.withLeaders,t.sendLeaders=[],e.target.checked){var r,n=Object(s["a"])(t.leaders);try{for(n.s();!(r=n.n()).done;){var a=r.value,i=(a.realName,Object(c["a"])(a,v)),l=i.id,u=i.name,f=i.phone,d=Object(c["a"])(i,g),p=Object(o["a"])({recipienterId:l,recipienterName:u,recipienterPhone:f,province:null,city:null,area:null,town:null,receiveUnit:t.userInfo.company,unittype:t.userInfo.unittype,roleId:2},d);t.sendLeaders.push(p)}}catch(h){n.e(h)}finally{n.f()}}},fileChange:function(e){var t=this,r=Object(i["a"])(e.fileList);r=r.map((function(r){if(r.uid===e.file.uid&&"done"==r.status&&r.response){var n=r.response;100==n.code?t.$message.success("文件上传成功"):t.$message.error("文件上传失败"),r.url=n.data.fileUrl}return r})),this.fileList=r},removeFile:function(e){this.delList.push(e.response.data.id)},deleteFile:function(){var e=this;return Object(l["a"])(regeneratorRuntime.mark((function t(){var r,n,a,i,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:r=e,n=Object(s["a"])(r.delList),t.prev=2,n.s();case 4:if((a=n.n()).done){t.next=12;break}return i=a.value,t.next=8,Object(m["a"])(i);case 8:o=t.sent,100==o.data.code?console.log("文件删除成功"):r.$message.error(o.data.msg);case 10:t.next=4;break;case 12:t.next=17;break;case 14:t.prev=14,t.t0=t["catch"](2),n.e(t.t0);case 17:return t.prev=17,n.f(),t.finish(17);case 20:case"end":return t.stop()}}),t,null,[[2,14,17,20]])})))()},confirmSend:function(){var e=this;this.$refs.ruleForm.validate((function(t){if(!t)return console.log("error submit!!"),!1;var r;e.form.acceptingUnitIds=[],e.form.peerRecipientIds=[];var n=e.form.receiver.map((function(t){var r;return null===(r=e.findNodeById(e.areaUsers,t.value))||void 0===r?void 0:r.users}));if(n.includes(null))e.$message.error("选择接收单位时存在无用户的单位");else{var a,l=(r=[]).concat.apply(r,Object(i["a"])(n)),u=Object(s["a"])(l);try{for(u.s();!(a=u.n()).done;){var f=a.value,d=f.id,p=f.name,m=f.phone,v=f.company,g=f.realName,x=Object(c["a"])(f,w),O=Object(o["a"])({recipienterId:d,recipienterName:p,recipienterRealName:g,recipienterPhone:m,receiveUnit:v},x);e.form.acceptingUnitIds.push(O)}}catch(R){u.e(R)}finally{u.f()}if(e.form.acceptingUnitIds=[].concat(Object(i["a"])(e.form.acceptingUnitIds),Object(i["a"])(e.sendLeaders)),e.form.recipient.length>0){var j,k=e.form.recipient.map((function(t){return e.filteredOptions.find((function(e){return e.id==t}))})),L=Object(s["a"])(k);try{for(L.s();!(j=L.n()).done;){var _=j.value,S=_.id,I=_.recipientName,T=_.phone,U=_.company,E=Object(c["a"])(_,y),A=Object(o["a"])({recipienterId:S,recipienterName:I,recipienterPhone:T,receiveUnit:U,unittype:e.unittype,recipienterRealName:I},E);e.form.peerRecipientIds.push(A)}}catch(R){L.e(R)}finally{L.f()}}e.form.attachments=e.fileList.map((function(e){return e.response.data.id}));var N=e.form,P=(N.receiver,N.recipient,N.id,Object(c["a"])(N,b));Object(h["d"])(P).then((function(t){100==t.data.code?(e.deleteFile(),e.$message.success("信息已提交审核")):e.$message.error(t.data.msg),e.fileList=[],e.delList=[],e.withLeaders=!1,e.$refs.ruleForm.clearValidate(),e.$refs.ruleForm.resetFields()}))}}))},findNodeById:function(e,t){var r,n=Object(s["a"])(e);try{for(n.s();!(r=n.n()).done;){var a=r.value;if(a.id===t)return a;if(a.children){var i=this.findNodeById(a.children,t);if(i)return i}}}catch(o){n.e(o)}finally{n.f()}return null},traverseTree:function(e){var t=[];function r(e){var n,a=Object(s["a"])(e);try{for(a.s();!(n=a.n()).done;){var i=n.value;i.users&&i.users.length>0&&(t.push({label:i.name,value:i.id}),i.children&&i.children.length>0&&r(i.children))}}catch(o){a.e(o)}finally{a.f()}}return r(e),t},userTitTree:function(e){var t,r=this,n=Object(s["a"])(e);try{var a=function(){var e=t.value;e.users&&(e.users=e.users.filter((function(e){return 3==e.roleId})),e.users=e.users.map((function(t){return Object(o["a"])(Object(o["a"])({},t),{},{unittype:e.type,districtId:e.id})})),e.name=e.name+"("+e.users.map((function(e){return e.realName+" "+e.phone})).join(",")+")"),e.children&&r.userTitTree(e.children)};for(n.s();!(t=n.n()).done;)a()}catch(i){n.e(i)}finally{n.f()}return e},onSearch:function(){var e;(e=console).log.apply(e,arguments)},onSelect:function(){var e;(e=console).log.apply(e,arguments)},handleRisk:function(e){},handleLevel:function(e){}}},O=x,j=(r("403a"),r("2877")),k=Object(j["a"])(O,n,a,!1,null,"1b9c552c",null);t["default"]=k.exports},ab13:function(e,t,r){var n=r("b622"),a=n("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[a]=!1,"/./"[e](t)}catch(n){}}return!1}},b0c0:function(e,t,r){var n=r("83ab"),a=r("9bf2").f,i=Function.prototype,o=i.toString,c=/^\s*function ([^ (]*)/,s="name";n&&!(s in i)&&a(i,s,{configurable:!0,get:function(){try{return o.call(this).match(c)[1]}catch(e){return""}}})},b85c:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));r("a4d3"),r("e01a"),r("d3b7"),r("d28b"),r("3ca3"),r("ddb0");var n=r("06c5");function a(e,t){var r="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Object(n["a"])(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var a=0,i=function(){};return{s:i,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,c=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return c=e.done,e},e:function(e){s=!0,o=e},f:function(){try{c||null==r["return"]||r["return"]()}finally{if(s)throw o}}}}},caad:function(e,t,r){"use strict";var n=r("23e7"),a=r("4d64").includes,i=r("44d2");n({target:"Array",proto:!0},{includes:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}}),i("includes")},d81d:function(e,t,r){"use strict";var n=r("23e7"),a=r("b727").map,i=r("1dde"),o=i("map");n({target:"Array",proto:!0,forced:!o},{map:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}})},dbb4:function(e,t,r){var n=r("23e7"),a=r("83ab"),i=r("56ef"),o=r("fc6a"),c=r("06cf"),s=r("8418");n({target:"Object",stat:!0,sham:!a},{getOwnPropertyDescriptors:function(e){var t,r,n=o(e),a=c.f,l=i(n),u={},f=0;while(l.length>f)r=a(n,t=l[f++]),void 0!==r&&s(u,t,r);return u}})},e439:function(e,t,r){var n=r("23e7"),a=r("d039"),i=r("fc6a"),o=r("06cf").f,c=r("83ab"),s=a((function(){o(1)})),l=!c||s;n({target:"Object",stat:!0,forced:l,sham:!c},{getOwnPropertyDescriptor:function(e,t){return o(i(e),t)}})}}]);
//# sourceMappingURL=chunk-55a8246f.10ae88f9.js.map