调整样式

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,101 +42,113 @@
@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(
const props = withDefaults(
defineProps<{
// 选中的角色
selection?: [];
}>(),
{}
);
);
const emit = defineEmits<{
const emit = defineEmits<{
(e: 'search', where?: GradeParam): void;
(e: 'add'): void;
(e: 'remove'): void;
(e: 'batchMove'): void;
}>();
}>();
// 新增
const add = () => {
// 新增
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>({
};
// 日期范围选择
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 = () => {
/* 打开编辑弹窗 */
const openImport = () => {
showImport.value = true;
};
};
const chooseType = (e) => {
console.log(e,'yyyy')
const chooseType = (e) => {
console.log(e, 'yyyy');
where.type = e.label;
search();
}
};
// 批量删除
const removeBatch = () => {
// 批量删除
const removeBatch = () => {
emit('remove');
};
};
const onYear = (date: any, dateString: string) => {
const onYear = (date: any, dateString: string) => {
where.itemYear = dateString;
search();
};
};
/* 搜索 */
const 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 = () => {
/* 重置 */
const reset = () => {
resetFields();
search();
};
};
// 导出
const handleExport = async () => {
// 导出
const handleExport = async () => {
loading.value = true;
const array: (string | number)[][] = [
[
@@ -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(
watch(
() => props.selection,
() => {
}
);
() => {}
);
</script>

View File

@@ -1,7 +1,15 @@
<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/>
<Extra />
</template>
<a-card :bordered="false" :body-style="{ padding: '16px' }">
<ele-pro-table
@@ -26,7 +34,7 @@
</template>
<template #bodyCell="{ column, record }">
<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 v-if="column.key === 'status'">
<a-tag v-if="record.status === 0" color="green">已完成</a-tag>
@@ -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>
@@ -94,11 +124,16 @@
</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
@@ -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,75 +180,85 @@
</a-modal>
<!-- 导入弹窗 -->
<Import v-model:visible="showImport" @done="loadDocuments" :kbId="currentKbId"/>
<Import
v-model:visible="showImport"
@done="loadDocuments"
:kbId="currentKbId"
/>
</a-page-header>
</template>
<script lang="ts" setup>
import {createVNode, ref} from 'vue';
import {message, Modal} from 'ant-design-vue';
import {ExclamationCircleOutlined} from '@ant-design/icons-vue';
import type {EleProTable} from 'ele-admin-pro';
import {toDateString} from 'ele-admin-pro';
import type {
import { createVNode, ref } from 'vue';
import { message, Modal } from 'ant-design-vue';
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
import type { EleProTable } from 'ele-admin-pro';
import { toDateString } from 'ele-admin-pro';
import type {
DatasourceFunction,
ColumnItem
} from 'ele-admin-pro/es/ele-pro-table/types';
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 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";
} from 'ele-admin-pro/es/ele-pro-table/types';
import Search from './components/search.vue';
import Edit from './components/pwlProjectEdit.vue';
import Report from './components/report.vue';
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 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 current = ref<PwlProject | null>(null);
// 是否显示编辑弹窗
const showEdit = ref(false);
// 是否显示报告弹窗
const showReport = ref(false);
// 是否显示审计核查弹窗
const showAuditCheck = ref(false);
// 是否显示批量移动弹窗
const showMove = ref(false);
// const draftUser = ref<string[]>([]);
// const users = ref<string[]>([]);
// const signUser = ref<string[]>([]);
// const saleUser = ref<string[]>([]);
// 加载状态
const loading = ref(true);
// 文档管理相关响应式变量
const showDocManage = ref(false); // 是否显示文档管理弹窗
const showImport = ref(false); // 是否显示导入弹窗
const currentKbId = ref(''); // 当前知识库ID
const currentDocType = ref(''); // 当前文档类型(材料分析/项目文档)
const docList = ref<any[]>([]); // 文档列表数据
const docLoading = ref(false); // 文档加载状态
const currentPage = ref(1);
const total = ref(0);
// 表格选中数据
const selection = ref<PwlProject[]>([]);
// 当前编辑数据
const current = ref<PwlProject | null>(null);
// 是否显示编辑弹窗
const showEdit = ref(false);
// 是否显示报告弹窗
const showReport = ref(false);
// 是否显示审计核查弹窗
const showAuditCheck = ref(false);
// 是否显示批量移动弹窗
const showMove = ref(false);
// const draftUser = ref<string[]>([]);
// const users = ref<string[]>([]);
// const signUser = ref<string[]>([]);
// const saleUser = ref<string[]>([]);
// 加载状态
const loading = ref(true);
// 文档管理相关响应式变量
const showDocManage = ref(false); // 是否显示文档管理弹窗
const showImport = ref(false); // 是否显示导入弹窗
const currentKbId = ref(''); // 当前知识库ID
const currentDocType = ref(''); // 当前文档类型(材料分析/项目文档)
const docList = ref<any[]>([]); // 文档列表数据
const docLoading = ref(false); // 文档加载状态
const currentPage = ref(1);
const total = ref(0);
// 文档表格列配置
const docColumns = ref([
// 文档表格列配置
const docColumns = ref([
{
title: '文件名',
dataIndex: 'name',
key: 'fileName',
key: 'fileName'
},
{
title: '文件大小',
dataIndex: 'size',
key: 'fileSize',
key: 'fileSize'
},
{
title: '上传时间',
@@ -219,18 +269,18 @@ const docColumns = ref([
{
title: '操作',
key: 'action',
width: 100,
width: 100
}
]);
]);
// 打开审计核查弹窗
const openAuditCheck = (record: PwlProject) => {
// 打开审计核查弹窗
const openAuditCheck = (record: PwlProject) => {
current.value = record;
showAuditCheck.value = true;
};
};
// 打开材料分析
const openCaseManagement = (record: PwlProject) => {
// 打开材料分析
const openCaseManagement = (record: PwlProject) => {
if (!record.analysisLibrary) {
message.warning('当前记录没有关联材料分析知识库');
return;
@@ -240,10 +290,10 @@ const openCaseManagement = (record: PwlProject) => {
currentPage.value = 1;
showDocManage.value = true;
loadDocuments();
};
};
// 打开项目文档
const openDocumentManagement = (record: PwlProject) => {
// 打开项目文档
const openDocumentManagement = (record: PwlProject) => {
if (!record.projectLibrary) {
message.warning('当前记录没有关联项目文档知识库');
return;
@@ -253,10 +303,10 @@ const openDocumentManagement = (record: PwlProject) => {
currentPage.value = 1;
showDocManage.value = true;
loadDocuments();
};
};
// 加载文档列表
const loadDocuments = async () => {
// 加载文档列表
const loadDocuments = async () => {
docLoading.value = true;
try {
const response = await getKnowledgeBaseDocuments(
@@ -272,15 +322,15 @@ const loadDocuments = async () => {
} finally {
docLoading.value = false;
}
};
};
// 删除文档
const deleteDoc = async (record: any) => {
// 删除文档
const deleteDoc = async (record: any) => {
try {
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;
@@ -290,31 +340,25 @@ const deleteDoc = async (record: any) => {
message.error('删除失败');
console.error(error);
}
};
};
// 打开导入弹窗
const openImport = () => {
// 打开导入弹窗
const openImport = () => {
showImport.value = true;
};
// 表格数据源
const datasource: DatasourceFunction = ({
page,
limit,
where,
orders
}) => {
};
// 表格数据源
const datasource: DatasourceFunction = ({ page, limit, where, orders }) => {
return pagePwlProject({
...where,
...orders,
page,
limit
});
};
};
// 表格列配置
const columns = ref<ColumnItem[]>([
// 表格列配置
const columns = ref<ColumnItem[]>([
{
title: '序号',
key: 'index',
@@ -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: '创建时间',
@@ -529,7 +573,7 @@ const columns = ref<ColumnItem[]>([
sorter: true,
width: 180,
ellipsis: true,
customRender: ({text}) => toDateString(text, 'yyyy-MM-dd HH:mm')
customRender: ({ text }) => toDateString(text, 'yyyy-MM-dd HH:mm')
},
{
title: '操作',
@@ -539,32 +583,38 @@ const columns = ref<ColumnItem[]>([
align: 'center',
hideInSetting: true
}
]);
]);
/* 搜索 */
const reload = (where?: PwlProjectParam) => {
/* 搜索 */
const reload = (where?: PwlProjectParam) => {
selection.value = [];
tableRef?.value?.reload({where: where});
};
tableRef?.value?.reload({ where: where });
};
/* 打开编辑弹窗 */
const openEdit = (row?: PwlProject) => {
/* 打开编辑弹窗 */
const openEdit = (row?: PwlProject) => {
current.value = row ?? null;
showEdit.value = true;
};
};
const openReport = (row?: PwlProject) => {
const openReport = (row?: PwlProject) => {
current.value = row ?? null;
showReport.value = true;
}
};
/* 打开批量移动弹窗 */
const openMove = () => {
const showReportContent = ref(false)
const openReportContent = (row?: PwlProject) => {
current.value = row ?? null;
showReportContent.value = true;
};
/* 打开批量移动弹窗 */
const openMove = () => {
showMove.value = true;
};
};
/* 删除单个 */
const remove = (row: PwlProject) => {
/* 删除单个 */
const remove = (row: PwlProject) => {
const hide = message.loading('请求中..', 0);
removePwlProject(row.id)
.then((msg) => {
@@ -576,10 +626,10 @@ const remove = (row: PwlProject) => {
hide();
message.error(e.message);
});
};
};
/* 批量删除 */
const removeBatch = () => {
/* 批量删除 */
const removeBatch = () => {
if (!selection.value.length) {
message.error('请至少选择一条数据');
return;
@@ -603,15 +653,15 @@ const removeBatch = () => {
});
}
});
};
};
/* 查询 */
const query = () => {
/* 查询 */
const query = () => {
loading.value = true;
};
};
/* 自定义行属性 */
const customRow = (record: PwlProject) => {
/* 自定义行属性 */
const customRow = (record: PwlProject) => {
return {
// 行点击事件
onClick: () => {
@@ -622,14 +672,44 @@ const customRow = (record: PwlProject) => {
openEdit(record);
}
};
};
query();
};
query();
</script>
<script lang="ts">
export default {
export default {
name: 'PwlProject'
};
};
</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>