调整单位信息

This commit is contained in:
2025-10-27 10:34:30 +08:00
parent 5e34284eb2
commit ec1ca90d90
2 changed files with 433 additions and 317 deletions

View File

@@ -1,7 +1,8 @@
VITE_APP_NAME=后台管理系统
VITE_SOCKET_URL=wss://server.websoft.top
VITE_SERVER_URL=https://server.websoft.top/api
VITE_API_URL=https://cms-api.websoft.top/api
#VITE_API_URL=https://cms-api.websoft.top/api
VITE_API_URL=http://1.14.159.185:9200/api
#VITE_SOCKET_URL=ws://127.0.0.1:9191
#VITE_SERVER_URL=http://127.0.0.1:8000/api

View File

@@ -48,7 +48,8 @@
:class="{ 'disabled-text': !record.kbId }"
:style="!record.kbId ? 'cursor: not-allowed; color: #999' : ''"
@click="record.kbId && openDocManage(record)"
>文档管理</a>
>文档管理</a
>
<a-divider type="vertical" />
<a-popconfirm
title="确定要删除此记录吗?"
@@ -72,8 +73,24 @@
width="800px"
:footer="null"
>
<div style="margin-bottom: 16px;">
<div style="margin-bottom: 16px">
<p class="text-red-500 mb-1" style="padding-left: calc(88px + 0.5rem)">请选择分类上传资料</p>
<div class="flex justify-start items-start">
<a-button type="primary" @click="openImport">新增文档</a-button>
<div class="ml-2">
<div class="flex justify-start items-center flex-wrap">
<span
@click="activeTag = item.id"
:class="[activeTag === item.id ? 'tag-active' : '']"
class="tag"
v-for="(item, index) in tagList"
:key="index"
:title="item.description"
>{{ item.title }}</span
>
</div>
</div>
</div>
</div>
<a-table
:dataSource="docList"
@@ -87,7 +104,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'">
@@ -105,7 +127,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>
@@ -123,11 +149,18 @@ import Search from './components/search.vue';
import OaCompanyEdit from './components/oaCompanyEdit.vue';
// 导入Import组件和API
import Import from './components/Import.vue';
import {pageOaCompany, removeOaCompany, removeBatchOaCompany} from '@/api/oa/oaCompany';
import {
pageOaCompany,
removeOaCompany,
removeBatchOaCompany
} from '@/api/oa/oaCompany';
import type { OaCompany, OaCompanyParam } from '@/api/oa/oaCompany/model';
import {getPageTitle,isImage} from "@/utils/common";
import { getPageTitle, isImage } from '@/utils/common';
// 导入知识库API
import {getKnowledgeBaseDocuments, deleteKnowledgeBaseDocument} from '@/api/ai/knowledgeBase'; // 请修改为正确的API路径
import {
getKnowledgeBaseDocuments,
deleteKnowledgeBaseDocument
} from '@/api/ai/knowledgeBase'; // 请修改为正确的API路径
// 表格实例
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
@@ -159,12 +192,12 @@ const docColumns = ref([
{
title: '文件名',
dataIndex: 'name', // 改为接口返回的name字段
key: 'fileName',
key: 'fileName'
},
{
title: '文件大小',
dataIndex: 'size', // 改为接口返回的size字段
key: 'fileSize',
key: 'fileSize'
},
{
title: '上传时间',
@@ -175,7 +208,7 @@ const docColumns = ref([
{
title: '操作',
key: 'action',
width: 100,
width: 100
}
]);
@@ -206,25 +239,25 @@ const columns = ref<ColumnItem[]>([
key: 'companyId',
align: 'center',
hideInTable: true,
width: 90,
width: 90
},
{
title: 'LOGO',
dataIndex: 'companyLogo',
key: 'companyLogo',
align: 'center',
align: 'center'
},
{
title: '单位名称',
dataIndex: 'companyName',
key: 'companyName',
align: 'center',
align: 'center'
},
{
title: '单位标识',
dataIndex: 'companyCode',
key: 'companyCode',
align: 'center',
align: 'center'
},
// {
// title: '类型',
@@ -236,13 +269,13 @@ const columns = ref<ColumnItem[]>([
title: '推荐',
dataIndex: 'recommend',
key: 'recommend',
align: 'center',
align: 'center'
},
{
title: '状态',
dataIndex: 'status',
key: 'status',
align: 'center',
align: 'center'
},
// {
// title: '备注',
@@ -254,7 +287,7 @@ const columns = ref<ColumnItem[]>([
title: '排序号',
dataIndex: 'sortNumber',
key: 'sortNumber',
align: 'center',
align: 'center'
},
{
title: '创建时间',
@@ -326,7 +359,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;
@@ -406,6 +439,72 @@ const customRow = (record: OaCompany) => {
};
};
query();
const activeTag = ref(1);
const tagList = ref([
{
id: 1,
description:
'贯彻执行党和国家有关经济方针政策和决策部署,落实局党组、局工作部署要求,推动单位可持续发展情况;',
title: '贯彻决策部署'
},
{
id: 2,
description: '单位发展战略规划的制定、执行和效果情况;',
title: '单位发展战略执行'
},
{
id: 3,
description:
'重大经济事项的决策、执行和效果情况,具体包括重大预算管理、重大项目实施、重大采购项目、重大投资项目、重大外包业务、重大资产处置、大额资金使用的决策和执行情况等;',
title: '三重一大执行'
},
{
id: 4,
description: '有关目标责任制完成情况;',
title: '目标完成'
},
{
id: 5,
description:
'财政财务管理情况。包括预算编制的完整准确、预算调整审批的合规,以及预算支出的真实合法合规情况;财务收支的真实、合法和效益情况;自然资源资产管理和生态环境保护责任的履行情况;对外投资经济活动的真实、合法和效益情况;',
title: '财务管理'
},
{
id: 6,
description: '国有资产采购、管理、使用和处置情况;',
title: '国资管理'
},
{
id: 7,
description: '重要经济项目的投资、建设、管理及效益情况;',
title: '重大投资情况'
},
{
id: 8,
description:
'企业法人治理结构、内部控制和风险管理情况。主要包括企业法人治理结构的建立、健全和运行情况,以及财务管理、业务管理、风险管理、内部审计等内部控制制度的制定和执行情况,以及对所属单位有关经济活动的管理和监督情况。业务管理主要包括采购业务、收支业务、资产管理、勘察项目管理、筹资与担保业务管理、合同管理、业务外包、信息系统管理、全面预算等;',
title: '治理结构'
},
{
id: 9,
description:
'在预算管理中执行机构编制管理规定情况(主要是对借用人员和编外用工管理,规范人员经费的使用);',
title: '人员编制'
},
{
id: 10,
description:
'在经济活动中落实有关党风廉政建设责任和遵守廉洁从业规定情况,主要是在经济活动中领导干部落实职责范围内党风廉政建设责任、遵守中央八项规定及实施细则精神和廉洁从业有关规定情况。',
title: '廉政情况'
},
{
id: 11,
description:
'以往审计发现问题的整改情况。包括整改制度的制定、整改工作的实施、整改措施的落实和整改效果等情况。',
title: '历史审计问题'
}
]);
</script>
<script lang="ts">
@@ -416,7 +515,23 @@ export default {
<style scoped>
/* 修改已完成步骤的连接线颜色 */
.ant-steps-item-finish > .ant-steps-item-container > .ant-steps-item-tail::after {
.ant-steps-item-finish
> .ant-steps-item-container
> .ant-steps-item-tail::after {
background-color: red !important; /* 自定义颜色 */
}
.tag {
color: grey;
border: 1px solid grey;
padding: 2px 5px;
border-radius: 5px;
margin: 0 8px 8px 0;
cursor: pointer;
}
.tag-active {
color: #3b82f6 !important;
border: 1px solid #3b82f6 !important;
}
</style>