From cb5eb60b65d27ca8e2cbc43eb9296980fab08267 Mon Sep 17 00:00:00 2001 From: gaoyuanwei <2826352639@qq.com> Date: Mon, 18 Jul 2022 18:29:17 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=90=8E=E5=8F=B0=E6=8C=82=E6=8E=A5-?= =?UTF-8?q?=E5=BD=92=E5=B1=9E=E9=83=A8=E9=97=A8=E7=BB=99=E6=88=91=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E5=87=BA=E6=9D=A5=EF=BC=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../putOnTheShelf/components/inputSelectCheckbox.vue | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/back/src/views/modules/putOnTheShelf/components/inputSelectCheckbox.vue b/back/src/views/modules/putOnTheShelf/components/inputSelectCheckbox.vue index b3b00168..380d7837 100644 --- a/back/src/views/modules/putOnTheShelf/components/inputSelectCheckbox.vue +++ b/back/src/views/modules/putOnTheShelf/components/inputSelectCheckbox.vue @@ -126,12 +126,12 @@ export default { dataList.push(element) }) this.options = dataList - // if (!this.data.note1) { - // this.$http.get('/sys/user/info').then(({ data: res }) => { - // console.log(res.data) - // this.data.note1 = res.data.deptId - // }) - // } + if (!this.data.note1) { + this.$http.get('/sys/user/info').then(({ data: res }) => { + console.log(res.data) + this.data.note1 = res.data.deptId + }) + } }) } else if (this.data.name === '部门联系人') { // this.$http.get('/sys/dept/all').then(res => { From 209183ec29b47fb48948a1bd379760c95b453e06 Mon Sep 17 00:00:00 2001 From: wuhongjian Date: Mon, 18 Jul 2022 18:43:53 +0800 Subject: [PATCH 2/3] ignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 6c82c9ed..95d963eb 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ back/dist-市局-后台管理.zip back/dist-市局-后台管理-v0.8.2.1.zip front/public/index.html back/dist-西海岸-后台管理-v0.8.2.1.zip +back/dist-市局-后台管理-v0.8.2.3.zip From 23a577a544ab2549f65b70cc028ce37e8fe0e1b7 Mon Sep 17 00:00:00 2001 From: "851673013@qq.com" <851673013@qq.com> Date: Mon, 18 Jul 2022 18:53:04 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E7=BB=84=E4=BB=B6=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E6=8C=82=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/modules/ability/bsabilityai.vue | 243 +++++++++++++----- 1 file changed, 178 insertions(+), 65 deletions(-) diff --git a/back/src/views/modules/ability/bsabilityai.vue b/back/src/views/modules/ability/bsabilityai.vue index c7a467c4..33431d58 100644 --- a/back/src/views/modules/ability/bsabilityai.vue +++ b/back/src/views/modules/ability/bsabilityai.vue @@ -11,12 +11,12 @@ {{ - $t("query") + $t('query') }} {{ - $t("export") + $t('export') }} - 上架 @@ -39,7 +37,7 @@ v-if="$hasPermission('ability:bsabilityai:delete')" type="danger" @click="deleteHandle2()" - >{{ $t("deleteBatch") }}{{ $t('deleteBatch') }} @@ -78,7 +76,7 @@ align="center" > {{ $t("update") }}{{ $t('update') }} {{ $t("delete") }}{{ $t('delete') }} 展示开发文档 - 关联应用 + 关联应用 @@ -146,33 +149,48 @@ ref="addOrUpdate" @refreshDataList="getDataList" > - + + :close-on-click-modal="false" + :close-on-press-escape="false" + :before-close="clear" + width="30%" + > 智能算法 图层服务 开发组件 业务组件 取 消 - 确 定 + 确 定 - + :close-on-click-modal="false" + :close-on-press-escape="false" + :destroy-on-close="true" + :before-close="clear" + width="50%" + > + 取 消 确 定 @@ -281,6 +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 + }) console.log('this.dataList', this.dataList) this.total = this.mixinViewModuleOptions.getDataListIsPage ? res.data.total @@ -353,6 +384,19 @@ export default { this.mixinViewModuleOptions.requestCallback(res.data) } this.dataListLoading = false + 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 + }) } else { this.$message.error('未查询到相关信息') this.reset() @@ -378,16 +422,21 @@ export default { }, // 点击关联应用按钮 showRelateApplication (row) { - this.$http.get(`dataResourceRel/queryApplicationRelByResourceId?referenceId=${row.id}`).then(({ data: res }) => { - if (res && res.data) { - this.relateApplicationVisible = true - this.relateInfo = { - id: row.id, - responseData: res.data, - linkType: '2' + this.$http + .get( + `dataResourceRel/queryApplicationRelByResourceId?referenceId=${row.id}` + ) + .then(({ data: res }) => { + if (res && res.data) { + this.relateApplicationVisible = true + this.relateInfo = { + id: row.id, + responseData: res.data, + linkType: '2' + } } - } - }).catch(() => { }) + }) + .catch(() => {}) }, // 是否展示关联应用弹窗 handleIsShowRelatePopup (type) { @@ -417,30 +466,44 @@ export default { }, showPutOnTheShelf () { this.showPutOnTheShelfFlag = true - this.$http.get('/category/getCategoryTree').then(res => { - this.insertList = res.data.data.filter(item => item.name === '组件服务一')[0] + this.$http.get('/category/getCategoryTree').then((res) => { + this.insertList = res.data.data.filter( + (item) => item.name === '组件服务一' + )[0] }) }, showPutOnTheShelfVue () { this.showPutOnTheShelfFlag = false this.showPutOnTheShelfFlag2 = true this.submitFrom.infoList[0].attrValue = this.radio - this.putOnTheShelfList = this.insertList.children.filter(item => item.name === this.radio)[0].children + this.putOnTheShelfList = this.insertList.children.filter( + (item) => item.name === this.radio + )[0].children }, changeInfoList (obj) { console.log(obj, this.submitFrom) - this.submitFrom.infoList = this.submitFrom.infoList.filter((item) => item.attrType !== obj.attrType) + this.submitFrom.infoList = this.submitFrom.infoList.filter( + (item) => item.attrType !== obj.attrType + ) this.submitFrom.infoList.push(obj) }, submitData () { console.log('提交11111111111===============>', this.putOnTheShelfList) const arr = [] - this.putOnTheShelfList.map(item => { - item.children.map(child => { + this.putOnTheShelfList.map((item) => { + item.children.map((child) => { if (child.children) { - if (child.name === '算法优势' || child.name === '应用场景' || child.name === '功能介绍') { + if ( + child.name === '算法优势' || + child.name === '应用场景' || + child.name === '功能介绍' + ) { arr.push(child.name) - if (this.submitFrom.infoList.filter(value => value.attrType === child.name).length === 0) { + if ( + this.submitFrom.infoList.filter( + (value) => value.attrType === child.name + ).length === 0 + ) { this.submitFrom.infoList.push({ attrType: child.name, attrValue: child.note1, @@ -448,10 +511,18 @@ export default { }) } } - child.children.map(val => { + child.children.map((val) => { arr.push(val.name) - if (val.type === 'input' || val.type === 'textArea' || val.type === 'select' || val.type === 'checkBox' || val.type === 'radio') { - this.submitFrom.infoList = this.submitFrom.infoList.filter((item) => item.attrType !== val.name) + if ( + val.type === 'input' || + val.type === 'textArea' || + val.type === 'select' || + val.type === 'checkBox' || + val.type === 'radio' + ) { + this.submitFrom.infoList = this.submitFrom.infoList.filter( + (item) => item.attrType !== val.name + ) } if (val.note1) { switch (val.name) { @@ -495,14 +566,22 @@ export default { this.submitFrom.type = val.note1 break default: - if (val.type !== 'image' && val.type !== 'file' && val.type !== 'video') { + if ( + val.type !== 'image' && + val.type !== 'file' && + val.type !== 'video' + ) { this.submitFrom.infoList.push({ attrType: val.name, attrValue: val.note1, delFlag: 0 }) } else { - if (this.submitFrom.infoList.filter(value => value.attrType === val.name).length === 0) { + if ( + this.submitFrom.infoList.filter( + (value) => value.attrType === val.name + ).length === 0 + ) { this.submitFrom.infoList.push({ attrType: val.name, attrValue: val.note1, @@ -518,10 +597,12 @@ export default { } }) }) - this.submitFrom.infoList = this.submitFrom.infoList.sort((a, b) => arr.indexOf(a.attrType) - arr.indexOf(b.attrType)) + this.submitFrom.infoList = this.submitFrom.infoList.sort( + (a, b) => arr.indexOf(a.attrType) - arr.indexOf(b.attrType) + ) if (this.submitFrom.id) { // 解决编辑无组件类型 - this.submitFrom.infoList.map(val => { + this.submitFrom.infoList.map((val) => { if (val.attrType === '组件类型') { val.attrValue = this.radio } @@ -529,11 +610,18 @@ export default { console.log('编辑===============>', this.submitFrom) console.log(this.submitFrom.infoList, '===============abc') // 去重 - const newArr = this.submitFrom.infoList.filter((element, index, self) => { - return self.findIndex(x => x.attrType === element.attrType) === index - }) + const newArr = this.submitFrom.infoList.filter( + (element, index, self) => { + return ( + self.findIndex((x) => x.attrType === element.attrType) === index + ) + } + ) this.submitFrom.infoList = newArr - console.log(this.submitFrom.infoList, '====================================wpwpwp') + console.log( + this.submitFrom.infoList, + '====================================wpwpwp' + ) this.$http .put('/resource/update', this.submitFrom) .then(({ data: res }) => { @@ -561,22 +649,39 @@ export default { }, // 新修改 UpdateData (item) { - this.$http.get('/category/getCategoryTree').then(res => { - this.insertList = res.data.data.filter(item => item.name === '组件服务一')[0] - this.radio = item.infoList.filter(val => val.attrType === '组件类型')[0].attrValue - this.putOnTheShelfList = this.insertList.children.filter(item => item.name === this.radio)[0].children - this.putOnTheShelfList.map(parent => { - parent.children.map(child => { - if (child.name === '算法优势' || child.name === '应用场景' || child.name === '功能介绍') { - const obj = item.infoList.filter(val => val.attrType === child.name)[0] + this.$http.get('/category/getCategoryTree').then((res) => { + this.insertList = res.data.data.filter( + (item) => item.name === '组件服务一' + )[0] + this.radio = item.infoList.filter( + (val) => val.attrType === '组件类型' + )[0].attrValue + this.putOnTheShelfList = this.insertList.children.filter( + (item) => item.name === this.radio + )[0].children + this.putOnTheShelfList.map((parent) => { + parent.children.map((child) => { + if ( + child.name === '算法优势' || + child.name === '应用场景' || + child.name === '功能介绍' + ) { + const obj = item.infoList.filter( + (val) => val.attrType === child.name + )[0] if (obj) { child.note1 = obj.attrValue } } else { if (child.children) { - child.children.map(data => { - if (data.name === '计费标准信息' || data.name === '常见问题') { - const obj = item.infoList.filter(val => val.attrType === child.name)[0] + child.children.map((data) => { + if ( + data.name === '计费标准信息' || + data.name === '常见问题' + ) { + const obj = item.infoList.filter( + (val) => val.attrType === child.name + )[0] if (obj) { data.note1 = obj.attrValue } @@ -623,14 +728,22 @@ export default { break default: // eslint-disable-next-line no-case-declarations - const obj1 = item.infoList.filter(val => val.attrType === data.name)[0] + const obj1 = item.infoList.filter( + (val) => val.attrType === data.name + )[0] if (obj1) { data.note1 = obj1.attrValue } break } - if (data.type === 'image' || data.type === 'file' || data.type === 'video') { - const obj1 = item.infoList.filter(val => val.attrType === data.name)[0] + if ( + data.type === 'image' || + data.type === 'file' || + data.type === 'video' + ) { + const obj1 = item.infoList.filter( + (val) => val.attrType === data.name + )[0] if (obj1) { data.note2 = obj1.note2 }