webpackJsonp([23],{JsWW:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=a("P9l9"),r=a("MJLE"),n=a.n(r),o={name:"shareCode",data:function(){return{regenerate:!1,qrCodeContent:{},shares:[],qrcodeCase:"",myEnterprise:""}},methods:{getCode:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this,a={regenerate:e};Object(s.a)("/haoban-manage-web/shared-contact/get-shared-qrcode",a).then(function(a){console.log(a,"code"),1==a.data.errorCode?(console.log(e),t.qrcode(a.data.result.qrCodeContent)):t.$message.error({message:a.data.message})}).catch(function(e){t.$message.error({message:e.message})})},reFresh:function(){document.getElementById("qrcode").innerHTML="",this.qrcodeCase.clear(),this.getCode(!0)},qrcode:function(e){this.qrcodeCase=new n.a("qrcode",{width:245,height:245,text:e})},getShareBrands:function(){var e=this;Object(s.a)("/haoban-manage-web/shared-contact/get-all-shared-enterprise",{}).then(function(t){console.log(t,"shares"),1==t.data.errorCode?e.shares=t.data.result||[]:e.$message.error({message:t.data.message})}).catch(function(t){e.$message.error({message:t.message})})},getShareRelation:function(){var e=this;Object(s.a)("/haoban-manage-web/shared-contact/find-shared-contact-relation",{enterpriseIdCondition:1}).then(function(t){console.log(t,"getShareRelation"),1==t.data.errorCode?(e.shares=t.data.result||[],e.myEnterprise=t.data.result[0].exportEnterpriseName):e.$message.error({message:t.data.message})}).catch(function(t){e.$message.error({message:t.message})})},cancelShare:function(e){console.log(e)}},beforeMount:function(){this.getShareRelation(),this.getShareBrands(),this.getCode()}},i={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"share-code-div"},[a("p",{staticClass:"company-name"},[e._v(e._s(e.myEnterprise)+"的共享企业")]),e._v(" "),a("p",{staticClass:"word"},[e._v("双方共享的通讯录，选人时可以选到，同时邀请企业建立共享关系")]),e._v(" "),a("p",{staticClass:"time-tip"},[e._v("一个二维码只能和一个企业建立共享关系，24小时有效")]),e._v(" "),a("div",{staticClass:"m-t-20",attrs:{id:"qrcode"}}),e._v(" "),a("div",{staticClass:"btn-area"},[a("el-button",{attrs:{type:"primary"}},[e._v("下载"),a("i",{staticClass:"iconfont icon-icon_yunxiazai"})]),e._v(" "),a("el-button",{on:{click:function(t){e.reFresh()}}},[e._v("重新生成")])],1),e._v(" "),a("p",{staticClass:"company-name"},[e._v("已建立的共享企业")]),e._v(" "),a("div",{staticClass:"share-table"},[a("div",{staticClass:"company"},[e._v(e._s(e.myEnterprise))]),e._v(" "),a("ul",{staticClass:"list"},e._l(e.shares,function(t){return a("li",{key:t.importEnterpriseId,staticClass:"li"},[a("div",{staticClass:"name"},[e._v(e._s(t.importEnterpriseName))]),e._v(" "),a("div",{staticClass:"cancel-btn"},[a("a",{staticClass:"a-href",on:{click:function(a){e.cancelShare(t.importEnterpriseId)}}},[e._v("取消共享")])])])}))])])},staticRenderFns:[]};var c=a("VU/8")(o,i,!1,function(e){a("hh5o")},null,null);t.default=c.exports},hh5o:function(e,t){}});
//# sourceMappingURL=23.5698c5d035e2fff7c162.js.map