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