From 29a50165901facebecf4e409741e5dbf0720c996 Mon Sep 17 00:00:00 2001 From: gaoyuanwei <2826352639@qq.com> Date: Wed, 20 Jul 2022 15:04:52 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=84=E4=BB=B6=E6=9C=8D=E5=8A=A1-=E6=8C=82?= =?UTF-8?q?=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- back/src/mixins/view-module.js | 42 +++++++++---------- .../src/views/modules/ability/bsabilityai.vue | 26 ++++++------ 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/back/src/mixins/view-module.js b/back/src/mixins/view-module.js index b7b8b33e..ae6c7a55 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,11 @@ 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.infoList = val.infoList.filter(item => item.attrType === '部署位置' || item.attrType === '组件类型' || item.attrType === '应用领域') + // }) + // } if (this.mixinViewModuleOptions.requestCallback) { this.mixinViewModuleOptions.requestCallback(res.data) } @@ -123,11 +123,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 +138,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 +153,7 @@ export default { this.query() }, // 新增 - addOrUpdateHandle (id) { + addOrUpdateHandle(id) { this.addOrUpdateVisible = true this.disabled = false this.$nextTick(() => { @@ -164,7 +164,7 @@ export default { }, // 组件服务新增 - addOrUpdateHandleAI (id) { + addOrUpdateHandleAI(id) { // const infoList = [] let showList = [] this.$http.get('category/getCategoryTree').then(({ data: res }) => { @@ -222,7 +222,7 @@ export default { }, 100) }, // 应用资源新增 - addOrUpdateHandleServe (id) { + addOrUpdateHandleServe(id) { // const infoList = [] let showList = [] this.$http.get('category/getCategoryTree').then(({ data: res }) => { @@ -280,7 +280,7 @@ export default { }, 100) }, // 修改 - UpdateHandle (val) { + UpdateHandle(val) { this.addOrUpdateVisible = true this.disabled = false const cloneVal = deepClone(val) @@ -305,7 +305,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 +317,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 +351,7 @@ export default { }).catch(() => { }) }, - deleteHandle2 (id) { + deleteHandle2(id) { console.log('删除========================》', id, this.dataListSelections) const ids = [] if (id) { @@ -369,7 +369,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 7bdba7a9..a24ba9dc 100644 --- a/back/src/views/modules/ability/bsabilityai.vue +++ b/back/src/views/modules/ability/bsabilityai.vue @@ -299,19 +299,19 @@ export default { this.dataList = this.mixinViewModuleOptions.getDataListIsPage ? res.data.list : res.data - this.dataList.map((item, index) => { - const dataListSinforList = [] - item.infoList.map((itemson, indexson) => { - if ( - itemson.attrType === '部署位置' || - itemson.attrType === '组件类型' || - itemson.attrType === '应用领域' - ) { - dataListSinforList.push(itemson) - } - }) - this.dataList[index].infoList = dataListSinforList - }) + // this.dataList.map((item, index) => { + // const dataListSinforList = [] + // item.infoList.map((itemson, indexson) => { + // if ( + // itemson.attrType === '部署位置' || + // itemson.attrType === '组件类型' || + // itemson.attrType === '应用领域' + // ) { + // dataListSinforList.push(itemson) + // } + // }) + // this.dataList[index].infoList = dataListSinforList + // }) console.log('this.dataList', this.dataList) this.total = this.mixinViewModuleOptions.getDataListIsPage ? res.data.total