y9-interface-platform/y9vue-interfacePlatform/interface/assets/index-b236a7b5.js

2 lines
71 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.

import{E as Y,I as Tt,H as bt,l as Dt,J as Ot,o as Ct,p as xt,q as Pt,v as Ft,b as Be,K as qe,a as fe,u as qt,d as At,L as zt,M as Nt,s as Et,r as Jt,c as $t,N as Mt,t as Kt,O as Wt}from"./element-plus-53a783a7.js";import"./vue-20eed888.js";import{u as it,b as $e,y as jt}from"./index-03a63030.js";import{u as Ve}from"./vue-i18n-d6e8419a.js";import{s as Ht,p as Xt,g as Yt,u as yt,a as St,b as Gt,c as Qt,d as Zt,e as It,f as ea,h as Rt,i as ta,j as aa,k as la,l as ia}from"./interface-6c1bedf7.js";import{g as wt,d as oa,f as Lt,a as sa,b as na,i as ra}from"./interfaceDialog-a751ab38.js";import{d as _e,G as Xe,r as a,k as l,ai as we,Q as ht,o as N,b as X,P as n,e as p,u as te,i as Ut,T as J,c as Me,F as Ke,a8 as Vt,S as ie,U as ve,n as ge,ah as U,L as Ue,a as se}from"./@vue-e95c845e.js";import{_ as Te}from"./y9plugin-components-412bad23.js";import{b as ua}from"./vue-router-e03c3082.js";import{g as lt,a as Bt}from"./systemidentifier-26774e0a.js";import{i as pa}from"./interfaceAuth-23f23afd.js";import{p as _t}from"./parameterTable-f92cb2bf.js";import{s as fa}from"./request-6d47a533.js";/* empty css */import"./lodash-es-2e98bc53.js";import"./@vueuse-409d7ed5.js";import"./@element-plus-57b52633.js";import"./@popperjs-c75af06c.js";import"./@ctrl-f8748455.js";import"./dayjs-e13f206c.js";import"./axios-db0ed51e.js";import"./async-validator-20f92749.js";import"./memoize-one-297ddbcb.js";import"./normalize-wheel-es-ed76fb12.js";import"./@floating-ui-606f2ab9.js";import"./lodash-11751b8b.js";import"./pinia-22d008e7.js";import"./nprogress-e9cc33fd.js";/* empty css *//* empty css *//* empty css */import"./y9plugin-sso-6f4b3ca3.js";import"./y9plugin-watermark-e18d3181.js";import"./@intlify-d4a3a758.js";import"./v-viewer-decd5d79.js";import"./viewerjs-c43574b2.js";import"./vxe-table-3ccf2bcd.js";import"./xe-utils-90392958.js";import"./dom-zindex-d72a3c32.js";import"./authInterface-473123dc.js";const da=_e({__name:"pubOrStop",props:{openDialog:{type:Boolean,default:()=>!1},isView:{type:Boolean,default:()=>!1},interfaceId:{type:String},selectData:{type:String}},emits:["update:openDialog","update:selectData","getDataListParent"],setup(re,{expose:Z,emit:oe}){Xe("sizeObjInfo"),it();const{t:y}=Ve();a();const i=a(),$=a(""),O=a(""),F=a(!1);a([]);const x=re,A=oe;let V=a({show:x.openDialog,title:l(()=>y("发布接口信息")),showFooter:!0,onOkLoading:!0,okText:"送审",onOk:q=>new Promise(async(M,P)=>{var m;await((m=i.value)==null?void 0:m.elFormRef).validate(async v=>{if(v){F.value=!0;let f=i.value.model;f.applyStopTime=O.value;let w=new FormData;for(let d in f)f[d]!=null&&d!="createTime"&&d!="updateTime"&&w.append(d,f[d]);$.value=="停用"?Ht(f).then(d=>{d.code==0&&(d.status=="success"?Y({message:"数据提交成功,等待审核",type:"success"}):Y({message:""+d.msg,type:"success"}),V.value.show=!1,A("getDataListParent"))}):Xt(f).then(d=>{d.code==0&&(d.status=="success"?Y({message:"流程提交成功",type:"success"}):Y({message:""+d.msg,type:"success"}),V.value.show=!1,A("getDataListParent"))}),P(),F.value=!1}else P(),F.value=!1})}),visibleChange:q=>{A("update:openDialog",q)}}),_=a({model:{interfaceId:"",applyStopTime:""},rules:{applyReason:[{required:!0,message:l(()=>y("事由不能为空")),trigger:"blur"}]},itemList:[{type:"textarea",label:l(()=>y("事由")),prop:"applyReason",props:{rows:3}},{type:"textarea",label:l(()=>y("备注")),prop:"notes",props:{rows:3}},{type:"slot",label:l(()=>y("申请停用时间")),prop:"applyStopTime",props:{slotName:"stopdate"}}],descriptionsFormConfig:{labelWidth:"200px",labelAlign:"center"}});function H(q,M){if(_.value.model.interfaceId=q,M=="停用"){V.value.title=l(()=>y("停用接口信息"));let P=[],s={type:"slot",label:l(()=>y("申请停用时间")),prop:"applyStopTime",props:{slotName:"stopdate"}},m=!0;for(let v of _.value.itemList)v.prop=="applyStopTime"&&(m=!1),P.push(v);m&&P.push(s),_.value.itemList=P}else if(M=="发布"){V.value.title=l(()=>y("发布接口信息"));let P=[];for(let s of _.value.itemList)s.prop!="applyStopTime"&&P.push(s);_.value.itemList=P}$.value=M,V.value.show=!0}const T=q=>q.getTime()<Date.now();return Z({openPubDialog:H}),(q,M)=>{const P=Tt,s=we("y9Form"),m=we("y9Dialog"),v=bt;return ht((N(),X(m,{config:te(V),"onUpdate:config":M[1]||(M[1]=f=>Ut(V)?V.value=f:V=f)},{default:n(()=>[p(s,{ref_key:"ruleFormRef",ref:i,config:te(_)},{stopdate:n(()=>[p(P,{modelValue:O.value,"onUpdate:modelValue":M[0]||(M[0]=f=>O.value=f),"value-format":"YYYY-MM-DD HH:mm:ss",type:"datetime",placeholder:"选择时间","disabled-date":T,"show-now":!1},null,8,["modelValue"])]),_:1},8,["config"])]),_:1},8,["config"])),[[v,F.value]])}}});const ma=Te(da,[["__file","E:/workSpaceJDK11/y9-interface-platform/y9vue-interfacePlatform/src/views/interface/pubOrStop.vue"]]),va=_e({__name:"authDialog",props:{openDialog:{type:Boolean,default:()=>!1},isView:{type:Boolean,default:()=>!1},interfaceId:{type:String},selectData:{type:Object}},emits:["update:openDialog","update:selectData"],setup(re,{expose:Z,emit:oe}){Xe("sizeObjInfo"),it();const{t:y}=Ve();a();const i=a({}),$=a(),O=a({thresholdType:[{required:!0,message:l(()=>y("阈值类型不能为空")),trigger:"blur"}]}),F=a([]),x=re,A=oe;a(!1);const V=a("权限信息");function _(P){A("update:openDialog",!1)}function H(P){$.value.validate(s=>{s&&(A("update:openDialog",!1),A("update:selectData",i.value))})}function T(){let P={id:x.interfaceId,isView:x.isView};Yt(P).then(s=>{F.value=s.data,x.isView;let m=s.requiredData;for(let f of m)O.value[f.parameterKey]=[{required:!0,message:l(()=>y("参数不能为空")),trigger:"blur"}];let v=[];for(let f in x.selectData)x.selectData[f].length==1&&x.selectData[f][0]==""&&v.push(f);for(let f of v)delete x.selectData[f];i.value=x.selectData}).catch(()=>{Y({message:"获取权限信息失败",type:"warning"})})}return Z({restData:()=>{i.value={},F.value=[]},getRuleForm:()=>(A("update:selectData",i.value),$.value)}),(P,s)=>{const m=Dt,v=Ot,f=Ct,w=xt,d=Pt,r=Ft,B=Be,R=qe;return N(),X(R,{modelValue:x.openDialog,"onUpdate:modelValue":s[2]||(s[2]=c=>x.openDialog=c),title:V.value,onClosed:_,onOpened:T,"append-to-body":"true"},{footer:n(()=>[p(B,{class:"el-button el-button--primary el-button--default global-btn-main",onClick:s[0]||(s[0]=c=>H("1"))},{default:n(()=>s[3]||(s[3]=[J("确定")])),_:1}),p(B,{onClick:s[1]||(s[1]=c=>_("1"))},{default:n(()=>s[4]||(s[4]=[J("取消")])),_:1})]),default:n(()=>[p(m),p(r,{ref_key:"ruleFormRef",ref:$,model:i.value,rules:O.value},{default:n(()=>[(N(!0),Me(Ke,null,Vt(F.value,c=>(N(),X(d,{key:c.id,label:c.label,prop:c.prop},{default:n(()=>[c.type=="slot"?(N(),X(v,{key:0,modelValue:i.value[c.prop],"onUpdate:modelValue":L=>i.value[c.prop]=L,data:c.options,multiple:"","render-after-expand":!1,"show-checkbox":"","check-strictly":""},null,8,["modelValue","onUpdate:modelValue","data"])):ie("",!0),c.type=="select"?(N(),X(w,{key:1,modelValue:i.value[c.prop],"onUpdate:modelValue":L=>i.value[c.prop]=L,multiple:""},{default:n(()=>[(N(!0),Me(Ke,null,Vt(c.options,L=>(N(),X(f,{key:L.id,label:L.label,value:L.value,disabled:x.isView},null,8,["label","value","disabled"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])):ie("",!0)]),_:2},1032,["label","prop"]))),128))]),_:1},8,["model","rules"])]),_:1},8,["modelValue","title"])}}});const ca=Te(va,[["__scopeId","data-v-d5d05ea8"],["__file","E:/workSpaceJDK11/y9-interface-platform/y9vue-interfacePlatform/src/views/interface/authDialog.vue"]]),ga=_e({__name:"applyInfo",props:{openDialog:{type:Boolean,default:()=>!1},isOpen:{type:Boolean,default:()=>!1},isView:{type:Boolean,default:()=>!1},interfaceId:{type:String},selectData:{type:Object},isAuth:{type:String},flowData:{type:Array}},emits:["update:openDialog","update:selectData","getDataListParent"],setup(re,{expose:Z,emit:oe}){const{t:y}=Ve();a();const i=a(),$=a(""),O=a(!1),F=a(),x=a(),A=a(""),V=a({}),_=a([]),H=a([]),T=re,q=oe,M=()=>{var W;let K=i.value.model;for(let z of _.value)z.value==K.applyPersonDeptId&&(K.applyPersonDeptName=z.label);for(let z of H.value)z.value==K.systemIdentifier&&(K.applySystemName=z.label);return i.value.model=K,console.log(i.value.model),{y9RuleFormInstance:(W=i.value)==null?void 0:W.elFormRef,authDialogRef:x.value,ruleFormRef:i.value,selectData:V.value}},P=()=>{var b;((b=i.value)==null?void 0:b.elFormRef).validate(async W=>{if(W){try{x.value.getRuleForm().validate(k=>{if(!k)return fe.alert("权限信息页面有必填项未填写,请打开页面确认!","权限信息必填确认",{confirmButtonText:"确认"}),!1})}catch{return fe.alert("权限信息页面未选择,请打开页面确认!","权限信息必填确认",{confirmButtonText:"确认"}),!1}let z=i.value.model,S=new FormData;for(let k in z)z[k]!=null&&k!="createTime"&&k!="updateTime"&&S.append(k,z[k]);let g={};for(let k in V.value){let ue="";for(let ce of V.value[k])ue+=ce+",";g[k]=ue.substring(0,ue.length-1)}if(S.append("auth",JSON.stringify(g)),z.auth=JSON.stringify(g),$.value!="停用"){let k=await yt(z);return k.code==0?(k.status=="success"?Y({message:"数据提交成功,等待审核,详细信息请移步到 个人中心>已申请接口 查看",type:"success",duration:6e3}):Y({message:""+k.msg,type:"success"}),q("getDataListParent"),!0):!1}}else return!1})},s=(K,b,W)=>{let z=$e("phone",b,!0);z.valid?W():W(new Error(z.msg))},m=[];let v={type:"textarea",label:l(()=>y("申请事由")),prop:"applyReason",props:{disabled:T.isView,rows:3,maxlength:500}},f={type:"textarea",label:l(()=>y("备注")),prop:"notes",props:{disabled:T.isView,rows:3,maxlength:254}},w={type:"select",label:l(()=>y("申请系统名称")),prop:"systemIdentifier",props:{disabled:T.isView,maxlength:254,options:H.value}},d={type:"slot",label:l(()=>y("权限信息申请")),props:{slotName:"openAuthDialog"}},r={type:"textarea",label:l(()=>y("IP名单")),prop:"ipWhitelist",props:{disabled:T.isView,placeholder:"多个IP使用英文逗号隔开例如132.1.168.11,132.1.168.12",rows:3,maxlength:100}},B={type:"select",label:l(()=>y("接口调用单位名称")),prop:"applyPersonDeptId",props:{disabled:T.isView,maxlength:254,options:_.value,events:{change:K=>{L.value.model=i.value.model;let b={pid:K};L.value.model.systemIdentifier="",lt(b).then(W=>{H.value=[];for(let z of W.data){let S={label:z.name,value:z.id};H.value.push(S)}for(let z of L.value.itemList)z.prop=="systemIdentifier"&&(z.props.options=H.value)})}}}},R={type:"input",label:l(()=>y("接口调用责任人")),prop:"usePersonResponsible",props:{disabled:T.isView,maxlength:50}},c={type:"input",label:l(()=>y("责任人联系方式")),prop:"usePersonResponsiblePhone",props:{placeholder:"请输入11位手机号码",disabled:T.isView,maxlength:11}};m.push(v),m.push(f),T.isAuth=="是"&&m.push(d),m.push(r),m.push(B),m.push(w),m.push(R),m.push(c);let L=a({model:{interfaceId:T.interfaceId,applyStopTime:"",applyTime:""},rules:{applyReason:[{required:!0,message:l(()=>y("申请事由不能为空")),trigger:"blur"}],systemIdentifier:[{required:!0,message:l(()=>y("申请系统名称不能为空")),trigger:"blur"}],applyPersonDeptId:[{required:!0,message:l(()=>y("接口调用单位名称不能为空")),trigger:"blur"}],ipWhitelist:[{required:!0,message:l(()=>y("IP名单不能为空")),trigger:"blur"}],applyTime:[{required:!0,message:l(()=>y("申请日期不能为空")),trigger:"blur"}],applyPersonDeptName:[{required:!0,message:l(()=>y("接口调用单位名称不能为空")),trigger:"blur"}],usePersonResponsible:[{required:!0,message:l(()=>y("接口调用责任人不能为空")),trigger:"blur"}],usePersonResponsiblePhone:[{required:!0,message:l(()=>y("责任人联系方式不能为空")),trigger:"blur"},{validator:s,trigger:"blur"}]},itemList:m,descriptionsFormConfig:{labelWidth:"200px",labelAlign:"center"}});function Q(K,b){L.value.model.interfaceId=K,F.value=K}const Fe=()=>{O.value=!0},Ae=K=>{L.value.model=K;let b=JSON.parse(K.auth);for(let W in b)V.value[W]=b[W].split(",");if(K.applyPersonDeptId!=null&&K.applyPersonDeptId!=null&&K.systemIdentifier!=null&&K.systemIdentifier!=null){let W={pid:K.applyPersonDeptId};lt(W).then(z=>{H.value=[];for(let S of z.data){let g={label:S.name,value:S.id};H.value.push(g)}for(let S of L.value.itemList)S.prop=="systemIdentifier"&&(S.props.options=H.value)})}},ne=()=>{L.value.model={},V.value={}};return Bt({parameterType:0}).then(K=>{for(let b of K.data){let W={label:b.name,value:b.id};_.value.push(W)}}),Z({openPubDialog:Q,submitData:P,rtDialogRef:M,initFormData:Ae,resetFormData:ne}),(K,b)=>{const W=Tt,z=Be,S=we("y9Form");return N(),Me(Ke,null,[p(S,{ref_key:"ruleFormRef",ref:i,config:te(L)},{stopdate:n(()=>[p(W,{modelValue:A.value,"onUpdate:modelValue":b[0]||(b[0]=g=>A.value=g),type:"datetime",placeholder:"选择时间"},null,8,["modelValue"])]),openAuthDialog:n(()=>[p(z,{onClick:b[1]||(b[1]=g=>Fe())},{default:n(()=>[J(ve(re.isView?"点击查看申请的权限范围信息":"点击选择要申请的权限范围信息"),1)]),_:1})]),_:1},8,["config"]),p(ca,{ref_key:"authDialogRef",ref:x,"select-data":V.value,"onUpdate:selectData":b[2]||(b[2]=g=>V.value=g),"open-dialog":O.value,"onUpdate:openDialog":b[3]||(b[3]=g=>O.value=g),interfaceId:T.interfaceId,"onUpdate:interfaceId":b[4]||(b[4]=g=>T.interfaceId=g),isView:T.isView,"onUpdate:isView":b[5]||(b[5]=g=>T.isView=g)},null,8,["select-data","open-dialog","interfaceId","isView"])],64)}}});const ot=Te(ga,[["__file","E:/workSpaceJDK11/y9-interface-platform/y9vue-interfacePlatform/src/views/interface/applyInfo.vue"]]),ya=_e({__name:"interfaceApply",props:{openDialog:{type:Boolean,default:()=>!1},isView:{type:Boolean,default:()=>!1},interfaceId:{type:String},selectData:{type:String}},emits:["update:openDialog","update:selectData","getDataListParent"],setup(re,{expose:Z,emit:oe}){const{t:y}=Ve(),i=a(!1),$=a(),O=a(),F=a(),x=a(),A=a(!1),V=a("否"),_=a(!1),H=re,T=oe;let q=a({show:H.openDialog,title:l(()=>y("接口调用申请")),showFooter:!0,onOkLoading:!0,margin:"10vh auto",okText:"提交",onOk:s=>new Promise(async(m,v)=>{if(x.value!="通过"){let f=F.value.rtDialogRef();const w=f.y9RuleFormInstance;f.ruleFormRef.model,w.validate(async d=>{if(d){_.value=!0;try{V.value=="是"&&f.authDialogRef.getRuleForm().validate(c=>{if(!c){fe.alert("权限信息页面有必填项未填写,请打开页面确认!","权限信息必填确认",{confirmButtonText:"确认"});return}})}catch{fe.alert("权限信息页面未选择,请打开页面确认!","权限信息必填确认",{confirmButtonText:"确认"});return}let r=f.ruleFormRef.model,B=new FormData;for(let c in r)r[c]!=null&&c!="createTime"&&c!="updateTime"&&B.append(c,r[c]);B.delete("auth");let R={};for(let c in f.selectData){let L="";for(let Q of f.selectData[c])L+=Q+",";R[c]=L.substring(0,L.length-1)}B.append("auth",JSON.stringify(R)),r.auth=JSON.stringify(R),yt(r).then(c=>{c.code==0&&(c.status=="success"?Y({message:"流程提交成功,等待审核,详细信息请移步到 个人中心>已申请接口 查看",type:"success",duration:6e3}):Y({message:""+c.msg,type:"success"}),T("getDataListParent"),q.value.show=!1),_.value=!1})}else v(),_.value=!1})}else fe.confirm("是否想要变更申请信息,当前接口调用申请已经审批通过,点击“保存并提交”后需要重新审批","重新申请确认",{confirmButtonText:"确定",cancelButtonText:"取消",type:"info",draggable:!0}).then(()=>{let f=F.value.rtDialogRef();const w=f.y9RuleFormInstance;let d=f.ruleFormRef.model;w.validate(async r=>{if(r){_.value=!0;try{V.value=="是"&&f.authDialogRef.getRuleForm().validate(c=>{if(!c){fe.alert("权限信息页面有必填项未填写,请打开页面确认!","权限信息必填确认",{confirmButtonText:"确认"}),v(),_.value=!1;return}})}catch{fe.alert("权限信息页面未选择,请打开页面确认!","权限信息必填确认",{confirmButtonText:"确认"}),v(),_.value=!1;return}let B=new FormData;for(let c in d)d[c]!=null&&c!="createTime"&&c!="updateTime"&&B.append(c,d[c]);B.delete("auth");let R={};for(let c in f.selectData){let L="";for(let Q of f.selectData[c])L+=Q+",";R[c]=L.substring(0,L.length-1)}B.append("auth",JSON.stringify(R)),d.auth=JSON.stringify(R),yt(d).then(c=>{c.code==0?(c.status=="success"?Y({message:"数据提交成功,等待审核,详细信息请移步到 个人中心>已申请接口 查看",type:"success",duration:6e3}):Y({message:""+c.msg,type:"success"}),T("getDataListParent"),m(),_.value=!1):(v(),_.value=!1)})}else v(),_.value=!1})}).catch(()=>{v(),_.value=!1})}),visibleChange:s=>{if(T("update:openDialog",s),!s)try{F.value.restData()}catch{}}});function M(s,m,v,f){$.value=s,q.value.show=!0,m=="申请"&&St({id:s}).then(d=>{ge(()=>{d.data.oldId=d.data.id,F.value.initFormData(d.data)})}),V.value=f,x.value=v,console.log(x.value)}return Z({openPubDialog:M,initFormData:s=>{q.value.show=!0,ge(()=>{A.value=!0,F.value.initFormData(s)})}}),(s,m)=>{const v=we("y9Dialog"),f=bt;return ht((N(),X(v,{config:te(q),"onUpdate:config":m[5]||(m[5]=w=>Ut(q)?q.value=w:q=w)},{default:n(()=>[p(ot,{ref_key:"applyInfoRef",ref:F,isView:A.value,"onUpdate:isView":m[0]||(m[0]=w=>A.value=w),"select-data":O.value,"onUpdate:selectData":m[1]||(m[1]=w=>O.value=w),"open-dialog":i.value,"onUpdate:openDialog":m[2]||(m[2]=w=>i.value=w),interfaceId:$.value,"onUpdate:interfaceId":m[3]||(m[3]=w=>$.value=w),isAuth:V.value,"onUpdate:isAuth":m[4]||(m[4]=w=>V.value=w)},null,8,["isView","select-data","open-dialog","interfaceId","isAuth"])]),_:1},8,["config"])),[[f,_.value]])}}});const ba=Te(ya,[["__file","E:/workSpaceJDK11/y9-interface-platform/y9vue-interfacePlatform/src/views/interface/interfaceApply.vue"]]),Da=_e({__name:"interfaceApplyInfo",props:{openDialog:{type:Boolean,default:()=>!1},isView:{type:Boolean,default:()=>!1},interfaceId:{type:String},selectData:{type:String}},emits:["update:openDialog","update:selectData","getDataListParent"],setup(re,{expose:Z,emit:oe}){Ve();const y=a(!1),i=a(),$=a(),O=a(),F=a(),x=a(!0),A=a(),V=a(!1),_=a("查看申请信息");function H(P,s,m){i.value=P,s=="申请"&&St({id:P}).then(f=>{ge(()=>{O.value.initFormData(f.data)})}),F.value=m,console.log(F.value)}const T=(P,s)=>{V.value=!0,i.value=P.interfaceId,A.value=s,ge(()=>{O.value.initFormData(P)})};function q(){V.value=!1}function M(){O.value.resetFormData()}return Z({openPubDialog:H,initFormData:T}),(P,s)=>{const m=Be,v=qe;return N(),X(v,{modelValue:V.value,"onUpdate:modelValue":s[5]||(s[5]=f=>V.value=f),title:_.value,"append-to-body":"true",onClosed:M},{default:n(()=>[p(ot,{ref_key:"applyInfoRef",ref:O,isView:x.value,"onUpdate:isView":s[0]||(s[0]=f=>x.value=f),"select-data":$.value,"onUpdate:selectData":s[1]||(s[1]=f=>$.value=f),"open-dialog":y.value,"onUpdate:openDialog":s[2]||(s[2]=f=>y.value=f),isAuth:A.value,"onUpdate:isAuth":s[3]||(s[3]=f=>A.value=f),interfaceId:i.value,"onUpdate:interfaceId":s[4]||(s[4]=f=>i.value=f)},null,8,["isView","select-data","open-dialog","isAuth","interfaceId"])]),footer:n(()=>[p(m,{class:"el-button el-button--primary el-button--default global-btn-main",onClick:q},{default:n(()=>s[6]||(s[6]=[J("确定")])),_:1}),p(m,{onClick:q},{default:n(()=>s[7]||(s[7]=[J("取消")])),_:1})]),_:1},8,["modelValue","title"])}}});const Sa=Te(Da,[["__file","E:/workSpaceJDK11/y9-interface-platform/y9vue-interfacePlatform/src/views/interface/interfaceApplyInfo.vue"]]),wa=_e({__name:"interfaceDialogApplyTable",props:{status:{type:String,default:()=>"其他"},isShow:{type:Boolean,default:()=>!0}},emits:["getDataListParent"],setup(re,{expose:Z,emit:oe}){const y=Xe("sizeObjInfo"),{t:i}=Ve(),$=a({});a();const O=a(),F=a(),x=a(),A=a(),V=a(),_=a(!1),H=a("webService信息补充"),T=a(!1),q=a("配置限流信息"),M=a(!1),P=a(),s=a(!1),m=a("查看接口信息"),v=a("false"),f=a("false"),w=a("false"),d=a(),r=a(!0);a("0");const B=a("0"),R=a(!0),c=a(),L=a("3"),Q=a(),Fe=a("2"),Ae=a(),ne=a("Rest"),Le=a("N"),K=a(),b=a(),W=a("get"),z=a([]),S=a([]),g=oe,k=a({thresholdType:"0",limitTime:"",limitCount:"",thresholdVal:"",effect:"1",waitTime:""}),ue=re,ce=(o,e,t)=>{let u=$e("number",e,!0);u.valid?t():t(new Error(u.msg))},C=a(),ze=a({thresholdType:[{required:!0,message:l(()=>i("阈值类型不能为空")),trigger:"blur"}],limitTime:[{required:!0,message:l(()=>i("限定时间不能为空")),trigger:"blur"},{validator:ce,trigger:"blur"}],limitCount:[{required:!0,message:l(()=>i("限定访问量不能为空")),trigger:"blur"},{validator:ce,trigger:"blur"}],thresholdVal:[{required:!0,message:l(()=>i("阈值不能为空")),trigger:"blur"},{validator:ce,trigger:"blur"}],effect:[{required:!0,message:l(()=>i("流控效果不能为空")),trigger:"blur"}],waitTime:[{required:!0,message:l(()=>i("超时时间不能为空")),trigger:"blur"},{validator:ce,trigger:"blur"}]}),We=a({}),le=a({}),st=a({webSpecification:[{required:!0,message:l(()=>i("webService规范协议不能为空")),trigger:"blur"}],nameSpace:[{required:!0,message:l(()=>i("命名空间不能为空")),trigger:"blur"}],method:[{required:!0,message:l(()=>i("调用方法名不能为空")),trigger:"blur"}]}),he=a(),ye=(o,e,t)=>{let u=$e("nopreurl",e,!0);u.valid?t():t(new Error(u.msg))},nt=(o,e,t)=>{let u=$e("special",e,!0);u.valid?t(new Error(u.msg)):t()},rt=(o,e,t)=>{let u=$e("version",e,!0);if(!u.valid)t(new Error(u.msg));else{let ae=e.substring(1).split(".");for(let h of ae)isNaN(Number(h))&&t(new Error("版本格式错误,正确格式为V1.1.1错误格式为V1.01;V1..;V0.1等")),Ne(h)&&t(new Error("版本格式错误,正确格式为V1.1.1错误格式为V1.01;V1..;V0.1等")),Number(h).toString().length!=h.length&&t(new Error("版本格式错误,正确格式为V1.1.1错误格式为V1.01;V1..;V0.1等")),h<=0&&t(new Error("版本格式错误,正确格式为V1.1.1错误格式为V1.01;V1..;V0.1等"));t()}},ut=(o,e,t)=>{let u=$e("phone",e,!0);u.valid?t():t(new Error(u.msg))};a({show:!1,title:l(()=>i("新增接口")),margin:"5vh auto",showFooter:!0,onOkLoading:!0,onOk:o=>new Promise(async(e,t)=>{var I;const u=(I=he.value)==null?void 0:I.elFormRef;he.value.model.interfaceType=ne.value,await u.validate(async ae=>{if(ae){let h=he.value.model;if(h.interfaceType!="Rest"){if(Ne(le.value.webSpecification))return Re("webService补充信息确认","webService补充信息页面存在未填信息请确认"),t(),!1;if(le.value.webSpecification=="JAX-WS"&&(Ne(le.value.nameSpace)||Ne(le.value.method)))return Re("webService补充信息确认","webService补充信息页面存在未填信息请确认"),t(),!1}h.interfaceType!="Rest"&&(h.webSpecification=le.value.webSpecification,h.nameSpace=le.value.nameSpace,h.method=le.value.method),h.interfaceType=ne.value,h.isOverwrite=Le.value;let E=new FormData,ee=[];if((f.value=="true"||f)&&(ee=c.value.getCheckData(),ee==null||ee.length==0)){Re("权限参数确认","已经开启鉴权,请至少选择一项权限参数"),t();return}d.value=ee,h.limitInfo=JSON.stringify(k.value);let De=Ie(1,!0);if(typeof De=="boolean"){t();return}h.parameters=JSON.stringify(De);let j=[],Oe="",Se;if(W.value=="post"&&ne.value=="Rest"){Se=Ae.value.getTableData(),at(Se,j);for(let G of j)JSON.parse(G.isItems)||(Oe+=G.parameterKey+",")}else if(W.value=="get"||ne.value!="Rest"){if(Se=Ie(2,!0),typeof Se=="boolean"){t();return}for(let G of Se)Oe+=G.parameterKey+","}if(f.value=="true"||f){let G=c.value.getCheckDataKeys(),He=new Set;for(let me of G)He.add(me);if(He.size!=G.length){t(),Re("权限参数确认","权限参数存在重复字段名称");return}let Pe="";for(let me of G)Oe.indexOf(me+",")==-1&&(Pe+=me+",");if(Pe.length!=0){Pe=Pe.substring(0,Pe.length-1),t(),Re("权限参数确认","权限参数:"+Pe+"没有在请求参数列表中体现。");return}let Je=new Map;if(j.length!=0)for(let me of j)Je.set(me.parameterKey,me);else for(let me of Se)Je.set(me.parameterKey,me);let D=!1;for(let me of G)Je.get(me).required=="否"&&(Je.get(me).required="是",D=!0);if(D){t(),Re("是否必填确认","请求参数列表中对应的数据请求范围参数的是否必填项已经自动变更为是请确认,数据请求范围的参数都是必填的");return}}h.reqParameters=JSON.stringify(Se);for(let G of z.value)G.value==h.deptId&&(h.deptInfo=G.label);for(let G of S.value)G.value==h.systemId&&(h.systemName=G.label);let Ee=Q.value.getTableData();h.resParameters=JSON.stringify(Ee);for(let G in h)h[G]!=null&&G!="createTime"&&G!="updateTime"&&E.append(G,h[G]);h.isAuth=w.value==!0?"是":"否",h.isLimit=v.value==!0?"是":"否",h.isLimitData=f.value==!0?"是":"否",h.parameterIds=d.value==null?JSON.stringify([]):""+d.value,E.set("isAuth",w.value==!0?"是":"否"),E.set("isLimit",v.value==!0?"是":"否"),E.set("isLimitData",f.value==!0?"是":"否"),E.set("parameterIds",d.value==null?"":d.value);let pe;B.value=="0"?pe=await Gt(h):B.value=="1"&&(pe=await Qt(h)),pe.code==0&&(pe.status=="success"?(Y({message:"数据保存成功",type:"success"}),R.value=!1,g("getDataListParent"),e()):Re("数据保存失败确认",pe.msg)),t()}else t()})}),visibleChange:o=>{o?ge(()=>{f.value&&c.value.initTableData()}):f.value&&c.value.restTable()}});const be=a({headerBackground:!0,pageConfig:!1,editConfig:{trigger:"click",enable:!0,mode:"cell"},editRules:{parameterKey:[{required:!0,message:l(()=>i("参数key不能为空")),trigger:"blur"}],parameterType:[{required:!0,message:l(()=>i("参数类型不能为空")),trigger:"blur"}],required:[{required:!0,message:l(()=>i("是否必填不能为空")),trigger:"blur"}]},height:200,keepSource:!0,columns:[{type:"index",title:l(()=>i("序号")),width:80,fixed:"left"},{title:l(()=>i("参数key")),key:"parameterKey",editRender:{name:"input",useElement:!0}},{title:l(()=>i("参数类型")),key:"parameterType",editRender:{name:"select",useElement:!0,options:[{label:l(()=>i("String")),value:"String"},{label:l(()=>i("integer")),value:"integer"},{label:l(()=>i("double")),value:"double"},{label:l(()=>i("boolean")),value:"boolean"},{label:l(()=>i("number")),value:"number"}]}},{title:l(()=>i("是否必填")),key:"required",editRender:{name:"select",useElement:!0,options:[{value:"是",label:"是"},{value:"否",label:"否"}]}},{title:l(()=>i("参数描述")),key:"notes",editRender:{name:"input",useElement:!0}},{title:l(()=>i("操作")),width:100,fixed:"right",render:o=>{if(r.value)return U("div",[U("span",{onClick:()=>{xe(o.parameterStatus,o.id)},class:"operate"},i("删除"))])}}],tableData:[]}),ke=a({headerBackground:!0,pageConfig:!1,editConfig:{trigger:"click",enable:!0,mode:"cell"},height:200,editRules:{parameterKey:[{required:!0,message:l(()=>i("参数key不能为空")),trigger:"blur"}],parameterType:[{required:!0,message:l(()=>i("参数类型不能为空")),trigger:"blur"}],required:[{required:!0,message:l(()=>i("是否必填不能为空")),trigger:"blur"}]},keepSource:!0,columns:[{type:"index",title:l(()=>i("序号")),width:80,fixed:"left"},{title:l(()=>i("参数key")),key:"parameterKey",editRender:{name:"input",useElement:!0}},{title:l(()=>i("参数类型")),key:"parameterType",editRender:{name:"select",useElement:!0,options:[{label:l(()=>i("String")),value:"String"},{label:l(()=>i("integer")),value:"integer"},{label:l(()=>i("double")),value:"double"},{label:l(()=>i("boolean")),value:"boolean"},{label:l(()=>i("number")),value:"number"}]}},{title:l(()=>i("是否必填")),key:"required",editRender:{name:"select",useElement:!0,options:[{value:"是",label:"是"},{value:"否",label:"否"}]}},{title:l(()=>i("参数描述")),key:"notes",editRender:{name:"input",useElement:!0}},{title:l(()=>i("操作")),width:100,fixed:"right",render:o=>{if(r.value)return U("div",[U("span",{onClick:()=>{xe(o.parameterStatus,o.id)},class:"operate"},i("删除"))])}}],tableData:[]}),Ce=a({headerBackground:!0,pageConfig:!1,editConfig:{trigger:"click",enable:!0,mode:"cell",autoClear:!1},height:200,keepSource:!0,editRules:{parameterKey:[{required:!0,message:l(()=>i("参数key不能为空")),trigger:"blur"}],parameterType:[{required:!0,message:l(()=>i("参数类型不能为空")),trigger:"blur"}],required:[{required:!0,message:l(()=>i("是否必填不能为空")),trigger:"blur"}]},columns:[{type:"index",title:l(()=>i("序号")),width:80,fixed:"left"},{title:l(()=>i("参数key")),key:"parameterKey",editRender:{name:"input",useElement:!0}},{title:l(()=>i("参数类型")),key:"parameterType",editRender:{name:"select",useElement:!0,options:[{value:"String",label:"String"},{value:"int",label:"int"},{value:"boolean",label:"boolean"},{value:"double",label:"double"}]}},{title:l(()=>i("是否必填")),key:"required",editRender:{name:"select",useElement:!0,options:[{value:"是",label:"是"},{value:"否",label:"否"}]}},{title:l(()=>i("参数描述")),key:"notes",editRender:{name:"input",useElement:!0}},{title:l(()=>i("操作")),width:100,fixed:"right",render:o=>{if(r.value)return U("div",[U("span",{onClick:()=>{xe(o.parameterStatus,o.id)},class:"operate"},i("删除"))])}}],tableData:[]}),Ye=a({filtersValueCallBack:o=>{$.value=o},itemList:[{type:"slot",slotName:"slotBtns",span:24,justify:"flex-end"}],showBorder:!0});let de=a({model:{},rules:{interfaceName:[{required:!0,message:l(()=>i("接口名称不能为空")),trigger:"blur"},{validator:nt,trigger:"blur"}],interfaceUrl:[{required:!0,message:l(()=>i("接口调用地址不能为空")),trigger:"blur"},{validator:ye,trigger:"blur"}],interfaceType:[{required:!0,message:l(()=>i("接口类型不能为空")),trigger:"blur"}],interfaceMethod:[{required:!0,message:l(()=>i("请求方式不能为空")),trigger:"blur"}],networkAgreement:[{required:!0,message:l(()=>i("网络协议不能为空")),trigger:"blur"}],head:[{required:!0,message:l(()=>i("接口负责人不能为空")),trigger:"blur"}],headPhone:[{required:!0,message:l(()=>i("接口负责人联系方式不能为空")),trigger:"blur"},{validator:ut,trigger:"blur"}],deptInfo:[{required:!0,message:l(()=>i("接口负责单位不能为空")),trigger:"blur"}],isOverwrite:[{required:!0,message:l(()=>i("是否覆盖更新不能为空")),trigger:"blur"}],version:[{required:!0,message:l(()=>i("版本不能为空")),trigger:"blur"},{validator:rt,trigger:"blur"}],url:[{required:!0,message:l(()=>i("请输入链接地址")),trigger:"blur"},{validator:ye,trigger:"blur"}],illustrate:[{required:!0,message:l(()=>i("接口描述不能为空")),trigger:"blur"}]},itemList:[{type:"input",label:l(()=>i("接口名称")),prop:"interfaceName",props:{maxlength:100}},{type:"slot",label:l(()=>i("接口类型")),prop:"interfaceType",props:{slotName:"interfaceType"}},{type:"select",label:l(()=>i("网络协议")),prop:"networkAgreement",props:{options:[{label:l(()=>i("http")),value:"http"},{label:l(()=>i("https")),value:"https"}],events:{change:o=>{de.value.model=he.value.model;for(let e of de.value.itemList)e.prop=="interfaceUrl"&&(e.props.prependText=o+"://")}}}},{type:"input",label:l(()=>i("接口地址")),prop:"interfaceUrl",required:!0,props:{placeholder:"请输入接口地址例如www.baidu.com",maxlength:500,prependText:"http://"}},{type:"select",label:l(()=>i("请求方式")),prop:"interfaceMethod",props:{options:[{label:l(()=>i("get")),value:"get"},{label:l(()=>i("post")),value:"post"}],events:{change:o=>{W.value=o}}}},{type:"slot",label:l(()=>i("是否限流")),prop:"isLimit",props:{slotName:"isLimit"}},{type:"slot",label:l(()=>i("是否鉴权")),prop:"isLimit",props:{slotName:"isAuth"}},{type:"slot",label:l(()=>i("是否控制数据请求范围")),prop:"isLimitData",props:{slotName:"isLimitData"}},{type:"input",label:l(()=>i("接口负责人")),prop:"head",props:{maxlength:50}},{type:"input",label:l(()=>i("接口负责人联系方式")),prop:"headPhone",props:{placeholder:"请输入11位手机号",maxlength:11}},{type:"select",label:l(()=>i("接口负责人单位")),prop:"deptId",props:{maxlength:254,options:z.value,events:{change:o=>{de.value.model=he.value.model;let e={pid:o};de.value.model.systemId="",lt(e).then(t=>{S.value=[];for(let u of t.data){let I={label:u.name,value:u.id};S.value.push(I)}for(let u of de.value.itemList)u.prop=="systemId"&&(u.props.options=S.value)})}}}},{type:"select",label:l(()=>i("接口归属系统")),prop:"systemId",props:{maxlength:254,options:S.value}},{type:"input",label:l(()=>i("版本")),prop:"version",props:{placeholder:"请输入版本号。例如V1.1.1",maxlength:50}},{type:"textarea",label:l(()=>i("接口描述")),prop:"illustrate",props:{rows:3,maxlength:500}},{type:"slot",label:l(()=>i("请求头参数")),prop:"",props:{slotName:"parameterHeader"}},{type:"slot",label:l(()=>i("请求参数")),prop:"",props:{slotName:"parameter"}},{type:"slot",label:l(()=>i("返回参数")),prop:"",props:{slotName:"parameterResponse"}},{type:"textarea",label:l(()=>i("备注")),prop:"notes",props:{rows:3,maxlength:254}}],descriptionsFormConfig:{labelWidth:"200px",labelAlign:"center"}});function Ge(o){let e={id:""+Date.now(),parameterKey:"",parameterType:"",required:"",defaultVal:"",notes:"",parameterStatus:o,isItems:!1,pid:0,level:1};if(o==1){let t=Ie(o,!1);e.sort=t.length==0?1:t[t.length-1].sort+1,t.push(e),be.value.tableData=t}else if(o==2){let t=Ie(o,!1);e.sort=t.length==0?1:t[t.length-1].sort+1,t.push(e),ke.value.tableData=t}else if(o==3){let t=Ie(o,!1);t.push(e),Ce.value.tableData=t}}function Ie(o,e){let t=[],u=[];o==1?(t=O.value.vxeTableRef.getRecordset().updateRecords,u=be.value.tableData):o==2?(t=F.value.vxeTableRef.getRecordset().updateRecords,u=ke.value.tableData):o==3&&(t=x.value.vxeTableRef.getRecordset().updateRecords,u=Ce.value.tableData);let I=[],ae=0;for(let h of u)ae<t.length&&h.id==t[ae].id?(I.push(t[ae]),ae++):I.push(h);if(e){let h=1;for(let E of I){if(!je(E.parameterKey))return Y({type:"warning",message:(o==1?"请求头参数,":o==2?"请求参数,":o==3?"返回参数":"")+"第"+h+"行参数key不能为空"}),!1;if(!je(E.parameterType))return Y({type:"warning",message:(o==1?"请求头参数":o==2?"请求参数":o==3?"返回参数":"")+"第"+h+"行,参数类型不能为空"}),!1;if(!je(E.required))return Y({type:"warning",message:(o==1?"请求头参数":o==2?"请求参数":o==3?"返回参数":"")+"第"+h+"行,是否必填不能为空"}),!1;h++}}return I}function je(o){return!(o==null||o==null||o=="")}function xe(o,e){let t=[],u=[];if(o==1){t=Ie(o,!1);for(let I of t)I.id!=e&&u.push(I);be.value.tableData=u}else if(o==2){t=Ie(o,!1);for(let I of t)I.id!=e&&u.push(I);ke.value.tableData=u}else if(o==3){t=Ie(o,!1);for(let I of t)I.id!=e&&u.push(I);Ce.value.tableData=u}}function Qe(o){o==1?(T.value=!0,k.value=JSON.parse(JSON.stringify(C.value))):M.value=!0}function Ze(o){if(o==1)T.value=!1,k.value=JSON.parse(JSON.stringify(C.value));else if(o==2){_.value=!1;let e=JSON.parse(JSON.stringify(We.value));le.value.method=e.method,le.value.nameSpace=e.nameSpace,le.value.webSpecification=e.webSpecification}}function et(o){o==1?A.value.validate(e=>{if(e)T.value=!1,C.value=JSON.parse(JSON.stringify(k.value));else return!1}):o==2&&V.value.validate(e=>{if(e)_.value=!1,We.value=JSON.parse(JSON.stringify(le.value));else return!1})}async function pt(o,e){mt();let u=await Zt({id:o});de.value.model=u.data;for(let I of de.value.itemList)I.props==null?I.props={disabled:!0}:I.props.disabled=!0;dt(u.data),tt(u.data.parameters,!0),ft(u),s.value=!0,ue.isShow=e,ge(()=>{c.value.initTableData()})}function tt(o,e){let t=JSON.parse(o),u=[],I=[],ae=[];for(let E of t)E.parameterStatus=="1"&&u.push(E),E.parameterStatus=="2"&&I.push(E),E.parameterStatus=="3"&&ae.push(E);r.value=!e,be.value.editConfig=r.value?{trigger:"click",enable:!0,mode:"cell"}:!1,be.value.tableData=u,ke.value.editConfig=r.value?{trigger:"click",enable:!0,mode:"cell"}:!1,ke.value.tableData=I,Ce.value.editConfig=r.value?{trigger:"click",enable:!0,mode:"cell"}:!1,Ce.value.tableData=ae;let h=be.value.columns.length;if(r.value){let E={title:l(()=>i("操作")),width:100,fixed:"right",render:ee=>{if(r.value)return U("div",[U("span",{onClick:()=>{xe(ee.parameterStatus,ee.id)},class:"operate"},i("删除"))])}};h==5&&be.value.columns.push(E)}if(r.value){let E={title:l(()=>i("操作")),width:100,fixed:"right",render:ee=>{if(r.value)return U("div",[U("span",{onClick:()=>{xe(ee.parameterStatus,ee.id)},class:"operate"},i("删除"))])}};h==5&&ke.value.columns.push(E)}if(r.value){let E={title:l(()=>i("操作")),width:100,fixed:"right",render:ee=>{if(r.value)return U("div",[U("span",{onClick:()=>{xe(ee.parameterStatus,ee.id)},class:"operate"},i("删除"))])}};h==5&&Ce.value.columns.push(E)}r.value||h!=5&&(be.value.columns.pop(),ke.value.columns.pop(),Ce.value.columns.pop())}function ft(o){o.data.reqParameters!=null?b.value=JSON.parse(o.data.reqParameters):b.value=[],o.data.resParameters!=null?K.value=JSON.parse(o.data.resParameters):K.value=[]}function dt(o,e){if(o.isLimit=="是"?v.value=!0:v.value=!1,o.isAuth=="是"?w.value=!0:w.value=!1,o.isLimitData=="是"?f.value=!0:f.value=!1,o.deptId!=null&&o.deptId!=null&&o.systemId!=null&&o.systemId!=null){let t={pid:o.deptId};lt(t).then(u=>{S.value=[];for(let I of u.data){let ae={label:I.name,value:I.id};S.value.push(ae)}for(let I of de.value.itemList)I.prop=="systemId"&&(I.props.options=S.value)})}W.value=o.interfaceMethod,ne.value=o.interfaceType,k.value=JSON.parse(o.limitInfo),C.value=JSON.parse(o.limitInfo),d.value=o.parameterIds,P.value=o.id}function mt(){ne.value="Rest",k.value={thresholdType:"0",limitTime:"",limitCount:"",thresholdVal:"",effect:"1",waitTime:""},C.value={thresholdType:"0",limitTime:"",limitCount:"",thresholdVal:"",effect:"1",waitTime:""},d.value="",R.value=!0,B.value="0";let o=[];for(let e of de.value.itemList)e.prop!="isOverwrite"&&o.push(e);de.value.itemList=o}function Re(o,e){fe.alert(e,o,{confirmButtonText:"确认"})}function at(o,e){if(o!=null)for(let t of o)t.children instanceof Array&&at(t.children,e),e.push(t)}const vt=()=>{f.value&&ge(()=>{c.value.initTableData()})},ct=()=>{_.value=!0},Ne=o=>o==null||o==null||o=="";Bt({parameterType:0}).then(o=>{for(let e of o.data){let t={label:e.name,value:e.id};z.value.push(t)}});const gt=()=>{s.value=!1,c.value.restTable()};return Z({view:pt}),(o,e)=>{const t=qt,u=we("Warning"),I=At,ae=zt,h=Nt,E=Et,ee=Be,De=we("y9VxeTable"),j=Dt,Oe=we("y9Form"),Se=qe,Ee=Jt,pe=Pt,G=$t,He=Ft,Pe=Ct,Je=xt;return N(),Me(Ke,null,[p(Se,{modelValue:s.value,"onUpdate:modelValue":e[21]||(e[21]=D=>s.value=D),title:m.value,width:"60%"},{default:n(()=>[p(Oe,{ref_key:"ruleFormRef",ref:he,config:te(de)},{isLimit:n(()=>[p(t,{disabled:!r.value,modelValue:v.value,"onUpdate:modelValue":e[0]||(e[0]=D=>v.value=D),"active-text":"是","inactive-text":"否"},null,8,["disabled","modelValue"]),v.value?(N(),X(ae,{key:0,effect:"light",content:"点击配置限流信息",placement:"top-start"},{default:n(()=>[p(I,{class:"operate",onClick:e[1]||(e[1]=D=>Qe("1"))},{default:n(()=>[p(u)]),_:1})]),_:1})):ie("",!0)]),isAuth:n(()=>[p(t,{disabled:!r.value,modelValue:w.value,"onUpdate:modelValue":e[2]||(e[2]=D=>w.value=D),"active-text":"是","inactive-text":"否"},null,8,["disabled","modelValue"])]),isLimitData:n(()=>[p(t,{disabled:!r.value,modelValue:f.value,"onUpdate:modelValue":e[3]||(e[3]=D=>f.value=D),"active-text":"是","inactive-text":"否",onClick:vt},null,8,["disabled","modelValue"])]),interfaceType:n(()=>[p(E,{modelValue:ne.value,"onUpdate:modelValue":e[5]||(e[5]=D=>ne.value=D),disabled:!r.value},{default:n(()=>[p(h,{label:"Rest",value:"Rest"}),p(h,{label:"webService",value:"webService",onClick:e[4]||(e[4]=D=>ct())})]),_:1},8,["modelValue","disabled"])]),isOverwrite:n(()=>[p(E,{modelValue:Le.value,"onUpdate:modelValue":e[6]||(e[6]=D=>Le.value=D),onChange:e[7]||(e[7]=D=>{D=="Y"&&Re("覆盖更新确认","覆盖更新将会在接口审批通过后替换原接口")})},{default:n(()=>[p(h,{label:"否",value:"N"}),p(h,{label:"是",value:"Y"})]),_:1},8,["modelValue"])]),parameterHeader:n(()=>[p(De,{ref_key:"editRequestHeaderRef",ref:O,config:be.value,filterConfig:Ye.value},{slotBtns:n(()=>[r.value?(N(),X(ee,{key:0,size:te(y).buttonSize,style:Ue({fontSize:te(y).baseFontSize}),class:"global-btn-main",type:"primary",onClick:e[8]||(e[8]=D=>Ge("1"))},{default:n(()=>[J(ve(o.$t("新增")),1)]),_:1},8,["size","style"])):ie("",!0)]),_:1},8,["config","filterConfig"])]),parameter:n(()=>[ue.isShow?(N(),X(j,{key:0,"content-position":"left"},{default:n(()=>e[37]||(e[37]=[J("请求参数列表")])),_:1})):ie("",!0),W.value=="get"||ne.value!="Rest"?(N(),X(De,{key:1,ref_key:"editRequestRef",ref:F,config:ke.value,filterConfig:Ye.value},{slotBtns:n(()=>[r.value?(N(),X(ee,{key:0,size:te(y).buttonSize,style:Ue({fontSize:te(y).baseFontSize}),class:"global-btn-main",type:"primary",onClick:e[9]||(e[9]=D=>Ge("2"))},{default:n(()=>[J(ve(o.$t("新增")),1)]),_:1},8,["size","style"])):ie("",!0)]),_:1},8,["config","filterConfig"])):ie("",!0),W.value=="post"&&ne.value=="Rest"?(N(),X(_t,{key:2,ref_key:"requestParameterRef",ref:Ae,parameterStatus:Fe.value,"onUpdate:parameterStatus":e[10]||(e[10]=D=>Fe.value=D),data:b.value,"onUpdate:data":e[11]||(e[11]=D=>b.value=D),isView:r.value,"onUpdate:isView":e[12]||(e[12]=D=>r.value=D)},null,8,["parameterStatus","data","isView"])):ie("",!0),f.value?(N(),X(j,{key:3,"content-position":"left"},{default:n(()=>e[38]||(e[38]=[J("数据请求范围("),se("span",{style:{color:"red"}},"此处选中的参数需要在上方请求参数列表出现。不可选择相同参数key的参数",-1),J("")])),_:1})):ie("",!0),f.value?(N(),X(pa,{key:4,isView:r.value,"onUpdate:isView":e[13]||(e[13]=D=>r.value=D),isShow:ue.isShow,"onUpdate:isShow":e[14]||(e[14]=D=>ue.isShow=D),isDisabled:f.value,"onUpdate:isDisabled":e[15]||(e[15]=D=>f.value=D),ref_key:"authRef",ref:c,interfaceId:P.value,selectData:d.value,"onUpdate:selectData":e[16]||(e[16]=D=>d.value=D)},null,8,["isView","isShow","isDisabled","interfaceId","selectData"])):ie("",!0)]),parameterResponse:n(()=>[p(_t,{ref_key:"responseParameterRef",ref:Q,parameterStatus:L.value,"onUpdate:parameterStatus":e[17]||(e[17]=D=>L.value=D),data:K.value,"onUpdate:data":e[18]||(e[18]=D=>K.value=D),isView:r.value,"onUpdate:isView":e[19]||(e[19]=D=>r.value=D)},null,8,["parameterStatus","data","isView"])]),_:1},8,["config"])]),footer:n(()=>[p(ee,{onClick:e[20]||(e[20]=D=>gt())},{default:n(()=>e[39]||(e[39]=[J("关闭")])),_:1})]),_:1},8,["modelValue","title"]),p(Se,{modelValue:T.value,"onUpdate:modelValue":e[30]||(e[30]=D=>T.value=D),title:q.value},{footer:n(()=>[r.value?(N(),X(ee,{key:0,class:"el-button el-button--primary el-button--default global-btn-main",onClick:e[28]||(e[28]=D=>et("1"))},{default:n(()=>e[48]||(e[48]=[J("确定")])),_:1})):ie("",!0),p(ee,{onClick:e[29]||(e[29]=D=>Ze("1"))},{default:n(()=>e[49]||(e[49]=[J("取消")])),_:1})]),default:n(()=>[p(j),p(He,{ref_key:"limitInfoRef",ref:A,model:k.value,"label-width":"140px",rules:ze.value},{default:n(()=>[p(pe,{label:"阈值类型",prop:"thresholdType"},{default:n(()=>[p(E,{modelValue:k.value.thresholdType,"onUpdate:modelValue":e[22]||(e[22]=D=>k.value.thresholdType=D),disabled:!r.value},{default:n(()=>[p(Ee,{value:"0"},{default:n(()=>e[40]||(e[40]=[J("自定义")])),_:1}),p(Ee,{value:"1"},{default:n(()=>e[41]||(e[41]=[J("QPS")])),_:1})]),_:1},8,["modelValue","disabled"])]),_:1}),k.value.thresholdType==0?(N(),X(pe,{key:0,label:"限定时间",prop:"limitTime"},{default:n(()=>[p(G,{modelValue:k.value.limitTime,"onUpdate:modelValue":e[23]||(e[23]=D=>k.value.limitTime=D),disabled:!r.value,placeholder:"请输入,单位:秒",maxlength:"7"},{append:n(()=>e[42]||(e[42]=[J("秒")])),_:1},8,["modelValue","disabled"])]),_:1})):ie("",!0),k.value.thresholdType==0?(N(),X(pe,{key:1,label:"限定时间内访问量",prop:"limitCount"},{default:n(()=>[p(G,{modelValue:k.value.limitCount,"onUpdate:modelValue":e[24]||(e[24]=D=>k.value.limitCount=D),disabled:!r.value,placeholder:"请输入次数",maxlength:"7"},{append:n(()=>e[43]||(e[43]=[J("次数")])),_:1},8,["modelValue","disabled"])]),_:1})):ie("",!0),k.value.thresholdType==1?(N(),X(pe,{key:2,label:"阈值",prop:"thresholdVal"},{default:n(()=>[p(G,{modelValue:k.value.thresholdVal,"onUpdate:modelValue":e[25]||(e[25]=D=>k.value.thresholdVal=D),disabled:!r.value,placeholder:"请输入",maxlength:"7"},{append:n(()=>e[44]||(e[44]=[J("次数/秒")])),_:1},8,["modelValue","disabled"])]),_:1})):ie("",!0),p(pe,{label:"流控效果",prop:"effect"},{default:n(()=>[p(E,{modelValue:k.value.effect,"onUpdate:modelValue":e[26]||(e[26]=D=>k.value.effect=D),disabled:!r.value},{default:n(()=>[p(Ee,{value:"1"},{default:n(()=>e[45]||(e[45]=[J("快速失败")])),_:1}),p(Ee,{value:"3"},{default:n(()=>e[46]||(e[46]=[J("排队等候")])),_:1})]),_:1},8,["modelValue","disabled"])]),_:1}),k.value.effect==3?(N(),X(pe,{key:3,label:"超时时间",prop:"waitTime"},{default:n(()=>[p(G,{modelValue:k.value.waitTime,"onUpdate:modelValue":e[27]||(e[27]=D=>k.value.waitTime=D),disabled:!r.value,placeholder:"请输入,单位:毫秒",maxlength:"9"},{append:n(()=>e[47]||(e[47]=[J("毫秒")])),_:1},8,["modelValue","disabled"])]),_:1})):ie("",!0)]),_:1},8,["model","rules"])]),_:1},8,["modelValue","title"]),p(Se,{modelValue:_.value,"onUpdate:modelValue":e[36]||(e[36]=D=>_.value=D),title:H.value},{footer:n(()=>[r.value?(N(),X(ee,{key:0,class:"el-button el-button--primary el-button--default global-btn-main",onClick:e[34]||(e[34]=D=>et("2"))},{default:n(()=>e[50]||(e[50]=[J("确定")])),_:1})):ie("",!0),p(ee,{onClick:e[35]||(e[35]=D=>Ze("2"))},{default:n(()=>e[51]||(e[51]=[J("取消")])),_:1})]),default:n(()=>[p(j),p(He,{ref_key:"webServiceRef",ref:V,model:le.value,"label-width":"155px",rules:st.value},{default:n(()=>[p(pe,{label:"webService规范协议",prop:"webSpecification"},{default:n(()=>[p(Je,{modelValue:le.value.webSpecification,"onUpdate:modelValue":e[31]||(e[31]=D=>le.value.webSpecification=D),placeholder:"请选择webService规范协议",disabled:!r.value},{default:n(()=>[p(Pe,{label:"JAX-WS",value:"JAX-WS"}),p(Pe,{label:"JAX-RS",value:"JAX-RS"})]),_:1},8,["modelValue","disabled"])]),_:1}),le.value.webSpecification=="JAX-WS"?(N(),X(pe,{key:0,label:"命名空间",prop:"nameSpace"},{default:n(()=>[p(G,{modelValue:le.value.nameSpace,"onUpdate:modelValue":e[32]||(e[32]=D=>le.value.nameSpace=D),disabled:!r.value,placeholder:"请输入命名空间",maxlength:"300"},null,8,["modelValue","disabled"])]),_:1})):ie("",!0),le.value.webSpecification=="JAX-WS"?(N(),X(pe,{key:1,label:"调用方法名",prop:"method"},{default:n(()=>[p(G,{modelValue:le.value.method,"onUpdate:modelValue":e[33]||(e[33]=D=>le.value.method=D),disabled:!r.value,placeholder:"请输入调用方法名",maxlength:"300"},null,8,["modelValue","disabled"])]),_:1})):ie("",!0)]),_:1},8,["model","rules"])]),_:1},8,["modelValue","title"])],64)}}});const ha=Te(wa,[["__file","E:/workSpaceJDK11/y9-interface-platform/y9vue-interfacePlatform/src/views/interface/interfaceDialogApplyTable.vue"]]),ka=_e({__name:"interfaceApplyDialog",props:{openDialog:{type:Boolean,default:()=>!1},isView:{type:Boolean,default:()=>!1},interfaceId:{type:String},selectData:{type:String}},emits:["update:openDialog","update:selectData","getDataListParent"],setup(re,{expose:Z,emit:oe}){Ve();const y=a(!1),i=a(),$=a(),O=a(),F=a(),x=a(!1),A=a("否"),V=a(!1),_=a("变更申请"),H=oe;function T(m,v,f,w){V.value=!0,x.value=!1,v=="申请"&&wt({id:m}).then(r=>{ge(()=>{r.data.oldId=r.data.id,i.value=r.data.interfaceId,O.value.initFormData(r.data)})}),A.value=w,F.value=f}const q=()=>{if(F.value!="通过"){let m=s(),v=O.value.rtDialogRef();const f=v.y9RuleFormInstance;let w=v.ruleFormRef.model;f.validate(async d=>{if(d){try{A.value=="是"&&v.authDialogRef.getRuleForm().validate(R=>{if(!R){fe.alert("权限信息页面有必填项未填写,请打开页面确认!","权限信息必填确认",{confirmButtonText:"确认"}),m.close();return}})}catch{fe.alert("权限信息页面未选择,请打开页面确认!","权限信息必填确认",{confirmButtonText:"确认"}),m.close();return}let r=new FormData;for(let R in w)w[R]!=null&&R!="createTime"&&R!="updateTime"&&r.append(R,w[R]);r.delete("auth");let B={};for(let R in v.selectData){let c="";for(let L of v.selectData[R])c+=L+",";B[R]=c.substring(0,c.length-1)}r.append("auth",JSON.stringify(B)),w.auth=JSON.stringify(B),It(w).then(R=>{R.code==0&&(R.status=="success"?Y({message:"流程提交成功,等待审核,详细信息请移步到 个人中心>已申请接口 查看",type:"success",duration:6e3}):Y({message:""+R.msg,type:"success"}),H("getDataListParent"),V.value=!1),m.close()})}else m.close()})}else fe.confirm("是否想要变更申请信息,当前接口调用申请已经审批通过,点击“确定并提交”后需要重新审批","重新申请确认",{confirmButtonText:"确定",cancelButtonText:"取消",type:"info",draggable:!0}).then(()=>{let m=s(),v=O.value.rtDialogRef();const f=v.y9RuleFormInstance;let w=v.ruleFormRef.model;f.validate(async d=>{if(d){try{A.value=="是"&&v.authDialogRef.getRuleForm().validate(R=>{if(!R){fe.alert("权限信息页面有必填项未填写,请打开页面确认!","权限信息必填确认",{confirmButtonText:"确认"}),m.close();return}})}catch{fe.alert("权限信息页面未选择,请打开页面确认!","权限信息必填确认",{confirmButtonText:"确认"}),m.close();return}let r=new FormData;for(let R in w)w[R]!=null&&R!="createTime"&&R!="updateTime"&&r.append(R,w[R]);r.delete("auth");let B={};for(let R in v.selectData){let c="";for(let L of v.selectData[R])c+=L+",";B[R]=c.substring(0,c.length-1)}r.append("auth",JSON.stringify(B)),w.auth=JSON.stringify(B),It(w).then(R=>{R.code==0?(R.status=="success"?Y({message:"数据提交成功,等待审核,详细信息请移步到 个人中心>已申请接口 查看",type:"success",duration:6e3}):Y({message:""+R.msg,type:"success"}),H("getDataListParent"),m.close(),V.value=!1):m.close()})}else m.close()})}).catch(()=>{})},M=()=>{V.value=!1},P=(m,v)=>{V.value=!0,x.value=!0,A.value=v,i.value=m.interfaceId,ge(()=>{O.value.initFormData(m)})},s=()=>Mt.service({lock:!0,text:"Loading",background:"rgba(255, 255, 255, 0.7)"});return Z({openPubDialog:T,initFormData:P}),(m,v)=>{const f=Be,w=qe;return V.value?(N(),X(w,{key:0,modelValue:V.value,"onUpdate:modelValue":v[7]||(v[7]=d=>V.value=d),title:_.value},{default:n(()=>[p(ot,{ref_key:"applyInfoRef",ref:O,isView:x.value,"onUpdate:isView":v[0]||(v[0]=d=>x.value=d),"select-data":$.value,"onUpdate:selectData":v[1]||(v[1]=d=>$.value=d),"open-dialog":y.value,"onUpdate:openDialog":v[2]||(v[2]=d=>y.value=d),interfaceId:i.value,"onUpdate:interfaceId":v[3]||(v[3]=d=>i.value=d),isAuth:A.value,"onUpdate:isAuth":v[4]||(v[4]=d=>A.value=d)},null,8,["isView","select-data","open-dialog","interfaceId","isAuth"])]),footer:n(()=>[p(f,{class:"el-button el-button--primary el-button--default global-btn-main",onClick:v[5]||(v[5]=d=>q())},{default:n(()=>v[8]||(v[8]=[J("确定并提交")])),_:1}),p(f,{onClick:v[6]||(v[6]=d=>M())},{default:n(()=>v[9]||(v[9]=[J("取消")])),_:1})]),_:1},8,["modelValue","title"])):ie("",!0)}}});const Ia=Te(ka,[["__file","E:/workSpaceJDK11/y9-interface-platform/y9vue-interfacePlatform/src/views/interface/interfaceApplyDialog.vue"]]),Ra=_e({__name:"authApplyInfo",props:{openDialog:{type:Boolean,default:()=>!1},isView:{type:Boolean,default:()=>!1},interfaceId:{type:String},selectData:{type:String}},emits:["update:openDialog","update:selectData","getDataListParent"],setup(re,{expose:Z,emit:oe}){const{t:y}=Ve(),i=a(!1),$=a(),O=a(),F=a(),x=a(!0),A=a(),V=a(""),_=a("是"),H=re,T=a(!1),q=a("查看申请信息");let M=a({model:{interfaceId:H.interfaceId,applyStopTime:"",applyTime:""},rules:{applyReason:[{required:!0,message:l(()=>y("申请事由不能为空")),trigger:"blur"}],systemIdentifier:[{required:!0,message:l(()=>y("申请事由不能为空")),trigger:"blur"}],ipWhitelist:[{required:!0,message:l(()=>y("IP名单不能为空")),trigger:"blur"}],applyTime:[{required:!0,message:l(()=>y("申请日期不能为空")),trigger:"blur"}],applyPersonDeptName:[{required:!0,message:l(()=>y("接口调用单位名称不能为空")),trigger:"blur"}],usePersonResponsible:[{required:!0,message:l(()=>y("接口调用责任人不能为空")),trigger:"blur"}],usePersonResponsiblePhone:[{required:!0,message:l(()=>y("责任人联系方式不能为空")),trigger:"blur"}]},itemList:[{type:"input",label:l(()=>y("用户令牌")),prop:"userKey",props:{disabled:!0}},{type:"slot",label:l(()=>y("用户密钥")),props:{slotName:"openAuthDialog"}}],descriptionsFormConfig:{labelWidth:"200px",labelAlign:"center"}});function P(w,d,r,B){$.value=w,T.value=!0;debugger;d=="申请"?St({id:w}).then(c=>{M.value.model=c.data,ge(()=>{F.value.initFormData(c.data)})}):wt({id:w}).then(c=>{M.value.model=c.data,$.value=c.data.interfaceId,ge(()=>{F.value.initFormData(c.data)})}),_.value=B,V.value=r??""}const s=w=>{T.value=!0,$.value=w.interfaceId,ge(()=>{F.value.initFormData(w)})};function m(){T.value=!1}function v(){F.value.resetFormData()}const f=()=>{let w={id:M.value.model.id};oa(w).then(d=>{console.log(d);const r=document.createElement("a");r.href=URL.createObjectURL(d),r.download=V.value+"_密钥.txt",r.click()})};return Z({openPubDialog:P,initFormData:s}),(w,d)=>{const r=Be,B=we("y9Form"),R=Dt,c=Kt,L=qe;return T.value?(N(),X(L,{key:0,modelValue:T.value,"onUpdate:modelValue":d[5]||(d[5]=Q=>T.value=Q),title:q.value,onClosed:v},{footer:n(()=>[p(r,{class:"el-button el-button--primary el-button--default global-btn-main",onClick:m},{default:n(()=>d[8]||(d[8]=[J("确定")])),_:1}),p(r,{onClick:m},{default:n(()=>d[9]||(d[9]=[J("取消")])),_:1})]),default:n(()=>[p(c,{height:"600px"},{default:n(()=>[p(B,{ref:"ruleFormRef",config:te(M)},{openAuthDialog:n(()=>[se("span",null,ve(te(M).model.userSecret),1),p(r,{style:{"margin-left":"10px"},onClick:f},{default:n(()=>d[6]||(d[6]=[J("点击下载密钥")])),_:1}),se("a",{style:{display:"none"},ref_key:"secretRef",ref:A},null,512)]),_:1},8,["config"]),p(R,{"content-position":"left"},{default:n(()=>d[7]||(d[7]=[se("span",{style:{"font-size":"16px"}},"申请信息",-1)])),_:1}),p(ot,{ref_key:"applyInfoRef",ref:F,isView:x.value,"onUpdate:isView":d[0]||(d[0]=Q=>x.value=Q),"select-data":O.value,"onUpdate:selectData":d[1]||(d[1]=Q=>O.value=Q),"open-dialog":i.value,"onUpdate:openDialog":d[2]||(d[2]=Q=>i.value=Q),interfaceId:$.value,"onUpdate:interfaceId":d[3]||(d[3]=Q=>$.value=Q),isAuth:_.value,"onUpdate:isAuth":d[4]||(d[4]=Q=>_.value=Q)},null,8,["isView","select-data","open-dialog","interfaceId","isAuth"])]),_:1})]),_:1},8,["modelValue","title"])):ie("",!0)}}});const Va=Te(Ra,[["__file","E:/workSpaceJDK11/y9-interface-platform/y9vue-interfacePlatform/src/views/interface/authApplyInfo.vue"]]),_a=_e({__name:"interfaceApplyTable",props:{openDialog:{type:Boolean,default:()=>!1},isView:{type:Boolean,default:()=>!1},interfaceId:{type:String},selectData:{type:String}},emits:["update:openDialog","update:selectData","getDataListParent"],setup(re,{expose:Z,emit:oe}){const{t:y}=Ve(),i=Xe("sizeObjInfo"),$=it(),O=a(),F=a(),x=a(),A=a({}),V=a("申请详情"),_=a(!1),H=a(),T=a(!0),q=a(!1),M=a(),P=a(!1),s=a(),m=a(),v=a(),f=a(),w=a("");function d(S){let g=[],k=U("span",{class:"operate",onClick:()=>{Le(S.id)}},y("详情")),ue=U("span",{class:"operate",onClick:()=>{K(S.id,"")}},y("详情")),ce=U("span",{class:"leftMargin operate",onClick:()=>{b(S.interfaceId)}},y("接口详情")),C=U("span",{class:"leftMargin operate",onClick:()=>{W(S.id,"申请",S.approveStatus,S.isAuth)}},y("变更申请"));U("span",{class:"leftMargin operate",onClick:()=>{z(S.approveId)}},y("审批进度"));let ze=U("span",{class:"leftMargin operate",onClick:()=>{z(S.approveId)}},y("审批详情"));return S.approveStatus=="通过"?(g.push(ue),g.push(C),g.push(ce),g.push(ze)):S.approveStatus=="不通过"?(g.push(k),g.push(C),g.push(ze)):g.push(k),g}let r=a({headerBackground:!0,pageConfig:{background:!1,currentPage:1,pageSize:10,total:0},columns:[{type:"index",title:l(()=>y("序号")),width:80,fixed:"left"},{title:l(()=>y("申请事由")),key:"applyReason"},{title:l(()=>y("申请人名称")),key:"applyPersonName"},{title:l(()=>y("申请时间")),key:"createTime"},{title:l(()=>y("审批状态")),key:"approveStatus"},{title:l(()=>y("操作")),width:260,fixed:"right",render:S=>{let g=[];return g=d(S),U("div",g)}}],tableData:[]});a({filtersValueCallBack:S=>{A.value=S},itemList:[{type:"input",value:"",key:"interfaceName",label:l(()=>y("接口名称")),labelWidth:"82px",span:$.device==="mobile"?24:6},{type:"slot",slotName:"slotSearch",span:6},{type:"slot",slotName:"slotBtns",span:$.device==="mobile"?24:12,justify:"flex-end"}],showBorder:!0});async function B(){r.value.loading=!0,A.value.page=r.value.pageConfig.currentPage,A.value.limit=r.value.pageConfig.pageSize;let S;S=await sa(A.value),r.value.tableData=S.data||[],r.value.pageConfig.total=S.count||0,r.value.loading=!1}function R(S){r.value.tableData=[],r.value.pageConfig.pageSize=S,B()}function c(S){r.value.tableData=[],r.value.pageConfig.currentPage=S,B()}function L(){r.value.pageConfig.currentPage=1,r.value.pageConfig.pageSize=10,r.value.tableData=[],B()}function Q(){O.value.elTableFilterRef.onReset(),r.value.pageConfig.currentPage=1,r.value.pageConfig.pageSize=10,r.value.tableData=[],A.value={},B()}function Fe(S){_.value=!1}function Ae(S){_.value=!1}function ne(S,g,k){A.value.id=S,_.value=!0,q.value=g,w.value=k,B()}const Le=S=>{wt({id:S}).then(k=>{x.value.initFormData(k.data,q.value)})};function K(S,g,k,ue){f.value.openPubDialog(S,g,w.value,q.value)}function b(S){M.value.view(S,!1)}function W(S,g,k,ue){F.value.openPubDialog(S,g,k,q.value)}function z(S){P.value=!0,s.value=S,m.value=!1,v.value=!0}return Z({openPubDialog:ne}),(S,g)=>{const k=Be,ue=we("y9Table"),ce=qe;return N(),Me(Ke,null,[p(ce,{modelValue:_.value,"onUpdate:modelValue":g[2]||(g[2]=C=>_.value=C),title:V.value,width:"55%"},{footer:n(()=>[p(k,{class:"el-button el-button--primary el-button--default global-btn-main",onClick:g[0]||(g[0]=C=>Ae("1"))},{default:n(()=>g[9]||(g[9]=[J("确定")])),_:1}),p(k,{onClick:g[1]||(g[1]=C=>Fe("1"))},{default:n(()=>g[10]||(g[10]=[J("取消")])),_:1})]),default:n(()=>[p(ue,{config:te(r),onOnCurrPageChange:c,ref_key:"filterRef",ref:O,onOnPageSizeChange:R},{slotSearch:n(()=>[p(k,{size:te(i).buttonSize,style:Ue({fontSize:te(i).baseFontSize}),class:"global-btn-main",type:"primary",onClick:L},{default:n(()=>[J(ve(S.$t("查询")),1)]),_:1},8,["size","style"]),p(k,{size:te(i).buttonSize,style:Ue({fontSize:te(i).baseFontSize}),class:"el-button el-button--default global-btn-third",onClick:Q},{default:n(()=>[J(ve(S.$t("重置")),1)]),_:1},8,["size","style"])]),_:1},8,["config"])]),_:1},8,["modelValue","title"]),p(Sa,{ref_key:"interfaceApplyInfoRef",ref:x,isView:H.value,"onUpdate:isView":g[3]||(g[3]=C=>H.value=C)},null,8,["isView"]),p(ha,{ref_key:"interfaceDialogRef",ref:M,isShow:T.value,"onUpdate:isShow":g[4]||(g[4]=C=>T.value=C)},null,8,["isShow"]),p(Ia,{ref_key:"interfaceApplyRef",ref:F,onGetDataListParent:B},null,512),p(Lt,{ref:"flowShowRef","open-dialog":P.value,"onUpdate:openDialog":g[5]||(g[5]=C=>P.value=C),interfaceId:s.value,"onUpdate:interfaceId":g[6]||(g[6]=C=>s.value=C),type:m.value,"onUpdate:type":g[7]||(g[7]=C=>m.value=C),applyType:v.value,"onUpdate:applyType":g[8]||(g[8]=C=>v.value=C)},null,8,["open-dialog","interfaceId","type","applyType"]),p(Va,{ref_key:"authApplyInfoRef",ref:f},null,512)],64)}}});const Ta=Te(_a,[["__file","E:/workSpaceJDK11/y9-interface-platform/y9vue-interfacePlatform/src/views/interface/interfaceApplyTable.vue"]]),Ca={class:"btnDiv"},xa={class:"el-upload__tip"},Pa=["src","height"],Fa=_e({__name:"index",props:{status:{type:String,default:()=>"其他"}},setup(re){const Z=Xe("sizeObjInfo"),oe=it(),y=jt.getObjectItem(fa.siteTokenKey,"access_token"),i=a({});y&&(i.value={Authorization:"Bearer "+y});const $=a("http://localhost:7055/interfacePlatform/api/rest/interface/uploadInterface"),O=a("http://localhost:7055/interfacePlatform/"),F=a(!1),x=a("导入"),A=a(".zip,.json"),V=a("zip/json 格式的文件不超过10MB。"),_=a(10),H=a(!0),T=a({isOverWrite:H.value}),q=a(),M=a(!1),P=a(!1);ua();const{t:s}=Ve(),m=a({}),v=a(),f=a(),w=a(),d=a(),r=a(),B=a(),R=a(),c=a(!1),L=a(),Q=a(!0),Fe=a(),Ae=a(),ne=a(!1),Le=a("835px"),K=a(),b=re,W=a(!0),z=a(!0),S=a([]),g=[{type:"index",title:l(()=>s("序号")),width:80,fixed:"left"},{title:l(()=>s("接口名称")),key:"interfaceName",sortable:!0},{title:l(()=>s("接口类型")),key:"interfaceType",sortable:!0}];if(b.status!="申请"&&b.status!="发布"){let e={type:"selection",width:60};g.unshift(e),g.push({title:l(()=>s("接口状态")),key:"interfaceStatus",sortable:!0,render:t=>{let u="successText";return t.interfaceStatus=="发布"?u="successText":t.interfaceStatus=="停用"?u="stopText":u="otherText",U("div",{class:u},s(t.interfaceStatus))}}),g.push({title:l(()=>s("审核状态")),key:"approveStatus",render:t=>t.approveStatus.indexOf("不通过")!="-1"?U("div","不通过"):U("div",t.approveStatus),sortable:!0})}const k=[{title:l(()=>s("请求方式")),key:"interfaceMethod",sortable:!0},{title:l(()=>s("是否限流")),key:"isLimit",sortable:!0},{title:l(()=>s("是否鉴权")),key:"isAuth",sortable:!0},{title:l(()=>s("接口说明")),key:"illustrate"},{title:l(()=>s("版本")),key:"version"},{title:l(()=>s("备注")),key:"notes"}];let ue={title:l(()=>s("接口文档操作")),width:110,fixed:"right",render:e=>{let t=[],u=U("span",{class:"operate",onClick:()=>{kt(e.id)}},s("上传")),I=U("span",{class:"leftMargin operate",onClick:()=>{gt(e.interfaceFileUrl,e.id)}},s("预览"));return b.status!="发布"&&b.status!="申请"&&t.push(u),t.push(I),U("div",t)}},ce={title:l(()=>s("操作")),width:b.status=="发布"||b.status=="申请"?120:240,fixed:"right",render:e=>{let t=[];return t=ze(e),U("div",t)}};for(let e of k)g.push(e);b.status!="发布"&&g.push(ue),g.push(ce);let C=a({headerBackground:!0,pageConfig:{background:!1,currentPage:1,pageSize:15,total:0,pageSizeOpts:[5,10,15,20,30,40,1e3]},columns:g,tableData:[]});function ze(e){let t=[],u=U("span",{class:"operate",onClick:()=>{de(e.id)}},s("详情")),I=U("span",{class:"leftMargin operate",onClick:()=>{Ce(e.id)}},s("编辑")),ae=U("span",{class:"leftMargin operate",onClick:()=>{Ie(e.id)}},s("删除")),h=U("span",{class:"leftMargin operate",onClick:()=>{xe(e.id,"发布",e.interfaceFileUrl)}},s("发布")),E=U("span",{class:"leftMargin operate",onClick:()=>{xe(e.id,"停用")}},s("停用")),ee=U("span",{class:"leftMargin operate",onClick:()=>{Ye(e.id)}},s("版本升级维护"));U("span",{class:"leftMargin operate",onClick:()=>{tt(e.id)}},s("审批进度"));let De=U("span",{class:"leftMargin operate",onClick:()=>{tt(e.id)}},s("审批详情")),j=U("span",{class:"leftMargin operate",onClick:()=>{Qe(e.id,"",e.isLimitData)}},s("申请"));U("span",{class:"leftMargin operate",onClick:()=>{et(e.id,"申请",e.approveStatus,e.isLimitData)}},s("变更申请"));let Oe=U("span",{class:"leftMargin operate",onClick:()=>{Ze(e.id,e.isLimitData,e.interfaceName)}},s("申请详情"));return U("span",{class:"leftMargin operate",onClick:()=>{Ge(e.id)}},s("接口详情")),U("span",{class:"leftMargin operate",onClick:()=>{pt(e.id,"申请",e.interfaceName,e.isLimitData)}},s("申请详情")),b.status=="发布"?t.push(j):b.status=="申请"?t.push(Oe):e.interfaceStatus=="待发布"&&e.approveStatus=="未提交"?(t.push(u),t.push(I),t.push(ae),t.push(h)):e.interfaceStatus=="待发布"&&e.approveStatus=="未审批"||e.interfaceStatus=="发布"&&e.approveStatus=="未审批"?t.push(u):e.interfaceStatus=="发布"?(t.push(u),t.push(De),t.push(ee),t.push(E)):e.interfaceStatus=="待发布"&&e.approveStatus.indexOf("不通过")!=-1||e.interfaceStatus=="停用"?(t.push(u),t.push(De),t.push(h),t.push(I)):t.push(u),t}const We=[{type:"input",value:"",key:"interfaceName",label:l(()=>s("接口名称")),labelWidth:"62px",span:oe.device==="mobile"?24:b.status=="发布"||b.status=="申请"?4:3},{type:"select",value:"",key:"interfaceType",label:l(()=>s("接口类型")),labelWidth:"62px",span:oe.device==="mobile"?24:b.status=="发布"||b.status=="申请"?4:3,props:{options:[{label:"webService",value:"webService"},{label:"Rest",value:"Rest"}]}}];let le=[{type:"select",value:"",key:"interfaceMethod",label:l(()=>s("请求方式")),labelWidth:"62px",span:oe.device==="mobile"?24:b.status=="发布"||b.status=="申请"?4:3,props:{options:[{label:"get",value:"get"},{label:"post",value:"post"}]}},{type:"select",value:"",key:"isLimit",label:l(()=>s("是否限流")),labelWidth:"62px",span:oe.device==="mobile"?24:b.status=="发布"||b.status=="申请"?4:3,props:{options:[{label:"是",value:"是"},{label:"否",value:"否"}]}},{type:"select",value:"",key:"isAuth",label:l(()=>s("是否鉴权")),labelWidth:"62px",span:oe.device==="mobile"?24:b.status=="发布"||b.status=="申请"?4:3,props:{options:[{label:"是",value:"是"},{label:"否",value:"否"}]}},{type:"slot",slotName:"slotSearch",span:oe.device==="mobile"?24:b.status=="发布"||b.status=="申请"?3:6},{type:"slot",slotName:"slotBtns",span:3}];for(let e of le)We.push(e);const st=a({filtersValueCallBack:e=>{m.value=e},itemList:We,showBorder:!0,borderRadio:"4px"}),he=()=>{ye()};async function ye(){C.value.loading=!0,m.value.page=C.value.pageConfig.currentPage,m.value.limit=C.value.pageConfig.pageSize;let e;b.status=="发布"?(m.value.mayApply=b.status,e=await ta(m.value)):b.status=="申请"?(m.value.mayApply=b.status,e=await aa(m.value)):(b.status=="已发布"?m.value.interfaceStatus="发布":m.value.interfaceStatus=b.status,e=await la(m.value)),C.value.tableData=e.data||[],C.value.pageConfig.total=e.count||0,C.value.loading=!1}function nt(e){C.value.tableData=[],C.value.pageConfig.pageSize=e,ye()}function rt(e){C.value.tableData=[],C.value.pageConfig.currentPage=e,ye()}function ut(){C.value.pageConfig.currentPage=1,C.value.pageConfig.pageSize=15,C.value.tableData=[],ye()}function be(){v.value.elTableFilterRef.onReset(),C.value.pageConfig.currentPage=1,C.value.pageConfig.pageSize=15,C.value.tableData=[],m.value={},ye()}function ke(){C.value.pageConfig.currentPage=1,C.value.pageConfig.pageSize=15,C.value.tableData=[],ye()}ke();async function Ce(e){r.value.edit(e)}async function Ye(e){r.value.updateVersion(e)}async function de(e){Q.value=!0,r.value.view(e,!0)}function Ge(e){Q.value=!1,r.value.view(e,!1)}const Ie=e=>{fe.confirm("是否确认删除这条数据","删除数据确认",{confirmButtonText:"确定",cancelButtonText:"取消",type:"info",draggable:!0}).then(()=>{je(e)}).catch(()=>{})};async function je(e){let u=await ea({id:e});u.status=="success"?Y({type:"info",message:"删除成功"}):Y({type:"warning",message:u.msg}),ye()}function xe(e,t,u){t=="发布"?u!=null&&u!=null&&u!=""?f.value.openPubDialog(e,t):Y({type:"warning",message:"未上传接口文档无法发布!"}):f.value.openPubDialog(e,t)}function Qe(e,t,u){d.value.openPubDialog(e,t,"",u)}function Ze(e,t,u){B.value.openPubDialog(e,t,u)}function et(e,t,u,I){u=="高院审批通过"?d.value.openPubDialog(e,t,u,I):Qe(e,t,I)}function pt(e,t,u,I){R.value.openPubDialog(e,t,u,I)}function tt(e){c.value=!0,L.value=e,W.value=!0,b.status=="申请"?z.value=!0:z.value=!1}const ft=()=>{if(S.value.length==0){Y({type:"warning",message:"未选择导出项"});return}let e="";for(let u of S.value)e+=u.id+",";let t={ids:e.substring(0,e.length-1)};ia(t).then(u=>{const I=document.createElement("a");I.href=URL.createObjectURL(u),I.download="接口信息导出.zip",I.click()})},dt=()=>{T.value={isOverWrite:H.value},$.value=O.value+"api/rest/interface/uploadInterface",x.value="导入",A.value=".zip,.json",V.value="zip/json 格式的文件不超过10MB。",_.value=10,F.value=!0},mt=()=>{if(!P.value){Y({type:"warning",message:"未选择文件"});return}M.value=!0,w.value.submit(),P.value=!1},Re=()=>{F.value=!1,q.value=[],P.value=!1},at=e=>{console.log(e.length),e?P.value=!0:P.value=!1},vt=()=>{P.value=!1},ct=e=>{const t=e.size/1024/1024/1024<_.value;return t||Y({type:"warning",message:"上传的文件大小不能超过 "+_.value+" MB!"}),t},Ne=(e,t,u)=>{F.value=!1,M.value=!1,q.value=[],e.status==!0?(Y({type:"success",message:x.value+"成功!"}),ye()):Y({type:"warning",message:x.value+"失败!"+e.msg})},kt=e=>{T.value={interfaceId:e},$.value=O.value+"api/rest/interface/uploadInterfaceFile",x.value="上传接口文档",A.value=".pdf",V.value="pdf 格式的文件不超过100MB。",_.value=100,F.value=!0},gt=(e,t)=>{e!=null&&e!=null&&e!=""?b.status=="发布"||b.status=="申请"?na({id:t}).then(I=>{I.isPass?Rt(e).then(ae=>{const h=[];h.push(ae);const E=window.URL.createObjectURL(new Blob(h,{type:"application/pdf"}));window.open(E)}):Y({type:"warning",message:"您所申请的接口调用申请尚未通过,暂无法查看接口文档!"})}):Rt(e).then(u=>{const I=[];I.push(u);const ae=window.URL.createObjectURL(new Blob(I,{type:"application/pdf"}));window.open(ae)}):Y({type:"warning",message:"未上传接口文档,无法预览!"})},o=()=>{ne.value=!1};return(e,t)=>{const u=Be,I=we("y9Table"),ae=we("upload-filled"),h=At,E=Wt,ee=qe,De=bt;return N(),Me(Ke,null,[p(I,{config:te(C),filterConfig:st.value,onOnCurrPageChange:rt,ref_key:"filterRef",ref:v,onOnPageSizeChange:nt,selectedVal:S.value,"onUpdate:selectedVal":t[0]||(t[0]=j=>S.value=j)},{slotSearch:n(()=>[p(u,{size:te(Z).buttonSize,style:Ue({fontSize:te(Z).baseFontSize}),class:"global-btn-main",type:"primary",onClick:ut},{default:n(()=>[t[11]||(t[11]=se("i",{class:"ri-search-line"},null,-1)),se("span",null,ve(e.$t("搜索")),1)]),_:1},8,["size","style"]),p(u,{size:te(Z).buttonSize,style:Ue({fontSize:te(Z).baseFontSize}),class:"el-button el-button--default global-btn-third",onClick:be},{default:n(()=>[t[12]||(t[12]=se("i",{class:"ri-refresh-line"},null,-1)),se("span",null,ve(e.$t("重置")),1)]),_:1},8,["size","style"])]),slotBtns:n(()=>[se("div",Ca,[b.status=="待发布"?(N(),X(u,{key:0,size:te(Z).buttonSize,style:Ue({fontSize:te(Z).baseFontSize}),class:"global-btn-main",type:"primary",onClick:dt},{default:n(()=>[t[13]||(t[13]=se("i",{class:"ri-download-2-line"},null,-1)),se("span",null,ve(e.$t("导入")),1)]),_:1},8,["size","style"])):ie("",!0),b.status!="发布"&&b.status!="申请"?(N(),X(u,{key:1,size:te(Z).buttonSize,style:Ue({fontSize:te(Z).baseFontSize}),class:"global-btn-main",type:"primary",onClick:ft},{default:n(()=>[t[14]||(t[14]=se("i",{class:"ri-upload-2-line"},null,-1)),se("span",null,ve(e.$t("导出")),1)]),_:1},8,["size","style"])):ie("",!0)])]),_:1},8,["config","filterConfig","selectedVal"]),p(ma,{ref_key:"pubOrStopRef",ref:f,onGetDataListParent:he},null,512),p(ba,{ref_key:"interfaceApplyRef",ref:d,onGetDataListParent:he},null,512),p(Lt,{ref:"flowShowRef","open-dialog":c.value,"onUpdate:openDialog":t[1]||(t[1]=j=>c.value=j),interfaceId:L.value,"onUpdate:interfaceId":t[2]||(t[2]=j=>L.value=j),type:W.value,"onUpdate:type":t[3]||(t[3]=j=>W.value=j),applyType:z.value,"onUpdate:applyType":t[4]||(t[4]=j=>z.value=j)},null,8,["open-dialog","interfaceId","type","applyType"]),p(ra,{ref_key:"interfaceDialogRef",ref:r,onGetDataListParent:he,isShow:Q.value,"onUpdate:isShow":t[5]||(t[5]=j=>Q.value=j)},null,8,["isShow"]),p(Ta,{ref_key:"interfaceApplyTableRef",ref:B},null,512),p(ee,{modelValue:F.value,"onUpdate:modelValue":t[8]||(t[8]=j=>F.value=j),title:x.value},{footer:n(()=>[ht((N(),X(u,{class:"el-button el-button--primary el-button--default global-btn-main",onClick:t[6]||(t[6]=j=>mt())},{default:n(()=>[se("span",null,ve(e.$t("保存")),1)]),_:1})),[[De,M.value,void 0,{fullscreen:!0,lock:!0}]]),p(u,{onClick:t[7]||(t[7]=j=>Re())},{default:n(()=>[se("span",null,ve(e.$t("关闭")),1)]),_:1})]),default:n(()=>[p(E,{ref_key:"uploadRef",ref:w,data:T.value,class:"upload-demo","on-success":Ne,"file-list":q.value,"on-change":at,"on-remove":vt,drag:"",action:$.value,"auto-upload":!1,limit:1,accept:A.value,"before-upload":ct,headers:i.value},{tip:n(()=>[se("div",xa,ve(V.value),1)]),default:n(()=>[p(h,{class:"el-icon--upload"},{default:n(()=>[p(ae)]),_:1}),t[15]||(t[15]=se("div",{class:"el-upload__text"},[J(" 拖拽上传或者"),se("em",null,"点击上传文件")],-1))]),_:1},8,["data","file-list","action","accept","headers"])]),_:1},8,["modelValue","title"]),p(ee,{modelValue:ne.value,"onUpdate:modelValue":t[10]||(t[10]=j=>ne.value=j),title:x.value,width:"70%",class:"dialog",ref_key:"previewDialogRef",ref:K},{footer:n(()=>[p(u,{onClick:t[9]||(t[9]=j=>o())},{default:n(()=>t[16]||(t[16]=[J("关闭")])),_:1})]),default:n(()=>[se("iframe",{src:Fe.value,frameborder:"0",width:"100%",height:Le.value,ref_key:"myIframeRef",ref:Ae},null,8,Pa)]),_:1},8,["modelValue","title"])],64)}}});const Dl=Te(Fa,[["__file","E:/workSpaceJDK11/y9-interface-platform/y9vue-interfacePlatform/src/views/interface/index.vue"]]);export{Dl as default};