(window["webpackJsonp_park-area-web"]=window["webpackJsonp_park-area-web"]||[]).push([["chunk-a3498940"],{"0bc2":function(e,t,r){},2909:function(e,t,r){"use strict";function n(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"fetchTableData",r=function(r){function n(){var t;return Object(a["a"])(this,n),t=Object(o["a"])(this,Object(s["a"])(n).apply(this,arguments)),t.tableData=[],t.searchForm=f({},e),t.pager={rowsOfPage:10,currentPage:1,total:0},t.loading=!1,t}return Object(c["a"])(n,r),Object(i["a"])(n,[{key:"getSearchParams",value:function(){var e=f({},this.searchForm,{},this.pager);return delete e.total,e}},{key:"onSearch",value:function(){this.pager.currentPage=1,this[t]()}}]),n}(l["e"]);return r=u["a"]([Object(l["a"])({components:{}})],r),r}},b0c0:function(e,t,r){var n=r("83ab"),a=r("9bf2").f,i=Function.prototype,o=i.toString,s=/^\s*function ([^ (]*)/,c="name";!n||c in i||a(i,c,{configurable:!0,get:function(){try{return o.call(this).match(s)[1]}catch(e){return""}}})},f569:function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("qz-wrap",{attrs:{loading:e.loading},scopedSlots:e._u([{key:"opt",fn:function(){return[r("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.onOpenModal("add",null)}}},[e._v("新增区域")])]},proxy:!0}])},[r("qz-table",{attrs:{columns:e.columns,data:e.tableData,attrs:{"row-key":"id"}},scopedSlots:e._u([{key:"name",fn:function(t){var n=t.row;return[n.isEdit?[r("el-input",{staticStyle:{width:"260px"},model:{value:n.name,callback:function(t){e.$set(n,"name",t)},expression:"row.name"}},[r("template",{slot:"suffix"},[r("el-button",{attrs:{type:"text"},on:{click:e.fetchTableData}},[e._v("取消")]),r("el-button",{attrs:{type:"text"},on:{click:function(t){return e.onUpdate(n)}}},[e._v("保存")])],1)],2)]:r("span",{staticClass:"click-item",on:{click:function(t){return e.onToogleEdit(n,!0)}}},[e._v(e._s(n.name)+" "),r("i",{staticClass:"el-icon-edit"})])]}},{key:"type",fn:function(t){var n=t.row;return[r("span",[e._v(e._s(e._f("filterAreaType")(n.type)))])]}},{key:"unitCount",fn:function(t){var n=t.row;return[r("span",{staticClass:"click-item",on:{click:function(t){return e.routerJump("AreaPersonList",{zoneId:n.id})}}},[e._v(" "+e._s(n.unitCount)+" "),r("i",{staticClass:"el-icon-setting"})])]}},{key:"isValid",fn:function(t){var n=t.row;return[[0,1].includes(n.isValid)?[r("qz-dot-tag",{attrs:{type:["danger","success"][n.isValid]}},[e._v(e._s(e.statusMap[n.isValid]||"-"))])]:e._e()]}},{key:"action",fn:function(t){var n=t.row;return[r("el-button",{attrs:{type:"text"},on:{click:function(t){return e.onOpenModal("view",n)}}},[e._v("详情")]),r("el-button",{attrs:{type:"text"},on:{click:function(t){return e.onOpenModal("edit",n)}}},[e._v("编辑")]),n.parentId?r("el-button",{attrs:{type:"text"},on:{click:function(t){return e.onMove(n,1)}}},[e._v("上移")]):e._e(),n.parentId?r("el-button",{attrs:{type:"text"},on:{click:function(t){return e.onMove(n,0)}}},[e._v("下移")]):e._e(),n.parentId?r("el-button",{attrs:{type:"text"},on:{click:function(t){return e.onDelete(n)}}},[e._v("删除")]):e._e()]}}])}),r("org-edit-modal",{ref:"orgModalRef",on:{fresh:e.fetchTableData}})],1)},a=[],i=(r("4160"),r("b0c0"),r("159b"),r("2909")),o=(r("96cf"),r("1da1")),s=r("d4ec"),c=r("bee2"),u=r("99de"),l=r("7e84"),p=r("262e"),f=r("9ab4"),h=r("60a3"),d=r("6891"),b=function(){var e=this,t=e.$createElement,r=e._self._c||t;return e.visible?r("qz-drawer",{attrs:{visible:e.visible,"confirm-loading":e.confirmLoading,title:e.title},on:{"update:visible":function(t){e.visible=t},confirm:e.onOk}},["view"===e.mode?r("qz-form-info",{model:{value:e.orgFormInfo,callback:function(t){e.orgFormInfo=t},expression:"orgFormInfo"}}):r("qz-form",{ref:"areaFormRef",attrs:{form:e.form,rows:e.rows,width:"420px",footer:!1},scopedSlots:e._u([{key:"orgSelect",fn:function(){return[r("CwAreaChoose",{attrs:{props:e.orgProps},model:{value:e.form.parentId,callback:function(t){e.$set(e.form,"parentId",t)},expression:"form.parentId"}})]},proxy:!0}],null,!1,2641232131)})],1):e._e()},v=[],m=(r("a4d3"),r("4de4"),r("d81d"),r("e439"),r("dbb4"),r("b64b"),r("d3b7"),r("25f0"),r("ade3"));function g(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function y(e){for(var t=1;t0&&r.getChildrenIds(e.children,t)}))}},{key:"onDelete",value:function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(t){var r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.$confirm("确定删除".concat(t.name,"区域吗?"),{center:!0});case 3:return r=[t.id],e.next=6,this.service.deleteArea({ids:r});case 6:this.$message.success("删除成功"),this.fetchTableData(),e.next=12;break;case 10:e.prev=10,e.t0=e["catch"](0);case 12:case"end":return e.stop()}}),e,this,[[0,10]])})));function t(t){return e.apply(this,arguments)}return t}()},{key:"onOpenModal",value:function(e,t){this.orgModalRef.open(e,t)}},{key:"onToogleEdit",value:function(e,t){e.isEdit=t,this.tableData=Object(i["a"])(this.tableData)}},{key:"onUpdate",value:function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.service.updateArea(t);case 3:this.$message.success("保存成功"),this.fetchTableData(),e.next=9;break;case 7:e.prev=7,e.t0=e["catch"](0);case 9:case"end":return e.stop()}}),e,this,[[0,7]])})));function t(t){return e.apply(this,arguments)}return t}()}]),t}(Object(h["b"])(Object(_["a"])()));f["a"]([Object(h["d"])()],D.prototype,"orgModalRef",void 0),D=f["a"]([Object(h["a"])({name:"Org",components:{OrgEditModal:R}})],D);var A=D,F=A,T=(r("6424"),Object(x["a"])(F,n,a,!1,null,"49053d50",null));t["default"]=T.exports}}]);