调整样式

This commit is contained in:
2025-10-20 19:46:28 +08:00
parent ae5d429630
commit 823f2b43c6
11 changed files with 2130 additions and 689 deletions

View File

@@ -5,5 +5,5 @@ VITE_API_URL=https://cms-api.websoft.top/api
#VITE_SOCKET_URL=ws://127.0.0.1:9191
#VITE_SERVER_URL=http://127.0.0.1:8000/api
VITE_API_URL=http://127.0.0.1:9200/api
#VITE_API_URL=http://127.0.0.1:9200/api
#/booking/bookingItem

BIN
public/bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 MiB

BIN
src/assets/单位.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

BIN
src/assets/资料文件.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
src/assets/项目管理.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

85
src/views/home/index.vue Normal file
View File

@@ -0,0 +1,85 @@
<template>
<div class="bg" style="overflow-y: auto">
<div class="flex flex-col justify-center items-center">
<div class="flex justify-center items-center">
<div class="card" @click="jump('/project')">
<span>项目管理</span>
<img
src="@/assets/项目管理.png"
class="icon"
/>
</div>
<div class="card" @click="jump('/company')">
<span>单位信息</span>
<img
src="@/assets/单位.png"
class="icon"
/>
</div>
<div class="card" @click="jump('/library')">
<span>资料库</span>
<img
src="@/assets/资料文件.png"
class="icon"
/>
</div>
</div>
</div>
</div>
</template>
<script setup>
import { ref } from 'vue';
import { hasRole } from '@/utils/permission';
import { useRouter } from 'vue-router';
import { useUserStore } from '@/store/modules/user';
const { push } = useRouter();
const jump = (path) => {
push({ path });
};
const userStore = useUserStore();
const bookingMenu = userStore.menus.find((item) => item.path === '/booking');
const chartMenu = userStore.menus.find((item) => item.path === '/chart');
</script>
<style>
.bg {
background: url('../../../public/bg.png') no-repeat;
background-size: cover;
width: 100vw;
height: calc(100vh - 40px);
padding-top: 10%;
}
.title {
padding-left: 10px;
border-left: 5px solid #409eff;
font-size: 1.25rem;
font-weight: bold;
margin: 20px 0;
}
.card {
width: 250px;
height: 150px;
border-radius: 15px;
background-color: white;
margin: 2rem;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
font-size: 1.25rem;
box-shadow: 1px 1px 10px rgba(0, 0, 0, 0.2);
cursor: pointer;
}
.icon {
width: 60px;
height: 60px;
margin-bottom: 5px;
}
</style>

View File

@@ -1,5 +1,13 @@
<template>
<a-page-header :title="getPageTitle()" @back="() => $router.go(-1)">
<template #subTitle>
<div style="width: 300px;margin-left: 100px">
<a-steps :current="0" size="small">
<a-step title="单位信息" />
<a-step title="项目管理" />
</a-steps>
</div>
</template>
<a-card :bordered="false" :body-style="{ padding: '16px' }">
<ele-pro-table
ref="tableRef"
@@ -406,4 +414,9 @@ export default {
};
</script>
<style lang="less" scoped></style>
<style scoped>
/* 修改已完成步骤的连接线颜色 */
.ant-steps-item-finish > .ant-steps-item-container > .ant-steps-item-tail::after {
background-color: red !important; /* 自定义颜色 */
}
</style>

View File

@@ -131,7 +131,6 @@
AI生成
</a-button>
</template>
<!-- <div v-if="item.description" class="section-description">-->
<!-- {{ item.description }}-->
<!-- </div>-->

File diff suppressed because it is too large Load Diff

View File

@@ -3,7 +3,7 @@
<a-space :size="10" style="flex-wrap: wrap">
<a-button type="primary" class="ele-btn-icon" @click="add">
<template #icon>
<PlusOutlined/>
<PlusOutlined />
</template>
<span>添加</span>
</a-button>
@@ -16,7 +16,7 @@
@click="removeBatch"
>
<template #icon>
<DeleteOutlined/>
<DeleteOutlined />
</template>
<span>批量删除</span>
</a-button>
@@ -28,7 +28,12 @@
v-model:value="where.type"
@done="chooseType"
/>
<a-date-picker v-model:value="where.itemYear" value-format="YYYY" picker="year" @change="onYear" />
<a-date-picker
v-model:value="where.itemYear"
value-format="YYYY"
picker="year"
@change="onYear"
/>
<a-input-search
allow-clear
placeholder="请输入关键词"
@@ -37,195 +42,202 @@
@search="search"
/>
<a-button @click="reset">重置</a-button>
<a-button type="text" v-if="hasRole('superAdmin')" @click="handleExport">导出xls</a-button>
<a-button type="text" v-if="hasRole('superAdmin')" @click="openImport">导入xls</a-button>
<div
class="border-blue-400 text-blue-400 rounded border border-solid py-1 px-2 text-sm cursor-pointer"
type="text"
v-if="hasRole('superAdmin')"
@click="handleExport"
>导出xls</div
>
<div
class="border-green-600 text-green-600 rounded border border-solid py-1 px-2 text-sm cursor-pointer"
type="text"
v-if="hasRole('superAdmin')"
@click="openImport"
>导入xls</div
>
</a-space>
<!-- 导入弹窗 -->
<Import v-model:visible="showImport" @done="search"/>
<Import v-model:visible="showImport" @done="search" />
</template>
<script lang="ts" setup>
import {DeleteOutlined, PlusOutlined} from '@ant-design/icons-vue';
import type {GradeParam} from '@/api/user/grade/model';
import {watch, ref} from 'vue';
import {hasRole} from "@/utils/permission";
import dayjs from 'dayjs';
import {message} from 'ant-design-vue';
import {utils, writeFile} from 'xlsx';
import {PwlProject, PwlProjectParam} from "@/api/pwl/pwlProject/model";
import useSearch from "@/utils/use-search";
import {listPwlProject} from "@/api/pwl/pwlProject";
import Import from "./Import.vue";
import DictSelect from "@/components/DictSelect/index.vue";
import { DeleteOutlined, PlusOutlined } from '@ant-design/icons-vue';
import type { GradeParam } from '@/api/user/grade/model';
import { watch, ref } from 'vue';
import { hasRole } from '@/utils/permission';
import dayjs from 'dayjs';
import { message } from 'ant-design-vue';
import { utils, writeFile } from 'xlsx';
import { PwlProject, PwlProjectParam } from '@/api/pwl/pwlProject/model';
import useSearch from '@/utils/use-search';
import { listPwlProject } from '@/api/pwl/pwlProject';
import Import from './Import.vue';
import DictSelect from '@/components/DictSelect/index.vue';
const props = withDefaults(
defineProps<{
// 选中的角色
selection?: [];
}>(),
{}
);
const props = withDefaults(
defineProps<{
// 选中的角色
selection?: [];
}>(),
{}
);
const emit = defineEmits<{
(e: 'search', where?: GradeParam): void;
(e: 'add'): void;
(e: 'remove'): void;
(e: 'batchMove'): void;
}>();
const emit = defineEmits<{
(e: 'search', where?: GradeParam): void;
(e: 'add'): void;
(e: 'remove'): void;
(e: 'batchMove'): void;
}>();
// 新增
const add = () => {
emit('add');
};
// 日期范围选择
const dateRange = ref<[string, string]>(['', '']);
const loading = ref(false);
const projectList = ref<PwlProject[]>([]);
const xlsFileName = ref<string>();
// 是否显示用户导入弹窗
const showImport = ref(false);
// 表单数据
const {where,resetFields} = useSearch<PwlProjectParam>({
id: undefined,
type: undefined,
itemYear: undefined,
keywords: undefined
});
/* 打开编辑弹窗 */
const openImport = () => {
showImport.value = true;
};
const chooseType = (e) => {
console.log(e,'yyyy')
where.type = e.label;
search();
}
// 批量删除
const removeBatch = () => {
emit('remove');
};
const onYear = (date: any, dateString: string) => {
where.itemYear = dateString;
search();
};
/* 搜索 */
const search = () => {
const [d1, d2] = dateRange.value ?? [];
emit('search', {
...where,
createTimeStart: d1 ? d1 + ' 00:00:00' : '',
createTimeEnd: d2 ? d2 + ' 23:59:59' : ''
// 新增
const add = () => {
emit('add');
};
// 日期范围选择
const dateRange = ref<[string, string]>(['', '']);
const loading = ref(false);
const projectList = ref<PwlProject[]>([]);
const xlsFileName = ref<string>();
// 是否显示用户导入弹窗
const showImport = ref(false);
// 表单数据
const { where, resetFields } = useSearch<PwlProjectParam>({
id: undefined,
type: undefined,
itemYear: undefined,
keywords: undefined
});
};
/* 重置 */
const reset = () => {
resetFields();
search();
};
/* 打开编辑弹窗 */
const openImport = () => {
showImport.value = true;
};
// 导出
const handleExport = async () => {
loading.value = true;
const array: (string | number)[][] = [
[
'报告时间',
'审计单位',
'报告编号',
'项目信息-开票单位/汇款人',
'项目信息-所属年度',
'项目信息-类型',
'项目信息-审计意见',
'年末资产总额(万元)',
'合同金额',
'实收金额',
'到账信息-银行',
'到账信息-日期',
'到账信息-金额',
'开票信息-日期',
'开票信息-金额',
'开票信息-发票类型',
'报告份数',
'底稿人员',
'参与人员',
'签字注会',
'展业人员',
'底稿情况'
]
];
const chooseType = (e) => {
console.log(e, 'yyyy');
where.type = e.label;
search();
};
// 按搜索结果导出
where.sceneType = 'Content';
await listPwlProject(where)
.then((list) => {
projectList.value = list;
list?.forEach((d: PwlProject) => {
array.push([
`${d.expirationTime || ''}`,
`${d.name || ''}`,
`${d.code || ''}`,
`${d.itemName || ''}`,
`${d.itemYear || ''}`,
`${d.itemType || ''}`,
`${d.itemOpinion || ''}`,
`${d.totalAssets || ''}`,
// `${d.comments || ''}`,
`${d.contractPrice || ''}`,
`${d.payPrice || ''}`,
`${d.bankName || ''}`,
`${d.bankPayTime || ''}`,
`${d.bankPrice || ''}`,
`${d.invoiceTime || ''}`,
`${d.invoicePrice || ''}`,
`${d.invoiceType || ''}`,
`${d.reportNum || ''}`,
`${d.draftUser ? JSON.parse(d.draftUser).join(',') : ''}`,
`${d.users ? JSON.parse(d.users).join(',') : ''}`,
`${d.signUser ? JSON.parse(d.signUser).join(',') : ''}`,
`${d.saleUser ? JSON.parse(d.saleUser).join(',') : ''}`,
`${d.files || ''}`,
]);
});
const sheetName = `导出项目列表${dayjs(new Date()).format('YYYYMMDD')}`;
const workbook = {
SheetNames: [sheetName],
Sheets: {}
};
const sheet = utils.aoa_to_sheet(array);
workbook.Sheets[sheetName] = sheet;
// 设置列宽
sheet['!cols'] = [
// 批量删除
const removeBatch = () => {
emit('remove');
};
];
message.loading('正在导出...');
setTimeout(() => {
writeFile(
workbook,
`${
where.createTimeEnd ? xlsFileName.value + '_' : ''
}${sheetName}.xlsx`
);
loading.value = false;
}, 1000);
})
.catch((msg) => {
message.error(msg);
loading.value = false;
})
.finally(() => {
const onYear = (date: any, dateString: string) => {
where.itemYear = dateString;
search();
};
/* 搜索 */
const search = () => {
const [d1, d2] = dateRange.value ?? [];
emit('search', {
...where,
createTimeStart: d1 ? d1 + ' 00:00:00' : '',
createTimeEnd: d2 ? d2 + ' 23:59:59' : ''
});
};
};
/* 重置 */
const reset = () => {
resetFields();
search();
};
watch(
() => props.selection,
() => {
}
);
// 导出
const handleExport = async () => {
loading.value = true;
const array: (string | number)[][] = [
[
'报告时间',
'审计单位',
'报告编号',
'项目信息-开票单位/汇款人',
'项目信息-所属年度',
'项目信息-类型',
'项目信息-审计意见',
'年末资产总额(万元)',
'合同金额',
'实收金额',
'到账信息-银行',
'到账信息-日期',
'到账信息-金额',
'开票信息-日期',
'开票信息-金额',
'开票信息-发票类型',
'报告份数',
'底稿人员',
'参与人员',
'签字注会',
'展业人员',
'底稿情况'
]
];
// 按搜索结果导出
where.sceneType = 'Content';
await listPwlProject(where)
.then((list) => {
projectList.value = list;
list?.forEach((d: PwlProject) => {
array.push([
`${d.expirationTime || ''}`,
`${d.name || ''}`,
`${d.code || ''}`,
`${d.itemName || ''}`,
`${d.itemYear || ''}`,
`${d.itemType || ''}`,
`${d.itemOpinion || ''}`,
`${d.totalAssets || ''}`,
// `${d.comments || ''}`,
`${d.contractPrice || ''}`,
`${d.payPrice || ''}`,
`${d.bankName || ''}`,
`${d.bankPayTime || ''}`,
`${d.bankPrice || ''}`,
`${d.invoiceTime || ''}`,
`${d.invoicePrice || ''}`,
`${d.invoiceType || ''}`,
`${d.reportNum || ''}`,
`${d.draftUser ? JSON.parse(d.draftUser).join(',') : ''}`,
`${d.users ? JSON.parse(d.users).join(',') : ''}`,
`${d.signUser ? JSON.parse(d.signUser).join(',') : ''}`,
`${d.saleUser ? JSON.parse(d.saleUser).join(',') : ''}`,
`${d.files || ''}`
]);
});
const sheetName = `导出项目列表${dayjs(new Date()).format('YYYYMMDD')}`;
const workbook = {
SheetNames: [sheetName],
Sheets: {}
};
const sheet = utils.aoa_to_sheet(array);
workbook.Sheets[sheetName] = sheet;
// 设置列宽
sheet['!cols'] = [];
message.loading('正在导出...');
setTimeout(() => {
writeFile(
workbook,
`${
where.createTimeEnd ? xlsFileName.value + '_' : ''
}${sheetName}.xlsx`
);
loading.value = false;
}, 1000);
})
.catch((msg) => {
message.error(msg);
loading.value = false;
})
.finally(() => {});
};
watch(
() => props.selection,
() => {}
);
</script>

File diff suppressed because it is too large Load Diff