Merge branch 'hi-ucs-dev' of http://192.168.124.50:3000/wuhongjian/hi-ucs into hi-ucs-dev

This commit is contained in:
gongjiale 2023-01-10 11:19:32 +08:00
commit 31f3c10abb
4 changed files with 80 additions and 50 deletions

View File

@ -114,6 +114,7 @@ export default {
}
this.$store.state.user.id = res.data.id
this.$store.state.user.name = res.data.realName
this.$store.state.user.deptId = res.data.deptId
this.$store.state.user.superAdmin = res.data.superAdmin
this.$store.state.user.roleIdList = []
if (res.data.roleIdList) {

View File

@ -65,10 +65,23 @@
<div class="baseTitle">
组合能力
</div>
<div class="baseInner">
<!-- <scene-one-input :dataForm="dataForm" title="场景痛点" @update="updateDataForm" ref="scenePainDom"
:keyTextObj="painKeyTextObj"></scene-one-input> -->
<InfrastructureModal v-model="dataForm" :dataForm="dataForm" @update="updateDataForm" type="基础设施"
<div class="baseInner1">
<div class="info-inner">
<ability-add :dataForm="dataForm" @update="updateDataForm" @updateCount="updateCount" ref="abilityAdd1"
title="基础设施" :typeList="baseTypeList"></ability-add>
</div>
<div style="border-bottom: 1px dashed #d3d3d3;margin-bottom: 23px;"></div>
<div class="info-inner">
<ability-add :dataForm="dataForm" @update="updateDataForm" @updateCount="updateCount" ref="abilityAdd2"
title="组件服务" :typeList="componetTypeList"></ability-add>
</div>
<div style="border-bottom: 1px dashed #d3d3d3;margin-bottom: 23px;"></div>
<div class="info-inner">
<ability-add :dataForm="dataForm" @update="updateDataForm" @updateCount="updateCount" ref="abilityAdd3"
title="数据资源" :typeList="dataTypeList"></ability-add>
</div>
<!-- <InfrastructureModal v-model="dataForm" :dataForm="dataForm" @update="updateDataForm" type="基础设施"
:modalType="modalType" ref="jcssDom"></InfrastructureModal>
<el-form-item label="基础设施总数" >
<el-input v-model="dataForm.infrastructureCount" onkeyup="value=value.replace(/[^\d]/g,0)" placeholder="请输入基础设施总数"></el-input>
@ -82,7 +95,7 @@
:getDataParams="getListParams['组件服务']"></combine-ability>
<el-form-item label="组件服务总数" >
<el-input v-model="dataForm.componentCount" placeholder="请输入组件服务总数"></el-input>
</el-form-item>
</el-form-item> -->
</div>
</div>
</el-form>
@ -103,7 +116,7 @@ import { getFuseResourceList, getListParams } from './assignedScene/add-update-s
import qs from 'qs'
// import SceneUseStep from './components/scene-use-step.vue'
// import SceneOneInput from './components/scene-one-input.vue'
// import AbilityAdd from './components/ability-add.vue'
import AbilityAdd from '@/views/modules/ability/assignedScene/components/ability-add.vue'
// import CombineAbility from '../components/combine-ability.vue'
// import CommonQuestion from '../components/common-question.vue'
// import InfrastructureModal from './components/infrastructure-modal.vue'
@ -127,15 +140,15 @@ export const modalTypeText = {
export default {
components: {
CombineAbility,
InfrastructureModal
// CombineAbility,
// InfrastructureModal,
AbilityAdd
// SceneUseStep,
// CombineAbility,
// SceneOneInput,
// upload,
// CommonQuestion,
// InfrastructureModal,
// AbilityAdd
},
watch: {
@ -310,12 +323,25 @@ export default {
add: 'post',
update: 'put'
}
this.dataForm.fuseResourceList = this.getFuseResourceList()
// this.dataForm.fuseResourceList = this.getFuseResourceList()
if (this.imageUrl == '') {
this.$message.error('请上传图片!')
return
}
this.dataForm.fuseAttrList.find(v => v.attrType == '服务图片').attrValue = this.imageUrl || ''
this.dataForm.fuseResourceList = []
for (const key in this.abilityListObj) {
this.abilityListObj[key].map((val, index) => {
this.dataForm.fuseResourceList.push({
type: key,
typeSecond: val.type,
resourceName: val.name,
deptName: val.dept,
sequence: index + 1
})
})
}
console.log('提交', this.dataForm, this.abilityListObj)
this.$http
[methodsObj[this.modalType]]('/fuse', this.dataForm)
.then(({ data: res }) => {
@ -353,13 +379,15 @@ export default {
this.imageUrl = _imgObj.attrValue
//
Object.keys(this.getListParams).map(k => {
const arr = data.fuseResourceList.filter(v => v.type == k)
const arr2 = []
arr.map(v => {
arr2.push(v.resourceId)
})
this.abilityListObj[k] = arr2
Object.keys(this.getListParams).map((k, index) => {
// const arr = data.fuseResourceList.filter(v => v.type == k)
// const arr2 = []
// arr.map(v => {
// arr2.push(v.resourceId)
// })
// console.log('2', arr2)
// this.abilityListObj[k] = arr2
this.$refs['abilityAdd' + (index + 1)].getDataInfo(data)
})
console.log('this.dataForm----详情-------->', this.dataForm)

View File

@ -1,7 +1,6 @@
<template>
<div>
<div class="info-title">{{ title }}</div>
<el-form :inline="true">
<el-form-item label="使用总数">
<el-input
@ -153,11 +152,14 @@ export default {
this.count = dataForm.dataSourceCount
}
const fuseAttrList = dataForm.fuseAttrList || []
const obj = fuseAttrList.find((v) => v.attrType === this.title) || {}
const attrValue = JSON.parse(obj.attrValue || '[]')
if (attrValue.length > 0) {
attrValue.map((v) => {
const fuseAttrList = dataForm.fuseResourceList || []
const obj = fuseAttrList.filter((v) => v.type === this.title)
console.log('回显数据=======>', obj)
if (obj.length > 0) {
obj.map((v) => {
v.name = v.resourceName
v.dept = v.deptName
v.type = v.typeSecond
arr.push(v)
})
} else {

View File

@ -1,7 +1,7 @@
<!--
* @Author: hisense.guoyue
* @LastEditors: Light
* @LastEditTime: 2022-11-25 17:24:25
* @LastEditTime: 2023-01-09 11:22:49
* @Description: 资金报表
-->
<template>
@ -74,7 +74,6 @@
</el-select>
</el-form-item>
<!--提供部门 传id-->
<el-form-item>
<span>提供部门</span>
<el-select
@ -233,7 +232,7 @@ export default {
data () {
return {
disabled: true,
disabled: !(this.$store.state.user.superAdmin === 1 || this.$store.state.user.roleIdList.indexOf('运维管理员') !== -1),
exportExcelCondition: '',
token: Cookies.get('ucsToken'),
//
@ -255,7 +254,7 @@ export default {
// date: '',
startDate: '',
endDate: '',
provideDept: '',
provideDept: (this.$store.state.user.superAdmin === 1 || this.$store.state.user.roleIdList.indexOf('运维管理员') !== -1) ? '' : this.$store.state.user.deptId,
applyDept: '',
resourceType: '',
resourceName: '',
@ -304,8 +303,8 @@ export default {
this.dataForm.resourceType = ''
this.dataForm.resourceName = ''
this.dataForm.applyDept = ''
this.dataForm.provideDept = ''
this.dataForm.applyResult = ''
this.dataForm.provideDept = (this.$store.state.user.superAdmin === 1 || this.$store.state.user.roleIdList.indexOf('运维管理员') !== -1) ? '' : this.$store.state.user.deptId
this.dataForm.applyResult = '通过'
this.currentPage = 1
this.init()
}
@ -322,27 +321,27 @@ export default {
this.offerDepartSelects.push({ label: val.name, value: val.id })
})
})
this.$http.get('/sys/user/info').then(res => {
this.dataForm.provideDept = res.data.data.deptId
this.init()
if (res.data.data.superAdmin == 1) {
this.disabled = false
this.dataForm.provideDept = ''
this.init()
return
}
if (res.data.data.roleIdList) {
res.data.data.roleIdList.map(val => {
this.$http.get('/sys/role/' + val).then(res1 => {
if (res1.data.data.name === '运维管理员') {
this.disabled = false
this.dataForm.provideDept = ''
this.init()
}
})
})
}
})
this.init()
// this.$http.get('/sys/user/info').then(res => {
// this.dataForm.provideDept = res.data.data.deptId
// if (res.data.data.superAdmin == 1) {
// this.disabled = false
// this.dataForm.provideDept = ''
// this.init()
// return
// }
// if (res.data.data.roleIdList) {
// res.data.data.roleIdList.map(val => {
// this.$http.get('/sys/role/' + val).then(res1 => {
// if (res1.data.data.name === '') {
// this.disabled = false
// this.dataForm.provideDept = ''
// this.init()
// }
// })
// })
// }
// })
}
}
</script>