feat: 完成上传数据页面
This commit is contained in:
@@ -63,23 +63,23 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getMockProjectList} 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'
|
||||
import { getMockProjectList } 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',
|
||||
name: "DpcProject",
|
||||
components: {
|
||||
SearchBar,
|
||||
ProjectTable,
|
||||
QuickEntry,
|
||||
AddProjectDialog,
|
||||
ImportHistoryDialog,
|
||||
ArchiveConfirmDialog
|
||||
ArchiveConfirmDialog,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -96,141 +96,145 @@ export default {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
projectName: null,
|
||||
projectStatus: null
|
||||
projectStatus: null,
|
||||
},
|
||||
// 新增/编辑弹窗
|
||||
addDialogVisible: false,
|
||||
addDialogTitle: '新建项目',
|
||||
addDialogTitle: "新建项目",
|
||||
projectForm: {},
|
||||
// 导入历史项目弹窗
|
||||
importDialogVisible: false,
|
||||
// 归档确认弹窗
|
||||
archiveDialogVisible: false,
|
||||
currentArchiveProject: null
|
||||
}
|
||||
currentArchiveProject: null,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询项目列表 */
|
||||
getList() {
|
||||
this.loading = true
|
||||
this.loading = true;
|
||||
// 使用Mock数据
|
||||
getMockProjectList().then(response => {
|
||||
this.projectList = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
getMockProjectList()
|
||||
.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 = { ...this.queryParams, ...queryParams };
|
||||
}
|
||||
this.queryParams.pageNum = 1
|
||||
this.getList()
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.projectForm = this.getEmptyForm()
|
||||
this.addDialogTitle = '新建项目'
|
||||
this.addDialogVisible = true
|
||||
this.projectForm = this.getEmptyForm();
|
||||
this.addDialogTitle = "新建项目";
|
||||
this.addDialogVisible = true;
|
||||
},
|
||||
/** 获取空表单 */
|
||||
getEmptyForm() {
|
||||
return {
|
||||
projectId: null,
|
||||
projectName: '',
|
||||
projectDesc: '',
|
||||
startDate: '',
|
||||
endDate: '',
|
||||
projectName: "",
|
||||
projectDesc: "",
|
||||
startDate: "",
|
||||
endDate: "",
|
||||
targetCount: 0,
|
||||
targetPersons: []
|
||||
}
|
||||
targetPersons: [],
|
||||
};
|
||||
},
|
||||
/** 关闭新增弹窗 */
|
||||
handleCloseAddDialog() {
|
||||
this.addDialogVisible = false
|
||||
this.projectForm = {}
|
||||
this.addDialogVisible = false;
|
||||
this.projectForm = {};
|
||||
},
|
||||
/** 提交项目表单 */
|
||||
handleSubmitProject(data) {
|
||||
// 这里应该调用实际的API
|
||||
console.log('提交项目数据:', data)
|
||||
this.$modal.msgSuccess('项目创建成功')
|
||||
this.addDialogVisible = false
|
||||
this.getList()
|
||||
console.log("提交项目数据:", data);
|
||||
this.$modal.msgSuccess("项目创建成功");
|
||||
this.addDialogVisible = false;
|
||||
this.getList();
|
||||
},
|
||||
/** 导入历史项目 */
|
||||
handleImport() {
|
||||
this.importDialogVisible = true
|
||||
this.importDialogVisible = true;
|
||||
},
|
||||
/** 关闭导入弹窗 */
|
||||
handleCloseImportDialog() {
|
||||
this.importDialogVisible = false
|
||||
this.importDialogVisible = false;
|
||||
},
|
||||
/** 提交导入 */
|
||||
handleSubmitImport(data) {
|
||||
console.log('导入历史项目:', data)
|
||||
this.$modal.msgSuccess('项目导入成功')
|
||||
this.importDialogVisible = false
|
||||
this.getList()
|
||||
console.log("导入历史项目:", data);
|
||||
this.$modal.msgSuccess("项目导入成功");
|
||||
this.importDialogVisible = false;
|
||||
this.getList();
|
||||
},
|
||||
/** 创建季度初核 */
|
||||
handleCreateQuarterly() {
|
||||
this.projectForm = this.getEmptyForm()
|
||||
this.addDialogTitle = '创建季度初核项目'
|
||||
this.addDialogVisible = true
|
||||
this.projectForm = this.getEmptyForm();
|
||||
this.addDialogTitle = "创建季度初核项目";
|
||||
this.addDialogVisible = true;
|
||||
},
|
||||
/** 创建新员工排查 */
|
||||
handleCreateEmployee() {
|
||||
this.projectForm = this.getEmptyForm()
|
||||
this.addDialogTitle = '创建新员工排查项目'
|
||||
this.addDialogVisible = true
|
||||
this.projectForm = this.getEmptyForm();
|
||||
this.addDialogTitle = "创建新员工排查项目";
|
||||
this.addDialogVisible = true;
|
||||
},
|
||||
/** 创建高风险专项 */
|
||||
handleCreateHighRisk() {
|
||||
this.projectForm = this.getEmptyForm()
|
||||
this.addDialogTitle = '创建高风险专项项目'
|
||||
this.addDialogVisible = true
|
||||
this.projectForm = this.getEmptyForm();
|
||||
this.addDialogTitle = "创建高风险专项项目";
|
||||
this.addDialogVisible = true;
|
||||
},
|
||||
/** 查看详情 */
|
||||
handleDetail(row) {
|
||||
console.log('查看详情:', row)
|
||||
this.$modal.msgInfo('查看项目详情: ' + row.projectName)
|
||||
console.log("查看详情:", row);
|
||||
this.$modal.msgInfo("查看项目详情: " + row.projectName);
|
||||
},
|
||||
/** 进入项目 */
|
||||
handleEnter(row) {
|
||||
console.log('进入项目:', row)
|
||||
this.$modal.msgSuccess('进入项目: ' + row.projectName)
|
||||
this.$router.push({
|
||||
path: `ccdiProject/detail/${row.projectId}`,
|
||||
});
|
||||
// this.$modal.msgSuccess("进入项目: " + row.projectName);
|
||||
},
|
||||
/** 查看结果 */
|
||||
handleViewResult(row) {
|
||||
console.log('查看结果:', row)
|
||||
this.$modal.msgInfo('查看项目结果: ' + row.projectName)
|
||||
console.log("查看结果:", row);
|
||||
this.$modal.msgInfo("查看项目结果: " + row.projectName);
|
||||
},
|
||||
/** 重新分析 */
|
||||
handleReAnalyze(row) {
|
||||
console.log('重新分析:', row)
|
||||
this.$modal.msgSuccess('正在重新分析项目: ' + row.projectName)
|
||||
console.log("重新分析:", row);
|
||||
this.$modal.msgSuccess("正在重新分析项目: " + row.projectName);
|
||||
},
|
||||
/** 归档项目 */
|
||||
handleArchive(row) {
|
||||
this.currentArchiveProject = row
|
||||
this.archiveDialogVisible = true
|
||||
this.currentArchiveProject = row;
|
||||
this.archiveDialogVisible = true;
|
||||
},
|
||||
/** 确认归档 */
|
||||
handleConfirmArchive(data) {
|
||||
console.log('确认归档:', data)
|
||||
this.$modal.msgSuccess('项目已归档')
|
||||
this.archiveDialogVisible = false
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
}
|
||||
console.log("确认归档:", data);
|
||||
this.$modal.msgSuccess("项目已归档");
|
||||
this.archiveDialogVisible = false;
|
||||
this.getList();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
Reference in New Issue
Block a user