Forráskód Böngészése

任务管理部分优化

ysc 1 éve
szülő
commit
5446706506

+ 0 - 1
src/views/system/dept.vue

@@ -275,7 +275,6 @@ export default {
       this.title = "添加部门";
       listDept().then(response => {
         this.deptOptions = this.handleTree(response.data, "id");
-        console.log(this.deptOptions);
       });
     },
     /** 展开/折叠操作 */

+ 0 - 1
src/views/system/user.vue

@@ -458,7 +458,6 @@ export default {
     },
     /** 提交按钮 */
     submitForm() {
-      console.log(this.form);
       this.$refs["form"].validate(valid => {
         if (valid) {
           if (this.form.id != undefined) {

+ 8 - 8
src/views/task/task.vue

@@ -76,7 +76,7 @@
       </el-table-column>
       <el-table-column label="状态" width="100">
         <template slot-scope="scope">
-          <el-tag size="mini" :color="statusMap[scope.row.status].color">{{ statusMap[scope.row.status].name }}</el-tag>
+          <el-tag size="mini" :type="statusMap[scope.row.status].type">{{ statusMap[scope.row.status].name }}</el-tag>
         </template>
       </el-table-column>
       <el-table-column label="任务起止时间" width="200">
@@ -97,7 +97,7 @@
             type="text"
             icon="el-icon-edit"
             @click="handleAudit(scope.row)"
-            :disabled="scope.row.progressValue!=100"
+            :disabled="scope.row.progressValue!=100||scope.row.status!='2'"
             v-hasPermi="['task:task:audit']"
           >审核
           </el-button>
@@ -292,12 +292,12 @@ import DeptUserTree from "@/components/DeptUserTree"
 import FileUpload from "@/components/FileUpload"
 
 const statusMap = {
-  '0': {name: '待查看', color: '#E8EBEE'},
-  '1': {name: '未开始', color: '#f4f4f5'},
-  '2': {name: '进行中', color: '#ecf5ff'},
-  '3': {name: '延期', color: '#ECD994'},
-  '4': {name: '完成', color: '#f0f9eb'},
-  '5': {name: '终止', color: '#F97C07'}
+  '0': {name: '待查看', type: 'info'},
+  '1': {name: '未开始', type: 'info'},
+  '2': {name: '进行中', type: ''},
+  '3': {name: '延期', type: 'warning'},
+  '4': {name: '完成', type: 'success'},
+  '5': {name: '终止', type: 'danger'}
 }
 export default {
   name: "Task",

+ 14 - 3
src/views/task/view.vue

@@ -44,10 +44,12 @@
       border>
       <el-table-column fixed prop="id" label="编号" align="center" width="50"/>
       <el-table-column fixed prop="taskName" label="任务名称" align="center" width="180"/>
-      <el-table-column fixed prop="executorName" label="主负责人" align="center" width="80">
+      <el-table-column fixed prop="executorName" label="主负责人" align="center" width="100">
         <template slot-scope="scope">
           <div style="line-height: 15px">{{ scope.row.executorName }}</div>
-          <el-tag size="mini">{{ scope.row.progressValue + '%' }}</el-tag>
+          <el-tag size="mini" :type="statusMap[scope.row.status].type">
+            {{ statusMap[scope.row.status].name + ' ' + scope.row.progressValue + '%' }}
+          </el-tag>
         </template>
       </el-table-column>
       <el-table-column fixed prop="" label="上月延期" width="50">
@@ -149,6 +151,15 @@ import DateUtil from "@/utils/date"
 import TaskDetail from "./components/taskDetail"
 import FileUpload from "@/components/FileUpload"
 
+const statusMap = {
+  '0': {name: '待查看', type: 'info'},
+  '1': {name: '未开始', type: 'info'},
+  '2': {name: '进行中', type: ''},
+  '3': {name: '延期', type: 'warning'},
+  '4': {name: '完成', type: 'success'},
+  '5': {name: '终止', type: 'danger'}
+}
+
 export default {
   components: {TaskDetail, FileUpload},
   data() {
@@ -161,6 +172,7 @@ export default {
       projectList: [],
       tableHeaders: [],
       tableData: [],
+      statusMap: statusMap,
       open: false,
       form: {},
       feedbacks: [],
@@ -273,7 +285,6 @@ export default {
     getFileUrl(val) {
       this.form['files'] = this.form.files || []
       this.form.files.push(val)
-      console.log(this.form.files);
     },
     removeFile(val) {
       this.form.files.splice(val)