数通互联化工云平台
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.
 
 
 
 
 
 

1 lines
5.1 KiB

import{d as M,r as u,ax as b,a as $,c as A,b as d,e,q as G,h as i,I as J,H as K,di as L,a7 as k,aj as Q,an as W,bI as X,aq as Y,ap as Z,bD as ee,ab as te,ao as le,ac as oe,_ as ae}from"./index-e450010e.js";import{a as de,h as ne,g as re,p as se,i as ue}from"./api-e282220e.js";import{e as ie}from"./api-a5615f3c.js";const pe=M({__name:"dialog",props:{title:{type:String,default:""},adddPostBox:{type:Boolean,default:!1},addrowInfo:{type:Object,default(){return{}}},arrayNum:{type:Number,default:0}},emits:["update:adddPostBox","editRow","addRow"],setup(P,{emit:w}){const E=u(!1),p=u(1);u([]);const f={label:"name",children:"child"},U={label:"title",children:"children"},V=w,t=b({title:"",acceptdepartmentid:[],userlist:[],dimension:"",unit:"",cycle:4,cycleattr:1,otherposttarget:"",type:1,scoringmethod:1,name:"",gov:"",lzq:"",yrb:"",departmentPostOther:[]});b([{}]);const r=b([{orgid:"",postid:"",operator:[]}]),C=u([]);function R(){de("/hrapi/org/govthree","post").then(a=>{C.value=a.data[3].child[14].child}).catch(a=>{console.error("Error fetching data:",a)})}R();const v=u([]);function B(){ie().then(a=>{v.value=a.data.list})}B();const T=u([]);function I(){ne({name:"1",orgid:"309"}).then(a=>{T.value=a.data}).finally(()=>{E.value=!1})}I();const N=()=>{t.departmentPostOther=g},y=u([]);function S(){re({id:309,level:4}).then(a=>{y.value=a.data})}S();const h=u([]);function j(){L({id:309,all:1}).then(a=>{h.value=a.data})}j();const g=u([]),O=()=>{const a=r[0].orgid.toString();se({page:1,pagesize:1e5,organization:a}).then(l=>{g.value=l.data.list})},x=()=>{V("update:adddPostBox",!1)},z=()=>{const a=t.acceptdepartmentid.toString();t.acceptdepartmentid=a.split(","),t.dimension=t.dimension.toString();const l=t.userlist.toString();t.userlist=l.split(",");const m=new Number(r[0].postid);r[0].postid=m,ue({title:t.title,type:t.type,unit:t.unit,scoringmethod:1,dimension:t.dimension,cycle:t.scoringmethod,cycleattr:p.value,departmentPostOther:t.departmentPostOther,otherposttarget:r}).then(n=>{n.code===200?(k.success("新增成功"),V("addRow",t)):k.success("新增成功")}),x()};return(a,l)=>{const m=Q,n=W,c=X,s=Y,_=Z,D=ee,F=te,q=le,H=oe;return $(),A(H,{"model-value":!0,title:P.title,onClose:x},{default:d(()=>[e(q,{ref:"ruleFormRef",model:t,"label-width":"120px",class:"demo-ruleForm"},{default:d(()=>[e(n,{label:"指标名称:",prop:"name"},{default:d(()=>[e(m,{modelValue:t.title,"onUpdate:modelValue":l[0]||(l[0]=o=>t.title=o),placeholder:"请输入指标名称"},null,8,["modelValue"])]),_:1}),e(n,{modelValue:t.otherposttarget,"onUpdate:modelValue":l[4]||(l[4]=o=>t.otherposttarget=o),label:"岗位/人员:",prop:"name"},{default:d(()=>[G("div",null,[e(c,{ref:"orgTreeRef",modelValue:r[0].orgid,"onUpdate:modelValue":l[1]||(l[1]=o=>r[0].orgid=o),clearable:"","show-checkbox":"","check-strictly":"true","node-key":"id",data:i(h),props:f,"render-after-expand":!1,onCheck:O},null,8,["modelValue","data"]),e(c,{ref:"orgTreeRef",modelValue:r[0].postid,"onUpdate:modelValue":l[2]||(l[2]=o=>r[0].postid=o),clearable:"",multiple:"","show-checkbox":"","node-key":"id",data:i(g),props:f,"render-after-expand":!1,onCheck:N},null,8,["modelValue","data"]),e(c,{ref:"orgTreeRef",modelValue:r[0].operator,"onUpdate:modelValue":l[3]||(l[3]=o=>r[0].operator=o),clearable:"",multiple:"","show-checkbox":"","node-key":"key",data:i(y),props:f,"render-after-expand":!1},null,8,["modelValue","data"])])]),_:1},8,["modelValue"]),e(n,{label:"指标维度:",prop:"sex"},{default:d(()=>[e(c,{ref:"orgTreeRef",modelValue:t.dimension,"onUpdate:modelValue":l[5]||(l[5]=o=>t.dimension=o),clearable:"",multiple:"","node-key":"id",data:i(v),props:U,"render-after-expand":!1},null,8,["modelValue","data"])]),_:1}),e(n,{label:"指标性质:",prop:"state"},{default:d(()=>[e(_,{modelValue:t.type,"onUpdate:modelValue":l[6]||(l[6]=o=>t.type=o)},{default:d(()=>[e(s,{label:"定性指标",value:1}),e(s,{label:"定量指标",value:2})]),_:1},8,["modelValue"])]),_:1}),e(n,{label:"计量单位:",prop:"unites"},{default:d(()=>[e(m,{modelValue:t.unit,"onUpdate:modelValue":l[7]||(l[7]=o=>t.unit=o),placeholder:"请输入计量单位"},null,8,["modelValue"])]),_:1}),e(n,{label:"计分方式:",prop:"iop"},{default:d(()=>[e(_,{modelValue:t.cycleattr,"onUpdate:modelValue":l[8]||(l[8]=o=>t.cycleattr=o)},{default:d(()=>[e(s,{label:"自动计分",value:1}),e(s,{label:"手动计分",value:2})]),_:1},8,["modelValue"])]),_:1}),e(n,{label:"考核周期:",prop:"uio"},{default:d(()=>[e(_,{modelValue:t.scoringmethod,"onUpdate:modelValue":l[9]||(l[9]=o=>t.scoringmethod=o)},{default:d(()=>[e(s,{label:"天",value:1}),e(s,{label:"班",value:2}),e(s,{label:"周",value:3}),e(s,{label:"月",value:4}),e(s,{label:"季度",value:5}),e(s,{label:"年",value:6})]),_:1},8,["modelValue"])]),_:1}),e(n,{label:"辅助计数:",prop:"state"},{default:d(()=>[e(D,{modelValue:i(p),"onUpdate:modelValue":l[10]||(l[10]=o=>J(p)?p.value=o:null),min:1},null,8,["modelValue"])]),_:1}),e(n,null,{default:d(()=>[e(F,{type:"primary",onClick:l[11]||(l[11]=o=>z())},{default:d(()=>[K("确定")]),_:1})]),_:1})]),_:1},8,["model"])]),_:1},8,["title"])}}});const ge=ae(pe,[["__scopeId","data-v-2a9d8dae"]]);export{ge as default};