qinzhipeng_v 5 жил өмнө
parent
commit
968596841a

+ 106 - 10
src/views/projectManage/projectList/components/taskList.vue

@@ -51,7 +51,14 @@
         <template slot-scope="scope">
           <el-select
             v-model="scope.row.status"
-            :class="['status'+scope.row.status]"
+            :class="{
+              'status_color': scope.row.status === 0,
+              'status_color1': scope.row.status === 1,
+              'item': scope.row.status === 3,
+              'item1': scope.row.status === 2,
+              'item2': scope.row.status === 4,
+              'status_color2': scope.row.status === 5
+            }"
             class="btns"
             size="mini"
             @change="changeStatus(scope.row)"
@@ -81,6 +88,7 @@
     <TestReport v-if="dialogTestReport" ref="TestReport" />
     <DailyReport v-if="dialogDailyReport" ref="DailyReport" />
     <ClientReport v-if="dialogClientReport" ref="ClientReport" />
+    <task-dialog v-if="showTaskDialog" :show.sync="showTaskDialog" :task-id="taskId.id" :status-name="taskId.statusString" @getList="get_allTask" />
     <normal-dialog :show-dialog.sync="statusDialog" :title="'状态变更:已上线'" :width="'50%'" @confirm="confirmStatus()">
       <div class="dialog-change-status">
         <span>实际上线时间:</span>
@@ -90,6 +98,7 @@
   </div>
 </template>
 <script>
+import '@/styles/PublicStyle/index.scss'
 import TestReport from '@/views/Platform/presentation/Templates/TestReport' // 提测
 import DailyReport from '@/views/Platform/presentation/Templates/DailyReport' // 日报
 import ClientReport from '@/views/Platform/presentation/Templates/ClientReport' // 准出
@@ -98,19 +107,22 @@ import { taskUpdate } from '@/api/projectViewDetails'
 import { configShowTaskEnum } from '@/api/taskIndex'
 import scheduleList from './scheduleList'
 import normalDialog from '@/components/dialog/normalDialog'
+import taskDialog from '@/views/projectManage/taskList/dialog/taskDialog' // 任务状态修改(已上线/已提测/已准出)
 export default {
   components: {
     normalDialog,
     TestReport,
     DailyReport,
     ClientReport,
-    scheduleList
+    scheduleList,
+    taskDialog
   },
   data() {
     return {
       changeData: new Map(),
       allChange: false, // 是否全展开
       expandArr: [], // 展开行数组
+      showTaskDialog: false, // 状态弹窗
       inputValue: '',
       all_task: [], // 任务列表
       allStatus: [], // 任务所有状态
@@ -125,7 +137,8 @@ export default {
       dialogClientReport: false, // 准出
       statusDialog: false, // 修改状态弹框
       changeStatusDate: null, // 状态改变时间
-      nowChangeTask: null // 当前正在改变的任务对象
+      nowChangeTask: null, // 当前正在改变的任务对象
+      taskId: '' // 将要修改状态的任务id
     }
   },
   watch: {
@@ -173,9 +186,14 @@ export default {
       isEx ? this.expandArr = this.all_task.map(item => item.id) : this.expandArr = []
     },
     async changeStatus(e) { // 状态改变
-      if (e.status === 5) { // 已上线
-        this.statusDialog = true
+      if (e.status === 2 || e.status === 4 || e.status === 5) {
+        this.taskId = e
+        this.allStatus.map(item => {
+          item.code === e.status ? this.taskId.statusString = item.msg : ''
+        })
+        this.showTaskDialog = true
         this.nowChangeTask = e
+        return
       } else {
         const user = {
           name: localStorage.getItem('username'),
@@ -190,11 +208,7 @@ export default {
       }
     },
     async confirmStatus() { // 确认更改状态
-      const user = {
-        name: localStorage.getItem('username'),
-        ename: localStorage.getItem('realname'),
-        id: ''
-      }
+      const user = { name: localStorage.getItem('username'), ename: localStorage.getItem('realname'), id: '' }
       const taskInfoDO = this.nowChangeTask
       taskInfoDO.onlineRealTime = this.changeStatusDate
       const resTask = await taskUpdate({ taskInfoDO, user })
@@ -388,3 +402,85 @@ export default {
   white-space:nowrap;
 }
 </style>
+<style lang="scss">
+.btns .el-input--suffix .el-input__inner {
+  padding-right: 10px;
+  padding-left: 10px;
+  width: 73px;
+}
+.item{
+  /deep/ input {
+    color: rgb(126, 211, 33);
+    border: 1px solid rgb(126, 211, 33);
+     border-color: rgb(126, 211, 33) !important;
+         font-weight: 900;
+  }
+  /deep/ .el-input__suffix {
+    color: rgb(126, 211, 33) !important;
+    right: 1px;
+  }
+  /deep/ .el-select__caret {
+    color: rgb(126, 211, 33) !important;
+  }
+}
+.item1 {
+  /deep/ input {
+    color: rgb(255, 204, 102);
+     border: 1px solid rgb(255, 204, 102);
+     border-color: rgb(255, 204, 102) !important;
+         font-weight: 900;
+  }
+  /deep/ .el-input__suffix {
+    color: rgb(255, 204, 102) !important;
+    right: 1px;
+  }
+  /deep/ .el-select__caret {
+    color: rgb(255, 204, 102) !important;
+  }
+}
+.item2 {
+  /deep/ input {
+    color: rgb(245, 108, 108);
+    border: 1px solid rgb(245, 108, 108);
+    border-color: rgb(245, 108, 108) !important;
+        font-weight: 900;
+  }
+   /deep/ .el-input__suffix {
+    color: rgb(245, 108, 108) !important;
+    right: 1px;
+  }
+  /deep/ .el-select__caret {
+   color: rgb(245, 108, 108) !important;
+  }
+}
+.item3 {
+  /deep/ input {
+    color: #D675F0;
+    border: 1px solid #D675F0;
+    border-color: #D675F0 !important;
+        font-weight: 900;
+  }
+    /deep/ .el-input__suffix {
+    color: #D675F0 !important;
+    right: 1px;
+  }
+   /deep/ .el-select__caret {
+   color: #D675F0 !important;
+  }
+}
+.item-color {
+  /deep/ input {
+    color: rgb(106, 180, 255);
+    border: 1px solid rgb(106, 180, 255);
+    border-color: rgb(106, 180, 255) !important;
+        font-weight: 900;
+  }
+    /deep/ .el-input__suffix {
+    color: rgb(106, 180, 255) !important;
+    right: 1px;
+  }
+   /deep/ .el-select__caret {
+   color: rgb(106, 180, 255) !important;
+  }
+}
+</style>

+ 0 - 7
src/views/projectManage/projectList/css/index.css

@@ -64,10 +64,6 @@
   border-radius: 4px;
 }
 
-.el-dialog__header {
-    padding: 0px 0px 0px;
-}
-
 .footer {
   text-align: right;
   margin: 1%;
@@ -112,9 +108,6 @@
   white-space: nowrap;
 }
 
-.dialog .el-dialog__header {
-  padding: 0;
-}
 
 .time-horizontal li {
   display: inline-block;

+ 0 - 2
src/views/projectManage/taskList/components/reportList.vue

@@ -120,8 +120,6 @@
 </template>
 <script>
 import {
-  projectTestReport,
-  dailyReport,
   launchTest,
   launchTestUpdate,
   launchTestDelete

+ 2 - 1
src/views/projectManage/taskList/dialog/taskDialog.vue

@@ -30,7 +30,7 @@ export default {
   props: {
     show: { type: Boolean, default: false }, // 弹窗展示
     statusName: { type: String, default: null }, // 状态name
-    taskId: { type: String, default: null } // 任务ID
+    taskId: { type: [String, Number], default: null } // 任务ID
   },
   data() {
     return {
@@ -64,6 +64,7 @@ export default {
     statusName: {
       immediate: true,
       handler(statusName) {
+        console.log(statusName, 'ddddd')
         if (statusName === '已提测') {
           this.name = this.measurementTime
           this.codeName = this.measurementTimeName

+ 0 - 19
src/views/workbench/person/components/calendarFormDialog.vue

@@ -227,25 +227,6 @@ export default {
 }
 </script>
 
-<style>
-.workbench_schedule__dialog .el-dialog {
-  border-radius:4px;
-}
-.workbench_schedule__dialog .el-dialog__header {
-  padding: 20px 70px;
-}
-.workbench_schedule__dialog .el-dialog__body {
-  padding: 0px 70px;
-}
-.workbench_schedule__dialog .el-dialog__footer {
-  padding: 40px 70px;
-}
-.workbench_schedule__dialog .el-form-item__label {
-  color: #666666;
-  font-weight: 400;
-}
-</style>
-
 <style scoped lang="scss">
 article{
   padding: 0 50px;