From 314b68b3a306b24c2a062822a89ae75d12ddace2 Mon Sep 17 00:00:00 2001 From: a0049873 <79py69t9wb@privaterelay.appleid.com> Date: Mon, 24 Oct 2022 14:54:03 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E9=9D=99=E6=80=81=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/src/views/home/infrastructurePage.vue | 115 ++++++++++++++++++-- 1 file changed, 103 insertions(+), 12 deletions(-) diff --git a/front/src/views/home/infrastructurePage.vue b/front/src/views/home/infrastructurePage.vue index d48e3357..b033f40e 100644 --- a/front/src/views/home/infrastructurePage.vue +++ b/front/src/views/home/infrastructurePage.vue @@ -409,12 +409,12 @@
-

+

备选 {{ pagination.total || 0 }}

-

+

已选 {{ selectedRowKeys.length }} 个 @@ -458,15 +458,17 @@ 添加至申购车 @@ -488,7 +490,10 @@

-
+
+
+ +
{ + console.log( + `selectedRowKeys: ${selectedRowKeys}`, + 'selectedRows: ', + selectedRows + ) + }, + onSelect: (record, selected, selectedRows) => { + console.log(record, selected, selectedRows) + // if (selected) { + // selectedRows.push(record.key) + // } else { + // selectedRows.splice(selectedRows.indexOf(record.key), 1) + // } + }, + onSelectAll: (selected, selectedRows, changeRows) => { + console.log(selected, selectedRows, changeRows) + }, + }) const videoList = ref([]) const initMeeting = () => { initiateMeet('一网统揽平台组/').then((res) => { @@ -1641,6 +1685,7 @@ if (name == '政务云资源' || name == '视频会议' || name == '感知资源') { dataSource.value = [] dataSource2.value = [] + console.log('视频会议=========>', dataSource, columns) pagination.value.total = 0 } else { if (name !== '无人机' && name !== '单兵设备') { @@ -2034,6 +2079,20 @@ key: 'channelId', }, ]) + const meetingColumns = ref([ + { + title: '视频会议用户名称', + dataIndex: 'name', + key: 'name', + }, + ]) + const meetingName = ref([ + { name: '一网统揽平台组', key: '一网统揽平台组' }, + { name: '市气象局', key: '市气象局' }, + { name: '地铁集团', key: '地铁集团' }, + { name: '市公安局', key: '市公安局' }, + { name: '市交通运输局', key: '市交通运输局' }, + ]) // 西海岸--状态展示 if (isXiHaiAn) { columns.value.splice(2, 0, { @@ -2094,6 +2153,32 @@ mybus.emit('selectTablePoint', selectedList.value) console.log('已选中======================>', selectedList.value) } + const onSelectChange2 = ( + record, + selected, + selectedRows, + nativeEvent, + type + ) => { + console.log( + '已选中======================>', + record, + selected, + selectedRows, + nativeEvent, + type + ) + if (selected) { + selectedRowKeys.value.push(record.name) + selectedRows.value.push(record.name) + } else { + selectedRowKeys.value.splice( + selectedRowKeys.value.indexOf(record.name), + 1 + ) + selectedRows.value.splice(selectedRowKeys.value.indexOf(record.name), 1) + } + } const onSelectAll = (selected, selectedRows, changeRows) => { if (selected) { changeRows.map((val) => { @@ -2128,6 +2213,12 @@ console.log('heiheiheiehiehei', selected, selectedRows, changeRows) mybus.emit('selectTablePoint', selectedList.value) } + const onSelectAll2 = (selected, selectedRows, changeRows) => { + console.log(selected, selectedRows, changeRows) + if (selected) { + } else { + } + } // 切换tab const handleTableChange = (val) => { From 0726f4a927ed3486a766dfa1cf16f78dda339492 Mon Sep 17 00:00:00 2001 From: a0049873 <79py69t9wb@privaterelay.appleid.com> Date: Mon, 24 Oct 2022 15:20:58 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=A7=92=E8=89=B2?= =?UTF-8?q?=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/src/views/home/infrastructurePage.vue | 53 +++++++++------------ 1 file changed, 23 insertions(+), 30 deletions(-) diff --git a/front/src/views/home/infrastructurePage.vue b/front/src/views/home/infrastructurePage.vue index 445c423a..2cdfd140 100644 --- a/front/src/views/home/infrastructurePage.vue +++ b/front/src/views/home/infrastructurePage.vue @@ -547,12 +547,15 @@ :dataSource="meetingName" :columns="meetingColumns" :scroll="{ y: tableHeight }" - rowKey="channelId" + rowKey="key" :rowClassName=" (record, index) => (index % 2 === 1 ? 'table-striped' : null) " :showSizeChanger="false" - :row-selection="rowSelection" + :row-selection="{ + selectedRowKeys: meetingSelect, + onChange: meetingOnSelectChange, + }" >
@@ -801,6 +804,9 @@ import dayjs from 'dayjs' import { Form } from 'ant-design-vue' import moment from 'moment' + import { useStore } from 'vuex' + const store = useStore() + const username = store.getters['user/username'] const props = defineProps({ // 模糊查 searchValue: { type: String, default: '' }, @@ -841,30 +847,20 @@ ], //显示所有按钮, }) const meetingSelect = ref([]) - const rowSelection = ref({ - checkStrictly: false, - onChange: (selectedRowKeys, selectedRows) => { - console.log( - `selectedRowKeys: ${selectedRowKeys}`, - 'selectedRows: ', - selectedRows - ) - }, - onSelect: (record, selected, selectedRows) => { - console.log(record, selected, selectedRows) - // if (selected) { - // selectedRows.push(record.key) - // } else { - // selectedRows.splice(selectedRows.indexOf(record.key), 1) - // } - }, - onSelectAll: (selected, selectedRows, changeRows) => { - console.log(selected, selectedRows, changeRows) - }, - }) + const meetingOnSelectChange = (selectedRowKeys) => { + console.log( + 'selectedRowKeys changed: ', + selectedRowKeys, + meetingSelect.value + ) + meetingSelect.value = selectedRowKeys + } + const videoList = ref([]) const initMeeting = () => { - initiateMeet('青岛市一网统揽项目组/一网统揽平台组/').then((res) => { + let str = '' + meetingSelect.value.map((val) => (str += val + '/')) + initiateMeet(str).then((res) => { console.log('组会=========>', res) }) } @@ -1055,12 +1051,9 @@ title: '设施类型', content: isXiHaiAn ? ['视频资源'] - : [ - '政务云资源', - '视频资源' /**',感知资源' */, - '城市云脑会客厅', - '视频会议', - ], + : username == 'admin' + ? ['政务云资源', '视频资源', '城市云脑会客厅', '视频会议'] + : ['政务云资源', '视频资源', '城市云脑会客厅'], }, ]) let clickList = ref([]) //存储点击的tab