提交 ea35ae35 编写于 作者: KK's avatar KK

修复多选配置静态代码表失效

上级 47e3639b
......@@ -157,8 +157,29 @@
*/
public async load(): Promise<any> {
this.$store.commit('setSelectStatus',false);
const _this: any= this;
const back:Function =(response:any)=>{
_this.options = response
if (_this.isCache) {
_this.isCached = true;
}
if (_this.value) {
const select:any = _this.$refs.checkList;
if(_this.value && this.$util.isFunction(_this.value.split)){
let arr = _this.value.tostring().split(',')
select.value = arr;
}else{
select.value = (_this.value as string);
}
}
_this.$forceUpdate();
}
if (this.tag && this.type) {
if (Object.is(this.type, "static")) {
let response: any = await this.codeListService.getStaticItems(this.tag);
if (response) {
back(response);
}
return;
}
// 处理导航参数、上下文参数
......@@ -169,15 +190,7 @@
}
let response: any = await this.codeListService.getItems(this.tag, param.context, param.param);
if (response) {
this.options = response
if (this.isCache) {
this.isCached = true;
}
if (this.value) {
const select:any = this.$refs.checkList;
let arr = this.value.split(',')
select.value = arr;
}
back(response);
} else {
this.options = [];
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册