You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index-2fecca00.js 4.8KB

1
  1. import{G as z,E as X,y as j,a as A,r as y,o as F,b as r,c as x,L as b,h as e,u as p,f as t,j as W,d as H,F as J,H as K,e as d,i as N,k as Q,s as Y}from"./index-dd5fae99.js";import{E as Z}from"./index-29b4120c.js";import{c as ee,d as te}from"./expertStore-7d1ebc1f.js";import{g as v,a as ae}from"./getIsShowRegionTree-21a24141.js";const oe={class:"flex"},le={class:"flex justify-between"},ne=["onClick"],re=["onClick"],se=["onClick"],de=["onClick"],ie=Q({name:"expertStore"}),fe=Object.assign(ie,{setup(pe){const{dictList:g}=z(X.dictStore),u=j(),{proxy:k}=Y(),n=A({expertName:void 0,company:void 0,expertTypeDictionaryCode:void 0,status:void 0,maxDeclareAmount:void 0,maxApprovalAmount:void 0}),m=y(),w=y(0),D=A([{label:"序号",type:"index",width:"60"},{label:"专家姓名",key:"expertName",prop:"expertName",minWidth:"80",showOverflowTooltip:!0},{label:"工作单位",key:"company",prop:"company",minWidth:"150",showOverflowTooltip:!0},{label:"手机号码",key:"phoneNo",prop:"phoneNo",width:"120"},{label:"专家类型",key:"expertType[0].dictionaryName",prop:"expertType[0].dictionaryName",width:"80"},{label:"创建时间",key:"createTime",prop:"createTime",width:"180"},{label:"操作",slot:"action",width:"240",fixed:"right"}]),C=y([]),I=y(),P=o=>{n.intentionRegionInfo={regionCode:o.regionCode,regionLevel:o.regionLevel},m.value.pageParams.pageNumber=1,i()},i=async(o=m.value.pageParams)=>{const a=await ee({...o,...n,year:n.year*1||void 0,areaCode:I.value||void 0});C.value=a.data.records,w.value=a.data.total},M=()=>{i()},V=()=>{n.expertName=void 0,n.company=void 0,n.expertTypeDictionaryCode=void 0,m.value.pageParams.pageNumber=1,m.value.pageParams.pageSize=10,i()},R=o=>{o.userId?u.push({name:"addOrEditExpert",query:{id:o.userId}}):u.push({name:"addOrEditExpert"})},G=o=>{u.push({name:"expertDetail",query:{id:o.userId}})},L=o=>{u.push({name:"deputyActivityRecord",query:{id:o.userId,name:o.expertName}})},O=()=>{const o=new Date().getTime(),a=window.btoa(o),s=u.resolve({name:"expertEnroll",query:{time:a}});window.open(s.href,"_blank")},S=o=>{k.$messageBox.confirm(`确定要删除${o.expertName}专家吗?`,"提示!",{type:"warning"}).then(async()=>{await te(o.userId),k.$message.success("删除成功"),i()})};return F(()=>{v(["SUPER_ADMIN","REGION_MANAGER","EXPERT_ADMIN"])||i()}),(o,a)=>{const s=r("el-col"),T=r("el-input"),_=r("el-form-item"),U=r("el-option"),$=r("el-select"),E=r("el-row"),f=r("el-button"),B=r("el-form"),h=r("el-card"),q=r("table-list");return x(),b(E,null,{default:e(()=>[p(v)(["SUPER_ADMIN","REGION_MANAGER","EXPERT_ADMIN"])?(x(),b(s,{key:0,style:{"padding-right":"16px"},span:4},{default:e(()=>[t(Z,{params:p(ae)({SUPER_ADMIN:!1,REGION_MANAGER:!1,EXPERT_ADMIN:!1}),onGetTree:P},null,8,["params"])]),_:1})):W("",!0),t(s,{span:p(v)(["SUPER_ADMIN","REGION_MANAGER","EXPERT_ADMIN"])?20:24},{default:e(()=>[t(h,{class:"w-full search"},{default:e(()=>[t(B,{model:n,size:"small","label-suffix":":"},{default:e(()=>[t(E,{gutter:16,class:"mb-16"},{default:e(()=>[t(s,{span:8},{default:e(()=>[t(_,{label:"专家姓名"},{default:e(()=>[t(T,{modelValue:n.expertName,"onUpdate:modelValue":a[0]||(a[0]=l=>n.expertName=l),placeholder:"请输入"},null,8,["modelValue"])]),_:1})]),_:1}),t(s,{span:8},{default:e(()=>[t(_,{label:"工作单位"},{default:e(()=>[t(T,{modelValue:n.company,"onUpdate:modelValue":a[1]||(a[1]=l=>n.company=l),placeholder:"请输入"},null,8,["modelValue"])]),_:1})]),_:1}),t(s,{span:8},{default:e(()=>[t(_,{label:"专家类型"},{default:e(()=>[t($,{modelValue:n.expertTypeDictionaryCode,"onUpdate:modelValue":a[2]||(a[2]=l=>n.expertTypeDictionaryCode=l),placeholder:"全部",class:"w-full"},{default:e(()=>[(x(!0),H(J,null,K(p(g)&&p(g).length&&p(g).find(l=>l.dictionaryName==="expert_type").dictionaryList,(l,c)=>(x(),b(U,{key:c,label:l.describe,value:l.dictionaryCode},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),t(E,null,{default:e(()=>[t(s,{span:24},{default:e(()=>[t(_,{class:"btn"},{default:e(()=>[d("div",oe,[t(f,{type:"primary",onClick:M},{default:e(()=>a[3]||(a[3]=[N("查询")])),_:1}),t(f,{onClick:V},{default:e(()=>a[4]||(a[4]=[N("重置")])),_:1})])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),t(h,{class:"w-full mt-8"},{header:e(()=>[d("div",le,[a[7]||(a[7]=d("span",null,"列表",-1)),d("div",null,[t(f,{type:"primary",plain:"",size:"small",icon:"Plus",onClick:R},{default:e(()=>a[5]||(a[5]=[N("新增专家")])),_:1}),t(f,{type:"primary",size:"small",onClick:O},{default:e(()=>a[6]||(a[6]=[N("专家报名")])),_:1})])])]),default:e(()=>[t(q,{ref_key:"tableListRef",ref:m,column:D,data:C.value,total:w.value,onGetTableData:i},{action:e(({scope:l})=>[d("a",{onClick:c=>R(l.row)},"编辑",8,ne),d("a",{onClick:c=>G(l.row)},"详情",8,re),d("a",{onClick:c=>L(l.row)},"履职记录",8,se),d("a",{class:"text-danger",onClick:c=>S(l.row)},"删除",8,de)]),_:1},8,["column","data","total"])]),_:1})]),_:1},8,["span"])]),_:1})}}});export{fe as default};