@zhijiancloud/bpm 1.0.80 → 1.0.82
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/bpmArea.umd.js +1 -1
- package/dist/bpmExternalFormLink.umd.js +1 -1
- package/dist/bpmField.umd.js +3 -3
- package/dist/bpmFormField.umd.js +3 -3
- package/dist/bpmMulFile.umd.js +1 -1
- package/dist/bpmSelectCheckItem.umd.js +1 -1
- package/dist/bpmSelectEntranceForm.umd.js +3 -3
- package/dist/bpmSelectFromField.umd.js +1 -1
- package/dist/bpmSelectFromMulForm.umd.js +1 -1
- package/dist/bpmSelectUser.umd.js +1 -1
- package/dist/bpmSubFormField.umd.js +3 -3
- package/dist/index.umd.js +3 -3
- package/package.json +1 -1
package/dist/bpmArea.umd.js
CHANGED
|
@@ -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={4486:function(e,t,s){"use strict";function a(e,t,s,a,i,l,n,o){var r,c="function"==typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=s,c._compiled=!0),a&&(c.functional=!0),l&&(c._scopeId="data-v-"+l),n?(r=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__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(n)},c._ssrRegister=r):i&&(r=o?function(){i.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:i),r)if(c.functional){c._injectStyles=r;var d=c.render;c.render=function(e,t){return r.call(t),d(e,t)}}else{var h=c.beforeCreate;c.beforeCreate=h?[].concat(h,r):[r]}return{exports:e,options:c}}s.d(t,{A:function(){return a}})},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}},s={};function a(e){var i=s[e];if(void 0!==i)return i.exports;var l=s[e]={exports:{}};return t[e](l,l.exports,a),l.exports}a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,{a:t}),t},a.d=function(e,t){for(var s in t)a.o(t,s)&&!a.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},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 i={};return function(){"use strict";a.r(i),a.d(i,{default:function(){return M}});var e=function(){var e=this,t=e.$createElement;return(e._self._c||t)(e.curComponent,e._b({tag:"component",staticClass:"bpm-area",attrs:{fieldConf:e.fieldConf,row:e.row,isMultiple:e.isMultiple,mode:e.mode,uiType:e.uiType},on:{change:e.handleChange},model:{value:e.curVal,callback:function(t){e.curVal=t},expression:"curVal"}},"component",e.$attrs,!1))};e._withStripped=!0;var t=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"select-area-editor"},[s("div",{on:{click:e.toOpen}},[e.label?s("div",[e._v("\n "+e._s(e.label)+"\n ")]):s("div",[s("el-button",{attrs:{size:"small",icon:"el-icon-location-outline"}},[e._v(" "+e._s(e.$z("选择区域","c.select_area")))])],1)]),e._v(" "),s("el-dialog",e._b({attrs:{top:"10vh",visible:e.opened,"before-close":e.onHide,width:"65%",title:e.fieldConf.name,fullscreen:!1,"append-to-body":""},on:{"update:visible":function(t){e.opened=t},open:e.onOpen}},"el-dialog",e.$attrs,!1),[s("div",[e._v("\n "+e._s(e.$z("当前选中","b2.common.selected"))+":\n "),s("el-tag",[e._v(e._s(e.cur_label?e.cur_label:e.label))])],1),e._v(" "),e.refresh?s("div",{staticClass:"subcategory-tree-box"},[s("div",{staticClass:"subcategory-tree",staticStyle:{"max-height":"550px",overflow:"auto"}},[s("el-tree",{ref:"tree",attrs:{props:e.defaultProps,lazy:"","node-key":"id","show-checkbox":!0,load:e.onLazyTreeLoad,"expand-on-click-node":!0,"check-strictly":!0},on:{"node-click":e.handleNodeClick,check:e.handleCheck},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.node;return s("span",{staticClass:"custom-tree-node"},[s("div",{staticClass:"tree-body-content"},[s("div",[e._v(e._s(a.label))]),e._v(" "),"strict"==e.tickStrategy&&a.lazy&&a.selectable?s("span",{on:{click:function(t){return t.stopPropagation(),e.expand(a.id,"force")}}},[e._v(e._s(e.$z("选择","c.choose")))]):e._e()])])}}],null,!1,3939466302)})],1)]):e._e(),e._v(" "),s("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[s("el-button",{attrs:{type:"primary"},on:{click:e.confirm}},[e._v(e._s(e.$z("确认","c.confirm")))])],1)]),e._v(" "),e.openLocate?s("room-map-select",{attrs:{field:e.field,drawingMd5s:e.drawingMd5s,defaultPoints:e.points,subareas:e.subareas},on:{save:e.savePlan}}):e._e()],1)};t._withStripped=!0;var s=a(5554),l=a.n(s),n=a(6773),o=a.n(n),r=a(7642),c=function(){var e=this,t=e.$createElement;return(e._self._c||t)("div",[e._v("\n slsls\n")])};c._withStripped=!0;var d=a(4486),h=(0,d.A)({},c,[],!1,null,null,null);h.options.__file="components/lib/bpmArea/src/part/room-map-select.vue";var p=h.exports;l().use(r.Dialog);var u={props:["value","fieldConf","row","formName","orgInfo","isMultiple"],components:{RoomMapSelect:p},inject:["selectOptions"],data(){return{curVal:"",label:zj.z("选择区域","c.select_area"),cur_label:"",keyword:"",opened:!1,debounceSearch:o().debounce(o().bind(this.search,this),150,{trailing:!0,leading:!1}),formList:[],treeItemMap:{},subareas:[],drawingMd5s:[],refresh:!0,selectedKey:"",defaultProps:{children:"children",label:"label",isLeaf:"isLeaf"},selectList:[],allAreaMap:{}}},watch:{value(){this.curVal=this.value,this.loadRemoteLabel()},selectedKey(e){e&&this.selected(e)},getSelectOptions(e){this.refresh=!1,this.selectList=e,setTimeout(()=>{this.refresh=!0},500)}},computed:{tickStrategy(){return"leaf_only"==o().get(this.fieldConf,"can","all")?"leaf-filtered":"strict"},openLocate(){return o().get(this.fieldConf,"enable_locate")},points(){return o().get(this.value,"all_points",[])},canSelect(){return o().get(this.fieldConf,"can")},getSelectOptions(){return this.selectOptions?this.selectOptions():[]}},mounted(){this.curVal=this.value,this.loadRemoteLabel()},methods:{confirm(){let e=this.selectedKey;e=o().toString(e);let t=o().get(this.treeItemMap,e,null);t&&(this.label=t.label,t=o().cloneDeep(t),delete t.label,delete t.lazy,delete t.path_names,delete t.pathNames,delete t.selectable,delete t.haspic,delete t.children,this.value,this.$emit("input",{id:t.id,path_ids:t.path_ids,all_points:[],type:t.type}),this.toClose())},handleNodeClick(e){console.log("data",e),e.selectable&&(this.selectedKey=o().get(e,"id",""))},handleCheck(e,t){console.log("data",e),console.log("state",t),this.selectedKey=o().get(e,"id","")},toOpen(){this.opened=!0},toClose(){this.opened=!1},reset(){try{let e=this.value;this.selectedKey=o().get(e,"id","")}catch(e){this.selectedKey=""}},async onOpen(){if(o().isEmpty(this.selectList)||!this.selectList){let e=await this.loadList("");this.selectList=e,this.reset()}this.opened=!0},clear(){this.removeValue(),this.resetLabel(),this.selectedKey=""},onLazyTreeLoad(e,t){setTimeout(async()=>{let s=[];s=0==e.level?await this._loadNextCategoryList(""):await this._loadNextCategoryList(e.data.id),this.setCategoryInMap(s),t(s)},500)},async _loadNextCategoryList(e){let t=await this.loadList(e);return this.transformResultToTree(t)},transformResultToTree(e){let t=this.canSelect;return o().map(e,e=>{let s=e.drawing_md5s;s=o().compact(s);let a={id:e.id,lazy:e.is_parent,label:e.name,isLeaf:!e.is_parent,path_ids:e.path_ids,path_names:e.path_names,selectable:e.available,disabled:!e.available,haspic:!!s.length,type:e.type};return"building_floor"==t&&3==e.type&&(a.lazy=!1),o().set(this.treeItemMap,e.id,a),a})},async loadList(e){let t=this.search_keyword,s=JSON.stringify({id:e,path_ids:o().get(this.treeItemMap,`${e}.path_ids`),type:o().get(this.treeItemMap,`${e}.type`)}),a=zj.pageParam({father:s,q:t});e||delete a.father,this.selectFields&&(a.fields=this.selectFields);let i=await this.$bpm.loadSelectLinkageResult({fieldId:this.fieldConf.id,params:a,cusFormName:this.formName,field:this,container:this.container});return console.log("data",i),i},setCategoryInMap(e){o().each(e,e=>{o().set(this.allAreaMap,e.value,e)})},_setCheckedKeys(e){this.$refs.tree.setCheckedKeys([]),this.$refs.tree.setCheckedKeys([e])},selected(e,t){e=o().toString(e);let s=o().get(this.treeItemMap,e,null);s&&e&&s.selectable&&(this._setCheckedKeys(e),this.cur_label=s.label)},expand(e,t){if(e=o().toString(e),o().get(this.treeItemMap,e,null).lazy&&!t){let t=this.$refs.tree.isExpanded(o().toInteger(e));return void this.$refs.tree.setExpanded(o().toInteger(e),!t)}this.selected(e,t)},savePlan(e){this.curVal.all_points=o().cloneDeep(e),this.$emit("input",this.curVal.all_points),this.$emit("change",this.curVal.all_points)},async search(){let e=this.search_keyword;if(this.keyword=e,this.expandedKeys=[],!e)return;this.$bpm.setFuncGIO("区域搜索");let t=await this._loadNextCategoryList("");this.changeLazy(t),this.filterNodes=t},changeLazy(e){this.setCategoryInMap(e),o().each(e,e=>{this.expandedKeys.push(e.value),e.lazy=!1,e.expandable=!0,e.children&&this.changeLazy(e.children)})},async loadRemoteLabel(){if(!this.value)return;let e=this.value;if(!o().isNil(e)&&e)try{this.loading=!0,e=o().cloneDeep(e),delete e.all_points,delete e.path_ids,delete e.type,e=JSON.stringify(e);let t=await this.$bpm.fetchLabelByValue(e,this.fieldConf.id,this.formName,this,"id",this.row);this.subareas=o().get(t,"subareas",[]),this.drawingMd5s=o().get(t,"drawing_md5s",[]);let s=o().join(t.path_names,"/");this.label=`${s}${s?"/":""}${t.name}`}finally{this.loading=!1}else this.label=""},onHide(){this.opened=!1}}},f=(0,d.A)(u,t,[],!1,null,null,null);f.options.__file="components/lib/bpmArea/src/part/editor.vue";var m=f.exports,y=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"select-area-editor"},[s("div",{on:{click:function(t){return t.stopPropagation(),e.toOpen.apply(null,arguments)}}},[e.labels.length>0?s("div",[e._l(e.labels,function(t){return s("el-tag",{key:t,staticStyle:{"margin-right":"10px","margin-top":"5px"}},[e._v(e._s(t))])}),e._v(" "),s("i",{staticClass:"el-icon-circle-close",on:{click:function(t){return t.stopPropagation(),e.delAllItem()}}})],2):s("div",[s("el-button",{attrs:{size:"small",icon:"el-icon-location-outline"}},[e._v(" "+e._s(e.$z("选择区域","c.select_area")))])],1)]),e._v(" "),s("el-dialog",e._b({attrs:{visible:e.opened,"before-close":e.onHide,width:"65%",title:e.fieldConf.name,fullscreen:!1,"append-to-body":""},on:{"update:visible":function(t){e.opened=t},open:e.onOpen}},"el-dialog",e.$attrs,!1),[s("div",[e._v("\n "+e._s(e.$z("当前选中","b2.common.selected"))+":\n "),e._l(e.labelObjs,function(t,a){return[a<5?s("el-tag",{key:t.id,staticStyle:{"margin-right":"10px","margin-top":"5px"},attrs:{closable:""},on:{close:function(s){return e.delHandle(t)}}},[e._v(e._s(t.pathNames))]):e._e()]}),e._v(" "),e.labelObjs.length>5?s("el-dropdown",[s("el-button",{attrs:{type:"primary"}},[e._v("\n "+e._s(e.$z("更多","c.more"))),s("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),e._v(" "),s("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[e._l(e.labelObjs,function(t,a){return[a>=5?s("el-dropdown-item",{key:t.id},[s("el-tag",{staticStyle:{"margin-right":"10px","margin-top":"5px"},attrs:{closable:""},on:{close:function(s){return e.delHandle(t)}}},[e._v(e._s(t.pathNames))])],1):e._e()]})],2)],1):e._e()],2),e._v(" "),e.refresh?s("div",{staticClass:"subcategory-tree-box"},[s("div",{staticClass:"subcategory-tree",staticStyle:{"max-height":"550px",overflow:"auto"}},[s("el-tree",{ref:"tree",attrs:{props:e.defaultProps,lazy:"","node-key":"id","show-checkbox":!0,load:e.onLazyTreeLoad,"expand-on-click-node":!1,"check-on-click-node":!0,"check-strictly":!0},on:{"node-click":e.handleNodeClick,"check-change":e.handleCheckChange},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.node;return s("span",{staticClass:"custom-tree-node"},[s("div",{staticClass:"tree-body-content"},[s("div",[e._v(e._s(a.label))]),e._v(" "),"strict"==e.tickStrategy&&a.lazy&&a.selectable?s("span",{on:{click:function(t){return t.stopPropagation(),e.expand(a.id,"force")}}},[e._v(e._s(e.$z("选择","c.choose")))]):e._e()])])}}],null,!1,3939466302)})],1),e._v(" "),s("div",{staticStyle:{display:"flex","flex-direction":"row-reverse"}},[s("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v(e._s(e.$z("确认","c.confirm")))]),e._v(" "),s("el-button",{staticStyle:{"margin-right":"10px"},on:{click:function(t){return e.clear()}}},[e._v(e._s(e.$z("重置","c.reset")))])],1)]):e._e()]),e._v(" "),e.openLocate?s("room-map-select",{attrs:{field:e.field,drawingMd5s:e.drawingMd5s,defaultPoints:e.points,subareas:e.subareas},on:{save:e.savePlan}}):e._e()],1)};y._withStripped=!0,l().use(r.Dialog);var b={props:["value","fieldConf","row","formName","orgInfo","isMultiple"],components:{RoomMapSelect:p},inject:["selectOptions"],data(){return{curVal:[],label:zj.z("选择区域","c.select_area"),labels:[],labelObjs:[],keyword:"",opened:!1,debounceSearch:o().debounce(o().bind(this.search,this),150,{trailing:!0,leading:!1}),formList:[],treeItemMap:{},subareas:[],drawingMd5s:[],refresh:!0,selectedKeys:[],selectedItems:[],defaultProps:{children:"children",label:"label",isLeaf:"isLeaf"},selectList:[],allAreaMap:{}}},watch:{value(){this.curVal=this.value,this.selectedKeys=o().map(this.curVal,e=>e.id),this.loadRemoteLabel()},selectedKeys(e){e&&this.selected(e)},getSelectOptions(e){this.refresh=!1,this.selectList=e,setTimeout(()=>{this.refresh=!0},500)}},computed:{tickStrategy(){return"leaf_only"==o().get(this.fieldConf,"can","all")?"leaf-filtered":"strict"},openLocate(){return o().get(this.fieldConf,"enable_locate")},points(){return o().get(this.value,"all_points",[])},canSelect(){return o().get(this.fieldConf,"can")},getSelectOptions(){return this.selectOptions?this.selectOptions():[]}},mounted(){this.curVal=this.value,this.loadRemoteLabel()},methods:{delAllItem(){this.clear(),this.$nextTick(()=>{this.onSubmit()})},delHandle(e){this.selectedKeys=o().filter(this.selectedKeys,t=>t!=e.id),this.setCheckedNode(this.selectedKeys)},handleNodeClick(e){},setCheckedNode(e){let t=[];t=e||o().map(this.value,e=>e.id),this.$refs.tree&&this.$refs.tree.setCheckedKeys(t)},handleCheckChange(e,t,s){t?this.selectedKeys.push(e.id):this.selectedKeys=o().filter(this.selectedKeys,t=>t!=e.id)},toOpen(){this.opened=!0},toClose(){this.opened=!1},reset(){this.selectedKeys=[]},onSubmit(){console.log("this.selectItems",this.selectedItems),this.$emit("change",this.selectedItems),this.$emit("input",this.selectedItems),this.toClose()},async onOpen(){this.opened=!0},clear(){this.selectedKeys=[],this.selectedItems=[],this.labels=[],this.labelObjs=[],this.curVal=[],this.setCheckedNode([])},onLazyTreeLoad(e,t){setTimeout(async()=>{let s=[];0==e.level?(s=await this._loadNextCategoryList(""),this.setCheckedNode()):s=await this._loadNextCategoryList(e.data.id),this.setCategoryInMap(s),t(s)},500)},async _loadNextCategoryList(e){let t=await this.loadList(e);return this.transformResultToTree(t)},transformResultToTree(e){let t=this.canSelect;return this.loading=!1,o().map(e,e=>{let s=!0;switch(t){case"any":s=!0;break;case"leaf_only":s=!e.is_parent;break;case"building":s=2==e.type;break;case"floor":s=3==e.type;break;case"building_floor":s=2==e.type||3==e.type;break;case"suite":s=4==e.type||5==e.type;break;case"suite_ex":s=4==e.type||5==e.type||6==e.type}let a=o().join(e.path_names,"/"),i={id:e.id,lazy:e.is_parent,isLeaf:!e.is_parent,label:e.name,type:e.type,path_ids:e.path_ids,path_names:e.path_names,pathNames:`${a}${a?"/":""}${e.name}`,tickable:s,noTick:!s};return"building_floor"==t&&3==e.type&&(i.lazy=!1,i.isLeaf=!0),o().set(this.treeItemMap,e.id,i),i})},async loadList(e){let t=this.search_keyword,s=JSON.stringify({id:e,path_ids:o().get(this.treeItemMap,`${e}.path_ids`),type:o().get(this.treeItemMap,`${e}.type`)}),a=zj.pageParam({father:s,q:t});return e||delete a.father,this.selectFields&&(a.fields=this.selectFields),await this.$bpm.loadSelectLinkageResult({fieldId:this.fieldConf.id,params:a,cusFormName:this.formName,field:this,container:this.container})},setCategoryInMap(e){o().each(e,e=>{o().set(this.allAreaMap,e.value,e)})},selected(e,t){this.selectedItems=[],e&&e.length>0&&o().each(e,e=>{e=o().toString(e);let t=o().get(this.treeItemMap,e,null);t&&(this.label=t.label,t=o().cloneDeep(t),this.selectedItems.push({id:t.id,path_ids:t.path_ids,all_points:[],type:t.type}))}),this.curVal=o().cloneDeep(this.selectedItems),this.loadRemoteLabel()},expand(e,t){if(e=o().toString(e),o().get(this.treeItemMap,e,null).lazy&&!t){let t=this.$refs.tree.isExpanded(o().toInteger(e));return void this.$refs.tree.setExpanded(o().toInteger(e),!t)}this.selected(e,t)},savePlan(e){this.curVal.all_points=o().cloneDeep(e),this.$emit("input",this.curVal.all_points),this.$emit("change",this.curVal.all_points)},async search(){let e=this.search_keyword;if(this.keyword=e,this.expandedKeys=[],!e)return;this.$bpm.setFuncGIO("区域搜索");let t=await this._loadNextCategoryList("");this.changeLazy(t),this.filterNodes=t},changeLazy(e){this.setCategoryInMap(e),o().each(e,e=>{this.expandedKeys.push(e.value),e.lazy=!1,e.isLeaf=!0,e.expandable=!0,e.children&&this.changeLazy(e.children)})},async loadRemoteLabel(){if(this.curVal)if(!o().isNil(this.curVal)&&this.curVal&&0!=this.curVal.length)try{let e=[];o().each(this.curVal,t=>{e.push(JSON.stringify(t))}),this.loading=!0;let t=await this.$bpm.fetchLabelByValues(e,this.fieldConf.id,this.formName,this,"id");this.subareas=o().get(t,"subareas",[]),this.drawingMd5s=o().get(t,"drawing_md5s",[]),this.labels=[];let s=o().map(t,e=>{let t=o().join(e.path_names,"/");return e.pathNames=`${t}${t?"/":""}${e.name}`,o().set(this.treeItemMap,e.id,e),e.pathNames});this.labelObjs=o().cloneDeep(t),this.labels=o().cloneDeep(s),s=o().join(s,", "),this.label=s}finally{this.loading=!1}else this.label=zj.z("选择区域","c.select_area")},onHide(){this.opened=!1}}},g=(0,d.A)(b,y,[],!1,null,null,null);g.options.__file="components/lib/bpmArea/src/part/multi-editor.vue";var v=g.exports,C=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"area-reader"},[e.isMultiple?[e.openLocate?e._l(e.labelObjs,function(t){return s("div",{key:t.id},[s("el-tag",{staticStyle:{"margin-right":"10px","margin-top":"5px"}},[e._v(e._s(t.pathNames))]),e._v(" "),e.openLocate?s("room-map-select",{attrs:{drawingMd5s:t.drawingMd5s,defaultPoints:e.points,subareas:t.subareas}}):e._e()],1)}):e._l(e.labelObjs,function(t){return s("el-tag",{key:t.id,staticStyle:{"margin-right":"10px","margin-top":"5px"}},[e._v(e._s(t.pathNames))])})]:[s("span",{attrs:{title:e.label}},[e._v(e._s(e.label)+" "),s("i",{directives:[{name:"show",rawName:"v-show",value:e.loading,expression:"loading"}],staticClass:"el-icon-loading",attrs:{size:"14px"}})]),e._v(" "),e.openLocate?s("room-map-select",{attrs:{drawingMd5s:e.drawingMd5s,defaultPoints:e.points,subareas:e.subareas}}):e._e()]],2)};C._withStripped=!0;var w={props:["value","fieldConf","row","formName","orgInfo","isMultiple"],components:{RoomMapSelect:p},data(){return{label:"",labelObjs:[],loading:!1,subareas:[],drawingMd5s:[],curVal:[]}},watch:{value(){this.curVal=this.value,this.isMultiple?this.loadRemoteLabels():this.loadRemoteLabel()}},computed:{openLocate(){return _.get(this.fieldConf,"enable_locate")},points(){return _.get(this.value,"all_points",[])}},mounted(){this.curVal=this.value,this.isMultiple?this.loadRemoteLabels():this.loadRemoteLabel()},methods:{async loadRemoteLabel(){let e="";if(e=_.isArray(this.value)?this.value[0]:this.value,!_.isNil(e)&&e)try{this.loading=!0,e=_.cloneDeep(e),delete e.all_points,delete e.path_ids,delete e.type,e=JSON.stringify(e);let t=await this.$bpm.fetchLabelByValue(e,this.fieldConf.id,this.formName,this,"id",this.row);this.subareas=_.get(t,"subareas",[]),this.drawingMd5s=_.get(t,"drawing_md5s",[]);let s=_.join(t.path_names,"/");this.label=`${s}${s?"/":""}${t.name}`,this.loading=!1}finally{this.loading=!1}else this.label=zj.z("未选择","c.not_selected")},async loadRemoteLabels(){if(!_.isNil(this.curVal)&&this.curVal&&0!=this.curVal.length)try{let e=[];_.each(this.curVal,t=>{e.push(JSON.stringify(t))}),this.loading=!0;let t=await this.$bpm.fetchLabelByValues(e,this.fieldConf.id,this.formName,this,"id");this.labels=[];let s=_.map(t,e=>{let t=_.join(e.path_names,"/");return e.pathNames=`${t}${t?"/":""}${e.name}`,_.set(this.treeItemMap,e.id,e),e.pathNames});this.labelObjs=_.cloneDeep(t),this.labels=_.cloneDeep(s),s=_.join(s,", "),this.label=s}finally{this.loading=!1}}}},L=(0,d.A)(w,C,[],!1,null,null,null);L.options.__file="components/lib/bpmArea/src/part/reader.vue";var k=L.exports,x={name:"BpmArea",components:{editorComponent:m,multiEditorComponent:v,readerComponent:k},props:{value:{type:[String,Array,Number]},fieldConf:{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}}},data(){return{curVal:""}},computed:{curComponent(){return"view"==this.mode?k:this.isMultiple?v:m}},watch:{value(){this.curVal=this.value}},mounted(){this.curVal=this.value},methods:{handleChange(e){this.$emit("input",e),this.$emit("change",e)}}},$=(0,d.A)(x,e,[],!1,null,null,null);$.options.__file="components/lib/bpmArea/src/main.vue";var S=$.exports;S.install=function(e){e.component(S.name,S)};var M=S}(),i}()});
|
|
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={4486:function(e,t,s){"use strict";function a(e,t,s,a,i,l,n,o){var r,d="function"==typeof e?e.options:e;if(t&&(d.render=t,d.staticRenderFns=s,d._compiled=!0),a&&(d.functional=!0),l&&(d._scopeId="data-v-"+l),n?(r=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__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(n)},d._ssrRegister=r):i&&(r=o?function(){i.call(this,(d.functional?this.parent:this).$root.$options.shadowRoot)}:i),r)if(d.functional){d._injectStyles=r;var c=d.render;d.render=function(e,t){return r.call(t),c(e,t)}}else{var h=d.beforeCreate;d.beforeCreate=h?[].concat(h,r):[r]}return{exports:e,options:d}}s.d(t,{A:function(){return a}})},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}},s={};function a(e){var i=s[e];if(void 0!==i)return i.exports;var l=s[e]={exports:{}};return t[e](l,l.exports,a),l.exports}a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,{a:t}),t},a.d=function(e,t){for(var s in t)a.o(t,s)&&!a.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},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 i={};return function(){"use strict";a.r(i),a.d(i,{default:function(){return M}});var e=function(){var e=this,t=e.$createElement;return(e._self._c||t)(e.curComponent,e._b({tag:"component",staticClass:"bpm-area",attrs:{fieldConf:e.fieldConf,row:e.row,isMultiple:e.isMultiple,mode:e.mode,uiType:e.uiType},on:{change:e.handleChange},model:{value:e.curVal,callback:function(t){e.curVal=t},expression:"curVal"}},"component",e.$attrs,!1))};e._withStripped=!0;var t=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"select-area-editor"},[s("div",{on:{click:e.toOpen}},[e.label?s("div",[e._v("\n "+e._s(e.label)+"\n ")]):s("div",[s("el-button",{attrs:{size:"small",icon:"el-icon-location-outline"}},[e._v(" "+e._s(e.$z("选择区域","c.select_area")))])],1)]),e._v(" "),s("el-dialog",e._b({attrs:{top:"10vh",visible:e.opened,"before-close":e.onHide,width:"65%",title:e.fieldConf.name,fullscreen:!1,"append-to-body":""},on:{"update:visible":function(t){e.opened=t},open:e.onOpen}},"el-dialog",e.$attrs,!1),[s("div",[e._v("\n "+e._s(e.$z("当前选中","b2.common.selected"))+":\n "),s("el-tag",[e._v(e._s(e.cur_label?e.cur_label:e.label))])],1),e._v(" "),e.refresh?s("div",{staticClass:"subcategory-tree-box"},[s("div",{staticClass:"subcategory-tree",staticStyle:{"max-height":"550px",overflow:"auto"}},[s("el-tree",{ref:"tree",attrs:{props:e.defaultProps,lazy:"","node-key":"id","show-checkbox":!0,load:e.onLazyTreeLoad,"expand-on-click-node":!0,"check-strictly":!0},on:{"node-click":e.handleNodeClick,check:e.handleCheck},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.node;return s("span",{staticClass:"custom-tree-node"},[s("div",{staticClass:"tree-body-content"},[s("div",[e._v(e._s(a.label))]),e._v(" "),"strict"==e.tickStrategy&&a.lazy&&a.selectable?s("span",{on:{click:function(t){return t.stopPropagation(),e.expand(a.id,"force")}}},[e._v(e._s(e.$z("选择","c.choose")))]):e._e()])])}}],null,!1,3939466302)})],1)]):e._e(),e._v(" "),s("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[s("el-button",{attrs:{type:"primary"},on:{click:e.confirm}},[e._v(e._s(e.$z("确认","c.confirm")))])],1)]),e._v(" "),e.openLocate?s("room-map-select",{attrs:{field:e.field,drawingMd5s:e.drawingMd5s,defaultPoints:e.points,subareas:e.subareas},on:{save:e.savePlan}}):e._e()],1)};t._withStripped=!0;var s=a(5554),l=a.n(s),n=a(6773),o=a.n(n),r=a(7642),d=function(){var e=this,t=e.$createElement;return(e._self._c||t)("div",[e._v("\n slsls\n")])};d._withStripped=!0;var c=a(4486),h=(0,c.A)({},d,[],!1,null,null,null);h.options.__file="components/lib/bpmArea/src/part/room-map-select.vue";var p=h.exports;l().use(r.Dialog);var u={props:["value","fieldConf","row","formName","orgInfo","isMultiple"],components:{RoomMapSelect:p},inject:["selectOptions"],data(){return{curVal:"",label:zj.z("选择区域","c.select_area"),cur_label:"",keyword:"",opened:!1,debounceSearch:o().debounce(o().bind(this.search,this),150,{trailing:!0,leading:!1}),formList:[],treeItemMap:{},subareas:[],drawingMd5s:[],refresh:!0,selectedKey:"",defaultProps:{children:"children",label:"label",isLeaf:"isLeaf"},selectList:[],allAreaMap:{}}},watch:{value(){this.curVal=this.value,this.loadRemoteLabel()},selectedKey(e){e&&this.selected(e)},getSelectOptions(e){this.refresh=!1,this.selectList=e,setTimeout(()=>{this.refresh=!0},500)}},computed:{tickStrategy(){return"leaf_only"==o().get(this.fieldConf,"can","all")?"leaf-filtered":"strict"},openLocate(){return o().get(this.fieldConf,"enable_locate")},points(){return o().get(this.value,"all_points",[])},canSelect(){return o().get(this.fieldConf,"can")},getSelectOptions(){return this.selectOptions?this.selectOptions():[]}},mounted(){this.curVal=this.value,this.loadRemoteLabel()},methods:{confirm(){let e=this.selectedKey;e=o().toString(e);let t=o().get(this.treeItemMap,e,null);t&&(this.label=t.label,t=o().cloneDeep(t),delete t.label,delete t.lazy,delete t.path_names,delete t.pathNames,delete t.selectable,delete t.haspic,delete t.children,this.value,this.$emit("input",{id:t.id,path_ids:t.path_ids,all_points:[],type:t.type}),this.$emit("change",{id:t.id,path_ids:t.path_ids,all_points:[],type:t.type}),this.toClose())},handleNodeClick(e){console.log("data",e),e.selectable&&(this.selectedKey=o().get(e,"id",""))},handleCheck(e,t){console.log("data",e),console.log("state",t),this.selectedKey=o().get(e,"id","")},toOpen(){this.opened=!0},toClose(){this.opened=!1},reset(){try{let e=this.value;this.selectedKey=o().get(e,"id","")}catch(e){this.selectedKey=""}},async onOpen(){if(o().isEmpty(this.selectList)||!this.selectList){let e=await this.loadList("");this.selectList=e,this.reset()}this.opened=!0},clear(){this.removeValue(),this.resetLabel(),this.selectedKey=""},onLazyTreeLoad(e,t){setTimeout(async()=>{let s=[];s=0==e.level?await this._loadNextCategoryList(""):await this._loadNextCategoryList(e.data.id),this.setCategoryInMap(s),t(s)},500)},async _loadNextCategoryList(e){let t=await this.loadList(e);return this.transformResultToTree(t)},transformResultToTree(e){let t=this.canSelect;return o().map(e,e=>{let s=e.drawing_md5s;s=o().compact(s);let a={id:e.id,lazy:e.is_parent,label:e.name,isLeaf:!e.is_parent,path_ids:e.path_ids,path_names:e.path_names,selectable:e.available,disabled:!e.available,haspic:!!s.length,type:e.type};return"building_floor"==t&&3==e.type&&(a.lazy=!1),o().set(this.treeItemMap,e.id,a),a})},async loadList(e){let t=this.search_keyword,s=JSON.stringify({id:e,path_ids:o().get(this.treeItemMap,`${e}.path_ids`),type:o().get(this.treeItemMap,`${e}.type`)}),a=zj.pageParam({father:s,q:t});e||delete a.father,this.selectFields&&(a.fields=this.selectFields);let i=await this.$bpm.loadSelectLinkageResult({fieldId:this.fieldConf.id,params:a,cusFormName:this.formName,field:this,container:this.container});return console.log("data",i),i},setCategoryInMap(e){o().each(e,e=>{o().set(this.allAreaMap,e.value,e)})},_setCheckedKeys(e){this.$refs.tree.setCheckedKeys([]),this.$refs.tree.setCheckedKeys([e])},selected(e,t){e=o().toString(e);let s=o().get(this.treeItemMap,e,null);s&&e&&s.selectable&&(this._setCheckedKeys(e),this.cur_label=s.label)},expand(e,t){if(e=o().toString(e),o().get(this.treeItemMap,e,null).lazy&&!t){let t=this.$refs.tree.isExpanded(o().toInteger(e));return void this.$refs.tree.setExpanded(o().toInteger(e),!t)}this.selected(e,t)},savePlan(e){this.curVal.all_points=o().cloneDeep(e),this.$emit("input",this.curVal.all_points),this.$emit("change",this.curVal.all_points)},async search(){let e=this.search_keyword;if(this.keyword=e,this.expandedKeys=[],!e)return;this.$bpm.setFuncGIO("区域搜索");let t=await this._loadNextCategoryList("");this.changeLazy(t),this.filterNodes=t},changeLazy(e){this.setCategoryInMap(e),o().each(e,e=>{this.expandedKeys.push(e.value),e.lazy=!1,e.expandable=!0,e.children&&this.changeLazy(e.children)})},async loadRemoteLabel(){if(!this.value)return;let e=this.value;if(!o().isNil(e)&&e)try{this.loading=!0,e=o().cloneDeep(e),delete e.all_points,delete e.path_ids,delete e.type,e=JSON.stringify(e);let t=await this.$bpm.fetchLabelByValue(e,this.fieldConf.id,this.formName,this,"id",this.row);this.subareas=o().get(t,"subareas",[]),this.drawingMd5s=o().get(t,"drawing_md5s",[]);let s=o().join(t.path_names,"/");this.label=`${s}${s?"/":""}${t.name}`}finally{this.loading=!1}else this.label=""},onHide(){this.opened=!1}}},f=(0,c.A)(u,t,[],!1,null,null,null);f.options.__file="components/lib/bpmArea/src/part/editor.vue";var m=f.exports,y=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"select-area-editor"},[s("div",{on:{click:function(t){return t.stopPropagation(),e.toOpen.apply(null,arguments)}}},[e.labels.length>0?s("div",[e._l(e.labels,function(t){return s("el-tag",{key:t,staticStyle:{"margin-right":"10px","margin-top":"5px"}},[e._v(e._s(t))])}),e._v(" "),s("i",{staticClass:"el-icon-circle-close",on:{click:function(t){return t.stopPropagation(),e.delAllItem()}}})],2):s("div",[s("el-button",{attrs:{size:"small",icon:"el-icon-location-outline"}},[e._v(" "+e._s(e.$z("选择区域","c.select_area")))])],1)]),e._v(" "),s("el-dialog",e._b({attrs:{visible:e.opened,"before-close":e.onHide,width:"65%",title:e.fieldConf.name,fullscreen:!1,"append-to-body":""},on:{"update:visible":function(t){e.opened=t},open:e.onOpen}},"el-dialog",e.$attrs,!1),[s("div",[e._v("\n "+e._s(e.$z("当前选中","b2.common.selected"))+":\n "),e._l(e.labelObjs,function(t,a){return[a<5?s("el-tag",{key:t.id,staticStyle:{"margin-right":"10px","margin-top":"5px"},attrs:{closable:""},on:{close:function(s){return e.delHandle(t)}}},[e._v(e._s(t.pathNames))]):e._e()]}),e._v(" "),e.labelObjs.length>5?s("el-dropdown",[s("el-button",{attrs:{type:"primary"}},[e._v("\n "+e._s(e.$z("更多","c.more"))),s("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),e._v(" "),s("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[e._l(e.labelObjs,function(t,a){return[a>=5?s("el-dropdown-item",{key:t.id},[s("el-tag",{staticStyle:{"margin-right":"10px","margin-top":"5px"},attrs:{closable:""},on:{close:function(s){return e.delHandle(t)}}},[e._v(e._s(t.pathNames))])],1):e._e()]})],2)],1):e._e()],2),e._v(" "),e.refresh?s("div",{staticClass:"subcategory-tree-box"},[s("div",{staticClass:"subcategory-tree",staticStyle:{"max-height":"550px",overflow:"auto"}},[s("el-tree",{ref:"tree",attrs:{props:e.defaultProps,lazy:"","node-key":"id","show-checkbox":!0,load:e.onLazyTreeLoad,"expand-on-click-node":!1,"check-on-click-node":!0,"check-strictly":!0},on:{"node-click":e.handleNodeClick,"check-change":e.handleCheckChange},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.node;return s("span",{staticClass:"custom-tree-node"},[s("div",{staticClass:"tree-body-content"},[s("div",[e._v(e._s(a.label))]),e._v(" "),"strict"==e.tickStrategy&&a.lazy&&a.selectable?s("span",{on:{click:function(t){return t.stopPropagation(),e.expand(a.id,"force")}}},[e._v(e._s(e.$z("选择","c.choose")))]):e._e()])])}}],null,!1,3939466302)})],1),e._v(" "),s("div",{staticStyle:{display:"flex","flex-direction":"row-reverse"}},[s("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v(e._s(e.$z("确认","c.confirm")))]),e._v(" "),s("el-button",{staticStyle:{"margin-right":"10px"},on:{click:function(t){return e.clear()}}},[e._v(e._s(e.$z("重置","c.reset")))])],1)]):e._e()]),e._v(" "),e.openLocate?s("room-map-select",{attrs:{field:e.field,drawingMd5s:e.drawingMd5s,defaultPoints:e.points,subareas:e.subareas},on:{save:e.savePlan}}):e._e()],1)};y._withStripped=!0,l().use(r.Dialog);var b={props:["value","fieldConf","row","formName","orgInfo","isMultiple"],components:{RoomMapSelect:p},inject:["selectOptions"],data(){return{curVal:[],label:zj.z("选择区域","c.select_area"),labels:[],labelObjs:[],keyword:"",opened:!1,debounceSearch:o().debounce(o().bind(this.search,this),150,{trailing:!0,leading:!1}),formList:[],treeItemMap:{},subareas:[],drawingMd5s:[],refresh:!0,selectedKeys:[],selectedItems:[],defaultProps:{children:"children",label:"label",isLeaf:"isLeaf"},selectList:[],allAreaMap:{}}},watch:{value(){this.curVal=this.value,this.selectedKeys=o().map(this.curVal,e=>e.id),this.loadRemoteLabel()},selectedKeys(e){e&&this.selected(e)},getSelectOptions(e){this.refresh=!1,this.selectList=e,setTimeout(()=>{this.refresh=!0},500)}},computed:{tickStrategy(){return"leaf_only"==o().get(this.fieldConf,"can","all")?"leaf-filtered":"strict"},openLocate(){return o().get(this.fieldConf,"enable_locate")},points(){return o().get(this.value,"all_points",[])},canSelect(){return o().get(this.fieldConf,"can")},getSelectOptions(){return this.selectOptions?this.selectOptions():[]}},mounted(){this.curVal=this.value,this.loadRemoteLabel()},methods:{delAllItem(){this.clear(),this.$nextTick(()=>{this.onSubmit()})},delHandle(e){this.selectedKeys=o().filter(this.selectedKeys,t=>t!=e.id),this.setCheckedNode(this.selectedKeys)},handleNodeClick(e){},setCheckedNode(e){let t=[];t=e||o().map(this.value,e=>e.id),this.$refs.tree&&this.$refs.tree.setCheckedKeys(t)},handleCheckChange(e,t,s){t?this.selectedKeys.push(e.id):this.selectedKeys=o().filter(this.selectedKeys,t=>t!=e.id)},toOpen(){this.opened=!0},toClose(){this.opened=!1},reset(){this.selectedKeys=[]},onSubmit(){console.log("this.selectItems",this.selectedItems),this.$emit("change",this.selectedItems),this.$emit("input",this.selectedItems),this.toClose()},async onOpen(){this.opened=!0},clear(){this.selectedKeys=[],this.selectedItems=[],this.labels=[],this.labelObjs=[],this.curVal=[],this.setCheckedNode([])},onLazyTreeLoad(e,t){setTimeout(async()=>{let s=[];0==e.level?(s=await this._loadNextCategoryList(""),this.setCheckedNode()):s=await this._loadNextCategoryList(e.data.id),this.setCategoryInMap(s),t(s)},500)},async _loadNextCategoryList(e){let t=await this.loadList(e);return this.transformResultToTree(t)},transformResultToTree(e){let t=this.canSelect;return this.loading=!1,o().map(e,e=>{let s=!0;switch(t){case"any":s=!0;break;case"leaf_only":s=!e.is_parent;break;case"building":s=2==e.type;break;case"floor":s=3==e.type;break;case"building_floor":s=2==e.type||3==e.type;break;case"suite":s=4==e.type||5==e.type;break;case"suite_ex":s=4==e.type||5==e.type||6==e.type}let a=o().join(e.path_names,"/"),i={id:e.id,lazy:e.is_parent,isLeaf:!e.is_parent,label:e.name,type:e.type,path_ids:e.path_ids,path_names:e.path_names,pathNames:`${a}${a?"/":""}${e.name}`,tickable:s,noTick:!s};return"building_floor"==t&&3==e.type&&(i.lazy=!1,i.isLeaf=!0),o().set(this.treeItemMap,e.id,i),i})},async loadList(e){let t=this.search_keyword,s=JSON.stringify({id:e,path_ids:o().get(this.treeItemMap,`${e}.path_ids`),type:o().get(this.treeItemMap,`${e}.type`)}),a=zj.pageParam({father:s,q:t});return e||delete a.father,this.selectFields&&(a.fields=this.selectFields),await this.$bpm.loadSelectLinkageResult({fieldId:this.fieldConf.id,params:a,cusFormName:this.formName,field:this,container:this.container})},setCategoryInMap(e){o().each(e,e=>{o().set(this.allAreaMap,e.value,e)})},selected(e,t){this.selectedItems=[],e&&e.length>0&&o().each(e,e=>{e=o().toString(e);let t=o().get(this.treeItemMap,e,null);t&&(this.label=t.label,t=o().cloneDeep(t),this.selectedItems.push({id:t.id,path_ids:t.path_ids,all_points:[],type:t.type}))}),this.curVal=o().cloneDeep(this.selectedItems),this.loadRemoteLabel()},expand(e,t){if(e=o().toString(e),o().get(this.treeItemMap,e,null).lazy&&!t){let t=this.$refs.tree.isExpanded(o().toInteger(e));return void this.$refs.tree.setExpanded(o().toInteger(e),!t)}this.selected(e,t)},savePlan(e){this.curVal.all_points=o().cloneDeep(e),this.$emit("input",this.curVal.all_points),this.$emit("change",this.curVal.all_points)},async search(){let e=this.search_keyword;if(this.keyword=e,this.expandedKeys=[],!e)return;this.$bpm.setFuncGIO("区域搜索");let t=await this._loadNextCategoryList("");this.changeLazy(t),this.filterNodes=t},changeLazy(e){this.setCategoryInMap(e),o().each(e,e=>{this.expandedKeys.push(e.value),e.lazy=!1,e.isLeaf=!0,e.expandable=!0,e.children&&this.changeLazy(e.children)})},async loadRemoteLabel(){if(this.curVal)if(!o().isNil(this.curVal)&&this.curVal&&0!=this.curVal.length)try{let e=[];o().each(this.curVal,t=>{e.push(JSON.stringify(t))}),this.loading=!0;let t=await this.$bpm.fetchLabelByValues(e,this.fieldConf.id,this.formName,this,"id");this.subareas=o().get(t,"subareas",[]),this.drawingMd5s=o().get(t,"drawing_md5s",[]),this.labels=[];let s=o().map(t,e=>{let t=o().join(e.path_names,"/");return e.pathNames=`${t}${t?"/":""}${e.name}`,o().set(this.treeItemMap,e.id,e),e.pathNames});this.labelObjs=o().cloneDeep(t),this.labels=o().cloneDeep(s),s=o().join(s,", "),this.label=s}finally{this.loading=!1}else this.label=zj.z("选择区域","c.select_area")},onHide(){this.opened=!1}}},g=(0,c.A)(b,y,[],!1,null,null,null);g.options.__file="components/lib/bpmArea/src/part/multi-editor.vue";var v=g.exports,C=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"area-reader"},[e.isMultiple?[e.openLocate?e._l(e.labelObjs,function(t){return s("div",{key:t.id},[s("el-tag",{staticStyle:{"margin-right":"10px","margin-top":"5px"}},[e._v(e._s(t.pathNames))]),e._v(" "),e.openLocate?s("room-map-select",{attrs:{drawingMd5s:t.drawingMd5s,defaultPoints:e.points,subareas:t.subareas}}):e._e()],1)}):e._l(e.labelObjs,function(t){return s("el-tag",{key:t.id,staticStyle:{"margin-right":"10px","margin-top":"5px"}},[e._v(e._s(t.pathNames))])})]:[s("span",{attrs:{title:e.label}},[e._v(e._s(e.label)+" "),s("i",{directives:[{name:"show",rawName:"v-show",value:e.loading,expression:"loading"}],staticClass:"el-icon-loading",attrs:{size:"14px"}})]),e._v(" "),e.openLocate?s("room-map-select",{attrs:{drawingMd5s:e.drawingMd5s,defaultPoints:e.points,subareas:e.subareas}}):e._e()]],2)};C._withStripped=!0;var w={props:["value","fieldConf","row","formName","orgInfo","isMultiple"],components:{RoomMapSelect:p},data(){return{label:"",labelObjs:[],loading:!1,subareas:[],drawingMd5s:[],curVal:[]}},watch:{value(){this.curVal=this.value,this.isMultiple?this.loadRemoteLabels():this.loadRemoteLabel()}},computed:{openLocate(){return _.get(this.fieldConf,"enable_locate")},points(){return _.get(this.value,"all_points",[])}},mounted(){this.curVal=this.value,this.isMultiple?this.loadRemoteLabels():this.loadRemoteLabel()},methods:{async loadRemoteLabel(){let e="";if(e=_.isArray(this.value)?this.value[0]:this.value,!_.isNil(e)&&e)try{this.loading=!0,e=_.cloneDeep(e),delete e.all_points,delete e.path_ids,delete e.type,e=JSON.stringify(e);let t=await this.$bpm.fetchLabelByValue(e,this.fieldConf.id,this.formName,this,"id",this.row);this.subareas=_.get(t,"subareas",[]),this.drawingMd5s=_.get(t,"drawing_md5s",[]);let s=_.join(t.path_names,"/");this.label=`${s}${s?"/":""}${t.name}`,this.loading=!1}finally{this.loading=!1}else this.label=zj.z("未选择","c.not_selected")},async loadRemoteLabels(){if(!_.isNil(this.curVal)&&this.curVal&&0!=this.curVal.length)try{let e=[];_.each(this.curVal,t=>{e.push(JSON.stringify(t))}),this.loading=!0;let t=await this.$bpm.fetchLabelByValues(e,this.fieldConf.id,this.formName,this,"id");this.labels=[];let s=_.map(t,e=>{let t=_.join(e.path_names,"/");return e.pathNames=`${t}${t?"/":""}${e.name}`,_.set(this.treeItemMap,e.id,e),e.pathNames});this.labelObjs=_.cloneDeep(t),this.labels=_.cloneDeep(s),s=_.join(s,", "),this.label=s}finally{this.loading=!1}}}},L=(0,c.A)(w,C,[],!1,null,null,null);L.options.__file="components/lib/bpmArea/src/part/reader.vue";var k=L.exports,$={name:"BpmArea",components:{editorComponent:m,multiEditorComponent:v,readerComponent:k},props:{value:{type:[String,Array,Number]},fieldConf:{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}}},data(){return{curVal:""}},computed:{curComponent(){return"view"==this.mode?k:this.isMultiple?v:m}},watch:{value(){this.curVal=this.value}},mounted(){this.curVal=this.value},methods:{handleChange(e){this.$emit("input",e),this.$emit("change",e)}}},x=(0,c.A)($,e,[],!1,null,null,null);x.options.__file="components/lib/bpmArea/src/main.vue";var S=x.exports;S.install=function(e){e.component(S.name,S)};var M=S}(),i}()});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("lodash"),require("qs")):"function"==typeof define&&define.amd?define(["lodash","qs"],t):"object"==typeof exports?exports.bpm2=t(require("lodash"),require("qs")):e.bpm2=t(e.lodash,e.qs)}(self,function(e,t){return function(){"use strict";var o={5281:function(e,t,o){o.d(t,{A:function(){return m}});var r=o(9795),i=o(6773),a=o.n(i),n=class{constructor(e,t={}){this._fnBatchLoad=e,this._options=t,this._queue=[]}async load(e){let t=await this.loads(e);return a().get(t,"0")}loads(...e){return new Promise((t,o)=>{this._queue.push({keys:e,resolve:t,reject:o}),1==this._queue.length&&this.nextTick(()=>{this.process()})})}nextTick(e){setTimeout(e,0)}process(){let e=this._queue;this._queue=[];let t={};a().each(e,e=>{a().each(e.keys,e=>t[e]=null)});let o=a().keys(t);this._fnBatchLoad(o).then(r=>{a().each(o,(e,o)=>{t[e]=r[o]}),a().each(e,({keys:e,resolve:o})=>{o(a().map(e,e=>t[e]))})}).catch(t=>{a().each(e,({reject:e})=>e(t))})}},s=o(5360),l=o.n(s);const c=async(e,t,o)=>{if(t.setNetworking(!0),t.netHeader&&(e.headers={common:t.netHeader}),e.params=_.merge({},e.params,o),t.env.ignore_levels&&_.set(e.params,"ignore_levels",!0),(0,r.Fr)()){let t=zj.utils.pageParam().token;e.params=_.merge({token:t,platform:"phone"},e.params)}e.isSilentOnErr=e=>{let t=_.get(e,"data.result");return t>=19e6||t<=19999999};let i=_.cloneDeep(e);if(i.can_custom_org_params){let e=_.cloneDeep(_.get(t,"orgInfo",{}));console.log("bpm3_orgInfo",e),e.custom_page_level&&(i.params.page_level=e.custom_page_level),e.custom_group_id&&(i.params.group_id=e.custom_group_id),e.custom_team_id&&(i.params.team_id=e.custom_team_id),e.custom_project_id&&(i.params.project_id=e.custom_project_id)}console.log("bpm3_orgInfo_reqArgs",i);let a=await zj.net.request(i);return t.setNetworking(!1),a},d={},f={};var m={assistSelectEntranceForm:{getListDefinition(e,{formDefId:t,fieldDefId:o,orgInfo:r,isDm:i}){return c({url:`/app_flow/v1/papi/assist_select_entrance_form/${t}/${o}/list_definition/`,method:"GET"},e,r)},getOptions(e,{formDefId:t,fieldDefId:o,orgInfo:r,isDm:i},a){return c({url:`/app_flow/v1/papi/assist_select_entrance_form/${t}/${o}/list_search/`,method:"GET",params:a},e,r)},getListSelected(e,{formDefId:t,fieldDefId:o,orgInfo:r,isDm:i},a){return c({url:`/app_flow/v1/papi/assist_select_entrance_form/${t}/${o}/list_selected/`,method:"GET",params:a},e,r)}},assistField:{getBatchLoader(e,{formDefId:t,fieldDefId:o,orgInfo:r,uniqueId:i}){const a=`${t}/${o}`,s=d[a]||new n(async a=>{let n=`/app_flow/v1/papi/assist_field/${t}/${o}/list_title/`;const s=await c({url:n,method:"GET",params:{values:JSON.stringify(a)}},e,r),l=_.get(s,"data.data.data",{});let d=[];return _.map(a,e=>{i?(e=JSON.parse(e),e=_.get(e,`${i}`),d=_.concat(d,l[e])):d=_.concat(d,l[e])}),d});return d[a]=s,s},getTitle(e,{formDefId:t,fieldDefId:o,orgInfo:r,isDm:i},a){return c({url:`/app_flow/v1/papi/assist_field/${t}/${o}/list_title/`,method:"GET",params:{values:JSON.stringify(a)}},e,r)},async searchSelectOpts(e,{formDefId:t,fieldDefId:o,orgInfo:r,isDm:i},a={},n=""){n&&(a.q=n);let s=i?`/app_flow/v1/papi/dm/assist_field/${t}/${o}/search_title/`:`/app_flow/v1/papi/assist_field/${t}/${o}/search_title/`,l=`${t}/${o}/${n}/${JSON.stringify(r)}/${JSON.stringify(a)}`,d={};return f[l]&&"loading"==f[l]?(console.log("有缓存,返回"),await this.waitCacheMapData(l)):(!f[l]||(new Date).getTime()-f[l].last_time>6e4?(f[l]="loading",d=await c({url:s,method:i?"GET":"POST",data:a,can_custom_org_params:!0},e,r),f[l]={last_time:(new Date).getTime(),result:d}):(console.log("有缓存"),f[l].result&&(d=f[l].result)),d)},waitCacheMapData(e){return new Promise(t=>{let o=setInterval(()=>{f[e]&&"loading"!=f[e]&&f[e].result&&(clearInterval(o),t(f[e].result))},100)})},selectFromMulFormSearchOpts(e,{formDefId:t,fieldDefId:o,orgInfo:r,isDm:i},a={},n=""){return n&&(a.q=n),c({url:i?`/app_flow/v1/papi/dm/assist_field/select_form_mul_form/${t}/${o}/search_title/`:`/app_flow/v1/papi/assist_field/select_form_mul_form/${t}/${o}/search_title/`,method:"GET",params:a},e,r)},selectFromMulFormListTitleLoader(e,{formDefId:t,fieldDefId:o,orgInfo:r,isDm:i}){const a=`${t}/${o}`,s=d[a]||new n(async a=>{let n=i?`/app_flow/v1/papi/dm/assist_field/select_form_mul_form/${t}/${o}/list_title/`:`/app_flow/v1/papi/assist_field/select_form_mul_form/${t}/${o}/list_title/`;const s=await c({url:n,method:"GET",params:{values:JSON.stringify(a)}},e,r),l=_.get(s.data,"data.items",[]),d={};l.forEach(e=>{Object.keys(e.data).forEach(t=>{let o=e.data[t];d[t]={form_def_id:_.get(e,"definition.form.id"),form_title:_.get(e,"definition.form.name"),label:o}})});let f=[];return a.forEach(e=>{f.push(d[e])}),f});return d[a]=s,s},selectFromMulFormListTitle(e,{formDefId:t,fieldDefId:o,orgInfo:r,isDm:i},a){return c({url:i?`/app_flow/v1/papi/dm/assist_field/select_form_mul_form/${t}/${o}/list_title/`:`/app_flow/v1/papi/assist_field/select_form_mul_form/${t}/${o}/list_title/`,method:"GET",params:{values:JSON.stringify(a)}},e,r)}},assistTreeField:{searchSelectOpts(e,{formDefId:t,fieldDefId:o,orgInfo:r,isDm:i},a={},n=""){return n&&(a.q=n),c({url:i?`/app_flow/v1/papi/dm/assist_tree_field/${t}/${o}/search_title/`:`/app_flow/v1/papi/assist_tree_field/${t}/${o}/search_title/`,method:"GET",params:a,can_custom_org_params:!0},e,r)}},assistUserTaskCC:{searchSelectOpts(e,{formDefId:t,node:o,orgInfo:r,isDm:i},a={},n=""){return n&&(a.q=n),c({url:`/app_flow/v1/papi/assist_user_task_cc/${t}/${o}/search_title/`,method:"GET",params:a},e,r)}},OCR:{getCreatedTaskList(e){return zj.net.w.noapi({url:"/base_srv_module/v2/gapi/task/async_notify_list",method:"POST",data:l().stringify({group_id:zj.pageParam().group_id||0,file_md5:e})})},getTaskId(e){return zj.net.w.noapi({url:"/base_srv_module/v2/gapi/task/async_notify_submit",method:"POST",data:l().stringify({group_id:zj.pageParam().group_id||0,name:"OCR识别MD5_"+e,vendor_code:"csmart",enable_notify:0,task_type:1,creator:zj.app.accessInfo.user_id,file_md5:e})})},getOcrResult(e){return zj.net.w.noapi({url:"/base_srv_module/v2/gapi/task/detail",method:"POST",data:l().stringify(e)})},ocrCreateForm(e,t){return zj.net.w.noapi.json({url:"/app_flow/v1/papi/ocr_create/submit",method:"POST",params:t,data:e})}}}},9795:function(e,t,o){function r(){for(var e=["iphone","ipod","ipad","android","mobile","blackberry","webos","incognito","webmate","bada","nokia","lg","ucweb","skyfire"],t=navigator.userAgent.toLowerCase(),o=!1,r=0,i=e.length;r<i;r++)-1!=t.indexOf(e[r])&&(o=!0);return o}o.d(t,{Fr:function(){return r}}),o(6773),o(5360)},5366:function(e,t,o){var r=o(1601),i=o.n(r),a=o(6314),n=o.n(a)()(i());n.push([e.id,".select-from-form-dialog {\n .search-box{\n display: flex;\n margin-top: -10px;\n margin-bottom: 10px;\n .input-with-select{\n margin-right: 10px;\n }\n }\n}\n\n\n\n.select-from-form-editor {\n \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-top: 5px;\n margin-bottom: 5px;\n margin-left: 24px;\n font-size: 12px;\n color: #949494;\n }\n}\n",""]),t.A=n},5831:function(e,t,o){var r=o(1601),i=o.n(r),a=o(6314),n=o.n(a),s=o(5366),l=n()(i());l.i(s.A),l.push([e.id,"\n",""]),t.A=l},6314:function(e){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var o="",r=void 0!==t[5];return t[4]&&(o+="@supports (".concat(t[4],") {")),t[2]&&(o+="@media ".concat(t[2]," {")),r&&(o+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),o+=e(t),r&&(o+="}"),t[2]&&(o+="}"),t[4]&&(o+="}"),o}).join("")},t.i=function(e,o,r,i,a){"string"==typeof e&&(e=[[null,e,void 0]]);var n={};if(r)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(n[l]=!0)}for(var c=0;c<e.length;c++){var d=[].concat(e[c]);r&&n[d[0]]||(void 0!==a&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=a),o&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=o):d[2]=o),i&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=i):d[4]="".concat(i)),t.push(d))}},t}},1601:function(e){e.exports=function(e){return e[1]}},5072:function(e){var t=[];function o(e){for(var o=-1,r=0;r<t.length;r++)if(t[r].identifier===e){o=r;break}return o}function r(e,r){for(var a={},n=[],s=0;s<e.length;s++){var l=e[s],c=r.base?l[0]+r.base:l[0],d=a[c]||0,f="".concat(c," ").concat(d);a[c]=d+1;var m=o(f),p={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==m)t[m].references++,t[m].updater(p);else{var u=i(p,r);r.byIndex=s,t.splice(s,0,{identifier:f,updater:u,references:1})}n.push(f)}return n}function i(e,t){var o=t.domAPI(t);return o.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;o.update(e=t)}else o.remove()}}e.exports=function(e,i){var a=r(e=e||[],i=i||{});return function(e){e=e||[];for(var n=0;n<a.length;n++){var s=o(a[n]);t[s].references--}for(var l=r(e,i),c=0;c<a.length;c++){var d=o(a[c]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}a=l}}},7659:function(e){var t={};e.exports=function(e,o){var r=function(e){if(void 0===t[e]){var o=document.querySelector(e);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(e){o=null}t[e]=o}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(o)}},540:function(e){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,o){e.exports=function(e){var t=o.nc;t&&e.setAttribute("nonce",t)}},7825:function(e){e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(o){!function(e,t,o){var r="";o.supports&&(r+="@supports (".concat(o.supports,") {")),o.media&&(r+="@media ".concat(o.media," {"));var i=void 0!==o.layer;i&&(r+="@layer".concat(o.layer.length>0?" ".concat(o.layer):""," {")),r+=o.css,i&&(r+="}"),o.media&&(r+="}"),o.supports&&(r+="}");var a=o.sourceMap;a&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,o)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},1113:function(e){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,o){function r(e,t,o,r,i,a,n,s){var l,c="function"==typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=o,c._compiled=!0),r&&(c.functional=!0),a&&(c._scopeId="data-v-"+a),n?(l=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__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(n)},c._ssrRegister=l):i&&(l=s?function(){i.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:i),l)if(c.functional){c._injectStyles=l;var d=c.render;c.render=function(e,t){return l.call(t),d(e,t)}}else{var f=c.beforeCreate;c.beforeCreate=f?[].concat(f,l):[l]}return{exports:e,options:c}}o.d(t,{A:function(){return r}})},6773:function(t){t.exports=e},5360:function(e){e.exports=t}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var a=r[e]={id:e,exports:{}};return o[e](a,a.exports,i),a.exports}i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,{a:t}),t},i.d=function(e,t){for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nc=void 0;var a={};i.r(a),i.d(a,{default:function(){return P}});var n=function(){var e=this,t=e.$createElement;return(e._self._c||t)(e.curComponent,e._b({tag:"component",staticClass:"bpm-external-form-link",attrs:{fieldConf:e.fieldConf,container:e.container,row:e.row,rowIndex:e.rowIndex,mode:e.mode,formName:e.formName,orgInfo:e.orgInfo,uiType:e.uiType,isMultiple:!0},on:{change:e.handleChange},model:{value:e.curVal,callback:function(t){e.curVal=t},expression:"curVal"}},"component",e.$attrs,!1))};n._withStripped=!0;var s=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"external-from-link-editor"},[o("div",["title"==e.componetUiType?[o("ul",{staticClass:"external-from-link-list",staticStyle:{"list-style":"none"}},e._l(e.curVal,function(t,r){return o("li",{key:t.form_id,staticClass:"external-from-link-list-item"},[o("span",{on:{click:function(o){return e.toFormDetailPage(t)}}},[o("i",{staticClass:"el-icon-tickets",staticStyle:{"margin-right":"5px"}}),o("span",[e._v(e._s(t.form_title))])]),e._v(" "),e.readonly?e._e():o("i",{staticClass:"el-icon-close del-btn",on:{click:function(t){return e.removeForm(r)}}})])}),0)]:"card"==e.componetUiType?[o("div",{staticClass:"external-from-link-card"},e._l(e.curVal,function(t,r){return o("el-card",{key:t.form_id,staticClass:"external-from-link-card-item",attrs:{"body-style":e.collapsedKeys.includes(t.form_id)?{padding:"0px",display:"none"}:{}}},[o("div",{staticClass:"clearfix",staticStyle:{cursor:"pointer"},attrs:{slot:"header"},on:{click:function(o){return e.toggleCollapse(t)}},slot:"header"},[o("i",{class:e.collapsedKeys.includes(t.form_id)?"el-icon-arrow-right":"el-icon-arrow-down",staticStyle:{"margin-right":"5px"}}),e._v(" "),o("span",{on:{click:function(o){return o.stopPropagation(),e.toFormDetailPage(t)}}},[o("i",{staticClass:"el-icon-tickets",staticStyle:{"margin-right":"5px"}}),o("span",[e._v(e._s(t.form_title))])]),e._v(" "),e.readonly?e._e():o("el-button",{staticStyle:{float:"right",padding:"3px 0"},attrs:{type:"text"},on:{click:function(t){return t.stopPropagation(),e.removeForm(r)}}},[o("i",{staticClass:"el-icon-close del-btn"})])],1),e._v(" "),o("div",{directives:[{name:"show",rawName:"v-show",value:!e.collapsedKeys.includes(t.form_id),expression:"!collapsedKeys.includes(item.form_id)"}],staticClass:"external-from-link-card-item-content"},[o("extern-form-content",{attrs:{item:t,container:e.container,ExternFormDef:e.ExternFormDefMap[t.form_def_id],ExternFormCreateConfDef:e.ExternFormCreateConfDefMap[t.form_def_id]}})],1)])}),1)]:"list"==e.componetUiType?[o("el-table",{staticStyle:{width:"100%"},attrs:{data:e.curVal,border:"",size:"small"}},[o("el-table-column",{attrs:{label:e.$z("标题","c.title"),"min-width":"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[o("span",{staticStyle:{cursor:"pointer",color:"#409EFF"},on:{click:function(o){return e.toFormDetailPage(t.row)}}},[o("i",{staticClass:"el-icon-tickets",staticStyle:{"margin-right":"5px"}}),e._v(e._s(t.row.form_title||t.row.title)+"\n ")])]}}])}),e._v(" "),e._l(e.tableColumns,function(t){return o("el-table-column",{key:t.prop,attrs:{prop:t.prop,label:t.label,"show-overflow-tooltip":"","min-width":"120"},scopedSlots:e._u([{key:"default",fn:function(r){return[o("bpm-field",{ref:"externFormField_"+r.$index+"_"+t.prop,refInFor:!0,attrs:{type:t.fieldConf.type,fieldConf:t.fieldConf,formName:r.row.form_def_id,mode:"view",uiType:"form",container:e.container},model:{value:r.row[t.prop],callback:function(o){e.$set(r.row,t.prop,o)},expression:"scope.row[col.prop]"}})]}}],null,!0)})}),e._v(" "),e.readonly?e._e():o("el-table-column",{attrs:{label:e.$z("操作","c.operation"),width:"100",fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(t){return[o("el-button",{staticStyle:{color:"#F56C6C"},attrs:{type:"text"},on:{click:function(o){return e.removeForm(t.$index)}}},[e._v(e._s(e.$z("移除","c.remove")))])]}}],null,!1,1343955411)})],2)]:e._e(),e._v(" "),e.ExternFormList.length>1?[o("el-dropdown",{staticStyle:{"margin-right":"10px"},on:{command:e.CreateForm}},[o("el-button",{directives:[{name:"show",rawName:"v-show",value:e.canCreateForm,expression:"canCreateForm"}],attrs:{size:"mini",icon:"el-icon-plus"}},[e._v(e._s(e.$z("创建","c.create")))]),e._v(" "),o("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},e._l(e.ExternFormList,function(t){return o("el-dropdown-item",{key:t.form,attrs:{command:t}},[e._v(e._s(t.name))])}),1)],1)]:[o("el-button",{directives:[{name:"show",rawName:"v-show",value:e.canCreateForm,expression:"canCreateForm"}],attrs:{size:"mini",icon:"el-icon-plus"},on:{click:function(t){return e.CreateForm(e.ExternFormList[0])}}},[e._v(e._s(e.$z("创建","c.create")))])],e._v(" "),e.canRefForm?o("el-button",{attrs:{size:"mini",icon:"el-icon-connection"},on:{click:e.toRefOpen}},[e._v(e._s(e.$z("关联","c.link_2")))]):e._e()],2),e._v(" "),o("el-dialog",{attrs:{"append-to-body":!0,visible:e.createDialogVisible,"close-on-click-modal":!1,title:e.createDialogTitle,width:"80%",top:"5vh"},on:{"update:visible":function(t){e.createDialogVisible=t}}},[o("iframe",{ref:"createFrame",staticClass:"create-form-iframe",attrs:{src:e.createFrameUrl,frameborder:"0",width:"100%",height:"600px"},on:{load:e.createFrameLoad}})]),e._v(" "),o("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}}},[o("iframe",{ref:"detailFrame",staticClass:"detail-form-iframe",attrs:{src:e.detailFrameUrl,frameborder:"0",width:"100%",height:"600px"}})]),e._v(" "),o("el-dialog",{attrs:{"custom-class":"link-form-dialog","append-to-body":!0,visible:e.opened,"close-on-click-modal":!1,"before-close":e.onHide,title:e.fieldConf.name,width:"40%"},on:{"update:visible":function(t){e.opened=t},open:e.onRelFormDialogOpen}},[o("div",{staticClass:"search-box"},[o("el-input",{staticClass:"input-with-select",attrs:{placeholder:e.$z("只展示前100条数据,通过搜索获取更多","b2.common.see_100_data")},on:{input:e.inputSearch},model:{value:e.keyword,callback:function(t){e.keyword=t},expression:"keyword"}}),e._v(" "),e.showSearchBtn?[o("el-button",{attrs:{type:"primary"},on:{click:e.throttleSearch}},[e._v(e._s(e.$z("搜索","c.search")))]),e._v(" "),o("el-button",{on:{click:e.resetKeyword}},[e._v(e._s(e.$z("重置","c.reset")))])]:e._e()],2),e._v(" "),o("el-tabs",{staticStyle:{"margin-top":"20px"},attrs:{type:"card","tab-position":"top"},on:{"tab-click":e.hanldeTabClick},model:{value:e.activeTab,callback:function(t){e.activeTab=t},expression:"activeTab"}},e._l(e.rangeRemote,function(t,r){return o("el-tab-pane",{key:t.form+r,attrs:{label:e.optionListArr[r]&&e.optionListArr[r].form_title||""+e.$z("表单","c.form")+(r+1),name:t.form+r}},[e.optionListArr[r]&&e.optionListArr[r].options.length?o("div",{staticClass:"bpm-select-from-form-box"},["title"!==t.range_display.ui_style&&t.range_display.ui_style?"table"===t.range_display.ui_style?[o("el-checkbox-group",{model:{value:e.dialogVal[r].form_ids,callback:function(t){e.$set(e.dialogVal[r],"form_ids",t)},expression:"dialogVal[index].form_ids"}},[o("el-table",{staticStyle:{width:"100%"},attrs:{data:e.optionListArr[r].options,border:"",size:"small"}},[o("el-table-column",{attrs:{width:"35",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[o("el-checkbox",{attrs:{label:t.row.id,disabled:e.setDisabled(t.row.id)}})]}}],null,!0)}),e._v(" "),o("el-table-column",{attrs:{label:e.$z("标题","c.title"),"min-width":"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[o("span",[e._v(e._s(t.row.title))])]}}],null,!0)}),e._v(" "),e._l(e.getLinkDialogTableColumns(r),function(t){return o("el-table-column",{key:t.prop,attrs:{prop:t.prop,label:t.label,"show-overflow-tooltip":"","min-width":"120"},scopedSlots:e._u([{key:"default",fn:function(i){return[o("bpm-field",{ref:"externOptionField_"+r+"_"+i.$index+"_"+t.prop,refInFor:!0,attrs:{type:t.fieldConf.type,fieldConf:t.fieldConf,formName:e.optionListArr[r].form_def_id,mode:"view",uiType:"form",container:e.container},model:{value:i.row.f_fields[t.prop],callback:function(o){e.$set(i.row.f_fields,t.prop,o)},expression:"scope.row.f_fields[col.prop]"}})]}}],null,!0)})})],2)],1)]:e._e():[o("el-checkbox-group",{on:{change:e.handleChange},model:{value:e.dialogVal[r].form_ids,callback:function(t){e.$set(e.dialogVal[r],"form_ids",t)},expression:"dialogVal[index].form_ids"}},e._l(e.optionListArr[r].options,function(t){return o("div",{key:t.id,staticClass:"form-item"},[o("div",{style:e.getTitleStyle(r)},[o("el-checkbox",{key:t.id,attrs:{label:t.id,disabled:e.setDisabled(t.id)}},[e._v(e._s(t.title))])],1),e._v(" "),e._l(t.fields,function(t){return o("div",{key:t.key,staticClass:"subitem",style:e.geFieldStyle(r,t.key)},[e._v("\n "+e._s(t.name)+": "+e._s(t.value)+"\n ")])})],2)}),0)]],2):o("div",[e._v(e._s(e.$z("暂无数据","c.no_data")))])])}),1),e._v(" "),o("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[o("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v(e._s(e.$z("确定","c.confirm")))])],1)],1)],1)};s._withStripped=!0;var l=i(6773),c=i.n(l),d=i(5281),f=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("el-form",{staticClass:"external-form-content",attrs:{"label-width":"180px",inline:!1}},[o("el-form-item",{attrs:{label:e.$z("表单名称","c.form_name"),prop:"form_def_name"}},[o("span",[e._v(e._s(e.ExternFormDef.name))])]),e._v(" "),e._l(e.columns,function(t){return o("el-form-item",{directives:[{name:"show",rawName:"v-show",value:0==t.hidden,expression:"col.hidden == false"}],key:t.key,attrs:{label:t.label}},[o("bpm-field",e._b({ref:"externFormField",refInFor:!0,attrs:{type:t.fieldConf.type,fieldConf:t.fieldConf,formName:e.ExternFormDef.id,mode:"view",uiType:"form",container:e.container},model:{value:e.item[t.key],callback:function(o){e.$set(e.item,t.key,o)},expression:"item[col.key]"}},"bpm-field",e.$attrs,!1))],1)})],2)};f._withStripped=!0;var m={props:{item:{type:Object,default(){return{}}},ExternFormDef:{type:Object,default(){return{}}},ExternFormCreateConfDef:{type:Object,default(){return{}}},container:{type:Object,default(){return{}}}},watch:{item(e,t){e&&this.getColumns()}},computed:{},data(){return{columns:[]}},methods:{getColumns(){let e=[];console.log("this.ExternFormDef",this.ExternFormDef),console.log("this.ExternFormCreateConfDef.",this.ExternFormCreateConfDef),_.each(this.ExternFormCreateConfDef.fields,t=>{let o=_.cloneDeep(t),r=_.find(this.ExternFormDef.elements,e=>e.id==t.target_field);console.log("columns_fieldConf",r),r&&(o.key=t.target_field,o.label=r.name,o.fieldConf=r,e.push(o))}),console.log("_columns",e),this.columns=e}},mounted(){console.log("item",this.item),console.log("ExternFormDef",this.ExternFormDef),console.log("ExternFormCreateConfDef",this.ExternFormCreateConfDef),this.getColumns()}},p=i(4486),u=(0,p.A)(m,f,[],!1,null,null,null);u.options.__file="components/lib/bpmExternalFormLink/src/part/external_form_content.vue";var h={props:["value","fieldConf","row","rowIndex","formName","formDefId","orgInfo","dm","isMultiple","container","readonly","uiType"],components:{externFormContent:u.exports},inject:["getSelectFields","selectOptions"],computed:{showSearchBtn(){return c().get(this.fieldConf,"range_remote[0].range_display.show_search_btn",!1)},formData(){return this.container&&this.container.isSubForm?this.container.container.formData:this.container?this.container.formData:this.row&&this.row.f_fields?this.row.f_fields:this.row},minCount(){return c().get(this.fieldConf,"check.min_count")||0},maxCount(){return c().get(this.fieldConf,"check.max_count")||0},allChecked(){return(this.curVal||[]).map(e=>e.form_id)},canCreateForm(){return!(this.maxCount>0&&this.curVal.length>=this.maxCount||this.readonly)&&(this.fieldConf.enable_create_form||!1)},canRefForm(){return!(this.maxCount>0&&this.curVal.length>=this.maxCount||this.readonly)&&(this.fieldConf.enable_ref_form||!1)},rangeRemote(){return this.fieldConf.range_remote||[]},componetUiType(){return"table"==this.uiType?"title":this.fieldConf.style.ui_type},detailUiType(){return this.fieldConf.style.detail_ui_type},detailDialogWidth(){return this.fieldConf.style.dialog_width+"%"||0},tableColumns(){let e=[],t=new Set;return this.ExternFormList.forEach(o=>{let r=o.remote_create;console.log("createConf",r),console.log("formConfig.elements",o.elements),r&&r.fields&&o.elements&&r.fields.forEach(r=>{let i=r.target_field;if(!t.has(i)){let a=o.elements.find(e=>e.id===i);a&&r.is_store&&!r.hidden&&(t.add(i),e.push({prop:i,label:a.name,fieldConf:a}))}})}),e},ExternFormList(){return(this.fieldConf.range_remote||[]).map(e=>{let t=this.ExternFormDefMap[e.form];return this.ExternFormCreateConfDefMap[e.form]=e.remote_create,console.log("def",t),t?{...e,...t}:e})}},watch:{value:{handler(e){this.getCurVal(e)},deep:!0},curVal:{handler(e){e&&e.length>0&&this._getExternFormData()},deep:!0},createDialogVisible(e,t){e||clearInterval(this.set_global_var_interval_timer)}},data(){return{curVal:[],dialogVal:[],label:zj.z("未选择","c.not_selected"),formLabels:[],keyword:"",opened:!1,collapsedKeys:[],throttleSearch:c().throttle(c().bind(this.search,this),1500,{trailing:!0,leading:!1}),optionListArr:[],optionListDef:[],formList:[],ExternFormDefMap:{},ExternFormCreateConfDefMap:{},FormDataMap:{},createDialogVisible:!1,createFrameUrl:"",createDialogTitle:"",detailDialogVisible:!1,detailDialogTtile:"",detailFrameUrl:"",lastEmittedSnapshot:[],activeTab:"",set_global_var_interval_timer:null,get_forms_data_interval_timer:null,GlobalVar:{},postMessageCustomId:"bpm_external_form_link"+Math.random()}},mounted(){this.getCurVal(this.value),this.getExternFormDef(),this.watchExternFormChange()},created(){window.addEventListener("message",this.handlePostMessage,!1)},beforeDestroy(){clearInterval(this.set_global_var_interval_timer),clearInterval(this.get_forms_data_interval_timer),window.removeEventListener("message",this.handlePostMessage,!1)},methods:{resetKeyword(){this.keyword=""},formatFormData(e){let t=c().cloneDeep(this.FormDataMap[e]);if(!t)return{};console.log("_data",t);let o={form_title:t.title||t.form_title,form_id:t.form_id,form_def_id:t.form_def_id},r=this.ExternFormCreateConfDefMap[t.form_def_id];return console.log("_externFormCreateConfDef",r),r&&r.fields&&r.fields.length>0&&c().each(r.fields,e=>{e.is_store&&(o[e.target_field]=t.f_fields[e.target_field])}),console.log("_formData",o),o},async handleCreateFormSuccess(e){if(console.log("handleCreateFormSuccess_data",e),console.log("postMessageCustomId",this.postMessageCustomId),e.postMessageCustomId!=this.postMessageCustomId)return;console.log("内部表单新增,data",e),await this.getFormsData([e.form_id]);let t=this.formatFormData(e.form_id);console.log("内部表单新增,add_form_data",t),console.log("this.FormDataMap",this.FormDataMap),this.curVal.push(t),this.$emit("input",this.curVal),this.$emit("change",this.curVal),this.createDialogVisible=!1},handlePostMessage(e){if(console.log("Received message event:",e),console.log("Received message:",e.data),e.origin===location.origin)switch(e.data.type){case"bpm_create_success":this.handleCreateFormSuccess(e.data.data),clearInterval(this.set_global_var_interval_timer);break;case"bpm_create_form_close":this.createDialogVisible=!1,clearInterval(this.set_global_var_interval_timer);break;default:return}},createFrameLoad(){console.log("this.$refs",this.$refs),this.set_global_var_interval_timer&&clearInterval(this.set_global_var_interval_timer),this.set_global_var_interval_timer=setInterval(()=>this.sendPossMessageToSetGlobalVar(),1e3)},sendPossMessageToSetGlobalVar(){this.$refs.createFrame.contentWindow.postMessage({type:"setBPMGlobalVar",data:this.GlobalVar},"*")},watchExternFormChange(){if(!c().get(this.fieldConf,"enable_dynamic_update")||this.readonly)return;let e=c().get(this.fieldConf,"dynamic_update_conf")||{};console.log("dynamic_update_conf",e),"http"==e.protocol&&(this.get_forms_data_interval_timer&&clearInterval(this.get_forms_data_interval_timer),this.get_forms_data_interval_timer=setInterval(async()=>{this._getExternFormData()},e.polling_interval_time||1e4),console.log("this.get_forms_data_interval_timer",this.get_forms_data_interval_timer))},async _getExternFormData(){if(this.curVal&&this.curVal.length>0){await this.getFormsData();let e=c().cloneDeep(this.curVal);console.log("_curVal",e),e=e.map(e=>this.formatFormData(e.form_id));const t=c().orderBy(e,["form_id"],["asc"]);console.log("normalized",t),console.log("this.lastEmittedSnapshot",this.lastEmittedSnapshot),console.log("_.isEqual(normalized, this.lastEmittedSnapshot)",c().isEqual(t,this.lastEmittedSnapshot)),c().isEqual(t,this.lastEmittedSnapshot)||(this.curVal=t,this.lastEmittedSnapshot=c().cloneDeep(t),this.$emit("input",this.curVal),this.$emit("change",this.curVal))}},closeCreateFrameDialog(){this.$emit("close")},CreateForm(e){if(!e)return;console.log("item",e);let t="",o="";e&&e.remote_create&&(t=e.remote_create.event||"",o=e.remote_create.operation_id||"",e.remote_create.operation_name?this.createDialogTitle=e.remote_create.operation_name:this.createDialogTitle=zj.z("创建","c.create"),console.log("this.container",this.container),console.log("this.row",this.row),c().each(e.remote_create.fields,e=>{if(-1==e.source_field.indexOf("."))this.GlobalVar[e.target_field]=this.formData[e.source_field];else{let t=e.source_field.split(".");console.log("this.formData[source_field[0]]",this.formData[t[0]]),console.log("this.rowIndex",this.rowIndex),console.log("this.formData[source_field[0]][this.row.rowIndex]",this.formData[t[0]][this.rowIndex]),console.log("source_field[1]",t[1]),console.log("this.formData[source_field[0]][this.row.rowIndex][source_field[1]]",this.formData[t[0]][this.rowIndex][t[1]]),this.formData[t[0]]&&this.formData[t[0]].length>0&&(this.GlobalVar[e.target_field]=this.formData[t[0]][this.rowIndex][t[1]])}}),this.GlobalVar.postMessageCustomId=this.postMessageCustomId,this.$bpm&&this.$bpm.curFormId&&(this.GlobalVar.FORM_ID=this.$bpm.curFormId));const r=c().get(this.orgInfo,"project_id","");let i=`/public/bpm3/app/table.html?form_name=${e.id||e.form||""}&is_mirco_app=1&no_cache=1&hidden_form_title=1&form_type=${c().toLower(e.type)||""}&project_id=${r}&page_level=${zj.pageParam().page_level||""}`;t&&(i+=`&event=${t}`),o&&(i+=`&operation_id=${o}`),i+="#/create",this.createFrameUrl=i,this.createDialogVisible=!0},toFormDetailPage(e){let t=e.form_id;this.detailDialogTtile=e.form_title;let o=this.ExternFormDefMap[e.form_def_id];const r=c().get(this.orgInfo,"project_id","");let i=`/public/bpm3/app/table.html?form_name=${e.form_def_id||""}&is_mirco_app=1&hidden_form_title=1&form_type=${c().toLower(o.type)}&project_id=${r}&page_level=${zj.pageParam().page_level||"project"}&form_id=${t}#/detail`;"dialog"==this.fieldConf.style.detail_ui_type?(this.detailFrameUrl=i,this.detailDialogVisible=!0):window.open(i,"_blank")},getCurVal(e){let t=c().cloneDeep(e);console.log("arr",t),t&&c().isArray(t)&&t.length?this.curVal=t:this.curVal=[]},getTitleStyle(e){let t=this.fieldConf.range_remote||[],o=c().get(t[e],"range_display.title");return{fontSize:c().get(o,"size",16)+"px",color:c().get(o,"color","#333")}},geFieldStyle(e,t){let o=this.fieldConf.rangeRemote||[],r=c().get(o[e],"range_display.fields"),i=c().keyBy(r,"field"),a=c().get(i,t);return{fontSize:c().get(a,"size",12)+"px",color:c().get(a,"color","#949494")}},getLinkDialogTableColumns(e){const t=this.rangeRemote[e]||{},o=this.optionListDef[e]||this.ExternFormDefMap[t.form]||{},r=c().get(o,"elements",[]);return c().keyBy(r,"id"),console.log("getLinkDialogTableColumns——elements",r),c().chain(r).map(e=>({prop:e.id,label:e.name,fieldConf:e}))},hanldeTabClick(e){console.log(e)},handleChange(e){console.log(val),this.$emit("input",e),this.$emit("change",e)},setDisabled(e){const t=this.allChecked.length;return!this.allChecked.includes(e)&&t>=this.maxCount&&this.maxCount>0},async getExternFormDef(){let e=this.keyword,t=c().get(this.fieldConf,"id");const o={q:e};console.log("getExternFormDef_this.orgInfo",this.orgInfo);let r=await d.A.assistField.selectFromMulFormSearchOpts(this.$bpm,{formDefId:this.formDefId,fieldDefId:t,orgInfo:this.orgInfo,isDm:this.dm},o);if(r.data&&r.data.data&&r.data.data.items){let e={};c().each(r.data.data.items,t=>{e[t.definition.form.id]=t.definition.form}),this.ExternFormDefMap=e}console.log("this.ExternFormDefMap",this.ExternFormDefMap)},async getFormsData(e){let t=c().cloneDeep(this.value);if(!e&&(c().isNil(t)||!t||!c().isArray(t)))return;let o=e||this.allChecked,r=c().get(this.fieldConf,"id");const i=await d.A.assistField.selectFromMulFormListTitle(this.$bpm,{formDefId:this.formDefId,fieldDefId:r,orgInfo:this.orgInfo,isDm:this.dm},o);if(i.data&&i.data.data&&i.data.data.items){let e={};c().each(i.data.data.items,t=>{c().each(t.data,o=>{console.log("dataItem",o),e[o.form_id]=c().cloneDeep(o),e[o.form_id].form_def_id=t.definition.form.id})}),this.FormDataMap=e;let t={};return c().each(i.data.data.items,e=>{t[e.definition.form.id]=e.definition.form}),this.ExternFormDefMap=t,i.data.data.items}console.log("getFormsDataRes",i)},inputSearch(){this.showSearchBtn||this.throttleSearch()},async search(){let e=this.keyword,t=c().get(this.fieldConf,"id");const o={q:e};if(this.getSelectFields){let e=this.getSelectFields();e&&"{}"!==JSON.stringify(e)&&(o.fields=e)}let r=await d.A.assistField.selectFromMulFormSearchOpts(this.$bpm,{formDefId:this.formDefId,fieldDefId:t,orgInfo:this.orgInfo,isDm:this.dm},o);console.log("res",r);let i=c().get(r.data,"data.items");this.optionListDef=c().map(i,e=>e.definition.form);let a=this.transformOptions(i);console.log(a),this.optionListArr=a},transformOptions(e){return console.log(e),e.map(e=>{let t=c().get(e,"definition.form.elements",[]),o=c().keyBy(t,"id"),r=c().map(e.data,e=>({title:e.title,id:e.form_id,form_id:e.form_id,f_fields:e.f_fields,fields:c().map(e.f_fields,(e,t)=>({key:t,name:o[t]&&o[t].name,value:e}))}));return{form_def_id:c().get(e,"definition.form.id"),form_title:c().get(e,"definition.form.name"),options:r}})},onHide(){this.opened=!1},onRelFormDialogOpen(){if(this.rangeRemote&&this.rangeRemote.length>0&&(this.activeTab=this.rangeRemote[0].form+"0"),this.dialogVal=this.rangeRemote.map(e=>{const t=this.curVal.filter(t=>t.form_def_id===e.form);return{form_def_id:e.form,form_ids:t.map(e=>e.form_id||e.id)}}),this.selectOptions){let e=this.selectOptions();if(console.log("linkOptions: ",e),e&&e.length)return void(this.formList=this.transformOptions(e))}this.search()},toRefOpen(){this.opened=!0},toggleCollapse(e){const t=e.form_id,o=this.collapsedKeys.indexOf(t);o>-1?this.collapsedKeys.splice(o,1):this.collapsedKeys.push(t)},onSubmit(){let e=[];this.dialogVal.forEach((t,o)=>{const r=t.form_def_id;t.form_ids.forEach(t=>{const i=this.curVal.find(e=>e.form_id===t);if(i)e.push(i);else{const i=this.optionListArr[o];if(i&&i.options){const o=i.options.find(e=>e.id===t);let a={form_title:o.title,form_id:o.id,form_def_id:r},n=this.ExternFormCreateConfDefMap[a.form_def_id];n&&n.fields&&c().each(n.fields,e=>{e.is_store&&(a[e.target_field]=o.f_fields[e.target_field])}),o&&(e.length<this.maxCount||!this.maxCount)&&e.push(a)}}})}),this.curVal=e,this.$emit("input",this.curVal),this.$emit("change",this.curVal),this.opened=!1},removeForm(e){this.$confirm(this.$z("确定删除该项吗?","c.confirm_delete"),this.$z("提示","c.tips"),{confirmButtonText:this.$z("确定","c.confirm"),cancelButtonText:this.$z("取消","c.cancel"),type:"warning"}).then(()=>{this.curVal.splice(e,1),this.$emit("input",this.curVal),this.$emit("change",this.curVal),this.$message({type:"success",message:this.$z("删除成功!","c.delete_success")})}).catch(()=>{})}}},g=(0,p.A)(h,s,[],!1,null,null,null);g.options.__file="components/lib/bpmExternalFormLink/src/part/editor.vue";var v=g.exports,y=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("span",{staticClass:"external-form-link-view"},[o("external-form-link-editor",{attrs:{value:e.value,fieldConf:e.fieldConf,formName:e.formName,formDefId:e.formName,orgInfo:e.orgInfo,row:e.row,uiType:e.uiType,readonly:!0}})],1)};y._withStripped=!0;var b={components:{ExternalFormLinkEditor:v},props:["value","fieldConf","row","uiType","formName","orgInfo"]},x=(0,p.A)(b,y,[],!1,null,null,null);x.options.__file="components/lib/bpmExternalFormLink/src/part/reader.vue";var w=x.exports,C={name:"BpmExternalFormLink",components:{editorComponent:v,readerComponent:w},props:{value:{type:[String,Array],default(){return""}},fieldConf:{type:Object,default(){return{}}},container:{type:Object,default(){return{}}},row:{type:Object,default(){return{}}},rowIndex:{type:Number,default(){return 0}},mode:{type:String,default(){return"view"}},uiType:{type:String,default(){return"default"}},orgInfo:{type:Object},formName:{type:String},isMultiple:{type:Boolean,default(){return!0}}},data(){return{curVal:[]}},computed:{curComponent(){return"view"==this.mode?w:v}},watch:{value(e){console.log("SelectFormMulForm_value",this.value),this.curVal=e}},mounted(){this.curVal=this.value},methods:{transValue(e){if(!e||!_.isArray(e))return[];let t=[];return this.val.forEach(e=>{t.push(...e.form_ids)}),t},handleChange(e){this.$emit("input",e),this.$emit("change",e)}}},D=i(5072),F=i.n(D),k=i(7825),$=i.n(k),I=i(7659),S=i.n(I),E=i(5056),T=i.n(E),V=i(540),M=i.n(V),O=i(1113),L=i.n(O),z=i(5831),j={};j.styleTagTransform=L(),j.setAttributes=T(),j.insert=S().bind(null,"head"),j.domAPI=$(),j.insertStyleElement=M(),F()(z.A,j),z.A&&z.A.locals&&z.A.locals;var A=(0,p.A)(C,n,[],!1,null,null,null);A.options.__file="components/lib/bpmExternalFormLink/src/main.vue";var N=A.exports;N.install=function(e){e.component(N.name,N)};var P=N;return a}()});
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("lodash"),require("qs")):"function"==typeof define&&define.amd?define(["lodash","qs"],t):"object"==typeof exports?exports.bpm2=t(require("lodash"),require("qs")):e.bpm2=t(e.lodash,e.qs)}(self,function(e,t){return function(){"use strict";var o={5281:function(e,t,o){o.d(t,{A:function(){return m}});var r=o(9795),i=o(6773),a=o.n(i),n=class{constructor(e,t={}){this._fnBatchLoad=e,this._options=t,this._queue=[]}async load(e){let t=await this.loads(e);return a().get(t,"0")}loads(...e){return new Promise((t,o)=>{this._queue.push({keys:e,resolve:t,reject:o}),1==this._queue.length&&this.nextTick(()=>{this.process()})})}nextTick(e){setTimeout(e,0)}process(){let e=this._queue;this._queue=[];let t={};a().each(e,e=>{a().each(e.keys,e=>t[e]=null)});let o=a().keys(t);this._fnBatchLoad(o).then(r=>{a().each(o,(e,o)=>{t[e]=r[o]}),a().each(e,({keys:e,resolve:o})=>{o(a().map(e,e=>t[e]))})}).catch(t=>{a().each(e,({reject:e})=>e(t))})}},s=o(5360),l=o.n(s);const c=async(e,t,o)=>{if(t.setNetworking(!0),t.netHeader&&(e.headers={common:t.netHeader}),e.params=_.merge({},e.params,o),t.env.ignore_levels&&_.set(e.params,"ignore_levels",!0),(0,r.Fr)()){let t=zj.utils.pageParam().token;e.params=_.merge({token:t,platform:"phone"},e.params)}e.isSilentOnErr=e=>{let t=_.get(e,"data.result");return t>=19e6||t<=19999999};let i=_.cloneDeep(e);if(i.can_custom_org_params){let e=_.cloneDeep(_.get(t,"orgInfo",{}));console.log("bpm3_orgInfo",e),e.custom_page_level&&(i.params.page_level=e.custom_page_level),e.custom_group_id&&(i.params.group_id=e.custom_group_id),e.custom_team_id&&(i.params.team_id=e.custom_team_id),e.custom_project_id&&(i.params.project_id=e.custom_project_id)}console.log("bpm3_orgInfo_reqArgs",i);let a=await zj.net.request(i);return t.setNetworking(!1),a},d={},f={};var m={assistSelectEntranceForm:{getListDefinition(e,{formDefId:t,fieldDefId:o,orgInfo:r,isDm:i}){return c({url:`/app_flow/v1/papi/assist_select_entrance_form/${t}/${o}/list_definition/`,method:"GET"},e,r)},getOptions(e,{formDefId:t,fieldDefId:o,orgInfo:r,isDm:i},a){return c({url:`/app_flow/v1/papi/assist_select_entrance_form/${t}/${o}/list_search/`,method:"GET",params:a},e,r)},getListSelected(e,{formDefId:t,fieldDefId:o,orgInfo:r,isDm:i},a){return c({url:`/app_flow/v1/papi/assist_select_entrance_form/${t}/${o}/list_selected/`,method:"GET",params:a},e,r)}},assistField:{getBatchLoader(e,{formDefId:t,fieldDefId:o,orgInfo:r,uniqueId:i}){const a=`${t}/${o}`,s=d[a]||new n(async a=>{let n=`/app_flow/v1/papi/assist_field/${t}/${o}/list_title/`;const s=await c({url:n,method:"GET",params:{values:JSON.stringify(a)}},e,r),l=_.get(s,"data.data.data",{});let d=[];return _.map(a,e=>{i?(e=JSON.parse(e),e=_.get(e,`${i}`),d=_.concat(d,l[e])):d=_.concat(d,l[e])}),d});return d[a]=s,s},getTitle(e,{formDefId:t,fieldDefId:o,orgInfo:r,isDm:i},a){return c({url:`/app_flow/v1/papi/assist_field/${t}/${o}/list_title/`,method:"GET",params:{values:JSON.stringify(a)}},e,r)},async searchSelectOpts(e,{formDefId:t,fieldDefId:o,orgInfo:r,isDm:i},a={},n=""){n&&(a.q=n);let s=i?`/app_flow/v1/papi/dm/assist_field/${t}/${o}/search_title/`:`/app_flow/v1/papi/assist_field/${t}/${o}/search_title/`,l=`${t}/${o}/${n}/${JSON.stringify(r)}/${JSON.stringify(a)}`,d={};return f[l]&&"loading"==f[l]?(console.log("有缓存,返回"),await this.waitCacheMapData(l)):(!f[l]||(new Date).getTime()-f[l].last_time>6e4?(f[l]="loading",d=await c({url:s,method:i?"GET":"POST",data:a,can_custom_org_params:!0},e,r),f[l]={last_time:(new Date).getTime(),result:d}):(console.log("有缓存"),f[l].result&&(d=f[l].result)),d)},waitCacheMapData(e){return new Promise(t=>{let o=setInterval(()=>{f[e]&&"loading"!=f[e]&&f[e].result&&(clearInterval(o),t(f[e].result))},100)})},async selectFromMulFormSearchOpts(e,{formDefId:t,fieldDefId:o,orgInfo:r,isDm:i},a={},n=""){n&&(a.q=n);let s=i?`/app_flow/v1/papi/dm/assist_field/select_form_mul_form/${t}/${o}/search_title/`:`/app_flow/v1/papi/assist_field/select_form_mul_form/${t}/${o}/search_title/`,l=`select_form_mul_form_search_${t}/${o}/${n}/${JSON.stringify(r)}/${JSON.stringify(a)}`,d={};return f[l]&&"loading"==f[l]?(console.log("有缓存,返回"),await this.waitCacheMapData(l)):(!f[l]||(new Date).getTime()-f[l].last_time>6e4?(f[l]="loading",d=await c({url:s,method:"GET",params:a},e,r),f[l]={last_time:(new Date).getTime(),result:d}):(console.log("有缓存"),f[l].result&&(d=f[l].result)),d)},selectFromMulFormListTitleLoader(e,{formDefId:t,fieldDefId:o,orgInfo:r,isDm:i}){const a=`${t}/${o}`,s=d[a]||new n(async a=>{let n=i?`/app_flow/v1/papi/dm/assist_field/select_form_mul_form/${t}/${o}/list_title/`:`/app_flow/v1/papi/assist_field/select_form_mul_form/${t}/${o}/list_title/`;const s=await c({url:n,method:"GET",params:{values:JSON.stringify(a)}},e,r),l=_.get(s.data,"data.items",[]),d={};l.forEach(e=>{Object.keys(e.data).forEach(t=>{let o=e.data[t];d[t]={form_def_id:_.get(e,"definition.form.id"),form_title:_.get(e,"definition.form.name"),label:o}})});let f=[];return a.forEach(e=>{f.push(d[e])}),f});return d[a]=s,s},async selectFromMulFormListTitle(e,{formDefId:t,fieldDefId:o,orgInfo:r,isDm:i},a){let n=i?`/app_flow/v1/papi/dm/assist_field/select_form_mul_form/${t}/${o}/list_title/`:`/app_flow/v1/papi/assist_field/select_form_mul_form/${t}/${o}/list_title/`,s=`select_form_mul_form_list_title_${t}/${o}}/${JSON.stringify(r)}/${JSON.stringify(a)}`,l={};return f[s]&&"loading"==f[s]?(console.log("有缓存,返回"),await this.waitCacheMapData(s)):(!f[s]||(new Date).getTime()-f[s].last_time>6e4?(f[s]="loading",l=await c({url:n,method:"GET",params:{values:JSON.stringify(a)}},e,r),f[s]={last_time:(new Date).getTime(),result:l}):(console.log("有缓存"),f[s].result&&(l=f[s].result)),l)}},assistTreeField:{searchSelectOpts(e,{formDefId:t,fieldDefId:o,orgInfo:r,isDm:i},a={},n=""){return n&&(a.q=n),c({url:i?`/app_flow/v1/papi/dm/assist_tree_field/${t}/${o}/search_title/`:`/app_flow/v1/papi/assist_tree_field/${t}/${o}/search_title/`,method:"GET",params:a,can_custom_org_params:!0},e,r)}},assistUserTaskCC:{searchSelectOpts(e,{formDefId:t,node:o,orgInfo:r,isDm:i},a={},n=""){return n&&(a.q=n),c({url:`/app_flow/v1/papi/assist_user_task_cc/${t}/${o}/search_title/`,method:"GET",params:a},e,r)}},OCR:{getCreatedTaskList(e){return zj.net.w.noapi({url:"/base_srv_module/v2/gapi/task/async_notify_list",method:"POST",data:l().stringify({group_id:zj.pageParam().group_id||0,file_md5:e})})},getTaskId(e){return zj.net.w.noapi({url:"/base_srv_module/v2/gapi/task/async_notify_submit",method:"POST",data:l().stringify({group_id:zj.pageParam().group_id||0,name:"OCR识别MD5_"+e,vendor_code:"csmart",enable_notify:0,task_type:1,creator:zj.app.accessInfo.user_id,file_md5:e})})},getOcrResult(e){return zj.net.w.noapi({url:"/base_srv_module/v2/gapi/task/detail",method:"POST",data:l().stringify(e)})},ocrCreateForm(e,t){return zj.net.w.noapi.json({url:"/app_flow/v1/papi/ocr_create/submit",method:"POST",params:t,data:e})}}}},9795:function(e,t,o){function r(){for(var e=["iphone","ipod","ipad","android","mobile","blackberry","webos","incognito","webmate","bada","nokia","lg","ucweb","skyfire"],t=navigator.userAgent.toLowerCase(),o=!1,r=0,i=e.length;r<i;r++)-1!=t.indexOf(e[r])&&(o=!0);return o}o.d(t,{Fr:function(){return r}}),o(6773),o(5360)},5366:function(e,t,o){var r=o(1601),i=o.n(r),a=o(6314),n=o.n(a)()(i());n.push([e.id,".select-from-form-dialog {\n .search-box{\n display: flex;\n margin-top: -10px;\n margin-bottom: 10px;\n .input-with-select{\n margin-right: 10px;\n }\n }\n}\n\n\n\n.select-from-form-editor {\n \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-top: 5px;\n margin-bottom: 5px;\n margin-left: 24px;\n font-size: 12px;\n color: #949494;\n }\n}\n",""]),t.A=n},5831:function(e,t,o){var r=o(1601),i=o.n(r),a=o(6314),n=o.n(a),s=o(5366),l=n()(i());l.i(s.A),l.push([e.id,"\n",""]),t.A=l},6314:function(e){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var o="",r=void 0!==t[5];return t[4]&&(o+="@supports (".concat(t[4],") {")),t[2]&&(o+="@media ".concat(t[2]," {")),r&&(o+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),o+=e(t),r&&(o+="}"),t[2]&&(o+="}"),t[4]&&(o+="}"),o}).join("")},t.i=function(e,o,r,i,a){"string"==typeof e&&(e=[[null,e,void 0]]);var n={};if(r)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(n[l]=!0)}for(var c=0;c<e.length;c++){var d=[].concat(e[c]);r&&n[d[0]]||(void 0!==a&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=a),o&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=o):d[2]=o),i&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=i):d[4]="".concat(i)),t.push(d))}},t}},1601:function(e){e.exports=function(e){return e[1]}},5072:function(e){var t=[];function o(e){for(var o=-1,r=0;r<t.length;r++)if(t[r].identifier===e){o=r;break}return o}function r(e,r){for(var a={},n=[],s=0;s<e.length;s++){var l=e[s],c=r.base?l[0]+r.base:l[0],d=a[c]||0,f="".concat(c," ").concat(d);a[c]=d+1;var m=o(f),p={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==m)t[m].references++,t[m].updater(p);else{var u=i(p,r);r.byIndex=s,t.splice(s,0,{identifier:f,updater:u,references:1})}n.push(f)}return n}function i(e,t){var o=t.domAPI(t);return o.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;o.update(e=t)}else o.remove()}}e.exports=function(e,i){var a=r(e=e||[],i=i||{});return function(e){e=e||[];for(var n=0;n<a.length;n++){var s=o(a[n]);t[s].references--}for(var l=r(e,i),c=0;c<a.length;c++){var d=o(a[c]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}a=l}}},7659:function(e){var t={};e.exports=function(e,o){var r=function(e){if(void 0===t[e]){var o=document.querySelector(e);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(e){o=null}t[e]=o}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(o)}},540:function(e){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,o){e.exports=function(e){var t=o.nc;t&&e.setAttribute("nonce",t)}},7825:function(e){e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(o){!function(e,t,o){var r="";o.supports&&(r+="@supports (".concat(o.supports,") {")),o.media&&(r+="@media ".concat(o.media," {"));var i=void 0!==o.layer;i&&(r+="@layer".concat(o.layer.length>0?" ".concat(o.layer):""," {")),r+=o.css,i&&(r+="}"),o.media&&(r+="}"),o.supports&&(r+="}");var a=o.sourceMap;a&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,o)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},1113:function(e){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,o){function r(e,t,o,r,i,a,n,s){var l,c="function"==typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=o,c._compiled=!0),r&&(c.functional=!0),a&&(c._scopeId="data-v-"+a),n?(l=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__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(n)},c._ssrRegister=l):i&&(l=s?function(){i.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:i),l)if(c.functional){c._injectStyles=l;var d=c.render;c.render=function(e,t){return l.call(t),d(e,t)}}else{var f=c.beforeCreate;c.beforeCreate=f?[].concat(f,l):[l]}return{exports:e,options:c}}o.d(t,{A:function(){return r}})},6773:function(t){t.exports=e},5360:function(e){e.exports=t}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var a=r[e]={id:e,exports:{}};return o[e](a,a.exports,i),a.exports}i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,{a:t}),t},i.d=function(e,t){for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nc=void 0;var a={};i.r(a),i.d(a,{default:function(){return P}});var n=function(){var e=this,t=e.$createElement;return(e._self._c||t)(e.curComponent,e._b({tag:"component",staticClass:"bpm-external-form-link",attrs:{fieldConf:e.fieldConf,container:e.container,row:e.row,rowIndex:e.rowIndex,mode:e.mode,formName:e.formName,orgInfo:e.orgInfo,uiType:e.uiType,isMultiple:!0},on:{change:e.handleChange},model:{value:e.curVal,callback:function(t){e.curVal=t},expression:"curVal"}},"component",e.$attrs,!1))};n._withStripped=!0;var s=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"external-from-link-editor"},[o("div",["title"==e.componetUiType?[o("ul",{staticClass:"external-from-link-list",staticStyle:{"list-style":"none"}},e._l(e.curVal,function(t,r){return o("li",{key:t.form_id,staticClass:"external-from-link-list-item"},[o("span",{on:{click:function(o){return e.toFormDetailPage(t)}}},[o("i",{staticClass:"el-icon-tickets",staticStyle:{"margin-right":"5px"}}),o("span",[e._v(e._s(t.form_title))])]),e._v(" "),e.readonly?e._e():o("i",{staticClass:"el-icon-close del-btn",on:{click:function(t){return e.removeForm(r)}}})])}),0)]:"card"==e.componetUiType?[o("div",{staticClass:"external-from-link-card"},e._l(e.curVal,function(t,r){return o("el-card",{key:t.form_id,staticClass:"external-from-link-card-item",attrs:{"body-style":e.collapsedKeys.includes(t.form_id)?{padding:"0px",display:"none"}:{}}},[o("div",{staticClass:"clearfix",staticStyle:{cursor:"pointer"},attrs:{slot:"header"},on:{click:function(o){return e.toggleCollapse(t)}},slot:"header"},[o("i",{class:e.collapsedKeys.includes(t.form_id)?"el-icon-arrow-right":"el-icon-arrow-down",staticStyle:{"margin-right":"5px"}}),e._v(" "),o("span",{on:{click:function(o){return o.stopPropagation(),e.toFormDetailPage(t)}}},[o("i",{staticClass:"el-icon-tickets",staticStyle:{"margin-right":"5px"}}),o("span",[e._v(e._s(t.form_title))])]),e._v(" "),e.readonly?e._e():o("el-button",{staticStyle:{float:"right",padding:"3px 0"},attrs:{type:"text"},on:{click:function(t){return t.stopPropagation(),e.removeForm(r)}}},[o("i",{staticClass:"el-icon-close del-btn"})])],1),e._v(" "),o("div",{directives:[{name:"show",rawName:"v-show",value:!e.collapsedKeys.includes(t.form_id),expression:"!collapsedKeys.includes(item.form_id)"}],staticClass:"external-from-link-card-item-content"},[o("extern-form-content",{attrs:{item:t,container:e.container,ExternFormDef:e.ExternFormDefMap[t.form_def_id],ExternFormCreateConfDef:e.ExternFormCreateConfDefMap[t.form_def_id]}})],1)])}),1)]:"list"==e.componetUiType?[o("el-table",{staticStyle:{width:"100%"},attrs:{data:e.curVal,border:"",size:"small"}},[o("el-table-column",{attrs:{label:e.$z("标题","c.title"),"min-width":"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[o("span",{staticStyle:{cursor:"pointer",color:"#409EFF"},on:{click:function(o){return e.toFormDetailPage(t.row)}}},[o("i",{staticClass:"el-icon-tickets",staticStyle:{"margin-right":"5px"}}),e._v(e._s(t.row.form_title||t.row.title)+"\n ")])]}}])}),e._v(" "),e._l(e.tableColumns,function(t){return o("el-table-column",{key:t.prop,attrs:{prop:t.prop,label:t.label,"show-overflow-tooltip":"","min-width":"120"},scopedSlots:e._u([{key:"default",fn:function(r){return[o("bpm-field",{ref:"externFormField_"+r.$index+"_"+t.prop,refInFor:!0,attrs:{type:t.fieldConf.type,fieldConf:t.fieldConf,formName:r.row.form_def_id,mode:"view",uiType:"form",container:e.container},model:{value:r.row[t.prop],callback:function(o){e.$set(r.row,t.prop,o)},expression:"scope.row[col.prop]"}})]}}],null,!0)})}),e._v(" "),e.readonly?e._e():o("el-table-column",{attrs:{label:e.$z("操作","c.operation"),width:"100",fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(t){return[o("el-button",{staticStyle:{color:"#F56C6C"},attrs:{type:"text"},on:{click:function(o){return e.removeForm(t.$index)}}},[e._v(e._s(e.$z("移除","c.remove")))])]}}],null,!1,1343955411)})],2)]:e._e(),e._v(" "),e.ExternFormList.length>1?[o("el-dropdown",{staticStyle:{"margin-right":"10px"},on:{command:e.CreateForm}},[o("el-button",{directives:[{name:"show",rawName:"v-show",value:e.canCreateForm,expression:"canCreateForm"}],attrs:{size:"mini",icon:"el-icon-plus"}},[e._v(e._s(e.$z("创建","c.create")))]),e._v(" "),o("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},e._l(e.ExternFormList,function(t){return o("el-dropdown-item",{key:t.form,attrs:{command:t}},[e._v(e._s(t.name))])}),1)],1)]:[o("el-button",{directives:[{name:"show",rawName:"v-show",value:e.canCreateForm,expression:"canCreateForm"}],attrs:{size:"mini",icon:"el-icon-plus"},on:{click:function(t){return e.CreateForm(e.ExternFormList[0])}}},[e._v(e._s(e.$z("创建","c.create")))])],e._v(" "),e.canRefForm?o("el-button",{attrs:{size:"mini",icon:"el-icon-connection"},on:{click:e.toRefOpen}},[e._v(e._s(e.$z("关联","c.link_2")))]):e._e()],2),e._v(" "),o("el-dialog",{attrs:{"append-to-body":!0,visible:e.createDialogVisible,"close-on-click-modal":!1,title:e.createDialogTitle,width:"80%",top:"5vh"},on:{"update:visible":function(t){e.createDialogVisible=t}}},[o("iframe",{ref:"createFrame",staticClass:"create-form-iframe",attrs:{src:e.createFrameUrl,frameborder:"0",width:"100%",height:"600px"},on:{load:e.createFrameLoad}})]),e._v(" "),o("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}}},[o("iframe",{ref:"detailFrame",staticClass:"detail-form-iframe",attrs:{src:e.detailFrameUrl,frameborder:"0",width:"100%",height:"600px"}})]),e._v(" "),o("el-dialog",{attrs:{"custom-class":"link-form-dialog","append-to-body":!0,visible:e.opened,"close-on-click-modal":!1,"before-close":e.onHide,title:e.fieldConf.name,width:"40%"},on:{"update:visible":function(t){e.opened=t},open:e.onRelFormDialogOpen}},[o("div",{staticClass:"search-box"},[o("el-input",{staticClass:"input-with-select",attrs:{placeholder:e.$z("只展示前100条数据,通过搜索获取更多","b2.common.see_100_data")},on:{input:e.inputSearch},model:{value:e.keyword,callback:function(t){e.keyword=t},expression:"keyword"}}),e._v(" "),e.showSearchBtn?[o("el-button",{attrs:{type:"primary"},on:{click:e.throttleSearch}},[e._v(e._s(e.$z("搜索","c.search")))]),e._v(" "),o("el-button",{on:{click:e.resetKeyword}},[e._v(e._s(e.$z("重置","c.reset")))])]:e._e()],2),e._v(" "),o("el-tabs",{staticStyle:{"margin-top":"20px"},attrs:{type:"card","tab-position":"top"},on:{"tab-click":e.hanldeTabClick},model:{value:e.activeTab,callback:function(t){e.activeTab=t},expression:"activeTab"}},e._l(e.rangeRemote,function(t,r){return o("el-tab-pane",{key:t.form+r,attrs:{label:e.optionListArr[r]&&e.optionListArr[r].form_title||""+e.$z("表单","c.form")+(r+1),name:t.form+r}},[e.optionListArr[r]&&e.optionListArr[r].options.length?o("div",{staticClass:"bpm-select-from-form-box"},["title"!==t.range_display.ui_style&&t.range_display.ui_style?"table"===t.range_display.ui_style?[o("el-checkbox-group",{model:{value:e.dialogVal[r].form_ids,callback:function(t){e.$set(e.dialogVal[r],"form_ids",t)},expression:"dialogVal[index].form_ids"}},[o("el-table",{staticStyle:{width:"100%"},attrs:{data:e.optionListArr[r].options,border:"",size:"small"}},[o("el-table-column",{attrs:{width:"35",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[o("el-checkbox",{attrs:{label:t.row.id,disabled:e.setDisabled(t.row.id)}})]}}],null,!0)}),e._v(" "),o("el-table-column",{attrs:{label:e.$z("标题","c.title"),"min-width":"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[o("span",[e._v(e._s(t.row.title))])]}}],null,!0)}),e._v(" "),e._l(e.getLinkDialogTableColumns(r),function(t){return o("el-table-column",{key:t.prop,attrs:{prop:t.prop,label:t.label,"show-overflow-tooltip":"","min-width":"120"},scopedSlots:e._u([{key:"default",fn:function(i){return[o("bpm-field",{ref:"externOptionField_"+r+"_"+i.$index+"_"+t.prop,refInFor:!0,attrs:{type:t.fieldConf.type,fieldConf:t.fieldConf,formName:e.optionListArr[r].form_def_id,mode:"view",uiType:"form",container:e.container},model:{value:i.row.f_fields[t.prop],callback:function(o){e.$set(i.row.f_fields,t.prop,o)},expression:"scope.row.f_fields[col.prop]"}})]}}],null,!0)})})],2)],1)]:e._e():[o("el-checkbox-group",{model:{value:e.dialogVal[r].form_ids,callback:function(t){e.$set(e.dialogVal[r],"form_ids",t)},expression:"dialogVal[index].form_ids"}},e._l(e.optionListArr[r].options,function(t){return o("div",{key:t.id,staticClass:"form-item"},[o("div",{style:e.getTitleStyle(r)},[o("el-checkbox",{key:t.id,attrs:{label:t.id,disabled:e.setDisabled(t.id)}},[e._v(e._s(t.title))])],1),e._v(" "),e._l(t.fields,function(t){return o("div",{key:t.key,staticClass:"subitem",style:e.geFieldStyle(r,t.key)},[e._v("\n "+e._s(t.name)+": "+e._s(t.value)+"\n ")])})],2)}),0)]],2):o("div",[e._v(e._s(e.$z("暂无数据","c.no_data")))])])}),1),e._v(" "),o("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[o("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v(e._s(e.$z("确定","c.confirm")))])],1)],1)],1)};s._withStripped=!0;var l=i(6773),c=i.n(l),d=i(5281),f=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("el-form",{staticClass:"external-form-content",attrs:{"label-width":"180px",inline:!1}},[o("el-form-item",{attrs:{label:e.$z("表单名称","c.form_name"),prop:"form_def_name"}},[o("span",[e._v(e._s(e.ExternFormDef.name))])]),e._v(" "),e._l(e.columns,function(t){return o("el-form-item",{directives:[{name:"show",rawName:"v-show",value:0==t.hidden,expression:"col.hidden == false"}],key:t.key,attrs:{label:t.label}},[o("bpm-field",e._b({ref:"externFormField",refInFor:!0,attrs:{type:t.fieldConf.type,fieldConf:t.fieldConf,formName:e.ExternFormDef.id,mode:"view",uiType:"form",container:e.container},model:{value:e.item[t.key],callback:function(o){e.$set(e.item,t.key,o)},expression:"item[col.key]"}},"bpm-field",e.$attrs,!1))],1)})],2)};f._withStripped=!0;var m={props:{item:{type:Object,default(){return{}}},ExternFormDef:{type:Object,default(){return{}}},ExternFormCreateConfDef:{type:Object,default(){return{}}},container:{type:Object,default(){return{}}}},watch:{item(e,t){e&&this.getColumns()}},computed:{},data(){return{columns:[]}},methods:{getColumns(){let e=[];console.log("this.ExternFormDef",this.ExternFormDef),console.log("this.ExternFormCreateConfDef.",this.ExternFormCreateConfDef),_.each(this.ExternFormCreateConfDef.fields,t=>{let o=_.cloneDeep(t),r=_.find(this.ExternFormDef.elements,e=>e.id==t.target_field);console.log("columns_fieldConf",r),r&&(o.key=t.target_field,o.label=r.name,o.fieldConf=r,e.push(o))}),console.log("_columns",e),this.columns=e}},mounted(){console.log("item",this.item),console.log("ExternFormDef",this.ExternFormDef),console.log("ExternFormCreateConfDef",this.ExternFormCreateConfDef),this.getColumns()}},p=i(4486),u=(0,p.A)(m,f,[],!1,null,null,null);u.options.__file="components/lib/bpmExternalFormLink/src/part/external_form_content.vue";var h={props:["value","fieldConf","row","rowIndex","formName","formDefId","orgInfo","dm","isMultiple","container","readonly","uiType"],components:{externFormContent:u.exports},inject:["getSelectFields","selectOptions"],computed:{showSearchBtn(){return c().get(this.fieldConf,"range_remote[0].range_display.show_search_btn",!1)},formData(){return this.container&&this.container.isSubForm?this.container.container.formData:this.container?this.container.formData:this.row&&this.row.f_fields?this.row.f_fields:this.row},minCount(){return c().get(this.fieldConf,"check.min_count")||0},maxCount(){return c().get(this.fieldConf,"check.max_count")||0},allChecked(){return(this.curVal||[]).map(e=>e.form_id)},canCreateForm(){return!(this.maxCount>0&&this.curVal.length>=this.maxCount||this.readonly)&&(this.fieldConf.enable_create_form||!1)},canRefForm(){return!(this.maxCount>0&&this.curVal.length>=this.maxCount||this.readonly)&&(this.fieldConf.enable_ref_form||!1)},rangeRemote(){return this.fieldConf.range_remote||[]},componetUiType(){return"table"==this.uiType?"title":this.fieldConf.style.ui_type},detailUiType(){return this.fieldConf.style.detail_ui_type},detailDialogWidth(){return this.fieldConf.style.dialog_width+"%"||0},tableColumns(){let e=[],t=new Set;return this.ExternFormList.forEach(o=>{let r=o.remote_create;console.log("createConf",r),console.log("formConfig.elements",o.elements),r&&r.fields&&o.elements&&r.fields.forEach(r=>{let i=r.target_field;if(!t.has(i)){let a=o.elements.find(e=>e.id===i);a&&r.is_store&&!r.hidden&&(t.add(i),e.push({prop:i,label:a.name,fieldConf:a}))}})}),e},ExternFormList(){return(this.fieldConf.range_remote||[]).map(e=>{let t=this.ExternFormDefMap[e.form];return this.ExternFormCreateConfDefMap[e.form]=e.remote_create,console.log("def",t),t?{...e,...t}:e})}},watch:{value:{handler(e){this.getCurVal(e)},deep:!0},curVal:{handler(e){e&&e.length>0&&this._getExternFormData()},deep:!0},createDialogVisible(e,t){e||clearInterval(this.set_global_var_interval_timer)}},data(){return{curVal:[],dialogVal:[],label:zj.z("未选择","c.not_selected"),formLabels:[],keyword:"",opened:!1,collapsedKeys:[],throttleSearch:c().throttle(c().bind(this.search,this),1500,{trailing:!0,leading:!1}),optionListArr:[],optionListDef:[],formList:[],ExternFormDefMap:{},ExternFormCreateConfDefMap:{},FormDataMap:{},createDialogVisible:!1,createFrameUrl:"",createDialogTitle:"",detailDialogVisible:!1,detailDialogTtile:"",detailFrameUrl:"",lastEmittedSnapshot:[],activeTab:"",set_global_var_interval_timer:null,get_forms_data_interval_timer:null,GlobalVar:{},postMessageCustomId:"bpm_external_form_link"+Math.random()}},mounted(){this.getCurVal(this.value),this.getExternFormDef(),this.watchExternFormChange()},created(){window.addEventListener("message",this.handlePostMessage,!1)},beforeDestroy(){clearInterval(this.set_global_var_interval_timer),clearInterval(this.get_forms_data_interval_timer),window.removeEventListener("message",this.handlePostMessage,!1)},methods:{resetKeyword(){this.keyword=""},formatFormData(e){let t=c().cloneDeep(this.FormDataMap[e]);if(!t)return{};console.log("_data",t);let o={form_title:t.title||t.form_title,form_id:t.form_id,form_def_id:t.form_def_id},r=this.ExternFormCreateConfDefMap[t.form_def_id];return console.log("_externFormCreateConfDef",r),r&&r.fields&&r.fields.length>0&&c().each(r.fields,e=>{e.is_store&&(o[e.target_field]=t.f_fields[e.target_field])}),console.log("_formData",o),o},async handleCreateFormSuccess(e){if(console.log("handleCreateFormSuccess_data",e),console.log("postMessageCustomId",this.postMessageCustomId),e.postMessageCustomId!=this.postMessageCustomId)return;console.log("内部表单新增,data",e),await this.getFormsData([e.form_id]);let t=this.formatFormData(e.form_id);console.log("内部表单新增,add_form_data",t),console.log("this.FormDataMap",this.FormDataMap),this.curVal.push(t),this.$emit("input",this.curVal),this.$emit("change",this.curVal),this.createDialogVisible=!1},handlePostMessage(e){if(console.log("Received message event:",e),console.log("Received message:",e.data),e.origin===location.origin)switch(e.data.type){case"bpm_create_success":this.handleCreateFormSuccess(e.data.data),clearInterval(this.set_global_var_interval_timer);break;case"bpm_create_form_close":this.createDialogVisible=!1,clearInterval(this.set_global_var_interval_timer);break;default:return}},createFrameLoad(){console.log("this.$refs",this.$refs),this.set_global_var_interval_timer&&clearInterval(this.set_global_var_interval_timer),this.set_global_var_interval_timer=setInterval(()=>this.sendPossMessageToSetGlobalVar(),1e3)},sendPossMessageToSetGlobalVar(){this.$refs.createFrame.contentWindow.postMessage({type:"setBPMGlobalVar",data:this.GlobalVar},"*")},watchExternFormChange(){if(!c().get(this.fieldConf,"enable_dynamic_update")||this.readonly)return;let e=c().get(this.fieldConf,"dynamic_update_conf")||{};console.log("dynamic_update_conf",e),"http"==e.protocol&&(this.get_forms_data_interval_timer&&clearInterval(this.get_forms_data_interval_timer),this.get_forms_data_interval_timer=setInterval(async()=>{this._getExternFormData()},e.polling_interval_time||1e4),console.log("this.get_forms_data_interval_timer",this.get_forms_data_interval_timer))},async _getExternFormData(){if(this.curVal&&this.curVal.length>0){await this.getFormsData();let e=c().cloneDeep(this.curVal);console.log("_curVal",e),e=e.map(e=>this.formatFormData(e.form_id));const t=c().orderBy(e,["form_id"],["asc"]);console.log("normalized",t),console.log("this.lastEmittedSnapshot",this.lastEmittedSnapshot),console.log("_.isEqual(normalized, this.lastEmittedSnapshot)",c().isEqual(t,this.lastEmittedSnapshot)),c().isEqual(t,this.lastEmittedSnapshot)||(this.curVal=t,this.lastEmittedSnapshot=c().cloneDeep(t),this.$emit("input",this.curVal),this.$emit("change",this.curVal))}},closeCreateFrameDialog(){this.$emit("close")},CreateForm(e){if(!e)return;console.log("item",e);let t="",o="";e&&e.remote_create&&(t=e.remote_create.event||"",o=e.remote_create.operation_id||"",e.remote_create.operation_name?this.createDialogTitle=e.remote_create.operation_name:this.createDialogTitle=zj.z("创建","c.create"),console.log("this.container",this.container),console.log("this.row",this.row),c().each(e.remote_create.fields,e=>{if(-1==e.source_field.indexOf("."))this.GlobalVar[e.target_field]=this.formData[e.source_field];else{let t=e.source_field.split(".");console.log("this.formData[source_field[0]]",this.formData[t[0]]),console.log("this.rowIndex",this.rowIndex),console.log("this.formData[source_field[0]][this.row.rowIndex]",this.formData[t[0]][this.rowIndex]),console.log("source_field[1]",t[1]),console.log("this.formData[source_field[0]][this.row.rowIndex][source_field[1]]",this.formData[t[0]][this.rowIndex][t[1]]),this.formData[t[0]]&&this.formData[t[0]].length>0&&(this.GlobalVar[e.target_field]=this.formData[t[0]][this.rowIndex][t[1]])}}),this.GlobalVar.postMessageCustomId=this.postMessageCustomId,this.$bpm&&this.$bpm.curFormId&&(this.GlobalVar.FORM_ID=this.$bpm.curFormId));const r=c().get(this.orgInfo,"project_id","");let i=`/public/bpm3/app/table.html?form_name=${e.id||e.form||""}&is_mirco_app=1&no_cache=1&hidden_form_title=1&form_type=${c().toLower(e.type)||""}&project_id=${r}&page_level=${zj.pageParam().page_level||""}`;t&&(i+=`&event=${t}`),o&&(i+=`&operation_id=${o}`),i+="#/create",this.createFrameUrl=i,this.createDialogVisible=!0},toFormDetailPage(e){let t=e.form_id;this.detailDialogTtile=e.form_title;let o=this.ExternFormDefMap[e.form_def_id];const r=c().get(this.orgInfo,"project_id","");let i=`/public/bpm3/app/table.html?form_name=${e.form_def_id||""}&is_mirco_app=1&hidden_form_title=1&form_type=${c().toLower(o.type)}&project_id=${r}&page_level=${zj.pageParam().page_level||"project"}&form_id=${t}#/detail`;"dialog"==this.fieldConf.style.detail_ui_type?(this.detailFrameUrl=i,this.detailDialogVisible=!0):window.open(i,"_blank")},getCurVal(e){let t=c().cloneDeep(e);console.log("arr",t),t&&c().isArray(t)&&t.length?this.curVal=t:this.curVal=[]},getTitleStyle(e){let t=this.fieldConf.range_remote||[],o=c().get(t[e],"range_display.title");return{fontSize:c().get(o,"size",16)+"px",color:c().get(o,"color","#333")}},geFieldStyle(e,t){let o=this.fieldConf.rangeRemote||[],r=c().get(o[e],"range_display.fields"),i=c().keyBy(r,"field"),a=c().get(i,t);return{fontSize:c().get(a,"size",12)+"px",color:c().get(a,"color","#949494")}},getLinkDialogTableColumns(e){const t=this.rangeRemote[e]||{},o=this.optionListDef[e]||this.ExternFormDefMap[t.form]||{},r=c().get(o,"elements",[]);return c().keyBy(r,"id"),console.log("getLinkDialogTableColumns——elements",r),c().chain(r).map(e=>({prop:e.id,label:e.name,fieldConf:e}))},hanldeTabClick(e){console.log(e)},handleChange(e){this.$emit("input",e),this.$emit("change",e)},setDisabled(e){const t=this.allChecked.length;return!this.allChecked.includes(e)&&t>=this.maxCount&&this.maxCount>0},async getExternFormDef(){let e=this.keyword,t=c().get(this.fieldConf,"id");const o={q:e};console.log("getExternFormDef_this.orgInfo",this.orgInfo);let r=await d.A.assistField.selectFromMulFormSearchOpts(this.$bpm,{formDefId:this.formDefId,fieldDefId:t,orgInfo:this.orgInfo,isDm:this.dm},o);if(r.data&&r.data.data&&r.data.data.items){let e={};c().each(r.data.data.items,t=>{e[t.definition.form.id]=t.definition.form}),this.ExternFormDefMap=e}console.log("this.ExternFormDefMap",this.ExternFormDefMap)},async getFormsData(e){let t=c().cloneDeep(this.value);if(!e&&(c().isNil(t)||!t||!c().isArray(t)))return;let o=e||this.allChecked,r=c().get(this.fieldConf,"id");const i=await d.A.assistField.selectFromMulFormListTitle(this.$bpm,{formDefId:this.formDefId,fieldDefId:r,orgInfo:this.orgInfo,isDm:this.dm},o);if(i.data&&i.data.data&&i.data.data.items){let e={};c().each(i.data.data.items,t=>{c().each(t.data,o=>{console.log("dataItem",o),e[o.form_id]=c().cloneDeep(o),e[o.form_id].form_def_id=t.definition.form.id})}),this.FormDataMap=e;let t={};return c().each(i.data.data.items,e=>{t[e.definition.form.id]=e.definition.form}),this.ExternFormDefMap=t,i.data.data.items}console.log("getFormsDataRes",i)},inputSearch(){this.showSearchBtn||this.throttleSearch()},async search(){let e=this.keyword,t=c().get(this.fieldConf,"id");const o={q:e};if(this.getSelectFields){let e=this.getSelectFields();e&&"{}"!==JSON.stringify(e)&&(o.fields=e)}let r=await d.A.assistField.selectFromMulFormSearchOpts(this.$bpm,{formDefId:this.formDefId,fieldDefId:t,orgInfo:this.orgInfo,isDm:this.dm},o);console.log("res",r);let i=c().get(r.data,"data.items");this.optionListDef=c().map(i,e=>e.definition.form);let a=this.transformOptions(i);console.log(a),this.optionListArr=a},transformOptions(e){return console.log(e),e.map(e=>{let t=c().get(e,"definition.form.elements",[]),o=c().keyBy(t,"id"),r=c().map(e.data,e=>({title:e.title,id:e.form_id,form_id:e.form_id,f_fields:e.f_fields,fields:c().map(e.f_fields,(e,t)=>({key:t,name:o[t]&&o[t].name,value:e}))}));return{form_def_id:c().get(e,"definition.form.id"),form_title:c().get(e,"definition.form.name"),options:r}})},onHide(){this.opened=!1},onRelFormDialogOpen(){if(this.rangeRemote&&this.rangeRemote.length>0&&(this.activeTab=this.rangeRemote[0].form+"0"),this.dialogVal=this.rangeRemote.map(e=>{const t=this.curVal.filter(t=>t.form_def_id===e.form);return{form_def_id:e.form,form_ids:t.map(e=>e.form_id||e.id)}}),this.selectOptions){let e=this.selectOptions();if(console.log("linkOptions: ",e),e&&e.length)return void(this.formList=this.transformOptions(e))}this.search()},toRefOpen(){this.opened=!0},toggleCollapse(e){const t=e.form_id,o=this.collapsedKeys.indexOf(t);o>-1?this.collapsedKeys.splice(o,1):this.collapsedKeys.push(t)},onSubmit(){let e=[];this.dialogVal.forEach((t,o)=>{const r=t.form_def_id;t.form_ids.forEach(t=>{const i=this.curVal.find(e=>e.form_id===t);if(i)e.push(i);else{const i=this.optionListArr[o];if(i&&i.options){const o=i.options.find(e=>e.id===t);let a={form_title:o.title,form_id:o.id,form_def_id:r},n=this.ExternFormCreateConfDefMap[a.form_def_id];n&&n.fields&&c().each(n.fields,e=>{e.is_store&&(a[e.target_field]=o.f_fields[e.target_field])}),o&&(e.length<this.maxCount||!this.maxCount)&&e.push(a)}}})}),this.curVal=e,this.$emit("input",this.curVal),this.$emit("change",this.curVal),this.opened=!1},removeForm(e){this.$confirm(this.$z("确定删除该项吗?","c.confirm_delete"),this.$z("提示","c.tips"),{confirmButtonText:this.$z("确定","c.confirm"),cancelButtonText:this.$z("取消","c.cancel"),type:"warning"}).then(()=>{this.curVal.splice(e,1),this.$emit("input",this.curVal),this.$emit("change",this.curVal),this.$message({type:"success",message:this.$z("删除成功!","c.delete_success")})}).catch(()=>{})}}},g=(0,p.A)(h,s,[],!1,null,null,null);g.options.__file="components/lib/bpmExternalFormLink/src/part/editor.vue";var v=g.exports,y=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("span",{staticClass:"external-form-link-view"},[o("external-form-link-editor",{attrs:{value:e.value,fieldConf:e.fieldConf,formName:e.formName,formDefId:e.formName,orgInfo:e.orgInfo,row:e.row,uiType:e.uiType,readonly:!0}})],1)};y._withStripped=!0;var b={components:{ExternalFormLinkEditor:v},props:["value","fieldConf","row","uiType","formName","orgInfo"]},w=(0,p.A)(b,y,[],!1,null,null,null);w.options.__file="components/lib/bpmExternalFormLink/src/part/reader.vue";var x=w.exports,C={name:"BpmExternalFormLink",components:{editorComponent:v,readerComponent:x},props:{value:{type:[String,Array],default(){return""}},fieldConf:{type:Object,default(){return{}}},container:{type:Object,default(){return{}}},row:{type:Object,default(){return{}}},rowIndex:{type:Number,default(){return 0}},mode:{type:String,default(){return"view"}},uiType:{type:String,default(){return"default"}},orgInfo:{type:Object},formName:{type:String},isMultiple:{type:Boolean,default(){return!0}}},data(){return{curVal:[]}},computed:{curComponent(){return"view"==this.mode?x:v}},watch:{value(e){console.log("SelectFormMulForm_value",this.value),this.curVal=e}},mounted(){this.curVal=this.value},methods:{transValue(e){if(!e||!_.isArray(e))return[];let t=[];return this.val.forEach(e=>{t.push(...e.form_ids)}),t},handleChange(e){this.$emit("input",e),this.$emit("change",e)}}},D=i(5072),F=i.n(D),$=i(7825),k=i.n($),I=i(7659),S=i.n(I),E=i(5056),T=i.n(E),V=i(540),O=i.n(V),M=i(1113),L=i.n(M),z=i(5831),j={};j.styleTagTransform=L(),j.setAttributes=T(),j.insert=S().bind(null,"head"),j.domAPI=k(),j.insertStyleElement=O(),F()(z.A,j),z.A&&z.A.locals&&z.A.locals;var A=(0,p.A)(C,n,[],!1,null,null,null);A.options.__file="components/lib/bpmExternalFormLink/src/main.vue";var N=A.exports;N.install=function(e){e.component(N.name,N)};var P=N;return a}()});
|