2 lines
23 KiB
JavaScript
2 lines
23 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-57e0dcc8"],{"0cc1":function(e,t,a){"use strict";a("7b9f")},"18be":function(e,t,a){"use strict";a("5680")},3594:function(e,t,a){"use strict";a("58ed")},"47cf":function(e,t,a){},5680:function(e,t,a){},"58ed":function(e,t,a){},"5c15":function(e,t,a){"use strict";var n=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:e.$t("common.confirm"),visible:e.dialogVisible,width:"30%"},on:{"update:visible":function(t){e.dialogVisible=t},close:e.handleClose}},[t("div",{staticStyle:{"text-align":"center"}},[t("p",[e._v(e._s(e.$t("communityManage.confirmDeleteCommunity")))])]),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v(e._s(e.$t("common.cancel")))]),t("el-button",{attrs:{type:"primary"},on:{click:e.deleteCommunity}},[e._v(e._s(e.$t("common.confirm")))])],1)])},o=[],i=a("d5be"),s={name:"DeleteCommunity",data(){return{dialogVisible:!1,deleteCommunityInfo:{}}},methods:{open(e){this.dialogVisible=!0,this.deleteCommunityInfo={...e}},handleClose(){this.deleteCommunityInfo={}},deleteCommunity(){Object(i["a"])(this.deleteCommunityInfo).then(e=>{0===e.code?(this.$message.success(this.$t("common.submitSuccess")),this.dialogVisible=!1,this.$emit("deleted")):this.$message.error(e.msg)}).catch(e=>{console.error("请求失败:",e),this.$message.error(this.$t("common.deleteFailed"))})}}},r=s,l=(a("ffd8"),a("2877")),m=Object(l["a"])(r,n,o,!1,null,"7c4b6a74",null);t["a"]=m.exports},"7b9f":function(e,t,a){},"7e33":function(e,t,a){"use strict";a("f959")},"903c":function(e,t,a){"use strict";a("47cf")},b15a:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e._self._c;return t("div",[t("el-row",[t("el-col",{attrs:{span:24}},[t("el-card",{staticClass:"box-card"},[t("div",{staticClass:"flex justify-between",attrs:{slot:"header"},slot:"header"},[t("span",[e._v(e._s(e.$t("communityManage.queryTitle")))])]),t("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0,model:e.communityManageInfo.conditions}},[t("el-form-item",[t("el-input",{attrs:{placeholder:e.$t("communityManage.communityIdPlaceholder")},model:{value:e.communityManageInfo.conditions.communityId,callback:function(t){e.$set(e.communityManageInfo.conditions,"communityId",t)},expression:"communityManageInfo.conditions.communityId"}})],1),t("el-form-item",[t("el-input",{attrs:{placeholder:e.$t("communityManage.namePlaceholder")},model:{value:e.communityManageInfo.conditions.name,callback:function(t){e.$set(e.communityManageInfo.conditions,"name",t)},expression:"communityManageInfo.conditions.name"}})],1),t("el-form-item",[t("area-select",{ref:"areaSelect",on:{notifyArea:e.handleAreaChange}})],1),t("el-form-item",[t("el-button",{attrs:{type:"primary"},on:{click:e._queryCommunityMethod}},[t("i",{staticClass:"el-icon-search"}),e._v(" "+e._s(e.$t("common.query"))+" ")])],1)],1)],1)],1)],1),t("el-row",[t("el-col",{attrs:{span:24}},[t("el-card",{staticClass:"box-card"},[t("div",{staticClass:"flex justify-between",attrs:{slot:"header"},slot:"header"},[t("span",[e._v(e._s(e.$t("communityManage.communityInfoTitle")))]),t("el-button",{staticStyle:{float:"right"},attrs:{type:"primary",size:"small"},on:{click:e._openAddCommunityModal}},[t("i",{staticClass:"el-icon-plus"}),e._v(" "+e._s(e.$t("communityManage.addCommunity"))+" ")])],1),t("el-table",{staticStyle:{width:"100%"},attrs:{data:e.communityManageInfo.communitys,border:""}},[t("el-table-column",{attrs:{prop:"communityId",label:e.$t("communityManage.communityId")}}),t("el-table-column",{attrs:{prop:"name",label:e.$t("communityManage.name")}}),t("el-table-column",{attrs:{prop:"nearbyLandmarks",label:e.$t("communityManage.nearbyLandmarks"),width:"25%"}}),t("el-table-column",{attrs:{prop:"cityName",label:e.$t("communityManage.cityCode")}}),e._l(e.communityManageInfo.listColumns,(function(a,n){return t("el-table-column",{key:n,attrs:{label:a.specName},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.listValues[n])+" ")]}}],null,!0)})})),t("el-table-column",{attrs:{prop:"stateName",label:e.$t("communityManage.state")}}),t("el-table-column",{attrs:{label:e.$t("common.operation"),align:"right"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-button-group",["1200"==a.row.state&&"800900000001"==e.communityManageInfo.storeTypeCd?t("el-button",{attrs:{size:"mini"},on:{click:function(t){return e._openDeleteCommunityModel(a.row)}}},[e._v(" "+e._s(e.$t("common.delete"))+" ")]):e._e(),t("el-button",{attrs:{size:"mini",disabled:"1100"==a.row.state&&"800900000001"!=e.communityManageInfo.storeTypeCd},on:{click:function(t){return e._openEditCommunityModel(a.row)}}},[e._v(" "+e._s(e.$t("common.edit"))+" ")]),"1000"!=a.row.state&&"800900000001"==e.communityManageInfo.storeTypeCd?t("el-button",{attrs:{size:"mini"},on:{click:function(t){return e._openRecallCommunityModel(a.row)}}},[e._v(" "+e._s(e.$t("communityManage.recallAudit"))+" ")]):e._e()],1)]}}])})],2),t("el-pagination",{attrs:{"current-page":e.currentPage,"page-size":e.pageSize,layout:"total, prev, pager, next",total:e.communityManageInfo.total},on:{"current-change":e.handleCurrentChange,"update:currentPage":function(t){e.currentPage=t},"update:current-page":function(t){e.currentPage=t}}})],1)],1)],1),t("add-community",{ref:"addCommunity"}),t("edit-community",{ref:"editCommunity"}),t("delete-community",{ref:"deleteCommunity"}),t("recall-audit-finish-community",{ref:"recallAuditFinishCommunity"})],1)},o=[],i=a("d5be"),s=function(){var e=this,t=e._self._c;return t("div",[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择省"},on:{change:e.getProv},model:{value:e.areaSelectInfo.selectProv,callback:function(t){e.$set(e.areaSelectInfo,"selectProv",t)},expression:"areaSelectInfo.selectProv"}},e._l(e.areaSelectInfo.provs,(function(e){return t("el-option",{key:e.areaCode,attrs:{label:e.areaName,value:e.areaCode}})})),1),t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择城市",disabled:!e.areaSelectInfo.selectProv},on:{change:e.getCity},model:{value:e.areaSelectInfo.selectCity,callback:function(t){e.$set(e.areaSelectInfo,"selectCity",t)},expression:"areaSelectInfo.selectCity"}},e._l(e.areaSelectInfo.citys,(function(e){return t("el-option",{key:e.areaCode,attrs:{label:e.areaName,value:e.areaCode}})})),1),t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择区县",disabled:!e.areaSelectInfo.selectCity},on:{change:e.getArea},model:{value:e.areaSelectInfo.selectArea,callback:function(t){e.$set(e.areaSelectInfo,"selectArea",t)},expression:"areaSelectInfo.selectArea"}},e._l(e.areaSelectInfo.areas,(function(e){return t("el-option",{key:e.areaCode,attrs:{label:e.areaName,value:e.areaCode}})})),1)],1)},r=[],l={name:"AreaSelect",props:{callBackListener:String,callBackFunction:String,namespace:String},data(){return{areaSelectInfo:{areas:[],provs:[],citys:[],allCity:[],selectProv:"",selectProvName:"",selectCity:"",selectCityName:"",selectArea:"",selectAreaName:""}}},created(){this._initArea("101","0")},methods:{getProv(e){this.areaSelectInfo.selectCity="",this.areaSelectInfo.selectArea="",this._initArea("202",e)},getCity(e){this.areaSelectInfo.selectArea="",this._initArea("303",e)},getArea(e){this.areaSelectInfo.cityCode=e,this.areaSelectInfo.areaAddress="",null!=this.areaSelectInfo.provs&&void 0!=this.areaSelectInfo.provs&&(this.areaSelectInfo.provs.forEach(e=>{e.areaCode==this.areaSelectInfo.selectProv&&(this.areaSelectInfo.selectProvName=e.areaName)}),this.areaSelectInfo.citys.forEach(e=>{e.areaCode==this.areaSelectInfo.selectCity&&(this.areaSelectInfo.selectCityName=e.areaName)}),this.areaSelectInfo.areas.forEach(e=>{e.areaCode==this.areaSelectInfo.selectArea&&(this.areaSelectInfo.selectAreaName=e.areaName)}),this.$emit("notifyArea",{selectProv:this.areaSelectInfo.selectProv,selectProvName:this.areaSelectInfo.selectProvName,selectCity:this.areaSelectInfo.selectCity,selectCityName:this.areaSelectInfo.selectCityName,selectArea:this.areaSelectInfo.selectArea,selectAreaName:this.areaSelectInfo.selectAreaName}))},_initArea(e,t){Object(i["b"])({areaLevel:e,parentAreaCode:t}).then(t=>{const a=t;"101"==e?this.areaSelectInfo.provs=a:"202"==e?this.areaSelectInfo.citys=a:this.areaSelectInfo.areas=a}).catch(e=>{console.error("请求失败:",e),this.$message.error("查询地区失败")})}}},m=l,c=(a("0cc1"),a("2877")),u=Object(c["a"])(m,s,r,!1,null,"80c02d36",null),d=u.exports,y=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:e.$t("communityManage.addCommunity"),visible:e.dialogVisible,width:"70%"},on:{"update:visible":function(t){e.dialogVisible=t},close:e.handleClose}},[t("el-form",{ref:"addCommunityForm",attrs:{model:e.addCommunityInfo,"label-width":"120px",rules:e.rules}},[t("el-form-item",{attrs:{label:e.$t("communityManage.name"),prop:"name"}},[t("el-input",{attrs:{placeholder:e.$t("communityManage.namePlaceholder")},model:{value:e.addCommunityInfo.name,callback:function(t){e.$set(e.addCommunityInfo,"name",t)},expression:"addCommunityInfo.name"}})],1),t("el-form-item",{attrs:{label:e.$t("communityManage.area")}},[t("el-select",{staticStyle:{width:"30%"},attrs:{placeholder:e.$t("communityManage.provincePlaceholder")},on:{change:e.getProv},model:{value:e.selectProv,callback:function(t){e.selectProv=t},expression:"selectProv"}},e._l(e.provs,(function(e){return t("el-option",{key:e.areaCode,attrs:{label:e.areaName,value:e.areaCode}})})),1),t("el-select",{staticStyle:{width:"30%"},attrs:{placeholder:e.$t("communityManage.cityPlaceholder"),disabled:!e.selectProv},on:{change:e.getCity},model:{value:e.selectCity,callback:function(t){e.selectCity=t},expression:"selectCity"}},e._l(e.citys,(function(e){return t("el-option",{key:e.areaCode,attrs:{label:e.areaName,value:e.areaCode}})})),1),t("el-select",{staticStyle:{width:"30%"},attrs:{placeholder:e.$t("communityManage.areaPlaceholder"),disabled:!e.selectCity},on:{change:e.getArea},model:{value:e.selectArea,callback:function(t){e.selectArea=t},expression:"selectArea"}},e._l(e.areas,(function(e){return t("el-option",{key:e.areaCode,attrs:{label:e.areaName,value:e.areaCode}})})),1)],1),t("el-form-item",{attrs:{label:e.$t("communityManage.address"),prop:"tmpAddress"}},[t("el-input",{attrs:{placeholder:e.$t("communityManage.addressPlaceholder")},model:{value:e.addCommunityInfo.tmpAddress,callback:function(t){e.$set(e.addCommunityInfo,"tmpAddress",t)},expression:"addCommunityInfo.tmpAddress"}})],1),t("el-form-item",{attrs:{label:e.$t("communityManage.nearbyLandmarks"),prop:"nearbyLandmarks"}},[t("el-input",{attrs:{placeholder:e.$t("communityManage.nearbyLandmarksPlaceholder")},model:{value:e.addCommunityInfo.nearbyLandmarks,callback:function(t){e.$set(e.addCommunityInfo,"nearbyLandmarks",t)},expression:"addCommunityInfo.nearbyLandmarks"}})],1),e._l(e.addCommunityInfo.attrs,(function(a,n){return["2233"==a.specType?t("el-form-item",{key:n,attrs:{label:a.specName}},[t("el-input",{attrs:{placeholder:a.specHoldplace},model:{value:a.value,callback:function(t){e.$set(a,"value",t)},expression:"item.value"}})],1):e._e(),"3344"==a.specType?t("el-form-item",{key:n,attrs:{label:a.specName}},[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:a.specHoldplace},model:{value:a.value,callback:function(t){e.$set(a,"value",t)},expression:"item.value"}},e._l(a.values,(function(e){return t("el-option",{key:e.value,attrs:{label:e.valueName,value:e.value}})})),1)],1):e._e()]}))],2),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v(e._s(e.$t("common.cancel")))]),t("el-button",{attrs:{type:"primary"},on:{click:e.saveCommunityInfo}},[e._v(e._s(e.$t("common.save")))])],1)],1)},h=[],f={name:"AddCommunity",data(){return{dialogVisible:!1,addCommunityInfo:{name:"",address:"",tmpAddress:"",areaAddress:"",nearbyLandmarks:"",cityCode:"",mapX:"101.33",mapY:"101.33",attrs:[]},areas:[],provs:[],citys:[],selectProv:"",selectCity:"",selectArea:"",rules:{name:[{required:!0,message:this.$t("communityManage.nameRequired"),trigger:"blur"},{min:1,max:20,message:this.$t("communityManage.nameLength"),trigger:"blur"}],tmpAddress:[{required:!0,message:this.$t("communityManage.addressRequired"),trigger:"blur"},{max:200,message:this.$t("communityManage.addressMaxLength"),trigger:"blur"}],nearbyLandmarks:[{required:!0,message:this.$t("communityManage.nearbyLandmarksRequired"),trigger:"blur"},{max:50,message:this.$t("communityManage.nearbyLandmarksMaxLength"),trigger:"blur"}]}}},methods:{open(){this.dialogVisible=!0,this._loadCommunityAttrSpec(),this._initArea("101","0")},handleClose(){this.$refs.addCommunityForm.resetFields(),this.clearAddCommunityInfo()},saveCommunityInfo(){this.$refs.addCommunityForm.validate(e=>{e&&(this.addCommunityInfo.address=this.addCommunityInfo.areaAddress+this.addCommunityInfo.tmpAddress,Object(i["g"])(this.addCommunityInfo).then(e=>{0===e.code?(this.$message.success(this.$t("common.saveSuccess")),this.dialogVisible=!1,this.$emit("saved")):this.$message.error(e.msg)}).catch(e=>{console.error("请求失败:",e),this.$message.error(this.$t("common.saveFailed"))}))})},clearAddCommunityInfo(){this.addCommunityInfo={name:"",address:"",tmpAddress:"",nearbyLandmarks:"",cityCode:"0971",mapX:"101.33",mapY:"101.33",attrs:[]}},getProv(e){this._initArea("202",e)},getCity(e){console.log(e),this._initArea("303",e)},getArea(e){this.addCommunityInfo.cityCode=e,this.addCommunityInfo.areaAddress="",null!=this.provs&&void 0!=this.provs&&(this.provs.forEach(e=>{e.areaCode==this.selectProv&&(this.addCommunityInfo.areaAddress=e.areaName)}),this.citys.forEach(e=>{e.areaCode==this.selectCity&&(this.addCommunityInfo.areaAddress+=e.areaName)}),this.areas.forEach(e=>{e.areaCode==this.selectArea&&(this.addCommunityInfo.areaAddress+=e.areaName)}))},_initArea(e,t){Object(i["b"])({areaLevel:e,parentAreaCode:t}).then(t=>{const a=t;"101"==e?this.provs=a:"202"==e?this.citys=a:this.areas=a}).catch(e=>{console.error("请求失败:",e),this.$message.error("查询地区失败")})},_loadCommunityAttrSpec(){this.addCommunityInfo.attrs=[],Object(i["c"])("building_community_attr").then(e=>{e.forEach(e=>{e.value="","Y"==e.specShow&&(e.values=[],this._loadAttrValue(e.specCd,e.values),this.addCommunityInfo.attrs.push(e))})})},_loadAttrValue(e,t){Object(i["d"])(e).then(e=>{e.forEach(e=>{"Y"==e.valueShow&&t.push(e)})})}}},p=f,g=(a("3594"),Object(c["a"])(p,y,h,!1,null,"f4185442",null)),C=g.exports,b=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:e.$t("communityManage.editCommunity"),visible:e.dialogVisible,width:"70%"},on:{"update:visible":function(t){e.dialogVisible=t},close:e.handleClose}},[t("el-form",{ref:"editCommunityForm",attrs:{model:e.editCommunityInfo,"label-width":"120px",rules:e.rules}},[t("el-form-item",{attrs:{label:e.$t("communityManage.name"),prop:"name"}},[t("el-input",{attrs:{placeholder:e.$t("communityManage.namePlaceholder")},model:{value:e.editCommunityInfo.name,callback:function(t){e.$set(e.editCommunityInfo,"name",t)},expression:"editCommunityInfo.name"}})],1),t("el-form-item",{attrs:{label:e.$t("communityManage.address"),prop:"address"}},[t("el-input",{attrs:{placeholder:e.$t("communityManage.addressPlaceholder")},model:{value:e.editCommunityInfo.address,callback:function(t){e.$set(e.editCommunityInfo,"address",t)},expression:"editCommunityInfo.address"}})],1),t("el-form-item",{attrs:{label:e.$t("communityManage.nearbyLandmarks"),prop:"nearbyLandmarks"}},[t("el-input",{attrs:{placeholder:e.$t("communityManage.nearbyLandmarksPlaceholder")},model:{value:e.editCommunityInfo.nearbyLandmarks,callback:function(t){e.$set(e.editCommunityInfo,"nearbyLandmarks",t)},expression:"editCommunityInfo.nearbyLandmarks"}})],1),e._l(e.editCommunityInfo.attrs,(function(a,n){return["2233"==a.specType?t("el-form-item",{key:n,attrs:{label:a.specName}},[t("el-input",{attrs:{placeholder:a.specHoldplace},model:{value:a.value,callback:function(t){e.$set(a,"value",t)},expression:"item.value"}})],1):e._e(),"3344"==a.specType?t("el-form-item",{key:n,attrs:{label:a.specName}},[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:a.specHoldplace},model:{value:a.value,callback:function(t){e.$set(a,"value",t)},expression:"item.value"}},e._l(a.values,(function(e){return t("el-option",{key:e.value,attrs:{label:e.valueName,value:e.value}})})),1)],1):e._e()]}))],2),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v(e._s(e.$t("common.cancel")))]),t("el-button",{attrs:{type:"primary"},on:{click:e.editCommunity}},[e._v(e._s(e.$t("common.save")))])],1)],1)},v=[],I={name:"EditCommunity",data(){return{dialogVisible:!1,editCommunityInfo:{communityId:"",name:"",address:"",nearbyLandmarks:"",cityCode:"",mapX:"101.33",mapY:"101.33",attrs:[]},rules:{name:[{required:!0,message:this.$t("communityManage.nameRequired"),trigger:"blur"},{min:4,max:20,message:this.$t("communityManage.nameLength"),trigger:"blur"}],address:[{required:!0,message:this.$t("communityManage.addressRequired"),trigger:"blur"},{max:200,message:this.$t("communityManage.addressMaxLength"),trigger:"blur"}],nearbyLandmarks:[{required:!0,message:this.$t("communityManage.nearbyLandmarksRequired"),trigger:"blur"},{max:50,message:this.$t("communityManage.nearbyLandmarksMaxLength"),trigger:"blur"}],communityId:[{required:!0,message:this.$t("communityManage.communityIdRequired"),trigger:"blur"}]}}},methods:{open(e){this.dialogVisible=!0,this.refreshEditCommunityInfo(),this.$nextTick(()=>{if(this.$refs.editCommunityForm.resetFields(),Object.assign(this.editCommunityInfo,e),Object.prototype.hasOwnProperty.call(e,"communityAttrDtos")){const t=e.communityAttrDtos;t.forEach(e=>{this.editCommunityInfo.attrs.forEach(t=>{e.specCd==t.specCd&&(t.attrId=e.attrId,t.value=e.value)})})}})},handleClose(){this.$refs.editCommunityForm.resetFields()},editCommunity(){this.$refs.editCommunityForm.validate(e=>{e&&Object(i["h"])(this.editCommunityInfo).then(e=>{0===e.code?(this.$message.success(this.$t("common.saveSuccess")),this.dialogVisible=!1,this.$emit("saved")):this.$message.error(e.msg)}).catch(e=>{console.error("请求失败:",e),this.$message.error(this.$t("common.saveFailed"))})})},refreshEditCommunityInfo(){const e=this.editCommunityInfo.attrs;this.editCommunityInfo={communityId:"",name:"",address:"",nearbyLandmarks:"",cityCode:"",mapX:"101.33",mapY:"101.33",attrs:e}},_loadEditCommunityAttrSpec(){this.editCommunityInfo.attrs=[],Object(i["c"])("building_community_attr").then(e=>{e.forEach(e=>{e.value="",e.values=[],this._loadEditAttrValue(e.specCd,e.values),"Y"==e.specShow&&this.editCommunityInfo.attrs.push(e)})})},_loadEditAttrValue(e,t){Object(i["d"])(e).then(e=>{e.forEach(e=>{"Y"==e.valueShow&&t.push(e)})})}},created(){this._loadEditCommunityAttrSpec()}},$=I,_=(a("903c"),Object(c["a"])($,b,v,!1,null,"f8a37a42",null)),M=_.exports,A=a("5c15"),k=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:e.$t("common.confirm"),visible:e.dialogVisible,width:"30%"},on:{"update:visible":function(t){e.dialogVisible=t},close:e.handleClose}},[t("div",{staticStyle:{"text-align":"center"}},[t("p",[e._v(e._s(e.$t("communityManage.confirmRecallAudit")))])]),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v(e._s(e.$t("common.cancel")))]),t("el-button",{attrs:{type:"primary"},on:{click:e.recallAuditFinishCommunity}},[e._v(e._s(e.$t("common.confirm")))])],1)])},S=[],P={name:"RecallAuditFinishCommunity",data(){return{dialogVisible:!1,recallAuditFinishCommunityInfo:{}}},methods:{open(e){this.dialogVisible=!0,this.recallAuditFinishCommunityInfo={...e}},handleClose(){this.recallAuditFinishCommunityInfo={}},recallAuditFinishCommunity(){const e={communityId:this.recallAuditFinishCommunityInfo.communityId,state:"1000",remark:this.$t("communityManage.recallAuditRemark")};Object(i["f"])(e).then(e=>{0===e.code?(this.$message.success(this.$t("communityManage.recallSuccess")),this.dialogVisible=!1,this.$emit("recalled")):this.$message.error(e.msg)}).catch(e=>{console.error("请求失败:",e),this.$message.error(this.$t("communityManage.recallFailed"))})}}},w=P,x=(a("18be"),Object(c["a"])(w,k,S,!1,null,"e535daea",null)),V=x.exports,L={components:{AreaSelect:d,AddCommunity:C,EditCommunity:M,DeleteCommunity:A["a"],RecallAuditFinishCommunity:V},data(){return{communityManageInfo:{communitys:[],total:0,storeTypeCd:"",conditions:{name:"",cityCode:"",communityId:""},listColumns:[]},currentPage:1,pageSize:10}},created(){this._initMethod()},methods:{_initMethod(){this._getColumns(()=>{this._listCommunitys(this.currentPage,this.pageSize)})},_listCommunitys(e,t){const a={...this.communityManageInfo.conditions,page:e,row:t};Object(i["e"])(a).then(e=>{this.communityManageInfo.total=e.total,this.communityManageInfo.communitys=e.communitys,this.dealCommunityAttr(e.communitys)}).catch(e=>{console.error("请求失败:",e)})},_openAddCommunityModal(){this.$refs.addCommunity.open()},_openEditCommunityModel(e){this.$refs.editCommunity.open(e)},_openDeleteCommunityModel(e){this.$refs.deleteCommunity.open(e)},_openRecallCommunityModel(e){this.$refs.recallAuditFinishCommunity.open(e)},_queryCommunityMethod(){this.currentPage=1,this._listCommunitys(this.currentPage,this.pageSize)},handleCurrentChange(e){this.currentPage=e,this._listCommunitys(this.currentPage,this.pageSize)},handleAreaChange(e){this.communityManageInfo.conditions.cityCode=e.selectArea},dealCommunityAttr(e){e.forEach(e=>{this._getColumnsValue(e)})},_getColumnsValue(e){if(e.listValues=[],!Object.prototype.hasOwnProperty.call(e,"communityAttrDtos")||e.communityAttrDtos.length<1)return void this.communityManageInfo.listColumns.forEach(()=>{e.listValues.push("")});const t=e.communityAttrDtos;this.communityManageInfo.listColumns.forEach(a=>{let n="";t.forEach(e=>{a.specCd==e.specCd&&(n=e.value)}),e.listValues.push(n)})},_getColumns(e){this.communityManageInfo.listColumns=[],e()}}},N=L,j=(a("7e33"),Object(c["a"])(N,n,o,!1,null,"54db9fc8",null));t["default"]=j.exports},d5be:function(e,t,a){"use strict";a.d(t,"e",(function(){return o})),a.d(t,"g",(function(){return i})),a.d(t,"h",(function(){return s})),a.d(t,"a",(function(){return r})),a.d(t,"f",(function(){return l})),a.d(t,"b",(function(){return m})),a.d(t,"c",(function(){return c})),a.d(t,"d",(function(){return u}));var n=a("b775");function o(e){return new Promise((t,a)=>{Object(n["a"])({url:"/communityManage/list",method:"get",params:e}).then(e=>{const a=e.data;t(a)}).catch(e=>{a(e)})})}function i(e){return new Promise((t,a)=>{Object(n["a"])({url:"/communityManage/save",method:"post",data:e}).then(e=>{const a=e.data;t(a)}).catch(e=>{a(e)})})}function s(e){return new Promise((t,a)=>{Object(n["a"])({url:"/communityManage/update",method:"post",data:e}).then(e=>{const a=e.data;t(a)}).catch(e=>{a(e)})})}function r(e){return new Promise((t,a)=>{Object(n["a"])({url:"/communityManage/delete",method:"post",data:e}).then(e=>{const a=e.data;t(a)}).catch(e=>{a(e)})})}function l(e){return new Promise((t,a)=>{Object(n["a"])({url:"/communityManage/recall",method:"post",data:e}).then(e=>{const a=e.data;t(a)}).catch(e=>{a(e)})})}function m(e){return new Promise((t,a)=>{Object(n["a"])({url:"/communityManage/getAreas",method:"get",params:e}).then(e=>{const a=e.data;t(a)}).catch(e=>{a(e)})})}function c(e){return new Promise((t,a)=>{Object(n["a"])({url:"/communityManage/getAttrSpec",method:"get",params:{specType:e}}).then(e=>{const a=e.data;t(a)}).catch(e=>{a(e)})})}function u(e){return new Promise((t,a)=>{Object(n["a"])({url:"/communityManage/getAttrValue",method:"get",params:{specCd:e}}).then(e=>{const a=e.data;t(a)}).catch(e=>{a(e)})})}},d8d8:function(e,t,a){},f959:function(e,t,a){},ffd8:function(e,t,a){"use strict";a("d8d8")}}]);
|
|
//# sourceMappingURL=chunk-57e0dcc8.a021681e.js.map
|