ct-answer-designer 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3474,9 +3474,10 @@ const mk = (e, t) => {
3474
3474
  return !1;
3475
3475
  };
3476
3476
  return xs(async () => {
3477
+ var S, Y;
3477
3478
  console.log("💻 WorkOrderPc 组件已挂载"), console.log("📋 orderInfo:", n.orderInfo);
3478
3479
  const O = await b();
3479
- console.log("🔐 登录状态:", O), O ? (r("login-success", y.value), n.orderInfo.result && n.orderInfo.result == "1" ? (console.log("👀 查看已提交的工单"), await k(), await E()) : (console.log("📝 加载工单,等待开始答题"), await k())) : console.log("❌ 未登录,等待登录...");
3480
+ console.log("🔐 登录状态:", O), O ? (r("login-success", y.value), (S = n.orderInfo) != null && S.result && ((Y = n.orderInfo) == null ? void 0 : Y.result) == "1" ? (console.log("👀 查看已提交的工单"), await k(), await E()) : (console.log("📝 加载工单,等待开始答题"), await k())) : console.log("❌ 未登录,等待登录...");
3480
3481
  }), (O, S) => {
3481
3482
  const Y = ie("el-empty"), le = ie("formCreate"), M = ie("el-table-column"), fe = ie("el-button"), oe = ie("el-table"), ue = ie("el-dialog"), pe = dl("loading");
3482
3483
  return J(), he("div", MD, [
@@ -3655,7 +3656,7 @@ const mk = (e, t) => {
3655
3656
  ]);
3656
3657
  };
3657
3658
  }
3658
- }), M1 = /* @__PURE__ */ mk(t9, [["__scopeId", "data-v-513a856f"]]), n9 = { class: "work-order-mobile" }, r9 = {
3659
+ }), M1 = /* @__PURE__ */ mk(t9, [["__scopeId", "data-v-bf6f45bd"]]), n9 = { class: "work-order-mobile" }, r9 = {
3659
3660
  key: 0,
3660
3661
  class: "loading-container"
3661
3662
  }, i9 = { key: 1 }, o9 = {
@@ -3875,9 +3876,10 @@ const mk = (e, t) => {
3875
3876
  return !1;
3876
3877
  };
3877
3878
  return xs(async () => {
3879
+ var ue, pe;
3878
3880
  console.log("📱 WorkOrderMobile 组件已挂载"), console.log("📋 orderInfo:", n.orderInfo);
3879
3881
  const oe = await B();
3880
- console.log("🔐 登录状态:", oe), oe ? (r("login-success", k.value), n.orderInfo.result && n.orderInfo.result == "1" ? (console.log("👀 查看已提交的工单"), await R(), await K()) : (console.log("📝 加载工单,等待开始答题"), await R())) : console.log("❌ 未登录,等待登录...");
3882
+ console.log("🔐 登录状态:", oe), oe ? (r("login-success", k.value), (ue = n.orderInfo) != null && ue.result && ((pe = n.orderInfo) == null ? void 0 : pe.result) == "1" ? (console.log("👀 查看已提交的工单"), await R(), await K()) : (console.log("📝 加载工单,等待开始答题"), await R())) : console.log("❌ 未登录,等待登录...");
3881
3883
  }), (oe, ue) => {
3882
3884
  const pe = ie("van-empty"), H = ie("van-icon"), X = ie("formCreateMobile"), U = ie("van-popup");
3883
3885
  return J(), he("div", n9, [
@@ -4037,7 +4039,7 @@ const mk = (e, t) => {
4037
4039
  ]);
4038
4040
  };
4039
4041
  }
4040
- }), P1 = /* @__PURE__ */ mk(M9, [["__scopeId", "data-v-5fcc3425"]]), gk = lk(M1), vk = lk(P1);
4042
+ }), P1 = /* @__PURE__ */ mk(M9, [["__scopeId", "data-v-d146fd9d"]]), gk = lk(M1), vk = lk(P1);
4041
4043
  typeof window < "u" && !customElements.get("work-order-pc") && customElements.define("work-order-pc", gk);
4042
4044
  typeof window < "u" && !customElements.get("work-order-mobile") && customElements.define("work-order-mobile", vk);
4043
4045
  function P9() {
@@ -27,7 +27,7 @@
27
27
  clientId
28
28
  loginUrl: SPUrl
29
29
  }
30
- }`,variables:N}}function S(N,V){var D=Object.keys(N);if(Object.getOwnPropertySymbols){var Y=Object.getOwnPropertySymbols(N);V&&(Y=Y.filter(function(re){return Object.getOwnPropertyDescriptor(N,re).enumerable})),D.push.apply(D,Y)}return D}function $(N){for(var V=1;V<arguments.length;V++){var D=arguments[V]!=null?arguments[V]:{};V%2?S(D,!0).forEach(function(Y){T(N,Y,D[Y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(N,Object.getOwnPropertyDescriptors(D)):S(D).forEach(function(Y){Object.defineProperty(N,Y,Object.getOwnPropertyDescriptor(D,Y))})}return N}var x=function(){function N(V){_(this,N),this.options={nonce:Math.random().toString().slice(2,8),timestamp:parseInt(Date.now()/1e3),appType:"oidc",responseType:"code",scope:"openid profile email phone",state:Math.random().toString(36).slice(2)},this.options=Object.assign({},this.options,V),this.dev=!!this.options.dev,this._checkOptions(),this.registerURL=(this.dev?"http://":"https://")+this.options.appDomain+"/register",this.logoutURL=(this.dev?"http://":"https://")+this.options.appDomain+"/cas/logout",this.trackSessionURL=(this.dev?"http://":"https://")+this.options.appDomain+"/cas/session",this.createSessionURL=(this.dev?"http://":"https://")+this.options.appDomain+"/cas/createSession";try{this.graphQLURL=this.options.host.oauth}catch{this.graphQLURL=this.dev?"http://localhost:5510/graphql":"https://oauth.authing.cn/graphql"}this.appInfo=this._queryAppInfo(),this.stored=!1}return O(N,[{key:"_queryAppInfo",value:function(){var V=y(regeneratorRuntime.mark(function Y(){var re,M,se,te,oe=this;return regeneratorRuntime.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:if(re=new P({baseURL:this.graphQLURL}),M={oauth:Z.bind(this,{appId:this.options.appId,responseType:this.options.responseType,redirectUrl:this.options.redirectUrl}),oidc:ne.bind(this,{appId:this.options.appId,responseType:this.options.responseType,redirectUrl:this.options.redirectUrl}),saml:U.bind(this,{appId:this.options.appId})},se={oauth:"QueryAppInfoByAppID",oidc:"QueryOIDCAppInfoByAppID",saml:"QuerySAMLServiceProviderInfoByAppID"},!(this.options.appType in M)){ue.next=9;break}return ue.next=6,re.request(M[this.options.appType]()).then(function(G){return G[se[oe.options.appType]]});case 6:te=ue.sent,ue.next=10;break;case 9:throw Error("appType 类型错误,可选参数为 oauth oidc saml");case 10:return ue.abrupt("return",te);case 11:case"end":return ue.stop()}},Y,this)}));function D(){return V.apply(this,arguments)}return D}()},{key:"_checkOptions",value:function(){for(var V=["appId","appDomain","appType"],D=Object.keys(this.options),Y=0;Y<V.length;Y++)if(!D.includes(V[Y]))throw Error("AuthingSSO 初始化:缺少 "+V[Y]+" 参数");if(!/^[0-9a-f]{24}$/.test(this.options.appId))throw Error("appId 格式错误,请在 OAuth、OIDC 或 SAML 应用配置页面查看正确的 appId");return!0}},{key:"login",value:function(){var V=this,D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Y=D.lang;this.appInfo.then(function(re){if(!re)throw Error("appId 错误,请在 OAuth、OIDC 或 SAML 应用配置页面查看正确的 appId");var M=new URL(re.loginUrl);M.searchParams.delete("scope"),M.searchParams.append("scope",V.options.scope),M.searchParams.delete("state"),M.searchParams.append("state",V.options.state),Y&&M.searchParams.append(N._langStorageKey,Y),~V.options.scope.indexOf("offline_access")&&M.searchParams.append("prompt","consent"),location.href=M.href})}},{key:"register",value:function(){var V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},D=V.lang,Y=new URL(this.registerURL);D&&Y.searchParams.append(N._langStorageKey,D),location.href=Y.href}},{key:"windowLogin",value:function(){var V=(screen.width-500)/2,D=(screen.height-700)/2;this.appInfo.then(function(Y){if(!Y)throw Error("appId 错误,请在 OAuth、OIDC 或 SAML 应用配置页面查看正确的 appId");var re=Y.loginUrl;window.open(re,"_blank","width=500,height=700,left=".concat(V,",top=").concat(D))})}},{key:"getUrlHash",value:function(){try{if(location.hash){var V=location.hash.substring(1).split("&"),D={};return V.forEach(function(Y){var re=Y.split("="),M=p(re,2),se=M[0],te=M[1];D[se]=te}),D}return null}catch{return{err:"获取失败"}}}},{key:"getUrlQuery",value:function(){var V=location.search.slice(1).split("&").map(function(Y){return Y.split("=")}),D={};return V.forEach(function(Y){D[Y[0]]=Y[1]}),D}},{key:"logout",value:function(){var V=y(regeneratorRuntime.mark(function Y(){var re;return regeneratorRuntime.wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return M.next=2,L.a.get(this.logoutURL,{withCredentials:!0,headers:{"x-authing-oidc-code":localStorage.getItem("x-authing-oidc-code")||"","x-authing-oidc-accesstoken":localStorage.getItem("x-authing-oidc-accesstoken")||"","x-authing-oauth-code":localStorage.getItem("x-authing-oauth-code")||"","x-authing-oauth-accesstoken":localStorage.getItem("x-authing-oauth-accesstoken")||""}});case 2:return re=M.sent,localStorage.removeItem("x-authing-oidc-code"),localStorage.removeItem("x-authing-oidc-accesstoken"),localStorage.removeItem("x-authing-oauth-code"),localStorage.removeItem("x-authing-oauth-accesstoken"),M.abrupt("return",re.data);case 8:case"end":return M.stop()}},Y,this)}));function D(){return V.apply(this,arguments)}return D}()},{key:"createSession",value:function(){var V=y(regeneratorRuntime.mark(function Y(re){var M,se,te,oe,ue;return regeneratorRuntime.wrap(function(G){for(;;)switch(G.prev=G.next){case 0:M=re.token,se=re.redirectUrl,te=re.newTab,oe=te===void 0||te,ue="".concat(this.createSessionURL,"?authorization=").concat(M,"&redirect_url=").concat(se),oe?window.open(ue,"_blank"):window.location.href=ue;case 3:case"end":return G.stop()}},Y,this)}));function D(Y){return V.apply(this,arguments)}return D}()},{key:"getAccessTokenSilently",value:function(){var V=y(regeneratorRuntime.mark(function Y(){var re,M,se,te;return regeneratorRuntime.wrap(function(oe){for(;;)switch(oe.prev=oe.next){case 0:if(this.options.appDomain){oe.next=2;break}throw new Error("请在初始化时传入 appDomain 参数,值为用户池域名");case 2:if(this.options.appId){oe.next=4;break}throw new Error("请在初始化时传入 appId 参数,值为应用 ID");case 4:if(this.options.redirectUrl){oe.next=6;break}throw new Error("请在初始化时传入 redirectUrl 参数,值为业务回调地址");case 6:return re=document.createElement("iframe"),M=Math.random().toString().slice(2).toString(16),se=Math.random().toString().slice(2).toString(16),te="https://".concat(this.options.appDomain,"/oidc/auth?client_id=").concat(this.options.appId,"&redirect_uri=").concat(this.options.redirectUrl,"&response_type=id_token%20token&scope=openid+profile+email+phone&state=").concat(M,"&response_mode=web_message&nonce=").concat(se,"&prompt=none"),re.title="postMessage() Initiator",re.src=te,re.hidden=!0,document.body.append(re),oe.abrupt("return",new Promise(function(ue,G){var X=window.addEventListener("message",function(H){if(H.data.response.error)return G(new Error(H.data.response.error_description)),window.removeEventListener("message",X),void re.remove();var I=H.data.response,J=I.access_token,B=I.id_token;ue({access_token:J,id_token:B}),window.removeEventListener("message",X),re.remove()})}));case 15:case"end":return oe.stop()}},Y,this)}));function D(){return V.apply(this,arguments)}return D}()},{key:"trackSession",value:function(){var V=y(regeneratorRuntime.mark(function Y(){var re,M,se,te,oe,ue,G,X,H;return regeneratorRuntime.wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return this.stored||(re=this.getUrlQuery(),M=this.getUrlHash(),this.options.appType==="oidc"?(se=re&&re.code||"",te=M&&M.access_token||"",se&&localStorage.setItem("x-authing-oidc-accesstoken",se),te&&localStorage.setItem("x-authing-oidc-accesstoken",te)):this.options.appType==="oauth"&&(oe=re&&re.code||"",ue=M&&M.access_token||"",oe&&localStorage.setItem("x-authing-oauth-code",oe),ue&&localStorage.setItem("x-authing-oauth-accesstoken",ue)),this.stored=!0),I.next=3,L.a.get(this.trackSessionURL,{withCredentials:!0,headers:{"x-authing-oidc-code":localStorage.getItem("x-authing-oidc-accesstoken")||"","x-authing-oidc-accesstoken":localStorage.getItem("x-authing-oidc-accesstoken")||"","x-authing-oauth-code":localStorage.getItem("x-authing-oauth-code")||"","x-authing-oauth-accesstoken":localStorage.getItem("x-authing-oauth-accesstoken")||""}});case 3:if(G=I.sent,!G.data.session){I.next=11;break}return X={"OIDC code 使用文档":"https://docs.authing.cn/authing/advanced/oidc/oidc-authorization#shi-yong-code-huan-qu-token","OIDC 本地验证 access_token 和 id_token 的方式":"https://docs.authing.cn/authing/advanced/authentication/verify-jwt-token#oidc-secret-token","OAuth access_token 合法性在线验证":"https://docs.authing.cn/authing/advanced/authentication/verify-jwt-token#yan-zheng-oauth-accesstoken-he-fa-xing","OIDC access_token 和 id_token 合法性在线验证":"https://docs.authing.cn/authing/advanced/authentication/verify-jwt-token#yan-zheng-oidc-accesstoken-huo-idtoken-de-he-fa-xing"},this.options.appType==="oidc"?(X={"OIDC 本地验证 access_token 和 id_token 的方式":"https://docs.authing.cn/authing/advanced/authentication/verify-jwt-token#oidc-secret-token","OIDC access_token 和 id_token 合法性在线验证":"https://docs.authing.cn/authing/advanced/authentication/verify-jwt-token#yan-zheng-oidc-accesstoken-huo-idtoken-de-he-fa-xing"},this.options.responseType==="code"?X["OIDC code 使用文档"]="https://docs.authing.cn/authing/advanced/oidc/oidc-authorization#shi-yong-code-huan-qu-token":this.options.responseType==="implicit"&&(X["OIDC implicit 文档"]="https://docs.authing.cn/authing/advanced/oidc/oidc-authorization#shi-yong-yin-shi-liu-cheng-implicit-flow")):this.options.appType==="oauth"&&(X={"OAuth access_token 合法性在线验证":"https://docs.authing.cn/authing/advanced/authentication/verify-jwt-token#yan-zheng-oauth-accesstoken-he-fa-xing"},this.options.responseType==="code"?X["OAuth code 使用文档"]="https://docs.authing.cn/authing/advanced/oauth2/oauth-authorization#shi-yong-authorizationcode-mo-shi":this.options.responseType==="implicit"&&(X["OAuth implicit 文档"]="https://learn.authing.cn/authing/advanced/oauth2/oauth-authorization#implicit-mo-shi")),H={},this.options.responseType==="code"?(H=this.getUrlQuery(),H={code:H.code}):this.options.responseType==="implicit"&&(H=this.getUrlHash(),H&&(H={access_token:H.access_token,id_token:H.id_token})),G.data.userInfo["__Token 验证方式说明"]="https://docs.authing.cn/authing/advanced/authentication/verify-jwt-token#fa-song-token-gei-authing-fu-wu-qi-yan-zheng",I.abrupt("return",$({},G.data,{urlParams:$({},H,{__参数使用说明:X,__authing_hint:"code token id_token 字段只会在第一次回调到业务地址的时候从 url 取出,请自行存储以备使用"})}));case 11:return I.abrupt("return",G.data);case 12:case"end":return I.stop()}},Y,this)}));function D(){return V.apply(this,arguments)}return D}()}]),N}();T(x,"_langStorageKey","_authing_lang");var w=x;t.default=w}}).default});const tw={apiPath:"https://ct-test.hep.com.cn/ct-api-online"},M3=()=>new Promise(e=>{if(window.AuthingSSO){e(window.AuthingSSO);return}const t=setInterval(()=>{window.AuthingSSO&&(clearInterval(t),e(window.AuthingSSO))},100);setTimeout(()=>{clearInterval(t),window.AuthingSSO||e(null)},1e4)});function nw(e){const t=i.ref(!1),n=i.ref(!1),r=i.ref(null);let o=null;const a=async()=>{const d=await M3();if(!d)return null;try{return o=new d({appId:"6135793845ae7f18bc02aad0",appDomain:"hep-center.u2.hep.com.cn",baseUrl:"https://core.u2.hep.com.cn",redirectUrl:window.location.href,host:{user:"https://users.u2.hep.com.cn/graphql",oauth:"https://oauth.u2.hep.com.cn/graphql"}}),o}catch(p){return console.error("初始化 AuthingSSO 失败:",p),null}},l=async()=>{var d;n.value=!0;try{if(!o&&(o=await a(),!o))return t.value=!1,n.value=!1,!1;const p=await o.trackSession();if(p.session!==null&&p.userInfo){const h=await $3({token:p.userInfo.token});if(h.token){R3(h.token);const g=tw.apiPath,b=await om({url:g+"/getInfo",headers:{Authorization:"Bearer "+h.token}});if(b.data.code===200)return r.value=b.data.user,localStorage.setItem("userInfo",JSON.stringify({message:b.data.user,success:!0})),FcDesigner.formCreate.setData("Admin-Token",h.token),formCreateMobile.setData("Admin-Token",h.token),t.value=!0,n.value=!1,!0}}return t.value=!1,((d=e.apiConfig)==null?void 0:d.autoShowLogin)!==!1?(n.value=!1,s()):n.value=!1,!1}catch(p){return console.error("❌ 检查登录状态失败:",p),t.value=!1,n.value=!1,!1}},s=async()=>{o||(o=await a()),o?(o.logout(),o.login()):(console.error("❌ SSO 配置错误"),tn.ElMessage.error("SSO 配置错误"))},u=async()=>{var d;try{localStorage.removeItem("token"),localStorage.removeItem("userInfo"),o&&o.logout(),t.value=!1,r.value=null,tn.ElMessage.success("已退出登录"),((d=e.apiConfig)==null?void 0:d.autoShowLogin)!==!1&&setTimeout(()=>{s()},500)}catch(p){console.error("登出失败:",p)}},c=()=>{s()};return{isLoggedIn:t,loginVisible:i.ref(!1),loginLoading:n,loginForm:i.ref({}),userInfo:r,checkAuth:l,handleLogin:s,handleLogout:u,showLogin:c}}const rw=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},j3={class:"work-order-pc"},P3={key:0,class:"loading-container"},I3={key:1,class:"fc-designer"},L3={class:"designer-container"},z3={class:"form-section"},U3={class:"header-container"},H3={class:"form-title"},G3={key:1,class:"timer-container"},q3={class:"timer-display"},W3={class:"form-section"},Y3={class:"form-section button-group"},X3={class:"action-buttons"},K3=["disabled"],Q3={class:"btn-text"},J3={class:"history-content"},Z3={class:"user-cell"},eS={class:"user-name"},tS={class:"time-cell"},ld=rw(Object.assign({name:"WorkOrderPc"},{props:{orderInfo:{type:Object,required:!0,default:()=>({})}},emits:["login-success","logout","submit-success","submit-error","view-history"],setup(e,{emit:t}){const n=e,r=t,o=i.ref(!1),a=i.ref(!1),l=i.ref(!1),s=i.ref(null),u=i.ref(null),c=i.ref(0),d=i.ref(null),p=i.ref(!1),h=i.ref([]),g=i.reactive({paperName:"",rules:[],option:{},formData:{},fApi:null}),{isLoggedIn:b,loginLoading:y,userInfo:_,checkAuth:v}=nw(n),k=async()=>{const V=await id({paperUuid:n.orderInfo.paperUuid,testId:n.orderInfo.testId});console.log("工单提交详情:",V);let D=JSON.parse(V.data[0].result);console.log("解析后的数据:",D),g.formData=D.record,g.fApi.disabled(!0),a.value=!0,c.value=V.data[0].useTime},A=async()=>{try{const V=await Z_({paperUuid:n.orderInfo.paperUuid});if(console.log("工单详情:",V),V.data&&V.data.length>0){const D=formCreate.parseJson(V.data[0].paperJsonContent);g.paperName=V.data[0].paperName,g.rules=formCreate.parseJson(D.rule),g.option=formCreate.parseJson(D.options),console.log("解析后的 paperInfo:",g),await i.nextTick(),g.fApi&&(g.fApi.submitBtnProps({show:!1}),g.fApi.disabled(!0))}}catch(V){console.error("获取工单详情失败:",V),tn.ElMessage.error("获取工单详情失败")}},O=i.ref({}),T=async V=>{try{if(o.value=!0,!await N()){tn.ElMessage({type:"warning",message:"表单验证失败,请检查输入",duration:3e3});return}const Y=w();O.value=Y,console.log("表单数据:",Y);const re=Object.keys(O.value).map(se=>{const te=g.rules.find(oe=>oe.children&&oe.children.length?oe.children.some(ue=>ue.field===se):oe.field===se);if(te)if(te.children&&te.children.length){const oe=te.children.find(ue=>ue.field===se);if(oe){let ue;return oe.type=="upload"?ue=JSON.stringify(O.value[se]):ue=O.value[se],{questionUuid:se,answer:ue,type:oe.type}}}else{let oe;return te.type=="upload"?oe=JSON.stringify(O.value[se]):oe=O.value[se],{questionUuid:se,answer:oe,type:te.type}}return{questionUuid:se,answer:O.value[se]}});if(V===0){const se=await ad({status:V,paperUuid:n.orderInfo.paperUuid,testId:Z.value?Z.value:"",useTime:c.value,result:{record:Y,statistics:re}});tn.ElMessage({type:"success",message:"工单暂存成功!",duration:3e3});return}$();const M=await ad({status:V,paperUuid:n.orderInfo.paperUuid,useTime:c.value,testId:Z.value?Z.value:"",result:{record:Y,statistics:re}});console.log("提交接口返回:",M),g.fApi&&g.fApi.disabled(!0),a.value=!0,l.value=!1,tn.ElMessage({type:"success",message:"工单提交成功!",duration:3e3}),r("submit-success",{formData:Y,response:M}),console.log("工单提交成功!",Y)}catch(D){console.error("提交失败:",D),tn.ElMessage({type:"error",message:"工单提交失败,请重试!",duration:3e3}),r("submit-error",D)}finally{o.value=!1}},j=()=>{g.fApi&&(g.fApi.resetFields(),$(),c.value=0,S(),tn.ElMessage({type:"info",message:"表单已重置,计时器已重新开始",duration:2e3}))},L=()=>{if(l.value){tn.ElMessage.warning("已经在答题中了");return}a.value&&(a.value=!1,c.value=0,g.fApi&&g.fApi.resetFields(),Z.value=""),g.fApi.disabled(!1),l.value=!0,S(),tn.ElMessage({type:"success",message:"开始答题,计时已开始!",duration:2e3}),console.log("开始答题,计时开始")},q=async()=>{try{const V=await ew({paperUuid:n.orderInfo.paperUuid});console.log("答题记录:",V),V.data&&V.data.length>0?(h.value=V.data,p.value=!0):tn.ElMessage({type:"info",message:"暂无答题记录",duration:2e3})}catch(V){console.error("获取答题记录失败:",V),tn.ElMessage.error("获取答题记录失败")}},K=V=>{if(V<60)return`${V}秒`;if(V<3600){const D=Math.floor(V/60),Y=V%60;return`${D}分${Y}秒`}else{const D=Math.floor(V/3600),Y=Math.floor(V%3600/60),re=V%60;return`${D}时${Y}分${re}秒`}},R=V=>V===0?"暂存":"已提交",P=async V=>(await id({paperUuid:n.orderInfo.paperUuid,testId:V.testId})).data[0],Z=i.ref(""),ne=async V=>{try{let D=await P(V);console.log("record",D),Z.value=D.testId;const Y=JSON.parse(D.result);g.formData=Y.record,c.value=D.useTime,l.value=!0,a.value=!1,g.fApi&&g.fApi.disabled(!1),s.value=Date.now()-c.value*1e3,d.value=setInterval(()=>{c.value=Math.floor((Date.now()-s.value)/1e3)},1e3),p.value=!1,tn.ElMessage({type:"success",message:"已恢复上次答题内容,继续答题!",duration:2e3}),console.log("继续答题,恢复数据:",Y.record)}catch(D){console.error("恢复答题数据失败:",D),tn.ElMessage.error("恢复答题数据失败")}},U=async V=>{try{let D=await P(V);const Y=JSON.parse(D.result);g.formData=Y.record,c.value=D.useTime,g.fApi&&g.fApi.disabled(!0),a.value=!0,l.value=!1,p.value=!1,tn.ElMessage({type:"success",message:"已加载答题详情",duration:2e3}),console.log("查看详情:",Y.record)}catch(D){console.error("查看详情失败:",D),tn.ElMessage.error("查看详情失败")}},S=()=>{s.value=Date.now(),d.value=setInterval(()=>{c.value=Math.floor((Date.now()-s.value)/1e3)},1e3)},$=()=>{d.value&&(clearInterval(d.value),d.value=null),u.value=Date.now()},x=V=>{const D=Math.floor(V/3600),Y=Math.floor(V%3600/60),re=V%60;return D>0?`${D.toString().padStart(2,"0")}:${Y.toString().padStart(2,"0")}:${re.toString().padStart(2,"0")}`:`${Y.toString().padStart(2,"0")}:${re.toString().padStart(2,"0")}`},w=()=>{if(g.fApi)try{const V=g.fApi.formData();if(V)return V;const D=g.fApi.formData;return D||g.formData}catch(V){return console.log("获取表单数据失败,使用备用方案:",V),g.formData}return g.formData},N=async()=>{if(g.fApi)try{return await g.fApi.validate(),console.log("表单验证通过"),!0}catch(V){return console.log("表单验证失败:",V),!1}return!1};return i.onMounted(async()=>{console.log("💻 WorkOrderPc 组件已挂载"),console.log("📋 orderInfo:",n.orderInfo);const V=await v();console.log("🔐 登录状态:",V),V?(r("login-success",_.value),n.orderInfo.result&&n.orderInfo.result=="1"?(console.log("👀 查看已提交的工单"),await A(),await k()):(console.log("📝 加载工单,等待开始答题"),await A())):console.log("❌ 未登录,等待登录...")}),(V,D)=>{const Y=i.resolveComponent("el-empty"),re=i.resolveComponent("formCreate"),M=i.resolveComponent("el-table-column"),se=i.resolveComponent("el-button"),te=i.resolveComponent("el-table"),oe=i.resolveComponent("el-dialog"),ue=i.resolveDirective("loading");return i.openBlock(),i.createElementBlock("div",j3,[i.unref(b)?(i.openBlock(),i.createElementBlock("div",I3,[i.createElementVNode("div",L3,[i.createElementVNode("div",z3,[i.createElementVNode("div",U3,[i.createElementVNode("h1",H3,i.toDisplayString(g.paperName),1),l.value?(i.openBlock(),i.createElementBlock("div",G3,[D[7]||(D[7]=i.createElementVNode("div",{class:"timer-label"},"填写时间",-1)),i.createElementVNode("div",q3,i.toDisplayString(x(c.value)),1)])):(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createElementVNode("button",{class:"action-btn start",onClick:L},[...D[5]||(D[5]=[i.createElementVNode("span",{class:"btn-icon"},"🚀",-1),i.createElementVNode("span",{class:"btn-text"},"开始填写",-1)])]),i.createElementVNode("button",{class:"action-btn history",onClick:q},[...D[6]||(D[6]=[i.createElementVNode("span",{class:"btn-icon"},"📋",-1),i.createElementVNode("span",{class:"btn-text"},"填写记录",-1)])])],64))])]),i.createElementVNode("div",W3,[D[8]||(D[8]=i.createElementVNode("label",{class:"form-label"},"工单内容",-1)),i.createVNode(re,{rule:g.rules,option:g.option,modelValue:g.formData,"onUpdate:modelValue":D[0]||(D[0]=G=>g.formData=G),onSubmit:T,api:g.fApi,"onUpdate:api":D[1]||(D[1]=G=>g.fApi=G),"submit-btn":!1,"reset-btn":!1},null,8,["rule","option","modelValue","api"])]),i.createElementVNode("div",Y3,[i.createElementVNode("div",X3,[l.value&&!a.value?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createElementVNode("button",{class:"action-btn save",onClick:D[2]||(D[2]=G=>T(0))},[...D[9]||(D[9]=[i.createElementVNode("span",{class:"btn-icon"},"💾",-1),i.createElementVNode("span",{class:"btn-text"},"暂存",-1)])]),i.createElementVNode("button",{class:"submit-btn primary",onClick:D[3]||(D[3]=G=>T(1)),disabled:o.value},[D[10]||(D[10]=i.createElementVNode("span",{class:"btn-icon"},"📝",-1)),i.createElementVNode("span",Q3,i.toDisplayString(o.value?"提交中...":"提交工单"),1)],8,K3),i.createElementVNode("button",{class:"submit-btn secondary",onClick:j},[...D[11]||(D[11]=[i.createElementVNode("span",{class:"btn-icon"},"🔄",-1),i.createElementVNode("span",{class:"btn-text"},"重置表单",-1)])])],64)):i.createCommentVNode("",!0)])])])])):(i.openBlock(),i.createElementBlock("div",P3,[i.withDirectives(i.createVNode(Y,{description:"正在加载..."},null,512),[[ue,i.unref(y)]])])),i.createVNode(oe,{modelValue:p.value,"onUpdate:modelValue":D[4]||(D[4]=G=>p.value=G),title:"答题记录",width:"900px","close-on-click-modal":!1,"append-to-body":"",class:"history-dialog"},{default:i.withCtx(()=>[i.createElementVNode("div",J3,[i.createVNode(te,{data:h.value,style:{width:"100%"},"header-cell-style":{background:"#fafafa",color:"#333",fontWeight:"500",borderBottom:"2px solid #e8e8e8"},"row-style":{height:"56px"}},{default:i.withCtx(()=>[i.createVNode(M,{type:"index",label:"序号",width:"80",align:"center"}),i.createVNode(M,{prop:"userName",label:"答题用户","min-width":"140",align:"center"},{default:i.withCtx(({row:G})=>[i.createElementVNode("div",Z3,[i.createElementVNode("span",eS,i.toDisplayString(G.userName),1)])]),_:1}),i.createVNode(M,{prop:"status",label:"状态",width:"120",align:"center"},{default:i.withCtx(({row:G})=>[i.createElementVNode("span",{class:i.normalizeClass(["status-badge",G.status===0?"status-draft":"status-completed"])},i.toDisplayString(R(G.status)),3)]),_:1}),i.createVNode(M,{prop:"useTime",label:"用时",width:"160",align:"center"},{default:i.withCtx(({row:G})=>[i.createElementVNode("div",tS,i.toDisplayString(K(G.useTime)),1)]),_:1}),i.createVNode(M,{label:"操作",align:"center",width:"140"},{default:i.withCtx(({row:G})=>[G.status===0?(i.openBlock(),i.createBlock(se,{key:0,class:"action-btn-continue",text:"",onClick:X=>ne(G)},{default:i.withCtx(()=>[...D[12]||(D[12]=[i.createTextVNode(" 继续答题 ",-1)])]),_:1},8,["onClick"])):(i.openBlock(),i.createBlock(se,{key:1,class:"action-btn-view",text:"",onClick:X=>U(G)},{default:i.withCtx(()=>[...D[13]||(D[13]=[i.createTextVNode(" 查看详情 ",-1)])]),_:1},8,["onClick"]))]),_:1})]),_:1},8,["data"])])]),_:1},8,["modelValue"])])}}}),[["__scopeId","data-v-513a856f"]]),nS={class:"work-order-mobile"},rS={key:0,class:"loading-container"},oS={key:1},iS={key:0,class:"page-container"},aS={class:"work-order-card"},lS={class:"title-section"},sS={class:"work-order-title"},uS={class:"image-section"},cS=["src"],dS=["src"],fS={key:1,class:"fc-designer"},pS={class:"designer-container"},hS={class:"form-section"},mS={class:"header-container"},gS={class:"form-title"},bS={class:"form-section"},yS={class:"content-header"},vS={key:0,class:"header-buttons"},_S={key:1,class:"timer-container"},wS={class:"timer-display"},xS={key:0,class:"form-section button-group"},CS=["disabled"],kS={class:"history-popup"},ES={class:"history-header"},AS={class:"history-list"},FS={class:"item-left"},SS={class:"item-user"},DS={class:"user-avatar"},BS={class:"user-info"},VS={class:"user-name"},OS={class:"time-text"},NS={class:"item-right"},TS=["onClick"],sd=rw(Object.assign({name:"WorkOrderMobile"},{props:{orderInfo:{type:Object,required:!0,default:()=>({})}},emits:["login-success","logout","submit-success","submit-error"],setup(e,{emit:t}){const n=e,r=t,o=i.ref(!1),a=i.ref(!1),l=i.ref(!1),s=i.ref(!1),u=i.ref(!1),c=i.ref(null),d=i.ref(null),p=i.ref(0),h=i.ref(null),g=i.ref(""),b=i.ref(!1),y=i.ref([]),_=i.ref(""),v=i.reactive({paperName:"",rules:[],option:{},formData:{},fApi:null}),{isLoggedIn:k,userInfo:A,checkAuth:O}=nw(n),T=()=>{a.value=!0,document.body.style.overflow="hidden"},j=()=>{a.value=!1,document.body.style.overflow=""},L=async()=>{if(o.value=!0,await i.nextTick(),await i.nextTick(),console.log("🔧 表单已渲染,fApi 状态:",v.fApi),v.fApi)try{v.fApi.submitBtnProps({show:!1}),!u.value&&!s.value&&v.fApi.disabled(!0),console.log("✅ 成功隐藏默认提交按钮")}catch(te){console.log("⚠️ 移动端不支持 submitBtnProps:",te)}else console.log("⚠️ fApi 还未初始化")},q=()=>{o.value=!1,Y()},K=async()=>{const te=await id({paperUuid:n.orderInfo.paperUuid,testId:n.orderInfo.testId});console.log("👀 工单提交详情:",te);let oe=JSON.parse(te.data[0].result);console.log("📄 解析后的数据:",oe),v.formData=oe.record,s.value=!0,p.value=te.data[0].useTime,o.value=!0,await i.nextTick(),await i.nextTick(),console.log("🔧 查看模式:fApi 状态:",v.fApi),v.fApi?(v.fApi.disabled(!0),console.log("✅ 表单已设置为只读模式")):(console.log("⚠️ fApi 还未初始化,将在下一个周期重试"),setTimeout(()=>{v.fApi&&(v.fApi.disabled(!0),console.log("✅ 延迟设置表单为只读模式成功"))},500))},R=async()=>{try{const te=await Z_({paperUuid:n.orderInfo.paperUuid});if(console.log("工单详情:",te),te.data&&te.data.length>0){g.value=tw.apiPath+te.data[0].url;const oe=formCreate.parseJson(te.data[0].paperJsonContent);v.paperName=te.data[0].paperName,v.rules=formCreate.parseJson(oe.rule),v.option=formCreate.parseJson(oe.options),console.log("✅ 解析后的 paperInfo:",v),console.log('📝 表单规则已准备好,等待用户点击"答题"按钮进入表单视图')}}catch(te){console.error("获取工单详情失败:",te),yn.showToast("获取工单详情失败")}},P=i.ref({}),Z=async te=>{try{if(l.value=!0,!await se()){yn.showToast("表单验证失败,请检查输入");return}const ue=M();P.value=ue,console.log("表单数据:",ue);const G=Object.keys(P.value).map(H=>{const I=v.rules.find(J=>J.children&&J.children.length?J.children.some(B=>B.field===H):J.field===H);if(I)if(I.children&&I.children.length){const J=I.children.find(B=>B.field===H);if(J){let B;return J.type=="upload"?B=JSON.stringify(P.value[H]):B=P.value[H],{questionUuid:H,answer:B,type:J.type}}}else{let J;return I.type=="upload"?J=JSON.stringify(P.value[H]):J=P.value[H],{questionUuid:H,answer:J,type:I.type}}return{questionUuid:H,answer:P.value[H]}});if(te===0){const H=await ad({status:te,paperUuid:n.orderInfo.paperUuid,testId:_.value?_.value:"",useTime:p.value,result:{record:ue,statistics:G}});yn.showToast("工单暂存成功!"),console.log("暂存成功:",H);return}Y();const X=await ad({status:te,paperUuid:n.orderInfo.paperUuid,testId:_.value?_.value:"",useTime:p.value,result:{record:ue,statistics:G}});console.log("提交接口返回:",X),v.fApi&&v.fApi.disabled(!0),s.value=!0,u.value=!1,yn.showToast("工单提交成功!"),r("submit-success",{formData:ue,response:X}),console.log("工单提交成功!",ue)}catch(oe){console.error("提交失败:",oe),yn.showToast("工单提交失败,请重试!"),r("submit-error",oe)}finally{l.value=!1}},ne=()=>{v.fApi&&(v.fApi.resetFields(),Y(),p.value=0,D(),yn.showToast("表单已重置,计时器已重新开始"))},U=()=>{if(u.value){yn.showToast("已经在答题中了");return}s.value&&(s.value=!1,p.value=0,v.fApi&&v.fApi.resetFields(),_.value=""),v.fApi.disabled(!1),u.value=!0,D(),yn.showToast("开始答题,计时已开始!"),console.log("开始答题,计时开始")},S=async()=>{try{const te=await ew({paperUuid:n.orderInfo.paperUuid});console.log("答题记录:",te),te.data&&te.data.length>0?(y.value=te.data,b.value=!0):yn.showToast("暂无答题记录")}catch(te){console.error("获取答题记录失败:",te),yn.showToast("获取答题记录失败")}},$=te=>{if(te<60)return`${te}秒`;if(te<3600){const oe=Math.floor(te/60),ue=te%60;return`${oe}分${ue}秒`}else{const oe=Math.floor(te/3600),ue=Math.floor(te%3600/60),G=te%60;return`${oe}时${ue}分${G}秒`}},x=te=>te===0?"暂存":"已提交",w=async te=>(await id({paperUuid:n.orderInfo.paperUuid,testId:te.testId})).data[0],N=async te=>{try{let oe=await w(te);console.log("record",oe),_.value=oe.testId;const ue=JSON.parse(oe.result);v.formData=ue.record,p.value=oe.useTime,u.value=!0,s.value=!1,v.fApi&&v.fApi.disabled(!1),c.value=Date.now()-p.value*1e3,h.value=setInterval(()=>{p.value=Math.floor((Date.now()-c.value)/1e3)},1e3),b.value=!1,yn.showToast("已恢复上次答题内容,继续答题!"),console.log("继续答题,恢复数据:",ue.record)}catch(oe){console.error("恢复答题数据失败:",oe),yn.showToast("恢复答题数据失败")}},V=async te=>{try{let oe=await w(te);const ue=JSON.parse(oe.result);v.formData=ue.record,p.value=oe.useTime,v.fApi&&v.fApi.disabled(!0),s.value=!0,u.value=!1,b.value=!1,yn.showToast("已加载答题详情"),console.log("查看详情:",ue.record)}catch(oe){console.error("查看详情失败:",oe),yn.showToast("查看详情失败")}},D=()=>{c.value=Date.now(),h.value=setInterval(()=>{p.value=Math.floor((Date.now()-c.value)/1e3)},1e3)},Y=()=>{h.value&&(clearInterval(h.value),h.value=null),d.value=Date.now()},re=te=>{const oe=Math.floor(te/3600),ue=Math.floor(te%3600/60),G=te%60;return oe>0?`${oe.toString().padStart(2,"0")}:${ue.toString().padStart(2,"0")}:${G.toString().padStart(2,"0")}`:`${ue.toString().padStart(2,"0")}:${G.toString().padStart(2,"0")}`},M=()=>{if(v.fApi)try{const te=v.fApi.formData();if(te)return te;const oe=v.fApi.formData;return oe||v.formData}catch(te){return console.log("获取表单数据失败,使用备用方案:",te),v.formData}return v.formData},se=async()=>{if(v.fApi)try{return await v.fApi.validate(),console.log("表单验证通过"),!0}catch(te){return console.log("表单验证失败:",te),!1}return!1};return i.onMounted(async()=>{console.log("📱 WorkOrderMobile 组件已挂载"),console.log("📋 orderInfo:",n.orderInfo);const te=await O();console.log("🔐 登录状态:",te),te?(r("login-success",A.value),n.orderInfo.result&&n.orderInfo.result=="1"?(console.log("👀 查看已提交的工单"),await R(),await K()):(console.log("📝 加载工单,等待开始答题"),await R())):console.log("❌ 未登录,等待登录...")}),(te,oe)=>{const ue=i.resolveComponent("van-empty"),G=i.resolveComponent("van-icon"),X=i.resolveComponent("formCreateMobile"),H=i.resolveComponent("van-popup");return i.openBlock(),i.createElementBlock("div",nS,[i.unref(k)?(i.openBlock(),i.createElementBlock("div",oS,[o.value?(i.openBlock(),i.createElementBlock("div",fS,[i.createElementVNode("div",pS,[i.createElementVNode("button",{class:"back-button",onClick:q},[i.createVNode(G,{name:"arrow-left"})]),i.createElementVNode("div",hS,[i.createElementVNode("div",mS,[i.createElementVNode("h1",gS,i.toDisplayString(v.paperName),1)])]),i.createElementVNode("div",bS,[i.createElementVNode("div",yS,[oe[9]||(oe[9]=i.createElementVNode("label",{class:"form-label"},"工单内容",-1)),u.value?(i.openBlock(),i.createElementBlock("div",_S,[oe[8]||(oe[8]=i.createElementVNode("span",{class:"timer-label"},"填写时间",-1)),i.createElementVNode("span",wS,i.toDisplayString(re(p.value)),1)])):(i.openBlock(),i.createElementBlock("div",vS,[i.createElementVNode("button",{class:"mobile-btn start",onClick:U}," 开始填写 "),i.createElementVNode("button",{class:"mobile-btn history",onClick:S}," 填写记录 ")]))]),i.createVNode(X,{driver:"elm",rule:v.rules,option:v.option,modelValue:v.formData,"onUpdate:modelValue":oe[1]||(oe[1]=I=>v.formData=I),onSubmit:Z,api:v.fApi,"onUpdate:api":oe[2]||(oe[2]=I=>v.fApi=I),"submit-btn":!1,"reset-btn":!1},null,8,["rule","option","modelValue","api"])]),u.value&&!s.value?(i.openBlock(),i.createElementBlock("div",xS,[i.createElementVNode("button",{class:"mobile-btn save",onClick:oe[3]||(oe[3]=I=>Z(0))}," 暂存 "),i.createElementVNode("button",{class:"mobile-btn submit",onClick:oe[4]||(oe[4]=I=>Z(1)),disabled:l.value},i.toDisplayString(l.value?"提交中...":"提交工单"),9,CS),i.createElementVNode("button",{class:"mobile-btn reset",onClick:ne}," 重置表单 ")])):i.createCommentVNode("",!0)])])):(i.openBlock(),i.createElementBlock("div",iS,[i.createElementVNode("div",aS,[i.createElementVNode("div",lS,[i.createElementVNode("h1",sS,i.toDisplayString(v.paperName),1)]),i.createElementVNode("div",uS,[i.createElementVNode("img",{src:g.value,alt:"工单图片",class:"order-image",onClick:T},null,8,cS)]),a.value?(i.openBlock(),i.createElementBlock("div",{key:0,class:"image-viewer-modal",onClick:j},[i.createElementVNode("div",{class:"modal-content",onClick:oe[0]||(oe[0]=i.withModifiers(()=>{},["stop"]))},[i.createElementVNode("img",{src:g.value,alt:"工单图片",class:"fullscreen-image"},null,8,dS),i.createElementVNode("button",{class:"close-btn",onClick:j},"×")])])):i.createCommentVNode("",!0),i.createElementVNode("div",{class:"footer-section"},[oe[7]||(oe[7]=i.createElementVNode("div",{class:"creation-time"},null,-1)),i.createElementVNode("div",{class:"orientation-buttons"},[i.createElementVNode("button",{class:"orientation-btn vertical",onClick:L},"答题")])])])])),i.createVNode(H,{show:b.value,"onUpdate:show":oe[6]||(oe[6]=I=>b.value=I),round:"",position:"bottom",style:{height:"75%"}},{default:i.withCtx(()=>[i.createElementVNode("div",kS,[i.createElementVNode("div",ES,[oe[10]||(oe[10]=i.createElementVNode("h3",null,"答题记录",-1)),i.createVNode(G,{name:"cross",onClick:oe[5]||(oe[5]=I=>b.value=!1)})]),i.createElementVNode("div",AS,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(y.value,(I,J)=>(i.openBlock(),i.createElementBlock("div",{key:J,class:"history-item"},[i.createElementVNode("div",FS,[i.createElementVNode("div",SS,[i.createElementVNode("span",DS,i.toDisplayString(I.userName.charAt(0)),1),i.createElementVNode("div",BS,[i.createElementVNode("span",VS,i.toDisplayString(I.userName),1),i.createElementVNode("span",OS,i.toDisplayString($(I.useTime)),1)])])]),i.createElementVNode("div",NS,[i.createElementVNode("span",{class:i.normalizeClass(["status-tag",I.status===0?"tag-draft":"tag-completed"])},i.toDisplayString(x(I.status)),3),i.createElementVNode("button",{class:i.normalizeClass(["action-button",I.status===0?"btn-continue":"btn-view"]),onClick:B=>I.status===0?N(I):V(I)},i.toDisplayString(I.status===0?"继续答题":"查看详情"),11,TS)])]))),128))])])]),_:1},8,["show"])])):(i.openBlock(),i.createElementBlock("div",rS,[i.createVNode(ue,{description:"正在加载..."})]))])}}}),[["__scopeId","data-v-5fcc3425"]]),am=i.defineCustomElement(ld),lm=i.defineCustomElement(sd);typeof window<"u"&&!customElements.get("work-order-pc")&&customElements.define("work-order-pc",am),typeof window<"u"&&!customElements.get("work-order-mobile")&&customElements.define("work-order-mobile",lm);function ow(){typeof window<"u"&&(customElements.get("work-order-pc")||customElements.define("work-order-pc",am),customElements.get("work-order-mobile")||customElements.define("work-order-mobile",lm))}const RS={register:ow};/*! Element Plus v2.11.5 */var $S={name:"zh-cn",el:{breadcrumb:{label:"面包屑"},colorpicker:{confirm:"确定",clear:"清空",defaultLabel:"颜色选择器",description:"当前颜色 {color},按 Enter 键选择新颜色",alphaLabel:"选择透明度的值",alphaDescription:"透明度 {alpha}, 当前颜色 {color}",hueLabel:"选择色相值",hueDescription:"色相 {hue}, 当前颜色 {color}"},datepicker:{now:"此刻",today:"今天",cancel:"取消",clear:"清空",confirm:"确定",dateTablePrompt:"使用方向键与 Enter 键可选择日期",monthTablePrompt:"使用方向键与 Enter 键可选择月份",yearTablePrompt:"使用方向键与 Enter 键可选择年份",selectedDate:"已选日期",selectDate:"选择日期",selectTime:"选择时间",startDate:"开始日期",startTime:"开始时间",endDate:"结束日期",endTime:"结束时间",prevYear:"前一年",nextYear:"后一年",prevMonth:"上个月",nextMonth:"下个月",year:"年",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},weeksFull:{sun:"星期日",mon:"星期一",tue:"星期二",wed:"星期三",thu:"星期四",fri:"星期五",sat:"星期六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},inputNumber:{decrease:"减少数值",increase:"增加数值"},select:{loading:"加载中",noMatch:"无匹配数据",noData:"无数据",placeholder:"请选择"},mention:{loading:"加载中"},dropdown:{toggleDropdown:"切换下拉选项"},cascader:{noMatch:"无匹配数据",loading:"加载中",placeholder:"请选择",noData:"暂无数据"},pagination:{goto:"前往",pagesize:"条/页",total:"共 {total} 条",pageClassifier:"页",page:"页",prev:"上一页",next:"下一页",currentPage:"第 {pager} 页",prevPages:"向前 {pager} 页",nextPages:"向后 {pager} 页",deprecationWarning:"你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档"},dialog:{close:"关闭此对话框"},drawer:{close:"关闭此对话框"},messagebox:{title:"提示",confirm:"确定",cancel:"取消",error:"输入的数据不合法!",close:"关闭此对话框"},upload:{deleteTip:"按 Delete 键可删除",delete:"删除",preview:"查看图片",continue:"继续上传"},slider:{defaultLabel:"滑块介于 {min} 至 {max}",defaultRangeStartLabel:"选择起始值",defaultRangeEndLabel:"选择结束值"},table:{emptyText:"暂无数据",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计"},tour:{next:"下一步",previous:"上一步",finish:"结束导览",close:"关闭此对话框"},tree:{emptyText:"暂无数据"},transfer:{noMatch:"无匹配数据",noData:"无数据",titles:["列表 1","列表 2"],filterPlaceholder:"请输入搜索内容",noCheckedFormat:"共 {total} 项",hasCheckedFormat:"已选 {checked}/{total} 项"},image:{error:"加载失败"},pageHeader:{title:"返回"},popconfirm:{confirmButtonText:"确定",cancelButtonText:"取消"},carousel:{leftArrow:"上一张幻灯片",rightArrow:"下一张幻灯片",indicator:"幻灯片切换至索引 {index}"}}};/*!
30
+ }`,variables:N}}function S(N,V){var D=Object.keys(N);if(Object.getOwnPropertySymbols){var Y=Object.getOwnPropertySymbols(N);V&&(Y=Y.filter(function(re){return Object.getOwnPropertyDescriptor(N,re).enumerable})),D.push.apply(D,Y)}return D}function $(N){for(var V=1;V<arguments.length;V++){var D=arguments[V]!=null?arguments[V]:{};V%2?S(D,!0).forEach(function(Y){T(N,Y,D[Y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(N,Object.getOwnPropertyDescriptors(D)):S(D).forEach(function(Y){Object.defineProperty(N,Y,Object.getOwnPropertyDescriptor(D,Y))})}return N}var x=function(){function N(V){_(this,N),this.options={nonce:Math.random().toString().slice(2,8),timestamp:parseInt(Date.now()/1e3),appType:"oidc",responseType:"code",scope:"openid profile email phone",state:Math.random().toString(36).slice(2)},this.options=Object.assign({},this.options,V),this.dev=!!this.options.dev,this._checkOptions(),this.registerURL=(this.dev?"http://":"https://")+this.options.appDomain+"/register",this.logoutURL=(this.dev?"http://":"https://")+this.options.appDomain+"/cas/logout",this.trackSessionURL=(this.dev?"http://":"https://")+this.options.appDomain+"/cas/session",this.createSessionURL=(this.dev?"http://":"https://")+this.options.appDomain+"/cas/createSession";try{this.graphQLURL=this.options.host.oauth}catch{this.graphQLURL=this.dev?"http://localhost:5510/graphql":"https://oauth.authing.cn/graphql"}this.appInfo=this._queryAppInfo(),this.stored=!1}return O(N,[{key:"_queryAppInfo",value:function(){var V=y(regeneratorRuntime.mark(function Y(){var re,M,se,te,oe=this;return regeneratorRuntime.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:if(re=new P({baseURL:this.graphQLURL}),M={oauth:Z.bind(this,{appId:this.options.appId,responseType:this.options.responseType,redirectUrl:this.options.redirectUrl}),oidc:ne.bind(this,{appId:this.options.appId,responseType:this.options.responseType,redirectUrl:this.options.redirectUrl}),saml:U.bind(this,{appId:this.options.appId})},se={oauth:"QueryAppInfoByAppID",oidc:"QueryOIDCAppInfoByAppID",saml:"QuerySAMLServiceProviderInfoByAppID"},!(this.options.appType in M)){ue.next=9;break}return ue.next=6,re.request(M[this.options.appType]()).then(function(G){return G[se[oe.options.appType]]});case 6:te=ue.sent,ue.next=10;break;case 9:throw Error("appType 类型错误,可选参数为 oauth oidc saml");case 10:return ue.abrupt("return",te);case 11:case"end":return ue.stop()}},Y,this)}));function D(){return V.apply(this,arguments)}return D}()},{key:"_checkOptions",value:function(){for(var V=["appId","appDomain","appType"],D=Object.keys(this.options),Y=0;Y<V.length;Y++)if(!D.includes(V[Y]))throw Error("AuthingSSO 初始化:缺少 "+V[Y]+" 参数");if(!/^[0-9a-f]{24}$/.test(this.options.appId))throw Error("appId 格式错误,请在 OAuth、OIDC 或 SAML 应用配置页面查看正确的 appId");return!0}},{key:"login",value:function(){var V=this,D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Y=D.lang;this.appInfo.then(function(re){if(!re)throw Error("appId 错误,请在 OAuth、OIDC 或 SAML 应用配置页面查看正确的 appId");var M=new URL(re.loginUrl);M.searchParams.delete("scope"),M.searchParams.append("scope",V.options.scope),M.searchParams.delete("state"),M.searchParams.append("state",V.options.state),Y&&M.searchParams.append(N._langStorageKey,Y),~V.options.scope.indexOf("offline_access")&&M.searchParams.append("prompt","consent"),location.href=M.href})}},{key:"register",value:function(){var V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},D=V.lang,Y=new URL(this.registerURL);D&&Y.searchParams.append(N._langStorageKey,D),location.href=Y.href}},{key:"windowLogin",value:function(){var V=(screen.width-500)/2,D=(screen.height-700)/2;this.appInfo.then(function(Y){if(!Y)throw Error("appId 错误,请在 OAuth、OIDC 或 SAML 应用配置页面查看正确的 appId");var re=Y.loginUrl;window.open(re,"_blank","width=500,height=700,left=".concat(V,",top=").concat(D))})}},{key:"getUrlHash",value:function(){try{if(location.hash){var V=location.hash.substring(1).split("&"),D={};return V.forEach(function(Y){var re=Y.split("="),M=p(re,2),se=M[0],te=M[1];D[se]=te}),D}return null}catch{return{err:"获取失败"}}}},{key:"getUrlQuery",value:function(){var V=location.search.slice(1).split("&").map(function(Y){return Y.split("=")}),D={};return V.forEach(function(Y){D[Y[0]]=Y[1]}),D}},{key:"logout",value:function(){var V=y(regeneratorRuntime.mark(function Y(){var re;return regeneratorRuntime.wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return M.next=2,L.a.get(this.logoutURL,{withCredentials:!0,headers:{"x-authing-oidc-code":localStorage.getItem("x-authing-oidc-code")||"","x-authing-oidc-accesstoken":localStorage.getItem("x-authing-oidc-accesstoken")||"","x-authing-oauth-code":localStorage.getItem("x-authing-oauth-code")||"","x-authing-oauth-accesstoken":localStorage.getItem("x-authing-oauth-accesstoken")||""}});case 2:return re=M.sent,localStorage.removeItem("x-authing-oidc-code"),localStorage.removeItem("x-authing-oidc-accesstoken"),localStorage.removeItem("x-authing-oauth-code"),localStorage.removeItem("x-authing-oauth-accesstoken"),M.abrupt("return",re.data);case 8:case"end":return M.stop()}},Y,this)}));function D(){return V.apply(this,arguments)}return D}()},{key:"createSession",value:function(){var V=y(regeneratorRuntime.mark(function Y(re){var M,se,te,oe,ue;return regeneratorRuntime.wrap(function(G){for(;;)switch(G.prev=G.next){case 0:M=re.token,se=re.redirectUrl,te=re.newTab,oe=te===void 0||te,ue="".concat(this.createSessionURL,"?authorization=").concat(M,"&redirect_url=").concat(se),oe?window.open(ue,"_blank"):window.location.href=ue;case 3:case"end":return G.stop()}},Y,this)}));function D(Y){return V.apply(this,arguments)}return D}()},{key:"getAccessTokenSilently",value:function(){var V=y(regeneratorRuntime.mark(function Y(){var re,M,se,te;return regeneratorRuntime.wrap(function(oe){for(;;)switch(oe.prev=oe.next){case 0:if(this.options.appDomain){oe.next=2;break}throw new Error("请在初始化时传入 appDomain 参数,值为用户池域名");case 2:if(this.options.appId){oe.next=4;break}throw new Error("请在初始化时传入 appId 参数,值为应用 ID");case 4:if(this.options.redirectUrl){oe.next=6;break}throw new Error("请在初始化时传入 redirectUrl 参数,值为业务回调地址");case 6:return re=document.createElement("iframe"),M=Math.random().toString().slice(2).toString(16),se=Math.random().toString().slice(2).toString(16),te="https://".concat(this.options.appDomain,"/oidc/auth?client_id=").concat(this.options.appId,"&redirect_uri=").concat(this.options.redirectUrl,"&response_type=id_token%20token&scope=openid+profile+email+phone&state=").concat(M,"&response_mode=web_message&nonce=").concat(se,"&prompt=none"),re.title="postMessage() Initiator",re.src=te,re.hidden=!0,document.body.append(re),oe.abrupt("return",new Promise(function(ue,G){var X=window.addEventListener("message",function(H){if(H.data.response.error)return G(new Error(H.data.response.error_description)),window.removeEventListener("message",X),void re.remove();var I=H.data.response,J=I.access_token,B=I.id_token;ue({access_token:J,id_token:B}),window.removeEventListener("message",X),re.remove()})}));case 15:case"end":return oe.stop()}},Y,this)}));function D(){return V.apply(this,arguments)}return D}()},{key:"trackSession",value:function(){var V=y(regeneratorRuntime.mark(function Y(){var re,M,se,te,oe,ue,G,X,H;return regeneratorRuntime.wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return this.stored||(re=this.getUrlQuery(),M=this.getUrlHash(),this.options.appType==="oidc"?(se=re&&re.code||"",te=M&&M.access_token||"",se&&localStorage.setItem("x-authing-oidc-accesstoken",se),te&&localStorage.setItem("x-authing-oidc-accesstoken",te)):this.options.appType==="oauth"&&(oe=re&&re.code||"",ue=M&&M.access_token||"",oe&&localStorage.setItem("x-authing-oauth-code",oe),ue&&localStorage.setItem("x-authing-oauth-accesstoken",ue)),this.stored=!0),I.next=3,L.a.get(this.trackSessionURL,{withCredentials:!0,headers:{"x-authing-oidc-code":localStorage.getItem("x-authing-oidc-accesstoken")||"","x-authing-oidc-accesstoken":localStorage.getItem("x-authing-oidc-accesstoken")||"","x-authing-oauth-code":localStorage.getItem("x-authing-oauth-code")||"","x-authing-oauth-accesstoken":localStorage.getItem("x-authing-oauth-accesstoken")||""}});case 3:if(G=I.sent,!G.data.session){I.next=11;break}return X={"OIDC code 使用文档":"https://docs.authing.cn/authing/advanced/oidc/oidc-authorization#shi-yong-code-huan-qu-token","OIDC 本地验证 access_token 和 id_token 的方式":"https://docs.authing.cn/authing/advanced/authentication/verify-jwt-token#oidc-secret-token","OAuth access_token 合法性在线验证":"https://docs.authing.cn/authing/advanced/authentication/verify-jwt-token#yan-zheng-oauth-accesstoken-he-fa-xing","OIDC access_token 和 id_token 合法性在线验证":"https://docs.authing.cn/authing/advanced/authentication/verify-jwt-token#yan-zheng-oidc-accesstoken-huo-idtoken-de-he-fa-xing"},this.options.appType==="oidc"?(X={"OIDC 本地验证 access_token 和 id_token 的方式":"https://docs.authing.cn/authing/advanced/authentication/verify-jwt-token#oidc-secret-token","OIDC access_token 和 id_token 合法性在线验证":"https://docs.authing.cn/authing/advanced/authentication/verify-jwt-token#yan-zheng-oidc-accesstoken-huo-idtoken-de-he-fa-xing"},this.options.responseType==="code"?X["OIDC code 使用文档"]="https://docs.authing.cn/authing/advanced/oidc/oidc-authorization#shi-yong-code-huan-qu-token":this.options.responseType==="implicit"&&(X["OIDC implicit 文档"]="https://docs.authing.cn/authing/advanced/oidc/oidc-authorization#shi-yong-yin-shi-liu-cheng-implicit-flow")):this.options.appType==="oauth"&&(X={"OAuth access_token 合法性在线验证":"https://docs.authing.cn/authing/advanced/authentication/verify-jwt-token#yan-zheng-oauth-accesstoken-he-fa-xing"},this.options.responseType==="code"?X["OAuth code 使用文档"]="https://docs.authing.cn/authing/advanced/oauth2/oauth-authorization#shi-yong-authorizationcode-mo-shi":this.options.responseType==="implicit"&&(X["OAuth implicit 文档"]="https://learn.authing.cn/authing/advanced/oauth2/oauth-authorization#implicit-mo-shi")),H={},this.options.responseType==="code"?(H=this.getUrlQuery(),H={code:H.code}):this.options.responseType==="implicit"&&(H=this.getUrlHash(),H&&(H={access_token:H.access_token,id_token:H.id_token})),G.data.userInfo["__Token 验证方式说明"]="https://docs.authing.cn/authing/advanced/authentication/verify-jwt-token#fa-song-token-gei-authing-fu-wu-qi-yan-zheng",I.abrupt("return",$({},G.data,{urlParams:$({},H,{__参数使用说明:X,__authing_hint:"code token id_token 字段只会在第一次回调到业务地址的时候从 url 取出,请自行存储以备使用"})}));case 11:return I.abrupt("return",G.data);case 12:case"end":return I.stop()}},Y,this)}));function D(){return V.apply(this,arguments)}return D}()}]),N}();T(x,"_langStorageKey","_authing_lang");var w=x;t.default=w}}).default});const tw={apiPath:"https://ct-test.hep.com.cn/ct-api-online"},M3=()=>new Promise(e=>{if(window.AuthingSSO){e(window.AuthingSSO);return}const t=setInterval(()=>{window.AuthingSSO&&(clearInterval(t),e(window.AuthingSSO))},100);setTimeout(()=>{clearInterval(t),window.AuthingSSO||e(null)},1e4)});function nw(e){const t=i.ref(!1),n=i.ref(!1),r=i.ref(null);let o=null;const a=async()=>{const d=await M3();if(!d)return null;try{return o=new d({appId:"6135793845ae7f18bc02aad0",appDomain:"hep-center.u2.hep.com.cn",baseUrl:"https://core.u2.hep.com.cn",redirectUrl:window.location.href,host:{user:"https://users.u2.hep.com.cn/graphql",oauth:"https://oauth.u2.hep.com.cn/graphql"}}),o}catch(p){return console.error("初始化 AuthingSSO 失败:",p),null}},l=async()=>{var d;n.value=!0;try{if(!o&&(o=await a(),!o))return t.value=!1,n.value=!1,!1;const p=await o.trackSession();if(p.session!==null&&p.userInfo){const h=await $3({token:p.userInfo.token});if(h.token){R3(h.token);const g=tw.apiPath,b=await om({url:g+"/getInfo",headers:{Authorization:"Bearer "+h.token}});if(b.data.code===200)return r.value=b.data.user,localStorage.setItem("userInfo",JSON.stringify({message:b.data.user,success:!0})),FcDesigner.formCreate.setData("Admin-Token",h.token),formCreateMobile.setData("Admin-Token",h.token),t.value=!0,n.value=!1,!0}}return t.value=!1,((d=e.apiConfig)==null?void 0:d.autoShowLogin)!==!1?(n.value=!1,s()):n.value=!1,!1}catch(p){return console.error("❌ 检查登录状态失败:",p),t.value=!1,n.value=!1,!1}},s=async()=>{o||(o=await a()),o?(o.logout(),o.login()):(console.error("❌ SSO 配置错误"),tn.ElMessage.error("SSO 配置错误"))},u=async()=>{var d;try{localStorage.removeItem("token"),localStorage.removeItem("userInfo"),o&&o.logout(),t.value=!1,r.value=null,tn.ElMessage.success("已退出登录"),((d=e.apiConfig)==null?void 0:d.autoShowLogin)!==!1&&setTimeout(()=>{s()},500)}catch(p){console.error("登出失败:",p)}},c=()=>{s()};return{isLoggedIn:t,loginVisible:i.ref(!1),loginLoading:n,loginForm:i.ref({}),userInfo:r,checkAuth:l,handleLogin:s,handleLogout:u,showLogin:c}}const rw=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},j3={class:"work-order-pc"},P3={key:0,class:"loading-container"},I3={key:1,class:"fc-designer"},L3={class:"designer-container"},z3={class:"form-section"},U3={class:"header-container"},H3={class:"form-title"},G3={key:1,class:"timer-container"},q3={class:"timer-display"},W3={class:"form-section"},Y3={class:"form-section button-group"},X3={class:"action-buttons"},K3=["disabled"],Q3={class:"btn-text"},J3={class:"history-content"},Z3={class:"user-cell"},eS={class:"user-name"},tS={class:"time-cell"},ld=rw(Object.assign({name:"WorkOrderPc"},{props:{orderInfo:{type:Object,required:!0,default:()=>({})}},emits:["login-success","logout","submit-success","submit-error","view-history"],setup(e,{emit:t}){const n=e,r=t,o=i.ref(!1),a=i.ref(!1),l=i.ref(!1),s=i.ref(null),u=i.ref(null),c=i.ref(0),d=i.ref(null),p=i.ref(!1),h=i.ref([]),g=i.reactive({paperName:"",rules:[],option:{},formData:{},fApi:null}),{isLoggedIn:b,loginLoading:y,userInfo:_,checkAuth:v}=nw(n),k=async()=>{const V=await id({paperUuid:n.orderInfo.paperUuid,testId:n.orderInfo.testId});console.log("工单提交详情:",V);let D=JSON.parse(V.data[0].result);console.log("解析后的数据:",D),g.formData=D.record,g.fApi.disabled(!0),a.value=!0,c.value=V.data[0].useTime},A=async()=>{try{const V=await Z_({paperUuid:n.orderInfo.paperUuid});if(console.log("工单详情:",V),V.data&&V.data.length>0){const D=formCreate.parseJson(V.data[0].paperJsonContent);g.paperName=V.data[0].paperName,g.rules=formCreate.parseJson(D.rule),g.option=formCreate.parseJson(D.options),console.log("解析后的 paperInfo:",g),await i.nextTick(),g.fApi&&(g.fApi.submitBtnProps({show:!1}),g.fApi.disabled(!0))}}catch(V){console.error("获取工单详情失败:",V),tn.ElMessage.error("获取工单详情失败")}},O=i.ref({}),T=async V=>{try{if(o.value=!0,!await N()){tn.ElMessage({type:"warning",message:"表单验证失败,请检查输入",duration:3e3});return}const Y=w();O.value=Y,console.log("表单数据:",Y);const re=Object.keys(O.value).map(se=>{const te=g.rules.find(oe=>oe.children&&oe.children.length?oe.children.some(ue=>ue.field===se):oe.field===se);if(te)if(te.children&&te.children.length){const oe=te.children.find(ue=>ue.field===se);if(oe){let ue;return oe.type=="upload"?ue=JSON.stringify(O.value[se]):ue=O.value[se],{questionUuid:se,answer:ue,type:oe.type}}}else{let oe;return te.type=="upload"?oe=JSON.stringify(O.value[se]):oe=O.value[se],{questionUuid:se,answer:oe,type:te.type}}return{questionUuid:se,answer:O.value[se]}});if(V===0){const se=await ad({status:V,paperUuid:n.orderInfo.paperUuid,testId:Z.value?Z.value:"",useTime:c.value,result:{record:Y,statistics:re}});tn.ElMessage({type:"success",message:"工单暂存成功!",duration:3e3});return}$();const M=await ad({status:V,paperUuid:n.orderInfo.paperUuid,useTime:c.value,testId:Z.value?Z.value:"",result:{record:Y,statistics:re}});console.log("提交接口返回:",M),g.fApi&&g.fApi.disabled(!0),a.value=!0,l.value=!1,tn.ElMessage({type:"success",message:"工单提交成功!",duration:3e3}),r("submit-success",{formData:Y,response:M}),console.log("工单提交成功!",Y)}catch(D){console.error("提交失败:",D),tn.ElMessage({type:"error",message:"工单提交失败,请重试!",duration:3e3}),r("submit-error",D)}finally{o.value=!1}},j=()=>{g.fApi&&(g.fApi.resetFields(),$(),c.value=0,S(),tn.ElMessage({type:"info",message:"表单已重置,计时器已重新开始",duration:2e3}))},L=()=>{if(l.value){tn.ElMessage.warning("已经在答题中了");return}a.value&&(a.value=!1,c.value=0,g.fApi&&g.fApi.resetFields(),Z.value=""),g.fApi.disabled(!1),l.value=!0,S(),tn.ElMessage({type:"success",message:"开始答题,计时已开始!",duration:2e3}),console.log("开始答题,计时开始")},q=async()=>{try{const V=await ew({paperUuid:n.orderInfo.paperUuid});console.log("答题记录:",V),V.data&&V.data.length>0?(h.value=V.data,p.value=!0):tn.ElMessage({type:"info",message:"暂无答题记录",duration:2e3})}catch(V){console.error("获取答题记录失败:",V),tn.ElMessage.error("获取答题记录失败")}},K=V=>{if(V<60)return`${V}秒`;if(V<3600){const D=Math.floor(V/60),Y=V%60;return`${D}分${Y}秒`}else{const D=Math.floor(V/3600),Y=Math.floor(V%3600/60),re=V%60;return`${D}时${Y}分${re}秒`}},R=V=>V===0?"暂存":"已提交",P=async V=>(await id({paperUuid:n.orderInfo.paperUuid,testId:V.testId})).data[0],Z=i.ref(""),ne=async V=>{try{let D=await P(V);console.log("record",D),Z.value=D.testId;const Y=JSON.parse(D.result);g.formData=Y.record,c.value=D.useTime,l.value=!0,a.value=!1,g.fApi&&g.fApi.disabled(!1),s.value=Date.now()-c.value*1e3,d.value=setInterval(()=>{c.value=Math.floor((Date.now()-s.value)/1e3)},1e3),p.value=!1,tn.ElMessage({type:"success",message:"已恢复上次答题内容,继续答题!",duration:2e3}),console.log("继续答题,恢复数据:",Y.record)}catch(D){console.error("恢复答题数据失败:",D),tn.ElMessage.error("恢复答题数据失败")}},U=async V=>{try{let D=await P(V);const Y=JSON.parse(D.result);g.formData=Y.record,c.value=D.useTime,g.fApi&&g.fApi.disabled(!0),a.value=!0,l.value=!1,p.value=!1,tn.ElMessage({type:"success",message:"已加载答题详情",duration:2e3}),console.log("查看详情:",Y.record)}catch(D){console.error("查看详情失败:",D),tn.ElMessage.error("查看详情失败")}},S=()=>{s.value=Date.now(),d.value=setInterval(()=>{c.value=Math.floor((Date.now()-s.value)/1e3)},1e3)},$=()=>{d.value&&(clearInterval(d.value),d.value=null),u.value=Date.now()},x=V=>{const D=Math.floor(V/3600),Y=Math.floor(V%3600/60),re=V%60;return D>0?`${D.toString().padStart(2,"0")}:${Y.toString().padStart(2,"0")}:${re.toString().padStart(2,"0")}`:`${Y.toString().padStart(2,"0")}:${re.toString().padStart(2,"0")}`},w=()=>{if(g.fApi)try{const V=g.fApi.formData();if(V)return V;const D=g.fApi.formData;return D||g.formData}catch(V){return console.log("获取表单数据失败,使用备用方案:",V),g.formData}return g.formData},N=async()=>{if(g.fApi)try{return await g.fApi.validate(),console.log("表单验证通过"),!0}catch(V){return console.log("表单验证失败:",V),!1}return!1};return i.onMounted(async()=>{var D,Y;console.log("💻 WorkOrderPc 组件已挂载"),console.log("📋 orderInfo:",n.orderInfo);const V=await v();console.log("🔐 登录状态:",V),V?(r("login-success",_.value),(D=n.orderInfo)!=null&&D.result&&((Y=n.orderInfo)==null?void 0:Y.result)=="1"?(console.log("👀 查看已提交的工单"),await A(),await k()):(console.log("📝 加载工单,等待开始答题"),await A())):console.log("❌ 未登录,等待登录...")}),(V,D)=>{const Y=i.resolveComponent("el-empty"),re=i.resolveComponent("formCreate"),M=i.resolveComponent("el-table-column"),se=i.resolveComponent("el-button"),te=i.resolveComponent("el-table"),oe=i.resolveComponent("el-dialog"),ue=i.resolveDirective("loading");return i.openBlock(),i.createElementBlock("div",j3,[i.unref(b)?(i.openBlock(),i.createElementBlock("div",I3,[i.createElementVNode("div",L3,[i.createElementVNode("div",z3,[i.createElementVNode("div",U3,[i.createElementVNode("h1",H3,i.toDisplayString(g.paperName),1),l.value?(i.openBlock(),i.createElementBlock("div",G3,[D[7]||(D[7]=i.createElementVNode("div",{class:"timer-label"},"填写时间",-1)),i.createElementVNode("div",q3,i.toDisplayString(x(c.value)),1)])):(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createElementVNode("button",{class:"action-btn start",onClick:L},[...D[5]||(D[5]=[i.createElementVNode("span",{class:"btn-icon"},"🚀",-1),i.createElementVNode("span",{class:"btn-text"},"开始填写",-1)])]),i.createElementVNode("button",{class:"action-btn history",onClick:q},[...D[6]||(D[6]=[i.createElementVNode("span",{class:"btn-icon"},"📋",-1),i.createElementVNode("span",{class:"btn-text"},"填写记录",-1)])])],64))])]),i.createElementVNode("div",W3,[D[8]||(D[8]=i.createElementVNode("label",{class:"form-label"},"工单内容",-1)),i.createVNode(re,{rule:g.rules,option:g.option,modelValue:g.formData,"onUpdate:modelValue":D[0]||(D[0]=G=>g.formData=G),onSubmit:T,api:g.fApi,"onUpdate:api":D[1]||(D[1]=G=>g.fApi=G),"submit-btn":!1,"reset-btn":!1},null,8,["rule","option","modelValue","api"])]),i.createElementVNode("div",Y3,[i.createElementVNode("div",X3,[l.value&&!a.value?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createElementVNode("button",{class:"action-btn save",onClick:D[2]||(D[2]=G=>T(0))},[...D[9]||(D[9]=[i.createElementVNode("span",{class:"btn-icon"},"💾",-1),i.createElementVNode("span",{class:"btn-text"},"暂存",-1)])]),i.createElementVNode("button",{class:"submit-btn primary",onClick:D[3]||(D[3]=G=>T(1)),disabled:o.value},[D[10]||(D[10]=i.createElementVNode("span",{class:"btn-icon"},"📝",-1)),i.createElementVNode("span",Q3,i.toDisplayString(o.value?"提交中...":"提交工单"),1)],8,K3),i.createElementVNode("button",{class:"submit-btn secondary",onClick:j},[...D[11]||(D[11]=[i.createElementVNode("span",{class:"btn-icon"},"🔄",-1),i.createElementVNode("span",{class:"btn-text"},"重置表单",-1)])])],64)):i.createCommentVNode("",!0)])])])])):(i.openBlock(),i.createElementBlock("div",P3,[i.withDirectives(i.createVNode(Y,{description:"正在加载..."},null,512),[[ue,i.unref(y)]])])),i.createVNode(oe,{modelValue:p.value,"onUpdate:modelValue":D[4]||(D[4]=G=>p.value=G),title:"答题记录",width:"900px","close-on-click-modal":!1,"append-to-body":"",class:"history-dialog"},{default:i.withCtx(()=>[i.createElementVNode("div",J3,[i.createVNode(te,{data:h.value,style:{width:"100%"},"header-cell-style":{background:"#fafafa",color:"#333",fontWeight:"500",borderBottom:"2px solid #e8e8e8"},"row-style":{height:"56px"}},{default:i.withCtx(()=>[i.createVNode(M,{type:"index",label:"序号",width:"80",align:"center"}),i.createVNode(M,{prop:"userName",label:"答题用户","min-width":"140",align:"center"},{default:i.withCtx(({row:G})=>[i.createElementVNode("div",Z3,[i.createElementVNode("span",eS,i.toDisplayString(G.userName),1)])]),_:1}),i.createVNode(M,{prop:"status",label:"状态",width:"120",align:"center"},{default:i.withCtx(({row:G})=>[i.createElementVNode("span",{class:i.normalizeClass(["status-badge",G.status===0?"status-draft":"status-completed"])},i.toDisplayString(R(G.status)),3)]),_:1}),i.createVNode(M,{prop:"useTime",label:"用时",width:"160",align:"center"},{default:i.withCtx(({row:G})=>[i.createElementVNode("div",tS,i.toDisplayString(K(G.useTime)),1)]),_:1}),i.createVNode(M,{label:"操作",align:"center",width:"140"},{default:i.withCtx(({row:G})=>[G.status===0?(i.openBlock(),i.createBlock(se,{key:0,class:"action-btn-continue",text:"",onClick:X=>ne(G)},{default:i.withCtx(()=>[...D[12]||(D[12]=[i.createTextVNode(" 继续答题 ",-1)])]),_:1},8,["onClick"])):(i.openBlock(),i.createBlock(se,{key:1,class:"action-btn-view",text:"",onClick:X=>U(G)},{default:i.withCtx(()=>[...D[13]||(D[13]=[i.createTextVNode(" 查看详情 ",-1)])]),_:1},8,["onClick"]))]),_:1})]),_:1},8,["data"])])]),_:1},8,["modelValue"])])}}}),[["__scopeId","data-v-bf6f45bd"]]),nS={class:"work-order-mobile"},rS={key:0,class:"loading-container"},oS={key:1},iS={key:0,class:"page-container"},aS={class:"work-order-card"},lS={class:"title-section"},sS={class:"work-order-title"},uS={class:"image-section"},cS=["src"],dS=["src"],fS={key:1,class:"fc-designer"},pS={class:"designer-container"},hS={class:"form-section"},mS={class:"header-container"},gS={class:"form-title"},bS={class:"form-section"},yS={class:"content-header"},vS={key:0,class:"header-buttons"},_S={key:1,class:"timer-container"},wS={class:"timer-display"},xS={key:0,class:"form-section button-group"},CS=["disabled"],kS={class:"history-popup"},ES={class:"history-header"},AS={class:"history-list"},FS={class:"item-left"},SS={class:"item-user"},DS={class:"user-avatar"},BS={class:"user-info"},VS={class:"user-name"},OS={class:"time-text"},NS={class:"item-right"},TS=["onClick"],sd=rw(Object.assign({name:"WorkOrderMobile"},{props:{orderInfo:{type:Object,required:!0,default:()=>({})}},emits:["login-success","logout","submit-success","submit-error"],setup(e,{emit:t}){const n=e,r=t,o=i.ref(!1),a=i.ref(!1),l=i.ref(!1),s=i.ref(!1),u=i.ref(!1),c=i.ref(null),d=i.ref(null),p=i.ref(0),h=i.ref(null),g=i.ref(""),b=i.ref(!1),y=i.ref([]),_=i.ref(""),v=i.reactive({paperName:"",rules:[],option:{},formData:{},fApi:null}),{isLoggedIn:k,userInfo:A,checkAuth:O}=nw(n),T=()=>{a.value=!0,document.body.style.overflow="hidden"},j=()=>{a.value=!1,document.body.style.overflow=""},L=async()=>{if(o.value=!0,await i.nextTick(),await i.nextTick(),console.log("🔧 表单已渲染,fApi 状态:",v.fApi),v.fApi)try{v.fApi.submitBtnProps({show:!1}),!u.value&&!s.value&&v.fApi.disabled(!0),console.log("✅ 成功隐藏默认提交按钮")}catch(te){console.log("⚠️ 移动端不支持 submitBtnProps:",te)}else console.log("⚠️ fApi 还未初始化")},q=()=>{o.value=!1,Y()},K=async()=>{const te=await id({paperUuid:n.orderInfo.paperUuid,testId:n.orderInfo.testId});console.log("👀 工单提交详情:",te);let oe=JSON.parse(te.data[0].result);console.log("📄 解析后的数据:",oe),v.formData=oe.record,s.value=!0,p.value=te.data[0].useTime,o.value=!0,await i.nextTick(),await i.nextTick(),console.log("🔧 查看模式:fApi 状态:",v.fApi),v.fApi?(v.fApi.disabled(!0),console.log("✅ 表单已设置为只读模式")):(console.log("⚠️ fApi 还未初始化,将在下一个周期重试"),setTimeout(()=>{v.fApi&&(v.fApi.disabled(!0),console.log("✅ 延迟设置表单为只读模式成功"))},500))},R=async()=>{try{const te=await Z_({paperUuid:n.orderInfo.paperUuid});if(console.log("工单详情:",te),te.data&&te.data.length>0){g.value=tw.apiPath+te.data[0].url;const oe=formCreate.parseJson(te.data[0].paperJsonContent);v.paperName=te.data[0].paperName,v.rules=formCreate.parseJson(oe.rule),v.option=formCreate.parseJson(oe.options),console.log("✅ 解析后的 paperInfo:",v),console.log('📝 表单规则已准备好,等待用户点击"答题"按钮进入表单视图')}}catch(te){console.error("获取工单详情失败:",te),yn.showToast("获取工单详情失败")}},P=i.ref({}),Z=async te=>{try{if(l.value=!0,!await se()){yn.showToast("表单验证失败,请检查输入");return}const ue=M();P.value=ue,console.log("表单数据:",ue);const G=Object.keys(P.value).map(H=>{const I=v.rules.find(J=>J.children&&J.children.length?J.children.some(B=>B.field===H):J.field===H);if(I)if(I.children&&I.children.length){const J=I.children.find(B=>B.field===H);if(J){let B;return J.type=="upload"?B=JSON.stringify(P.value[H]):B=P.value[H],{questionUuid:H,answer:B,type:J.type}}}else{let J;return I.type=="upload"?J=JSON.stringify(P.value[H]):J=P.value[H],{questionUuid:H,answer:J,type:I.type}}return{questionUuid:H,answer:P.value[H]}});if(te===0){const H=await ad({status:te,paperUuid:n.orderInfo.paperUuid,testId:_.value?_.value:"",useTime:p.value,result:{record:ue,statistics:G}});yn.showToast("工单暂存成功!"),console.log("暂存成功:",H);return}Y();const X=await ad({status:te,paperUuid:n.orderInfo.paperUuid,testId:_.value?_.value:"",useTime:p.value,result:{record:ue,statistics:G}});console.log("提交接口返回:",X),v.fApi&&v.fApi.disabled(!0),s.value=!0,u.value=!1,yn.showToast("工单提交成功!"),r("submit-success",{formData:ue,response:X}),console.log("工单提交成功!",ue)}catch(oe){console.error("提交失败:",oe),yn.showToast("工单提交失败,请重试!"),r("submit-error",oe)}finally{l.value=!1}},ne=()=>{v.fApi&&(v.fApi.resetFields(),Y(),p.value=0,D(),yn.showToast("表单已重置,计时器已重新开始"))},U=()=>{if(u.value){yn.showToast("已经在答题中了");return}s.value&&(s.value=!1,p.value=0,v.fApi&&v.fApi.resetFields(),_.value=""),v.fApi.disabled(!1),u.value=!0,D(),yn.showToast("开始答题,计时已开始!"),console.log("开始答题,计时开始")},S=async()=>{try{const te=await ew({paperUuid:n.orderInfo.paperUuid});console.log("答题记录:",te),te.data&&te.data.length>0?(y.value=te.data,b.value=!0):yn.showToast("暂无答题记录")}catch(te){console.error("获取答题记录失败:",te),yn.showToast("获取答题记录失败")}},$=te=>{if(te<60)return`${te}秒`;if(te<3600){const oe=Math.floor(te/60),ue=te%60;return`${oe}分${ue}秒`}else{const oe=Math.floor(te/3600),ue=Math.floor(te%3600/60),G=te%60;return`${oe}时${ue}分${G}秒`}},x=te=>te===0?"暂存":"已提交",w=async te=>(await id({paperUuid:n.orderInfo.paperUuid,testId:te.testId})).data[0],N=async te=>{try{let oe=await w(te);console.log("record",oe),_.value=oe.testId;const ue=JSON.parse(oe.result);v.formData=ue.record,p.value=oe.useTime,u.value=!0,s.value=!1,v.fApi&&v.fApi.disabled(!1),c.value=Date.now()-p.value*1e3,h.value=setInterval(()=>{p.value=Math.floor((Date.now()-c.value)/1e3)},1e3),b.value=!1,yn.showToast("已恢复上次答题内容,继续答题!"),console.log("继续答题,恢复数据:",ue.record)}catch(oe){console.error("恢复答题数据失败:",oe),yn.showToast("恢复答题数据失败")}},V=async te=>{try{let oe=await w(te);const ue=JSON.parse(oe.result);v.formData=ue.record,p.value=oe.useTime,v.fApi&&v.fApi.disabled(!0),s.value=!0,u.value=!1,b.value=!1,yn.showToast("已加载答题详情"),console.log("查看详情:",ue.record)}catch(oe){console.error("查看详情失败:",oe),yn.showToast("查看详情失败")}},D=()=>{c.value=Date.now(),h.value=setInterval(()=>{p.value=Math.floor((Date.now()-c.value)/1e3)},1e3)},Y=()=>{h.value&&(clearInterval(h.value),h.value=null),d.value=Date.now()},re=te=>{const oe=Math.floor(te/3600),ue=Math.floor(te%3600/60),G=te%60;return oe>0?`${oe.toString().padStart(2,"0")}:${ue.toString().padStart(2,"0")}:${G.toString().padStart(2,"0")}`:`${ue.toString().padStart(2,"0")}:${G.toString().padStart(2,"0")}`},M=()=>{if(v.fApi)try{const te=v.fApi.formData();if(te)return te;const oe=v.fApi.formData;return oe||v.formData}catch(te){return console.log("获取表单数据失败,使用备用方案:",te),v.formData}return v.formData},se=async()=>{if(v.fApi)try{return await v.fApi.validate(),console.log("表单验证通过"),!0}catch(te){return console.log("表单验证失败:",te),!1}return!1};return i.onMounted(async()=>{var oe,ue;console.log("📱 WorkOrderMobile 组件已挂载"),console.log("📋 orderInfo:",n.orderInfo);const te=await O();console.log("🔐 登录状态:",te),te?(r("login-success",A.value),(oe=n.orderInfo)!=null&&oe.result&&((ue=n.orderInfo)==null?void 0:ue.result)=="1"?(console.log("👀 查看已提交的工单"),await R(),await K()):(console.log("📝 加载工单,等待开始答题"),await R())):console.log("❌ 未登录,等待登录...")}),(te,oe)=>{const ue=i.resolveComponent("van-empty"),G=i.resolveComponent("van-icon"),X=i.resolveComponent("formCreateMobile"),H=i.resolveComponent("van-popup");return i.openBlock(),i.createElementBlock("div",nS,[i.unref(k)?(i.openBlock(),i.createElementBlock("div",oS,[o.value?(i.openBlock(),i.createElementBlock("div",fS,[i.createElementVNode("div",pS,[i.createElementVNode("button",{class:"back-button",onClick:q},[i.createVNode(G,{name:"arrow-left"})]),i.createElementVNode("div",hS,[i.createElementVNode("div",mS,[i.createElementVNode("h1",gS,i.toDisplayString(v.paperName),1)])]),i.createElementVNode("div",bS,[i.createElementVNode("div",yS,[oe[9]||(oe[9]=i.createElementVNode("label",{class:"form-label"},"工单内容",-1)),u.value?(i.openBlock(),i.createElementBlock("div",_S,[oe[8]||(oe[8]=i.createElementVNode("span",{class:"timer-label"},"填写时间",-1)),i.createElementVNode("span",wS,i.toDisplayString(re(p.value)),1)])):(i.openBlock(),i.createElementBlock("div",vS,[i.createElementVNode("button",{class:"mobile-btn start",onClick:U}," 开始填写 "),i.createElementVNode("button",{class:"mobile-btn history",onClick:S}," 填写记录 ")]))]),i.createVNode(X,{driver:"elm",rule:v.rules,option:v.option,modelValue:v.formData,"onUpdate:modelValue":oe[1]||(oe[1]=I=>v.formData=I),onSubmit:Z,api:v.fApi,"onUpdate:api":oe[2]||(oe[2]=I=>v.fApi=I),"submit-btn":!1,"reset-btn":!1},null,8,["rule","option","modelValue","api"])]),u.value&&!s.value?(i.openBlock(),i.createElementBlock("div",xS,[i.createElementVNode("button",{class:"mobile-btn save",onClick:oe[3]||(oe[3]=I=>Z(0))}," 暂存 "),i.createElementVNode("button",{class:"mobile-btn submit",onClick:oe[4]||(oe[4]=I=>Z(1)),disabled:l.value},i.toDisplayString(l.value?"提交中...":"提交工单"),9,CS),i.createElementVNode("button",{class:"mobile-btn reset",onClick:ne}," 重置表单 ")])):i.createCommentVNode("",!0)])])):(i.openBlock(),i.createElementBlock("div",iS,[i.createElementVNode("div",aS,[i.createElementVNode("div",lS,[i.createElementVNode("h1",sS,i.toDisplayString(v.paperName),1)]),i.createElementVNode("div",uS,[i.createElementVNode("img",{src:g.value,alt:"工单图片",class:"order-image",onClick:T},null,8,cS)]),a.value?(i.openBlock(),i.createElementBlock("div",{key:0,class:"image-viewer-modal",onClick:j},[i.createElementVNode("div",{class:"modal-content",onClick:oe[0]||(oe[0]=i.withModifiers(()=>{},["stop"]))},[i.createElementVNode("img",{src:g.value,alt:"工单图片",class:"fullscreen-image"},null,8,dS),i.createElementVNode("button",{class:"close-btn",onClick:j},"×")])])):i.createCommentVNode("",!0),i.createElementVNode("div",{class:"footer-section"},[oe[7]||(oe[7]=i.createElementVNode("div",{class:"creation-time"},null,-1)),i.createElementVNode("div",{class:"orientation-buttons"},[i.createElementVNode("button",{class:"orientation-btn vertical",onClick:L},"答题")])])])])),i.createVNode(H,{show:b.value,"onUpdate:show":oe[6]||(oe[6]=I=>b.value=I),round:"",position:"bottom",style:{height:"75%"}},{default:i.withCtx(()=>[i.createElementVNode("div",kS,[i.createElementVNode("div",ES,[oe[10]||(oe[10]=i.createElementVNode("h3",null,"答题记录",-1)),i.createVNode(G,{name:"cross",onClick:oe[5]||(oe[5]=I=>b.value=!1)})]),i.createElementVNode("div",AS,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(y.value,(I,J)=>(i.openBlock(),i.createElementBlock("div",{key:J,class:"history-item"},[i.createElementVNode("div",FS,[i.createElementVNode("div",SS,[i.createElementVNode("span",DS,i.toDisplayString(I.userName.charAt(0)),1),i.createElementVNode("div",BS,[i.createElementVNode("span",VS,i.toDisplayString(I.userName),1),i.createElementVNode("span",OS,i.toDisplayString($(I.useTime)),1)])])]),i.createElementVNode("div",NS,[i.createElementVNode("span",{class:i.normalizeClass(["status-tag",I.status===0?"tag-draft":"tag-completed"])},i.toDisplayString(x(I.status)),3),i.createElementVNode("button",{class:i.normalizeClass(["action-button",I.status===0?"btn-continue":"btn-view"]),onClick:B=>I.status===0?N(I):V(I)},i.toDisplayString(I.status===0?"继续答题":"查看详情"),11,TS)])]))),128))])])]),_:1},8,["show"])])):(i.openBlock(),i.createElementBlock("div",rS,[i.createVNode(ue,{description:"正在加载..."})]))])}}}),[["__scopeId","data-v-d146fd9d"]]),am=i.defineCustomElement(ld),lm=i.defineCustomElement(sd);typeof window<"u"&&!customElements.get("work-order-pc")&&customElements.define("work-order-pc",am),typeof window<"u"&&!customElements.get("work-order-mobile")&&customElements.define("work-order-mobile",lm);function ow(){typeof window<"u"&&(customElements.get("work-order-pc")||customElements.define("work-order-pc",am),customElements.get("work-order-mobile")||customElements.define("work-order-mobile",lm))}const RS={register:ow};/*! Element Plus v2.11.5 */var $S={name:"zh-cn",el:{breadcrumb:{label:"面包屑"},colorpicker:{confirm:"确定",clear:"清空",defaultLabel:"颜色选择器",description:"当前颜色 {color},按 Enter 键选择新颜色",alphaLabel:"选择透明度的值",alphaDescription:"透明度 {alpha}, 当前颜色 {color}",hueLabel:"选择色相值",hueDescription:"色相 {hue}, 当前颜色 {color}"},datepicker:{now:"此刻",today:"今天",cancel:"取消",clear:"清空",confirm:"确定",dateTablePrompt:"使用方向键与 Enter 键可选择日期",monthTablePrompt:"使用方向键与 Enter 键可选择月份",yearTablePrompt:"使用方向键与 Enter 键可选择年份",selectedDate:"已选日期",selectDate:"选择日期",selectTime:"选择时间",startDate:"开始日期",startTime:"开始时间",endDate:"结束日期",endTime:"结束时间",prevYear:"前一年",nextYear:"后一年",prevMonth:"上个月",nextMonth:"下个月",year:"年",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},weeksFull:{sun:"星期日",mon:"星期一",tue:"星期二",wed:"星期三",thu:"星期四",fri:"星期五",sat:"星期六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},inputNumber:{decrease:"减少数值",increase:"增加数值"},select:{loading:"加载中",noMatch:"无匹配数据",noData:"无数据",placeholder:"请选择"},mention:{loading:"加载中"},dropdown:{toggleDropdown:"切换下拉选项"},cascader:{noMatch:"无匹配数据",loading:"加载中",placeholder:"请选择",noData:"暂无数据"},pagination:{goto:"前往",pagesize:"条/页",total:"共 {total} 条",pageClassifier:"页",page:"页",prev:"上一页",next:"下一页",currentPage:"第 {pager} 页",prevPages:"向前 {pager} 页",nextPages:"向后 {pager} 页",deprecationWarning:"你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档"},dialog:{close:"关闭此对话框"},drawer:{close:"关闭此对话框"},messagebox:{title:"提示",confirm:"确定",cancel:"取消",error:"输入的数据不合法!",close:"关闭此对话框"},upload:{deleteTip:"按 Delete 键可删除",delete:"删除",preview:"查看图片",continue:"继续上传"},slider:{defaultLabel:"滑块介于 {min} 至 {max}",defaultRangeStartLabel:"选择起始值",defaultRangeEndLabel:"选择结束值"},table:{emptyText:"暂无数据",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计"},tour:{next:"下一步",previous:"上一步",finish:"结束导览",close:"关闭此对话框"},tree:{emptyText:"暂无数据"},transfer:{noMatch:"无匹配数据",noData:"无数据",titles:["列表 1","列表 2"],filterPlaceholder:"请输入搜索内容",noCheckedFormat:"共 {total} 项",hasCheckedFormat:"已选 {checked}/{total} 项"},image:{error:"加载失败"},pageHeader:{title:"返回"},popconfirm:{confirmButtonText:"确定",cancelButtonText:"取消"},carousel:{leftArrow:"上一张幻灯片",rightArrow:"下一张幻灯片",indicator:"幻灯片切换至索引 {index}"}}};/*!
31
31
  * @form-create/element-ui v3.2.27
32
32
  * (c) 2018-2025 xaboy
33
33
  * Github https://github.com/xaboy/form-create