提交 50b83c3f 编写于 作者: ibizdev's avatar ibizdev

ibizdev提交

上级 3a642075
......@@ -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 AppUploadFileInfo from './components/app-upload-file-info/app-upload-file-info.vue'
import ContextMenu from './components/context-menu/context-menu'
import AppColumnFormat from './components/app-column-format/app-column-format.vue'
// 全局挂载UI实体服务注册中心
window['uiServiceRegister'] = uiServiceRegister;
......@@ -147,5 +148,6 @@ export const AppComponents = {
v.component('app-format-data', AppFormatData);
v.component('app-upload-file-info', AppUploadFileInfo);
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 {
post.then((response: any) => {
if (response && response.status === 200) {
const data = response.data;
localStorage.setItem('token', data.token);
localStorage.setItem('user', JSON.stringify(data.user));
if(data && data.token){
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 : '*';
this.$router.push({ path: url });
}
......
......@@ -53,8 +53,18 @@ export class AuthGuard {
const get: Promise<any> = Http.getInstance().get(url);
get.then((response: any) => {
if (response && response.status === 200) {
const { data }: { data: any } = response;
let { data }: { data: any } = response;
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.dispatch('unifiedresource/commitResourceData', data);
......
......@@ -13,6 +13,9 @@
@row-class-name="onRowClassName($event)"
@row-dblclick="rowDBLClick($event)"
ref='multipleTable' :data="items" :show-header="!isHideHeader">
<template slot="empty">
无数据
</template>
<template v-if="!isSingleSelect">
<el-table-column align="center" type='selection' :width="checkboxColWidth"></el-table-column>
</template>
......@@ -67,6 +70,8 @@
</div>
</poptip>
</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>
{{$t('app.gridpage.show')}}&nbsp;
......
......@@ -13,6 +13,9 @@
@row-class-name="onRowClassName($event)"
@row-dblclick="rowDBLClick($event)"
ref='multipleTable' :data="items" :show-header="!isHideHeader">
<template slot="empty">
无数据
</template>
<template v-if="!isSingleSelect">
<el-table-column align="center" type='selection' :width="checkboxColWidth"></el-table-column>
</template>
......@@ -72,6 +75,8 @@
</div>
</poptip>
</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>
{{$t('app.gridpage.show')}}&nbsp;
......
......@@ -13,6 +13,9 @@
@row-class-name="onRowClassName($event)"
@row-dblclick="rowDBLClick($event)"
ref='multipleTable' :data="items" :show-header="!isHideHeader">
<template slot="empty">
无数据
</template>
<template v-if="!isSingleSelect">
<el-table-column align="center" type='selection' :width="checkboxColWidth"></el-table-column>
</template>
......@@ -65,6 +68,8 @@
</div>
</poptip>
</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>
{{$t('app.gridpage.show')}}&nbsp;
......
......@@ -13,6 +13,9 @@
@row-class-name="onRowClassName($event)"
@row-dblclick="rowDBLClick($event)"
ref='multipleTable' :data="items" :show-header="!isHideHeader">
<template slot="empty">
无数据
</template>
<template v-if="!isSingleSelect">
<el-table-column align="center" type='selection' :width="checkboxColWidth"></el-table-column>
</template>
......@@ -72,6 +75,8 @@
</div>
</poptip>
</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>
{{$t('app.gridpage.show')}}&nbsp;
......
......@@ -13,6 +13,9 @@
@row-class-name="onRowClassName($event)"
@row-dblclick="rowDBLClick($event)"
ref='multipleTable' :data="items" :show-header="!isHideHeader">
<template slot="empty">
无数据
</template>
<template v-if="!isSingleSelect">
<el-table-column align="center" type='selection' :width="checkboxColWidth"></el-table-column>
</template>
......@@ -58,6 +61,8 @@
</div>
</poptip>
</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>
{{$t('app.gridpage.show')}}&nbsp;
......
......@@ -48,7 +48,6 @@ public class SYS_PERMISSIONServiceImpl extends ServiceImpl<SYS_PERMISSIONMapper,
@Lazy
private cn.ibizlab.core.uaa.service.ISYS_ROLE_PERMISSIONService sysRolePermissionService;
private int batchSize = 500;
@Override
......
......@@ -45,7 +45,6 @@ import org.springframework.util.StringUtils;
public class SYS_PSAPPMENUITEMServiceImpl extends ServiceImpl<SYS_PSAPPMENUITEMMapper, SYS_PSAPPMENUITEM> implements ISYS_PSAPPMENUITEMService {
private int batchSize = 500;
@Override
......
......@@ -45,7 +45,6 @@ import org.springframework.util.StringUtils;
public class SYS_PSDEOPPRIVServiceImpl extends ServiceImpl<SYS_PSDEOPPRIVMapper, SYS_PSDEOPPRIV> implements ISYS_PSDEOPPRIVService {
private int batchSize = 500;
@Override
......
......@@ -45,7 +45,6 @@ import org.springframework.util.StringUtils;
public class SYS_PSSYSTEMServiceImpl extends ServiceImpl<SYS_PSSYSTEMMapper, SYS_PSSYSTEM> implements ISYS_PSSYSTEMService {
private int batchSize = 500;
@Override
......
......@@ -45,7 +45,6 @@ import org.springframework.util.StringUtils;
public class SYS_PSSYSUNIRESServiceImpl extends ServiceImpl<SYS_PSSYSUNIRESMapper, SYS_PSSYSUNIRES> implements ISYS_PSSYSUNIRESService {
private int batchSize = 500;
@Override
......
......@@ -51,7 +51,6 @@ public class SYS_ROLEServiceImpl extends ServiceImpl<SYS_ROLEMapper, SYS_ROLE> i
@Lazy
private cn.ibizlab.core.uaa.service.ISYS_USER_ROLEService sysUserRoleService;
private int batchSize = 500;
@Override
......
......@@ -44,7 +44,6 @@ import org.springframework.util.StringUtils;
@Service("SYS_ROLE_PERMISSIONServiceImpl")
public class SYS_ROLE_PERMISSIONServiceImpl extends ServiceImpl<SYS_ROLE_PERMISSIONMapper, SYS_ROLE_PERMISSION> implements ISYS_ROLE_PERMISSIONService {
@Autowired
@Lazy
private cn.ibizlab.core.uaa.service.ISYS_PERMISSIONService sysPermissionService;
......@@ -81,6 +80,7 @@ public class SYS_ROLE_PERMISSIONServiceImpl extends ServiceImpl<SYS_ROLE_PERMISS
@Override
public SYS_ROLE_PERMISSION getDraft(SYS_ROLE_PERMISSION et) {
fillParentData(et);
return et;
}
......@@ -96,6 +96,7 @@ public class SYS_ROLE_PERMISSIONServiceImpl extends ServiceImpl<SYS_ROLE_PERMISS
@Override
public void createBatch(List<SYS_ROLE_PERMISSION> list) {
list.forEach(item->fillParentData(item));
saveBatch(list,batchSize);
}
......@@ -126,6 +127,7 @@ public class SYS_ROLE_PERMISSIONServiceImpl extends ServiceImpl<SYS_ROLE_PERMISS
@Override
public void saveBatch(List<SYS_ROLE_PERMISSION> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
}
......@@ -141,6 +143,7 @@ public class SYS_ROLE_PERMISSIONServiceImpl extends ServiceImpl<SYS_ROLE_PERMISS
@Override
public void updateBatch(List<SYS_ROLE_PERMISSION> list) {
list.forEach(item->fillParentData(item));
updateBatchById(list,batchSize);
}
......
......@@ -48,7 +48,6 @@ public class SYS_USERServiceImpl extends ServiceImpl<SYS_USERMapper, SYS_USER> i
@Lazy
private cn.ibizlab.core.uaa.service.ISYS_USER_ROLEService sysUserRoleService;
private int batchSize = 500;
@Override
......
......@@ -44,7 +44,6 @@ import org.springframework.util.StringUtils;
@Service("SYS_USER_ROLEServiceImpl")
public class SYS_USER_ROLEServiceImpl extends ServiceImpl<SYS_USER_ROLEMapper, SYS_USER_ROLE> implements ISYS_USER_ROLEService {
@Autowired
@Lazy
private cn.ibizlab.core.uaa.service.ISYS_ROLEService sysRoleService;
......@@ -61,6 +60,7 @@ public class SYS_USER_ROLEServiceImpl extends ServiceImpl<SYS_USER_ROLEMapper, S
@Override
public SYS_USER_ROLE getDraft(SYS_USER_ROLE et) {
fillParentData(et);
return et;
}
......@@ -76,6 +76,7 @@ public class SYS_USER_ROLEServiceImpl extends ServiceImpl<SYS_USER_ROLEMapper, S
@Override
public void updateBatch(List<SYS_USER_ROLE> list) {
list.forEach(item->fillParentData(item));
updateBatchById(list,batchSize);
}
......@@ -103,6 +104,7 @@ public class SYS_USER_ROLEServiceImpl extends ServiceImpl<SYS_USER_ROLEMapper, S
@Override
public void createBatch(List<SYS_USER_ROLE> list) {
list.forEach(item->fillParentData(item));
saveBatch(list,batchSize);
}
......@@ -141,6 +143,7 @@ public class SYS_USER_ROLEServiceImpl extends ServiceImpl<SYS_USER_ROLEMapper, S
@Override
public void saveBatch(List<SYS_USER_ROLE> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册