|
|
@@ -18,32 +18,30 @@
|
|
|
|
|
|
</div>
|
|
|
|
|
|
- <el-table :data="tableData" border class="table" ref="multipleTable" header-cell-class-name="table-header">
|
|
|
- <el-table-column width="50" type="selection"></el-table-column>
|
|
|
- <el-table-column prop="id" label="ID" width="55" align="center"></el-table-column>
|
|
|
+ <el-table :data="tableData" border class="table" ref="fieldTable" header-cell-class-name="table-header" @selection-change="handleSelectChange">
|
|
|
+ <el-table-column width="50" type="selection" ></el-table-column>
|
|
|
<el-table-column label="字段名">
|
|
|
- <template #default="scope">{{ scope.row.fieldname }}</template>
|
|
|
+ <template #default="scope"><span>{{ scope.row.fieldName }}</span></template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="别名">
|
|
|
- <template #default="scope">{{ scope.row.alias }}</template>
|
|
|
+ <template #default="scope">{{ scope.row.aliasName }}</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="描述">
|
|
|
- <template #default="scope">{{ scope.row.desc }}</template>
|
|
|
+ <template #default="scope">{{ scope.row.fieldDes }}</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="取值类型">
|
|
|
- <template #default="scope">{{ scope.row.num }}</template>
|
|
|
+ <template #default="scope">{{ scope.row.fieldType }}</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="分布类型">
|
|
|
- <template #default="scope">{{ scope.row.distribution }}</template>
|
|
|
+ <template #default="scope">{{ scope.row.conOrDis }}</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="空值率">
|
|
|
- <template #default="scope">{{ scope.row.null }}</template>
|
|
|
+ <template #default="scope">{{ scope.row.nullsRatio }}</template>
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column label="值域" >
|
|
|
- <template #default="scope">{{ scope.row.num }}</template>
|
|
|
+ <template #default="scope">{{ scope.row.valueInfo }}</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="创建时间"></el-table-column>
|
|
|
</el-table>
|
|
|
<div class="pagination">
|
|
|
<el-pagination background layout="total, prev, pager, next" :current-page="query.pageIndex"
|
|
|
@@ -78,10 +76,24 @@
|
|
|
<el-input v-model="form.name"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="模型类别" required>
|
|
|
- <el-input v-model="form.address"></el-input>
|
|
|
+ <el-select v-model="form.type" placeholder="模型类别" class="handle-select mr10" >
|
|
|
+ <el-option key="0" label="所有" value="0"></el-option>
|
|
|
+ <el-option key="1" label="逻辑回归" value="1"></el-option>
|
|
|
+ <el-option key="2" label="决策树" value="2"></el-option>
|
|
|
+ <el-option key="3" label="随机森林" value="3"></el-option>
|
|
|
+ <el-option key="4" label="梯度提升决策树" value="4"></el-option>
|
|
|
+ <el-option key="5" label="多层感知器分类器" value="5"></el-option>
|
|
|
+ <el-option key="6" label="朴素贝叶斯" value="6"></el-option>
|
|
|
+ <el-option key="7" label="随机森林回归" value="7"></el-option>
|
|
|
+ <el-option key="8" label="K-均值" value="8"></el-option>
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="已选择字段" required>
|
|
|
-
|
|
|
+ <el-table :data="selectData" border class="table" header-cell-class-name="table-header" >
|
|
|
+ <el-table-column label="字段名">
|
|
|
+ <template #default="scope"><span>{{ scope.row.fieldName }}</span></template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-form>
|
|
|
@@ -96,9 +108,11 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { ref, reactive } from "vue";
|
|
|
+import {ref, reactive, getCurrentInstance, onMounted} from "vue";
|
|
|
import { ElMessage, ElMessageBox } from "element-plus";
|
|
|
import { fetchData } from "../api/index";
|
|
|
+import {getFileDetail} from "../api/file";
|
|
|
+import {useRoute}from "vue-router";
|
|
|
export default {
|
|
|
name: "config",
|
|
|
//训练特征
|
|
|
@@ -122,15 +136,26 @@ export default {
|
|
|
|
|
|
|
|
|
const tableData = ref([]);
|
|
|
+ const selectData = ref([]);
|
|
|
const pageTotal = ref(0);
|
|
|
// 获取表格数据
|
|
|
const getData = () => {
|
|
|
- // fetchData(query).then((res) => {
|
|
|
- // tableData.value = res.list;
|
|
|
- // pageTotal.value = res.pageTotal || 50;
|
|
|
- // });
|
|
|
-
|
|
|
+ const route=useRoute()
|
|
|
//todo:调用获取文件具体信息获取字段列表
|
|
|
+ if(route.query.fileId!=null) {
|
|
|
+ getFileDetail(route.query.fileId).then(res => {
|
|
|
+ tableData.value = res.data.headerInfos;
|
|
|
+ for (var i = 0; i < tableData.value.length; i++) {
|
|
|
+ if (tableData.value[i].conOrDis === 1) {
|
|
|
+ tableData.value[i].conOrDis = "连续值"
|
|
|
+ } else {
|
|
|
+ tableData.value[i].conOrDis = "离散值"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //console.log(tableData)
|
|
|
+ console.log(route.query.fileId)
|
|
|
+ })
|
|
|
+ }
|
|
|
|
|
|
};
|
|
|
getData();
|
|
|
@@ -163,7 +188,7 @@ export default {
|
|
|
const editVisible = ref(false);
|
|
|
let form = reactive({
|
|
|
name: "",
|
|
|
- address: "",
|
|
|
+ type: "",
|
|
|
// classification:"",
|
|
|
// feature:"",
|
|
|
});
|
|
|
@@ -173,8 +198,15 @@ export default {
|
|
|
};
|
|
|
|
|
|
const configCreate = ref(false);
|
|
|
- const createConfig = () =>{
|
|
|
- configCreate.value=true;
|
|
|
+ const createConfig =() => {
|
|
|
+ const fieldTable = ref(null)
|
|
|
+ //console.log(fieldTable)
|
|
|
+ console.log(selectData.value)
|
|
|
+ onMounted(() => {
|
|
|
+ console.log(fieldTable.value.selection)
|
|
|
+ })
|
|
|
+
|
|
|
+ configCreate.value = true;
|
|
|
};
|
|
|
const saveEdit = () => {
|
|
|
editVisible.value = false;
|
|
|
@@ -192,6 +224,9 @@ export default {
|
|
|
//todo: 调用Config相关接口
|
|
|
|
|
|
};
|
|
|
+ const handleSelectChange=val=>{
|
|
|
+ selectData.value=val;
|
|
|
+ }
|
|
|
|
|
|
return {
|
|
|
query,
|
|
|
@@ -200,6 +235,8 @@ export default {
|
|
|
editVisible,
|
|
|
form,
|
|
|
configCreate,
|
|
|
+ selectData,
|
|
|
+ handleSelectChange,
|
|
|
handleSearch,
|
|
|
handlePageChange,
|
|
|
handleDelete,
|
|
|
@@ -209,6 +246,8 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
};
|
|
|
+
|
|
|
+
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|