@zhijiancloud/bpm 1.0.68 → 1.0.69

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("lodash")):"function"==typeof define&&define.amd?define(["lodash"],t):"object"==typeof exports?exports.bpm2=t(require("lodash")):e.bpm2=t(e.lodash)}(self,function(e){return function(){"use strict";var t={7520:function(e,t,a){a.d(t,{Q:function(){return i}});let n=[{key:"lt",name:"早于"},{key:"gt",name:"晚于"},{key:"gte",name:"不早于"},{key:"lte",name:"不晚于"}],l=[{key:"in",name:"在列表中"}],o=[{key:"in",name:"在列表中"},{key:"all",name:"包含所有"}];const i={Text:{name:"单行文本",hasBpmField:!0,tableColWidth:240,actions:[{key:"contains",name:"包含"},{key:"eq",name:"等于"}],attrs:["type","value_type","id","name","linkage"]},TextArea:{name:"多行文本",hasBpmField:!0,tableColWidth:300,actions:[{key:"contains",name:"包含"},{key:"eq",name:"等于"}],attrs:["type","value_type","id","name","linkage"]},SerialNumber:{name:"流水号",hasBpmField:!0,actions:[{key:"contains",name:"包含"}],options:{type:"Text"},attrs:["type","id","name","linkage"]},Number:{name:"数字",hasBpmField:!0,tableColWidth:200,actions:[{key:"eq",name:"等于"},{key:"gt",name:"大于"},{key:"gte",name:"大于等于"},{key:"lt",name:"小于"},{key:"lte",name:"小于等于"},{key:"ne",name:"不等于"}],attrs:["type","id","name","value_type","is_int","view.precision","linkage"]},DateTime:{name:"日期时间选择器",tableColWidth:240,hasBpmField:!0,actions:n,attrs:["type","id","name","check.format","view.format","linkage"]},Date:{name:"日期选择器",tableColWidth:240,hasBpmField:!0,actions:n,attrs:["type","id","name","check.format","view.format","linkage"]},Time:{name:"时间选择器",hasBpmField:!0,tableColWidth:240,actions:n,attrs:["type","id","name","check.format","view.format","linkage"]},Timestamp:{name:"※时间戳",tableColWidth:240,actions:n,attrs:["type","id","name","check.format","view.format","linkage"]},Select:{name:"单选",hasBpmField:!0,tableColWidth:220,actions:l,options:{type:"MulSelect"},attrs:["type","id","name","value_type","style","range_enum","linkage"]},Status:{name:"状态",hasBpmField:!0,tableColWidth:150,actions:l,options:{type:"MulSelect"},attrs:["type","id","name","value_type","style","range_enum","linkage"]},MulSelect:{name:"多选",hasBpmField:!0,tableColWidth:220,actions:o,attrs:["type","id","name","value_type","result_type","style","range_enum","linkage"]},SelectFromForm:{name:"远程单项选择",hasBpmField:!0,tableColWidth:200,actions:l,options:{type:"MulSelectFromForm"},attrs:["type","id","name","range_remote","value_type","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.form","range_remote.depends","linkage"]},MulSelectFromForm:{name:"远程多项选择",hasBpmField:!0,tableColWidth:200,actions:o,attrs:["type","id","name","range_remote","value_type","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.form","range_remote.depends","linkage"]},SelectFromMulForm:{name:"关联组件",hasBpmField:!0,tableColWidth:200,actions:o,attrs:["type","id","name","range_remote","value_type"]},SelectProject:{name:"项目单项选择",hasBpmField:!0,tableColWidth:200,actions:l,options:{type:"MulSelectProject"},attrs:["type","id","name","range_remote","value_type","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.depends","linkage"]},MulSelectProject:{name:"项目多项选择",hasBpmField:!0,tableColWidth:200,actions:o,attrs:["type","id","name","range_remote","value_type","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.depends","linkage"]},SelectUser:{name:"用户单项选择",hasBpmField:!0,tableColWidth:200,actions:l,options:{type:"MulSelectUser"},attrs:["type","id","name","range_remote","value_type","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.depends","linkage"]},MulSelectUser:{name:"用户多项选择",hasBpmField:!0,tableColWidth:200,actions:o,options:{type:"MulSelectUser"},attrs:["type","id","name","range_remote","value_type","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.depends","linkage"]},SelectURUser:{name:"用户单项选择(新)",hasBpmField:!0,tableColWidth:400,actions:l,options:{type:"MulSelectURUser"},attrs:["type","id","name","range_remote","value_type","filters","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.depends","linkage"]},MulSelectURUser:{name:"用户多项选择(新)",hasBpmField:!0,tableColWidth:400,actions:o,options:{type:"MulSelectURUser"},attrs:["type","id","name","range_remote","value_type","filters","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.depends","linkage"]},SelectRootCategory:{name:"根任务类型选择",hasBpmField:!0,tableColWidth:200,actions:[{key:"eq",name:"等于"}],attrs:["type","id","name","category_cls","value_type","linkage"]},SelectCheckItem:{name:"检查项单项选择",hasBpmField:!0,actions:l,tableColWidth:200,options:{type:"MulSelectCheckItem"},attrs:["type","id","name","category_cls","value_type","range_remote","root_category","tree_select","can_select","can_select.filter_expression","range_remote.filter_expression","range_remote.depends","linkage"]},MulSelectCheckItem:{name:"检查项多项选择",hasBpmField:!0,tableColWidth:200,actions:o,attrs:["type","id","name","category_cls","value_type","range_remote","root_category","tree_select","can_select","can_select.filter_expression","range_remote.filter_expression","range_remote.depends","linkage"]},SelectSort:{name:"分类单项选择",hasBpmField:!0,tableColWidth:200,actions:l,options:{type:"MulSelectSort"},attrs:["type","id","name","value_type","range_remote","tree_select","can_select","can_select.filter_expression","range_remote.filter_expression","range_remote.depends","linkage"]},MulSelectSort:{name:"分类多项选择",hasBpmField:!0,tableColWidth:200,actions:o,attrs:["type","id","name","value_type","range_remote","tree_select","can_select","can_select.filter_expression","range_remote.filter_expression","range_remote.depends","linkage"]},SelectPartner:{name:"合作伙伴单项选择",hasBpmField:!0,tableColWidth:200,actions:l,options:{type:"MulSelectPartner"},attrs:["type","id","name","value_type","range_remote","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.depends","linkage"]},MulSelectPartner:{name:"合作伙伴多项选择",hasBpmField:!0,tableColWidth:200,actions:l,options:{type:"MulSelectPartner"},attrs:["type","id","name","value_type","range_remote","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.depends","linkage"]},SelectOrg:{name:"单位单项选择",hasBpmField:!0,tableColWidth:200,actions:l,options:{type:"MulSelectOrg"},attrs:["type","id","name","value_type","range_remote","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.depends","linkage"]},MulSelectOrg:{name:"单位多项选择",hasBpmField:!0,tableColWidth:200,actions:o,attrs:["type","id","name","value_type","range_remote","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.depends","linkage"]},Audit:{name:"审批",hasBpmField:!0,actions:[{key:"ar_eq",name:"审批结果等于"},{key:"ar_in",name:"审批结果在列表中"}],actionOptions:[{value:0,label:"未审批"},{value:1,label:"审批通过"},{value:2,label:"审批未通过"}],attrs:["type","id","name","linkage"],options:{result_type:"Array",value_type:"int",type:"MulSelect",style:"default",range_enum:[[0,"未审批"],[1,"通过"],[2,"未通过"]]}},MulAudit:{name:"多人审批",hasBpmField:!0,actions:[{key:"ar_eq",name:"审批结果等于"},{key:"ar_in",name:"审批结果在列表中"}],actionOptions:[{value:0,label:"未审批"},{value:1,label:"审批通过"},{value:2,label:"审批未通过"}],attrs:["type","id","name","linkage"],options:{result_type:"Array",value_type:"int",type:"MulSelect",style:"default",range_enum:[[0,"未审批"],[1,"通过"],[2,"未通过"]]}},MulArea:{name:"区域多项选择",hasBpmField:!0,tableColWidth:260,actions:o,attrs:["type","id","name","value_type","can","linkage"]},Area:{name:"区域单项选择",hasBpmField:!0,tableColWidth:260,actions:l,options:{type:"MulArea"},attrs:["type","id","name","value_type","can","linkage"]},SelectFormId:{name:"表单单项选择",hasBpmField:!0,tableColWidth:200,actions:l,options:{type:"MulSelectFormId"},attrs:["type","id","name","value_type","form_select_type","linkage"]},MulSelectFormId:{name:"表单多项选择",hasBpmField:!0,tableColWidth:200,actions:l,options:{type:"MulSelectFormId"},attrs:["type","id","name","value_type","form_select_type","linkage"]},SelectFromField:{name:"远程单选(从字段)",hasBpmField:!0,tableColWidth:200,actions:l,options:{type:"MulSelectFromField"},attrs:["type","id","name","range_remote","style","value_type","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.form","range_remote.depends","linkage"]},MulSelectFromField:{name:"远程多选(从字段)",hasBpmField:!0,tableColWidth:200,actions:l,options:{type:"MulSelectFromField"},attrs:["type","id","name","range_remote","style","value_type","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.form","range_remote.depends","linkage"]},MulSelectEntranceForm:{name:"远程多项选择(从入口)",hasBpmField:!0},SelectHouseOwner:{name:"业主选择"},MulSelectIssue:{name:"问题选择"},MulFile:{name:"附件",hasBpmField:!0,tableColWidth:150},MulImage:{name:"图片",hasBpmField:!0,tableColWidth:150},Signature:{name:"签名",hasBpmField:!0},OnlineEditor:{name:"在线文档编辑器"},Spliter:{name:"分割线",hasBpmField:!1},Stepper:{name:"步进器",hasBpmField:!1},Quote:{name:"跨表单数据引用",hasBpmField:!0},Order:{name:"排序控件",hasBpmField:!1},SubForm:{name:"子表单",hasBpmField:!0},XSubForm:{name:"子表单(增强版)",hasBpmField:!0},OrderSubForm:{name:"排序子表单",hasBpmField:!0},AreaElevation:{name:"区域快速选择器",hasBpmField:!0,tableColWidth:200},RichText:{name:"富文本编辑框",hasBpmField:!0,tableColWidth:100},Appointment:{name:"时段预约",hasBpmField:!0,tableColWidth:120},Rating:{name:"评分",hasBpmField:!0,tableColWidth:250},MapLocation:{name:"地图位置",hasBpmField:!0,tableColWidth:250},ExternalFormLink:{name:"外链表单组件",hasBpmField:!0,tableColWidth:200,actions:o,attrs:["type","id","name","range_remote","value_type"]}}},4747:function(e,t,a){var n=a(1601),l=a.n(n),o=a(6314);a.n(o)()(l()).push([e.id,".bpm-quote-form-list {\n width: 100%;\n}\n.bpm-quote-title-link {\n cursor: pointer;\n color: #409eff;\n}\n.bpm-quote-empty {\n padding: 16px 0;\n color: #909399;\n text-align: center;\n}\n.bpm-quote-table {\n width: 100%;\n}\n.bpm-quote-table .el-table__cell.bpm-td {\n padding: 0;\n}\n.bpm-quote-table .el-table__cell.bpm-td > .cell {\n padding: 0 10px;\n overflow: auto;\n}\n",""])},6314:function(e){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var a="",n=void 0!==t[5];return t[4]&&(a+="@supports (".concat(t[4],") {")),t[2]&&(a+="@media ".concat(t[2]," {")),n&&(a+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),a+=e(t),n&&(a+="}"),t[2]&&(a+="}"),t[4]&&(a+="}"),a}).join("")},t.i=function(e,a,n,l,o){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(n)for(var r=0;r<this.length;r++){var s=this[r][0];null!=s&&(i[s]=!0)}for(var m=0;m<e.length;m++){var d=[].concat(e[m]);n&&i[d[0]]||(void 0!==o&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=o),a&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=a):d[2]=a),l&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=l):d[4]="".concat(l)),t.push(d))}},t}},1601:function(e){e.exports=function(e){return e[1]}},4486:function(e,t,a){function n(e,t,a,n,l,o,i,r){var s,m="function"==typeof e?e.options:e;if(t&&(m.render=t,m.staticRenderFns=a,m._compiled=!0),n&&(m.functional=!0),o&&(m._scopeId="data-v-"+o),i?(s=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),l&&l.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(i)},m._ssrRegister=s):l&&(s=r?function(){l.call(this,(m.functional?this.parent:this).$root.$options.shadowRoot)}:l),s)if(m.functional){m._injectStyles=s;var d=m.render;m.render=function(e,t){return s.call(t),d(e,t)}}else{var p=m.beforeCreate;m.beforeCreate=p?[].concat(p,s):[s]}return{exports:e,options:m}}a.d(t,{A:function(){return n}})},6773:function(t){t.exports=e}},a={};function n(e){var l=a[e];if(void 0!==l)return l.exports;var o=a[e]={id:e,exports:{}};return t[e](o,o.exports,n),o.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var l={};n.r(l),n.d(l,{default:function(){return k}});var o=function(){var e=this,t=e.$createElement;return(e._self._c||t)(e.curComponent,e._g(e._b({tag:"component",staticClass:"bpm-quote",attrs:{fieldConf:e.fieldConf,row:e.row,isMultiple:e.isMultiple,mode:e.mode,formName:e.formName,container:e.container,uiType:e.uiType},on:{change:e.handleChange},model:{value:e.curVal,callback:function(t){e.curVal=t},expression:"curVal"}},"component",e.$attrs,!1),e.$listeners))};o._withStripped=!0;var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"bpm-quote-edit"},[a("form-list",{attrs:{"quote-content":e.quoteContent,"form-name":e.formName,container:e.container,"link-open-type":e.linkOpenType,"detail-dialog-width":e.detailDialogWidth}})],1)};i._withStripped=!0;var r=n(6773),s=n.n(r),m=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"bpm-quote-form-list"},[e.tableData.length?a("el-table",{staticClass:"bpm-quote-table",attrs:{data:e.tableData,border:"",size:"small","header-cell-class-name":"bpm-th","cell-class-name":"bpm-td","span-method":e.rowspanMethod}},[a("el-table-column",{attrs:{label:e.$z("标题","c.title"),"min-width":"220",fixed:"left"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{staticClass:"bpm-quote-title-link",on:{click:function(a){return e.openFormDetailPage(t.row)}}},[a("i",{staticClass:"el-icon-tickets",staticStyle:{"margin-right":"5px"}}),e._v(" "),a("span",[e._v(e._s(t.row.title))])])]}}],null,!1,3830925498)}),e._v(" "),e._l(e.columns,function(t){return[t.isSubForm?a("el-table-column",{key:t.key+"-subform",attrs:{prop:t.key,label:t.label,"min-width":t.minWidth}},[t.fieldConf.show_index?a("el-table-column",{attrs:{prop:"subfield__index",label:t.fieldConf.index_label||e.$z("序号","b2.common.subform_index"),width:"100"},scopedSlots:e._u([{key:"default",fn:function(n){return[e.getSubformRow(n.row,t.key)?a("div",[e._v("\n "+e._s(n.row.i+1)+"\n ")]):e._e()]}}],null,!0)}):e._e(),e._v(" "),e._l(t.subColumns,function(n){return a("el-table-column",{key:n.id,attrs:{prop:"subfield__"+n.id,label:n.name,"min-width":e.getColumnWidth(n),"class-name":"subform-cell","label-class-name":"subform-header-cell"},scopedSlots:e._u([{key:"default",fn:function(l){return[e.getSubformRow(l.row,t.key)?a("bpm-field",{attrs:{type:n.type,"field-conf":n,value:e.getSubformRow(l.row,t.key)[n.id],row:l.row,"form-name":e.formDef.id||e.formName,mode:"view","ui-type":"table",container:e.container}}):e._e()]}}],null,!0)})})],2):a("el-table-column",{key:t.key+"-field",attrs:{prop:"f_fields."+t.key,label:t.label,"min-width":t.minWidth},scopedSlots:e._u([{key:"default",fn:function(n){return[["Select","Status","SelectProject","SelectUser","SelectFromForm"].includes(t.fieldConf.type)?a("span",[e._v("\n "+e._s(n.row.f_fields&&n.row.f_fields[t.key])+"\n ")]):a("bpm-field",{attrs:{type:t.fieldConf.type,"field-conf":t.fieldConf,value:n.row.f_fields&&n.row.f_fields[t.key],row:n.row,"form-name":e.formDef.id||e.formName,mode:"view","ui-type":"table",container:e.container}})]}}],null,!0)})]})],2):a("div",{staticClass:"bpm-quote-empty"},[e._v("\n "+e._s(e.$z("暂无数据","c.no_data"))+"\n ")]),e._v(" "),a("el-dialog",{attrs:{"append-to-body":!0,visible:e.formDetailDialog.visible,"close-on-click-modal":!1,title:e.formDetailDialog.title,width:e.detailDialogWidth,top:"5vh"},on:{"update:visible":function(t){return e.$set(e.formDetailDialog,"visible",t)}}},[e.formDetailDialog.visible?a("iframe",{staticClass:"detail-form-iframe",attrs:{src:e.formDetailDialog.iframe_url,frameborder:"0",width:"100%",height:e.iframeHeight+"px"}}):e._e()])],1)};m._withStripped=!0;var d=n(7520),p={name:"BpmQuoteFormList",props:{quoteContent:{type:Object,default(){return{}}},formName:{type:String,default:""},container:{type:Object,default(){return{}}},linkOpenType:{type:String,default:"dialog"},detailDialogWidth:{type:String,default:"80%"}},data(){return{formDetailDialog:{visible:!1,title:"",iframe_url:""},iframeHeight:850}},computed:{formDef(){return s().get(this.quoteContent,"definition.form",{})},elements(){return s().get(this.formDef,"elements",[])},columns(){return s().chain(this.elements).filter(e=>s().get(e,"perm.visible",!0)).filter(e=>e.type&&-1!==e.type.indexOf("SubForm")||s().get(d.Q,[e.type,"hasBpmField"],!0)).map(e=>{const t=e.type&&-1!==e.type.indexOf("SubForm"),a=t?s().filter(s().get(e,"elements",[]),e=>s().get(e,"perm.visible",!0)&&s().get(d.Q,[e.type,"hasBpmField"],!0)):[];return{key:e.id,label:e.name,fieldConf:e,isSubForm:t,subColumns:a,minWidth:t?this.getSubformColWidth(a):this.getColumnWidth(e)}}).value()},subFormKeys(){return s().chain(this.columns).filter({isSubForm:!0}).map("key").value()},tableData(){return this.getFlatTableData(s().get(this.quoteContent,"data",[]),this.subFormKeys)}},created(){let e=.85*window.innerHeight-84;this.iframeHeight=e},methods:{openFormDetailPage(e){if(zj.pageParam().hidden_form_title)return!1;const t=this.formDef.id;if(!t)return!1;let a=this.formDef.type;a="ProcessForm"===a?"processform":"DataForm"===a?"dataform":s().toLower(a||"");const n=zj.pageParam().project_id,l=zj.pageParam().page_level||"project";let o=`/public/bpm3/app/table.html?form_name=${t}&form_type=${a}&form_id=${e.form_id}&project_id=${n}&page_level=${l}#/detail`;"dialog"===this.linkOpenType?(o=`/public/bpm3/app/table.html?is_mirco_app=1&form_name=${t}&form_type=${a}&form_id=${e.form_id}&project_id=${n}&hidden_form_title=1&page_level=${l}#/detail`,this.formDetailDialog.iframe_url=o,this.formDetailDialog.visible=!0,this.formDetailDialog.title=e.title):window.open(o,"_blank")},getColumnWidth(e){return s().get(e,"display.column_width")||s().get(d.Q,[e.type,"tableColWidth"])||120},getSubformColWidth(e){return s().sumBy(e,e=>Number(this.getColumnWidth(e))||120)||120},getSubformRow(e,t){return s().get(e,["f_fields",t,e.i],null)},getFlatTableData(e,t){if(!t||!t.length)return s().cloneDeep(e);const a=[];return s().each(e,e=>{const n=s().cloneDeep(e);s().each(t,e=>{const t=s().get(n,["f_fields",e],[]);s().isArray(t)&&s().set(n,["f_fields",e],s().filter(t,e=>!s().get(e,"_meta.is_deleted",!1)))});const l=s().max(s().map(t,e=>s().get(n,["f_fields",e],[]).length))||0;if(0!==l)for(let e=0;e<l;e++)a.push({...n,hasRowspan:!0,rowspan:0===e?l:0,colspan:0===e?1:0,i:e});else a.push(n)}),a},rowspanMethod({row:e,column:t}){if(e.hasRowspan&&t&&t.property&&0!==t.property.indexOf("subfield__"))return{rowspan:e.rowspan,colspan:e.colspan}}}},u=(n(4747),n(4486)),c=(0,u.A)(p,m,[],!1,null,null,null);c.options.__file="components/lib/bpmQuote/src/part/form-list.vue";var f={components:{FormList:c.exports},props:{value:{},fieldConf:{},row:{},formName:{},container:{},isMultiple:{type:Boolean,default(){return!1}},readonly:{type:Boolean,default(){return!1}}},data(){return{quoteContent:{},elements:[],tabIndex:0,list:[],elementsList:[],isQuote:!0,curVal:null}},watch:{quoteContent(e){e&&(this.$bpm.quoteContentMap||(this.$bpm.quoteContentMap={}),this.$bpm.quoteContentMap[this.fieldConf.id]=s().cloneDeep(this.quoteContent))},value(e){console.log("select_val",e),"loadData"==e?this.loadQuoteData():this.onFieldValueChange()}},computed:{linkOpenType(){return s().get(this.fieldConf,"style.link_open_type","dialog")},detailDialogWidth(){return this.getDetailDialogWidth()}},created(){this.curVal=this.isMultiple?[]:null},mounted(){setTimeout(async()=>{this.loadQuoteData()},500)},methods:{getDetailDialogWidth(){const e=s().get(this.fieldConf,"style.dialog_width");return e?s().isNumber(e)?`${e}%`:String(e):"80%"},async loadQuoteData(){let e=s().get(this.fieldConf,"scope",null);console.log("loadQuoteData_scope",e),console.log("loadQuoteData.container",this.container);let t=null;if(!s().isEmpty(e)&&e){let a=e.depends;console.log("loadQuoteData.field_depends",a),s().each(a,e=>{t||(t={}),this.container&&this.container.formData&&this.container.formData[e]&&(t[e]=this.container.formData[e])})}console.log("loadQuoteData.fieldParams",t);let a=this.fieldConf.id,n=await this.$bpm.searchSelectOpts(a,"",this.formName,null,!1,t?{fields:JSON.stringify(t)}:{},!0);this.quoteContent=n,console.log("bpmQuote quoteContent: ",this.quoteContent),this.curVal=s().map(n.data,"form_id"),this.$emit("input",this.curVal),this.$emit("change",this.curVal)},onDataLoaded(){this.onFieldValueChange()},onFieldValueChange(){console.log("link_onFieldValueChange bpmQuote")},async loadRemoteLabel(){let e=this.curVal;if("loadData"!=e)if(s().isEmpty(e))this.quoteContent={data:[],definition:{}};else try{this.loading=!0;let t=await this.$bpm.loadQuteTitle(e,this.fieldConf.id,this.formName,this.row);this.quoteContent=t}finally{this.loading=!1}}}},_=(0,u.A)(f,i,[],!1,null,null,null);_.options.__file="components/lib/bpmQuote/src/part/editor.vue";var h=_.exports,g=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"bpm-quote-reader"},[a("editor-component",e._g(e._b({attrs:{value:e.value,"field-conf":e.fieldConf,row:e.row,"form-name":e.formName,container:e.container,"is-multiple":e.isMultiple,readonly:!0},on:{input:function(t){return e.$emit("input",t)},change:function(t){return e.$emit("change",t)}}},"editor-component",e.$attrs,!1),e.$listeners))],1)};g._withStripped=!0;var y={components:{EditorComponent:h},props:{value:{},fieldConf:{},row:{},formName:{},container:{},isMultiple:{type:Boolean,default(){return!1}}}},b=(0,u.A)(y,g,[],!1,null,null,null);b.options.__file="components/lib/bpmQuote/src/part/reader.vue";var v=b.exports,C={name:"BpmQuote",components:{editorComponent:h,readerComponent:v},props:{value:{type:[String,Array,Number]},fieldConf:{type:Object,default(){return{}}},container:{type:Object,default(){return{}}},row:{type:Object,default(){return{}}},mode:{type:String,default(){return"view"}},uiType:{type:String,default(){return"default"}},isMultiple:{type:Boolean,default(){return!1}},formName:{type:String}},data(){return{curVal:null}},computed:{curComponent(){return"view"==this.mode?v:h}},watch:{value(){this.curVal=this.value}},mounted(){this.curVal=this.value},methods:{handleChange(e){this.$emit("input",e),this.$emit("change",e)}}},F=(0,u.A)(C,o,[],!1,null,null,null);F.options.__file="components/lib/bpmQuote/src/main.vue";var S=F.exports;S.install=function(e){e.component(S.name,S)};var k=S;return l}()});
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("lodash")):"function"==typeof define&&define.amd?define(["lodash"],t):"object"==typeof exports?exports.bpm2=t(require("lodash")):e.bpm2=t(e.lodash)}(self,function(e){return function(){"use strict";var t={7520:function(e,t,a){a.d(t,{Q:function(){return i}});let n=[{key:"lt",name:"早于"},{key:"gt",name:"晚于"},{key:"gte",name:"不早于"},{key:"lte",name:"不晚于"}],l=[{key:"in",name:"在列表中"}],o=[{key:"in",name:"在列表中"},{key:"all",name:"包含所有"}];const i={Text:{name:"单行文本",hasBpmField:!0,tableColWidth:240,actions:[{key:"contains",name:"包含"},{key:"eq",name:"等于"}],attrs:["type","value_type","id","name","linkage"]},TextArea:{name:"多行文本",hasBpmField:!0,tableColWidth:300,actions:[{key:"contains",name:"包含"},{key:"eq",name:"等于"}],attrs:["type","value_type","id","name","linkage"]},SerialNumber:{name:"流水号",hasBpmField:!0,actions:[{key:"contains",name:"包含"}],options:{type:"Text"},attrs:["type","id","name","linkage"]},Number:{name:"数字",hasBpmField:!0,tableColWidth:200,actions:[{key:"eq",name:"等于"},{key:"gt",name:"大于"},{key:"gte",name:"大于等于"},{key:"lt",name:"小于"},{key:"lte",name:"小于等于"},{key:"ne",name:"不等于"}],attrs:["type","id","name","value_type","is_int","view.precision","linkage"]},DateTime:{name:"日期时间选择器",tableColWidth:240,hasBpmField:!0,actions:n,attrs:["type","id","name","check.format","view.format","linkage"]},Date:{name:"日期选择器",tableColWidth:240,hasBpmField:!0,actions:n,attrs:["type","id","name","check.format","view.format","linkage"]},Time:{name:"时间选择器",hasBpmField:!0,tableColWidth:240,actions:n,attrs:["type","id","name","check.format","view.format","linkage"]},Timestamp:{name:"※时间戳",tableColWidth:240,actions:n,attrs:["type","id","name","check.format","view.format","linkage"]},Select:{name:"单选",hasBpmField:!0,tableColWidth:220,actions:l,options:{type:"MulSelect"},attrs:["type","id","name","value_type","style","range_enum","linkage"]},Status:{name:"状态",hasBpmField:!0,tableColWidth:150,actions:l,options:{type:"MulSelect"},attrs:["type","id","name","value_type","style","range_enum","linkage"]},MulSelect:{name:"多选",hasBpmField:!0,tableColWidth:220,actions:o,attrs:["type","id","name","value_type","result_type","style","range_enum","linkage"]},SelectFromForm:{name:"远程单项选择",hasBpmField:!0,tableColWidth:200,actions:l,options:{type:"MulSelectFromForm"},attrs:["type","id","name","range_remote","value_type","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.form","range_remote.depends","linkage"]},MulSelectFromForm:{name:"远程多项选择",hasBpmField:!0,tableColWidth:200,actions:o,attrs:["type","id","name","range_remote","value_type","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.form","range_remote.depends","linkage"]},SelectFromMulForm:{name:"关联组件",hasBpmField:!0,tableColWidth:200,actions:o,attrs:["type","id","name","range_remote","value_type"]},SelectProject:{name:"项目单项选择",hasBpmField:!0,tableColWidth:200,actions:l,options:{type:"MulSelectProject"},attrs:["type","id","name","range_remote","value_type","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.depends","linkage"]},MulSelectProject:{name:"项目多项选择",hasBpmField:!0,tableColWidth:200,actions:o,attrs:["type","id","name","range_remote","value_type","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.depends","linkage"]},SelectUser:{name:"用户单项选择",hasBpmField:!0,tableColWidth:200,actions:l,options:{type:"MulSelectUser"},attrs:["type","id","name","range_remote","value_type","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.depends","linkage"]},MulSelectUser:{name:"用户多项选择",hasBpmField:!0,tableColWidth:200,actions:o,options:{type:"MulSelectUser"},attrs:["type","id","name","range_remote","value_type","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.depends","linkage"]},SelectURUser:{name:"用户单项选择(新)",hasBpmField:!0,tableColWidth:400,actions:l,options:{type:"MulSelectURUser"},attrs:["type","id","name","range_remote","value_type","filters","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.depends","linkage"]},MulSelectURUser:{name:"用户多项选择(新)",hasBpmField:!0,tableColWidth:400,actions:o,options:{type:"MulSelectURUser"},attrs:["type","id","name","range_remote","value_type","filters","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.depends","linkage"]},SelectRootCategory:{name:"根任务类型选择",hasBpmField:!0,tableColWidth:200,actions:[{key:"eq",name:"等于"}],attrs:["type","id","name","category_cls","value_type","linkage"]},SelectCheckItem:{name:"检查项单项选择",hasBpmField:!0,actions:l,tableColWidth:200,options:{type:"MulSelectCheckItem"},attrs:["type","id","name","category_cls","value_type","range_remote","root_category","tree_select","can_select","can_select.filter_expression","range_remote.filter_expression","range_remote.depends","linkage"]},MulSelectCheckItem:{name:"检查项多项选择",hasBpmField:!0,tableColWidth:200,actions:o,attrs:["type","id","name","category_cls","value_type","range_remote","root_category","tree_select","can_select","can_select.filter_expression","range_remote.filter_expression","range_remote.depends","linkage"]},SelectSort:{name:"分类单项选择",hasBpmField:!0,tableColWidth:200,actions:l,options:{type:"MulSelectSort"},attrs:["type","id","name","value_type","range_remote","tree_select","can_select","can_select.filter_expression","range_remote.filter_expression","range_remote.depends","linkage"]},MulSelectSort:{name:"分类多项选择",hasBpmField:!0,tableColWidth:200,actions:o,attrs:["type","id","name","value_type","range_remote","tree_select","can_select","can_select.filter_expression","range_remote.filter_expression","range_remote.depends","linkage"]},SelectPartner:{name:"合作伙伴单项选择",hasBpmField:!0,tableColWidth:200,actions:l,options:{type:"MulSelectPartner"},attrs:["type","id","name","value_type","range_remote","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.depends","linkage"]},MulSelectPartner:{name:"合作伙伴多项选择",hasBpmField:!0,tableColWidth:200,actions:l,options:{type:"MulSelectPartner"},attrs:["type","id","name","value_type","range_remote","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.depends","linkage"]},SelectOrg:{name:"单位单项选择",hasBpmField:!0,tableColWidth:200,actions:l,options:{type:"MulSelectOrg"},attrs:["type","id","name","value_type","range_remote","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.depends","linkage"]},MulSelectOrg:{name:"单位多项选择",hasBpmField:!0,tableColWidth:200,actions:o,attrs:["type","id","name","value_type","range_remote","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.depends","linkage"]},Audit:{name:"审批",hasBpmField:!0,actions:[{key:"ar_eq",name:"审批结果等于"},{key:"ar_in",name:"审批结果在列表中"}],actionOptions:[{value:0,label:"未审批"},{value:1,label:"审批通过"},{value:2,label:"审批未通过"}],attrs:["type","id","name","linkage"],options:{result_type:"Array",value_type:"int",type:"MulSelect",style:"default",range_enum:[[0,"未审批"],[1,"通过"],[2,"未通过"]]}},MulAudit:{name:"多人审批",hasBpmField:!0,actions:[{key:"ar_eq",name:"审批结果等于"},{key:"ar_in",name:"审批结果在列表中"}],actionOptions:[{value:0,label:"未审批"},{value:1,label:"审批通过"},{value:2,label:"审批未通过"}],attrs:["type","id","name","linkage"],options:{result_type:"Array",value_type:"int",type:"MulSelect",style:"default",range_enum:[[0,"未审批"],[1,"通过"],[2,"未通过"]]}},MulArea:{name:"区域多项选择",hasBpmField:!0,tableColWidth:260,actions:o,attrs:["type","id","name","value_type","can","linkage"]},Area:{name:"区域单项选择",hasBpmField:!0,tableColWidth:260,actions:l,options:{type:"MulArea"},attrs:["type","id","name","value_type","can","linkage"]},SelectFormId:{name:"表单单项选择",hasBpmField:!0,tableColWidth:200,actions:l,options:{type:"MulSelectFormId"},attrs:["type","id","name","value_type","form_select_type","linkage"]},MulSelectFormId:{name:"表单多项选择",hasBpmField:!0,tableColWidth:200,actions:l,options:{type:"MulSelectFormId"},attrs:["type","id","name","value_type","form_select_type","linkage"]},SelectFromField:{name:"远程单选(从字段)",hasBpmField:!0,tableColWidth:200,actions:l,options:{type:"MulSelectFromField"},attrs:["type","id","name","range_remote","style","value_type","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.form","range_remote.depends","linkage"]},MulSelectFromField:{name:"远程多选(从字段)",hasBpmField:!0,tableColWidth:200,actions:l,options:{type:"MulSelectFromField"},attrs:["type","id","name","range_remote","style","value_type","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.form","range_remote.depends","linkage"]},MulSelectEntranceForm:{name:"远程多项选择(从入口)",hasBpmField:!0},SelectHouseOwner:{name:"业主选择"},MulSelectIssue:{name:"问题选择"},MulFile:{name:"附件",hasBpmField:!0,tableColWidth:150},MulImage:{name:"图片",hasBpmField:!0,tableColWidth:150},Signature:{name:"签名",hasBpmField:!0},OnlineEditor:{name:"在线文档编辑器"},Spliter:{name:"分割线",hasBpmField:!1},Stepper:{name:"步进器",hasBpmField:!1},Quote:{name:"跨表单数据引用",hasBpmField:!0},Order:{name:"排序控件",hasBpmField:!1},SubForm:{name:"子表单",hasBpmField:!0},XSubForm:{name:"子表单(增强版)",hasBpmField:!0},OrderSubForm:{name:"排序子表单",hasBpmField:!0},AreaElevation:{name:"区域快速选择器",hasBpmField:!0,tableColWidth:200},RichText:{name:"富文本编辑框",hasBpmField:!0,tableColWidth:100},Appointment:{name:"时段预约",hasBpmField:!0,tableColWidth:120},Rating:{name:"评分",hasBpmField:!0,tableColWidth:250},MapLocation:{name:"地图位置",hasBpmField:!0,tableColWidth:250},ExternalFormLink:{name:"外链表单组件",hasBpmField:!0,tableColWidth:200,actions:o,attrs:["type","id","name","range_remote","value_type"]}}},4747:function(e,t,a){var n=a(1601),l=a.n(n),o=a(6314);a.n(o)()(l()).push([e.id,".bpm-quote-form-list {\n width: 100%;\n}\n.bpm-quote-title-link {\n cursor: pointer;\n color: #409eff;\n}\n.bpm-quote-empty {\n padding: 16px 0;\n color: #909399;\n text-align: center;\n}\n.bpm-quote-table {\n width: 100%;\n}\n.bpm-quote-table .el-table__cell.bpm-td {\n padding: 0;\n}\n.bpm-quote-table .el-table__cell.bpm-td > .cell {\n padding: 0 10px;\n overflow: auto;\n}\n",""])},6314:function(e){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var a="",n=void 0!==t[5];return t[4]&&(a+="@supports (".concat(t[4],") {")),t[2]&&(a+="@media ".concat(t[2]," {")),n&&(a+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),a+=e(t),n&&(a+="}"),t[2]&&(a+="}"),t[4]&&(a+="}"),a}).join("")},t.i=function(e,a,n,l,o){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(n)for(var r=0;r<this.length;r++){var s=this[r][0];null!=s&&(i[s]=!0)}for(var m=0;m<e.length;m++){var d=[].concat(e[m]);n&&i[d[0]]||(void 0!==o&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=o),a&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=a):d[2]=a),l&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=l):d[4]="".concat(l)),t.push(d))}},t}},1601:function(e){e.exports=function(e){return e[1]}},4486:function(e,t,a){function n(e,t,a,n,l,o,i,r){var s,m="function"==typeof e?e.options:e;if(t&&(m.render=t,m.staticRenderFns=a,m._compiled=!0),n&&(m.functional=!0),o&&(m._scopeId="data-v-"+o),i?(s=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),l&&l.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(i)},m._ssrRegister=s):l&&(s=r?function(){l.call(this,(m.functional?this.parent:this).$root.$options.shadowRoot)}:l),s)if(m.functional){m._injectStyles=s;var d=m.render;m.render=function(e,t){return s.call(t),d(e,t)}}else{var p=m.beforeCreate;m.beforeCreate=p?[].concat(p,s):[s]}return{exports:e,options:m}}a.d(t,{A:function(){return n}})},6773:function(t){t.exports=e}},a={};function n(e){var l=a[e];if(void 0!==l)return l.exports;var o=a[e]={id:e,exports:{}};return t[e](o,o.exports,n),o.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var l={};n.r(l),n.d(l,{default:function(){return k}});var o=function(){var e=this,t=e.$createElement;return(e._self._c||t)(e.curComponent,e._g(e._b({tag:"component",staticClass:"bpm-quote",attrs:{fieldConf:e.fieldConf,row:e.row,isMultiple:e.isMultiple,mode:e.mode,formName:e.formName,container:e.container,uiType:e.uiType},on:{change:e.handleChange},model:{value:e.curVal,callback:function(t){e.curVal=t},expression:"curVal"}},"component",e.$attrs,!1),e.$listeners))};o._withStripped=!0;var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"bpm-quote-edit"},[a("form-list",{attrs:{"quote-content":e.quoteContent,"form-name":e.formName,container:e.container,"link-open-type":e.linkOpenType,"detail-dialog-width":e.detailDialogWidth}})],1)};i._withStripped=!0;var r=n(6773),s=n.n(r),m=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"bpm-quote-form-list"},[e.tableData.length?a("el-table",{staticClass:"bpm-quote-table",attrs:{data:e.tableData,border:"",size:"small","header-cell-class-name":"bpm-th","cell-class-name":"bpm-td","span-method":e.rowspanMethod}},[a("el-table-column",{attrs:{label:e.$z("标题","c.title"),"min-width":"220",fixed:"left"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{staticClass:"bpm-quote-title-link",on:{click:function(a){return e.openFormDetailPage(t.row)}}},[a("i",{staticClass:"el-icon-tickets",staticStyle:{"margin-right":"5px"}}),e._v(" "),a("span",[e._v(e._s(t.row.title))])])]}}],null,!1,3830925498)}),e._v(" "),e._l(e.columns,function(t){return[t.isSubForm?a("el-table-column",{key:t.key+"-subform",attrs:{prop:t.key,label:t.label,"min-width":t.minWidth}},[t.fieldConf.show_index?a("el-table-column",{attrs:{prop:"subfield__index",label:t.fieldConf.index_label||e.$z("序号","b2.common.subform_index"),width:"100"},scopedSlots:e._u([{key:"default",fn:function(n){return[e.getSubformRow(n.row,t.key)?a("div",[e._v("\n "+e._s(n.row.i+1)+"\n ")]):e._e()]}}],null,!0)}):e._e(),e._v(" "),e._l(t.subColumns,function(n){return a("el-table-column",{key:n.id,attrs:{prop:"subfield__"+n.id,label:n.name,"min-width":e.getColumnWidth(n),"class-name":"subform-cell","label-class-name":"subform-header-cell"},scopedSlots:e._u([{key:"default",fn:function(l){return[e.getSubformRow(l.row,t.key)?a("bpm-field",{attrs:{type:n.type,"field-conf":n,value:e.getSubformRow(l.row,t.key)[n.id],row:l.row,"form-name":e.formDef.id||e.formName,mode:"view","ui-type":"table",container:e.container}}):e._e()]}}],null,!0)})})],2):a("el-table-column",{key:t.key+"-field",attrs:{prop:"f_fields."+t.key,label:t.label,"min-width":t.minWidth},scopedSlots:e._u([{key:"default",fn:function(n){return[["Select","Status","SelectProject","SelectUser","SelectFromForm"].includes(t.fieldConf.type)?a("span",[e._v("\n "+e._s(n.row.f_fields&&n.row.f_fields[t.key])+"\n ")]):a("bpm-field",{attrs:{type:t.fieldConf.type,"field-conf":t.fieldConf,value:n.row.f_fields&&n.row.f_fields[t.key],row:n.row,"form-name":e.formDef.id||e.formName,mode:"view","ui-type":"table",container:e.container}})]}}],null,!0)})]})],2):a("div",{staticClass:"bpm-quote-empty"},[e._v("\n "+e._s(e.$z("暂无数据","c.no_data"))+"\n ")]),e._v(" "),a("el-dialog",{attrs:{"append-to-body":!0,visible:e.formDetailDialog.visible,"close-on-click-modal":!1,title:e.formDetailDialog.title,width:e.detailDialogWidth,top:"5vh"},on:{"update:visible":function(t){return e.$set(e.formDetailDialog,"visible",t)}}},[e.formDetailDialog.visible?a("iframe",{staticClass:"detail-form-iframe",attrs:{src:e.formDetailDialog.iframe_url,frameborder:"0",width:"100%",height:e.iframeHeight+"px"}}):e._e()])],1)};m._withStripped=!0;var d=n(7520),p={name:"BpmQuoteFormList",props:{quoteContent:{type:Object,default(){return{}}},formName:{type:String,default:""},container:{type:Object,default(){return{}}},linkOpenType:{type:String,default:"dialog"},detailDialogWidth:{type:String,default:"80%"}},data(){return{formDetailDialog:{visible:!1,title:"",iframe_url:""},iframeHeight:850}},computed:{formDef(){return s().get(this.quoteContent,"definition.form",{})},elements(){return s().get(this.formDef,"elements",[])},columns(){return s().chain(this.elements).filter(e=>s().get(e,"perm.visible",!0)).filter(e=>e.type&&-1!==e.type.indexOf("SubForm")||s().get(d.Q,[e.type,"hasBpmField"],!0)).map(e=>{const t=e.type&&-1!==e.type.indexOf("SubForm"),a=t?s().filter(s().get(e,"elements",[]),e=>s().get(e,"perm.visible",!0)&&s().get(d.Q,[e.type,"hasBpmField"],!0)):[];return{key:e.id,label:e.name,fieldConf:e,isSubForm:t,subColumns:a,minWidth:t?this.getSubformColWidth(a):this.getColumnWidth(e)}}).value()},subFormKeys(){return s().chain(this.columns).filter({isSubForm:!0}).map("key").value()},tableData(){return this.getFlatTableData(s().get(this.quoteContent,"data",[]),this.subFormKeys)}},created(){let e=.85*window.innerHeight-84;this.iframeHeight=e},methods:{openFormDetailPage(e){if(zj.pageParam().hidden_form_title)return!1;const t=this.formDef.id;if(!t)return!1;let a=this.formDef.type;a="ProcessForm"===a?"processform":"DataForm"===a?"dataform":s().toLower(a||"");const n=zj.pageParam().project_id,l=zj.pageParam().page_level||"project";let o=`/public/bpm3/app/table.html?form_name=${t}&form_type=${a}&form_id=${e.form_id}&project_id=${n}&page_level=${l}#/detail`;"dialog"===this.linkOpenType?(o=`/public/bpm3/app/table.html?is_mirco_app=1&form_name=${t}&form_type=${a}&form_id=${e.form_id}&project_id=${n}&hidden_form_title=1&page_level=${l}#/detail`,this.formDetailDialog.iframe_url=o,this.formDetailDialog.visible=!0,this.formDetailDialog.title=e.title):window.open(o,"_blank")},getColumnWidth(e){return s().get(e,"display.column_width")||s().get(d.Q,[e.type,"tableColWidth"])||120},getSubformColWidth(e){return s().sumBy(e,e=>Number(this.getColumnWidth(e))||120)||120},getSubformRow(e,t){return s().get(e,["f_fields",t,e.i],null)},getFlatTableData(e,t){if(!t||!t.length)return s().cloneDeep(e);const a=[];return s().each(e,e=>{const n=s().cloneDeep(e);s().each(t,e=>{const t=s().get(n,["f_fields",e],[]);s().isArray(t)&&s().set(n,["f_fields",e],s().filter(t,e=>!s().get(e,"_meta.is_deleted",!1)))});const l=s().max(s().map(t,e=>s().get(n,["f_fields",e],[]).length))||0;if(0!==l)for(let e=0;e<l;e++)a.push({...n,hasRowspan:!0,rowspan:0===e?l:0,colspan:0===e?1:0,i:e});else a.push(n)}),a},rowspanMethod({row:e,column:t}){if(e.hasRowspan&&t&&t.property&&0!==t.property.indexOf("subfield__"))return{rowspan:e.rowspan,colspan:e.colspan}}}},u=(n(4747),n(4486)),c=(0,u.A)(p,m,[],!1,null,null,null);c.options.__file="components/lib/bpmQuote/src/part/form-list.vue";var f={components:{FormList:c.exports},props:{value:{},fieldConf:{},row:{},formName:{},container:{},isMultiple:{type:Boolean,default(){return!1}},readonly:{type:Boolean,default(){return!1}}},data(){return{quoteContent:{},elements:[],tabIndex:0,list:[],elementsList:[],isQuote:!0,curVal:null}},watch:{quoteContent(e){e&&(this.$bpm.quoteContentMap||(this.$bpm.quoteContentMap={}),this.$bpm.quoteContentMap[this.fieldConf.id]=s().cloneDeep(this.quoteContent))},value(e){console.log("quote_select_val",e),"loadData"==e?this.loadQuoteData():this.onFieldValueChange()}},computed:{linkOpenType(){return s().get(this.fieldConf,"style.link_open_type","dialog")},detailDialogWidth(){return this.getDetailDialogWidth()}},created(){this.curVal=this.isMultiple?[]:null},mounted(){setTimeout(async()=>{this.loadQuoteData()},500)},methods:{getDetailDialogWidth(){const e=s().get(this.fieldConf,"style.dialog_width");return e?s().isNumber(e)?`${e}%`:String(e):"80%"},async loadQuoteData(){let e=s().get(this.fieldConf,"scope",null);console.log("loadQuoteData_scope",e),console.log("loadQuoteData.container",this.container);let t=null;if(!s().isEmpty(e)&&e){let a=e.depends;console.log("loadQuoteData.field_depends",a),s().each(a,e=>{t||(t={}),this.container&&this.container.formData&&this.container.formData[e]&&(t[e]=this.container.formData[e])})}console.log("loadQuoteData.fieldParams",t);let a=this.fieldConf.id,n=await this.$bpm.searchSelectOpts(a,"",this.formName,null,!1,t?{fields:JSON.stringify(t)}:{},!0);this.quoteContent=n,console.log("bpmQuote quoteContent: ",this.quoteContent),this.curVal=s().map(n.data,"form_id"),this.$emit("input",this.curVal),this.$emit("change",this.curVal)},onDataLoaded(){this.onFieldValueChange()},onFieldValueChange(){console.log("link_onFieldValueChange bpmQuote")},async loadRemoteLabel(){let e=this.curVal;if("loadData"!=e)if(s().isEmpty(e))this.quoteContent={data:[],definition:{}};else try{this.loading=!0;let t=await this.$bpm.loadQuteTitle(e,this.fieldConf.id,this.formName,this.row);this.quoteContent=t}finally{this.loading=!1}}}},_=(0,u.A)(f,i,[],!1,null,null,null);_.options.__file="components/lib/bpmQuote/src/part/editor.vue";var h=_.exports,g=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"bpm-quote-reader"},[a("editor-component",e._g(e._b({attrs:{value:e.value,"field-conf":e.fieldConf,row:e.row,"form-name":e.formName,container:e.container,"is-multiple":e.isMultiple,readonly:!0},on:{input:function(t){return e.$emit("input",t)},change:function(t){return e.$emit("change",t)}}},"editor-component",e.$attrs,!1),e.$listeners))],1)};g._withStripped=!0;var y={components:{EditorComponent:h},props:{value:{},fieldConf:{},row:{},formName:{},container:{},isMultiple:{type:Boolean,default(){return!1}}}},b=(0,u.A)(y,g,[],!1,null,null,null);b.options.__file="components/lib/bpmQuote/src/part/reader.vue";var v=b.exports,C={name:"BpmQuote",components:{editorComponent:h,readerComponent:v},props:{value:{type:[String,Array,Number]},fieldConf:{type:Object,default(){return{}}},container:{type:Object,default(){return{}}},row:{type:Object,default(){return{}}},mode:{type:String,default(){return"view"}},uiType:{type:String,default(){return"default"}},isMultiple:{type:Boolean,default(){return!1}},formName:{type:String}},data(){return{curVal:null}},computed:{curComponent(){return"view"==this.mode?v:h}},watch:{value(){this.curVal=this.value}},mounted(){this.curVal=this.value},methods:{handleChange(e){this.$emit("input",e),this.$emit("change",e)}}},F=(0,u.A)(C,o,[],!1,null,null,null);F.options.__file="components/lib/bpmQuote/src/main.vue";var S=F.exports;S.install=function(e){e.component(S.name,S)};var k=S;return l}()});