From d89ae93ae2b27140510ae60b210f2f5f061ccdec Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 8 Nov 2022 15:08:07 +0800 Subject: [PATCH 01/10] =?UTF-8?q?=E8=A7=86=E9=A2=91=E6=92=AD=E6=94=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/src/views/home/infrastructurePage.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/front/src/views/home/infrastructurePage.vue b/front/src/views/home/infrastructurePage.vue index 29e63c13..51214725 100644 --- a/front/src/views/home/infrastructurePage.vue +++ b/front/src/views/home/infrastructurePage.vue @@ -1177,7 +1177,8 @@ getStreamByChannelCode(param).then((res) => { console.log(res) visible.value = true - options.src = res.data.data + //options.src = res.data.data + options.src ="wss://10.134.135.45:6014/proxy/10.10.20.15:559/openUrl/0kIF7La" }) // // 视频测试--勿删 // visible.value = true From a5be25cec41fe42cfbed60ea81e5d7408bf1fdc2 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 8 Nov 2022 16:44:11 +0800 Subject: [PATCH 02/10] =?UTF-8?q?=E8=BF=98=E5=8E=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/src/views/home/infrastructurePage.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/front/src/views/home/infrastructurePage.vue b/front/src/views/home/infrastructurePage.vue index 51214725..6c6972a3 100644 --- a/front/src/views/home/infrastructurePage.vue +++ b/front/src/views/home/infrastructurePage.vue @@ -1177,8 +1177,8 @@ getStreamByChannelCode(param).then((res) => { console.log(res) visible.value = true - //options.src = res.data.data - options.src ="wss://10.134.135.45:6014/proxy/10.10.20.15:559/openUrl/0kIF7La" + options.src = res.data.data + //options.src ="wss://10.134.135.45:6014/proxy/10.10.20.15:559/openUrl/0kIF7La" }) // // 视频测试--勿删 // visible.value = true From 7ba6767cda66a4d94289e3f9e0edcda0527eedc8 Mon Sep 17 00:00:00 2001 From: a0049873 <79py69t9wb@privaterelay.appleid.com> Date: Tue, 8 Nov 2022 17:16:19 +0800 Subject: [PATCH 03/10] =?UTF-8?q?=E8=83=BD=E5=8A=9B=E6=8C=82=E6=8E=A5=20?= =?UTF-8?q?=20=E7=BB=84=E4=BB=B6=E6=9C=8D=E5=8A=A1=20=20=E7=BD=AE=E9=A1=B6?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- back/src/mixins/view-module.js | 251 ++++++++++-------- .../src/views/modules/ability/bsabilityai.vue | 95 ++++--- 2 files changed, 198 insertions(+), 148 deletions(-) diff --git a/back/src/mixins/view-module.js b/back/src/mixins/view-module.js index c92ac8e4..a6a4c534 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,99 +38,132 @@ 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({ - // order: this.order, - // orderField: this.orderField, - // type: '组件服务', - name: '', - page: this.mixinViewModuleOptions.getDataListIsPage ? this.page : null, - limit: this.mixinViewModuleOptions.getDataListIsPage ? this.limit : null, - ...this.dataForm - }) + if (this.mixinViewModuleOptions.getDataListURL !== '/resource/pageWithAttrs') { + this.$http.get( + this.mixinViewModuleOptions.getDataListURL + '?' + qs.stringify({ + // order: this.order, + // orderField: this.orderField, + // type: '组件服务', + name: '', + page: this.mixinViewModuleOptions.getDataListIsPage ? this.page : null, + limit: this.mixinViewModuleOptions.getDataListIsPage ? this.limit : null, + ...this.dataForm + }) - ).then(({ data: res }) => { - if (res.code !== 0) { - this.dataList = [] - this.total = 0 - return this.$message.error(res.msg) - } - this.dataList = this.mixinViewModuleOptions.getDataListIsPage ? res.data.list : res.data - this.dataList.map((item, index) => { - if (this.dataList[index].type != null) { - switch (item.type) { - case 1: this.dataList[index].type = '省'; break - case 2: this.dataList[index].type = '市'; break - case 3: this.dataList[index].type = '区'; break - case 4: this.dataList[index].type = '企业'; break - } + ).then(({ data: res }) => { + if (res.code !== 0) { + this.dataList = [] + this.total = 0 + return this.$message.error(res.msg) } - if (item.children != null) { - item.children.map((item2, index2) => { - switch (item2.type) { - case 1: this.dataList[index].children[index2].type = '省'; break - case 2: this.dataList[index].children[index2].type = '市'; break - case 3: this.dataList[index].children[index2].type = '区'; break - case 4: this.dataList[index].children[index2].type = '企业'; break + this.dataList = this.mixinViewModuleOptions.getDataListIsPage ? res.data.list : res.data + this.dataList.map((item, index) => { + if (this.dataList[index].type != null) { + switch (item.type) { + case 1: this.dataList[index].type = '省'; break + case 2: this.dataList[index].type = '市'; break + case 3: this.dataList[index].type = '区'; break + case 4: this.dataList[index].type = '企业'; break } + } + if (item.children != null) { + item.children.map((item2, index2) => { + switch (item2.type) { + case 1: this.dataList[index].children[index2].type = '省'; break + case 2: this.dataList[index].children[index2].type = '市'; break + case 3: this.dataList[index].children[index2].type = '区'; break + case 4: this.dataList[index].children[index2].type = '企业'; break + } + }) + } + }) + // 我的代办特殊处理 + if (this.mixinViewModuleOptions.getDataListURL === '/act/task/myToDoTaskPage') { + this.$http.get('/sys/user/info').then(userRes => { + console.log('当前用户信息===========>', userRes.data.data.id) + const userId = userRes.data.data.id + // this.dataList = this.dataList.filter(item => { + // // userId creator + // console.log(item.params.creator) + // if (!(item.params.creator === userId) && !(item.params.userId === userId)) { + // return item + // } + // }) + this.total = this.mixinViewModuleOptions.getDataListIsPage ? res.data.total : 0 + }) + } else { + this.total = this.mixinViewModuleOptions.getDataListIsPage ? res.data.total : 0 + } + console.log('数据列表', this.dataList, this.mixinViewModuleOptions.getDataListURL) + 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) + } + this.dataListLoading = false + }).catch(() => { + this.dataListLoading = false }) - // 我的代办特殊处理 - if (this.mixinViewModuleOptions.getDataListURL === '/act/task/myToDoTaskPage') { - this.$http.get('/sys/user/info').then(userRes => { - console.log('当前用户信息===========>', userRes.data.data.id) - const userId = userRes.data.data.id - // this.dataList = this.dataList.filter(item => { - // // userId creator - // console.log(item.params.creator) - // if (!(item.params.creator === userId) && !(item.params.userId === userId)) { - // return item - // } - // }) - this.total = this.mixinViewModuleOptions.getDataListIsPage ? res.data.total : 0 - }) - } else { + } else { + this.$http.post( + this.mixinViewModuleOptions.getDataListURL, { + pageNum: this.mixinViewModuleOptions.getDataListIsPage ? this.page : null, + pageSize: this.mixinViewModuleOptions.getDataListIsPage ? this.limit : null, + ...this.dataForm + } + ).then(({ data: res }) => { + if (res.code !== 0) { + this.dataList = [] + this.total = 0 + return this.$message.error(res.msg) + } + this.dataList = this.mixinViewModuleOptions.getDataListIsPage ? res.data.records : res.data this.total = this.mixinViewModuleOptions.getDataListIsPage ? res.data.total : 0 - } - console.log('数据列表', this.dataList, this.mixinViewModuleOptions.getDataListURL) - 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) - } - this.dataListLoading = false - }).catch(() => { - this.dataListLoading = false - }) + 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) + } + this.dataListLoading = false + }).catch(() => { + this.dataListLoading = false + }) + } }, // 多选 - dataListSelectionChangeHandle(val) { + dataListSelectionChangeHandle (val) { this.dataListSelections = val }, // 排序 - dataListSortChangeHandle(data) { + dataListSortChangeHandle (data) { if (!data.order || !data.prop) { this.order = '' this.orderField = '' @@ -141,13 +174,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() }, @@ -156,7 +189,7 @@ export default { this.query() }, // 新增 - addOrUpdateHandle(id) { + addOrUpdateHandle (id) { this.addOrUpdateVisible = true this.disabled = false this.$nextTick(() => { @@ -167,7 +200,7 @@ export default { }, // 组件服务新增 - addOrUpdateHandleAI(id) { + addOrUpdateHandleAI (id) { // const infoList = [] let showList = [] this.$http.get('category/getCategoryTree').then(({ data: res }) => { @@ -225,7 +258,7 @@ export default { }, 100) }, // 应用资源新增 - addOrUpdateHandleServe(id) { + addOrUpdateHandleServe (id) { // const infoList = [] let showList = [] this.$http.get('category/getCategoryTree').then(({ data: res }) => { @@ -283,7 +316,7 @@ export default { }, 100) }, // 修改 - UpdateHandle(val) { + UpdateHandle (val) { this.addOrUpdateVisible = true this.disabled = false const cloneVal = deepClone(val) @@ -308,7 +341,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) { @@ -320,7 +353,7 @@ export default { } }, // 删除 - deleteHandle(id) { + deleteHandle (id) { if (this.mixinViewModuleOptions.deleteIsBatch && !id && this.dataListSelections.length <= 0) { return this.$message({ message: this.$t('prompt.deleteBatch'), @@ -354,46 +387,46 @@ export default { }).catch(() => { }) }, - deleteHandle2(id) { - if(id==undefined && this.dataListSelections.length < 1){ + deleteHandle2 (id) { + if (id == undefined && this.dataListSelections.length < 1) { this.$message({ type: 'info', message: '请选择要删除的数据' }) - }else{ - this.$confirm('确认是否删除?', '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', - type: 'warning' - }).then(() => { - const ids = [] - if (id) { - ids.push(id) - } else { - if (this.dataListSelections.length > 0) { - this.dataListSelections.forEach(item => { - ids.push(item.id) - }) + } else { + this.$confirm('确认是否删除?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + const ids = [] + if (id) { + ids.push(id) + } else { + if (this.dataListSelections.length > 0) { + this.dataListSelections.forEach(item => { + ids.push(item.id) + }) + } } - } - this.$http.post('/resource/delete', { ids: ids }).then(res => { - console.log('删除成功', res) - this.$message({ - type: 'success', - message: '删除成功!' - }); - this.getDataList() - }) - }).catch(() => { + this.$http.post('/resource/delete', { ids: ids }).then(res => { + console.log('删除成功', res) + this.$message({ + type: 'success', + message: '删除成功!' + }) + this.getDataList() + }) + }).catch(() => { // this.$message({ // type: 'info', // message: '已取消删除' - // }); - }); - } + // }); + }) + } }, // 导出 - 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 12f6a410..782074d6 100644 --- a/back/src/views/modules/ability/bsabilityai.vue +++ b/back/src/views/modules/ability/bsabilityai.vue @@ -130,7 +130,14 @@ >