提交 96e5da7a 编写于 作者: ibizdev's avatar ibizdev

ibizdev提交

上级 4a939960
*target
.settings
*node_modules
*bin
*.project
*.classpath
......
.app-file-upload{
.upload-col{
text-align: center;
.button-preview{
padding: 8px 15px 8.5px 15px;
.ivu-badge{
margin-left: 2px;
.ivu-badge-count{
height: auto;
min-width: auto;
line-height: unset;
padding: 0 4px;
}
}
}
}
}
.upload-preview-modal{
.ivu-modal{
height: 86%;
.ivu-modal-content{
height: 100%;
overflow-y: scroll;
.preview-file-list-item{
margin: 0 8px 8px 0;
display: inline-block;
position: relative;
}
.preview-file-list-img{
display: inline-block;
position: relative;
}
.file-name{
text-align: center;
}
.preview-file-list-actions{
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
font-size: 20px;
text-align: center;
color: #fff;
opacity: 0;
transition: opacity .3s;
}
.preview-file-list-actions:hover{
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
font-size: 20px;
text-align: center;
color: #fff;
opacity: 1;
background-color: rgba(0,0,0,.5);
}
.preview-file-list-actions::after{
display: inline-block;
content: "";
height: 100%;
vertical-align: middle;
}
.action-delete{
margin-left:15px;
}
}
}
}
\ No newline at end of file
<template>
<el-upload
:disabled="disabled"
:file-list="files"
:action="uploadUrl"
:headers="{}"
:before-upload="beforeUpload"
:before-remove="onRemove"
:on-success="onSuccess"
:on-error="onError"
:on-preview="onDownload"
:drag="isdrag"
>
<el-button v-if="!isdrag" size='small' icon='el-icon-upload' :disabled="disabled">{{this.$t('app.fileUpload.caption')}}</el-button>
<i v-if="isdrag" class="el-icon-upload"></i>
<div v-if="isdrag" class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
</el-upload>
<div class="app-file-upload">
<el-row>
<el-col v-if="rowPreview && files.length > 0" :span="12" class="upload-col">
<el-button size='small' class="button-preview" icon='el-icon-view' :disabled="disabled" @click="()=>{this.dialogVisible = true;}">查看<Badge :count="files.length" type="info"></Badge></el-button>
</el-col>
<el-col :span="(rowPreview && files.length > 0) ? 12 : 24" class="upload-col">
<el-upload
:disabled="disabled"
:file-list="files"
:action="uploadUrl"
:headers="{}"
:before-upload="beforeUpload"
:before-remove="onRemove"
:on-success="onSuccess"
:on-error="onError"
:on-preview="onDownload"
:drag="isdrag"
:show-file-list="!rowPreview"
>
<el-button v-if="!isdrag" size='small' icon='el-icon-upload' :disabled="disabled">{{this.$t('app.fileUpload.caption')}}</el-button>
<i v-if="isdrag" class="el-icon-upload"></i>
<div v-if="isdrag" class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
</el-upload>
</el-col>
</el-row>
<modal width="80%" v-model="dialogVisible" footer-hide class-name='upload-preview-modal'>
<ul class="">
<li v-for="(file,index) in files" :key="index" class="preview-file-list-item">
<div class='preview-file-list-img'>
<el-image :src="file.url" class='' style=''>
<div slot='error' class='image-slot'>
<img src="/assets/img/picture.png" style='width:100%;height:100%;'>
</div>
</el-image>
<div class='preview-file-list-actions' @mouseenter="()=>{showActions = true;}" @mouseleave="()=>{showActions = false;}">
<span v-show="showActions" class='action-download'>
<i class='el-icon-download' @click="onDownload(file)"></i>
</span>
<span v-show="showActions" :style="{ 'display': disabled? 'none' : 'inline-block' }" class='action-delete'>
<i class='el-icon-delete' @click="onRemove(file, files)"></i>
</span>
</div>
</div>
<div class="file-name">{{file.name}}</div>
</li>
</ul>
</modal>
</div>
</template>
<script lang="ts">
......@@ -87,12 +119,8 @@ export default class AppFileUpload extends Vue {
if (this.ignorefieldvaluechange) {
return;
}
if (newval) {
this.files = JSON.parse(newval);
this.dataProcess();
} else {
this.files = [];
}
this.setFiles(newval)
this.dataProcess();
}
/**
......@@ -188,6 +216,21 @@ export default class AppFileUpload extends Vue {
*/
public appData: any;
/**
* 设置files
*
* @private
* @memberof AppFileUpload
*/
private setFiles(value:any): void {
let _files = JSON.parse(value);
if (value && Object.prototype.toString.call(_files)=='[object Array]') {
this.files = _files;
} else {
this.files = [];
}
}
/**
* 数据处理
*
......@@ -230,9 +273,7 @@ export default class AppFileUpload extends Vue {
this.formStateEvent = this.formState.subscribe(($event: any) => {
// 表单加载完成
if (Object.is($event.type, 'load')) {
if (this.value) {
this.files = JSON.parse(this.value);
}
this.setFiles(this.value);
this.dataProcess();
}
});
......@@ -271,12 +312,7 @@ export default class AppFileUpload extends Vue {
this.export_keys = export_keys;
this.custom_arr = custom_arr;
if (this.value) {
let _files = JSON.parse(this.value);
if(typeof _files === "object" ){
this.files = _files;
}
}
this.setFiles(this.value);
this.dataProcess();
}
......@@ -298,7 +334,14 @@ export default class AppFileUpload extends Vue {
* @memberof AppFileUpload
*/
public beforeUpload(file: any) {
// console.log('上传之前');
if(this.imageOnly){
const imageTypes = ["image/jpeg" , "image/gif" , "image/png" , "image/bmp"];
const isImage = imageTypes.some((type: any)=> Object.is(type, file.type));
if (!isImage) {
this.$Notice.error({ title: '文件类型错误' ,desc: '请选择图片类型的文件,如JPEG,GIF,PNG,BMP'});
}
return isImage;
}
}
/**
......@@ -351,6 +394,9 @@ export default class AppFileUpload extends Vue {
}
});
let value: any = arr.length > 0 ? JSON.stringify(arr) : null;
if(arr.length == 0){
this.dialogVisible = false;
}
this.$emit('formitemvaluechange', { name: this.name, value: value });
}
......@@ -364,6 +410,38 @@ export default class AppFileUpload extends Vue {
window.open(file.url);
}
/**
* 是否只支持图片上传
*
* @type {boolean}
* @memberof AppFileUpload
*/
@Prop({default: false}) public imageOnly!: boolean;
/**
* 是否开启行内预览
*
* @type {boolean}
* @memberof AppFileUpload
*/
@Prop({default: false}) public rowPreview!: boolean;
/**
* 是否开启行内预览
*
* @type {boolean}
* @memberof AppFileUpload
*/
public dialogVisible: boolean = false;
/**
* 是否开启行内预览
*
* @type {boolean}
* @memberof AppFileUpload
*/
public showActions: boolean = false;
}
</script>
......
......@@ -22,7 +22,7 @@
> .el-tabs {
height: 100%;
> .el-tabs__content {
height: calc(100% - 51px);
height: calc(100% - 62px);
> .el-tab-pane {
height: 100%;
overflow: auto;
......
......@@ -3,7 +3,7 @@
<ul class='el-upload-list el-upload-list--picture-card'>
<!-- 绘制缩略图 Start -->
<li v-for="(file,index) in files" :key="index" class='el-upload-list__item is-success'>
<el-image src={file.url} class='el-upload-list__item-thumbnail' style='min-height:100px;min-width:100px;'>
<el-image :src="file.url" class='el-upload-list__item-thumbnail' style='min-height:100px;min-width:100px;'>
<div slot='error' class='image-slot'>
<i class='el-icon-picture-outline'></i>
</div>
......@@ -119,12 +119,8 @@ export default class AppImageUpload extends Vue {
if (this.ignorefieldvaluechange) {
return;
}
if (newval) {
this.files = JSON.parse(newval);
this.dataProcess();
} else {
this.files = [];
}
this.setFiles(newval)
this.dataProcess();
}
/**
......@@ -220,6 +216,21 @@ export default class AppImageUpload extends Vue {
*/
public appData: any="";
/**
* 设置files
*
* @private
* @memberof AppImageUpload
*/
private setFiles(value:any): void {
let _files = JSON.parse(value);
if (value && Object.prototype.toString.call(_files)=='[object Array]') {
this.files = _files;
} else {
this.files = [];
}
}
/**
* 数据处理
*
......@@ -262,10 +273,7 @@ export default class AppImageUpload extends Vue {
this.formStateEvent = this.formState.subscribe(($event: any) => {
// 表单加载完成
if (Object.is($event.type, 'load')) {
if (this.value) {
// console.log(this.value);
this.files = JSON.parse(this.value);
}
this.setFiles(this.value);
this.dataProcess();
}
});
......@@ -303,12 +311,7 @@ export default class AppImageUpload extends Vue {
this.export_keys = export_keys;
this.custom_arr = custom_arr;
if (this.value) {
let _files = JSON.parse(this.value);
if(typeof _files === "object" ){
this.files = _files;
}
}
this.setFiles(this.value);
this.dataProcess();
}
......
......@@ -232,7 +232,8 @@ export default class AppMpicker extends Vue {
_selectItems[index].srfkey = item[this.deKeyField];
});
}
_context = Object.assign(_context, { srfparentdata: { srfparentkey: this.activeData[this.deKeyField] }, selectedData: [..._selectItems], });
_context = Object.assign(_context, { srfparentdata: { srfparentkey: this.activeData[this.deKeyField] }, });
_viewparams = Object.assign(_viewparams,{ selectedData: [..._selectItems]});
let formdata = this.activeData;
const modal: Subject<any> = this.$appmodal.openModal(view, _context, _viewparams)
modal.subscribe((result: any) => {
......
......@@ -26,6 +26,8 @@
overflow:inherit;
}
}
}
}
.select-no-dropdown.el-select-dropdown{
display: none;
}
\ No newline at end of file
<template>
<div class="app-picker-select-view">
<Dropdown :visible="visible" trigger="custom" style="left:0px;width: 100%" @on-clickoutside="() => {triggerMenu(false);}" >
<Input v-model="inputValue" class="tree-input" type="text" :placeholder="placeholder" :disabled="disabled" @on-change="OnInputChange" @on-focus="()=>{triggerMenu(true);}" >
<Input v-if="isSingleSelect" v-model="queryValue" class="tree-input" type="text" :placeholder="placeholder" :disabled="disabled" @on-change="OnInputChange" @on-focus="()=>{triggerMenu(true);}" >
<template v-slot:suffix>
<i v-if="inputValue && !disabled" class='el-icon-circle-close' @click="onClear"></i>
<i v-if="queryValue && !disabled" class='el-icon-circle-close' @click="onClear"></i>
<Icon :type="visible ? 'ios-arrow-up' : 'ios-arrow-down'" class="icon-arrow" @click="() => {triggerMenu();}"></Icon>
<icon v-if="linkview" type="ios-open-outline" @click="openLinkView"/>
</template>
</Input>
<el-select v-if="!isSingleSelect" popper-class="select-no-dropdown" :value="keySet" multiple filterable remote :remote-method="($event) => {this.queryValue = $event;}" size="small" style="width:100%;" @change="onSelectChange" @focus="() => {triggerMenu(true);}" :disabled="disabled">
<el-option v-for="(item, index) in items" :key="index" :label="item.srfmajortext" :value="item[deKeyField]"></el-option>
</el-select>
<DropdownMenu slot="list">
<component
:is="pickupView.viewname"
:viewdata="viewdata"
:viewparam="viewparam"
:ifShowButtons="false"
:isShowButton="false"
:viewDefaultUsage="false"
@viewdataschange="setValue"
@viewdataschange="onViewdatasChange"
style="height:100%;">
</component>
</DropdownMenu>
......@@ -46,6 +49,38 @@ export default class AppPickerSelectView extends Vue {
* @memberof AppFormDRUIPart
*/
@Prop() public viewparams!: any;
/**
* 是否单选
*
* @type {*}
* @memberof AppFormDRUIPart
*/
@Prop({default: 'true'}) public isSingleSelect!: any;
/**
* 当前多选框选中值的key集合
*
* @type {string}
* @memberof AppTreePicker
*/
public keySet: any = [];
/**
* 当前多选框选中项对象集合
*
* @type {string}
* @memberof AppTreePicker
*/
public selectItems: Array<any> = [];
/**
* 所有操作过的下拉选项对象集合
*
* @type {string}
* @memberof AppTreePicker
*/
public items: Array<any> = [];
/**
* 视图参数
......@@ -53,7 +88,7 @@ export default class AppPickerSelectView extends Vue {
* @type {string}
* @memberof AppTreePicker
*/
public viewparam: any = JSON.stringify(this.viewparams);;
public viewparam: any = JSON.stringify(this.viewparams);
/**
* 视图上下文
......@@ -104,12 +139,12 @@ export default class AppPickerSelectView extends Vue {
@Prop({default: 'srfkey'}) public deKeyField!: string;
/**
* 输入框值
* 输入框值(搜索值)
*
* @type {string}
* @memberof AppTreePicker
*/
public inputValue: any = '';
public queryValue: any = '';
/**
* 值项名称
......@@ -117,7 +152,7 @@ export default class AppPickerSelectView extends Vue {
* @type {string}
* @memberof AppPicker
*/
@Prop() public valueitem?: string;
@Prop() public valueitem!: string;
/**
* 关联视图名称
......@@ -182,7 +217,7 @@ export default class AppPickerSelectView extends Vue {
* @memberof AppTreePicker
*/
public OnInputChange($event: any){
let _viewdata = Object.assign({ query: this.inputValue }, JSON.parse(this.viewdata)) ;
let _viewdata = Object.assign({ query: this.queryValue }, JSON.parse(this.viewdata)) ;
this.viewdata = JSON.stringify(_viewdata);
}
......@@ -264,9 +299,35 @@ export default class AppPickerSelectView extends Vue {
* @param {*} oldVal
* @memberof AppPicker
*/
@Watch('value')
@Watch('value', { deep: true })
public onValueChange(newVal: any, oldVal: any) {
this.inputValue = newVal;
if(this.isSingleSelect){
this.queryValue = newVal;
if (!this.data || !this.valueitem || !this.data[this.valueitem]) {
this.$Notice.error({ title: '错误', desc: "编辑器"+this.name+'值项异常' });
}else{
let _viewparam = JSON.parse(this.viewparam);
_viewparam.selectedData = [{srfkey: this.data[this.valueitem], srfmajortext: this.value }];
this.viewparam = JSON.stringify(_viewparam);
}
}else{
this.keySet = [];
this.selectItems = [];
if (newVal) {
this.selectItems = JSON.parse(newVal);
this.selectItems.forEach((item: any) => {
this.keySet.push(item.srfkey);
let index = this.items.findIndex((i) => Object.is(i.srfkey, item.srfkey));
if (index < 0) {
this.items.push({ srfmajortext : item.srfmajortext, srfkey: item.srfkey });
}
});
let _viewparam = JSON.parse(this.viewparam);
_viewparam.selectedData = this.selectItems;
this.viewparam = JSON.stringify(_viewparam);
}
}
this.$forceUpdate();
}
/**
......@@ -301,19 +362,36 @@ export default class AppPickerSelectView extends Vue {
* @param {*} item
* @memberof AppTreePicker
*/
public setValue(item: any) {
this.visible = false;
if(item.length == 0){
public onViewdatasChange($event: any) {
if($event.length == 0){
this.onClear(null);
return;
}
if (this.valueitem) {
let tempvalue = item[0][this.deMajorField] ? item[0][this.deKeyField] : item[0].srfkey;
this.$emit('formitemvaluechange', { name: this.valueitem, value: item[0][this.deKeyField] });
}
if (this.name) {
let tempvalue = item[0][this.deMajorField] ? item[0][this.deMajorField] : item[0].srfmajortext;
this.$emit('formitemvaluechange', { name: this.name, value: tempvalue });
if(this.isSingleSelect){
this.visible = false;
if (this.valueitem) {
let tempvalue = $event[0][this.deKeyField] ? $event[0][this.deKeyField] : $event[0].srfkey;
this.$emit('formitemvaluechange', { name: this.valueitem, value: tempvalue });
}
if (this.name) {
let tempvalue = $event[0][this.deMajorField] ? $event[0][this.deMajorField] : $event[0].srfmajortext;
this.$emit('formitemvaluechange', { name: this.name, value: tempvalue });
}
}else{
let selects: Array<any> = [];
if ($event && Array.isArray($event)) {
$event.forEach((select: any) => {
selects.push({ srfkey: select.srfkey, srfmajortext: select.srfmajortext });
let index = this.items.findIndex((item) => Object.is(item.srfkey, select.srfkey));
if (index < 0) {
this.items.push({ srfmajortext : select.srfmajortext, srfkey: select.srfkey });
}
});
}
if (this.name) {
let value = selects.length > 0 ? JSON.stringify(selects) : '';
this.$emit('formitemvaluechange', { name: this.name, value: value });
}
}
}
......@@ -337,11 +415,8 @@ export default class AppPickerSelectView extends Vue {
* @memberof AppPicker
*/
public openLinkView($event: any): void {
if (this.disabled) {
return;
}
if (!this.data || !this.valueitem || !this.data[this.valueitem]) {
this.$Notice.error({ title: '错误', desc: '值项异常!' });
console.error({ title: '错误', desc: '值项异常!' });
return;
}
// 公共参数处理
......@@ -459,6 +534,26 @@ export default class AppPickerSelectView extends Vue {
}
}
}
/**
* 下拉选中回调
*
* @param {*} selects 当前选中的key值集合
* @memberof AppMpicker
*/
public onSelectChange(selects: any) {
let val: Array<any> = [];
if (selects.length > 0) {
selects.forEach((select: any) => {
let index = this.items.findIndex((item) => Object.is(item[this.deKeyField], select));
if (index >= 0) {
val.push(this.items[index]);
}
});
}
let value = val.length > 0 ? JSON.stringify(val) : '';
this.$emit('formitemvaluechange', { name: this.name, value: value });
}
}
</script>
......
......@@ -165,7 +165,7 @@ export default class AppPicker extends Vue {
* @type {string}
* @memberof AppPicker
*/
@Prop() public valueitem?: string;
@Prop() public valueitem!: string;
/**
* 值
......@@ -401,6 +401,7 @@ export default class AppPicker extends Vue {
const view = { ...this.pickupView };
let _context = data.context;
let _param = data.param;
_param.selectedData = [{srfkey: this.data[this.valueitem], srfmajortext: this.curvalue }];
// 判断打开方式
if (view.placement && !Object.is(view.placement, '')) {
if (Object.is(view.placement, 'POPOVER')) {
......@@ -572,11 +573,8 @@ export default class AppPicker extends Vue {
* @memberof AppPicker
*/
public openLinkView($event: any): void {
if (this.disabled) {
return;
}
if (!this.data || !this.valueitem || !this.data[this.valueitem]) {
this.$Notice.error({ title: '错误', desc: '值项异常!' });
console.error({ title: '错误', desc: '值项异常!' });
return;
}
// 公共参数处理
......
......@@ -44,6 +44,14 @@ export default class DropDownList extends Vue {
*/
public text:any = '';
/**
* 编辑器类型
*
* @type {string}
* @memberof AppSpan
*/
@Prop() public editorType?: string;
/**
* 代码表标识
*
......@@ -83,23 +91,32 @@ export default class DropDownList extends Vue {
* @memberof AppSpan
*/
public load(){
if(this.tag && Object.is(this.codelistType,"STATIC")){
const codelist = this.$store.getters.getCodeList(this.tag);
if (codelist) {
this.items = [...JSON.parse(JSON.stringify(codelist.items))];
this.setText();
} else {
console.log(`----${this.tag}----代码表不存在`);
}
}else if(this.tag && Object.is(this.codelistType,"DYNAMIC")){
this.codeListService.getItems(this.tag).then((res:any) => {
this.items = res;
this.setText();
}).catch((error:any) => {
console.log(`----${this.tag}----代码表不存在`);
if(Object.is(this.editorType,'PICTURE') || Object.is(this.editorType,'PICTURE_ONE') ||Object.is(this.editorType,'FILEUPLOADER')){
let files: any[] = JSON.parse(this.data);
let names: any[] = [];
files.forEach((item:any) => {
names.push(item.name);
});
this.text = names.join(',');
}else{
this.setText();
if(this.tag && Object.is(this.codelistType,"STATIC")){
const codelist = this.$store.getters.getCodeList(this.tag);
if (codelist) {
this.items = [...JSON.parse(JSON.stringify(codelist.items))];
this.setText();
} else {
console.log(`----${this.tag}----代码表不存在`);
}
}else if(this.tag && Object.is(this.codelistType,"DYNAMIC")){
this.codeListService.getItems(this.tag).then((res:any) => {
this.items = res;
this.setText();
}).catch((error:any) => {
console.log(`----${this.tag}----代码表不存在`);
});
}else{
this.setText();
}
}
}
......
......@@ -13,7 +13,7 @@
:is="refviewname"
:viewdata="viewdata"
:viewparam="viewparam"
:ifShowButtons="false"
:isShowButton="false"
:viewDefaultUsage="false"
@viewdataschange="setValue"
style="height:100%;">
......
......@@ -95,6 +95,9 @@ export default class MPickupViewEngine extends ViewEngine {
});
const _disbaled: boolean = this.view.containerModel[`view_${ctrlName}`].selections.length > 0 ? true : false;
this.view.containerModel.view_rightbtn = _disbaled;
if(!this.view.isShowButton){
this.view.$emit('viewdataschange', [...args]);
}
}
/**
......
......@@ -82,7 +82,7 @@ export default class PickupViewEngine extends ViewEngine {
this.view.viewSelections = [...args]
const _disabled: boolean = this.view.viewSelections.length > 0 ? false : true;
this.view.containerModel.view_okbtn.disabled = _disabled;
if(!this.view.ifShowButtons){
if(!this.view.isShowButton){
this.view.$emit('viewdataschange', [...args]);
}
}
......
......@@ -7,7 +7,6 @@ const mockDatas: Array<any> = [
];
// GetDraft
mock.onGet(new RegExp(/^\/orgdeptusers\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:orgdeptuser 方法: GetDraft");
......@@ -23,35 +22,6 @@ mock.onGet(new RegExp(/^\/orgdeptusers\/getdraft$/)).reply((config: any) => {
console.groupEnd();
return [status, {}];
});
// Get
mock.onGet(new RegExp(/^\/orgdeptusers\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:orgdeptuser 方法: Get");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['orgdeptuserid'];
const matchArray:any = new RegExp(/^\/orgdeptusers\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.orgdeptuserid, tempValue.orgdeptuserid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
// Save
mock.onPost(new RegExp(/^\/orgdeptusers\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
......@@ -90,7 +60,6 @@ mock.onPost(new RegExp(/^\/orgdeptusers\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).repl
console.groupEnd();
return [status, data];
});
// Create
mock.onPost(new RegExp(/^\/orgdeptusers\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
......@@ -117,35 +86,6 @@ mock.onPost(new RegExp(/^\/orgdeptusers\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((con
console.groupEnd();
return [status, mockDatas[0]];
});
// Remove
mock.onDelete(new RegExp(/^\/orgdeptusers\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:orgdeptuser 方法: Remove");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['orgdeptuserid'];
const matchArray:any = new RegExp(/^\/orgdeptusers\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.orgdeptuserid, tempValue.orgdeptuserid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
// Update
mock.onPut(new RegExp(/^\/orgdeptusers\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
......@@ -184,7 +124,6 @@ mock.onPut(new RegExp(/^\/orgdeptusers\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((conf
console.groupEnd();
return [status, data];
});
// CheckKey
mock.onPost(new RegExp(/^\/orgdeptusers\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
......@@ -223,7 +162,6 @@ mock.onPost(new RegExp(/^\/orgdeptusers\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).
console.groupEnd();
return [status, data];
});
// FetchGetorgdeptuser
mock.onGet(new RegExp(/^\/orgdeptusers\/fetchgetorgdeptuser$/)).reply((config: any) => {
......@@ -240,7 +178,6 @@ mock.onGet(new RegExp(/^\/orgdeptusers\/fetchgetorgdeptuser$/)).reply((config: a
return [status, mockDatas ? mockDatas : []];
});
// FetchGetorgdeptuser
mock.onGet(new RegExp(/^\/orgdeptusers\/fetchgetorgdeptuser(\?[\w-./?%&=]*)*$/)).reply((config: any) => {
console.groupCollapsed("实体:orgdeptuser 方法: FetchGetorgdeptuser");
......@@ -269,9 +206,6 @@ mock.onGet(new RegExp(/^\/orgdeptusers\/fetchgetorgdeptuser(\?[\w-./?%&=]*)*$/))
console.groupEnd();
return [status, records ? records : []];
});
// FetchDefault
mock.onGet(new RegExp(/^\/orgdeptusers\/fetchdefault$/)).reply((config: any) => {
......@@ -288,7 +222,6 @@ mock.onGet(new RegExp(/^\/orgdeptusers\/fetchdefault$/)).reply((config: any) =>
return [status, mockDatas ? mockDatas : []];
});
// FetchDefault
mock.onGet(new RegExp(/^\/orgdeptusers\/fetchdefault(\?[\w-./?%&=]*)*$/)).reply((config: any) => {
console.groupCollapsed("实体:orgdeptuser 方法: FetchDefault");
......@@ -317,19 +250,67 @@ mock.onGet(new RegExp(/^\/orgdeptusers\/fetchdefault(\?[\w-./?%&=]*)*$/)).reply(
console.groupEnd();
return [status, records ? records : []];
});
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// Get
mock.onGet(new RegExp(/^\/orgdeptusers\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:orgdeptuser 方法: Get");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['orgdeptuserid'];
const matchArray:any = new RegExp(/^\/orgdeptusers\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.orgdeptuserid, tempValue.orgdeptuserid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
// Remove
mock.onDelete(new RegExp(/^\/orgdeptusers\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:orgdeptuser 方法: Remove");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['orgdeptuserid'];
const matchArray:any = new RegExp(/^\/orgdeptusers\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.orgdeptuserid, tempValue.orgdeptuserid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
......@@ -6,35 +6,6 @@ const mock = MockAdapter.getInstance();
const mockDatas: Array<any> = [
];
// Remove
mock.onDelete(new RegExp(/^\/orgusers\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:orguser 方法: Remove");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['orguserid'];
const matchArray:any = new RegExp(/^\/orgusers\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.orguserid, tempValue.orguserid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
// Save
mock.onPost(new RegExp(/^\/orgusers\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
......@@ -73,7 +44,6 @@ mock.onPost(new RegExp(/^\/orgusers\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((c
console.groupEnd();
return [status, data];
});
// Update
mock.onPut(new RegExp(/^\/orgusers\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
......@@ -112,7 +82,6 @@ mock.onPut(new RegExp(/^\/orgusers\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config:
console.groupEnd();
return [status, data];
});
// CheckKey
mock.onPost(new RegExp(/^\/orgusers\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
......@@ -152,7 +121,6 @@ mock.onPost(new RegExp(/^\/orgusers\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).repl
return [status, data];
});
// GetDraft
mock.onGet(new RegExp(/^\/orgusers\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:orguser 方法: GetDraft");
......@@ -168,7 +136,6 @@ mock.onGet(new RegExp(/^\/orgusers\/getdraft$/)).reply((config: any) => {
console.groupEnd();
return [status, {}];
});
// Create
mock.onPost(new RegExp(/^\/orgusers\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
......@@ -195,35 +162,6 @@ mock.onPost(new RegExp(/^\/orgusers\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config:
console.groupEnd();
return [status, mockDatas[0]];
});
// Get
mock.onGet(new RegExp(/^\/orgusers\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:orguser 方法: Get");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['orguserid'];
const matchArray:any = new RegExp(/^\/orgusers\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.orguserid, tempValue.orguserid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
// FetchDefault
mock.onGet(new RegExp(/^\/orgusers\/fetchdefault$/)).reply((config: any) => {
......@@ -240,7 +178,6 @@ mock.onGet(new RegExp(/^\/orgusers\/fetchdefault$/)).reply((config: any) => {
return [status, mockDatas ? mockDatas : []];
});
// FetchDefault
mock.onGet(new RegExp(/^\/orgusers\/fetchdefault(\?[\w-./?%&=]*)*$/)).reply((config: any) => {
console.groupCollapsed("实体:orguser 方法: FetchDefault");
......@@ -269,19 +206,67 @@ mock.onGet(new RegExp(/^\/orgusers\/fetchdefault(\?[\w-./?%&=]*)*$/)).reply((con
console.groupEnd();
return [status, records ? records : []];
});
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// Remove
mock.onDelete(new RegExp(/^\/orgusers\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:orguser 方法: Remove");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['orguserid'];
const matchArray:any = new RegExp(/^\/orgusers\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.orguserid, tempValue.orguserid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
// Get
mock.onGet(new RegExp(/^\/orgusers\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:orguser 方法: Get");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['orguserid'];
const matchArray:any = new RegExp(/^\/orgusers\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.orguserid, tempValue.orguserid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
......@@ -7,7 +7,6 @@ const mockDatas: Array<any> = [
];
// Select
mock.onGet(new RegExp(/^\/ps\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:ps 方法: Select");
......@@ -35,35 +34,6 @@ mock.onGet(new RegExp(/^\/ps\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config:
console.groupEnd();
return [status, _items];
});
// Remove
mock.onDelete(new RegExp(/^\/ps\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:ps 方法: Remove");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['psid'];
const matchArray:any = new RegExp(/^\/ps\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.psid, tempValue.psid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
// Create
mock.onPost(new RegExp(/^\/ps\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
......@@ -91,35 +61,6 @@ mock.onPost(new RegExp(/^\/ps\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any)
return [status, mockDatas[0]];
});
// Get
mock.onGet(new RegExp(/^\/ps\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:ps 方法: Get");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['psid'];
const matchArray:any = new RegExp(/^\/ps\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.psid, tempValue.psid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
// GetDraft
mock.onGet(new RegExp(/^\/ps\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:ps 方法: GetDraft");
......@@ -135,7 +76,6 @@ mock.onGet(new RegExp(/^\/ps\/getdraft$/)).reply((config: any) => {
console.groupEnd();
return [status, {}];
});
// Save
mock.onPost(new RegExp(/^\/ps\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
......@@ -174,7 +114,6 @@ mock.onPost(new RegExp(/^\/ps\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config:
console.groupEnd();
return [status, data];
});
// Update
mock.onPut(new RegExp(/^\/ps\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
......@@ -213,7 +152,6 @@ mock.onPut(new RegExp(/^\/ps\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) =
console.groupEnd();
return [status, data];
});
// CreateAndStartIM
mock.onPost(new RegExp(/^\/ps\/?([a-zA-Z0-9\-\;]{0,35})\/createandstartim$/)).reply((config: any) => {
......@@ -252,7 +190,6 @@ mock.onPost(new RegExp(/^\/ps\/?([a-zA-Z0-9\-\;]{0,35})\/createandstartim$/)).re
console.groupEnd();
return [status, data];
});
// CheckKey
mock.onPost(new RegExp(/^\/ps\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
......@@ -291,7 +228,6 @@ mock.onPost(new RegExp(/^\/ps\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((con
console.groupEnd();
return [status, data];
});
// FetchDefault
mock.onGet(new RegExp(/^\/ps\/fetchdefault$/)).reply((config: any) => {
......@@ -308,7 +244,6 @@ mock.onGet(new RegExp(/^\/ps\/fetchdefault$/)).reply((config: any) => {
return [status, mockDatas ? mockDatas : []];
});
// FetchDefault
mock.onGet(new RegExp(/^\/ps\/fetchdefault(\?[\w-./?%&=]*)*$/)).reply((config: any) => {
console.groupCollapsed("实体:ps 方法: FetchDefault");
......@@ -337,19 +272,67 @@ mock.onGet(new RegExp(/^\/ps\/fetchdefault(\?[\w-./?%&=]*)*$/)).reply((config: a
console.groupEnd();
return [status, records ? records : []];
});
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// Remove
mock.onDelete(new RegExp(/^\/ps\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:ps 方法: Remove");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['psid'];
const matchArray:any = new RegExp(/^\/ps\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.psid, tempValue.psid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
// Get
mock.onGet(new RegExp(/^\/ps\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:ps 方法: Get");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['psid'];
const matchArray:any = new RegExp(/^\/ps\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.psid, tempValue.psid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
......@@ -6,7 +6,7 @@ Mock.mock(RegExp(new RegExp(/^\.\.\/ibizutil\/upload.*$/)),"post",(ops:any) => {
console.log(ops) // 先看一下这个ops是什么
console.log(ops.body)
return {
"name": "xxx.png",
"id": Random.string(128)
"filename": "xxx.png",
"fileid": Random.string("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",32)
};
});
\ No newline at end of file
import { ChartSeries } from './chart-series';
/**
* 漏斗图序列模型
*
* @export
* @class ChartFunnelSeries
*/
export class ChartFunnelSeries extends ChartSeries{
/**
* 分类属性
*
* @type {string}
* @memberof ChartFunnelSeries
*/
public categorField: string = '';
/**
* 值属性
*
* @type {string}
* @memberof ChartFunnelSeries
*/
public valueField: string = '';
/**
* 分类代码表
*
* @type {string}
* @memberof ChartFunnelSeries
*/
public categorCodeList: any = null;
/**
* 维度定义
*
* @type {string}
* @memberof ChartFunnelSeries
*/
public dimensions:Array<string> = [];
/**
* 维度编码
*
* @type {*}
* @memberof ChartFunnelSeries
*/
public encode:any = null;
/**
* Creates an instance of ChartFunnelSeries.
* ChartFunnelSeries 实例
*
* @param {*} [opts={}]
* @memberof ChartFunnelSeries
*/
constructor(opts: any = {}) {
super(opts);
this.categorField = !Object.is(opts.categorField, '') ? opts.categorField : '';
this.categorCodeList = opts.categorCodeList ? opts.categorCodeList : null;
this.valueField = !Object.is(opts.valueField, '') ? opts.valueField : '';
this.dimensions = opts.dimensions ? opts.dimensions :'';
this.encode = opts.encode ? opts.encode : null;
}
/**
* 设置分类属性
*
* @param {string} state
* @memberof ChartFunnelSeries
*/
public setCategorField(state: string): void {
this.categorField = state;
}
/**
* 设置序列名称
*
* @param {string} state
* @memberof ChartFunnelSeries
*/
public setValueField(state: string): void {
this.valueField = state;
}
/**
* 分类代码表
*
* @param {*} state
* @memberof ChartFunnelSeries
*/
public setCategorCodeList(state: any): void {
this.categorCodeList = state;
}
/**
* 维度定义
*
* @param {*} state
* @memberof ChartFunnelSeries
*/
public setDimensions(state: any): void {
this.dimensions = state;
}
/**
* 设置编码
*
* @param {*} state
* @memberof ChartFunnelSeries
*/
public setEncode(state: any): void {
this.encode = state;
}
}
\ No newline at end of file
import { ChartSeries } from './chart-series';
/**
* 折线图序列模型
*
* @export
* @class ChartLineSeries
*/
export class ChartLineSeries extends ChartSeries{
/**
* 分类属性
*
* @type {string}
* @memberof ChartLineSeries
*/
public categorField: string = '';
/**
* 值属性
*
* @type {string}
* @memberof ChartLineSeries
*/
public valueField: string = '';
/**
* 分类代码表
*
* @type {string}
* @memberof ChartLineSeries
*/
public categorCodeList: any = null;
/**
* 维度定义
*
* @type {string}
* @memberof ChartLineSeries
*/
public dimensions:Array<string> = [];
/**
* 维度编码
*
* @type {*}
* @memberof ChartLineSeries
*/
public encode:any = null;
/**
* Creates an instance of ChartLineSeries.
* ChartLineSeries 实例
*
* @param {*} [opts={}]
* @memberof ChartLineSeries
*/
constructor(opts: any = {}) {
super(opts);
this.categorField = !Object.is(opts.categorField, '') ? opts.categorField : '';
this.categorCodeList = opts.categorCodeList ? opts.categorCodeList : null;
this.valueField = !Object.is(opts.valueField, '') ? opts.valueField : '';
this.dimensions = opts.dimensions ? opts.dimensions :'';
this.encode = opts.encode ? opts.encode : null;
}
/**
* 设置分类属性
*
* @param {string} state
* @memberof ChartLineSeries
*/
public setCategorField(state: string): void {
this.categorField = state;
}
/**
* 设置序列名称
*
* @param {string} state
* @memberof ChartLineSeries
*/
public setValueField(state: string): void {
this.valueField = state;
}
/**
* 分类代码表
*
* @param {*} state
* @memberof ChartLineSeries
*/
public setCategorCodeList(state: any): void {
this.categorCodeList = state;
}
/**
* 维度定义
*
* @param {*} state
* @memberof ChartLineSeries
*/
public setDimensions(state: any): void {
this.dimensions = state;
}
/**
* 设置编码
*
* @param {*} state
* @memberof ChartLineSeries
*/
public setEncode(state: any): void {
this.encode = state;
}
}
\ No newline at end of file
/**
* 图表序列模型
*
* @export
* @class ChartSeries
*/
export class ChartSeries {
/**
* 序列类型
*
* @type {string}
* @memberof ChartSeries
*/
public type: string = '';
/**
* 图表对象
*
* @type {*}
* @memberof ChartSeries
*/
public chart: any = null;
/**
* 序列名称
*
* @type {string}
* @memberof ChartSeries
*/
public name: string = '';
/**
* 序列标题
*
* @type {string}
* @memberof ChartSeries
*/
public caption: string = '';
/**
* 序列名称属性
*
* @type {string}
* @memberof ChartSeries
*/
public seriesField: string = '';
/**
* 对象索引
*
* @type {number}
* @memberof ChartSeries
*/
public index: number = 0;
/**
* 序列映射数据
*
* @type {*}
* @memberof ChartSeries
*/
public dataSet: any = [];
/**
* 预置配置
*
* @type {number}
* @memberof ChartSeries
*/
public ecxObject:any;
/**
* 用户自定义配置
*
* @type {number}
* @memberof ChartSeries
*/
public ecObject:any;
/**
* 取值方式
* 'column':默认,dataset 的列对应于系列,从而 dataset 中每一列是一个维度(dimension)
* 'row':dataset 的行对应于系列,从而 dataset 中每一行是一个维度(dimension
*
* @type {string}
* @memberof ChartSeries
*/
public seriesLayoutBy:string = "column";
/**
* Creates an instance of ChartSeries.
* ChartSeries 实例
*
* @param {*} [opts={}]
* @memberof ChartSeries
*/
constructor(opts: any = {}) {
this.type = !Object.is(opts.type, '') ? opts.type : '';
this.name = !Object.is(opts.name, '') ? opts.name : '';
this.caption = !Object.is(opts.caption, '') ? opts.caption : '';
this.seriesField = !Object.is(opts.seriesField, '') ? opts.seriesField : '';
this.index = this.index ? this.index : 0;
this.chart = opts.chart ? opts.chart : null;
this.dataSet = opts.dataSet ? opts.dataSet : [];
this.ecxObject = opts.ecxObject ? opts.ecxObject : null;
this.ecObject = opts.ecObject ? opts.ecObject : null;
this.seriesLayoutBy = opts.seriesLayoutBy ? opts.seriesLayoutBy:"column";
}
/**
* 设置序列类型
*
* @param {string} state
* @memberof ChartSeries
*/
public setType(state: string): void {
this.type = state;
}
/**
* 设置序列名称
*
* @param {string} state
* @memberof ChartSeries
*/
public setCaption(state: string): void {
this.caption = state;
}
/**
* 设置序列标题
*
* @param {string} state
* @memberof ChartSeries
*/
public setName(state: string): void {
this.name = state;
}
/**
* 设置数据集
*
* @param {*} state
* @memberof ChartSeries
*/
public setDataSet(state: any): void {
this.dataSet = state;
}
/**
* 设置序列映射的图表
*
* @param {*} state
* @memberof ChartSeries
*/
public setChart(state: any): void {
this.chart = state;
}
/**
* 设置序列名称属性
*
* @param {*} state
* @memberof ChartSeries
*/
public setSeriesField(state: any): void {
this.seriesField = state;
}
/**
* 设置对象索引
*
* @param {number} state
* @memberof ChartSeries
*/
public setIndex(state: number): void {
this.index = state;
}
}
\ No newline at end of file
export { ChartLineSeries } from './chart-line-series';
export { ChartFunnelSeries } from './chart-funnel-series';
......@@ -230,6 +230,7 @@ export default class PSEditViewBase extends Vue {
onParamData(newVal: any, oldVal: any) {
if(newVal){
Object.assign(this.viewparams, JSON.parse(this.viewparam));
}
}
......
......@@ -121,9 +121,10 @@
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:isSingleSelect="isSingleSelect"
:isSingleSelect="isSingleSelect"
:showBusyIndicator="true"
:isOpenEdit="false"
:gridRowActiveMode="gridRowActiveMode"
@save="onSave"
updateAction=""
removeAction="Remove"
......@@ -251,6 +252,7 @@ export default class PSGridViewBase extends Vue {
onParamData(newVal: any, oldVal: any) {
if(newVal){
Object.assign(this.viewparams, JSON.parse(this.viewparam));
}
}
......@@ -1191,7 +1193,7 @@ export default class PSGridViewBase extends Vue {
* @memberof PSGridViewBase
*/
protected ToggleRowEdit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
xData.isOpenEdit = !xData.isOpenEdit;
xData.actualIsOpenEdit = !xData.actualIsOpenEdit;
}
/**
* 新建行
......@@ -1212,7 +1214,7 @@ export default class PSGridViewBase extends Vue {
} else if(xData.newRow && xData.newRow instanceof Function) {
xData.newRow([{ ...data }], params, $event, xData);
}else{
_this.$Notice.error({ title: '错误', desc: 'newdata 视图处理逻辑不存在,请添加!' });
_this.$Notice.error({ title: '错误', desc: 'newRow 视图处理逻辑不存在,请添加!' });
}
}
/**
......
......@@ -143,6 +143,7 @@ export default class AppIndexViewBase extends Vue {
onParamData(newVal: any, oldVal: any) {
if(newVal){
Object.assign(this.viewparams, JSON.parse(this.viewparam));
}
}
......
......@@ -4,6 +4,65 @@
@import '../theme/default.theme.less';
@import './var.css';
.ibiz-page-tag .tags-body .tags-container .ivu-tag.tag-is-active .ivu-tag-text {
color: #1890ff;
}
.ibiz-page-tag .tags-body .tags-container .ivu-tag .ivu-icon-ios-close {
display: none;
}
.ibiz-page-tag .tags-body .tags-container .ivu-tag.tag-is-active .ivu-icon-ios-close,
.ibiz-page-tag .tags-body .tags-container .ivu-tag:hover .ivu-icon-ios-close {
display: inline-block;
}
.ivu-card-head p {
font-size: 14px;
color: #333;
font-weight: 400;
}
.app-app-menu .app-menus .ivu-card .ivu-card-body{
line-height: 22px;
margin-left: 10px;
font-weight: 400;
}
.app-app-menu .app-menus .ivu-card:hover{
box-shadow: none;
}
.ivu-card-body .grid>.el-table .el-table__header-wrapper thead>tr th {
background: rgb(245,245,245);
border-right: 1px solid rgb(250,250,250);
text-align: center;
}
.el-table td, .el-table th.is-leaf {
border-bottom: 1px solid #ebeef5;
}
.el-table th {
padding: 5px 0;
}
.grid .el-table__body-wrapper .el-table__row td{
border-left: 1px solid rgb(245,245,245);
border-top: 1px solid rgb(245,245,245);
text-align: center;
}
.el-table--enable-row-hover .el-table__body tr:hover>td {
background-color: #badfffba !important;
}
.grid .el-table__body-wrapper .grid-selected-row{
background-color: #badfffba !important;
}
.el-table th .sort-caret.ascending{
border-bottom-color: #f0f2f5;
}
.el-table th.ascending .sort-caret.ascending {
border-bottom-color: #909399;
}
.el-table th .sort-caret.descending{
border-top-color: #f0f2f5;
}
.el-table th.descending .sort-caret.descending {
border-top-color: #909399;
}
.view-container {
height: calc(100% - 38px);
......@@ -15,10 +74,26 @@
height: 100%;
// display: flex;
// flex-direction: column;
> .ivu-card-head{
height: 50px;
border-color: rgb(221, 221, 221);
border-style: solid;
border-width: 0px 0px 1px;
margin: 0px 0px 11px;
padding: 6px 0px;
> p{
height: 50px;
> .caption-info{
line-height: 50px;
font-size: 18px;
color: #1890ff;
}
}
}
> .ivu-card-body {
// height: 50%;
// flex-grow: 1;
height: calc(100% - 51px);
height: calc(100% - 62px);
padding: 0px;
> .content-container {
height: 100%;
......@@ -27,9 +102,6 @@
flex-direction: column;
}
}
>.ivu-card-head{
border:0;
}
}
> .view-card.view-no-caption.view-no-toolbar {
> .ivu-card-body {
......
/*** BRGIN:默认蓝色主题 ***/
.app_theme_blue {
> header {
background-color: #2d5f8b;
color: #6ba1d1;
.app-theme-icon {
color: #6ba1d1;
}
.page-logo {
color: #ffffff;
}
.header-right {
.app-header-user {
background: #28547c;
}
> div:hover {
background: #3774aa;
}
}
.el-menu.el-menu--horizontal {
> .el-menu-item, > .el-submenu > .el-submenu__title {
background: #2d5f8b;
color: #6ba1d1;
i {
color: #6ba1d1;
}
}
> .el-menu-item.is-active, > .el-submenu.is-active > .el-submenu__title {
background-color: #4276a4;
color: #f1f1f1;
i {
color: #f1f1f1;
}
}
> .el-menu-item:hover, > .el-submenu:hover > .el-submenu__title {
background-color: #3c6c95;
color: #f1f1f1 !important;
i {
color: #f1f1f1;
}
}
}
}
> .ivu-layout {
> .ivu-layout-sider {
background-color: #4276a4;
.sider-top {
.ivu-icon {
background: #2d5f8b;
color: #6ba1d1;
}
}
.app-menu {
> .el-menu-item.is-active, > .el-submenu.is-active > .el-submenu__title {
border-left: 4px solid #d64635;
}
}
}
}
> .el-menu , > .ivu-layout > .ivu-layout-sider .app-app-menu > .app-menu {
background: #4276a4;
.el-menu-item:hover, .el-menu-item.is-active {
background: #3c6c95 !important;
color: #f1f1f1 !important;
i {
color: #f1f1f1;
}
}
.el-submenu.is-opened, .el-submenu:hover, .el-submenu.is-active {
> .el-submenu__title {
background: #3c6c95 !important;
color: #f1f1f1 !important;
i {
color: #f1f1f1;
}
}
}
.el-submenu__title, .el-menu-item {
color: #c9dff5;
i {
color: #c9dff5;
}
}
.el-menu-item {
border-top: 1px solid #4276a4;
background: #4276a4;
}
.el-submenu {
border-top: 1px solid #4276a4;
background: #4276a4;
> .el-menu {
border-top: 1px solid #4276a4;
background: #4276a4;
}
}
}
.ivu-menu-light{
background: #4276a4;
}
.ivu-menu-submenu-title{
color: #f5f5f5;
}
> header {
background-color: #2d5f8b;
color: #6ba1d1;
.app-theme-icon {
color: #6ba1d1;
}
.page-logo {
color: #fff;
}
.header-right {
.app-header-user {
background: #28547c;
}
> div:hover {
background: #3774aa;
}
}
.el-menu.el-menu--horizontal {
> .el-menu-item, > .el-submenu > .el-submenu__title {
background: #2d5f8b;
color: #6ba1d1;
i {
color: #6ba1d1;
}
}
> .el-menu-item.is-active, > .el-submenu.is-active > .el-submenu__title {
background-color: #4276a4;
color: #f1f1f1;
i {
color: #f1f1f1;
}
}
> .el-menu-item:hover, > .el-submenu:hover > .el-submenu__title {
background-color: #3c6c95;
color: #f1f1f1 !important;
i {
color: #f1f1f1;
}
}
}
}
> .ivu-layout {
> .ivu-layout-sider {
background-color: #4276a4;
.sider-top {
.ivu-icon {
background: #2d5f8b;
color: #6ba1d1;
}
}
.app-menu {
> .el-menu-item.is-active, > .el-submenu.is-active > .el-submenu__title {
border-left: 4px solid #d64635;
}
}
}
}
> .el-menu , > .ivu-layout > .ivu-layout-sider .app-app-menu > .app-menu {
background: #4276a4;
.el-menu-item:hover, .el-menu-item.is-active {
background: #3c6c95 !important;
color: #f1f1f1 !important;
i {
color: #f1f1f1;
}
}
.el-submenu.is-opened, .el-submenu:hover, .el-submenu.is-active {
> .el-submenu__title {
background: #3c6c95 !important;
color: #f1f1f1 !important;
i {
color: #f1f1f1;
}
}
}
.el-submenu__title, .el-menu-item {
color: #c9dff5;
i {
color: #c9dff5;
}
}
.el-menu-item {
border-top: 1px solid #4276a4;
background: #4276a4;
}
.el-submenu {
border-top: 1px solid #4276a4;
background: #4276a4;
> .el-menu {
border-top: 1px solid #4276a4;
background: #4276a4;
}
}
}
.ivu-menu-light{
background: #4276a4;
}
.ivu-menu-submenu-title{
color: #f5f5f5;
}
}
/*** END:默认蓝色主题 ***/
\ No newline at end of file
/*** BRGIN:默认Dark Blue主题 ***/
.app_theme_darkblue {
> header {
background-color: #2b3643;
color: #606d80;
.app-theme-icon {
color: #606d80;
}
.page-logo {
color: #ffffff;
}
.header-right {
.app-header-user {
background: #232c37;
}
> div:hover {
background: #3b4a5c;
}
}
.el-menu.el-menu--horizontal {
> .el-menu-item, > .el-submenu > .el-submenu__title {
background: #2b3643;
color: #606d80;
i {
color: #606d80;
}
}
> .el-menu-item.is-active, > .el-submenu.is-active > .el-submenu__title {
background-color: #364150;
color: #f1f1f1;
i {
color: #f1f1f1;
}
}
> .el-menu-item:hover, > .el-submenu:hover > .el-submenu__title {
background-color: #3e4b5c;
color: #f1f1f1 !important;
i {
color: #f1f1f1;
}
}
}
}
> .ivu-layout {
> .ivu-layout-sider {
background-color: #364150;
.sider-top {
.ivu-icon {
background: #2b3643;
color: #606d80;
}
}
.app-menu {
> .el-menu-item.is-active, > .el-submenu.is-active > .el-submenu__title {
border-left: 4px solid #1caf9a;
}
}
}
}
> .el-menu , > .ivu-layout > .ivu-layout-sider .app-app-menu > .app-menu {
background: #364150;
.el-menu-item:hover, .el-menu-item.is-active {
background: #3e4b5c !important;
color: #f1f1f1 !important;
i {
color: #f1f1f1;
}
}
.el-submenu.is-opened, .el-submenu:hover, .el-submenu.is-active {
> .el-submenu__title {
background: #3e4b5c !important;
color: #f1f1f1 !important;
i {
color: #f1f1f1;
}
}
}
.el-submenu__title, .el-menu-item {
color: #b4bcc8;
i {
color: #b4bcc8;
}
}
.el-menu-item {
border-top: 1px solid #364150;
background: #364150;
}
.el-submenu {
border-top: 1px solid #364150;
background: #364150;
> .el-menu {
border-top: 1px solid #364150;
background: #364150;
}
}
}
.ivu-menu-light{
background: #364150;
}
.ivu-menu-submenu-title{
color: #fff;
}
> header {
background-color: #2b3643;
color: #606d80;
.app-theme-icon {
color: #606d80;
}
.page-logo {
color: #fff;
}
.header-right {
.app-header-user {
background: #232c37;
}
> div:hover {
background: #3b4a5c;
}
}
.el-menu.el-menu--horizontal {
> .el-menu-item, > .el-submenu > .el-submenu__title {
background: #2b3643;
color: #606d80;
i {
color: #606d80;
}
}
> .el-menu-item.is-active, > .el-submenu.is-active > .el-submenu__title {
background-color: #364150;
color: #f1f1f1;
i {
color: #f1f1f1;
}
}
> .el-menu-item:hover, > .el-submenu:hover > .el-submenu__title {
background-color: #3e4b5c;
color: #f1f1f1 !important;
i {
color: #f1f1f1;
}
}
}
}
> .ivu-layout {
> .ivu-layout-sider {
background-color: #364150;
.sider-top {
.ivu-icon {
background: #2b3643;
color: #606d80;
}
}
.app-menu {
> .el-menu-item.is-active, > .el-submenu.is-active > .el-submenu__title {
border-left: 4px solid #1caf9a;
}
}
}
}
> .el-menu , > .ivu-layout > .ivu-layout-sider .app-app-menu > .app-menu {
background: #364150;
.el-menu-item:hover, .el-menu-item.is-active {
background: #3e4b5c !important;
color: #f1f1f1 !important;
i {
color: #f1f1f1;
}
}
.el-submenu.is-opened, .el-submenu:hover, .el-submenu.is-active {
> .el-submenu__title {
background: #3e4b5c !important;
color: #f1f1f1 !important;
i {
color: #f1f1f1;
}
}
}
.el-submenu__title, .el-menu-item {
color: #b4bcc8;
i {
color: #b4bcc8;
}
}
.el-menu-item {
border-top: 1px solid #364150;
background: #364150;
}
.el-submenu {
border-top: 1px solid #364150;
background: #364150;
> .el-menu {
border-top: 1px solid #364150;
background: #364150;
}
}
}
.ivu-menu-light{
background: #364150;
}
.ivu-menu-submenu-title{
color: #fff;
}
}
/*** END:默认Dark Blue主题 ***/
\ No newline at end of file
/*** BRGIN:默认亮色主题 ***/
.app-default-theme {
> header {
background-color: #e1e1e1;
color: #aaaaaa;
.app-theme-icon {
color: #aaaaaa;
}
.page-logo {
color: #535c70;
}
.header-right {
.app-header-user {
background: #d9d9d9;
}
> div:hover {
background: #d4d4d4;
}
}
.el-menu.el-menu--horizontal {
> .el-menu-item, > .el-submenu > .el-submenu__title {
background: #e1e1e1;
color: #aaaaaa;
i {
color: #aaaaaa;
}
}
> .el-menu-item.is-active, > .el-submenu.is-active > .el-submenu__title {
background-color: #f6f6f6;
color: #666666;
i {
color: #666666;
}
}
> .el-menu-item:hover, > .el-submenu:hover > .el-submenu__title {
background-color: #e9e9e9;
color: #666666 !important;
i {
color: #666666;
}
}
}
}
> .ivu-layout {
> .ivu-layout-sider {
background-color: #f6f6f6;
.sider-top {
.ivu-icon {
background: #ccd3dd;
color: #fff;
}
}
.app-menu {
> .el-menu-item.is-active, > .el-submenu.is-active > .el-submenu__title {
border-left: 4px solid #3fd5c0;
}
}
}
}
> .el-menu , > .ivu-layout > .ivu-layout-sider .app-app-menu > .app-menu {
background: #f6f6f6;
.el-menu-item:hover, .el-menu-item.is-active {
background: #e9e9e9 !important;
color: #666666 !important;
i {
color: #666666;
}
}
.el-submenu.is-opened, .el-submenu:hover, .el-submenu.is-active {
> .el-submenu__title {
background: #e9e9e9 !important;
color: #666666 !important;
i {
color: #666666;
}
}
}
.el-submenu__title, .el-menu-item {
color: #666666;
i {
color: #666666;
}
}
.el-menu-item {
border-top: 1px solid #f6f6f6;
background: #f6f6f6;
}
.el-submenu {
border-top: 1px solid #f6f6f6;
background: #f6f6f6;
> .el-menu {
border-top: 1px solid #f6f6f6;
background: #f6f6f6;
}
}
}
.ivu-menu-light{
background: #f6f6f6;
}
.ivu-menu-submenu-title{
color: #000;
}
> header {
background-color: #e8eaec;
color: #aaaaaa;
.app-theme-icon {
color: #aaaaaa;
}
.page-logo {
color: #535c70;
}
.header-right {
.app-header-user {
background: #d9d9d9;
}
> div:hover {
background: #d4d4d4;
}
}
.el-menu.el-menu--horizontal {
> .el-menu-item, > .el-submenu > .el-submenu__title {
background: #e1e1e1;
color: #aaaaaa;
i {
color: #aaaaaa;
}
}
> .el-menu-item.is-active, > .el-submenu.is-active > .el-submenu__title {
background-color: #f6f6f6;
color: #666666;
i {
color: #666666;
}
}
> .el-menu-item:hover, > .el-submenu:hover > .el-submenu__title {
background-color: #e9e9e9;
color: #666666 !important;
i {
color: #666666;
}
}
}
}
> .ivu-layout {
> .ivu-layout-sider {
background-color: #f6f6f6;
.sider-top {
.ivu-icon {
background: #f6f6f6;
color: #aaaaaa;
}
}
.app-menu {
> .el-menu-item.is-active, > .el-submenu.is-active > .el-submenu__title {
border-left: 4px solid #1890ff;
}
}
}
}
> .el-menu , > .ivu-layout > .ivu-layout-sider .app-app-menu > .app-menu {
background: #f6f6f6;
.el-menu-item:hover, .el-menu-item.is-active {
background: #fff !important;
color: #1890ff !important;
i {
color: #1890ff;
}
}
.el-submenu.is-opened, .el-submenu:hover, .el-submenu.is-active {
> .el-submenu__title {
background: #fff !important;
color: #1890ff !important;
i {
color: #1890ff;
}
}
}
.el-submenu__title, .el-menu-item {
color: #666666;
i {
color: #666666;
}
}
.el-menu-item {
border-top: 1px solid #f6f6f6;
background: #f6f6f6;
}
.el-submenu {
border-top: 1px solid #f6f6f6;
background: #f6f6f6;
> .el-menu {
border-top: 1px solid #f6f6f6;
background: #f6f6f6;
}
}
}
.ivu-menu-light{
background: #f6f6f6;
}
.ivu-menu-submenu-title{
color: #000;
}
}
/*** END:默认亮色主题 ***/
\ No newline at end of file
......@@ -345,4 +345,21 @@ export class Util {
return fmt;
}
/**
* 深度合并对象
*
* @param FirstOBJ 目标对象
* @param SecondOBJ 原对象
* @returns {Object}
* @memberof Util
*/
public static deepObjectMerge(FirstOBJ:any, SecondOBJ:any) {
for (var key in SecondOBJ) {
FirstOBJ[key] = FirstOBJ[key] && FirstOBJ[key].toString() === "[object Object]" ?
this.deepObjectMerge(FirstOBJ[key], SecondOBJ[key]) : FirstOBJ[key] = SecondOBJ[key];
}
return FirstOBJ;
}
}
\ No newline at end of file
......@@ -63,7 +63,7 @@
<template v-else>
<template v-if="item1.type =='MENUITEM'">
<el-menu-item v-show="!item1.hidden" :index="item1.name" :key="item1.id">
<template v-if="item1.icon && item.icon != ''">
<template v-if="item1.icon && item1.icon != ''">
<img :src="item1.icon" class='app-menu-icon' />
</template>
<template v-else-if="item1.iconcls && item1.iconcls != ''">
......@@ -89,7 +89,7 @@
<template v-else>
<template v-if="item0.type =='MENUITEM'">
<el-menu-item v-show="!item0.hidden" :index="item0.name" :key="item0.id">
<template v-if="item0.icon && item.icon != ''">
<template v-if="item0.icon && item0.icon != ''">
<img :src="item0.icon" class='app-menu-icon' />
</template>
<template v-else-if="item0.iconcls && item0.iconcls != ''">
......@@ -529,7 +529,7 @@ export default class AppIndexViewBase extends Vue implements ControlInterface {
private dataProcess(items: any[]): void {
items.forEach((_item: any) => {
if (_item.expanded) {
this.defaultOpeneds.push(_item.id);
this.defaultOpeneds.push(_item.name);
}
if (_item.items && _item.items.length > 0) {
this.dataProcess(_item.items)
......
......@@ -697,6 +697,11 @@ export default class MainBase extends Vue implements ControlInterface {
* @memberof Main
*/
private onFormLoad(data: any = {},action:string): void {
if(Object.is(action,"save") || Object.is(action,"autoSave"))
// 更新context的实体主键
if(data.ps){
Object.assign(this.context,{ps:data.ps})
}
this.setFormEnableCond(data);
this.fillForm(data,action);
this.oldData = {};
......
......@@ -4,8 +4,9 @@
:default-sort="{ prop: minorSortPSDEF, order: Object.is(minorSortDir, 'ASC') ? 'ascending' : Object.is(minorSortDir, 'DESC') ? 'descending' : '' }"
@sort-change="onSortChange($event)"
:border="isDragendCol"
stripe :height="isEnablePagingBar && items.length > 0 ? 'calc(100% - 50px)' : '100%'"
:height="isEnablePagingBar && items.length > 0 ? 'calc(100% - 50px)' : '100%'"
:highlight-current-row ="isSingleSelect"
:row-class-name="getRowClassName"
@row-click="rowClick($event)"
@select-all="selectAll($event)"
@select="select($event)"
......@@ -387,6 +388,51 @@ export default class MainBase extends Vue implements ControlInterface {
*/
@Prop() protected isSingleSelect?: boolean;
/**
* 选中数据字符串
*
* @type {string}
* @memberof Main
*/
@Prop() protected selectedData?: string;
/**
* 选中值变化
*
* @param {*} newVal
* @param {*} oldVal
* @memberof MainTree
*/
@Watch('selectedData')
public onValueChange(newVal: any, oldVal: any) {
this.selections = [];
if(this.selectedData){
const refs: any = this.$refs;
if (refs.multipleTable) {
refs.multipleTable.clearSelection();
JSON.parse(this.selectedData).forEach((selection:any)=>{
let selectedItem = this.items.find((item:any)=>{
return Object.is(item.srfkey, selection.srfkey);
});
if(selectedItem){
this.rowClick(selectedItem);
}
});
}
}
}
/**
* 表格行数据默认激活模式
* 0 不激活
* 1 单击激活
* 2 双击激活
*
* @type {(number | 0 | 1 | 2)}
* @memberof Main
*/
@Prop({default: 2}) protected gridRowActiveMode!: number;
/**
* 是否开启行编辑
*
......@@ -395,6 +441,14 @@ export default class MainBase extends Vue implements ControlInterface {
*/
@Prop({default: false}) protected isOpenEdit!: boolean;
/**
* 实际是否开启行编辑
*
* @type {boolean}
* @memberof Main
*/
protected actualIsOpenEdit: boolean = this.isOpenEdit;
/**
* 总条数
*
......@@ -555,11 +609,11 @@ export default class MainBase extends Vue implements ControlInterface {
if(_this.isSelectFirstDefault){
_this.rowClick(_this.items[0]);
}
if(_this.context.selectedData){
if(_this.selectedData){
const refs: any = _this.$refs;
if (refs.multipleTable) {
refs.multipleTable.clearSelection();
_this.context.selectedData.forEach((selection:any)=>{
JSON.parse(_this.selectedData).forEach((selection:any)=>{
let selectedItem = _this.items.find((item:any)=>{
return Object.is(item.srfkey, selection.srfkey);
});
......@@ -640,7 +694,17 @@ export default class MainBase extends Vue implements ControlInterface {
} else {
this.$Notice.success({ title: '', desc: '删除成功!' });
}
this.load({});
//删除items中已删除的项
console.log(this.items);
_datas.forEach((data: any) => {
this.items.some((item:any,index:number)=>{
if(Object.is(item.srfkey,data.srfkey)){
this.items.splice(index,1);
return true;
}
});
});
this.totalrow -= _datas.length;
this.$emit('remove', null);
this.selections = [];
resolve(response);
......@@ -719,7 +783,11 @@ export default class MainBase extends Vue implements ControlInterface {
if (Object.is(data.type, 'maxRowCount')) {
Object.assign(page, { page: 0, size: data.maxRowCount });
} else if (Object.is(data.type, 'activatedPage')) {
doExport(JSON.parse(JSON.stringify(this.items)));
try {
doExport(JSON.parse(JSON.stringify(this.items)));
} catch (error) {
console.error(error);
}
return;
}
// 设置排序
......@@ -739,7 +807,11 @@ export default class MainBase extends Vue implements ControlInterface {
this.$Notice.error({ title: '', desc: '数据导出失败,' + response.info });
return;
}
doExport(JSON.parse(JSON.stringify(response.data)));
try {
doExport(JSON.parse(JSON.stringify(response.data)));
} catch (error) {
console.error(error);
}
}).catch((response: any) => {
if (response && response.status === 401) {
return;
......@@ -923,7 +995,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @memberof Main
*/
protected rowDBLClick($event: any): void {
if (!$event || this.isOpenEdit) {
if (!$event || this.actualIsOpenEdit || Object.is(this.gridRowActiveMode,0)) {
return;
}
this.selections = [];
......@@ -979,7 +1051,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @memberof Main
*/
protected rowClick($event: any, ifAlways: boolean = false): void {
if (!ifAlways && (!$event || this.isOpenEdit)) {
if (!ifAlways && (!$event || this.actualIsOpenEdit)) {
return;
}
if(this.stopRowClick) {
......@@ -1003,8 +1075,10 @@ export default class MainBase extends Vue implements ControlInterface {
if (refs.multipleTable) {
if(this.isSingleSelect){
refs.multipleTable.clearSelection();
refs.multipleTable.setCurrentRow($event);
}else{
refs.multipleTable.toggleRowSelection($event);
}
refs.multipleTable.toggleRowSelection($event);
}
this.$emit('selectionchange', this.selections);
......@@ -1192,6 +1266,19 @@ export default class MainBase extends Vue implements ControlInterface {
}
/**
* 获取对应行class
*
* @param {*} $args row 行数据,rowIndex 行索引
* @returns {void}
* @memberof Main
*/
protected getRowClassName(args:{row: any,rowIndex: number}){
let isSelected = this.selections.some((item:any)=>{
return Object.is(item.ps,args.row.ps);
});
return isSelected ? "grid-selected-row" : "";
}
}
</script>
......
......@@ -27,7 +27,7 @@
}
}
.el-table__body-wrapper{
height: 100% !important;
height: calc(100% - 83px) !important;
}
.el-table__empty-block{
height: auto !important;
......
此差异已折叠。
......@@ -40,14 +40,6 @@
mvn install
cd ..
mvn install
cd ps-app/ps-app-web
mvn clean package -Pprod
echo &apos;echo &quot;$para1&quot;&apos; &gt; apppasswd.sh
chmod -R 777 *
setsid env SSH_ASKPASS=&apos;./apppasswd.sh&apos; DISPLAY=&apos;none:0&apos; ssh root@172.16.102.61 &quot;mkdir -p /ibiz/nodes/node1/7B163728-8A01-45A9-862D-13C620F053F6&quot;
setsid env SSH_ASKPASS=&apos;./apppasswd.sh&apos; DISPLAY=&apos;none:0&apos; scp -r ./target/ps-app-web.jar root@172.16.102.61:/ibiz/nodes/node1/7B163728-8A01-45A9-862D-13C620F053F6
setsid env SSH_ASKPASS=&apos;./apppasswd.sh&apos; DISPLAY=&apos;none:0&apos; ssh root@172.16.102.61 &quot;ps -ef | grep &apos;/ibiz/nodes/node1/7B163728-8A01-45A9-862D-13C620F053F6&apos;| tr -s &apos; &apos;|cut -d&apos; &apos; -f2,8,9 | grep -v grep | grep &apos;jar&apos; | cut -d&apos; &apos; -f1|xargs --no-run-if-empty kill -9&quot;
setsid env SSH_ASKPASS=&apos;./apppasswd.sh&apos; DISPLAY=&apos;none:0&apos; ssh root@172.16.102.61 &quot;source /etc/profile;source ~/.bash_profile; nohup java -jar -Xms512m -Xmx1024m -XX:PermSize=128M -XX:MaxPermSize=128m /ibiz/nodes/node1/7B163728-8A01-45A9-862D-13C620F053F6/ps-app-web.jar &gt;&gt;/ibiz/nodes/node1/7B163728-8A01-45A9-862D-13C620F053F6/ps_appps 应用-`date --date=&apos;0 days ago&apos; +%Y-%m-%d`.log 2&gt;&amp;1 &amp;&quot;
</command>
</hudson.tasks.Shell>
</builders>
......
......@@ -19,6 +19,8 @@
<modules>
<!-- dependencies -->
<module>ps-dependencies</module>
<!-- ext libs -->
<module>ps-ext-libs</module>
<!-- utils -->
<module>ps-util</module>
<!-- comenpents -->
......
......@@ -19,7 +19,11 @@
</modules>
<dependencies>
<dependency>
<groupId>com.ibiz</groupId>
<artifactId>ps-ext-libs</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>
......@@ -23,7 +23,7 @@
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-commons</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-security</artifactId>
......@@ -40,12 +40,18 @@
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-cas</artifactId>
</dependency>
<dependency>
<groupId>com.ibiz</groupId>
<artifactId>ps-util</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.ibiz</groupId>
<artifactId>ps-ext-libs</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>
......@@ -2,6 +2,10 @@ package com.ibiz.web;
import java.util.List;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
......@@ -19,13 +23,12 @@ import org.springframework.http.converter.json.MappingJackson2HttpMessageConvert
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.ibiz.util.web.SearchContextHandlerMethodArgumentResolver;
import com.ibiz.util.serialize.DomainSerializerProvider;
import lombok.Data;
@Slf4j
@SpringBootApplication(exclude = {
})
@Import({
FeignClientsConfiguration.class
......
......@@ -4,6 +4,9 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import lombok.extern.slf4j.Slf4j;
import com.alibaba.fastjson.JSONObject;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.core.Authentication;
......@@ -12,8 +15,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import com.alibaba.fastjson.JSONObject;
import com.ibiz.util.helper.SpringContextHolder;
import com.ibiz.util.security.userdetail.LoginUser;
import com.ibiz.util.web.SessionConstants;
......@@ -48,4 +49,4 @@ public class WebAppController {
return ResponseEntity.status(HttpStatus.OK).body(appData);
}
}
\ No newline at end of file
}
......@@ -3,13 +3,15 @@ package com.ibiz.web.module.controller;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import lombok.extern.slf4j.Slf4j;
import com.alibaba.fastjson.JSONObject;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import com.alibaba.fastjson.JSONObject;
import io.seata.spring.annotation.GlobalTransactional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
......@@ -18,7 +20,11 @@ import org.springframework.data.domain.PageRequest;
import com.ibiz.web.module.service.PSService;
import com.ibiz.web.module.domain.PS;
import com.ibiz.web.module.filter.*;
import com.ibiz.util.log.IBIZLog;
@Slf4j
@IBIZLog
@RestController
@RequestMapping(value = "")
public class PSController {
......@@ -26,6 +32,8 @@ public class PSController {
PSService psservice;
//@GlobalTransactional
//@GlobalTransactional
@RequestMapping(method = RequestMethod.DELETE, value = "/ps/{ps_id}")
@PreAuthorize("@ps_pms.check(#ps_id,'DELETE')")
public ResponseEntity<Boolean> remove(@PathVariable("ps_id") String ps_id) {
......@@ -33,6 +41,7 @@ public class PSController {
return ResponseEntity.status(HttpStatus.OK).body(b);
}
//@GlobalTransactional
@RequestMapping(method = RequestMethod.POST, value = "/ps")
@PreAuthorize("@ps_pms.check('CREATE')")
public ResponseEntity<PS> create(@RequestBody PS ps) {
......@@ -40,6 +49,7 @@ public class PSController {
return ResponseEntity.status(HttpStatus.OK).body(ps2);
}
//@GlobalTransactional
@RequestMapping(method = RequestMethod.GET, value = "/ps/{ps_id}")
@PreAuthorize("@ps_pms.check(#ps_id,'READ')")
public ResponseEntity<PS> get(@PathVariable("ps_id") String ps_id) {
......@@ -47,6 +57,7 @@ public class PSController {
return ResponseEntity.status(HttpStatus.OK).body(ps);
}
//@GlobalTransactional
@RequestMapping(method = RequestMethod.GET, value = "/ps/getdraft")
@PreAuthorize("@ps_pms.check('CREATE')")
public ResponseEntity<PS> getDraft() {
......@@ -54,6 +65,7 @@ public class PSController {
return ResponseEntity.status(HttpStatus.OK).body(new PS());
}
//@GlobalTransactional
@RequestMapping(method = RequestMethod.POST, value = "/ps/{ps_id}/save")
@PreAuthorize("@ps_pms.check(#ps_id,'')")
public ResponseEntity<PS> save(@PathVariable("ps_id") String ps_id, @RequestBody PS ps) {
......@@ -61,6 +73,7 @@ public class PSController {
return ResponseEntity.status(HttpStatus.OK).body(ps2);
}
//@GlobalTransactional
@RequestMapping(method = RequestMethod.PUT, value = "/ps/{ps_id}")
@PreAuthorize("@ps_pms.check(#ps_id,'UPDATE')")
public ResponseEntity<PS> update(@PathVariable("ps_id") String ps_id, @RequestBody PS ps) {
......@@ -75,6 +88,7 @@ public class PSController {
return ResponseEntity.status(HttpStatus.OK).body(ps2);
}
//@GlobalTransactional
@RequestMapping(method = RequestMethod.POST, value = "/ps/{ps_id}/createandstartim")
@PreAuthorize("@ps_pms.check(#ps_id,'CREATE')")
public ResponseEntity<PS> createAndStartIM(@PathVariable("ps_id") String ps_id, @RequestBody PS ps) {
......@@ -82,6 +96,7 @@ public class PSController {
return ResponseEntity.status(HttpStatus.OK).body(ps2);
}
//@GlobalTransactional
@RequestMapping(method = RequestMethod.POST, value = "/ps/checkkey")
@PreAuthorize("@ps_pms.check('')")
public ResponseEntity<Boolean> checkKey(@RequestBody PS ps) {
......@@ -89,6 +104,7 @@ public class PSController {
return ResponseEntity.status(HttpStatus.OK).body(b);
}
//@GlobalTransactional
@RequestMapping(method= RequestMethod.GET , value="/ps/fetchdefault")
@PreAuthorize("@ps_pms.check('READ')")
public ResponseEntity<List<PS>> fetchDefault(PSSearchContext searchContext,Pageable pageable) {
......@@ -101,5 +117,12 @@ public class PSController {
.body(page.getContent());
}
//@GlobalTransactional
//@GlobalTransactional
//@GlobalTransactional
//@GlobalTransactional
//@GlobalTransactional
//@GlobalTransactional
//@GlobalTransactional
}
......@@ -7,8 +7,10 @@ import java.util.List;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ibiz.util.SearchContext;
import com.ibiz.util.log.IBIZLog;
@Data
@IBIZLog
public class PSSearchContext extends SearchContext implements Serializable {
public String n_psname_like;//[采购单名称]
......
package com.ibiz.web.module.service;
import java.util.ArrayList;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.ribbon.LoadBalancerFeignClient;
import org.springframework.stereotype.Service;
import lombok.extern.slf4j.Slf4j;
import com.alibaba.fastjson.JSONObject;
import feign.Client;
import feign.Contract;
......@@ -13,13 +12,14 @@ import feign.Feign;
import feign.codec.Decoder;
import feign.codec.Encoder;
import com.alibaba.fastjson.JSONObject;
import org.springframework.util.DigestUtils;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.ribbon.LoadBalancerFeignClient;
import org.springframework.stereotype.Service;
import com.ibiz.util.feign.suport.SearchContextFeignEncode;
import com.ibiz.web.module.domain.PS;
......@@ -27,7 +27,10 @@ import com.ibiz.web.module.filter.*;
import com.ibiz.web.module.feign.PSFeignClient;
import com.ibiz.web.WebApplication.WebClientProperties;
import com.ibiz.util.feign.FeignRequestInterceptor;
import com.ibiz.util.log.IBIZLog;
@Slf4j
@IBIZLog
@Service
public class PSService {
......
......@@ -3,13 +3,15 @@ package com.ibiz.web.r7rt_org.controller;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import lombok.extern.slf4j.Slf4j;
import com.alibaba.fastjson.JSONObject;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import com.alibaba.fastjson.JSONObject;
import io.seata.spring.annotation.GlobalTransactional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
......@@ -18,7 +20,11 @@ import org.springframework.data.domain.PageRequest;
import com.ibiz.web.r7rt_org.service.OrgService;
import com.ibiz.web.r7rt_org.domain.Org;
import com.ibiz.web.r7rt_org.filter.*;
import com.ibiz.util.log.IBIZLog;
@Slf4j
@IBIZLog
@RestController
@RequestMapping(value = "")
public class OrgController {
......@@ -26,6 +32,7 @@ public class OrgController {
OrgService orgservice;
//@GlobalTransactional
@RequestMapping(method = RequestMethod.GET, value = "/orgs/getdraft")
@PreAuthorize("@org_pms.check('CREATE')")
public ResponseEntity<Org> getDraft() {
......@@ -33,6 +40,7 @@ public class OrgController {
return ResponseEntity.status(HttpStatus.OK).body(new Org());
}
//@GlobalTransactional
@RequestMapping(method = RequestMethod.GET, value = "/orgs/{org_id}/getorgprent")
@PreAuthorize("@org_pms.check(#org_id,'READ')")
public ResponseEntity<Org> getOrgPrent(@PathVariable("org_id") String org_id, @RequestBody Org org) {
......@@ -40,6 +48,7 @@ public class OrgController {
return ResponseEntity.status(HttpStatus.OK).body(org2);
}
//@GlobalTransactional
@RequestMapping(method = RequestMethod.DELETE, value = "/orgs/{org_id}")
@PreAuthorize("@org_pms.check(#org_id,'DELETE')")
public ResponseEntity<Boolean> remove(@PathVariable("org_id") String org_id) {
......@@ -47,6 +56,7 @@ public class OrgController {
return ResponseEntity.status(HttpStatus.OK).body(b);
}
//@GlobalTransactional
@RequestMapping(method = RequestMethod.PUT, value = "/orgs/{org_id}")
@PreAuthorize("@org_pms.check(#org_id,'UPDATE')")
public ResponseEntity<Org> update(@PathVariable("org_id") String org_id, @RequestBody Org org) {
......@@ -61,6 +71,7 @@ public class OrgController {
return ResponseEntity.status(HttpStatus.OK).body(org2);
}
//@GlobalTransactional
@RequestMapping(method = RequestMethod.GET, value = "/orgs/{org_id}")
@PreAuthorize("@org_pms.check(#org_id,'READ')")
public ResponseEntity<Org> get(@PathVariable("org_id") String org_id) {
......@@ -68,6 +79,7 @@ public class OrgController {
return ResponseEntity.status(HttpStatus.OK).body(org);
}
//@GlobalTransactional
@RequestMapping(method = RequestMethod.POST, value = "/orgs")
@PreAuthorize("@org_pms.check('CREATE')")
public ResponseEntity<Org> create(@RequestBody Org org) {
......@@ -75,6 +87,7 @@ public class OrgController {
return ResponseEntity.status(HttpStatus.OK).body(org2);
}
//@GlobalTransactional
@RequestMapping(method = RequestMethod.POST, value = "/orgs/{org_id}/save")
@PreAuthorize("@org_pms.check(#org_id,'')")
public ResponseEntity<Org> save(@PathVariable("org_id") String org_id, @RequestBody Org org) {
......@@ -82,6 +95,7 @@ public class OrgController {
return ResponseEntity.status(HttpStatus.OK).body(org2);
}
//@GlobalTransactional
@RequestMapping(method = RequestMethod.POST, value = "/orgs/{org_id}/synctousergroup")
@PreAuthorize("@org_pms.check(#org_id,'')")
public ResponseEntity<Org> syncToUserGroup(@PathVariable("org_id") String org_id, @RequestBody Org org) {
......@@ -89,6 +103,7 @@ public class OrgController {
return ResponseEntity.status(HttpStatus.OK).body(org2);
}
//@GlobalTransactional
@RequestMapping(method = RequestMethod.POST, value = "/orgs/checkkey")
@PreAuthorize("@org_pms.check('')")
public ResponseEntity<Boolean> checkKey(@RequestBody Org org) {
......@@ -96,6 +111,7 @@ public class OrgController {
return ResponseEntity.status(HttpStatus.OK).body(b);
}
//@GlobalTransactional
@RequestMapping(method = RequestMethod.GET, value = "/orgs/{org_id}/getorgchild")
@PreAuthorize("@org_pms.check(#org_id,'READ')")
public ResponseEntity<Org> getOrgChild(@PathVariable("org_id") String org_id, @RequestBody Org org) {
......@@ -103,6 +119,7 @@ public class OrgController {
return ResponseEntity.status(HttpStatus.OK).body(org2);
}
//@GlobalTransactional
@RequestMapping(method= RequestMethod.GET , value="/orgs/fetchdefault")
@PreAuthorize("@org_pms.check('READ')")
public ResponseEntity<List<Org>> fetchDefault(OrgSearchContext searchContext,Pageable pageable) {
......@@ -115,5 +132,12 @@ public class OrgController {
.body(page.getContent());
}
//@GlobalTransactional
//@GlobalTransactional
//@GlobalTransactional
//@GlobalTransactional
//@GlobalTransactional
//@GlobalTransactional
//@GlobalTransactional
}
......@@ -3,13 +3,15 @@ package com.ibiz.web.r7rt_org.controller;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import lombok.extern.slf4j.Slf4j;
import com.alibaba.fastjson.JSONObject;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import com.alibaba.fastjson.JSONObject;
import io.seata.spring.annotation.GlobalTransactional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
......@@ -18,7 +20,11 @@ import org.springframework.data.domain.PageRequest;
import com.ibiz.web.r7rt_org.service.OrgDeptService;
import com.ibiz.web.r7rt_org.domain.OrgDept;
import com.ibiz.web.r7rt_org.filter.*;
import com.ibiz.util.log.IBIZLog;
@Slf4j
@IBIZLog
@RestController
@RequestMapping(value = "")
public class OrgDeptController {
......@@ -26,6 +32,7 @@ public class OrgDeptController {
OrgDeptService orgdeptservice;
//@GlobalTransactional
@RequestMapping(method = RequestMethod.POST, value = "/orgdepts/{orgdept_id}/save")
@PreAuthorize("@orgdept_pms.check(#orgdept_id,'')")
public ResponseEntity<OrgDept> save(@PathVariable("orgdept_id") String orgdept_id, @RequestBody OrgDept orgdept) {
......@@ -33,6 +40,7 @@ public class OrgDeptController {
return ResponseEntity.status(HttpStatus.OK).body(orgdept2);
}
//@GlobalTransactional
@RequestMapping(method = RequestMethod.POST, value = "/orgdepts/{orgdept_id}/synctousergroup")
@PreAuthorize("@orgdept_pms.check(#orgdept_id,'')")
public ResponseEntity<OrgDept> syncToUserGroup(@PathVariable("orgdept_id") String orgdept_id, @RequestBody OrgDept orgdept) {
......@@ -40,6 +48,7 @@ public class OrgDeptController {
return ResponseEntity.status(HttpStatus.OK).body(orgdept2);
}
//@GlobalTransactional
@RequestMapping(method = RequestMethod.GET, value = "/orgdepts/{orgdept_id}/getorgdeptchild")
@PreAuthorize("@orgdept_pms.check(#orgdept_id,'READ')")
public ResponseEntity<OrgDept> getOrgDeptChild(@PathVariable("orgdept_id") String orgdept_id, @RequestBody OrgDept orgdept) {
......@@ -47,6 +56,7 @@ public class OrgDeptController {
return ResponseEntity.status(HttpStatus.OK).body(orgdept2);
}
//@GlobalTransactional
@RequestMapping(method = RequestMethod.DELETE, value = "/orgdepts/{orgdept_id}")
@PreAuthorize("@orgdept_pms.check(#orgdept_id,'DELETE')")
public ResponseEntity<Boolean> remove(@PathVariable("orgdept_id") String orgdept_id) {
......@@ -54,6 +64,7 @@ public class OrgDeptController {
return ResponseEntity.status(HttpStatus.OK).body(b);
}
//@GlobalTransactional
@RequestMapping(method = RequestMethod.GET, value = "/orgdepts/{orgdept_id}")
@PreAuthorize("@orgdept_pms.check(#orgdept_id,'READ')")
public ResponseEntity<OrgDept> get(@PathVariable("orgdept_id") String orgdept_id) {
......@@ -61,6 +72,7 @@ public class OrgDeptController {
return ResponseEntity.status(HttpStatus.OK).body(orgdept);
}
//@GlobalTransactional
@RequestMapping(method = RequestMethod.PUT, value = "/orgdepts/{orgdept_id}")
@PreAuthorize("@orgdept_pms.check(#orgdept_id,'UPDATE')")
public ResponseEntity<OrgDept> update(@PathVariable("orgdept_id") String orgdept_id, @RequestBody OrgDept orgdept) {
......@@ -75,6 +87,7 @@ public class OrgDeptController {
return ResponseEntity.status(HttpStatus.OK).body(orgdept2);
}
//@GlobalTransactional
@RequestMapping(method = RequestMethod.GET, value = "/orgdepts/getdraft")
@PreAuthorize("@orgdept_pms.check('CREATE')")
public ResponseEntity<OrgDept> getDraft() {
......@@ -82,6 +95,7 @@ public class OrgDeptController {
return ResponseEntity.status(HttpStatus.OK).body(new OrgDept());
}
//@GlobalTransactional
@RequestMapping(method = RequestMethod.POST, value = "/orgdepts")
@PreAuthorize("@orgdept_pms.check('CREATE')")
public ResponseEntity<OrgDept> create(@RequestBody OrgDept orgdept) {
......@@ -89,6 +103,7 @@ public class OrgDeptController {
return ResponseEntity.status(HttpStatus.OK).body(orgdept2);
}
//@GlobalTransactional
@RequestMapping(method = RequestMethod.POST, value = "/orgdepts/checkkey")
@PreAuthorize("@orgdept_pms.check('')")
public ResponseEntity<Boolean> checkKey(@RequestBody OrgDept orgdept) {
......@@ -96,6 +111,7 @@ public class OrgDeptController {
return ResponseEntity.status(HttpStatus.OK).body(b);
}
//@GlobalTransactional
@RequestMapping(method = RequestMethod.GET, value = "/orgdepts/{orgdept_id}/getorgdeptprent")
@PreAuthorize("@orgdept_pms.check(#orgdept_id,'READ')")
public ResponseEntity<OrgDept> getOrgDeptPrent(@PathVariable("orgdept_id") String orgdept_id, @RequestBody OrgDept orgdept) {
......@@ -103,6 +119,7 @@ public class OrgDeptController {
return ResponseEntity.status(HttpStatus.OK).body(orgdept2);
}
//@GlobalTransactional
@RequestMapping(method= RequestMethod.GET , value="/orgdepts/fetchdefault")
@PreAuthorize("@orgdept_pms.check('READ')")
public ResponseEntity<List<OrgDept>> fetchDefault(OrgDeptSearchContext searchContext,Pageable pageable) {
......@@ -115,6 +132,7 @@ public class OrgDeptController {
.body(page.getContent());
}
//@GlobalTransactional
@RequestMapping(method= RequestMethod.GET , value="/orgdepts/fetchcur_org")
@PreAuthorize("@orgdept_pms.check('READ')")
public ResponseEntity<List<OrgDept>> fetchCUR_ORG(OrgDeptSearchContext searchContext,Pageable pageable) {
......@@ -127,5 +145,12 @@ public class OrgDeptController {
.body(page.getContent());
}
//@GlobalTransactional
//@GlobalTransactional
//@GlobalTransactional
//@GlobalTransactional
//@GlobalTransactional
//@GlobalTransactional
//@GlobalTransactional
}
......@@ -3,13 +3,15 @@ package com.ibiz.web.r7rt_org.controller;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import lombok.extern.slf4j.Slf4j;
import com.alibaba.fastjson.JSONObject;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import com.alibaba.fastjson.JSONObject;
import io.seata.spring.annotation.GlobalTransactional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
......@@ -18,7 +20,11 @@ import org.springframework.data.domain.PageRequest;
import com.ibiz.web.r7rt_org.service.OrgDeptUserService;
import com.ibiz.web.r7rt_org.domain.OrgDeptUser;
import com.ibiz.web.r7rt_org.filter.*;
import com.ibiz.util.log.IBIZLog;
@Slf4j
@IBIZLog
@RestController
@RequestMapping(value = "")
public class OrgDeptUserController {
......@@ -26,6 +32,7 @@ public class OrgDeptUserController {
OrgDeptUserService orgdeptuserservice;
//@GlobalTransactional
@RequestMapping(method = RequestMethod.GET, value = "/orgdeptusers/getdraft")
@PreAuthorize("@orgdeptuser_pms.check('CREATE')")
public ResponseEntity<OrgDeptUser> getDraft() {
......@@ -33,6 +40,7 @@ public class OrgDeptUserController {
return ResponseEntity.status(HttpStatus.OK).body(new OrgDeptUser());
}
//@GlobalTransactional
@RequestMapping(method = RequestMethod.GET, value = "/orgdeptusers/{orgdeptuser_id}")
@PreAuthorize("@orgdeptuser_pms.check(#orgdeptuser_id,'READ')")
public ResponseEntity<OrgDeptUser> get(@PathVariable("orgdeptuser_id") String orgdeptuser_id) {
......@@ -40,6 +48,7 @@ public class OrgDeptUserController {
return ResponseEntity.status(HttpStatus.OK).body(orgdeptuser);
}
//@GlobalTransactional
@RequestMapping(method = RequestMethod.POST, value = "/orgdeptusers/{orgdeptuser_id}/save")
@PreAuthorize("@orgdeptuser_pms.check(#orgdeptuser_id,'')")
public ResponseEntity<OrgDeptUser> save(@PathVariable("orgdeptuser_id") String orgdeptuser_id, @RequestBody OrgDeptUser orgdeptuser) {
......@@ -47,6 +56,7 @@ public class OrgDeptUserController {
return ResponseEntity.status(HttpStatus.OK).body(orgdeptuser2);
}
//@GlobalTransactional
@RequestMapping(method = RequestMethod.POST, value = "/orgdeptusers")
@PreAuthorize("@orgdeptuser_pms.check('CREATE')")
public ResponseEntity<OrgDeptUser> create(@RequestBody OrgDeptUser orgdeptuser) {
......@@ -54,6 +64,7 @@ public class OrgDeptUserController {
return ResponseEntity.status(HttpStatus.OK).body(orgdeptuser2);
}
//@GlobalTransactional
@RequestMapping(method = RequestMethod.DELETE, value = "/orgdeptusers/{orgdeptuser_id}")
@PreAuthorize("@orgdeptuser_pms.check(#orgdeptuser_id,'DELETE')")
public ResponseEntity<Boolean> remove(@PathVariable("orgdeptuser_id") String orgdeptuser_id) {
......@@ -61,6 +72,7 @@ public class OrgDeptUserController {
return ResponseEntity.status(HttpStatus.OK).body(b);
}
//@GlobalTransactional
@RequestMapping(method = RequestMethod.PUT, value = "/orgdeptusers/{orgdeptuser_id}")
@PreAuthorize("@orgdeptuser_pms.check(#orgdeptuser_id,'UPDATE')")
public ResponseEntity<OrgDeptUser> update(@PathVariable("orgdeptuser_id") String orgdeptuser_id, @RequestBody OrgDeptUser orgdeptuser) {
......@@ -75,6 +87,7 @@ public class OrgDeptUserController {
return ResponseEntity.status(HttpStatus.OK).body(orgdeptuser2);
}
//@GlobalTransactional
@RequestMapping(method = RequestMethod.POST, value = "/orgdeptusers/checkkey")
@PreAuthorize("@orgdeptuser_pms.check('')")
public ResponseEntity<Boolean> checkKey(@RequestBody OrgDeptUser orgdeptuser) {
......@@ -82,6 +95,7 @@ public class OrgDeptUserController {
return ResponseEntity.status(HttpStatus.OK).body(b);
}
//@GlobalTransactional
@RequestMapping(method= RequestMethod.GET , value="/orgdeptusers/fetchgetorgdeptuser")
@PreAuthorize("@orgdeptuser_pms.check('READ')")
public ResponseEntity<List<OrgDeptUser>> fetchGetorgdeptuser(OrgDeptUserSearchContext searchContext,Pageable pageable) {
......@@ -94,6 +108,7 @@ public class OrgDeptUserController {
.body(page.getContent());
}
//@GlobalTransactional
@RequestMapping(method= RequestMethod.GET , value="/orgdeptusers/fetchdefault")
@PreAuthorize("@orgdeptuser_pms.check('READ')")
public ResponseEntity<List<OrgDeptUser>> fetchDefault(OrgDeptUserSearchContext searchContext,Pageable pageable) {
......@@ -106,5 +121,12 @@ public class OrgDeptUserController {
.body(page.getContent());
}
//@GlobalTransactional
//@GlobalTransactional
//@GlobalTransactional
//@GlobalTransactional
//@GlobalTransactional
//@GlobalTransactional
//@GlobalTransactional
}
......@@ -3,13 +3,15 @@ package com.ibiz.web.r7rt_org.controller;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import lombok.extern.slf4j.Slf4j;
import com.alibaba.fastjson.JSONObject;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import com.alibaba.fastjson.JSONObject;
import io.seata.spring.annotation.GlobalTransactional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
......@@ -18,7 +20,11 @@ import org.springframework.data.domain.PageRequest;
import com.ibiz.web.r7rt_org.service.OrgUserService;
import com.ibiz.web.r7rt_org.domain.OrgUser;
import com.ibiz.web.r7rt_org.filter.*;
import com.ibiz.util.log.IBIZLog;
@Slf4j
@IBIZLog
@RestController
@RequestMapping(value = "")
public class OrgUserController {
......@@ -26,6 +32,7 @@ public class OrgUserController {
OrgUserService orguserservice;
//@GlobalTransactional
@RequestMapping(method = RequestMethod.DELETE, value = "/orgusers/{orguser_id}")
@PreAuthorize("@orguser_pms.check(#orguser_id,'DELETE')")
public ResponseEntity<Boolean> remove(@PathVariable("orguser_id") String orguser_id) {
......@@ -33,6 +40,7 @@ public class OrgUserController {
return ResponseEntity.status(HttpStatus.OK).body(b);
}
//@GlobalTransactional
@RequestMapping(method = RequestMethod.POST, value = "/orgusers/{orguser_id}/save")
@PreAuthorize("@orguser_pms.check(#orguser_id,'')")
public ResponseEntity<OrgUser> save(@PathVariable("orguser_id") String orguser_id, @RequestBody OrgUser orguser) {
......@@ -40,6 +48,7 @@ public class OrgUserController {
return ResponseEntity.status(HttpStatus.OK).body(orguser2);
}
//@GlobalTransactional
@RequestMapping(method = RequestMethod.PUT, value = "/orgusers/{orguser_id}")
@PreAuthorize("@orguser_pms.check(#orguser_id,'UPDATE')")
public ResponseEntity<OrgUser> update(@PathVariable("orguser_id") String orguser_id, @RequestBody OrgUser orguser) {
......@@ -54,6 +63,7 @@ public class OrgUserController {
return ResponseEntity.status(HttpStatus.OK).body(orguser2);
}
//@GlobalTransactional
@RequestMapping(method = RequestMethod.POST, value = "/orgusers/checkkey")
@PreAuthorize("@orguser_pms.check('')")
public ResponseEntity<Boolean> checkKey(@RequestBody OrgUser orguser) {
......@@ -61,6 +71,7 @@ public class OrgUserController {
return ResponseEntity.status(HttpStatus.OK).body(b);
}
//@GlobalTransactional
@RequestMapping(method = RequestMethod.GET, value = "/orgusers/getdraft")
@PreAuthorize("@orguser_pms.check('CREATE')")
public ResponseEntity<OrgUser> getDraft() {
......@@ -68,6 +79,7 @@ public class OrgUserController {
return ResponseEntity.status(HttpStatus.OK).body(new OrgUser());
}
//@GlobalTransactional
@RequestMapping(method = RequestMethod.POST, value = "/orgusers")
@PreAuthorize("@orguser_pms.check('CREATE')")
public ResponseEntity<OrgUser> create(@RequestBody OrgUser orguser) {
......@@ -75,6 +87,7 @@ public class OrgUserController {
return ResponseEntity.status(HttpStatus.OK).body(orguser2);
}
//@GlobalTransactional
@RequestMapping(method = RequestMethod.GET, value = "/orgusers/{orguser_id}")
@PreAuthorize("@orguser_pms.check(#orguser_id,'READ')")
public ResponseEntity<OrgUser> get(@PathVariable("orguser_id") String orguser_id) {
......@@ -82,6 +95,7 @@ public class OrgUserController {
return ResponseEntity.status(HttpStatus.OK).body(orguser);
}
//@GlobalTransactional
@RequestMapping(method= RequestMethod.GET , value="/orgusers/fetchdefault")
@PreAuthorize("@orguser_pms.check('READ')")
public ResponseEntity<List<OrgUser>> fetchDefault(OrgUserSearchContext searchContext,Pageable pageable) {
......@@ -94,5 +108,12 @@ public class OrgUserController {
.body(page.getContent());
}
//@GlobalTransactional
//@GlobalTransactional
//@GlobalTransactional
//@GlobalTransactional
//@GlobalTransactional
//@GlobalTransactional
//@GlobalTransactional
}
......@@ -7,8 +7,10 @@ import java.util.List;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ibiz.util.SearchContext;
import com.ibiz.util.log.IBIZLog;
@Data
@IBIZLog
public class OrgDeptSearchContext extends SearchContext implements Serializable {
public String n_orgdeptname_like;//[部门名称]
......
......@@ -7,8 +7,10 @@ import java.util.List;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ibiz.util.SearchContext;
import com.ibiz.util.log.IBIZLog;
@Data
@IBIZLog
public class OrgDeptUserSearchContext extends SearchContext implements Serializable {
public String n_orgdeptusername_like;//[部门用户名称]
......
......@@ -7,8 +7,10 @@ import java.util.List;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ibiz.util.SearchContext;
import com.ibiz.util.log.IBIZLog;
@Data
@IBIZLog
public class OrgSearchContext extends SearchContext implements Serializable {
public String n_orgname_like;//[组织名称]
......
......@@ -7,8 +7,10 @@ import java.util.List;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ibiz.util.SearchContext;
import com.ibiz.util.log.IBIZLog;
@Data
@IBIZLog
public class OrgUserSearchContext extends SearchContext implements Serializable {
public String n_orgusername_like;//[组织用户名称]
......
package com.ibiz.web.r7rt_org.service;
import java.util.ArrayList;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.ribbon.LoadBalancerFeignClient;
import org.springframework.stereotype.Service;
import lombok.extern.slf4j.Slf4j;
import com.alibaba.fastjson.JSONObject;
import feign.Client;
import feign.Contract;
......@@ -13,13 +12,14 @@ import feign.Feign;
import feign.codec.Decoder;
import feign.codec.Encoder;
import com.alibaba.fastjson.JSONObject;
import org.springframework.util.DigestUtils;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.ribbon.LoadBalancerFeignClient;
import org.springframework.stereotype.Service;
import com.ibiz.util.feign.suport.SearchContextFeignEncode;
import com.ibiz.web.r7rt_org.domain.OrgDept;
......@@ -27,7 +27,10 @@ import com.ibiz.web.r7rt_org.filter.*;
import com.ibiz.web.r7rt_org.feign.OrgDeptFeignClient;
import com.ibiz.web.WebApplication.WebClientProperties;
import com.ibiz.util.feign.FeignRequestInterceptor;
import com.ibiz.util.log.IBIZLog;
@Slf4j
@IBIZLog
@Service
public class OrgDeptService {
......
package com.ibiz.web.r7rt_org.service;
import java.util.ArrayList;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.ribbon.LoadBalancerFeignClient;
import org.springframework.stereotype.Service;
import lombok.extern.slf4j.Slf4j;
import com.alibaba.fastjson.JSONObject;
import feign.Client;
import feign.Contract;
......@@ -13,13 +12,14 @@ import feign.Feign;
import feign.codec.Decoder;
import feign.codec.Encoder;
import com.alibaba.fastjson.JSONObject;
import org.springframework.util.DigestUtils;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.ribbon.LoadBalancerFeignClient;
import org.springframework.stereotype.Service;
import com.ibiz.util.feign.suport.SearchContextFeignEncode;
import com.ibiz.web.r7rt_org.domain.OrgDeptUser;
......@@ -27,7 +27,10 @@ import com.ibiz.web.r7rt_org.filter.*;
import com.ibiz.web.r7rt_org.feign.OrgDeptUserFeignClient;
import com.ibiz.web.WebApplication.WebClientProperties;
import com.ibiz.util.feign.FeignRequestInterceptor;
import com.ibiz.util.log.IBIZLog;
@Slf4j
@IBIZLog
@Service
public class OrgDeptUserService {
......
package com.ibiz.web.r7rt_org.service;
import java.util.ArrayList;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.ribbon.LoadBalancerFeignClient;
import org.springframework.stereotype.Service;
import lombok.extern.slf4j.Slf4j;
import com.alibaba.fastjson.JSONObject;
import feign.Client;
import feign.Contract;
......@@ -13,13 +12,14 @@ import feign.Feign;
import feign.codec.Decoder;
import feign.codec.Encoder;
import com.alibaba.fastjson.JSONObject;
import org.springframework.util.DigestUtils;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.ribbon.LoadBalancerFeignClient;
import org.springframework.stereotype.Service;
import com.ibiz.util.feign.suport.SearchContextFeignEncode;
import com.ibiz.web.r7rt_org.domain.Org;
......@@ -27,7 +27,10 @@ import com.ibiz.web.r7rt_org.filter.*;
import com.ibiz.web.r7rt_org.feign.OrgFeignClient;
import com.ibiz.web.WebApplication.WebClientProperties;
import com.ibiz.util.feign.FeignRequestInterceptor;
import com.ibiz.util.log.IBIZLog;
@Slf4j
@IBIZLog
@Service
public class OrgService {
......
package com.ibiz.web.r7rt_org.service;
import java.util.ArrayList;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.ribbon.LoadBalancerFeignClient;
import org.springframework.stereotype.Service;
import lombok.extern.slf4j.Slf4j;
import com.alibaba.fastjson.JSONObject;
import feign.Client;
import feign.Contract;
......@@ -13,13 +12,14 @@ import feign.Feign;
import feign.codec.Decoder;
import feign.codec.Encoder;
import com.alibaba.fastjson.JSONObject;
import org.springframework.util.DigestUtils;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.ribbon.LoadBalancerFeignClient;
import org.springframework.stereotype.Service;
import com.ibiz.util.feign.suport.SearchContextFeignEncode;
import com.ibiz.web.r7rt_org.domain.OrgUser;
......@@ -27,7 +27,10 @@ import com.ibiz.web.r7rt_org.filter.*;
import com.ibiz.web.r7rt_org.feign.OrgUserFeignClient;
import com.ibiz.web.WebApplication.WebClientProperties;
import com.ibiz.util.feign.FeignRequestInterceptor;
import com.ibiz.util.log.IBIZLog;
@Slf4j
@IBIZLog
@Service
public class OrgUserService {
......
package com.ibiz.web.rt.controller;
import lombok.extern.slf4j.Slf4j;
import com.ibiz.web.rt.domain.SRFFILE;
import com.ibiz.web.rt.domain.SRFFILEItem;
import com.ibiz.web.rt.service.SRFFileService;
......@@ -16,10 +18,13 @@ import java.io.*;
import java.nio.file.Files;
import java.text.SimpleDateFormat;
import java.util.UUID;
import com.ibiz.util.log.IBIZLog;
/**
* 文件上传下载
*/
@Slf4j
@IBIZLog
@RestController
@RequestMapping("/")
public class SRFFileController
......@@ -161,4 +166,4 @@ public class SRFFileController
return filename;
}
}
\ No newline at end of file
}
package com.ibiz.web.rt.service;
import lombok.extern.slf4j.Slf4j;
import com.ibiz.util.feign.FeignRequestInterceptor;
import com.ibiz.util.feign.suport.SearchContextFeignEncode;
import com.ibiz.web.WebApplication;
......@@ -13,9 +15,13 @@ import feign.codec.Encoder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.ribbon.LoadBalancerFeignClient;
import org.springframework.stereotype.Component;
import com.ibiz.util.log.IBIZLog;
/**
* 文件上传
*/
@Slf4j
@IBIZLog
@Component
public class SRFFileService {
......
......@@ -3,9 +3,8 @@ package com.ibiz.web.security.cas;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import lombok.extern.slf4j.Slf4j;
import com.ibiz.util.security.userdetail.LoginUser;
import com.ibiz.web.security.userdetail.LoginUserDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.cas.authentication.CasAssertionAuthenticationToken;
import org.springframework.security.core.userdetails.AuthenticationUserDetailsService;
......@@ -13,10 +12,16 @@ import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Service;
import com.ibiz.util.security.userdetail.LoginUser;
import com.ibiz.web.security.userdetail.LoginUserDetailService;
import com.ibiz.util.log.IBIZLog;
/**
* 用于加载用户信息 实现UserDetailsService接口,或者实现AuthenticationUserDetailsService接口
*/
@Slf4j
@IBIZLog
public class CasUserDetailsService implements AuthenticationUserDetailsService<CasAssertionAuthenticationToken> {
@Autowired
......@@ -28,5 +33,5 @@ public class CasUserDetailsService implements AuthenticationUserDetailsService<C
UserDetails userDetails = userDetailsService.loadUserByUsername(token.getName()) ;
return userDetails;
}
}
\ No newline at end of file
}
package com.ibiz.web.security.config;
import com.ibiz.web.security.cas.CasServerConfig;
import com.ibiz.web.security.filter.LoginFilter;
import com.ibiz.web.security.filter.TokenAuthenticationFilter;
import com.ibiz.web.security.token.TokenManager;
import com.ibiz.web.security.token.UnauthorizedEntryPoint;
import com.ibiz.web.security.userdetail.LoginUserDetailService;
import lombok.extern.slf4j.Slf4j;
import org.jasig.cas.client.session.SingleSignOutFilter;
import org.jasig.cas.client.session.SingleSignOutHttpSessionListener;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -30,6 +26,14 @@ import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.security.web.authentication.logout.LogoutFilter;
import org.springframework.web.cors.CorsUtils;
import com.ibiz.web.security.cas.CasServerConfig;
import com.ibiz.web.security.filter.LoginFilter;
import com.ibiz.web.security.filter.TokenAuthenticationFilter;
import com.ibiz.web.security.token.TokenManager;
import com.ibiz.web.security.token.UnauthorizedEntryPoint;
import com.ibiz.web.security.userdetail.LoginUserDetailService;
@Slf4j
@EnableWebSecurity
@Configuration
@EnableGlobalMethodSecurity(prePostEnabled=true)
......@@ -83,9 +87,6 @@ public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
.addFilterBefore(singleSignOutFilter, CasAuthenticationFilter.class);
http.antMatcher("/**");
}
}
@Autowired
......@@ -105,4 +106,4 @@ public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
servletListenerRegistrationBean.setListener(new SingleSignOutHttpSessionListener());
return servletListenerRegistrationBean;
}
}
\ No newline at end of file
}
package com.ibiz.web.security.filter;
import java.util.ArrayList;
import java.io.IOException;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import lombok.extern.slf4j.Slf4j;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.ibiz.web.security.token.TokenManager;
import com.ibiz.util.security.userdetail.LoginUser;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.security.authentication.*;
......@@ -12,13 +20,12 @@ import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.ArrayList;
import com.ibiz.web.security.token.TokenManager;
import com.ibiz.util.security.userdetail.LoginUser;
import com.ibiz.util.log.IBIZLog;
@Slf4j
@IBIZLog
public class LoginFilter extends UsernamePasswordAuthenticationFilter {
private AuthenticationManager authenticationManager;
......
package com.ibiz.web.security.filter;
import com.ibiz.web.security.token.TokenManager;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.ArrayList;
import lombok.extern.slf4j.Slf4j;
import io.jsonwebtoken.ExpiredJwtException;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
......@@ -8,13 +16,11 @@ import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.web.authentication.www.BasicAuthenticationFilter;
import org.springframework.util.StringUtils;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.ArrayList;
import com.ibiz.web.security.token.TokenManager;
import com.ibiz.util.log.IBIZLog;
@Slf4j
@IBIZLog
public class TokenAuthenticationFilter extends BasicAuthenticationFilter {
TokenManager tokenManager ;
......
......@@ -3,8 +3,10 @@ package com.ibiz.web.security.permission.module;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import lombok.extern.slf4j.Slf4j;
import com.alibaba.fastjson.JSONObject;
import javax.servlet.http.HttpServletRequest;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
......@@ -14,9 +16,13 @@ import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.PageRequest;
import com.ibiz.web.module.service.PSService;
import com.ibiz.web.module.domain.PS;
import com.ibiz.util.log.IBIZLog;
@Slf4j
@IBIZLog
@Component("ps_pms")
public class PSPermission {
......
......@@ -3,8 +3,10 @@ package com.ibiz.web.security.permission.r7rt_org;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import lombok.extern.slf4j.Slf4j;
import com.alibaba.fastjson.JSONObject;
import javax.servlet.http.HttpServletRequest;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
......@@ -14,9 +16,13 @@ import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.PageRequest;
import com.ibiz.web.r7rt_org.service.OrgDeptService;
import com.ibiz.web.r7rt_org.domain.OrgDept;
import com.ibiz.util.log.IBIZLog;
@Slf4j
@IBIZLog
@Component("orgdept_pms")
public class OrgDeptPermission {
......
......@@ -3,8 +3,10 @@ package com.ibiz.web.security.permission.r7rt_org;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import lombok.extern.slf4j.Slf4j;
import com.alibaba.fastjson.JSONObject;
import javax.servlet.http.HttpServletRequest;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
......@@ -14,9 +16,13 @@ import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.PageRequest;
import com.ibiz.web.r7rt_org.service.OrgDeptUserService;
import com.ibiz.web.r7rt_org.domain.OrgDeptUser;
import com.ibiz.util.log.IBIZLog;
@Slf4j
@IBIZLog
@Component("orgdeptuser_pms")
public class OrgDeptUserPermission {
......
package com.ibiz.web.security.userdetail;
import lombok.extern.slf4j.Slf4j;
import org.springframework.security.core.GrantedAuthority;
import java.util.Collection;
@Slf4j
public class LoginUser extends org.springframework.security.core.userdetails.User {
private String userId ;
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
package com.ibiz.client.htsc.config;
public class htscClientConfiguration {
}
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册