提交 5b04ae3c 编写于 作者: ibizdev's avatar ibizdev

ibizdev提交

上级 5a9deef4
...@@ -69,6 +69,7 @@ import AppImagePreview from './components/app-image-preview/app-image-preview.vu ...@@ -69,6 +69,7 @@ import AppImagePreview from './components/app-image-preview/app-image-preview.vu
import AppFormatData from './components/app-format-data/app-format-data.vue' import AppFormatData from './components/app-format-data/app-format-data.vue'
import AppUploadFileInfo from './components/app-upload-file-info/app-upload-file-info.vue' import AppUploadFileInfo from './components/app-upload-file-info/app-upload-file-info.vue'
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'
// 全局挂载UI实体服务注册中心 // 全局挂载UI实体服务注册中心
window['uiServiceRegister'] = uiServiceRegister; window['uiServiceRegister'] = uiServiceRegister;
...@@ -147,5 +148,6 @@ export const AppComponents = { ...@@ -147,5 +148,6 @@ export const AppComponents = {
v.component('app-format-data', AppFormatData); v.component('app-format-data', AppFormatData);
v.component('app-upload-file-info', AppUploadFileInfo); v.component('app-upload-file-info', AppUploadFileInfo);
v.component('context-menu',ContextMenu); v.component('context-menu',ContextMenu);
v.component('app-column-format',AppColumnFormat);
}, },
}; };
\ No newline at end of file
.app-column-format{
display: inline-block;
}
\ No newline at end of file
<template>
<div class="app-column-format">
{{text}}
</div>
</template>
<script lang="ts">
import { Vue, Component, Prop, Model, Emit, Watch } from "vue-property-decorator";
/**
* 表格列格式化json数组,数据格式为"[{"srfkey":"001","srfmajortext":"TEST1"},{"srfkey":"002","srfmajortext":"TEST2"}......]"
*/
@Component({
})
export default class AppColumnFormat extends Vue {
/**
* 值
* @type {any}
* @memberof AppColumnFormat
*/
@Prop() public value?: any;
/**
* 显示文本
* @type {any}
* @memberof AppColumnFormat
*/
get text(){
if(this.value){
let returnStr:string = "";
let tempData:Array<any> =[];
if(typeof(this.value) === 'string'){
tempData= JSON.parse(this.value);
}else{
tempData = JSON.parse(JSON.stringify(this.value));
}
tempData.forEach((item:any,index:number) =>{
if(index >0){
returnStr +="、";
}
returnStr +=item.srfmajortext;
})
return returnStr;
}else{
return "";
}
}
}
</script>
<style lang='less'>
@import "./app-column-format.less";
</style>
\ No newline at end of file
...@@ -133,8 +133,12 @@ export default class Login extends Vue { ...@@ -133,8 +133,12 @@ export default class Login extends Vue {
post.then((response: any) => { post.then((response: any) => {
if (response && response.status === 200) { if (response && response.status === 200) {
const data = response.data; const data = response.data;
localStorage.setItem('token', data.token); if(data && data.token){
localStorage.setItem('user', JSON.stringify(data.user)); localStorage.setItem('token', data.token);
}
if(data && data.user){
localStorage.setItem('user', JSON.stringify(data.user));
}
const url: any = this.$route.query.redirect ? this.$route.query.redirect : '*'; const url: any = this.$route.query.redirect ? this.$route.query.redirect : '*';
this.$router.push({ path: url }); this.$router.push({ path: url });
} }
......
...@@ -53,8 +53,18 @@ export class AuthGuard { ...@@ -53,8 +53,18 @@ export class AuthGuard {
const get: Promise<any> = Http.getInstance().get(url); const get: Promise<any> = Http.getInstance().get(url);
get.then((response: any) => { get.then((response: any) => {
if (response && response.status === 200) { if (response && response.status === 200) {
const { data }: { data: any } = response; let { data }: { data: any } = response;
if (data) { if (data) {
// token认证把用户信息放入应用级数据
if(localStorage.getItem('user')){
let user:any = JSON.parse(localStorage.getItem('user') as string);
let localAppData:any = {};
if(user.sessionParams){
localAppData = {context:user.sessionParams};
Object.assign(localAppData,data);
}
data = JSON.parse(JSON.stringify(localAppData));
}
router.app.$store.commit('addAppData', data); router.app.$store.commit('addAppData', data);
// 提交统一资源数据 // 提交统一资源数据
router.app.$store.dispatch('unifiedresource/commitResourceData', data); router.app.$store.dispatch('unifiedresource/commitResourceData', data);
......
...@@ -13,6 +13,9 @@ ...@@ -13,6 +13,9 @@
@row-class-name="onRowClassName($event)" @row-class-name="onRowClassName($event)"
@row-dblclick="rowDBLClick($event)" @row-dblclick="rowDBLClick($event)"
ref='multipleTable' :data="items" :show-header="!isHideHeader"> ref='multipleTable' :data="items" :show-header="!isHideHeader">
<template slot="empty">
无数据
</template>
<template v-if="!isSingleSelect"> <template v-if="!isSingleSelect">
<el-table-column align="center" type='selection' :width="checkboxColWidth"></el-table-column> <el-table-column align="center" type='selection' :width="checkboxColWidth"></el-table-column>
</template> </template>
...@@ -100,6 +103,8 @@ ...@@ -100,6 +103,8 @@
</div> </div>
</poptip> </poptip>
</span> </span>
<span class="batch-toolbar">
</span>
<span class="page-button"><i-button icon="md-refresh" :title="$t('app.gridpage.refresh')" @click="pageRefresh()"></i-button></span>&nbsp; <span class="page-button"><i-button icon="md-refresh" :title="$t('app.gridpage.refresh')" @click="pageRefresh()"></i-button></span>&nbsp;
<span> <span>
{{$t('app.gridpage.show')}}&nbsp; {{$t('app.gridpage.show')}}&nbsp;
......
...@@ -13,6 +13,9 @@ ...@@ -13,6 +13,9 @@
@row-class-name="onRowClassName($event)" @row-class-name="onRowClassName($event)"
@row-dblclick="rowDBLClick($event)" @row-dblclick="rowDBLClick($event)"
ref='multipleTable' :data="items" :show-header="!isHideHeader"> ref='multipleTable' :data="items" :show-header="!isHideHeader">
<template slot="empty">
无数据
</template>
<template v-if="!isSingleSelect"> <template v-if="!isSingleSelect">
<el-table-column align="center" type='selection' :width="checkboxColWidth"></el-table-column> <el-table-column align="center" type='selection' :width="checkboxColWidth"></el-table-column>
</template> </template>
...@@ -116,6 +119,8 @@ ...@@ -116,6 +119,8 @@
</div> </div>
</poptip> </poptip>
</span> </span>
<span class="batch-toolbar">
</span>
<span class="page-button"><i-button icon="md-refresh" :title="$t('app.gridpage.refresh')" @click="pageRefresh()"></i-button></span>&nbsp; <span class="page-button"><i-button icon="md-refresh" :title="$t('app.gridpage.refresh')" @click="pageRefresh()"></i-button></span>&nbsp;
<span> <span>
{{$t('app.gridpage.show')}}&nbsp; {{$t('app.gridpage.show')}}&nbsp;
......
...@@ -13,6 +13,9 @@ ...@@ -13,6 +13,9 @@
@row-class-name="onRowClassName($event)" @row-class-name="onRowClassName($event)"
@row-dblclick="rowDBLClick($event)" @row-dblclick="rowDBLClick($event)"
ref='multipleTable' :data="items" :show-header="!isHideHeader"> ref='multipleTable' :data="items" :show-header="!isHideHeader">
<template slot="empty">
无数据
</template>
<template v-if="!isSingleSelect"> <template v-if="!isSingleSelect">
<el-table-column align="center" type='selection' :width="checkboxColWidth"></el-table-column> <el-table-column align="center" type='selection' :width="checkboxColWidth"></el-table-column>
</template> </template>
...@@ -93,6 +96,8 @@ ...@@ -93,6 +96,8 @@
</div> </div>
</poptip> </poptip>
</span> </span>
<span class="batch-toolbar">
</span>
<span class="page-button"><i-button icon="md-refresh" :title="$t('app.gridpage.refresh')" @click="pageRefresh()"></i-button></span>&nbsp; <span class="page-button"><i-button icon="md-refresh" :title="$t('app.gridpage.refresh')" @click="pageRefresh()"></i-button></span>&nbsp;
<span> <span>
{{$t('app.gridpage.show')}}&nbsp; {{$t('app.gridpage.show')}}&nbsp;
......
...@@ -44,13 +44,11 @@ import org.springframework.util.StringUtils; ...@@ -44,13 +44,11 @@ import org.springframework.util.StringUtils;
@Service("IBZDepartmentServiceImpl") @Service("IBZDepartmentServiceImpl")
public class IBZDepartmentServiceImpl extends ServiceImpl<IBZDepartmentMapper, IBZDepartment> implements IIBZDepartmentService { public class IBZDepartmentServiceImpl extends ServiceImpl<IBZDepartmentMapper, IBZDepartment> implements IIBZDepartmentService {
@Autowired
@Lazy private cn.ibizlab.core.ou.service.IIBZDepartmentService ibzdepartmentService = this;
private cn.ibizlab.core.ou.service.IIBZDepartmentService ibzdepartmentService;
@Autowired @Autowired
@Lazy @Lazy
private cn.ibizlab.core.ou.service.IIBZEmployeeService ibzemployeeService; private cn.ibizlab.core.ou.service.IIBZEmployeeService ibzemployeeService;
@Autowired @Autowired
@Lazy @Lazy
private cn.ibizlab.core.ou.service.IIBZOrganizationService ibzorganizationService; private cn.ibizlab.core.ou.service.IIBZOrganizationService ibzorganizationService;
...@@ -69,6 +67,7 @@ public class IBZDepartmentServiceImpl extends ServiceImpl<IBZDepartmentMapper, I ...@@ -69,6 +67,7 @@ public class IBZDepartmentServiceImpl extends ServiceImpl<IBZDepartmentMapper, I
@Override @Override
public void createBatch(List<IBZDepartment> list) { public void createBatch(List<IBZDepartment> list) {
list.forEach(item->fillParentData(item));
saveBatch(list,batchSize); saveBatch(list,batchSize);
} }
...@@ -107,6 +106,7 @@ public class IBZDepartmentServiceImpl extends ServiceImpl<IBZDepartmentMapper, I ...@@ -107,6 +106,7 @@ public class IBZDepartmentServiceImpl extends ServiceImpl<IBZDepartmentMapper, I
@Override @Override
public void saveBatch(List<IBZDepartment> list) { public void saveBatch(List<IBZDepartment> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize); saveOrUpdateBatch(list,batchSize);
} }
...@@ -117,6 +117,7 @@ public class IBZDepartmentServiceImpl extends ServiceImpl<IBZDepartmentMapper, I ...@@ -117,6 +117,7 @@ public class IBZDepartmentServiceImpl extends ServiceImpl<IBZDepartmentMapper, I
@Override @Override
public IBZDepartment getDraft(IBZDepartment et) { public IBZDepartment getDraft(IBZDepartment et) {
fillParentData(et);
return et; return et;
} }
...@@ -144,6 +145,7 @@ public class IBZDepartmentServiceImpl extends ServiceImpl<IBZDepartmentMapper, I ...@@ -144,6 +145,7 @@ public class IBZDepartmentServiceImpl extends ServiceImpl<IBZDepartmentMapper, I
@Override @Override
public void updateBatch(List<IBZDepartment> list) { public void updateBatch(List<IBZDepartment> list) {
list.forEach(item->fillParentData(item));
updateBatchById(list,batchSize); updateBatchById(list,batchSize);
} }
......
...@@ -44,7 +44,6 @@ import org.springframework.util.StringUtils; ...@@ -44,7 +44,6 @@ import org.springframework.util.StringUtils;
@Service("IBZEmployeeServiceImpl") @Service("IBZEmployeeServiceImpl")
public class IBZEmployeeServiceImpl extends ServiceImpl<IBZEmployeeMapper, IBZEmployee> implements IIBZEmployeeService { public class IBZEmployeeServiceImpl extends ServiceImpl<IBZEmployeeMapper, IBZEmployee> implements IIBZEmployeeService {
@Autowired @Autowired
@Lazy @Lazy
private cn.ibizlab.core.ou.service.IIBZDepartmentService ibzdepartmentService; private cn.ibizlab.core.ou.service.IIBZDepartmentService ibzdepartmentService;
...@@ -85,6 +84,7 @@ public class IBZEmployeeServiceImpl extends ServiceImpl<IBZEmployeeMapper, IBZEm ...@@ -85,6 +84,7 @@ public class IBZEmployeeServiceImpl extends ServiceImpl<IBZEmployeeMapper, IBZEm
@Override @Override
public void createBatch(List<IBZEmployee> list) { public void createBatch(List<IBZEmployee> list) {
list.forEach(item->fillParentData(item));
saveBatch(list,batchSize); saveBatch(list,batchSize);
} }
...@@ -105,6 +105,7 @@ public class IBZEmployeeServiceImpl extends ServiceImpl<IBZEmployeeMapper, IBZEm ...@@ -105,6 +105,7 @@ public class IBZEmployeeServiceImpl extends ServiceImpl<IBZEmployeeMapper, IBZEm
@Override @Override
public void updateBatch(List<IBZEmployee> list) { public void updateBatch(List<IBZEmployee> list) {
list.forEach(item->fillParentData(item));
updateBatchById(list,batchSize); updateBatchById(list,batchSize);
} }
...@@ -130,6 +131,7 @@ public class IBZEmployeeServiceImpl extends ServiceImpl<IBZEmployeeMapper, IBZEm ...@@ -130,6 +131,7 @@ public class IBZEmployeeServiceImpl extends ServiceImpl<IBZEmployeeMapper, IBZEm
@Override @Override
public void saveBatch(List<IBZEmployee> list) { public void saveBatch(List<IBZEmployee> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize); saveOrUpdateBatch(list,batchSize);
} }
...@@ -148,6 +150,7 @@ public class IBZEmployeeServiceImpl extends ServiceImpl<IBZEmployeeMapper, IBZEm ...@@ -148,6 +150,7 @@ public class IBZEmployeeServiceImpl extends ServiceImpl<IBZEmployeeMapper, IBZEm
@Override @Override
public IBZEmployee getDraft(IBZEmployee et) { public IBZEmployee getDraft(IBZEmployee et) {
fillParentData(et);
return et; return et;
} }
......
...@@ -50,10 +50,8 @@ public class IBZOrganizationServiceImpl extends ServiceImpl<IBZOrganizationMappe ...@@ -50,10 +50,8 @@ public class IBZOrganizationServiceImpl extends ServiceImpl<IBZOrganizationMappe
@Autowired @Autowired
@Lazy @Lazy
private cn.ibizlab.core.ou.service.IIBZEmployeeService ibzemployeeService; private cn.ibizlab.core.ou.service.IIBZEmployeeService ibzemployeeService;
@Autowired
@Lazy
private cn.ibizlab.core.ou.service.IIBZOrganizationService ibzorganizationService;
private cn.ibizlab.core.ou.service.IIBZOrganizationService ibzorganizationService = this;
private int batchSize = 500; private int batchSize = 500;
...@@ -74,6 +72,7 @@ public class IBZOrganizationServiceImpl extends ServiceImpl<IBZOrganizationMappe ...@@ -74,6 +72,7 @@ public class IBZOrganizationServiceImpl extends ServiceImpl<IBZOrganizationMappe
@Override @Override
public void updateBatch(List<IBZOrganization> list) { public void updateBatch(List<IBZOrganization> list) {
list.forEach(item->fillParentData(item));
updateBatchById(list,batchSize); updateBatchById(list,batchSize);
} }
...@@ -89,6 +88,7 @@ public class IBZOrganizationServiceImpl extends ServiceImpl<IBZOrganizationMappe ...@@ -89,6 +88,7 @@ public class IBZOrganizationServiceImpl extends ServiceImpl<IBZOrganizationMappe
@Override @Override
public void createBatch(List<IBZOrganization> list) { public void createBatch(List<IBZOrganization> list) {
list.forEach(item->fillParentData(item));
saveBatch(list,batchSize); saveBatch(list,batchSize);
} }
...@@ -114,6 +114,7 @@ public class IBZOrganizationServiceImpl extends ServiceImpl<IBZOrganizationMappe ...@@ -114,6 +114,7 @@ public class IBZOrganizationServiceImpl extends ServiceImpl<IBZOrganizationMappe
@Override @Override
public void saveBatch(List<IBZOrganization> list) { public void saveBatch(List<IBZOrganization> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize); saveOrUpdateBatch(list,batchSize);
} }
...@@ -144,6 +145,7 @@ public class IBZOrganizationServiceImpl extends ServiceImpl<IBZOrganizationMappe ...@@ -144,6 +145,7 @@ public class IBZOrganizationServiceImpl extends ServiceImpl<IBZOrganizationMappe
@Override @Override
public IBZOrganization getDraft(IBZOrganization et) { public IBZOrganization getDraft(IBZOrganization et) {
fillParentData(et);
return et; return et;
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册