From b7fd109210a38fda24fbaf760896197b7c96c973 Mon Sep 17 00:00:00 2001 From: a0049873 <79py69t9wb@privaterelay.appleid.com> Date: Mon, 25 Jul 2022 17:07:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8E=E5=8F=B0=E6=8C=82=E8=BD=BD=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=BF=85=E5=A1=AB=E5=AD=97=E6=AE=B5=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C=EF=BC=8C=E5=88=97=E8=A1=A8=E6=8C=89=E5=BF=85=E5=A1=AB?= =?UTF-8?q?=E8=BF=9B=E8=A1=8C=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- back/src/mixins/view-module.js | 46 ++-- .../src/views/modules/ability/bsabilityai.vue | 240 ++++++++++++------ .../modules/ability/bsabilityservice.vue | 167 +++++++++--- .../components/inputSelectCheckbox.vue | 28 +- .../putOnTheShelf/components/special.vue | 26 +- .../src/views/modules/putOnTheShelf/index.vue | 73 ++++-- 6 files changed, 428 insertions(+), 152 deletions(-) diff --git a/back/src/mixins/view-module.js b/back/src/mixins/view-module.js index ae6c7a55..98b075fb 100644 --- a/back/src/mixins/view-module.js +++ b/back/src/mixins/view-module.js @@ -2,7 +2,7 @@ import Cookies from 'js-cookie' import qs from 'qs' import { deepClone } from '@/utils/form-generator/index' export default { - data() { + data () { /* eslint-disable */ return { // 设置属性 @@ -38,19 +38,19 @@ export default { } /* eslint-enable */ }, - created() { + created () { if (this.mixinViewModuleOptions.createdIsNeed) { this.query() } }, - activated() { + activated () { if (this.mixinViewModuleOptions.activatedIsNeed) { this.query() } }, methods: { // 获取数据列表 - query() { + query () { this.dataListLoading = true this.$http.get( this.mixinViewModuleOptions.getDataListURL + '?' + qs.stringify({ @@ -109,11 +109,15 @@ export default { } console.log('数据列表', this.dataList, this.mixinViewModuleOptions.getDataListURL) - // if (this.dataList[0].type === '组件服务') { - // this.dataList.map(val => { - // val.infoList = val.infoList.filter(item => item.attrType === '部署位置' || item.attrType === '组件类型' || item.attrType === '应用领域') - // }) - // } + if (this.dataList[0].type === '组件服务') { + this.dataList.map(val => { + val.infoList2 = val.infoList.filter(item => item.attrType === '应用领域' || item.attrType === '组件类型') + }) + } else if (this.dataList[0].type === '应用资源') { + this.dataList.map(val => { + val.infoList2 = val.infoList.filter(item => item.attrType === '应用领域') + }) + } if (this.mixinViewModuleOptions.requestCallback) { this.mixinViewModuleOptions.requestCallback(res.data) } @@ -123,11 +127,11 @@ export default { }) }, // 多选 - dataListSelectionChangeHandle(val) { + dataListSelectionChangeHandle (val) { this.dataListSelections = val }, // 排序 - dataListSortChangeHandle(data) { + dataListSortChangeHandle (data) { if (!data.order || !data.prop) { this.order = '' this.orderField = '' @@ -138,13 +142,13 @@ export default { this.query() }, // 分页, 每页条数 - pageSizeChangeHandle(val) { + pageSizeChangeHandle (val) { this.page = 1 this.limit = val this.query() }, // 分页, 当前页 - pageCurrentChangeHandle(val) { + pageCurrentChangeHandle (val) { this.page = val this.query() }, @@ -153,7 +157,7 @@ export default { this.query() }, // 新增 - addOrUpdateHandle(id) { + addOrUpdateHandle (id) { this.addOrUpdateVisible = true this.disabled = false this.$nextTick(() => { @@ -164,7 +168,7 @@ export default { }, // 组件服务新增 - addOrUpdateHandleAI(id) { + addOrUpdateHandleAI (id) { // const infoList = [] let showList = [] this.$http.get('category/getCategoryTree').then(({ data: res }) => { @@ -222,7 +226,7 @@ export default { }, 100) }, // 应用资源新增 - addOrUpdateHandleServe(id) { + addOrUpdateHandleServe (id) { // const infoList = [] let showList = [] this.$http.get('category/getCategoryTree').then(({ data: res }) => { @@ -280,7 +284,7 @@ export default { }, 100) }, // 修改 - UpdateHandle(val) { + UpdateHandle (val) { this.addOrUpdateVisible = true this.disabled = false const cloneVal = deepClone(val) @@ -305,7 +309,7 @@ export default { }) }, // 关闭当前窗口 - closeCurrentTab(data) { + closeCurrentTab (data) { var tabName = this.$store.state.contentTabsActiveName this.$store.state.contentTabs = this.$store.state.contentTabs.filter(item => item.name !== tabName) if (this.$store.state.contentTabs.length <= 0) { @@ -317,7 +321,7 @@ export default { } }, // 删除 - deleteHandle(id) { + deleteHandle (id) { if (this.mixinViewModuleOptions.deleteIsBatch && !id && this.dataListSelections.length <= 0) { return this.$message({ message: this.$t('prompt.deleteBatch'), @@ -351,7 +355,7 @@ export default { }).catch(() => { }) }, - deleteHandle2(id) { + deleteHandle2 (id) { console.log('删除========================》', id, this.dataListSelections) const ids = [] if (id) { @@ -369,7 +373,7 @@ export default { }) }, // 导出 - exportHandle() { + exportHandle () { var params = qs.stringify({ token: Cookies.get('ucsToken'), ...this.dataForm diff --git a/back/src/views/modules/ability/bsabilityai.vue b/back/src/views/modules/ability/bsabilityai.vue index 0cf6f430..b294ff86 100644 --- a/back/src/views/modules/ability/bsabilityai.vue +++ b/back/src/views/modules/ability/bsabilityai.vue @@ -66,6 +66,38 @@ header-align="center" align="center" > + + + + -