添加资产授权
parent
0ba53a33eb
commit
143527169a
|
@ -7,12 +7,4 @@ export function getExtractDataTableNameList() {
|
|||
})
|
||||
}
|
||||
|
||||
export function findTableValueList(basicId,dataId,tableName) {
|
||||
return request({
|
||||
url: '/property/dataSource/findTableValueList?basicId='+basicId+"&dataId="+dataId+"&tableName="+tableName,
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,9 +1,42 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
export function getConnectList(data) {
|
||||
|
||||
export function getExtractDataTableNameList() {
|
||||
return request({
|
||||
url: '/property/connect/selectConnect',
|
||||
url: '/property/dataRunName/extractDataTableName',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function addDeptAssetAuthorization(data) {
|
||||
return request({
|
||||
url: '/property/dataRunName/addDeptAssetAuthorization',
|
||||
method: 'post',
|
||||
data:data
|
||||
})
|
||||
}
|
||||
|
||||
export function delDeptAssetAuthorization(data) {
|
||||
return request({
|
||||
url: '/property/dataRunName/delDeptAssetAuthorization',
|
||||
method: 'post',
|
||||
data:data
|
||||
})
|
||||
}
|
||||
|
||||
export function addUserAssetAuthorization(data) {
|
||||
return request({
|
||||
url: '/property/dataRunName/addUserAssetAuthorization',
|
||||
method: 'post',
|
||||
data:data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export function delUserAssetAuthorization(data) {
|
||||
return request({
|
||||
url: '/property/dataRunName/delUserAssetAuthorization',
|
||||
method: 'post',
|
||||
data:data
|
||||
})
|
||||
}
|
||||
|
|
|
@ -6,17 +6,3 @@ export function getExtractDataTableNameList() {
|
|||
method: 'post',
|
||||
})
|
||||
}
|
||||
|
||||
export function findTableValue(dataId,name) {
|
||||
return request({
|
||||
url: '/property/dataRunName/findTableValue?dataId='+dataId+"&tableName="+name,
|
||||
method: 'post',
|
||||
})
|
||||
}
|
||||
|
||||
export function selectBasicList() {
|
||||
return request({
|
||||
url: '/property/dataRunName/selectBasicList',
|
||||
method: 'post',
|
||||
})
|
||||
}
|
||||
|
|
|
@ -48,10 +48,3 @@ export function selectHandleClick(data) {
|
|||
})
|
||||
}
|
||||
|
||||
export function extractDataName(data) {
|
||||
return request({
|
||||
url: '/property/dataRunName/extractDataName',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">是否核心</template>
|
||||
<dict-tag :options="dict.type.sys_no" :value="tableBasic.isCenter"/>
|
||||
<el-tag size="small" v-if="dataNum!=0">是</el-tag>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</template>
|
||||
|
@ -51,13 +51,13 @@
|
|||
</div>
|
||||
<el-row :gutter="20">
|
||||
<!-- -->
|
||||
<el-col :span="6" v-for="DataValue in assetShowList" style="margin-top: 20px">
|
||||
<el-descriptions :title="tableBasic.tableRemark+'.'+tableBasic.tableName+'.'+DataValue.key" direction="vertical"
|
||||
<el-col :span="6" v-for="DataValue in tableStructure" style="margin-top: 20px">
|
||||
<el-descriptions :title="测试+'.'+tableBasic.name+'.'+DataValue.field" direction="vertical"
|
||||
border :column="1">
|
||||
<el-descriptions-item label="Type">
|
||||
<el-tag size="small">{{ DataValue.type }}</el-tag>
|
||||
<el-tag size="small">{{ DataValue.dataMapping}}</el-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="Value">{{ DataValue.value }}</el-descriptions-item>
|
||||
<el-descriptions-item label="Value">{{ DataValue.dataValue }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
|
||||
|
@ -65,15 +65,15 @@
|
|||
</el-row>
|
||||
</el-card>
|
||||
<el-table
|
||||
:data="DataValue"
|
||||
:data="tableStructure"
|
||||
style="width: 100%">
|
||||
<el-table-column
|
||||
prop="key"
|
||||
prop="field"
|
||||
label="key"
|
||||
width="180">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="label"
|
||||
prop="annotation"
|
||||
label="label"
|
||||
width="180">
|
||||
</el-table-column>
|
||||
|
@ -82,11 +82,10 @@
|
|||
label="type">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="value"
|
||||
prop="dataValue"
|
||||
label="value">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
</el-main>
|
||||
</el-container>
|
||||
|
||||
|
@ -142,24 +141,12 @@ export default {
|
|||
},
|
||||
|
||||
handleNodeClick(data){
|
||||
console.log("...."+data)
|
||||
this.tableBasic=data
|
||||
console.log(this.tableBasic)
|
||||
dataNum=this.tableBasic.tableFie.length
|
||||
// findStructureByTableId(data.id).then((res)=>{
|
||||
// this.tableStructure=res.data
|
||||
// })
|
||||
|
||||
findTableValueList(data.id,data.dataId,data.tableName).then(res=>{
|
||||
this.assetShowList=res.data;
|
||||
this.DataValue=res.data;
|
||||
})
|
||||
|
||||
console.log("-----"+this.DataValue);
|
||||
console.log("...."+data.basicId)
|
||||
|
||||
|
||||
}
|
||||
this.dataNum=data.tableFie.length
|
||||
this.tableStructure=data.tableFie
|
||||
console.log(this.tableStructure)
|
||||
},
|
||||
},
|
||||
//生命周期 - 创建完成(可以访问当前this实例)",
|
||||
created() {
|
||||
|
|
|
@ -1,118 +1,183 @@
|
|||
<template>
|
||||
<div>
|
||||
<h1>数据资产授权</h1>
|
||||
<h1>资产授权</h1>
|
||||
|
||||
<el-container>
|
||||
<el-aside width="400px">
|
||||
|
||||
<el-tree :data="data" :props="defaultProps" @node-click="handleNodeClick"></el-tree>
|
||||
|
||||
</el-aside>
|
||||
|
||||
<el-main>
|
||||
|
||||
<el-form :inline="true" :model="tableBasic" class="demo-form-inline">
|
||||
<el-form-item label="数据库名称">
|
||||
<el-input v-model="tableBasic.name" placeholder="数据库/表名称" disabled></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="中文名称">
|
||||
<el-input v-model="text" placeholder="中文名称" disabled></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="数据量">
|
||||
<el-input v-model="dataNum" placeholder="数据量" disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span style="font-size: xx-large"></span>
|
||||
<template>
|
||||
|
||||
<el-descriptions class="margin-top" title="资产模型基本信息" :column="2" border>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">数据接入名称</template>
|
||||
{{ tableBasics.accSourName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">系统名称</template>
|
||||
{{ tableBasics.dataSourSystemName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">数据库名称</template>
|
||||
{{ tableBasics }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">表名称</template>
|
||||
{{ this.tableBasics.name }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">表中文名</template>
|
||||
{{ this.tableBasics.name }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">数据量</template>
|
||||
{{ dataNum}}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</template>
|
||||
|
||||
<span>卡片名称</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</el-card>
|
||||
|
||||
|
||||
<el-tabs type="border-card">
|
||||
<el-tab-pane label="用户管理">
|
||||
<el-card class="box-card" title="资产模型基本信息" :column="2" >
|
||||
<template>
|
||||
<el-tabs v-model="activeName" type="card" @tab-click="handleClick">
|
||||
<el-tab-pane label="部门授权" name="first">
|
||||
<el-table
|
||||
:data="tableBasic" style="width: 100%">
|
||||
<el-table-column label="部门名称" prop="field"></el-table-column>
|
||||
<el-table-column label="部门负责人" prop="annotation"></el-table-column>
|
||||
<el-table-column label="邮箱" prop="primarys"></el-table-column>
|
||||
<el-table-column label="创建时间" prop="type"></el-table-column>
|
||||
<el-table-column label="操作" prop="types"></el-table-column>
|
||||
v-if="refreshTable"
|
||||
v-loading="loading"
|
||||
:data="deptList"
|
||||
:default-expand-all="isExpandAll"
|
||||
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
|
||||
row-key="deptId">
|
||||
<el-table-column label="部门名称" prop="deptName" width="260"></el-table-column>
|
||||
<el-table-column label="部门负责人" prop="leader" width="260"></el-table-column>
|
||||
<el-table-column label="邮箱" prop="email" width="260"></el-table-column>
|
||||
<el-table-column align="center" label="创建时间" prop="createTime" width="200">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" class-name="small-padding fixed-width" label="操作(授权)">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
:value="isDeptAccredited(scope.row.deptId)"
|
||||
@change="handleDeptAccreditChange(scope.row.deptId,$event)"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949">
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="配置管理">
|
||||
|
||||
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="用户授权" name="second">
|
||||
<el-table v-loading="loading" :data="userList">
|
||||
<el-table-column v-if="columns[0].visible" key="userId" align="center" label="用户编号" prop="userId"/>
|
||||
<el-table-column v-if="columns[1].visible" key="userName" :show-overflow-tooltip="true" align="center" label="用户名称"
|
||||
prop="userName"/>
|
||||
<el-table-column v-if="columns[2].visible" key="nickName" :show-overflow-tooltip="true" align="center" label="用户昵称"
|
||||
prop="nickName"/>
|
||||
<el-table-column v-if="columns[3].visible" key="deptName" :show-overflow-tooltip="true" align="center" label="部门"
|
||||
prop="dept.deptName"/>
|
||||
<el-table-column v-if="columns[4].visible" key="phonenumber" align="center" label="手机号码"
|
||||
prop="phonenumber" width="120"/>
|
||||
<el-table-column v-if="columns[7].visible" key="email" align="center" label="邮箱"
|
||||
prop="email" width="120"/>
|
||||
<el-table-column v-if="columns[6].visible" align="center" label="创建时间" prop="createTime" width="160">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" class-name="small-padding fixed-width" label="操作(授权)" width="160">
|
||||
<template slot-scope="scope">
|
||||
|
||||
<el-switch
|
||||
:value="isAccredited(scope.row.userId)"
|
||||
@change="handleAccreditChange(scope.row.userId,$event)"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949">
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
|
||||
|
||||
</template>
|
||||
</el-card>
|
||||
</el-main>
|
||||
</el-container>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<style>
|
||||
|
||||
.el-main {
|
||||
background-color: #ececec;
|
||||
color: #000000;
|
||||
line-height: 147px;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
|
||||
|
||||
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等),
|
||||
//例如:import 《组件名称》 from '《组件路径》,
|
||||
|
||||
import { findTableValue, getExtractDataTableNameList, selectBasicList } from '@/api/property/astr'
|
||||
import {
|
||||
addDeptAssetAuthorization,
|
||||
addUserAssetAuthorization,
|
||||
delDeptAssetAuthorization,
|
||||
delUserAssetAuthorization,
|
||||
getExtractDataTableNameList,
|
||||
findDeptIdList,
|
||||
findUserIdList
|
||||
} from '@/api/property/asauth'
|
||||
import { listUser } from '@/api/system/user'
|
||||
import { listDept } from '@/api/system/dept'
|
||||
import { parseTime } from '@/utils/muyu'
|
||||
|
||||
export default {
|
||||
//import引入的组件需要注入到对象中才能使用"
|
||||
components: {},
|
||||
dicts: ['sys_no'],
|
||||
dicts: ['sys_yes_no','sys_normal_disable'],
|
||||
props: {},
|
||||
data() {
|
||||
//这里存放数据"
|
||||
|
||||
return {
|
||||
tableMapping:[],
|
||||
//用户是否授权
|
||||
AccreditValue:false,
|
||||
//用户列表
|
||||
userList:[],
|
||||
// 列信息
|
||||
columns: [
|
||||
{key: 0, label: `用户编号`, visible: false},
|
||||
{key: 1, label: `用户名称`, visible: true},
|
||||
{key: 2, label: `用户昵称`, visible: true},
|
||||
{key: 3, label: `部门`, visible: true},
|
||||
{key: 4, label: `手机号码`, visible: true},
|
||||
{key: 5, label: `状态`, visible: false},
|
||||
{key: 6, label: `创建时间`, visible: true},
|
||||
{key: 7, label: `邮箱`, visible: true}
|
||||
],
|
||||
dataNum:0,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 表格树数据
|
||||
deptList: [],
|
||||
// 部门树选项
|
||||
deptOptions: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 是否展开,默认全部展开
|
||||
isExpandAll: true,
|
||||
// 重新渲染表格状态
|
||||
refreshTable: true,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
deptName: undefined,
|
||||
status: undefined
|
||||
},
|
||||
data:[],
|
||||
defaultProps: {
|
||||
children: 'tableNames',
|
||||
label: 'name'
|
||||
},
|
||||
dataNum:0,
|
||||
tableBasic:{},
|
||||
tableStructure:[],
|
||||
tableBasics:{},
|
||||
javaType:[],
|
||||
valueList:[],
|
||||
activeName: 'first',
|
||||
AssetImPowerListReq:{
|
||||
basicId:null,
|
||||
tableId:null,
|
||||
deptId:null,
|
||||
userId:null
|
||||
},
|
||||
userIdList:[],
|
||||
deptIdList:[],
|
||||
};
|
||||
},
|
||||
//计算属性 类似于data概念",
|
||||
|
@ -121,40 +186,190 @@ export default {
|
|||
watch: {},
|
||||
//方法集合",
|
||||
methods: {
|
||||
getSelectList(){
|
||||
getExtractDataTableNameList().then((res)=>{
|
||||
parseTime,
|
||||
//部门switch状态变化
|
||||
handleDeptAccreditChange(deptId, value) {
|
||||
this.AssetImPowerListReq.basicId = this.tableBasic.basicId
|
||||
this.AssetImPowerListReq.tableId = this.tableBasic.id
|
||||
this.AssetImPowerListReq.deptId = deptId
|
||||
if (this.tableBasic.children != null) {
|
||||
this.AssetImPowerListReq.tableId = null;
|
||||
} else {
|
||||
this.AssetImPowerListReq.basicId = null;
|
||||
}
|
||||
|
||||
if (value === true) {
|
||||
//添加部门资产权限
|
||||
|
||||
addDeptAssetAuthorization(this.AssetImPowerListReq).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.$modal.msgSuccess("权限赋予成功");
|
||||
} else {
|
||||
this.$modal.msgError("权限赋予失败");
|
||||
}
|
||||
this.findDeptIdList();
|
||||
this.isDeptAccredited()
|
||||
})
|
||||
} else {
|
||||
//删除部门资产权限
|
||||
delDeptAssetAuthorization(this.AssetImPowerListReq).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.$modal.msgSuccess("权限删除成功");
|
||||
} else {
|
||||
this.$modal.msgError("权限删除失败");
|
||||
}
|
||||
this.findDeptIdList();
|
||||
this.isDeptAccredited()
|
||||
})
|
||||
}
|
||||
},
|
||||
//处理switch状态变化,进行授予权限和剔除权限
|
||||
handleAccreditChange(userId, value) {
|
||||
console.log("userId的值::" + userId);
|
||||
console.log("value的值:" + value)
|
||||
this.AssetImPowerListReq.basicId = this.tableBasic.basicId
|
||||
this.AssetImPowerListReq.tableId = this.tableBasic.id
|
||||
this.AssetImPowerListReq.userId = userId
|
||||
if (this.tableBasic.children != null) {
|
||||
this.AssetImPowerListReq.tableId = null;
|
||||
} else {
|
||||
this.AssetImPowerListReq.basicId = null;
|
||||
}
|
||||
|
||||
if (value === true) {
|
||||
//添加用户资产权限
|
||||
addUserAssetAuthorization(this.AssetImPowerListReq).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.$modal.msgSuccess("权限赋予成功");
|
||||
} else {
|
||||
this.$modal.msgError("权限赋予失败");
|
||||
}
|
||||
this.findUserIdList()
|
||||
this.isAccredited()
|
||||
})
|
||||
} else {
|
||||
//删除用户资产权限
|
||||
delUserAssetAuthorization(this.AssetImPowerListReq).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.$modal.msgSuccess("权限删除成功");
|
||||
} else {
|
||||
this.$modal.msgError("权限删除失败");
|
||||
}
|
||||
this.findUserIdList()
|
||||
this.isAccredited()
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
// 判断用户ID是否在列表中
|
||||
isAccredited(userId) {
|
||||
return this.userIdList.includes(userId);
|
||||
},
|
||||
|
||||
//判断部门ID是否在列表中
|
||||
isDeptAccredited(deptId) {
|
||||
return this.deptIdList.includes(deptId);
|
||||
},
|
||||
|
||||
/**
|
||||
* 查询用户列表
|
||||
*/
|
||||
getUserList() {
|
||||
this.loading = true;
|
||||
listUser(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
||||
this.userList = response.data.rows;
|
||||
this.total = response.data.total;
|
||||
this.loading = false;
|
||||
console.log(response.data.rows)
|
||||
}
|
||||
);
|
||||
},
|
||||
|
||||
/**
|
||||
* 查询部门列表
|
||||
*/
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listDept(this.queryParams).then(response => {
|
||||
this.deptList = this.handleTree(response.data, "deptId");
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 查询数据库和相关联表
|
||||
*
|
||||
* @returns {AxiosPromise} 返回集合
|
||||
*/
|
||||
findByTableName() {
|
||||
getExtractDataTableNameList().then((res) => {
|
||||
this.data = res.data
|
||||
})
|
||||
},
|
||||
|
||||
handleNodeClick(data){
|
||||
debugger;
|
||||
console.log(data)
|
||||
if (this.tableBasic.name===data.name){
|
||||
this.tableBasic={}
|
||||
}
|
||||
console.log(this.tableBasic.length)
|
||||
if (this.tableBasic.length === undefined){
|
||||
selectBasicList().then(ress=>{
|
||||
this.tableBasic = ress.data
|
||||
this.tableBasics.data
|
||||
/**
|
||||
* 查询资产赋权用户信息
|
||||
* @param data 参数信息
|
||||
* @returns {*} 响应结果
|
||||
*/
|
||||
findUserIdList(){
|
||||
findUserIdList(this.AssetImPowerListReq).then((res) => {
|
||||
this.userIdList = res.data
|
||||
})
|
||||
this.dataNum=data.tableFie.length
|
||||
this.tableStructure=data.tableFie
|
||||
findTableValue(data.dataId,data.name).then(res=>{
|
||||
let tableMapping=res.data
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 查询资产赋权部门信息
|
||||
* @param data 参数信息
|
||||
* @returns {*} 响应结果
|
||||
*/
|
||||
findDeptIdList(){
|
||||
findDeptIdList(this.AssetImPowerListReq).then((res) => {
|
||||
this.deptIdList = res.data
|
||||
})
|
||||
},
|
||||
/**\
|
||||
* 树形结构
|
||||
* @param data
|
||||
*/
|
||||
handleNodeClick(data) {
|
||||
this.tableBasic = data
|
||||
this.AssetImPowerListReq.tableId = this.tableBasic.id
|
||||
this.AssetImPowerListReq.basicId = this.tableBasic.basicId
|
||||
this.AssetImPowerListReq.deptId = this.tableBasic.deptId
|
||||
if (this.tableBasic.children != null) {
|
||||
this.AssetImPowerListReq.tableId = null;
|
||||
} else {
|
||||
this.AssetImPowerListReq.basicId = null;
|
||||
}
|
||||
/**
|
||||
* 查询资产赋权用户信息
|
||||
* @param data 参数信息
|
||||
* @returns {*} 响应结果
|
||||
*/
|
||||
findUserIdList(this.AssetImPowerListReq).then((res) => {
|
||||
this.userIdList = res.data
|
||||
})
|
||||
/**
|
||||
* 查询资产赋权部门信息
|
||||
* @param data 参数信息
|
||||
* @returns {*} 响应结果
|
||||
*/
|
||||
findDeptIdList(this.AssetImPowerListReq).then((res) => {
|
||||
this.deptIdList = res.data
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
},
|
||||
//生命周期 - 创建完成(可以访问当前this实例)",
|
||||
created() {
|
||||
this.getSelectList();
|
||||
//查询数据库和相关联表
|
||||
this.findByTableName()
|
||||
//查询部门列表
|
||||
this.getList()
|
||||
//查询用户列表
|
||||
this.getUserList()
|
||||
|
||||
},
|
||||
//生命周期 - 挂载完成(可以访问DOM元素)",
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="类型" prop="type"></el-table-column>
|
||||
<el-table-column label="映射类型" prop="types"></el-table-column>
|
||||
<el-table-column label="映射类型" prop="dataMapping"></el-table-column>
|
||||
<el-table-column label="是否为空" prop="nullable"></el-table-column>
|
||||
<el-table-column label="是否字典" prop="isDictionary"></el-table-column>
|
||||
<el-table-column label="映射字典" prop="dictionaryTable"></el-table-column>
|
||||
|
@ -87,7 +87,7 @@
|
|||
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等),
|
||||
//例如:import 《组件名称》 from '《组件路径》,
|
||||
|
||||
import { findTableValue, getExtractDataTableNameList } from '@/api/property/astr'
|
||||
import { getExtractDataTableNameList } from '@/api/property/astr'
|
||||
|
||||
export default {
|
||||
//import引入的组件需要注入到对象中才能使用"
|
||||
|
@ -124,34 +124,10 @@ export default {
|
|||
})
|
||||
},
|
||||
handleNodeClick(data){
|
||||
// console.log(data)
|
||||
this.tableBasic=data
|
||||
this.dataNum=data.tableFie.length
|
||||
this.tableStructure=data.tableFie
|
||||
// console.log(this.tableStructure)
|
||||
findTableValue(data.dataId,data.name).then(res=>{
|
||||
let tableMapping = res.data
|
||||
// console.log(res.data)
|
||||
|
||||
for (const index in tableMapping) {
|
||||
for (const i in this.tableStructure) {
|
||||
if (tableMapping[index].key === this.tableStructure[i].field) {
|
||||
|
||||
this.tableStructure[i].types.push(tableMapping[index].type)
|
||||
|
||||
console.log(this.tableStructure[i].types)
|
||||
if (i !== 0&& this.tableStructure[i].types==this.tableStructure[0].types){
|
||||
|
||||
alert("dawdwadad")
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue