docking-vue/src/views/data_directory/basic/index.vue

115 lines
3.1 KiB
Vue
Raw Normal View History

2025-07-21 11:32:02 +08:00
<template>
<div>
2025-08-12 14:32:49 +08:00
<app-search
v-model="searchForm"
:options
label-width="150px"
@submit="resetPagination"
/>
2025-07-21 11:32:02 +08:00
<app-table ref="tableRef" v-model:pagination="pagination" :data="list">
<el-table-column prop="servicePlatformName" label="服务平台名称" />
2025-07-21 11:32:02 +08:00
<el-table-column prop="companyName" label="企业名称" />
<el-table-column prop="sectorName" label="所属行业" />
<el-table-column prop="thirdPlatformName" label="上级平台名称">
2025-07-21 11:32:02 +08:00
</el-table-column>
<el-table-column prop="pushCount" label="推送记录" />
<el-table-column prop="receiveStatus" label="服务平台接口状态">
2025-07-21 11:32:02 +08:00
<template #default="{ row }">
{{ translationStatus(row.receiveStatus, receiveOptions) }}
2025-07-21 11:32:02 +08:00
</template>
</el-table-column>
<el-table-column prop="pushStatus" label="上级平台接口状态">
2025-07-21 11:32:02 +08:00
<template #default="{ row }">
{{ translationStatus(row.pushStatus, pushOptions) }}
2025-07-21 11:32:02 +08:00
</template>
</el-table-column>
<el-table-column label="操作" width="240">
<template #default="{ row }">
<el-button
type="primary"
text
link
@click="
router.push({
2025-08-25 08:38:59 +08:00
path: `${route.path}/records`,
2025-07-21 11:32:02 +08:00
query: {
thirdPlatformId: row.thirdPlatformId,
companyId: row.companyId,
servicePlatformId: row.servicePlatformId,
2025-08-12 14:32:49 +08:00
dataType: dataType,
2025-07-21 11:32:02 +08:00
},
})
"
>
推进记录信息
</el-button>
</template>
</el-table-column>
</app-table>
</div>
</template>
<script setup>
import { getDataList } from "@/request/data_directory.js";
import useListData from "@/hooks/useListData.js";
import AppSearch from "@/components/search/index.vue";
import AppTable from "@/components/table/index.vue";
import { translationStatus } from "@/assets/js/utils.js";
2025-08-25 08:38:59 +08:00
import { useRouter, useRoute } from "vue-router";
// import { reqMapArr } from "./reqMap.js";
2025-07-21 11:32:02 +08:00
const router = useRouter();
2025-08-25 08:38:59 +08:00
const route = useRoute();
2025-08-12 14:32:49 +08:00
const dataType = defineModel("dataType", {
type: Number,
2025-07-21 11:32:02 +08:00
required: true,
2025-08-12 14:32:49 +08:00
default: 1,
2025-07-21 11:32:02 +08:00
});
const { list, pagination, searchForm, resetPagination, tableRef } = useListData(
getDataList,
{
2025-08-12 14:32:49 +08:00
params: () => ({
dataType: dataType.value,
}),
2025-07-21 11:32:02 +08:00
}
);
const pushOptions = [
2025-07-24 09:12:34 +08:00
{ id: 1, name: "未推送" },
{ id: 2, name: "定时推送" },
{ id: 3, name: "推送成功" },
{ id: 4, name: "重试中" },
{ id: 5, name: "推送失败" },
2025-07-21 11:32:02 +08:00
];
const receiveOptions = [
2025-07-24 09:12:34 +08:00
{ id: 1, name: "接收正常" },
{ id: 2, name: "接收异常" },
2025-07-21 11:32:02 +08:00
];
const options = [
2025-08-12 14:32:49 +08:00
{
key: "thirdPlatformName",
label: "上级平台名称",
2025-08-12 14:32:49 +08:00
},
{
key: "servicePlatformName",
label: "服务平台名称",
},
{
key: "companyName",
label: "企业名称",
},
2025-07-21 11:32:02 +08:00
{
key: "receiveStatus",
label: "接收状态",
type: "select",
options: receiveOptions,
},
{
key: "pushStatus",
label: "推送状态",
type: "select",
options: pushOptions,
},
2025-07-21 11:32:02 +08:00
];
</script>
<style scoped lang="scss"></style>