提交 48635f8c 编写于 作者: ibizdev's avatar ibizdev

lab_qyk 发布系统代码

上级 f14f4ed8
...@@ -71,6 +71,7 @@ import AppUploadFileInfo from './components/app-upload-file-info/app-upload-file ...@@ -71,6 +71,7 @@ import AppUploadFileInfo from './components/app-upload-file-info/app-upload-file
import ContextMenu from './components/context-menu/context-menu' import ContextMenu from './components/context-menu/context-menu'
import AppColumnFormat from './components/app-column-format/app-column-format.vue' import AppColumnFormat from './components/app-column-format/app-column-format.vue'
import AppQuickGroup from './components/app-quick-group/app-quick-group.vue' import AppQuickGroup from './components/app-quick-group/app-quick-group.vue'
import AppOrgSelect from './components/app-org-select/app-org-select.vue'
// 全局挂载UI实体服务注册中心 // 全局挂载UI实体服务注册中心
window['uiServiceRegister'] = uiServiceRegister; window['uiServiceRegister'] = uiServiceRegister;
...@@ -151,5 +152,6 @@ export const AppComponents = { ...@@ -151,5 +152,6 @@ export const AppComponents = {
v.component('context-menu',ContextMenu); v.component('context-menu',ContextMenu);
v.component('app-column-format',AppColumnFormat); v.component('app-column-format',AppColumnFormat);
v.component('app-quick-group',AppQuickGroup); v.component('app-quick-group',AppQuickGroup);
v.component('app-org-select',AppOrgSelect);
}, },
}; };
\ No newline at end of file
.app-org-select {
width: 100%;
}
\ No newline at end of file
<template>
<div class="app-org-select">
<ibiz-select-tree :NodesData="NodesData" v-model="selectTreeValue" :multiple="true"></ibiz-select-tree>
</div>
</template>
<script lang = 'ts'>
import { Vue, Component, Prop } from "vue-property-decorator";
@Component({})
export default class AppOrgSelect extends Vue {
/**
* 填充对象
*
* @memberof AppOrgSelect
*/
@Prop() public fillMap:any;
/**
* 过滤项
*
* @memberof AppOrgSelect
*/
@Prop() public filter?:string;
/**
* 选择值
*
* @memberof AppOrgSelect
*/
public selectTreeValue:any;
/**
* 树数据
*
* @memberof AppOrgSelect
*/
public NodesData:any =[{"children":[],"disabled":false,"isLeaf":true,"id":"001","label":"中建材信息技术股份有限公司","code":"001","level":null,"filter":["001"]},{"children":[{"children":[],"disabled":false,"isLeaf":true,"id":"450100","label":"北京","code":"450100","level":4501,"filter":["450000","450100"]},{"children":[],"disabled":false,"isLeaf":true,"id":"450200","label":"上海","code":"450200","level":null,"filter":["450000","450200"]}],"disabled":false,"isLeaf":false,"id":"450000","label":"总部","code":"450000","level":45,"filter":["450000"]},{"children":[],"disabled":false,"isLeaf":true,"id":"002","label":"某某客户公司","code":"002","level":null,"filter":["002"]}];
/**
* vue生命周期
*
* @memberof AppOrgSelect
*/
public created(){
console.log(this.fillMap);
console.log(this.filter);
}
}
</script>
<style lang="less">
@import "./app-org-select.less";
</style>
\ No newline at end of file
...@@ -10,6 +10,7 @@ import org.springframework.boot.SpringApplication; ...@@ -10,6 +10,7 @@ import org.springframework.boot.SpringApplication;
import org.springframework.cloud.openfeign.EnableFeignClients; import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.web.method.support.HandlerMethodArgumentResolver; import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
import org.springframework.context.annotation.ComponentScan;
import java.util.List; import java.util.List;
@Slf4j @Slf4j
...@@ -20,6 +21,11 @@ import java.util.List; ...@@ -20,6 +21,11 @@ import java.util.List;
@SpringBootApplication(exclude = { @SpringBootApplication(exclude = {
org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration.class, org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration.class,
}) })
@ComponentScan(basePackages = {"cn.ibizlab"}
// ,excludeFilters={
// @ComponentScan.Filter(type= org.springframework.context.annotation.FilterType.REGEX,pattern="cn.ibizlab.xxx.rest.xxx"),
// }
)
@Import({ @Import({
org.springframework.cloud.openfeign.FeignClientsConfiguration.class org.springframework.cloud.openfeign.FeignClientsConfiguration.class
}) })
......
...@@ -97,7 +97,7 @@ public class IBZDepartmentResource { ...@@ -97,7 +97,7 @@ public class IBZDepartmentResource {
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDepartment-CheckKey-all')") @PreAuthorize("hasPermission('','checkkey',{'Sql',this.ibzdepartmentMapping,#ibzdepartmentdto})")
@ApiOperation(value = "CheckKey", tags = {"IBZDepartment" }, notes = "CheckKey") @ApiOperation(value = "CheckKey", tags = {"IBZDepartment" }, notes = "CheckKey")
@RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/checkkey") @RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/checkkey")
public ResponseEntity<Boolean> checkKey(@RequestBody IBZDepartmentDTO ibzdepartmentdto) { public ResponseEntity<Boolean> checkKey(@RequestBody IBZDepartmentDTO ibzdepartmentdto) {
......
...@@ -100,7 +100,7 @@ public class IBZEmployeeResource { ...@@ -100,7 +100,7 @@ public class IBZEmployeeResource {
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZEmployee-CheckKey-all')") @PreAuthorize("hasPermission('','checkkey',{'Sql',this.ibzemployeeMapping,#ibzemployeedto})")
@ApiOperation(value = "CheckKey", tags = {"IBZEmployee" }, notes = "CheckKey") @ApiOperation(value = "CheckKey", tags = {"IBZEmployee" }, notes = "CheckKey")
@RequestMapping(method = RequestMethod.POST, value = "/ibzemployees/checkkey") @RequestMapping(method = RequestMethod.POST, value = "/ibzemployees/checkkey")
public ResponseEntity<Boolean> checkKey(@RequestBody IBZEmployeeDTO ibzemployeedto) { public ResponseEntity<Boolean> checkKey(@RequestBody IBZEmployeeDTO ibzemployeedto) {
......
...@@ -54,7 +54,7 @@ public class IBZOrganizationResource { ...@@ -54,7 +54,7 @@ public class IBZOrganizationResource {
public IBZOrganizationDTO permissionDTO=new IBZOrganizationDTO(); public IBZOrganizationDTO permissionDTO=new IBZOrganizationDTO();
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZOrganization-CheckKey-all')") @PreAuthorize("hasPermission('','checkkey',{'Sql',this.ibzorganizationMapping,#ibzorganizationdto})")
@ApiOperation(value = "CheckKey", tags = {"IBZOrganization" }, notes = "CheckKey") @ApiOperation(value = "CheckKey", tags = {"IBZOrganization" }, notes = "CheckKey")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/checkkey") @RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/checkkey")
public ResponseEntity<Boolean> checkKey(@RequestBody IBZOrganizationDTO ibzorganizationdto) { public ResponseEntity<Boolean> checkKey(@RequestBody IBZOrganizationDTO ibzorganizationdto) {
......
package cn.ibizlab.util.web;
import feign.RequestInterceptor;
import feign.RequestTemplate;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import java.util.Enumeration;
/**
* feign请求拦截器
* 拦截所有使用feign发出的请求,附加原始请求Header参数及Token
*/
@Configuration
public class FeignRequestInterceptor implements RequestInterceptor {
private final Logger logger = LoggerFactory.getLogger(getClass());
@Override
public void apply(RequestTemplate requestTemplate) {
ServletRequestAttributes requestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
if(requestAttributes!=null){
HttpServletRequest request = requestAttributes.getRequest();
Enumeration<String> headerNames = request.getHeaderNames();
if (headerNames != null) {
while (headerNames.hasMoreElements()) {
String name = headerNames.nextElement();
String values = request.getHeader(name);
requestTemplate.header(name, values);
}
logger.info("feign interceptor header:{}",requestTemplate);
}
}
}
}
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册