import{Z as b,cp as B,_ as w,d as R,cU as z,m,r as s,o as f,A as d,x as o,h as u,u as l,H as F,D as v,a as x,cc as P}from"./index.e80c366d.js";import{s as T}from"./search.config.e1a77805.js";import{a as k,D as U}from"./demand-modify-modal.c26d8894.js";import{u as V}from"./use-page-search.e3e95470.js";import"./lodash.92db800d.js";import{u as $}from"./useBusinessQuery.cf39ee80.js";import H from"./exec-modal.d94288c0.js";import"./isBeyondTime.bf04ab35.js";import"./createRequset.60472412.js";const I=[{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"}],O=[{value:1,label:"\u7ACB\u5373\u6267\u884C",type:""},{value:2,label:"\u5EF6\u8FDF\u6267\u884C",type:"warning"}],j=[{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:i}){const t=O.find(({value:a})=>String(a)===String(i.exec_type));return b(B,{type:t.type||""},{default:()=>t.label||"--"})}},{prop:"status",label:"\u72B6\u6001",cellRenderer({row:i}){const t=I.find(({value:a})=>String(a)===String(i.status));return b(B,{type:t.type||""},{default:()=>t.label||"--"})}},{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"}],q={columns:j,showTitle:!1,superUserNoAction:!1,apis:{httpList:k.list}},_="businessAnalysisNew",K=R({__name:"business",setup(i){const{searchConfig:t}=$({sourceConfig:T,queryField:"companyNo"}),{hasPermissionWithCode:a}=z(_),r=m(null),y=m(null),g=m(null),E={pageSearchHook:()=>V(void 0,void 0,t)};async function A(p){const e=await k.delete_exec({id:p});e.code===1?r.value.onSearch():P.warning(e.message)}function D(){var e;const{companyNo:p}=r.value.getBasicParams();(e=g.value)==null||e.onDisplay(p)}return(p,e)=>{const C=s("el-button"),h=s("ElButton"),S=s("el-link"),N=s("el-popconfirm"),M=s("page-container"),W=s("page-auth");return f(),d(W,{"page-name":_,all:!1},{default:o(()=>[u(M,{"search-config":l(t),hooks:E,"page-name":_,"get-content-ref":n=>r.value=n,"content-config":l(q),lockKey:"companyNo"},{content_header:o(()=>[u(C,{type:"",size:"mini",onClick:e[0]||(e[0]=n=>{var c;return(c=y.value)==null?void 0:c.onDisplay({})})},{default:o(()=>[F("\u67E5\u770B\u6267\u884C\u7C7B\u578B\u8BF4\u660E")]),_:1}),u(C,{type:"primary",size:"mini",onClick:D},{default:o(()=>[F("\u6DFB\u52A0")]),_:1})]),content_action:o(n=>[String(n.status)==="2"&&l(a)("19")?(f(),d(S,{key:0,href:n.down_url,target:"_blank",underline:!1},{default:o(()=>[u(h,{link:"",size:"small",type:"primary",icon:l(v)("download-line")},null,8,["icon"])]),_:2},1032,["href"])):x("v-if",!0),l(a)("17")&&(String(n.status)==="3"||String(n.status)==="1")?(f(),d(N,{key:1,title:"\u662F\u5426\u786E\u8BA4\u5220\u9664\u8BE5\u6761\u8BB0\u5F55?",onConfirm:c=>A(n.id)},{reference:o(()=>[u(h,{link:"",size:"small",type:"primary",icon:l(v)("delete")},null,8,["icon"])]),_:2},1032,["onConfirm"])):x("v-if",!0)]),_:1},8,["search-config","get-content-ref","content-config"]),u(U,{ref_key:"demandModifyModal",ref:g,"is-business":!0,onRefresh:e[1]||(e[1]=n=>r.value.onSearch())},null,512),u(H,{ref_key:"execModalRef",ref:y},null,512)]),_:1})}}});var te=w(K,[["__file","C:/Users/63107/Desktop/projects/report-v3/src/views/subscribe/businessAnalysisNew/components/business.vue"]]);export{te as default};
