No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

2 líneas
3.6KB

  1. import{E as I,a as B,r as _,B as L,b as d,c as M,L as P,h as i,e as w,f as o,i as g,k as U,$ as k}from"./index-dd5fae99.js";import{a as R,b as $}from"./evaluationPlan-d9bddf0a.js";const z={class:"search mb-16"},J={class:"dialog-footer"},q=U({name:"applicationListDialog"}),W=Object.assign(q,{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}=I.dictStore.globalDicts||{},u=N,v=O,n=B({projectName:void 0,buildOrg:void 0}),r=_(),h=_(0),C=[{type:"selection",reserveSelection:!0,width:"55"},{label:"应用名称",key:"relatedExistsApplication",prop:"relatedExistsApplication",showOverflowTooltip:!0,width:150,render:l=>k("span",l.relatedExistsApplication||l.applicationName)},{label:"申报单位",key:"buildOrgName",prop:"buildOrgName",minWidth:"120",showOverflowTooltip:!0},{label:"应用类型",key:"applicationType",prop:"applicationType",width:"150"},{label:"应用领域",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(","))}},{label:"发布端",key:"publishSide",prop:"publishSide",width:"80"}],m=_([]),b=async(l=(e=>(e=r.value)==null?void 0:e.pageParams)())=>{const a=await R({...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=_([]),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)})},T=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 $({applicationIds:a,appraisalId:u.params.appraisalId}),v("getAppData",e)};return L(()=>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"),j=d("el-form"),x=d("table-list"),E=d("el-dialog");return M(),P(E,{"model-value":N.visible,title:"添加应用",width:"70%","destroy-on-close":"",onClose:e[3]||(e[3]=f=>v("close"))},{footer:i(()=>[w("span",J,[o(c,{onClick:e[2]||(e[2]=f=>v("close"))},{default:i(()=>e[6]||(e[6]=[g("关闭")])),_:1}),o(c,{type:"primary",onClick:T},{default:i(()=>e[7]||(e[7]=[g(" 确定 ")])),_:1})])]),default:i(()=>[w("div",z,[o(j,{"label-suffix":":",model:n,size:"small"},{default:i(()=>[o(y,{gutter:16},{default:i(()=>[o(s,{span:8},{default:i(()=>[o(t,{label:"应用名称"},{default:i(()=>[o(a,{modelValue:n.applicationName,"onUpdate:modelValue":e[0]||(e[0]=f=>n.applicationName=f),placeholder:"请输入"},null,8,["modelValue"])]),_:1})]),_:1}),o(s,{span:8},{default:i(()=>[o(t,{label:"申报单位"},{default:i(()=>[o(a,{modelValue:n.buildUnitName,"onUpdate:modelValue":e[1]||(e[1]=f=>n.buildUnitName=f),placeholder:"请输入"},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]=[g("查询")])),_:1}),o(c,{onClick:A},{default:i(()=>e[5]||(e[5]=[g("重置")])),_: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};