@zhijiancloud/bpm 1.0.67 → 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}()});
@@ -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(){var t={5366:function(e,t,i){"use strict";var o=i(1601),n=i.n(o),r=i(6314),l=i.n(r)()(n());l.push([e.id,".select-from-form-editor {\n .fake-trigger {\n height: 40px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n line-height: 38px;\n box-sizing: border-box;\n border: 1px solid #d9dce3;\n border-radius: 4px;\n padding: 0 15px;\n cursor: pointer;\n }\n}\n.bpm-select-from-form-box{\n list-style: none;\n padding: 10px 0;\n max-height: calc(70vh - 220px);\n box-sizing: border-box;\n overflow: auto;\n\n .form-item{\n list-style: none;\n margin-bottom: 10px;\n }\n .subitem {\n margin-left: 24px;\n font-size: 12px;\n color: #949494;\n }\n}\n",""]),t.A=l},3345:function(e,t,i){"use strict";var o=i(1601),n=i.n(o),r=i(6314),l=i.n(r),s=i(5366),a=l()(n());a.i(s.A),a.push([e.id,"\n",""]),t.A=a},6314:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var i="",o=void 0!==t[5];return t[4]&&(i+="@supports (".concat(t[4],") {")),t[2]&&(i+="@media ".concat(t[2]," {")),o&&(i+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),i+=e(t),o&&(i+="}"),t[2]&&(i+="}"),t[4]&&(i+="}"),i}).join("")},t.i=function(e,i,o,n,r){"string"==typeof e&&(e=[[null,e,void 0]]);var l={};if(o)for(var s=0;s<this.length;s++){var a=this[s][0];null!=a&&(l[a]=!0)}for(var c=0;c<e.length;c++){var u=[].concat(e[c]);o&&l[u[0]]||(void 0!==r&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=r),i&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=i):u[2]=i),n&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=n):u[4]="".concat(n)),t.push(u))}},t}},1601:function(e){"use strict";e.exports=function(e){return e[1]}},5072:function(e){"use strict";var t=[];function i(e){for(var i=-1,o=0;o<t.length;o++)if(t[o].identifier===e){i=o;break}return i}function o(e,o){for(var r={},l=[],s=0;s<e.length;s++){var a=e[s],c=o.base?a[0]+o.base:a[0],u=r[c]||0,f="".concat(c," ").concat(u);r[c]=u+1;var d=i(f),p={css:a[1],media:a[2],sourceMap:a[3],supports:a[4],layer:a[5]};if(-1!==d)t[d].references++,t[d].updater(p);else{var m=n(p,o);o.byIndex=s,t.splice(s,0,{identifier:f,updater:m,references:1})}l.push(f)}return l}function n(e,t){var i=t.domAPI(t);return i.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;i.update(e=t)}else i.remove()}}e.exports=function(e,n){var r=o(e=e||[],n=n||{});return function(e){e=e||[];for(var l=0;l<r.length;l++){var s=i(r[l]);t[s].references--}for(var a=o(e,n),c=0;c<r.length;c++){var u=i(r[c]);0===t[u].references&&(t[u].updater(),t.splice(u,1))}r=a}}},7659:function(e){"use strict";var t={};e.exports=function(e,i){var o=function(e){if(void 0===t[e]){var i=document.querySelector(e);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(e){i=null}t[e]=i}return t[e]}(e);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(i)}},540:function(e){"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},5056:function(e,t,i){"use strict";e.exports=function(e){var t=i.nc;t&&e.setAttribute("nonce",t)}},7825:function(e){"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(i){!function(e,t,i){var o="";i.supports&&(o+="@supports (".concat(i.supports,") {")),i.media&&(o+="@media ".concat(i.media," {"));var n=void 0!==i.layer;n&&(o+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),o+=i.css,n&&(o+="}"),i.media&&(o+="}"),i.supports&&(o+="}");var r=i.sourceMap;r&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),t.styleTagTransform(o,e,t.options)}(t,e,i)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},1113:function(e){"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},4486:function(e,t,i){"use strict";function o(e,t,i,o,n,r,l,s){var a,c="function"==typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=i,c._compiled=!0),o&&(c.functional=!0),r&&(c._scopeId="data-v-"+r),l?(a=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__),n&&n.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(l)},c._ssrRegister=a):n&&(a=s?function(){n.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:n),a)if(c.functional){c._injectStyles=a;var u=c.render;c.render=function(e,t){return a.call(t),u(e,t)}}else{var f=c.beforeCreate;c.beforeCreate=f?[].concat(f,a):[a]}return{exports:e,options:c}}i.d(t,{A:function(){return o}})},7642:function(e){e.exports=function(){return this.ELEMENT}()},5554:function(e){e.exports=function(){return this.Vue}()},6773:function(t){"use strict";t.exports=e}},i={};function o(e){var n=i[e];if(void 0!==n)return n.exports;var r=i[e]={id:e,exports:{}};return t[e](r,r.exports,o),r.exports}o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,{a:t}),t},o.d=function(e,t){for(var i in t)o.o(t,i)&&!o.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nc=void 0;var n={};return function(){"use strict";o.r(n),o.d(n,{default:function(){return D}});var e=function(){var e=this,t=e.$createElement;return(e._self._c||t)(e.curComponent,e._g(e._b({tag:"component",staticClass:"bpm-select-from-form",attrs:{fieldConf:e.fieldConf,row:e.row,mode:e.mode,formName:e.formName,orgInfo:e.orgInfo,uiType:e.uiType,isMultiple:e.isMultiple},on:{change:e.handleChange},model:{value:e.curVal,callback:function(t){e.curVal=t},expression:"curVal"}},"component",e.$attrs,!1),e.$listeners))};e._withStripped=!0;var t=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"select-from-form-editor"},[i("div",[i("el-select",{attrs:{placeholder:e.fieldConf.name,multiple:e.isMultiple,clearable:""},on:{focus:e.toOpen,"remove-tag":e.delItem,clear:e.delItem},model:{value:e.confirmValue,callback:function(t){e.confirmValue=t},expression:"confirmValue"}},e._l(e.curOptions,function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}),1)],1),e._v(" "),i("el-dialog",{attrs:{"append-to-body":!0,visible:e.opened,"before-close":e.onHide,title:e.fieldConf.name,width:"40%"},on:{"update:visible":function(t){e.opened=t},open:e.onOpen}},[i("el-input",{staticClass:"input-with-select",attrs:{placeholder:e.$z("只展示前100条数据,通过搜索获取更多","b2.common.see_100_data")},on:{input:e.throttleSearch},model:{value:e.keyword,callback:function(t){e.keyword=t},expression:"keyword"}}),e._v(" "),i("div",{staticClass:"bpm-select-from-form-box"},[e.isMultiple?i("el-checkbox-group",{attrs:{max:e.maxCount},model:{value:e.curVal,callback:function(t){e.curVal=t},expression:"curVal"}},e._l(e.formList,function(t){return i("div",{key:t.id,staticClass:"form-item"},[i("div",{style:e.titleStyle},[i("el-checkbox",{key:t.id,attrs:{label:t.id}},[e._v(e._s(t.title))])],1),e._v(" "),e._l(t.fields,function(t){return i("div",{key:t.id,staticClass:"subitem",style:e.geFieldStyle(t.key)},[i("span",{staticStyle:{"white-space":"nowrap"}},[e._v(e._s(t.name+": "))]),i("span",{domProps:{innerHTML:e._s(t.value)}})])})],2)}),0):i("el-radio-group",{on:{change:e.onSubmit},model:{value:e.curVal,callback:function(t){e.curVal=t},expression:"curVal"}},e._l(e.formList,function(t){return i("div",{key:t.id,staticClass:"form-item"},[i("div",{style:e.titleStyle},[i("el-radio",{key:t.id,attrs:{label:t.id,value:t.id}},[e._v(e._s(t.title))])],1),e._v(" "),e._l(t.fields,function(t){return i("div",{key:t.id,staticClass:"subitem",style:e.geFieldStyle(t.key)},[i("span",{staticStyle:{"white-space":"nowrap"}},[e._v(e._s(t.name+": "))]),i("span",{domProps:{innerHTML:e._s(t.value)}})])})],2)}),0)],1),e._v(" "),e.isMultiple?i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v(e._s(e.$z("确定","c.confirm")))])],1):e._e()],1)],1)};t._withStripped=!0;var i=o(5554),r=o.n(i),l=o(6773),s=o.n(l),a=o(7642);r().use(a.Dialog);var c={props:["value","fieldConf","row","formName","orgInfo","isMultiple"],inject:["getSelectFields","selectOptions"],data(){return{curVal:"",curOptions:[],keyword:"",opened:!1,throttleSearch:s().throttle(s().bind(this.search,this),1500,{trailing:!0,leading:!1}),formList:[],fieldDefinitionMap:{}}},watch:{value(e){console.log("select_from_form_val",e),(s().isString(e)||s().isArray(e))&&(this.curVal=e,this.confirmValue=e),this.loadRemoteLabel()},selectOptionsList(e){this.fieldConf.default&&"Default"==this.fieldConf.default.type&&"EVCFirstElem"==this.fieldConf.default.value.type&&(this.formList=this.transformOptions(e),this.formList&&this.formList.length?(console.log("this.formList",this.formList),this.isMultiple?this.curVal=[this.formList[0].id]:this.curVal=this.formList[0].id):this.isMultiple?this.curVal=[]:this.curVal="",console.log("this.curVal",this.curVal),this.onSubmit()),console.log("fieldConf",this.fieldConf),console.log("selectOptionsList",e)}},computed:{selectOptionsList(){return this.selectOptions()},placeholder(){return this.fieldConf.desc||this.fieldConf.name},maxCount(){return s().get(this.fieldConf,"check.max_count")},titleStyle(){let e=this.fieldConf,t=s().get(e,"range_remote.range_display.title");return{fontSize:s().get(t,"size",16)+"px",color:s().get(t,"color","#333")}},fieldStyleMap(){let e=this.fieldConf,t=s().get(e,"range_remote.range_display.fields");return s().keyBy(t,"field")}},created(){},mounted(){this.getCurVal(),this.loadRemoteLabel()},methods:{delItem(){this.curVal=this.confirmValue,this.$emit("input",this.curVal),this.$emit("change",this.curVal)},getCurVal(){this.value&&(s().isString(this.value)||s().isArray(this.value))?this.curVal=this.value:this.curVal=this.isMultiple?[]:""},geFieldStyle(e){let t=s().get(this.fieldStyleMap,e);return{fontSize:s().get(t,"size",12)+"px",color:s().get(t,"color","#949494"),display:"flex"}},async search(){let e=this.keyword,t=this.formName,i=s().get(this.fieldConf,"id");const o=this.orgInfo;let n=this.getSelectFields();n&&"{}"!==JSON.stringify(n)&&(o.fields=n);let r=await this.$bpm.searchSelectOpts(i,e,t,this,!1,o,!0);console.log("result",r),r&&r.definition&&r.definition.form&&r.definition.form.elements&&s().each(r.definition.form.elements,e=>{this.fieldDefinitionMap[e.id]=e}),console.log("this.fieldDefinitionMap",this.fieldDefinitionMap);let l=this.transformOptions(r.data);this.formList=l},transformOptions(e){return s().map(e,e=>({title:e.title,id:e.form_id,form_id:e.form_id,f_fields:e.f_fields,fields:s().map(e.f_fields,(e,t)=>({key:t,value:e,name:this.fieldDefinitionMap[t]?this.fieldDefinitionMap[t].name:this.$bpm.fieldDefinitionMap[t].name}))}))},onHide(){this.opened=!1},onOpen(){this.getCurVal();let e=this.selectOptions();e&&e.length?this.formList=this.transformOptions(e):this.search()},toOpen(){this.opened=!0},isChecked(e){return s().includes(this.curVal,e)},onSubmit(){console.log("this.curVal",this.curVal),this.$emit("input",this.curVal),this.$emit("change",this.curVal),this.opened=!1},async loadRemoteLabel(){let e=this.value,t=s().get(this.fieldConf,"id");if(console.log("values",e),this.curOptions=[],s().isEmpty(e))this.curOptions=[],this.curVal="";else{e=s().isArray(e)?e:[e];let i=await this.$bpm.fetchLabelByValues(e,t,this.formName,this.row,!0,this.row,!0);s().each(i,(e,t)=>{this.curOptions.push({value:e.value,label:e.label})})}}}},u=o(4486),f=(0,u.A)(c,t,[],!1,null,null,null);f.options.__file="components/lib/bpmSelectFromForm/src/part/editor.vue";var d=f.exports,p=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[e.items.length>0?i("div",e._l(e.items,function(t){return i("el-tag",{key:t,staticStyle:{"margin-right":"5px","margin-top":"4px",cursor:"pointer"},on:{click:function(i){return i.stopPropagation(),e.toFormDetailPage(t)}}},[i("i",{staticClass:"el-icon-tickets",staticStyle:{"margin-right":"5px"}}),e._v(e._s(t.label))])}),1):i("div",[i("span",[e._v(e._s(e.label))])]),e._v(" "),i("el-dialog",{attrs:{"append-to-body":!0,visible:e.detailDialogVisible,"close-on-click-modal":!1,title:e.detailDialogTtile,width:e.detailDialogWidth,top:"5vh"},on:{"update:visible":function(t){e.detailDialogVisible=t}}},[i("iframe",{ref:"detailFrame",staticClass:"detail-form-iframe",attrs:{src:e.detailFrameUrl,frameborder:"0",width:"100%",height:"600px"}})])],1)};p._withStripped=!0;var m={props:["value","fieldConf","row","formName","orgInfo"],data(){return{mode:"normal",items:[],label:zj.z("未选择","c.not_selected"),detailDialogVisible:!1,detailDialogTtile:"",detailFrameUrl:""}},watch:{value(){this.loadRemoteInfo()}},mounted(){this.loadRemoteInfo()},computed:{detailDialogWidth(){return this.fieldConf&&this.fieldConf.style?this.fieldConf.style.dialog_width+"%"||0:"80%"}},methods:{async loadRemoteInfo(){let e=this.value;if(s().isNil(e)||!e)return this.label=zj.z("未选择","c.not_selected");try{if(s().isObject(e))try{e=JSON.parse(e)}catch(t){console.log("JSON.parse",e),console.log("error",t)}let t=s().isArray(e)?e:[e],i=s().get(this.fieldConf,"id");if(s().isEmpty(t))this.label=zj.z("未选择","c.not_selected");else{t=s().isArray(t)?t:[t];let e=[],o=await this.$bpm.fetchLabelByValues(t,i,this.formName,this.row,!0,this.row,!0);console.log("bpmSelectFromForm_res",o),o&&o.length&&(e=o.map(e=>{let t={form_id:e.value,label:e.label};if(e&&e.res&&e.res.definition&&e.res.definition){let i=e.res.definition.form;t.form_type=i.type,t.form_def_id=i.id,t.page_level=i.level,t.process=i.process}return t})),this.items=e}}finally{console.log("finally")}},toFormDetailPage(e){let t=e.form_id;this.detailDialogTtile=e.label;const i=s().get(this.orgInfo,"project_id","");let o=`/public/bpm3/app/table.html?form_name=${e.form_def_id||""}&is_mirco_app=1&hidden_form_title=1&form_type=${s().toLower(e.form_type)}&project_id=${i}&page_level=${e.page_level||""}&form_id=${t}#/detail`;this.detailFrameUrl=o,this.detailDialogVisible=!0}}},h=(0,u.A)(m,p,[],!1,null,null,null);h.options.__file="components/lib/bpmSelectFromForm/src/part/reader.vue";var v=h.exports,g={name:"bpmSelectFromForm",components:{editorComponent:d,readerComponent:v},props:{value:{type:[String,Array],default(){return""}},fieldConf:{type:Object,default(){return{}}},row:{type:Object,default(){return{}}},mode:{type:String,default(){return"view"}},uiType:{type:String,default(){return"default"}},orgInfo:{type:Object},formName:{type:String},isMultiple:{type:Boolean,default(){return!1}}},data(){return{curVal:""}},computed:{curComponent(){return"view"==this.mode?v:d}},watch:{value(){console.log("selectFormForm_value",this.value),this.curVal=this.value}},mounted(){this.curVal=this.value},methods:{handleChange(e){this.$emit("input",e),this.$emit("change",e)}}},y=o(5072),b=o.n(y),_=o(7825),x=o.n(_),C=o(7659),S=o.n(C),V=o(5056),w=o.n(V),O=o(540),k=o.n(O),M=o(1113),$=o.n(M),F=o(3345),L={};L.styleTagTransform=$(),L.setAttributes=w(),L.insert=S().bind(null,"head"),L.domAPI=x(),L.insertStyleElement=k(),b()(F.A,L),F.A&&F.A.locals&&F.A.locals;var T=(0,u.A)(g,e,[],!1,null,null,null);T.options.__file="components/lib/bpmSelectFromForm/src/main.vue";var A=T.exports;A.install=function(e){e.component(A.name,A)};var D=A}(),n}()});
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(){var t={5366:function(e,t,i){"use strict";var o=i(1601),n=i.n(o),r=i(6314),l=i.n(r)()(n());l.push([e.id,".select-from-form-editor {\n .fake-trigger {\n height: 40px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n line-height: 38px;\n box-sizing: border-box;\n border: 1px solid #d9dce3;\n border-radius: 4px;\n padding: 0 15px;\n cursor: pointer;\n }\n}\n.bpm-select-from-form-box{\n list-style: none;\n padding: 10px 0;\n max-height: calc(70vh - 220px);\n box-sizing: border-box;\n overflow: auto;\n\n .form-item{\n list-style: none;\n margin-bottom: 10px;\n }\n .subitem {\n margin-left: 24px;\n font-size: 12px;\n color: #949494;\n }\n}\n",""]),t.A=l},3345:function(e,t,i){"use strict";var o=i(1601),n=i.n(o),r=i(6314),l=i.n(r),s=i(5366),a=l()(n());a.i(s.A),a.push([e.id,"\n",""]),t.A=a},6314:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var i="",o=void 0!==t[5];return t[4]&&(i+="@supports (".concat(t[4],") {")),t[2]&&(i+="@media ".concat(t[2]," {")),o&&(i+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),i+=e(t),o&&(i+="}"),t[2]&&(i+="}"),t[4]&&(i+="}"),i}).join("")},t.i=function(e,i,o,n,r){"string"==typeof e&&(e=[[null,e,void 0]]);var l={};if(o)for(var s=0;s<this.length;s++){var a=this[s][0];null!=a&&(l[a]=!0)}for(var c=0;c<e.length;c++){var u=[].concat(e[c]);o&&l[u[0]]||(void 0!==r&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=r),i&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=i):u[2]=i),n&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=n):u[4]="".concat(n)),t.push(u))}},t}},1601:function(e){"use strict";e.exports=function(e){return e[1]}},5072:function(e){"use strict";var t=[];function i(e){for(var i=-1,o=0;o<t.length;o++)if(t[o].identifier===e){i=o;break}return i}function o(e,o){for(var r={},l=[],s=0;s<e.length;s++){var a=e[s],c=o.base?a[0]+o.base:a[0],u=r[c]||0,f="".concat(c," ").concat(u);r[c]=u+1;var d=i(f),p={css:a[1],media:a[2],sourceMap:a[3],supports:a[4],layer:a[5]};if(-1!==d)t[d].references++,t[d].updater(p);else{var m=n(p,o);o.byIndex=s,t.splice(s,0,{identifier:f,updater:m,references:1})}l.push(f)}return l}function n(e,t){var i=t.domAPI(t);return i.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;i.update(e=t)}else i.remove()}}e.exports=function(e,n){var r=o(e=e||[],n=n||{});return function(e){e=e||[];for(var l=0;l<r.length;l++){var s=i(r[l]);t[s].references--}for(var a=o(e,n),c=0;c<r.length;c++){var u=i(r[c]);0===t[u].references&&(t[u].updater(),t.splice(u,1))}r=a}}},7659:function(e){"use strict";var t={};e.exports=function(e,i){var o=function(e){if(void 0===t[e]){var i=document.querySelector(e);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(e){i=null}t[e]=i}return t[e]}(e);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(i)}},540:function(e){"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},5056:function(e,t,i){"use strict";e.exports=function(e){var t=i.nc;t&&e.setAttribute("nonce",t)}},7825:function(e){"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(i){!function(e,t,i){var o="";i.supports&&(o+="@supports (".concat(i.supports,") {")),i.media&&(o+="@media ".concat(i.media," {"));var n=void 0!==i.layer;n&&(o+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),o+=i.css,n&&(o+="}"),i.media&&(o+="}"),i.supports&&(o+="}");var r=i.sourceMap;r&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),t.styleTagTransform(o,e,t.options)}(t,e,i)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},1113:function(e){"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},4486:function(e,t,i){"use strict";function o(e,t,i,o,n,r,l,s){var a,c="function"==typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=i,c._compiled=!0),o&&(c.functional=!0),r&&(c._scopeId="data-v-"+r),l?(a=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__),n&&n.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(l)},c._ssrRegister=a):n&&(a=s?function(){n.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:n),a)if(c.functional){c._injectStyles=a;var u=c.render;c.render=function(e,t){return a.call(t),u(e,t)}}else{var f=c.beforeCreate;c.beforeCreate=f?[].concat(f,a):[a]}return{exports:e,options:c}}i.d(t,{A:function(){return o}})},7642:function(e){e.exports=function(){return this.ELEMENT}()},5554:function(e){e.exports=function(){return this.Vue}()},6773:function(t){"use strict";t.exports=e}},i={};function o(e){var n=i[e];if(void 0!==n)return n.exports;var r=i[e]={id:e,exports:{}};return t[e](r,r.exports,o),r.exports}o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,{a:t}),t},o.d=function(e,t){for(var i in t)o.o(t,i)&&!o.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nc=void 0;var n={};return function(){"use strict";o.r(n),o.d(n,{default:function(){return D}});var e=function(){var e=this,t=e.$createElement;return(e._self._c||t)(e.curComponent,e._g(e._b({tag:"component",staticClass:"bpm-select-from-form",attrs:{fieldConf:e.fieldConf,row:e.row,mode:e.mode,formName:e.formName,orgInfo:e.orgInfo,uiType:e.uiType,isMultiple:e.isMultiple},on:{change:e.handleChange},model:{value:e.curVal,callback:function(t){e.curVal=t},expression:"curVal"}},"component",e.$attrs,!1),e.$listeners))};e._withStripped=!0;var t=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"select-from-form-editor"},[i("div",[i("el-select",{attrs:{placeholder:e.fieldConf.name,multiple:e.isMultiple,clearable:""},on:{focus:e.toOpen,"remove-tag":e.delItem,clear:e.delItem},model:{value:e.confirmValue,callback:function(t){e.confirmValue=t},expression:"confirmValue"}},e._l(e.curOptions,function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}),1)],1),e._v(" "),i("el-dialog",{attrs:{"append-to-body":!0,visible:e.opened,"before-close":e.onHide,title:e.fieldConf.name,width:"40%"},on:{"update:visible":function(t){e.opened=t},open:e.onOpen}},[i("el-input",{staticClass:"input-with-select",attrs:{placeholder:e.$z("只展示前100条数据,通过搜索获取更多","b2.common.see_100_data")},on:{input:e.throttleSearch},model:{value:e.keyword,callback:function(t){e.keyword=t},expression:"keyword"}}),e._v(" "),i("div",{staticClass:"bpm-select-from-form-box"},[e.isMultiple?i("el-checkbox-group",{attrs:{max:e.maxCount},model:{value:e.curVal,callback:function(t){e.curVal=t},expression:"curVal"}},e._l(e.formList,function(t){return i("div",{key:t.id,staticClass:"form-item"},[i("div",{style:e.titleStyle},[i("el-checkbox",{key:t.id,attrs:{label:t.id}},[e._v(e._s(t.title))])],1),e._v(" "),e._l(t.fields,function(t){return i("div",{key:t.id,staticClass:"subitem",style:e.geFieldStyle(t.key)},[i("span",{staticStyle:{"white-space":"nowrap"}},[e._v(e._s(t.name+": "))]),i("span",{domProps:{innerHTML:e._s(t.value)}})])})],2)}),0):i("el-radio-group",{on:{change:e.onSubmit},model:{value:e.curVal,callback:function(t){e.curVal=t},expression:"curVal"}},e._l(e.formList,function(t){return i("div",{key:t.id,staticClass:"form-item"},[i("div",{style:e.titleStyle},[i("el-radio",{key:t.id,attrs:{label:t.id,value:t.id}},[e._v(e._s(t.title))])],1),e._v(" "),e._l(t.fields,function(t){return i("div",{key:t.id,staticClass:"subitem",style:e.geFieldStyle(t.key)},[i("span",{staticStyle:{"white-space":"nowrap"}},[e._v(e._s(t.name+": "))]),i("span",{domProps:{innerHTML:e._s(t.value)}})])})],2)}),0)],1),e._v(" "),e.isMultiple?i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v(e._s(e.$z("确定","c.confirm")))])],1):e._e()],1)],1)};t._withStripped=!0;var i=o(5554),r=o.n(i),l=o(6773),s=o.n(l),a=o(7642);r().use(a.Dialog);var c={props:["value","fieldConf","row","formName","orgInfo","isMultiple"],inject:["getSelectFields","selectOptions"],data(){return{curVal:"",curOptions:[],keyword:"",opened:!1,throttleSearch:s().throttle(s().bind(this.search,this),1500,{trailing:!0,leading:!1}),formList:[],fieldDefinitionMap:{}}},watch:{value(e){console.log("select_from_form_val",e),(s().isString(e)||s().isArray(e))&&(this.curVal=e,this.confirmValue=e),this.loadRemoteLabel()},selectOptionsList(e){this.fieldConf.default&&"Default"==this.fieldConf.default.type&&"EVCFirstElem"==this.fieldConf.default.value.type&&(this.formList=this.transformOptions(e),this.formList&&this.formList.length?(console.log("this.formList",this.formList),this.isMultiple?this.curVal=[this.formList[0].id]:this.curVal=this.formList[0].id):this.isMultiple?this.curVal=[]:this.curVal="",console.log("this.curVal",this.curVal),this.onSubmit()),console.log("fieldConf",this.fieldConf),console.log("selectOptionsList",e)}},computed:{selectOptionsList(){return this.selectOptions()},placeholder(){return this.fieldConf.desc||this.fieldConf.name},maxCount(){return s().get(this.fieldConf,"check.max_count")},titleStyle(){let e=this.fieldConf,t=s().get(e,"range_remote.range_display.title");return{fontSize:s().get(t,"size",16)+"px",color:s().get(t,"color","#333")}},fieldStyleMap(){let e=this.fieldConf,t=s().get(e,"range_remote.range_display.fields");return s().keyBy(t,"field")}},created(){},mounted(){this.getCurVal(),this.loadRemoteLabel()},methods:{delItem(){this.curVal=this.confirmValue,this.$emit("input",this.curVal),this.$emit("change",this.curVal)},getCurVal(){this.value&&(s().isString(this.value)||s().isArray(this.value))?this.curVal=this.value:this.curVal=this.isMultiple?[]:""},geFieldStyle(e){let t=s().get(this.fieldStyleMap,e);return{fontSize:s().get(t,"size",12)+"px",color:s().get(t,"color","#949494"),display:"flex"}},async search(){let e=this.keyword,t=this.formName,i=s().get(this.fieldConf,"id");const o=this.orgInfo;let n=this.getSelectFields();n&&"{}"!==JSON.stringify(n)&&(o.fields=n);let r=await this.$bpm.searchSelectOpts(i,e,t,this,!1,o,!0);console.log("result",r),r&&r.definition&&r.definition.form&&r.definition.form.elements&&s().each(r.definition.form.elements,e=>{this.fieldDefinitionMap[e.id]=e}),console.log("this.fieldDefinitionMap",this.fieldDefinitionMap);let l=this.transformOptions(r.data);this.formList=l},transformOptions(e){return s().map(e,e=>({title:e.title,id:e.form_id,form_id:e.form_id,f_fields:e.f_fields,fields:s().map(e.f_fields,(e,t)=>({key:t,value:e,name:this.fieldDefinitionMap[t]?this.fieldDefinitionMap[t].name:this.$bpm.fieldDefinitionMap[t].name}))}))},onHide(){this.opened=!1},onOpen(){this.getCurVal();let e=this.selectOptions();e&&e.length?this.formList=this.transformOptions(e):this.search()},toOpen(){this.opened=!0},isChecked(e){return s().includes(this.curVal,e)},onSubmit(){console.log("this.curVal",this.curVal),this.$emit("input",this.curVal),this.$emit("change",this.curVal),this.opened=!1},async loadRemoteLabel(){let e=this.value,t=s().get(this.fieldConf,"id");if(console.log("values",e),this.curOptions=[],s().isEmpty(e))this.curOptions=[],this.curVal="";else{e=s().isArray(e)?e:[e];let i=await this.$bpm.fetchLabelByValues(e,t,this.formName,this.row,!0,this.row,!0);s().each(i,(e,t)=>{this.curOptions.push({value:e.value,label:e.label})})}}}},u=o(4486),f=(0,u.A)(c,t,[],!1,null,null,null);f.options.__file="components/lib/bpmSelectFromForm/src/part/editor.vue";var d=f.exports,p=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[e.items.length>0?i("div",e._l(e.items,function(t){return i("el-tag",{key:t,staticStyle:{"margin-right":"5px","margin-top":"4px",cursor:"pointer"},on:{click:function(i){return i.stopPropagation(),e.toFormDetailPage(t)}}},[i("i",{staticClass:"el-icon-tickets",staticStyle:{"margin-right":"5px"}}),e._v(e._s(t.label||t.form_id))])}),1):i("div",[i("span",[e._v(e._s(e.label))])]),e._v(" "),i("el-dialog",{attrs:{"append-to-body":!0,visible:e.detailDialogVisible,"close-on-click-modal":!1,title:e.detailDialogTtile,width:e.detailDialogWidth,top:"5vh"},on:{"update:visible":function(t){e.detailDialogVisible=t}}},[i("iframe",{ref:"detailFrame",staticClass:"detail-form-iframe",attrs:{src:e.detailFrameUrl,frameborder:"0",width:"100%",height:"600px"}})])],1)};p._withStripped=!0;var m={props:["value","fieldConf","row","formName","orgInfo"],data(){return{mode:"normal",items:[],label:zj.z("未选择","c.not_selected"),detailDialogVisible:!1,detailDialogTtile:"",detailFrameUrl:""}},watch:{value(){this.loadRemoteInfo()}},mounted(){this.loadRemoteInfo()},computed:{detailDialogWidth(){return this.fieldConf&&this.fieldConf.style?this.fieldConf.style.dialog_width+"%"||0:"80%"}},methods:{async loadRemoteInfo(){console.log("bpmSelectFromForm_loadRemoteInfo",this.items),"link_qc_part_1_2"===this.fieldConf.id&&(console.log("link_qc_part_1_2"),console.log(this.value)),this.items=[],this.label="";let e=this.value;if(s().isNil(e)||!e)return this.label=zj.z("未选择","c.not_selected");try{if(s().isObject(e))try{e=JSON.parse(e)}catch(t){console.log("JSON.parse",e),console.log("error",t)}let t=s().isArray(e)?e:[e],i=s().get(this.fieldConf,"id");if(s().isEmpty(t))this.label=zj.z("未选择","c.not_selected");else{t=s().isArray(t)?t:[t];let e=[],o=null;try{o=await this.$bpm.fetchLabelByValues(t,i,this.formName,this.row,!0,this.row,!0)}catch(e){console.log("bpmSelectFromForm_fetchLabelByValues_error",e)}console.log("bpmSelectFromForm_res",o),o&&o.length&&(e=o.map(e=>{let t={form_id:e.value,label:e.label};if(e&&e.res&&e.res.definition&&e.res.definition){let i=e.res.definition.form;t.form_type=i.type,t.form_def_id=i.id,t.page_level=i.level,t.process=i.process}return t})),e.length||(e=t.map(e=>({form_id:e,label:String(e)}))),this.items=e}}finally{console.log("finally")}},toFormDetailPage(e){let t=e.form_id;this.detailDialogTtile=e.label;const i=s().get(this.orgInfo,"project_id","");let o=`/public/bpm3/app/table.html?form_name=${e.form_def_id||""}&is_mirco_app=1&hidden_form_title=1&form_type=${s().toLower(e.form_type)}&project_id=${i}&page_level=${e.page_level||""}&form_id=${t}#/detail`;this.detailFrameUrl=o,this.detailDialogVisible=!0}}},h=(0,u.A)(m,p,[],!1,null,null,null);h.options.__file="components/lib/bpmSelectFromForm/src/part/reader.vue";var v=h.exports,g={name:"bpmSelectFromForm",components:{editorComponent:d,readerComponent:v},props:{value:{type:[String,Array],default(){return""}},fieldConf:{type:Object,default(){return{}}},row:{type:Object,default(){return{}}},mode:{type:String,default(){return"view"}},uiType:{type:String,default(){return"default"}},orgInfo:{type:Object},formName:{type:String},isMultiple:{type:Boolean,default(){return!1}}},data(){return{curVal:""}},computed:{curComponent(){return"view"==this.mode?v:d}},watch:{value(){this.curVal=this.value}},mounted(){this.curVal=this.value},methods:{handleChange(e){this.$emit("input",e),this.$emit("change",e)}}},y=o(5072),_=o.n(y),b=o(7825),x=o.n(b),C=o(7659),S=o.n(C),V=o(5056),w=o.n(V),O=o(540),k=o.n(O),M=o(1113),F=o.n(M),L=o(3345),$={};$.styleTagTransform=F(),$.setAttributes=w(),$.insert=S().bind(null,"head"),$.domAPI=x(),$.insertStyleElement=k(),_()(L.A,$),L.A&&L.A.locals&&L.A.locals;var T=(0,u.A)(g,e,[],!1,null,null,null);T.options.__file="components/lib/bpmSelectFromForm/src/main.vue";var A=T.exports;A.install=function(e){e.component(A.name,A)};var D=A}(),n}()});