|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<el-dialog :visible.sync="visible" :show="show" class="deleteClassName public_task" title="状态变更" width="30%" :close-on-click-modal="false" :destroy-on-close="true" @close="OnClose()">
|
|
|
<div class="blueStripe" />
|
|
|
- <div align="center">
|
|
|
+ <div v-if="tabStatus" align="center">
|
|
|
<div style=" margin-bottom: 5%; white-space:nowrap;">{{ name }}</div>
|
|
|
<div style=" margin: 2% 3%; display: flex; justify-content: space-between; align-items: center; white-space:nowrap;">
|
|
|
<span>{{ codeName }}:</span>
|
|
@@ -15,19 +15,36 @@
|
|
|
/>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div v-else>
|
|
|
+ <div class="qz_layout">
|
|
|
+ <div class="qz_label"><span style="color: red">*</span> 开发负责人:</div>
|
|
|
+ <search-people :value.sync="form_query.rdOwner" style="width: 100%;" />
|
|
|
+ </div>
|
|
|
+ <div class="qz_layout">
|
|
|
+ <div class="qz_label"><span style="color: red">*</span> 测试负责人:</div>
|
|
|
+ <search-people :value.sync="form_query.qaOwner" style="width: 100%;" />
|
|
|
+ </div>
|
|
|
+ <div class="qz_layout">
|
|
|
+ <div class="qz_label"><span style="color: red">*</span> 技术文档:</div>
|
|
|
+ <el-input v-model="form_query.devUrl" size="medium" style="width: 100%;" placeholder="请输入" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<el-button size="small" @click="OnClose">取 消</el-button>
|
|
|
- <el-button size="small" type="primary" @click="task_status_uptate(date)">确 定</el-button>
|
|
|
+ <el-button v-if="tabStatus" size="small" type="primary" @click="task_status_uptate(date)">确 定</el-button>
|
|
|
+ <el-button v-else size="small" type="primary" @click="taskStatus(form_query)">确 定</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import searchPeople from '@/components/select/searchPeople'
|
|
|
import { taskGet } from '@/api/taskIndex' // 更新状态接口
|
|
|
import { taskUpdate } from '@/api/projectViewDetails'
|
|
|
import '@/styles/PublicStyle/index.scss'
|
|
|
export default {
|
|
|
name: 'TemplateDialog',
|
|
|
+ components: { searchPeople },
|
|
|
props: {
|
|
|
show: { type: Boolean, default: false }, // 弹窗展示
|
|
|
statusName: { type: String, default: null }, // 状态name
|
|
@@ -38,9 +55,15 @@ export default {
|
|
|
visible: this.show,
|
|
|
date: new Date(),
|
|
|
name: '',
|
|
|
+ tabStatus: true,
|
|
|
task_Id: this.taskId,
|
|
|
codeName: '',
|
|
|
taskData: {},
|
|
|
+ form_query: {
|
|
|
+ rdOwner: '',
|
|
|
+ qaOwner: '',
|
|
|
+ devUrl: ''
|
|
|
+ },
|
|
|
measurementTimeName: '实际提测时间',
|
|
|
exitTimeName: '实际准出时间',
|
|
|
onlineTimeName: '实际上线完成时间',
|
|
@@ -65,6 +88,11 @@ export default {
|
|
|
statusName: {
|
|
|
immediate: true,
|
|
|
handler(statusName) {
|
|
|
+ if (statusName === '开发中') {
|
|
|
+ this.tabStatus = false
|
|
|
+ } else {
|
|
|
+ this.tabStatus = true
|
|
|
+ }
|
|
|
if (statusName === '已提测') {
|
|
|
this.name = this.measurementTime
|
|
|
this.codeName = this.measurementTimeName
|
|
@@ -87,6 +115,9 @@ export default {
|
|
|
getTaskData() {
|
|
|
taskGet(this.task_Id).then(res => {
|
|
|
this.taskData = res.data
|
|
|
+ this.form_query.rdOwner = this.taskData.rdOwner
|
|
|
+ this.form_query.qaOwner = this.taskData.qaOwner
|
|
|
+ this.form_query.devUrl = this.taskData.devUrl
|
|
|
})
|
|
|
},
|
|
|
OnClose() {
|
|
@@ -116,8 +147,45 @@ export default {
|
|
|
this.$message({ message: res.msg, type: 'success' })
|
|
|
}
|
|
|
})
|
|
|
+ },
|
|
|
+ taskStatus(data) {
|
|
|
+ if (!this.form_query.qaOwner) {
|
|
|
+ this.$message({ type: 'warning', message: '开发负责人、测试负责人不能为空' })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.form_query.rdOwner) {
|
|
|
+ this.$message({ type: 'warning', message: '开发负责人、测试负责人不能为空' })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.taskData.isTaskDoc && !this.form_query.devUrl) {
|
|
|
+ this.$message({ type: 'warning', message: '开发负责人、测试负责人、技术文档不能为空' })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.taskData.status = 60
|
|
|
+ this.taskData.rdOwner = this.form_query.rdOwner
|
|
|
+ this.taskData.qaOwner = this.form_query.qaOwner
|
|
|
+ this.taskData.isTaskDoc ? this.taskData.devUrl = this.form_query.devUrl : ''
|
|
|
+ const taskInfoDO = this.taskData
|
|
|
+ const user = this.userData
|
|
|
+ taskUpdate({ taskInfoDO, user }).then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.$emit('update:show', false)
|
|
|
+ this.$emit('getList')
|
|
|
+ this.$emit('changeStatusAll')
|
|
|
+ this.$message({ message: res.msg, type: 'success' })
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+.qz_layout {
|
|
|
+ display: flex; justify-content: space-between; align-items: center;margin-bottom: 20px;
|
|
|
+}
|
|
|
+.qz_label {
|
|
|
+ width: 120px;
|
|
|
+}
|
|
|
+</style>
|