@zhijiancloud/bpm 0.0.21 → 0.0.23
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.
package/dist/bpmSubForm.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.bpm2=t():e.bpm2=t()}(self,(function(){return function(){"use strict";var e={3663:function(e,t,a){a.d(t,{r:function(){return o}});let r=[{key:"lt",name:"早于"},{key:"gt",name:"晚于"},{key:"gte",name:"不早于"},{key:"lte",name:"不晚于"}],n=[{key:"in",name:"在列表中"}],l=[{key:"in",name:"在列表中"},{key:"all",name:"包含所有"}];const o={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:180,hasBpmField:!0,actions:r,attrs:["type","id","name","check.format","view.format","linkage"]},Date:{name:"日期选择器",hasBpmField:!0,actions:r,attrs:["type","id","name","check.format","view.format","linkage"]},Time:{name:"时间选择器",hasBpmField:!0,actions:r,attrs:["type","id","name","check.format","view.format","linkage"]},Timestamp:{name:"※时间戳",actions:r,attrs:["type","id","name","check.format","view.format","linkage"]},Select:{name:"单选",hasBpmField:!0,tableColWidth:220,actions:n,options:{type:"MulSelect"},attrs:["type","id","name","value_type","style","range_enum","linkage"]},Status:{name:"状态",hasBpmField:!0,tableColWidth:150,actions:n,options:{type:"MulSelect"},attrs:["type","id","name","value_type","style","range_enum","linkage"]},MulSelect:{name:"多选",hasBpmField:!0,tableColWidth:220,actions:l,attrs:["type","id","name","value_type","result_type","style","range_enum","linkage"]},SelectFromForm:{name:"远程单项选择",hasBpmField:!0,tableColWidth:200,actions:n,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:l,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"]},SelectProject:{name:"项目单项选择",hasBpmField:!0,tableColWidth:200,actions:n,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:l,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:n,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: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"]},SelectURUser:{name:"用户单项选择(新)",hasBpmField:!0,tableColWidth:200,actions:n,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:200,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"]},SelectRootCategory:{name:"根任务类型选择",hasBpmField:!0,tableColWidth:200,actions:[{key:"eq",name:"等于"}],attrs:["type","id","name","category_cls","value_type","linkage"]},SelectCheckItem:{name:"检查项单项选择",hasBpmField:!0,actions:n,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:l,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:n,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:l,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:n,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:n,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:n,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:l,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,"未通过"]]}},MulArea:{name:"区域多项选择",actions:l,attrs:["type","id","name","value_type","can","linkage"]},Area:{name:"区域单项选择",actions:n,options:{type:"MulArea"},attrs:["type","id","name","value_type","can","linkage"]},SelectFormId:{name:"表单单项选择",hasBpmField:!0,tableColWidth:200,actions:n,options:{type:"MulSelectFormId"},attrs:["type","id","name","value_type","form_select_type","linkage"]},MulSelectFormId:{name:"表单多项选择",hasBpmField:!0,tableColWidth:200,actions:n,options:{type:"MulSelectFormId"},attrs:["type","id","name","value_type","form_select_type","linkage"]},SelectFromField:{name:"远程单选(从字段)",hasBpmField:!0,tableColWidth:200,actions:n,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:n,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:!1},Order:{name:"排序控件",hasBpmField:!1},SubForm:{name:"子表单",hasBpmField:!0},XSubForm:{name:"子表单(增强版)",hasBpmField:!0},OrderSubForm:{name:"排序子表单",hasBpmField:!0},AreaElevation:{name:"区域快速选择器",hasBpmField:!0,tableColWidth:200}}},1900:function(e,t,a){function r(e,t,a,r,n,l,o,i){var s,m="function"==typeof e?e.options:e;if(t&&(m.render=t,m.staticRenderFns=a,m._compiled=!0),r&&(m.functional=!0),l&&(m._scopeId="data-v-"+l),o?(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__),n&&n.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(o)},m._ssrRegister=s):n&&(s=i?function(){n.call(this,(m.functional?this.parent:this).$root.$options.shadowRoot)}:n),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,{Z:function(){return r}})}},t={};function a(r){var n=t[r];if(void 0!==n)return n.exports;var l=t[r]={exports:{}};return e[r](l,l.exports,a),l.exports}a.d=function(e,t){for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return function(){a.r(r),a.d(r,{default:function(){return f}});var e=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",["table"===e.uiType?a("el-button",{attrs:{type:"text"},on:{click:function(t){e.showSubForm=!0}}},[e._v("查看子表单")]):"table"===e.showStyle?a("SubFormStyleTable",e._b({attrs:{value:e.subformData,columns:e.columns,subformPerm:e.subformPerm,mode:e.mode,"max-height":e.maxHeight,"show-header":e.showHeader,resizable:e.resizable},on:{change:e.handleChange}},"SubFormStyleTable",e.$attrs,!1)):a("SubFormStyleCard",e._b({attrs:{value:e.subformData,columns:e.columns,subformPerm:e.subformPerm,mode:e.mode,"max-height":e.maxHeight},on:{change:e.handleChange}},"SubFormStyleCard",e.$attrs,!1)),e._v(" "),a("el-dialog",{attrs:{title:e.subFormDialogTitle,visible:e.showSubForm,width:"50%"},on:{"update:visible":function(t){e.showSubForm=t},close:function(t){e.showSubForm=!1}}},[a("div",{staticStyle:{"max-height":"70vh",overflow:"auto"}},["table"===e.showStyle?a("SubFormStyleTable",e._b({attrs:{value:e.subformData,columns:e.columns,subformPerm:e.subformPerm,mode:e.mode,"max-height":e.dialogTableMaxHeight,"show-header":!0,resizable:!0},on:{change:e.handleChange}},"SubFormStyleTable",e.$attrs,!1)):a("SubFormStyleCard",e._b({attrs:{value:e.subformData,columns:e.columns,subformPerm:e.subformPerm,mode:e.mode},on:{change:e.handleChange}},"SubFormStyleCard",e.$attrs,!1))],1)])],1)};e._withStripped=!0;var t=a(3663),n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.subformData,"max-height":e.maxHeight,"show-header":e.showHeader,resizable:e.resizable,border:"",stripe:""}},[e._l(e.columns,(function(t){return a("el-table-column",{key:t.key,attrs:{prop:t.id,label:t.label,"min-width":t.minWidth,sortable:t.sortable,"sort-by":t.sortBy},scopedSlots:e._u([{key:"default",fn:function(r){return[a("bpm-field",e._b({attrs:{type:t.data.type,fieldConf:t.data,mode:e.getFieldMode(t.data.perm),uiType:"table"},on:{change:e.handleChange},model:{value:r.row[t.id],callback:function(a){e.$set(r.row,t.id,a)},expression:"scope.row[col.id]"}},"bpm-field",e.$attrs,!1))]}}],null,!0)})})),e._v(" "),e.canRemove?a("el-table-column",{attrs:{prop:"delete",label:"操作",width:100},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{staticClass:"btn-delete",attrs:{type:"danger",icon:"el-icon-delete",circle:""},on:{click:function(a){return e.handleRemoveItem(t.$index)}}})]}}],null,!1,2399725298)}):e._e()],2),e._v(" "),e.canAdd?a("el-button",{staticStyle:{"margin-top":"10px"},attrs:{type:"default",icon:"el-icon-plus"},on:{click:e.handleAddItem}},[e._v("添加项")]):e._e()],1)};n._withStripped=!0;var l={props:{value:{type:Array,default(){return[]}},columns:{type:Array,default(){return[]}},subformPerm:{type:Object,default(){return{}}},mode:{type:String,default:"view"},maxHeight:{type:[Number,String],default:500}},data(){return{subformData:[]}},computed:{userId(){return _.get(this.$bpm.userInfo,"user_id",0)},maxId(){let e=_.map(this.subformData,"_meta.id");return _.max(e)||0},originItem(){let e={};const t={int:0,text:"",array:[]};return this.columns.forEach((a=>{e[a.id]=t[a.data.value_type]||""})),e},canAdd(){return"edit"===this.mode&&this.subformPerm.creatable},canRemove(){return"edit"===this.mode&&this.subformPerm.deletable}},watch:{value:{handler(e){e&&_.isArray(e)?this.subformData=e:this.subformData=[]},immediate:!0}},methods:{getFieldMode(e){let t=this.mode;return!e||"edit"!==t||e.editable||e.writable||(t="view"),t},handleChange(){"edit"===this.mode&&this.$emit("change",this.subformData)},handleAddItem(){let e=this.maxId+1,t={...this.originItem,isNew:!0,_meta:{id:e,creator:this.userId,is_deleted:!1}};this.subformData.push(t)},handleRemoveItem(e){this.subformData.splice(e,1),this.handleChange()}}},o={name:"SubFormStyleTable",mixins:[l],props:{showHeader:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0}}},i=a(1900),s=(0,i.Z)(o,n,[],!1,null,null,null);s.options.__file="components/lib/bpmSubForm/src/table.vue";var m=s.exports,d=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{style:{maxHeight:e.maxHeight+"px",overflow:"auto"}},[e._l(e.subformData,(function(t,r){return a("el-card",{key:r,staticClass:"bpm-subform-card",class:e.mode,attrs:{shadow:"hover","body-style":{padding:"10px 20px",maxHeight:"300px",overflow:"auto",position:"relative",paddingRight:e.canRemove?"70px":"20px"}}},[a("el-form",{attrs:{"label-width":"180px",inline:!1}},e._l(e.columns,(function(r){return a("el-form-item",{key:r.key,attrs:{label:r.label,required:r.data.check&&r.data.check.required}},[a("bpm-field",e._b({attrs:{type:r.data.type,fieldConf:r.data,mode:e.getFieldMode(r.data.perm),uiType:"form"},on:{change:e.handleChange},model:{value:t[r.id],callback:function(a){e.$set(t,r.id,a)},expression:"item[col.id]"}},"bpm-field",e.$attrs,!1))],1)})),1),e._v(" "),e.canRemove?a("el-button",{staticClass:"btn-delete",attrs:{type:"danger",icon:"el-icon-delete",circle:""},on:{click:function(t){return e.handleRemoveItem(r)}}}):e._e()],1)})),e._v(" "),e.canAdd?a("el-button",{attrs:{type:"default",icon:"el-icon-plus"},on:{click:e.handleAddItem}},[e._v("添加项")]):e._e()],2)};d._withStripped=!0;var p={name:"SubFormStyleCard",mixins:[l]},u=(0,i.Z)(p,d,[],!1,null,null,null);u.options.__file="components/lib/bpmSubForm/src/card.vue";var c={name:"BpmSubForm",components:{SubFormStyleTable:m,SubFormStyleCard:u.exports},props:{value:{type:Array,default(){return[]}},type:{type:String,default:"XSubForm"},fieldConf:{type:Object,default(){return{}}},mode:{type:String,default:"view"},uiType:{type:String,default:"default"},maxHeight:{type:[Number,String],default:500},showHeader:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0}},data(){return{subformData:[],dialogTableMaxHeight:500,showSubForm:!1}},computed:{columns(){const e=this.fieldConf.elements||[],a=[];return e.forEach((e=>{const r=t.r[e.type]||{},n=e.perm||{visible:!0,editable:!0,writable:!0};if(this.dm||n.visible){let t=this.mode;"edit"!==t||n.editable||n.writable||(t="view"),a.push({key:e.id,id:e.id,label:e.name||e.id,minWidth:r.tableColWidth||100,sortable:!0,sortBy:e.id,fieldMode:t,data:e})}})),a},subFormDialogTitle(){return this.fieldConf.name||this.fieldConf.id},showStyle(){return this.fieldConf.style||"table"},subformPerm(){return this.fieldConf.perm||{creatable:!1,deletable:!1,editable:!1,memorable:!1,modifiable:!1,visible:!0,writable:!1}}},watch:{value:{handler(e){e&&_.isArray(e)?this.subformData=e:this.subformData=[]},immediate:!0}},created(){this.dialogTableMaxHeight=Math.floor(window.innerHeight/100*70-114)},methods:{handleChange(e){this.$emit("input",e),this.$emit("change",e)}}},h=(0,i.Z)(c,e,[],!1,null,"e0a458ce",null);h.options.__file="components/lib/bpmSubForm/src/main.vue";var y=h.exports;y.install=function(e){e.component(y.name,y)};var f=y}(),r}()}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.bpm2=t():e.bpm2=t()}(self,(function(){return function(){"use strict";var e={3663:function(e,t,a){a.d(t,{r:function(){return o}});let r=[{key:"lt",name:"早于"},{key:"gt",name:"晚于"},{key:"gte",name:"不早于"},{key:"lte",name:"不晚于"}],n=[{key:"in",name:"在列表中"}],l=[{key:"in",name:"在列表中"},{key:"all",name:"包含所有"}];const o={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:180,hasBpmField:!0,actions:r,attrs:["type","id","name","check.format","view.format","linkage"]},Date:{name:"日期选择器",hasBpmField:!0,actions:r,attrs:["type","id","name","check.format","view.format","linkage"]},Time:{name:"时间选择器",hasBpmField:!0,actions:r,attrs:["type","id","name","check.format","view.format","linkage"]},Timestamp:{name:"※时间戳",actions:r,attrs:["type","id","name","check.format","view.format","linkage"]},Select:{name:"单选",hasBpmField:!0,tableColWidth:220,actions:n,options:{type:"MulSelect"},attrs:["type","id","name","value_type","style","range_enum","linkage"]},Status:{name:"状态",hasBpmField:!0,tableColWidth:150,actions:n,options:{type:"MulSelect"},attrs:["type","id","name","value_type","style","range_enum","linkage"]},MulSelect:{name:"多选",hasBpmField:!0,tableColWidth:220,actions:l,attrs:["type","id","name","value_type","result_type","style","range_enum","linkage"]},SelectFromForm:{name:"远程单项选择",hasBpmField:!0,tableColWidth:200,actions:n,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:l,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"]},SelectProject:{name:"项目单项选择",hasBpmField:!0,tableColWidth:200,actions:n,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:l,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:n,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: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"]},SelectURUser:{name:"用户单项选择(新)",hasBpmField:!0,tableColWidth:200,actions:n,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:200,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"]},SelectRootCategory:{name:"根任务类型选择",hasBpmField:!0,tableColWidth:200,actions:[{key:"eq",name:"等于"}],attrs:["type","id","name","category_cls","value_type","linkage"]},SelectCheckItem:{name:"检查项单项选择",hasBpmField:!0,actions:n,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:l,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:n,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:l,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:n,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:n,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:n,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:l,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,"未通过"]]}},MulArea:{name:"区域多项选择",actions:l,attrs:["type","id","name","value_type","can","linkage"]},Area:{name:"区域单项选择",actions:n,options:{type:"MulArea"},attrs:["type","id","name","value_type","can","linkage"]},SelectFormId:{name:"表单单项选择",hasBpmField:!0,tableColWidth:200,actions:n,options:{type:"MulSelectFormId"},attrs:["type","id","name","value_type","form_select_type","linkage"]},MulSelectFormId:{name:"表单多项选择",hasBpmField:!0,tableColWidth:200,actions:n,options:{type:"MulSelectFormId"},attrs:["type","id","name","value_type","form_select_type","linkage"]},SelectFromField:{name:"远程单选(从字段)",hasBpmField:!0,tableColWidth:200,actions:n,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:n,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:!1},Order:{name:"排序控件",hasBpmField:!1},SubForm:{name:"子表单",hasBpmField:!0},XSubForm:{name:"子表单(增强版)",hasBpmField:!0},OrderSubForm:{name:"排序子表单",hasBpmField:!0},AreaElevation:{name:"区域快速选择器",hasBpmField:!0,tableColWidth:200}}},1900:function(e,t,a){function r(e,t,a,r,n,l,o,i){var s,m="function"==typeof e?e.options:e;if(t&&(m.render=t,m.staticRenderFns=a,m._compiled=!0),r&&(m.functional=!0),l&&(m._scopeId="data-v-"+l),o?(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__),n&&n.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(o)},m._ssrRegister=s):n&&(s=i?function(){n.call(this,(m.functional?this.parent:this).$root.$options.shadowRoot)}:n),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,{Z:function(){return r}})}},t={};function a(r){var n=t[r];if(void 0!==n)return n.exports;var l=t[r]={exports:{}};return e[r](l,l.exports,a),l.exports}a.d=function(e,t){for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return function(){a.r(r),a.d(r,{default:function(){return f}});var e=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",["table"===e.uiType?a("el-button",{attrs:{type:"text"},on:{click:function(t){e.showSubForm=!0}}},[e._v("查看子表单")]):"table"===e.showStyle?a("SubFormStyleTable",e._b({attrs:{value:e.subformData,columns:e.columns,subformPerm:e.subformPerm,mode:e.mode,"max-height":e.maxHeight,"show-header":e.showHeader,resizable:e.resizable},on:{change:e.handleChange}},"SubFormStyleTable",e.$attrs,!1)):a("SubFormStyleCard",e._b({attrs:{value:e.subformData,columns:e.columns,subformPerm:e.subformPerm,mode:e.mode,"max-height":e.maxHeight},on:{change:e.handleChange}},"SubFormStyleCard",e.$attrs,!1)),e._v(" "),a("el-dialog",{attrs:{title:e.subFormDialogTitle,visible:e.showSubForm,width:"50%"},on:{"update:visible":function(t){e.showSubForm=t},close:function(t){e.showSubForm=!1}}},[a("div",{staticStyle:{"max-height":"70vh",overflow:"auto"}},["table"===e.showStyle?a("SubFormStyleTable",e._b({attrs:{value:e.subformData,columns:e.columns,subformPerm:e.subformPerm,mode:e.mode,"max-height":e.dialogTableMaxHeight,"show-header":!0,resizable:!0},on:{change:e.handleChange}},"SubFormStyleTable",e.$attrs,!1)):a("SubFormStyleCard",e._b({attrs:{value:e.subformData,columns:e.columns,subformPerm:e.subformPerm,mode:e.mode},on:{change:e.handleChange}},"SubFormStyleCard",e.$attrs,!1))],1)])],1)};e._withStripped=!0;var t=a(3663),n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.subformData,"max-height":e.maxHeight,"show-header":e.showHeader,resizable:e.resizable,border:"",stripe:""}},[e._l(e.columns,(function(t){return a("el-table-column",{key:t.key,attrs:{prop:t.id,label:t.label,"min-width":t.minWidth,sortable:t.sortable,"sort-by":t.sortBy},scopedSlots:e._u([{key:"default",fn:function(r){return[a("bpm-field",e._b({attrs:{type:t.data.type,fieldConf:t.data,mode:e.getFieldMode(t.data.perm),uiType:"table"},on:{change:e.handleChange},model:{value:r.row[t.id],callback:function(a){e.$set(r.row,t.id,a)},expression:"scope.row[col.id]"}},"bpm-field",e.$attrs,!1))]}}],null,!0)})})),e._v(" "),e.canRemove?a("el-table-column",{attrs:{prop:"delete",label:"操作",width:100},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{staticClass:"btn-delete",attrs:{type:"danger",icon:"el-icon-delete",circle:""},on:{click:function(a){return e.handleRemoveItem(t.$index)}}})]}}],null,!1,2399725298)}):e._e()],2),e._v(" "),e.canAdd?a("el-button",{staticStyle:{"margin-top":"10px"},attrs:{type:"default",icon:"el-icon-plus"},on:{click:e.handleAddItem}},[e._v("添加项")]):e._e()],1)};n._withStripped=!0;var l={props:{value:{type:Array,default(){return[]}},columns:{type:Array,default(){return[]}},subformPerm:{type:Object,default(){return{}}},mode:{type:String,default:"view"},maxHeight:{type:[Number,String],default:500}},data(){return{subformData:[]}},computed:{userId(){return _.get(this.$bpm.userInfo,"user_id",0)},maxId(){let e=_.map(this.subformData,"_meta.id");return _.max(e)||0},originItem(){let e={};const t={int:0,text:"",array:[],struct:[]};return this.columns.forEach((a=>{e[a.id]=t[a.data.value_type]||""})),e},canAdd(){return"edit"===this.mode&&this.subformPerm.creatable},canRemove(){return"edit"===this.mode&&this.subformPerm.deletable}},watch:{value:{handler(e){e&&_.isArray(e)?this.subformData=e:this.subformData=[]},immediate:!0}},methods:{getFieldMode(e){let t=this.mode;return!e||"edit"!==t||e.editable||e.writable||(t="view"),t},handleChange(){"edit"===this.mode&&this.$emit("change",this.subformData)},handleAddItem(){let e=this.maxId+1,t={..._.cloneDeep(this.originItem),isNew:!0,_meta:{id:e,creator:this.userId,is_deleted:!1}};this.subformData.push(t)},handleRemoveItem(e){this.subformData.splice(e,1),this.handleChange()}}},o={name:"SubFormStyleTable",mixins:[l],props:{showHeader:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0}}},i=a(1900),s=(0,i.Z)(o,n,[],!1,null,null,null);s.options.__file="components/lib/bpmSubForm/src/table.vue";var m=s.exports,d=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{style:{maxHeight:e.maxHeight+"px",overflow:"auto"}},[e._l(e.subformData,(function(t,r){return a("el-card",{key:r,staticClass:"bpm-subform-card",class:e.mode,attrs:{shadow:"hover","body-style":{padding:"10px 20px",maxHeight:"300px",overflow:"auto",position:"relative",paddingRight:e.canRemove?"70px":"20px"}}},[a("el-form",{attrs:{"label-width":"180px",inline:!1}},e._l(e.columns,(function(r){return a("el-form-item",{key:r.key,attrs:{label:r.label,required:r.data.check&&r.data.check.required}},[a("bpm-field",e._b({attrs:{type:r.data.type,fieldConf:r.data,mode:e.getFieldMode(r.data.perm),uiType:"form"},on:{change:e.handleChange},model:{value:t[r.id],callback:function(a){e.$set(t,r.id,a)},expression:"item[col.id]"}},"bpm-field",e.$attrs,!1))],1)})),1),e._v(" "),e.canRemove?a("el-button",{staticClass:"btn-delete",attrs:{type:"danger",icon:"el-icon-delete",circle:""},on:{click:function(t){return e.handleRemoveItem(r)}}}):e._e()],1)})),e._v(" "),e.canAdd?a("el-button",{attrs:{type:"default",icon:"el-icon-plus"},on:{click:e.handleAddItem}},[e._v("添加项")]):e._e()],2)};d._withStripped=!0;var p={name:"SubFormStyleCard",mixins:[l]},u=(0,i.Z)(p,d,[],!1,null,null,null);u.options.__file="components/lib/bpmSubForm/src/card.vue";var c={name:"BpmSubForm",components:{SubFormStyleTable:m,SubFormStyleCard:u.exports},props:{value:{type:Array,default(){return[]}},type:{type:String,default:"XSubForm"},fieldConf:{type:Object,default(){return{}}},mode:{type:String,default:"view"},uiType:{type:String,default:"default"},maxHeight:{type:[Number,String],default:500},showHeader:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0}},data(){return{subformData:[],dialogTableMaxHeight:500,showSubForm:!1}},computed:{columns(){const e=this.fieldConf.elements||[],a=[];return e.forEach((e=>{const r=t.r[e.type]||{},n=e.perm||{visible:!0,editable:!0,writable:!0};if(this.dm||n.visible){let t=this.mode;"edit"!==t||n.editable||n.writable||(t="view"),a.push({key:e.id,id:e.id,label:e.name||e.id,minWidth:r.tableColWidth||100,sortable:!0,sortBy:e.id,fieldMode:t,data:e})}})),a},subFormDialogTitle(){return this.fieldConf.name||this.fieldConf.id},showStyle(){return this.fieldConf.style||"table"},subformPerm(){return this.fieldConf.perm||{creatable:!1,deletable:!1,editable:!1,memorable:!1,modifiable:!1,visible:!0,writable:!1}}},watch:{value:{handler(e){e&&_.isArray(e)?this.subformData=e:this.subformData=[]},immediate:!0}},created(){this.dialogTableMaxHeight=Math.floor(window.innerHeight/100*70-114)},methods:{handleChange(e){this.$emit("input",e),this.$emit("change",e)}}},h=(0,i.Z)(c,e,[],!1,null,"e0a458ce",null);h.options.__file="components/lib/bpmSubForm/src/main.vue";var y=h.exports;y.install=function(e){e.component(y.name,y)};var f=y}(),r}()}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */
|