Commit 27f17df7 authored by 罗林杰's avatar 罗林杰

修改公共文件

parent 52c99836
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<!-- <div class="path">资源编目</div>--> <!-- <div class="path">资源编目</div>-->
</div> </div>
<div class="buttonGroup"> <div class="buttonGroup">
<Segmented v-model:value="value" :options="data"> <Segmented @change="segmentedChange" v-model:value="value" :options="data">
<template #label="{ payload, value: segmentValue }"> <template #label="{ payload, value: segmentValue }">
<div class="icon-container"> <div class="icon-container">
<Icon <Icon
...@@ -23,8 +23,12 @@ ...@@ -23,8 +23,12 @@
</div> </div>
</template> </template>
</Segmented> </Segmented>
<a-button type="primary" @click="handleBulkDownload">批量下载</a-button> <a-button :disabled="isDisabled" type="primary" @click="handleBulkDownload"
<a-button type="primary" @click="handleBatchPush">批量推送</a-button> >批量下载</a-button
>
<a-button :disabled="isDisabled" type="primary" @click="pushNotifications(selectedCard)"
>批量推送</a-button
>
</div> </div>
</div> </div>
</template> </template>
...@@ -108,11 +112,17 @@ ...@@ -108,11 +112,17 @@
<span v-if="item.isShare">有条件共享</span> <span v-if="item.isShare">有条件共享</span>
<span v-else>无条件共享</span> <span v-else>无条件共享</span>
<div> <div>
<a-button style="padding: 0; border: none; box-shadow: none"> <a-button
style="padding: 0; border: none; box-shadow: none"
@click="information(item)"
>
<Icon icon="icon-park-outline:eyes" />{{ item.view }}</a-button <Icon icon="icon-park-outline:eyes" />{{ item.view }}</a-button
> >
<Divider type="vertical" /> <Divider type="vertical" />
<a-button style="padding: 0; border: none; box-shadow: none"> <a-button
style="padding: 0; border: none; box-shadow: none"
@click="pushNotifications(item)"
>
<Icon icon="icon-park-outline:hand-up" />{{ item.edit }}</a-button <Icon icon="icon-park-outline:hand-up" />{{ item.edit }}</a-button
> >
</div> </div>
...@@ -137,6 +147,8 @@ ...@@ -137,6 +147,8 @@
show-size-changer show-size-changer
show-quick-jumper show-quick-jumper
/> />
<ApplyForPushNotificationsModal @register="registerApplyForPushNotificationsModal" />
<EditModal @register="registerEditModal" />
</PageWrapper> </PageWrapper>
</div> </div>
</template> </template>
...@@ -164,6 +176,9 @@ ...@@ -164,6 +176,9 @@
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
import GroupTree from './GroupTree.vue'; import GroupTree from './GroupTree.vue';
import { Columns } from './commonDataSet.data'; import { Columns } from './commonDataSet.data';
import { useModal } from '@/components/Modal';
import ApplyForPushNotificationsModal from '@/views/mallResourceDevelopment/dataSet/commonDataSet/applyForPushNotificationsModal.vue';
import EditModal from '@/views/mallResourceDevelopment/dataSet/commonDataSet/editModal.vue';
const { createMessage, createConfirm } = useMessage(); const { createMessage, createConfirm } = useMessage();
const route = useRouter(); const route = useRouter();
...@@ -174,7 +189,7 @@ ...@@ -174,7 +189,7 @@
const selectedCard = reactive([] as any[]); const selectedCard = reactive([] as any[]);
const cardListData = ref([]); const cardListData = ref([]);
const workSpaceName = ref('党建建设'); const workSpaceName = ref('党建建设');
const isDisabled = ref();
const data = ref([ const data = ref([
{ {
value: 'cardList', value: 'cardList',
...@@ -190,6 +205,12 @@ ...@@ -190,6 +205,12 @@
}, },
]); ]);
const [
registerApplyForPushNotificationsModal,
{ openModal: openApplyForPushNotificationsModal },
] = useModal();
const [registerEditModal, { openModal: openEditModal }] = useModal();
const [registerTable, { reload, getRowSelection }] = useTable({ const [registerTable, { reload, getRowSelection }] = useTable({
api: async () => { api: async () => {
let filteredList = cardList.filter((item) => { let filteredList = cardList.filter((item) => {
...@@ -225,7 +246,10 @@ ...@@ -225,7 +246,10 @@
return { ...response, data: cardListData.value }; return { ...response, data: cardListData.value };
}, },
columns: Columns, columns: Columns,
rowSelection: true, rowSelection: {
type: 'checkbox',
onChange: onSelectionChange,
},
showTableSetting: false, showTableSetting: false,
showIndexColumn: false, showIndexColumn: false,
pagination: false, pagination: false,
...@@ -243,6 +267,23 @@ ...@@ -243,6 +267,23 @@
} }
} }
function segmentedChange() {
isDisabled.value = true;
}
function isCardSelected(item: any) {
isDisabled.value = selectedCard.length <= 0;
return selectedCard.includes(item);
}
function onSelectionChange() {
isDisabled.value = getRowSelection().selectedRowKeys <= 0;
}
/**批量推送推送*/
function pushNotifications(record) {
openApplyForPushNotificationsModal(true, record);
}
function handleNewModal(scene: string) {} function handleNewModal(scene: string) {}
function handleSelectCard(item: any) { function handleSelectCard(item: any) {
...@@ -262,13 +303,11 @@ ...@@ -262,13 +303,11 @@
} }
} }
function isCardSelected(item: any) {
return selectedCard.includes(item);
}
function handleBulkDownload() {} function handleBulkDownload() {}
function handleBatchPush() {} function information(item) {
openEditModal(true, item);
}
function onSearch() { function onSearch() {
let filteredList = cardList.filter((item) => { let filteredList = cardList.filter((item) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment