提交 b88174be 编写于 作者: Shine-zwj's avatar Shine-zwj

人员选择器

上级 2e4f5ad7
......@@ -88,7 +88,7 @@ import CronEditor from './components/cron-editor/cron-editor.vue'
import AppMessagePopover from './components/app-message-popover/app-message-popover.vue'
import AppPanelField from './components/app-panel-field/app-panel-field.vue'
import AppPanelItem from './components/app-panel-item/app-panel-item.vue'
import AppDepartmentPersonnel from './components/app-department-personnel/app-department-personnel.vue'
// 全局挂载UI实体服务注册中心
window['uiServiceRegister'] = uiServiceRegister;
......@@ -114,6 +114,7 @@ export const AppComponents = {
v.prototype.$verify = Verify;
v.prototype.$viewTool = ViewTool;
v.prototype.$uiActionTool = UIActionTool;
v.component('app-department-personnel',AppDepartmentPersonnel);
v.component('app-panel-item',AppPanelItem);
v.component('app-panel-field',AppPanelField);
v.component('app-full-scren',AppFullScren);
......
......@@ -176,7 +176,12 @@ export default class AppGroupPicker extends Vue {
*/
public loadTree() {
let orgid = this.viewParam.filtervalue;
let tempTreeUrl:string = this.treeurl.replace('${orgid}',orgid);
let tempTreeUrl: string = '';
if( this.viewParam.selectTyep == 'org'){
tempTreeUrl = this.treeurl.replace('${orgid}',orgid);
}else if(this.viewParam.selectTyep == 'dept'){
tempTreeUrl = this.treeurl.replace('{deptId}',orgid);
}
let get = Http.getInstance().get(tempTreeUrl, true);
get.then((response: any) => {
if(response.status === 200) {
......@@ -194,7 +199,12 @@ export default class AppGroupPicker extends Vue {
* @memberof AppGroupPicker
*/
public loadGroupData(key: string) {
let tempUrl = this.url.replace('${selected-orgid}',key);
let tempUrl: string = '';
if( Object.is(this.viewParam.selectType,"org")){
tempUrl = this.url.replace('${selected-orgid}',key);
}else if(Object.is(this.viewParam.selectType,"dept")){
tempUrl = this.url.replace('{deptId}',key);
}
let get = Http.getInstance().get(tempUrl, true);
get.then((response: any) => {
if(response.status === 200) {
......
......@@ -147,9 +147,7 @@ export default class AppGroupSelect extends Vue {
if (newVal) {
let item: any = {};
item.label = this.data[this.name]?this.data[this.name].split(','):[];
if(this.valueitem) {
item.id = this.data[this.valueitem] ? this.data[this.valueitem].split(',') : [];
}
item.id = this.data[this.valueitem] ? this.data[this.valueitem].split(',') : [];
if(this.fillmap) {
for(let key in this.fillmap) {
item[this.fillmap[key]] = this.data[key] ? this.data[key].split(',') : [];
......@@ -219,7 +217,8 @@ export default class AppGroupSelect extends Vue {
treeurl:this.treeurl,
filtervalue: filtervalue,
multiple: this.multiple,
selects: this.selects
selects: this.selects,
selectTpye: 'org'
});
let container: Subject<any> = this.$appmodal.openModal(view, context, param);
container.subscribe((result: any) => {
......
/**
* 获取代码表对象
*
* @param state
*/
export const getDepartmentPersonnel = (state: any) => () => {
return state.departmentPersonnel;
}
/**
* 获取代码表对象
*
......
import { Environment } from '@/environments/environment';
/**
* 添加部门成员
*
* @param state
* @param codelists
*/
export const addDepartmentPersonnel = (state: any, departmentPersonnel: Array<any>) => {
state.departmentPersonnel = [];
state.departmentPersonnel = [...departmentPersonnel];
}
/**
* 添加代码表
*
......@@ -98,10 +109,7 @@ export const addPage = (state: any, arg: any) => {
if (!arg) {
return;
}
// 视图类型为REDIRECTVIEW和NOTAB的视图不添加缓存
if(Object.is(arg.meta.viewType, 'REDIRECTVIEW') || Object.is(arg.meta.viewType, 'NOTAB')){
return;
}else if(Object.is(arg.meta.viewType, 'APPINDEX')) {
if (Object.is(arg.meta.viewType, 'APPINDEX')) {
window.sessionStorage.setItem(Environment.AppName, arg.fullPath);
} else {
const page: any = {};
......
......@@ -7,6 +7,7 @@ export const rootstate: any = {
pageMetas: [],
historyPathList: [],
codelists: [],
departmentPersonnel:[],
selectTheme: '',
selectFont: '',
appdata: '',
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册