25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
6.4KB

  1. var X=Object.defineProperty;var W=Object.getOwnPropertySymbols;var Z=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable;var P=(u,o,l)=>o in u?X(u,o,{enumerable:!0,configurable:!0,writable:!0,value:l}):u[o]=l,y=(u,o)=>{for(var l in o||(o={}))Z.call(o,l)&&P(u,l,o[l]);if(W)for(var l of W(o))ee.call(o,l)&&P(u,l,o[l]);return u};import{p as ae,r as I}from"./userManage.0ffac862.js";import te from"./userDialog.e57c1dad.js";import{r as p,o as oe,a as j,f as d,P as le,g as k,c as x,e as r,w as i,C as ne,n as re,b as C,p as $,h as J,O as B,Q as L,V as ie,E as D}from"./index.56ad3315.js";import"./companyManage.4f2ff780.js";import"./projectManage.e10fda65.js";import"./uploadAction.9c148b89.js";const se=["onClick"],de=["onClick"],ue={key:0,class:"text-primary",style:{color:"green"}},me={key:1,class:"text-danger"},pe={class:"dialog-footer"},ce=J("\u53D6\u6D88"),_e=J(" \u786E\u5B9A "),we={__name:"index",setup(u){const o=[{name:"\u5DE5\u7A0B\u5E08",key:"engineer",auth:"super_admin,enterprise_admin,regional_general_manager,project_manager"},{name:"\u9879\u76EE\u7ECF\u7406",key:"project_manager",auth:"super_admin,enterprise_admin,regional_general_manager"},{name:"\u4F01\u4E1A\u7BA1\u7406\u5458",key:"enterprise_admin",auth:"super_admin,regional_general_manager"},{name:"\u5730\u533A\u603B\u7ECF\u7406",key:"regional_general_manager",auth:"super_admin"},{name:"\u9A7E\u9A76\u5458",key:"driver",auth:"super_admin"},{name:"\u8F66\u8F86\u7BA1\u7406\u5458",key:"driver_admin",auth:"super_admin,enterprise_admin,regional_general_manager,project_manager"},{name:"\u8D85\u7EA7\u7BA1\u7406\u5458",key:"super_admin",auth:"super_admin"}],l=[{label:"\u5E8F\u53F7",type:"index",width:"60"},{label:"\u7528\u6237\u59D3\u540D",key:"realName",prop:"realName",minWidth:"110",showOverflowTooltip:!0},{label:"\u624B\u673A\u53F7\u7801",key:"phoneNo",prop:"phoneNo",minWidth:"120",showOverflowTooltip:!0},{label:"\u767B\u5F55\u8D26\u53F7",key:"userName",prop:"userName",minWidth:"120",showOverflowTooltip:!0},{label:"\u6240\u5C5E\u4F01\u4E1A",key:"companyName",prop:"companyName",minWidth:"150"},{label:"\u7528\u6237\u89D2\u8272",key:"role",prop:"role",render:a=>{var e,n;return B("span",(n=(e=o.find(s=>s.key===a.role))==null?void 0:e.name)!=null?n:"-")},minWidth:"100"},{label:"\u6CE8\u518C\u65F6\u95F4",key:"createOn",prop:"createOn",minWidth:"200"},{label:"\u64CD\u4F5C",key:"action",slot:"action",width:"160",fixed:"right"}],U=[{label:"\u5E8F\u53F7",type:"index",width:"60"},{label:"\u7528\u6237\u59D3\u540D",key:"realName",prop:"realName",minWidth:"110",showOverflowTooltip:!0},{label:"\u624B\u673A\u53F7\u7801",key:"phoneNo",prop:"phoneNo",minWidth:"120",showOverflowTooltip:!0},{label:"\u767B\u5F55\u8D26\u53F7",key:"userName",prop:"userName",minWidth:"120",showOverflowTooltip:!0},{label:"\u6240\u5C5E\u4F01\u4E1A",key:"companyName",prop:"companyName",minWidth:"150"},{label:"\u7528\u6237\u89D2\u8272",key:"role",prop:"role",render:a=>{var e,n;return B("span",(n=(e=o.find(s=>s.key===a.role))==null?void 0:e.name)!=null?n:"-")},minWidth:"100"},{label:"\u6CE8\u518C\u65F6\u95F4",key:"createOn",prop:"createOn",minWidth:"200"},{label:"\u5BA1\u6838\u65F6\u95F4",key:"updateOn",prop:"updateOn",minWidth:"200"},{label:"\u5BA1\u6838\u7ED3\u679C",key:"result",slot:"result",width:"100",fixed:"right"}],w=p(l);oe(()=>{c(!1)});const b=p(null),R=p([]),T=p(0),N=p(!0);function c(a){a?w.value=U:w.value=l,N.value=!0;const e=b.value.pageParams,n=y({audited:a},e);ae(n).then(s=>{console.log(s.data.records);const v=s.data.records,h=[];for(let _=0;_<v.length;_++)h.push(y(y({},v[_]),JSON.parse(v[_].registerParamJson)));console.log(h),R.value=h,T.value=s.data.total}).finally(()=>{N.value=!1})}const f=j({visible:!1,rowData:void 0});function A(a){g.value=!0,m.registerRecordId=a.registerRecordId,console.log(a)}function M(a){L.confirm("\u786E\u5B9A\u8981\u901A\u8FC7\u5BA1\u6838\u5417").then(()=>{const e=ie.service({fullscreen:!0});I({auditOpinion:"\u540C\u610F",registerRecordId:a.registerRecordId,status:"APPROVED"}).then(n=>{D.success("\u64CD\u4F5C\u6210\u529F"),c(!1),S(a)}).finally(()=>{e.close()})}).catch(()=>{})}function S(a){L.confirm("\u662F\u5426\u4FEE\u6539\u7528\u6237").then(()=>{f.visible=!0,f.rowData={userId:a.userId}}).catch(()=>{})}function z(){if(m.auditOpinion===""){D.warning("\u8BF7\u586B\u5199\u62D2\u7EDD\u7406\u7531");return}V.value=!0,I(m).then(a=>{a.code===200&&(D.success("\u64CD\u4F5C\u6210\u529F"),c(!1))}).finally(()=>{g.value=!1,V.value=!1,m.registerRecordId="",m.auditOpinion=""})}const O=p("1");function F(a){console.log(a),b.value.pageParams.pageNumber=1,b.value.pageParams.pageSize=10,a.props.name==="1"?c(!1):c(!0)}function G(){O.value==="1"?c(!1):c(!0)}const g=p(!1),V=p(!1),m=j({auditOpinion:"",registerRecordId:"",status:"REJECTED"});return(a,e)=>{const n=d("el-tab-pane"),s=d("el-tabs"),v=d("table-list"),h=d("el-card"),_=d("el-input"),Q=d("el-form-item"),Y=d("el-form"),E=d("el-button"),q=d("el-dialog"),H=le("loading");return k(),x("div",null,[r(h,{shadow:"never"},{default:i(()=>[ne((k(),re(s,{modelValue:O.value,"onUpdate:modelValue":e[0]||(e[0]=t=>O.value=t),class:"demo-tabs",onTabClick:F},{default:i(()=>[r(n,{label:"\u5F85\u5BA1\u6838\u5217\u8868",name:"1"}),r(n,{label:"\u5BA1\u6838\u8BB0\u5F55",name:"2"})]),_:1},8,["modelValue"])),[[H,N.value]]),r(v,{ref_key:"tableListRef",ref:b,column:w.value,data:R.value,total:T.value,onGetTableData:e[1]||(e[1]=t=>G())},{action:i(({scope:t})=>[C("a",{class:"text-primary",onClick:K=>M(t.row)},"\u901A\u8FC7",8,se),C("a",{class:"text-danger",onClick:K=>A(t.row)},"\u62D2\u7EDD",8,de)]),result:i(({scope:t})=>[t.row.status==="APPROVED"?(k(),x("span",ue,"\u901A\u8FC7")):$("",!0),t.row.status==="REJECTED"?(k(),x("span",me,"\u9A73\u56DE")):$("",!0)]),_:1},8,["column","data","total"])]),_:1}),r(q,{modelValue:g.value,"onUpdate:modelValue":e[4]||(e[4]=t=>g.value=t),title:"\u62D2\u7EDD\u7533\u8BF7",width:"540px"},{footer:i(()=>[C("div",pe,[r(E,{onClick:e[3]||(e[3]=t=>g.value=!1)},{default:i(()=>[ce]),_:1}),r(E,{type:"primary",loading:V.value,onClick:z},{default:i(()=>[_e]),_:1},8,["loading"])])]),default:i(()=>[r(Y,{model:m},{default:i(()=>[r(Q,{label:"\u62D2\u7EDD\u7406\u7531","label-width":"100px"},{default:i(()=>[r(_,{modelValue:m.auditOpinion,"onUpdate:modelValue":e[2]||(e[2]=t=>m.auditOpinion=t),autocomplete:"off",placeholder:"\u8BF7\u586B\u5199\u62D2\u7EDD\u7406\u7531",autosize:""},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"]),r(te,{visible:f.visible,data:f.rowData,onClose:e[5]||(e[5]=t=>f.visible=!1)},null,8,["visible","data"])])}}};export{we as default};