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
4.2 KiB
1 lines
4.2 KiB
import{d as S,r as u,ax as T,a as N,c as j,b as o,e as t,h as p,I as D,H as F,a7 as y,aj as O,an as q,bI as H,aq as M,ap as $,bD as z,ab as A,ao as G,ac as J,_ as K}from"./index-e450010e.js";import{a as L,g as Q,b as W}from"./api-e282220e.js";import{e as X}from"./api-a5615f3c.js";const Y=S({__name:"diolog",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(x,{emit:E}){const m=u(1);u([]);const f={label:"name",children:"child"},h={label:"title",children:"children"},_=E,e=T({name:"",share:0,acceptdepartmentid:[],userlist:[],dimension:"",nature:1,cycle:4,cycleattr:"",scoringmethod:1,visiblerangegroup:[],visiblerangedepart:[],unit:""}),b=u([]);function U(){L("/hrapi/org/govthree","post").then(d=>{b.value=d.data[3].child[14].child}).catch(d=>{console.error("Error fetching data:",d)})}U();const g=u([]);function P(){X().then(d=>{g.value=d.data.list})}P();const V=u([]);function R(){Q({id:309,level:4}).then(d=>{V.value=d.data})}R();const v=()=>{_("update:adddPostBox",!1)},k=()=>{v();const d=e.acceptdepartmentid.toString();e.acceptdepartmentid=d.split(",");const l=e.dimension.toString();e.dimension=l;const i=e.userlist.toString();e.userlist=i.split(",");const n=e.unit.toString(),s=new Number(e.cycleattr);W({name:e.name,share:e.share,acceptdepartmentid:e.acceptdepartmentid,userlist:e.userlist,dimension:e.dimension,nature:e.nature,unit:n,cycle:e.cycle,cycleattr:s,scoringmethod:e.scoringmethod,visiblerangegroup:[],visiblerangedepart:[]}).then(r=>{r.code===200?(y.success("新增成功"),_("addRow",e)):y.error("新增成功")})};return(d,l)=>{const i=O,n=q,s=H,r=M,c=$,w=z,B=A,C=G,I=J;return N(),j(I,{"model-value":!0,title:x.title,onClose:v},{default:o(()=>[t(C,{ref:"ruleFormRef",model:e,"label-width":"120px",class:"demo-ruleForm"},{default:o(()=>[t(n,{label:"指标名称:",prop:"name"},{default:o(()=>[t(i,{modelValue:e.name,"onUpdate:modelValue":l[0]||(l[0]=a=>e.name=a),placeholder:"请输入指标名称"},null,8,["modelValue"])]),_:1}),t(n,{label:"关联部门:",prop:"sort"},{default:o(()=>[t(s,{ref:"orgTreeRef",modelValue:e.acceptdepartmentid,"onUpdate:modelValue":l[1]||(l[1]=a=>e.acceptdepartmentid=a),clearable:"",multiple:"","node-key":"id",data:p(b),props:f,"render-after-expand":!1},null,8,["modelValue","data"])]),_:1}),t(n,{label:"指标维度:",prop:"sex"},{default:o(()=>[t(s,{ref:"orgTreeRef",modelValue:e.dimension,"onUpdate:modelValue":l[2]||(l[2]=a=>e.dimension=a),clearable:"",multiple:"","node-key":"id",data:p(g),props:h,"render-after-expand":!1},null,8,["modelValue","data"])]),_:1}),t(n,{label:"指标性质:",prop:"state"},{default:o(()=>[t(c,{modelValue:e.nature,"onUpdate:modelValue":l[3]||(l[3]=a=>e.nature=a)},{default:o(()=>[t(r,{label:"定性指标",value:1}),t(r,{label:"定量指标",value:2})]),_:1},8,["modelValue"])]),_:1}),t(n,{label:"计量单位:",prop:"unites"},{default:o(()=>[t(i,{modelValue:e.unit,"onUpdate:modelValue":l[4]||(l[4]=a=>e.unit=a),placeholder:"请输入计量单位"},null,8,["modelValue"])]),_:1}),t(n,{label:"数据提交:",prop:"sorts"},{default:o(()=>[t(s,{ref:"orgTreeRef",modelValue:e.userlist,"onUpdate:modelValue":l[5]||(l[5]=a=>e.userlist=a),"node-key":"key",data:p(V),props:f,"render-after-expand":!1},null,8,["modelValue","data"])]),_:1}),t(n,{label:"计分方式:",prop:"iop"},{default:o(()=>[t(c,{modelValue:e.cycleattr,"onUpdate:modelValue":l[6]||(l[6]=a=>e.cycleattr=a)},{default:o(()=>[t(r,{label:"自动计分",value:1}),t(r,{label:"手动计分",value:2})]),_:1},8,["modelValue"])]),_:1}),t(n,{label:"考核周期:",prop:"uio"},{default:o(()=>[t(c,{modelValue:e.scoringmethod,"onUpdate:modelValue":l[7]||(l[7]=a=>e.scoringmethod=a)},{default:o(()=>[t(r,{label:"月",value:1}),t(r,{label:"季度",value:2}),t(r,{label:"年",value:3})]),_:1},8,["modelValue"])]),_:1}),t(n,{label:"辅助计数:",prop:"state"},{default:o(()=>[t(w,{modelValue:p(m),"onUpdate:modelValue":l[8]||(l[8]=a=>D(m)?m.value=a:null),min:1},null,8,["modelValue"])]),_:1}),t(n,null,{default:o(()=>[t(B,{type:"primary",onClick:l[9]||(l[9]=a=>k())},{default:o(()=>[F("确定")]),_:1})]),_:1})]),_:1},8,["model"])]),_:1},8,["title"])}}});const le=K(Y,[["__scopeId","data-v-3fd7e53d"]]);export{le as default};
|
|
|