From 22f1091532fa7be48d08f42524d230198bce08d4 Mon Sep 17 00:00:00 2001
From: "851673013@qq.com" <851673013@qq.com>
Date: Wed, 13 Jul 2022 14:30:32 +0800
Subject: [PATCH] =?UTF-8?q?=E6=88=91=E7=9A=84=E5=BE=85=E5=8A=9E=EF=BC=8C?=
=?UTF-8?q?=E4=B8=8A=E6=9E=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../myAgent/demo/Application-resources.vue | 2 +-
.../myAgent/demo/ResourcesAndServices.vue | 165 ++++++++++++++++++
.../myAgent/demo/ability-resource-shelf.vue | 64 +++----
3 files changed, 198 insertions(+), 33 deletions(-)
create mode 100644 back/src/views/modules/myAgent/demo/ResourcesAndServices.vue
diff --git a/back/src/views/modules/myAgent/demo/Application-resources.vue b/back/src/views/modules/myAgent/demo/Application-resources.vue
index bf310a87..c060a4f5 100644
--- a/back/src/views/modules/myAgent/demo/Application-resources.vue
+++ b/back/src/views/modules/myAgent/demo/Application-resources.vue
@@ -1,5 +1,5 @@
-
+ 22222222222222
+
diff --git a/back/src/views/modules/myAgent/demo/ability-resource-shelf.vue b/back/src/views/modules/myAgent/demo/ability-resource-shelf.vue
index 9581bda4..435dbd6b 100644
--- a/back/src/views/modules/myAgent/demo/ability-resource-shelf.vue
+++ b/back/src/views/modules/myAgent/demo/ability-resource-shelf.vue
@@ -10,7 +10,12 @@
- 22222
+
+
+
import processModule from '@/mixins/process-module'
import Applicationresources from './Application-resources.vue'
+import ResourcesAndServices from './ResourcesAndServices.vue'
export default {
// 注入公共方法
mixins: [processModule],
components: {
- Applicationresources
+ Applicationresources,
+ ResourcesAndServices
},
props: {
// fromList: {
@@ -52,59 +59,48 @@ export default {
},
data () {
return {
+ flagShow: false,
// processVisible: true,
visible: false,
// 表单属性是否可编辑
fieldDisabled: false,
- dataForm: [],
+ dataForm: {},
id: '',
shifoushizujian: true,
coverageNotShow: true,
nameNotShow: false,
- algorithmShow: true
+ algorithmShow: true,
+ insertList: []
}
},
watch: {},
computed: {},
methods: {
+ getInfo (id) {
+ this.$http.get('/resourceMountApply/' + id).then(({ data: res }) => {
+ this.dataForm = res.data.resourceDTO
+ if (this.dataForm) {
+ console.log('this.dataForm', this.dataForm)
+ this.flagShow = true
+ }
+ })
+ },
+ methodsThree () {
+ this.$http.get('/category/getCategoryTree').then((res) => {
+ this.insertList = res.data.data
+ })
+ },
init () {
this.visible = true
- // this.getInfo(this.$router.currentRoute.params.params.params.resourceDTO.id)
- // this.dataForm = this.$router.currentRoute.params.params.params.resourceDTO
- // this.id=this.$router.currentRoute
this.$nextTick(() => {
this.$refs.dataForm.resetFields()
// if (this.dataForm.id) {
// 如业务KEY已存在,不允许编辑
this.fieldDisabled = true
// this.id = this.$router.currentRoute.businessKey
- this.getInfo(this.$router.currentRoute.params.businessKey)
console.log('id', this.$router.currentRoute.params.businessKey)
// }
})
- },
- getInfo (id) {
- this.$http.get('/resourceMountApply/' + id).then(({ data: res }) => {
- if (res.code !== 0) {
- return this.$message.error(res.msg)
- }
- this.dataForm = res.data.resourceDTO
- if (this.dataForm.type != '应用资源') {
- this.shifoushizujian = false
- this.dataForm.infoList.forEach((val) => {
- if (val.attrValue === '图层服务') {
- this.coverageNotShow = false
- } else if (val.attrValue === '智能算法') {
- this.nameNotShow = true
- this.algorithmShow = false
- console.log(this.nameNotShow, 'wowowo')
- }
- })
- } else {
- this.shifoushizujian = true
- }
- console.log('this.dataForm', this.dataForm)
- })
}
},
created () {
@@ -123,7 +119,11 @@ export default {
// 初始化综合组件
this.initProcessMultiple(callbacks)
},
- mounted () {}
+ mounted () {
+ const businessKey = this.$router.currentRoute.params.businessKey
+ this.getInfo(businessKey)
+ this.methodsThree()
+ }
}