提交 2f84ed85 编写于 作者: tony001's avatar tony001

zpc --- 修改组件

上级 3783b3b6
...@@ -17,7 +17,7 @@ export default class AppDepartmentSelect extends Vue { ...@@ -17,7 +17,7 @@ export default class AppDepartmentSelect extends Vue {
* @type {*} * @type {*}
* @memberof AppDepartmentSelect * @memberof AppDepartmentSelect
*/ */
@Prop({default:'/ibzorganizations/{orgid}/ibzdepartments/picker'}) public url?: any; @Prop() public url?: any;
/** /**
* 过滤项 * 过滤项
...@@ -108,7 +108,7 @@ export default class AppDepartmentSelect extends Vue { ...@@ -108,7 +108,7 @@ export default class AppDepartmentSelect extends Vue {
public searchNodesData(){ public searchNodesData(){
// 处理过滤参数,生成url // 处理过滤参数,生成url
let param = this.handleFilter(); let param = this.handleFilter();
let _url = this.url.replace(/{orgid}/,param) let _url = this.url.replace('${orgid}',param)
if(this.oldurl === _url){ if(this.oldurl === _url){
return; return;
} }
......
...@@ -44,6 +44,13 @@ export default class AppOrgSelect extends Vue { ...@@ -44,6 +44,13 @@ export default class AppOrgSelect extends Vue {
*/ */
@Prop({default:false}) public multiple?:boolean; @Prop({default:false}) public multiple?:boolean;
/**
* 查询单位路径
*
* @memberof AppOrgSelect
*/
@Prop() public url!:string;
/** /**
* 监听表单数据变化 * 监听表单数据变化
* *
...@@ -57,20 +64,13 @@ export default class AppOrgSelect extends Vue { ...@@ -57,20 +64,13 @@ export default class AppOrgSelect extends Vue {
let tempFilterValue:any = this.initBasicData(); let tempFilterValue:any = this.initBasicData();
// filter值变化才去请求数据 // filter值变化才去请求数据
if(tempFilterValue && (this.copyFilterValue !== tempFilterValue)){ if(tempFilterValue && (this.copyFilterValue !== tempFilterValue)){
this.loadTreeData(this.orgDataUrl.replace('${orgid}',tempFilterValue)); this.loadTreeData(this.url.replace('${orgid}',tempFilterValue));
this.copyFilterValue = tempFilterValue; this.copyFilterValue = tempFilterValue;
} }
} }
} }
} }
/**
* 查询单位路径
*
* @memberof AppOrgSelect
*/
public orgDataUrl:string ="/ibzorganizations/${orgid}/suborg/picker";
/** /**
* 选择值 * 选择值
* *
...@@ -99,7 +99,7 @@ export default class AppOrgSelect extends Vue { ...@@ -99,7 +99,7 @@ export default class AppOrgSelect extends Vue {
*/ */
public created(){ public created(){
if(!this.filter){ if(!this.filter){
this.loadTreeData(this.orgDataUrl.replace('${orgid}','alls')); this.loadTreeData(this.url);
} }
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册