fix: bug
This commit is contained in:
@@ -1,8 +1,12 @@
|
||||
<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-column field="updateTime" header="订阅时间"></d-column>
|
||||
<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">
|
||||
{{ dayjs(scope.row.updateTime).format('YYYY-MM-DD HH:mm:ss') }}
|
||||
</template>
|
||||
</d-column>
|
||||
<d-column field="name" header="软件名称"></d-column>
|
||||
<d-column field="releaseId" header="版本号"></d-column>
|
||||
<d-column field="username" header="订阅人"></d-column>
|
||||
@@ -15,7 +19,7 @@
|
||||
<p>确定取消{{ scope.row.name }}订阅吗?</p>
|
||||
<footer>
|
||||
<d-button @click="hidden" size="sm">取消</d-button>
|
||||
<d-button @click="hidden" size="sm" color="danger" variant="solid">确认</d-button>
|
||||
<d-button @click="sumitCancel(scope.row)" size="sm" color="danger" variant="solid">确认</d-button>
|
||||
</footer>
|
||||
</div>
|
||||
</template>
|
||||
@@ -30,8 +34,9 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref } from 'vue';
|
||||
import { getgroupNoticeList, getGroupSubscribeList, getSubscribeList } from '@/api/jyh';
|
||||
import NoData from "@/components/NoData/NoData.vue";
|
||||
import dayjs from 'dayjs';
|
||||
import { getgroupNoticeList, getGroupSubscribeList, getSubscribeList, subscribeSoftware } from '@/api/jyh';
|
||||
import NoData from '@/components/NoData/NoData.vue';
|
||||
const tableData = ref([]);
|
||||
const hidden = () => {
|
||||
// 模拟body点击操作
|
||||
@@ -44,18 +49,31 @@ const pager = ref({
|
||||
pageSize: 10
|
||||
});
|
||||
|
||||
const getList = async() => {
|
||||
const { data, error } = await getGroupSubscribeList({ current: 1,size: pager.value.pageSize });
|
||||
const getList = async () => {
|
||||
const { data, error } = await getGroupSubscribeList({ current: 1, size: pager.value.pageSize });
|
||||
if (!error && data) {
|
||||
tableData.value = data.data.data.records;
|
||||
pager.value.total = data.data.data.total;
|
||||
}
|
||||
};
|
||||
|
||||
onMounted(async() => {
|
||||
const sumitCancel = async (row: any) => {
|
||||
await subscribeSoftware({
|
||||
softwareId: row.softwareId,
|
||||
status: 0,
|
||||
alertType: {
|
||||
mobileSwitch: false,
|
||||
emailSwitch: false,
|
||||
webSwitch: false
|
||||
}
|
||||
});
|
||||
getList();
|
||||
hidden();
|
||||
};
|
||||
|
||||
onMounted(async () => {
|
||||
getList();
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
<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-column field="updateTime" header="订阅时间"></d-column>
|
||||
<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">
|
||||
{{ dayjs(scope.row.updateTime).format('YYYY-MM-DD HH:mm:ss') }}
|
||||
</template>
|
||||
</d-column>
|
||||
<d-column field="name" header="软件名称"></d-column>
|
||||
<d-column field="releaseId" header="版本号"></d-column>
|
||||
<d-column field="username" header="订阅人"></d-column>
|
||||
@@ -15,7 +19,7 @@
|
||||
<p>确定取消{{ scope.row.name }}订阅吗?</p>
|
||||
<footer>
|
||||
<d-button @click="hidden" size="sm">取消</d-button>
|
||||
<d-button @click="hidden" size="sm" color="danger" variant="solid">确认</d-button>
|
||||
<d-button @click="sumitCancel(scope.row)" size="sm" color="danger" variant="solid">确认</d-button>
|
||||
</footer>
|
||||
</div>
|
||||
</template>
|
||||
@@ -30,8 +34,9 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref } from 'vue';
|
||||
import { getgroupNoticeList, getGroupSubscribeList, getSubscribeList } from '@/api/jyh';
|
||||
import NoData from "@/components/NoData/NoData.vue";
|
||||
import dayjs from 'dayjs';
|
||||
import { getgroupNoticeList, getGroupSubscribeList, getSubscribeList, subscribeSoftware } from '@/api/jyh';
|
||||
import NoData from '@/components/NoData/NoData.vue';
|
||||
const tableData = ref([]);
|
||||
const hidden = () => {
|
||||
// 模拟body点击操作
|
||||
@@ -44,18 +49,31 @@ const pager = ref({
|
||||
pageSize: 10
|
||||
});
|
||||
|
||||
const getList = async() => {
|
||||
const { data, error } = await getSubscribeList({ current: 1,size: pager.value.pageSize });
|
||||
const getList = async () => {
|
||||
const { data, error } = await getSubscribeList({ current: 1, size: pager.value.pageSize });
|
||||
if (!error && data) {
|
||||
tableData.value = data.data.data.records;
|
||||
pager.value.total = data.data.data.total;
|
||||
}
|
||||
};
|
||||
|
||||
onMounted(async() => {
|
||||
const sumitCancel = async (row: any) => {
|
||||
await subscribeSoftware({
|
||||
softwareId: row.softwareId,
|
||||
status: 0,
|
||||
alertType: {
|
||||
mobileSwitch: false,
|
||||
emailSwitch: false,
|
||||
webSwitch: false
|
||||
}
|
||||
});
|
||||
getList();
|
||||
hidden();
|
||||
};
|
||||
|
||||
onMounted(async () => {
|
||||
getList();
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
Reference in New Issue
Block a user