应用系统上架
This commit is contained in:
parent
f25e57e9b1
commit
42bba89d54
|
@ -71,16 +71,16 @@ export default {
|
|||
if (this.dataList[index].type != null) {
|
||||
switch (item.type) {
|
||||
case 1:
|
||||
this.dataList[index].type = '省';
|
||||
this.dataList[index].type = '省'
|
||||
break
|
||||
case 2:
|
||||
this.dataList[index].type = '市';
|
||||
this.dataList[index].type = '市'
|
||||
break
|
||||
case 3:
|
||||
this.dataList[index].type = '区';
|
||||
this.dataList[index].type = '区'
|
||||
break
|
||||
case 4:
|
||||
this.dataList[index].type = '企业';
|
||||
this.dataList[index].type = '企业'
|
||||
break
|
||||
}
|
||||
}
|
||||
|
@ -88,38 +88,23 @@ export default {
|
|||
item.children.map((item2, index2) => {
|
||||
switch (item2.type) {
|
||||
case 1:
|
||||
this.dataList[index].children[index2].type = '省';
|
||||
this.dataList[index].children[index2].type = '省'
|
||||
break
|
||||
case 2:
|
||||
this.dataList[index].children[index2].type = '市';
|
||||
this.dataList[index].children[index2].type = '市'
|
||||
break
|
||||
case 3:
|
||||
this.dataList[index].children[index2].type = '区';
|
||||
this.dataList[index].children[index2].type = '区'
|
||||
break
|
||||
case 4:
|
||||
this.dataList[index].children[index2].type = '企业';
|
||||
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 => {
|
||||
|
@ -131,9 +116,9 @@ export default {
|
|||
})
|
||||
} else if (this.dataList[0].type === '应用系统') {
|
||||
this.dataList.forEach((item) => {
|
||||
item.belongProject = "城市信息模型";
|
||||
item.belongSystem = "信息模型技术平台";
|
||||
});
|
||||
item.belongProject = '城市信息模型'
|
||||
item.belongSystem = '信息模型技术平台'
|
||||
})
|
||||
this.dataList.map(val => {
|
||||
val.infoList2 = val.infoList.filter(item => item.attrType === '应用领域')
|
||||
})
|
||||
|
|
|
@ -292,12 +292,12 @@ export default {
|
|||
: res.data
|
||||
this.total = this.mixinViewModuleOptions.getDataListIsPage
|
||||
? res.data.total
|
||||
: 0;
|
||||
: 0
|
||||
if (this.dataList.length > 0) {
|
||||
this.dataList.forEach((item) => {
|
||||
item.belongProject = "城市信息模型";
|
||||
item.belongSystem = "信息模型技术平台";
|
||||
});
|
||||
item.belongProject = '城市信息模型'
|
||||
item.belongSystem = '信息模型技术平台'
|
||||
})
|
||||
}
|
||||
if (this.mixinViewModuleOptions.requestCallback) {
|
||||
this.mixinViewModuleOptions.requestCallback(res.data)
|
||||
|
@ -707,15 +707,38 @@ export default {
|
|||
.catch(() => {})
|
||||
} else {
|
||||
this.$http
|
||||
.post('/resource/insert?source= b', this.submitFrom)
|
||||
.post('/resource/insert?source= f', this.submitFrom)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
this.$message.error('上架失败!')
|
||||
this.showPutOnTheShelfFlag2 = false
|
||||
} 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.showPutOnTheShelfFlag2 = false
|
||||
this.clear()
|
||||
} else {
|
||||
this.$message.error('上架失败!')
|
||||
this.showPutOnTheShelfFlag2 = false
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
.catch(() => {})
|
||||
|
|
|
@ -178,9 +178,9 @@ export default {
|
|||
},
|
||||
insertList (val) {
|
||||
if (val) {
|
||||
if (this.dataForm.type === '应用资源') {
|
||||
if (this.dataForm.type === '应用系统') {
|
||||
this.dataView = val.filter(
|
||||
(item) => item.name === this.dataForm.type + '一'
|
||||
(item) => item.name === '应用资源一'
|
||||
)[0]
|
||||
this.dataForm.infoList.map((item, index) => {
|
||||
this.dataView.children.map((itemView, indexView) => {
|
||||
|
|
Loading…
Reference in New Issue