(window["webpackJsonp_handday"]=window["webpackJsonp_handday"]||[]).push([["report"],{"02d3":function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"report-broadcast-container",style:{"background-color":t.showIntroduction?"#F7F8FA":"#fff"}},[t.showIntroduction?n("Introduction",{on:{back:function(e){t.showIntroduction=!1}}}):[n("div",{staticClass:"header"},[n("a-alert",{staticClass:"alert",attrs:{type:"info","show-icon":""},scopedSlots:t._u([{key:"message",fn:function(){return[n("span",{staticClass:"info"},[t._v("设置添加企业微信的“群机器人”，支持定时将员工填写的汇报信息播报到企业微信指定群")]),n("span",{staticClass:"intro",on:{click:function(e){t.showIntroduction=!0}}},[t._v("功能介绍")])]},proxy:!0}])}),n("a-button",{staticClass:"add-btn",attrs:{type:"primary",icon:"plus"},on:{click:function(e){return t.handleAdd(null)}}},[t._v("新增播报")])],1),0!==t.officeClerkNum?n("div",{staticClass:"tip-wrap"},[n("div",{staticClass:"top-text"},[n("span",{staticClass:"orange"},[t._v("提醒：")]),t._v("当前有"+t._s(t.officeClerkNum)+"名职员未进行名称同步，会影响企微群播报的汇报显示 ")]),n("a-button",{staticClass:"top-button",attrs:{type:"link"},on:{click:t.onOfficeClerk}},[t._v("同步职员名称")])],1):t._e(),n("div",{staticClass:"table-wrap"},[n("BroadcastTable",{ref:"broadcastTable",on:{update:t.handleAdd}})],1)],n("AddBroadcast",{ref:"addBroadcast",on:{change:t.handleChange}}),n("TransLation",{attrs:{visible:t.translationVisible},on:{"update:visible":[function(e){t.translationVisible=e},t.updateChange]}})],2)},i=[],r=n("5530"),s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("a-modal",{staticClass:"add-broadcast-container",attrs:{width:560,title:t.title,visible:t.visibleModal,"confirm-loading":t.confirmLoading,maskClosable:!1,destroyOnClose:!0,okText:"保存"},on:{cancel:t.handleCancel,ok:t.handleOk}},[a("a-form-model",{directives:[{name:"loading",rawName:"v-loading",value:t.pageLoading,expression:"pageLoading"}],ref:"broadcastForm",staticClass:"broadcast-form",attrs:{model:t.form,"label-col":{span:6},"wrapper-col":{span:18}}},[a("div",{staticClass:"set-title"},[t._v("基础设置")]),a("a-form-model-item",{attrs:{label:"播报名称",colon:!1,required:"",prop:"name",rules:t.getRules("播报名称")}},[a("a-input",{attrs:{placeholder:"请输入",maxLength:100},model:{value:t.form.name,callback:function(e){t.$set(t.form,"name","string"===typeof e?e.trim():e)},expression:"form.name"}})],1),a("a-form-model-item",{attrs:{label:"Webhook地址",colon:!1,required:"",prop:"webhookUrl",rules:t.getRules("Webhook地址","url")}},[a("a-input",{attrs:{placeholder:"请输入",maxLength:200},on:{blur:t.handleUrlChange},model:{value:t.form.webhookUrl,callback:function(e){t.$set(t.form,"webhookUrl","string"===typeof e?e.trim():e)},expression:"form.webhookUrl"}})],1),a("div",{staticClass:"set-title"},[t._v("规则设置")]),a("a-form-model-item",{staticClass:"broadcast-box",attrs:{label:"播报时间",colon:!1,required:"",prop:"broadCastType",rules:t.getRules("播报时间","select")}},[a("a-checkbox-group",{attrs:{options:t.weekEnums},on:{change:t.handleTimeChange},model:{value:t.form.broadCastType,callback:function(e){t.$set(t.form,"broadCastType",e)},expression:"form.broadCastType"}})],1),a("a-form-model-item",{attrs:{label:"汇报提交截止时间",colon:!1,required:"",prop:"reportDeadline",rules:t.getRules("汇报提交截止时间","select")}},[a("a-time-picker",{staticClass:"select-wrapper",attrs:{"value-format":"HH:mm",format:"HH:mm",placeholder:"请选择"},model:{value:t.form.reportDeadline,callback:function(e){t.$set(t.form,"reportDeadline",e)},expression:"form.reportDeadline"}})],1),a("a-form-model-item",{attrs:{label:"汇报群播报时间",colon:!1,required:"",prop:"broadCastTime",rules:t.getRules("汇报群播报时间","select")}},[a("a-time-picker",{staticClass:"select-wrapper",attrs:{"value-format":"HH:mm",format:"HH:mm",placeholder:"请选择"},model:{value:t.form.broadCastTime,callback:function(e){t.$set(t.form,"broadCastTime",e)},expression:"form.broadCastTime"}}),a("div",{staticClass:"desc"},[t._v(" 1. 每天仅播报一次"),a("br"),t._v(" 2. 按时提交：截止时间之前提交；延迟提交：截止时间到群播报时间之间提交；未提交：群播报时间之后提交。 "),a("popover-tips",{attrs:{popoverProps:{destroyTooltipOnHide:!0,overlayStyle:{fontSize:"14px"},placement:"bottom"}},scopedSlots:t._u([{key:"default",fn:function(){return[a("span",{staticClass:"link-text"},[t._v("播报示例")])]},proxy:!0}])},[a("template",{slot:"title"},[t._v("群播报示例")]),a("template",{slot:"content"},[a("img",{staticStyle:{width:"308px",height:"229px"},attrs:{src:n("3095"),alt:""}})])],2)],1)],1),a("a-form-model-item",{attrs:{label:"播报范围",required:"",colon:!1}},[a("a-radio-group",{model:{value:t.form.broadCastRangeType,callback:function(e){t.$set(t.form,"broadCastRangeType",e)},expression:"form.broadCastRangeType"}},[a("a-radio",{attrs:{value:1}},[t._v("全部汇报模板")]),a("a-radio",{attrs:{value:2}},[t._v("指定汇报模板")])],1),a("div",{staticClass:"desc"},[t._v("员工提交的"+t._s(1===t.form.broadCastRangeType?"所有":"指定")+"模板的汇报"+t._s(1===t.form.broadCastRangeType?"都":"才")+"会记为有效提交")]),2===t.form.broadCastRangeType?a("div",{staticClass:"template-wrapper"},[a("ul",{staticClass:"range-box"},[t._l(t.form.broadCastRange,(function(e,n){return a("li",{key:e.businessId},[a("span",{staticClass:"name"},[t._v(t._s(e.templateName))]),a("a-icon",{staticClass:"close-icon",attrs:{type:"close"},on:{click:function(e){return t.deselectMultiple("broadCastRange",n)}}})],1)})),a("li",{staticClass:"dispatch-add link-text",on:{click:t.addItem}},[a("icon-font",{staticClass:"add-icon",attrs:{type:"icon_add_default"}}),t._v("选择指定范围 ")],1)],2)]):t._e()],1),a("a-form-model-item",{attrs:{label:"单独播报员工",colon:!1,prop:"stafferAndDeptList"}},[a("SelectOption",{staticClass:"select-option",attrs:{placeholder:"请选择",isLineClick:"",isOpenData:"",nowrap:"",optionList:t.form.stafferAndDeptList,type:2},on:{click:function(e){t.userVisible=!0},delete:function(e){return t.deselectMultiple("stafferAndDeptList",e)}}},[a("icon-font",{staticClass:"right-icon",attrs:{slot:"icon",type:"icongengduoduocaozuo"},slot:"icon"})],1),a("div",{staticClass:"desc"},[t._v("针对“单个指定员工”提交汇报后，在群里面进行及时消息通知。 "),a("popover-tips",{attrs:{popoverProps:{destroyTooltipOnHide:!0,overlayStyle:{fontSize:"14px",maxWidth:"456px"},placement:"bottom"}},scopedSlots:t._u([{key:"default",fn:function(){return[a("span",{staticClass:"link-text"},[t._v("播报示例")])]},proxy:!0}])},[a("template",{slot:"title"},[t._v("单独播报示例")]),a("template",{slot:"content"},[a("img",{staticStyle:{width:"432px",height:"66px"},attrs:{src:n("8f10"),alt:""}})])],2)],1)],1)],1),a("SelectUser",{attrs:{"data-type":"mix",multiple:"","use-built":"","is-sync":"",search:"init",title:"部门/职员","replace-fields":{children:"children",user:"stafferId",department:"businessId"},maxLength:20,visible:t.userVisible},on:{"update:visible":function(e){t.userVisible=e},ok:t.handleUserConfirm},model:{value:t.form.stafferAndDeptList,callback:function(e){t.$set(t.form,"stafferAndDeptList",e)},expression:"form.stafferAndDeptList"}}),a("SelectReportTemplate",{ref:"selectBroadcastRange",attrs:{title:"选择播报范围",defaultValue:t.form.broadCastRange},on:{confirm:t.confirmBroadcastRange}})],1)},o=[],l=n("c7eb"),c=n("1da1"),d=(n("ac1f"),n("00b4"),n("d9e2"),n("99af"),n("d3b7"),n("159b"),n("d81d"),n("a434"),n("cca6"),function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("a-modal",{staticClass:"select-report-container",attrs:{width:700,title:t.title,visible:t.visibleModal,maskClosable:!1,destroyOnClose:!0,okText:"保存"},on:{cancel:t.handleCancel,ok:t.handleOk}},[n("div",{staticClass:"table-wrap"},[n("div",{staticStyle:{height:"100%"}},[n("v-table",{ref:"VTable",attrs:{vxeProps:{border:!0,"show-overflow":!0,"show-header-overflow":!0,"row-config":{isHover:!0,height:32},"column-config":{resizable:!0}},config:{resizable:!0,ellipsis:!0,emptyColumn:!1},"row-key":t.selectionContent.primaryKey,selectionConfig:t.selectionConfig,"selected-row-keys":t.selectionContent.selectedRowKeys,loading:t.listLoading,dataSource:t.tableData},on:{action:t.tableAction},scopedSlots:t._u([{key:"empty",fn:function(){return[n("Empty",{attrs:{text:"暂无数据"}})]},proxy:!0}])},t._l(t.columns,(function(e){return n("vxe-column",{key:e.field,attrs:{field:e.field,title:e.title,fixed:e.fixed,width:e.width,"title-prefix":e.titleTips},scopedSlots:t._u([{key:"default",fn:function(a){var i=a.row;return[n("span",[t._v(t._s(i[e.field]||"-"))])]}}],null,!0)})})),1)],1)])])}),u=[],f=n("ade3"),p=(n("14d9"),n("b64b"),n("60ae")),m=n("fab5"),h={name:"SelectReportTemplate",mixins:[p["TableSelectionVxe"]],props:{title:{type:String,default:"选择汇报模板"},defaultValue:{type:Array,default:function(){return[]}}},components:{CellEllipsisTip:p["CellEllipsisTip"]},data:function(){return{visibleModal:!1,listLoading:!1}},computed:{},watch:{},mounted:function(){},created:function(){this.setTableConfig({selectionConfig:{selections:!1,type:"checkbox",multiple:!0,selectionLimit:0},selectionContent:{primaryKey:"businessId"}}),this.columns=[{field:"reportTypeName",title:"模板分类",width:85},{field:"templateName",title:"模板名称",width:200},{field:"userScope",title:"可使用人",titleTips:{title:"可使用人",content:"新增汇报时，可使用模板的员工"}}]},methods:{tableAction:p["TableSelectionVxe"].methods.tableAction,open:function(){var t=this;this.visibleModal=!0;var e=this.selectionContent.primaryKey;this.defaultValue.forEach((function(n){t.selectionContent.selectedRowKeys.push(n[e]),t.selectionContent.selectedRows=Object(r["a"])(Object(r["a"])({},t.selectionContent.selectedRows),{},Object(f["a"])({},n[e],n))})),this.getDataList()},getDataList:function(){var t=this;return Object(c["a"])(Object(l["a"])().mark((function e(){var n,a;return Object(l["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,t.listLoading=!0,e.next=4,Object(m["getEnableListCrm"])();case 4:n=e.sent,a=n.data,t.tableData=a||[],t.dealSelectionCheckBox(),e.next=12;break;case 10:e.prev=10,e.t0=e["catch"](0);case 12:return e.prev=12,t.listLoading=!1,e.finish(12);case 15:case"end":return e.stop()}}),e,null,[[0,10,12,15]])})))()},handleOk:function(){var t=[],e=this.selectionContent.selectedRows;Object.keys(e).forEach((function(n){t.push(e[n])})),this.resetData(),this.$emit("confirm",t)},handleCancel:function(){this.resetData()},resetData:function(){this.visibleModal=!1,this.selectionContent.selectedRowKeys=[],this.selectionContent.selectedRows={}}}},g=h,b=(n("91fe"),n("2877")),v=Object(b["a"])(g,d,u,!1,null,"6f06ea1f",null),y=v.exports,C=n("bf6b"),w=n("cfba"),k=n("0f86"),O=function(t,e,n){var a=/^(http|https):\/\//;a.test(e)?n():n(new Error("请输入正确的Webhook地址"))},T={name:"AddBroadcast",components:{SelectOption:C["a"],IconFont:w["default"],SelectReportTemplate:y},data:function(){return{visibleModal:!1,confirmLoading:!1,pageLoading:!1,form:{broadCastRange:[],stafferAndDeptList:[],broadCastTime:"",broadCastType:[],businessId:null,name:"",reportDeadline:"",webhookUrl:"",broadCastRangeType:1},userVisible:!1,title:"新增播报"}},created:function(){this.weekEnums=k["k"]},methods:{getRules:function(t,e){var n=[{required:!0,message:"请".concat("select"===e?"选择":"输入").concat(t),trigger:["change","blur"]},{validator:O,trigger:"blur"}];return"url"===e?n:n[0]},open:function(t){this.visibleModal=!0,t?this.initData(t):this.form.broadCastType=[1,2,3,4,5,6,7]},cancelModal:function(){this.visibleModal=!1,Object.assign(this.$data,this.$options.data())},handleCancel:function(){this.$refs.broadcastForm.resetFields(),this.cancelModal()},initData:function(t){var e=this;return Object(c["a"])(Object(l["a"])().mark((function n(){var a,i;return Object(l["a"])().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.prev=0,e.form.businessId=t,e.title="编辑播报",n.next=5,Object(m["getBroadcastDetail"])({businessId:t});case 5:a=n.sent,i=a.data,i.stafferAndDeptList.forEach((function(t){1===t.objectType?t.stafferId=t.objectId:t.businessId=t.objectId})),e.form=i,n.next=13;break;case 11:n.prev=11,n.t0=n["catch"](0);case 13:case"end":return n.stop()}}),n,null,[[0,11]])})))()},handleTimeChange:function(t,e,n){this.form[t]=n},addItem:function(){this.$refs["selectBroadcastRange"].open()},confirmBroadcastRange:function(t){this.form.broadCastRange=t},handleOk:function(){var t=this;this.$refs.broadcastForm.validate(function(){var e=Object(c["a"])(Object(l["a"])().mark((function e(n){var a,i,s,o,c,d,u,f,p;return Object(l["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(n){e.next=2;break}return e.abrupt("return");case 2:if(a=t.form,i=a.stafferAndDeptList,s=a.broadCastRange,o=a.broadCastRangeType,c=a.broadCastTime,d=a.reportDeadline,!(c<=d)){e.next=5;break}return e.abrupt("return",t.$message.warning("“汇报群播报时间”必须要晚于“汇报提交截止时间”",5));case 5:if(2!==o||s.length){e.next=7;break}return e.abrupt("return",t.$message.warning("指定汇报模板不能为空"));case 7:return u=Object(r["a"])(Object(r["a"])({},t.form),{},{broadCastRange:s.map((function(t){return t.businessId})),stafferAndDeptList:i.map((function(t){return{objectId:t.stafferId||t.businessId,objectType:t.stafferId||t.isStaffer?1:"0"===t.parentId?3:2}}))}),e.prev=8,t.confirmLoading=!0,e.next=12,Object(m["saveBroadcast"])(u);case 12:f=e.sent,p=f.data,p&&(t.$message.success("操作成功"),t.$emit("change"),t.cancelModal()),e.next=19;break;case 17:e.prev=17,e.t0=e["catch"](8);case 19:return e.prev=19,t.confirmLoading=!1,e.finish(19);case 22:case"end":return e.stop()}}),e,null,[[8,17,19,22]])})));return function(t){return e.apply(this,arguments)}}())},handleUserConfirm:function(t){var e=t.selectedList;this.form.stafferAndDeptList=e||[]},deselectMultiple:function(t,e){this.form[t].splice(e,1)}}},I=T,S=(n("cfcc"),Object(b["a"])(I,s,o,!1,null,"6b18a544",null)),j=S.exports,x=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-table",{ref:"VTable",staticClass:"broadcast-table-container",attrs:{loading:t.tableLoading,showIndexColumn:!1,rowKey:"id",config:{ellipsis:!0,emptyColumn:!0},"vxe-props":t.vxeProps,"data-source":t.tableData,onlyHover:""}},[n("vxe-column",{attrs:{type:"seq",width:"56",align:"center",title:"序",fixed:"left"}}),n("vxe-column",{attrs:{field:"actions",title:"操作",static:"static",resizable:!1,width:t.$globalData.actionsWidth,align:"center",fixed:"left"},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.row;return[n("d-table-action",{staticClass:"text-center",attrs:{popoverProps:{placement:"bottomLeft"}}},[n("a-button",{attrs:{type:"link"},on:{click:function(e){return t.handleEdit(a)}}},[t._v("编辑")]),n("a-button",{attrs:{type:"link"},on:{click:function(e){return t.handleDelete(a)}}},[t._v("删除")])],1)]}}])}),n("vxe-column",{attrs:{title:"播报名称",field:"name",width:160}}),n("vxe-column",{attrs:{title:"Webhook地址",field:"webhookUrl",width:160}}),n("vxe-column",{attrs:{title:"播报规则",field:"broadCastRule",width:315}}),n("vxe-column",{attrs:{title:"播报范围",field:"broadCastRangeType",width:100},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.row,i=a.broadCastRangeType,r=a.broadCastRange;return[n("div",{staticClass:"range-box"},[n("span",[t._v(t._s(1===i?"全部范围":"指定范围"))]),1!==i&&r?n("popover-tips",{attrs:{popoverProps:{destroyTooltipOnHide:!0,overlayStyle:{fontSize:"14px",maxWidth:"456px"},placement:"bottom"}},scopedSlots:t._u([{key:"default",fn:function(){return[n("icon-font",{staticClass:"zhakan-icon",attrs:{type:"iconzhakan"}})]},proxy:!0}],null,!0)},[n("template",{slot:"title"},[t._v("指定范围")]),n("template",{slot:"content"},[t._v(" "+t._s(r)+" ")])],2):t._e()],1)]}}])}),n("vxe-column",{attrs:{title:"单独播报员工",field:"stafferAndDeptList",width:150},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.row.stafferAndDeptList;return[a.length?t._l(a,(function(e,i){return n("span",{key:e.stafferId},[e.escapeFlag?n("span",[t._v(t._s(e.name))]):n("OpenData",{attrs:{type:"userName",openid:e.wxUserId,name:e.name,"show-tip":!1}}),i<a.length-1?n("span",[t._v("，")]):t._e()],1)})):n("span",[t._v("-")])]}}])}),n("vxe-column",{attrs:{title:"状态说明",field:"remark",width:150}}),t.showEmptyColumn?n("vxe-column",{attrs:{field:"empty",width:"auto"}}):t._e()],1)},_=[],D=(n("b0c0"),{name:"BroadcastTable",components:{IconFont:w["default"]},props:{},data:function(){return{visibleModal:!1,tableLoading:!1,tableData:[],vxeProps:{columnConfig:{resizable:!0},tooltipConfig:{showAll:!1,enterable:!0},scrollY:{enabled:!0},emptyRender:{name:"emptyData",config:{props:{text:"暂无数据"}}}},showEmptyColumn:!1}},computed:{},watch:{},created:function(){this.loadTableData()},mounted:function(){},methods:{handleEdit:function(t){this.$emit("update",t.businessId)},handleDelete:function(t){var e=this;this.$confirm({title:"确认删除“".concat(t.name,"”的播报吗？"),onOk:function(){Object(m["delBroadcast"])({businessId:t.businessId}).then((function(t){t.data?(e.$message.success("删除成功"),e.loadTableData()):e.$message.success(t.message)}))}})},adaptColumnsReload:function(){var t=this;return Object(c["a"])(Object(l["a"])().mark((function e(){var n,a,i,r;return Object(l["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$nextTick();case 2:n=t.$refs.VTable,a=n.$el.offsetWidth,i=n.getColumns(),r=0,i.forEach((function(t){"auto"!==t.width&&(r+=+t.width)})),t.showEmptyColumn=r<a;case 8:case"end":return e.stop()}}),e)})))()},loadTableData:function(){var t=this;return Object(c["a"])(Object(l["a"])().mark((function e(){var n,a;return Object(l["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.tableLoading=!0,e.prev=1,e.next=4,Object(m["getBroadcastList"])();case 4:n=e.sent,a=n.data,t.tableData=a,e.next=12;break;case 9:e.prev=9,e.t0=e["catch"](1),t.$message.error(e.t0);case 12:return e.prev=12,t.tableLoading=!1,e.finish(12);case 15:case"end":return e.stop()}}),e,null,[[1,9,12,15]])})))()}}}),L=D,$=(n("ef65"),Object(b["a"])(L,x,_,!1,null,"89b521c4",null)),R=$.exports,H=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"introduction-container"},[t._m(0),n("div",{staticClass:"footer"},[n("a-button",{attrs:{type:"primary"},on:{click:function(e){return t.$emit("back")}}},[t._v("返回")])],1)])},A=[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"scroll-wrapper"},[a("div",{staticClass:"introduction"},[a("div",{staticClass:"banner"},[a("img",{attrs:{src:n("f168"),alt:"",width:"133",height:"84"}}),a("div",{staticClass:"info-box"},[a("div",{staticClass:"title"},[a("span",{staticClass:"dot"}),t._v("汇报播报")]),a("div",{staticClass:"info"},[t._v("汇报播报，是将员工每日的工作汇报提交情况定时在企业微信群进行统计播报，方便管理者能够及时检视员工的每日工作结果反馈，及时跟进管理。")])])]),a("div",{staticClass:"set-title"},[t._v("企业微信群 —— 统计播报示例")]),a("img",{attrs:{src:n("f477"),alt:"",width:"588",height:"249"}}),a("div",{staticClass:"set-title margin-top-24"},[t._v("配置说明"),a("span",{staticClass:"info margin-left-8"},[t._v("如何配置企业微信群机器人，定时在群里面播报员工汇报信息？")])]),a("div",{staticClass:"step"},[t._v("第一步：点击群操作图标，选择【添加群机器人】")]),a("img",{attrs:{src:n("a28a"),alt:"",width:"279",height:"288"}}),a("div",{staticClass:"step margin-top-20"},[t._v("第二步：可以【新创建一个机器人】或【选择“已发布的机器人”】")]),a("img",{attrs:{src:n("d46f1"),alt:"",width:"976",height:"506"}})])])}],E={name:"Introduction"},N=E,U=(n("45fe"),Object(b["a"])(N,H,A,!1,null,"23a39180",null)),F=U.exports,M=n("a81c"),P=n("d918"),V=n("5880"),B=n("999c"),z={name:"ReportBroadcast",components:{AddBroadcast:j,BroadcastTable:R,TransLation:M["a"],Introduction:F},props:{},data:function(){return{translationVisible:!1,officeClerkNum:0,isDisable:!1,showIntroduction:!1}},computed:Object(r["a"])({},Object(V["mapGetters"])(["curtUserInfo"])),watch:{},created:function(){var t=this;this.statistics(),this.onOfficeClerk=Object(B["debounce"])((function(){var e=t.curtUserInfo.corpId;Object(P["uploadTranslation"])({corpId:e}).then((function(e){t.translationVisible=!0}))}),500)},beforeDestroy:function(){this.onOfficeClerk.cancel(),this.onOfficeClerk=null},mounted:function(){},methods:{statistics:function(){var t=this,e=this.curtUserInfo.corpId;Object(P["countUnescapes"])({corpId:e}).then((function(e){t.officeClerkNum=e.data}))},handleAdd:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.$refs["addBroadcast"].open(t)},handleChange:function(){this.$refs["broadcastTable"].loadTableData()},updateChange:function(t){this.statistics(),this.translationVisible=!1}}},q=z,Y=(n("5434"),Object(b["a"])(q,a,i,!1,null,"2525285c",null));e["default"]=Y.exports},"0edd":function(t,e,n){"use strict";n("e87e4")},"172d":function(t,e,n){"use strict";n("6436")},"18af":function(t,e,n){},"2d05":function(t,e,n){},"2d7b":function(t,e,n){},3095:function(t,e,n){t.exports=n.p+"fb71d4b4912377bca4fd0dbac512888e.png"},3383:function(t,e,n){!function(e,n){t.exports=n()}(0,(function(){"use strict";function t(t,e){var n,a=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,n)),a}function e(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?t(Object(i),!0).forEach((function(t){a(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):t(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e,n){return(e=function(t){return t=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0===n)return("string"===e?String:Number)(t);if(n=n.call(t,e||"default"),"object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(t,"string"),"symbol"==typeof t?t:String(t)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t){return function(t){if(Array.isArray(t))return s(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||r(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(t,e){var n;if(t)return"string"==typeof t?s(t,e):"Map"===(n="Object"===(n=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(t,e):void 0}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,a=new Array(e);n<e;n++)a[n]=t[n];return a}function o(t,e){return void 0===e?t:Number(Math.round(t+"e"+(e||0))+"e-"+(e||0))}function l(t,e,n){return Array.isArray(t)?t.length?t.reduce((function(t,n){return l(t,n,e)}),0):0:p(0,t,e,n)}function c(t,e){var n=[];if(e)n=t.reduce((function(t,n){return t.map((function(t){return t[e]})).includes(n[e])?t:[].concat(i(t),[n])}),[]);else for(var a=0,r=t.length;a<r;a++)!function(e){0!=e&&n.some((function(n){return m(n,t[e])}))||n.push(t[e])}(a);return n}function d(t,e){return Object.prototype.toString.call(t).slice(8,-1).toLowerCase()===e}function u(t){return h(t)}function f(t,e){for(var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"id",a=3<arguments.length&&void 0!==arguments[3]?arguments[3]:"children",i=4<arguments.length?arguments[4]:void 0,r=0,s=t.length;r<s;r++){var o=t[r];if(i.push(o),o[n]===e)return i;if(o[a]&&o[a].length&&f(o[a],e,n,a="children",i))return i;i.pop()}}var p=function(t,e,n,a){try{i=e.toString().split(".")[1].length}catch(t){i=0}try{r=n.toString().split(".")[1].length}catch(t){r=0}var i=Math.pow(10,Math.max(i,r)),r=[o((Math.round(i*e)+Math.round(i*n))/i,a),o((Math.round(i*e)-Math.round(i*n))/i,a),o(Math.round(i*e)*Math.round(i*n)/(i*i),a),o(Math.round(i*e)/Math.round(i*n),a)];e=String(o(r[t],a||0));return a?e.includes(".")?e.split(".")[0]+"."+e.split(".")[1].padEnd(a,0):(e+".").padEnd((e+".").length+a,0):r[t]},m=function t(e,a){var i,r;return e===a||(e instanceof Date&&a instanceof Date?e.getTime()===a.getTime():!e||!a||"object"!==n(e)&&"object"!==n(a)?e===a:e.prototype===a.prototype&&(i=Object.keys(e)).length===Object.keys(a).length&&(r=function(t){return Object.prototype.toString.call(t).slice(8,-1)},Array.isArray(e)&&Array.isArray(a)&&e.length===a.length||"Object"==r(e)&&"Object"==r(a))&&i.every((function(n){return t(e[n],a[n])})))},h=function(t){var e=[],a=[];return function t(i){if(null===i)return null;if("object"!==n(i))return i;d(i,"array")?r=[]:d(i,"regexp")?(r=new i.constructor(i.source,/\w*$/.exec(i)),i.lastIndex&&(r.lastIndex=i.lastIndex)):r=d(i,"date")?new Date(i.getTime()):(o=Object.getPrototypeOf(i),Object.create(o));var r,s,o=e.indexOf(i);if(-1!==o)return a[o];for(s in e.push(i),a.push(r),i)r[s]=t(i[s]);return r}(t)};return{union:function(t,e,n){return t.concat(e.filter((function(e){return n?!t.map((function(t){return t[n]})).includes(e[n]):!t.includes(e)})))},intersection:function(t,e,n){return t.filter((function(t){return n?e.map((function(t){return t[n]})).includes(t[n]):e.includes(t)}))},archive:function(t,e){return Array.from(new Set(t.map((function(t){return t[e]})))).reduce((function(n,a){return n.push(t.filter((function(t){return t[e]===a}))),n}),[])},arrayFill:function(t,e){return Array(t).fill(e)},arrayToObject:function(t){return Array.from(t.entries()).reduce((function(t,e){return t[e[0]]=e[1],t}),{})},arrayToTree:function t(n){var a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null,i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"pid";return n.filter((function(t){return t[i]===a})).map((function(a){return e(e({},a),{},{children:t(n,a.id,i)})}))},delBy:function(t,e){for(var n=2<arguments.length&&void 0!==arguments[2]&&arguments[2]?t:JSON.parse(JSON.stringify(t)),a=n.length-1;0<=a;a--)if("function"==typeof e)e(n[a])&&n.splice(a,1);else if(Array.isArray(e))-1<e.indexOf(n[a])&&n.splice(a,1);else if(n[a]===e)n.splice(a,1);else if("Object"===Object.prototype.toString.call(e).slice(8,-1)){var i,r=n[a];for(i in e)Array.isArray(e[i])?-1<e[i].indexOf(r[i])&&n.splice(a,1):e[i]===r[i]&&n.splice(a,1)}return n},except:function(t,e,n){return[].concat(i(t),i(e)).filter((function(a){return![t,e].every((function(t){return n?t.map((function(t){return t[n]})).includes(a[n]):t.includes(a)}))}))},exchangePostion:function(t,e,n){return t=3<arguments.length&&void 0!==arguments[3]&&arguments[3]?t:JSON.parse(JSON.stringify(t)),t.splice(e,1,t.splice(n,1,t[e])[0]),t},flatten:function t(e){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1;return e.reduce((function(e,a){return e.concat(1<n&&Array.isArray(a)?t(a,n-1):a)}),[])},group:function(t,e){return i(Array(Math.ceil(t.length/e)).keys()).reduce((function(n,a,r){return[].concat(i(n),[t.slice(r*e,(r+1)*e)])}),[])},indexOfAll:function(t,e,n){return"function"==typeof e?t.reduce((function(t,n,a){return e(n)&&t.push(a),t}),[]):t.reduce((function(t,a,r){return(n?a[e]===n:a===e)?[].concat(i(t),[r]):t}),[])},insetPostion:function(t,e,n){return t=3<arguments.length&&void 0!==arguments[3]&&arguments[3]?t:JSON.parse(JSON.stringify(t)),t.splice(n,0,t.splice(e,1)[0]),t},isRepeat:function(t,e){var n=t.length;try{for(var a=0;a<n;a++)for(var i=a+1;i<n;i++)if(m(t[a],t[i]))return!e||{repeatIndex:a,repeatItem:t[a],isRepeat:!0};return!!e&&{repeatIndex:-1,repeatItem:null,isRepeat:!1}}catch(a){return e?{repeatIndex:-1,repeatItem:null,isRepeat:n!==c(t).length}:n!==c(t).length}},mean:function(t,e){return(e?t.map("function"==typeof e?e:function(t){return t[e]}):t).reduce((function(t,e){return t+ +e}),0)/t.length},range:function(t,e){return Array.from({length:e-t+1},(function(e,n){return n+t}))},rangeRandom:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:1;if(!(3<arguments.length&&void 0!==arguments[3])||arguments[3])return Array.from({length:n},(function(){return Math.floor(Math.random()*(e-t+1))+t}));for(var a=Array.from({length:e-t+1},(function(e,n){return n+t})),i=n>a.length?a.length:n,r=[];r.length!=i;){var s=a[Math.floor(Math.random()*a.length)];r.includes(s)||r.push(s)}return r},rangeScopeStartZore:function(t){return i(Object.keys(t).keys())},rangeStep:function(t,e,n){return Array.from({length:(e-t)/n+1},(function(e,a){return t+a*n}))},sample:function(t){return t[Math.floor(Math.random()*t.length)]},sum:function(t,e){var n="function"==typeof e;return t.reduce((function(t,a){return l(t,n?e(a):e?a[e]||0:a)}),0)},timesTotal:function(t,e,n){return t.reduce((function(t,a){return(n?a[e]===n:a===e)?t+1:t}),0)},unique:c,make:function(t,e,n){return t.reduce((function(t,r){return[].concat(i(t),[a({},r[e],r[n])])}),[])},pick:function(t,n){return t.reduce((function(t,r){return[].concat(i(t),[n.reduce((function(t,n){return e(e({},t),{},a({},n,r[n]))}),{})])}),[])},treeToArray:function t(e){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"children";return(Array.isArray(e)?e:[e]).reduce((function(e,a){return[].concat(i(e),[a],i(t(a[n]||[])))}),[])},queryNode:function(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"id",a=3<arguments.length&&void 0!==arguments[3]?arguments[3]:"children",i=null;return function t(e,r){for(var s=0;s<e.length;s++){if(e[s][n]===r){i=e[s];break}e[s][a]&&e[s][a].length&&t(e[s][a],r)}}(t,e),i},getTreeNode:function t(e,n){for(var a=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"id",i=0,r=e.length;i<r;i++){var s=e[i];if(s[a]===n)return s;if(s.children&&s.children.length&&(s=t(s.children,n,a),s))return s}},arrayGroup:function(t,e){if(1===t.length)return t;for(var n=[],a=0,i=1,r=t.length;i<r;i++){var s=t[i-1],o=t[i];s[e]!==o[e]&&(s=i,n.push(t.slice(a,s)),a=i),i===r-1&&n.push(t.slice(a))}return n},arrayAt:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0;return e<0?t[t.length+e]:t[e]},arrayRepeat:function(t){for(var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,n=0,a=t;n<e;)a=a.concat(t),n++;return a},arraySubstr:function(t,e,n){return t.slice(e,e+n)},delByIndexs:function(t,e){2<arguments.length&&void 0!==arguments[2]&&!arguments[2]||(t=JSON.Parse(JSON.stringify(t))),e=e.sort((function(t,e){return e-t}));for(var n=0;n<e.length;n++)t.splice(e[n],1);return t},findIndexs:function(t,e){for(var n=[],a=0;a<t.length;a++)e(t[a])&&n.push(a);return n},groupArchive:function(t,e){return i(new Set(t.map((function(t){return t[e]})))).reduce((function(n,a){return[].concat(i(n),[t.filter((function(t){return t[e]===a}))])}),[])},groupState:function(t,e){for(var n,a=[],i=0,r=1,s=t.length;r<s;r++)t[r-1][e]!==t[r][e]&&(n=r,a.push(t.slice(i,n)),i=r),r===s-1&&a.push(t.slice(i));return a},lastFind:function(t,e){for(var n=t.length-1;0<=n;n--)if(e(t[n]))return t[n]},lastFindIndex:function(t,e){for(var n=t.length-1;0<=n;n--)if(e(t[n]))return n;return-1},rangeGenerater:function(t,e){return Array.from({length:e-t+1},(function(e,n){return n+t}))},arrayRestore:function(t,e,n){return(t=3<arguments.length&&void 0!==arguments[3]&&arguments[3]?t:u(t)).splice(e,0,t.splice(n,1)[0]),t},getTreePath:function(t,e,n){for(var a=n.idAlias,i=void 0===a?"id":a,r=(a=n.nameAlias,void 0===a?"name":a),s=(a=n.children,void 0===a?"children":a),o=!(3<arguments.length&&void 0!==arguments[3])||arguments[3],l=0,c=t.length;l<c;l++){var d=t[l],u=[];if(d[i]===e)return o?[d[r]]:[d];if(d[s]&&d[s].length&&(f(d[s],e,i,s,u),u.length))return u.unshift(d),o?u.map((function(t){return t[r]})):u}return[]},queryTreeNode:function(t,e,n){for(var a=n.idAlias,i=void 0===a?"id":a,r=(a=n.children,void 0===a?"children":a),s=(t=u(t),Array.isArray(t)?t:[t]);s.length;){var o=s.shift();if(o[i]===e)return o;o[r]&&o[r].length&&o[r].forEach((function(t){s.push(t)}))}},queryTreePath:function t(e,n){var a=2<arguments.length&&void 0!==arguments[2]?arguments[2]:[];if(e){var i,s=function(t,e){var n,a,i,s,o="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(o)return a=!(n=!0),{s:function(){o=o.call(t)},n:function(){var t=o.next();return n=t.done,t},e:function(t){a=!0,i=t},f:function(){try{n||null==o.return||o.return()}finally{if(a)throw i}}};if(Array.isArray(t)||(o=r(t))||e&&t&&"number"==typeof t.length)return o&&(t=o),s=0,{s:e=function(){},n:function(){return s>=t.length?{done:!0}:{done:!1,value:t[s++]}},e:function(t){throw t},f:e};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e=Array.isArray(e)?e:[e]);try{for(s.s();!(i=s.n()).done;){var o=i.value;if(a.push(o),n(o))return a;if(o.children&&o.children.length){var l=t(o.children,n,a);if(l.length)return l}a.pop()}}catch(t){s.e(t)}finally{s.f()}}return[]},uniqueByKeys:function(t,e){return t.reduce((function(t,n,a){return a&&t.find((function(t){return e.every((function(e){return t[e]===n[e]}))}))||t.push(n),t}),[])},getRepeat:function(){return(0<arguments.length&&void 0!==arguments[0]?arguments[0]:[]).reduce((function(t,e,n,a){e=Object.keys(e).sort().reduce((function(t,n){return t[n]=e[n],t}),{});var i=JSON.stringify(e);return t.countMap[i]?t.countMap[i]++:t.countMap[i]=1,n===a.length-1&&(Object.keys(t.countMap).forEach((function(e){return t[1<t.countMap[e]?"repeatArr":"notRepeatArr"].push(JSON.parse(e))})),delete t.countMap),t}),{repeatArr:[],notRepeatArr:[],countMap:{}})}}}))},3803:function(t,e,n){"use strict";n("f48f")},"3e09":function(t,e,n){},4165:function(t,e,n){},"43a9":function(t,e,n){"use strict";n("b6e2")},"45fe":function(t,e,n){"use strict";n("2d05")},5434:function(t,e,n){"use strict";n("cdc4")},"5b0a":function(t,e,n){},6436:function(t,e,n){},7560:function(t,e,n){"use strict";n("5b0a")},"7aa7":function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"params-config-wrap"},[n("ul",{staticClass:"config-list"},t._l(t.configList,(function(e){return n("li",{key:e.key,staticClass:"config-item"},[[n("div",{staticClass:"conf-info"},[n("h3",{staticClass:"conf-title"},[t._v(t._s(e.title))]),n("p",{staticClass:"conf-desc"},[t._v(" "+t._s(e.desc)+" ")])]),n("div",{staticClass:"conf-handler"},[n("a-switch",{staticClass:"conf-switch",attrs:{size:"small"},on:{change:function(n){return t.handlerConfSwitchChange(e)}},model:{value:e.isChecked,callback:function(n){t.$set(e,"isChecked",n)},expression:"confItem.isChecked"}})],1)]],2)})),0)])},i=[],r=n("c7eb"),s=n("1da1"),o=(n("d81d"),n("fab5")),l={name:"PatrolParameter",components:{},data:function(){return{loading:!1,configList:[{title:"拜访计划需要审核",desc:"开启后，新建拜访计划需要审核通过后，才能正式生效",key:14,isChecked:!1,loading:!1}],keyValue:{14:"auditPlan"}}},created:function(){this.getConfInfo()},methods:{getConfInfo:function(){var t=this;return Object(s["a"])(Object(r["a"])().mark((function e(){var n,a;return Object(r["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,t.loading=!0,e.next=4,Object(o["getTemplateSettingCrm"])();case 4:n=e.sent,a=n.data,t.configList=t.configList.map((function(e){return e.isChecked=a[t.keyValue[e.key]],e})),e.next=11;break;case 9:e.prev=9,e.t0=e["catch"](0);case 11:return e.prev=11,t.loading=!1,e.finish(11);case 14:case"end":return e.stop()}}),e,null,[[0,9,11,14]])})))()},handlerConfSwitchChange:function(t){var e=this;return Object(s["a"])(Object(r["a"])().mark((function n(){return Object(r["a"])().wrap((function(n){while(1)switch(n.prev=n.next){case 0:try{t.loading=!0,t.isChecked=!t.isChecked,t.isChecked?e.$confirm({title:"提示",content:"关闭审核后，新增拜访计划不再需要审核，当前待审核的拜访计划可继续完成审核，确定关闭审核吗？",onOk:function(){e.changeConfig(t)},onCancel:function(){}}):e.changeConfig(t)}catch(a){}finally{t.loading=!1}case 1:case"end":return n.stop()}}),n)})))()},changeConfig:function(t){return Object(s["a"])(Object(r["a"])().mark((function e(){var n,a;return Object(r["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(o["updateTemplateSettingCrm"])({configType:t.key,configValue:!t.isChecked});case 2:n=e.sent,a=n.data,a&&(t.isChecked=!t.isChecked);case 5:case"end":return e.stop()}}),e)})))()}}},c=l,d=(n("ff18"),n("2877")),u=Object(d["a"])(c,a,i,!1,null,"763104b4",null);e["default"]=u.exports},"8f10":function(t,e,n){t.exports=n.p+"416ee1fbb5739d166dedad2f629dc6e6.png"},"91fe":function(t,e,n){"use strict";n("4165")},a229:function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"template-container"},[1===t.state?n("div",{staticClass:"template-wrap main"},[n("a-alert",{attrs:{message:"每个员工只有一个日总结、周总结、月总结模板，当可使用人重复时，以最新的为准！",type:"info","show-icon":""}}),n("div",{staticClass:"main-bd"},[n("div",{staticClass:"top-filter-wrap"},[n("a-button",{staticClass:"link-btn",attrs:{type:"link"},on:{click:function(e){t.state=2}}},[t._v("已停用模板"+t._s(t.disabledNum?"("+t.disabledNum+")":""))]),n("a-button",{staticClass:"add-btn",attrs:{type:"primary",icon:"plus"},on:{click:t.addTemplateHandle}},[t._v("新增")])],1),n("template-list",{staticClass:"h-border-table",on:{editTemplate:t.editTemplate,copyTemplate:t.copyTemplate,getDisabledNum:t.getDisabledNum}})],1)],1):2===t.state?n("div",{staticClass:"template-wrap stop"},[n("div",{staticClass:"breadcrumb"},[n("a",{on:{click:function(e){t.state=1}}},[t._v("汇报模板")]),n("span",{staticStyle:{color:"rgba(0, 0, 0, 0.65)"}},[t._v("> 已停用模板")])]),n("template-list",{staticClass:"h-border-table",attrs:{isOutage:""},on:{editTemplate:t.editTemplate,getDisabledNum:t.getDisabledNum}})],1):3===t.state?n("TemplateLayout",{attrs:{provideData:t.provideData,current:t.current,componentsLength:t.componentsLength,confirmLoading:t.confirmLoading},on:{changestate:t.changeState,save:t.saveHandle,backToHome:t.cancelEditHandle}},[n("div",{staticClass:"steps-content",class:{"content-scroll":2!==t.current}},[n("base-setting",{directives:[{name:"show",rawName:"v-show",value:0===t.current,expression:"current === 0"}],ref:"baseSettingRef",on:{change:t.changeData}}),n("form-setting",{directives:[{name:"show",rawName:"v-show",value:1===t.current,expression:"current === 1"}],ref:"formSettingRef",on:{midLength:t.midLength}}),n("process-setting",{directives:[{name:"show",rawName:"v-show",value:2===t.current,expression:"current === 2"}],ref:"processSettingRef"})],1)]):t._e()],1)},i=[],r=n("5530"),s=(n("d3b7"),n("b64b"),n("e9c4"),n("caad"),n("159b"),n("e6cf"),n("a79d"),n("cca6"),n("90b7")),o=n("cfba"),l=n("5306"),c=n("9b24"),d=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"report-container"},[n("v-table",{attrs:{"data-source":t.mainTable.data,loading:t.mainTable.loading,showIndexColumn:!1,config:{sortAble:!t.isOutage,ellipsis:!0,emptyColumn:!1},"sort-config":{unshift:["_action"]},columns:t.columns,rowKey:"businessId",pagination:!1},on:{action:t.tableAction}}),n("select-user",{attrs:{title:"选择可使用人",visible:t.dialogs.workableSelect,"replace-fields":{children:"children",user:"stafferId",department:"businessId"},"data-type":"mix",multiple:"","use-built":"","is-sync":"",search:"init","root-is-select":!0,maxLength:20},on:{"update:visible":function(e){return t.$set(t.dialogs,"workableSelect",e)},ok:function(){var e=[],n=arguments.length;while(n--)e[n]=arguments[n];return t.confirmUser.apply(void 0,e.concat([2]))}},model:{value:t.reportTemplateRanges,callback:function(e){t.reportTemplateRanges=e},expression:"reportTemplateRanges"}})],1)},u=[],f=(n("d81d"),n("b0c0"),n("a4d3"),n("e01a"),n("4e82"),n("7db0"),n("c1df")),p=n.n(f),m=n("60ae"),h={name:"ReportTemplate",data:function(){return{mainTable:{loading:!1,data:[]},currentItem:{},dialogs:{workableSelect:!1},reportTemplateRanges:[],allVisible:!1}},props:{isOutage:Boolean},components:{CellEllipsisTip:m["CellEllipsisTip"],Empty:m["Empty"],IconFont:o["default"],SelectUser:m["SelectUser"]},created:function(){this.getDataList()},computed:{columns:function(){return this.vTableFormatFieldsList([{field:"_action",title:"操作",headerClassName:"vxe-col-header-action",width:52,align:"center"},{field:"reportTypeName",title:"模板分类"},{field:"templateName",title:"模板名称"},{field:"userScope",title:"可使用人",headerClassName:"title-prefix",titlePrefix:{title:"可使用人",content:"新增汇报时，可使用模板的员工"}},{field:"dataCreateTime",title:"创建时间",formatter:"formatDate"},{field:"dataUpdateTime",title:"更新时间",formatter:"formatDate"},{field:"description",title:"模板说明"}])}},methods:{moment:p.a,vTableFormatFieldsList:function(t){var e=this;return t.map((function(t){return t.slots=e.vxeSlots(t.field),t}))},rowClick:function(t,e){this[t.key]&&this[t.key](e)},vxeSlots:function(t){var e=this,n=this.$createElement;switch(t){case"_action":return{default:function(t){var a=t.row;return n("d-table-action",{attrs:{popoverProps:{placement:"bottomLeft"}}},[e.getAction().map((function(t){return n("a-button",{attrs:{type:"link"},on:{click:function(){return e.rowClick(t,a)}}},[t.name])}))])}};case"userScope":return{default:function(t){var a=t.row;t.rowIndex;return n("cell-ellipsis-tip",{attrs:{line:1},class:"user-cell"},[n("span",{class:"user"},[a.userScope||"-"]),n("span",{class:"xiugai-icon"},[n("icon-font",{attrs:{type:"iconxiugai1"},on:{click:function(){return e.selectWorkable(a)}}})])])}};case"reportTypeName":return{default:function(t){var e=t.row;return e.reportTypeName||"-"}};case"templateName":return{default:function(t){var e=t.row;return e.templateName||"-"}};case"description":return{default:function(t){var e=t.row;return e.description||"-"}};default:return}},getAction:function(){return this.isOutage?[{name:"详情",key:"detailHandle"},{name:"启用",key:"enableHandle"},{name:"删除",key:"deleteHandle"}]:[{name:"编辑",key:"editHandle"},{name:"停用",key:"outageHandle"},{name:"复制",key:"copyHandle"}]},editHandle:function(t){this.$emit("editTemplate",t.businessId)},detailHandle:function(t){this.$emit("editTemplate",t.businessId,"disabled")},deleteHandle:function(t){var e=this;this.$confirm({title:"删除汇报模板",width:"480px",content:"确定要删除【".concat(t.templateName,"】模板吗？"),onOk:function(){var n={businessId:t.businessId};e.$api.deleteTemplateCrm(n).then((function(t){var n=t.code,a=t.message;"SYS_0000"===n?(e.$emit("getDisabledNum"),e.$message.info("已删除"),e.getDataList()):e.$message.error(a)}))}})},enableHandle:function(t){var e=this;this.mainTable.loading=!0,this.$api.updateTemplateEnableCrm({businessId:t.businessId}).then((function(t){var n=t.code,a=t.message;"SYS_0000"===n?(e.$emit("getDisabledNum"),e.getDataList(),e.$message.success("模板已启用")):e.$message.error(a)})).catch((function(t){e.$message.error(t)})).finally((function(){e.mainTable.loading=!1}))},copyHandle:function(t){this.$emit("copyTemplate",t.businessId)},outageHandle:function(t){var e=this;this.mainTable.loading=!0,this.$api.updateTemplateDisableCrm({businessId:t.businessId}).then((function(t){var n=t.code,a=t.message;"SYS_0000"===n?(e.$emit("getDisabledNum"),e.getDataList(),e.$message.success("模板已停用")):e.$message.error(a)})).catch((function(t){e.$message.error(t)})).finally((function(){e.mainTable.loading=!1}))},getDataList:function(t){var e=this;this.mainTable.loading=!0;var n=this.isOutage?"getDisableListCrm":"getEnableListCrm";this.$api[n]().then((function(n){var a=n.code,i=n.message,r=n.data;e.mainTable.loading=!1,"SYS_0000"===a?Array.isArray(r)?(e.mainTable.data=r.map((function(t){return t.id=t.businessId,t.sort=t.sortOrder,t})),t&&t()):e.mainTable.data=[]:e.$message.error(i)})).finally((function(){e.mainTable.loading=!1}))},handleDraggable:function(t){var e=this,n=t.map((function(t,n){return{businessId:t,sortOrder:e.mainTable.data[n].sortOrder}}));this.$api.sortTemplateCrm({list:n}).then((function(t){var a=t.code,i=(t.data,t.message);"SYS_0000"===a?n.forEach((function(t){var n=e.mainTable.data.find((function(e){return e.businessId===t.businessId}));n.sortOrder=t.sortOrder})):(e.getDataList(),e.$message.error(i))}))},clickConfirm:function(){var t=this;this.getDataList((function(){t.$nextTick((function(){var t=document.querySelectorAll(".ant-table-tbody>tr");t[t.length-1].scrollIntoView({behavior:"smooth"})}))}))},selectWorkable:function(t){var e=this;this.mainTable.loading=!0,this.currentItem=t,this.$api.getTemplateScope({businessId:t.businessId}).then((function(t){var n=t.code,a=t.message,i=t.data;e.mainTable.loading=!1,"SYS_0000"===n?(e.reportTemplateRanges=i.reportTemplateRanges&&i.reportTemplateRanges.map((function(t){var n=Object(s["deepClone"])(t);return 1===t.objectType?(e.$set(n,"stafferId",t.objectId),n):2===t.objectType?(e.$set(n,"businessId",t.objectId),n):3===t.objectType?(e.$set(n,"businessId",t.objectId),e.$set(n,"parentId","0"),n):void 0})),e.dialogs.workableSelect=!0):e.$message.error(a)})).finally((function(){e.mainTable.loading=!1}))},confirmUser:function(t){var e=this,n=t.selectedList,a=n.length&&n.find((function(t){return"0"===t.parentId}));this.reportTemplateRanges=n,n.length?this.allVisible=!!a:this.allVisible=!0,n&&n.length&&(this.reportTemplateRanges=n.map((function(t){return{objectId:t.objectId?t.objectId:t.selectId,objectType:t.objectId?t.objectType:t.stafferId?1:"0"===t.parentId?3:2}})));var i={allVisible:this.allVisible,businessId:this.currentItem.businessId,reportTemplateRanges:this.reportTemplateRanges};this.$api.updateTemplateScope(i).then((function(t){var n=t.code,a=t.message;t.data;"SYS_0000"===n?(e.dialogs.workableSelect=!1,e.getDataList()):e.$message.error(a)}))},tableAction:function(t){var e=t.action,n=t.data;switch(e){case"draggable":this.handleDraggable(n);break;default:}}}},g=h,b=(n("0edd"),n("2877")),v=Object(b["a"])(g,d,u,!1,null,"26a86860",null),y=v.exports,C=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.copyTarget?n("div",{staticClass:"process-design"},[t._e(),n("div",{staticClass:"drawer-content"},[n("div",{staticClass:"default-wrap"},[n("div",{staticClass:"default-title"},[t._v("默认抄送人")]),n("div",{staticClass:"default-person"},[n("a-checkbox",{attrs:{disabled:t.templateProvide.isEdit},on:{change:t.onChange},model:{value:t.superiorLeaders,callback:function(e){t.superiorLeaders=e},expression:"superiorLeaders"}},[t._v("直接上级")])],1)]),n("div",{staticClass:"bottom-part"},[n("div",[n("div",{staticClass:"btn-warp"},[n("a-button",{attrs:{type:"primary",disabled:t.templateProvide.isEdit},on:{click:function(e){return t.addUserHandle()},change:t.onChange}},[t._v("指定职员")]),t.tempUser&&t.tempUser.length?n("a-button",{attrs:{type:"link"},on:{click:function(e){return t.deleteAllUser()}}},[t._v("清空")]):t._e()],1),n("div",{staticClass:"select-person"},t._l(t.tempUser,(function(e,a){return n("a-tag",{key:e.selectId?e.selectId:e.objectId,attrs:{color:"#f0f2f5",closable:""},on:{close:function(e){return t.deleteUserHandle(a)}}},[1===e.objectType?n("h-image",{attrs:{src:e.avatar}},[n("a-icon",{staticClass:"img-icon",attrs:{slot:"error",type:"picture"},slot:"error"})],1):t._e(),n("OpenData",{attrs:{type:2===e.objectType?"departmentName":"userName",openid:2===e.objectType?e.wxDeptId:e.wxUserId,name:e.name,"show-tip":""}})],1)})),1)]),t.tempUser&&t.tempUser.length||t.superiorLeaders?n("div",[n("a-checkbox",{staticClass:"update-copy-people",attrs:{disabled:t.templateProvide.isEdit},on:{change:t.onChange},model:{value:t.copyTarget.copyTargetIsFixed,callback:function(e){t.$set(t.copyTarget,"copyTargetIsFixed",e)},expression:"copyTarget.copyTargetIsFixed"}},[t._v("编辑汇报时，不可删除默认抄送人")])],1):t._e()])]),n("select-user",{attrs:{title:"选择可使用人",visible:t.dialogs.userSelect,"replace-fields":{children:"children",user:"stafferId",department:"businessId"},"data-type":"mix",multiple:"","use-built":"","is-sync":"",search:"init","root-is-select":!0,maxLength:20},on:{"update:visible":function(e){return t.$set(t.dialogs,"userSelect",e)},ok:function(){var e=[],n=arguments.length;while(n--)e[n]=arguments[n];return t.confirmUser.apply(void 0,e.concat([2]))}},model:{value:t.tempUser,callback:function(e){t.tempUser=e},expression:"tempUser"}})],1):t._e()},w=[],k=(n("98a7"),n("7bec")),O=(n("14d9"),n("a434"),n("1db5")),T=n.n(O),I=n("3383"),S=n("5880"),j=k["a"].SHOW_PARENT,x={name:"ProcessSetting",components:{IconFont:o["default"],SelectUser:m["SelectUser"],HImage:m["HImage"]},inject:["templateProvide"],data:function(){return{SHOW_PARENT:j,copyTarget:null,dialogs:{selectVisible:!1,userSelect:!1},tempDept:[],tempUser:[],copyOptions:[{key:1,value:"指定成员"},{key:2,value:"发起人自选"},{key:3,value:"部门管理人"},{key:4,value:"直接上级"},{key:5,value:"发起人自己"}],organizationTree:"",organizationLoading:!1,fatherCopyTarget:"",superiorLeaders:!1}},created:function(){this.getOrganizationTree()},computed:Object(r["a"])(Object(r["a"])({},Object(S["mapGetters"])(["curtUserInfo"])),{},{admin:function(){return this.curtUserInfo.superAdmin||this.curtUserInfo.admin}}),methods:{sureHandle:function(){this.tempUser&&(this.fatherCopyTarget.copyTarget=this.tempUser.length?this.userToParam():[])},closeHandle:function(){this.dialogs.selectVisible=!1},userToParam:function(){return this.tempUser?this.tempUser.map((function(t){return{avatar:t.avatar,name:t.name,objectId:t.objectId?t.objectId:t.selectId,objectType:t.objectId?t.objectType:t.stafferId?1:(t.parentId,2)}})):""},deptToParam:function(){var t=this;if(this.tempDept){var e=[];return this.tempDept&&this.tempDept.length&&this.tempDept.forEach((function(n){n.value&&e.push(Object(I["queryNode"])(t.organizationTree,n.value,"businessId"))})),e.map((function(t){return{objectId:t.businessId,businessId:"",objectType:2}}))}return""},setEditData:function(t){var e=this;t?(this.fatherCopyTarget=t,this.superiorLeaders=t.superiorLeaders):t=this.fatherCopyTarget,this.copyTarget=Object(s["deepClone"])(t),T.a.isEmpty(t)||t&&t.copyTarget&&t.copyTarget.length&&(this.tempUser=t.copyTarget.map((function(t){var n=Object(s["deepClone"])(t);return 1===t.objectType?(e.$set(n,"stafferId",t.objectId),n):2===t.objectType?(e.$set(n,"businessId",t.objectId),n):3===t.objectType?(e.$set(n,"businessId",t.objectId),e.$set(n,"parentId","0"),n):void 0})))},getOrganizationTree:function(){var t=this;this.organizationLoading=!0,this.$api.getTree({flag:this.admin}).then((function(e){var n=e.code,a=e.data;e.message;"SYS_0000"===n&&(t.organizationTree=a)})).finally((function(){t.organizationLoading=!1}))},deleteUserHandle:function(t){this.tempUser.splice(t,1),this.sureHandle()},deleteAllUser:function(){this.tempUser=[],this.sureHandle()},addUserHandle:function(){this.dialogs.userSelect=!0},selectPeopleHandle:function(){this.fatherCopyTarget&&this.setEditData(this.fatherCopyTarget),this.dialogs.selectVisible=!0},confirmUser:function(t){var e=this,n=t.selectedList;n.map((function(t){t.objectType||e.$set(t,"objectType",t.wxUserId?1:2)})),this.tempUser=t.selectedList,this.dialogs.workableSelect=!1,this.sureHandle()},onChange:function(){this.fatherCopyTarget.copyTargetIsFixed=this.copyTarget.copyTargetIsFixed,this.fatherCopyTarget.superiorLeaders=this.superiorLeaders}}},_=x,D=(n("e843"),Object(b["a"])(_,C,w,!1,null,"3855c6c7",null)),L=D.exports,$=n("e24f"),R={name:"ReportTemplate",provide:function(){return{templateProvide:this.provideData}},data:function(){return{componentsLength:0,provideData:{editBusinessId:"",current:"",initialized:!1,isUsed:!1,isEdit:!1,templateType:null},state:1,oldState:null,current:0,steps:["基础设置","表单设计","抄送人设置"],formItemLayout:{labelCol:{span:6},wrapperCol:{span:7}},templateData:{reportCopyTarget:{copyTarget:[],copyTargetIsFixed:!1,superiorLeaders:!1}},editData:{},detailLoading:!1,disabledNum:0,confirmLoading:!1}},beforeCreate:function(){this.form=this.$form.createForm(this,{name:"validate_other"})},props:{},components:{BaseSetting:l["a"],FormSetting:c["a"],TemplateList:y,IconFont:o["default"],ProcessSetting:L,TemplateLayout:$["a"]},watch:{"editData.defaultTemplateType":{handler:function(t){this.provideData.initialized=void 0!==t&&(1!==t&&"1"!==t)}},"editData.used":{handler:function(t){this.provideData.isUsed=t}},current:function(t){this.provideData.current=t}},created:function(){this.getDisabledNum()},methods:{changeData:function(t){this.provideData.templateType=t.templateType,this.$refs.formSettingRef&&this.$refs.formSettingRef.getSignTemplate()},midLength:function(t){this.componentsLength=t},getDisabledNum:function(){var t=this;this.$api.getTemplateDisableCountCrm().then((function(e){var n=e.code,a=e.data;"SYS_0000"===n&&(t.disabledNum=a)}))},addTemplateHandle:function(){var t=this;this.provideData.editBusinessId="",this.editData="",this.provideData.initialized=!1,this.provideData.isEdit=!1,this.current=0,this.state=3,this.$nextTick((function(){var e={copyTarget:[],copyTargetIsFixed:!1,superiorLeaders:!1};t.$refs.processSettingRef&&t.$refs.processSettingRef.setEditData(e)}))},editTemplate:function(t,e){var n=this;this.oldState=this.state,this.provideData.editBusinessId=t,this.current=0,this.state=3,this.detailLoading=!0,this.$api.getTemplateDetailCrm({businessId:t}).then((function(t){var e=t.code,a=t.data;t.message;"SYS_0000"===e&&(n.templateData.components=JSON.parse(JSON.stringify(a.components)),n.editData=a,n.$refs.baseSettingRef.setEditData(a),n.$refs.formSettingRef.setEditData(a.components,!1,a),n.templateData.reportCopyTarget=Object(s["deepClone"])(a.copyTarget),n.$refs.processSettingRef.setEditData(n.templateData.reportCopyTarget))})).finally((function(){n.detailLoading=!1})),this.provideData.isEdit="disabled"===e},copyTemplate:function(t){var e=this;this.provideData.editBusinessId="",this.provideData.initialized=!1,this.provideData.isEdit=!1,this.editData="",this.current=0,this.state=3,this.detailLoading=!0,this.$api.getTemplateDetailCrm({businessId:t}).then((function(t){var n=t.code,a=t.data;t.message;"SYS_0000"===n&&(a=e.delTemplateId(a),e.templateData.components=JSON.parse(JSON.stringify(a.components)),e.$refs.baseSettingRef.setEditData(a),e.$refs.formSettingRef.setEditData(a.components,!1,a),e.templateData.reportCopyTarget=Object(s["deepClone"])(a.copyTarget),e.$refs.processSettingRef.setEditData(e.templateData.reportCopyTarget))})).finally((function(){e.detailLoading=!1}))},delTemplateId:function(t){var e=this;for(var n in t)["businessId","optionId","parentId"].includes(n)?delete t[n]:"templateName"===n?t[n]="":t[n]instanceof Array&&t[n].forEach((function(t){t=e.delTemplateId(t)}));return t},cancelEditHandle:function(){this.state=this.oldState||1,this.current=0},saveHandle:function(){var t=this;this.verifyRule((function(){t.sendSave()}))},sendSave:function(){var t=this;this.confirmLoading=!0;var e=Object(s["deepClone"])(this.templateData);e.reportCopyTarget&&""===e.reportCopyTarget.copyTarget&&(e.reportCopyTarget.copyTarget=null);var n="addTemplateCrm";this.provideData.editBusinessId&&(e.businessId=this.provideData.editBusinessId,e.sortOrder=this.editData.sortOrder,n="updateTemplateCrm"),this.$api[n](e).then((function(e){var n=e.code,a=(e.data,e.message);"SYS_0000"===n?(t.state=1,t.current=0,t.$message.success("已提交")):t.$message.error(a)})).finally((function(){t.confirmLoading=!1}))},verifyRule:function(t){var e=this;0===this.current?this.$refs.baseSettingRef.verifyHandle((function(n){n.success&&(e.provideData.templateType=n.data.templateType,e.templateData=Object.assign(e.templateData,n.data),t())})):1===this.current?this.$refs.formSettingRef.verifyHandle((function(n){n.success&&(e.$set(e.templateData,"components",n.data),t())})):(this.$refs.processSettingRef&&(this.templateData.reportCopyTarget=Object(r["a"])({},this.$refs.processSettingRef.fatherCopyTarget)),t())},changeState:function(t,e){var n=this;"prev"===t?this.current--:this.verifyRule((function(){"jump"===t?n.current=e:n.current++}))}}},H=R,A=(n("7560"),Object(b["a"])(H,a,i,!1,null,"26192010",null));e["default"]=A.exports},a28a:function(t,e,n){t.exports=n.p+"3287caabbaa59b1ba76e432a335b1005.png"},a81c:function(t,e,n){"use strict";var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("a-modal",{attrs:{width:592,title:"同步职员名称",maskClosable:!1,destroyOnClose:!0},on:{cancel:t.translationCancel},model:{value:t.sumVisib,callback:function(e){t.sumVisib=e},expression:"sumVisib"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:!t.translationObj.succeed&&!t.translationObj.lose&&!t.translationObj.loading,expression:"!translationObj.succeed && !translationObj.lose && !translationObj.loading"}]},[n("div",{staticClass:"to-translate-that"},[n("p",{staticClass:"translate-title"},[t._v("Step 1：下载职员")]),n("div",{staticClass:"translate-content"},[t._v(" 注意：下载后文档请勿进行修改！"),n("a",{staticStyle:{color:"red",cursor:"default"}},[t._v("(若下载失败，可退出系统重新登录后再尝试下载)")])]),n("a-button",{staticClass:"trans-but",attrs:{loading:t.loading.downLoading,icon:"download"},on:{click:t.transDown}},[t._v("点击下载职员")]),t.translationObj.downloadScs?n("span",{staticClass:"icons-list"},[n("a-icon",{staticClass:"win",attrs:{type:"check-circle",theme:"filled"}}),t._v("下载成功")],1):t._e()],1),n("div",{staticClass:"to-translate-that entry"},[n("p",{staticClass:"translate-title"},[t._v("Step 2：导入职员")]),n("div",{staticClass:"translate-content"},[t._v("导入Step1中下载的Excel表格")]),n("a-upload",{attrs:{name:"file",multiple:!0,"file-list":t.translationObj.fileList,"before-upload":t.handlerBeforeUpload},on:{change:t.transUploadChange}},[n("a-button",{staticClass:"trans-but",attrs:{loading:t.loading.entryLoading}},[n("a-icon",{attrs:{type:"cloud-upload"}}),t._v("点击导入职员")],1),n("span",{directives:[{name:"show",rawName:"v-show",value:t.translationObj.ImportScs,expression:"translationObj.ImportScs"}],staticClass:"icons-list"},[n("a-icon",{staticClass:"win",attrs:{type:"check-circle",theme:"filled"}}),t._v("导入成功")],1)],1)],1)]),n("a-spin",{directives:[{name:"show",rawName:"v-show",value:t.translationObj.loading,expression:"translationObj.loading"}],attrs:{tip:"同步中，请稍等",size:"large",wrapperClassName:"loading-spin"}},[n("a-icon",{attrs:{slot:"indicator",type:"loading",spin:""},slot:"indicator"})],1),n("div",{directives:[{name:"show",rawName:"v-show",value:t.translationObj.succeed&&!t.translationObj.loading,expression:"translationObj.succeed && !translationObj.loading"}]},[n("a-result",{attrs:{status:"success",title:"同步成功！"}})],1),n("div",{directives:[{name:"show",rawName:"v-show",value:t.translationObj.lose&&!t.translationObj.loading,expression:"translationObj.lose && !translationObj.loading"}]},[n("a-result",{attrs:{status:"error",title:"同步失败！","sub-title":t.translationObj.errorContent}})],1),n("template",{slot:"footer"},[n("div",{directives:[{name:"show",rawName:"v-show",value:!t.translationObj.loading,expression:"!translationObj.loading"}]},[n("a-button",{directives:[{name:"show",rawName:"v-show",value:!t.translationObj.lose,expression:"!translationObj.lose"}],key:"back",on:{click:t.translationCancel}},[t._v(t._s(t.translationObj.succeed?"关闭":"取消")+" ")]),n("a-button",{directives:[{name:"show",rawName:"v-show",value:!t.translationObj.succeed,expression:"!translationObj.succeed"}],key:"submit",attrs:{disabled:!t.translationObj.ImportScs,type:"primary"},on:{click:t.translationOk}},[t._v(t._s(t.translationObj.lose?"重新同步":"立即同步"))])],1)])],2)},i=[],r=n("2909"),s=n("5530"),o=(n("99af"),n("5880")),l=n("d918"),c={props:{visible:{type:Boolean,default:!1}},data:function(){return{translationObj:{files:{},fileList:[],downloadScs:!1,ImportScs:!1,succeed:!1,lose:!1,loading:!1,errorContent:""},loading:{authStatus:!0,table:!1,butLoading:!1,downLoading:!1,entryLoading:!1}}},computed:Object(s["a"])(Object(s["a"])({},Object(o["mapGetters"])(["curtUserInfo"])),{},{sumVisib:{get:function(){return this.visible},set:function(t){this.$emit("update:visible",t)}}}),methods:{translationCancel:function(t){this.translationObj=this.$options.data.call(this).translationObj,this.sumVisib=!1},transDown:function(){var t=this;this.loading.downLoading=!0;var e=this.curtUserInfo.corpId;Object(l["urlTranslation"])({corpId:e}).then((function(e){if(e.data){var n=document.createElement("a"),a=new MouseEvent("click");n.download="",n.href=e.data,n.dispatchEvent(a),t.translationObj.downloadScs=!0,t.loading.downLoading=!1}}))},transUploadChange:function(t){this.loading.entryLoading=!0,"uploading"!==t.file.status&&(this.translationObj.ImportScs=!0,this.loading.entryLoading=!1,this.translationObj.files=t.file)},translationOk:function(){var t=this;this.translationObj.loading=!0;var e=new FormData;e.append("file",this.translationObj.files),Object(l["loadAddressBook"])(e).then((function(e){t.translationObj.loading=!1,t.$emit("transOk"),t.translationObj.succeed=!0})).catch((function(e){t.translationObj.loading=!1,t.translationObj.lose=!0,t.translationObj.errorContent=e}))},handlerBeforeUpload:function(t){var e=t.size/1024/1024<10;return e?(this.translationObj.fileList=[].concat(Object(r["a"])(this.translationObj.fileList),[t]),!1):(this.loading.entryLoading=!1,this.$message.error("文件上传不能超过10MB!"))}}},d=c,u=(n("43a9"),n("2877")),f=Object(u["a"])(d,a,i,!1,null,"2b9308f9",null);e["a"]=f.exports},aaede:function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"params-config-wrap"},[n("ul",{staticClass:"config-list"},t._l(t.configList,(function(e){return n("li",{key:e.key,staticClass:"config-item"},[[n("div",{staticClass:"conf-info"},[n("h3",{staticClass:"conf-title"},[t._v(t._s(e.title))]),n("p",{staticClass:"conf-desc"},[t._v(" "+t._s(e.desc)+" ")])]),n("div",{staticClass:"conf-handler"},[[6,7].includes(e.key)&&e.isChecked?[n("a",{staticClass:"setting-btn",attrs:{href:"javascript:void(0);"},on:{click:function(n){return t.handlerClick(e.key)}}},[t._v("设置")])]:t._e(),[7].includes(e.key)?n("span",{staticClass:"setting-btn display-info"},[t._v(t._s(t.settingData.mapCustomerRange)+"米")]):[4].includes(e.key)?n("a-select",{attrs:{placeholder:"请选择","default-value":t.settingData.forbidUpdateV2},on:{change:t.setForbidUpdate},model:{value:t.settingData.forbidUpdateV2,callback:function(e){t.$set(t.settingData,"forbidUpdateV2",e)},expression:"settingData.forbidUpdateV2"}},t._l(t.forbidUpdateList,(function(e){return n("a-select-option",{key:e.key,attrs:{value:e.key}},[t._v(t._s(e.label))])})),1):n("a-switch",{staticClass:"conf-switch",attrs:{size:"small"},on:{change:function(n){return t.handlerConfSwitchChange(e,n)}},model:{value:e.isChecked,callback:function(n){t.$set(e,"isChecked",n)},expression:"confItem.isChecked"}})],2)]],2)})),0),n("sign-out-remind-setting",{attrs:{show:t.dialogs.signOutRemind,"default-data":t.settingData},on:{"update:show":function(e){return t.$set(t.dialogs,"signOutRemind",e)},ok:t.handlerSettingOk}}),n("search-range-setting",{attrs:{show:t.dialogs.mapCustomerRange,"default-data":t.settingData},on:{"update:show":function(e){return t.$set(t.dialogs,"mapCustomerRange",e)},ok:t.handlerSettingOk}})],1)},i=[],r=(n("d3b7"),n("d81d"),n("e6cf"),n("a79d"),n("cca6"),function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("a-modal",{staticClass:"setting-timer common-form",attrs:{title:"签退提醒设置",width:"592px",visible:t.visible,"mask-closable":!1,"confirm-loading":t.confirmLoading},on:{ok:t.handleOk,cancel:t.handleCancel}},[n("a-form-model",{ref:"settingForm",staticClass:"setting-form",attrs:{model:t.settingForm.data,rules:t.settingForm.rules,"label-col":t.settingForm.labelCol,"wrapper-col":t.settingForm.wrapperCol}},[n("a-form-model-item",{attrs:{label:"签到后",prop:"signInLater"}},[n("a-time-picker",{staticClass:"timer-input transform",attrs:{allowClear:!1,hideDisabledOptions:!0,"disabled-hours":t.disbaledHours,"default-value":t.moment("00:10","HH:mm"),"value-format":"HH:mm",format:"HH:mm"},model:{value:t.settingForm.data.signInLater,callback:function(e){t.$set(t.settingForm.data,"signInLater",e)},expression:"settingForm.data.signInLater"}}),n("span",{staticClass:"active-time"},[n("span",{directives:[{name:"show",rawName:"v-show",value:t.moment(this.settingForm.data.signInLater,"HH:mm").hour()>0,expression:"moment(this.settingForm.data.signInLater, 'HH:mm').hour() > 0"}]},[t._v(t._s(t.moment(this.settingForm.data.signInLater,"HH:mm").hour())+"小时")]),n("span",{directives:[{name:"show",rawName:"v-show",value:0!==t.moment(this.settingForm.data.signInLater,"HH:mm").minute(),expression:"moment(this.settingForm.data.signInLater, 'HH:mm').minute() !== 0"}]},[t._v(t._s(t.moment(this.settingForm.data.signInLater,"HH:mm").minute())+"分钟")])]),n("span",{staticClass:"time-hint"},[t._v("开始提醒")])],1),n("a-form-model-item",{attrs:{label:"提醒间隔",prop:"remindInterval"}},[n("a-time-picker",{staticClass:"timer-input transform",attrs:{allowClear:!1,hideDisabledOptions:!0,"disabled-hours":t.disbaledHours,"default-value":t.moment("00:05","HH:mm"),"value-format":"HH:mm",format:"HH:mm"},model:{value:t.settingForm.data.remindInterval,callback:function(e){t.$set(t.settingForm.data,"remindInterval",e)},expression:"settingForm.data.remindInterval"}}),n("span",{staticClass:"active-time"},[n("span",{directives:[{name:"show",rawName:"v-show",value:t.moment(this.settingForm.data.remindInterval,"HH:mm").hour()>0,expression:"moment(this.settingForm.data.remindInterval, 'HH:mm').hour() > 0"}]},[t._v(t._s(t.moment(this.settingForm.data.remindInterval,"HH:mm").hour())+"小时")]),n("span",{directives:[{name:"show",rawName:"v-show",value:0!==t.moment(this.settingForm.data.remindInterval,"HH:mm").minute(),expression:"moment(this.settingForm.data.remindInterval, 'HH:mm').minute() !== 0"}]},[t._v(t._s(t.moment(this.settingForm.data.remindInterval,"HH:mm").minute())+"分钟")])])],1),n("a-form-model-item",{staticStyle:{"margin-bottom":"0"},attrs:{label:"提醒次数",prop:"remindTimes"}},[n("a-select",{staticClass:"timer-input",attrs:{"default-value":t.defaultData.remindTimes||2},model:{value:t.settingForm.data.remindTimes,callback:function(e){t.$set(t.settingForm.data,"remindTimes",e)},expression:"settingForm.data.remindTimes"}},t._l(5,(function(e){return n("a-select-option",{key:e,attrs:{value:e}},[t._v(" "+t._s(e)+" 次 ")])})),1)],1)],1)],1)}),s=[],o=(n("d9e2"),n("90b7")),l=n("c1df"),c=n.n(l),d=n("3383"),u=n.n(d),f={name:"SignOutRemindSetting",props:{show:{required:!1,type:Boolean},defaultData:{type:Object,default:function(){return{}}}},watch:{show:{handler:function(t){if(this.visible=t,t){var e=Object(o["deepClone"])(this.defaultData);e.signInLater=c()(c()().set({hour:e.afterSignInHour,minute:e.afterSignInMinute}),"HH:mm"),e.remindInterval=c()(c()().set({hour:e.remindIntervalHour,minute:e.remindIntervalMinute}),"HH:mm"),this.settingForm.data=e}},immediate:!0}},data:function(){return{visible:!1,confirmLoading:!1,settingForm:{labelCol:{span:5},wrapperCol:{span:18},data:{signInLater:"",remindInterval:"",remindTimes:""},rules:{signInLater:[{required:!0,message:"请选择签到后提醒时间",trigger:["change","blur"]},{validator:function(t,e,n){"00:00"===e?n(new Error("时和分不可同时为0")):n()}}],remindInterval:[{required:!0,message:"请选择提醒间隔",trigger:["change","blur"]},{validator:function(t,e,n){"00:00"===e?n(new Error("时和分不可同时为0")):n()}}],remindTimes:[{required:!0,message:"请选择提醒次数",trigger:["change","blur"]}]}}}},methods:{moment:c.a,disbaledHours:function(){return u.a.range(4,24)},resetContent:function(){this.$refs.settingForm.resetFields()},handleOk:function(){var t=this;this.$refs.settingForm.validate((function(e){if(e){t.confirmLoading=!0;var n={afterSignInHour:c()(t.settingForm.data.signInLater,"HH:mm").hour(),afterSignInMinute:c()(t.settingForm.data.signInLater,"HH:mm").minute(),remindIntervalHour:c()(t.settingForm.data.remindInterval,"HH:mm").hour(),remindIntervalMinute:c()(t.settingForm.data.remindInterval,"HH:mm").minute(),remindTimes:t.settingForm.data.remindTimes};t.$api.updateRemindSettingCrm(n).then((function(e){var a=e.code,i=(e.data,e.message);"SYS_0000"===a?(t.$emit("ok",n),t.$message.success("设置成功"),t.$emit("update:show",!1)):t.$message.error(i)})).finally((function(){t.confirmLoading=!1}))}}))},handleCancel:function(){this.confirmLoading=!1,this.visible=!1,this.$emit("update:show",!1),this.resetContent()}}},p=f,m=(n("3803"),n("2877")),h=Object(m["a"])(p,r,s,!1,null,"4a5f2b76",null),g=h.exports,b=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("a-modal",{staticClass:"setting-timer common-form",attrs:{title:"新增拜访客户搜索范围设置",width:"400px",visible:t.visible,"mask-closable":!1,"confirm-loading":t.confirmLoading},on:{ok:t.handleOk,cancel:t.handleCancel}},[n("a-form-model",{ref:"settingForm",staticClass:"setting-form",attrs:{model:t.data,"label-col":t.labelCol,"wrapper-col":t.wrapperCol}},[n("a-form-model-item",{attrs:{label:"范围",prop:"mapCustomerRange"}},[n("a-select",{attrs:{placeholder:"请选择","default-value":t.defaultData.mapCustomerRange||5e3},model:{value:t.data.mapCustomerRange,callback:function(e){t.$set(t.data,"mapCustomerRange",e)},expression:"data.mapCustomerRange"}},t._l(t.rangeList,(function(e){return n("a-select-option",{key:e,attrs:{value:e}},[t._v(t._s(e)+"米")])})),1)],1)],1)],1)},v=[],y={name:"SearchRangeSetting",props:{show:{required:!1,type:Boolean},defaultData:{type:Object,default:function(){return{}}}},watch:{show:{handler:function(t){this.visible=t,t&&(this.data=Object(o["deepClone"])(this.defaultData))},immediate:!0}},data:function(){return{visible:!1,confirmLoading:!1,labelCol:{span:3},wrapperCol:{span:21},data:{mapCustomerRange:""}}},created:function(){this.rangeList=[1e3,2e3,3e3,4e3,5e3,6e3,7e3,8e3,9e3,1e4]},methods:{resetContent:function(){this.$refs.resetFields()},handleOk:function(){var t=this;this.confirmLoading=!0;var e={configValue:this.data.mapCustomerRange};this.$api.updateRangeSettingCrm(e).then((function(e){var n=e.code,a=(e.data,e.message);"SYS_0000"===n?(t.$emit("ok",t.data),t.$message.success("设置成功"),t.$emit("update:show",!1)):t.$message.error(a)})).finally((function(){t.confirmLoading=!1}))},handleCancel:function(){this.confirmLoading=!1,this.visible=!1,this.$emit("update:show",!1),this.resetContent()}}},C=y,w=(n("ebb9"),Object(m["a"])(C,b,v,!1,null,"21920a16",null)),k=w.exports,O={name:"Parameter",components:{SignOutRemindSetting:g,SearchRangeSetting:k},data:function(){return{loading:!1,dialogs:{signOutRemind:!1,mapCustomerRange:!1},settingData:{afterSignInHour:0,afterSignInMinute:10,remindIntervalHour:0,remindIntervalMinute:5,remindTimes:2,mapCustomerRange:5e3,forbidUpdateV2:1},configList:[{title:"上传图片时添加水印",desc:"开启后将获取上传图片的时间及位置，拜访支持客户名称",key:2,isChecked:!0,loading:!1},{title:"新增汇报所属时间设置",desc:"开启后将不支持修改所属时间，所属时间默认带入新增汇报时的当前时间",key:3,isChecked:!0,loading:!1},{title:"汇报禁止编辑设置",desc:"针对已经提交的汇报，设置是否允许编辑",key:4,isChecked:!0,loading:!1},{title:"汇报禁止删除设置",desc:"开启后将不允许删除已经提交的汇报",key:5,isChecked:!0,loading:!1},{title:"签退提醒设置",desc:"针对汇报模板当中有使用“签到/签退”组件，已签到后，按设定时间开始提醒签退",key:6,isChecked:!0,loading:!1},{title:"新增拜访客户搜索范围设置",desc:"外勤管理——新增拜访，设置客户搜索范围，设置后只显示范围内的客户",key:7,isChecked:!0,loading:!1}],keyValue:{1:"choiceCamera",2:"waterMark",3:"forbidUpdateTime",4:"forbidUpdateV2",5:"forbidDelete",6:"signOutRemind",7:"mapCustomerRange"}}},created:function(){this.forbidUpdateList=[{label:"允许编辑",key:1},{label:"禁止编辑",key:2},{label:"仅允许编辑今天提交的汇报",key:3},{label:"仅允许编辑本周提交的汇报",key:4},{label:"仅允许编辑本月提交的汇报",key:5},{label:"仅允许编辑本季度提交的汇报",key:6},{label:"仅允许编辑7天内提交的汇报",key:7},{label:"仅允许编辑30天内提交的汇报",key:8},{label:"仅允许编辑90天内提交的汇报",key:9}],this.getConfInfo()},methods:{getConfInfo:function(){var t=this;this.loading=!0,this.$api.getTemplateSettingCrm().then((function(e){var n=e.code,a=e.data,i=e.message;"SYS_0000"===n?(t.configList=t.configList.map((function(e){return e.isChecked=a[t.keyValue[e.key]],e})),t.settingData=a):t.$message.error(i)})).finally((function(){setTimeout((function(){t.loading=!1}),50)}))},handlerClick:function(t){this.dialogs[this.keyValue[t]]=!0},handlerSettingOk:function(t){this.settingData=Object.assign(this.settingData,t)},setForbidUpdate:function(){var t=this,e={value:this.settingData.forbidUpdateV2};this.$api.updateForbidSettingCrm(e).then((function(e){var n=e.code,a=(e.data,e.message);"SYS_0000"===n?t.$message.success("设置成功"):t.$message.error(a)})).catch((function(){t.getConfInfo()}))},handlerConfSwitchChange:function(t,e){var n=this;t.loading=!0,t.isChecked=!t.isChecked,this.$api.updateTemplateSettingCrm({configType:t.key,configValue:!t.isChecked}).then((function(e){var a=e.code,i=(e.data,e.message);"SYS_0000"===a?t.isChecked=!t.isChecked:n.$message.error(i)})).finally((function(){t.loading=!1}))}}},T=O,I=(n("172d"),Object(m["a"])(T,a,i,!1,null,"52c98b3c",null));e["default"]=I.exports},b6e2:function(t,e,n){},bf6b:function(t,e,n){"use strict";var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"select-wrap",on:{click:function(e){return e.stopPropagation(),t.clickHandle.apply(null,arguments)}}},[t.isShowAll?n("span",{staticStyle:{"line-height":"22px",padding:"4px 0"}},[t._v("全部")]):n("div",{staticClass:"select-list-wrap",class:{"pad-2":t.list.length,nowrap:t.nowrap}},[t.list&&0===t.list.length?n("span",{staticClass:"placeholder-style"},[t._v(t._s(t.placeholder))]):t._e(),t._l(t.list,(function(e,a){return n("div",{key:e.value,staticClass:"item-option"},[t.isOpenData?n("span",[n("OpenData",{attrs:{type:"userName",openid:e.wxUserId,name:e.name,"show-tip":""}})],1):n("span",[t._v(t._s(e.label))]),n("a-icon",{staticClass:"delete-icon",attrs:{type:"close"},on:{click:function(e){return e.stopPropagation(),t.deleteOption(a)}}})],1)}))],2),n("div",{staticClass:"right-icon-wrap",on:{click:function(e){return e.stopPropagation(),t.clickHandle.apply(null,arguments)}}},[t._t("icon")],2)])},i=[],r=(n("a9e3"),{name:"SelectOption",data:function(){return{list:[]}},props:{item:{type:Object,default:function(){return{}}},type:{type:Number,default:1},optionList:{type:[Array,Object],default:null},placeholder:{type:String,default:"请选择"},isShowAll:{type:Boolean,default:!1},isLineClick:{type:Boolean,default:!1},isOpenData:{type:Boolean,default:!1},nowrap:{type:Boolean,default:!1}},watch:{optionList:{handler:function(t){t&&0!==t.length?this.list=1===this.type?[t]:t:this.list=[]},deep:!0}},mounted:function(){this.optionList&&0!==this.optionList.length?this.list=1===this.type?[this.optionList]:this.optionList:this.list=[]},methods:{clickHandle:function(){this.$emit("click")},deleteOption:function(t){this.$emit("delete",t)}}}),s=r,o=(n("e18e"),n("2877")),l=Object(o["a"])(s,a,i,!1,null,"07868072",null);e["a"]=l.exports},c75f:function(t,e,n){},cdc4:function(t,e,n){},cfcc:function(t,e,n){"use strict";n("daf1")},d46f1:function(t,e,n){t.exports=n.p+"d1bdd0a25f2a8cf0aac47f9009011ec8.png"},daf1:function(t,e,n){},e02b:function(t,e,n){},e18e:function(t,e,n){"use strict";n("3e09")},e843:function(t,e,n){"use strict";n("c75f")},e87e4:function(t,e,n){},ebb9:function(t,e,n){"use strict";n("2d7b")},ef65:function(t,e,n){"use strict";n("18af")},f168:function(t,e,n){t.exports=n.p+"0d5473c86930cdd25057ba8d365f7ea4.png"},f477:function(t,e,n){t.exports=n.p+"99257416b0e8db708d0ca7c01dd301f9.png"},f48f:function(t,e,n){},ff18:function(t,e,n){"use strict";n("e02b")}}]);