应用系统上架

This commit is contained in:
a0049873 2022-11-04 10:02:57 +08:00
parent f25e57e9b1
commit 42bba89d54
3 changed files with 386 additions and 378 deletions

View File

@ -2,8 +2,8 @@ import Cookies from 'js-cookie'
import qs from 'qs' import qs from 'qs'
import { deepClone } from '@/utils/form-generator/index' import { deepClone } from '@/utils/form-generator/index'
export default { export default {
data() { data () {
/* eslint-disable */ /* eslint-disable */
return { return {
// 设置属性 // 设置属性
mixinViewModuleOptions: { mixinViewModuleOptions: {
@ -34,371 +34,356 @@ export default {
addOrUpdateVisible: false // 新增更新弹窗visible状态 addOrUpdateVisible: false // 新增更新弹窗visible状态
} }
/* eslint-enable */ /* eslint-enable */
}, },
created() { created () {
if (this.mixinViewModuleOptions.createdIsNeed) { if (this.mixinViewModuleOptions.createdIsNeed) {
this.query() this.query()
}
},
activated () {
if (this.mixinViewModuleOptions.activatedIsNeed) {
this.query()
}
},
methods: {
// 获取数据列表
query () {
this.dataListLoading = true
this.$http.get(
this.mixinViewModuleOptions.getDataListURL + '?' + qs.stringify({
// order: this.order,
// orderField: this.orderField,
// type: '组件服务',
name: '',
page: this.mixinViewModuleOptions.getDataListIsPage ? this.page : null,
limit: this.mixinViewModuleOptions.getDataListIsPage ? this.limit : null,
...this.dataForm
})
).then(({ data: res }) => {
if (res.code !== 0) {
this.dataList = []
this.total = 0
return this.$message.error(res.msg)
} }
}, this.dataList = this.mixinViewModuleOptions.getDataListIsPage ? res.data.list : res.data
activated() { this.dataList.map((item, index) => {
if (this.mixinViewModuleOptions.activatedIsNeed) { if (this.dataList[index].type != null) {
this.query() switch (item.type) {
case 1:
this.dataList[index].type = '省'
break
case 2:
this.dataList[index].type = '市'
break
case 3:
this.dataList[index].type = '区'
break
case 4:
this.dataList[index].type = '企业'
break
}
}
if (item.children != null) {
item.children.map((item2, index2) => {
switch (item2.type) {
case 1:
this.dataList[index].children[index2].type = '省'
break
case 2:
this.dataList[index].children[index2].type = '市'
break
case 3:
this.dataList[index].children[index2].type = '区'
break
case 4:
this.dataList[index].children[index2].type = '企业'
break
}
})
}
})
// 我的代办特殊处理
this.total = this.mixinViewModuleOptions.getDataListIsPage ? res.data.total : 0
console.log('数据列表', this.dataList, this.mixinViewModuleOptions.getDataListURL)
if (this.dataList[0].type === '组件服务') {
this.dataList.map(val => {
val.infoList2 = val.infoList.filter(item => item.attrType === '应用领域' || item.attrType === '组件类型')
})
} else if (this.dataList[0].type === '应用资源') {
this.dataList.map(val => {
val.infoList2 = val.infoList.filter(item => item.attrType === '应用领域')
})
} else if (this.dataList[0].type === '应用系统') {
this.dataList.forEach((item) => {
item.belongProject = '城市信息模型'
item.belongSystem = '信息模型技术平台'
})
this.dataList.map(val => {
val.infoList2 = val.infoList.filter(item => item.attrType === '应用领域')
})
} }
if (this.mixinViewModuleOptions.requestCallback) {
this.mixinViewModuleOptions.requestCallback(res.data)
}
this.dataListLoading = false
}).catch(() => {
this.dataListLoading = false
})
},
// 多选
dataListSelectionChangeHandle (val) {
this.dataListSelections = val
},
// 排序
dataListSortChangeHandle (data) {
if (!data.order || !data.prop) {
this.order = ''
this.orderField = ''
return false
}
this.order = data.order.replace(/ending$/, '')
this.orderField = data.prop.replace(/([A-Z])/g, '_$1').toLowerCase()
this.query()
},
// 分页, 每页条数
pageSizeChangeHandle (val) {
this.page = 1
this.limit = val
this.query()
},
// 分页, 当前页
pageCurrentChangeHandle (val) {
this.page = val
this.query()
},
getDataList: function () {
this.page = 1
this.query()
},
// 新增
addOrUpdateHandle (id) {
this.addOrUpdateVisible = true
this.disabled = false
this.$nextTick(() => {
this.$refs.addOrUpdate.UpdateState = false
this.$refs.addOrUpdate.dataForm.id = id
this.$refs.addOrUpdate.init()
})
}, },
methods: {
// 获取数据列表
query() {
this.dataListLoading = true
this.$http.get(
this.mixinViewModuleOptions.getDataListURL + '?' + qs.stringify({
// order: this.order,
// orderField: this.orderField,
// type: '组件服务',
name: '',
page: this.mixinViewModuleOptions.getDataListIsPage ? this.page : null,
limit: this.mixinViewModuleOptions.getDataListIsPage ? this.limit : null,
...this.dataForm
})
).then(({ data: res }) => { // 组件服务新增
if (res.code !== 0) { addOrUpdateHandleAI (id) {
this.dataList = [] // const infoList = []
this.total = 0 let showList = []
return this.$message.error(res.msg) this.$http.get('category/getCategoryTree').then(({ data: res }) => {
} showList = res.data.filter(item => item.name === '组件服务')[0].children
this.dataList = this.mixinViewModuleOptions.getDataListIsPage ? res.data.list : res.data showList.forEach((item, index) => {
this.dataList.map((item, index) => { if (item.children && item.children.length > 0) {
if (this.dataList[index].type != null) { item.children.forEach((item2) => {
switch (item.type) { const options = []
case 1: if (item2.isLinkToDic == 'true') {
this.dataList[index].type = '省'; this.$http.get('/sys/dict/data/page?page=1&limit=99&dictTypeId=' + item2.linkValue).then(({ data: res }) => {
break res.data.list.forEach((val) => {
case 2: options.push(val.dictLabel)
this.dataList[index].type = '市'; })
break item2.options = options
case 3: }).catch(() => {})
this.dataList[index].type = '区'; }
break item2.note1 = ''
case 4: // if (item.name !== '必填信息' && item.name !== '服务接口信息') {
this.dataList[index].type = '企业'; // infoList.push({
break // attrType: item2.name,
} // attrValue: '',
} // delFlag: 0,
if (item.children != null) { // options: options
item.children.map((item2, index2) => { // })
switch (item2.type) { // }
case 1:
this.dataList[index].children[index2].type = '省';
break
case 2:
this.dataList[index].children[index2].type = '市';
break
case 3:
this.dataList[index].children[index2].type = '区';
break
case 4:
this.dataList[index].children[index2].type = '企业';
break
}
})
}
})
// 我的代办特殊处理
if (this.mixinViewModuleOptions.getDataListURL === '/act/task/myToDoTaskPage') {
this.$http.get('/sys/user/info').then(userRes => {
console.log('当前用户信息===========>', userRes.data.data.id)
const userId = userRes.data.data.id
this.dataList = this.dataList.filter(item => {
// userId creator
console.log(item.params.creator)
if (!(item.params.creator === userId) && !(item.params.userId === userId)) {
return item
}
})
this.total = this.mixinViewModuleOptions.getDataListIsPage ? res.data.total : 0
})
} else {
this.total = this.mixinViewModuleOptions.getDataListIsPage ? res.data.total : 0
}
console.log('数据列表', this.dataList, this.mixinViewModuleOptions.getDataListURL)
if (this.dataList[0].type === '组件服务') {
this.dataList.map(val => {
val.infoList2 = val.infoList.filter(item => item.attrType === '应用领域' || item.attrType === '组件类型')
})
} else if (this.dataList[0].type === '应用资源') {
this.dataList.map(val => {
val.infoList2 = val.infoList.filter(item => item.attrType === '应用领域')
})
} else if (this.dataList[0].type === '应用系统') {
this.dataList.forEach((item) => {
item.belongProject = "城市信息模型";
item.belongSystem = "信息模型技术平台";
});
this.dataList.map(val => {
val.infoList2 = val.infoList.filter(item => item.attrType === '应用领域')
})
}
if (this.mixinViewModuleOptions.requestCallback) {
this.mixinViewModuleOptions.requestCallback(res.data)
}
this.dataListLoading = false
}).catch(() => {
this.dataListLoading = false
}) })
}, }
// 多选 })
dataListSelectionChangeHandle(val) { console.log(res, showList)
this.dataListSelections = val this.flag = true
}, }).catch(() => {})
// 排序
dataListSortChangeHandle(data) {
if (!data.order || !data.prop) {
this.order = ''
this.orderField = ''
return false
}
this.order = data.order.replace(/ending$/, '')
this.orderField = data.prop.replace(/([A-Z])/g, '_$1').toLowerCase()
this.query()
},
// 分页, 每页条数
pageSizeChangeHandle(val) {
this.page = 1
this.limit = val
this.query()
},
// 分页, 当前页
pageCurrentChangeHandle(val) {
this.page = val
this.query()
},
getDataList: function() {
this.page = 1
this.query()
},
// 新增
addOrUpdateHandle(id) {
this.addOrUpdateVisible = true
this.disabled = false
this.$nextTick(() => {
this.$refs.addOrUpdate.UpdateState = false
this.$refs.addOrUpdate.dataForm.id = id
this.$refs.addOrUpdate.init()
})
},
// 组件服务新增 // 定时器
addOrUpdateHandleAI(id) { this.time = setInterval(() => {
// const infoList = [] console.log('定时器')
let showList = [] if (this.flag) {
this.$http.get('category/getCategoryTree').then(({ data: res }) => { this.addOrUpdateVisible = true
showList = res.data.filter(item => item.name === '组件服务')[0].children this.disabled = false
showList.forEach((item, index) => { this.$nextTick(() => {
if (item.children && item.children.length > 0) { this.$refs.addOrUpdate.UpdateState = false
item.children.forEach((item2) => { this.$refs.addOrUpdate.dataForm.id = id
const options = [] this.$refs.addOrUpdate.init()
if (item2.isLinkToDic == 'true') { // this.$refs.addOrUpdate.dataForm.infoList = infoList
this.$http.get('/sys/dict/data/page?page=1&limit=99&dictTypeId=' + item2.linkValue).then(({ data: res }) => { this.$refs.addOrUpdate.dataForm.showList = showList
res.data.list.forEach((val) => { this.$refs.addOrUpdate.dataForm.showListAll = showList
options.push(val.dictLabel) this.$refs.addOrUpdate.checkList = []
}) showList.forEach(val => {
item2.options = options this.$refs.addOrUpdate.checkList.push(val.name)
}).catch(() => {})
}
item2.note1 = ''
// if (item.name !== '必填信息' && item.name !== '服务接口信息') {
// infoList.push({
// attrType: item2.name,
// attrValue: '',
// delFlag: 0,
// options: options
// })
// }
})
}
})
console.log(res, showList)
this.flag = true
}).catch(() => {})
// 定时器
this.time = setInterval(() => {
console.log('定时器')
if (this.flag) {
this.addOrUpdateVisible = true
this.disabled = false
this.$nextTick(() => {
this.$refs.addOrUpdate.UpdateState = false
this.$refs.addOrUpdate.dataForm.id = id
this.$refs.addOrUpdate.init()
// this.$refs.addOrUpdate.dataForm.infoList = infoList
this.$refs.addOrUpdate.dataForm.showList = showList
this.$refs.addOrUpdate.dataForm.showListAll = showList
this.$refs.addOrUpdate.checkList = []
showList.forEach(val => {
this.$refs.addOrUpdate.checkList.push(val.name)
})
console.log('this.$refs.addOrUpdate.dataForm.showList', this.$refs.addOrUpdate.dataForm.showList)
})
this.flag = false
clearInterval(this.time)
}
}, 100)
},
// 应用资源新增
addOrUpdateHandleServe(id) {
// const infoList = []
let showList = []
this.$http.get('category/getCategoryTree').then(({ data: res }) => {
showList = res.data.filter(item => item.name === '应用资源')[0].children
showList.forEach((item, index) => {
if (item.children && item.children.length > 0) {
item.children.forEach((item2) => {
const options = []
if (item2.isLinkToDic == 'true') {
this.$http.get('/sys/dict/data/page?page=1&limit=99&dictTypeId=' + item2.linkValue).then(({ data: res }) => {
res.data.list.forEach((val) => {
options.push(val.dictLabel)
})
item2.options = options
}).catch(() => {})
}
item2.note1 = ''
// if (item.name !== '必填信息' && item.name !== '服务接口信息') {
// infoList.push({
// attrType: item2.name,
// attrValue: '',
// delFlag: 0,
// options: options
// })
// }
})
}
})
console.log(res, showList)
this.flag = true
}).catch(() => {})
// 定时器
this.time = setInterval(() => {
console.log('定时器')
if (this.flag) {
this.addOrUpdateVisible = true
this.disabled = false
this.$nextTick(() => {
this.$refs.addOrUpdate.UpdateState = false
this.$refs.addOrUpdate.dataForm.id = id
this.$refs.addOrUpdate.init()
// this.$refs.addOrUpdate.dataForm.infoList = infoList
this.$refs.addOrUpdate.dataForm.showList = showList
this.$refs.addOrUpdate.dataForm.showListAll = showList
this.$refs.addOrUpdate.checkList = []
showList.forEach(val => {
this.$refs.addOrUpdate.checkList.push(val.name)
})
console.log('this.$refs.addOrUpdate.dataForm.showList', this.$refs.addOrUpdate.dataForm.showList)
})
this.flag = false
clearInterval(this.time)
}
}, 100)
},
// 修改
UpdateHandle(val) {
this.addOrUpdateVisible = true
this.disabled = false
const cloneVal = deepClone(val)
console.log('修改的数据', cloneVal)
cloneVal.infoList.forEach(item => {
delete item.createDate
delete item.creator
delete item.id
delete item.updateDate
delete item.updater
delete item.note1
delete item.note2
delete item.note3
delete item.note4
delete item.note5
}) })
this.$nextTick(() => { console.log('this.$refs.addOrUpdate.dataForm.showList', this.$refs.addOrUpdate.dataForm.showList)
this.$refs.addOrUpdate.UpdateState = true })
this.$refs.addOrUpdate.dataFormUpdate = cloneVal this.flag = false
this.$refs.addOrUpdate.init() clearInterval(this.time)
console.log('===========================', this.$refs.addOrUpdate.dataFormUpdate) }
}, 100)
},
// 应用资源新增
addOrUpdateHandleServe (id) {
// const infoList = []
let showList = []
this.$http.get('category/getCategoryTree').then(({ data: res }) => {
showList = res.data.filter(item => item.name === '应用资源')[0].children
showList.forEach((item, index) => {
if (item.children && item.children.length > 0) {
item.children.forEach((item2) => {
const options = []
if (item2.isLinkToDic == 'true') {
this.$http.get('/sys/dict/data/page?page=1&limit=99&dictTypeId=' + item2.linkValue).then(({ data: res }) => {
res.data.list.forEach((val) => {
options.push(val.dictLabel)
})
item2.options = options
}).catch(() => {})
}
item2.note1 = ''
// if (item.name !== '必填信息' && item.name !== '服务接口信息') {
// infoList.push({
// attrType: item2.name,
// attrValue: '',
// delFlag: 0,
// options: options
// })
// }
}) })
}, }
// 关闭当前窗口 })
closeCurrentTab(data) { console.log(res, showList)
var tabName = this.$store.state.contentTabsActiveName this.flag = true
this.$store.state.contentTabs = this.$store.state.contentTabs.filter(item => item.name !== tabName) }).catch(() => {})
if (this.$store.state.contentTabs.length <= 0) {
this.$store.state.sidebarMenuActiveName = this.$store.state.contentTabsActiveName = 'home' // 定时器
return false this.time = setInterval(() => {
} console.log('定时器')
if (tabName === this.$store.state.contentTabsActiveName) { if (this.flag) {
this.$router.push({ name: this.$store.state.contentTabs[this.$store.state.contentTabs.length - 1].name }) this.addOrUpdateVisible = true
} this.disabled = false
}, this.$nextTick(() => {
// 删除 this.$refs.addOrUpdate.UpdateState = false
deleteHandle(id) { this.$refs.addOrUpdate.dataForm.id = id
if (this.mixinViewModuleOptions.deleteIsBatch && !id && this.dataListSelections.length <= 0) { this.$refs.addOrUpdate.init()
return this.$message({ // this.$refs.addOrUpdate.dataForm.infoList = infoList
message: this.$t('prompt.deleteBatch'), this.$refs.addOrUpdate.dataForm.showList = showList
type: 'warning', this.$refs.addOrUpdate.dataForm.showListAll = showList
duration: 500 this.$refs.addOrUpdate.checkList = []
}) showList.forEach(val => {
} this.$refs.addOrUpdate.checkList.push(val.name)
this.$confirm(this.$t('prompt.info', { handle: this.$t('delete') }), this.$t('prompt.title'), { })
confirmButtonText: this.$t('confirm'), console.log('this.$refs.addOrUpdate.dataForm.showList', this.$refs.addOrUpdate.dataForm.showList)
cancelButtonText: this.$t('cancel'), })
type: 'warning' this.flag = false
}).then(() => { clearInterval(this.time)
this.$http.delete( }
}, 100)
},
// 修改
UpdateHandle (val) {
this.addOrUpdateVisible = true
this.disabled = false
const cloneVal = deepClone(val)
console.log('修改的数据', cloneVal)
cloneVal.infoList.forEach(item => {
delete item.createDate
delete item.creator
delete item.id
delete item.updateDate
delete item.updater
delete item.note1
delete item.note2
delete item.note3
delete item.note4
delete item.note5
})
this.$nextTick(() => {
this.$refs.addOrUpdate.UpdateState = true
this.$refs.addOrUpdate.dataFormUpdate = cloneVal
this.$refs.addOrUpdate.init()
console.log('===========================', this.$refs.addOrUpdate.dataFormUpdate)
})
},
// 关闭当前窗口
closeCurrentTab (data) {
var tabName = this.$store.state.contentTabsActiveName
this.$store.state.contentTabs = this.$store.state.contentTabs.filter(item => item.name !== tabName)
if (this.$store.state.contentTabs.length <= 0) {
this.$store.state.sidebarMenuActiveName = this.$store.state.contentTabsActiveName = 'home'
return false
}
if (tabName === this.$store.state.contentTabsActiveName) {
this.$router.push({ name: this.$store.state.contentTabs[this.$store.state.contentTabs.length - 1].name })
}
},
// 删除
deleteHandle (id) {
if (this.mixinViewModuleOptions.deleteIsBatch && !id && this.dataListSelections.length <= 0) {
return this.$message({
message: this.$t('prompt.deleteBatch'),
type: 'warning',
duration: 500
})
}
this.$confirm(this.$t('prompt.info', { handle: this.$t('delete') }), this.$t('prompt.title'), {
confirmButtonText: this.$t('confirm'),
cancelButtonText: this.$t('cancel'),
type: 'warning'
}).then(() => {
this.$http.delete(
`${this.mixinViewModuleOptions.deleteURL}${this.mixinViewModuleOptions.deleteIsBatch ? '' : '/' + id}`, `${this.mixinViewModuleOptions.deleteURL}${this.mixinViewModuleOptions.deleteIsBatch ? '' : '/' + id}`,
this.mixinViewModuleOptions.deleteIsBatch ? { this.mixinViewModuleOptions.deleteIsBatch ? {
data: id ? [id] : this.dataListSelections.map(item => item[this.mixinViewModuleOptions.deleteIsBatchKey]) data: id ? [id] : this.dataListSelections.map(item => item[this.mixinViewModuleOptions.deleteIsBatchKey])
} : {} } : {}
).then(({ data: res }) => { ).then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg) return this.$message.error(res.msg)
} }
this.$message({ this.$message({
message: this.$t('prompt.success'), message: this.$t('prompt.success'),
type: 'success', type: 'success',
duration: 500, duration: 500,
onClose: () => { onClose: () => {
this.query() this.query()
}
})
}).catch(() => {})
}).catch(() => {})
},
deleteHandle2(id) {
console.log('删除========================》', id, this.dataListSelections)
const ids = []
if (id) {
ids.push(id)
} else {
if (this.dataListSelections.length > 0) {
this.dataListSelections.forEach(item => {
ids.push(item.id)
})
}
} }
this.$http.post('/resource/delete', { ids: ids }).then(res => { })
console.log('删除成功', res) }).catch(() => {})
this.getDataList() }).catch(() => {})
}) },
},
// 导出 deleteHandle2 (id) {
exportHandle() { console.log('删除========================》', id, this.dataListSelections)
var params = qs.stringify({ const ids = []
token: Cookies.get('ucsToken'), if (id) {
...this.dataForm ids.push(id)
}) } else {
window.location.href = `${window.SITE_CONFIG.apiURL}${this.mixinViewModuleOptions.exportURL}?${params}` if (this.dataListSelections.length > 0) {
this.dataListSelections.forEach(item => {
ids.push(item.id)
})
} }
}
this.$http.post('/resource/delete', { ids: ids }).then(res => {
console.log('删除成功', res)
this.getDataList()
})
},
// 导出
exportHandle () {
var params = qs.stringify({
token: Cookies.get('ucsToken'),
...this.dataForm
})
window.location.href = `${window.SITE_CONFIG.apiURL}${this.mixinViewModuleOptions.exportURL}?${params}`
} }
} }
}

View File

@ -108,7 +108,7 @@
label="共享条件" label="共享条件"
header-align="center" header-align="center"
align="center" align="center"
></el-table-column> ></el-table-column>
<template v-if="dataList[0] && dataList[0].infoList2"> <template v-if="dataList[0] && dataList[0].infoList2">
<el-table-column <el-table-column
v-for="(item, index) in dataList[0].infoList2" v-for="(item, index) in dataList[0].infoList2"
@ -289,15 +289,15 @@ export default {
} }
this.dataList = this.mixinViewModuleOptions.getDataListIsPage this.dataList = this.mixinViewModuleOptions.getDataListIsPage
? res.data.list ? res.data.list
: res.data : res.data
this.total = this.mixinViewModuleOptions.getDataListIsPage this.total = this.mixinViewModuleOptions.getDataListIsPage
? res.data.total ? res.data.total
: 0; : 0
if(this.dataList.length>0){ if (this.dataList.length > 0) {
this.dataList.forEach((item)=>{ this.dataList.forEach((item) => {
item.belongProject = "城市信息模型"; item.belongProject = '城市信息模型'
item.belongSystem = "信息模型技术平台"; item.belongSystem = '信息模型技术平台'
}); })
} }
if (this.mixinViewModuleOptions.requestCallback) { if (this.mixinViewModuleOptions.requestCallback) {
this.mixinViewModuleOptions.requestCallback(res.data) this.mixinViewModuleOptions.requestCallback(res.data)
@ -707,15 +707,38 @@ export default {
.catch(() => {}) .catch(() => {})
} else { } else {
this.$http this.$http
.post('/resource/insert?source= b', this.submitFrom) .post('/resource/insert?source= f', this.submitFrom)
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
this.$message.error('上架失败!') this.$message.error('上架失败!')
this.showPutOnTheShelfFlag2 = false this.showPutOnTheShelfFlag2 = false
} else { } else {
this.$message.success('上架成功!') const instanceId = res.data
this.showPutOnTheShelfFlag2 = false this.submitFrom.id = res.data
this.clear() this.$http.get('/sys/user/info').then(info => {
this.$http.get('sys/user/' + info.data.data.id).then(user => {
const insertDeptId = this.submitFrom.deptId
const userId = user.data.data.id
const userName = user.data.data.realName
const params = {
instanceId: instanceId,
deptId: insertDeptId,
userId: userId,
userName: userName,
resourceDTO: [this.submitFrom]
}
this.$http.post('/resource/center/apply', params).then(res3 => {
if (res3.data.code == 0) {
this.$message.success('上架成功!')
this.showPutOnTheShelfFlag2 = false
this.clear()
} else {
this.$message.error('上架失败!')
this.showPutOnTheShelfFlag2 = false
}
})
})
})
} }
}) })
.catch(() => {}) .catch(() => {})

View File

@ -156,7 +156,7 @@ export default {
type: Array type: Array
} }
}, },
data() { data () {
return { return {
dataList: [], dataList: [],
dataView: [], dataView: [],
@ -171,16 +171,16 @@ export default {
} }
}, },
watch: { watch: {
dataList(item) { dataList (item) {
if (item) { if (item) {
this.dataList = item this.dataList = item
} }
}, },
insertList(val) { insertList (val) {
if (val) { if (val) {
if (this.dataForm.type === '应用资源') { if (this.dataForm.type === '应用系统') {
this.dataView = val.filter( this.dataView = val.filter(
(item) => item.name === this.dataForm.type + '一' (item) => item.name === '应用资源一'
)[0] )[0]
this.dataForm.infoList.map((item, index) => { this.dataForm.infoList.map((item, index) => {
this.dataView.children.map((itemView, indexView) => { this.dataView.children.map((itemView, indexView) => {
@ -366,7 +366,7 @@ export default {
}, },
computed: {}, computed: {},
methods: { methods: {
videoAndImg(link) { videoAndImg (link) {
if (link) { if (link) {
window.open(link) window.open(link)
} else { } else {
@ -376,7 +376,7 @@ export default {
}) })
} }
}, },
deptName() { deptName () {
console.log(this.dataForm.deptId) console.log(this.dataForm.deptId)
this.$http this.$http
.get(`/sys/dept/${this.dataForm.deptId}`) .get(`/sys/dept/${this.dataForm.deptId}`)
@ -385,7 +385,7 @@ export default {
this.unit = res.data.name this.unit = res.data.name
}) })
}, },
queryPartAppByKeyIdFunction(index, indexSon, indexSonSon) { queryPartAppByKeyIdFunction (index, indexSon, indexSonSon) {
if (this.dataForm.type === '组件服务') { if (this.dataForm.type === '组件服务') {
this.$http this.$http
.get( .get(
@ -424,8 +424,8 @@ export default {
} }
} }
}, },
created() { }, created () { },
mounted() { mounted () {
this.deptName() this.deptName()
} }
} }