import{$ as e,A as t,C as n,E as r,M as i,Q as a,T as o,X as s,_ as c,cn as l,dt as u,et as d,ft as f,h as p,k as m,mn as h,p as g,t as _,w as v}from"./_plugin-vue_export-helper-9JxOV_6y.js";import{J as y,b,c as x,i as S,o as C,r as w,v as T}from"./GxPagination-1gJXbpdv.js";import{n as E,t as D}from"./form-CR2ksibI.js";import{t as O}from"./button-CENWFHkZ.js";import{n as k,t as A}from"./collapse-BzzHlyd2.js";import{a as j,n as M}from"./css-C7OSowuz.js";import{t as N}from"./dialog-CTuQSeYb.js";import{t as P}from"./directive-CkUp73VW.js";import{t as F}from"./loading-BoWnZdq3.js";import{g as I,r as L}from"./useStructurizedVersionDialog-0SS1SzGE.js";import{n as R}from"./request-D0ipHUJ7.js";import{t as z}from"./css-BV-4fLwt2.js";import{d as B,i as V,n as H,r as U,t as W}from"./view_base_options-B1nQ3fRa.js";import{a as ee,c as G,d as K,l as q,r as J,s as Y,t as X,u as Z}from"./api-BPVYozf2.js";import{t as Q}from"./enable-op-config-dAyzIVxr.js";import{t as te}from"./html2canvas-Baa6Uj8o.js";import{t as $}from"./business-rule-9WpCk0P3.js";var ne=`
<!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>
`,re=h(z()),ie=h(te()),ae=new re.default,oe={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=>{let 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:ae.xml2js(this.xmlRawData)},`*`)}};t[e.data?.eventName]&&t[e.data.eventName]()})},computed:{},watch:{xmlRawData(e){console.log(`xmlRawData Change`,e,ne),e&&this.$nextTick(()=>{var e=this.$refs.FormEngine,t=e.contentDocument||e.contentWindow.document;t.open(),t.write(ne),t.close(),this.previewAreaNode=document.getElementById(`previewArea`)})}},methods:{loadData(){this.loading=!0,this.loadXML()},loadXML(){return this.loading=!0,new Promise((e,t)=>{let n=window.$wujie.props?.__SYSTEM_CONFIG__.entApi;var r=new XMLHttpRequest;let i=Reflect.ownKeys(this.loadParams).map(e=>`&${e}=${this.loadParams[e]}`).join(``);i+=`&zxlPrdId=${this.$route.query.productId}`;let a=n+(n.endsWith(`/`)?``:`/`)+`zxl_pm/common/formxml.svc?cmd=generateXml`+i;r.open(`post`,a,!0),r.withCredentials=!0,r.onload=()=>{let n=r.response;r.readyState==4&&r.status==200?(this.xmlRawData=n||``,console.log(`xhr.response`,n),e(!0)):(window.umdAppComponents.Message({type:`error`,message:`预览失败`}),t(!1),this.closeHandler())},r.send()})},capture(){let e=this.$refs.FormEngine.contentWindow.document.body;(0,ie.default)(e).then(e=>{e.toBlob(e=>{I(e,`${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}}},se={style:{"margin-bottom":`15px`}},ce={style:{border:`3px dashed rgba(220, 220, 220, 0.8)`}},le={ref:`previewArea`,style:{padding:`15px`,"min-height":`200px`}},ue={key:0,ref:`FormEngine`,src:``,frameborder:`0`,style:{width:`100%`}},de={key:1,style:{"font-size":`25px`,"font-weight":`900`,color:`rgba(200, 200, 200, 0.9)`}};function fe(t,i,a,c,l,d){let p=O,h=N,g=P;return s(),v(h,{title:`${a.title}的预览`,visible:a.showFlag,width:`1200px`,onOpen:d.openHandler,onClose:d.closeHandler,"append-to-body":``},{default:u(()=>[n(`section`,se,[a.enableDownloadShot?(s(),v(p,{key:0,type:`primary`,size:`small`,onClick:i[0]||=()=>d.capture()},{default:u(()=>[...i[1]||=[m(` 下载截图 `,-1)]]),_:1})):o(``,!0),e(t.$slots,`btnGroup`,{previewAreaNode:t.$refs.previewArea})]),f((s(),r(`section`,ce,[n(`section`,le,[l.xmlRawData?(s(),r(`iframe`,ue,null,512)):(s(),r(`span`,de,`暂无数据`)),i[2]||=n(`div`,{style:{clear:`both`}},null,-1)],512)])),[[g,l.loading]])]),_:3},8,[`title`,`visible`,`onOpen`,`onClose`])}var pe=_(oe,[[`render`,fe]]),me=()=>({sourceUserIntfId:``}),he=i({name:`ui-req-segment-manage`,components:{...W},data(){return{...U,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:me(),checkLoading:!1,selectedItem:{},activeRow:{}}},props:{fatherInfo:{type:Object,default:()=>({})},prop_userIntfId:{type:String,default:``}},computed:{...H,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:e=>e.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(e=>e.show.includes(this.fatherInfo.formFunctionType)):[]}},watch:{"fatherInfo.userIntfId"(e){e&&this.loadData()},se_showImportFromEntityFlag(e){e?(this.segmentListLoading=!0,q({zxlPrdId:this.$route.query.productId,userIntfId:this.userIntfId||this.fatherInfo.userIntfId}).then(e=>{this.segmentList=e,this.segmentListLoading=!1},e=>{this.segmentList=[],this.segmentListLoading=!1})):this.importForm={importFieldIds:[]}},"CopySegForm.sourceUserIntfNo"(){this.CopySegForm.sourceUserIntf=``,this.CopySegForm.sourceUserIntfId=``},showCopySegFlag(e){e?this.getUIList():this.CopySegForm=me()}},methods:{...V,loadData(e){!this.$route.query.productId||!this.fatherInfo.userIntfId||!this.showUISegManage||J({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,n=``,r=`hid`){if(this.activeRow=this.selectedItem=await G({hid:e.hid}),t==`Edit`){let e={fieldName:``,fieldEnglishName:``,valueType:``,inputType:``,rowSn:``,columnSn:``,formatNote:``,forbidNull:!1,hid:``};for(let t in e)e[t]=this.selectedItem[t];this.refillData=e}this[n+`show`+t+`Flag`]=!0},deleteSegment(e){let t=e.hid;X({hid:t,zxlPrdId:this.$route.query.productId}).then(t=>{this.loadData(),window.umdAppComponents.Message({message:`已申请删除${e.userIntfFieldName}`,type:`success`})})},importSegmentList(){let e=F.service({lock:!0,text:`正在提交`,spinner:`el-icon-loading`,background:`rgba(0, 0, 0, 0.7)`});K({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,R({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(){R({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(e=>e.userIntfId!==this.fatherInfo.userIntfId))}}}),ge={key:0,class:`sc-table`},_e={style:{padding:`15px 0`}},ve={key:0,style:{position:`relative`}},ye={style:{padding:`15px 0`,display:`inline-block`}},be={style:{float:`right`,padding:`5px 0`}},xe={key:2,style:{color:`rgb(200, 200, 200)`,"text-align":`center`}},Se={key:3,style:{"margin-top":`15px`,"text-align":`right`}},Ce={style:{height:`25px`,margin:`15px 0`}};function we(i,h,g,_,y,j){let M=O,F=S,I=w,R=k,z=A,V=L,H=T,U=b,W=N,ee=C,G=x,K=E,q=D,J=d(`detail-template`),Y=B,X=d(`batch-edit`),Z=pe,Q=P;return i.showUISegManage?(s(),r(`div`,ge,[t(z,{modelValue:i.activeCollapseItemName,"onUpdate:modelValue":h[5]||=e=>i.activeCollapseItemName=e},{default:u(()=>[t(R,{name:`界面字段管理`},{title:u(()=>[n(`section`,_e,[n(`aside`,null,[e(i.$slots,`header`),t(M,{type:`primary`,link:``,onClick:h[0]||=p(e=>i.showAddFlag=!0,[`stop`])},{default:u(()=>[...h[17]||=[m(`新增`,-1)]]),_:1}),t(M,{type:`primary`,link:``,onClick:h[1]||=p(e=>i.se_showImportFromEntityFlag=!0,[`stop`])},{default:u(()=>[...h[18]||=[m(`从数据实体导入`,-1)]]),_:1}),t(M,{type:`primary`,link:``,onClick:h[2]||=p(e=>i.showCopySegFlag=!0,[`stop`])},{default:u(()=>[...h[19]||=[m(`复制字段`,-1)]]),_:1}),t(M,{type:`primary`,link:``,disabled:i.se_mainTableData.length==0,onClick:h[3]||=p(e=>i.showBatchEditFlag=!0,[`stop`])},{default:u(()=>[...h[20]||=[m(`批量编辑`,-1)]]),_:1},8,[`disabled`]),t(M,{type:`primary`,link:``,disabled:i.se_mainTableData.length==0,onClick:h[4]||=p(e=>i.showPreviewFlag=!0,[`stop`])},{default:u(()=>[...h[21]||=[m(`预览`,-1)]]),_:1},8,[`disabled`])])])]),default:u(()=>[t(I,{ref:`se_mainTable`,data:i.se_mainTableData,stripe:!0,"row-class-name":i.tableRowClassName},{default:u(()=>[(s(!0),r(c,null,a(i.uiSegPropList,(e,t)=>(s(),r(c,{key:t},[e.slot?(s(),v(F,{key:1,label:e.label,width:e.width||`auto`},{default:u(t=>[m(l(e.slot(t.row)),1)]),_:2},1032,[`label`,`width`])):(s(),v(F,{key:0,prop:e.prop,label:e.label,width:e.width||`auto`},null,8,[`prop`,`label`,`width`]))],64))),128)),t(F,{label:`操作`,width:`200`},{default:u(e=>[t(M,{type:`primary`,link:``,onClick:t=>i.show(e.row,`Detail`)},{default:u(()=>[...h[22]||=[m(`详情`,-1)]]),_:1},8,[`onClick`]),t(M,{type:`primary`,link:``,onClick:t=>i.show(e.row,`Edit`)},{default:u(()=>[...h[23]||=[m(`修改`,-1)]]),_:1},8,[`onClick`]),t(M,{type:`primary`,link:``,onClick:t=>i.show(e.row,`Version`)},{default:u(()=>[...h[24]||=[m(`版本`,-1)]]),_:1},8,[`onClick`]),t(M,{type:`danger`,link:``,onClick:t=>i.deleteSegment(e.row)},{default:u(()=>[...h[25]||=[m(`删除`,-1)]]),_:1},8,[`onClick`])]),_:1})]),_:1},8,[`data`,`row-class-name`])]),_:3})]),_:3},8,[`modelValue`]),t(V,{modelValue:i.showAddFlag,"onUpdate:modelValue":h[6]||=e=>i.showAddFlag=e,fatherCoreName:i.fatherCoreName,fatherId:i.fatherInfo[i.fatherCoreName+`Id`],coreName:i.coreName,reloadHandler:i.loadData,params:{formFunctionType:i.fatherInfo.formFunctionType,tabTitle:i.fatherInfo.tabTitle}},null,8,[`modelValue`,`fatherCoreName`,`fatherId`,`coreName`,`reloadHandler`,`params`]),t(V,{modelValue:i.showEditFlag,"onUpdate:modelValue":h[7]||=e=>i.showEditFlag=e,fatherCoreName:i.fatherCoreName,fatherId:i.fatherInfo[i.fatherCoreName+`Id`],primaryKey:{fieldName:`hid`,value:i.activeRow.hid},coreName:i.coreName,reloadHandler:i.loadData,params:{formFunctionType:i.fatherInfo.formFunctionType,tabTitle:i.fatherInfo.tabTitle}},null,8,[`modelValue`,`fatherCoreName`,`fatherId`,`primaryKey`,`coreName`,`reloadHandler`,`params`]),i.se_showImportFromEntityFlag?(s(),v(W,{key:0,title:`从数据实体导入字段`,modelValue:i.se_showImportFromEntityFlag,"onUpdate:modelValue":h[9]||=e=>i.se_showImportFromEntityFlag=e,width:`500px`,"append-to-body":``},{default:u(()=>[f((s(),r(`div`,null,[i.segmentList.length>0?(s(),r(`header`,ve,[n(`aside`,ye,`已选条数/总条数：`+l(i.importForm.importFieldIds.length)+` / `+l(i.segmentList.length),1),n(`aside`,be,[t(M,{type:`primary`,link:``,onClick:i.selectAll},{default:u(()=>[...h[26]||=[m(`全选`,-1)]]),_:1},8,[`onClick`]),t(M,{type:`primary`,link:``,onClick:i.selectReverse},{default:u(()=>[...h[27]||=[m(`反选`,-1)]]),_:1},8,[`onClick`])])])):o(``,!0),i.segmentList.length>0?(s(),v(U,{key:1,modelValue:i.importForm.importFieldIds,"onUpdate:modelValue":h[8]||=e=>i.importForm.importFieldIds=e,style:{"max-height":`300px`,overflow:`auto`}},{default:u(()=>[(s(!0),r(c,null,a(i.segmentList,(e,t)=>(s(),v(H,{key:t,label:e.fieldId,placeholder:`请选择需导入字段`,style:{width:`80%`}},{default:u(()=>[m(l(e.fieldNo+` `+e.fieldNameCn),1)]),_:2},1032,[`label`]))),128))]),_:1},8,[`modelValue`])):(s(),r(`h3`,xe,`不存在可导入的字段`)),i.segmentList.length>0?(s(),r(`aside`,Se,[t(M,{type:`primary`,onClick:i.importSegmentList,disabled:i.importForm.importFieldIds.length==0},{default:u(()=>[...h[28]||=[m(`确定`,-1)]]),_:1},8,[`onClick`,`disabled`])])):o(``,!0)])),[[Q,i.segmentListLoading]])]),_:1},8,[`modelValue`])):o(``,!0),i.showCopySegFlag?(s(),v(W,{key:1,title:`复制用户界面字段`,modelValue:i.showCopySegFlag,"onUpdate:modelValue":h[11]||=e=>i.showCopySegFlag=e,width:`500px`,"append-to-body":``},{default:u(()=>[t(q,{ref:`CopySegForm`,model:i.CopySegForm,"label-position":`top`},{default:u(()=>[t(K,{label:`源用户界面`},{default:u(()=>[t(G,{modelValue:i.CopySegForm.sourceUserIntfId,"onUpdate:modelValue":h[10]||=e=>i.CopySegForm.sourceUserIntfId=e,clearable:``,filterable:``},{default:u(()=>[(s(!0),r(c,null,a(i.UIList,(e,t)=>(s(),v(ee,{key:t,label:e.userIntfNo+` `+e.userIntfName,value:e.userIntfId},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`])]),_:1})]),_:1},8,[`model`]),n(`aside`,Ce,[t(M,{type:`primary`,style:{float:`right`},onClick:i.submitCopySegForm,loading:i.pendingCopyUISeg,disabled:!i.CopySegForm.sourceUserIntfId},{default:u(()=>[...h[29]||=[m(`确定`,-1)]]),_:1},8,[`onClick`,`loading`,`disabled`])])]),_:1},8,[`modelValue`])):o(``,!0),t(J,{modelValue:i.showDetailFlag,"onUpdate:modelValue":h[12]||=e=>i.showDetailFlag=e,primaryKey:{fieldName:`hid`,value:i.selectedItem.hid},coreName:i.coreName},null,8,[`modelValue`,`primaryKey`,`coreName`]),t(Y,{modelValue:i.showVersionFlag,"onUpdate:modelValue":h[13]||=e=>i.showVersionFlag=e,fatherInfo:i.selectedItem,coreName:i.coreName,description:i.description},null,8,[`modelValue`,`fatherInfo`,`coreName`,`description`]),t(X,{modelValue:i.showBatchEditFlag,"onUpdate:modelValue":h[15]||=e=>i.showBatchEditFlag=e,fatherCoreName:`userIntf`,fatherInfo:i.fatherInfo,coreName:i.coreName,refillData:i.se_mainTableData,reloadHandler:i.loadData,params:{formFunctionType:i.fatherInfo.formFunctionType,tabTitle:i.fatherInfo.tabTitle}},{"batch-btn-group":u(()=>[t(M,{type:`primary`,size:`small`,disabled:i.se_mainTableData.length==0,onClick:h[14]||=p(e=>i.showPreviewFlag=!0,[`stop`])},{default:u(()=>[...h[30]||=[m(`预览`,-1)]]),_:1},8,[`disabled`])]),_:1},8,[`modelValue`,`fatherInfo`,`coreName`,`refillData`,`reloadHandler`,`params`]),t(Z,{modelValue:i.showPreviewFlag,"onUpdate:modelValue":h[16]||=e=>i.showPreviewFlag=e,loadParams:{userIntfId:i.fatherInfo.userIntfId},enableDownloadShot:!0,title:i.fatherInfo.userIntfNo+`_`+i.fatherInfo.userIntfName},null,8,[`modelValue`,`loadParams`,`title`])])):o(``,!0)}var Te=_(he,[[`render`,we]]),Ee=()=>({sourceUserIntfNo:``,userIntfId:``,sourceUserIntfName:``,fold:!0,defaultFold:!0}),De=i({name:`sub-ui-manage`,data(){return{...U,componentName:`sub-ui-manage`,activeCollapseItemName:[],subList:[],selectedItem:{},showCreateRelationFlag:!1,showAddFlag:!1,showEditFlag:!1,showDetailFlag:!1,showVersionFlag:!1,createRelationForm:Ee(),checkLoading:!1}},props:{fatherInfo:{type:Object,default:()=>({})}},components:{...W},watch:{"createRelationForm.sourceUserIntfNo"(){this.createRelationForm.sourceUserIntfName=``,this.createRelationForm.userIntfId=``},"createRelationForm.fold"(e){e||(this.createRelationForm.defaultFold=!1)},showCreateRelationFlag(){this.createRelationForm=Ee()},fatherInfo(e){e&&this.loadData()}},computed:{...H},methods:{...V,loadData(){this.fatherInfo?.userIntfId&&R({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){R({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,R({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(){R({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})}}}),Oe={style:{padding:`15px 0`}},ke={style:{height:`25px`,margin:`15px 0`}};function Ae(i,a,c,d,f,h){let g=O,_=S,b=w,x=k,C=A,j=L,M=y,P=E,F=T,I=D,R=N,z=B;return s(),r(`div`,null,[t(C,{modelValue:i.activeCollapseItemName,"onUpdate:modelValue":a[2]||=e=>i.activeCollapseItemName=e},{default:u(()=>[t(x,{name:`子窗体`,class:`sc-table`},{title:u(()=>[n(`section`,Oe,[e(i.$slots,`header`),t(g,{type:`primary`,link:``,onClick:a[0]||=p(e=>i.showAddFlag=!0,[`stop`])},{default:u(()=>[...a[10]||=[m(`新增`,-1)]]),_:1}),t(g,{type:`primary`,link:``,onClick:a[1]||=p(e=>i.showCreateRelationFlag=!0,[`stop`])},{default:u(()=>[...a[11]||=[m(`关联子窗体`,-1)]]),_:1})])]),default:u(()=>[t(b,{data:i.subList,stripe:!0,"row-class-name":i.tableRowClassName},{default:u(()=>[t(_,{prop:`childUserIntfNo`,label:`子窗体编号`}),t(_,{prop:`childUserIntfName`,label:`子窗体名称`}),t(_,{prop:`fold`,label:`是否支持收起`},{default:u(e=>[m(l(e.row.fold?`是`:`否`),1)]),_:1}),t(_,{prop:`defaultFold`,label:`默认为收起`},{default:u(e=>[m(l(e.row.defaultFold?`是`:`否`),1)]),_:1}),t(_,{label:`操作`},{default:u(e=>[t(g,{type:`primary`,link:``,onClick:t=>i.openDetailWithEditor(e.row)},{default:u(()=>[...a[12]||=[m(`设计`,-1)]]),_:1},8,[`onClick`]),t(g,{type:`danger`,link:``,onClick:t=>i.deleteSubUI(e.row)},{default:u(()=>[...a[13]||=[m(`删除`,-1)]]),_:1},8,[`onClick`])]),_:1})]),_:1},8,[`data`,`row-class-name`])]),_:3})]),_:3},8,[`modelValue`]),t(j,{modelValue:i.showAddFlag,"onUpdate:modelValue":a[3]||=e=>i.showAddFlag=e,coreName:`userIntf`,reloadHandler:i.createRelationAfterAdd},null,8,[`modelValue`,`reloadHandler`]),i.showCreateRelationFlag?(s(),v(R,{key:0,title:`给${i.fatherInfo[i.fatherCoreName+`No`]} ${i.fatherInfo[i.fatherCoreName+`Name`]}增加子窗体`,modelValue:i.showCreateRelationFlag,"onUpdate:modelValue":a[8]||=e=>i.showCreateRelationFlag=e,width:`500px`},{default:u(()=>[t(I,{ref:`createRelationForm`,model:i.createRelationForm,"label-position":`top`},{default:u(()=>[t(P,{label:`用户界面编号`},{default:u(()=>[t(M,{modelValue:i.createRelationForm.sourceUserIntfNo,"onUpdate:modelValue":a[4]||=e=>i.createRelationForm.sourceUserIntfNo=e,style:{display:`inline-block`,width:`325px`}},null,8,[`modelValue`]),t(g,{type:`primary`,loading:i.checkLoading,onClick:i.getSourceUserIntf,style:{float:`right`},disabled:!i.createRelationForm.sourceUserIntfNo},{default:u(()=>[...a[14]||=[m(`核验`,-1)]]),_:1},8,[`loading`,`onClick`,`disabled`])]),_:1}),t(P,{label:`用户界面名称`},{default:u(()=>[t(M,{modelValue:i.createRelationForm.sourceUserIntfName,"onUpdate:modelValue":a[5]||=e=>i.createRelationForm.sourceUserIntfName=e,disabled:!0},null,8,[`modelValue`])]),_:1}),t(P,null,{default:u(()=>[t(F,{modelValue:i.createRelationForm.fold,"onUpdate:modelValue":a[6]||=e=>i.createRelationForm.fold=e},{default:u(()=>[...a[15]||=[m(`是否支持收起`,-1)]]),_:1},8,[`modelValue`])]),_:1}),t(P,null,{default:u(()=>[t(F,{modelValue:i.createRelationForm.defaultFold,"onUpdate:modelValue":a[7]||=e=>i.createRelationForm.defaultFold=e,disabled:!i.createRelationForm.fold},{default:u(()=>[...a[16]||=[m(`默认为收起`,-1)]]),_:1},8,[`modelValue`,`disabled`])]),_:1}),n(`aside`,ke,[t(g,{type:`primary`,style:{float:`right`},onClick:i.submitCreateRelationForm,disabled:!i.createRelationForm.sourceUserIntfName},{default:u(()=>[...a[17]||=[m(`确定`,-1)]]),_:1},8,[`onClick`,`disabled`])])]),_:1},8,[`model`])]),_:1},8,[`title`,`modelValue`])):o(``,!0),t(z,{modelValue:i.showVersionFlag,"onUpdate:modelValue":a[9]||=e=>i.showVersionFlag=e,fatherSelectedItem:i.fatherInfo,coreName:i.fatherCoreName,description:i.description},null,8,[`modelValue`,`fatherSelectedItem`,`coreName`,`description`])])}var je=_(De,[[`render`,Ae]]),Me=()=>({moduleId:``,functionId:``,userIntfOperationList:[]}),Ne=i({name:`ui-op-manage`,components:{...W,EnableOpConfig:Q},data(){return{...U,componentName:`ui-op-manage`,activeCollapseItemName:[],subList:[],selectedItem:{},functionInfo:{},showAddFlag:!1,showEditFlag:!1,showEnableConfigFlag:!1,addForm:Me(),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:{...H,disableSubmitBtn(){return Reflect.ownKeys(this.temp_volumnAddForm_op).filter(e=>this.temp_volumnAddForm_op[e]===!0).length===0}},watch:{showAddFlag(e){this.addForm=Me(),this.moduleList=[],this.funcListOfModule=[],this.subFuncListOfFunc=[],e&&Y({zxlPrdId:this.$route.query.productId}).then(e=>{this.moduleList=e})},temp_volumnAddForm_op:{handler(e){let t=this.temp_volumnAddForm_isRowEntry;for(let n in t)e[n]==0&&(t[n]=!1)},immediate:!0,deep:!0},"addForm.moduleId"(e){this.addForm.functionId&&(this.addForm.functionId=``),e==``||e==null||e==null?this.funcListOfModule=[]:ee({zxlPrdId:this.$route.query.productId,moduleId:e}).then(e=>{this.funcListOfModule=e})},"addForm.functionId"(e){e==``||e==null||e==null?this.subFuncListOfFunc=[]:Z({zxlPrdId:this.$route.query.productId,functionId:e}).then(e=>{this.subFuncListOfFunc=e,e.forEach(e=>{this.temp_volumnAddForm_op[e.value]=!0,this.temp_volumnAddForm_isRowEntry[e.value]=!0})}),this.op_volumnAddForm={userIntfOperationList:[]};for(let e in this.temp_volumnAddForm_op)this.temp_volumnAddForm_op[e]=!1;for(let e in this.temp_volumnAddForm_isRowEntry)this.temp_volumnAddForm_isRowEntry[e]=!1},fatherInfo(e){e&&this.loadData()}},methods:{...V,loadData(){this.fatherInfo?.userIntfId&&(R({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}),R({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){R({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,R({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()})}}}),Pe={style:{padding:`15px 0`}},Fe={style:{height:`25px`,margin:`15px 0`}};function Ie(i,f,h,g,_,y){let b=O,j=S,M=w,P=k,F=A,I=C,R=x,z=E,B=T,V=D,H=N,U=L,W=d(`enable-op-config`);return s(),r(`div`,null,[t(F,{modelValue:i.activeCollapseItemName,"onUpdate:modelValue":f[2]||=e=>i.activeCollapseItemName=e},{default:u(()=>[t(P,{name:`界面子功能`,class:`sc-table`},{title:u(()=>[n(`section`,Pe,[e(i.$slots,`header`),t(b,{type:`primary`,link:``,onClick:f[0]||=p(e=>i.showAddFlag=!0,[`stop`])},{default:u(()=>[...f[8]||=[m(`关联子功能`,-1)]]),_:1}),i.functionInfo.authReferFieldId?(s(),v(b,{key:0,type:`primary`,link:``,onClick:f[1]||=p(e=>i.showEnableConfigFlag=!0,[`stop`])},{default:u(()=>[...f[9]||=[m(`可用配置`,-1)]]),_:1})):o(``,!0)])]),default:u(()=>[t(M,{data:i.subList,stripe:!0,"row-class-name":i.tableRowClassName},{default:u(()=>[t(j,{prop:`subfunctionNo`,label:`子功能编号`}),t(j,{prop:`subfunctionName`,label:`子功能名称`}),t(j,{prop:`functionName`,label:`功能名称`}),t(j,{prop:`moduleName`,label:`模块名称`}),t(j,{prop:`targetUserIntfName`,label:`目标界面`}),t(j,{prop:`buttonLabel`,label:`按钮名称`}),t(j,{prop:`rowFunction`,label:`是否行入口`},{default:u(e=>[m(l(e.row.rowFunction?`是`:`否`),1)]),_:1}),t(j,{prop:`putInMore`,label:`是否放入更多`},{default:u(e=>[m(l(e.row.putInMore?`是`:`否`),1)]),_:1}),t(j,{label:`操作`},{default:u(e=>[t(b,{type:`primary`,link:``,onClick:t=>i.show(e.row,`Edit`)},{default:u(()=>[...f[10]||=[m(`修改`,-1)]]),_:1},8,[`onClick`]),t(b,{type:`danger`,link:``,onClick:t=>i.deleteUserIntfOperation(e.row)},{default:u(()=>[...f[11]||=[m(`删除`,-1)]]),_:1},8,[`onClick`])]),_:1})]),_:1},8,[`data`,`row-class-name`])]),_:3})]),_:3},8,[`modelValue`]),i.showAddFlag?(s(),v(H,{key:0,title:`给${i.fatherInfo[i.fatherCoreName+`No`]} ${i.fatherInfo[i.fatherCoreName+`Name`]}增加子功能`,modelValue:i.showAddFlag,"onUpdate:modelValue":f[5]||=e=>i.showAddFlag=e,width:`500px`,"append-to-body":``},{default:u(()=>[t(V,{ref:`addForm`,rules:i.addRules,"label-width":`auto`,"label-position":`right`,model:i.addForm},{default:u(()=>[t(z,{label:`模块`,prop:`moduleId`},{default:u(()=>[t(R,{modelValue:i.addForm.moduleId,"onUpdate:modelValue":f[3]||=e=>i.addForm.moduleId=e,placeholder:`请选择`,onChange:i.update},{default:u(()=>[(s(!0),r(c,null,a(i.moduleList,(e,t)=>(s(),v(I,{key:t,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`onChange`])]),_:1}),t(z,{label:`功能`,prop:`functionId`},{default:u(()=>[t(R,{modelValue:i.addForm.functionId,"onUpdate:modelValue":f[4]||=e=>i.addForm.functionId=e,placeholder:`请选择`,disabled:!i.addForm.moduleId,onChange:i.update},{default:u(()=>[(s(!0),r(c,null,a(i.funcListOfModule,(e,t)=>(s(),v(I,{key:t,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`,`onChange`])]),_:1}),t(z,{prop:`userIntfOperationList`},{default:u(()=>[t(M,{data:i.subFuncListOfFunc},{default:u(()=>[t(j,{label:`子功能名称`,prop:`label`}),t(j,{label:`是否关联`},{default:u(e=>[t(B,{modelValue:i.temp_volumnAddForm_op[e.row.value],"onUpdate:modelValue":t=>i.temp_volumnAddForm_op[e.row.value]=t,style:{"margin-left":`22px`}},null,8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),t(j,{label:`是否行入口`},{default:u(e=>[t(B,{modelValue:i.temp_volumnAddForm_isRowEntry[e.row.value],"onUpdate:modelValue":t=>i.temp_volumnAddForm_isRowEntry[e.row.value]=t,disabled:!i.temp_volumnAddForm_op[e.row.value],style:{"margin-left":`33px`}},null,8,[`modelValue`,`onUpdate:modelValue`,`disabled`])]),_:1})]),_:1},8,[`data`])]),_:1}),n(`aside`,Fe,[t(b,{type:`primary`,style:{float:`right`},onClick:i.submitAddForm,disabled:i.disableSubmitBtn},{default:u(()=>[...f[12]||=[m(`确定`,-1)]]),_:1},8,[`onClick`,`disabled`])])]),_:1},8,[`rules`,`model`])]),_:1},8,[`title`,`modelValue`])):o(``,!0),t(U,{modelValue:i.showEditFlag,"onUpdate:modelValue":f[6]||=e=>i.showEditFlag=e,primaryKey:{fieldName:`hid`,value:i.activeRow.hid},coreName:i.coreName,reloadHandler:i.loadData},null,8,[`modelValue`,`primaryKey`,`coreName`,`reloadHandler`]),t(W,{modelValue:i.showEnableConfigFlag,"onUpdate:modelValue":f[7]||=e=>i.showEnableConfigFlag=e,reloadHandler:i.loadData,father:i.that,prop_functionId:i.functionInfo.functionId},null,8,[`modelValue`,`reloadHandler`,`father`,`prop_functionId`])])}var Le=_(Ne,[[`render`,Ie]]),Re=i({name:`ui-manage-design`,activated(){this.loadData()},components:{...W,UiSegManage:Te,BusinessRule:$,SubUiManage:je,UiOpManage:Le},data(){return{...U,componentName:`ui-manage`,activeCollapseItemName:[],hid:``,loading:!0,detailInfo:{},roleList:[],showEditFlag:!1,showPreviewFlag:!1}},props:{prop_userIntfId:String},computed:{...H,userIntfId(){return this.$route.query.userIntfId||this.prop_userIntfId}},mounted(){this.prop_userIntfId&&this.loadData()},methods:{...V,loadData(){this.loading=!0,R({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()}}}),ze={style:{display:`flex`,"align-items":`center`}};function Be(e,r,i,a,o,c){let h=O,_=L,y=d(`detail-template`),b=k,x=d(`sub-ui-manage`),S=d(`ui-seg-manage`),C=$,w=d(`ui-op-manage`),T=A,E=j,D=M,N=P;return s(),v(D,{class:`app-container`},{default:u(()=>[f((s(),v(E,null,{default:u(()=>[t(T,{modelValue:e.activeCollapseItemName,"onUpdate:modelValue":r[2]||=t=>e.activeCollapseItemName=t},{default:u(()=>[t(b,{name:`基本信息`},{title:u(()=>[n(`h2`,ze,[m(l(e.loading?`基本信息`:`${e.description} - ${e.detailInfo[e.coreName+`Name`]}(${e.detailInfo[e.coreName+`No`]})的基本信息`)+` `,1),t(h,{type:`primary`,link:``,style:{"margin-left":`30px`},onClick:r[0]||=p(t=>e.showEditFlag=!0,[`stop`])},{default:u(()=>[...r[3]||=[m(`修改`,-1)]]),_:1}),t(_,{modelValue:e.showEditFlag,"onUpdate:modelValue":r[1]||=t=>e.showEditFlag=t,primaryKey:{fieldName:`hid`,value:e.hid},coreName:e.coreName,reloadHandler:e.loadData},null,8,[`modelValue`,`primaryKey`,`coreName`,`reloadHandler`])])]),default:u(()=>[t(y,{mode:`direct`,primaryKey:{fieldName:`hid`,value:e.hid},coreName:e.coreName,refillData:e.detailInfo,showRelateObject:!1},null,8,[`primaryKey`,`coreName`,`refillData`])]),_:1}),f(t(x,{fatherInfo:e.detailInfo},{header:u(()=>[...r[4]||=[n(`h2`,{style:{display:`inline`,"margin-right":`30px`}},`子窗体`,-1)]]),_:1},8,[`fatherInfo`]),[[g,e.detailInfo.formFunctionType==`Multiple`]]),t(S,{fatherInfo:e.detailInfo},{header:u(()=>[...r[5]||=[n(`h2`,{style:{display:`inline`,"margin-right":`30px`}},`界面字段管理`,-1)]]),_:1},8,[`fatherInfo`]),t(C,{mark:{type:`ZxlPrdRequestUserIntf`,typeName:`用户界面`,coreName:`userIntf`,objectId:e.userIntfId}},null,8,[`mark`]),t(w,{fatherInfo:e.detailInfo},{header:u(()=>[...r[6]||=[n(`h2`,{style:{display:`inline`,"margin-right":`30px`}},`界面子功能`,-1)]]),_:1},8,[`fatherInfo`])]),_:1},8,[`modelValue`])]),_:1})),[[N,e.loading]])]),_:1})}var Ve=_(Re,[[`render`,Be],[`__scopeId`,`data-v-63f6c831`]]);export{Te as n,Ve as t};