Merge branch 'master' of https://gitcode.com/hk_openRepo/OpenRepo_Portal into dev-shenjianbin
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<Card simple class="jyh-card mt-3">
|
||||
<div class="mb-3">
|
||||
<d-table v-if="tableData.length>0" class="jyh-table jyh-table-2" :header-bg="true" :data="tableData">
|
||||
<d-table v-if="tableData.length > 0" class="jyh-table jyh-table-2" :header-bg="true" :data="tableData">
|
||||
<d-column field="updateTime" header="时间">
|
||||
<template #default="scope">
|
||||
<span>{{ formatTime(scope.row.updateTime, 'YYYY-MM-DD') }}</span>
|
||||
@@ -14,19 +14,19 @@
|
||||
</d-column>
|
||||
<d-column field="alertMsg" header="详情">
|
||||
<template #default="scope">
|
||||
<span>{{ JSON.parse(scope.row.alertMsg)?.overview || ''}}</span>
|
||||
<span>{{ JSON.parse(scope.row.alertMsg)?.overview || '' }}</span>
|
||||
</template>
|
||||
</d-column>
|
||||
<d-column field="level" header="级别">
|
||||
<template #default="scope">
|
||||
<d-status v-if="JSON.parse(scope.row.alertMsg)?.importance === '高'" type="error">
|
||||
{{ JSON.parse(scope.row.alertMsg)?.importance || ''}}
|
||||
{{ JSON.parse(scope.row.alertMsg)?.importance || '' }}
|
||||
</d-status>
|
||||
<d-status v-if="JSON.parse(scope.row.alertMsg)?.importance === '中'" type="warning">
|
||||
{{ JSON.parse(scope.row.alertMsg)?.importance || ''}}
|
||||
{{ JSON.parse(scope.row.alertMsg)?.importance || '' }}
|
||||
</d-status>
|
||||
<d-status v-if="JSON.parse(scope.row.alertMsg)?.importance === '低'" class="yellow-status">
|
||||
{{ JSON.parse(scope.row.alertMsg)?.importance || ''}}
|
||||
{{ JSON.parse(scope.row.alertMsg)?.importance || '' }}
|
||||
</d-status>
|
||||
<!-- <d-status v-if="scope.row.importance === 1" type="running">提示</d-status>-->
|
||||
</template>
|
||||
@@ -41,14 +41,21 @@
|
||||
<NoData v-else :small="false"></NoData>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="mt-20 mb-20 flex justify-end">
|
||||
<d-pagination size="md" :page-size-options="[10, 20, 50]" :total="pager.total"
|
||||
v-model:pageSize="pager.pageSize" v-model:pageIndex="pager.pageIndex" :max-items="5"
|
||||
:can-change-page-size="true" :can-view-total="true" total-item-text="总计" @page-index-change="changeIndex()"
|
||||
@page-size-change="changeSize()" />
|
||||
<div class="mt-20 mb-20 flex justify-end" v-if="tableData.length > 0">
|
||||
<d-pagination
|
||||
size="md"
|
||||
:page-size-options="[10, 20, 50]"
|
||||
:total="pager.total"
|
||||
v-model:pageSize="pager.pageSize"
|
||||
v-model:pageIndex="pager.pageIndex"
|
||||
:max-items="5"
|
||||
:can-change-page-size="true"
|
||||
:can-view-total="true"
|
||||
total-item-text="总计"
|
||||
@page-index-change="changeIndex()"
|
||||
@page-size-change="changeSize()"
|
||||
/>
|
||||
</div>
|
||||
|
||||
</Card>
|
||||
|
||||
<d-modal class="warning-modal" v-model="warningModalVisable" title="">
|
||||
@@ -59,7 +66,7 @@
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref } from 'vue';
|
||||
import EarlyWarningDetail from '@/views/Jyh/PersonalCenter/Detail/EarlyWarningDetail.vue';
|
||||
import NoData from "@/components/NoData/NoData.vue";
|
||||
import NoData from '@/components/NoData/NoData.vue';
|
||||
import { getgroupNoticeList, getNoticeList } from '@/api/jyh';
|
||||
|
||||
const tableData = ref([
|
||||
@@ -83,19 +90,17 @@ const colseWarningDetail = () => {
|
||||
warningModalVisable.value = false;
|
||||
};
|
||||
|
||||
const getList = async() => {
|
||||
const { data, error } = await getgroupNoticeList({ current: 1,size: pager.value.pageSize });
|
||||
const getList = async () => {
|
||||
const { data, error } = await getgroupNoticeList({ current: 1, size: pager.value.pageSize });
|
||||
if (!error && data) {
|
||||
tableData.value = data.data.data.records;
|
||||
pager.value.total = data.data.data.total;
|
||||
}
|
||||
};
|
||||
|
||||
onMounted(async() => {
|
||||
onMounted(async () => {
|
||||
getList();
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<Card simple class="jyh-card mt-3">
|
||||
<div class="mb-3">
|
||||
<d-table v-if="tableData.length>0" class="jyh-table jyh-table-2" :header-bg="true" :data="tableData">
|
||||
<d-table v-if="tableData.length > 0" class="jyh-table jyh-table-2" :header-bg="true" :data="tableData">
|
||||
<d-column field="updateTime" header="时间"></d-column>
|
||||
<d-column field="name" header="标题">
|
||||
<template #default="scope">
|
||||
@@ -10,21 +10,21 @@
|
||||
</d-column>
|
||||
<d-column field="alertMsg" header="详情">
|
||||
<template #default="scope">
|
||||
<span>{{ JSON.parse(scope.row.alertMsg)?.overview || ''}}</span>
|
||||
<span>{{ JSON.parse(scope.row.alertMsg)?.overview || '' }}</span>
|
||||
</template>
|
||||
</d-column>
|
||||
<d-column field="level" header="级别">
|
||||
<template #default="scope">
|
||||
<d-status v-if="JSON.parse(scope.row.alertMsg)?.importance === '高'" type="error">
|
||||
{{ JSON.parse(scope.row.alertMsg)?.importance || ''}}
|
||||
{{ JSON.parse(scope.row.alertMsg)?.importance || '' }}
|
||||
</d-status>
|
||||
<d-status v-if="JSON.parse(scope.row.alertMsg)?.importance === '中'" type="warning">
|
||||
{{ JSON.parse(scope.row.alertMsg)?.importance || ''}}
|
||||
{{ JSON.parse(scope.row.alertMsg)?.importance || '' }}
|
||||
</d-status>
|
||||
<d-status v-if="JSON.parse(scope.row.alertMsg)?.importance === '低'" class="yellow-status">
|
||||
{{ JSON.parse(scope.row.alertMsg)?.importance || ''}}
|
||||
{{ JSON.parse(scope.row.alertMsg)?.importance || '' }}
|
||||
</d-status>
|
||||
<!-- <d-status v-if="scope.row.importance === 1" type="running">提示</d-status>-->
|
||||
<!-- <d-status v-if="scope.row.importance === 1" type="running">提示</d-status>-->
|
||||
</template>
|
||||
</d-column>
|
||||
<d-column field="status" header="状态">
|
||||
@@ -37,14 +37,21 @@
|
||||
<NoData v-else :small="false"></NoData>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="mt-20 mb-20 flex justify-end">
|
||||
<d-pagination size="md" :page-size-options="[10, 20, 50]" :total="pager.total"
|
||||
v-model:pageSize="pager.pageSize" v-model:pageIndex="pager.pageIndex" :max-items="5"
|
||||
:can-change-page-size="true" :can-view-total="true" total-item-text="总计" @page-index-change="changeIndex()"
|
||||
@page-size-change="changeSize()" />
|
||||
<div class="mt-20 mb-20 flex justify-end" v-if="tableData.length > 0">
|
||||
<d-pagination
|
||||
size="md"
|
||||
:page-size-options="[10, 20, 50]"
|
||||
:total="pager.total"
|
||||
v-model:pageSize="pager.pageSize"
|
||||
v-model:pageIndex="pager.pageIndex"
|
||||
:max-items="5"
|
||||
:can-change-page-size="true"
|
||||
:can-view-total="true"
|
||||
total-item-text="总计"
|
||||
@page-index-change="changeIndex()"
|
||||
@page-size-change="changeSize()"
|
||||
/>
|
||||
</div>
|
||||
|
||||
</Card>
|
||||
|
||||
<d-modal class="warning-modal" v-model="warningModalVisable" title="">
|
||||
@@ -55,7 +62,7 @@
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref } from 'vue';
|
||||
import EarlyWarningDetail from '@/views/Jyh/PersonalCenter/Detail/EarlyWarningDetail.vue';
|
||||
import NoData from "@/components/NoData/NoData.vue";
|
||||
import NoData from '@/components/NoData/NoData.vue';
|
||||
import { getNoticeList } from '@/api/jyh';
|
||||
|
||||
const tableData = ref([
|
||||
@@ -79,19 +86,17 @@ const colseWarningDetail = () => {
|
||||
warningModalVisable.value = false;
|
||||
};
|
||||
|
||||
const getList = async() => {
|
||||
const { data, error } = await getNoticeList({ current: 1,size: pager.value.pageSize });
|
||||
const getList = async () => {
|
||||
const { data, error } = await getNoticeList({ current: 1, size: pager.value.pageSize });
|
||||
if (!error && data) {
|
||||
tableData.value = data.data.data.records;
|
||||
pager.value.total = data.data.data.total;
|
||||
}
|
||||
};
|
||||
|
||||
onMounted(async() => {
|
||||
onMounted(async () => {
|
||||
getList();
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
@@ -2,40 +2,25 @@
|
||||
<div class="invitation-notice-container">
|
||||
<Card simple class="jyh-card mt-3">
|
||||
<div class="mt-3">
|
||||
<d-table
|
||||
class="jyh-table jyh-table-2"
|
||||
:header-bg="true"
|
||||
:data="noticeTableData"
|
||||
>
|
||||
<d-table class="jyh-table jyh-table-2" :header-bg="true" :data="noticeTableData">
|
||||
<d-column field="content" header="邀请内容" show-overflow-tooltip></d-column>
|
||||
<d-column field="createTime" header="邀请时间" width="200" show-overflow-tooltip></d-column>
|
||||
<d-column field="createUser" header="邀请人" width="180" show-overflow-tooltip></d-column>
|
||||
<d-column header="操作" width="150">
|
||||
<template #default="scope">
|
||||
<d-button
|
||||
variant="text"
|
||||
color="primary"
|
||||
class="mr-2"
|
||||
@click="handleAccept(scope.row, 1)"
|
||||
>
|
||||
<d-button variant="text" color="primary" class="mr-2" @click="handleAccept(scope.row, 1)">
|
||||
接收
|
||||
</d-button>
|
||||
<d-button
|
||||
variant="text"
|
||||
color="primary"
|
||||
@click="handleAccept(scope.row, -1)"
|
||||
>
|
||||
拒绝
|
||||
</d-button>
|
||||
<d-button variant="text" color="primary" @click="handleAccept(scope.row, -1)"> 拒绝 </d-button>
|
||||
</template>
|
||||
</d-column>
|
||||
<template #empty>
|
||||
<NoData />
|
||||
</template>
|
||||
</d-table>
|
||||
<div class="invitation-pagination">
|
||||
<div class="invitation-pagination" v-if="noticeTableData.length > 0">
|
||||
<d-pagination
|
||||
style="display: inline-flex;"
|
||||
style="display: inline-flex"
|
||||
:total="pager.total"
|
||||
v-model:pageSize="pager.pageSize"
|
||||
v-model:pageIndex="pager.pageIndex"
|
||||
@@ -53,30 +38,30 @@
|
||||
<script setup lang="ts">
|
||||
import { acceptInvite, getInviteListData } from '@/api/jyh';
|
||||
import { ref, shallowReactive } from 'vue';
|
||||
import NoData from "@/components/NoData/NoData.vue";
|
||||
import NoData from '@/components/NoData/NoData.vue';
|
||||
import { Message } from 'vue-devui';
|
||||
import dayjs from "dayjs";
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
const noticeTableData = ref([]);
|
||||
const pager = shallowReactive({
|
||||
total: 0,
|
||||
pageIndex: 1,
|
||||
pageSize: 10,
|
||||
pageSizeOptions: [10, 20, 30, 40, 50],
|
||||
pageSizeOptions: [10, 20, 30, 40, 50]
|
||||
});
|
||||
const queryInviteListData = async () => {
|
||||
const data = await getInviteListData();
|
||||
console.log(data)
|
||||
console.log(data);
|
||||
if (!data?.data?.data?.data) {
|
||||
pager.total = 0;
|
||||
return;
|
||||
}
|
||||
noticeTableData.value = data.data.data.data.map(item => {
|
||||
noticeTableData.value = data.data.data.data.map((item) => {
|
||||
return {
|
||||
...item,
|
||||
content: `尊敬的用户,您好!为更好地整合资源、协同开发,现诚邀您加入组织【${item.name}】。`,
|
||||
createTime: dayjs(item.createTime).format('YYYY-MM-DD HH:mm:ss'),
|
||||
}
|
||||
createTime: dayjs(item.createTime).format('YYYY-MM-DD HH:mm:ss')
|
||||
};
|
||||
});
|
||||
pager.total = data.data.data.data.length;
|
||||
};
|
||||
@@ -84,18 +69,18 @@ queryInviteListData();
|
||||
const handleAccept = async (row, type) => {
|
||||
const data = await acceptInvite({
|
||||
groupId: row.groupId,
|
||||
status: type,
|
||||
status: type
|
||||
});
|
||||
if (data?.data?.data?.data) {
|
||||
Message({
|
||||
type: 'success',
|
||||
message: '成功接受',
|
||||
message: '成功接受'
|
||||
});
|
||||
queryInviteListData();
|
||||
} else {
|
||||
Message({
|
||||
type: 'error',
|
||||
message: '接受失败',
|
||||
message: '接受失败'
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user