text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-32352074"],{2934:function(t,e,i){"use strict";i.d(e,"a",(function(){return n})),i.d(e,"c",(function(){return s})),i.d(e,"b",(function(){return o}));var a=i("b775");function n(){return Object(a["a"])({url:"/v1/village/list",method:"post"})}function s(){return Object(a["a"])({url:"/v1/position/query",method:"post"})}function o(t){return Object(a["a"])({url:"/v1/villageGroup/list",method:"post",data:t})}},"2b96":function(t,e,i){"use strict";var a=i("9ef6"),n=i.n(a);n.a},"2dac":function(t,e,i){},5790:function(t,e,i){},"6cd7":function(t,e,i){"use strict";var a=i("5790"),n=i.n(a);n.a},7715:function(t,e,i){"use strict";var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("el-card",{staticClass:"box-card"},[i("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[i("span",[t._v("行政区域设置")]),i("el-button",{staticStyle:{float:"right",padding:"3px 0"},attrs:{type:"text"},on:{click:function(e){t.isFold=!t.isFold}}},[t._v(t._s(t.isFold?"展开":"折叠"))])],1),i("div",{directives:[{name:"show",rawName:"v-show",value:t.isFold,expression:"isFold"}],staticClass:"area-box"},[i("p",{staticClass:"tag-title top"},[t._v("乡镇")]),t._l(t.areaList,(function(e){return i("el-tag",{key:"town"+e.townshipId,class:["tag-cursor",{active:t.activeTownIndex===e.townshipId}],attrs:{size:"mini","disable-transitions":!0,type:"info"},on:{click:function(i){return t.getTowns(e)}}},[t._v(t._s(e.townshipName)+" ")])})),i("p",{staticClass:"tag-title"},[t._v("村")]),t._l(t.currentTownList,(function(e){return i("el-tag",{key:"village"+e.villageId,class:["tag-cursor",{active:t.activeVillageIndex===e.villageId}],attrs:{size:"mini","disable-transitions":!0,type:"info"},on:{click:function(i){return t.selectTown(e)}}},[t._v(t._s(e.villageName)+" ")])}))],2)])},n=[],s=i("2934"),o={data:function(){return{isFold:!1,areaList:[],currentTownList:[],activeTownIndex:0,activeTownName:"",activeVillageIndex:0,activeVillageName:""}},props:{initFold:Boolean},created:function(){this.isFold=this.initFold,this.getVillageList()},methods:{goBack:function(){this.$router.go(-1)},getTowns:function(t){this.currentTownList=t&&t.villageInfos||[],this.init(t),this.areaChange()},selectTown:function(t){this.activeVillageIndex=t.villageId,this.activeVillageName=t.villageName,this.areaChange(),console.log(this.activeVillageIndex)},getVillageList:function(){var t=this;Object(s["a"])().then((function(e){t.areaList=e.data.townshipInfos||[],t.init(t.areaList[0]),t.areaChange()}))},areaChange:function(t){var e=[{name:this.activeTownName,value:this.activeTownIndex},{name:this.activeVillageName,value:this.activeVillageIndex}];this.$emit("areaChange",e)},init:function(t){this.activeTownIndex=t.townshipId,this.currentTownList=t&&t.villageInfos||[],this.activeVillageIndex=this.currentTownList[0].villageId,this.activeTownName=t.townshipName,this.activeVillageName=this.currentTownList[0].villageName}}},l=o,r=(i("95fe"),i("2b96"),i("2877")),c=Object(r["a"])(l,a,n,!1,null,"0b2a5ce2",null);e["a"]=c.exports},"95fe":function(t,e,i){"use strict";var a=i("d8a9"),n=i.n(a);n.a},"9ef6":function(t,e,i){},b811:function(t,e,i){"use strict";var a=i("2dac"),n=i.n(a);n.a},d8a9:function(t,e,i){},f52b:function(t,e,i){"use strict";i.r(e);var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"organization-page"},[i("area-selector",{on:{areaChange:t.areaChange}}),i("div",{staticClass:"content"},[i("div",{staticClass:"option-box"},[i("div",{staticClass:"search-box"},[i("el-input",{staticClass:"search-input",attrs:{placeholder:"请输入内容",clearable:""},model:{value:t.searchKey,callback:function(e){t.searchKey=e},expression:"searchKey"}}),i("el-button",{attrs:{type:"primary"},on:{click:t.handleSearch}},[t._v(" 搜索 "),i("i",{staticClass:"el-icon-search el-icon--right"})])],1),i("el-button",{attrs:{icon:"el-icon-plus",type:"primary"},on:{click:t.handleEdit}},[t._v("添加经济组织")])],1),i("el-table",{staticStyle:{width:"100%"},attrs:{"header-cell-class-name":"table-header-color",data:t.tableData,border:""}},[i("el-table-column",{attrs:{prop:"id",label:"编号",width:"180"}}),i("el-table-column",{attrs:{prop:"groupCode",label:"组织代码"}}),i("el-table-column",{attrs:{prop:"groupName",label:"组织名称"}}),i("el-table-column",{attrs:{prop:"groupDescription",label:"法人代表"}}),i("el-table-column",{attrs:{prop:"establishTime",label:"成立日期"}}),i("el-table-column",{attrs:{fixed:"right",label:"操作",width:"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("el-button",{attrs:{type:"text",size:"small"},on:{click:function(i){return t.handleEdit(e.row)}}},[t._v("变更")]),i("el-button",{attrs:{type:"text",size:"small"},on:{click:t.goDetail}},[t._v("详情")])]}}])})],1)],1)],1)},n=[],s=(i("99af"),i("7715")),o=i("2934"),l={components:{AreaSelector:s["a"]},data:function(){return{searchKey:"",form:{},formLabelWidth:"100px",dialogFormVisible:!1,rules:{code:[{required:!0,message:"请输入组织代码",trigger:"blur"}],name:[{required:!0,message:"请输入组织名称",trigger:"blur"}],represent:[{required:!0,message:"请输入法人代表",trigger:"blur"}],createdDate:[{type:"date",message:"请选择成立日期",trigger:"change"}],desc:[{message:"请填写组织介绍",trigger:"blur"}]},groupOptions:[],areaList:[],isEdit:!1}},computed:{villageId:function(){return console.log(this.villageId),this.villageId},tableData:function(){return this.$store.state.economic.economicGroupList}},created:function(){},methods:{showDialog:function(){this.isEdit=!1,this.resetForm(),this.dialogFormVisible=!this.dialogFormVisible},handleEdit:function(t){if(t){for(var e in this.form)this.form[e]=t[e];this.isEdit=!0}this.$router.push("/organ/edit?isEdit=".concat(this.isEdit,"&id=").concat(t&&t.id))},goDetail:function(){this.$router.push("/organ/detail")},areaChange:function(t){console.log(t),this.areaList=t,this.form.villageGroupId=t[1].value,this.handleSearch()},handleSearch:function(){this.$store.dispatch("getEconomicGroupList",{keyword:this.searchKey,villageId:this.form.villageGroupId})},getGroupList:function(t){var e=this;Object(o["b"])({villageId:t}).then((function(t){e.groupOptions=t.data.villageGroupInfos||[]}))}}},r=l,c=(i("b811"),i("6cd7"),i("2877")),u=Object(c["a"])(r,a,n,!1,null,"68d406c0",null);e["default"]=u.exports}}]);