diff --git a/back/src/views/main.vue b/back/src/views/main.vue index 4a4c390d..da93162e 100644 --- a/back/src/views/main.vue +++ b/back/src/views/main.vue @@ -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) { diff --git a/back/src/views/modules/ability/IntegratedServices-add.vue b/back/src/views/modules/ability/IntegratedServices-add.vue index 15d9c049..4ef16860 100644 --- a/back/src/views/modules/ability/IntegratedServices-add.vue +++ b/back/src/views/modules/ability/IntegratedServices-add.vue @@ -65,10 +65,23 @@
组合能力
-
- - +
+ +
+
+
+ +
+
+
+ +
+ +
@@ -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) diff --git a/back/src/views/modules/ability/assignedScene/components/ability-add.vue b/back/src/views/modules/ability/assignedScene/components/ability-add.vue index 3a4ff5e8..a806f961 100644 --- a/back/src/views/modules/ability/assignedScene/components/ability-add.vue +++ b/back/src/views/modules/ability/assignedScene/components/ability-add.vue @@ -1,7 +1,6 @@