|
@@ -341,7 +341,7 @@
|
|
<el-input v-model="form.desc" autocomplete="off" placeholder="请输入描述信息" />
|
|
<el-input v-model="form.desc" autocomplete="off" placeholder="请输入描述信息" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="排期" prop="date_start">
|
|
<el-form-item label="排期" prop="date_start">
|
|
- <el-date-picker v-model="form.date_start" type="daterange" range-separator="~" start-placeholder="请选择开始日期" end-placeholder="请选择结束日期" />
|
|
|
|
|
|
+ <el-date-picker v-model="form.date_start" type="daterange" range-separator="~" start-placeholder="请选择开始日期" end-placeholder="请选择结束日期" value-format="yyyy-MM-dd HH:mm:ss" />
|
|
<el-checkbox v-model="form.noHoliday" style="margin-left: 10px;">排除周末</el-checkbox>
|
|
<el-checkbox v-model="form.noHoliday" style="margin-left: 10px;">排除周末</el-checkbox>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="参与人员">
|
|
<el-form-item label="参与人员">
|
|
@@ -443,6 +443,7 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
+const _ = require('lodash')
|
|
import BugDetails from '@/views/projectManage/bugList/details/index.vue'
|
|
import BugDetails from '@/views/projectManage/bugList/details/index.vue'
|
|
import {
|
|
import {
|
|
taskGet,
|
|
taskGet,
|
|
@@ -466,7 +467,8 @@ import { launchTestUpdate } from '@/api/projectPage.js'
|
|
import { bugList, bugGetEnum, bugUpdate } from '@/api/defectManage'
|
|
import { bugList, bugGetEnum, bugUpdate } from '@/api/defectManage'
|
|
import { launchTestDelete } from '@/api/InterfaceReport'
|
|
import { launchTestDelete } from '@/api/InterfaceReport'
|
|
import echarts from 'echarts'
|
|
import echarts from 'echarts'
|
|
-import dayjs from 'dayjs'
|
|
|
|
|
|
+import moment from 'moment'
|
|
|
|
+moment.locale('zh-cn')
|
|
import { releaseScheduleList } from '@/api/teamBench'
|
|
import { releaseScheduleList } from '@/api/teamBench'
|
|
import Gantt from '@/views/gantta/gantta'
|
|
import Gantt from '@/views/gantta/gantta'
|
|
import createdBug from '@/views/projectManage/bugList/file/createdBug' // bug缺陷
|
|
import createdBug from '@/views/projectManage/bugList/file/createdBug' // bug缺陷
|
|
@@ -493,12 +495,12 @@ export default {
|
|
},
|
|
},
|
|
oneA(value) {
|
|
oneA(value) {
|
|
if (!value) return ''
|
|
if (!value) return ''
|
|
- var da = value.substring(0, 1)
|
|
|
|
|
|
+ const da = value.substring(0, 1)
|
|
return da
|
|
return da
|
|
},
|
|
},
|
|
naspOut(value) {
|
|
naspOut(value) {
|
|
if (!value) return ''
|
|
if (!value) return ''
|
|
- var da = value.split(/\s+/)
|
|
|
|
|
|
+ const da = value.split(/\s+/)
|
|
return da[0]
|
|
return da[0]
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -579,9 +581,10 @@ export default {
|
|
delivery: false,
|
|
delivery: false,
|
|
type: [],
|
|
type: [],
|
|
resource: '',
|
|
resource: '',
|
|
- desc: ''
|
|
|
|
|
|
+ desc: '',
|
|
|
|
+ date_start: []
|
|
},
|
|
},
|
|
- tasktId: '',
|
|
|
|
|
|
+ taskId: this.$route.query.id,
|
|
echarts_name: [], // echarts_name
|
|
echarts_name: [], // echarts_name
|
|
echarts_value: [], // echats_value
|
|
echarts_value: [], // echats_value
|
|
fixInFutureCount: '', // 已延期
|
|
fixInFutureCount: '', // 已延期
|
|
@@ -644,31 +647,22 @@ export default {
|
|
modalClose() {
|
|
modalClose() {
|
|
this.get_list()
|
|
this.get_list()
|
|
},
|
|
},
|
|
- blurEvent(row, status) {
|
|
|
|
|
|
+ async blurEvent(row, status) {
|
|
this.staData = row
|
|
this.staData = row
|
|
this.statusId = status
|
|
this.statusId = status
|
|
if (status === 0 || status === 1 || status === 5) {
|
|
if (status === 0 || status === 1 || status === 5) {
|
|
const userData = { id: '', ename: this.userInformation, name: this.userNames }
|
|
const userData = { id: '', ename: this.userInformation, name: this.userNames }
|
|
row.status = status
|
|
row.status = status
|
|
const objData = { bugBaseInfo: row, user: userData }
|
|
const objData = { bugBaseInfo: row, user: userData }
|
|
- bugUpdate(objData).then(res => {
|
|
|
|
- row.isSelected = !row.isSelected
|
|
|
|
- if (res.code === 200) {
|
|
|
|
- this.bug_list(this.codeCache)
|
|
|
|
- this.$message({
|
|
|
|
- showClose: true,
|
|
|
|
- message: res.msg,
|
|
|
|
- type: 'success'
|
|
|
|
- })
|
|
|
|
- } else {
|
|
|
|
- this.get_list()
|
|
|
|
- this.$message({
|
|
|
|
- showClose: true,
|
|
|
|
- message: res.msg,
|
|
|
|
- type: 'error'
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ const res = await bugUpdate(objData)
|
|
|
|
+ row.isSelected = !row.isSelected
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
+ this.bug_list(this.codeCache)
|
|
|
|
+ this.$message({ showClose: true, message: res.msg, type: 'success' })
|
|
|
|
+ } else {
|
|
|
|
+ this.get_list()
|
|
|
|
+ this.$message({ showClose: true, message: res.msg, type: 'error' })
|
|
|
|
+ }
|
|
return
|
|
return
|
|
}
|
|
}
|
|
let data = ''
|
|
let data = ''
|
|
@@ -680,78 +674,63 @@ export default {
|
|
},
|
|
},
|
|
statusDialogConfirm() {
|
|
statusDialogConfirm() {
|
|
if (this.statusDialogTitle === '待测试') {
|
|
if (this.statusDialogTitle === '待测试') {
|
|
- if (typeof this.statusDialogForm.bugReason === 'undefined' || this.statusDialogForm.bugReason === null) {
|
|
|
|
|
|
+ if (this.statusDialogForm.bugReason === 'undefined' || this.statusDialogForm.bugReason === null) {
|
|
this.$message.warning('请选择缺陷原因')
|
|
this.$message.warning('请选择缺陷原因')
|
|
}
|
|
}
|
|
- this.postDialogForm()
|
|
|
|
} else if (this.statusDialogTitle === '已完成') {
|
|
} else if (this.statusDialogTitle === '已完成') {
|
|
- if (typeof this.statusDialogForm.bugReason === 'undefined' || this.statusDialogForm.bugReason === null) {
|
|
|
|
|
|
+ if (this.statusDialogForm.bugReason === 'undefined' || this.statusDialogForm.bugReason === null) {
|
|
this.$message.warning('请选择缺陷原因')
|
|
this.$message.warning('请选择缺陷原因')
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- if (typeof this.statusDialogForm.repairResult === 'undefined' || this.statusDialogForm.repairResult === null) {
|
|
|
|
|
|
+ if (this.statusDialogForm.repairResult === 'undefined' || this.statusDialogForm.repairResult === null) {
|
|
this.$message.warning('请选择修复结果')
|
|
this.$message.warning('请选择修复结果')
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- this.postDialogForm()
|
|
|
|
} else if (this.statusDialogTitle === 'Reopen') {
|
|
} else if (this.statusDialogTitle === 'Reopen') {
|
|
if (!this.statusDialogForm.reasonOrDesc) {
|
|
if (!this.statusDialogForm.reasonOrDesc) {
|
|
this.$message.warning('请输入Reopen原因')
|
|
this.$message.warning('请输入Reopen原因')
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- this.postDialogForm()
|
|
|
|
this.statusDialogVisible = false
|
|
this.statusDialogVisible = false
|
|
}
|
|
}
|
|
|
|
+ this.postDialogForm()
|
|
},
|
|
},
|
|
- postDialogForm() {
|
|
|
|
|
|
+ async postDialogForm() {
|
|
const userData = { id: '', ename: this.userInformation, name: this.userNames }
|
|
const userData = { id: '', ename: this.userInformation, name: this.userNames }
|
|
this.staData.status = this.statusId
|
|
this.staData.status = this.statusId
|
|
this.staData.reasonOrDesc = this.statusDialogForm.reasonOrDesc
|
|
this.staData.reasonOrDesc = this.statusDialogForm.reasonOrDesc
|
|
this.staData.repairResult = this.statusDialogForm.repairResult
|
|
this.staData.repairResult = this.statusDialogForm.repairResult
|
|
this.staData.bugReason = this.statusDialogForm.bugReason
|
|
this.staData.bugReason = this.statusDialogForm.bugReason
|
|
const objData = { bugBaseInfo: this.staData, user: userData }
|
|
const objData = { bugBaseInfo: this.staData, user: userData }
|
|
- bugUpdate(objData).then(res => {
|
|
|
|
- if (res.code === 200) {
|
|
|
|
- this.bug_list(this.codeCache)
|
|
|
|
- this.statusDialogVisible = false
|
|
|
|
- this.statusDialogForm = {}
|
|
|
|
- this.$message({
|
|
|
|
- showClose: true,
|
|
|
|
- message: res.msg,
|
|
|
|
- type: 'success'
|
|
|
|
- })
|
|
|
|
- } else if (res.code !== 200) {
|
|
|
|
- this.$message({
|
|
|
|
- showClose: true,
|
|
|
|
- message: res.msg,
|
|
|
|
- type: 'error'
|
|
|
|
- })
|
|
|
|
- this.get_list()
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ const res = await bugUpdate(objData)
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
+ this.bug_list(this.codeCache)
|
|
|
|
+ this.statusDialogVisible = false
|
|
|
|
+ this.statusDialogForm = {}
|
|
|
|
+ this.$message({ showClose: true, message: res.msg, type: 'success' })
|
|
|
|
+ } else if (res.code !== 200) {
|
|
|
|
+ this.$message({ showClose: true, message: res.msg, type: 'error' })
|
|
|
|
+ this.get_list()
|
|
|
|
+ }
|
|
},
|
|
},
|
|
- click_launchTestInfoDOS(e) {
|
|
|
|
- var url = window.location.href // 获取url中"?"符后的字
|
|
|
|
- this.taskId = url.split('?id=')
|
|
|
|
|
|
+ async click_launchTestInfoDOS(e) {
|
|
|
|
+ let res = null
|
|
|
|
+ const params = { taskId: this.taskId, curIndex: this.curIndex, pageSize: this.pageSize }
|
|
switch (e.index) {
|
|
switch (e.index) {
|
|
case '1':
|
|
case '1':
|
|
- launchTest({ taskId: this.taskId[1], curIndex: this.curIndex, pageSize: this.pageSize }).then(res => {
|
|
|
|
- this.launchTestInfoDOS = res.data.list // 准出
|
|
|
|
- this.total = res.data.total
|
|
|
|
- })
|
|
|
|
|
|
+ res = await launchTest(params)
|
|
|
|
+ this.launchTestInfoDOS = res.data.list // 准出
|
|
break
|
|
break
|
|
case '2':
|
|
case '2':
|
|
- dailyReport({ taskId: this.taskId[1], curIndex: this.curIndex, pageSize: this.pageSize }).then(res => {
|
|
|
|
- this.dailyTestReports = res.data.list
|
|
|
|
- this.total = res.data.total
|
|
|
|
- })
|
|
|
|
|
|
+ res = await dailyReport(params)
|
|
|
|
+ this.dailyTestReports = res.data.list
|
|
break
|
|
break
|
|
case '3':
|
|
case '3':
|
|
- projectTestReport({ taskId: this.taskId[1], curIndex: this.curIndex, pageSize: this.pageSize }).then(res => {
|
|
|
|
- this.projectTestReportDOS = res.data.list
|
|
|
|
- this.total = res.data.total
|
|
|
|
- })
|
|
|
|
|
|
+ res = await projectTestReport(params)
|
|
|
|
+ this.projectTestReportDOS = res.data.list
|
|
break
|
|
break
|
|
|
|
+ default:
|
|
|
|
+ this.total = res && res.data.total
|
|
}
|
|
}
|
|
},
|
|
},
|
|
toReportView(ele, index) {
|
|
toReportView(ele, index) {
|
|
@@ -789,69 +768,63 @@ export default {
|
|
}
|
|
}
|
|
return item.idap
|
|
return item.idap
|
|
},
|
|
},
|
|
- get_list() {
|
|
|
|
- var url = window.location.href // 获取url中"?"符后的字
|
|
|
|
- this.taskId = url.split('?id=')
|
|
|
|
- configShowTaskEnum().then(res => {
|
|
|
|
- this.taskScheduleEvent = res.data.taskScheduleEvent
|
|
|
|
- this.taskStatus = res.data.taskStatus
|
|
|
|
- this.bugStatus = res.data.bugStatus
|
|
|
|
|
|
+ async get_list() {
|
|
|
|
+ const resEnum = await configShowTaskEnum()
|
|
|
|
+ if (resEnum.code === 200) {
|
|
|
|
+ this.taskScheduleEvent = resEnum.data.taskScheduleEvent
|
|
|
|
+ this.taskStatus = resEnum.data.taskStatus
|
|
|
|
+ this.bugStatus = resEnum.data.bugStatus
|
|
this.bugStatus.unshift({ code: -1, msg: '全部' })
|
|
this.bugStatus.unshift({ code: -1, msg: '全部' })
|
|
- })
|
|
|
|
- taskGet(this.taskId[1]).then(res => {
|
|
|
|
- if (res.code === 200) {
|
|
|
|
- if (res.data.bizId !== Number(localStorage.getItem('bizId'))) {
|
|
|
|
- Utils.$emit('demo', res.data.bizId)
|
|
|
|
- }
|
|
|
|
- this.pauseName = res.data.involveAppString === null ? '' : res.data.involveAppString
|
|
|
|
- this.task_form = res.data
|
|
|
|
- this.total = res.total
|
|
|
|
- this.tiem_date.startTime = res.data.scheduleListResponse.startTime // 开始时间
|
|
|
|
- this.tiem_date.endTime = res.data.scheduleListResponse.endTime // 结束时间
|
|
|
|
- this.arr_event = res.data.scheduleListResponse.schedulDetailResponseList
|
|
|
|
- this.table_loading = false
|
|
|
|
- this.bug_list(-1)
|
|
|
|
- this.task_form.bugBaseInfoDOList !== null ? (this.bugBaseInfoDOList = res.date.bugBaseInfoDOList) : (this.bugBaseInfoDOList = []) // bug
|
|
|
|
- const param = {
|
|
|
|
- appType: Number(res.data.involveApp),
|
|
|
|
- startTime: res.data.scheduleListResponse.startTime,
|
|
|
|
- endTime: res.data.scheduleListResponse.endTime
|
|
|
|
- }
|
|
|
|
- this.ganttData = this.tableDeal(
|
|
|
|
- res.data.scheduleListResponse.schedulDetailResponseList
|
|
|
|
- )
|
|
|
|
- releaseScheduleList(param).then(res => {
|
|
|
|
- if (res.code === 200) {
|
|
|
|
- this.appVersion = this.versionDeal(res.data)
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- if (this.task_form.stageString === '未知') {
|
|
|
|
- this.bgStyle = '#f4f4f5'
|
|
|
|
- this.colorStyle = '#909399'
|
|
|
|
- this.isHeadShow = true
|
|
|
|
- }
|
|
|
|
- this.task_form.stageString === '正常' ? this.bgStyle = '#69B3FF' : ''
|
|
|
|
- this.task_form.stageString === '延期' ? this.bgStyle = '#FF8952' : ''
|
|
|
|
- this.task_form.stageString === '已延期' ? this.bgStyle = '#F56C6C' : ''
|
|
|
|
|
|
+ }
|
|
|
|
+ const resTask = await taskGet(this.taskId)
|
|
|
|
+ if (resTask.code === 200) {
|
|
|
|
+ if (resTask.data.bizId !== Number(localStorage.getItem('bizId'))) {
|
|
|
|
+ Utils.$emit('demo', resTask.data.bizId)
|
|
}
|
|
}
|
|
- })
|
|
|
|
- commentList({ type: 3, joinId: this.taskId[1] }).then(res => {
|
|
|
|
- this.commentTxt = res.data
|
|
|
|
- this.commentTxt !== '' ? (this.commentShow = false) : (this.commentShow = true)
|
|
|
|
- })
|
|
|
|
|
|
+ this.pauseName = resTask.data.involveAppString === null ? '' : resTask.data.involveAppString
|
|
|
|
+ this.task_form = resTask.data
|
|
|
|
+ this.total = resTask.total
|
|
|
|
+ this.tiem_date.startTime = resTask.data.scheduleListResponse.startTime // 开始时间
|
|
|
|
+ this.tiem_date.endTime = resTask.data.scheduleListResponse.endTime // 结束时间
|
|
|
|
+ this.arr_event = resTask.data.scheduleListResponse.schedulDetailResponseList
|
|
|
|
+ this.table_loading = false
|
|
|
|
+ this.bug_list(-1)
|
|
|
|
+ this.task_form.bugBaseInfoDOList !== null ? (this.bugBaseInfoDOList = resTask.date.bugBaseInfoDOList) : (this.bugBaseInfoDOList = []) // bug
|
|
|
|
+ const param = {
|
|
|
|
+ appType: Number(resTask.data.involveApp),
|
|
|
|
+ startTime: resTask.data.scheduleListResponse.startTime,
|
|
|
|
+ endTime: resTask.data.scheduleListResponse.endTime
|
|
|
|
+ }
|
|
|
|
+ this.ganttData = this.tableDeal(
|
|
|
|
+ resTask.data.scheduleListResponse.schedulDetailResponseList
|
|
|
|
+ )
|
|
|
|
+ if (this.task_form.stageString === '未知') {
|
|
|
|
+ this.bgStyle = '#f4f4f5'
|
|
|
|
+ this.colorStyle = '#909399'
|
|
|
|
+ this.isHeadShow = true
|
|
|
|
+ }
|
|
|
|
+ this.task_form.stageString === '正常' ? this.bgStyle = '#69B3FF' : ''
|
|
|
|
+ this.task_form.stageString === '延期' ? this.bgStyle = '#FF8952' : ''
|
|
|
|
+ this.task_form.stageString === '已延期' ? this.bgStyle = '#F56C6C' : ''
|
|
|
|
+ const resSchedule = await releaseScheduleList(param)
|
|
|
|
+ if (resSchedule.code === 200) {
|
|
|
|
+ this.appVersion = this.versionDeal(resSchedule.data)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ const resComment = await commentList({ type: 3, joinId: this.taskId })
|
|
|
|
+ this.commentTxt = resComment.data
|
|
|
|
+ this.commentTxt !== '' ? this.commentShow = false : this.commentShow = true
|
|
},
|
|
},
|
|
tableDeal(arr) {
|
|
tableDeal(arr) {
|
|
- if (arr === null) {
|
|
|
|
- arr = null
|
|
|
|
- } else {
|
|
|
|
|
|
+ if (arr) {
|
|
return arr.map(eachData => ({
|
|
return arr.map(eachData => ({
|
|
task: { description: eachData.name || '' },
|
|
task: { description: eachData.name || '' },
|
|
schedules: [
|
|
schedules: [
|
|
{
|
|
{
|
|
taskName: eachData.name || '', event: eachData.desc,
|
|
taskName: eachData.name || '', event: eachData.desc,
|
|
- schedule: dayjs(eachData.startTime).format('YYYY.MM.DD') + ' - ' + dayjs(eachData.endTime).format('YYYY.MM.DD'),
|
|
|
|
- startDate: dayjs(eachData.startTime).format('YYYY-MM-DD'),
|
|
|
|
- length: (dayjs(eachData.endTime) - dayjs(eachData.startTime)) / 86400000 + 1,
|
|
|
|
|
|
+ schedule: moment(eachData.startTime).format('YYYY.MM.DD') + ' - ' + moment(eachData.endTime).format('YYYY.MM.DD'),
|
|
|
|
+ startDate: moment(eachData.startTime).format('YYYY-MM-DD'),
|
|
|
|
+ length: (moment(eachData.endTime) - moment(eachData.startTime)) / 86400000 + 1,
|
|
owners: eachData.peopleObject === null ? [] : eachData.peopleObject.map(eachMember => eachMember.name),
|
|
owners: eachData.peopleObject === null ? [] : eachData.peopleObject.map(eachMember => eachMember.name),
|
|
taskId: eachData.taskId
|
|
taskId: eachData.taskId
|
|
}
|
|
}
|
|
@@ -860,42 +833,43 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
versionDeal(arr) {
|
|
versionDeal(arr) {
|
|
- arr === null ? arr = 0 : ''
|
|
|
|
|
|
+ if (!arr) {
|
|
|
|
+ return false
|
|
|
|
+ }
|
|
const result = {}
|
|
const result = {}
|
|
for (let i = 0; i < arr.length; i++) {
|
|
for (let i = 0; i < arr.length; i++) {
|
|
- let pauseTime = dayjs(arr[i].startTime).format('YYYY-MM-DD')
|
|
|
|
- while (pauseTime <= dayjs(arr[i].endTime).format('YYYY-MM-DD')) {
|
|
|
|
|
|
+ let pauseTime = moment(arr[i].startTime).format('YYYY-MM-DD')
|
|
|
|
+ while (pauseTime <= moment(arr[i].endTime).format('YYYY-MM-DD')) {
|
|
if (this.pauseName !== null && this.pauseName !== '') {
|
|
if (this.pauseName !== null && this.pauseName !== '') {
|
|
result[pauseTime] = this.pauseName + arr[i].version + arr[i].name
|
|
result[pauseTime] = this.pauseName + arr[i].version + arr[i].name
|
|
} else {
|
|
} else {
|
|
result[pauseTime] = ''
|
|
result[pauseTime] = ''
|
|
}
|
|
}
|
|
// result[pauseTime] = (this.pauseName || '') + arr[i].version + arr[i].name
|
|
// result[pauseTime] = (this.pauseName || '') + arr[i].version + arr[i].name
|
|
- pauseTime = dayjs(pauseTime).add(1, 'day').format('YYYY-MM-DD')
|
|
|
|
|
|
+ pauseTime = moment(pauseTime).add(1, 'day').format('YYYY-MM-DD')
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return result
|
|
return result
|
|
},
|
|
},
|
|
open_created(e) {
|
|
open_created(e) {
|
|
// 打开弹窗
|
|
// 打开弹窗
|
|
- var url = window.location.href // 获取url中"?"符后的字串
|
|
|
|
- this.taskId = url.split('?id=')
|
|
|
|
this.dialog_open = true
|
|
this.dialog_open = true
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
- this.$refs.task_createdUpdata.init(3, this.taskId)
|
|
|
|
|
|
+ this.$refs.task_createdUpdata.init(3, [null, this.taskId])
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- get_echarts() {
|
|
|
|
- bugGetBugStatusMapInfo({ taskId: this.taskId[1] }).then(res => {
|
|
|
|
- this.fixInFutureCount = res.data.fixInFutureCount
|
|
|
|
- this.totalCount = res.data.totalCount
|
|
|
|
- res.data.statusInfoList.map(item => {
|
|
|
|
|
|
+ async get_echarts() {
|
|
|
|
+ const resBug = await bugGetBugStatusMapInfo({ taskId: this.taskId })
|
|
|
|
+ if (resBug === 200) {
|
|
|
|
+ this.fixInFutureCount = resBug.data.fixInFutureCount
|
|
|
|
+ this.totalCount = resBug.data.totalCount
|
|
|
|
+ resBug.data.statusInfoList.map(item => {
|
|
this.echarts_name.push(item.statusString)
|
|
this.echarts_name.push(item.statusString)
|
|
this.echarts_value.push(item.count)
|
|
this.echarts_value.push(item.count)
|
|
})
|
|
})
|
|
- })
|
|
|
|
- setTimeout(() => {
|
|
|
|
- var myChart = echarts.init(document.getElementById('div1'))
|
|
|
|
|
|
+ }
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ const myChart = echarts.init(document.getElementById('div1'))
|
|
myChart.setOption({
|
|
myChart.setOption({
|
|
tooltip: {
|
|
tooltip: {
|
|
trigger: 'axis',
|
|
trigger: 'axis',
|
|
@@ -938,31 +912,30 @@ export default {
|
|
]
|
|
]
|
|
})
|
|
})
|
|
window.onresize = myChart.resize
|
|
window.onresize = myChart.resize
|
|
- }, 500)
|
|
|
|
|
|
+ })
|
|
},
|
|
},
|
|
- handleCommand(command) {
|
|
|
|
|
|
+ async handleCommand(command) {
|
|
if (command.label === '已上线') {
|
|
if (command.label === '已上线') {
|
|
this.centerDialogVisible_status = true
|
|
this.centerDialogVisible_status = true
|
|
return
|
|
return
|
|
} else {
|
|
} else {
|
|
this.task_form.statusString = command.label
|
|
this.task_form.statusString = command.label
|
|
- var taskInfoDO = this.task_form
|
|
|
|
|
|
+ const taskInfoDO = this.task_form
|
|
taskInfoDO.status = command.value
|
|
taskInfoDO.status = command.value
|
|
- var user = { name: this.userNames, ename: this.userInformation, id: '' }
|
|
|
|
- taskUpdate({ taskInfoDO, user }).then(res => {
|
|
|
|
- if (res.code === 200) {
|
|
|
|
- this.$message({ message: res.msg, type: 'success', offset: 150 })
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ const user = { name: this.userNames, ename: this.userInformation, id: '' }
|
|
|
|
+ const resTask = await taskUpdate({ taskInfoDO, user })
|
|
|
|
+ if (resTask.code === 200) {
|
|
|
|
+ this.$message({ message: resTask.msg, type: 'success', offset: 150 })
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
task_status_uptate(e) {
|
|
task_status_uptate(e) {
|
|
this.task_form.statusString = '已上线'
|
|
this.task_form.statusString = '已上线'
|
|
- var resDate = e.getFullYear() + '-' + (e.getMonth() + 1) + '-' + e.getDate() + ' ' + e.getHours() + ':' + e.getMinutes() + ':' + e.getSeconds()
|
|
|
|
- var taskInfoDO = this.task_form
|
|
|
|
|
|
+ const resDate = e.getFullYear() + '-' + (e.getMonth() + 1) + '-' + e.getDate() + ' ' + e.getHours() + ':' + e.getMinutes() + ':' + e.getSeconds()
|
|
|
|
+ const taskInfoDO = this.task_form
|
|
taskInfoDO.status = 5
|
|
taskInfoDO.status = 5
|
|
taskInfoDO.onlineRealTime = resDate
|
|
taskInfoDO.onlineRealTime = resDate
|
|
- var user = { name: this.userNames, ename: this.userInformation, id: '' }
|
|
|
|
|
|
+ const user = { name: this.userNames, ename: this.userInformation, id: '' }
|
|
taskUpdate({ taskInfoDO, user }).then(res => {
|
|
taskUpdate({ taskInfoDO, user }).then(res => {
|
|
this.centerDialogVisible_status = false
|
|
this.centerDialogVisible_status = false
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
@@ -973,7 +946,7 @@ export default {
|
|
},
|
|
},
|
|
// 事件删除
|
|
// 事件删除
|
|
event_delete(id) {
|
|
event_delete(id) {
|
|
- var user = { name: this.userNames, ename: this.userInformation, id: '' }
|
|
|
|
|
|
+ const user = { name: this.userNames, ename: this.userInformation, id: '' }
|
|
deleteEvent(id, user).then(res => {
|
|
deleteEvent(id, user).then(res => {
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
this.get_list()
|
|
this.get_list()
|
|
@@ -986,19 +959,18 @@ export default {
|
|
event_query(e) {
|
|
event_query(e) {
|
|
// 编辑事件(添加事件)
|
|
// 编辑事件(添加事件)
|
|
this.even = '编辑事件'
|
|
this.even = '编辑事件'
|
|
- var eventID = {}
|
|
|
|
|
|
+ let eventID = {}
|
|
this.arr_event.map(item => {
|
|
this.arr_event.map(item => {
|
|
item.id === e ? (eventID = item) : ''
|
|
item.id === e ? (eventID = item) : ''
|
|
})
|
|
})
|
|
this.dialogFormVisible = true
|
|
this.dialogFormVisible = true
|
|
- var start1 = eventID.startTime !== null ? eventID.startTime.split(/\s+/) : ''
|
|
|
|
- var start2 = eventID.endTime !== null ? eventID.endTime.split(/\s+/) : ''
|
|
|
|
|
|
+ console.log(eventID)
|
|
|
|
|
|
- this.form = eventID
|
|
|
|
|
|
+ this.form = _.cloneDeep(eventID)
|
|
if (eventID.startTime !== null) {
|
|
if (eventID.startTime !== null) {
|
|
- this.$set(this.form, 'date_start', [start1[0] + 'T' + start1[1] + '.000Z', start2[0] + 'T' + start2[1] + '.000Z'])
|
|
|
|
|
|
+ this.$set(this.form, 'date_start', [eventID.startTime, eventID.endTime])
|
|
} else {
|
|
} else {
|
|
- this.$set(this.form, 'date_start', '')
|
|
|
|
|
|
+ this.$set(this.form, 'date_start', [])
|
|
}
|
|
}
|
|
this.options = this.form.peopleObject
|
|
this.options = this.form.peopleObject
|
|
if (this.form.peopleObject !== null && this.form.peopleObject !== '') {
|
|
if (this.form.peopleObject !== null && this.form.peopleObject !== '') {
|
|
@@ -1032,7 +1004,7 @@ export default {
|
|
},
|
|
},
|
|
task_delete(e) {
|
|
task_delete(e) {
|
|
// 删除任务
|
|
// 删除任务
|
|
- var user = { name: this.userNames, ename: this.userInformation, id: '' }
|
|
|
|
|
|
+ const user = { name: this.userNames, ename: this.userInformation, id: '' }
|
|
tasktaskDelete(user, e).then(res => {
|
|
tasktaskDelete(user, e).then(res => {
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
this.$router.push({ name: '任务', query: {}})
|
|
this.$router.push({ name: '任务', query: {}})
|
|
@@ -1057,128 +1029,114 @@ export default {
|
|
this.even = '编辑事件'
|
|
this.even = '编辑事件'
|
|
this.$refs['form'].validate(valid => {
|
|
this.$refs['form'].validate(valid => {
|
|
if (valid) {
|
|
if (valid) {
|
|
- var schedule = e
|
|
|
|
|
|
+ const schedule = e
|
|
e.noHoliday === true ? (schedule.noHoliday = 0) : (schedule.noHoliday = 1)
|
|
e.noHoliday === true ? (schedule.noHoliday = 0) : (schedule.noHoliday = 1)
|
|
schedule.peopleObject = e.peoples
|
|
schedule.peopleObject = e.peoples
|
|
schedule.startTime = e.date_start[0]
|
|
schedule.startTime = e.date_start[0]
|
|
schedule.endTime = e.date_start[1]
|
|
schedule.endTime = e.date_start[1]
|
|
- schedule.taskId = Number(this.taskId[1])
|
|
|
|
|
|
+ schedule.taskId = Number(this.taskId)
|
|
this.taskScheduleEvent.map(item => {
|
|
this.taskScheduleEvent.map(item => {
|
|
item.code === e.type ? (schedule.name = item.msg) : ''
|
|
item.code === e.type ? (schedule.name = item.msg) : ''
|
|
})
|
|
})
|
|
- var user = { name: this.userNames, ename: this.userInformation, id: '' }
|
|
|
|
- ScheduleUpdate({ schedule, user }).then(res => {
|
|
|
|
- if (res.code === 200) {
|
|
|
|
- this.dialogFormVisible = false
|
|
|
|
- this.$message({
|
|
|
|
- message: res.msg,
|
|
|
|
- type: 'success',
|
|
|
|
- duration: 1000,
|
|
|
|
- offset: 150
|
|
|
|
- })
|
|
|
|
- this.get_list()
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ this.ScheduleUpdate(schedule)
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ async ScheduleUpdate(schedule) {
|
|
|
|
+ const user = { name: this.userNames, ename: this.userInformation, id: '' }
|
|
|
|
+ const res = await ScheduleUpdate({ schedule, user })
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
+ this.dialogFormVisible = false
|
|
|
|
+ this.$message({
|
|
|
|
+ message: res.msg,
|
|
|
|
+ type: 'success',
|
|
|
|
+ duration: 1000,
|
|
|
|
+ offset: 150
|
|
|
|
+ })
|
|
|
|
+ this.get_list()
|
|
|
|
+ }
|
|
|
|
+ },
|
|
event_created(e) {
|
|
event_created(e) {
|
|
// 添加事件
|
|
// 添加事件
|
|
this.even = '新建事件'
|
|
this.even = '新建事件'
|
|
this.$refs['form'].validate(valid => {
|
|
this.$refs['form'].validate(valid => {
|
|
if (valid) {
|
|
if (valid) {
|
|
- var schedule = e
|
|
|
|
- e.noHoliday === true
|
|
|
|
- ? (schedule.noHoliday = 0)
|
|
|
|
- : (schedule.noHoliday = 1)
|
|
|
|
|
|
+ const schedule = _.cloneDeep(e)
|
|
|
|
+ e.noHoliday ? (schedule.noHoliday = 0) : (schedule.noHoliday = 1)
|
|
schedule.startTime = e.date_start[0]
|
|
schedule.startTime = e.date_start[0]
|
|
schedule.endTime = e.date_start[1]
|
|
schedule.endTime = e.date_start[1]
|
|
- schedule.taskId = Number(this.taskId[1])
|
|
|
|
|
|
+ schedule.taskId = Number(this.taskId)
|
|
|
|
+ delete schedule.date_start
|
|
this.taskScheduleEvent.map(item => {
|
|
this.taskScheduleEvent.map(item => {
|
|
item.code === e.type ? (schedule.name = item.msg) : ''
|
|
item.code === e.type ? (schedule.name = item.msg) : ''
|
|
})
|
|
})
|
|
- var user = {
|
|
|
|
- name: this.userNames,
|
|
|
|
- ename: this.userInformation,
|
|
|
|
- id: ''
|
|
|
|
- }
|
|
|
|
- ScheduleCreate({ schedule, user }).then(res => {
|
|
|
|
- if (res.code === 200) {
|
|
|
|
- this.dialogFormVisible = false
|
|
|
|
- this.$message({
|
|
|
|
- message: res.msg,
|
|
|
|
- type: 'success',
|
|
|
|
- duration: 1000,
|
|
|
|
- offset: 150
|
|
|
|
- })
|
|
|
|
- this.get_list()
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ this.ScheduleCreate(schedule)
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- bug_list(e) {
|
|
|
|
- this.codeCache = e
|
|
|
|
|
|
+ async ScheduleCreate(schedule) {
|
|
|
|
+ const user = {
|
|
|
|
+ name: this.userNames,
|
|
|
|
+ ename: this.userInformation,
|
|
|
|
+ id: ''
|
|
|
|
+ }
|
|
|
|
+ const res = await ScheduleCreate({ schedule, user })
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
+ this.dialogFormVisible = false
|
|
|
|
+ this.$message({ message: res.msg, type: 'success', duration: 1000, offset: 150 })
|
|
|
|
+ this.get_list()
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ async bug_list(e) {
|
|
|
|
+ this.codeCache = _.cloneDeep(e)
|
|
// bug查询
|
|
// bug查询
|
|
- bugGetEnum().then(res => {
|
|
|
|
- this.bugEnumList = res.data.bugEnumList // status
|
|
|
|
- this.priorityLevelEnumList = res.data.priorityLevelEnumList // 优先级
|
|
|
|
- this.repairResultEnumList = res.data.repairResultEnumList // 修复结果
|
|
|
|
- this.bugReasonEnumList = res.data.bugReasonEnumList
|
|
|
|
- })
|
|
|
|
|
|
+ const resEnum = await bugGetEnum()
|
|
|
|
+ if (resEnum.code === 200) {
|
|
|
|
+ this.bugEnumList = resEnum.data.bugEnumList // status
|
|
|
|
+ this.priorityLevelEnumList = resEnum.data.priorityLevelEnumList // 优先级
|
|
|
|
+ this.repairResultEnumList = resEnum.data.repairResultEnumList // 修复结果
|
|
|
|
+ this.bugReasonEnumList = resEnum.data.bugReasonEnumList
|
|
|
|
+ }
|
|
|
|
+ let params
|
|
|
|
+ this.curIndex = 1
|
|
if (e === -1) {
|
|
if (e === -1) {
|
|
- bugList({ taskId: this.taskId[1], pageSize: this.pageSize, curIndex: this.curIndex }).then(res => {
|
|
|
|
- if (res.code === 200) {
|
|
|
|
- if (res.data) {
|
|
|
|
- this.colorSty = '#6AB4FF'
|
|
|
|
- this.bugBaseInfoDOList = res.data
|
|
|
|
- this.total = res.total
|
|
|
|
- this.bugBaseInfoDOList.map(item1 => {
|
|
|
|
- this.priorityLevelEnumList.map(item => {
|
|
|
|
- item1.priorityLevel !== null ? item1.priorityLevel === item.name ? item1.priorityCode = item.code : '' : ''
|
|
|
|
- })
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ params = { taskId: this.taskId, pageSize: this.pageSize, curIndex: this.curIndex }
|
|
} else {
|
|
} else {
|
|
- this.curIndex = 1
|
|
|
|
- bugList({ status: e, taskId: Number(this.taskId[1]), pageSize: this.pageSize, curIndex: this.curIndex }).then(res => {
|
|
|
|
- if (res.code === 200) {
|
|
|
|
- if (res.data !== null) {
|
|
|
|
- this.colorSty = ''
|
|
|
|
- this.bugBaseInfoDOList = res.data
|
|
|
|
- this.total = res.total
|
|
|
|
- this.bugBaseInfoDOList.map(item1 => {
|
|
|
|
- this.priorityLevelEnumList.map(item => {
|
|
|
|
- item1.priorityLevel !== null ? item1.priorityLevel === item.name ? item1.priorityCode = item.code : '' : ''
|
|
|
|
- })
|
|
|
|
- })
|
|
|
|
- } else {
|
|
|
|
- this.bugBaseInfoDOList = []
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ params = { status: e, taskId: Number(this.taskId), pageSize: this.pageSize, curIndex: this.curIndex }
|
|
|
|
+ }
|
|
|
|
+ const resList = await bugList(params)
|
|
|
|
+ if (resList.code === 200) {
|
|
|
|
+ if (resList.data) {
|
|
|
|
+ this.colorSty = e === -1 ? '#6AB4FF' : ''
|
|
|
|
+ this.bugBaseInfoDOList = resList.data
|
|
|
|
+ this.total = resList.total
|
|
|
|
+ this.bugBaseInfoDOList.map(item1 => {
|
|
|
|
+ this.priorityLevelEnumList.map(item => {
|
|
|
|
+ item1.priorityLevel !== null ? item1.priorityLevel === item.name ? item1.priorityCode = item.code : '' : ''
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ this.bugBaseInfoDOList = []
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- comment(e) {
|
|
|
|
|
|
+ async comment(e) {
|
|
this.content = ''
|
|
this.content = ''
|
|
this.commentShow = false
|
|
this.commentShow = false
|
|
- var commentInfo = {
|
|
|
|
- joinId: this.taskId[1],
|
|
|
|
|
|
+ const commentInfo = {
|
|
|
|
+ joinId: this.taskId,
|
|
content: e,
|
|
content: e,
|
|
type: 3,
|
|
type: 3,
|
|
fatherId: 0,
|
|
fatherId: 0,
|
|
name: this.userNames,
|
|
name: this.userNames,
|
|
email: this.userInformation
|
|
email: this.userInformation
|
|
}
|
|
}
|
|
- var user = { name: this.userNames, ename: this.userInformation, id: '' }
|
|
|
|
- commentCreate({ commentInfo, user }).then(res => {
|
|
|
|
- if (res.code === 200) {
|
|
|
|
- this.get_list()
|
|
|
|
- this.$message({ message: res.msg, type: 'success', offset: 150 })
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ const user = { name: this.userNames, ename: this.userInformation, id: '' }
|
|
|
|
+ const res = await commentCreate({ commentInfo, user })
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
+ this.get_list()
|
|
|
|
+ this.$message({ message: res.msg, type: 'success', offset: 150 })
|
|
|
|
+ }
|
|
},
|
|
},
|
|
GanttChart(e) {
|
|
GanttChart(e) {
|
|
switch (e) {
|
|
switch (e) {
|
|
@@ -1219,8 +1177,6 @@ export default {
|
|
},
|
|
},
|
|
// 打回
|
|
// 打回
|
|
back(e, ele, data) {
|
|
back(e, ele, data) {
|
|
- const url1 = location.href // 获取url中"?"符后的字串
|
|
|
|
- const arr1 = url1.split('=')
|
|
|
|
this.requireName = data.name
|
|
this.requireName = data.name
|
|
this.CallBackStatus = e
|
|
this.CallBackStatus = e
|
|
this.CallBackId = ele
|
|
this.CallBackId = ele
|
|
@@ -1236,7 +1192,7 @@ export default {
|
|
this.Str = '打回'
|
|
this.Str = '打回'
|
|
break
|
|
break
|
|
case 3:
|
|
case 3:
|
|
- data.taskIds = [Number(arr1[1])]
|
|
|
|
|
|
+ data.taskIds = [Number(this.taskId)]
|
|
console.log(data, 'ssss')
|
|
console.log(data, 'ssss')
|
|
this.dialogVisible1 = true
|
|
this.dialogVisible1 = true
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
@@ -1262,27 +1218,22 @@ export default {
|
|
break
|
|
break
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- passOrBackSend() {
|
|
|
|
|
|
+ async passOrBackSend() {
|
|
this.dialog_launchTestInfoDOS = false
|
|
this.dialog_launchTestInfoDOS = false
|
|
- const tt = { status: this.CallBackStatus, id: this.CallBackId }
|
|
|
|
- var userData = { id: '', ename: this.userInformation, name: this.userNames }
|
|
|
|
- var objData = { launchTestInfo: tt, user: userData }
|
|
|
|
|
|
+ const launchTestInfo = { status: this.CallBackStatus, id: this.CallBackId }
|
|
|
|
+ const userData = { id: '', ename: this.userInformation, name: this.userNames }
|
|
|
|
+ const objData = { launchTestInfo: launchTestInfo, user: userData }
|
|
if (this.Str === '通过' || this.Str === '打回') {
|
|
if (this.Str === '通过' || this.Str === '打回') {
|
|
- launchTestUpdate(objData).then(res => {
|
|
|
|
- res.code === 200 ? this.$message({ message: res.msg, type: 'success', offset: 150 }) : this.$message({ message: res.msg, type: 'error', offset: 150 })
|
|
|
|
- var url = window.location.href // 获取url中"?"符后的字
|
|
|
|
- this.taskId = url.split('?id=')
|
|
|
|
- launchTest({ taskId: this.taskId[1], curIndex: this.curIndex, pageSize: this.pageSize }).then(res => {
|
|
|
|
- this.launchTestInfoDOS = res.data.list
|
|
|
|
- this.total = res.data.total
|
|
|
|
- })
|
|
|
|
- })
|
|
|
|
|
|
+ const res1 = await launchTestUpdate(objData)
|
|
|
|
+ res1.code === 200 ? this.$message({ message: res1.msg, type: 'success', offset: 150 }) : this.$message({ message: res1.msg, type: 'error', offset: 150 })
|
|
|
|
+ const res2 = await launchTest({ taskId: this.taskId, curIndex: this.curIndex, pageSize: this.pageSize })
|
|
|
|
+ this.launchTestInfoDOS = res2.data.list
|
|
|
|
+ this.total = res2.data.total
|
|
} else if (this.Str === '删除') {
|
|
} else if (this.Str === '删除') {
|
|
- launchTestDelete(userData, this.CallBackId).then(res => {
|
|
|
|
- if (res.code === 200) {
|
|
|
|
- this.$message({ type: 'success', message: '已删除' })
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ const res3 = await launchTestDelete(userData, this.CallBackId)
|
|
|
|
+ if (res3.code === 200) {
|
|
|
|
+ this.$message({ type: 'success', message: '已删除' })
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
handleSizeChange(size) { // 分页
|
|
handleSizeChange(size) { // 分页
|