From 0f6b37e52e686c4a81f82419d65ee6940ad1b25e Mon Sep 17 00:00:00 2001 From: a0049873 <79py69t9wb@privaterelay.appleid.com> Date: Thu, 30 Jun 2022 15:27:16 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E6=91=84=E5=83=8F=E5=A4=B4=E7=94=B3?= =?UTF-8?q?=E8=AF=B7=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/public/static/config/location.js | 6 +- front/src/views/home/AbilityToApplyFor.vue | 14 +- front/src/views/home/apply.vue | 123 +++++++----------- front/src/views/home/infrastructurePage.vue | 76 ++++++++++- .../components/PurchaseVehicle.vue | 62 +++++---- 5 files changed, 163 insertions(+), 118 deletions(-) diff --git a/front/public/static/config/location.js b/front/public/static/config/location.js index 688a983f..b63b09da 100644 --- a/front/public/static/config/location.js +++ b/front/public/static/config/location.js @@ -2,7 +2,7 @@ * @Author: hisense.wuhongjian * @Date: 2020-07-07 16:03:23 * @LastEditors: hisense.liangjunhua - * @LastEditTime: 2022-06-27 14:22:56 + * @LastEditTime: 2022-06-30 11:05:52 * @Description: 数据资源参数配置 */ const newLocation = 'qingdao' @@ -14,6 +14,8 @@ const whoShow = {} const launchedDataNumObject = {} // 导航数据 const navListManagement = {} +// 基础设施 +const infrastructure = {} // 区市站点数据 const mapTestNum = {} // 底部数据 @@ -21,6 +23,8 @@ const footerDataList = {} // qingdao if (newLocation === 'qingdao') { whoShow.itShowQingDao = true + infrastructure.deptName = '青岛市大数据发展管理局' + infrastructure.deptId = '1067246875800000066' navListManagement.navList = [ { name: '共享门户', key: 'home' }, { name: '能力集市', key: 'DetailsPageconetent' }, diff --git a/front/src/views/home/AbilityToApplyFor.vue b/front/src/views/home/AbilityToApplyFor.vue index ec68b65f..af0309ac 100644 --- a/front/src/views/home/AbilityToApplyFor.vue +++ b/front/src/views/home/AbilityToApplyFor.vue @@ -16,7 +16,17 @@ {{ val.resourceName }} {{ val.type }} -
已选 - {{ allClick.length }} + {{ selectedRowKeys.length }} 个
@@ -86,7 +86,9 @@ @change="handleTableChange" :row-selection="{ selectedRowKeys: selectedRowKeys, - onChange: onSelectChange, + // onChange: onSelectChange, + onSelect: onSelectChange, + onSelectAll: onSelectAll, }" > @@ -115,6 +117,7 @@ import VideoSurveillance from '@/views/home/videoSurveillance' import { getCategoryTreePage } from '@/api/personalCenter' import { dataType } from 'element-plus/es/components/table-v2/src/common' + import { useRouter } from 'vue-router' import { ref, reactive, onMounted } from 'vue' import { getCameraByParentId, @@ -124,6 +127,7 @@ import { sgcInsert } from '@/api/home' import { message } from 'ant-design-vue' import mybus from '@/myplugins/mybus' + const router = useRouter() const options = reactive({ width: '700px', //播放器宽度 height: '400px', //播放器高度 @@ -189,6 +193,7 @@ }) }) const selectedList = ref([]) + const selectedRowKeys = ref([]) const tabList = ref([ { title: '设施类型', @@ -317,8 +322,35 @@ getCamera() } // 一键申请 + const dept = reactive({}) + // eslint-disable-next-line no-undef + if (infrastructure) { + // eslint-disable-next-line no-undef + dept.deptId = infrastructure.deptId + // eslint-disable-next-line no-undef + dept.deptName = infrastructure.deptName + } const apply = () => { - console.log('一键申请') + console.log('一键申请', selectedList.value) + let arr = [ + { + arr: [ + { + description: '', + note1: JSON.stringify(selectedList.value), + resourceId: '1522550195055828996', + resourceName: '摄像头列表', + type: '基础设施', + }, + ], + deptId: dept.deptId, + deptName: dept.deptName, + }, + ] + localStorage.setItem('applyList', JSON.stringify(arr)) + router.push({ + path: '/apply', + }) } // 添加至购物车 const addShopCar = () => { @@ -367,11 +399,43 @@ }, ]) const allClick = ref([]) - const onSelectChange = (selectedRowKeys, selectedRows) => { - console.log('hahhahah', selectedRowKeys, selectedRows) - selectedList.value = selectedRows + const onSelectChange = (record, selected, selectedRows, nativeEvent) => { + console.log('hahhahah', record, selected, selectedRows, nativeEvent) + if (selected) { + selectedList.value.push(record) + selectedRowKeys.value.push(record.channelCode) + } else { + selectedList.value = selectedList.value.filter( + (item) => item.idtCameraChannel !== record.idtCameraChannel + ) + selectedRowKeys.value.splice( + selectedRowKeys.value.indexOf(record.channelCode), + 1 + ) + } + console.log('已选中======================>', selectedList.value) + // selectedList.value = selectedRows // allClick.value = selectedRowKeys } + const onSelectAll = (selected, selectedRows, changeRows) => { + if (selected) { + changeRows.map((val) => { + selectedList.value.push(val) + selectedRowKeys.value.push(val.channelCode) + }) + } else { + changeRows.map((val) => { + selectedList.value = selectedList.value.filter( + (item) => item.idtCameraChannel !== val.idtCameraChannel + ) + selectedRowKeys.value.splice( + selectedRowKeys.value.indexOf(val.channelCode), + 1 + ) + }) + } + console.log('heiheiheiehiehei', selected, selectedRows, changeRows) + } const handleTableChange = (val) => { pagination.value.current = val.current pagination.value.pageSize = val.pageSize diff --git a/front/src/views/personalCenter/components/PurchaseVehicle.vue b/front/src/views/personalCenter/components/PurchaseVehicle.vue index 0b313667..f7496e40 100644 --- a/front/src/views/personalCenter/components/PurchaseVehicle.vue +++ b/front/src/views/personalCenter/components/PurchaseVehicle.vue @@ -4,7 +4,7 @@
已选:
{{ checkedListAbility.length || 0 }}
@@ -108,9 +108,7 @@
>
@@ -241,7 +239,7 @@
list.value.forEach((val) => {
if (checkedList.value.indexOf(val.deptId) !== -1) {
if (val.delFlag == 0) {
- scArr.push({ resourceId: val.resourceId })
+ scArr.push({ id: val.id })
}
}
})
@@ -267,9 +265,9 @@
}
if (val.children.length > 0) {
val.children.map((item) => {
- if (checkedListAbility.value.indexOf(item.resourceId) == -1) {
- checkedListAbility.value.push(item.resourceId)
- val.checkedList.push(item.resourceId)
+ if (checkedListAbility.value.indexOf(item.id) == -1) {
+ checkedListAbility.value.push(item.id)
+ val.checkedList.push(item.id)
checkNum.value++
}
item.checked = true
@@ -301,13 +299,13 @@
if (val.children.length > 0) {
val.children.map((item) => {
// console.log('child=============>', checkedListAbility.value, item)
- if (checkedListAbility.value.indexOf(item.resourceId) > -1) {
+ if (checkedListAbility.value.indexOf(item.id) > -1) {
item.checked = false
checkedListAbility.value.splice(
- checkedListAbility.value.indexOf(item.resourceId),
+ checkedListAbility.value.indexOf(item.id),
1
)
- val.checkedList.splice(val.checkedList.indexOf(item.resourceId), 1)
+ val.checkedList.splice(val.checkedList.indexOf(item.id), 1)
}
})
}
@@ -347,8 +345,8 @@
if (val.children.length > 0) {
val.children.map((item) => {
item.checked = true
- checkedListAbility.value.push(item.resourceId)
- val.checkedList.push(item.resourceId)
+ checkedListAbility.value.push(item.id)
+ val.checkedList.push(item.id)
})
}
arr.push(val.deptId)
@@ -446,23 +444,23 @@
item.checkAll == true ||
checkedList.value.indexOf(item.deptId) > -1
) {
- if (checkedListAbility.value.indexOf(val.resourceId) == -1) {
- checkedListAbility.value.push(val.resourceId)
- item.checkedList.push(val.resourceId)
+ if (checkedListAbility.value.indexOf(val.id) == -1) {
+ checkedListAbility.value.push(val.id)
+ item.checkedList.push(val.id)
}
val.checked = true
checkNum.value++
- } else if (checkedListAbility.value.indexOf(val.resourceId) == -1) {
+ } else if (checkedListAbility.value.indexOf(val.id) == -1) {
val.checked = false
}
} else {
// console.log(
// '第二次加载++++++++++++++',
// checkedListAbility.value,
- // val.resourceId
+ // val.id
// )
if (
- checkedListAbility.value.indexOf(val.resourceId) > -1 ||
+ checkedListAbility.value.indexOf(val.id) > -1 ||
(item.load < Number(item.pageNum) &&
checkedListAll.value.indexOf(item.deptId) > -1)
) {
@@ -515,9 +513,9 @@
if (item.checked) {
if (item.children.length > 0) {
item.children.map((val) => {
- if (checkedListAbility.value.indexOf(val.resourceId) == -1) {
- checkedListAbility.value.push(val.resourceId)
- item.checkedList.push(val.resourceId)
+ if (checkedListAbility.value.indexOf(val.id) == -1) {
+ checkedListAbility.value.push(val.id)
+ item.checkedList.push(val.id)
}
val.checked = true
})
@@ -535,12 +533,12 @@
} else {
if (item.children.length > 0) {
item.children.map((val) => {
- if (checkedListAbility.value.indexOf(val.resourceId) > -1) {
+ if (checkedListAbility.value.indexOf(val.id) > -1) {
checkedListAbility.value.splice(
- checkedListAbility.value.indexOf(val.resourceId),
+ checkedListAbility.value.indexOf(val.id),
1
)
- item.checkedList.splice(item.checkedList.indexOf(val.resourceId), 1)
+ item.checkedList.splice(item.checkedList.indexOf(val.id), 1)
val.checked = false
}
})
@@ -579,7 +577,7 @@
} else {
let all = true
item.children.map((child) => {
- if (checkedListAbility.value.indexOf(child.resourceId) == -1) {
+ if (checkedListAbility.value.indexOf(child.id) == -1) {
all = false
}
})
@@ -596,17 +594,17 @@
item.checked = !item.checked
if (item.checked) {
checkNum.value++
- if (checkedListAbility.value.indexOf(item.resourceId) == -1) {
- checkedListAbility.value.push(item.resourceId)
- val.checkedList.push(item.resourceId)
+ if (checkedListAbility.value.indexOf(item.id) == -1) {
+ checkedListAbility.value.push(item.id)
+ val.checkedList.push(item.id)
}
} else {
checkNum.value--
checkedListAbility.value.splice(
- checkedListAbility.value.indexOf(item.resourceId),
+ checkedListAbility.value.indexOf(item.id),
1
)
- val.checkedList.splice(val.checkedList.indexOf(item.resourceId), 1)
+ val.checkedList.splice(val.checkedList.indexOf(item.id), 1)
}
// console.log('判断是否全选===============>', val, checkedListAll.value)
if (val.checkedList.length == val.count) {
@@ -681,7 +679,7 @@
let arr = []
list.value.map((val) => {
val.arr = val.children.filter(
- (item) => checkedListAbility.value.indexOf(item.resourceId) > -1
+ (item) => checkedListAbility.value.indexOf(item.id) > -1
)
})
arr = list.value.filter((val) => val.arr.length !== 0)
From c6c820c827eb590eafa9f076610a62ce87ddbc8c Mon Sep 17 00:00:00 2001
From: gaoyuanwei <2826352639@qq.com>
Date: Thu, 30 Jun 2022 15:35:49 +0800
Subject: [PATCH 2/5] =?UTF-8?q?331-=E5=BC=80=E5=8F=91=E7=BB=84=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Business/BusinessNavigation.vue | 11 ++--
.../components/Business/BusinessUsageMode.vue | 4 ++
.../Developer/DeveloperTopDetails.vue | 62 +++++++++----------
3 files changed, 42 insertions(+), 35 deletions(-)
diff --git a/front/src/views/detailsAll/components/Business/BusinessNavigation.vue b/front/src/views/detailsAll/components/Business/BusinessNavigation.vue
index 2c48888b..5b39f705 100644
--- a/front/src/views/detailsAll/components/Business/BusinessNavigation.vue
+++ b/front/src/views/detailsAll/components/Business/BusinessNavigation.vue
@@ -28,18 +28,19 @@
name: '组件展示',
key: 'business-presentation',
},
+ {
+ name: '关联能力',
+ key: 'business-associated-ability',
+ },
{
name: '功能介绍',
key: 'function-introduction',
},
+
{
name: '应用场景',
key: 'application-scenarios',
},
- {
- name: '关联能力',
- key: 'business-associated-ability',
- },
{
name: '应用案例',
key: 'application-case',
@@ -68,6 +69,7 @@
list.value = []
let arr = [
'组件视频介绍',
+ '关联能力',
'功能介绍',
'应用场景',
'应用案例',
@@ -117,6 +119,7 @@
list.value = []
let arr = [
'组件视频介绍',
+ '关联能力',
'功能介绍',
'应用场景',
'应用案例',
diff --git a/front/src/views/detailsAll/components/Business/BusinessUsageMode.vue b/front/src/views/detailsAll/components/Business/BusinessUsageMode.vue
index 1b698174..c4ceef11 100644
--- a/front/src/views/detailsAll/components/Business/BusinessUsageMode.vue
+++ b/front/src/views/detailsAll/components/Business/BusinessUsageMode.vue
@@ -115,6 +115,8 @@
// eslint-disable-next-line vue/no-setup-props-destructure
dataFrom.value.content[0].link.value = props.dataList.apiUrl
dataFrom.value.content[0].facilitator.value = props.dataList.deptContacts
+ dataFrom.value.content[0].people.value = props.dataList.deptContacts
+ dataFrom.value.content[0].phone.value = props.dataList.deptPhone
console.log('dataList', props.dataList)
props.dataList.infoList.map((item) => {
if (item.attrType === '组件地址') {
@@ -139,6 +141,8 @@
} else {
dataFrom.value.content[0].link.value = val.apiUrl
dataFrom.value.content[0].facilitator.value = val.deptContacts
+ dataFrom.value.content[0].people.value = val.deptContacts
+ dataFrom.value.content[0].phone.value = val.deptPhone
console.log('dataList', val)
val.infoList.map((item) => {
if (item.attrType === '组件地址') {
diff --git a/front/src/views/detailsAll/components/Developer/DeveloperTopDetails.vue b/front/src/views/detailsAll/components/Developer/DeveloperTopDetails.vue
index 2fc2e974..4eeea3ba 100644
--- a/front/src/views/detailsAll/components/Developer/DeveloperTopDetails.vue
+++ b/front/src/views/detailsAll/components/Developer/DeveloperTopDetails.vue
@@ -34,14 +34,14 @@