|  | @ -32,7 +32,7 @@ | 
		
	
		
			
				|  |  |     <el-dialog |  |  |     <el-dialog | 
		
	
		
			
				|  |  |       append-to-body |  |  |       append-to-body | 
		
	
		
			
				|  |  |       :close-on-click-modal="false" |  |  |       :close-on-click-modal="false" | 
		
	
		
			
				|  |  |       :before-close="crud.cancelCU" |  |  |  | 
		
	
		
			
				|  |  |  |  |  |       :show-close="false" | 
		
	
		
			
				|  |  |       :visible.sync="addDialogVisible" |  |  |       :visible.sync="addDialogVisible" | 
		
	
		
			
				|  |  |       title="新增菜单" |  |  |       title="新增菜单" | 
		
	
		
			
				|  |  |       width="580px" |  |  |       width="580px" | 
		
	
	
		
			
				|  | @ -69,7 +69,7 @@ | 
		
	
		
			
				|  |  |       </el-form> |  |  |       </el-form> | 
		
	
		
			
				|  |  |       <div slot="footer" class="dialog-footer"> |  |  |       <div slot="footer" class="dialog-footer"> | 
		
	
		
			
				|  |  |         <el-button :loading="crud.status.cu === 2" type="primary" round @click="crud.submitCU">添加</el-button> |  |  |         <el-button :loading="crud.status.cu === 2" type="primary" round @click="crud.submitCU">添加</el-button> | 
		
	
		
			
				|  |  |         <el-button round @click="crud.cancelCU">关闭</el-button> |  |  |  | 
		
	
		
			
				|  |  |  |  |  |         <el-button round @click="addDialogVisible=false">关闭</el-button> | 
		
	
		
			
				|  |  |       </div> |  |  |       </div> | 
		
	
		
			
				|  |  |     </el-dialog> |  |  |     </el-dialog> | 
		
	
		
			
				|  |  |     <!-- table --> |  |  |     <!-- table --> | 
		
	
	
		
			
				|  | @ -121,7 +121,7 @@ export default { | 
		
	
		
			
				|  |  |   name: 'Menu', |  |  |   name: 'Menu', | 
		
	
		
			
				|  |  |   components: { rrOperation, DateRangePicker }, |  |  |   components: { rrOperation, DateRangePicker }, | 
		
	
		
			
				|  |  |   cruds() { |  |  |   cruds() { | 
		
	
		
			
				|  |  |     return CRUD({ title: '菜单', url: 'api/menus', crudMethod: { ...crudMenu } }) |  |  |  | 
		
	
		
			
				|  |  |  |  |  |     return CRUD({ title: '菜单', url: 'api/menus', crudMethod: { ...crudMenu }}) | 
		
	
		
			
				|  |  |   }, |  |  |   }, | 
		
	
		
			
				|  |  |   mixins: [presenter(), header(), form(defaultForm), crud()], |  |  |   mixins: [presenter(), header(), form(defaultForm), crud()], | 
		
	
		
			
				|  |  |   data() { |  |  |   data() { | 
		
	
	
		
			
				|  | @ -206,7 +206,7 @@ export default { | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  |     getSupDepts(id) { |  |  |     getSupDepts(id) { | 
		
	
		
			
				|  |  |       crudMenu.getMenuSuperior(id).then(res => { |  |  |       crudMenu.getMenuSuperior(id).then(res => { | 
		
	
		
			
				|  |  |         const children = res.map(function (obj) { |  |  |  | 
		
	
		
			
				|  |  |  |  |  |         const children = res.map(function(obj) { | 
		
	
		
			
				|  |  |           if (!obj.leaf && !obj.children) { |  |  |           if (!obj.leaf && !obj.children) { | 
		
	
		
			
				|  |  |             obj.children = null |  |  |             obj.children = null | 
		
	
		
			
				|  |  |           } |  |  |           } | 
		
	
	
		
			
				|  | @ -218,7 +218,7 @@ export default { | 
		
	
		
			
				|  |  |     loadMenus({ action, parentNode, callback }) { |  |  |     loadMenus({ action, parentNode, callback }) { | 
		
	
		
			
				|  |  |       if (action === LOAD_CHILDREN_OPTIONS) { |  |  |       if (action === LOAD_CHILDREN_OPTIONS) { | 
		
	
		
			
				|  |  |         crudMenu.getMenusTree(parentNode.id).then(res => { |  |  |         crudMenu.getMenusTree(parentNode.id).then(res => { | 
		
	
		
			
				|  |  |           parentNode.children = res.map(function (obj) { |  |  |  | 
		
	
		
			
				|  |  |  |  |  |           parentNode.children = res.map(function(obj) { | 
		
	
		
			
				|  |  |             if (!obj.leaf) { |  |  |             if (!obj.leaf) { | 
		
	
		
			
				|  |  |               obj.children = null |  |  |               obj.children = null | 
		
	
		
			
				|  |  |             } |  |  |             } | 
		
	
	
		
			
				|  | 
 |