|
|
@ -43,8 +43,8 @@ |
|
|
<el-form-item label="字段来源" title="该组件能够快速初始化一系列已定义的列"> |
|
|
<el-form-item label="字段来源" title="该组件能够快速初始化一系列已定义的列"> |
|
|
<el-row type="flex"> |
|
|
<el-row type="flex"> |
|
|
<el-button type="primary" @click="$refs['tableDialog'].open()" 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="success" @click="$refs['aiTableDialog'].open()" title="ai输出了表格列信息,黏贴到此组件即可以解析出列信息作为该表单字段">AI输出</el-button> |
|
|
|
|
|
<el-button type="warning" @click="$refs['apiDialog'].open()" title="api输出的结果如果是json,可以根据第一条数据结果解析出字段编码,手动加上中文注释即可">API输出</el-button> |
|
|
<el-button type="primary" @click="$refs['itemDialog'].open()" title="自动读取数据字典中的下拉列表作为该表单的字段信息">数据字典</el-button> |
|
|
<el-button type="primary" @click="$refs['itemDialog'].open()" title="自动读取数据字典中的下拉列表作为该表单的字段信息">数据字典</el-button> |
|
|
</el-row> |
|
|
</el-row> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
@ -64,13 +64,45 @@ |
|
|
<mdp-dialog ref="tableDialog"> |
|
|
<mdp-dialog ref="tableDialog"> |
|
|
<el-row> |
|
|
<el-row> |
|
|
请输入数据库表名: |
|
|
请输入数据库表名: |
|
|
<el-input v-modle="tableName"></el-input> |
|
|
|
|
|
|
|
|
<el-input v-model="tableName"></el-input> |
|
|
</el-row> |
|
|
</el-row> |
|
|
<el-row slot="footer"> |
|
|
<el-row slot="footer"> |
|
|
<el-button @click="$refs['tableDialog'].close()">关闭</el-button> |
|
|
<el-button @click="$refs['tableDialog'].close()">关闭</el-button> |
|
|
<el-button type="primary" @click="initFormFieldsByTable">确定</el-button> |
|
|
<el-button type="primary" @click="initFormFieldsByTable">确定</el-button> |
|
|
</el-row> |
|
|
</el-row> |
|
|
</mdp-dialog> |
|
|
</mdp-dialog> |
|
|
|
|
|
<mdp-dialog ref="aiTableDialog"> |
|
|
|
|
|
<el-row> |
|
|
|
|
|
请从Ai输出的表格配置信息中复制黏贴到此: |
|
|
|
|
|
<el-input rows="20" type="textarea" v-model="aiTableInfosStr"></el-input> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
<el-row slot="footer"> |
|
|
|
|
|
<el-button @click="$refs['aiTableDialog'].close()">关闭</el-button> |
|
|
|
|
|
<el-button type="primary" @click="initFormFieldsByAiTable">确定</el-button> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
</mdp-dialog> |
|
|
|
|
|
<mdp-dialog ref="apiDialog"> |
|
|
|
|
|
<el-form :model="apiParams" > |
|
|
|
|
|
<el-form-item label="api地址" prop="url" :rules="{required:true,message:'此项必输',trigger:'blur'}"> |
|
|
|
|
|
<el-input v-model="apiParams.url" placeholder="如 http://127.0.0.1:8015/sys/user/list?userid=xxxx"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="请求方式" prop="method" :rules="{required:true,message:'此项必输',trigger:'blur'}"> |
|
|
|
|
|
<mdp-select item-code="request_method" v-model="apiParams.method" placeholder="如 get/post/"></mdp-select> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="请求参数" prop="params"> |
|
|
|
|
|
<el-input type="textarea" :rows="10" v-model="apiParams.params" placeholder="如 { userid:xxxx }"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="授权信息" prop="header"> |
|
|
|
|
|
<el-checkbox v-model="apiParams.useMyLoginToken">使用本系统登陆的token</el-checkbox> |
|
|
|
|
|
<el-input v-if="apiParams.useMyLoginToken==false" type="textarea" :rows="10" v-model="apiParams.header" placeholder="格式 如 Authorization:Bearer jwtTokenXXadkfdfdadfd"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-form> |
|
|
|
|
|
<el-row slot="footer"> |
|
|
|
|
|
<el-button @click="$refs['apiDialog'].close()">关闭</el-button> |
|
|
|
|
|
<el-button type="primary" @click="initFormFieldsByAiTable">确定</el-button> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
</mdp-dialog> |
|
|
<mdp-dialog ref="itemDialog" title="选择数据组" width="80%" :modal="false"> |
|
|
<mdp-dialog ref="itemDialog" title="选择数据组" width="80%" :modal="false"> |
|
|
<template v-slot="{visible,data,dialog}"> |
|
|
<template v-slot="{visible,data,dialog}"> |
|
|
<mdp-meta-item :visible="visible" sub-op-type="select" @select="(item)=>{ |
|
|
<mdp-meta-item :visible="visible" sub-op-type="select" @select="(item)=>{ |
|
|
@ -140,6 +172,14 @@ |
|
|
} |
|
|
} |
|
|
return { |
|
|
return { |
|
|
tableName:'', |
|
|
tableName:'', |
|
|
|
|
|
aiTableInfosStr:'', |
|
|
|
|
|
apiParams:{ |
|
|
|
|
|
url:'', |
|
|
|
|
|
method:'', |
|
|
|
|
|
params:'', |
|
|
|
|
|
header:'Authorization:Bearer jwtTokenXXadkfdfdadfd', |
|
|
|
|
|
useMyLoginToken:true, |
|
|
|
|
|
}, |
|
|
filters:{ |
|
|
filters:{ |
|
|
users:[] |
|
|
users:[] |
|
|
}, |
|
|
}, |
|
|
@ -309,6 +349,9 @@ |
|
|
this.$mdp.getTableInfos({tableName:this.tableName}).then(res=>{ |
|
|
this.$mdp.getTableInfos({tableName:this.tableName}).then(res=>{ |
|
|
|
|
|
|
|
|
}) |
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
initFormFieldsByAiTable(){ |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
initFormFieldsByItemCode(item){ |
|
|
initFormFieldsByItemCode(item){ |
|
|
|
|
|
|
|
|
|