企微助手 ,仓库名 短剧

62.24da6f61365dd7980dae.js 16KB

1
  1. webpackJsonp([62],{PHcJ:function(e,t){},ZQlR:function(e,t){},cuok:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a("McOJ"),s=a("mvHQ"),n=a.n(s),o=a("sOQl"),r={components:{selfInput:i.a,customerServiceCorp:o.a},name:"warningListInstall",props:["warn_user_list"],data:function(){return{input_keyword:"",groupDetail:{},loading:!1,dialogLoading:!1,dialogTableVisible:!1,dialogTitleName:"添加预警组",tableData:[],groupName:"",okFlag:!1,okMes:"以上均为必填项",page:1,pages:0,total:0,page_size:20,user_val_list:[],get_djuser_list:[],afferent_users:[]}},created:function(){this.init(1)},methods:{enable_evnet:function(e){var t=this;1!=e.enable&&0!=e.enable||this.$confirm("确定"+(1==e.enable?"禁用":"启用")+"【"+e.name+"】?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){t.$loading(t.$loadingConfig),t.$axios.post(t.URL.BASEURL+t.URL.warn_groupEableOp,{group_id:e.id,enable:1==e.enable?0:1,sys_group_id:1==t.$cookie.getCookie("isSuperManage")?sessionStorage.getItem("company_session_defaultCorp_level_1").toString():""}).then(function(e){e=e.data;t.$loading(t.$loadingConfig).close(),e&&0==e.errno?(t.$message({message:"操作成功!",type:"success"}),t.init(t.page)):t.$message({message:e.err,type:"warning"})}).catch(function(){t.$loading(t.$loadingConfig).close()})}).catch(function(){})},handleCurrentChange:function(e){this.init(e)},init:function(e){var t=this;this.page=e||this.page,this.loading=!0,this.$axios.get(this.URL.BASEURL+this.URL.warn_groupList,{params:{page:this.page,page_size:this.page_size,keyword:this.input_keyword,sys_group_id:1==this.$cookie.getCookie("isSuperManage")?sessionStorage.getItem("company_session_defaultCorp_level_1").toString():""}}).then(function(e){(e=e.data)&&0==e.errno?(t.tableData=e.rst.data,t.total=e.rst.pageInfo.total,t.pages=e.rst.pageInfo.pages):4002!=e.errno&&t.$message({message:e.err,type:"warning"}),t.loading=!1}).catch(function(){t.loading=!1})},getGroupDetail:function(e){var t=this;this.loading=!0,this.$axios.get(this.URL.BASEURL+this.URL.warn_groupDetail,{params:{group_id:e,sys_group_id:1==this.$cookie.getCookie("isSuperManage")?sessionStorage.getItem("company_session_defaultCorp_level_1").toString():""}}).then(function(e){(e=e.data)&&0==e.errno?(t.user_val_list=e.rst.user_list.map(function(e){return e.user_id}),t.groupDetail=e.rst,e.rst.djuser_list&&Array.isArray(e.rst.djuser_list)&&(t.afferent_users=e.rst.djuser_list.map(function(e){return{user_id:e.djuser_id,corpid:e.djcorp_id}})),t.get_djuser_list=t.afferent_users,t.groupName=e.rst.name,t.dialogTitleName="编辑预警组",t.dialogTableVisible=!0):4002!=e.errno&&t.$message({message:e.err,type:"warning"}),t.loading=!1}).catch(function(){t.loading=!1})},addManager:function(){var e=this;if(""!=this.groupName)if(this.user_val_list&&0!=this.user_val_list.length){var t=this.get_djuser_list.map(function(e){return{user_id:e.user_id,corpid:e.corpid}}),a=this.URL.warn_groupEdit,i={sys_group_id:1==this.$cookie.getCookie("isSuperManage")?sessionStorage.getItem("company_session_defaultCorp_level_1").toString():"",group_name:this.groupName,user_list:n()(this.user_val_list),djuser_list:n()(t)};"添加预警组"==this.dialogTitleName?a=this.URL.warn_groupAdd:i.group_id=this.groupDetail.id,this.dialogLoading=!0,this.$axios.post(this.URL.BASEURL+a,i).then(function(t){t=t.data;e.dialogLoading=!1,t&&0==t.errno?(e.dialogTableVisible=!1,e.init(),e.$message({message:"成功!",type:"success"})):e.$message({message:t.err,type:"warning"})}).catch(function(){e.dialogLoading=!1})}else this.$message({message:"请选择预警人员",type:"warning"});else this.$message({message:"请输入预警组名称",type:"warning"})},openDialog:function(){this.dialogTitleName="添加预警组",this.groupName="",this.user_val_list=[],this.get_djuser_list=[],this.afferent_users=[],this.dialogTableVisible=!0}}},l={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"con"},[a("div",{staticClass:"tableInfo"},[a("div",{staticClass:"flex"},[a("div",{staticClass:"totalCustom"},[e._v("共"),a("span",[e._v(e._s(e.total))]),e._v("个预警组")]),e._v(" "),a("self-input",{key:"tab2",staticStyle:{"margin-left":"60px"},attrs:{hasLabel:!1,keyword:e.input_keyword,label_name:"关键词搜索"},on:{inputChange:function(t){e.input_keyword=t,e.init(1)}}})],1),e._v(" "),a("div",{staticClass:"flex"},[a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(t){return e.openDialog("add")}}},[e._v("添加预警组")])],1)]),e._v(" "),a("el-table",{ref:"multipleTable",staticStyle:{width:"100%"},attrs:{height:"calc(100vh - 256px)",data:e.tableData,"tooltip-effect":"dark"}},[a("el-table-column",{attrs:{"show-overflow-tooltip":"",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticStyle:{"margin-left":"60px"}},[e._v(e._s(t.row.name))])]}}])},[a("template",{slot:"header"},[a("div",{staticStyle:{"margin-left":"60px"}},[e._v("预警组")])])],2),e._v(" "),a("el-table-column",{attrs:{label:"预警人",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[t.row.user_list?a("div",{staticClass:"customerServiceTagBox biaoqian",staticStyle:{"justify-content":"space-between",display:"inline-block"}},e._l(t.row.user_list,function(t,i){return a("div",{key:i+"user",staticClass:"customerServiceTag",staticStyle:{"justify-content":"flex-start"}},[a("i",{staticClass:"el-icon-user-solid"}),e._v(" "+e._s(t.user_name)+"\n "),a("i",{staticClass:"el-icon-phone",staticStyle:{"margin-left":"8px"}}),e._v(e._s(t.user_phone)+"\n ")])}),0):e._e()]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"客服号",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[t.row.djuser_list&&t.row.djuser_list.length?a("div",{staticClass:"customerServiceTagBox biaoqian"},e._l(t.row.djuser_list,function(t,i){return a("div",{key:i+"user",staticClass:"customerServiceTag"},[e._v("\n "+e._s(t.djuser_name)+"\n ")])}),0):e._e()]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"操作",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"flex",staticStyle:{"justify-content":"center"}},[1==t.row.enable||0==t.row.enable?a("div",{class:["pointer","table_button",1==t.row.enable?"c-FF604D":"c-007AFF"],on:{click:function(a){return e.enable_evnet(t.row)}}},[e._v(e._s(1==t.row.enable?"禁用":0==t.row.enable?"启用":""))]):e._e(),e._v(" "),a("div",{staticClass:"c-00B38A pointer",staticStyle:{margin:"0 6px"},on:{click:function(a){return e.getGroupDetail(t.row.id)}}},[e._v("编辑")])])]}}])})],1),e._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total>0"}],staticClass:"pagination"},[a("el-pagination",{attrs:{background:"","current-page":e.page,layout:"prev, pager, next","page-count":Number(e.pages)},on:{"current-change":e.handleCurrentChange}})],1),e._v(" "),a("el-dialog",{staticClass:"dialogCon_permission",attrs:{title:e.dialogTitleName,visible:e.dialogTableVisible,"append-to-body":!0,width:"500px"},on:{"update:visible":function(t){e.dialogTableVisible=t}}},[a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.dialogLoading,expression:"dialogLoading"}],staticClass:"dialogCon"},[a("div",{staticClass:"itemBox",staticStyle:{"margin-bottom":"20px"}},[a("div",{staticClass:"name"},[a("em",[e._v("*")]),e._v("预警组名称:")]),e._v(" "),a("div",{staticClass:"ipt"},[a("el-input",{attrs:{size:"small",placeholder:"请输入预警组名称"},model:{value:e.groupName,callback:function(t){e.groupName=t},expression:"groupName"}})],1)]),e._v(" "),a("div",{staticClass:"itemBox",staticStyle:{"margin-bottom":"20px"}},[a("div",{staticClass:"name"},[a("em",[e._v("*")]),e._v("预警人员:")]),e._v(" "),a("div",{staticClass:"ipt"},[a("el-select",{staticStyle:{width:"100%"},attrs:{size:"small",multiple:"",placeholder:"请选择"},model:{value:e.user_val_list,callback:function(t){e.user_val_list=t},expression:"user_val_list"}},e._l(e.warn_user_list,function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1)],1)]),e._v(" "),a("div",{staticClass:"itemBox",staticStyle:{"margin-bottom":"20px"}},[a("div",{staticClass:"name"},[e._v("  客服号:")]),e._v(" "),a("div",{staticClass:"ipt"},[a("customerServiceCorp",{staticStyle:{margin:"0",width:"360px"},attrs:{title:"",afferent_users:e.afferent_users,icon_arrow_bg:!1,width:"360px",isUniqueUserid:!1},on:{customerDefine:function(t){e.get_djuser_list=t}}})],1)])]),e._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{size:"mini"},on:{click:function(t){e.dialogTableVisible=!1}}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{size:"mini",type:"primary"},on:{click:function(t){return e.addManager()}}},[e._v("确 定")])],1)])],1)},staticRenderFns:[]};var u=a("VU/8")(r,l,!1,function(e){a("ZQlR")},"data-v-e227dca2",null).exports,c={components:{selfInput:i.a,warnList:u},name:"warningListInstall",data:function(){return{input_r_keyword:"",loading:!1,dialogLoading:!1,tableData:[],type:2,page:1,page_size:20,total:0,pages:0,operateFlag:!1,dialogTitleName:"添加预警人",userName:"",userPhone:"",user_id:"",warn_user_list:[]}},created:function(){this.get_user_init(),this.user_init()},methods:{get_user_init:function(){var e=this;this.$axios.get(this.URL.BASEURL+this.URL.warn_userList,{params:{sys_group_id:1==this.$cookie.getCookie("isSuperManage")?sessionStorage.getItem("company_session_defaultCorp_level_1").toString():"",page:1,page_size:500}}).then(function(t){(t=t.data)&&0==t.errno?e.warn_user_list=t.rst.data:4002!=t.errno&&e.$message({message:t.err,type:"warning"})}).catch(function(){})},userOperate:function(e){e&&e.id?(this.dialogTitleName="编辑预警人",this.user_id=e.id,this.userName=e.name,this.userPhone=e.phone):(this.dialogTitleName="添加预警人",this.user_id="",this.userName="",this.userPhone=""),this.operateFlag=!0},deletYes:function(e){var t=this;this.$confirm("确定要将【"+e.name+"】预警人删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){t.$loading(t.$loadingConfig),t.user_id=e.id,t.userName=e.name,t.userPhone=e.phone,t.addUser(0)}).catch(function(){})},addUser:function(e){var t=this;""!=this.userName?0!=this.$judgePhone(this.userPhone)?(this.dialogLoading=!0,this.$axios.post(this.URL.BASEURL+this.URL.warn_userOperate,{sys_group_id:1==this.$cookie.getCookie("isSuperManage")?sessionStorage.getItem("company_session_defaultCorp_level_1").toString():"",name:this.userName,phone:this.userPhone,user_id:this.user_id,enable:e}).then(function(e){e=e.data;t.dialogLoading=!1,t.$loading(t.$loadingConfig).close(),e&&0==e.errno?(t.operateFlag=!1,t.user_init(),t.$message({message:"成功!",type:"success"})):t.$message({message:e.err,type:"warning"})}).catch(function(){t.$loading(t.$loadingConfig).close(),t.dialogLoading=!1})):this.$message({message:"请填写正确手机号",type:"warning"}):this.$message({message:"请输入预警人姓名",type:"warning"})},handleCurrentChange:function(e){this.user_init(e)},user_init:function(e){var t=this;this.page=e||this.page,this.loading=!0,this.$axios.get(this.URL.BASEURL+this.URL.warn_userList,{params:{keyword:this.input_r_keyword,sys_group_id:1==this.$cookie.getCookie("isSuperManage")?sessionStorage.getItem("company_session_defaultCorp_level_1").toString():"",page:this.page,page_size:this.page_size}}).then(function(e){(e=e.data)&&0==e.errno?(t.tableData=e.rst.data,t.total=e.rst.pageInfo.total,t.pages=e.rst.pageInfo.pages):4002!=e.errno&&t.$message({message:e.err,type:"warning"}),t.loading=!1}).catch(function(){t.loading=!1})}}},g={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"con"},[a("div",{staticClass:"topTagBox flex"},[a("div",{staticClass:"left flex-align-center"},[a("div",{class:["tagItem",2==e.type?"tagItem_active":""],on:{click:function(t){e.type=2}}},[e._v("预警名单")]),e._v(" "),a("div",{class:["tagItem",1==e.type?"tagItem_active":""],on:{click:function(t){e.type=1,e.get_user_init()}}},[e._v("预警组")])])]),e._v(" "),a("warnList",{directives:[{name:"show",rawName:"v-show",value:1==e.type,expression:"type==1"}],attrs:{warn_user_list:e.warn_user_list}}),e._v(" "),2==e.type?[a("div",{staticClass:"tableInfo"},[a("div",{staticClass:"flex"},[a("div",{staticClass:"totalCustom"},[e._v("共"),a("span",[e._v(e._s(e.total))]),e._v("个预警人")]),e._v(" "),a("self-input",{key:"tab1",staticStyle:{"margin-left":"60px"},attrs:{hasLabel:!1,keyword:e.input_r_keyword,label_name:"关键词搜索"},on:{inputChange:function(t){e.input_r_keyword=t,e.user_init()}}})],1),e._v(" "),a("div",{staticClass:"flex"},[a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(t){return e.userOperate()}}},[e._v("添加预警人")])],1)]),e._v(" "),a("el-table",{ref:"multipleTable",staticStyle:{width:"100%"},attrs:{height:"calc(100vh - 256px)",data:e.tableData,"tooltip-effect":"dark"}},[a("el-table-column",{attrs:{"show-overflow-tooltip":"",align:"center",label:"联系人"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v(e._s(t.row.name))])]}}],null,!1,1281056470)}),e._v(" "),a("el-table-column",{attrs:{label:"电话",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.phone)+"\n ")]}}],null,!1,1070346721)}),e._v(" "),a("el-table-column",{attrs:{label:"操作",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"flex",staticStyle:{"justify-content":"center"}},[a("div",{staticClass:"c-00B38A pointer",staticStyle:{margin:"0 6px"},on:{click:function(a){return e.userOperate(t.row)}}},[e._v("编辑")]),e._v(" "),a("div",{staticClass:"c-F03F5C pointer",staticStyle:{margin:"0 6px"},on:{click:function(a){return e.deletYes(t.row)}}},[e._v("删除")])])]}}],null,!1,2122281517)})],1),e._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total>0"}],staticClass:"pagination"},[a("el-pagination",{attrs:{background:"","current-page":e.page,layout:"prev, pager, next","page-count":Number(e.pages)},on:{"current-change":e.handleCurrentChange}})],1)]:e._e(),e._v(" "),a("el-dialog",{staticClass:"dialogCon_permission",attrs:{title:e.dialogTitleName,visible:e.operateFlag,"append-to-body":!0,width:"500px"},on:{"update:visible":function(t){e.operateFlag=t}}},[a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.dialogLoading,expression:"dialogLoading"}],staticClass:"dialogCon"},[a("div",{staticClass:"itemBox",staticStyle:{"margin-bottom":"20px"}},[a("div",{staticClass:"name"},[a("em",[e._v("*")]),e._v("预警人姓名:")]),e._v(" "),a("div",{staticClass:"ipt"},[a("el-input",{attrs:{size:"small",placeholder:"请输入预警人姓名"},model:{value:e.userName,callback:function(t){e.userName=t},expression:"userName"}})],1)]),e._v(" "),a("div",{staticClass:"itemBox",staticStyle:{"margin-bottom":"20px"}},[a("div",{staticClass:"name"},[a("em",[e._v("*")]),e._v("预警人手机:")]),e._v(" "),a("div",{staticClass:"ipt"},[a("el-input",{attrs:{size:"small",placeholder:"请输入预警人手机号"},model:{value:e.userPhone,callback:function(t){e.userPhone=t},expression:"userPhone"}})],1)])]),e._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{size:"mini"},on:{click:function(t){e.operateFlag=!1}}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{size:"mini",type:"primary"},on:{click:function(t){return e.addUser(1)}}},[e._v("确 定")])],1)])],2)},staticRenderFns:[]};var d=a("VU/8")(c,g,!1,function(e){a("PHcJ")},"data-v-78e58adf",null);t.default=d.exports}});