import{s,c as a,g as c}from"./index.7035dba5.js";import{f as r}from"./role.1c66ca6a.js";import{n as u}from"./vueComponentNormalizer.9ef17bb1.js";import"./index.f5168bf8.js";var p=function(){var e=this,o=e.$createElement,t=e._self._c||o;return t("div",{staticClass:"evaluation-setting"},[t("selfStepVue",{attrs:{activeStep:e.activeStep,successList:e.successList,stepData:e.stepData},on:{check:e.check},scopedSlots:e._u([{key:"xxx",fn:function(n){return[t("el-select",{attrs:{size:"mini",placeholder:"\u8BF7\u9009\u62E9"},model:{value:n.item.role,callback:function(i){e.$set(n.item,"role",i)},expression:"scoped.item.role"}},e._l(e.role_options,function(i){return t("el-option",{key:i.id,attrs:{label:i.name,value:i.id}})}),1)]}}])}),t("div",{staticClass:"floot-box"},[t("el-button",{staticStyle:{"margin-right":"30px"},attrs:{type:"danger"},on:{click:e.reset}},[e._v("\u91CD\u7F6E")]),t("el-button",{attrs:{type:"primary"},on:{click:e.saveChange}},[e._v("\u4FDD\u5B58")])],1)],1)},_=[];const d={data(){return{activeStep:0,successList:[],role_options:[],stepData:[{title:"\u5B66\u5458\u961F",key:1,icon:"el-icon-orange",role:2},{title:"\u6559\u5458",key:2,icon:"el-icon-user",role:2},{title:"\u8BFE\u7A0B",key:3,icon:"el-icon-reading",role:2},{title:"\u539F\u5355\u4F4D",key:4,icon:"el-icon-school",role:2},{title:"\u6BD5\u4E1A\u540E",key:5,icon:"el-icon-finished",role:2}]}},components:{selfStepVue:s},activated(){this.findAllRole(),this.getInfo()},methods:{check(e){},async findAllRole(){const{data:e}=await r(),{tree:o}=e.toTree();this.role_options.splice(0,this.role_options.length,...o)},reset(){location.reload()},async saveChange(){await a({evaluationRule:this.stepData}),this.$message.success("\u4FDD\u5B58\u6210\u529F"),console.log(this.stepData)},async getInfo(){const{data:e}=await c();this.stepData=e.evaluationRule&&e.evaluationRule.length>0?e.evaluationRule:[{title:"\u5B66\u5458\u961F",key:1,icon:"el-icon-orange",role:2},{title:"\u6559\u5458",key:2,icon:"el-icon-user",role:2},{title:"\u8BFE\u7A0B",key:3,icon:"el-icon-reading",role:2},{title:"\u539F\u5355\u4F4D",key:4,icon:"el-icon-school",role:2},{title:"\u6BD5\u4E1A\u540E",key:5,icon:"el-icon-finished",role:2}],console.log(e)}}},l={};var v=u(d,p,_,!1,f,"0022d93c",null,null);function f(e){for(let o in l)this[o]=l[o]}const k=function(){return v.exports}();export{k as default};
