保存进度!

This commit is contained in:
2025-10-31 19:08:12 +08:00
parent 390a5efbb8
commit af3442f276
9 changed files with 493 additions and 58 deletions

View File

@@ -2,7 +2,7 @@
* @Author: Kane Wang <wangkane@qq.com>
* @Date: 2025-10-13 15:31:41
* @LastEditors: Kane Wang
* @LastModified: 2025-10-30 15:16:59
* @LastModified: 2025-10-31 15:10:46
* @FilePath: src/router/index.ts
* @Description:
*
@@ -75,7 +75,7 @@ const routes = [
path: "/new-regulatory",
name: "NewRegulatory",
meta: {
title: "新建",
title: "测试用 - 新建",
icon: "OfficeBuilding",
},
hidden: false,
@@ -85,7 +85,7 @@ const routes = [
path: "/upload-regulatory",
name: "UploadRegulatory",
meta: {
title: "上传制度",
title: "测试用 - 上传制度",
icon: "OfficeBuilding",
},
hidden: false,

View File

@@ -13,6 +13,14 @@ interface RegulatoryData {
department_name: string;
release_year: string;
regulatory_name: string;
comment: string;
regulatory_files: null | RegulatoryFile[]
}
export { type RegulatoryData };
interface RegulatoryFile {
regulatory_file_name: string;
file_url: string;
file_type: string
}
export { type RegulatoryData, type RegulatoryFile };

View File

@@ -12,7 +12,7 @@ Copyright © CPIC All rights reserved
<span>名称</span>
</el-col>
<el-col :span="10">
<el-input />
<el-input style="text-align:center;" />
</el-col>
</el-row>
<el-row :gutter="10">
@@ -40,7 +40,7 @@ Copyright © CPIC All rights reserved
<el-row :gutter="10">
<el-col :span="3">
<div class="button-wrapper-left">
<el-button type="primary" icon="document">
<el-button type="primary" icon="document" @click="showUploadFileDialog">
新增文档
</el-button>
<el-button type="primary" icon="document">
@@ -58,6 +58,51 @@ Copyright © CPIC All rights reserved
</el-col>
</el-row>
</div>
<el-table
width="100%" stripe
border
:head-cell-style="headerCellStyle"
>
<el-table-column label="文件名" align="center" width="200px">
<template #default="file">
<span>{{ file.row.filename }}</span>
</template>
</el-table-column>
<el-table-column label="文件类型" align="center">
<template #default="file">
<span>{{ file.row.filename }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="200px">
<el-button type="primary" icon="search">
查看
</el-button>
</el-table-column>
</el-table>
<div class="upload-dialog-wrapper">
<el-dialog
v-model="ui.showUploadDialog" title="上传文件"
width="600px"
:close-on-click-model="false" :close-on-press-escape="false"
:show-close="true"
>
<el-upload
drag
:action="ui.urlFileUpload"
name="files"
:show-file-list="false"
:data="ui.uploadParameters"
:on-success="onUploadSuccess"
>
<el-icon class="el-icon--upload">
<upload-filled />
</el-icon>
<div class="el-upload__text">
将文件拖到此处<em>点击上传</em>
</div>
</el-upload>
</el-dialog>
</div>
</div>
</template>
<script lang="ts">
@@ -70,11 +115,36 @@ export default {
{
const ui = reactive({
showUI: true,
}
showUploadDialog: false,
urlFileUpload: "",
uploadParameters: {
"file-name": "1234",
},
showFileList: false,
});
const headerCellStyle = reactive(
{
textAlign: "center",
}
);
const cellStyle = reactive({
textAlign: "center",
});
const onUploadSuccess = ()=> {};
const showUploadFileDialog = (): void =>
{
ui.showUploadDialog = true;
};
return {
ui,
headerCellStyle,
cellStyle,
onUploadSuccess,
showUploadFileDialog,
};
},
};
@@ -96,4 +166,8 @@ export default {
{
@include query-box-wrap;
}
:deep(.el-input) .el-input__inner {
text-align: center;
}
</style>

View File

@@ -92,11 +92,15 @@ export default {
department_name: "信息技术部",
release_year: "2019",
regulatory_name: "关于印发修订后的《太平洋产险厦门分公司信息系统账号权限管理实施细则》的通知",
comment:"",
regulatory_files: [],
},
{
department_name: "信息技术部",
release_year: "2019",
regulatory_name: "关于印发修订后的《太平洋产险厦门分公司个人信息保护管理实施细则》的通知",
comment:"",
regulatory_files: [],
},
],
});