text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-fab543a8"],{"1e8b":function(e,t,a){},"30d7":function(e,t,a){"use strict";var r=a("fb5f"),n=a.n(r);n.a},3277:function(e,t,a){"use strict";var r=a("1e8b"),n=a.n(r);n.a},"4b94":function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"detail-page"},[a("back"),a("el-card",{staticClass:"box-card"},[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[e._v(" "+e._s(e.basicInfo.address)+" 户 "+e._s(e.basicInfo.familyNo)+" ("+e._s(e.basicInfo.name)+") "),e.$hasAuth(11)?a("el-button",{staticStyle:{float:"right"},attrs:{icon:"el-icon-plus",type:"primary"},on:{click:e.addMember}},[e._v("新增家庭成员")]):e._e()],1),a("div",{staticStyle:{padding:"10px"}},[a("el-table",{staticStyle:{width:"100%"},attrs:{"header-cell-class-name":"table-header-color",data:e.tableData,border:""}},[a("el-table-column",{attrs:{prop:"memberName",label:"成员"}}),a("el-table-column",{attrs:{prop:"relationship",label:"与户主关系"},scopedSlots:e._u([{key:"default",fn:function(t){return[e.relationshipList.length?a("p",[e._v(e._s(e.relationshipList.filter((function(e){return e.relationshipId==t.row.relationship}))[0].relationshipName))]):e._e()]}}])}),a("el-table-column",{attrs:{prop:"sex",label:"性别"},scopedSlots:e._u([{key:"default",fn:function(t){return[0==t.row.sex?a("p",[e._v("保密")]):1==t.row.sex?a("p",[e._v("男")]):2==t.row.sex?a("p",[e._v("女")]):e._e()]}}])}),a("el-table-column",{attrs:{prop:"idCard",label:"身份证号",width:"230"}}),a("el-table-column",{attrs:{prop:"birthDate",label:"出生日期"}}),a("el-table-column",{attrs:{prop:"currentAddress",label:"现居住地"}}),a("el-table-column",{attrs:{fixed:"right",label:"操作",width:"320"},scopedSlots:e._u([{key:"default",fn:function(t){return[e.$hasAuth(12)?a("el-button",{attrs:{icon:"el-icon-s-tools",type:"success"},on:{click:function(a){return e.handleEdit("editMember",t.row.memberId)}}},[e._v("变更")]):e._e(),e.$hasAuth(14)?a("el-button",{attrs:{icon:"el-icon-warning",type:"warning"},on:{click:function(a){return e.handleEdit("detail",t.row.memberId)}}},[e._v("详情")]):e._e(),e.$hasAuth(13)?a("el-button",{attrs:{icon:"el-icon-delete-solid",type:"danger"},on:{click:function(a){return e.deleteMember(t.row)}}},[e._v("注销")]):e._e()]}}])})],1)],1)]),a("el-card",{staticClass:"box-card"},[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[e._v(" "+e._s(e.basicInfo.address)+" 户 "+e._s(e.basicInfo.familyNo)+" ("+e._s(e.basicInfo.name)+") "),a("el-tag",{attrs:{type:"success",size:"mini"}},[e._v("变更记录")])],1),a("div",{staticStyle:{padding:"10px"}},[a("el-table",{staticStyle:{width:"100%"},attrs:{"header-cell-class-name":"table-header-color",data:e.memberUpdateHistoryInfos,border:""}},[a("el-table-column",{attrs:{prop:"updateTime",label:"变更时间"}}),a("el-table-column",{attrs:{prop:"memberName",label:"成员名"}}),a("el-table-column",{attrs:{prop:"updateDetail",label:"变更详情"}})],1)],1)]),a("el-dialog",{attrs:{title:"关系变更",visible:e.dialogVisible,width:"30%"},on:{"update:visible":function(t){e.dialogVisible=t}}},[a("el-form",{attrs:{"label-width":"80px"}},e._l(e.tableData.filter((function(e){return 1!==e.relationship})),(function(t){return a("el-form-item",{key:t.memberId,attrs:{label:t.memberName}},[a("el-select",{attrs:{filterable:"",placeholder:"更新关系"},model:{value:e.form[t.memberId],callback:function(a){e.$set(e.form,t.memberId,a)},expression:"form[item.memberId]"}},e._l(e.relationshipList,(function(e){return a("el-option",{key:e.relationshipId,attrs:{label:e.relationshipName,value:e.relationshipId}})})),1)],1)})),1),a("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v("取 消")]),a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.changeRelationship(e.currentId)}}},[e._v("确 定")])],1)],1)},n=[],i=(a("99af"),a("4de4"),a("d81d"),a("b0c0"),a("b64b"),a("d130")),o=a("66b7"),l=a("8194"),s={name:"OrganizationDetail",components:{FormItemLayout:i["a"],Back:o["a"]},data:function(){return{memberUpdateHistoryInfos:[],tableData:[],basicInfo:{},form:{},dialogVisible:!1,relationshipList:[],currentId:""}},created:function(){var e=this;this.basicInfo={address:this.$route.query.village,name:this.$route.query.name,familyNo:this.$route.query.familyNo},this.getFamilyMember(),this.getRelationList();var t=new FormData;t.append("familyId",this.$route.query.id),Object(l["g"])(t).then((function(t){e.memberUpdateHistoryInfos=t.data.memberUpdateHistoryInfos}))},methods:{handleEdit:function(e,t){if("detail"==e)this.$router.push("/member/edit?isEdit=".concat(e,"&memberId=").concat(t,"&familyCount=").concat(this.basicInfo.familyNo));else{var a=this.$route.query.id;this.$router.push("/member/edit?isEdit=".concat(e,"&id=").concat(a,"&memberId=").concat(t,"&familyCount=").concat(this.basicInfo.familyNo))}},addMember:function(){var e=this.$route.query.id;this.$router.push("/member/edit?isEdit=addMember&id=".concat(e,"&familyCount=").concat(this.basicInfo.familyNo))},goDetail:function(){this.$router.push("/member/detail")},deleteMember:function(e){var t=this;this.$confirm("确认注销？","系统提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var a=e.memberId;1===e.relationship&&t.tableData.length>1?(t.dialogVisible=!0,t.currentId=a):t.cancleMember(a)}))},cancleMember:function(e,t){var a=this,r={memberId:e};if(t){var n=t.filter((function(e){return 1===e.relationship}));if(!n.length)return void this.$message.error("必须有一成员为户主");r.memberRelationships=t,r.memberId=this.currentId}Object(l["b"])(r).then((function(e){a.$message({type:"success",message:"操作成功！"}),a.dialogVisible=!1,a.getFamilyMember()}))},makeSureCancle:function(e){var t=this;console.log(this.form);var a=Object.keys(this.form),r=[];a.map((function(e){r.push({memberId:e,relationship:t.form[e]})})),this.cancleMember(e,r)},getFamilyMember:function(){var e=this,t=this.$route.query.id;Object(l["e"])({familyId:t}).then((function(t){e.tableData=t.data.memberInfos}))},getRelationList:function(e){var t=this;Object(l["j"])({villageId:e}).then((function(e){t.relationshipList=e.data.relationshipInfos||[]}))},changeRelationship:function(e){this.makeSureCancle(e)}}},c=s,u=(a("30d7"),a("6c6f"),a("2877")),d=Object(u["a"])(c,r,n,!1,null,"1fdec90d",null);t["default"]=d.exports},"6c6f":function(e,t,a){"use strict";var r=a("9352"),n=a.n(r);n.a},8194:function(e,t,a){"use strict";a.d(t,"k",(function(){return n})),a.d(t,"c",(function(){return i})),a.d(t,"d",(function(){return o})),a.d(t,"e",(function(){return l})),a.d(t,"h",(function(){return s})),a.d(t,"j",(function(){return c})),a.d(t,"m",(function(){return u})),a.d(t,"b",(function(){return d})),a.d(t,"a",(function(){return m})),a.d(t,"f",(function(){return b})),a.d(t,"l",(function(){return f})),a.d(t,"i",(function(){return h})),a.d(t,"g",(function(){return p}));var r=a("b775");function n(e){return Object(r["a"])({url:"/v1/family/search",method:"post",data:e})}function i(e){return Object(r["a"])({url:"/v1/family/save",method:"post",data:e})}function o(e){return Object(r["a"])({url:"/v1/member/detail",method:"post",data:e})}function l(e){return Object(r["a"])({url:"/v1/family/members",method:"post",data:e})}function s(e){return Object(r["a"])({url:"/v1/member/detail",method:"post",data:e})}function c(e){return Object(r["a"])({url:"/v1/relationship/query",method:"post",data:e})}function u(e){return Object(r["a"])({url:"/v1/member/update",method:"post",data:e})}function d(e){return Object(r["a"])({url:"/v1/member/cancel",method:"post",data:e})}function m(e){return Object(r["a"])({url:"/v1/member/save",method:"post",data:e})}function b(e){return Object(r["a"])({url:"/v1/birthDate/query",method:"post",data:e})}function f(e){return Object(r["a"])({url:"/v1/members/search",method:"post",data:e})}function h(e){return Object(r["a"])({url:"/v1/member/download",method:"get",params:e,responseType:"blob"})}function p(e){return Object(r["a"])({url:"/v1/updateHistory/query",method:"post",data:e})}},9352:function(e,t,a){},d130:function(e,t,a){"use strict";var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"form-item-box"},[a("span",{style:{display:"inline-block",width:e.labelWidth+"px"}},[e.required?a("span",{staticStyle:{color:"#f56c6c"}},[e._v("*")]):e._e(),e._v(" "+e._s(e.label)+" ")]),e._t("default")],2)},n=[],i=(a("a9e3"),a("2f62"),{name:"Dashboard",props:{label:String,labelWidth:{type:Number,default:100},required:Boolean}}),o=i,l=(a("3277"),a("2877")),s=Object(l["a"])(o,r,n,!1,null,"0679a4c4",null);t["a"]=s.exports},fb5f:function(e,t,a){}}]);