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

修改公共文件

parent 52c99836
......@@ -12,7 +12,7 @@
<!-- <div class="path">资源编目</div>-->
</div>
<div class="buttonGroup">
<Segmented v-model:value="value" :options="data">
<Segmented @change="segmentedChange" v-model:value="value" :options="data">
<template #label="{ payload, value: segmentValue }">
<div class="icon-container">
<Icon
......@@ -23,8 +23,12 @@
</div>
</template>
</Segmented>
<a-button type="primary" @click="handleBulkDownload">批量下载</a-button>
<a-button type="primary" @click="handleBatchPush">批量推送</a-button>
<a-button :disabled="isDisabled" type="primary" @click="handleBulkDownload"
>批量下载</a-button
>
<a-button :disabled="isDisabled" type="primary" @click="pushNotifications(selectedCard)"
>批量推送</a-button
>
</div>
</div>
</template>
......@@ -108,11 +112,17 @@
<span v-if="item.isShare">有条件共享</span>
<span v-else>无条件共享</span>
<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
>
<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
>
</div>
......@@ -137,6 +147,8 @@
show-size-changer
show-quick-jumper
/>
<ApplyForPushNotificationsModal @register="registerApplyForPushNotificationsModal" />
<EditModal @register="registerEditModal" />
</PageWrapper>
</div>
</template>
......@@ -164,6 +176,9 @@
import { useRouter } from 'vue-router';
import GroupTree from './GroupTree.vue';
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 route = useRouter();
......@@ -174,7 +189,7 @@
const selectedCard = reactive([] as any[]);
const cardListData = ref([]);
const workSpaceName = ref('党建建设');
const isDisabled = ref();
const data = ref([
{
value: 'cardList',
......@@ -190,6 +205,12 @@
},
]);
const [
registerApplyForPushNotificationsModal,
{ openModal: openApplyForPushNotificationsModal },
] = useModal();
const [registerEditModal, { openModal: openEditModal }] = useModal();
const [registerTable, { reload, getRowSelection }] = useTable({
api: async () => {
let filteredList = cardList.filter((item) => {
......@@ -225,7 +246,10 @@
return { ...response, data: cardListData.value };
},
columns: Columns,
rowSelection: true,
rowSelection: {
type: 'checkbox',
onChange: onSelectionChange,
},
showTableSetting: false,
showIndexColumn: false,
pagination: false,
......@@ -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 handleSelectCard(item: any) {
......@@ -262,13 +303,11 @@
}
}
function isCardSelected(item: any) {
return selectedCard.includes(item);
}
function handleBulkDownload() {}
function handleBatchPush() {}
function information(item) {
openEditModal(true, item);
}
function onSearch() {
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