text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-a48ac26a"],{"23dd":function(e,t,a){"use strict";var i=a("3437"),r=a.n(i);r.a},2934:function(e,t,a){"use strict";a.d(t,"a",(function(){return r})),a.d(t,"c",(function(){return n})),a.d(t,"b",(function(){return o}));var i=a("b775");function r(){return Object(i["a"])({url:"/v1/village/list",method:"post"})}function n(){return Object(i["a"])({url:"/v1/position/query",method:"post"})}function o(e){return Object(i["a"])({url:"/v1/villageGroup/list",method:"post",data:e})}},"2b96":function(e,t,a){"use strict";var i=a("9ef6"),r=a.n(i);r.a},3437:function(e,t,a){},"4ad1":function(e,t,a){},"66b7":function(e,t,a){"use strict";var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"back-container"},[a("span",{staticClass:"custom-back",on:{click:e.goBack}},[a("i",{staticClass:"el-icon-back ",on:{click:e.goBack}}),e._v("返回 ")])])},r=[],n=(a("2f62"),{name:"Back",methods:{goBack:function(){history.back()}}}),o=n,s=(a("8ccd"),a("2877")),l=Object(s["a"])(o,i,r,!1,null,"1a422e96",null);t["a"]=l.exports},7715:function(e,t,a){"use strict";var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-card",{staticClass:"box-card"},[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("span",[e._v("行政区域设置")]),a("el-button",{staticStyle:{float:"right",padding:"3px 0"},attrs:{type:"text"},on:{click:function(t){e.isFold=!e.isFold}}},[e._v(e._s(e.isFold?"展开":"折叠"))])],1),a("div",{directives:[{name:"show",rawName:"v-show",value:e.isFold,expression:"isFold"}],staticClass:"area-box"},[a("p",{staticClass:"tag-title top"},[e._v("乡镇")]),e._l(e.areaList,(function(t){return a("el-tag",{key:"town"+t.townshipId,class:["tag-cursor",{active:e.activeTownIndex===t.townshipId}],attrs:{size:"mini","disable-transitions":!0,type:"info"},on:{click:function(a){return e.getTowns(t)}}},[e._v(e._s(t.townshipName)+" ")])})),a("p",{staticClass:"tag-title"},[e._v("村")]),e._l(e.currentTownList,(function(t){return a("el-tag",{key:"village"+t.villageId,class:["tag-cursor",{active:e.activeVillageIndex===t.villageId}],attrs:{size:"mini","disable-transitions":!0,type:"info"},on:{click:function(a){return e.selectTown(t)}}},[e._v(e._s(t.villageName)+" ")])}))],2)])},r=[],n=a("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(e){this.currentTownList=e&&e.villageInfos||[],this.init(e),this.areaChange()},selectTown:function(e){this.activeVillageIndex=e.villageId,this.activeVillageName=e.villageName,this.areaChange(),console.log(this.activeVillageIndex)},getVillageList:function(){var e=this;Object(n["a"])().then((function(t){e.areaList=t.data.townshipInfos||[],e.init(e.areaList[0]),e.areaChange()}))},areaChange:function(e){var t=[{name:this.activeTownName,value:this.activeTownIndex},{name:this.activeVillageName,value:this.activeVillageIndex}];this.$emit("areaChange",t)},init:function(e){this.activeTownIndex=e.townshipId,this.currentTownList=e&&e.villageInfos||[],this.activeVillageIndex=this.currentTownList[0].villageId,this.activeTownName=e.townshipName,this.activeVillageName=this.currentTownList[0].villageName}}},s=o,l=(a("95fe"),a("2b96"),a("2877")),c=Object(l["a"])(s,i,r,!1,null,"0b2a5ce2",null);t["a"]=c.exports},8194:function(e,t,a){"use strict";a.d(t,"i",(function(){return r})),a.d(t,"f",(function(){return n})),a.d(t,"c",(function(){return o})),a.d(t,"d",(function(){return s})),a.d(t,"e",(function(){return l})),a.d(t,"g",(function(){return c})),a.d(t,"h",(function(){return u})),a.d(t,"j",(function(){return d})),a.d(t,"b",(function(){return m})),a.d(t,"a",(function(){return f}));var i=a("b775");function r(e){return Object(i["a"])({url:"/v1/family/search",method:"post",data:e})}function n(e){return Object(i["a"])({url:"/v1/family/members",method:"post",data:e})}function o(e){return Object(i["a"])({url:"/v1/family/save",method:"post",data:e})}function s(e){return Object(i["a"])({url:"/v1/member/detail",method:"post",data:e})}function l(e){return Object(i["a"])({url:"/v1/family/members",method:"post",data:e})}function c(e){return Object(i["a"])({url:"/v1/member/detail",method:"post",data:e})}function u(e){return Object(i["a"])({url:"/v1/relationship/query",method:"post",data:e})}function d(e){return Object(i["a"])({url:"/v1/member/update",method:"post",data:e})}function m(e){return Object(i["a"])({url:"/v1/member/cancel",method:"post",data:e})}function f(e){return Object(i["a"])({url:"/v1/member/save",method:"post",data:e})}},"8b03":function(e,t,a){},"8ccd":function(e,t,a){"use strict";var i=a("4ad1"),r=a.n(i);r.a},"8f02":function(e,t,a){"use strict";var i=a("8b03"),r=a.n(i);r.a},"94a6":function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"organization-page"},[a("back"),"new"===e.isEdit?a("area-selector",{attrs:{initFold:!0},on:{areaChange:e.areaChange}}):e._e(),a("div",{staticClass:"content"},[a("el-form",{ref:"ruleForm",staticClass:"demo-ruleForm",attrs:{model:e.form,rules:e.rules,disabled:"detail"===e.isEdit,"label-width":"180px"}},["new"!==e.isEdit?a("el-form-item",{attrs:{label:"户号"}},[a("el-input",{attrs:{disabled:"disabled"},model:{value:e.familyCount,callback:function(t){e.familyCount=t},expression:"familyCount"}})],1):e._e(),a("el-form-item",{attrs:{label:"addMember"===e.isEdit?"成员姓名":"户主姓名",prop:"name"}},[a("el-input",{model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1),e.$route.query.memberId||"addMember"===e.isEdit?a("el-form-item",{attrs:{label:"与户主关系",prop:"relationship"}},[a("el-select",{attrs:{filterable:"",placeholder:"请选择与户主关系"},model:{value:e.form.relationship,callback:function(t){e.$set(e.form,"relationship",t)},expression:"form.relationship"}},e._l(e.relationshipList,(function(e){return a("el-option",{key:e.relationshipId,attrs:{label:e.relationshipName,value:e.relationshipId}})})),1)],1):e._e(),a("el-form-item",{attrs:{label:"性别"}},[a("el-radio-group",{model:{value:e.form.sex,callback:function(t){e.$set(e.form,"sex",t)},expression:"form.sex"}},[a("el-radio",{attrs:{label:0}},[e._v("保密")]),a("el-radio",{attrs:{label:1}},[e._v("男")]),a("el-radio",{attrs:{label:2}},[e._v("女")])],1)],1),a("el-form-item",{attrs:{label:"身份证号",prop:"idCard"}},[a("el-input",{model:{value:e.form.idCard,callback:function(t){e.$set(e.form,"idCard",t)},expression:"form.idCard"}})],1),a("el-form-item",{attrs:{label:"出生日期",prop:"birthDate"}},[a("el-date-picker",{staticStyle:{width:"100%"},attrs:{"value-format":"yyyy-MM-DD",type:"date",placeholder:"选择日期"},model:{value:e.form.birthDate,callback:function(t){e.$set(e.form,"birthDate",t)},expression:"form.birthDate"}})],1),a("el-form-item",{attrs:{label:"职务",prop:"positionId"}},[a("el-select",{attrs:{filterable:"",placeholder:"请选择职务"},model:{value:e.form.position,callback:function(t){e.$set(e.form,"position",t)},expression:"form.position"}},e._l(e.posiitonList,(function(e){return a("el-option",{key:e.positionId,attrs:{label:e.positionName,value:e.positionId}})})),1)],1),"new"===e.isEdit?a("el-form-item",{attrs:{label:"所在社/组",prop:"villageGroupId"}},[a("el-select",{attrs:{filterable:"",placeholder:"请选择所在社/组"},model:{value:e.form.villageGroupId,callback:function(t){e.$set(e.form,"villageGroupId",t)},expression:"form.villageGroupId"}},e._l(e.groupOptions,(function(e){return a("el-option",{key:e.villageGroupId,attrs:{label:e.villageGroupName,value:e.villageGroupId}})})),1)],1):e._e(),a("el-form-item",{attrs:{label:"服务处所",prop:"servicePlace"}},[a("el-input",{model:{value:e.form.servicePlace,callback:function(t){e.$set(e.form,"servicePlace",t)},expression:"form.servicePlace"}})],1),a("el-form-item",{attrs:{label:"现居住地址",prop:"currentAddress"}},[a("el-input",{model:{value:e.form.currentAddress,callback:function(t){e.$set(e.form,"currentAddress",t)},expression:"form.currentAddress"}})],1),a("el-form-item",{attrs:{label:"有无承包地及获得时间",prop:"isHasLand"}},[a("el-radio-group",{model:{value:e.form.isHasLand,callback:function(t){e.$set(e.form,"isHasLand",t)},expression:"form.isHasLand"}},[a("el-radio",{attrs:{label:0}},[e._v("无")]),a("el-radio",{attrs:{label:1}},[e._v("有")])],1)],1),e.form.isHasLand?a("el-form-item",{attrs:{label:"承包地及获得时间",prop:"isHasLand"}},[a("el-date-picker",{staticStyle:{width:"100%"},attrs:{type:"date","value-format":"yyyy-MM-DD",placeholder:"选择日期"},model:{value:e.form.getLandTime,callback:function(t){e.$set(e.form,"getLandTime",t)},expression:"form.getLandTime"}})],1):e._e(),a("el-form-item",{attrs:{label:"户口迁入时间",prop:"accountInTime"}},[a("el-date-picker",{staticStyle:{width:"100%"},attrs:{"value-format":"yyyy-MM-DD",type:"date",placeholder:"选择日期"},model:{value:e.form.accountInTime,callback:function(t){e.$set(e.form,"accountInTime",t)},expression:"form.accountInTime"}})],1),a("el-form-item",{attrs:{label:"户口迁入原因"}},[a("el-input",{model:{value:e.form.accountInReason,callback:function(t){e.$set(e.form,"accountInReason",t)},expression:"form.accountInReason"}})],1),a("el-form-item",{attrs:{label:"户口迁出时间"}},[a("el-date-picker",{staticStyle:{width:"100%"},attrs:{"value-format":"yyyy-MM-DD",type:"date",placeholder:"选择日期"},model:{value:e.form.accountOutTime,callback:function(t){e.$set(e.form,"accountOutTime",t)},expression:"form.accountOutTime"}})],1),a("el-form-item",{attrs:{label:"户口迁出原因",prop:"accountOutReason"}},[a("el-input",{model:{value:e.form.accountOutReason,callback:function(t){e.$set(e.form,"accountOutReason",t)},expression:"form.accountOutReason"}})],1),a("el-form-item",{attrs:{label:"备注",prop:"description"}},[a("el-input",{attrs:{type:"textarea",placeholder:"备注描述"},model:{value:e.form.description,callback:function(t){e.$set(e.form,"description",t)},expression:"form.description"}})],1)],1),a("el-button",{staticStyle:{width:"100%"},attrs:{type:"primary",disabled:"detail"===e.isEdit},on:{click:e.submit}},[e._v("提 交")])],1)],1)},r=[],n=(a("b0c0"),a("5530")),o=a("7715"),s=a("66b7"),l=a("8194"),c=a("2934"),u={components:{AreaSelector:o["a"],Back:s["a"]},data:function(){return{form:{villageGroupId:0},familyCount:"",formLabelWidth:"100px",groupOptions:[],relationshipList:[],rules:{name:[{required:!0,message:"请输入户主姓名",trigger:"blur"}],idCard:[{required:!0,message:"请输入身份证号",trigger:"blur"}],currentAddress:[{required:!0,message:"请输入居住地址",trigger:"blur"}],position:[{required:!0,message:"请选择职位",trigger:"change"}],villageGroupId:[{required:!0,message:"请选择组/社",trigger:"change"}],relationship:[{required:!0,message:"请选择与户主关系",trigger:"change"}],birthDate:[{required:!0,message:"请选择出生日期",trigger:"change"}],description:[{message:"请填写组织介绍",trigger:"blur"}]},isEdit:!1,areaList:[],posiitonList:[]}},watch:{areaList:{deep:!0,handler:function(){var e=this.areaList[1].value;this.getGroupList(e)}}},created:function(){this.isEdit=this.$route.query.isEdit,this.familyCount=this.$route.query.familyCount,this.getPositionList(),this.getRelationList(),"new"!==this.isEdit&&"addMember"!==this.isEdit&&this.getDetail()},methods:{handleEdit:function(e){for(var t in this.showDialog(),this.form)this.form[t]=e[t];this.isEdit=!0},areaChange:function(e){this.areaList=e,this.form.villageGroupId=e[1].value},submit:function(){var e=this,t=null,a=this.$route.query.id;this.$route.query.memberId;switch(this.form.isHasLand||delete this.form.getLandTime,this.isEdit){case"new":t=Object(l["c"])(this.form);break;case"edit":t=Object(l["j"])(this.form);break;case"addMember":var i=Object(n["a"])(Object(n["a"])({},this.form),{},{familyId:a});t=Object(l["a"])(i);break}t.then((function(t){e.$message({message:"操作成功",type:"success"}),a&&"new"===e.isEdit?e.$router.push("/member/index"):history.back()}))},getDetail:function(){var e=this,t=this.$route.query.id,a=this.$route.query.memberId,i=null;t?i=Object(l["d"])({memberId:t}):a&&(i=Object(l["g"])({memberId:a})),i.then((function(t){e.form=Object(n["a"])(Object(n["a"])({},t.data),{},{name:t.data.name||t.data.memberName}),t.data.villageId&&e.getGroupList(t.data.villageId)}))},newFamily:function(){},getPositionList:function(){var e=this;Object(c["c"])().then((function(t){e.posiitonList=t.data.positionInfos||[]}))},getGroupList:function(e){var t=this;Object(c["b"])({villageId:e}).then((function(e){t.groupOptions=e.data.villageGroupInfos||[]}))},getRelationList:function(e){var t=this;Object(l["h"])({villageId:e}).then((function(e){t.relationshipList=e.data.relationshipInfos||[]}))}}},d=u,m=(a("23dd"),a("8f02"),a("2877")),f=Object(m["a"])(d,i,r,!1,null,"2b987e2a",null);t["default"]=f.exports},"95fe":function(e,t,a){"use strict";var i=a("d8a9"),r=a.n(i);r.a},"9ef6":function(e,t,a){},d8a9:function(e,t,a){}}]);