diff --git a/back/src/views/modules/myAgent/demo/Application-resources.vue b/back/src/views/modules/myAgent/demo/Application-resources.vue new file mode 100644 index 00000000..c060a4f5 --- /dev/null +++ b/back/src/views/modules/myAgent/demo/Application-resources.vue @@ -0,0 +1,22 @@ + + + + diff --git a/back/src/views/modules/myAgent/demo/ResourcesAndServices.vue b/back/src/views/modules/myAgent/demo/ResourcesAndServices.vue new file mode 100644 index 00000000..224c6d96 --- /dev/null +++ b/back/src/views/modules/myAgent/demo/ResourcesAndServices.vue @@ -0,0 +1,165 @@ + + + + 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 5681064c..435dbd6b 100644 --- a/back/src/views/modules/myAgent/demo/ability-resource-shelf.vue +++ b/back/src/views/modules/myAgent/demo/ability-resource-shelf.vue @@ -8,150 +8,14 @@ :label-width="$i18n.locale === 'en-US' ? '120px' : 'auto'" >
- - - - - - - - - - - - - - - - - - - - - - - +
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
+
- - - import processModule from '@/mixins/process-module' +import Applicationresources from './Application-resources.vue' +import ResourcesAndServices from './ResourcesAndServices.vue' export default { // 注入公共方法 mixins: [processModule], - components: {}, + components: { + Applicationresources, + ResourcesAndServices + }, props: { // fromList: { // // type: Array, @@ -190,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 () { @@ -261,7 +119,11 @@ export default { // 初始化综合组件 this.initProcessMultiple(callbacks) }, - mounted () {} + mounted () { + const businessKey = this.$router.currentRoute.params.businessKey + this.getInfo(businessKey) + this.methodsThree() + } }