|
|
@ -17,6 +17,7 @@ |
|
|
|
@opensearchTable="opensearchTable" |
|
|
|
@onChange="onChange" |
|
|
|
@onBlur="onBlur" |
|
|
|
@onEnter="onEnter" |
|
|
|
> |
|
|
|
<template #crontab="formSchema" v-if="fromeWhere == 'countPlan'"> |
|
|
|
<crontab v-model="formSchema.crontab" /> |
|
|
@ -467,7 +468,19 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
defineExpose({ open, formRef, opensearchTable, dialogVisible, formLoading }) // 提供 open 方法,用于打开弹窗 |
|
|
|
// 添加数据 |
|
|
|
const handleAddTable = () => { |
|
|
|
if(props.isOpenSearchTable){ |
|
|
|
const tableFormKeys = {} |
|
|
|
tableAllSchemas.value.tableFormColumns.forEach(item => { |
|
|
|
tableFormKeys[item.field] = item.default ? item.default : '' |
|
|
|
}) |
|
|
|
inpuFocus(tableAllSchemas.value.tableFormColumns[props.indexTableColumn],tableFormKeys,0) |
|
|
|
}else{ |
|
|
|
emit('handleAddTable') |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/** 弹窗按钮 */ |
|
|
|
let Butttondata:any = [] |
|
|
@ -576,6 +589,7 @@ const emit = defineEmits([ |
|
|
|
'inputStringBlur', |
|
|
|
'onChange', |
|
|
|
'onBlur', |
|
|
|
'onEnter', |
|
|
|
'inputNumberChange', |
|
|
|
'formFormDateChange', |
|
|
|
'footButtonClick' |
|
|
@ -622,19 +636,9 @@ const handleTableSelect = (row, column, event) => { |
|
|
|
const handleDeleteTable = (row, index) => { |
|
|
|
emit('handleDeleteTable', row, index,formRef.value) |
|
|
|
} |
|
|
|
// 添加数据 |
|
|
|
const handleAddTable = () => { |
|
|
|
if(props.isOpenSearchTable){ |
|
|
|
const tableFormKeys = {} |
|
|
|
tableAllSchemas.value.tableFormColumns.forEach(item => { |
|
|
|
tableFormKeys[item.field] = item.default ? item.default : '' |
|
|
|
}) |
|
|
|
inpuFocus(tableAllSchemas.value.tableFormColumns[props.indexTableColumn],tableFormKeys,0) |
|
|
|
}else{ |
|
|
|
emit('handleAddTable') |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 输入框聚焦 |
|
|
|
const inpuFocus = (headerItem, row, index) => { |
|
|
|
|
|
|
@ -669,6 +673,14 @@ const onChange = (field, cur) => { |
|
|
|
const onBlur = (field, e) => { |
|
|
|
emit('onBlur', field, e) |
|
|
|
} |
|
|
|
/** |
|
|
|
* 回车事件 |
|
|
|
* @param field 当前操作字段 |
|
|
|
* @param e |
|
|
|
*/ |
|
|
|
const onEnter = (field, e) => { |
|
|
|
emit('onEnter', field, e) |
|
|
|
} |
|
|
|
|
|
|
|
// 修改盘点类型 |
|
|
|
const selectChange = (field, val) => { |
|
|
@ -692,6 +704,7 @@ const buttonOperationClick = (row, label, index)=> { |
|
|
|
const inputStringBlur = (headerItem, row, index)=> { |
|
|
|
emit("inputStringBlur", headerItem, row, index); |
|
|
|
} |
|
|
|
defineExpose({ open, formRef, opensearchTable, dialogVisible, formLoading ,handleAddTable}) // 提供 open 方法,用于打开弹窗 |
|
|
|
|
|
|
|
</script> |
|
|
|
<style lang="scss" scoped> |
|
|
|