chore(config): 添加项目配置文件和隐私协议
- 新增 .editorconfig 文件统一代码风格配置 - 新增 .env 环境变量配置文件 - 添加开发和生产环境的环境变量配置 - 配置 ESLint 忽略规则文件 - 设置代码检查配置文件 .eslintrc.js - 添加 Git 忽略文件规则 - 创建 Prettier 格式化忽略规则 - 添加隐私政策和服务协议HTML文件 - 实现访问密钥编辑组件基础结构
This commit is contained in:
48
src/views/pwl/pwlProject/components/data/navigationItems.ts
Normal file
48
src/views/pwl/pwlProject/components/data/navigationItems.ts
Normal file
@@ -0,0 +1,48 @@
|
||||
import { ref } from 'vue';
|
||||
import { getTableConfig } from './tableCommon';
|
||||
|
||||
const navigationItems = ref([]);
|
||||
|
||||
// 初始化导航项
|
||||
export function initNavigationItems() {
|
||||
navigationItems.value = Array.from({ length: 11 }, (_, index) => {
|
||||
const config = getTableConfig(index);
|
||||
return {
|
||||
number: getChineseNumber(index + 1),
|
||||
name: `审计内容${index + 1}`,
|
||||
title: config?.title || `审计内容${index + 1}`,
|
||||
description: '点击"AI生成"按钮让AI为您生成该部分内容,或直接在下方编辑',
|
||||
generating: false,
|
||||
suggestion: '',
|
||||
mode: 'table',
|
||||
showFileSelect: true, // 所有项都显示文件选择
|
||||
data: [],
|
||||
extraData: [],
|
||||
currentTableIndex: 0, // 当前选中的表格索引
|
||||
columns: null,
|
||||
extraTableTitle: config?.extraTableTitle || null,
|
||||
extraColumns: config?.extraColumns || [],
|
||||
tableOptions: config?.options || [],
|
||||
count: index + 1,
|
||||
tableType: config?.type || `auditContent${index + 1}`,
|
||||
content: '',
|
||||
rows: 8
|
||||
};
|
||||
});
|
||||
|
||||
return navigationItems;
|
||||
}
|
||||
|
||||
// 获取中文数字
|
||||
function getChineseNumber(num) {
|
||||
const chineseNumbers = ['一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一'];
|
||||
return chineseNumbers[num - 1] || num;
|
||||
}
|
||||
|
||||
// 导出初始化的导航项
|
||||
export default function useNavigationItems() {
|
||||
if (navigationItems.value.length === 0) {
|
||||
initNavigationItems();
|
||||
}
|
||||
return navigationItems;
|
||||
}
|
||||
Reference in New Issue
Block a user