|
|
@@ -6,8 +6,9 @@
|
|
|
</el-col>
|
|
|
<el-col :span="19" :xs="24">
|
|
|
<el-form :model="queryParams" ref="queryForm" size="mini" :inline="true">
|
|
|
- <el-form-item label="任务名称" prop="taskName">
|
|
|
- <el-input v-model="queryParams.taskName"></el-input>
|
|
|
+ <el-form-item label="执行(负责)人" prop="executors">
|
|
|
+ <dept-user-tree ref="dut" :userList="userList"
|
|
|
+ @selected="(val)=>queryParams.executors=val"></dept-user-tree>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="月份选择" prop="month">
|
|
|
<el-date-picker
|
|
|
@@ -24,14 +25,14 @@
|
|
|
<el-form-item label="状态" prop="status">
|
|
|
<el-select
|
|
|
v-model="queryParams.status"
|
|
|
- placeholder="项目状态"
|
|
|
+ placeholder="任务状态"
|
|
|
style="width: 100px">
|
|
|
- <el-option label="全部" value="0"/>
|
|
|
- <el-option label="未开始" value="1"/>
|
|
|
- <el-option label="进行中" value="2"/>
|
|
|
- <el-option label="延期" value="3"/>
|
|
|
- <el-option label="完成" value="4"/>
|
|
|
- <el-option label="终止" value="5"/>
|
|
|
+ <el-option
|
|
|
+ v-for="dict in dict.type.task_status"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="dict.label"
|
|
|
+ :value="dict.value"
|
|
|
+ />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
@@ -59,7 +60,7 @@
|
|
|
size="mini">
|
|
|
<el-table-column label="任务编号" prop="id" width="80"/>
|
|
|
<el-table-column label="任务名称" prop="taskName" min-width="150" :show-overflow-tooltip="true"/>
|
|
|
- <el-table-column label="执行人" prop="executorName"/>
|
|
|
+ <el-table-column label="执行(负责)人" prop="executorName"/>
|
|
|
<el-table-column label="进度" prop="progressValue" width="80">
|
|
|
<template slot-scope="scope">
|
|
|
<span>{{ (scope.row.progressValue ? scope.row.progressValue : 0) + '%' }}</span>
|
|
|
@@ -273,6 +274,7 @@ import FileUpload from "@/components/FileUpload"
|
|
|
import Project from "@/views/task/components/project";
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
+import {getDictData} from "@/api/system/dict";
|
|
|
|
|
|
const statusMap = {
|
|
|
'0': {name: '待查看', type: 'info'},
|
|
|
@@ -285,6 +287,7 @@ const statusMap = {
|
|
|
export default {
|
|
|
name: "Task",
|
|
|
components: {Project, TaskDetail, DeptUserTree, FileUpload, Treeselect},
|
|
|
+ dicts:['task_status'],
|
|
|
data() {
|
|
|
return {
|
|
|
projectOptions: [],
|
|
|
@@ -302,15 +305,13 @@ export default {
|
|
|
queryParams: {
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
- taskName: undefined,
|
|
|
+ executors: [],
|
|
|
projectId: undefined,
|
|
|
month: DateUtil.month(),
|
|
|
status: '0'
|
|
|
},
|
|
|
// 表单参数
|
|
|
form: {},
|
|
|
- hnos: [],
|
|
|
- hsytem: [],
|
|
|
detailTitle: "",
|
|
|
detailOpen: false,
|
|
|
detailForm: {},
|
|
|
@@ -340,9 +341,18 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
- this.getList();
|
|
|
+ this.initData();
|
|
|
},
|
|
|
methods: {
|
|
|
+ initData() {
|
|
|
+ this.getList();
|
|
|
+ getDeptUserTree('').then(res => {
|
|
|
+ this.userList = res.data
|
|
|
+ })
|
|
|
+ getDictData('task_status').then(res => {
|
|
|
+
|
|
|
+ })
|
|
|
+ },
|
|
|
/** 查询项目列表 */
|
|
|
getList() {
|
|
|
if (this.queryParams.month && this.queryParams.month.length === 2) {
|
|
|
@@ -367,6 +377,7 @@ export default {
|
|
|
/** 重置按钮操作 */
|
|
|
resetQuery() {
|
|
|
this.resetForm("queryForm");
|
|
|
+ this.$refs.dut.clearText()
|
|
|
this.handleQuery();
|
|
|
},
|
|
|
handleSizeChange(val) {
|
|
|
@@ -431,9 +442,6 @@ export default {
|
|
|
|
|
|
/** 新增按钮操作 */
|
|
|
handleAdd() {
|
|
|
- getDeptUserTree('').then(res => {
|
|
|
- this.userList = res.data
|
|
|
- })
|
|
|
this.reset();
|
|
|
this.open = true;
|
|
|
this.title = "添加项目";
|
|
|
@@ -491,16 +499,13 @@ export default {
|
|
|
},
|
|
|
/** 分解按钮操作 */
|
|
|
handleSplit(row) {
|
|
|
- getDeptUserTree('').then(res => {
|
|
|
- this.userList = res.data
|
|
|
- this.splitForm = {
|
|
|
- parentId: row.id,
|
|
|
- taskName: row.taskName,
|
|
|
- projectName: row.projectName,
|
|
|
- children: []
|
|
|
- }
|
|
|
- this.splitOpen = true
|
|
|
- })
|
|
|
+ this.splitForm = {
|
|
|
+ parentId: row.id,
|
|
|
+ taskName: row.taskName,
|
|
|
+ projectName: row.projectName,
|
|
|
+ children: []
|
|
|
+ }
|
|
|
+ this.splitOpen = true
|
|
|
},
|
|
|
|
|
|
/** 提交按钮 */
|