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 lines
4.0 KiB
2 lines
4.0 KiB
|
4 months ago
|
import{d as M,r as w,ax as G,a as g,c as y,b as a,e,h,Y as J,f as K,F as Q,g as W,q as F,H as E,t as S,a7 as k,bI as X,an as Z,aE as ee,aF as ae,b3 as te,aj as oe,aq as le,ap as ne,b4 as se,aA as re,aw as de,av as ce,ab as ue,ao as me,ac as _e,at as pe,p as ie,m as fe,_ as be}from"./index-e450010e.js";import{a as ge}from"./api-e282220e.js";import{g as he}from"./api-562484fd.js";import{c as ve}from"./api-f3204da3.js";const we=u=>(ie("data-v-2c218416"),u=u(),fe(),u),ye=we(()=>F("span",{class:"tyu"},"指标合计分:",-1)),Ee=M({__name:"dialog",props:{title:{type:String,default:""},addPostBox:{type:Boolean,default:!1},addrowInfo:{type:Object,default(){return{}}},arrayNum:{type:Number,default:0}},emits:["update:addPostBox","editRow","addRow"],setup(u,{emit:I}){const D=l=>{const{columns:o,data:m}=l;return o.forEach((r,f)=>{if(f===0){t.sums[f]="合计";return}const b=m.map(n=>Number(n[r.property]));b.every(n=>Number.isNaN(n))||(t.sums[2]=` ${b.reduce((n,_)=>{const p=Number(_);return Number.isNaN(p)?n:n+_},0)}`)}),t.sums},V=w(!1),x=u,T={label:"name",children:"child"},v=I,t=G({deaprtname:"",value1:"",asd:[],lzq:"",zhiFraction:"",sums:[]}),N=w([]);function U(){ge("/hrapi/org/govthree","post").then(l=>{N.value=l.data[2].child[22].child}).catch(l=>{console.error("Error fetching data:",l)})}U();const i=w([]);function C(){const l=t.deaprtname.toString();he({id:l}).then(o=>{i.value=o.data}).catch(o=>{console.error("Error fetching data:",o)}).finally(()=>{V.value=!1})}C();const B=()=>{v("update:addPostBox",!1)},R=()=>{const l=t.deaprtname.toString(),m=new Date(t.value1).getFullYear().toString();x.addrowInfo.name?(x.addrowInfo,v("editRow",t)):ve({orgid:l,year:m,child:i._value}).then(r=>{r.code===200?(k.success("新增成功"),v("addRow",t)):(k.error("新增成功"),B())})};return(l,o)=>{const m=X,r=Z,f=ee,b=ae,n=te,_=oe,p=le,P=ne,j=se,q=re,$=de,z=ce,L=ue,O=me,Y=_e,A=pe;return g(),y(Y,{"model-value":!0,title:"新增方案",style:{width:"40%"},onClose:B},{default:a(()=>[e(O,{ref:"ruleFormRef",model:t,"label-width":"80px",class:"demo-ruleForm",style:{width:"100%"}},{default:a(()=>[e(r,{label:"行政组织"},{default:a(()=>[e(m,{ref:"orgTreeRef",modelValue:t.deaprtname,"onUpdate:modelValue":o[0]||(o[0]=d=>t.deaprtname=d),"show-checkbox":"",clearable:"","node-key":"id",class:"orgTree",data:h(N),props:T,"render-after-expand":!1,onCheck:C},null,8,["modelValue","data"])]),_:1}),e(r,{label:"年度"},{default:a(()=>[e(f,{modelValue:t.value1,"onUpdate:modelValue":o[1]||(o[1]=d=>t.value1=d),type:"year"},null,8,["modelValue"])]),_:1}),J((g(),y(r,{data:h(i)},{default:a(()=>[e(z,null,{default:a(()=>[(g(!0),K(Q,null,W(h(i),(d,H)=>(g(),y($,{key:H,label:"item.name",style:{width:"200px"}},{default:a(()=>[e(q,null,{header:a(()=>[F("div",null,[e(b,null,{default:a(()=>[E("考核维度:"+S(d.name),1)]),_:2},1024),ye,E(" "+S(t.sums[2]),1)]),e(j,{border:"","summary-method":D,"show-summary":"",data:d.child},{default:a(()=>[e(n,{label:"指标名称",prop:"name"}),e(n,{label:"说明",prop:"content"},{default:a(s=>[e(_,{modelValue:s.row.content,"onUpdate:modelValue":c=>s.row.content=c},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),e(n,{label:"指标权重",prop:"referencescore"},{default:a(s=>[e(_,{modelValue:s.row.referencescore,"onUpdate:modelValue":c=>s.row.referencescore=c,onChange:l.yui,onBlur:c=>s.row.referencescore=Number(s.row.referencescore)},null,8,["modelValue","onUpdate:modelValue","onChange","onBlur"])]),_:1}),e(n,{label:"状态",prop:"status"},{default:a(s=>[e(P,{modelValue:s.row.status,"onUpdate:modelValue":c=>s.row.status=c},{default:a(()=>[e(p,{label:"使用",value:1}),e(p,{label:"禁用",value:2}),e(p,{label:"观察",value:3})]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:1})]),_:2},1032,["data"])]),_:2},1024)]),_:2},1024))),128))]),_:1})]),_:1},8,["data"])),[[A,h(V)]]),e(r,null,{default:a(()=>[e(L,{type:"primary",onClick:o[2]||(o[2]=d=>R())},{default:a(()=>[E("确定")]),_:1})]),_:1})]),_:1},8,["model"])]),_:1})}}});const Be=be(Ee,[["__scopeId","data-v-2c218416"]]);export{Be as default};
|