Files
aiot-platform-ui/apps/web-antd/dist/js/upgrade-priority-form-BMsrtYAm.js
lzh 35c3d0e06e
All checks were successful
Web UI CI/CD / build-and-deploy (push) Successful in 8s
chore: build and deploy web-antd
2026-03-18 16:18:59 +08:00

2 lines
2.4 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

var y=(g,p,t)=>new Promise((f,n)=>{var l=s=>{try{o(t.next(s))}catch(i){n(i)}},d=s=>{try{o(t.throw(s))}catch(i){n(i)}},o=s=>s.done?f(s.value):Promise.resolve(s.value).then(l,d);o((t=t.apply(g,p)).next())});import{ar as w,a7 as C,a9 as I,cp as V,an as _,ac as k}from"./bootstrap-CW2RsBQq.js";import{u as A}from"./index-DduASFrO.js";import{m as F,b9 as m,ab as j,b2 as B,bJ as x,ae as a,j as u,u as c,bp as b}from"../jse/index-index-Cy8amzIl.js";import{u as D}from"./use-modal-B-MTUp6r.js";import"./x-DsiLb8yz.js";const N={class:"upgrade-form"},T={class:"mb-4 rounded-lg bg-gray-50 p-4 dark:bg-gray-800"},M={class:"mb-2 flex items-center justify-between"},S={class:"font-medium"},U={class:"flex items-center justify-between"},z={class:"flex items-center gap-2"},J={class:"text-gray-600 dark:text-gray-300"},L=F({name:"UpgradePriorityForm",__name:"upgrade-priority-form",emits:["success"],setup(g,{emit:p}){const t=p,[f,n]=D({onOpenChange:r=>{if(r){const e=n.getData();e&&(l.value=e.orderId,d.value=e.orderCode,o.value=e.currentPriority)}},onConfirm:h}),l=m(),d=m(""),o=m(2),s=m(!1),[i,v]=w({schema:[{fieldName:"reason",label:"升级原因",component:"Textarea",componentProps:{placeholder:"请输入升级为P0紧急工单的原因例如领导临时检查、VIP客户投诉等",rows:4,maxLength:200,showCount:!0},rules:C().min(5,"原因至少5个字符").max(200,"原因不能超过200字符")}],showDefaultActions:!1});function P(r){return{0:"P0 (紧急)",1:"P1 (重要)",2:"P2 (普通)"}[r]||"P2"}function h(){return y(this,null,function*(){const{valid:r,values:e}=yield v.validate();if(!(!r||!e)){s.value=!0;try{yield A({orderId:l.value,reason:e.reason}),I.success("已升级为P0紧急工单"),n.close(),t("success")}finally{s.value=!1}}})}return(r,e)=>(B(),j(c(f),{title:"升级优先级",class:"w-[500px]"},{default:x(()=>[a("div",N,[u(c(V),{type:"warning","show-icon":"",class:"mb-4",message:"升级为P0紧急工单后该工单将插队优先处理"},{icon:x(()=>[u(c(_),{icon:"lucide:zap",class:"text-orange-500"})]),_:1}),a("div",T,[a("div",M,[e[0]||(e[0]=a("span",{class:"text-sm text-gray-500"},"工单编号",-1)),a("span",S,b(d.value),1)]),a("div",U,[e[2]||(e[2]=a("span",{class:"text-sm text-gray-500"},"当前优先级",-1)),a("div",z,[a("span",J,b(P(o.value)),1),u(c(_),{icon:"lucide:arrow-right",class:"text-gray-400"}),e[1]||(e[1]=a("span",{class:"font-bold text-red-500"},"P0 (紧急)",-1))])])]),u(c(i))])]),_:1}))}}),Q=k(L,[["__scopeId","data-v-ba80bad5"]]);export{Q as default};