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.

2 lines
6.7KB

  1. var ae=Object.defineProperty,te=Object.defineProperties;var oe=Object.getOwnPropertyDescriptors;var L=Object.getOwnPropertySymbols;var le=Object.prototype.hasOwnProperty,re=Object.prototype.propertyIsEnumerable;var T=(s,l,e)=>l in s?ae(s,l,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[l]=e,D=(s,l)=>{for(var e in l||(l={}))le.call(l,e)&&T(s,e,l[e]);if(L)for(var e of L(l))re.call(l,e)&&T(s,e,l[e]);return s},$=(s,l)=>te(s,oe(l));var c=(s,l,e)=>new Promise((p,k)=>{var w=d=>{try{m(e.next(d))}catch(g){k(g)}},C=d=>{try{m(e.throw(d))}catch(g){k(g)}},m=d=>d.done?p(d.value):Promise.resolve(d.value).then(w,C);m((e=e.apply(s,l)).next())});import{l as ne,e as se,a as ie,d as de,b as ce}from"./projectManage.68233816.js";import{u as ue}from"./useTreeSelectData.70197ccd.js";import{d as pe,r as y,y as me,O as U,a as M,o as _e,R as fe,f as u,g as x,c as P,e as a,w as o,v as N,b as j,n as ve,p as z,h as E,i as be}from"./index.47ab9a02.js";import ye from"./projectDialog.1b8af69e.js";import{l as we}from"./companyManage.96501d27.js";import ge from"./projectDetailDrawer.f03eb8bb.js";import"./userManage.5e5cdde5.js";const he={class:"projectManage"},Ne=E("\u67E5\u8BE2"),ke=E("\u91CD\u7F6E"),Ce={class:"flex justify-between items-center"},je=j("span",null,"\u9879\u76EE\u5217\u8868",-1),Oe=E(" \u65B0\u589E\u9879\u76EE "),De=["onClick"],xe=["onClick"],Ee=["onClick"],Ie=pe({name:"projectManage"}),Me=Object.assign(Ie,{setup(s){const{proxy:l}=be(),e=y({}),p=me.userStore.userBaseInfo,{cascaderProps:k}=ue(),w=y([]),C=y([]),m=y(),d=y(0),g=[{label:"\u5E8F\u53F7",type:"index",width:"80"},{label:"\u9879\u76EE\u540D\u79F0",key:"projectName",prop:"projectName",minWidth:"180",showOverflowTooltip:!0},{label:"\u6240\u5C5E\u4F01\u4E1A",key:"companyName",prop:"companyName",minWidth:"180",showOverflowTooltip:!0},{label:"\u6240\u5C5E\u533A\u57DF",key:"regionDisplayName",prop:"regionDisplayName",minWidth:"180",showOverflowTooltip:!0},{label:"\u9879\u76EE\u7ECF\u7406\u6570\u91CF",key:"projectManagerUserIdList",render:t=>{var r,i;return U("span",(i=(r=t.projectManagerUserIdList)==null?void 0:r.length)!=null?i:"-")},width:"140"},{label:"\u5BA1\u6838\u901A\u77E5",key:"orderAuditNotifyEnable",slot:"orderAuditNotifyEnable",width:"140",hidden:p.role!=="super_admin"},{label:"\u6307\u5B9A\u53F8\u673A\u6D3E\u5355",key:"driverOrderState",slot:"driverOrderState",width:"140",hidden:p.role!=="super_admin"},{label:"\u5DE5\u7A0B\u5E08\u6570\u91CF",key:"engineerUserIdList",render:t=>{var r,i;return U("span",(i=(r=t.engineerUserIdList)==null?void 0:r.length)!=null?i:"-")},width:"120"},{label:"\u521B\u5EFA\u65F6\u95F4",key:"createTime",prop:"createTime",width:"180"},{label:"\u64CD\u4F5C",key:"action",slot:"action",width:"140",fixed:"right"}],I=y([]),_=(...r)=>c(this,[...r],function*(t=m.value.pageParams){var v,b;const i=yield ne($(D(D({},t),e.value),{regionCode:(b=(v=e.value)==null?void 0:v.regionCode)==null?void 0:b.at(-1)}));d.value=i.data.total,I.value=i.data.records}),R=()=>{_()},W=()=>{e.value={},m.value.pageParams.pageNumber=1,m.value.pageParams.pageSize=10,_()},F=t=>c(this,null,function*(){yield se({projectId:t.projectId,orderAuditNotifyEnable:!t.orderAuditNotifyEnable}),yield _()}),G=t=>c(this,null,function*(){yield ie({projectId:t.projectId,driverOrderState:t.driverOrderState==="ENABLE"?"DISABLED":"ENABLE"}),yield _()}),h=M({visible:!1,data:void 0}),q=t=>c(this,null,function*(){const r=yield de(t.projectId);h.data=r.data,h.visible=!0}),f=M({visible:!1,rowData:void 0}),S=()=>c(this,null,function*(){C.value=(yield we({pageNumber:1,pageSize:2e3,managed:!0})).data.records}),H=()=>c(this,null,function*(){yield S(),f.visible=!0,f.rowData=void 0}),J=t=>c(this,null,function*(){yield S(),f.visible=!0,f.rowData=t}),K=t=>{l.$messageBox.confirm("\u662F\u5426\u5220\u9664\u8BE5\u9879\u76EE?","\u63D0\u793A\uFF01",{type:"warning"}).then(()=>c(this,null,function*(){yield ce({id:t.projectId}),l.$message.success("\u5220\u9664\u6210\u529F\uFF01"),yield _()}))},Q=t=>{f.visible=!1,t&&_()};return _e(()=>c(this,null,function*(){w.value=(yield fe()).data,yield _()})),(t,r)=>{const i=u("el-input"),v=u("el-form-item"),b=u("el-col"),X=u("el-cascader"),O=u("el-button"),Y=u("el-row"),Z=u("el-form"),A=u("el-card"),V=u("el-switch"),ee=u("table-list");return x(),P("div",he,[a(A,{shadow:"never",class:"search mb-16"},{default:o(()=>[a(Z,{"label-suffix":":",model:e.value,size:"small"},{default:o(()=>[a(Y,{gutter:16},{default:o(()=>[a(b,{span:7},{default:o(()=>[a(v,{label:"\u9879\u76EE\u540D\u79F0"},{default:o(()=>[a(i,{modelValue:e.value.projectName,"onUpdate:modelValue":r[0]||(r[0]=n=>e.value.projectName=n),maxlength:"10",placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),a(b,{span:7},{default:o(()=>[a(v,{label:"\u6240\u5C5E\u4F01\u4E1A"},{default:o(()=>[a(i,{modelValue:e.value.companyName,"onUpdate:modelValue":r[1]||(r[1]=n=>e.value.companyName=n),maxlength:"10",placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),a(b,{span:10,class:"mb-16"},{default:o(()=>[a(v,{label:"\u6240\u5C5E\u533A\u57DF"},{default:o(()=>[a(X,{modelValue:e.value.regionCode,"onUpdate:modelValue":r[2]||(r[2]=n=>e.value.regionCode=n),props:N(k),options:w.value,clearable:"",class:"w-full"},null,8,["modelValue","props","options"])]),_:1})]),_:1}),a(b,{span:24},{default:o(()=>[a(v,{class:"btn"},{default:o(()=>[a(O,{type:"primary",onClick:R},{default:o(()=>[Ne]),_:1}),a(O,{type:"info",onClick:W},{default:o(()=>[ke]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),a(A,{shadow:"never"},{header:o(()=>[j("div",Ce,[je,N(p)&&N(p).role!=="project_manager"?(x(),ve(O,{key:0,type:"primary",icon:"Plus",size:"small",onClick:H},{default:o(()=>[Oe]),_:1})):z("",!0)])]),default:o(()=>[a(ee,{ref_key:"tableListRef",ref:m,column:g,data:I.value,total:d.value,onGetTableData:_},{driverOrderState:o(({scope:n})=>[a(V,{"model-value":n.row.driverOrderState,"active-value":"ENABLE","inactive-value":"DISABLED",style:{"--el-switch-on-color":"#13ce66"},"before-change":()=>G(n.row)},null,8,["model-value","before-change"])]),orderAuditNotifyEnable:o(({scope:n})=>[a(V,{"model-value":n.row.orderAuditNotifyEnable,"active-value":!0,"inactive-value":!1,style:{"--el-switch-on-color":"#13ce66"},"before-change":()=>F(n.row)},null,8,["model-value","before-change"])]),action:o(({scope:n})=>[j("a",{class:"text-primary",onClick:B=>q(n.row)},"\u8BE6\u60C5",8,De),j("a",{class:"text-primary",onClick:B=>J(n.row)},"\u7F16\u8F91",8,xe),N(p)&&N(p).role!=="project_manager"?(x(),P("a",{key:0,class:"text-danger",onClick:B=>K(n.row)},"\u5220\u9664",8,Ee)):z("",!0)]),_:1},8,["data","total"])]),_:1}),a(ye,{visible:f.visible,data:f.rowData,"cascader-option":w.value,"company-options":C.value,onClose:Q},null,8,["visible","data","cascader-option","company-options"]),a(ge,{visible:h.visible,data:h.data,onClose:r[3]||(r[3]=n=>h.visible=!1)},null,8,["visible","data"])])}}});export{Me as default};