|
@@ -2,6 +2,7 @@ import {createApp} from "vue/dist/vue.esm-bundler.js";
|
|
|
import {getTokenHeader} from '~src/api/request/header';
|
|
|
import {toParse} from "vue-utils-plus";
|
|
|
import HcTableFormUpload from "~com/plugins/table-form/hc-form-upload.vue"
|
|
|
+import HcFormSelectSearch from "~com/plugins/table-form/hc-form-select-search.vue"
|
|
|
|
|
|
import {
|
|
|
ElButton,ElTooltip,ElInput,ElDatePicker,ElUpload,
|
|
@@ -12,17 +13,16 @@ import {
|
|
|
const components = {
|
|
|
ElButton,ElTooltip,ElInput, ElDatePicker, ElUpload,
|
|
|
ElInputNumber, ElTimePicker, ElSelect, ElOption, ElRadioGroup,
|
|
|
- ElRadio, ElCheckbox, ElCheckboxGroup, HcTableFormUpload
|
|
|
+ ElRadio, ElCheckbox, ElCheckboxGroup, HcTableFormUpload, HcFormSelectSearch
|
|
|
}
|
|
|
|
|
|
//表单渲染
|
|
|
export default class HTableForm {
|
|
|
- static createForm({template, tableForm, appId, onRight, onBlur, onRemote}) {
|
|
|
+ static createForm({template, tableForm, appId, onRight, onBlur}) {
|
|
|
const app = createApp({
|
|
|
data() {
|
|
|
return {
|
|
|
getTokenHeader: getTokenHeader(),
|
|
|
- dap_site_data: {},
|
|
|
formData: tableForm,
|
|
|
}
|
|
|
},
|
|
@@ -70,16 +70,7 @@ export default class HTableForm {
|
|
|
onBlur(event, KeyName, reg, this.formData[KeyName], msg)
|
|
|
}
|
|
|
},
|
|
|
- //远程搜索
|
|
|
- async formRemoteMethod(query, key, type) {
|
|
|
- if (query && key && type) {
|
|
|
- if (onRemote) {
|
|
|
- this[type][key] = await onRemote(query, key, type)
|
|
|
- } else {
|
|
|
- this[type][key] = []
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
+ //远程搜索处理
|
|
|
formRemoteChange(query, key, type) {
|
|
|
console.log(query, key, type)
|
|
|
}
|