添加资产授权
parent
d7f4bfcf99
commit
709ffee6cf
|
@ -2,7 +2,7 @@ import request from '@/utils/request'
|
|||
|
||||
export function getExtractDataTableNameList() {
|
||||
return request({
|
||||
url: '/property/dataRunName/extractDataTableName',
|
||||
url: '/property/dataRunName/extractDataTableNameShow',
|
||||
method: 'post',
|
||||
})
|
||||
}
|
||||
|
|
|
@ -40,3 +40,31 @@ export function delUserAssetAuthorization(data) {
|
|||
data:data
|
||||
})
|
||||
}
|
||||
|
||||
// --------------------------------------------------------
|
||||
|
||||
/**
|
||||
* 查询资产赋权用户信息
|
||||
* @param data 参数信息
|
||||
* @returns {*} 响应结果
|
||||
*/
|
||||
export function findUserIdList(data) {
|
||||
return request({
|
||||
url: '/property/dataRunName/findUserIdList',
|
||||
method: 'POST',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询资产赋权部门信息
|
||||
* @param data 参数信息
|
||||
* @returns {*} 响应结果
|
||||
*/
|
||||
export function findDeptIdList(data) {
|
||||
return request({
|
||||
url: '/property/dataRunName/findDeptIdList',
|
||||
method: 'POST',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
|
|
@ -7,20 +7,6 @@ export function getExtractDataTableNameList() {
|
|||
})
|
||||
}
|
||||
|
||||
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',
|
||||
})
|
||||
}
|
||||
|
||||
export function tableStructureShow(data) {
|
||||
return request({
|
||||
url: '/property/dataRunName/tableStructureShow',
|
||||
|
|
|
@ -47,11 +47,3 @@ export function selectHandleClick(data) {
|
|||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function extractDataName(data) {
|
||||
return request({
|
||||
url: '/property/dataRunName/extractDataName',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div>
|
||||
<h1>测试4()- 资产展示</h1>
|
||||
<h1>资产展示</h1>
|
||||
|
||||
<el-container>
|
||||
<el-aside width="400px">
|
||||
|
@ -26,7 +26,7 @@
|
|||
<el-descriptions class="margin-top" title="资产模型基本信息" :column="2" border>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">表名称</template>
|
||||
{{ tableBasic.tableName }}
|
||||
{{ tableBasic.name }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">表备注</template>
|
||||
|
@ -34,30 +34,30 @@
|
|||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">数据量</template>
|
||||
{{ tableBasic.dataNum }}
|
||||
{{ dataNum }}
|
||||
</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>
|
||||
</div>
|
||||
</el-card>
|
||||
<!-- v-if="dataType === 'dataTable'-->
|
||||
<!-- v-if="dataType === 'dataTable'-->
|
||||
<el-card class="box-card" style="margin-top: 20px">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>模型数据</span>
|
||||
</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>
|
||||
|
||||
|
@ -99,6 +98,7 @@
|
|||
<script>
|
||||
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等),
|
||||
//例如:import 《组件名称》 from '《组件路径》,
|
||||
import { findTableValue, getExtractDataTableNameList, selectBasicList } from '@/api/property/asDisplay'
|
||||
import { tableStructureShow } from '@/api/property/astr'
|
||||
|
||||
export default {
|
||||
|
@ -112,10 +112,10 @@ export default {
|
|||
return {
|
||||
data:[],
|
||||
defaultProps: {
|
||||
children: 'children',
|
||||
label: 'tableName'
|
||||
children: 'tableNames',
|
||||
label: 'name'
|
||||
},
|
||||
tableBasic:{},
|
||||
tableBasic:[],
|
||||
tableStructure:[],
|
||||
assetShowList: [
|
||||
// {key: "测试.sys_user.id", type: "String", value: 1},
|
||||
|
@ -124,9 +124,8 @@ export default {
|
|||
// {key: "测试.sys_user.email", type: "String", value: "123@136.com"},
|
||||
// {key: "测试.sys_user.sex", type: "String", value: "Y"},
|
||||
],
|
||||
kvtList: [],
|
||||
DataValue:[],
|
||||
|
||||
dataNum:'',
|
||||
};
|
||||
},
|
||||
//计算属性 类似于data概念",
|
||||
|
@ -144,13 +143,14 @@ export default {
|
|||
|
||||
handleNodeClick(data){
|
||||
if (this.data.name!=data.name){
|
||||
tableStructureShow(data).then(res=>{
|
||||
this.tableBasic=data
|
||||
tableStructureShow(data).then(res=> {
|
||||
this.tableBasic = data
|
||||
console.log(res)
|
||||
this.dataNum=res.data.length
|
||||
this.tableStructure=res.data
|
||||
this.dataNum = res.data.length
|
||||
this.tableStructure = res.data
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
},
|
||||
//生命周期 - 创建完成(可以访问当前this实例)",
|
||||
|
@ -180,5 +180,4 @@ export default {
|
|||
<style scoped>
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
|
|
|
@ -189,12 +189,14 @@ export default {
|
|||
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.basicId = this.tableBasic.basicId
|
||||
this.AssetImPowerListReq.deptId = deptId
|
||||
this.AssetImPowerListReq.tableId = null;
|
||||
} else {
|
||||
this.AssetImPowerListReq.tableId = this.tableBasic.id
|
||||
this.AssetImPowerListReq.deptId = deptId
|
||||
this.AssetImPowerListReq.basicId = null;
|
||||
}
|
||||
|
||||
|
@ -227,12 +229,13 @@ export default {
|
|||
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.basicId = this.tableBasic.basicId
|
||||
this.AssetImPowerListReq.userId = userId
|
||||
this.AssetImPowerListReq.tableId = null;
|
||||
} else {
|
||||
this.AssetImPowerListReq.tableId = this.tableBasic.id
|
||||
this.AssetImPowerListReq.userId = userId
|
||||
this.AssetImPowerListReq.basicId = null;
|
||||
}
|
||||
|
||||
|
@ -334,14 +337,16 @@ export default {
|
|||
*/
|
||||
handleNodeClick(data) {
|
||||
this.tableBasic = data
|
||||
this.AssetImPowerListReq.tableId = this.tableBasic.id
|
||||
if (this.tableBasic.children != null) {
|
||||
this.AssetImPowerListReq.basicId = this.tableBasic.basicId
|
||||
this.AssetImPowerListReq.deptId = this.tableBasic.deptId
|
||||
if (this.tableBasic.children != null) {
|
||||
this.AssetImPowerListReq.tableId = null;
|
||||
} else {
|
||||
this.AssetImPowerListReq.tableId = this.tableBasic.id
|
||||
this.AssetImPowerListReq.basicId = null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询资产赋权用户信息
|
||||
* @param data 参数信息
|
||||
|
|
|
@ -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>
|
||||
|
@ -132,7 +132,8 @@ export default {
|
|||
this.dataNum = res.data.length
|
||||
this.tableStructure = res.data
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
},
|
||||
//生命周期 - 创建完成(可以访问当前this实例)",
|
||||
|
@ -162,5 +163,4 @@ export default {
|
|||
<style scoped>
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue