提交 4abfad32 编写于 作者: tony001's avatar tony001

2020.7.5 Merge

上级 9fcd5830
<template>
<div class="app-department-select">
<ibiz-select-tree :NodesData="Nodesdata" v-model="selectTreeValue" :multiple="multiple" @select="onSelect"></ibiz-select-tree>
<ibiz-select-tree :NodesData="Nodesdata" v-model="selectTreeValue" :disabled="disabled" :multiple="multiple" @select="onSelect"></ibiz-select-tree>
</div>
</template>
......@@ -42,6 +42,14 @@ export default class AppDepartmentSelect extends Vue {
*/
@Prop({default:false}) public multiple?: any;
/**
* 是否禁用
*
* @type {*}
* @memberof AppDepartmentSelect
*/
@Prop({default:false}) public disabled?: boolean;
/**
* 表单数据
*
......
<template>
<div class="app-org-select">
<ibiz-select-tree :NodesData="NodesData" v-model="selectTreeValue" :multiple="multiple" @select="treeSelectChange"></ibiz-select-tree>
<ibiz-select-tree :NodesData="NodesData" v-model="selectTreeValue" :disabled="disabled" :multiple="multiple" @select="treeSelectChange"></ibiz-select-tree>
</div>
</template>
<script lang = 'ts'>
......@@ -44,6 +44,14 @@ export default class AppOrgSelect extends Vue {
*/
@Prop({default:false}) public multiple?:boolean;
/**
* 是否禁用
*
* @type {*}
* @memberof AppDepartmentSelect
*/
@Prop({default:false}) public disabled?: boolean;
/**
* 查询单位路径
*
......
......@@ -89,7 +89,6 @@ export default class FilterTree extends Vue {
};
if(this.datas.length == 0) {
this.onAddItem(root);
this.onAddItem(root);
}
return [root];
}
......
......@@ -6,7 +6,7 @@
export const getAppView = (state: any) => (viewtag: string) => {
const createdview = state.createdviews.find((appview: any) => Object.is(appview.secondtag, viewtag));
if (!createdview) {
console.log(`----视图 ${viewtag} 不存在-----`)
console.warn(`获取应用视图实例,,视图「${viewtag}」不存在`)
return null;
}
return createdview;
......@@ -20,7 +20,7 @@ export const getAppView = (state: any) => (viewtag: string) => {
export const getViewDataChangeState = (state:any) => (viewtag: string) => {
const createdview = state.createdviews.find((appview: any) => Object.is(appview.secondtag, viewtag));
if (!createdview) {
console.log(`----视图 ${viewtag} 不存在-----`)
console.warn(`获取视图数据状态,,视图「${viewtag}」不存在`)
return false;
}
return createdview.viewdatachange;
......@@ -34,7 +34,7 @@ export const getViewDataChangeState = (state:any) => (viewtag: string) => {
export const getRefreshData = (state: any) => (viewtag: string) => {
const createdview = state.createdviews.find((appview: any) => Object.is(appview.secondtag, viewtag));
if (!createdview) {
console.log(`----视图 ${viewtag} 不存在-----`)
console.warn(`获取数据刷新状态,视图「${viewtag}」不存在`)
return null;
}
return createdview.refreshdata;
......
......@@ -6,15 +6,10 @@
* @param param1
*/
export const createdView = (state: any, { viewtag, secondtag }: { viewtag: string, secondtag: string }) => {
// 该视图是否被创建
// const index = state.createdviews.findIndex((view: any) => Object.is(view.secondtag, viewtag));
// if (index !== -1) {
// return;
// }
// 原始数据中是否存在
const appview = state.appviews.find((appview: any) => Object.is(appview.viewtag, viewtag));
if (!appview) {
console.log(`----视图标识 ${viewtag} 不存在-----`)
console.warn(`视图「${viewtag}」原始数据不存在`);
return;
}
const _appview: any = JSON.parse(JSON.stringify(appview));
......@@ -48,7 +43,7 @@ export const removeView = (state: any, viewtag: string) => {
export const setViewDataChange = (state: any, { viewtag, viewdatachange }: { viewtag: string, viewdatachange: boolean }) => {
const createdview = state.createdviews.find((appview: any) => Object.is(appview.secondtag, viewtag));
if (!createdview) {
console.log(`----视图标识 ${viewtag} 不存在-----`)
console.warn(`设置数据状态变更,视图「${viewtag}」不存在`)
return;
}
createdview.viewdatachange = viewdatachange;
......@@ -63,7 +58,7 @@ export const setViewDataChange = (state: any, { viewtag, viewdatachange }: { vie
export const refreshViewData = (state: any, { viewtag }: { viewtag: string }) => {
const createdview = state.createdviews.find((appview: any) => Object.is(appview.secondtag, viewtag));
if (!createdview) {
console.log(`----视图标识 ${viewtag} 不存在-----`)
console.warn(`刷新视图数据,视图「${viewtag}」不存在`)
return;
}
createdview.refreshdata += 1;
......
......@@ -114,6 +114,12 @@ export class Interceptors {
if (res.status === 401) {
this.doNoLogin(_data.data);
}
if(res.status === 403){
if(res.data && res.data.status && Object.is(res.data.status,"FORBIDDEN")){
let alertMessage:string ="非常抱歉,您无权操作此数据,如需操作请联系管理员!";
Object.assign(res.data,{localizedMessage:alertMessage,message:alertMessage});
}
}
// if (res.status === 404) {
// this.router.push({ path: '/404' });
// } else if (res.status === 500) {
......
此差异已折叠。
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册