|
@@ -44,7 +44,7 @@
|
|
|
<el-table-column label="任务名称" width="200" align="center" show-overflow-tooltip>
|
|
|
<template slot-scope="scope"><span>{{ scope.row.name }}</span></template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="所属模块" min-width="120" align="center">
|
|
|
+ <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="105" align="center">
|
|
@@ -54,7 +54,7 @@
|
|
|
:class="['status'+scope.row.status]"
|
|
|
class="btns"
|
|
|
size="mini"
|
|
|
- @change="blurEvent(scope.row, scope.row.status)"
|
|
|
+ @change="changeStatus(scope.row)"
|
|
|
>
|
|
|
<el-option v-for="item in allStatus" :key="item.code" :label="item.msg" :value="item.code" />
|
|
|
</el-select>
|
|
@@ -67,10 +67,10 @@
|
|
|
<template slot-scope="scope">{{ scope.row.app }}</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="开发负责人" width="100" align="center" show-overflow-tooltip>
|
|
|
- <template slot-scope="scope">{{ scope.row.rdObject === null ? '' : scope.row.rdObject.name }}</template>
|
|
|
+ <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 === null ? '' : scope.row.qaObject.name }}</template>
|
|
|
+ <template slot-scope="scope">{{ scope.row.qaObject ? scope.row.qaObject.name : '' }}</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="任务进度" min-width="150" align="center">
|
|
|
<template slot-scope="scope">
|
|
@@ -81,6 +81,12 @@
|
|
|
<TestReport v-if="dialogTestReport" ref="TestReport" />
|
|
|
<DailyReport v-if="dialogDailyReport" ref="DailyReport" />
|
|
|
<ClientReport v-if="dialogClientReport" ref="ClientReport" />
|
|
|
+ <normal-dialog :show-dialog.sync="statusDialog" :title="'状态变更:已上线'" :width="'50%'" @confirm="confirmStatus()">
|
|
|
+ <div class="dialog-change-status">
|
|
|
+ <span>实际上线时间:</span>
|
|
|
+ <el-date-picker v-model="changeStatusDate" type="date" style="width:100%;" placeholder="选择日期" format="yyyy-MM-dd HH:mm:ss" />
|
|
|
+ </div>
|
|
|
+ </normal-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
@@ -88,10 +94,13 @@ 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 { taskUpdate } from '@/api/projectViewDetails'
|
|
|
import { configShowTaskEnum } from '@/api/taskIndex'
|
|
|
import scheduleList from './scheduleList'
|
|
|
+import normalDialog from '@/components/dialog/normalDialog'
|
|
|
export default {
|
|
|
components: {
|
|
|
+ normalDialog,
|
|
|
TestReport,
|
|
|
DailyReport,
|
|
|
ClientReport,
|
|
@@ -113,7 +122,10 @@ export default {
|
|
|
planHandleType: '', // 任务列表操作类型
|
|
|
dialogTestReport: false, // 提测
|
|
|
dialogDailyReport: false, // 日报
|
|
|
- dialogClientReport: false// 准出
|
|
|
+ dialogClientReport: false, // 准出
|
|
|
+ statusDialog: false, // 修改状态弹框
|
|
|
+ changeStatusDate: null, // 状态改变时间
|
|
|
+ nowChangeTask: null // 当前正在改变的任务对象
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -140,7 +152,7 @@ export default {
|
|
|
// }
|
|
|
}
|
|
|
},
|
|
|
- async getTaskStatus() {
|
|
|
+ async getTaskStatus() { // 获取任务状态列表
|
|
|
const res = await configShowTaskEnum()
|
|
|
if (res.code === 200) {
|
|
|
this.allStatus = res.data.taskStatus
|
|
@@ -160,8 +172,35 @@ export default {
|
|
|
this.allChange = isEx
|
|
|
isEx ? this.expandArr = this.all_task.map(item => item.id) : this.expandArr = []
|
|
|
},
|
|
|
- blurEvent() { // 状态改变
|
|
|
-
|
|
|
+ async changeStatus(e) { // 状态改变
|
|
|
+ if (e.status === 5) { // 已上线
|
|
|
+ this.statusDialog = true
|
|
|
+ this.nowChangeTask = e
|
|
|
+ } else {
|
|
|
+ const user = {
|
|
|
+ name: localStorage.getItem('username'),
|
|
|
+ ename: localStorage.getItem('realname'),
|
|
|
+ id: ''
|
|
|
+ }
|
|
|
+ const taskInfoDO = e
|
|
|
+ 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
|
|
@@ -280,10 +319,10 @@ export default {
|
|
|
.status1 {
|
|
|
@include setStatus(#FF8952)
|
|
|
}
|
|
|
-.status2 {
|
|
|
+.status3 {
|
|
|
@include setStatus(#13C2C2)
|
|
|
}
|
|
|
-.status3 {
|
|
|
+.status5 {
|
|
|
@include setStatus(#7ED321)
|
|
|
}
|
|
|
.expand i {
|
|
@@ -359,4 +398,11 @@ export default {
|
|
|
padding-left: 14px;
|
|
|
padding-right: 14px;
|
|
|
}
|
|
|
+.dialog-change-status {
|
|
|
+ margin: 2% 3%;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ white-space:nowrap;
|
|
|
+}
|
|
|
</style>
|