business.d1ce780d.js 4.1 KB

1
  1. import{Z as B,cr as x,_ as I,d as z,cs as P,m as f,cp as T,w as V,r as i,o as g,A as h,x as a,h as s,u as r,H as E,D as k,a as D,ce as U}from"./index.56449854.js";import{s as $}from"./search.config.eda2ea92.js";import{a as S,D as H}from"./demand-modify-modal.01df859f.js";import{u as O}from"./use-page-search.59eb5443.js";import"./lodash.0da4bba2.js";import{u as j}from"./useBusinessQuery.85cdd2fe.js";import q from"./exec-modal.1f3addb1.js";import"./isBeyondTime.ab735625.js";import"./createRequset.56e9fc42.js";const K=[{value:1,label:"\u5F85\u6267\u884C",type:"info"},{value:2,label:"\u6267\u884C\u5B8C\u6210",type:"success"},{value:3,label:"\u6267\u884C\u5931\u8D25",type:"danger"}],L=[{value:1,label:"\u7ACB\u5373\u6267\u884C",type:""},{value:2,label:"\u5EF6\u8FDF\u6267\u884C",type:"warning"}],Z=[{prop:"exec_name",label:"\u4E1A\u52A1\u8868\u540D\u79F0",minWidth:"115px"},{prop:"start",label:"\u6570\u636E\u5F00\u59CB\u65F6\u95F4",minWidth:"155px"},{prop:"end",label:"\u6570\u636E\u7ED3\u675F\u65F6\u95F4",minWidth:"155px"},{prop:"updatetime",label:"\u72B6\u6001\u66F4\u65B0\u65F6\u95F4",minWidth:"155px"},{prop:"createtime",label:"\u521B\u5EFA\u65F6\u95F4",minWidth:"115px"},{prop:"exce_type",label:"\u6267\u884C\u7C7B\u578B",cellRenderer({row:p}){const t=L.find(({value:u})=>String(u)===String(p.exec_type));return B(x,{type:t.type||""},{default:()=>t.label||"--"})}},{prop:"status",label:"\u72B6\u6001",cellRenderer({row:p}){const t=K.find(({value:u})=>String(u)===String(p.status));return B(x,{type:t.type||""},{default:()=>t.label||"--"})}},{prop:"departName",label:"\u90E8\u95E8\u540D\u79F0",minWidth:"155px"},{prop:"companyName",label:"\u4E1A\u52A1\u516C\u53F8\u540D\u79F0",minWidth:"155px"},{prop:"apply_name",label:"\u7533\u8BF7\u4EBA",minWidth:"80px"},{label:"\u64CD\u4F5C",fixed:"right",width:90,slot:"operation"}],G={columns:Z,showTitle:!1,superUserNoAction:!1,apis:{httpList:S.list}},b="businessDepartmentAnalysis",J=z({__name:"business",setup(p){const{searchConfig:t}=j({sourceConfig:$,queryField:"companyNo"}),u=P(),c=f(t),{hasPermissionWithCode:C}=T(b),m=f(null),F=f(null),v=f(null),A={pageSearchHook:()=>O(void 0,void 0,t)};async function N(o){const e=await S.delete_exec({id:o});e.code===1?m.value.onSearch():U.warning(e.message)}function M(){var e;const{companyNo:o}=m.value.getBasicParams();(e=v.value)==null||e.onDisplay(o)}return V(()=>u.level,o=>{const{formItems:e}=c.value,l=e.findIndex(({field:_})=>_==="depart_id"),{itemid:d=""}=u.info||{};Number(o)===2||Number(o)===3?(c.value.formItems[l].defaultValue=d,c.value.formItems[l].disabled=!0):c.value.formItems[l].disabled=!1},{immediate:!0}),(o,e)=>{const l=i("el-button"),d=i("ElButton"),_=i("el-link"),W=i("el-popconfirm"),R=i("page-container"),w=i("page-auth");return g(),h(w,{"page-name":b,all:!1},{default:a(()=>[s(R,{"search-config":r(t),hooks:A,"page-name":b,"get-content-ref":n=>m.value=n,"content-config":r(G),lockKey:"companyNo"},{content_header:a(()=>[s(l,{type:"",size:"mini",onClick:e[0]||(e[0]=n=>{var y;return(y=F.value)==null?void 0:y.onDisplay({})})},{default:a(()=>[E("\u67E5\u770B\u6267\u884C\u7C7B\u578B\u8BF4\u660E")]),_:1}),s(l,{type:"primary",size:"mini",onClick:M},{default:a(()=>[E("\u6DFB\u52A0")]),_:1})]),content_action:a(n=>[String(n.status)==="2"&&r(C)("19")?(g(),h(_,{key:0,href:n.down_url,target:"_blank",underline:!1},{default:a(()=>[s(d,{link:"",size:"small",type:"primary",icon:r(k)("download-line")},null,8,["icon"])]),_:2},1032,["href"])):D("v-if",!0),r(C)("17")&&(String(n.status)==="3"||String(n.status)==="1")?(g(),h(W,{key:1,title:"\u662F\u5426\u786E\u8BA4\u5220\u9664\u8BE5\u6761\u8BB0\u5F55?",onConfirm:y=>N(n.id)},{reference:a(()=>[s(d,{link:"",size:"small",type:"primary",icon:r(k)("delete")},null,8,["icon"])]),_:2},1032,["onConfirm"])):D("v-if",!0)]),_:1},8,["search-config","get-content-ref","content-config"]),s(H,{ref_key:"demandModifyModal",ref:v,"is-business":!0,onRefresh:e[1]||(e[1]=n=>m.value.onSearch())},null,512),s(q,{ref_key:"execModalRef",ref:F},null,512)]),_:1})}}});var ue=I(J,[["__file","C:/Users/89793/Desktop/projects/report-v3/src/views/subscribe/businessDepartmentAnalysis/components/business.vue"]]);export{ue as default};