feat: 模型列表数据优化

dev-deviceSetting
JINGYJ 1 year ago
parent 80dc0b98a7
commit cf06fdee08

@ -17,15 +17,7 @@ export function viteBuildInfo(): Plugin {
outDir = resolvedConfig.build?.outDir ?? "dist"; outDir = resolvedConfig.build?.outDir ?? "dist";
}, },
buildStart() { buildStart() {
console.log( console.log(bold(green(`${blue("[General-AI-Platform-Web-Client]")}`)));
bold(
green(
`👏欢迎使用${blue(
"[vue-pure-admin]"
)}star💖 https://github.com/pure-admin/vue-pure-admin`
)
)
);
if (config.command === "build") { if (config.command === "build") {
startTime = dayjs(new Date()); startTime = dayjs(new Date());
} }

File diff suppressed because it is too large Load Diff

@ -3,23 +3,39 @@ export function fetchMockSuccessFullByOther({
data, data,
msg msg
}): successMockApiProps { }): successMockApiProps {
return { // return {
// code: 0, // 0 成功
// success: true, // true 成功
// data: data || null, // mock业务层数据
// msg: msg | "ok", // 成功提示
// isMock: true // true 标识当前是模拟数据
// } as successMockApiProps;
const result: successMockApiProps = {
code: 0, // 0 成功 code: 0, // 0 成功
success: true, // true 成功 success: true, // true 成功
data: data || null, // mock业务层数据 data: data || null, // mock业务层数据
msg: msg | "ok", // 成功提示 msg: msg as string | "ok", // 成功提示
isMock: true // true 标识当前是模拟数据 isMock: true // true 标识当前是模拟数据
} as successMockApiProps; };
return result;
} }
export function fetchMockFailFullByOther({ data, msg }): failMockApiProps { export function fetchMockFailFullByOther({ data, msg }): failMockApiProps {
return { // return {
// code: 599, // 0 成功
// success: true, // true 成功
// data: data || null, // mock业务层数据
// msg: msg | "fail", // 成功提示
// isMock: true // true 标识当前是模拟数据
// } as failMockApiProps;
const result: failMockApiProps = {
code: 599, // 0 成功 code: 599, // 0 成功
success: true, // true 成功 success: false, // true 成功
data: data || null, // mock业务层数据 data: data || null, // mock业务层数据
msg: msg | "fail", // 成功提示 msg: msg as string | "fail", // 成功提示
isMock: true // true 标识当前是模拟数据 isMock: true // true 标识当前是模拟数据
} as failMockApiProps; };
return result;
} }
// 分页展示 // 分页展示

@ -14,99 +14,24 @@ const testDeviceTreeData = [
level: 1, level: 1,
childList: [ childList: [
{ {
name: "控制器A1", name: "控制器A",
id: "1101001", id: "1101001",
level: 2, level: 2,
childList: [ childList: [
{ {
name: "控制器A1a1", name: "控制器a",
id: "110100101", id: "110100101",
level: 3 level: 3
}, },
{ {
name: "控制器A2a2", name: "控制器b",
id: "110100202",
level: 3
},
{
name: "控制器A1a1",
id: "110100101",
level: 3
},
{
name: "控制器A2a2",
id: "110100202",
level: 3
},
{
name: "控制器A1a1",
id: "110100101",
level: 3
},
{
name: "控制器A2a2",
id: "110100202",
level: 3
},
{
name: "控制器A1a1",
id: "110100101",
level: 3
},
{
name: "控制器A2a2",
id: "110100202",
level: 3
},
{
name: "控制器A1a1",
id: "110100101",
level: 3
},
{
name: "控制器A2a2",
id: "110100202",
level: 3
},
{
name: "控制器A2a2",
id: "110100202",
level: 3
},
{
name: "控制器A1a1",
id: "110100101",
level: 3
},
{
name: "控制器A2a2",
id: "110100202",
level: 3
},
{
name: "控制器A1a1",
id: "110100101",
level: 3
},
{
name: "控制器A2a2",
id: "110100202",
level: 3
},
{
name: "控制器A1a1",
id: "110100101",
level: 3
},
{
name: "控制器A2a2",
id: "110100202", id: "110100202",
level: 3 level: 3
} }
] ]
}, },
{ {
name: "控制器A2", name: "控制器B",
id: "1101002", id: "1101002",
level: 2 level: 2
} }

@ -178,7 +178,7 @@
position: fixed; position: fixed;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: end; justify-content: flex-end;
right: 0; right: 0;
bottom: 0; bottom: 0;
padding: 20px 40px 40px; padding: 20px 40px 40px;

@ -11,6 +11,7 @@ interface CardProductType {
state: string; state: string;
description: string; description: string;
deviceSort: string; deviceSort: string;
updateTime: string;
type: number; type: number;
} }
@ -52,14 +53,14 @@ const cardClass = computed(() => [
</div> </div>
<div class="model-updateTime"> <div class="model-updateTime">
<i class="iconfont icon-shijian model-content-icon" /> <i class="iconfont icon-shijian model-content-icon" />
更新时间: <span>{{ "2023.09.10" }}</span> 更新时间: <span>{{ device?.updateTime }}</span>
</div> </div>
<div class="model-introduction"> <div class="model-introduction">
模型简介: 模型简介:
<span>{{ device?.description }}</span> <span>{{ device?.description }}</span>
</div> </div>
</div> </div>
<div class="bg_logo"></div> <div class="bg_logo" />
</div> </div>
</template> </template>
@ -141,6 +142,11 @@ const cardClass = computed(() => [
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
color: #666; color: #666;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
span { span {
color: #333; color: #333;

@ -17,7 +17,7 @@ const svg = `
" style="stroke-width: 4px; fill: rgba(0, 0, 0, 0)"/> " style="stroke-width: 4px; fill: rgba(0, 0, 0, 0)"/>
`; `;
const pagination = ref({ current: 1, pageSize: 9, total: 0 }); const pagination = ref({ current: 1, pageSize: 48, total: 0 });
const deviceList = ref([]); const deviceList = ref([]);
@ -103,7 +103,7 @@ onMounted(() => {
v-model:currentPage="pagination.current" v-model:currentPage="pagination.current"
:page-size="pagination.pageSize" :page-size="pagination.pageSize"
:total="pagination.total" :total="pagination.total"
:page-sizes="[9, 24, 36]" :page-sizes="[18, 24, 36]"
:background="false" :background="false"
layout="total, sizes, prev, pager, next, jumper" layout="total, sizes, prev, pager, next, jumper"
@size-change="onPageSizeChange" @size-change="onPageSizeChange"

Loading…
Cancel
Save