<script>
import {
commonGet
} from ’@/api/UserMG.js’
import{
getAllSys,
getJarsBySys
} from ‘@/api/url.js‘
import {
mapState
mapMutations
} from ‘vuex‘
import caseRelease from ‘./components/caseRelease.vue‘
import baffleMaintenance from ‘./components/baffleMaintenance/baffleMaintenance.vue‘
import caseMaintenance from ‘./components/caseMaintenance/caseMaintenance.vue‘
import resultQuery from ‘./components/resultQuery.vue‘
//import dynamicTable from ‘./right-data-table‘
export default {
components:{
caseRelease,
caseMaintenance,
baffleMaintenance,
resultQuery
},
data() {
return {
//数据池树形列表
sysTreeList: [],
//点击的节点信息
node: {
id: ‘’,
index: ‘’
} ,
//被点击的叶子结点信息
leafNode: {
key: ‘’,
resourceId: ‘’,
systemResourceId: ‘’,
},
// 树形默认数据结构
props:{
children: ‘children‘,
label: ‘label‘,
isLeaf: ‘isLeaf'
},
//控制树形图显示与隐藏
treeShow: true
}
},
computed: {
…mapState({
sysList: state => state.manage.systemList
})
},
watch: {
filterText(val){
this.$refs.trees.filter(val)
}
},
created() {
// this.getSystems()
},
methods: {
…mapMutations({
setAllsystems: 'SET_SYSTEM_LIST'
})
//获取所有系统
getSystems(resolve){
commonGet(getAllSys,{}).then(res => {
if (res.resultCode === ‘200‘) {
//重置tree列表
this.sysTreeList = []
this.setAllsystems(res. resultData)
this.sysList.forEach((item, index) =>{
this.sysTreeList.push({
type: 'system‘,
index: index,
resourceId: item.resourceId,
iconclass: 'el-icon-s-order‘,
label: item.sysName,
isLeaf: false,
children: []
113
少)
114
)
115
resolve(this. sysTreeList)
116
y else
this message error(res resultS)
118
119
)
129
121
·获取指定系统下的ja包列表
122
getsysJars(node, resolve).
123
commonGet(slgetJarsBySys s(node rid,O). then(res=>( E
124
125
126
let data=[I
128
. data push(
129
-type: Jar
130
index: key,
090828543.19
if(res. resultcode ==="200")t
.//this. sysTreeList[node index].children *01
res. resultData forEach((item, key)
131
resourceId:- item resourceId
132
systemResourceId: item. systemResourceId
133
iconclass:'el1-icon-s-cooperation
134
垂要带
sysnAme: node sysName,
135
label: item. jarAliasName
136
isLeaf: false
137
children: []
138
)
139
行1.列1条2WF8 CRIF We②Bint
11:43
只八静曰刂英日
202198