Commit 62fe937f authored by 罗林杰's avatar 罗林杰

修改我申请的文件

parent dce514bf
......@@ -231,7 +231,30 @@ export const DatasetByCreateDetailRoute: AppRouteRecordRaw = {
component: () =>
import('@/views/mallResourceDevelopment/dataSet/datasetByCreate/datasetByCreateDetail.vue'),
meta: {
title: '数据集详情',
title: '我创建的数据集详情',
icon: '',
},
},
],
};
/**商城资源开发-文件*/
export const MallSourceFileRoute: AppRouteRecordRaw = {
path: '/file',
name: '/file',
component: LAYOUT,
meta: {
title: '文件',
icon: '',
hidden: true,
currentActiveMenu: '/file',
},
children: [
{
path: 'fileByApply/fileByApplyDetail',
name: 'fileByApplyDetail',
component: () => import('@/views/mallResourceDevelopment/file/fileByApply/fileByApplyDetail.vue'),
meta: {
title: '我申请的文件详情',
icon: '',
},
},
......@@ -1084,6 +1107,7 @@ export const basicRoutes = [
dataBaseToDataBaseRoute,
RootRoute,
sqlExecuteRoute,
MallSourceFileRoute,
shellExecuteRoute,
DatasetByCreateDetailRoute,
SyncMaintenanceRoute,
......
import { BasicColumn, FormSchema } from '@/components/Table';
export const applyColumns: BasicColumn[] = [
{
title: '资源名称',
dataIndex: 'name',
width: 120,
},
{
title: '编目',
dataIndex: 'cataloging',
width: 120,
},
{
title: '权属机构',
dataIndex: 'workGroup',
width: 120,
},
{
title: '发布者',
dataIndex: 'publisher',
width: 120,
},
{
title: '发布时间',
dataIndex: 'publishTime',
width: 120,
},
{
title: '我的权限',
dataIndex: 'permission',
width: 120,
},
];
export const applyFormSchema: FormSchema[] = [
{
field: 'name',
label: ' ',
component: 'Input',
componentProps: {
placeholder: '搜索资源名称',
},
colProps: { span: 4 },
},
{
field: 'workGroup',
label: ' ',
component: 'Select',
componentProps: {
placeholder: '权属机构',
options: [
{ label: '测试功能部', value: '11' },
{ label: '开发部', value: '12' },
{ label: '市场部', value: '13' },
{ label: '财务部', value: '14' },
],
},
colProps: { span: 4 },
},
{
field: 'permission',
label: '',
component: 'Select',
componentProps: {
placeholder: '我的权限',
options: [
{ label: '全部', value: '1' },
{ label: '创建', value: '2' },
{ label: '编辑', value: '3' },
{ label: '删除', value: '4' },
{ label: '查看', value: '5' },
],
},
colProps: { span: 4 },
},
];
export const applySuccessData: any[] = [
{
name: '年度财务报告',
cataloging: '财务部/2024/12',
workGroup: '财务管理部',
publisher: '张伟',
publishTime: '2024-12-01',
permission: '可编辑',
},
{
name: '市场分析报告',
cataloging: '市场部/2024/11',
workGroup: '市场营销部',
publisher: '李娜',
publishTime: '2024-11-30',
permission: '只读',
},
{
name: '人力资源规划',
cataloging: '人事部/2024/10',
workGroup: '人力资源部',
publisher: '王芳',
publishTime: '2024-10-15',
permission: '可编辑',
},
];
export const applyData: any[] = [
{
name: '产品开发进度',
cataloging: '研发部/2024/09',
workGroup: '产品研发部',
publisher: '赵强',
publishTime: '2024-09-28',
permission: '只读',
},
];
export const applyFailedData: any[] = [
{
name: 'IT系统维护日志',
cataloging: '技术部/2024/08',
workGroup: '信息技术部',
publisher: '孙丽',
publishTime: '2024-08-20',
permission: '可编辑',
},
];
<template>
<div>11111</div>
<PageWrapper class="content-padding" contentBackground>
<template #headerContent>
<div class="modal_top">
<div>
<Icon
icon="material-symbols-light:dataset-linked-outline-sharp"
:size="50"
:color="'#64c6e9'"
/>
</div>
<div>
<div class="title">我申请的</div>
</div>
</div>
</template>
<template #footer>
<a-tabs v-model:activeKey="currentKey">
<a-tab-pane key="1" tab="申请成功" />
<a-tab-pane key="2" tab="申请中" />
<a-tab-pane key="3" tab="申请失败" />
</a-tabs>
</template>
<div class="pt-4 m-4 desc-wrap">
<template v-if="currentKey == '1'">
<BasicTable @register="registerApplySuccessTable" />
</template>
<template v-if="currentKey == '2'">
<BasicTable @register="registerApplyTable" />
</template>
<template v-if="currentKey == '3'">
<BasicTable @register="registerApplyFailedTable" />
</template>
</div>
</PageWrapper>
</template>
<script>
export default {
name: "index"
}
</script>
<script lang="ts" setup>
import { onMounted, ref } from 'vue';
import { PageWrapper } from '@/components/Page';
import { useTabs } from '@/hooks/web/useTabs';
import { Tabs } from 'ant-design-vue';
import { useMessage } from '@/hooks/web/useMessage';
import Icon from '@/components/Icon/Icon.vue';
import { BasicTable, useTable } from '@/components/Table';
import {
applyColumns,
applyFormSchema,
} from '@/views/mallResourceDevelopment/dataSet/dataSetByApply/data';
import {
applyData,
applyFailedData,
applySuccessData,
} from '@/views/mallResourceDevelopment/dataSet/dataSetByApply/datasetByApplyData';
defineOptions({ name: 'AccountDetail' });
const { createMessage } = useMessage();
const ATabs = Tabs;
const ATabPane = Tabs.TabPane;
const currentKey = ref('1');
const { setTitle } = useTabs();
setTitle('数据集详情');
<style scoped>
const [registerApplySuccessTable] = useTable({
dataSource: applySuccessData,
columns: applyColumns,
useSearchForm: true,
formConfig: {
showActionButtonGroup: false,
schemas: applyFormSchema,
autoSubmitOnEnter: true,
},
pagination: true,
showIndexColumn: false,
});
const [registerApplyTable] = useTable({
dataSource: applyData,
columns: applyColumns,
useSearchForm: true,
formConfig: {
showActionButtonGroup: false,
schemas: applyFormSchema,
autoSubmitOnEnter: true,
},
pagination: true,
showIndexColumn: false,
});
const [registerApplyFailedTable] = useTable({
dataSource: applyFailedData,
columns: applyColumns,
useSearchForm: true,
formConfig: {
showActionButtonGroup: false,
schemas: applyFormSchema,
autoSubmitOnEnter: true,
},
pagination: true,
showIndexColumn: false,
});
onMounted(() => {});
</script>
<style lang="scss" scoped>
.content-padding {
background-color: white;
}
.modal_top {
display: flex;
align-items: center;
.title {
font-size: 25px;
font-weight: 500;
margin-left: 10px;
margin-top: 20px;
}
.path {
font-size: 14px;
color: gray;
}
.buttonGroup {
margin-left: auto;
display: flex;
gap: 5px;
align-items: center;
}
}
.selected-row {
background-color: #5cb3ff; /* 可以根据需要调整颜色 */
}
</style>
......@@ -5,7 +5,7 @@
<template #headerContent>
<div class="headerContent">
<div>
<Icon icon="fluent:document-folder-16-regular" :size="40" :color="'#61aaff'" />
<Icon icon="solar:file-bold" :size="40" :color="'#61aaff'" />
</div>
<div>
<div class="title">{{ workSpaceName }}</div>
......
......@@ -279,7 +279,7 @@ export const cardList = [
title: '基本信息',
scene: 'databaseOfflineLoading',
parentWorkSpaceName: '党建建设',
icon: 'majesticons:table',
icon: 'tabler:file-3d',
color: '#71c8d5',
dept: '数据资源管理部',
description: '集团党委会、党委理论学习中心的学习会的组织实操、集团党委、纪委换届选举',
......@@ -294,7 +294,7 @@ export const cardList = [
title: '党员发展计划',
scene: 'partyDevelopmentPlan',
parentWorkSpaceName: '党建建设',
icon: 'majesticons:table',
icon: 'tabler:file-3d',
color: '#71c8d5',
dept: '组织人事部',
description: '制定年度党员发展计划,开展入党积极分子培训',
......@@ -309,7 +309,7 @@ export const cardList = [
title: '主题教育活动',
scene: 'themeEducationActivity',
parentWorkSpaceName: '党建建设',
icon: 'majesticons:table',
icon: 'tabler:file-3d',
color: '#71c8d5',
dept: '宣传部',
description: '举办各类主题教育活动,增强党员意识',
......@@ -324,7 +324,7 @@ export const cardList = [
title: '党建工作总结',
scene: 'partyWorkSummary',
parentWorkSpaceName: '党建建设',
icon: 'majesticons:table',
icon: 'tabler:file-3d',
color: '#71c8d5',
dept: '办公室',
description: '撰写季度党建工作总结报告',
......@@ -339,7 +339,7 @@ export const cardList = [
title: '党史知识竞赛',
scene: 'partyHistoryQuiz',
parentWorkSpaceName: '党建建设',
icon: 'majesticons:table',
icon: 'tabler:file-3d',
color: '#71c8d5',
dept: '宣传教育中心',
description: '组织党史知识竞赛,提升党员历史素养',
......
This diff is collapsed.
<template>
<BasicModal
width="55%"
v-bind="$attrs"
@register="registerModal"
:title="title"
@ok="handleSubmit"
>
<BasicTable @register="registerTable" />
</BasicModal>
</template>
<script lang="ts" setup>
import { onMounted, ref } from 'vue';
import { BasicModal, useModalInner } from '@/components/Modal';
import { useMessage } from '@/hooks/web/useMessage';
import { BasicTable, useTable } from '@/components/Table';
import { downloadColumns } from '@/views/mallResourceDevelopment/file/fileByApply/data';
import { downloadData } from '@/views/mallResourceDevelopment/file/fileByApply/fileByApplyData';
const emit = defineEmits(['success', 'register']);
const { createMessage } = useMessage();
const title = ref();
const tableData = ref([]);
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const [registerTable, { reload }] = useTable({
title: '选择下载范围',
api: async () => {
const response = {
pageNum: '1',
pageSize: '10',
pages: '1',
total: tableData.value.length,
code: '',
message: '',
data: [],
};
//过滤data中的数据,取出等于params.deptId的数据
var data = [];
data = tableData.value;
return { ...response, data: data };
},
rowSelection: {
type: 'radio',
},
striped: false,
pagination: false,
columns: downloadColumns,
useSearchForm: false,
showTableSetting: false,
bordered: true,
showIndexColumn: false,
});
//初始化弹框
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
await reload();
setModalProps({ confirmLoading: false });
title.value = data.title;
});
async function handleSubmit() {
closeModal();
createMessage.success('提交成功');
}
onMounted(() => {
tableData.value = downloadData;
});
</script>
<template>
<div>11111</div>
<PageWrapper class="content-padding" contentBackground>
<template #headerContent>
<div class="modal_top">
<div>
<Icon icon="hugeicons:file-euro" :size="50" :color="'#64c6e9'" />
</div>
<div>
<div class="title">我申请的</div>
</div>
</div>
</template>
<template #footer>
<a-tabs v-model:activeKey="currentKey">
<a-tab-pane key="1" tab="申请成功" />
<a-tab-pane key="2" tab="申请中" />
<a-tab-pane key="3" tab="申请失败" />
</a-tabs>
</template>
<div class="pt-4 m-4 desc-wrap">
<template v-if="currentKey == '1'">
<BasicTable @register="registerApplySuccessTable">
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
label: '详情',
onClick: handleDetail.bind(null, record),
},
]"
/>
</template>
</template>
</BasicTable>
</template>
<template v-if="currentKey == '2'">
<BasicTable @register="registerApplyTable">
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
label: '详情',
onClick: handleDetail.bind(null, record),
},
]"
/>
</template>
</template>
</BasicTable>
</template>
<template v-if="currentKey == '3'">
<BasicTable @register="registerApplyFailedTable">
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
label: '详情',
onClick: handleDetail.bind(null, record),
},
]"
/>
</template>
</template>
</BasicTable>
</template>
</div>
</PageWrapper>
</template>
<script>
export default {
name: "index"
}
</script>
<script lang="ts" setup>
import { onMounted, ref } from 'vue';
import { PageWrapper } from '@/components/Page';
import { useTabs } from '@/hooks/web/useTabs';
import { Tabs } from 'ant-design-vue';
import { useMessage } from '@/hooks/web/useMessage';
import Icon from '@/components/Icon/Icon.vue';
import { BasicTable, TableAction, useTable } from '@/components/Table';
import {
applyColumns,
applyFormSchema,
} from '@/views/mallResourceDevelopment/file/fileByApply/data';
import {
applyData,
applyFailedData,
applySuccessData,
} from '@/views/mallResourceDevelopment/file/fileByApply/fileByApplyData';
import { router } from '@/router';
defineOptions({ name: 'AccountDetail' });
const { createMessage } = useMessage();
const ATabs = Tabs;
const ATabPane = Tabs.TabPane;
const currentKey = ref('1');
const { setTitle } = useTabs();
setTitle('我申请的');
const [registerApplySuccessTable] = useTable({
dataSource: applySuccessData,
columns: applyColumns,
useSearchForm: true,
formConfig: {
showActionButtonGroup: false,
schemas: applyFormSchema,
autoSubmitOnEnter: true,
},
actionColumn: {
width: 120,
title: '操作',
dataIndex: 'action',
},
pagination: true,
showIndexColumn: false,
});
<style scoped>
const [registerApplyTable] = useTable({
dataSource: applyData,
columns: applyColumns,
useSearchForm: true,
formConfig: {
showActionButtonGroup: false,
schemas: applyFormSchema,
autoSubmitOnEnter: true,
},
actionColumn: {
width: 120,
title: '操作',
dataIndex: 'action',
},
pagination: true,
showIndexColumn: false,
});
const [registerApplyFailedTable] = useTable({
dataSource: applyFailedData,
columns: applyColumns,
useSearchForm: true,
formConfig: {
showActionButtonGroup: false,
schemas: applyFormSchema,
autoSubmitOnEnter: true,
},
actionColumn: {
width: 120,
title: '操作',
dataIndex: 'action',
},
pagination: true,
showIndexColumn: false,
});
function handleDetail(record: Recordable) {
router.push({
path: '/file/fileByApply/fileByApplyDetail',
query: {
name: record.name,
},
});
}
onMounted(() => {});
</script>
<style lang="scss" scoped>
.content-padding {
background-color: white;
}
.modal_top {
display: flex;
align-items: center;
.title {
font-size: 25px;
font-weight: 500;
margin-left: 10px;
margin-top: 20px;
}
.path {
font-size: 14px;
color: gray;
}
.buttonGroup {
margin-left: auto;
display: flex;
gap: 5px;
align-items: center;
}
}
.selected-row {
background-color: #5cb3ff; /* 可以根据需要调整颜色 */
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment