Migrate legacy relative API imports to consistent absolute @/api paths across all components Remove unnecessary .js file extensions from ES module imports Add new StreamManager utility and base client configuration constants file Clean up unused imports and dynamic config calls in ChatGuide and ChatInputArea components Update the index.html page title to "nianxx" Replace dynamic OSS URL and local text imports in ChatGuide with hardcoded static values
55 lines
1.6 KiB
Vue
55 lines
1.6 KiB
Vue
<template>
|
|
<z-paging :bg-color="'linear-gradient(180deg, ' +
|
|
$theme -
|
|
color -
|
|
100 +
|
|
' 0%, #F5F7FA 100%) 0 86px / 100% 100px no-repeat'
|
|
" ref="paging" v-model="dataList" use-virtual-list :force-close-inner-list="true" cell-height-mode="dynamic"
|
|
safe-area-inset-bottom @query="queryList">
|
|
<template #top>
|
|
<TopNavBar title="呼叫服务" />
|
|
</template>
|
|
|
|
<template #empty>
|
|
<CustomEmpty emptyIcon="https://oss.nianxx.cn/mp/static/version_101/order/service_empty.png"
|
|
statusspan="您暂无呼叫服务" />
|
|
</template>
|
|
|
|
<OrderCard v-for="(item, index) in dataList" :key="item.id || index" :orderData="item" />
|
|
</z-paging>
|
|
</template>
|
|
|
|
<script setup>
|
|
import { ref } from "vue";
|
|
import TopNavBar from "@/components/TopNavBar/index.vue";
|
|
import CustomEmpty from "@/components/CustomEmpty/index.vue";
|
|
import OrderCard from "./components/OrderCard/index.vue";
|
|
import { userWorkOrderList } from "@/api/workOrder";
|
|
|
|
const dataList = ref([]);
|
|
const paging = ref(null);
|
|
|
|
const queryList = async (pageNum, pageSize) => {
|
|
try {
|
|
const res = await userWorkOrderList({ pageNum, pageSize });
|
|
console.log("API响应:", res);
|
|
|
|
if (res && res.data && res.data.records) {
|
|
const records = res.data.records;
|
|
|
|
// 完成数据加载,第二个参数表示是否还有更多数据
|
|
paging.value.complete(records);
|
|
} else {
|
|
// 没有数据
|
|
paging.value.complete([]);
|
|
}
|
|
} catch (error) {
|
|
console.error("查询列表失败:", error);
|
|
// 加载失败
|
|
paging.value.complete(false);
|
|
}
|
|
};
|
|
</script>
|
|
|
|
<style scoped lang="scss"></style>
|