第一次

master^2^2
chentaisen 2024-09-10 09:22:01 +08:00
parent b7003dd31d
commit 3e46a8e8fb
4 changed files with 141 additions and 53 deletions

View File

@ -82,7 +82,7 @@ export function findTableIdByParentId(id) {
//表 //表
export function findTableValueByTableName(basicId,tableName) { export function findTableValueByTableName(basicId,tableName) {
return request({ return request({
url: `/source/value/findTableValueByTableName/?basicId=`+basicId+'&&tableName='+tableName, url: "/source/value/findTableValueByTableName?basicId="+basicId+"&tableName="+tableName,
method: 'post', method: 'post',
}) })
} }

View File

@ -26,6 +26,7 @@ import ExporFind from "./type/exporFind.vue";
import UniteFind from "./type/uniteFind.vue"; import UniteFind from "./type/uniteFind.vue";
export default { export default {
// import使" // import使"
name: 'type-table', name: 'type-table',

View File

@ -22,7 +22,9 @@
<el-table-column :show-overflow-tooltip="true" label="字段所属表" prop="tableName"/> <el-table-column :show-overflow-tooltip="true" label="字段所属表" prop="tableName"/>
<el-table-column :show-overflow-tooltip="true" label="输出字段"> <el-table-column :show-overflow-tooltip="true" label="输出字段">
<span slot-scope="scope" v-if="fieldsList && fieldsList.get(scope.row.fieldName)"> <span slot-scope="scope" v-if="fieldsList && fieldsList.get(scope.row.fieldName)">
{{ fieldsList.get(scope.row.fieldName).fieldName+ '(' + fieldsList.get(scope.row.fieldName).fieldComment + ')' }} {{
fieldsList.get(scope.row.fieldName).fieldName + '(' + fieldsList.get(scope.row.fieldName).fieldComment + ')'
}}
</span> </span>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -92,7 +94,8 @@
<el-table-column :show-overflow-tooltip="true" label="目标字段"> <el-table-column :show-overflow-tooltip="true" label="目标字段">
<template slot-scope="scope"> <template slot-scope="scope">
<el-select v-model="scope.row.toFidlesName" placeholder="请选择字段"> <el-select v-model="scope.row.toFidlesName" placeholder="请选择字段">
<el-option v-for="field in toFields" :label="field.fieldName+'('+field.fieldComment+')'" :value="field.fieldName"/> <el-option v-for="field in toFields" :label="field.fieldName+'('+field.fieldComment+')'"
:value="field.fieldName"/>
</el-select> </el-select>
</template> </template>
</el-table-column> </el-table-column>
@ -106,6 +109,7 @@
</div> </div>
</template> </template>
<script> <script>
// jsjsjson, // jsjsjson,
// import from ', // import from ',

View File

@ -408,13 +408,86 @@
<span style="margin-left: 10px">{{ scope.row.center }}</span> <span style="margin-left: 10px">{{ scope.row.center }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作"> <el-table-column label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
@click="handleEditSelect()">选择 @click="handleEditSelect(scope.row)">选择
</el-button>
</template>
</el-table-column>
</el-table>
</template>
</div>
<span>
<!--tableDa-->
<el-button type="primary" @click="measurements()"> </el-button>
</span>
</el-card>
</el-col>
<span>
<el-col v-show="selectss">
<el-card class="box-card">
<div slot="header" class="clearfix">
<span>选择资产集</span>
<template>
<el-table
:data="tableDa"
style="width: 100%">
<el-table-column
label="主键"
width="180">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.id }}</span>
</template>
</el-table-column>
<el-table-column
label="数据源ID"
width="180">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.basicId }}</span>
</template>
</el-table-column>
<el-table-column
label="表名称"
width="180">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.tableName }}</span>
</template>
</el-table-column>
<el-table-column
label="表备注"
width="180">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.tableRemark }}</span>
</template>
</el-table-column>
<el-table-column
label="类型"
width="180">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.type }}</span>
</template>
</el-table-column>
<el-table-column
label="数据量"
width="180">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.dataNum }}</span>
</template>
</el-table-column>
<el-table-column
label="是否核心"
width="180">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.center }}</span>
</template>
</el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button
size="mini"
@click="handleEditSelect(scope.row)">选择
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -428,6 +501,7 @@
</el-card> </el-card>
</el-col> </el-col>
</span> </span>
</span>
</el-drawer> </el-drawer>
@ -530,7 +604,7 @@ export default {
// //
dataOrigin: {}, dataOrigin: {},
origins: [], origins: [],
tableDa: [],
tableOrigin: [], tableOrigin: [],
showCode: false, showCode: false,
// //
@ -552,12 +626,20 @@ export default {
this.findById(); this.findById();
}, },
methods: { methods: {
//
getDataTable(data) {
getDataTables(data.id).then(res => {
this.tableDa = res.data
})
},
// //
handleEditSelect() { handleEditSelect(data) {
findTableValueByTableName(this.tableOrigin.basicId, this.tableOrigin.tableName).then(res => { alert(data.id)
findTableValueByTableName(data.basicId, data.tableName).then(res => {
console.log(res.data) console.log(res.data)
this.tableDatas = res.data this.tableDatas = res.data
console.log(this.tableDatas) console.log(this.tableDatas)
this.getDataTable(data);
}) })
}, },
// //
@ -589,6 +671,7 @@ export default {
chanChild() { chanChild() {
findTableIdByParentId(this.dataOrigin.sourceId).then(res => { findTableIdByParentId(this.dataOrigin.sourceId).then(res => {
this.tableOrigin = res.data this.tableOrigin = res.data
console.log(this.tableOrigin)
// console.log(this.tableOrigin) // console.log(this.tableOrigin)
}) })
}, },