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