(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-acd50396","chunk-2d2217b6"],{"0273":function(e,t,n){"use strict";n("e658")},"5cfa":function(e,t,n){"use strict";n.r(t);var r=function(){var e=this,t=e._self._c;return t("d2-container",{class:{"page-compact":e.crud.pageOptions.compact}},[t("d2-crud-x",e._g(e._b({ref:"d2Crud"},"d2-crud-x",e._crudProps,!1),e._crudListeners),[t("div",{attrs:{slot:"header"},slot:"header"},[t("crud-search",{ref:"search",attrs:{options:e.crud.searchOptions},on:{submit:e.handleSearch}}),t("el-button-group",[t("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"Create",expression:"'Create'"}],attrs:{size:"small",type:"primary"},on:{click:e.addRow}},[t("i",{staticClass:"el-icon-plus"}),e._v(" 新增")])],1),t("crud-toolbar",{attrs:{search:e.crud.searchOptions.show,compact:e.crud.pageOptions.compact,columns:e.crud.columns},on:{"update:search":function(t){return e.$set(e.crud.searchOptions,"show",t)},"update:compact":function(t){return e.$set(e.crud.pageOptions,"compact",t)},refresh:function(t){return e.doRefresh()},"columns-filter-changed":e.handleColumnsFilterChanged}})],1)])],1)},a=[],o=(n("14d9"),n("b0c0"),n("9668")),s=n("cb12"),i=n("1fbf"),c={name:"dept",mixins:[i["d2CrudPlus"].crud],data:function(){return{}},methods:{getCrudOptions:function(){return Object(s["crudOptions"])(this)},pageRequest:function(e){return e.lazy=!0,o["GetList"](e)},addRequest:function(e){return i["d2CrudPlus"].util.dict.clear(),o["createObj"](e)},updateRequest:function(e){return i["d2CrudPlus"].util.dict.clear(),o["UpdateObj"](e)},delRequest:function(e){return o["DelObj"](e.id)},createPermission:function(e){this.$router.push({name:"menuButton",params:{id:e.row.id},query:{name:e.row.name}})}}},d=c,l=(n("0273"),n("2877")),u=Object(l["a"])(d,r,a,!1,null,null,null);t["default"]=u.exports},cb12:function(e,t,n){"use strict";n.r(t),n.d(t,"crudOptions",(function(){return a}));n("99af"),n("d3b7");var r=n("9668"),a=function(e){return{pageOptions:{compact:!0},options:{tableType:"vxe-table",stripe:!1,rowKey:!0,rowId:"id",height:"100%",highlightCurrentRow:!1,defaultExpandAll:!0,treeConfig:{lazy:!0,hasChild:"has_children",loadMethod:function(e){var t=e.row;return r["GetList"]({parent:t.id,lazy:!0}).then((function(e){return e.data.data}))},iconLoaded:"el-icon-loading"}},rowHandle:{width:140,view:{thin:!0,text:"",disabled:function(){return!e.hasPermissions("Retrieve")}},edit:{thin:!0,text:"",disabled:function(){return!e.hasPermissions("Update")}},remove:{thin:!0,text:"",disabled:function(){return!e.hasPermissions("Delete")}}},indexRow:{title:"序号",align:"center",width:100},viewOptions:{componentType:"form"},formOptions:{defaultSpan:12},columns:[{title:"关键词",key:"search",show:!1,disabled:!0,search:{disabled:!1},form:{disabled:!0,component:{props:{clearable:!0},placeholder:"请输入关键词"}},view:{disabled:!0}},{title:"ID",key:"id",show:!1,disabled:!0,width:90,form:{disabled:!0}},{show:!1,title:"上级部门",key:"parent",type:"tree-selector",dict:{isTree:!0,label:"name",value:"id",cache:!1,getData:function(e,t,n){n.form,n.component;return r["DeptLazy"]().then((function(e){return e.data}))},getNodes:function(t,n){return new Promise((function(t,n){var r=e.getEditRow();t(null!==r.parent?[{name:r.parent_name,id:r.parent}]:[])}))}},form:{helper:"默认留空为根节点",component:{span:12,props:{multiple:!1,elProps:{lazy:!0,hasChild:"has_children",load:function(e,t){r["DeptLazy"]({parent:e.data.id}).then((function(e){t(e.data)}))}}}}}},{title:"部门名称",key:"name",sortable:!0,treeNode:!0,search:{disabled:!1,component:{props:{clearable:!0}}},width:180,type:"input",form:{rules:[{required:!0,message:"部门名称必填项"}],component:{span:12,props:{clearable:!0},placeholder:"请输入部门名称"},itemProps:{class:{yxtInput:!0}}}},{title:"负责人",key:"owner",sortable:!0,form:{component:{span:12,props:{clearable:!0},placeholder:"请输入负责人"}}},{title:"联系电话",key:"phone",sortable:!0,form:{component:{span:12,props:{clearable:!0},placeholder:"请输入联系电话"}}},{title:"邮箱",key:"email",sortable:!0,form:{component:{span:12,props:{clearable:!0},placeholder:"请输入邮箱"},rules:[{type:"email",message:"请输入正确的邮箱地址",trigger:["blur","change"]}]}},{title:"排序",key:"sort",sortable:!0,width:80,type:"number",form:{value:1,component:{span:12,placeholder:"请选择序号"}}},{title:"状态",key:"status",sortable:!0,search:{disabled:!1},width:90,type:"radio",dict:{data:e.dictionary("button_status_bool")},form:{value:!0,component:{span:12,placeholder:"请选择状态"}}}].concat(e.commonEndColumns())}}},e658:function(e,t,n){}}]);