调整样式

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

@@ -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,8 +42,20 @@
@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>
<!-- 导入弹窗 -->
@@ -49,15 +66,15 @@
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 { 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 { 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<{
@@ -99,10 +116,10 @@ const openImport = () => {
};
const chooseType = (e) => {
console.log(e,'yyyy')
console.log(e, 'yyyy');
where.type = e.label;
search();
}
};
// 批量删除
const removeBatch = () => {
@@ -189,7 +206,7 @@ const handleExport = async () => {
`${d.users ? JSON.parse(d.users).join(',') : ''}`,
`${d.signUser ? JSON.parse(d.signUser).join(',') : ''}`,
`${d.saleUser ? JSON.parse(d.saleUser).join(',') : ''}`,
`${d.files || ''}`,
`${d.files || ''}`
]);
});
const sheetName = `导出项目列表${dayjs(new Date()).format('YYYYMMDD')}`;
@@ -200,9 +217,7 @@ const handleExport = async () => {
const sheet = utils.aoa_to_sheet(array);
workbook.Sheets[sheetName] = sheet;
// 设置列宽
sheet['!cols'] = [
];
sheet['!cols'] = [];
message.loading('正在导出...');
setTimeout(() => {
writeFile(
@@ -218,14 +233,11 @@ const handleExport = async () => {
message.error(msg);
loading.value = false;
})
.finally(() => {
});
.finally(() => {});
};
watch(
() => props.selection,
() => {
}
() => {}
);
</script>

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="1" size="small">
<a-step title="单位信息" status="wait" />
<a-step title="项目管理" />
</a-steps>
</div>
</template>
<template #extra>
<Extra />
</template>
@@ -34,22 +42,38 @@
</template>
<template v-if="column.key === 'draftUser'">
<a-space direction="vertical" v-if="record.draftUser">
<a-tag v-for="(item,index) in JSON.parse(record.draftUser)" :key="index">{{ item }}</a-tag>
<a-tag
v-for="(item, index) in JSON.parse(record.draftUser)"
:key="index"
>{{ item }}</a-tag
>
</a-space>
</template>
<template v-if="column.key === 'users'">
<a-space direction="vertical" v-if="record.users">
<a-tag v-for="(item,index) in JSON.parse(record.users)" :key="index">{{ item }}</a-tag>
<a-tag
v-for="(item, index) in JSON.parse(record.users)"
:key="index"
>{{ item }}</a-tag
>
</a-space>
</template>
<template v-if="column.key === 'signUser'">
<a-space direction="vertical" v-if="record.signUser">
<a-tag v-for="(item,index) in JSON.parse(record.signUser)" :key="index">{{ item }}</a-tag>
<a-tag
v-for="(item, index) in JSON.parse(record.signUser)"
:key="index"
>{{ item }}</a-tag
>
</a-space>
</template>
<template v-if="column.key === 'saleUser'">
<a-space direction="vertical" v-if="record.saleUser">
<a-tag v-for="(item,index) in JSON.parse(record.saleUser)" :key="index">{{ item }}</a-tag>
<a-tag
v-for="(item, index) in JSON.parse(record.saleUser)"
:key="index"
>{{ item }}</a-tag
>
</a-space>
</template>
<template v-if="column.key === 'electron'">
@@ -61,7 +85,10 @@
<a-tag v-else color="red">未完成</a-tag>
</template>
<template v-if="column.key === 'createTime'">
<a-tooltip :title="`创建于:${record.createTime}`" class="flex flex-col">
<a-tooltip
:title="`创建于:${record.createTime}`"
class="flex flex-col"
>
<a-space>
<span>{{ toDateString(record.createTime, 'YYYY-MM-dd') }}</span>
<a-avatar :src="record.avatar" size="small" />
@@ -70,23 +97,26 @@
</template>
<template v-if="column.key === 'action'">
<div>
<a @click="openCaseManagement(record)">材料分析</a>
<a-divider type="vertical"/>
<a @click="openDocumentManagement(record)">项目文档</a>
<a-divider type="vertical"/>
<a @click="openEdit(record)">修改</a>
<a-space>
<a class="action-btn bg-blue-500" @click="openReport(record)"
>1生成报告</a
>
<a class="action-btn bg-green-600" @click="openReportContent(record)">2审计内容</a>
<a class="action-btn bg-red-600" @click="openAuditCheck(record)"
>3审计核查</a
>
</a-space>
</div>
<div>
<a class="text-pink-500" @click="openReport(record)">生成报告</a>
<a-divider type="vertical"/>
<a class="text-yellow-500" @click="openAuditCheck(record)">审计核查</a>
<a-divider type="vertical"/>
<div class="mt-2">
<a-space>
<a class="edit-btn" @click="openEdit(record)">修改</a>
<a-popconfirm
title="确定要删除此记录吗?"
@confirm="remove(record)"
>
<a class="ele-text-danger">删除</a>
<a class="remove-btn">删除</a>
</a-popconfirm>
</a-space>
</div>
</template>
</template>
@@ -97,8 +127,13 @@
<Edit v-model:visible="showEdit" :data="current" @done="reload" />
<!-- 生成报告 -->
<Report v-model:visible="showReport" :data="current" @done="reload" />
<ReportContent v-model:visible="showReportContent" :data="current" @done="reload" />
<!-- 审计核查弹窗 -->
<AuditCheck v-model:visible="showAuditCheck" :data="current" @done="reload"/>
<AuditCheck
v-model:visible="showAuditCheck"
:data="current"
@done="reload"
/>
<!-- 添加文档管理弹窗 -->
<a-modal
@@ -107,7 +142,7 @@
width="800px"
:footer="null"
>
<div style="margin-bottom: 16px;">
<div style="margin-bottom: 16px">
<a-button type="primary" @click="openImport">新增文档</a-button>
</div>
<a-table
@@ -122,7 +157,12 @@
showSizeChanger: false,
showTotal: (total) => `共 ${total} 条`
}"
@change="(pag) => { currentPage = pag.current; loadDocuments(); }"
@change="
(pag) => {
currentPage = pag.current;
loadDocuments();
}
"
>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
@@ -140,9 +180,11 @@
</a-modal>
<!-- 导入弹窗 -->
<Import v-model:visible="showImport" @done="loadDocuments" :kbId="currentKbId"/>
<Import
v-model:visible="showImport"
@done="loadDocuments"
:kbId="currentKbId"
/>
</a-page-header>
</template>
@@ -159,13 +201,21 @@ import type {
import Search from './components/search.vue';
import Edit from './components/pwlProjectEdit.vue';
import Report from './components/report.vue';
import {pagePwlProject, removePwlProject, removeBatchPwlProject} from '@/api/pwl/pwlProject';
import ReportContent from './components/reportContent.vue';
import {
pagePwlProject,
removePwlProject,
removeBatchPwlProject
} from '@/api/pwl/pwlProject';
import type { PwlProject, PwlProjectParam } from '@/api/pwl/pwlProject/model';
import {getPageTitle} from "@/utils/common";
import Extra from "./components/extra.vue";
import { getPageTitle } from '@/utils/common';
import Extra from './components/extra.vue';
import Import from '@/views/oa/oaCompany/components/Import.vue';
import {getKnowledgeBaseDocuments, deleteKnowledgeBaseDocument} from '@/api/ai/knowledgeBase';
import AuditCheck from "./components/auditCheck.vue";
import {
getKnowledgeBaseDocuments,
deleteKnowledgeBaseDocument
} from '@/api/ai/knowledgeBase';
import AuditCheck from './components/auditCheck.vue';
// 表格实例
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
@@ -203,12 +253,12 @@ const docColumns = ref([
{
title: '文件名',
dataIndex: 'name',
key: 'fileName',
key: 'fileName'
},
{
title: '文件大小',
dataIndex: 'size',
key: 'fileSize',
key: 'fileSize'
},
{
title: '上传时间',
@@ -219,7 +269,7 @@ const docColumns = ref([
{
title: '操作',
key: 'action',
width: 100,
width: 100
}
]);
@@ -280,7 +330,7 @@ const deleteDoc = async (record: any) => {
await deleteKnowledgeBaseDocument(currentKbId.value, record.id);
// 立即本地删除
const index = docList.value.findIndex(item => item.id === record.id);
const index = docList.value.findIndex((item) => item.id === record.id);
if (index > -1) {
docList.value.splice(index, 1);
total.value -= 1;
@@ -298,13 +348,7 @@ const openImport = () => {
};
// 表格数据源
const datasource: DatasourceFunction = ({
page,
limit,
where,
orders
}) => {
const datasource: DatasourceFunction = ({ page, limit, where, orders }) => {
return pagePwlProject({
...where,
...orders,
@@ -329,7 +373,7 @@ const columns = ref<ColumnItem[]>([
key: 'name',
width: 240,
fixed: 'left',
align: 'center',
align: 'center'
},
{
title: '报告编号',
@@ -337,7 +381,7 @@ const columns = ref<ColumnItem[]>([
key: 'code',
width: 240,
sorter: true,
align: 'center',
align: 'center'
},
{
title: '项目完成进度',
@@ -377,20 +421,20 @@ const columns = ref<ColumnItem[]>([
title: '所属年度',
dataIndex: 'itemYear',
key: 'itemYear',
align: 'center',
align: 'center'
},
{
title: '类型',
dataIndex: 'itemType',
key: 'itemType',
align: 'center',
align: 'center'
},
{
title: '审计意见',
dataIndex: 'itemOpinion',
key: 'itemOpinion',
align: 'center',
},
align: 'center'
}
]
},
{
@@ -404,7 +448,7 @@ const columns = ref<ColumnItem[]>([
title: '合同金额',
dataIndex: 'contractPrice',
key: 'contractPrice',
align: 'center',
align: 'center'
},
{
title: '实收金额',
@@ -424,7 +468,7 @@ const columns = ref<ColumnItem[]>([
dataIndex: 'bankName',
key: 'bankName',
align: 'center',
width: 120,
width: 120
},
{
title: '日期',
@@ -438,9 +482,9 @@ const columns = ref<ColumnItem[]>([
dataIndex: 'bankPrice',
key: 'bankPrice',
align: 'center',
width: 120,
},
],
width: 120
}
]
},
{
title: '开票信息',
@@ -460,16 +504,16 @@ const columns = ref<ColumnItem[]>([
dataIndex: 'invoicePrice',
key: 'invoicePrice',
align: 'center',
width: 120,
width: 120
},
{
title: '发票类型',
dataIndex: 'invoiceType',
key: 'invoiceType',
align: 'center',
width: 120,
},
],
width: 120
}
]
},
{
@@ -477,7 +521,7 @@ const columns = ref<ColumnItem[]>([
dataIndex: 'reportNum',
key: 'reportNum',
align: 'center',
width: 90,
width: 90
},
{
title: '底稿人员',
@@ -498,7 +542,7 @@ const columns = ref<ColumnItem[]>([
dataIndex: 'signUser',
key: 'signUser',
align: 'center',
width: 90,
width: 90
},
{
title: '展业人员',
@@ -512,14 +556,14 @@ const columns = ref<ColumnItem[]>([
dataIndex: 'electron',
key: 'electron',
align: 'center',
width: 120,
width: 120
},
{
title: '备注',
dataIndex: 'comments',
key: 'comments',
align: 'center',
width: 180,
width: 180
},
{
title: '创建时间',
@@ -556,7 +600,13 @@ const openEdit = (row?: PwlProject) => {
const openReport = (row?: PwlProject) => {
current.value = row ?? null;
showReport.value = true;
}
};
const showReportContent = ref(false)
const openReportContent = (row?: PwlProject) => {
current.value = row ?? null;
showReportContent.value = true;
};
/* 打开批量移动弹窗 */
const openMove = () => {
@@ -632,4 +682,34 @@ export default {
};
</script>
<style lang="less" scoped></style>
<style lang="less" scoped>
.action-btn {
border-radius: 3px;
padding: 3px;
color: white;
font-size: 12px;
}
.edit-btn {
border-radius: 3px;
padding: 3px 10px;
color: #3B82F6;
border: 1px solid #3B82F6;
font-size: 12px;
}
.remove-btn {
border-radius: 3px;
padding: 3px 10px;
color: red;
border: 1px solid red;
font-size: 12px;
}
</style>
<style scoped>
/* 修改已完成步骤的连接线颜色 */
.ant-steps-item-wait > .ant-steps-item-container > .ant-steps-item-tail::after {
background-color: red !important;
}
</style>