(("undefined"!==typeof self?self:this)["webpackJsonpcontractor_management_sm"]=("undefined"!==typeof self?self:this)["webpackJsonpcontractor_management_sm"]||[]).push([[14],{b43a:function(e,t,a){"use strict";a.r(t);var o=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{directives:[{name:"dialogDrag",rawName:"v-dialogDrag"}],staticClass:"small-dialog",attrs:{"close-on-click-modal":!1,title:"承包商负责人账号信息",visible:e.dialogVisible},on:{"update:visible":function(t){e.dialogVisible=t},close:e.closeDialog}},[a("el-form",{attrs:{model:e.form,"label-width":"150px"}},[a("el-form-item",{attrs:{label:"所属承包商："}},[e._v(e._s(e.form.contractorName))]),a("div",{attrs:{id:"copyContent"}},[a("el-form-item",{attrs:{label:"负责人账号："}},[e._v(e._s(e.form.userName))]),a("el-form-item",{attrs:{label:"初始密码："}},[e._v(e._s(e.form.initialPwd))])],1),a("el-form-item",{attrs:{label:"初始密码规则："}},[e._v("账号拼音首字母大写+.身份证后四位")])],1),a("div",{staticClass:"text-center",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{size:"small",type:"primary"},on:{click:e.copy}},[e._v("复制信息")]),a("el-button",{staticClass:"iconfont icon-close",attrs:{size:"small"},on:{click:function(t){return e.closeDialog()}}},[e._v("取消")])],1)],1)},n=[],i=a("c14f"),s=a("3835"),c=a("1da1"),r=(a("99af"),a("77b0")),l=new r["ContractorAccountRelationApi"],m={props:{visible:{type:Boolean,default:!1},id:{type:String,required:!0}},data:function(){return{form:{}}},computed:{dialogVisible:{get:function(){return this.visible},set:function(e){this.$emit("update:visible",e)}}},watch:{dialogVisible:function(e){e&&this.getDetail()}},methods:{getDetail:function(){var e=this;return Object(c["a"])(Object(i["a"])().m((function t(){var a,o,n,c;return Object(i["a"])().w((function(t){while(1)switch(t.n){case 0:return t.n=1,l.getContractorLeaderAccountInfo(e.id);case 1:a=t.v,o=Object(s["a"])(a,2),n=o[0],c=o[1],n||(e.form=c);case 2:return t.a(2)}}),t)})))()},copy:function(){var e=this;return Object(c["a"])(Object(i["a"])().m((function t(){var a,o,n;return Object(i["a"])().w((function(t){while(1)switch(t.n){case 0:if(!navigator.clipboard){t.n=2;break}return t.n=1,navigator.clipboard.writeText("负责人账号：".concat(e.form.userName,"\n初始密码：").concat(e.form.initialPwd));case 1:e.$message.success("复制成功"),t.n=3;break;case 2:document.execCommand&&document.execCommand("copy")?(a=document.getElementById("copyContent"),o=window.getSelection(),n=document.createRange(),o.rangeCount>0&&o.removeAllRanges(),n.selectNode(a),o.addRange(n),document.execCommand("copy"),e.$message.success("复制成功")):e.$message.warning("复制失败，请使用Ctrl+C或右键复制");case 3:return t.a(2)}}),t)})))()},closeDialog:function(e){this.form=this.$options.data().form,e?e():this.dialogVisible=!1}}},u=m,d=a("2877"),f=Object(d["a"])(u,o,n,!1,null,null,null);t["default"]=f.exports}}]);