master
parent
27e54fef8e
commit
8434767a7a
|
@ -29,6 +29,20 @@
|
|||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-dialog title="选择字段" :visible.sync="checkFieldsFlag" width="60%" append-to-body>
|
||||
<el-table ref="table" :data="reqDispData.fields" height="300px"
|
||||
@row-click="clickRow" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column :show-overflow-tooltip="true" label="字段名称" prop="columnName" />
|
||||
<el-table-column :show-overflow-tooltip="true" label="字段描述" prop="columnComment" />
|
||||
<el-table-column :show-overflow-tooltip="true" label="字段类型" prop="columnType" />
|
||||
</el-table>
|
||||
<br><br>
|
||||
<div align="center">
|
||||
<el-button @click="checkFieldsFlag = false">返回</el-button>
|
||||
<el-button type="primary" @click="save">保存</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -36,7 +50,7 @@
|
|||
// 这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等),
|
||||
// 例如:import 《组件名称》 from '《组件路径》,
|
||||
import {listDisposition} from "@/api/quest/disposition";
|
||||
import {selectDbTableColumnsByName} from "../../../../../../api/tool/gen";
|
||||
import {selectDbTableColumnsByName} from "@/api/tool/gen";
|
||||
|
||||
export default {
|
||||
// import引入的组件需要注入到对象中才能使用"
|
||||
|
@ -128,6 +142,26 @@ export default {
|
|||
}
|
||||
})
|
||||
},
|
||||
// 保存选择
|
||||
save() {
|
||||
console.log('reqDispData',this.reqDispData)
|
||||
console.log('respDispData',this.respDispData)
|
||||
this.checkFieldsFlag = false
|
||||
this.disp.findFlag = false
|
||||
},
|
||||
clickRow(row) {
|
||||
this.$refs.table.toggleRowSelection(row);
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.respDispData.fields = selection.map(item => {
|
||||
return {
|
||||
fieldName: item.columnName,
|
||||
fieldType: item.columnType,
|
||||
fieldComment: item.columnComment
|
||||
};
|
||||
});
|
||||
},
|
||||
/** 节点配置 类型转换 mysql -> vue */
|
||||
getVueDisp(dispList) {
|
||||
const db = {}
|
||||
|
|
Loading…
Reference in New Issue