|
|
|
@ -42,10 +42,10 @@ |
|
|
|
<el-form :model="addForm" label-width="100px" v-adaptive style="width:100%;height:100px;overflow:auto" :rules="addFormRules" ref="inputAddForm"> |
|
|
|
<el-form-item label="字段来源" title="该组件能够快速初始化一系列已定义的列"> |
|
|
|
<el-row type="flex"> |
|
|
|
<el-button type="primary" title="自动读取表格的列作为该表单的字段">数据库表</el-button> |
|
|
|
<el-button type="success" title="ai输出了表格列信息,黏贴到此组件即可以解析出列信息作为该表单字段">AI输出</el-button> |
|
|
|
<el-button type="warning" title="api输出的结果如果是json,可以根据第一条数据结果解析出字段编码,手动加上中文注释即可">API输出</el-button> |
|
|
|
<el-button type="primary" title="自动读取数据字典中的下拉列表作为该表单的字段信息">数据字典</el-button> |
|
|
|
<el-button type="primary" @click="$refs['tableDialog'].open()" title="自动读取表格的列作为该表单的字段" >数据库表</el-button> |
|
|
|
<el-button type="success" @click="$refs['itemDialog'].open()" title="ai输出了表格列信息,黏贴到此组件即可以解析出列信息作为该表单字段">AI输出</el-button> |
|
|
|
<el-button type="warning" @click="$refs['itemDialog'].open()" title="api输出的结果如果是json,可以根据第一条数据结果解析出字段编码,手动加上中文注释即可">API输出</el-button> |
|
|
|
<el-button type="primary" @click="$refs['itemDialog'].open()" title="自动读取数据字典中的下拉列表作为该表单的字段信息">数据字典</el-button> |
|
|
|
</el-row> |
|
|
|
</el-form-item> |
|
|
|
<el-row> |
|
|
|
@ -61,6 +61,24 @@ |
|
|
|
</el-col> |
|
|
|
|
|
|
|
</el-row> |
|
|
|
<mdp-dialog ref="tableDialog"> |
|
|
|
<el-row> |
|
|
|
请输入数据库表名: |
|
|
|
<el-input v-modle="tableName"></el-input> |
|
|
|
</el-row> |
|
|
|
<el-row slot="footer"> |
|
|
|
<el-button @click="$refs['tableDialog'].close()">关闭</el-button> |
|
|
|
<el-button type="primary" @click="initFormFieldsByTable">确定</el-button> |
|
|
|
</el-row> |
|
|
|
</mdp-dialog> |
|
|
|
<mdp-dialog ref="itemDialog" title="选择数据组" width="80%" :modal="false"> |
|
|
|
<template v-slot="{visible,data,dialog}"> |
|
|
|
<mdp-meta-item :visible="visible" sub-op-type="select" @select="(item)=>{ |
|
|
|
dialog.close(); |
|
|
|
initFormFieldsByItemCode(item) |
|
|
|
}"></mdp-meta-item> |
|
|
|
</template> |
|
|
|
</mdp-dialog> |
|
|
|
</section> |
|
|
|
</template> |
|
|
|
|
|
|
|
@ -121,6 +139,7 @@ |
|
|
|
yesOrNo: [{id:'0',name:'否'},{id:'1',name:'是'}], |
|
|
|
} |
|
|
|
return { |
|
|
|
tableName:'', |
|
|
|
filters:{ |
|
|
|
users:[] |
|
|
|
}, |
|
|
|
@ -286,6 +305,14 @@ |
|
|
|
if (e.draggedContext.element.id == '22') return false; |
|
|
|
return true; |
|
|
|
}, |
|
|
|
initFormFieldsByTable(){ |
|
|
|
this.$mdp.getTableInfos({tableName:this.tableName}).then(res=>{ |
|
|
|
|
|
|
|
}) |
|
|
|
}, |
|
|
|
initFormFieldsByItemCode(item){ |
|
|
|
|
|
|
|
} |
|
|
|
/**end 在上面加自定义方法**/ |
|
|
|
|
|
|
|
},//end method |
|
|
|
|