1 |
- webpackJsonp([19],{"8teM":function(t,e,n){t.exports=n.p+"static/img/kaigongsi.929270e.png"},Bnl0:function(t,e,n){"use strict";var i={data:function(){return{is_production:!0}},created:function(){-1==window.location.host.indexOf("dj.wenxingshuju.com")?this.is_production=!1:this.is_production=!0}},a={render:function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"codeScanningAuthorization"},[this.is_production?e("img",{staticClass:"codeImg",attrs:{src:n("o0Jg"),alt:""}}):e("img",{staticClass:"codeImg",attrs:{src:n("NsQ1"),alt:""}}),this._v(" "),this._m(0)])},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"codeHint"},[this._v("扫码成功后联系"),e("a",{attrs:{href:"https://open.work.weixin.qq.com/wwopen/userQRCode?vcode=vca215566e85b0ac81",target:"_brank"}},[e("i",{staticClass:"el-icon-thumb"}),this._v(" 客服人员")])])}]};var s=n("VU/8")(i,a,!1,function(t){n("Xe3J")},"data-v-5f4d02b0",null);e.a=s.exports},NsQ1:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeoAAAHqAQAAAADjFjCXAAAAAmJLR0QAAd2KE6QAAAAJcEhZcwAAAEgAAABIAEbJaz4AAAAJdnBBZwAAAeoAAAHqAKEp/wgAAAUTSURBVHhe7ZxtahwxEEQX5gC5ig9g0NX3SHOABUVV1ZJmjAMzaoVFSxdE1tcL4TmF1vmRx8Oy5evZK9Tjx/fvPxuG/MTsmV9/eJm/cRleZW9POT8DP8ePX87+Ex7Hk3Zu4XZ5Jg4vJkcDTJZQ4mkIfC5+PTPxncNN/IG/5jNxqkMvSyUpLMufllmnPAh8Ln49n4ejjdSU9VagnFxZTTGTv8Dn4tfzgTiF9ccBMxX21NrA5+OXMxOvO9dTL0/FpUnrLGHHV+Nly8CRqfjlTMQtt/ADZ3Hj9kxcGPafcOC/Xf1t2H/CE75x17N37OfRrTzn4dZQi14INFRdPZ9aAre5Dx/I4jjegKzXAC+ElnorYK0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oLfzRmtSBfHxhDFxx4lcjHIMfr+Gf+FIead/+A85yqqY4pLDmj+Sz4184DXwOfjH/+sZdzBnn1zv/mTaJ+bhcZfQS/nphMWNXKVb4F/ob+Bz8YoRjmPF93x8YbuBMwnQmDnW9tf2F0NOBgUvhX7Ab+Bz8YoQnTN+AHzIZ31hYaNKTwJlMNrGtunwmAp+D38xn4fY4wB8GvRCorlrLSF0KfCp+LxNwTt6Pw4a9CxgkzB6M2tp+BbPA5+D348ct78bthSiG1Noq8fCRuD0ithf4FHwgXvwvqSpBk6yAjogAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjItMDQtMTJUMTY6MTU6MjArMDg6MDBWfkkNAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIyLTA0LTEyVDE2OjE1OjIwKzA4OjAwJyPxsQAAAABJRU5ErkJggg=="},RGf1:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("Bnl0"),a=n("McOJ"),s=n("Gu7T"),r=n.n(s),o=n("//Fk"),c=n.n(o),l=n("mvHQ"),u=n.n(l),d=n("Xxa5"),f=n.n(d),A=n("exGp"),g=n.n(A),h={name:"bindAccountDialog",props:{dialogVisible:{type:Boolean,default:function(){return!1}},id:{type:Number|String,default:function(){return""}}},data:function(){return{loading:!1,accountOptions:[],allAccountInfo:[],form:{user_id_list:[],user_info_list:[]}}},computed:{title:function(){return"分配账号"}},watch:{dialogVisible:function(t){t&&(this.handleGetOptions(),this.handleGetFormData())}},methods:{handleGetOptions:function(){var t=this;return g()(f.a.mark(function e(){var n,i,a;return f.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.$axios.get(t.URL.BASEURL+t.URL.manager_list,{params:{page:1,page_size:500}});case 2:n=e.sent,i=n.data,(a=void 0===i?{}:i)&&0==a.errno?t.accountOptions=a.rst.data:4002!=a.errno&&t.$message.warning(a.err);case 6:case"end":return e.stop()}},e,t)}))()},handleConfirm:function(){var t=this;return g()(f.a.mark(function e(){var n,i,a,s,r;return f.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.handleFormValidate();case 3:return n=""+t.URL.BASEURL+t.URL.authority_bindUser,i={id:t.id,user_id_list:u()(t.form.user_id_list)},t.loading=!0,e.next=8,t.$axios.post(n,i);case 8:a=e.sent,s=a.data,(r=void 0===s?{}:s)&&0==r.errno?(t.$message.success("操作成功"),t.handleClearFormData(),t.$emit("confirm")):4002!=r.errno&&t.$message.warning(r.err||"操作失败"),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(0),console.log("error => ",e.t0);case 17:return e.prev=17,t.loading=!1,e.finish(17);case 20:case"end":return e.stop()}},e,t,[[0,14,17,20]])}))()},handleCancel:function(){this.handleClearFormData(),this.$emit("cancel")},handleFormValidate:function(){var t=this;return new c.a(function(e,n){t.form.user_id_list&&t.form.user_id_list.length?e("表单校验通过"):(t.$message.warning("请选择账号"),n("表单校验未通过"))})},handleGetFormData:function(){var t=this;return g()(f.a.mark(function e(){var n,i,a,s,r;return f.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n=""+t.URL.BASEURL+t.URL.authority_getBindUser,i={id:t.id},t.loading=!0,e.next=6,t.$axios.get(n,{params:i});case 6:a=e.sent,s=a.data,(r=void 0===s?{}:s)&&0==r.errno?(t.form.user_id_list=r.rst.map(function(t){return t.user_id}),t.form.user_info_list=r.rst.map(function(t){return{id:t.user_id,name:t.user_name}})):4002!=r.errno&&t.$message.warning(r.err||"操作失败"),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(0),console.log("error => ",e.t0);case 15:return e.prev=15,t.loading=!1,e.finish(15);case 18:case"end":return e.stop()}},e,t,[[0,12,15,18]])}))()},handleClearFormData:function(){this.form.user_id_list=[],this.handleGetUserInfoList([])},onCloseUserTag:function(t){var e=this.form.user_info_list[t].id,n=this.form.user_id_list.findIndex(function(t){return t===e});this.form.user_id_list.splice(n,1),this.form.user_info_list.splice(t,1)},onChangeUserIdList:function(t){this.form.user_id_list=[].concat(r()(t)),this.handleGetUserInfoList(t)},handleGetUserInfoList:function(t){var e=this;if(!t||!t.length)return this.form.user_info_list=[],!1;this.allAccountInfo=[].concat(r()(this.form.user_info_list),r()(this.accountOptions));var n=[];t.forEach(function(t){var i=e.allAccountInfo.find(function(e){return e.id===t});i&&n.push(i)}),this.form.user_info_list=[].concat(n)}}},m={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("el-dialog",{staticClass:"bindAccount-dialog",attrs:{visible:t.dialogVisible,"before-close":t.handleCancel,title:t.title,width:"550px","close-on-click-modal":!1},on:{"update:visible":function(e){t.dialogVisible=e}}},[n("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"form-wrap"},[n("div",{staticClass:"form-item flex-start"},[n("span",{staticClass:"lable required"},[t._v("账号")]),t._v(" "),n("div",{staticClass:"account-wrap"},[n("el-select",{attrs:{size:"small",placeholder:"请选择账号",clearable:"",filterable:"",multiple:"","collapse-tags":""},on:{change:t.onChangeUserIdList},model:{value:t.form.user_id_list,callback:function(e){t.$set(t.form,"user_id_list",e)},expression:"form.user_id_list"}},t._l(t.accountOptions,function(t){return n("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})}),1),t._v(" "),t.form.user_info_list&&t.form.user_info_list.length?n("div",{staticClass:"user-wrap"},t._l(t.form.user_info_list,function(e,i){return n("el-tag",{key:e.id,staticClass:"user-item-wrap",attrs:{closable:"","disable-transitions":""},on:{close:function(e){return t.onCloseUserTag(i)}}},[t._v("\n "+t._s(e.name)+"\n ")])}),1):t._e()],1)])]),t._v(" "),n("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{attrs:{size:"mini"},on:{click:t.handleCancel}},[t._v("取 消")]),t._v(" "),n("el-button",{attrs:{size:"mini",type:"primary",disabled:t.loading},on:{click:t.handleConfirm}},[t._v("确 定")])],1)])},staticRenderFns:[]};var p=n("VU/8")(h,m,!1,function(t){n("betr")},"data-v-0a532484",null).exports,v={components:{selfInput:a.a,authorize:i.a,bindAccountDialog:p},data:function(){return{type:1,authorizeFalg:!1,loading:!1,page:1,pages:0,total:0,page_size:40,tableData:[],input_keyword:"",gzhData:[],bindTsFlag:!1,tsFalg:!1,tsData:{},bindAccountVisible:!1,currentId:""}},created:function(){this.search_change()},mounted:function(){var t=this;window.onresize=function(){t.css_reset()}},methods:{search_change:function(){1==this.type&&this.init(1)},changeType:function(t){this.type=t,this.search_change()},gzhCode:function(){var t=this;this.$loading(this.$loadingConfig),this.$axios.get(this.URL.BASEURL+this.URL.wxad_getAuthUrl,{}).then(function(e){e=e.data;var n=document.createElement("a");n.setAttribute("href",e),n.setAttribute("target","_blank"),n.setAttribute("id","gzh_startTelMedicine"),document.body.appendChild(n),n.click(),document.body.removeChild(document.getElementById("gzh_startTelMedicine")),t.$loading(t.$loadingConfig).close()}).catch(function(){t.$loading(t.$loadingConfig).close()})},css_reset:function(){Array.prototype.slice.call(document.getElementsByClassName("corpItemCon")).forEach(function(t,e){t.getElementsByClassName("corpName")[0].offsetHeight>26&&t.classList.add("corpItemConMoreFont")})},resetCorp:function(t){var e=this;this.$loading(this.$loadingConfig),this.$axios.get(this.URL.BASEURL+this.URL.getCorCustomerList,{params:{corpid:t.corpid}}).then(function(t){t=t.data;e.$loading(e.$loadingConfig).close(),t&&0==t.errno?e.$message({message:"同步企业信息成功!",type:"warning"}):e.$message({message:t.err,type:"warning"})}).catch(function(){e.$loading(e.$loadingConfig).close()})},createAuthCode:function(){this.authorizeFalg=!0},init:function(t){var e=this;this.page=t||this.page,this.loading=!0,this.$axios.get(this.URL.BASEURL+this.URL.authorize_corpList,{params:{keyword:this.input_keyword,page:this.page,page_size:this.page_size}}).then(function(t){t=t.data;e.loading=!1,t&&0==t.errno?(e.tableData=t.rst.data,e.total=t.rst.pageInfo.total,e.pages=t.rst.pageInfo.pages,e.$nextTick(function(){e.css_reset()})):4002!=t.errno&&e.$message({message:t.err,type:"warning"})}).catch(function(t){e.loading=!1})},handleCurrentChange:function(t){1==this.type&&this.init(t)},onClickBindAccount:function(t){this.currentId=t.id,this.bindAccountVisible=!0},onConfirmBindAccount:function(){this.init(),this.bindAccountVisible=!1},onCancelBindAccount:function(){this.bindAccountVisible=!1}}},_={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}]},[1==t.type?i("div",[i("div",{staticClass:"tableInfo"},[i("div",[i("div",{staticClass:"flex"},[i("div",{staticClass:"totalCustom"},[t._v("已授权"),i("span",[t._v(t._s(t.total))]),t._v("个企业")]),t._v(" "),i("self-input",{staticStyle:{"margin-left":"80px"},attrs:{label_name:"企业关键词"},on:{inputChange:function(e){t.input_keyword=e,t.init(1)}}})],1)]),t._v(" "),i("div",{staticClass:"flex"},[i("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.createAuthCode}},[t._v(t._s(t.$store.state.simpleName)+"授权")])],1)]),t._v(" "),i("div",{staticClass:"bg-ffffff"},[i("div",{staticClass:"corpListBox"},t._l(t.tableData,function(e,a){return i("div",{key:a,staticClass:"corpItem"},[i("img",{staticClass:"bgImg",attrs:{src:n("8teM"),alt:""}}),t._v(" "),0==e.enable||2==e.enable?i("div",{class:["corpMask",0==e.enable?"corpMask_jy":""]}):t._e(),t._v(" "),i("div",{class:["status",0==e.enable?"jy_status":2==e.enable?"qx_status":""]},[t._v(t._s(0==e.enable?"禁用":2==e.enable?"取消授权":"正常"))]),t._v(" "),i("div",{staticClass:"corpItemCon"},[i("div",{staticClass:"corpName"},[t._v(t._s(e.corp_name?e.corp_name:(e.corp_full_name,e.corp_full_name)))]),t._v(" "),i("div",{staticClass:"created_at"},[t._v(t._s(e.created_at))]),t._v(" "),i("button",{staticClass:"refresh_button",on:{click:function(n){return t.resetCorp(e)}}},[t._v("同步")]),t._v(" "),i("button",{staticClass:"refresh_button w-75",on:{click:function(n){return t.onClickBindAccount(e)}}},[t._v("分配账号")])])])}),0),t._v(" "),t.loading||0!=t.tableData.length?t._e():i("div",{staticClass:"noHave"},[i("img",{attrs:{src:n("60Fb"),alt:""}}),t._v(" "),i("div",[t._v("您还未进行企微授权,请"),i("span",{on:{click:t.createAuthCode}},[t._v("授权")])])])])]):t._e(),t._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:t.total>0,expression:"total>0"}],staticClass:"pagination"},[i("el-pagination",{attrs:{background:"","current-page":t.page,layout:"prev, pager, next","page-count":Number(t.pages)},on:{"current-change":t.handleCurrentChange}})],1),t._v(" "),i("el-dialog",{attrs:{title:"企微授权",visible:t.authorizeFalg,width:"400px",center:""},on:{"update:visible":function(e){t.authorizeFalg=e}}},[i("authorize")],1),t._v(" "),i("bindAccountDialog",{attrs:{dialogVisible:t.bindAccountVisible,id:t.currentId},on:{confirm:t.onConfirmBindAccount,cancel:t.onCancelBindAccount}})],1)},staticRenderFns:[]};var x=n("VU/8")(v,_,!1,function(t){n("iq5h")},"data-v-5cdc0b86",null);e.default=x.exports},Xe3J:function(t,e){},betr:function(t,e){},iq5h:function(t,e){},o0Jg:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeoAAAHqAQAAAADjFjCXAAAAAmJLR0QAAd2KE6QAAAAJcEhZcwAAAEgAAABIAEbJaz4AAAAJdnBBZwAAAeoAAAHqAKEp/wgAAAT2SURBVHhe7ZxtahwxEEQX5gC+Sg5gmKv7SHMAgzJV1ZJmHQc03QqOli6IrI9+kDynV/IfPx6WrYznqFDPBPzzjcP2gdnH8f62lWNHOYf3cw/wR+LPmYCP5vgK+/FdO7dwK56LQ92paePMNPHw3KNOE5v4bHw0M/GDw038gf/mc/EqR67QsK1rpRORusSn4qN5QbwKYwmFPd0VmPEg8dn4cF4RP3tV94KCJYRduzbxf4KPZiZed8ZTi2fi7fnB2dZvDR2gk62dE5+Lj2cibrmFXzhLGKehoeH4Cif+Xel3w/EVnvCNG8/Rsa9Ht/IxF+c/YeNDhJrUtcd+VuKgDZbEe4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