调整样式

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_SOCKET_URL=ws://127.0.0.1:9191
#VITE_SERVER_URL=http://127.0.0.1:8000/api #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 #/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> <template>
<a-page-header :title="getPageTitle()" @back="() => $router.go(-1)"> <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' }"> <a-card :bordered="false" :body-style="{ padding: '16px' }">
<ele-pro-table <ele-pro-table
ref="tableRef" ref="tableRef"
@@ -406,4 +414,9 @@ export default {
}; };
</script> </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生成 AI生成
</a-button> </a-button>
</template> </template>
<!-- <div v-if="item.description" class="section-description">--> <!-- <div v-if="item.description" class="section-description">-->
<!-- {{ item.description }}--> <!-- {{ item.description }}-->
<!-- </div>--> <!-- </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-space :size="10" style="flex-wrap: wrap">
<a-button type="primary" class="ele-btn-icon" @click="add"> <a-button type="primary" class="ele-btn-icon" @click="add">
<template #icon> <template #icon>
<PlusOutlined/> <PlusOutlined />
</template> </template>
<span>添加</span> <span>添加</span>
</a-button> </a-button>
@@ -16,7 +16,7 @@
@click="removeBatch" @click="removeBatch"
> >
<template #icon> <template #icon>
<DeleteOutlined/> <DeleteOutlined />
</template> </template>
<span>批量删除</span> <span>批量删除</span>
</a-button> </a-button>
@@ -28,7 +28,12 @@
v-model:value="where.type" v-model:value="where.type"
@done="chooseType" @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 <a-input-search
allow-clear allow-clear
placeholder="请输入关键词" placeholder="请输入关键词"
@@ -37,101 +42,113 @@
@search="search" @search="search"
/> />
<a-button @click="reset">重置</a-button> <a-button @click="reset">重置</a-button>
<a-button type="text" v-if="hasRole('superAdmin')" @click="handleExport">导出xls</a-button> <div
<a-button type="text" v-if="hasRole('superAdmin')" @click="openImport">导入xls</a-button> 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> </a-space>
<!-- 导入弹窗 --> <!-- 导入弹窗 -->
<Import v-model:visible="showImport" @done="search"/> <Import v-model:visible="showImport" @done="search" />
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import {DeleteOutlined, PlusOutlined} from '@ant-design/icons-vue'; import { DeleteOutlined, PlusOutlined } from '@ant-design/icons-vue';
import type {GradeParam} from '@/api/user/grade/model'; import type { GradeParam } from '@/api/user/grade/model';
import {watch, ref} from 'vue'; import { watch, ref } from 'vue';
import {hasRole} from "@/utils/permission"; import { hasRole } from '@/utils/permission';
import dayjs from 'dayjs'; import dayjs from 'dayjs';
import {message} from 'ant-design-vue'; import { message } from 'ant-design-vue';
import {utils, writeFile} from 'xlsx'; import { utils, writeFile } from 'xlsx';
import {PwlProject, PwlProjectParam} from "@/api/pwl/pwlProject/model"; import { PwlProject, PwlProjectParam } from '@/api/pwl/pwlProject/model';
import useSearch from "@/utils/use-search"; import useSearch from '@/utils/use-search';
import {listPwlProject} from "@/api/pwl/pwlProject"; import { listPwlProject } from '@/api/pwl/pwlProject';
import Import from "./Import.vue"; import Import from './Import.vue';
import DictSelect from "@/components/DictSelect/index.vue"; import DictSelect from '@/components/DictSelect/index.vue';
const props = withDefaults( const props = withDefaults(
defineProps<{ defineProps<{
// 选中的角色 // 选中的角色
selection?: []; selection?: [];
}>(), }>(),
{} {}
); );
const emit = defineEmits<{ const emit = defineEmits<{
(e: 'search', where?: GradeParam): void; (e: 'search', where?: GradeParam): void;
(e: 'add'): void; (e: 'add'): void;
(e: 'remove'): void; (e: 'remove'): void;
(e: 'batchMove'): void; (e: 'batchMove'): void;
}>(); }>();
// 新增 // 新增
const add = () => { const add = () => {
emit('add'); emit('add');
}; };
// 日期范围选择 // 日期范围选择
const dateRange = ref<[string, string]>(['', '']); const dateRange = ref<[string, string]>(['', '']);
const loading = ref(false); const loading = ref(false);
const projectList = ref<PwlProject[]>([]); const projectList = ref<PwlProject[]>([]);
const xlsFileName = ref<string>(); const xlsFileName = ref<string>();
// 是否显示用户导入弹窗 // 是否显示用户导入弹窗
const showImport = ref(false); const showImport = ref(false);
// 表单数据 // 表单数据
const {where,resetFields} = useSearch<PwlProjectParam>({ const { where, resetFields } = useSearch<PwlProjectParam>({
id: undefined, id: undefined,
type: undefined, type: undefined,
itemYear: undefined, itemYear: undefined,
keywords: undefined keywords: undefined
}); });
/* 打开编辑弹窗 */ /* 打开编辑弹窗 */
const openImport = () => { const openImport = () => {
showImport.value = true; showImport.value = true;
}; };
const chooseType = (e) => { const chooseType = (e) => {
console.log(e,'yyyy') console.log(e, 'yyyy');
where.type = e.label; where.type = e.label;
search(); search();
} };
// 批量删除 // 批量删除
const removeBatch = () => { const removeBatch = () => {
emit('remove'); emit('remove');
}; };
const onYear = (date: any, dateString: string) => { const onYear = (date: any, dateString: string) => {
where.itemYear = dateString; where.itemYear = dateString;
search(); search();
}; };
/* 搜索 */ /* 搜索 */
const search = () => { const search = () => {
const [d1, d2] = dateRange.value ?? []; const [d1, d2] = dateRange.value ?? [];
emit('search', { emit('search', {
...where, ...where,
createTimeStart: d1 ? d1 + ' 00:00:00' : '', createTimeStart: d1 ? d1 + ' 00:00:00' : '',
createTimeEnd: d2 ? d2 + ' 23:59:59' : '' createTimeEnd: d2 ? d2 + ' 23:59:59' : ''
}); });
}; };
/* 重置 */ /* 重置 */
const reset = () => { const reset = () => {
resetFields(); resetFields();
search(); search();
}; };
// 导出 // 导出
const handleExport = async () => { const handleExport = async () => {
loading.value = true; loading.value = true;
const array: (string | number)[][] = [ const array: (string | number)[][] = [
[ [
@@ -189,7 +206,7 @@ const handleExport = async () => {
`${d.users ? JSON.parse(d.users).join(',') : ''}`, `${d.users ? JSON.parse(d.users).join(',') : ''}`,
`${d.signUser ? JSON.parse(d.signUser).join(',') : ''}`, `${d.signUser ? JSON.parse(d.signUser).join(',') : ''}`,
`${d.saleUser ? JSON.parse(d.saleUser).join(',') : ''}`, `${d.saleUser ? JSON.parse(d.saleUser).join(',') : ''}`,
`${d.files || ''}`, `${d.files || ''}`
]); ]);
}); });
const sheetName = `导出项目列表${dayjs(new Date()).format('YYYYMMDD')}`; const sheetName = `导出项目列表${dayjs(new Date()).format('YYYYMMDD')}`;
@@ -200,9 +217,7 @@ const handleExport = async () => {
const sheet = utils.aoa_to_sheet(array); const sheet = utils.aoa_to_sheet(array);
workbook.Sheets[sheetName] = sheet; workbook.Sheets[sheetName] = sheet;
// 设置列宽 // 设置列宽
sheet['!cols'] = [ sheet['!cols'] = [];
];
message.loading('正在导出...'); message.loading('正在导出...');
setTimeout(() => { setTimeout(() => {
writeFile( writeFile(
@@ -218,14 +233,11 @@ const handleExport = async () => {
message.error(msg); message.error(msg);
loading.value = false; loading.value = false;
}) })
.finally(() => { .finally(() => {});
}); };
}; watch(
watch(
() => props.selection, () => props.selection,
() => { () => {}
} );
);
</script> </script>

View File

@@ -1,7 +1,15 @@
<template> <template>
<a-page-header :title="getPageTitle()" @back="() => $router.go(-1)"> <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> <template #extra>
<Extra/> <Extra />
</template> </template>
<a-card :bordered="false" :body-style="{ padding: '16px' }"> <a-card :bordered="false" :body-style="{ padding: '16px' }">
<ele-pro-table <ele-pro-table
@@ -26,7 +34,7 @@
</template> </template>
<template #bodyCell="{ column, record }"> <template #bodyCell="{ column, record }">
<template v-if="column.key === 'image'"> <template v-if="column.key === 'image'">
<a-image v-if="record.image" :src="record.image" :width="50"/> <a-image v-if="record.image" :src="record.image" :width="50" />
</template> </template>
<template v-if="column.key === 'status'"> <template v-if="column.key === 'status'">
<a-tag v-if="record.status === 0" color="green">已完成</a-tag> <a-tag v-if="record.status === 0" color="green">已完成</a-tag>
@@ -34,22 +42,38 @@
</template> </template>
<template v-if="column.key === 'draftUser'"> <template v-if="column.key === 'draftUser'">
<a-space direction="vertical" v-if="record.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> </a-space>
</template> </template>
<template v-if="column.key === 'users'"> <template v-if="column.key === 'users'">
<a-space direction="vertical" v-if="record.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> </a-space>
</template> </template>
<template v-if="column.key === 'signUser'"> <template v-if="column.key === 'signUser'">
<a-space direction="vertical" v-if="record.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> </a-space>
</template> </template>
<template v-if="column.key === 'saleUser'"> <template v-if="column.key === 'saleUser'">
<a-space direction="vertical" v-if="record.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> </a-space>
</template> </template>
<template v-if="column.key === 'electron'"> <template v-if="column.key === 'electron'">
@@ -61,7 +85,10 @@
<a-tag v-else color="red">未完成</a-tag> <a-tag v-else color="red">未完成</a-tag>
</template> </template>
<template v-if="column.key === 'createTime'"> <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> <a-space>
<span>{{ toDateString(record.createTime, 'YYYY-MM-dd') }}</span> <span>{{ toDateString(record.createTime, 'YYYY-MM-dd') }}</span>
<a-avatar :src="record.avatar" size="small" /> <a-avatar :src="record.avatar" size="small" />
@@ -70,23 +97,26 @@
</template> </template>
<template v-if="column.key === 'action'"> <template v-if="column.key === 'action'">
<div> <div>
<a @click="openCaseManagement(record)">材料分析</a> <a-space>
<a-divider type="vertical"/> <a class="action-btn bg-blue-500" @click="openReport(record)"
<a @click="openDocumentManagement(record)">项目文档</a> >1生成报告</a
<a-divider type="vertical"/> >
<a @click="openEdit(record)">修改</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>
<div> <div class="mt-2">
<a class="text-pink-500" @click="openReport(record)">生成报告</a> <a-space>
<a-divider type="vertical"/> <a class="edit-btn" @click="openEdit(record)">修改</a>
<a class="text-yellow-500" @click="openAuditCheck(record)">审计核查</a>
<a-divider type="vertical"/>
<a-popconfirm <a-popconfirm
title="确定要删除此记录吗?" title="确定要删除此记录吗?"
@confirm="remove(record)" @confirm="remove(record)"
> >
<a class="ele-text-danger">删除</a> <a class="remove-btn">删除</a>
</a-popconfirm> </a-popconfirm>
</a-space>
</div> </div>
</template> </template>
</template> </template>
@@ -94,11 +124,16 @@
</a-card> </a-card>
<!-- 编辑弹窗 --> <!-- 编辑弹窗 -->
<Edit v-model:visible="showEdit" :data="current" @done="reload"/> <Edit v-model:visible="showEdit" :data="current" @done="reload" />
<!-- 生成报告 --> <!-- 生成报告 -->
<Report v-model:visible="showReport" :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 <a-modal
@@ -107,7 +142,7 @@
width="800px" width="800px"
:footer="null" :footer="null"
> >
<div style="margin-bottom: 16px;"> <div style="margin-bottom: 16px">
<a-button type="primary" @click="openImport">新增文档</a-button> <a-button type="primary" @click="openImport">新增文档</a-button>
</div> </div>
<a-table <a-table
@@ -122,7 +157,12 @@
showSizeChanger: false, showSizeChanger: false,
showTotal: (total) => `共 ${total} 条` showTotal: (total) => `共 ${total} 条`
}" }"
@change="(pag) => { currentPage = pag.current; loadDocuments(); }" @change="
(pag) => {
currentPage = pag.current;
loadDocuments();
}
"
> >
<template #bodyCell="{ column, record }"> <template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'"> <template v-if="column.key === 'action'">
@@ -140,75 +180,85 @@
</a-modal> </a-modal>
<!-- 导入弹窗 --> <!-- 导入弹窗 -->
<Import v-model:visible="showImport" @done="loadDocuments" :kbId="currentKbId"/> <Import
v-model:visible="showImport"
@done="loadDocuments"
:kbId="currentKbId"
/>
</a-page-header> </a-page-header>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import {createVNode, ref} from 'vue'; import { createVNode, ref } from 'vue';
import {message, Modal} from 'ant-design-vue'; import { message, Modal } from 'ant-design-vue';
import {ExclamationCircleOutlined} from '@ant-design/icons-vue'; import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
import type {EleProTable} from 'ele-admin-pro'; import type { EleProTable } from 'ele-admin-pro';
import {toDateString} from 'ele-admin-pro'; import { toDateString } from 'ele-admin-pro';
import type { import type {
DatasourceFunction, DatasourceFunction,
ColumnItem ColumnItem
} from 'ele-admin-pro/es/ele-pro-table/types'; } from 'ele-admin-pro/es/ele-pro-table/types';
import Search from './components/search.vue'; import Search from './components/search.vue';
import Edit from './components/pwlProjectEdit.vue'; import Edit from './components/pwlProjectEdit.vue';
import Report from './components/report.vue'; import Report from './components/report.vue';
import {pagePwlProject, removePwlProject, removeBatchPwlProject} from '@/api/pwl/pwlProject'; import ReportContent from './components/reportContent.vue';
import type {PwlProject, PwlProjectParam} from '@/api/pwl/pwlProject/model'; import {
import {getPageTitle} from "@/utils/common"; pagePwlProject,
import Extra from "./components/extra.vue"; removePwlProject,
import Import from '@/views/oa/oaCompany/components/Import.vue'; removeBatchPwlProject
import {getKnowledgeBaseDocuments, deleteKnowledgeBaseDocument} from '@/api/ai/knowledgeBase'; } from '@/api/pwl/pwlProject';
import AuditCheck from "./components/auditCheck.vue"; import type { PwlProject, PwlProjectParam } from '@/api/pwl/pwlProject/model';
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';
// 表格实例 // 表格实例
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null); const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
// 表格选中数据 // 表格选中数据
const selection = ref<PwlProject[]>([]); const selection = ref<PwlProject[]>([]);
// 当前编辑数据 // 当前编辑数据
const current = ref<PwlProject | null>(null); const current = ref<PwlProject | null>(null);
// 是否显示编辑弹窗 // 是否显示编辑弹窗
const showEdit = ref(false); const showEdit = ref(false);
// 是否显示报告弹窗 // 是否显示报告弹窗
const showReport = ref(false); const showReport = ref(false);
// 是否显示审计核查弹窗 // 是否显示审计核查弹窗
const showAuditCheck = ref(false); const showAuditCheck = ref(false);
// 是否显示批量移动弹窗 // 是否显示批量移动弹窗
const showMove = ref(false); const showMove = ref(false);
// const draftUser = ref<string[]>([]); // const draftUser = ref<string[]>([]);
// const users = ref<string[]>([]); // const users = ref<string[]>([]);
// const signUser = ref<string[]>([]); // const signUser = ref<string[]>([]);
// const saleUser = ref<string[]>([]); // const saleUser = ref<string[]>([]);
// 加载状态 // 加载状态
const loading = ref(true); const loading = ref(true);
// 文档管理相关响应式变量 // 文档管理相关响应式变量
const showDocManage = ref(false); // 是否显示文档管理弹窗 const showDocManage = ref(false); // 是否显示文档管理弹窗
const showImport = ref(false); // 是否显示导入弹窗 const showImport = ref(false); // 是否显示导入弹窗
const currentKbId = ref(''); // 当前知识库ID const currentKbId = ref(''); // 当前知识库ID
const currentDocType = ref(''); // 当前文档类型(材料分析/项目文档) const currentDocType = ref(''); // 当前文档类型(材料分析/项目文档)
const docList = ref<any[]>([]); // 文档列表数据 const docList = ref<any[]>([]); // 文档列表数据
const docLoading = ref(false); // 文档加载状态 const docLoading = ref(false); // 文档加载状态
const currentPage = ref(1); const currentPage = ref(1);
const total = ref(0); const total = ref(0);
// 文档表格列配置 // 文档表格列配置
const docColumns = ref([ const docColumns = ref([
{ {
title: '文件名', title: '文件名',
dataIndex: 'name', dataIndex: 'name',
key: 'fileName', key: 'fileName'
}, },
{ {
title: '文件大小', title: '文件大小',
dataIndex: 'size', dataIndex: 'size',
key: 'fileSize', key: 'fileSize'
}, },
{ {
title: '上传时间', title: '上传时间',
@@ -219,18 +269,18 @@ const docColumns = ref([
{ {
title: '操作', title: '操作',
key: 'action', key: 'action',
width: 100, width: 100
} }
]); ]);
// 打开审计核查弹窗 // 打开审计核查弹窗
const openAuditCheck = (record: PwlProject) => { const openAuditCheck = (record: PwlProject) => {
current.value = record; current.value = record;
showAuditCheck.value = true; showAuditCheck.value = true;
}; };
// 打开材料分析 // 打开材料分析
const openCaseManagement = (record: PwlProject) => { const openCaseManagement = (record: PwlProject) => {
if (!record.analysisLibrary) { if (!record.analysisLibrary) {
message.warning('当前记录没有关联材料分析知识库'); message.warning('当前记录没有关联材料分析知识库');
return; return;
@@ -240,10 +290,10 @@ const openCaseManagement = (record: PwlProject) => {
currentPage.value = 1; currentPage.value = 1;
showDocManage.value = true; showDocManage.value = true;
loadDocuments(); loadDocuments();
}; };
// 打开项目文档 // 打开项目文档
const openDocumentManagement = (record: PwlProject) => { const openDocumentManagement = (record: PwlProject) => {
if (!record.projectLibrary) { if (!record.projectLibrary) {
message.warning('当前记录没有关联项目文档知识库'); message.warning('当前记录没有关联项目文档知识库');
return; return;
@@ -253,10 +303,10 @@ const openDocumentManagement = (record: PwlProject) => {
currentPage.value = 1; currentPage.value = 1;
showDocManage.value = true; showDocManage.value = true;
loadDocuments(); loadDocuments();
}; };
// 加载文档列表 // 加载文档列表
const loadDocuments = async () => { const loadDocuments = async () => {
docLoading.value = true; docLoading.value = true;
try { try {
const response = await getKnowledgeBaseDocuments( const response = await getKnowledgeBaseDocuments(
@@ -272,15 +322,15 @@ const loadDocuments = async () => {
} finally { } finally {
docLoading.value = false; docLoading.value = false;
} }
}; };
// 删除文档 // 删除文档
const deleteDoc = async (record: any) => { const deleteDoc = async (record: any) => {
try { try {
await deleteKnowledgeBaseDocument(currentKbId.value, record.id); 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) { if (index > -1) {
docList.value.splice(index, 1); docList.value.splice(index, 1);
total.value -= 1; total.value -= 1;
@@ -290,31 +340,25 @@ const deleteDoc = async (record: any) => {
message.error('删除失败'); message.error('删除失败');
console.error(error); console.error(error);
} }
}; };
// 打开导入弹窗 // 打开导入弹窗
const openImport = () => { const openImport = () => {
showImport.value = true; showImport.value = true;
}; };
// 表格数据源
const datasource: DatasourceFunction = ({
page,
limit,
where,
orders
}) => {
// 表格数据源
const datasource: DatasourceFunction = ({ page, limit, where, orders }) => {
return pagePwlProject({ return pagePwlProject({
...where, ...where,
...orders, ...orders,
page, page,
limit limit
}); });
}; };
// 表格列配置 // 表格列配置
const columns = ref<ColumnItem[]>([ const columns = ref<ColumnItem[]>([
{ {
title: '序号', title: '序号',
key: 'index', key: 'index',
@@ -329,7 +373,7 @@ const columns = ref<ColumnItem[]>([
key: 'name', key: 'name',
width: 240, width: 240,
fixed: 'left', fixed: 'left',
align: 'center', align: 'center'
}, },
{ {
title: '报告编号', title: '报告编号',
@@ -337,7 +381,7 @@ const columns = ref<ColumnItem[]>([
key: 'code', key: 'code',
width: 240, width: 240,
sorter: true, sorter: true,
align: 'center', align: 'center'
}, },
{ {
title: '项目完成进度', title: '项目完成进度',
@@ -377,20 +421,20 @@ const columns = ref<ColumnItem[]>([
title: '所属年度', title: '所属年度',
dataIndex: 'itemYear', dataIndex: 'itemYear',
key: 'itemYear', key: 'itemYear',
align: 'center', align: 'center'
}, },
{ {
title: '类型', title: '类型',
dataIndex: 'itemType', dataIndex: 'itemType',
key: 'itemType', key: 'itemType',
align: 'center', align: 'center'
}, },
{ {
title: '审计意见', title: '审计意见',
dataIndex: 'itemOpinion', dataIndex: 'itemOpinion',
key: 'itemOpinion', key: 'itemOpinion',
align: 'center', align: 'center'
}, }
] ]
}, },
{ {
@@ -404,7 +448,7 @@ const columns = ref<ColumnItem[]>([
title: '合同金额', title: '合同金额',
dataIndex: 'contractPrice', dataIndex: 'contractPrice',
key: 'contractPrice', key: 'contractPrice',
align: 'center', align: 'center'
}, },
{ {
title: '实收金额', title: '实收金额',
@@ -424,7 +468,7 @@ const columns = ref<ColumnItem[]>([
dataIndex: 'bankName', dataIndex: 'bankName',
key: 'bankName', key: 'bankName',
align: 'center', align: 'center',
width: 120, width: 120
}, },
{ {
title: '日期', title: '日期',
@@ -438,9 +482,9 @@ const columns = ref<ColumnItem[]>([
dataIndex: 'bankPrice', dataIndex: 'bankPrice',
key: 'bankPrice', key: 'bankPrice',
align: 'center', align: 'center',
width: 120, width: 120
}, }
], ]
}, },
{ {
title: '开票信息', title: '开票信息',
@@ -460,16 +504,16 @@ const columns = ref<ColumnItem[]>([
dataIndex: 'invoicePrice', dataIndex: 'invoicePrice',
key: 'invoicePrice', key: 'invoicePrice',
align: 'center', align: 'center',
width: 120, width: 120
}, },
{ {
title: '发票类型', title: '发票类型',
dataIndex: 'invoiceType', dataIndex: 'invoiceType',
key: 'invoiceType', key: 'invoiceType',
align: 'center', align: 'center',
width: 120, width: 120
}, }
], ]
}, },
{ {
@@ -477,7 +521,7 @@ const columns = ref<ColumnItem[]>([
dataIndex: 'reportNum', dataIndex: 'reportNum',
key: 'reportNum', key: 'reportNum',
align: 'center', align: 'center',
width: 90, width: 90
}, },
{ {
title: '底稿人员', title: '底稿人员',
@@ -498,7 +542,7 @@ const columns = ref<ColumnItem[]>([
dataIndex: 'signUser', dataIndex: 'signUser',
key: 'signUser', key: 'signUser',
align: 'center', align: 'center',
width: 90, width: 90
}, },
{ {
title: '展业人员', title: '展业人员',
@@ -512,14 +556,14 @@ const columns = ref<ColumnItem[]>([
dataIndex: 'electron', dataIndex: 'electron',
key: 'electron', key: 'electron',
align: 'center', align: 'center',
width: 120, width: 120
}, },
{ {
title: '备注', title: '备注',
dataIndex: 'comments', dataIndex: 'comments',
key: 'comments', key: 'comments',
align: 'center', align: 'center',
width: 180, width: 180
}, },
{ {
title: '创建时间', title: '创建时间',
@@ -529,7 +573,7 @@ const columns = ref<ColumnItem[]>([
sorter: true, sorter: true,
width: 180, width: 180,
ellipsis: true, ellipsis: true,
customRender: ({text}) => toDateString(text, 'yyyy-MM-dd HH:mm') customRender: ({ text }) => toDateString(text, 'yyyy-MM-dd HH:mm')
}, },
{ {
title: '操作', title: '操作',
@@ -539,32 +583,38 @@ const columns = ref<ColumnItem[]>([
align: 'center', align: 'center',
hideInSetting: true hideInSetting: true
} }
]); ]);
/* 搜索 */ /* 搜索 */
const reload = (where?: PwlProjectParam) => { const reload = (where?: PwlProjectParam) => {
selection.value = []; selection.value = [];
tableRef?.value?.reload({where: where}); tableRef?.value?.reload({ where: where });
}; };
/* 打开编辑弹窗 */ /* 打开编辑弹窗 */
const openEdit = (row?: PwlProject) => { const openEdit = (row?: PwlProject) => {
current.value = row ?? null; current.value = row ?? null;
showEdit.value = true; showEdit.value = true;
}; };
const openReport = (row?: PwlProject) => { const openReport = (row?: PwlProject) => {
current.value = row ?? null; current.value = row ?? null;
showReport.value = true; showReport.value = true;
} };
/* 打开批量移动弹窗 */ const showReportContent = ref(false)
const openMove = () => { const openReportContent = (row?: PwlProject) => {
current.value = row ?? null;
showReportContent.value = true;
};
/* 打开批量移动弹窗 */
const openMove = () => {
showMove.value = true; showMove.value = true;
}; };
/* 删除单个 */ /* 删除单个 */
const remove = (row: PwlProject) => { const remove = (row: PwlProject) => {
const hide = message.loading('请求中..', 0); const hide = message.loading('请求中..', 0);
removePwlProject(row.id) removePwlProject(row.id)
.then((msg) => { .then((msg) => {
@@ -576,10 +626,10 @@ const remove = (row: PwlProject) => {
hide(); hide();
message.error(e.message); message.error(e.message);
}); });
}; };
/* 批量删除 */ /* 批量删除 */
const removeBatch = () => { const removeBatch = () => {
if (!selection.value.length) { if (!selection.value.length) {
message.error('请至少选择一条数据'); message.error('请至少选择一条数据');
return; return;
@@ -603,15 +653,15 @@ const removeBatch = () => {
}); });
} }
}); });
}; };
/* 查询 */ /* 查询 */
const query = () => { const query = () => {
loading.value = true; loading.value = true;
}; };
/* 自定义行属性 */ /* 自定义行属性 */
const customRow = (record: PwlProject) => { const customRow = (record: PwlProject) => {
return { return {
// 行点击事件 // 行点击事件
onClick: () => { onClick: () => {
@@ -622,14 +672,44 @@ const customRow = (record: PwlProject) => {
openEdit(record); openEdit(record);
} }
}; };
}; };
query(); query();
</script> </script>
<script lang="ts"> <script lang="ts">
export default { export default {
name: 'PwlProject' name: 'PwlProject'
}; };
</script> </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>