const assert = require("assert"); const fs = require("fs"); const path = require("path"); const pagePath = path.resolve(__dirname, "../../src/views/ccdiProject/index.vue"); const tablePath = path.resolve(__dirname, "../../src/views/ccdiProject/components/ProjectTable.vue"); const pageSource = fs.readFileSync(pagePath, "utf8"); const tableSource = fs.readFileSync(tablePath, "utf8"); const searchBarPath = path.resolve(__dirname, "../../src/views/ccdiProject/components/SearchBar.vue"); const searchBarSource = fs.readFileSync(searchBarPath, "utf8"); assert( searchBarSource.includes("{ label: '已删除', value: 'deleted'"), "搜索条应提供独立的已删除列表入口" ); assert( searchBarSource.includes("tab.value !== 'deleted' || this.showDeletedTab"), "已删除入口应由 showDeletedTab 控制可见性" ); assert( searchBarSource.includes("const includeDeleted = this.activeTab === 'deleted'"), "切换已删除入口时应生成 includeDeleted 查询态" ); assert( searchBarSource.includes("status: includeDeleted || this.activeTab === 'all' ? null : this.activeTab"), "已删除列表不应和普通状态 tab 混用" ); assert( tableSource.includes('v-if="deletedList"'), "删除列表应使用独立操作区" ); assert( tableSource.includes('@click="handleRestore(scope.row)"'), "删除列表应提供恢复按钮" ); assert( tableSource.includes('v-if="canDelete(scope.row) && scope.row.status !== \'5\'"'), "普通列表应按 canDelete 展示删除按钮且排除已删除状态" ); assert( /