CompetitionAPI_dotnet/CompetitionAPI/wwwroot/assets/Troubleshoot-CkHKonfj.js

2 lines
1.6 KiB
JavaScript

import{q as g,r as N}from"./index-oCd6JdpL.js";import{_ as S,r as u,o as L,b as s,c as l,d as T,e as c,f as V,w as n,g as w,q as _,x as B,y as i,F as C,n as E,i as p,t as M}from"./index-DjgxJhni.js";import"./request-B06qJ2Sm.js";const F={class:"LinePatrolMain"},q={class:"checkMain"},D={class:"settingUp"},U={class:"maintain"},G={__name:"Troubleshoot",props:["ExamId"],setup(m){const t=u([]),r=u([]),{ExamId:h}=m;let v=localStorage.getItem("rowStatus");L(()=>{I()});const d={ExamId:h,Type:"排故"},I=async()=>{const o=await g(d);r.value=o.data.ToolList,t.value=o.data.SelectToolList,t.value=o.data.ToolList.map(e=>{if(o.data.SelectToolList.includes(e.ToolId))return{ToolId:e.ToolId,ToolType:e.ToolType,ToolName:e.ToolName,ThreeToolId:e.ThreeToolId}}).filter(e=>e)},f=async()=>{console.log(t.value,"handleSave--");const o=await N({...d,Data:t.value});o.code===0?i({message:"操作成功.",type:"success"}):i.error((o==null?void 0:o.data)||"操作失敗")};return(o,e)=>{const k=s("el-checkbox"),b=s("el-checkbox-group"),x=s("el-button");return l(),T("div",F,[c("div",q,[V(b,{modelValue:t.value,"onUpdate:modelValue":e[0]||(e[0]=a=>t.value=a)},{default:n(()=>[(l(!0),T(C,null,E(r.value,(a,y)=>(l(),_(k,{key:y,label:a.ToolId,value:{ToolId:a.ToolId,ToolType:a.ToolType,ToolName:a.ToolName,ThreeToolId:a.ThreeToolId}},{default:n(()=>[p(M(a.ToolName),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue"])]),c("div",D,[c("div",U,[w(v)=="未发布"?(l(),_(x,{key:0,onClick:f},{default:n(()=>[p("保存")]),_:1})):B("",!0)])])])}}},A=S(G,[["__scopeId","data-v-ea0c6771"]]);export{A as default};