|
|
|
|
@ -18,6 +18,7 @@ function isJSON(str) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param {String} device 'desktop' | 'mobile'
|
|
|
|
|
* @param {Object} info field参数
|
|
|
|
|
@ -454,6 +455,7 @@ export default function formBuilder(
|
|
|
|
|
this.$set(this.flows, info.name, res.data.data);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
let loading = false
|
|
|
|
|
formItem = h("div", {
|
|
|
|
|
style: {
|
|
|
|
|
// display: "flex",
|
|
|
|
|
@ -461,6 +463,39 @@ export default function formBuilder(
|
|
|
|
|
// alignItems: "flex-start"
|
|
|
|
|
}
|
|
|
|
|
}, [
|
|
|
|
|
h('el-button',{
|
|
|
|
|
style: {
|
|
|
|
|
'margin-bottom':'10px'
|
|
|
|
|
},
|
|
|
|
|
props: {
|
|
|
|
|
type: 'primary',
|
|
|
|
|
size: 'mini',
|
|
|
|
|
loading:loading
|
|
|
|
|
},
|
|
|
|
|
on: {
|
|
|
|
|
click: (e) => {
|
|
|
|
|
e.stopPropagation()
|
|
|
|
|
loading = true
|
|
|
|
|
console.log("123",this.flows[info.name],loading)
|
|
|
|
|
let extraParam = {}
|
|
|
|
|
if (isJSON(info.stub)) {
|
|
|
|
|
extraParam = JSON.parse(info.stub)
|
|
|
|
|
}
|
|
|
|
|
flowList("all", {
|
|
|
|
|
page: 1,
|
|
|
|
|
page_size: 9999,
|
|
|
|
|
is_simple: 1,
|
|
|
|
|
custom_model_id: isJSON(info.stub) ? '' : info.stub,
|
|
|
|
|
// is_auth: 1,
|
|
|
|
|
...extraParam
|
|
|
|
|
}).then((res) => {
|
|
|
|
|
this.$set(this.flows, info.name, res.data.data);
|
|
|
|
|
loading = false
|
|
|
|
|
console.log("123",loading)
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}, '加载所有相关流程'),
|
|
|
|
|
// 原有的 el-select
|
|
|
|
|
h("el-select", {
|
|
|
|
|
ref: `relation-flow-${info.name}`,
|
|
|
|
|
@ -472,7 +507,8 @@ export default function formBuilder(
|
|
|
|
|
filterable: true,
|
|
|
|
|
"reserve-keyword": true,
|
|
|
|
|
"filter-method": debounce((query) => {
|
|
|
|
|
this.tempFlowList = this.handleFlowFilter(query, this.flows[info.name]);
|
|
|
|
|
// this.tempFlowList = this.handleFlowFilter(query, this.flows[info.name]);
|
|
|
|
|
this.tempFlowList = this.flows[info.name].filter(item=>item.title.includes(query))
|
|
|
|
|
}, 500)
|
|
|
|
|
},
|
|
|
|
|
style: {
|
|
|
|
|
|