(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-8b8fbbdc"],{"0028":function(t,e,a){"use strict";a.r(e);var o=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"factory-wrapper"},[a("layout-panel",[a("div",{staticClass:"table-search pd-tb10-lr30 box-shadow-b"},[a("TableSearch",{attrs:{columns:t.searchColumns,inline:!0},on:{search:t.onSearch},scopedSlots:t._u([{key:"factoryName",fn:function(e){return[a("fd-input",{attrs:{placeholder:t.$t("system.factoryPlaceholder")},model:{value:e.formData["factoryName"],callback:function(a){t.$set(e.formData,"factoryName",a)},expression:"scope.formData['factoryName']"}})]}}])})],1)]),a("layout-panel",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"table-con-sty pd-tb20-lr30",attrs:{title:t.$t("system.factoryList")}},[a("layout-table",{scopedSlots:t._u([{key:"default",fn:function(){return[a("EleTable",{attrs:{loading:t.loading,"table-data":t.tableData,"table-config":t.tableConfig},on:{modalFn:t.modalFn}})]},proxy:!0},t.tableData.length>0?{key:"page",fn:function(){return[a("Pagenation",{attrs:{pageConfig:t.pageConfig},on:{pageChange:t.getFactoryList}})]},proxy:!0}:null],null,!0)})],1),a("gs-modle",{attrs:{modleConfig:{title:t.$t("system.orgFrameworkBelong"),modleName:"factory",modleType:"query"}},scopedSlots:t._u([{key:"content",fn:function(){return[t.isFlowChart?a("Flowchart",{attrs:{nodeList:t.nodeList,lineList:t.lineList}}):t._e()]},proxy:!0}])})],1)},n=[],i=(a("d3b7"),a("159b"),a("99af"),a("fe07")),r=[{label:i["a"].t("system.factoryName"),id:"name"},{label:i["a"].t("system.factoryCode"),id:"code"},{label:i["a"].t("createTime"),id:"createTime"},{label:i["a"].t("system.orgFrameworkBelong"),key:"opt",id:"opt",width:"120px"}],s=[{label:i["a"].t("view"),type:"query",permissions:["system:factory:query"]}],l=a("072e"),c={data:function(){return{queryForm:{factoryName:""},searchColumns:[{name:this.$t("system.factoryName"),field:"factoryName",type:"input",slot:!0}],tableConfig:{headers:r,opt:s,index:!0,selection:!1},tableData:[],pageConfig:{totalCount:0,pageSize:10,pageNum:1},isFlowChart:!1,nodeList:{},lineList:[],loading:!1}},created:function(){this.getFactoryList()},methods:{getFactoryList:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.pageConfig.pageNum=e;var a={keyword:this.queryForm.factoryName||""};this.loading=!0,Object(l["f"])({param:a},this.pageConfig).then((function(e){t.loading=!1,"200"===e.code&&(t.tableData=e.data.dataList||[],t.pageConfig.totalCount=e.data.totalCount||0)}))},modalFn:function(t){var e=t.type,a=t.row;"query"===e&&(this.$fdModal.open("factory"),this.getFactoryOrgChartList(a.id))},reset:function(){this.queryForm.factoryName=""},onSearch:function(t){this.queryForm=t,this.getFactoryList()},getTreeList:function(t){var e=this,a=t.data,o=t.nodeList,n=t.to,i=t.lineList,r={company:"level1",organization:"level2",factory:"level3"};a.forEach((function(t){var a=r[t.type],s=t.type,l="".concat(s,"_").concat(t.objectId),c=t.parentsList||[],d=o[a].some((function(t){return t.id===l}));d||o[a].push({nodeName:t.objectName,typeName:t.objectType,id:l,type:t.type}),n&&i.push({from:l,to:n}),e.getTreeList({data:c,nodeList:o,to:l,lineList:i})}))},getFactoryOrgChartList:function(t){var e=this;this.isFlowChart=!1,Object(l["h"])(t).then((function(t){if("200"===t.code){var a={level1:[],level2:[],level3:[]},o=[];e.getTreeList({data:t.data||[],nodeList:a,lineList:o}),e.nodeList=a,e.lineList=o,e.isFlowChart=!0}}))}}},d=c,f=(a("3bf6"),a("2877")),u=Object(f["a"])(d,o,n,!1,null,"409702d2",null);e["default"]=u.exports},"3bf6":function(t,e,a){"use strict";a("861a")},"861a":function(t,e,a){}}]);