(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-daf18d6c"],{1515:function(e,t,s){"use strict";s("97bc")},"36a4":function(e,t,s){"use strict";s.r(t);var i=function(){var e=this,t=e._self._c;return t("div",{staticClass:"ids-broadcasting",staticStyle:{height:"100%",overflow:"auto"}},[t("v-layout",{attrs:{row:"",wrap:""}},[e._l(e.filterOptions,(function(s,i){return[t("div",{key:i,staticStyle:{width:"100%"}},[t("v-flex",{staticClass:"filterTitle",attrs:{flat:"",xs12:""}},[t("div",[t("svg",{staticClass:"blue-block",attrs:{width:"0.7rem",height:"1.4rem"}},[t("rect",{staticStyle:{fill:"rgb(0, 128, 255)"},attrs:{y:"0.1rem",width:"0.7rem",height:"1.2rem"}})]),t("span",[e._v(e._s(s.title))])])]),t("v-flex",{staticClass:"filterOptions",attrs:{flat:"",xs12:""}},e._l(s.buttons,(function(i,a){return t("div",{key:a,class:{filterButton:i,isSelected:e.mIsSelected(i.title),isNotSelected:!e.mIsSelected(i.title)},on:{click:function(t){return e.selectItem(s.title,i)}}},[t("span",[e._v(e._s(i.title))])])})),0),"消息内容"==s.title?t("v-flex",{staticClass:"other-reason",attrs:{flat:"",xs12:""}},[t("div",{staticClass:"other-reason-title"},[t("span",[e._v(e._s("其他消息: "))])]),t("v-text-field",{ref:s.id+"Text",refInFor:!0,class:{"remove-min-height":!0,"hidden-message":e.error[s.id+"Text"]},attrs:{label:"Solo",placeholder:"请输入",solo:"",rules:""===e.msg[s.id+"Selected"]?e.rules:[]},model:{value:e.msg[s.id+"Text"],callback:function(t){e.$set(e.msg,s.id+"Text",t)},expression:"msg[filterOption.id + 'Text']"}})],1):e._e(),"处理方式"==s.title?t("v-flex",{staticClass:"other-reason",attrs:{flat:"",xs12:""}},[t("div",{staticClass:"other-reason-title"},[t("span",[e._v(e._s("其他处理: "))])]),t("v-text-field",{ref:s.id+"Text",refInFor:!0,class:{"remove-min-height":!0,"hidden-message":e.error[s.id+"Text"]},attrs:{label:"Solo",placeholder:"请输入",solo:"",rules:""===e.msg[s.id+"Selected"]?e.rules:[]},model:{value:e.msg[s.id+"Text"],callback:function(t){e.$set(e.msg,s.id+"Text",t)},expression:"msg[filterOption.id + 'Text']"}})],1):e._e(),t("div",{staticStyle:{"margin-top":"0.5rem"}})],1)]}))],2)],1)},a=[],l=s("0af3"),n={message:"消息内容",handles:"处理方式"},r={typhoonWeather:{title:"台风天气",value:"台风天气"},powerOutage:{title:"全厂停电",value:"全厂停电"},holiday:{title:"放假",value:"放假"}},o={cancel:{title:"全体休息",value:"全体休息"},others:{title:"其他方案",value:"其他方案"}},c=[{title:n.message,id:"message",visible:!0,buttons:[r.typhoonWeather,r.powerOutage,r.holiday]},{title:n.handles,id:"handle",visible:!0,buttons:[o.cancel,o.others]}],d=s("0b8b"),u=s("aed0"),h=s("4532"),m={name:"iDS-Broadcasting",components:{},data:function(){return{filterOptions:c,rules:[function(e){return!!e||"以上未选, 其他说明不能为空"},function(e){return e.length<=20||"其他说明不能超过20个字"}],msg:{messageSelected:"",messageText:"",handleSelected:"",handleText:""},error:{messageText:!0,handleText:!0,handleTimeText:!0}}},computed:{height:function(){return"calc(".concat(window.innerHeight,"px - 48px - ").concat(h["a"].vm.getContentBottomHeight()," ")+")"},form:function(){return{messageText:this.msg.messageText,handleText:this.msg.handleText}}},methods:{broadcasting:function(){var e=this;Object.keys(this.form).forEach((function(t){d["a"].log(t),d["a"].log(e.$refs[t]),null!=e.$refs[t]&&(e.$refs[t][0].validate(!0)?e.error[t]=!0:(!0,e.error[t]=!1))}))},mIsSelected:function(e){return this.msg.messageSelected==e||this.msg.handleSelected==e},selectItem:function(e,t){switch(e){case"消息内容":this.msg.messageSelected===t.value?this.msg.messageSelected="":this.msg.messageSelected=t.value;break;case"处理方式":this.msg.handleSelected===t.value||(this.msg.handleSelected=t.value);break}},changeView:function(){h["a"].vm.setTitle("消息广播"),h["a"].vm.setBackDisabled(!1),h["a"].vm.setBackIcon("arrow_back"),h["a"].vm.setBottomNavVisible(!1),h["a"].vm.setBottomBtnVisible(!0);var e=this.addClickEvent(u["a"].getCopy(l["a"]["broadcasting"]));h["a"].vm.setBottomBtn({value:e}),h["a"].vm.setContentHeight({value:"calc(".concat(window.innerHeight,"px - 48px - 36px ")+")"})},addClickEvent:function(e){for(var t in e)switch(e[t].title){case"发送":e[t].func=this.broadcasting;break}return e}},created:function(){null!=h["a"].vm.getUserToken()&&null!=h["a"].vm.getUserId()?this.changeView():window.location.href="/"},mounted:function(){this.selectItem("消息内容",this.filterOptions.filter((function(e){return"消息内容"==e.title}))[0].buttons[0]),this.selectItem("处理方式",this.filterOptions.filter((function(e){return"处理方式"==e.title}))[0].buttons[0])}},f=m,g=(s("1515"),s("2877")),v=Object(g["a"])(f,i,a,!1,null,null,null);t["default"]=v.exports},"97bc":function(e,t,s){}}]);