Merge branch 'master' of gitee.com:wang_fan_w/dc-admin
This commit is contained in:
commit
e89ed2a103
1
src/components.d.ts
vendored
1
src/components.d.ts
vendored
@ -7,7 +7,6 @@ export {}
|
||||
|
||||
declare module 'vue' {
|
||||
export interface GlobalComponents {
|
||||
CodemirrorCode: typeof import('./components/codemirror-code/index.vue')['default']
|
||||
CodeView: typeof import('./components/code-view/index.vue')['default']
|
||||
ExternalLinkPage: typeof import('./components/external-link-page/index.vue')['default']
|
||||
FillPage: typeof import('./components/fill-page/index.vue')['default']
|
||||
|
||||
@ -1 +1 @@
|
||||
@import "./style/index.scss";
|
||||
@import "@/style/index.scss";
|
||||
@ -1,9 +1,10 @@
|
||||
@import "./global-theme.scss";
|
||||
@import "./global-transition.scss";
|
||||
@import "./global-style.scss";
|
||||
@import "./loading-page.scss";
|
||||
@import "./card-animation.scss";
|
||||
@import "./media/media.scss";
|
||||
@import "@/style/global-theme.scss";
|
||||
@import "@/style/global-transition.scss";
|
||||
@import "@/style/global-style.scss";
|
||||
@import "@/style/loading-page.scss";
|
||||
@import "@/style/card-animation.scss";
|
||||
@import "@/style/media/media.scss";
|
||||
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
<a-form-item field="name">
|
||||
<a-space>
|
||||
<a-input v-model="form.name" placeholder="请输入搜索关键词" />
|
||||
<a-button type="primary" status="success">
|
||||
<a-button type="primary" status="success" @click="getList">
|
||||
<template #icon>
|
||||
<icon-search />
|
||||
</template>
|
||||
@ -47,7 +47,8 @@
|
||||
:bordered="{
|
||||
cell: true
|
||||
}"
|
||||
:data="data"
|
||||
:loading="loading"
|
||||
:data="list"
|
||||
:row-selection="rowSelection"
|
||||
v-model:selectedKeys="selectedKeys"
|
||||
:pagination="pagination"
|
||||
@ -74,7 +75,7 @@
|
||||
<a-badge status="danger" :text="record.flow" v-else />
|
||||
</template>
|
||||
</a-table-column>
|
||||
<a-table-column title="数据比例" data-index="percent" width="200">
|
||||
<a-table-column title="数据比例" data-index="percent" :width="200">
|
||||
<template #cell="{ record }">
|
||||
<a-progress v-if="record.percent >= 60" :percent="record.percent / 100" />
|
||||
<a-progress
|
||||
@ -93,13 +94,13 @@
|
||||
</a-space>
|
||||
</template>
|
||||
</a-table-column>
|
||||
<a-table-column title="操作" width="200">
|
||||
<a-table-column title="操作" :width="200">
|
||||
<template #cell="cell">
|
||||
<a-space>
|
||||
<a-button size="mini" type="primary">详情</a-button>
|
||||
<a-button size="mini">修改</a-button>
|
||||
<a-popconfirm content="确定删除这条数据吗?" type="warning">
|
||||
<a-button size="mini" type="primary" status="danger">删除</a-button>
|
||||
<a-button size="mini" type="primary" status="danger" @click="onDelete(cell)">删除</a-button>
|
||||
</a-popconfirm>
|
||||
</a-space>
|
||||
</template>
|
||||
@ -110,6 +111,8 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { log } from "console";
|
||||
|
||||
const form = ref({
|
||||
name: ""
|
||||
});
|
||||
@ -126,13 +129,17 @@ const pageChange = (page: number) => {
|
||||
const pageSizeChange = (pageSize: number) => {
|
||||
pagination.value.pageSize = pageSize;
|
||||
};
|
||||
const data = reactive([
|
||||
const onDelete = (cell: any) => {
|
||||
console.log("删除", cell);
|
||||
};
|
||||
|
||||
const originalList = ref([
|
||||
{
|
||||
key: "1",
|
||||
source: "bilibili",
|
||||
sourceSvg: "bilibili",
|
||||
sourceType: "分享",
|
||||
flow: 5015,
|
||||
flow: "5015",
|
||||
percent: "75",
|
||||
status: 1,
|
||||
createTime: "2024-05-27 09:00:00"
|
||||
@ -142,7 +149,7 @@ const data = reactive([
|
||||
source: "微信",
|
||||
sourceSvg: "wechat",
|
||||
sourceType: "分享",
|
||||
flow: 3217,
|
||||
flow: "3217",
|
||||
percent: "60",
|
||||
status: 0,
|
||||
createTime: "2024-05-26 15:30:00"
|
||||
@ -152,7 +159,7 @@ const data = reactive([
|
||||
source: "QQ音乐",
|
||||
sourceSvg: "QQ音乐",
|
||||
sourceType: "搜索",
|
||||
flow: 1343,
|
||||
flow: "1343",
|
||||
percent: "55",
|
||||
status: 1,
|
||||
createTime: "2024-05-25 12:45:00"
|
||||
@ -162,7 +169,7 @@ const data = reactive([
|
||||
source: "百度",
|
||||
sourceSvg: "百度",
|
||||
sourceType: "搜索",
|
||||
flow: 1235,
|
||||
flow: "1235",
|
||||
percent: "20",
|
||||
status: 0,
|
||||
createTime: "2024-05-24 11:20:00"
|
||||
@ -172,7 +179,7 @@ const data = reactive([
|
||||
source: "优酷",
|
||||
sourceSvg: "优酷",
|
||||
sourceType: "首页推荐",
|
||||
flow: 3456,
|
||||
flow: "3456",
|
||||
percent: "20",
|
||||
status: 1,
|
||||
createTime: "2024-05-23 14:10:00"
|
||||
@ -182,7 +189,7 @@ const data = reactive([
|
||||
source: "网易云音乐",
|
||||
sourceSvg: "网易云音乐",
|
||||
sourceType: "每日一推",
|
||||
flow: 5873,
|
||||
flow: "5873",
|
||||
percent: "30",
|
||||
status: 0,
|
||||
createTime: "2024-05-22 10:05:00"
|
||||
@ -192,7 +199,7 @@ const data = reactive([
|
||||
source: "抖音",
|
||||
sourceSvg: "抖音",
|
||||
sourceType: "自然",
|
||||
flow: 5465,
|
||||
flow: "5465",
|
||||
percent: "86",
|
||||
status: 1,
|
||||
createTime: "2024-05-21 08:45:00"
|
||||
@ -202,7 +209,7 @@ const data = reactive([
|
||||
source: "西瓜视频",
|
||||
sourceSvg: "西瓜视频",
|
||||
sourceType: "搜索",
|
||||
flow: 4642,
|
||||
flow: "4642",
|
||||
percent: "45",
|
||||
status: 0,
|
||||
createTime: "2024-05-20 16:30:00"
|
||||
@ -212,7 +219,7 @@ const data = reactive([
|
||||
source: "微博",
|
||||
sourceSvg: "微博",
|
||||
sourceType: "搜索",
|
||||
flow: 2375,
|
||||
flow: "2375",
|
||||
percent: "60",
|
||||
status: 1,
|
||||
createTime: "2024-05-19 09:20:00"
|
||||
@ -222,12 +229,46 @@ const data = reactive([
|
||||
source: "豆瓣",
|
||||
sourceSvg: "豆瓣网",
|
||||
sourceType: "搜索",
|
||||
flow: 2465,
|
||||
flow: "2465",
|
||||
percent: "40",
|
||||
status: 0,
|
||||
createTime: "2024-05-18 13:55:00"
|
||||
}
|
||||
]);
|
||||
const loading = ref(false);
|
||||
const list = ref<any>([]);
|
||||
const getList = () => {
|
||||
try {
|
||||
loading.value = true;
|
||||
setTimeout(() => {
|
||||
list.value = shuffleArray(originalList.value);
|
||||
loading.value = false;
|
||||
}, 500);
|
||||
} catch {
|
||||
loading.value = false;
|
||||
}
|
||||
};
|
||||
getList();
|
||||
|
||||
const shuffleArray = (arr: any) => {
|
||||
// 循环遍历数组,从最后一个元素开始向前,
|
||||
// 递减生成,确保数组的每个值都被照顾到
|
||||
for (let i = arr.length - 1; i > 0; i--) {
|
||||
// 生成一个随机索引 j,范围是从 0 到 i
|
||||
// 生成的最大值就是arr数组的最大索引
|
||||
const j = Math.floor(Math.random() * (i + 1));
|
||||
// 交换 arr[i] 和 arr[j] 的值 (当前遍历的值和新生成的索引值)
|
||||
[arr[i], arr[j]] = [arr[j], arr[i]];
|
||||
// 随机修改值
|
||||
arr[i].flow = String(Math.floor(Math.random() * 5000));
|
||||
arr[i].percent = String(Math.floor(Math.random() * 100));
|
||||
}
|
||||
return arr;
|
||||
};
|
||||
|
||||
defineExpose({
|
||||
getList
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@ -30,7 +30,6 @@ const emit = defineEmits(["onNode"]);
|
||||
|
||||
const onNode = (selectedKeys: Array<string>) => {
|
||||
let list = findParentsTailRecursive(treeData.value, selectedKeys[0]);
|
||||
console.log("节点", list);
|
||||
emit("onNode", list);
|
||||
};
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
</a-breadcrumb>
|
||||
</div>
|
||||
<a-divider margin="0" />
|
||||
<FileTable class="file-table-style" />
|
||||
<FileTable ref="FileTableRef" class="file-table-style" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -26,9 +26,11 @@
|
||||
import FileTree from "@/views/file-management/document-library/components/file-tree.vue";
|
||||
import FileTable from "@/views/file-management/document-library/components/file-table.vue";
|
||||
|
||||
const FileTableRef = ref();
|
||||
const breadcrumb = ref<any>([]);
|
||||
const onNode = (list: any) => {
|
||||
breadcrumb.value = list;
|
||||
FileTableRef.value && FileTableRef.value.getList();
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
</template>
|
||||
<template #default>查询</template>
|
||||
</a-button>
|
||||
<a-button @click="$refs.formRef.resetFields()">
|
||||
<a-button @click="onReset">
|
||||
<template #icon>
|
||||
<icon-refresh />
|
||||
</template>
|
||||
@ -181,7 +181,10 @@ const rowSelection = reactive({
|
||||
showCheckedAll: true,
|
||||
onlyCurrent: false
|
||||
});
|
||||
|
||||
const formRef = ref();
|
||||
const onReset = () => {
|
||||
formRef.value.resetFields();
|
||||
};
|
||||
const pagination = ref({ showPageSize: true, showTotal: true, current: 1, pageSize: 10, total: 10 });
|
||||
const pageChange = (page: number) => {
|
||||
pagination.value.current = page;
|
||||
@ -189,7 +192,7 @@ const pageChange = (page: number) => {
|
||||
const pageSizeChange = (pageSize: number) => {
|
||||
pagination.value.pageSize = pageSize;
|
||||
};
|
||||
const columnsShow = ref([]);
|
||||
const columnsShow = ref<any>([]);
|
||||
const columns = ref([
|
||||
{
|
||||
title: "集合编号",
|
||||
|
||||
1
src/vite-env.d.ts
vendored
1
src/vite-env.d.ts
vendored
@ -13,3 +13,4 @@ declare module "@codemirror/theme-one-dark";
|
||||
declare module "@codemirror/lang-json";
|
||||
declare module "@codemirror/lang-javascript";
|
||||
declare module "@codemirror/lang-vue";
|
||||
declare module "nprogress";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user