index.10e06706.js 7.3 KB

1
  1. import{_ as C,a1 as D,a as o,z as E,r as x,X as M,b,o as w,g as I,d as e,e as r,u as N,t as S,w as p,m as s,F as L,aW as A,aX as B,h as V,aY as O,K,L as X}from"./index.ae3804dd.js";import{U as Y}from"./UserNav.f1174816.js";import{i as H}from"./indexHeaders.11e21358.js";/* empty css */import"./CountDate.vue_vue_type_style_index_0_scoped_true_lang.6780fb58.js";import{a as J}from"./Footer.vue_vue_type_style_index_0_scoped_true_lang.ffc5e9ce.js";import{F as P}from"./Footer.91ace452.js";import{u as W}from"./useI18n.209911aa.js";/* empty css */const m=_=>(K("data-v-7857228f"),_=_(),X(),_),G={class:"login-wrapper"},Q={class:"register"},T={class:"register-left"},Z={class:"user-infos"},$={class:"user-avatar"},ee={class:"avatar"},se=["src"],ae={class:"user-ide"},ie={class:"box-s"},de={class:"userinfo-content"},re={class:"user-view"},te=m(()=>e("div",{class:"name"},"\u7528\u6237\u540D\uFF1A",-1)),le=m(()=>e("div",{class:"update"},[e("img",{src:"http://screen-test.zhousi.hdlkeji.com/aksdbn/img/update-icon.png"})],-1)),oe={class:"user-view"},ne=m(()=>e("div",{class:"name",style:{"margin-right":"35px"}},"\u5C45\u4F4F\u5730\uFF1A",-1)),me=m(()=>e("div",{class:"update"},[e("img",{src:"http://screen-test.zhousi.hdlkeji.com/aksdbn/img/update-icon.png"})],-1)),ue={class:"user-view"},ce=m(()=>e("div",{class:"name",style:{"margin-right":"20px"}},"\u516C\u53F8\u540D\u79F0\uFF1A",-1)),pe=m(()=>e("div",{class:"update"},[e("img",{src:"http://screen-test.zhousi.hdlkeji.com/aksdbn/img/update-icon.png"})],-1)),ve={class:"user-view"},_e=m(()=>e("div",{class:"name",style:{"margin-right":"20px"}},"\u771F\u5B9E\u59D3\u540D\uFF1A",-1)),fe=m(()=>e("div",{class:"update"},[e("img",{src:"http://screen-test.zhousi.hdlkeji.com/aksdbn/img/update-icon.png"})],-1)),ge={__name:"index",setup(_){localStorage.getItem("USER__INFO__")&&D().then(a=>{});const{t:u}=W(),q=o("");o(""),o("");const y=o("");o(""),o(""),E();let t=x({arr:""});const f=o(""),c=o(""),k=o({file:{}});M().then(a=>{a.code==1&&(t.arr=a.data,i.name=a.data.nickname,c.value=a.data.avatar,i.address=a.data.live_addr,i.firmName=a.data.com_name,i.realName=a.data.real_name)});const F=(a,d)=>{k.file=a,f.value=a.name},R=()=>{let a={avatar:c.value?c.value:t.avatar,nickname:i.name,com_name:i.firmName,live_addr:i.address,wx_account:i.admin,real_name:i.realName,bio:""};console.error(a);let d=new FormData;for(let n in a)d.append(n,a[n]);A(d).then(n=>{n.code==1?(localStorage.setItem(B,JSON.stringify(n.data)),V.success("\u4FEE\u6539\u6210\u529F")):V.error(n.msg)})},U=()=>{let a=new FormData;a.append("file",k.file.raw),console.error(a),O(a).then(d=>{c.value=d.data.url,f.value=""})},i=x({name:t.arr.nickname||"",id:t.arr.id||"",admin:t.arr.wx_account||"",phone:"",address:t.arr.live_addr||"",firmName:t.arr.com_name|"",realName:t.arr.real_name|""}),v={name:[{required:!0,message:u("home.login.form.userNameRequireds"),trigger:"blur",disabled:!1}],id:[{required:!0,message:u("home.login.form.userIdRequired"),trigger:"blur",disabled:!1}],admin:[{required:!0,message:u("home.login.form.wxIdRequired"),trigger:"blur",disabled:!1}],phone:[{required:!0,message:u("home.login.form.phoneRequired"),trigger:"blur",disabled:!1}],address:[{required:!0,message:u("home.login.form.addressRequired"),trigger:"blur",disabled:!1}],firmName:[{required:!0,message:u("home.login.form.companyRequired"),trigger:"blur",disabled:!1}],realName:[{required:!0,message:u("home.login.form.nameRequired"),trigger:"blur",disabled:!1}]};J();const z=()=>{console.error(11)};return(a,d)=>{const n=b("el-upload"),g=b("el-input"),h=b("el-form-item"),j=b("el-form");return w(),I(L,null,[e("div",G,[e("div",null,[r(H)]),e("div",Q,[e("div",T,[r(Y,{navIndexs:0})]),e("div",Z,[e("div",$,[e("div",ee,[e("img",{src:c.value?c.value:N(t).arr.avatar},null,8,se)]),e("div",ae,[e("div",null,[e("div",ie,S(N(t).arr.level_text?N(t).arr.level_text:"\u666E\u901A\u7528\u6237"),1)])]),r(n,{class:"avatar-uploader","show-file-list":!1,"on-success":a.handleAvatarSuccess,"on-change":F,"file-list":a.fileList},{default:p(()=>[e("div",{class:"avatar-text",onClick:z},"\u66F4\u6362\u5934\u50CF")]),_:1},8,["on-success","file-list"]),e("div",null,S(f.value),1),f.value?(w(),I("div",{key:0,class:"upload-s",onClick:U},"\u7ACB\u5373\u4E0A\u4F20")):s("v-if",!0)]),e("div",de,[r(j,{ref:"loginFormRef",model:i,rules:v},{default:p(()=>[e("div",re,[te,e("div",null,[r(h,{prop:"name"},{default:p(()=>[r(g,{modelValue:i.name,"onUpdate:modelValue":[d[0]||(d[0]=l=>i.name=l),d[1]||(d[1]=l=>q.value=l)],modelModifiers:{trim:!0},disabled:v.name[0].disabled},null,8,["modelValue","disabled"])]),_:1})]),le]),s(' <div class="user-view">'),s(' <div class="name" style="margin-right: 63px">ID\uFF1A</div>'),s(" <div>"),s(' <el-form-item prop="id">'),s(' <el-input v-model.trim="userFormState.id" :disabled="rules.id[0].disabled" v-model="userId"></el-input>'),s(" </el-form-item>"),s(" </div>"),s(' <div class="update">'),s(' <img src="http://screen-test.zhousi.hdlkeji.com/aksdbn/img/update-icon.png">'),s(" </div>"),s(" </div>"),s(' <div class="user-view">'),s(' <div class="name" style="margin-right: 20px">\u5FAE\u4FE1\u8D26\u53F7\uFF1A</div>'),s(" <div>"),s(' <el-form-item prop="admin">'),s(' <el-input v-model.trim="userFormState.admin" :disabled="rules.admin[0].disabled" v-model="userAdmin"></el-input>'),s(" </el-form-item>"),s(" </div>"),s(' <div class="update">'),s(' <img src="http://screen-test.zhousi.hdlkeji.com/aksdbn/img/update-icon.png">'),s(" </div>"),s(" </div>"),s(' <div class="user-view">'),s(' <div class="name" style="margin-right: 35px">\u624B\u673A\u53F7\uFF1A</div>'),s(" <div>"),s(' <el-form-item prop="phone">'),s(' <el-input v-model.trim="userFormState.phone" :disabled="rules.phone[0].disabled" v-model="userPhone"></el-input>'),s(" </el-form-item>"),s(" </div>"),s(' <div class="update">'),s(' <img src="http://screen-test.zhousi.hdlkeji.com/aksdbn/img/update-icon.png">'),s(" </div>"),s(" </div>"),e("div",oe,[ne,e("div",null,[r(h,{prop:"address"},{default:p(()=>[r(g,{modelValue:i.address,"onUpdate:modelValue":[d[2]||(d[2]=l=>i.address=l),d[3]||(d[3]=l=>y.value=l)],modelModifiers:{trim:!0},disabled:v.address[0].disabled},null,8,["modelValue","disabled"])]),_:1})]),me]),e("div",ue,[ce,e("div",null,[r(h,{prop:"firmName"},{default:p(()=>[r(g,{modelValue:i.firmName,"onUpdate:modelValue":d[4]||(d[4]=l=>i.firmName=l),modelModifiers:{trim:!0},disabled:v.firmName[0].disabled},null,8,["modelValue","disabled"])]),_:1})]),pe]),e("div",ve,[_e,e("div",null,[r(h,{prop:"firmName"},{default:p(()=>[r(g,{modelValue:i.realName,"onUpdate:modelValue":d[5]||(d[5]=l=>i.realName=l),modelModifiers:{trim:!0},disabled:v.realName[0].disabled},null,8,["modelValue","disabled"])]),_:1})]),fe])]),_:1},8,["model"])]),e("div",{class:"button",onClick:R},"\u7ACB\u5373\u4FEE\u6539")])])]),r(P)],64)}}};var qe=C(ge,[["__scopeId","data-v-7857228f"]]);export{qe as default};