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

工作台项目列表

wangziqian 5 éve
szülő
commit
2638e1b3e8

+ 9 - 18
src/views/projectManage/projectList/components/taskList.vue

@@ -135,7 +135,6 @@ export default {
       allChange: false, // 是否全展开
       expandArr: [], // 展开行数组
       showTaskDialog: false, // 状态弹窗
-      inputValue: '',
       all_task: [], // 任务列表
       allStatus: [], // 任务所有状态
       taskScheduleEvent: [], // 排期类型
@@ -155,14 +154,6 @@ export default {
       selectTaskList: [] // 已选任务的id
     }
   },
-  watch: {
-    value: {
-      handler(newV, oldV) {
-        this.inputValue = newV
-      },
-      immediate: true
-    }
-  },
   created() {
     this.getTaskStatus()
     this.get_allTask()
@@ -221,15 +212,15 @@ export default {
         }
       }
     },
-    // async confirmStatus() { // 确认更改状态
-    //   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 })
-    //   if (resTask.code === 200) {
-    //     this.$message({ message: resTask.msg, type: 'success', offset: 150 })
-    //   }
-    // },
+    async confirmStatus() { // 确认更改状态
+      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 })
+      if (resTask.code === 200) {
+        this.$message({ message: resTask.msg, type: 'success', offset: 150 })
+      }
+    },
     handleSelectionChange(val) { // 任务列表删选操作
       val.length > 0 ? this.showHeader = false : this.showHeader = true
       this.curcentChecked = val.length

+ 0 - 10
src/views/projectManage/requirement/components/taskList.vue

@@ -128,11 +128,9 @@ export default {
   data() {
     return {
       imgUrl: imgUrl,
-      changeData: new Map(),
       allChange: false, // 是否全展开
       expandArr: [], // 展开行数组
       showTaskDialog: false, // 状态弹窗
-      inputValue: '',
       all_task: [], // 任务列表
       allStatus: [], // 任务所有状态
       taskScheduleEvent: [], // 排期类型
@@ -152,14 +150,6 @@ export default {
       selectTaskList: [] // 已选任务的id
     }
   },
-  watch: {
-    value: {
-      handler(newV, oldV) {
-        this.inputValue = newV
-      },
-      immediate: true
-    }
-  },
   created() {
     this.getTaskStatus()
     this.get_allTask()

+ 12 - 7
src/views/workbench/team/components/needsList.vue

@@ -1,9 +1,9 @@
 <template>
   <div>
     <div class="search-control">
-      <span :class="{'color-blue': status===5}" @click="status = 5;getNeedsList()">进行中的需求</span>
-      <span :class="{'color-blue': status===0}" @click="status = 0;getNeedsList()">未开始的需求</span>
-      <span :class="{'color-blue': status===25}" @click="status = 25;getNeedsList()">已上线的需求</span>
+      <span :class="{'color-blue': status===5}" @click="setStatus(5)">进行中的需求</span>
+      <span :class="{'color-blue': status===0}" @click="setStatus(0)">未开始的需求</span>
+      <span :class="{'color-blue': status===25}" @click="setStatus(25)">已上线的需求</span>
     </div>
     <el-table
       ref="planTable"
@@ -101,7 +101,7 @@ export default {
         curIndex: 1
       },
       total: 0,
-      status: 5 // 列表状态
+      status: null // 列表状态
     }
   },
   watch: {
@@ -122,11 +122,16 @@ export default {
     this.getNeedsList()
   },
   methods: {
+    setStatus(val) {
+      this.status === val ? this.status = null : this.status = val
+      this.getNeedsList()
+    },
     handleSizeChange(val) {
-      this.pageSize = val
+      this.pages.pageSize = val
+      this.getNeedsList()
     },
     handleCurrentChange(val) {
-      this.curIndex = val
+      this.pages.curIndex = val
       this.getNeedsList()
     },
     async getTaskStatus() { // 获取需求的所有状态
@@ -228,7 +233,7 @@ export default {
   @include setStatus(#7ED321)
 }
 .search-control {
-	padding: 30px 15px 0;
+	padding: 30px 17px 0;
 	color: #333B4A;
 	font-size: 14px;
 	span {

+ 96 - 43
src/views/workbench/team/components/taskList.vue

@@ -1,7 +1,12 @@
 <template>
   <div>
+    <div class="search-control">
+      <span :class="{'color-blue': status===1}" @click="setStatus(1)">进行中的任务</span>
+      <span :class="{'color-blue': status===0}" @click="setStatus(0)">未开始的任务</span>
+      <span :class="{'color-blue': status===5}" @click="setStatus(5)">已上线的任务</span>
+    </div>
     <el-row v-if="!showHeader" class="select-main" type="flex" align="center">
-      <el-col :span="2" class="flex-align-center">
+      <el-col :span="1" class="flex-align-center">
         <el-checkbox v-model="planChecked" class="plan-checked" @change="changeCheck" />
       </el-col>
       <el-col :span="3" class="item-checked">已选择<span style="color: #409EFF">{{ curcentChecked }}</span>个</el-col>
@@ -18,7 +23,6 @@
       style="width: 100%;"
       size="mini"
       row-key="id"
-      :expand-row-keys="expandArr"
       :header-cell-style="{ color: 'rgb(74, 74, 74)', fontSize: '14px', fontWeight: '500'}"
       :row-style="{ fontSize: '14px' }"
       show-overflow-tooltip="true"
@@ -27,15 +31,6 @@
       @selection-change="handleSelectionChange"
     >
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column type="expand" width="40">
-        <template slot="header">
-          <div class="expand"><i v-show="!allChange" class="el-icon-plus" @click="expandAll(true)" /></div>
-          <div class="expand"><i v-show="allChange" class="el-icon-minus" @click="expandAll(false)" /></div>
-        </template>
-        <template slot-scope="props">
-          <schedule-list :id="props.row.id" :type-list="taskScheduleEvent" />
-        </template>
-      </el-table-column>
       <el-table-column label="优先级" prop="priority" width="90" sortable align="center">
         <template slot-scope="scope" style="text-align: center;">
           <span class="div_priority" :class="scope.row.priorityString">
@@ -43,7 +38,7 @@
           </span>
         </template>
       </el-table-column>
-      <el-table-column label="任务名称" width="200" align="left" show-overflow-tooltip>
+      <el-table-column label="任务名称" min-width="250" align="left" show-overflow-tooltip>
         <template slot-scope="scope">
           <div class="task-main">
             <span class="task-id">TASK-{{ scope.row.id }}</span>
@@ -51,9 +46,7 @@
           </div>
         </template>
       </el-table-column>
-      <el-table-column label="所属模块" width="150" align="center" show-overflow-tooltip>
-        <template slot-scope="scope">{{ scope.row.moduleInfoName }}</template>
-      </el-table-column>
+      <el-table-column label="业务线" width="150" align="center" show-overflow-tooltip prop="bizIdString" />
       <el-table-column label="状态" width="105" align="center">
         <template slot-scope="scope">
           <el-select
@@ -67,24 +60,33 @@
           </el-select>
         </template>
       </el-table-column>
-      <el-table-column label="所属需求" width="200" align="center" show-overflow-tooltip>
+      <el-table-column label="所属需求" width="250" align="center" show-overflow-tooltip>
         <template slot-scope="scope">{{ scope.row.requireName }}</template>
       </el-table-column>
-      <el-table-column label="跟版客户端" width="120" align="center" show-overflow-tooltip>
-        <template slot-scope="scope">{{ scope.row.involveAppString || '无' }}</template>
-      </el-table-column>
       <el-table-column label="开发负责人" width="100" align="center" show-overflow-tooltip>
         <template slot-scope="scope">{{ scope.row.rdObject ? scope.row.rdObject.name : '' }}</template>
       </el-table-column>
       <el-table-column label="测试负责人" width="100" align="center" show-overflow-tooltip>
         <template slot-scope="scope">{{ scope.row.qaObject ? scope.row.qaObject.name : '' }}</template>
       </el-table-column>
-      <el-table-column label="任务进度" min-width="150" align="center">
+      <el-table-column label="任务进度" width="200" align="center">
         <template slot-scope="scope">
           <el-progress :percentage="Number(scope.row.rate && scope.row.rate.substring(0,4))" color="#409eff" />
         </template>
       </el-table-column>
     </el-table>
+    <div align="right">
+      <el-pagination
+        :page-sizes="[15, 30, 45, total]"
+        :current-page.sync="pages.curIndex"
+        :page-size="pages.pageSize"
+        background
+        layout="total, sizes, prev, pager, next, jumper"
+        :total="total"
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+      />
+    </div>
     <TestReport v-if="dialogTestReport" ref="TestReport" />
     <DailyReport v-if="dialogDailyReport" ref="DailyReport" />
     <ClientReport v-if="dialogClientReport" ref="ClientReport" />
@@ -111,11 +113,10 @@ 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' // 准出
-import { taskList } from '@/api/projectIndex'
+import { taskSelfList, taskTeamList } from '@/api/workSchedule'
 import { taskUpdate } from '@/api/projectViewDetails'
 import { configShowTaskEnum } from '@/api/taskIndex'
-import scheduleList from './scheduleList'
-import modifySchedule from './modifySchedule'
+import modifySchedule from '@/views/projectManage/projectList/components/modifySchedule'
 import normalDialog from '@/components/dialog/normalDialog'
 import taskDialog from '@/views/projectManage/taskList/dialog/taskDialog' // 任务状态修改(已上线/已提测/已准出)
 export default {
@@ -124,18 +125,30 @@ export default {
     TestReport,
     DailyReport,
     ClientReport,
-    scheduleList,
     taskDialog,
     modifySchedule
   },
+  props: {
+    searchForm: {
+      type: Object,
+      default: () => {
+        return {
+          teamId: null,
+          bizId: null
+        }
+      },
+      required: true
+    },
+    type: {
+      type: String,
+      default: 'person',
+      required: true
+    }
+  },
   data() {
     return {
       imgUrl: imgUrl,
-      changeData: new Map(),
-      allChange: false, // 是否全展开
-      expandArr: [], // 展开行数组
       showTaskDialog: false, // 状态弹窗
-      inputValue: '',
       all_task: [], // 任务列表
       allStatus: [], // 任务所有状态
       taskScheduleEvent: [], // 排期类型
@@ -152,15 +165,26 @@ export default {
       nowChangeTask: null, // 当前正在改变的任务对象
       taskId: '', // 将要修改状态的任务id
       visibleSchedule: false, // 排期弹框
-      selectTaskList: [] // 已选任务的id
+      selectTaskList: [], // 已选任务的id
+      total: 0,
+      status: null, // 列表状态
+      pages: {
+        pageSize: 15,
+        curIndex: 1
+      }
     }
   },
   watch: {
-    value: {
-      handler(newV, oldV) {
-        this.inputValue = newV
+    searchForm: {
+      handler(newV) {
+        this.get_allTask()
       },
-      immediate: true
+      deep: true
+    },
+    type: {
+      handler(newV) {
+        this.get_allTask()
+      }
     }
   },
   created() {
@@ -168,12 +192,33 @@ export default {
     this.get_allTask()
   },
   methods: {
+    setStatus(val) {
+      this.status === val ? this.status = null : this.status = val
+      this.get_allTask()
+    },
+    handleSizeChange(val) {
+      this.pageSize = val
+      this.get_allTask()
+    },
+    handleCurrentChange(val) {
+      this.curIndex = val
+      this.get_allTask()
+    },
     async get_allTask() { // 获取全部任务
-      const res = await taskList({
-        projectId: this.$route.query.id
-      })
-      if (res.code === 200) {
+      const params = {
+        teamSearchInfo: this.searchForm,
+        status: this.status,
+        pageInfoDO: this.pages
+      }
+      let res = null
+      if (this.type === 'person') {
+        res = await taskSelfList(params)
+      } else if (this.type === 'team') {
+        res = await taskTeamList(params)
+      }
+      if (res && res.code === 200) {
         this.all_task = res.data
+        this.total = res.total
       }
     },
     async getTaskStatus() { // 获取任务状态列表
@@ -192,10 +237,6 @@ export default {
         this.$refs.planTable.clearSelection()
       }
     },
-    expandAll(isEx) { // 全部展开
-      this.allChange = isEx
-      isEx ? this.expandArr = this.all_task.map(item => item.id) : this.expandArr = []
-    },
     async changeStatus(e) { // 状态改变
       if (e.status === 2 || e.status === 4 || e.status === 5) {
         this.taskId = e
@@ -316,6 +357,9 @@ export default {
     font-size: 10px;
   }
 }
+.color-blue {
+	color:#409EFF;
+}
 .P0 {
   background-color: #F56C6C;
 }
@@ -340,12 +384,21 @@ export default {
 .status0 {
   @include setStatus(#409EFF)
 }
-.status3, .status5, .status9, .status13, .status17{
+.status1, .status2, .status3, .status4{
   @include setStatus(#FF8952)
 }
-.status20 {
+.status5 {
   @include setStatus(#7ED321)
 }
+.search-control {
+	padding: 30px 17px 0;
+	color: #333B4A;
+	font-size: 14px;
+	span {
+		margin-right: 35px;
+		cursor: pointer;
+	}
+}
 .expand i {
   border:1px solid #DCDFE6;
 }

+ 16 - 2
src/views/workbench/team/index.vue

@@ -80,9 +80,19 @@
         </div>
       </section>
     </el-container>
+    <el-container v-if="activeName === '2'">
+      <section class="main-section">
+        <project-list :search-form="searchForm" type="team" />
+      </section>
+    </el-container>
     <el-container v-if="activeName === '3'">
       <section class="main-section">
-        <needsList :search-form="searchForm" type="team" />
+        <needs-list :search-form="searchForm" type="team" />
+      </section>
+    </el-container>
+    <el-container v-if="activeName === '4'">
+      <section class="main-section">
+        <task-list :search-form="searchForm" type="team" />
       </section>
     </el-container>
     <el-container v-show="activeName === '5'">
@@ -128,7 +138,9 @@ import ganntViews from './components/ganntViews'
 import MyFullCalendar from '@/views/workbench/person/components/myFullCalendar'
 import calenderDetail from '@/views/workbench/person/components/calenderDetail'
 import calendarDialog from '@/views/workbench/person/components/calendarFormDialog'
+import projectList from '@/views/workbench/team/components/projectList'
 import needsList from '@/views/workbench/team/components/needsList'
+import taskList from '@/views/workbench/team/components/taskList'
 import bugTableList from '@/views/workbench/bugTableList.vue'
 
 export default {
@@ -139,7 +151,9 @@ export default {
     calendarDialog,
     modifySchedule,
     bugTableList,
-    needsList
+    projectList,
+    needsList,
+    taskList
   },
   data() {
     return {