应用系统上架

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

@ -71,16 +71,16 @@ export default {
if (this.dataList[index].type != null) { if (this.dataList[index].type != null) {
switch (item.type) { switch (item.type) {
case 1: case 1:
this.dataList[index].type = '省'; this.dataList[index].type = '省'
break break
case 2: case 2:
this.dataList[index].type = '市'; this.dataList[index].type = '市'
break break
case 3: case 3:
this.dataList[index].type = '区'; this.dataList[index].type = '区'
break break
case 4: case 4:
this.dataList[index].type = '企业'; this.dataList[index].type = '企业'
break break
} }
} }
@ -88,38 +88,23 @@ export default {
item.children.map((item2, index2) => { item.children.map((item2, index2) => {
switch (item2.type) { switch (item2.type) {
case 1: case 1:
this.dataList[index].children[index2].type = '省'; this.dataList[index].children[index2].type = '省'
break break
case 2: case 2:
this.dataList[index].children[index2].type = '市'; this.dataList[index].children[index2].type = '市'
break break
case 3: case 3:
this.dataList[index].children[index2].type = '区'; this.dataList[index].children[index2].type = '区'
break break
case 4: case 4:
this.dataList[index].children[index2].type = '企业'; this.dataList[index].children[index2].type = '企业'
break 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 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) console.log('数据列表', this.dataList, this.mixinViewModuleOptions.getDataListURL)
if (this.dataList[0].type === '组件服务') { if (this.dataList[0].type === '组件服务') {
this.dataList.map(val => { this.dataList.map(val => {
@ -131,9 +116,9 @@ export default {
}) })
} else if (this.dataList[0].type === '应用系统') { } else if (this.dataList[0].type === '应用系统') {
this.dataList.forEach((item) => { this.dataList.forEach((item) => {
item.belongProject = "城市信息模型"; item.belongProject = '城市信息模型'
item.belongSystem = "信息模型技术平台"; item.belongSystem = '信息模型技术平台'
}); })
this.dataList.map(val => { this.dataList.map(val => {
val.infoList2 = val.infoList.filter(item => item.attrType === '应用领域') val.infoList2 = val.infoList.filter(item => item.attrType === '应用领域')
}) })

View File

@ -292,12 +292,12 @@ export default {
: 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 {
const instanceId = res.data
this.submitFrom.id = res.data
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.$message.success('上架成功!')
this.showPutOnTheShelfFlag2 = false this.showPutOnTheShelfFlag2 = false
this.clear() this.clear()
} else {
this.$message.error('上架失败!')
this.showPutOnTheShelfFlag2 = false
}
})
})
})
} }
}) })
.catch(() => {}) .catch(() => {})

View File

@ -178,9 +178,9 @@ export default {
}, },
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) => {