import{_ as O,bv as he,eq as Ie,a1 as P,Z as z,a2 as H,r as c,$ as B,a5 as j,bO as re}from"./index-design-C8wrC2s6.js";/* empty css                    */import{B as se}from"./business-rule-CBB7P4Sp.js";import{h as ge}from"./html2canvas.esm-CZQHL5t-.js";import{d as q,v as Y,k as K,_ as ye,u as X,A as J,B as Q,a1 as W,t as Fe,s as x,l as ee,m as te,D as de,F as ie,e as be,a7 as we,C as ce}from"./element-plus-DXXGg0hD.js";import{X as f,O as i,Y as l,R as h,a1 as M,U as _,P as Z,ab as s,M as p,d as G,ao as R,a4 as o,V as A,af as T,$ as U,_ as w,a2 as Ce}from"./vue-BQyCGvUQ.js";import{i as ve,b as Ne,c as ke,e as $e,f as _e,h as Ue,j as Ve,k as Le}from"./index-CZf8SC2y.js";import{E as Se}from"./enable-op-config-ExoIOXkh.js";const oe=`
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link rel="stylesheet" href="./form-engine-env/assets/form-engine.css" />
    <script src="./form-engine-env/vue@2.7.14.js"><\/script>
    <script src="./form-engine-env/assets/form-engine.umd.min.js"><\/script>
    <title>Document</title>
  </head>
  <body>
    <div id="app">
      <form-engine :load-x-m-l-config="loadXMLConfig" :local-mode="localMode" :xml-data="xmlData"></form-engine>
    </div>
    <script src="./form-engine-env/insideInitHandler.js"><\/script>
  </body>
</html>
`,Ee=new Ie,De={name:"form-engine-preview",model:{event:"toggle",prop:"showFlag"},data(){return{loading:!0,xmlRawData:"",previewAreaNode:null,testVal:!1}},props:{showFlag:!1,loadParams:{type:Object,default:()=>({})},title:{type:String,default:""},enableDownloadShot:{type:Boolean,default:!1}},mounted(){window.addEventListener("message",e=>{const t={changeHeight:()=>this.$refs.FormEngine.style.height=e.data.params.height+20+"px",insideLoadFinish:()=>{this.loading=!1,this.$refs.FormEngine.contentWindow.postMessage({eventName:"renderXML",xmlData:Ee.xml2js(this.xmlRawData)},"*")}};t[e.data?.eventName]&&t[e.data.eventName]()})},computed:{},watch:{xmlRawData(e){console.log("xmlRawData Change",e,oe),e&&this.$nextTick(()=>{var t=this.$refs.FormEngine,u=t.contentDocument||t.contentWindow.document;u.open(),u.write(oe),u.close(),this.previewAreaNode=document.getElementById("previewArea")})}},methods:{loadData(){this.loading=!0,this.loadXML()},loadXML(){return this.loading=!0,new Promise((e,t)=>{const u=window.$wujie.props?.__SYSTEM_CONFIG__.entApi;var I=new XMLHttpRequest;let g=Reflect.ownKeys(this.loadParams).map(n=>`&${n}=${this.loadParams[n]}`).join("");g+=`&zxlPrdId=${this.$route.query.productId}`;const y=u+(u.endsWith("/")?"":"/")+"zxl_pm/common/formxml.svc?cmd=generateXml"+g;I.open("post",y,!0),I.withCredentials=!0,I.onload=()=>{const n=I.response;I.readyState==4&&I.status==200?(this.xmlRawData=n||"",console.log("xhr.response",n),e(!0)):(window.umdAppComponents.Message({type:"error",message:"预览失败"}),t(!1),this.closeHandler())},I.send()})},capture(){const e=this.$refs.FormEngine.contentWindow.document.body;ge(e).then(t=>{t.toBlob(u=>{he(u,`${this.title||"截图"}.png`)},"image/png")})},openHandler(){console.log("openHandler opened"),this.loadData()},closeHandler(){this.$emit("toggle",!1),this.xmlRawData="",this.previewAreaNode=null,this.loading=!0}}},Re={style:{"margin-bottom":"15px"}},Ae={style:{border:"3px dashed rgba(220, 220, 220, 0.8)"}},Te={ref:"previewArea",style:{padding:"15px","min-height":"200px"}},Oe={key:0,ref:"FormEngine",src:"",frameborder:"0",style:{width:"100%"}},qe={key:1,style:{"font-size":"25px","font-weight":"900",color:"rgba(200, 200, 200, 0.9)"}};function Me(e,t,u,I,g,y){const n=q,m=K,C=Y;return i(),f(m,{title:`${u.title}的预览`,visible:u.showFlag,width:"1200px",onOpen:y.openHandler,onClose:y.closeHandler,"append-to-body":""},{default:l(()=>[h("section",Re,[u.enableDownloadShot?(i(),f(n,{key:0,type:"primary",size:"small",onClick:t[0]||(t[0]=()=>y.capture())},{default:l(()=>[...t[1]||(t[1]=[s(" 下载截图 ",-1)])]),_:1})):_("",!0),Z(e.$slots,"btnGroup",{previewAreaNode:e.$refs.previewArea})]),M((i(),p("section",Ae,[h("section",Te,[g.xmlRawData?(i(),p("iframe",Oe,null,512)):(i(),p("span",qe,"暂无数据")),t[2]||(t[2]=h("div",{style:{clear:"both"}},null,-1))],512)])),[[C,g.loading]])]),_:3},8,["title","visible","onOpen","onClose"])}const Pe=O(De,[["render",Me]]),le=()=>({sourceUserIntfId:""}),ze=G({name:"ui-req-segment-manage",components:{...H},data(){return{...B,componentName:"ui-req-segment-manage",activeCollapseItemName:[],showDetailFlag:!1,showVersionFlag:!1,showEditFlag:!1,showCopySegFlag:!1,showAddFlag:!1,se_showImportFromEntityFlag:!1,se_mainTableData:[],segmentList:[],UIList:[],pendingCopyUISeg:!1,segmentListLoading:!1,showBatchEditFlag:!1,showPreviewFlag:!1,refillData:{},importForm:{importFieldIds:[]},CopySegForm:le(),checkLoading:!1,selectedItem:{},activeRow:{}}},props:{fatherInfo:{type:Object,default:()=>({})},prop_userIntfId:{type:String,default:""}},computed:{...z,userIntfId(){return this.$route.query.userIntfId||this.prop_userIntfId},showUISegManage(){return this.fatherInfo.formFunctionType?!["MENU","Multiple","Other"].includes(this.fatherInfo.formFunctionType):!1},uiSegPropList(){return this.fatherInfo.formFunctionType?[{label:"界面字段编号",prop:"userIntfFieldNo",width:"120",show:["Insert","Update","Select","List","Detail","BATCH_EDIT"]},{label:"中文名称",prop:"userIntfFieldName",show:["Insert","Update","Select","List","Detail","BATCH_EDIT"]},{label:"数据字段编号",prop:"importFieldNo",width:"120",show:["Insert","Update","Select","List","Detail","BATCH_EDIT","Multiple"]},{label:"字段数据类型",prop:"valueTypeStr",show:["Insert","Update","Select","List","Detail","BATCH_EDIT"]},{label:"输入控件",prop:"inputTypeStr",show:["Insert","Update","Select","BATCH_EDIT"]},{label:"不能为空",prop:"forbidNull",show:["Insert","Update","BATCH_EDIT"],width:"80",slot:t=>t.forbidNull?"是":"否"},{label:"tab序号",prop:"tabSN",width:"80",show:["Insert","Update","Detail"]},{label:"列",prop:"columnSn",width:"50",show:["Insert","Update","Select","List","Detail","BATCH_EDIT"]},{label:"行",prop:"rowSn",width:"50",show:["Insert","Update","Select","Detail"]},{label:"宽度(像素)",prop:"fieldLength",show:["Insert","Update","Select","List","Detail","BATCH_EDIT"]},{label:"条件类型",prop:"conditionType",show:[,"Select"]},{label:"字段默认值",prop:"defaultValue",show:[]},{label:"英文名称",prop:"fieldEnglishName",show:[]},{label:"是否含中文",prop:"includeChinese",show:[]},{label:"格式要求",prop:"formatNote",show:[]},{label:"说明",prop:"fieldDescribe",show:[]}].filter(t=>t.show.includes(this.fatherInfo.formFunctionType)):[]}},watch:{"fatherInfo.userIntfId"(e){e&&this.loadData()},se_showImportFromEntityFlag(e){e?(this.segmentListLoading=!0,_e({zxlPrdId:this.$route.query.productId,userIntfId:this.userIntfId||this.fatherInfo.userIntfId}).then(t=>{this.segmentList=t,this.segmentListLoading=!1},t=>{this.segmentList=[],this.segmentListLoading=!1})):this.importForm={importFieldIds:[]}},"CopySegForm.sourceUserIntfNo"(){this.CopySegForm.sourceUserIntf="",this.CopySegForm.sourceUserIntfId=""},showCopySegFlag(e){e?this.getUIList():this.CopySegForm=le()}},methods:{...P,loadData(e){!this.$route.query.productId||!this.fatherInfo.userIntfId||!this.showUISegManage||$e({zxlPrdId:this.$route.query.productId,userIntfId:this.fatherInfo.userIntfId}).then(t=>{this.se_mainTableData=t,this.$nextTick(()=>{e instanceof Function&&e()})})},async show(e,t,u="",I="hid"){if(this.activeRow=this.selectedItem=await ke({hid:e.hid}),t=="Edit"){let g={fieldName:"",fieldEnglishName:"",valueType:"",inputType:"",rowSn:"",columnSn:"",formatNote:"",forbidNull:!1,hid:""};for(let y in g)g[y]=this.selectedItem[y];this.refillData=g}this[u+"show"+t+"Flag"]=!0},deleteSegment(e){let t=e.hid;Ne({hid:t,zxlPrdId:this.$route.query.productId}).then(u=>{this.loadData(),window.umdAppComponents.Message({message:`已申请删除${e.userIntfFieldName}`,type:"success"})})},importSegmentList(){const e=ye.service({lock:!0,text:"正在提交",spinner:"el-icon-loading",background:"rgba(0, 0, 0, 0.7)"});ve({zxlPrdId:this.$route.query.productId,userIntfId:this.userIntfId||this.fatherInfo.userIntfId,...this.importForm}).then(t=>{this.se_showImportFromEntityFlag=!1,e.close(),window.umdAppComponents.Message({type:"success",message:"成功导入"}),this.loadData()},t=>{e.close()})},submitCopySegForm(){this.pendingCopyUISeg=!0,c({method:"post",url:"/zxl_pm/request/userIntfField.svc?cmd=copyFieldFromUserIntf",data:{zxlPrdId:this.$route.query.productId,userIntfId:this.userIntfId,sourceUserIntfId:this.CopySegForm.sourceUserIntfId}}).then(()=>{this.showCopySegFlag=!1,this.loadData()}).finally(()=>this.pendingCopyUISeg=!1)},selectAll(){this.importForm.importFieldIds=this.segmentList.map(e=>e.fieldId)},selectReverse(){this.importForm.importFieldIds=this.segmentList.filter(e=>!this.importForm.importFieldIds.includes(e.fieldId))},getUIList(){c({method:"post",url:"/zxl_pm/request/userIntf.svc?cmd=getList",data:{page:1,pageSize:99999999,zxlPrdId:this.$route.query.productId}}).then(e=>this.UIList=e.data?.filter(t=>t.userIntfId!==this.fatherInfo.userIntfId))}}}),He={key:0,class:"sc-table"},Be={style:{padding:"15px 0"}},je={key:0,style:{position:"relative"}},Ke={style:{padding:"15px 0",display:"inline-block"}},Xe={style:{float:"right",padding:"5px 0"}},We={key:2,style:{color:"rgb(200, 200, 200)","text-align":"center"}},Ze={key:3,style:{"margin-top":"15px","text-align":"right"}},Ge={style:{height:"25px",margin:"15px 0"}};function Ye(e,t,u,I,g,y){const n=q,m=Q,C=J,V=X,L=W,N=j,k=x,F=Fe,v=K,S=ie,E=de,D=te,d=ee,r=R("detail-template"),b=re,me=R("batch-edit"),ue=Pe,pe=Y;return e.showUISegManage?(i(),p("div",He,[o(L,{modelValue:e.activeCollapseItemName,"onUpdate:modelValue":t[5]||(t[5]=a=>e.activeCollapseItemName=a)},{default:l(()=>[o(V,{name:"界面字段管理"},{title:l(()=>[h("section",Be,[h("aside",null,[Z(e.$slots,"header"),o(n,{type:"primary",link:"",onClick:t[0]||(t[0]=w(a=>e.showAddFlag=!0,["stop"]))},{default:l(()=>[...t[17]||(t[17]=[s("新增",-1)])]),_:1}),o(n,{type:"primary",link:"",onClick:t[1]||(t[1]=w(a=>e.se_showImportFromEntityFlag=!0,["stop"]))},{default:l(()=>[...t[18]||(t[18]=[s("从数据实体导入",-1)])]),_:1}),o(n,{type:"primary",link:"",onClick:t[2]||(t[2]=w(a=>e.showCopySegFlag=!0,["stop"]))},{default:l(()=>[...t[19]||(t[19]=[s("复制字段",-1)])]),_:1}),o(n,{type:"primary",link:"",disabled:e.se_mainTableData.length==0,onClick:t[3]||(t[3]=w(a=>e.showBatchEditFlag=!0,["stop"]))},{default:l(()=>[...t[20]||(t[20]=[s("批量编辑",-1)])]),_:1},8,["disabled"]),o(n,{type:"primary",link:"",disabled:e.se_mainTableData.length==0,onClick:t[4]||(t[4]=w(a=>e.showPreviewFlag=!0,["stop"]))},{default:l(()=>[...t[21]||(t[21]=[s("预览",-1)])]),_:1},8,["disabled"])])])]),default:l(()=>[o(C,{ref:"se_mainTable",data:e.se_mainTableData,stripe:!0,"row-class-name":e.tableRowClassName},{default:l(()=>[(i(!0),p(A,null,T(e.uiSegPropList,(a,$)=>(i(),p(A,{key:$},[a.slot?(i(),f(m,{key:1,label:a.label,width:a.width||"auto"},{default:l(fe=>[s(U(a.slot(fe.row)),1)]),_:2},1032,["label","width"])):(i(),f(m,{key:0,prop:a.prop,label:a.label,width:a.width||"auto"},null,8,["prop","label","width"]))],64))),128)),o(m,{label:"操作",width:"200"},{default:l(a=>[o(n,{type:"primary",link:"",onClick:$=>e.show(a.row,"Detail")},{default:l(()=>[...t[22]||(t[22]=[s("详情",-1)])]),_:1},8,["onClick"]),o(n,{type:"primary",link:"",onClick:$=>e.show(a.row,"Edit")},{default:l(()=>[...t[23]||(t[23]=[s("修改",-1)])]),_:1},8,["onClick"]),o(n,{type:"primary",link:"",onClick:$=>e.show(a.row,"Version")},{default:l(()=>[...t[24]||(t[24]=[s("版本",-1)])]),_:1},8,["onClick"]),o(n,{type:"danger",link:"",onClick:$=>e.deleteSegment(a.row)},{default:l(()=>[...t[25]||(t[25]=[s("删除",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1},8,["data","row-class-name"])]),_:3})]),_:3},8,["modelValue"]),o(N,{modelValue:e.showAddFlag,"onUpdate:modelValue":t[6]||(t[6]=a=>e.showAddFlag=a),fatherCoreName:e.fatherCoreName,fatherId:e.fatherInfo[e.fatherCoreName+"Id"],coreName:e.coreName,reloadHandler:e.loadData,params:{formFunctionType:e.fatherInfo.formFunctionType,tabTitle:e.fatherInfo.tabTitle}},null,8,["modelValue","fatherCoreName","fatherId","coreName","reloadHandler","params"]),o(N,{modelValue:e.showEditFlag,"onUpdate:modelValue":t[7]||(t[7]=a=>e.showEditFlag=a),fatherCoreName:e.fatherCoreName,fatherId:e.fatherInfo[e.fatherCoreName+"Id"],primaryKey:{fieldName:"hid",value:e.activeRow.hid},coreName:e.coreName,reloadHandler:e.loadData,params:{formFunctionType:e.fatherInfo.formFunctionType,tabTitle:e.fatherInfo.tabTitle}},null,8,["modelValue","fatherCoreName","fatherId","primaryKey","coreName","reloadHandler","params"]),e.se_showImportFromEntityFlag?(i(),f(v,{key:0,title:"从数据实体导入字段",modelValue:e.se_showImportFromEntityFlag,"onUpdate:modelValue":t[9]||(t[9]=a=>e.se_showImportFromEntityFlag=a),width:"500px","append-to-body":""},{default:l(()=>[M((i(),p("div",null,[e.segmentList.length>0?(i(),p("header",je,[h("aside",Ke,"已选条数/总条数："+U(e.importForm.importFieldIds.length)+" / "+U(e.segmentList.length),1),h("aside",Xe,[o(n,{type:"primary",link:"",onClick:e.selectAll},{default:l(()=>[...t[26]||(t[26]=[s("全选",-1)])]),_:1},8,["onClick"]),o(n,{type:"primary",link:"",onClick:e.selectReverse},{default:l(()=>[...t[27]||(t[27]=[s("反选",-1)])]),_:1},8,["onClick"])])])):_("",!0),e.segmentList.length>0?(i(),f(F,{key:1,modelValue:e.importForm.importFieldIds,"onUpdate:modelValue":t[8]||(t[8]=a=>e.importForm.importFieldIds=a),style:{"max-height":"300px",overflow:"auto"}},{default:l(()=>[(i(!0),p(A,null,T(e.segmentList,(a,$)=>(i(),f(k,{key:$,label:a.fieldId,placeholder:"请选择需导入字段",style:{width:"80%"}},{default:l(()=>[s(U(a.fieldNo+" "+a.fieldNameCn),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])):(i(),p("h3",We,"不存在可导入的字段")),e.segmentList.length>0?(i(),p("aside",Ze,[o(n,{type:"primary",onClick:e.importSegmentList,disabled:e.importForm.importFieldIds.length==0},{default:l(()=>[...t[28]||(t[28]=[s("确定",-1)])]),_:1},8,["onClick","disabled"])])):_("",!0)])),[[pe,e.segmentListLoading]])]),_:1},8,["modelValue"])):_("",!0),e.showCopySegFlag?(i(),f(v,{key:1,title:"复制用户界面字段",modelValue:e.showCopySegFlag,"onUpdate:modelValue":t[11]||(t[11]=a=>e.showCopySegFlag=a),width:"500px","append-to-body":""},{default:l(()=>[o(d,{ref:"CopySegForm",model:e.CopySegForm,"label-position":"top"},{default:l(()=>[o(D,{label:"源用户界面"},{default:l(()=>[o(E,{modelValue:e.CopySegForm.sourceUserIntfId,"onUpdate:modelValue":t[10]||(t[10]=a=>e.CopySegForm.sourceUserIntfId=a),clearable:"",filterable:""},{default:l(()=>[(i(!0),p(A,null,T(e.UIList,(a,$)=>(i(),f(S,{key:$,label:a.userIntfNo+" "+a.userIntfName,value:a.userIntfId},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model"]),h("aside",Ge,[o(n,{type:"primary",style:{float:"right"},onClick:e.submitCopySegForm,loading:e.pendingCopyUISeg,disabled:!e.CopySegForm.sourceUserIntfId},{default:l(()=>[...t[29]||(t[29]=[s("确定",-1)])]),_:1},8,["onClick","loading","disabled"])])]),_:1},8,["modelValue"])):_("",!0),o(r,{modelValue:e.showDetailFlag,"onUpdate:modelValue":t[12]||(t[12]=a=>e.showDetailFlag=a),primaryKey:{fieldName:"hid",value:e.selectedItem.hid},coreName:e.coreName},null,8,["modelValue","primaryKey","coreName"]),o(b,{modelValue:e.showVersionFlag,"onUpdate:modelValue":t[13]||(t[13]=a=>e.showVersionFlag=a),fatherInfo:e.selectedItem,coreName:e.coreName,description:e.description},null,8,["modelValue","fatherInfo","coreName","description"]),o(me,{modelValue:e.showBatchEditFlag,"onUpdate:modelValue":t[15]||(t[15]=a=>e.showBatchEditFlag=a),fatherCoreName:"userIntf",fatherInfo:e.fatherInfo,coreName:e.coreName,refillData:e.se_mainTableData,reloadHandler:e.loadData,params:{formFunctionType:e.fatherInfo.formFunctionType,tabTitle:e.fatherInfo.tabTitle}},{"batch-btn-group":l(()=>[o(n,{type:"primary",size:"small",disabled:e.se_mainTableData.length==0,onClick:t[14]||(t[14]=w(a=>e.showPreviewFlag=!0,["stop"]))},{default:l(()=>[...t[30]||(t[30]=[s("预览",-1)])]),_:1},8,["disabled"])]),_:1},8,["modelValue","fatherInfo","coreName","refillData","reloadHandler","params"]),o(ue,{modelValue:e.showPreviewFlag,"onUpdate:modelValue":t[16]||(t[16]=a=>e.showPreviewFlag=a),loadParams:{userIntfId:e.fatherInfo.userIntfId},enableDownloadShot:!0,title:e.fatherInfo.userIntfNo+"_"+e.fatherInfo.userIntfName},null,8,["modelValue","loadParams","title"])])):_("",!0)}const Je=O(ze,[["render",Ye]]),ae=()=>({sourceUserIntfNo:"",userIntfId:"",sourceUserIntfName:"",fold:!0,defaultFold:!0}),Qe=G({name:"sub-ui-manage",data(){return{...B,componentName:"sub-ui-manage",activeCollapseItemName:[],subList:[],selectedItem:{},showCreateRelationFlag:!1,showAddFlag:!1,showEditFlag:!1,showDetailFlag:!1,showVersionFlag:!1,createRelationForm:ae(),checkLoading:!1}},props:{fatherInfo:{type:Object,default:()=>({})}},components:{...H},watch:{"createRelationForm.sourceUserIntfNo"(){this.createRelationForm.sourceUserIntfName="",this.createRelationForm.userIntfId=""},"createRelationForm.fold"(e){e||(this.createRelationForm.defaultFold=!1)},showCreateRelationFlag(){this.createRelationForm=ae()},fatherInfo(e){e&&this.loadData()}},computed:{...z},methods:{...P,loadData(){this.fatherInfo?.userIntfId&&c({method:"post",url:"/zxl_pm/request/userIntfChild.svc?cmd=getSubList",data:{zxlPrdId:this.$route.query.productId,userIntfId:this.fatherInfo.userIntfId}}).then(e=>{this.subList=e})},openDetailWithEditor(e){this.selectedItem=e,this.$router.push({path:"/product-manage/req/ui-manage/design",query:{...this.$route.query,hid:e.childHid,userIntfNo:e.childUserIntfNo,userIntfId:e.childUserIntfId}})},deleteSubUI(e){c({method:"post",url:"/zxl_pm/request/userIntfChild.svc?cmd=delete",data:{zxlPrdId:this.$route.query.productId,userIntfChildId:e.userIntfChildId,hid:e.hid}}).then(t=>{this.loadData(),window.umdAppComponents.Message({message:`已申请删除${e.childUserIntfName}`,type:"success"})})},getSourceUserIntf(){this.checkLoading=!0,c({method:"post",url:"/zxl_pm/request/userIntf.svc?cmd=getUserIntfByNo",data:{zxlPrdId:this.$route.query.productId,userIntfNo:this.createRelationForm.sourceUserIntfNo}}).then(e=>{this.createRelationForm.sourceUserIntfName=e.userIntfName,this.createRelationForm.childUserIntfId=e.userIntfId,this.createRelationForm.userIntfId=this.fatherInfo.userIntfId,this.checkLoading=!1},()=>{this.checkLoading=!1})},submitCreateRelationForm(){c({method:"post",url:"/zxl_pm/request/userIntfChild.svc?cmd=saveOrUpdate",data:{...this.createRelationForm,zxlPrdId:this.$route.query.productId}}).then(()=>{this.showCreateRelationFlag=!1,this.loadData()})},createRelationAfterAdd(e){this.showCreateRelationFlag=!0,this.$nextTick(()=>{this.createRelationForm.sourceUserIntfNo=e.userIntfNo,this.createRelationForm.sourceUserIntfName=e.userIntfName})}}}),xe={style:{padding:"15px 0"}},et={style:{height:"25px",margin:"15px 0"}};function tt(e,t,u,I,g,y){const n=q,m=Q,C=J,V=X,L=W,N=j,k=be,F=te,v=x,S=ee,E=K,D=re;return i(),p("div",null,[o(L,{modelValue:e.activeCollapseItemName,"onUpdate:modelValue":t[2]||(t[2]=d=>e.activeCollapseItemName=d)},{default:l(()=>[o(V,{name:"子窗体",class:"sc-table"},{title:l(()=>[h("section",xe,[Z(e.$slots,"header"),o(n,{type:"primary",link:"",onClick:t[0]||(t[0]=w(d=>e.showAddFlag=!0,["stop"]))},{default:l(()=>[...t[10]||(t[10]=[s("新增",-1)])]),_:1}),o(n,{type:"primary",link:"",onClick:t[1]||(t[1]=w(d=>e.showCreateRelationFlag=!0,["stop"]))},{default:l(()=>[...t[11]||(t[11]=[s("关联子窗体",-1)])]),_:1})])]),default:l(()=>[o(C,{data:e.subList,stripe:!0,"row-class-name":e.tableRowClassName},{default:l(()=>[o(m,{prop:"childUserIntfNo",label:"子窗体编号"}),o(m,{prop:"childUserIntfName",label:"子窗体名称"}),o(m,{prop:"fold",label:"是否支持收起"},{default:l(d=>[s(U(d.row.fold?"是":"否"),1)]),_:1}),o(m,{prop:"defaultFold",label:"默认为收起"},{default:l(d=>[s(U(d.row.defaultFold?"是":"否"),1)]),_:1}),o(m,{label:"操作"},{default:l(d=>[o(n,{type:"primary",link:"",onClick:r=>e.openDetailWithEditor(d.row)},{default:l(()=>[...t[12]||(t[12]=[s("设计",-1)])]),_:1},8,["onClick"]),o(n,{type:"danger",link:"",onClick:r=>e.deleteSubUI(d.row)},{default:l(()=>[...t[13]||(t[13]=[s("删除",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1},8,["data","row-class-name"])]),_:3})]),_:3},8,["modelValue"]),o(N,{modelValue:e.showAddFlag,"onUpdate:modelValue":t[3]||(t[3]=d=>e.showAddFlag=d),coreName:"userIntf",reloadHandler:e.createRelationAfterAdd},null,8,["modelValue","reloadHandler"]),e.showCreateRelationFlag?(i(),f(E,{key:0,title:`给${e.fatherInfo[e.fatherCoreName+"No"]} ${e.fatherInfo[e.fatherCoreName+"Name"]}增加子窗体`,modelValue:e.showCreateRelationFlag,"onUpdate:modelValue":t[8]||(t[8]=d=>e.showCreateRelationFlag=d),width:"500px"},{default:l(()=>[o(S,{ref:"createRelationForm",model:e.createRelationForm,"label-position":"top"},{default:l(()=>[o(F,{label:"用户界面编号"},{default:l(()=>[o(k,{modelValue:e.createRelationForm.sourceUserIntfNo,"onUpdate:modelValue":t[4]||(t[4]=d=>e.createRelationForm.sourceUserIntfNo=d),style:{display:"inline-block",width:"325px"}},null,8,["modelValue"]),o(n,{type:"primary",loading:e.checkLoading,onClick:e.getSourceUserIntf,style:{float:"right"},disabled:!e.createRelationForm.sourceUserIntfNo},{default:l(()=>[...t[14]||(t[14]=[s("核验",-1)])]),_:1},8,["loading","onClick","disabled"])]),_:1}),o(F,{label:"用户界面名称"},{default:l(()=>[o(k,{modelValue:e.createRelationForm.sourceUserIntfName,"onUpdate:modelValue":t[5]||(t[5]=d=>e.createRelationForm.sourceUserIntfName=d),disabled:!0},null,8,["modelValue"])]),_:1}),o(F,null,{default:l(()=>[o(v,{modelValue:e.createRelationForm.fold,"onUpdate:modelValue":t[6]||(t[6]=d=>e.createRelationForm.fold=d)},{default:l(()=>[...t[15]||(t[15]=[s("是否支持收起",-1)])]),_:1},8,["modelValue"])]),_:1}),o(F,null,{default:l(()=>[o(v,{modelValue:e.createRelationForm.defaultFold,"onUpdate:modelValue":t[7]||(t[7]=d=>e.createRelationForm.defaultFold=d),disabled:!e.createRelationForm.fold},{default:l(()=>[...t[16]||(t[16]=[s("默认为收起",-1)])]),_:1},8,["modelValue","disabled"])]),_:1}),h("aside",et,[o(n,{type:"primary",style:{float:"right"},onClick:e.submitCreateRelationForm,disabled:!e.createRelationForm.sourceUserIntfName},{default:l(()=>[...t[17]||(t[17]=[s("确定",-1)])]),_:1},8,["onClick","disabled"])])]),_:1},8,["model"])]),_:1},8,["title","modelValue"])):_("",!0),o(D,{modelValue:e.showVersionFlag,"onUpdate:modelValue":t[9]||(t[9]=d=>e.showVersionFlag=d),fatherSelectedItem:e.fatherInfo,coreName:e.fatherCoreName,description:e.description},null,8,["modelValue","fatherSelectedItem","coreName","description"])])}const ot=O(Qe,[["render",tt]]),ne=()=>({moduleId:"",functionId:"",userIntfOperationList:[]}),lt=G({name:"ui-op-manage",components:{...H,EnableOpConfig:Se},data(){return{...B,componentName:"ui-op-manage",activeCollapseItemName:[],subList:[],selectedItem:{},functionInfo:{},showAddFlag:!1,showEditFlag:!1,showEnableConfigFlag:!1,addForm:ne(),addRules:{moduleId:[{required:!0,message:"请选择",trigger:"blur"}],functionId:[{required:!0,message:"请选择",trigger:"blur"}],userIntfOperationList:[{required:!0,message:"请选择",trigger:"blur"}]},moduleList:[],funcListOfModule:[],subFuncListOfFunc:[],temp_volumnAddForm_op:{},temp_volumnAddForm_isRowEntry:{},op_volumnAddForm:{userIntfOperationList:[]}}},props:{fatherInfo:{type:Object,default:()=>({})}},computed:{...z,disableSubmitBtn(){return Reflect.ownKeys(this.temp_volumnAddForm_op).filter(e=>this.temp_volumnAddForm_op[e]===!0).length===0}},watch:{showAddFlag(e){this.addForm=ne(),this.moduleList=[],this.funcListOfModule=[],this.subFuncListOfFunc=[],e&&Le({zxlPrdId:this.$route.query.productId}).then(t=>{this.moduleList=t})},temp_volumnAddForm_op:{handler(e){let t=this.temp_volumnAddForm_isRowEntry;for(let u in t)e[u]==!1&&(t[u]=!1)},immediate:!0,deep:!0},"addForm.moduleId"(e){this.addForm.functionId&&(this.addForm.functionId=""),e==""||e==null||e==null?this.funcListOfModule=[]:Ve({zxlPrdId:this.$route.query.productId,moduleId:e}).then(t=>{this.funcListOfModule=t})},"addForm.functionId"(e){e==""||e==null||e==null?this.subFuncListOfFunc=[]:Ue({zxlPrdId:this.$route.query.productId,functionId:e}).then(t=>{this.subFuncListOfFunc=t,t.forEach(u=>{this.temp_volumnAddForm_op[u.value]=!0,this.temp_volumnAddForm_isRowEntry[u.value]=!0})}),this.op_volumnAddForm={userIntfOperationList:[]};for(let t in this.temp_volumnAddForm_op)this.temp_volumnAddForm_op[t]=!1;for(let t in this.temp_volumnAddForm_isRowEntry)this.temp_volumnAddForm_isRowEntry[t]=!1},fatherInfo(e){e&&this.loadData()}},methods:{...P,loadData(){this.fatherInfo?.userIntfId&&(c({method:"post",url:"/zxl_pm/request/userIntfOperation.svc?cmd=getOperationList",data:{zxlPrdId:this.$route.query.productId,userIntfId:this.fatherInfo.userIntfId}}).then(e=>{this.subList=e}),c({method:"post",url:"/zxl_pm/product/overview/product.svc?cmd=getActiveObject",data:{zxlPrdId:this.$route.query.productId,objectType:"ZxlPrdRequestFunction",objectId:this.fatherInfo.functionId}}).then(e=>this.functionInfo=e))},update(){this.$nextTick(()=>{this.$forceUpdate()})},deleteUserIntfOperation(e){c({method:"post",url:"/zxl_pm/request/userIntfOperation.svc?cmd=delete",data:{zxlPrdId:this.$route.query.productId,userIntfOperationId:e.userIntfOperationId,hid:e.hid}}).then(t=>{this.loadData(),window.umdAppComponents.Message({message:`已申请删除${e.userIntfOperationName}`,type:"success"})})},submitAddForm(){let e=[];for(let t in this.temp_volumnAddForm_op)this.temp_volumnAddForm_op[t]===!0&&e.push({operationId:t,rowFunction:this.temp_volumnAddForm_isRowEntry[t]});this.addForm.userIntfOperationList=e,c({method:"post",url:"/zxl_pm/request/userIntfOperation.svc?cmd=batchAdd",data:{...this.addForm,zxlPrdId:this.$route.query.productId,userIntfId:this.fatherInfo.userIntfId}}).then(()=>{this.showAddFlag=!1,this.loadData()})}}}),at={style:{padding:"15px 0"}},nt={style:{height:"25px",margin:"15px 0"}};function rt(e,t,u,I,g,y){const n=q,m=Q,C=J,V=X,L=W,N=ie,k=de,F=te,v=x,S=ee,E=K,D=j,d=R("enable-op-config");return i(),p("div",null,[o(L,{modelValue:e.activeCollapseItemName,"onUpdate:modelValue":t[2]||(t[2]=r=>e.activeCollapseItemName=r)},{default:l(()=>[o(V,{name:"界面子功能",class:"sc-table"},{title:l(()=>[h("section",at,[Z(e.$slots,"header"),o(n,{type:"primary",link:"",onClick:t[0]||(t[0]=w(r=>e.showAddFlag=!0,["stop"]))},{default:l(()=>[...t[8]||(t[8]=[s("关联子功能",-1)])]),_:1}),e.functionInfo.authReferFieldId?(i(),f(n,{key:0,type:"primary",link:"",onClick:t[1]||(t[1]=w(r=>e.showEnableConfigFlag=!0,["stop"]))},{default:l(()=>[...t[9]||(t[9]=[s("可用配置",-1)])]),_:1})):_("",!0)])]),default:l(()=>[o(C,{data:e.subList,stripe:!0,"row-class-name":e.tableRowClassName},{default:l(()=>[o(m,{prop:"subfunctionNo",label:"子功能编号"}),o(m,{prop:"subfunctionName",label:"子功能名称"}),o(m,{prop:"functionName",label:"功能名称"}),o(m,{prop:"moduleName",label:"模块名称"}),o(m,{prop:"targetUserIntfName",label:"目标界面"}),o(m,{prop:"buttonLabel",label:"按钮名称"}),o(m,{prop:"rowFunction",label:"是否行入口"},{default:l(r=>[s(U(r.row.rowFunction?"是":"否"),1)]),_:1}),o(m,{prop:"putInMore",label:"是否放入更多"},{default:l(r=>[s(U(r.row.putInMore?"是":"否"),1)]),_:1}),o(m,{label:"操作"},{default:l(r=>[o(n,{type:"primary",link:"",onClick:b=>e.show(r.row,"Edit")},{default:l(()=>[...t[10]||(t[10]=[s("修改",-1)])]),_:1},8,["onClick"]),o(n,{type:"danger",link:"",onClick:b=>e.deleteUserIntfOperation(r.row)},{default:l(()=>[...t[11]||(t[11]=[s("删除",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1},8,["data","row-class-name"])]),_:3})]),_:3},8,["modelValue"]),e.showAddFlag?(i(),f(E,{key:0,title:`给${e.fatherInfo[e.fatherCoreName+"No"]} ${e.fatherInfo[e.fatherCoreName+"Name"]}增加子功能`,modelValue:e.showAddFlag,"onUpdate:modelValue":t[5]||(t[5]=r=>e.showAddFlag=r),width:"500px","append-to-body":""},{default:l(()=>[o(S,{ref:"addForm",rules:e.addRules,"label-width":"auto","label-position":"right",model:e.addForm},{default:l(()=>[o(F,{label:"模块",prop:"moduleId"},{default:l(()=>[o(k,{modelValue:e.addForm.moduleId,"onUpdate:modelValue":t[3]||(t[3]=r=>e.addForm.moduleId=r),placeholder:"请选择",onChange:e.update},{default:l(()=>[(i(!0),p(A,null,T(e.moduleList,(r,b)=>(i(),f(N,{key:b,label:r.label,value:r.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1}),o(F,{label:"功能",prop:"functionId"},{default:l(()=>[o(k,{modelValue:e.addForm.functionId,"onUpdate:modelValue":t[4]||(t[4]=r=>e.addForm.functionId=r),placeholder:"请选择",disabled:!e.addForm.moduleId,onChange:e.update},{default:l(()=>[(i(!0),p(A,null,T(e.funcListOfModule,(r,b)=>(i(),f(N,{key:b,label:r.label,value:r.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","disabled","onChange"])]),_:1}),o(F,{prop:"userIntfOperationList"},{default:l(()=>[o(C,{data:e.subFuncListOfFunc},{default:l(()=>[o(m,{label:"子功能名称",prop:"label"}),o(m,{label:"是否关联"},{default:l(r=>[o(v,{modelValue:e.temp_volumnAddForm_op[r.row.value],"onUpdate:modelValue":b=>e.temp_volumnAddForm_op[r.row.value]=b,style:{"margin-left":"22px"}},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),o(m,{label:"是否行入口"},{default:l(r=>[o(v,{modelValue:e.temp_volumnAddForm_isRowEntry[r.row.value],"onUpdate:modelValue":b=>e.temp_volumnAddForm_isRowEntry[r.row.value]=b,disabled:!e.temp_volumnAddForm_op[r.row.value],style:{"margin-left":"33px"}},null,8,["modelValue","onUpdate:modelValue","disabled"])]),_:1})]),_:1},8,["data"])]),_:1}),h("aside",nt,[o(n,{type:"primary",style:{float:"right"},onClick:e.submitAddForm,disabled:e.disableSubmitBtn},{default:l(()=>[...t[12]||(t[12]=[s("确定",-1)])]),_:1},8,["onClick","disabled"])])]),_:1},8,["rules","model"])]),_:1},8,["title","modelValue"])):_("",!0),o(D,{modelValue:e.showEditFlag,"onUpdate:modelValue":t[6]||(t[6]=r=>e.showEditFlag=r),primaryKey:{fieldName:"hid",value:e.activeRow.hid},coreName:e.coreName,reloadHandler:e.loadData},null,8,["modelValue","primaryKey","coreName","reloadHandler"]),o(d,{modelValue:e.showEnableConfigFlag,"onUpdate:modelValue":t[7]||(t[7]=r=>e.showEnableConfigFlag=r),reloadHandler:e.loadData,father:e.that,prop_functionId:e.functionInfo.functionId},null,8,["modelValue","reloadHandler","father","prop_functionId"])])}const st=O(lt,[["render",rt]]),dt=G({name:"ui-manage-design",activated(){this.loadData()},components:{...H,UiSegManage:Je,BusinessRule:se,SubUiManage:ot,UiOpManage:st},data(){return{...B,componentName:"ui-manage",activeCollapseItemName:[],hid:"",loading:!0,detailInfo:{},roleList:[],showEditFlag:!1,showPreviewFlag:!1}},props:{prop_userIntfId:String},computed:{...z,userIntfId(){return this.$route.query.userIntfId||this.prop_userIntfId}},mounted(){this.prop_userIntfId&&this.loadData()},methods:{...P,loadData(){this.loading=!0,c({method:"post",url:"/zxl_pm/product/overview/product.svc?cmd=getActiveObject",data:{zxlPrdId:this.$route.query.productId,objectType:"ZxlPrdRequestUserIntf",objectId:this.userIntfId}}).then(e=>{this.detailInfo=e,this.hid=e.hid}).finally(()=>this.loading=!1)},goBack(){this.$router.back()}}}),it={style:{display:"flex","align-items":"center"}};function mt(e,t,u,I,g,y){const n=q,m=j,C=R("detail-template"),V=X,L=R("sub-ui-manage"),N=R("ui-seg-manage"),k=se,F=R("ui-op-manage"),v=W,S=we,E=ce,D=Y;return i(),f(E,{class:"app-container"},{default:l(()=>[M((i(),f(S,null,{default:l(()=>[o(v,{modelValue:e.activeCollapseItemName,"onUpdate:modelValue":t[2]||(t[2]=d=>e.activeCollapseItemName=d)},{default:l(()=>[o(V,{name:"基本信息"},{title:l(()=>[h("h2",it,[s(U(e.loading?"基本信息":`${e.description} - ${e.detailInfo[e.coreName+"Name"]}(${e.detailInfo[e.coreName+"No"]})的基本信息`)+" ",1),o(n,{type:"primary",link:"",style:{"margin-left":"30px"},onClick:t[0]||(t[0]=w(d=>e.showEditFlag=!0,["stop"]))},{default:l(()=>[...t[3]||(t[3]=[s("修改",-1)])]),_:1}),o(m,{modelValue:e.showEditFlag,"onUpdate:modelValue":t[1]||(t[1]=d=>e.showEditFlag=d),primaryKey:{fieldName:"hid",value:e.hid},coreName:e.coreName,reloadHandler:e.loadData},null,8,["modelValue","primaryKey","coreName","reloadHandler"])])]),default:l(()=>[o(C,{mode:"direct",primaryKey:{fieldName:"hid",value:e.hid},coreName:e.coreName,refillData:e.detailInfo,showRelateObject:!1},null,8,["primaryKey","coreName","refillData"])]),_:1}),M(o(L,{fatherInfo:e.detailInfo},{header:l(()=>[...t[4]||(t[4]=[h("h2",{style:{display:"inline","margin-right":"30px"}},"子窗体",-1)])]),_:1},8,["fatherInfo"]),[[Ce,e.detailInfo.formFunctionType=="Multiple"]]),o(N,{fatherInfo:e.detailInfo},{header:l(()=>[...t[5]||(t[5]=[h("h2",{style:{display:"inline","margin-right":"30px"}},"界面字段管理",-1)])]),_:1},8,["fatherInfo"]),o(k,{mark:{type:"ZxlPrdRequestUserIntf",typeName:"用户界面",coreName:"userIntf",objectId:e.userIntfId}},null,8,["mark"]),o(F,{fatherInfo:e.detailInfo},{header:l(()=>[...t[6]||(t[6]=[h("h2",{style:{display:"inline","margin-right":"30px"}},"界面子功能",-1)])]),_:1},8,["fatherInfo"])]),_:1},8,["modelValue"])]),_:1})),[[D,e.loading]])]),_:1})}const ut=O(dt,[["render",mt],["__scopeId","data-v-63f6c831"]]),wt=Object.freeze(Object.defineProperty({__proto__:null,default:ut},Symbol.toStringTag,{value:"Module"}));export{ut as U,Je as a,wt as d};
