|
|
|
|
@ -1,12 +1,13 @@
|
|
|
|
|
import { CreateElement, VNode } from "vue";
|
|
|
|
|
import moment from "moment";
|
|
|
|
|
import { getToken } from "@/utils/auth";
|
|
|
|
|
import { deepCopy, formatFileSize, formatTime } from "@/utils/index";
|
|
|
|
|
import { deepCopy, formatFileSize, formatTime, debounce } from "@/utils/index";
|
|
|
|
|
import { uploadSize } from "@/settings";
|
|
|
|
|
import axios from "axios";
|
|
|
|
|
import { flowList } from "@/api/flow";
|
|
|
|
|
import MobilePicker from '@/components/MobilePicker/index.vue';
|
|
|
|
|
import MobileMultipleSelect from "@/components/MobileMultipleSelect/index.vue";
|
|
|
|
|
import { Message } from 'element-ui'
|
|
|
|
|
/**
|
|
|
|
|
* @param {String} device 'desktop' | 'mobile'
|
|
|
|
|
* @param {Object} info field参数
|
|
|
|
|
@ -448,11 +449,17 @@ export default function formBuilder(
|
|
|
|
|
.map((i) => Number(i))
|
|
|
|
|
: [],
|
|
|
|
|
clearable: true,
|
|
|
|
|
placeholder: info.help_text,
|
|
|
|
|
placeholder: info.help_text || '输入标题或编号搜索流程..',
|
|
|
|
|
multiple: true,
|
|
|
|
|
filterable: true,
|
|
|
|
|
"reserve-keyword": true,
|
|
|
|
|
loading: this.flowSelectLoading,
|
|
|
|
|
"filter-method": debounce((query) => {
|
|
|
|
|
this.tempFlowList = this.flows[info.name].filter(flow => new RegExp(query, 'i').test(flow.title + flow.no))
|
|
|
|
|
console.log(query)
|
|
|
|
|
if (this.tempFlowList.length === 0) {
|
|
|
|
|
Message.warning("未搜索到匹配流程")
|
|
|
|
|
}
|
|
|
|
|
}, 500).bind(this)
|
|
|
|
|
},
|
|
|
|
|
attrs: {
|
|
|
|
|
placeholder: info.help_text,
|
|
|
|
|
@ -463,16 +470,29 @@ export default function formBuilder(
|
|
|
|
|
on: {
|
|
|
|
|
input: (e) => {
|
|
|
|
|
this.$set(target, info.name, e.toString());
|
|
|
|
|
this.tempFlowList.length = 0;
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
this.flows[info.name]?.map((option) =>
|
|
|
|
|
(this.tempFlowList.length > 0 ? this.tempFlowList : this.flows[info.name])?.map((option) =>
|
|
|
|
|
h("el-option", {
|
|
|
|
|
props: {
|
|
|
|
|
label: option.title,
|
|
|
|
|
value: option.id,
|
|
|
|
|
},
|
|
|
|
|
})
|
|
|
|
|
}, [
|
|
|
|
|
h("div", {
|
|
|
|
|
}, [
|
|
|
|
|
h("span", {},option.title),
|
|
|
|
|
h("span", {
|
|
|
|
|
style: {
|
|
|
|
|
color: '#999',
|
|
|
|
|
float: 'right',
|
|
|
|
|
'font-size': '12px'
|
|
|
|
|
}
|
|
|
|
|
},option.no)
|
|
|
|
|
])
|
|
|
|
|
])
|
|
|
|
|
)
|
|
|
|
|
);
|
|
|
|
|
break;
|
|
|
|
|
|