import{$ as e,C as t,O as n,Q as r,S as i,T as a,Y as o,Z as s,cn as c,dt as l,f as u,ft as d,g as f,j as p,k as m,m as h,mn as g,w as _}from"./vue.runtime.esm-bundler-DpGzKKN4.js";import{i as v,o as y}from"./GxPagination-DOexUzbO.js";import{m as b}from"./vnode-DU8g6Rf7.js";import{a as x,n as S,r as C,t as w}from"./table-C_Bpc8FZ.js";import{n as T,t as E}from"./form-Bb1_iOEA.js";import{t as D}from"./button-CHjzS7b0.js";import{n as O,t as k}from"./collapse-B9-372uV.js";import{a as A,n as j}from"./css-BYms2pL-.js";import{t as M}from"./dialog-BLJqz3g4.js";import{t as N}from"./directive-9SA1IQHd.js";import{t as P}from"./loading-BNccgbvN.js";import{t as F}from"./_plugin-vue_export-helper-CnS4QQza.js";import"./css-DxP8XCTD.js";import"./css-CvqL1q4I.js";import"./css-CW_FwBqc2.js";import"./css-j23UczC-.js";import{r as I}from"./useStructurizedVersionDialog-CNAsWSWf.js";import"./css-DunA3L7q.js";import{n as L}from"./request-CWxGgYu0.js";import{r as R}from"./utils-cLZb83du.js";import{t as z}from"./css-DREb2J8s.js";import"./css-ropEN6qH.js";import"./css-BrGVMe3H.js";import"./css-70Wp40ko.js";import{d as B,i as V,n as H,r as U,t as W}from"./view_base_options-B9YSRjyH.js";import"./css-YIqg8Ucx.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-C2AL-O6x.js";import{t as Q}from"./enable-op-config-DNxC07Lj.js";import{t as te}from"./html2canvas-WC_UUsLW.js";import{t as $}from"./business-rule-Ia3Q2pDC.js";var ne=g(z()),re=g(te()),ie=`
<!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>
`,ae=new ne.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,ie),e&&this.$nextTick(()=>{var e=this.$refs.FormEngine,t=e.contentDocument||e.contentWindow.document;t.open(),t.write(ie),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,re.default)(e).then(e=>{e.toBlob(e=>{R(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(e,s,c,u,f,p){let m=D,h=M,g=N;return o(),t(h,{title:`${c.title}的预览`,visible:c.showFlag,width:`1200px`,onOpen:p.openHandler,onClose:p.closeHandler,"append-to-body":``},{default:l(()=>[i(`section`,se,[c.enableDownloadShot?(o(),t(m,{key:0,type:`primary`,size:`small`,onClick:s[0]||=()=>p.capture()},{default:l(()=>[...s[1]||=[n(` 下载截图 `,-1)]]),_:1})):_(``,!0),r(e.$slots,`btnGroup`,{previewAreaNode:e.$refs.previewArea})]),d((o(),a(`section`,ce,[i(`section`,le,[f.xmlRawData?(o(),a(`iframe`,ue,null,512)):(o(),a(`span`,de,`暂无数据`)),s[2]||=i(`div`,{style:{clear:`both`}},null,-1)],512)])),[[g,f.loading]])]),_:3},8,[`title`,`visible`,`onOpen`,`onClose`])}var pe=F(oe,[[`render`,fe]]),me=()=>({sourceUserIntfId:``}),he=p({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=P.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,L({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(){L({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(u,p,g,b,A,j){let P=D,F=S,L=w,R=O,z=k,V=I,H=C,U=x,W=M,ee=v,G=y,K=T,q=E,J=e(`detail-template`),Y=B,X=e(`batch-edit`),Z=pe,Q=N;return u.showUISegManage?(o(),a(`div`,ge,[m(z,{modelValue:u.activeCollapseItemName,"onUpdate:modelValue":p[5]||=e=>u.activeCollapseItemName=e},{default:l(()=>[m(R,{name:`界面字段管理`},{title:l(()=>[i(`section`,_e,[i(`aside`,null,[r(u.$slots,`header`),m(P,{type:`primary`,link:``,onClick:p[0]||=h(e=>u.showAddFlag=!0,[`stop`])},{default:l(()=>[...p[17]||=[n(`新增`,-1)]]),_:1}),m(P,{type:`primary`,link:``,onClick:p[1]||=h(e=>u.se_showImportFromEntityFlag=!0,[`stop`])},{default:l(()=>[...p[18]||=[n(`从数据实体导入`,-1)]]),_:1}),m(P,{type:`primary`,link:``,onClick:p[2]||=h(e=>u.showCopySegFlag=!0,[`stop`])},{default:l(()=>[...p[19]||=[n(`复制字段`,-1)]]),_:1}),m(P,{type:`primary`,link:``,disabled:u.se_mainTableData.length==0,onClick:p[3]||=h(e=>u.showBatchEditFlag=!0,[`stop`])},{default:l(()=>[...p[20]||=[n(`批量编辑`,-1)]]),_:1},8,[`disabled`]),m(P,{type:`primary`,link:``,disabled:u.se_mainTableData.length==0,onClick:p[4]||=h(e=>u.showPreviewFlag=!0,[`stop`])},{default:l(()=>[...p[21]||=[n(`预览`,-1)]]),_:1},8,[`disabled`])])])]),default:l(()=>[m(L,{ref:`se_mainTable`,data:u.se_mainTableData,stripe:!0,"row-class-name":u.tableRowClassName},{default:l(()=>[(o(!0),a(f,null,s(u.uiSegPropList,(e,r)=>(o(),a(f,{key:r},[e.slot?(o(),t(F,{key:1,label:e.label,width:e.width||`auto`},{default:l(t=>[n(c(e.slot(t.row)),1)]),_:2},1032,[`label`,`width`])):(o(),t(F,{key:0,prop:e.prop,label:e.label,width:e.width||`auto`},null,8,[`prop`,`label`,`width`]))],64))),128)),m(F,{label:`操作`,width:`200`},{default:l(e=>[m(P,{type:`primary`,link:``,onClick:t=>u.show(e.row,`Detail`)},{default:l(()=>[...p[22]||=[n(`详情`,-1)]]),_:1},8,[`onClick`]),m(P,{type:`primary`,link:``,onClick:t=>u.show(e.row,`Edit`)},{default:l(()=>[...p[23]||=[n(`修改`,-1)]]),_:1},8,[`onClick`]),m(P,{type:`primary`,link:``,onClick:t=>u.show(e.row,`Version`)},{default:l(()=>[...p[24]||=[n(`版本`,-1)]]),_:1},8,[`onClick`]),m(P,{type:`danger`,link:``,onClick:t=>u.deleteSegment(e.row)},{default:l(()=>[...p[25]||=[n(`删除`,-1)]]),_:1},8,[`onClick`])]),_:1})]),_:1},8,[`data`,`row-class-name`])]),_:3})]),_:3},8,[`modelValue`]),m(V,{modelValue:u.showAddFlag,"onUpdate:modelValue":p[6]||=e=>u.showAddFlag=e,fatherCoreName:u.fatherCoreName,fatherId:u.fatherInfo[u.fatherCoreName+`Id`],coreName:u.coreName,reloadHandler:u.loadData,params:{formFunctionType:u.fatherInfo.formFunctionType,tabTitle:u.fatherInfo.tabTitle}},null,8,[`modelValue`,`fatherCoreName`,`fatherId`,`coreName`,`reloadHandler`,`params`]),m(V,{modelValue:u.showEditFlag,"onUpdate:modelValue":p[7]||=e=>u.showEditFlag=e,fatherCoreName:u.fatherCoreName,fatherId:u.fatherInfo[u.fatherCoreName+`Id`],primaryKey:{fieldName:`hid`,value:u.activeRow.hid},coreName:u.coreName,reloadHandler:u.loadData,params:{formFunctionType:u.fatherInfo.formFunctionType,tabTitle:u.fatherInfo.tabTitle}},null,8,[`modelValue`,`fatherCoreName`,`fatherId`,`primaryKey`,`coreName`,`reloadHandler`,`params`]),u.se_showImportFromEntityFlag?(o(),t(W,{key:0,title:`从数据实体导入字段`,modelValue:u.se_showImportFromEntityFlag,"onUpdate:modelValue":p[9]||=e=>u.se_showImportFromEntityFlag=e,width:`500px`,"append-to-body":``},{default:l(()=>[d((o(),a(`div`,null,[u.segmentList.length>0?(o(),a(`header`,ve,[i(`aside`,ye,`已选条数/总条数：`+c(u.importForm.importFieldIds.length)+` / `+c(u.segmentList.length),1),i(`aside`,be,[m(P,{type:`primary`,link:``,onClick:u.selectAll},{default:l(()=>[...p[26]||=[n(`全选`,-1)]]),_:1},8,[`onClick`]),m(P,{type:`primary`,link:``,onClick:u.selectReverse},{default:l(()=>[...p[27]||=[n(`反选`,-1)]]),_:1},8,[`onClick`])])])):_(``,!0),u.segmentList.length>0?(o(),t(U,{key:1,modelValue:u.importForm.importFieldIds,"onUpdate:modelValue":p[8]||=e=>u.importForm.importFieldIds=e,style:{"max-height":`300px`,overflow:`auto`}},{default:l(()=>[(o(!0),a(f,null,s(u.segmentList,(e,r)=>(o(),t(H,{key:r,label:e.fieldObId,placeholder:`请选择需导入字段`,style:{width:`80%`}},{default:l(()=>[n(c(e.fieldNo+` `+e.fieldNameCn),1)]),_:2},1032,[`label`]))),128))]),_:1},8,[`modelValue`])):(o(),a(`h3`,xe,`不存在可导入的字段`)),u.segmentList.length>0?(o(),a(`aside`,Se,[m(P,{type:`primary`,onClick:u.importSegmentList,disabled:u.importForm.importFieldIds.length==0},{default:l(()=>[...p[28]||=[n(`确定`,-1)]]),_:1},8,[`onClick`,`disabled`])])):_(``,!0)])),[[Q,u.segmentListLoading]])]),_:1},8,[`modelValue`])):_(``,!0),u.showCopySegFlag?(o(),t(W,{key:1,title:`复制用户界面字段`,modelValue:u.showCopySegFlag,"onUpdate:modelValue":p[11]||=e=>u.showCopySegFlag=e,width:`500px`,"append-to-body":``},{default:l(()=>[m(q,{ref:`CopySegForm`,model:u.CopySegForm,"label-position":`top`},{default:l(()=>[m(K,{label:`源用户界面`},{default:l(()=>[m(G,{modelValue:u.CopySegForm.sourceUserIntfId,"onUpdate:modelValue":p[10]||=e=>u.CopySegForm.sourceUserIntfId=e,clearable:``,filterable:``},{default:l(()=>[(o(!0),a(f,null,s(u.UIList,(e,n)=>(o(),t(ee,{key:n,label:e.userIntfNo+` `+e.userIntfName,value:e.userIntfId},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`])]),_:1})]),_:1},8,[`model`]),i(`aside`,Ce,[m(P,{type:`primary`,style:{float:`right`},onClick:u.submitCopySegForm,loading:u.pendingCopyUISeg,disabled:!u.CopySegForm.sourceUserIntfId},{default:l(()=>[...p[29]||=[n(`确定`,-1)]]),_:1},8,[`onClick`,`loading`,`disabled`])])]),_:1},8,[`modelValue`])):_(``,!0),m(J,{modelValue:u.showDetailFlag,"onUpdate:modelValue":p[12]||=e=>u.showDetailFlag=e,primaryKey:{fieldName:`hid`,value:u.selectedItem.hid},coreName:u.coreName},null,8,[`modelValue`,`primaryKey`,`coreName`]),m(Y,{modelValue:u.showVersionFlag,"onUpdate:modelValue":p[13]||=e=>u.showVersionFlag=e,fatherInfo:u.selectedItem,coreName:u.coreName,description:u.description},null,8,[`modelValue`,`fatherInfo`,`coreName`,`description`]),m(X,{modelValue:u.showBatchEditFlag,"onUpdate:modelValue":p[15]||=e=>u.showBatchEditFlag=e,fatherCoreName:`userIntf`,fatherInfo:u.fatherInfo,coreName:u.coreName,refillData:u.se_mainTableData,reloadHandler:u.loadData,params:{formFunctionType:u.fatherInfo.formFunctionType,tabTitle:u.fatherInfo.tabTitle}},{"batch-btn-group":l(()=>[m(P,{type:`primary`,size:`small`,disabled:u.se_mainTableData.length==0,onClick:p[14]||=h(e=>u.showPreviewFlag=!0,[`stop`])},{default:l(()=>[...p[30]||=[n(`预览`,-1)]]),_:1},8,[`disabled`])]),_:1},8,[`modelValue`,`fatherInfo`,`coreName`,`refillData`,`reloadHandler`,`params`]),m(Z,{modelValue:u.showPreviewFlag,"onUpdate:modelValue":p[16]||=e=>u.showPreviewFlag=e,loadParams:{userIntfId:u.fatherInfo.userIntfId},enableDownloadShot:!0,title:u.fatherInfo.userIntfNo+`_`+u.fatherInfo.userIntfName},null,8,[`modelValue`,`loadParams`,`title`])])):_(``,!0)}var Te=F(he,[[`render`,we]]),Ee=()=>({sourceUserIntfNo:``,userIntfId:``,sourceUserIntfName:``,fold:!0,defaultFold:!0}),De=p({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&&L({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){L({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,L({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(){L({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(e,s,u,d,f,p){let g=D,v=S,y=w,x=O,A=k,j=I,N=b,P=T,F=C,L=E,R=M,z=B;return o(),a(`div`,null,[m(A,{modelValue:e.activeCollapseItemName,"onUpdate:modelValue":s[2]||=t=>e.activeCollapseItemName=t},{default:l(()=>[m(x,{name:`子窗体`,class:`sc-table`},{title:l(()=>[i(`section`,Oe,[r(e.$slots,`header`),m(g,{type:`primary`,link:``,onClick:s[0]||=h(t=>e.showAddFlag=!0,[`stop`])},{default:l(()=>[...s[10]||=[n(`新增`,-1)]]),_:1}),m(g,{type:`primary`,link:``,onClick:s[1]||=h(t=>e.showCreateRelationFlag=!0,[`stop`])},{default:l(()=>[...s[11]||=[n(`关联子窗体`,-1)]]),_:1})])]),default:l(()=>[m(y,{data:e.subList,stripe:!0,"row-class-name":e.tableRowClassName},{default:l(()=>[m(v,{prop:`childUserIntfNo`,label:`子窗体编号`}),m(v,{prop:`childUserIntfName`,label:`子窗体名称`}),m(v,{prop:`fold`,label:`是否支持收起`},{default:l(e=>[n(c(e.row.fold?`是`:`否`),1)]),_:1}),m(v,{prop:`defaultFold`,label:`默认为收起`},{default:l(e=>[n(c(e.row.defaultFold?`是`:`否`),1)]),_:1}),m(v,{label:`操作`},{default:l(t=>[m(g,{type:`primary`,link:``,onClick:n=>e.openDetailWithEditor(t.row)},{default:l(()=>[...s[12]||=[n(`设计`,-1)]]),_:1},8,[`onClick`]),m(g,{type:`danger`,link:``,onClick:n=>e.deleteSubUI(t.row)},{default:l(()=>[...s[13]||=[n(`删除`,-1)]]),_:1},8,[`onClick`])]),_:1})]),_:1},8,[`data`,`row-class-name`])]),_:3})]),_:3},8,[`modelValue`]),m(j,{modelValue:e.showAddFlag,"onUpdate:modelValue":s[3]||=t=>e.showAddFlag=t,coreName:`userIntf`,reloadHandler:e.createRelationAfterAdd},null,8,[`modelValue`,`reloadHandler`]),e.showCreateRelationFlag?(o(),t(R,{key:0,title:`给${e.fatherInfo[e.fatherCoreName+`No`]} ${e.fatherInfo[e.fatherCoreName+`Name`]}增加子窗体`,modelValue:e.showCreateRelationFlag,"onUpdate:modelValue":s[8]||=t=>e.showCreateRelationFlag=t,width:`500px`},{default:l(()=>[m(L,{ref:`createRelationForm`,model:e.createRelationForm,"label-position":`top`},{default:l(()=>[m(P,{label:`用户界面编号`},{default:l(()=>[m(N,{modelValue:e.createRelationForm.sourceUserIntfNo,"onUpdate:modelValue":s[4]||=t=>e.createRelationForm.sourceUserIntfNo=t,style:{display:`inline-block`,width:`325px`}},null,8,[`modelValue`]),m(g,{type:`primary`,loading:e.checkLoading,onClick:e.getSourceUserIntf,style:{float:`right`},disabled:!e.createRelationForm.sourceUserIntfNo},{default:l(()=>[...s[14]||=[n(`核验`,-1)]]),_:1},8,[`loading`,`onClick`,`disabled`])]),_:1}),m(P,{label:`用户界面名称`},{default:l(()=>[m(N,{modelValue:e.createRelationForm.sourceUserIntfName,"onUpdate:modelValue":s[5]||=t=>e.createRelationForm.sourceUserIntfName=t,disabled:!0},null,8,[`modelValue`])]),_:1}),m(P,null,{default:l(()=>[m(F,{modelValue:e.createRelationForm.fold,"onUpdate:modelValue":s[6]||=t=>e.createRelationForm.fold=t},{default:l(()=>[...s[15]||=[n(`是否支持收起`,-1)]]),_:1},8,[`modelValue`])]),_:1}),m(P,null,{default:l(()=>[m(F,{modelValue:e.createRelationForm.defaultFold,"onUpdate:modelValue":s[7]||=t=>e.createRelationForm.defaultFold=t,disabled:!e.createRelationForm.fold},{default:l(()=>[...s[16]||=[n(`默认为收起`,-1)]]),_:1},8,[`modelValue`,`disabled`])]),_:1}),i(`aside`,ke,[m(g,{type:`primary`,style:{float:`right`},onClick:e.submitCreateRelationForm,disabled:!e.createRelationForm.sourceUserIntfName},{default:l(()=>[...s[17]||=[n(`确定`,-1)]]),_:1},8,[`onClick`,`disabled`])])]),_:1},8,[`model`])]),_:1},8,[`title`,`modelValue`])):_(``,!0),m(z,{modelValue:e.showVersionFlag,"onUpdate:modelValue":s[9]||=t=>e.showVersionFlag=t,fatherSelectedItem:e.fatherInfo,coreName:e.fatherCoreName,description:e.description},null,8,[`modelValue`,`fatherSelectedItem`,`coreName`,`description`])])}var je=F(De,[[`render`,Ae]]),Me=()=>({moduleId:``,functionId:``,userIntfOperationList:[]}),Ne=p({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&&(L({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}),L({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){L({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,L({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(u,d,p,g,b,x){let A=D,j=S,N=w,P=O,F=k,L=v,R=y,z=T,B=C,V=E,H=M,U=I,W=e(`enable-op-config`);return o(),a(`div`,null,[m(F,{modelValue:u.activeCollapseItemName,"onUpdate:modelValue":d[2]||=e=>u.activeCollapseItemName=e},{default:l(()=>[m(P,{name:`界面子功能`,class:`sc-table`},{title:l(()=>[i(`section`,Pe,[r(u.$slots,`header`),m(A,{type:`primary`,link:``,onClick:d[0]||=h(e=>u.showAddFlag=!0,[`stop`])},{default:l(()=>[...d[8]||=[n(`关联子功能`,-1)]]),_:1}),u.functionInfo.authReferFieldId?(o(),t(A,{key:0,type:`primary`,link:``,onClick:d[1]||=h(e=>u.showEnableConfigFlag=!0,[`stop`])},{default:l(()=>[...d[9]||=[n(`可用配置`,-1)]]),_:1})):_(``,!0)])]),default:l(()=>[m(N,{data:u.subList,stripe:!0,"row-class-name":u.tableRowClassName},{default:l(()=>[m(j,{prop:`subfunctionNo`,label:`子功能编号`}),m(j,{prop:`subfunctionName`,label:`子功能名称`}),m(j,{prop:`functionName`,label:`功能名称`}),m(j,{prop:`moduleName`,label:`模块名称`}),m(j,{prop:`targetUserIntfName`,label:`目标界面`}),m(j,{prop:`buttonLabel`,label:`按钮名称`}),m(j,{prop:`rowFunction`,label:`是否行入口`},{default:l(e=>[n(c(e.row.rowFunction?`是`:`否`),1)]),_:1}),m(j,{prop:`putInMore`,label:`是否放入更多`},{default:l(e=>[n(c(e.row.putInMore?`是`:`否`),1)]),_:1}),m(j,{label:`操作`},{default:l(e=>[m(A,{type:`primary`,link:``,onClick:t=>u.show(e.row,`Edit`)},{default:l(()=>[...d[10]||=[n(`修改`,-1)]]),_:1},8,[`onClick`]),m(A,{type:`danger`,link:``,onClick:t=>u.deleteUserIntfOperation(e.row)},{default:l(()=>[...d[11]||=[n(`删除`,-1)]]),_:1},8,[`onClick`])]),_:1})]),_:1},8,[`data`,`row-class-name`])]),_:3})]),_:3},8,[`modelValue`]),u.showAddFlag?(o(),t(H,{key:0,title:`给${u.fatherInfo[u.fatherCoreName+`No`]} ${u.fatherInfo[u.fatherCoreName+`Name`]}增加子功能`,modelValue:u.showAddFlag,"onUpdate:modelValue":d[5]||=e=>u.showAddFlag=e,width:`500px`,"append-to-body":``},{default:l(()=>[m(V,{ref:`addForm`,rules:u.addRules,"label-width":`auto`,"label-position":`right`,model:u.addForm},{default:l(()=>[m(z,{label:`模块`,prop:`moduleId`},{default:l(()=>[m(R,{modelValue:u.addForm.moduleId,"onUpdate:modelValue":d[3]||=e=>u.addForm.moduleId=e,placeholder:`请选择`,onChange:u.update},{default:l(()=>[(o(!0),a(f,null,s(u.moduleList,(e,n)=>(o(),t(L,{key:n,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`onChange`])]),_:1}),m(z,{label:`功能`,prop:`functionId`},{default:l(()=>[m(R,{modelValue:u.addForm.functionId,"onUpdate:modelValue":d[4]||=e=>u.addForm.functionId=e,placeholder:`请选择`,disabled:!u.addForm.moduleId,onChange:u.update},{default:l(()=>[(o(!0),a(f,null,s(u.funcListOfModule,(e,n)=>(o(),t(L,{key:n,label:e.label,value:e.value},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`,`onChange`])]),_:1}),m(z,{prop:`userIntfOperationList`},{default:l(()=>[m(N,{data:u.subFuncListOfFunc},{default:l(()=>[m(j,{label:`子功能名称`,prop:`label`}),m(j,{label:`是否关联`},{default:l(e=>[m(B,{modelValue:u.temp_volumnAddForm_op[e.row.value],"onUpdate:modelValue":t=>u.temp_volumnAddForm_op[e.row.value]=t,style:{"margin-left":`22px`}},null,8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),m(j,{label:`是否行入口`},{default:l(e=>[m(B,{modelValue:u.temp_volumnAddForm_isRowEntry[e.row.value],"onUpdate:modelValue":t=>u.temp_volumnAddForm_isRowEntry[e.row.value]=t,disabled:!u.temp_volumnAddForm_op[e.row.value],style:{"margin-left":`33px`}},null,8,[`modelValue`,`onUpdate:modelValue`,`disabled`])]),_:1})]),_:1},8,[`data`])]),_:1}),i(`aside`,Fe,[m(A,{type:`primary`,style:{float:`right`},onClick:u.submitAddForm,disabled:u.disableSubmitBtn},{default:l(()=>[...d[12]||=[n(`确定`,-1)]]),_:1},8,[`onClick`,`disabled`])])]),_:1},8,[`rules`,`model`])]),_:1},8,[`title`,`modelValue`])):_(``,!0),m(U,{modelValue:u.showEditFlag,"onUpdate:modelValue":d[6]||=e=>u.showEditFlag=e,primaryKey:{fieldName:`hid`,value:u.activeRow.hid},coreName:u.coreName,reloadHandler:u.loadData},null,8,[`modelValue`,`primaryKey`,`coreName`,`reloadHandler`]),m(W,{modelValue:u.showEnableConfigFlag,"onUpdate:modelValue":d[7]||=e=>u.showEnableConfigFlag=e,reloadHandler:u.loadData,father:u.that,prop_functionId:u.functionInfo.functionId},null,8,[`modelValue`,`reloadHandler`,`father`,`prop_functionId`])])}var Le=F(Ne,[[`render`,Ie]]),Re=p({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,L({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(r,a,s,f,p,g){let _=D,v=I,y=e(`detail-template`),b=O,x=e(`sub-ui-manage`),S=e(`ui-seg-manage`),C=$,w=e(`ui-op-manage`),T=k,E=A,M=j,P=N;return o(),t(M,{class:`app-container`},{default:l(()=>[d((o(),t(E,null,{default:l(()=>[m(T,{modelValue:r.activeCollapseItemName,"onUpdate:modelValue":a[2]||=e=>r.activeCollapseItemName=e},{default:l(()=>[m(b,{name:`基本信息`},{title:l(()=>[i(`h2`,ze,[n(c(r.loading?`基本信息`:`${r.description} - ${r.detailInfo[r.coreName+`Name`]}(${r.detailInfo[r.coreName+`No`]})的基本信息`)+` `,1),m(_,{type:`primary`,link:``,style:{"margin-left":`30px`},onClick:a[0]||=h(e=>r.showEditFlag=!0,[`stop`])},{default:l(()=>[...a[3]||=[n(`修改`,-1)]]),_:1}),m(v,{modelValue:r.showEditFlag,"onUpdate:modelValue":a[1]||=e=>r.showEditFlag=e,primaryKey:{fieldName:`hid`,value:r.hid},coreName:r.coreName,reloadHandler:r.loadData},null,8,[`modelValue`,`primaryKey`,`coreName`,`reloadHandler`])])]),default:l(()=>[m(y,{mode:`direct`,primaryKey:{fieldName:`hid`,value:r.hid},coreName:r.coreName,refillData:r.detailInfo,showRelateObject:!1},null,8,[`primaryKey`,`coreName`,`refillData`])]),_:1}),d(m(x,{fatherInfo:r.detailInfo},{header:l(()=>[...a[4]||=[i(`h2`,{style:{display:`inline`,"margin-right":`30px`}},`子窗体`,-1)]]),_:1},8,[`fatherInfo`]),[[u,r.detailInfo.formFunctionType==`Multiple`]]),m(S,{fatherInfo:r.detailInfo},{header:l(()=>[...a[5]||=[i(`h2`,{style:{display:`inline`,"margin-right":`30px`}},`界面字段管理`,-1)]]),_:1},8,[`fatherInfo`]),m(C,{mark:{type:`ZxlPrdRequestUserIntf`,typeName:`用户界面`,coreName:`userIntf`,objectId:r.userIntfId}},null,8,[`mark`]),m(w,{fatherInfo:r.detailInfo},{header:l(()=>[...a[6]||=[i(`h2`,{style:{display:`inline`,"margin-right":`30px`}},`界面子功能`,-1)]]),_:1},8,[`fatherInfo`])]),_:1},8,[`modelValue`])]),_:1})),[[P,r.loading]])]),_:1})}var Ve=F(Re,[[`render`,Be],[`__scopeId`,`data-v-63f6c831`]]);export{Te as n,Ve as t};