chore: 添加备份文件到 gitignore 并从版本控制中移除
- 在 ruoyi-ui/.gitignore 中添加 *.backup 和 *.bak 规则 - 从版本控制中移除 QuickEntry.vue.backup - 从版本控制中移除 SearchBar.vue.backup - 从版本控制中移除 index.vue.backup
This commit is contained in:
BIN
doc/创建项目功能/ScreenShot_2026-02-27_111611_994.png
Normal file
BIN
doc/创建项目功能/ScreenShot_2026-02-27_111611_994.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 108 KiB |
4
ruoyi-ui/.gitignore
vendored
4
ruoyi-ui/.gitignore
vendored
@@ -21,3 +21,7 @@ selenium-debug.log
|
|||||||
|
|
||||||
package-lock.json
|
package-lock.json
|
||||||
yarn.lock
|
yarn.lock
|
||||||
|
|
||||||
|
# 备份文件
|
||||||
|
*.backup
|
||||||
|
*.bak
|
||||||
|
|||||||
@@ -1,169 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="quick-entry-container">
|
|
||||||
<div class="section-title">
|
|
||||||
<i class="el-icon-s-grid title-icon"></i>
|
|
||||||
<span>快捷入口</span>
|
|
||||||
</div>
|
|
||||||
<el-row :gutter="12">
|
|
||||||
<el-col :span="6">
|
|
||||||
<div class="entry-card" @click="handleImportHistory">
|
|
||||||
<div class="card-icon import-icon">
|
|
||||||
<i class="el-icon-folder-opened"></i>
|
|
||||||
</div>
|
|
||||||
<div class="card-content">
|
|
||||||
<div class="card-title">导入历史项目</div>
|
|
||||||
<div class="card-desc">从历史项目中快速创建新项目</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="6">
|
|
||||||
<div class="entry-card" @click="handleCreateQuarterly">
|
|
||||||
<div class="card-icon quarterly-icon">
|
|
||||||
<i class="el-icon-date"></i>
|
|
||||||
</div>
|
|
||||||
<div class="card-content">
|
|
||||||
<div class="card-title">创建季度初核</div>
|
|
||||||
<div class="card-desc">按季度创建初核排查项目</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="6">
|
|
||||||
<div class="entry-card" @click="handleCreateEmployee">
|
|
||||||
<div class="card-icon employee-icon">
|
|
||||||
<i class="el-icon-user"></i>
|
|
||||||
</div>
|
|
||||||
<div class="card-content">
|
|
||||||
<div class="card-title">创建新员工排查</div>
|
|
||||||
<div class="card-desc">针对新入职员工的初核排查</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="6">
|
|
||||||
<div class="entry-card" @click="handleCreateHighRisk">
|
|
||||||
<div class="card-icon highrisk-icon">
|
|
||||||
<i class="el-icon-warning"></i>
|
|
||||||
</div>
|
|
||||||
<div class="card-content">
|
|
||||||
<div class="card-title">创建高风险专项</div>
|
|
||||||
<div class="card-desc">针对高风险人员的专项排查</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: 'QuickEntry',
|
|
||||||
methods: {
|
|
||||||
handleImportHistory() {
|
|
||||||
this.$emit('import-history')
|
|
||||||
},
|
|
||||||
handleCreateQuarterly() {
|
|
||||||
this.$emit('create-quarterly')
|
|
||||||
},
|
|
||||||
handleCreateEmployee() {
|
|
||||||
this.$emit('create-employee')
|
|
||||||
},
|
|
||||||
handleCreateHighRisk() {
|
|
||||||
this.$emit('create-highrisk')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.quick-entry-container {
|
|
||||||
margin-top: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.section-title {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
margin-bottom: 12px;
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: 500;
|
|
||||||
color: #606266;
|
|
||||||
|
|
||||||
.title-icon {
|
|
||||||
margin-right: 6px;
|
|
||||||
color: #909399;
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.entry-card {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
padding: 16px;
|
|
||||||
background: white;
|
|
||||||
border-radius: 4px;
|
|
||||||
cursor: pointer;
|
|
||||||
transition: all 0.2s ease;
|
|
||||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
|
|
||||||
border: 1px solid #EBEEF5;
|
|
||||||
height: 100%;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
transform: translateY(-2px);
|
|
||||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
|
|
||||||
border-color: #409EFF;
|
|
||||||
|
|
||||||
.card-icon {
|
|
||||||
transform: scale(1.05);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&:active {
|
|
||||||
transform: translateY(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.card-icon {
|
|
||||||
width: 48px;
|
|
||||||
height: 48px;
|
|
||||||
border-radius: 4px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
margin-right: 12px;
|
|
||||||
flex-shrink: 0;
|
|
||||||
transition: all 0.2s ease;
|
|
||||||
font-size: 20px;
|
|
||||||
color: white;
|
|
||||||
|
|
||||||
&.import-icon {
|
|
||||||
background-color: #667eea;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.quarterly-icon {
|
|
||||||
background-color: #f5576c;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.employee-icon {
|
|
||||||
background-color: #4facfe;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.highrisk-icon {
|
|
||||||
background-color: #F56C6C;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.card-content {
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card-title {
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: 500;
|
|
||||||
color: #303133;
|
|
||||||
margin-bottom: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card-desc {
|
|
||||||
font-size: 12px;
|
|
||||||
color: #909399;
|
|
||||||
line-height: 1.4;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,140 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="search-bar-container">
|
|
||||||
<el-card class="search-card" shadow="hover">
|
|
||||||
<el-row :gutter="12" align="middle">
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-input
|
|
||||||
v-model="searchKeyword"
|
|
||||||
placeholder="请输入项目名称"
|
|
||||||
prefix-icon="el-icon-search"
|
|
||||||
clearable
|
|
||||||
size="medium"
|
|
||||||
@keyup.enter.native="handleSearch"
|
|
||||||
/>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="5">
|
|
||||||
<el-select
|
|
||||||
v-model="selectedStatus"
|
|
||||||
placeholder="项目状态"
|
|
||||||
clearable
|
|
||||||
size="medium"
|
|
||||||
style="width: 100%"
|
|
||||||
@change="handleStatusChange"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in statusOptions"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="4">
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
icon="el-icon-search"
|
|
||||||
size="medium"
|
|
||||||
@click="handleSearch"
|
|
||||||
>搜索</el-button>
|
|
||||||
<el-button
|
|
||||||
icon="el-icon-refresh"
|
|
||||||
size="medium"
|
|
||||||
@click="handleReset"
|
|
||||||
>重置</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="7" style="text-align: right">
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
icon="el-icon-plus"
|
|
||||||
size="medium"
|
|
||||||
@click="handleAdd"
|
|
||||||
>新建项目</el-button>
|
|
||||||
<el-button
|
|
||||||
icon="el-icon-folder-opened"
|
|
||||||
size="medium"
|
|
||||||
@click="handleImport"
|
|
||||||
>导入历史项目</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-card>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: 'SearchBar',
|
|
||||||
props: {
|
|
||||||
showSearch: {
|
|
||||||
type: Boolean,
|
|
||||||
default: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
searchKeyword: '',
|
|
||||||
selectedStatus: '',
|
|
||||||
statusOptions: [
|
|
||||||
{ label: '进行中', value: '0' },
|
|
||||||
{ label: '已完成', value: '1' },
|
|
||||||
{ label: '已归档', value: '2' }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
/** 搜索 */
|
|
||||||
handleSearch() {
|
|
||||||
this.emitQuery()
|
|
||||||
},
|
|
||||||
/** 状态变化 */
|
|
||||||
handleStatusChange() {
|
|
||||||
this.emitQuery()
|
|
||||||
},
|
|
||||||
/** 重置 */
|
|
||||||
handleReset() {
|
|
||||||
this.searchKeyword = ''
|
|
||||||
this.selectedStatus = ''
|
|
||||||
this.emitQuery()
|
|
||||||
},
|
|
||||||
/** 发送查询 */
|
|
||||||
emitQuery() {
|
|
||||||
this.$emit('query', {
|
|
||||||
projectName: this.searchKeyword || null,
|
|
||||||
status: this.selectedStatus || null
|
|
||||||
})
|
|
||||||
},
|
|
||||||
/** 新增 */
|
|
||||||
handleAdd() {
|
|
||||||
this.$emit('add')
|
|
||||||
},
|
|
||||||
/** 导入 */
|
|
||||||
handleImport() {
|
|
||||||
this.$emit('import')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.search-bar-container {
|
|
||||||
margin-bottom: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-card {
|
|
||||||
border-radius: 4px;
|
|
||||||
border: 1px solid #EBEEF5;
|
|
||||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
|
|
||||||
|
|
||||||
:deep(.el-card__body) {
|
|
||||||
padding: 12px 16px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.el-button--medium) {
|
|
||||||
padding: 10px 16px;
|
|
||||||
margin-left: 8px;
|
|
||||||
|
|
||||||
&:first-child {
|
|
||||||
margin-left: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,256 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="app-container dpc-project-container">
|
|
||||||
<!-- 页面标题 -->
|
|
||||||
<div class="page-header">
|
|
||||||
<h2 class="page-title">初核项目管理</h2>
|
|
||||||
<p class="page-subtitle">管理纪检初核排查项目,跟踪预警信息</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 搜索和操作区 -->
|
|
||||||
<search-bar
|
|
||||||
:show-search="showSearch"
|
|
||||||
@query="handleQuery"
|
|
||||||
@add="handleAdd"
|
|
||||||
@import="handleImport"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- 项目列表表格 -->
|
|
||||||
<project-table
|
|
||||||
:loading="loading"
|
|
||||||
:data-list="projectList"
|
|
||||||
:total="total"
|
|
||||||
:page-params="queryParams"
|
|
||||||
@pagination="getList"
|
|
||||||
@enter="handleEnter"
|
|
||||||
@view-result="handleViewResult"
|
|
||||||
@re-analyze="handleReAnalyze"
|
|
||||||
@archive="handleArchive"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- 快捷入口区 -->
|
|
||||||
<quick-entry
|
|
||||||
@import-history="handleImport"
|
|
||||||
@create-quarterly="handleCreateQuarterly"
|
|
||||||
@create-employee="handleCreateEmployee"
|
|
||||||
@create-highrisk="handleCreateHighRisk"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- 新建项目弹窗 -->
|
|
||||||
<add-project-dialog
|
|
||||||
:visible.sync="addDialogVisible"
|
|
||||||
:title="addDialogTitle"
|
|
||||||
:form="projectForm"
|
|
||||||
@submit="handleSubmitProject"
|
|
||||||
@close="handleCloseAddDialog"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- 导入历史项目弹窗 -->
|
|
||||||
<import-history-dialog
|
|
||||||
:visible.sync="importDialogVisible"
|
|
||||||
@submit="handleSubmitImport"
|
|
||||||
@close="handleCloseImportDialog"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- 项目归档确认弹窗 -->
|
|
||||||
<archive-confirm-dialog
|
|
||||||
:visible.sync="archiveDialogVisible"
|
|
||||||
:project-data="currentArchiveProject"
|
|
||||||
@confirm="handleConfirmArchive"
|
|
||||||
@close="archiveDialogVisible = false"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import {listProject} from '@/api/ccdiProject'
|
|
||||||
import SearchBar from './components/SearchBar'
|
|
||||||
import ProjectTable from './components/ProjectTable'
|
|
||||||
import QuickEntry from './components/QuickEntry'
|
|
||||||
import AddProjectDialog from './components/AddProjectDialog'
|
|
||||||
import ImportHistoryDialog from './components/ImportHistoryDialog'
|
|
||||||
import ArchiveConfirmDialog from './components/ArchiveConfirmDialog'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'DpcProject',
|
|
||||||
components: {
|
|
||||||
SearchBar,
|
|
||||||
ProjectTable,
|
|
||||||
QuickEntry,
|
|
||||||
AddProjectDialog,
|
|
||||||
ImportHistoryDialog,
|
|
||||||
ArchiveConfirmDialog
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
// 加载状态
|
|
||||||
loading: true,
|
|
||||||
// 显示搜索栏
|
|
||||||
showSearch: true,
|
|
||||||
// 总条数
|
|
||||||
total: 0,
|
|
||||||
// 项目列表
|
|
||||||
projectList: [],
|
|
||||||
// 查询参数
|
|
||||||
queryParams: {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
projectName: null,
|
|
||||||
status: null
|
|
||||||
},
|
|
||||||
// 新增/编辑弹窗
|
|
||||||
addDialogVisible: false,
|
|
||||||
addDialogTitle: '新建项目',
|
|
||||||
projectForm: {},
|
|
||||||
// 导入历史项目弹窗
|
|
||||||
importDialogVisible: false,
|
|
||||||
// 归档确认弹窗
|
|
||||||
archiveDialogVisible: false,
|
|
||||||
currentArchiveProject: null
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.getList()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
/** 查询项目列表 */
|
|
||||||
getList() {
|
|
||||||
this.loading = true
|
|
||||||
// 使用真实API
|
|
||||||
listProject(this.queryParams).then(response => {
|
|
||||||
this.projectList = response.rows
|
|
||||||
this.total = response.total
|
|
||||||
this.loading = false
|
|
||||||
}).catch(() => {
|
|
||||||
this.loading = false
|
|
||||||
})
|
|
||||||
},
|
|
||||||
/** 搜索按钮操作 */
|
|
||||||
handleQuery(queryParams) {
|
|
||||||
if (queryParams) {
|
|
||||||
this.queryParams = { ...this.queryParams, ...queryParams }
|
|
||||||
}
|
|
||||||
this.queryParams.pageNum = 1
|
|
||||||
this.getList()
|
|
||||||
},
|
|
||||||
/** 新增按钮操作 */
|
|
||||||
handleAdd() {
|
|
||||||
this.projectForm = this.getEmptyForm()
|
|
||||||
this.addDialogTitle = '新建项目'
|
|
||||||
this.addDialogVisible = true
|
|
||||||
},
|
|
||||||
/** 获取空表单 */
|
|
||||||
getEmptyForm() {
|
|
||||||
return {
|
|
||||||
projectId: null,
|
|
||||||
projectName: '',
|
|
||||||
projectDesc: '',
|
|
||||||
startDate: '',
|
|
||||||
endDate: '',
|
|
||||||
targetCount: 0,
|
|
||||||
targetPersons: []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
/** 关闭新增弹窗 */
|
|
||||||
handleCloseAddDialog() {
|
|
||||||
this.addDialogVisible = false
|
|
||||||
this.projectForm = {}
|
|
||||||
},
|
|
||||||
/** 提交项目表单 */
|
|
||||||
handleSubmitProject(data) {
|
|
||||||
// 不需要再次调用API,因为AddProjectDialog已经处理了
|
|
||||||
this.addDialogVisible = false
|
|
||||||
this.getList() // 刷新列表
|
|
||||||
},
|
|
||||||
/** 导入历史项目 */
|
|
||||||
handleImport() {
|
|
||||||
this.importDialogVisible = true
|
|
||||||
},
|
|
||||||
/** 关闭导入弹窗 */
|
|
||||||
handleCloseImportDialog() {
|
|
||||||
this.importDialogVisible = false
|
|
||||||
},
|
|
||||||
/** 提交导入 */
|
|
||||||
handleSubmitImport(data) {
|
|
||||||
console.log('导入历史项目:', data)
|
|
||||||
this.$modal.msgSuccess('项目导入成功')
|
|
||||||
this.importDialogVisible = false
|
|
||||||
this.getList()
|
|
||||||
},
|
|
||||||
/** 创建季度初核 */
|
|
||||||
handleCreateQuarterly() {
|
|
||||||
this.projectForm = this.getEmptyForm()
|
|
||||||
this.addDialogTitle = '创建季度初核项目'
|
|
||||||
this.addDialogVisible = true
|
|
||||||
},
|
|
||||||
/** 创建新员工排查 */
|
|
||||||
handleCreateEmployee() {
|
|
||||||
this.projectForm = this.getEmptyForm()
|
|
||||||
this.addDialogTitle = '创建新员工排查项目'
|
|
||||||
this.addDialogVisible = true
|
|
||||||
},
|
|
||||||
/** 创建高风险专项 */
|
|
||||||
handleCreateHighRisk() {
|
|
||||||
this.projectForm = this.getEmptyForm()
|
|
||||||
this.addDialogTitle = '创建高风险专项项目'
|
|
||||||
this.addDialogVisible = true
|
|
||||||
},
|
|
||||||
/** 进入项目 */
|
|
||||||
handleEnter(row) {
|
|
||||||
console.log('进入项目:', row)
|
|
||||||
this.$modal.msgSuccess('进入项目: ' + row.projectName)
|
|
||||||
},
|
|
||||||
/** 查看结果 */
|
|
||||||
handleViewResult(row) {
|
|
||||||
console.log('查看结果:', row)
|
|
||||||
this.$modal.msgInfo('查看项目结果: ' + row.projectName)
|
|
||||||
},
|
|
||||||
/** 重新分析 */
|
|
||||||
handleReAnalyze(row) {
|
|
||||||
console.log('重新分析:', row)
|
|
||||||
this.$modal.msgSuccess('正在重新分析项目: ' + row.projectName)
|
|
||||||
},
|
|
||||||
/** 归档项目 */
|
|
||||||
handleArchive(row) {
|
|
||||||
this.currentArchiveProject = row
|
|
||||||
this.archiveDialogVisible = true
|
|
||||||
},
|
|
||||||
/** 确认归档 */
|
|
||||||
handleConfirmArchive(data) {
|
|
||||||
console.log('确认归档:', data)
|
|
||||||
this.$modal.msgSuccess('项目已归档')
|
|
||||||
this.archiveDialogVisible = false
|
|
||||||
this.getList()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.dpc-project-container {
|
|
||||||
padding: 16px;
|
|
||||||
background: #f0f2f5;
|
|
||||||
min-height: calc(100vh - 140px);
|
|
||||||
}
|
|
||||||
|
|
||||||
.page-header {
|
|
||||||
margin-bottom: 12px;
|
|
||||||
padding: 16px 20px;
|
|
||||||
background: #ffffff;
|
|
||||||
border-radius: 4px;
|
|
||||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
|
|
||||||
|
|
||||||
.page-title {
|
|
||||||
margin: 0;
|
|
||||||
font-size: 18px;
|
|
||||||
font-weight: 500;
|
|
||||||
color: #303133;
|
|
||||||
}
|
|
||||||
|
|
||||||
.page-subtitle {
|
|
||||||
margin: 4px 0 0 0;
|
|
||||||
font-size: 13px;
|
|
||||||
color: #909399;
|
|
||||||
font-weight: 400;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
Reference in New Issue
Block a user