Commit 0536833b by 史敦盼

中台修改

1 parent c306a069
......@@ -40,3 +40,7 @@ export function qryStatDetPage(data) {
export function qryAssetsPage(data) {
return post(EADC_ARRCHITECTURE + "/arc-aby-ast/qryAssetsPage", data);
}
// 中台服务清单列表,不分页
export function comCenterServeQryAll(data) {
return post(EADC_ARRCHITECTURE + "/arc-aby-iy/qryAll", data);
}
\ No newline at end of file
......@@ -396,14 +396,14 @@ export default {
// },
{
label: "业务对象名称",
prop: "buildType2",
prop: "assetName",
minWidth: 120,
showOverflowTooltip: true,
align: "center",
},
{
label: "业务对象编码",
prop: "buildType2",
prop: "assetNumber",
minWidth: 120,
showOverflowTooltip: true,
align: "center",
......@@ -414,6 +414,9 @@ export default {
minWidth: 120,
showOverflowTooltip: true,
align: "center",
render: (h, params) => {
return h("span", {}, this.handleName(params.parentAssetNames, 0) || '--');
},
},
{
label: "业务职能",
......@@ -421,6 +424,9 @@ export default {
minWidth: 120,
showOverflowTooltip: true,
align: "center",
render: (h, params) => {
return h("span", {}, this.handleName(params.parentAssetNames, 1) || '--');
},
},
{
label: "业务域",
......@@ -428,6 +434,9 @@ export default {
minWidth: 120,
showOverflowTooltip: true,
align: "center",
render: (h, params) => {
return h("span", {}, this.handleName(params.parentAssetNames, 2) || '--');
},
},
],
getList() {
......@@ -455,14 +464,14 @@ export default {
// },
{
label: "应用服务名称",
prop: "buildType2",
prop: "assetName",
minWidth: 120,
showOverflowTooltip: true,
align: "center",
},
{
label: "应用服务编码",
prop: "buildType2",
prop: "assetNumber",
minWidth: 120,
showOverflowTooltip: true,
align: "center",
......@@ -741,6 +750,16 @@ export default {
}
},
methods: {
handleName(name,idx) {
let strArr = ['', '', '']
if(name) {
let str = name.split(',')
strArr[0] = str[str.length - 3]
strArr[1] = str[str.length - 2]
strArr[2] = str[str.length - 1]
}
return strArr[idx]
},
getQryStatDetPage(inventoryEnum, archiTypeId, archiType) {
const params = {
inventoryId: this.row.row.inventoryEnum,
......
......@@ -56,11 +56,11 @@
</el-col>
</el-row>
</el-form>
<el-table-column slot="end" fixed="right" label="操作" align="center" :width="120">
<el-table-column slot="end" fixed="right" label="操作" align="center" :width="200">
<template slot-scope="scope">
<div class="btns">
<img src="@/assets/btn1.jpg" style="cursor: pointer" width="26" height="26"
@click="concatService(scope.row)" alt="">
<img v-for="(item, idx) in btns" :key="idx" :src="item.url" style="cursor: pointer" width="26" height="26"
@click="concatService(scope.row, item.archiType)" alt="">
</div>
</template>
</el-table-column>
......@@ -72,7 +72,7 @@
<el-row class="comDialogContent">
<el-col :span="12">
<div style="height: 400px;overflow-y:auto">
<el-tree ref="tree" :data="treeData" show-checkbox check-on-click-node node-key="assetId" default-expand-all :props="treeProps"
<el-tree ref="tree" :data="treeData" show-checkbox check-on-click-node :node-key="handleNodeKey" default-expand-all :props="treeProps"
@check-change="checkChange">
</el-tree>
</div>
......@@ -95,7 +95,7 @@
</template>
<script>
import { stateOptions, serverTypeOptions, abilitySourceOptions, midGroundNameOptions, midGroundTypeOptions } from '../options.js'
import { getServiceList, correlationSave, qryAssetsPage } from '@/api/comCenterServeListNew'
import { getServiceList, correlationSave, qryAssetsPage, comCenterServeQryAll } from '@/api/comCenterServeListNew'
import EditService from './editService.vue'
import ETable from "@/newComponents/ETable/index.vue";
import tableMixin from "@/mixins/tableMixin";
......@@ -396,19 +396,90 @@ export default {
},
],
// dialogData: []
btns: [{
url: require('@/assets/comCenterServe/btn1.png'),
archiType: 1
},{
url: require('@/assets/comCenterServe/btn2.png'),
archiType: 2
},{
url: require('@/assets/comCenterServe/btn3.png'),
archiType: 3
},{
url: require('@/assets/comCenterServe/btn4.png'),
archiType: 4
},{
url: require('@/assets/comCenterServe/btn5.png'),
archiType: 6
}],
operationArchiType: null
};
},
computed: {
handleNodeKey() {
if(this.operationArchiType === 6) {
return 'inventoryId'
} else {
return 'assetId'
}
},
handleTreeProps() {
if(this.operationArchiType === 6) {
return {
children: 'children',
label: 'abilityName'
}
} else {
return {
children: 'children',
label: 'assetName'
}
}
}
},
mounted() {
this.disabledTreeNode(this.treeData)
this.getList()
},
methods: {
handleOpen() {
if(this.operationArchiType === 6) {
comCenterServeQryAll().then(res => {
if(res.code === 200) {
this.treeData = res.data
}
})
} else {
this.getTreeData()
}
},
getArchiTypeCode(info) {
let archiType = ''
switch (info) {
case 5:
archiType = 'ARCHI_SAFE'
break
case 4:
archiType = 'ARCHI_TECHNOLOGY'
break
case 3:
archiType = 'ARCHI_DATA'
break
case 2:
archiType = 'ARCHI_APPLICATION'
break
case 1:
archiType = 'ARCHI_BUSINESS'
break
}
return archiType
},
getTreeData() {
const params = {
archiType: 'ARCHI_BUSINESS',
archiType: this.getArchiTypeCode(this.operationArchiType),
archiAssetState: 2,
archiStage: 1,
}
......@@ -422,7 +493,9 @@ export default {
getQryAssetsPage() {
const { inventoryId } = this.dialogRow
const params = {
inventoryId
inventoryId,
archiTypeId: this.operationArchiType,
archiType: this.getArchiType(this.operationArchiType)
}
qryAssetsPage(params).then(res => {
if(res.code === 200) {
......@@ -431,7 +504,8 @@ export default {
}
})
},
concatService(row) {
concatService(row, type) {
this.operationArchiType = type
this.dialogRow = { ...row }
console.log("编辑", row);
this.title = '关联业务'
......@@ -453,7 +527,7 @@ export default {
// console.log('checkChange', node, checked);
// console.log('checkedNodes', this.$refs.tree.getCheckedNodes())
this.dialogData = this.$refs.tree.getCheckedNodes()
this.dialogData = this.dialogData.filter(v => v.parentAssetId != '0')
this.dialogData = this.dialogData.filter(v => !v.children || !v.children.length )
},
close() {
this.dialogData = []
......@@ -474,8 +548,8 @@ export default {
abilityName,
assetId: v.assetId,
assetName: v.assetName,
archiType: this.getArchiType(v.archiAssetType),
archiTypeId: v.archiAssetType,
archiType: this.getArchiType(this.operationArchiType),
archiTypeId: this.operationArchiType,
eleName: v.eleName,
parentAssetIds: v.parentAssetId,
parentAssetNames: v.parentAssetName,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!