| 1 |
- import{D as e,h as t,j as l,i as o,c as a,_ as i,q as n,n as d,o as s,d as f,e as r,p as c,r as m,a as u,f as _,g as p,k as g,l as h,m as y,b}from"./index.D5H39cMc.js";import{a2 as V,$ as k,bg as C,bf as x,aJ as j,c as D,o as I,X as T,t as v,p as K,w as M,D as F,F as w,v as S,x as U,y as L,B as A,E as O,z as $,A as J,H as B,q as R,I as N}from"./index-P0fyQ2Em.js";import{r as q}from"./uni-app.es.DOtS5Ldl.js";import{_ as H,a as P}from"./u-form.B1LWETT2.js";import{_ as W}from"./index.BLChm46K.js";import{_ as z}from"./index.-5h2Pj7y.js";import{a as G,_ as E}from"./index.Du-JSu8j.js";import{_ as X}from"./index.D-SsN0gl.js";import{_ as Q}from"./index.DgjoBC2V.js";import{_ as Z}from"./u-icon.wXcRZHbn.js";import{_ as Y}from"./u-input.Cp2bygnN.js";import{_ as ee}from"./u-tabs.DEel8MQB.js";import{_ as te}from"./_plugin-vue_export-helper.BCo6x5W8.js";const le=["link","editor","button","alert"];const oe=te({components:{Item:te({name:"Item",components:{DisplayList:e},props:{itemData:{type:Object,required:!0},formConf:{type:Object,required:!0},formData:{type:Object}},computed:{item(){const e=uni.$u.deepClone(this.itemData);return this.initI18n(e),e},config(){return this.item.__config__},labelWidth(){return le.indexOf(this.config.jnpfKey)>-1?0:this.config.labelWidth?1.5*this.config.labelWidth:void 0},label(){return this.config.showLabel&&le.indexOf(this.config.jnpfKey)<0?this.config.label:""},realLabel(){return this.label?this.label+(this.formConf.labelSuffix||""):""},leftIcon(){return this.config.tipLabel&&this.label&&this.config.showLabel?"question-circle-fill":""}},data:()=>({tabCurrent:0,tableData:[],summaryField:[],stepCurrent:0,extraObj:{}}),created(){this.handleSummary(),this.handleTab()},mounted(){"collapse"===this.config.jnpfKey&&this.$refs.collapseRef&&this.$refs.collapseRef.init(),V("initCollapse",(()=>{this.$refs.collapseRef&&this.$refs.collapseRef.init()})),this.getDataChange(),this.getDataInterfaceDataInfoByIds()},methods:{onStepChange(e,t){this.stepCurrent!==e&&(t.__config__.active=e,this.stepCurrent=e,this.$nextTick((()=>{k("updateCode"),k("initCollapse")})))},initI18n(e){const t=e.__config__;if(e.placeholderI18nCode&&(e.placeholder=this.$t(e.placeholderI18nCode,e.placeholder)),e.__config__.label&&e.__config__.labelI18nCode&&(e.__config__.label=this.$t(e.__config__.labelI18nCode,e.__config__.label)),e.__config__.tipLabel&&e.__config__.tipLabelI18nCode&&(e.__config__.tipLabel=this.$t(e.__config__.tipLabelI18nCode,e.__config__.tipLabel)),["groupTitle","divider","link","text"].includes(t.jnpfKey)&&(e.contentI18nCode&&(e.content=this.$t(e.contentI18nCode,e.content)),e.helpMessageI18nCode&&(e.helpMessage=this.$t(e.helpMessageI18nCode,e.helpMessage))),"button"===t.jnpfKey&&e.buttonTextI18nCode&&(e.buttonText=this.$t(e.buttonTextI18nCode.item.buttonText)),"alert"===t.jnpfKey&&(e.titleI18nCode&&(e.title=this.$t(e.titleI18nCode,e.title)),e.descriptionI18nCode&&(e.description=this.$t(e.descriptionI18nCode,e.description)),e.closeTextI18nCode&&(e.closeText=this.$t(e.closeTextI18nCode,e.closeText))),"card"===t.jnpfKey&&e.headerI18nCode&&(e.header=this.$t(e.headerI18nCode,e.header)),["tab","collapse","steps"].includes(t.jnpfKey)){if(t.children&&t.children.length)for(let e=0;e<t.children.length;e++)t.children[e].titleI18nCode&&(t.children[e].title=this.$t(t.children[e].titleI18nCode,t.children[e].title));e.headerI18nCode&&(e.header=this.$t(e.headerI18nCode,e.header))}if("table"===t.jnpfKey&&t.children&&t.children.length)for(let l=0;l<t.children.length;l++)this.initI18n(t.children[l])},handleTab(){if("steps"===this.config.jnpfKey)return this.stepCurrent=this.config.active;if("tab"===this.config.jnpfKey)for(var e=0;e<this.config.children.length;e++)if(this.config.active==this.config.children[e].name){this.tabCurrent=e;break}},getDataChange(){if("relationForm"===this.config.jnpfKey&&this.config.defaultValue){let e={id:this.formData[this.item.__vModel__+"_id"]};this.item.propsValue&&(e={...e,propsValue:this.item.propsValue}),C(this.item.modelId,e).then((e=>{var t;if(!e.data||!e.data.data||"undefined"===e.data.data)return;let l=JSON.parse(null==(t=e.data)?void 0:t.data);this.extraObj=l}))}},getDataInterfaceDataInfoByIds(){if("popupSelect"===this.config.jnpfKey&&this.config.defaultValue){let e={ids:[this.config.defaultValue],interfaceId:this.item.interfaceId,propsValue:this.item.propsValue,relationField:this.item.relationField,paramList:this.getParamList()};x(this.item.interfaceId,e).then((e=>{const t=e.data&&e.data.length?e.data[0]:{};this.extraObj=t}))}},getParamList(){let e=this.item.templateJson;if(!this.formData)return e;for(let t=0;t<e.length;t++)if(e[t].relationField&&1==e[t].sourceType)if(e[t].relationField.includes("-")){let l=e[t].relationField.split("-")[0],o=e[t].relationField.split("-")[1];e[t].defaultValue=this.formData[l]&&this.formData[l][this.rowIndex]&&this.formData[l][this.rowIndex][o]||""}else e[t].defaultValue=this.formData[e[t].relationField]||"";return e},handleSummary(){if("table"!==this.item.__config__.jnpfKey)return;const e=this.item.__config__.defaultValue;let t=this.item.summaryField||[];this.summaryField=[],this.tableData=this.item.__config__.children||[];for(let l=0;l<t.length;l++)for(let e=0;e<this.tableData.length;e++){const o=this.tableData[e];this.tableData[e].__vModel__!==t[l]||o.__config__.noShow||this.summaryField.push({value:"",...o})}this.$nextTick((()=>this.getTableSummaries(e,this.item)))},toThousands(e,t){if(e){let l=e.toString().split("."),o=Number(l[0]),a=t.thousands?o.toLocaleString():o;return l[1]?a+"."+l[1]:a}return e},getTableSummaries(e,t){for(let l=0;l<this.summaryField.length;l++){let t=0;for(let a=0;a<e.length;a++)if(e[a][this.summaryField[l].__vModel__]){t+=isNaN(e[a][this.summaryField[l].__vModel__])?0:Number(e[a][this.summaryField[l].__vModel__])}let o=t&&!Number.isInteger(t)?Number(t).toFixed(2):t;this.summaryField[l].thousands&&(o=Number(o).toLocaleString("zh")),this.summaryField[l].value=o}},clickIcon(e){this.$emit("clickIcon",e)},onTabChange(e){this.tabCurrent!==e&&(this.tabCurrent=e,this.$emit("tab-change",this.item,e),this.$nextTick((()=>{k("initCollapse"),k("updateCode")})))},doPreviewImage(e,t){const l=t.map((e=>this.define.baseURL+e.url));j({urls:l,current:e,success:()=>{},fail:()=>{D({title:"预览图片失败",icon:"none"})}})},toDetail(e){const t={...e,..."relationForm"===e.__config__.jnpfKey?{sourceRelationForm:!0,propsValue:e.propsValue}:{}};this.$emit("toDetail",t)},toTableDetail(e,t){e.__config__.defaultValue=t,this.$emit("toDetail",e)},getValue:e=>Array.isArray(e.__config__.defaultValue)?["timeRange","dateRange"].includes(e.__config__.jnpfKey)?e.__config__.defaultValue.join(""):e.__config__.defaultValue.join():e.__config__.defaultValue}},[["render",function(e,b,V,k,C,x){const j=q(I("JnpfText"),t),D=q(I("JnpfDivider"),l),P=q(I("JnpfGroupTitle"),o),te=R,le=T("DisplayList"),oe=q(I("u-form-item"),H),ae=q(I("JnpfUploadImg"),a),ie=q(I("JnpfUploadFile"),W),ne=q(I("JnpfColorPicker"),z),de=q(I("JnpfRate"),i),se=q(I("JnpfEditor"),n),fe=q(I("JnpfBarcode"),d),re=q(I("JnpfQrcode"),s),ce=q(I("JnpfInputNumber"),G),me=q(I("JnpfCalculate"),f),ue=q(I("JnpfDateCalculate"),r),_e=q(I("JnpfLink"),c),pe=q(I("JnpfAlert"),X),ge=q(I("JnpfButton"),m),he=q(I("JnpfSlider"),u),ye=q(I("JnpfSign"),Q),be=q(I("JnpfSignature"),_),Ve=q(I("JnpfLocation"),p),ke=q(I("JnpfInput"),E),Ce=q(I("u-icon"),Z),xe=T("Item",!0),je=N,De=q(I("u-input"),Y),Ie=q(I("u-steps"),g),Te=q(I("u-tabs"),ee),ve=q(I("u-collapse-item"),h),Ke=q(I("u-collapse"),y);return!x.config.noShow&&(!x.config.visibility||Array.isArray(x.config.visibility)&&x.config.visibility.includes("app"))?(v(),K(te,{key:0,class:B({"item-card":"card"===x.config.jnpfKey})},{default:M((()=>["colFormItem"===x.config.layout?(v(),F(w,{key:0},["text"==x.config.jnpfKey?(v(),K(j,{key:0,content:x.item.content,textStyle:x.item.textStyle},null,8,["content","textStyle"])):"divider"===x.config.jnpfKey?(v(),K(D,{key:1,content:x.item.content},null,8,["content"])):"groupTitle"==x.config.jnpfKey?(v(),K(P,{key:2,content:x.item.content,"content-position":x.item.contentPosition,helpMessage:x.item.helpMessage,onGroupIcon:b[0]||(b[0]=e=>x.clickIcon(x.item))},null,8,["content","content-position","helpMessage"])):"popupSelect"===x.config.jnpfKey||"relationForm"===x.config.jnpfKey?(v(),K(oe,{key:3,label:x.realLabel,prop:x.item.__vModel__,class:"popup-select","label-width":x.labelWidth,"left-icon":x.leftIcon,"left-icon-style":{color:"#a8aaaf"},onClickIcon:b[2]||(b[2]=e=>x.clickIcon(x.item))},{default:M((()=>["popupSelect"===x.config.jnpfKey?(v(),K(te,{key:0,class:"detail-text-box"},{default:M((()=>[S(te,{class:"jnpf-detail-text"},{default:M((()=>[U(L(V.formData[x.item.__vModel__]),1)])),_:1}),Object.keys(C.extraObj).length?(v(),K(le,{key:0,extraObj:C.extraObj,extraOptions:x.item.extraOptions},null,8,["extraObj","extraOptions"])):A("",!0)])),_:1})):A("",!0),"relationForm"===x.config.jnpfKey?(v(),K(te,{key:1,class:"detail-text-box",onClick:b[1]||(b[1]=e=>x.toDetail(x.item))},{default:M((()=>[S(te,{class:"jnpf-detail-text",style:{color:"rgb(41, 121, 255)"}},{default:M((()=>[U(L(V.formData[x.item.__vModel__]),1)])),_:1}),Object.keys(C.extraObj).length?(v(),K(le,{key:0,extraObj:C.extraObj,extraOptions:x.item.extraOptions},null,8,["extraObj","extraOptions"])):A("",!0)])),_:1})):A("",!0)])),_:1},8,["label","prop","label-width","left-icon"])):(v(),K(oe,{key:4,label:x.realLabel,prop:x.item.__vModel__,"label-width":x.labelWidth,"left-icon":x.leftIcon,"left-icon-style":{color:"#a8aaaf"},onClickIcon:b[16]||(b[16]=e=>x.clickIcon(x.item))},{default:M((()=>["uploadImg"===x.config.jnpfKey?(v(),K(ae,{key:0,modelValue:x.config.defaultValue,"onUpdate:modelValue":b[3]||(b[3]=e=>x.config.defaultValue=e),detailed:""},null,8,["modelValue"])):"uploadFile"==x.config.jnpfKey?(v(),K(ie,{key:1,modelValue:x.config.defaultValue,"onUpdate:modelValue":b[4]||(b[4]=e=>x.config.defaultValue=e),detailed:""},null,8,["modelValue"])):"colorPicker"===x.config.jnpfKey?(v(),K(ne,{key:2,modelValue:x.config.defaultValue,"onUpdate:modelValue":b[5]||(b[5]=e=>x.config.defaultValue=e),colorFormat:x.item.colorFormat,disabled:""},null,8,["modelValue","colorFormat"])):"rate"===x.config.jnpfKey?(v(),K(de,{key:3,modelValue:x.config.defaultValue,"onUpdate:modelValue":b[6]||(b[6]=e=>x.config.defaultValue=e),max:x.item.count,allowHalf:x.item.allowHalf,disabled:""},null,8,["modelValue","max","allowHalf"])):"editor"===x.config.jnpfKey?(v(),K(se,{key:4,modelValue:x.config.defaultValue,"onUpdate:modelValue":b[7]||(b[7]=e=>x.config.defaultValue=e),detailed:""},null,8,["modelValue"])):"barcode"==x.config.jnpfKey?(v(),K(fe,{key:5,staticText:x.item.staticText,width:x.item.width,height:x.item.height,format:x.item.format,dataType:x.item.dataType,lineColor:x.item.lineColor,background:x.item.background,relationField:x.item.relationField+"_id",formData:V.formData},null,8,["staticText","width","height","format","dataType","lineColor","background","relationField","formData"])):"qrcode"==x.config.jnpfKey?(v(),K(re,{key:6,staticText:x.item.staticText,width:x.item.width,dataType:x.item.dataType,colorDark:x.item.colorDark,colorLight:x.item.colorLight,relationField:x.item.relationField+"_id",formData:V.formData},null,8,["staticText","width","dataType","colorDark","colorLight","relationField","formData"])):"inputNumber"==x.config.jnpfKey?(v(),K(ce,{key:7,modelValue:x.config.defaultValue,"onUpdate:modelValue":b[8]||(b[8]=e=>x.config.defaultValue=e),step:x.item.step,max:x.item.max||999999999999999,min:x.item.min||-999999999999999,disabled:x.item.disabled,placeholder:x.item.placeholder,isAmountChinese:x.item.isAmountChinese,thousands:x.item.thousands,addonAfter:x.item.addonAfter,addonBefore:x.item.addonBefore,controls:x.item.controls,precision:x.item.precision,detailed:""},null,8,["modelValue","step","max","min","disabled","placeholder","isAmountChinese","thousands","addonAfter","addonBefore","controls","precision"])):"calculate"===x.config.jnpfKey?(v(),K(me,{key:8,expression:x.item.expression,vModel:x.item.__vModel__,config:x.config,formData:V.formData,modelValue:x.config.defaultValue,"onUpdate:modelValue":b[9]||(b[9]=e=>x.config.defaultValue=e),precision:x.item.precision,isAmountChinese:x.item.isAmountChinese,thousands:x.item.thousands,roundType:x.item.roundType,dateCalConfig:x.item.dateCalConfig,type:x.item.type},null,8,["expression","vModel","config","formData","modelValue","precision","isAmountChinese","thousands","roundType","dateCalConfig","type"])):"dateCalculate"===x.config.jnpfKey?(v(),K(ue,{key:9,expression:x.item.expression,vModel:x.item.__vModel__,config:x.config,formData:V.formData,modelValue:x.config.defaultValue,"onUpdate:modelValue":b[10]||(b[10]=e=>x.config.defaultValue=e),startRelationField:x.item.startRelationField,startTimeType:x.item.startTimeType,startTimeValue:x.item.startTimeValue,format:x.item.format},null,8,["expression","vModel","config","formData","modelValue","startRelationField","startTimeType","startTimeValue","format"])):"link"==x.config.jnpfKey?(v(),K(_e,{key:10,content:x.item.content,href:x.item.href,target:x.item.target,textStyle:x.item.textStyle},null,8,["content","href","target","textStyle"])):"alert"==x.config.jnpfKey?(v(),K(pe,{key:11,type:x.item.type,title:x.item.title,tagIcon:x.item.tagIcon,showIcon:x.item.showIcon,closable:x.item.closable,description:x.item.description,closeText:x.item.closeText},null,8,["type","title","tagIcon","showIcon","closable","description","closeText"])):"button"==x.config.jnpfKey?(v(),K(ge,{key:12,buttonText:x.item.buttonText,align:x.item.align,type:x.item.type,disabled:x.item.disabled},null,8,["buttonText","align","type","disabled"])):"slider"==x.config.jnpfKey?(v(),K(he,{key:13,modelValue:x.config.defaultValue,"onUpdate:modelValue":b[11]||(b[11]=e=>x.config.defaultValue=e),step:x.item.step,min:x.item.min||0,max:x.item.max||100,disabled:""},null,8,["modelValue","step","min","max"])):"sign"==x.config.jnpfKey?(v(),K(ye,{key:14,modelValue:x.config.defaultValue,"onUpdate:modelValue":b[12]||(b[12]=e=>x.config.defaultValue=e),detailed:""},null,8,["modelValue"])):"signature"==x.config.jnpfKey?(v(),K(be,{key:15,modelValue:x.config.defaultValue,"onUpdate:modelValue":b[13]||(b[13]=e=>x.config.defaultValue=e),detailed:""},null,8,["modelValue"])):"location"==x.config.jnpfKey?(v(),K(Ve,{key:16,modelValue:x.config.defaultValue,"onUpdate:modelValue":b[14]||(b[14]=e=>x.config.defaultValue=e),enableLocationScope:x.item.enableLocationScope,detailed:""},null,8,["modelValue","enableLocationScope"])):(v(),F(w,{key:17},["input"==x.config.jnpfKey?(v(),K(ke,{key:0,modelValue:x.config.defaultValue,"onUpdate:modelValue":b[15]||(b[15]=e=>x.config.defaultValue=e),detailed:"",useMask:x.item.useMask,maskConfig:x.item.maskConfig,addonBefore:x.item.addonBefore,addonAfter:x.item.addonAfter},null,8,["modelValue","useMask","maskConfig","addonBefore","addonAfter"])):(v(),K(te,{key:1,class:"jnpf-detail-text"},{default:M((()=>[U(L(x.getValue(x.item)),1)])),_:1}))],64))])),_:1},8,["label","prop","label-width","left-icon"]))],64)):(v(),F(w,{key:1},["card"===x.config.jnpfKey||"row"===x.config.jnpfKey?(v(),K(te,{key:0,class:"jnpf-card"},{default:M((()=>[x.item.header?(v(),K(te,{key:0,class:"jnpf-card-cap u-line-1 u-flex",onClick:b[17]||(b[17]=e=>x.clickIcon(x.item))},{default:M((()=>[U(L(x.item.header)+" ",1),S(Ce,{name:x.config.tipLabel?"question-circle-fill":"",class:"u-m-l-10",color:"#a0acb7"},null,8,["name"])])),_:1})):A("",!0),(v(!0),F(w,null,O(x.config.children,((e,t)=>(v(),K(xe,{key:x.config.renderKey+t,itemData:e,formConf:V.formConf,formData:V.formData,onToDetail:x.toDetail,onClickIcon:x.clickIcon},null,8,["itemData","formConf","formData","onToDetail","onClickIcon"])))),128))])),_:1})):A("",!0),"table"===x.config.jnpfKey?(v(),K(te,{key:1,class:"jnpf-table"},{default:M((()=>[S(te,{class:"jnpf-table-title u-line-1",onClick:b[18]||(b[18]=e=>x.clickIcon(x.item))},{default:M((()=>[U(L(x.config.label)+" ",1),x.config.tipLabel?(v(),K(Ce,{key:0,name:"question-circle-fill",class:"u-m-l-10",color:"#a0acb7"})):A("",!0)])),_:1}),(v(!0),F(w,null,O(x.config.defaultValue,((e,t)=>(v(),K(te,{key:t},{default:M((()=>[S(te,{class:"jnpf-table-item-title"},{default:M((()=>[S(te,{class:"jnpf-table-item-title-num"},{default:M((()=>[U("("+L(t+1)+")",1)])),_:2},1024)])),_:2},1024),(v(!0),F(w,null,O(x.config.children,((l,o)=>(v(),K(te,{class:"form-item-box",key:o},{default:M((()=>[!l.__config__.noShow&&(!l.__config__.visibility||Array.isArray(l.__config__.visibility)&&l.__config__.visibility.includes("app"))?(v(),K(oe,{key:0,label:l.__config__.showLabel?l.__config__.label:"","label-width":l.__config__.labelWidth?1.5*l.__config__.labelWidth:void 0,onClickIcon:e=>x.clickIcon(l),"left-icon":l.__config__.tipLabel&&l.__config__.showLabel&&l.__config__.label?"question-circle-fill":"","left-icon-style":{color:"#a0acb7"}},{default:M((()=>[["relationFormAttr","popupAttr"].includes(l.__config__.jnpfKey)?(v(),F(w,{key:0},[l.__vModel__?(v(),K(te,{key:1,class:"jnpf-detail-text"},{default:M((()=>[U(L(e[l.__vModel__]),1)])),_:2},1024)):(v(),K(te,{key:0,class:"jnpf-detail-text"},{default:M((()=>[U(L(e[l.relationField.split("_jnpfTable_")[0]+"_"+l.showField]),1)])),_:2},1024))],64)):"relationForm"===l.__config__.jnpfKey?(v(),K(te,{key:1,class:"jnpf-detail-text",style:{color:"rgb(41, 121, 255)"},onClick:t=>x.toTableDetail(l,e[l.__vModel__+"_id"])},{default:M((()=>[U(L(e[l.__vModel__]),1)])),_:2},1032,["onClick"])):"sign"==l.__config__.jnpfKey?(v(),K(ye,{key:2,modelValue:e[l.__vModel__],"onUpdate:modelValue":t=>e[l.__vModel__]=t,detailed:""},null,8,["modelValue","onUpdate:modelValue"])):"signature"==l.__config__.jnpfKey?(v(),K(be,{key:3,modelValue:e[l.__vModel__],"onUpdate:modelValue":t=>e[l.__vModel__]=t,detailed:""},null,8,["modelValue","onUpdate:modelValue"])):"location"==l.__config__.jnpfKey?(v(),K(Ve,{key:4,modelValue:e[l.__vModel__],"onUpdate:modelValue":t=>e[l.__vModel__]=t,enableLocationScope:x.item.enableLocationScope,detailed:""},null,8,["modelValue","onUpdate:modelValue","enableLocationScope"])):"uploadFile"===l.__config__.jnpfKey?(v(),K(ie,{key:5,modelValue:e[l.__vModel__],"onUpdate:modelValue":t=>e[l.__vModel__]=t,detailed:""},null,8,["modelValue","onUpdate:modelValue"])):"uploadImg"===l.__config__.jnpfKey?(v(),K(ae,{key:6,modelValue:e[l.__vModel__],"onUpdate:modelValue":t=>e[l.__vModel__]=t,detailed:""},null,8,["modelValue","onUpdate:modelValue"])):"inputNumber"==l.__config__.jnpfKey?(v(),K(ce,{key:7,modelValue:e[l.__vModel__],"onUpdate:modelValue":t=>e[l.__vModel__]=t,step:l.step,max:l.max,min:l.min,disabled:l.disabled,placeholder:l.placeholder,isAmountChinese:l.isAmountChinese,thousands:l.thousands,addonAfter:l.addonAfter,addonBefore:l.addonBefore,controls:l.controls,precision:l.precision,detailed:""},null,8,["modelValue","onUpdate:modelValue","step","max","min","disabled","placeholder","isAmountChinese","thousands","addonAfter","addonBefore","controls","precision"])):"calculate"===l.__config__.jnpfKey?(v(),K(me,{key:8,expression:l.expression,vModel:l.__vModel__,config:l.__config__,formData:V.formData,roundType:l.roundType,dateCalConfig:l.dateCalConfig,type:l.type,modelValue:e[l.__vModel__],"onUpdate:modelValue":t=>e[l.__vModel__]=t,precision:l.precision,isAmountChinese:l.isAmountChinese,thousands:l.thousands,rowIndex:t},null,8,["expression","vModel","config","formData","roundType","dateCalConfig","type","modelValue","onUpdate:modelValue","precision","isAmountChinese","thousands","rowIndex"])):"dateCalculate"===l.__config__.jnpfKey?(v(),K(ue,{key:9,expression:l.expression,vModel:l.__vModel__,config:l.__config__,formData:V.formData,modelValue:e[l.__vModel__],"onUpdate:modelValue":t=>e[l.__vModel__]=t,startRelationField:l.startRelationField,startTimeType:l.startTimeType,startTimeValue:l.startTimeValue,format:l.format,rowIndex:t},null,8,["expression","vModel","config","formData","modelValue","onUpdate:modelValue","startRelationField","startTimeType","startTimeValue","format","rowIndex"])):"rate"===l.__config__.jnpfKey?(v(),K(de,{key:10,max:l.count,modelValue:e[l.__vModel__],"onUpdate:modelValue":t=>e[l.__vModel__]=t,allowHalf:l.allowHalf,disabled:""},null,8,["max","modelValue","onUpdate:modelValue","allowHalf"])):"slider"==l.__config__.jnpfKey?(v(),K(he,{key:11,modelValue:e[l.__vModel__],"onUpdate:modelValue":t=>e[l.__vModel__]=t,step:l.step,min:l.min||0,max:l.max||100,disabled:""},null,8,["modelValue","onUpdate:modelValue","step","min","max"])):(v(),F(w,{key:12},["input"==l.__config__.jnpfKey?(v(),K(ke,{key:0,modelValue:e[l.__vModel__],"onUpdate:modelValue":t=>e[l.__vModel__]=t,detailed:"",useMask:l.useMask,maskConfig:l.maskConfig,addonBefore:l.addonBefore,addonAfter:l.addonAfter},null,8,["modelValue","onUpdate:modelValue","useMask","maskConfig","addonBefore","addonAfter"])):(v(),K(te,{key:1,class:"jnpf-detail-text"},{default:M((()=>[U(L(e[l.__vModel__]),1)])),_:2},1024))],64))])),_:2},1032,["label","label-width","onClickIcon","left-icon"])):A("",!0)])),_:2},1024)))),128))])),_:2},1024)))),128)),x.item.showSummary&&C.summaryField.length?(v(),K(te,{key:0,class:"jnpf-table-item"},{default:M((()=>[S(te,{class:"jnpf-table-item-title u-flex u-row-between"},{default:M((()=>[S(je,{class:"jnpf-table-item-title-num"},{default:M((()=>[U(L(x.item.__config__.label)+"合计",1)])),_:1})])),_:1}),S(te,{class:"u-p-l-20 u-p-r-20 form-item-box"},{default:M((()=>[(v(!0),F(w,null,O(C.summaryField,((e,t)=>(v(),K(oe,{label:e.__config__.label,key:e.__vModel__},{default:M((()=>[S(De,{"input-align":"right",modelValue:e.value,"onUpdate:modelValue":t=>e.value=t,disabled:""},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1032,["label"])))),128))])),_:1})])),_:1})):A("",!0)])),_:1})):"steps"===x.config.jnpfKey?(v(),K(te,{key:2,style:{"background-color":"#fff",padding:"15px 0"}},{default:M((()=>[S(te,{class:"step-container"},{default:M((()=>[S(Ie,{list:x.config.children,name:"title",mode:x.item.simple?"dot":"number",onChange:b[19]||(b[19]=e=>x.onStepChange(e,x.item)),current:C.stepCurrent},null,8,["list","mode","current"])])),_:1}),(v(!0),F(w,null,O(x.config.children,((e,t)=>(v(),K(te,{key:t},{default:M((()=>[t===C.stepCurrent?(v(),K(te,{key:0},{default:M((()=>[(v(!0),F(w,null,O(e.__config__.children,((e,t)=>(v(),K(xe,{key:t,itemData:e,formConf:V.formConf,formData:V.formData,onToDetail:x.toDetail,onClickIcon:x.clickIcon},null,8,["itemData","formConf","formData","onToDetail","onClickIcon"])))),128))])),_:2},1024)):A("",!0)])),_:2},1024)))),128))])),_:1})):A("",!0),"tab"===x.config.jnpfKey?(v(),K(te,{key:3,class:"jnpf-tab"},{default:M((()=>[S(Te,{"is-scroll":"",list:x.config.children,name:"title",modelValue:C.tabCurrent,"onUpdate:modelValue":b[20]||(b[20]=e=>C.tabCurrent=e),onChange:x.onTabChange},null,8,["list","modelValue","onChange"]),(v(!0),F(w,null,O(x.config.children,((e,t)=>(v(),K(te,{key:t},{default:M((()=>[$(S(te,null,{default:M((()=>[(v(!0),F(w,null,O(e.__config__.children,((e,t)=>(v(),K(xe,{key:t,itemData:e,formConf:V.formConf,formData:V.formData,onToDetail:x.toDetail,onClickIcon:x.clickIcon},null,8,["itemData","formConf","formData","onToDetail","onClickIcon"])))),128))])),_:2},1536),[[J,t==C.tabCurrent]])])),_:2},1024)))),128))])),_:1})):A("",!0),"collapse"===x.config.jnpfKey?(v(),K(Ke,{key:4,"head-style":{"padding-left":"20rpx"},accordion:x.item.accordion,ref:"collapseRef"},{default:M((()=>[(v(!0),F(w,null,O(x.config.children,((e,t)=>(v(),K(ve,{title:e.title,key:t,open:x.config.active&&x.config.active.indexOf(e.name)>-1},{default:M((()=>[(v(!0),F(w,null,O(e.__config__.children,((e,t)=>(v(),K(xe,{key:e.__config__.renderKey,itemData:e,formConf:V.formConf,formData:V.formData,onToDetail:x.toDetail,onClickIcon:x.clickIcon},null,8,["itemData","formConf","formData","onToDetail","onClickIcon"])))),128))])),_:2},1032,["title","open"])))),128))])),_:1},8,["accordion"])):A("",!0)],64))])),_:1},8,["class"])):A("",!0)}],["__scopeId","data-v-f5ccb811"]])},props:{formConf:{type:Object,required:!0},formData:{type:Object},loading:{type:Boolean,default:!1}},data(){return{show:!1,content:"",contentStyle:{fontSize:"28rpx",padding:"20rpx",lineHeight:"44rpx",textAlign:"left"},titleStyle:{padding:"20rpx"},confirmStyle:{height:"80rpx",lineHeight:"80rpx"},title:this.$t("common.tipTitle")}},methods:{clickIcon(e){(e.__config__.tipLabel||e.helpMessage)&&(this.content=e.helpMessage||e.__config__.tipLabel,this.title=e.__config__.label,"card"===e.__config__.jnpfKey&&(this.title=e.header),"groupTitle"===e.__config__.jnpfKey&&(this.title=e.content),this.show=!0)},toDetail(e){this.$emit("toDetail",e)}}},[["render",function(e,t,l,o,a,i){const n=T("Item"),d=q(I("u-modal"),b),s=q(I("u-form"),P);return v(),K(s,{class:B(["jnpf-wrap-form",l.formConf.className]),model:l.formData,ref:"dataForm","label-position":"top"===l.formConf.labelPosition?"top":"left","label-align":"right"===l.formConf.labelPosition?"right":"left","label-width":l.formConf.labelWidth?1.5*l.formConf.labelWidth:150},{default:M((()=>[(v(!0),F(w,null,O(l.formConf.fields,((e,t)=>(v(),K(n,{key:e.__config__.renderKey,itemData:e,formConf:l.formConf,class:B(e.__config__.className),formData:l.formData,ref_for:!0,ref:e.__vModel__?e.__vModel__:void 0,onToDetail:i.toDetail,onClickIcon:i.clickIcon},null,8,["itemData","formConf","class","formData","onToDetail","onClickIcon"])))),128)),S(d,{modelValue:a.show,"onUpdate:modelValue":t[0]||(t[0]=e=>a.show=e),content:a.content,width:"70%","border-radius":"16","content-style":a.contentStyle,titleStyle:a.titleStyle,"confirm-style":a.confirmStyle,title:a.title,"confirm-text":e.$t("common.okText")},null,8,["modelValue","content","content-style","titleStyle","confirm-style","title","confirm-text"])])),_:1},8,["model","label-position","label-align","label-width","class"])}]]);export{oe as P};
|