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 line
3.8KB

  1. import{d as B,B as E,b as L,r as g,J as M,c as d,e as P,G as U,i,g as w,h as o,j as _,Z as k}from"./index.149277cd.js";import{a as J,b as R}from"./evaluationPlan.400efb67.js";const z={class:"search mb-16"},G={class:"dialog-footer"},$=B({name:"applicationListDialog"}),W=Object.assign($,{props:{visible:{type:Boolean,default:!1,required:!0},data:{type:Array,default:void 0},params:{type:Object,default:()=>({})}},emits:["close","getAppData"],setup(N,{emit:O}){const{digitalModifySystem:S}=E.dictStore.globalDicts||{},u=N,v=O,n=L({projectName:void 0,buildOrg:void 0}),r=g(),h=g(0),C=[{type:"selection",reserveSelection:!0,width:"55"},{label:"\u5E94\u7528\u540D\u79F0",key:"relatedExistsApplication",prop:"relatedExistsApplication",showOverflowTooltip:!0,width:150,render:l=>k("span",l.relatedExistsApplication||l.applicationName)},{label:"\u7533\u62A5\u5355\u4F4D",key:"buildOrgName",prop:"buildOrgName",minWidth:"120",showOverflowTooltip:!0},{label:"\u5E94\u7528\u7C7B\u578B",key:"applicationType",prop:"applicationType",width:"150"},{label:"\u5E94\u7528\u9886\u57DF",key:"digitalModification",prop:"digitalModification",width:"140",render:l=>{var e,a;return k("span",(a=(e=l.digitalModification)==null?void 0:e.split(","))==null?void 0:a.map(t=>S[t]).join("\uFF0C"))}},{label:"\u53D1\u5E03\u7AEF",key:"publishSide",prop:"publishSide",width:"80"}],m=g([]),b=async(l=(e=>(e=r.value)==null?void 0:e.pageParams)())=>{const a=await J({...l,...n,...u.params});h.value=a.data.total,m.value=a.data.records||[];const t=JSON.parse(JSON.stringify(p.value));t!=null&&t.length&&m.value&&m.value.forEach(s=>{t.map(y=>y.id).includes(s.id)&&r.value.toggleRowSelect(s,!0)})},V=()=>{r.value.pageParams.pageNumber=1,b()},A=()=>{n.projectName=void 0,n.buildOrg=void 0,r.value.pageParams.pageNumber=1,r.value.pageParams.pageSize=10,b()},p=g([]),D=l=>{p.value=l;const e=l.map(a=>a.id);m.value.forEach(a=>{e.includes(a.id)?p.value.push(a):p.value=p.value.filter(t=>t.id!==a.id)})},j=async()=>{const l={},e=p.value.reduce((t,s)=>(l[s.id]||(l[s.id]=t.push(s)),t),[]),a=e.map(t=>t.id);await R({applicationIds:a,appraisalId:u.params.appraisalId}),v("getAppData",e)};return M(()=>u.visible,async l=>{var e;l&&((e=u.data)!=null&&e.length&&(p.value=u.data.map(a=>({...a,id:a.appId}))),b())}),(l,e)=>{const a=d("el-input"),t=d("el-form-item"),s=d("el-col"),c=d("el-button"),y=d("el-row"),T=d("el-form"),x=d("table-list"),I=d("el-dialog");return P(),U(I,{"model-value":N.visible,title:"\u6DFB\u52A0\u5E94\u7528",width:"70%","destroy-on-close":"",onClose:e[3]||(e[3]=f=>v("close"))},{footer:i(()=>[w("span",G,[o(c,{onClick:e[2]||(e[2]=f=>v("close"))},{default:i(()=>e[6]||(e[6]=[_("\u5173\u95ED")])),_:1}),o(c,{type:"primary",onClick:j},{default:i(()=>e[7]||(e[7]=[_(" \u786E\u5B9A ")])),_:1})])]),default:i(()=>[w("div",z,[o(T,{"label-suffix":":",model:n,size:"small"},{default:i(()=>[o(y,{gutter:16},{default:i(()=>[o(s,{span:8},{default:i(()=>[o(t,{label:"\u5E94\u7528\u540D\u79F0"},{default:i(()=>[o(a,{modelValue:n.applicationName,"onUpdate:modelValue":e[0]||(e[0]=f=>n.applicationName=f),placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),o(s,{span:8},{default:i(()=>[o(t,{label:"\u7533\u62A5\u5355\u4F4D"},{default:i(()=>[o(a,{modelValue:n.buildUnitName,"onUpdate:modelValue":e[1]||(e[1]=f=>n.buildUnitName=f),placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),o(s,{span:8},{default:i(()=>[o(t,{class:"btn"},{default:i(()=>[o(c,{type:"primary",onClick:V},{default:i(()=>e[4]||(e[4]=[_("\u67E5\u8BE2")])),_:1}),o(c,{onClick:A},{default:i(()=>e[5]||(e[5]=[_("\u91CD\u7F6E")])),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),o(x,{ref_key:"tableListRef",ref:r,column:C,data:m.value,total:h.value,"row-key":"id",onSelectionChange:D,onGetTableData:b},null,8,["data","total"])]),_:1},8,["model-value"])}}});export{W as default};