index.b91e7890.js 7.6 KB

1
  1. var E=Object.defineProperty;var N=Object.getOwnPropertySymbols;var T=Object.prototype.hasOwnProperty,U=Object.prototype.propertyIsEnumerable;var x=(e,t,s)=>t in e?E(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,w=(e,t)=>{for(var s in t||(t={}))T.call(t,s)&&x(e,s,t[s]);if(N)for(var s of N(t))U.call(t,s)&&x(e,s,t[s]);return e};var _=(e,t,s)=>new Promise((n,o)=>{var r=p=>{try{l(s.next(p))}catch(g){o(g)}},u=p=>{try{l(s.throw(p))}catch(g){o(g)}},l=p=>p.done?n(p.value):Promise.resolve(p.value).then(r,u);l((s=s.apply(e,t)).next())});import{ab as y,d as b,a as h,r as f,u as q,B as v,i as a,q as D,ac as F,_ as i,H as V,p as L,k as c,aj as B,bC as A,di as M,ag as d,e as k,d7 as O,d8 as C,bi as P}from"./index.6cd81b67.js";import{g as $,s as j}from"./use-async.2e024222.js";import{C as S}from"./constant.b4bfe346.js";import{s as I}from"./api.bd26cea4.js";import{N as m}from"./FormItemGridItem.a2c5798b.js";import"./searchs.b637f0d6.js";const R=e=>y({url:"/cbs-app/sysParamConfig/queryByParamNameList?paramNames="+e,method:"get",requestType:"form"}),G=e=>y({url:"/cbs-app/sysParamConfig/queryByParamName?paramName="+e,method:"get",requestType:"form"}),K=e=>y({url:"/cbs-app/sysParamConfig/update",method:"post",data:e}),H=b({name:"project-param-setting",props:{appKey:{type:String,default:"KT"}},setup(e){const t=h({id:null,paramValue:null,group:null}),s=f(),n=f(!1),o=q(),r=()=>e.appKey.toLowerCase()+"_frequency";v(()=>_(this,null,function*(){const{data:l}=yield G(r());l?(t.id=l.id,t.paramValue=l.paramValue,t.group=l.group):o.error("\u52A0\u8F7D\u914D\u7F6E\u53C2\u6570\u5931\u8D25")}));const u=()=>_(this,null,function*(){const l={group:t.group,configs:[w({},t)]};n.value=!0;try{const p=yield K(l);p&&p.code=="200"&&o.success("\u4FDD\u5B58\u6210\u529F")}catch(p){}n.value=!1});return()=>a(B,null,[a(D,{labelPlacement:"left",model:t,requireMarkPlacement:"left",ref:s},{default:()=>[a(F,{cols:1},{default:()=>[a(m,{label:"\u8BC4\u6D4B\u9891\u7387",path:"scope_of_attendance",rule:[{required:!1,message:"\u8BF7\u8F93\u5165\u8BC4\u6D4B\u9891\u7387",trigger:["blur","input"]}]},{default:()=>[a(i,{value:t.paramValue,"onUpdate:value":l=>t.paramValue=l,placeholder:"\u8BF7\u8F93\u5165\u8BC4\u6D4B\u9891\u7387",clearable:!0,style:"width:200px"},null)]})]})]}),V(a(L,{type:"primary",onClick:u,loading:n.value},{default:()=>[c("\u4FDD\u5B58\u8BBE\u7F6E")]}),[[A("auth"),"sysParamConfig/update1750838255892299777"]])])}}),Q=b({name:"project-param-setting",setup(){const e=h({}),t=f(),s=f(!1),n=q();v(()=>_(this,null,function*(){const{data:r}=yield R("not_played_note_percent,played_note_high_low_percent,played_note_fast_slow_percent,played_note_duration_less_percent,evaluation_level_score_less,evaluation_level_score_less_beginner,not_proficient_section_score");r?r.forEach(u=>{e[u.paramName]=u.paramValue}):n.error("\u52A0\u8F7D\u914D\u7F6E\u53C2\u6570\u5931\u8D25")}));const o=()=>_(this,null,function*(){const r=[];Object.keys(e).forEach(l=>{r.push({paramName:l,paramValue:e[l]})});const u={group:"OTHER",configs:r};s.value=!0;try{const l=yield K(u);l&&l.code=="200"&&n.success("\u4FDD\u5B58\u6210\u529F")}catch(l){}s.value=!1});return()=>a(B,null,[a(D,{labelPlacement:"left",model:e,requireMarkPlacement:"left",ref:t},{default:()=>[a(M,{title:"\u4E91\u6559\u7EC3\u914D\u7F6E",showIcon:!1,bordered:!1,style:"margin-bottom: 12px;"},null),a("h3",null,[c("1\u3001\u5F02\u5E38\u60C5\u51B5\u63D0\u793A\u914D\u7F6E")]),a(F,{cols:1,style:"padding-left: 13px"},{default:()=>[a(m,{style:"margin-top:10px",label:"\u8BBE\u5907\u95EE\u9898\uFF1A\u672A\u6F14\u594F\u97F3\u7B26\u8FBE\u5230",path:"not_played_note_percent",rule:[{required:!0,pattern:/^\d+$/,message:"\u8BF7\u8F93\u5165",trigger:["blur","input"]}]},{default:()=>[a(d,{style:"width: 140px !important;margin-right: 14px"},{default:()=>[a(i,{value:e.not_played_note_percent,"onUpdate:value":r=>e.not_played_note_percent=r},{suffix:()=>"%"})]})]}),a(m,{label:"\u97F3\u51C6\u95EE\u9898\uFF1A\u6EE1\u8DB3\u97F3\u7B26\u504F\u9AD8/\u504F\u4F4E\u8FBE\u5230",path:"played_note_high_low_percent",rule:[{required:!0,pattern:/^\d+$/,message:"\u8BF7\u8F93\u5165",trigger:["blur","input"]}]},{default:()=>[a(d,{style:"width: 140px !important;margin-right: 14px"},{default:()=>[a(i,{value:e.played_note_high_low_percent,"onUpdate:value":r=>e.played_note_high_low_percent=r},{suffix:()=>"%"})]}),c("\u65F6\u63D0\u793A")]}),a(m,{label:"\u8282\u594F\u95EE\u9898\uFF1A\u6F14\u594F\u97F3\u7B26\u504F\u5FEB/\u504F\u6162\u8FBE\u5230",path:"played_note_fast_slow_percent",rule:[{required:!0,pattern:/^\d+$/,message:"\u8BF7\u8F93\u5165",trigger:["blur","input"]}]},{default:()=>[a(d,{style:"width: 140px !important;margin-right: 14px"},{default:()=>[a(i,{value:e.played_note_fast_slow_percent,"onUpdate:value":r=>e.played_note_fast_slow_percent=r},{suffix:()=>"%"})]}),c("\u65F6\u63D0\u793A")]}),a(m,{label:"\u5B8C\u6574\u6027\u95EE\u9898\uFF1A\u6F14\u594F\u97F3\u7B26\u65F6\u503C\u4E0D\u8DB3\u8FBE\u5230",path:"played_note_duration_less_percent",rule:[{required:!0,pattern:/^\d+$/,message:"\u8BF7\u8F93\u5165",trigger:["blur","input"]}]},{default:()=>[a(d,{style:"width: 140px !important;margin-right: 14px"},{default:()=>[a(i,{value:e.played_note_duration_less_percent,"onUpdate:value":r=>e.played_note_duration_less_percent=r},{suffix:()=>"%"})]}),c("\u65F6\u63D0\u793A")]}),a(m,{label:"\u8BC4\u6D4B\u96BE\u5EA6\uFF1A\u8BC4\u6D4B\u7EA7\u522B\u4E3A\u8FDB\u9636\u3001\u5927\u5E08\u65F6\uFF0C\u8BC4\u6D4B\u7EF4\u5EA6\u5206\u6570\u90FD\u4F4E\u4E8E",path:"evaluation_level_score_less",rule:[{required:!0,pattern:/^\d+$/,message:"\u8BF7\u8F93\u5165",trigger:["blur","input"]}]},{default:()=>[a(d,{style:"width: 140px !important;margin-right: 14px"},{default:()=>[a(i,{value:e.evaluation_level_score_less,"onUpdate:value":r=>e.evaluation_level_score_less=r},{suffix:()=>"\u5206"})]}),c("\u65F6\u63D0\u793A")]}),a(m,{label:"\u8BC4\u6D4B\u96BE\u5EA6\uFF1A\u8BC4\u6D4B\u7EA7\u522B\u4E3A\u5165\u95E8\u65F6\uFF0C\u8BC4\u6D4B\u7EF4\u5EA6\u5206\u6570\u90FD\u4F4E\u4E8E",path:"evaluation_level_score_less_beginner",rule:[{required:!0,pattern:/^\d+$/,message:"\u8BF7\u8F93\u5165",trigger:["blur","input"]}]},{default:()=>[a(d,{style:"width: 140px !important;margin-right: 14px"},{default:()=>[a(i,{value:e.evaluation_level_score_less_beginner,"onUpdate:value":r=>e.evaluation_level_score_less_beginner=r},{suffix:()=>"\u5206"})]}),c("\u65F6\u63D0\u793A")]}),a(m,{label:"\u4E0D\u719F\u7EC3\u5C0F\u8282\uFF1A\u8BC4\u6D4B\u5206\u503C\u4E0D\u4F4E\u4E8E",path:"not_proficient_section_score",rule:[{required:!0,pattern:/^\d+$/,message:"\u8BF7\u8F93\u5165",trigger:["blur","input"]}]},{default:()=>[a(d,{style:"width: 140px !important;margin-right: 14px"},{default:()=>[a(i,{value:e.not_proficient_section_score,"onUpdate:value":r=>e.not_proficient_section_score=r},{suffix:()=>"\u5206"})]})]})]})]}),a(L,{type:"primary",onClick:o,loading:s.value},{default:()=>[c("\u4FDD\u5B58\u8BBE\u7F6E")]})])}}),ae=b({name:"param-settings",setup(){const e=h({tabName:"COMMON",appKeyList:[],appNameList:[]}),t=k();$(n=>{n.form.tabName&&(e.tabName=n.form.tabName)});const s=n=>{j(n,"tabName",t)};return v(()=>_(this,null,function*(){{const n=Object.keys(S),{data:o}=yield I({page:1,rows:99,parentId:0});(o.rows||[]).forEach(u=>{n.includes(u.appKey)&&(e.appKeyList.push(u.appKey),e.appNameList.push(u.appName))})}})),()=>a("div",{class:"system-menu-container"},[a("div",{class:["section-container"],style:"padding-top: 0"},[a(O,{type:"line",size:"large",value:e.tabName,"onUpdate:value":[n=>e.tabName=n,n=>s(n)]},{default:()=>[a(C,{name:"COMMON",tab:"\u901A\u7528\u53C2\u6570\u914D\u7F6E"},{default:()=>[a(Q,null,null)]}),e.appKeyList.map((n,o)=>P(C,{name:n,tab:e.appNameList[o]},{default:()=>P(H,{appKey:n})}))]})])])}});export{ae as default};