Просмотр исходного кода

Merge branch 'http_test' of git.xiaojukeji.com:jacklijiajia/thoth-frontend into wangzi_dev

PrinceLee 5 лет назад
Родитель
Сommit
6a2bc59aaa

+ 0 - 336
src/views/projectManage/projectList/components/bugsList.vue

@@ -1,336 +0,0 @@
-<template>
-  <div>
-    <el-table
-      ref="planTable"
-      :data="bugsDataList"
-      style="width: 100%;"
-      size="mini"
-      row-key="id"
-      :header-cell-style="{ color: '#4A4A4A', fontSize: '14px', fontWeight: '550', textAlign: 'center' }"
-      show-overflow-tooltip="true"
-      :header-row-style="{height: '50px'}"
-    >
-      <el-table-column label="优先级" prop="priority" width="100" sortable align="center">
-        <template slot-scope="scope" style="text-align: center;">
-          <span class="div_priority" :class="scope.row.priorityName">
-            {{ scope.row.priorityName }}
-          </span>
-        </template>
-      </el-table-column>
-      <el-table-column prop="bugName" label="缺陷标题" width="200" align="center" show-overflow-tooltip>
-        <template slot-scope="scope">
-          <span style=" color: #A7AEBC; font-size: 10px;">{{ 'BUG-' + scope.row.id }}</span>
-          <br>
-          <span class="bug-title" @click="getToDetails(scope.row.id)">{{ scope.row.bugName }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column label="状态" width="115" align="center">
-        <template slot-scope="scope">
-          <el-select
-            v-model="scope.row.status"
-            :class="['status'+scope.row.status]"
-            class="btns"
-            size="mini"
-            @change="statusChange(scope.row)"
-          >
-            <el-option v-for="item in allStatus" :key="item.code" :label="item.name" :value="item.code" />
-          </el-select>
-        </template>
-      </el-table-column>
-      <el-table-column prop="priorityName" label="缺陷等级" align="center" />
-      <el-table-column prop="taskName" label="所属任务" align="center" width="200" show-overflow-tooltip />
-      <el-table-column prop="creatorList" label="提报人" width="100" align="center" />
-      <el-table-column prop="assignerList" label="责任人" width="100" align="center" show-overflow-tooltip />
-      <el-table-column prop="currentHandlerList" label="修复人" width="100" align="center" show-overflow-tooltip />
-      <el-table-column prop="gmtCreate" label="创建日期" width="150" align="center">
-        <template slot-scope="scope">{{ scope.row.gmtCreate | naspOut }}</template>
-      </el-table-column>
-    </el-table>
-    <el-col :span="24">
-      <div align="right">
-        <el-pagination
-          :page-sizes="[10, 20, 30, total]"
-          :current-page="curIndex"
-          :page-size="pageSize"
-          background
-          layout="total, sizes, prev, pager, next, jumper"
-          :total="total"
-          @size-change="handleSizeChange"
-          @current-change="handleCurrentChange"
-        />
-      </div>
-    </el-col>
-    <normal-dialog
-      :show-dialog.sync="statusDialog"
-      :title="statusDialogTitle"
-      :width="'50%'"
-      :is-default-close="false"
-      @confirm="confirmStatus()"
-      @cancel="bugsList()"
-    >
-      <el-form
-        v-if="statusDialogTitle !== '删除确认'"
-        ref="ruleForm"
-        label-width="110px"
-        label-position="left"
-        :model="nowTaskDetail"
-        :rules="rules"
-      >
-        <el-form-item
-          v-if="statusDialogTitle === '待测试' || statusDialogTitle === '已完成'"
-          label="缺陷原因"
-          prop="bugReason"
-        >
-          <el-select v-model="nowTaskDetail.bugReason" style="width: 100%">
-            <el-option
-              v-for="item in bugReasonEnumList"
-              :key="item.code"
-              :label="item.name"
-              :value="item.code"
-            />
-          </el-select>
-        </el-form-item>
-        <el-form-item
-          v-if="statusDialogTitle === '待测试'"
-          label="修复方式"
-          class="bug_manage_dialog bug_manage_dialog_fixMethod"
-        >
-          <el-input
-            v-model="nowTaskDetail.reasonOrDesc"
-            type="textarea"
-            placeholder="请输入具体原因和修复方式"
-            maxlength="300"
-            show-word-limit
-            rows="4"
-          />
-        </el-form-item>
-        <el-form-item
-          v-if="statusDialogTitle === '已完成'"
-          label="修复结果"
-          prop="repairResult"
-          class="bug_manage_dialog"
-        >
-          <el-select
-            v-model="nowTaskDetail.repairResult"
-            style="width: 100%"
-          >
-            <el-option
-              v-for="item in repairResultEnumList"
-              :key="item.code"
-              :label="item.name"
-              :value="item.code"
-            />
-          </el-select>
-        </el-form-item>
-        <el-form-item v-if="statusDialogTitle === 'Reopen'" label="Reopen原因" prop="reasonOrDesc">
-          <el-input
-            v-model="nowTaskDetail.reasonOrDesc"
-            type="textarea"
-            placeholder="请输入Reopen"
-            maxlength="300"
-            show-word-limit
-            rows="4"
-          />
-        </el-form-item>
-      </el-form>
-    </normal-dialog>
-  </div>
-</template>
-<script>
-import { bugList, bugGetEnum, bugUpdate } from '@/api/defectManage'
-import normalDialog from '@/components/dialog/normalDialog'
-export default {
-  components: { normalDialog },
-  filters: {
-    naspOut(value) {
-      if (!value) return ''
-      var da = value.split(/\s+/)
-      return da[0]
-    }
-  },
-  data() {
-    return {
-      bugsDataList: [],
-      allStatus: [], // 所有状态列表
-      bugReasonEnumList: [], // 所有bug原因列表
-      repairResultEnumList: [], // 修复原因列表
-      pageSize: 10,
-      curIndex: 1,
-      total: 0,
-      nowTaskDetail: null, // 当前需要改变任务的详情
-      statusDialog: false, // 状态修改弹框
-      statusDialogTitle: '',
-      rules: {
-        assigner: [
-          { required: true, message: '责任人不可为空', trigger: 'change' }
-        ],
-        currentHandler: [
-          { required: true, message: '修复人不可为空', trigger: 'change' }
-        ],
-        bugName: [
-          { required: true, message: '标题不可为空', trigger: 'blur' }
-        ],
-        bugReason: [
-          { required: true, message: '请选择缺陷原因', trigger: 'change' }
-        ],
-        repairResult: [
-          { required: true, message: '请选择修复结果', trigger: 'change' }
-        ],
-        reasonOrDesc: [
-          { required: true, message: '请输入Reopen原因', trigger: 'blur' }
-        ]
-      }
-    }
-  },
-  created() {
-    this.getBugGetEnum()
-    this.bugsList()
-  },
-  methods: {
-    async getBugGetEnum() {
-      const res = await bugGetEnum()
-      if (res.code === 200) {
-        this.allStatus = res.data.bugEnumList
-        this.bugReasonEnumList = res.data.bugReasonEnumList
-        this.repairResultEnumList = res.data.repairResultEnumList
-      }
-    },
-    async bugsList() {
-      const params = {
-        bizId: Number(localStorage.getItem('bizId')),
-        pageSize: this.pageSize,
-        curIndex: this.curIndex,
-        projectId: this.$route.query.id
-      }
-      const res = await bugList(params)
-      if (res.code === 200) {
-        this.bugsDataList = res.data
-        this.total = res.total
-      }
-    },
-    handleSizeChange(e) {
-      this.pageSize = e
-      this.bugsList()
-    },
-    handleCurrentChange(e) {
-      this.curIndex = e
-      this.bugsList()
-    },
-    getToDetails(id) { // 详情页跳转
-      this.$router.push({ name: '缺陷详情', params: { id: id }})
-    },
-    statusChange(row) { // 状态改变
-      this.nowTaskDetail = row
-      const nowStatusObj = this.allStatus.find(item => item.code === row.status)
-      if (['待修复', '修复中', 'Hold'].some(item => item === nowStatusObj.name)) {
-        this.bugUpdate()
-      } else {
-        this.statusDialogTitle = nowStatusObj.name
-        this.statusDialog = true
-      }
-    },
-    confirmStatus() { // 确认更改状态
-      this.$refs['ruleForm'].validate((valid) => {
-        if (valid) {
-          this.bugUpdate()
-          this.statusDialog = false
-        }
-      })
-    },
-    async bugUpdate() { // 更改状态请求
-      const userData = {
-        id: '',
-        ename: localStorage.getItem('username'),
-        name: localStorage.getItem('realname')
-      }
-      const res = await bugUpdate({ bugBaseInfo: this.nowTaskDetail, user: userData })
-      if (res.code === 200) {
-        this.$message({ message: '状态修改成功', type: 'success', duration: 1000, offset: 150 })
-      }
-    }
-  }
-}
-</script>
-<style lang="scss" scoped>
-@mixin setStatus($color) {
-  input {
-    color:$color;
-    border: 1px solid $color;
-  }
-  >>> .el-select__caret{
-    color:$color;
-  }
-  >>> .el-input__inner{
-    color:$color;
-    border-color: $color;
-  }
-  >>> .el-input__inner:focus {
-    border-color: $color;
-  }
-}
->>>.el-row .el-col {
-  margin: 10px 0;
-}
-.bug-title {
-  cursor: pointer;
-}
-.P0 {
-  background-color: #F56C6C;
-}
-.P1 {
-  background-color: #FF8952;
-}
-.P2 {
-  background-color: #F5E300;
-}
-.P3 {
-  background-color: #7ED321;
-}
-.P4 {
-  background-color: #61D3B8;
-}
-.P5 {
-  background-color: #69B3FF;
-}
-.P6 {
-  background-color: #BDBDBD;
-}
-.status0 {
-  @include setStatus(#69B3FF)
-}
-.status1 {
-  @include setStatus(#FF8952)
-}
-.status2 {
-  @include setStatus(#2F54EB)
-}
-.status3 {
-  @include setStatus(#61D3B8)
-}
-.status4 {
-  @include setStatus(#F56C6C)
-}
-.status5 {
-  @include setStatus(#7ED321)
-}
-.div_priority {
-  text-align: center;
-  color: #ffffff;
-  padding: inherit;
-  border-radius: 4px;
-  width: 40px;
-  display: inline-block;
-}
-.table-project-name {
-  display: flex;
-  justify-content: center;
-  flex-direction: column;
-  b {
-    color: #A7AEBC;
-    font-size: 10px;
-  }
-  span {
-    font-size: 14px;
-  }
-}
-</style>

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

@@ -88,7 +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" />
+    <taskDialog 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>
@@ -186,6 +186,7 @@ export default {
       isEx ? this.expandArr = this.all_task.map(item => item.id) : this.expandArr = []
     },
     async changeStatus(e) { // 状态改变
+      alert(e)
       if (e.status === 2 || e.status === 4 || e.status === 5) {
         this.taskId = e
         this.allStatus.map(item => {
@@ -207,15 +208,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 - 3
src/views/projectManage/projectList/projectViewDetails.vue

@@ -132,7 +132,6 @@
       <!-- 缺陷 -->
       <el-container v-show="activeName === '4'" class="is-vertical" style="height: calc(100vh - 125px);">
         <section class="main-section">
-          <!-- <bugs-list /> -->
           <bugTableDialog ref="bugTableDialog" />
         </section>
       </el-container>
@@ -192,7 +191,6 @@ import mileStone from './components/mileStone'
 import dataStatistics from './components/dataStatistics'
 import tasksList from './components/taskList'
 import needsList from './components/needsList'
-// import bugsList from './components/bugsList'
 import modifyProject from './components/modifyProject'
 import openDialog from '@/views/projectManage/dialog_vue'
 import Utils from '../../../util.js'
@@ -214,7 +212,6 @@ export default {
     dataStatistics,
     tasksList,
     needsList,
-    // bugsList,
     modifyProject,
     bugTableDialog
   },

+ 0 - 336
src/views/projectManage/requirement/components/bugsList.vue

@@ -1,336 +0,0 @@
-<template>
-  <div>
-    <el-table
-      ref="planTable"
-      :data="bugsDataList"
-      style="width: 100%;"
-      size="mini"
-      row-key="id"
-      :header-cell-style="{ color: '#4A4A4A', fontSize: '14px', fontWeight: '550', textAlign: 'center' }"
-      show-overflow-tooltip="true"
-      :header-row-style="{height: '50px'}"
-    >
-      <el-table-column label="优先级" prop="priority" width="100" sortable align="center">
-        <template slot-scope="scope" style="text-align: center;">
-          <span class="div_priority" :class="scope.row.priorityName">
-            {{ scope.row.priorityName }}
-          </span>
-        </template>
-      </el-table-column>
-      <el-table-column prop="bugName" label="缺陷标题" width="200" align="center" show-overflow-tooltip>
-        <template slot-scope="scope">
-          <span style=" color: #A7AEBC; font-size: 10px;">{{ 'BUG-' + scope.row.id }}</span>
-          <br>
-          <span class="bug-title" @click="getToDetails(scope.row.id)">{{ scope.row.bugName }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column label="状态" width="115" align="center">
-        <template slot-scope="scope">
-          <el-select
-            v-model="scope.row.status"
-            :class="['status'+scope.row.status]"
-            class="btns"
-            size="mini"
-            @change="statusChange(scope.row)"
-          >
-            <el-option v-for="item in allStatus" :key="item.code" :label="item.name" :value="item.code" />
-          </el-select>
-        </template>
-      </el-table-column>
-      <el-table-column prop="priorityName" label="缺陷等级" align="center" />
-      <el-table-column prop="taskName" label="所属任务" align="center" width="200" show-overflow-tooltip />
-      <el-table-column prop="creatorList" label="提报人" width="100" align="center" />
-      <el-table-column prop="assignerList" label="责任人" width="100" align="center" show-overflow-tooltip />
-      <el-table-column prop="currentHandlerList" label="修复人" width="100" align="center" show-overflow-tooltip />
-      <el-table-column prop="gmtCreate" label="创建日期" width="150" align="center">
-        <template slot-scope="scope">{{ scope.row.gmtCreate | naspOut }}</template>
-      </el-table-column>
-    </el-table>
-    <el-col :span="24">
-      <div align="right">
-        <el-pagination
-          :page-sizes="[10, 20, 30, total]"
-          :current-page="curIndex"
-          :page-size="pageSize"
-          background
-          layout="total, sizes, prev, pager, next, jumper"
-          :total="total"
-          @size-change="handleSizeChange"
-          @current-change="handleCurrentChange"
-        />
-      </div>
-    </el-col>
-    <normal-dialog
-      :show-dialog.sync="statusDialog"
-      :title="statusDialogTitle"
-      :width="'50%'"
-      :is-default-close="false"
-      @confirm="confirmStatus()"
-      @cancel="bugsList()"
-    >
-      <el-form
-        v-if="statusDialogTitle !== '删除确认'"
-        ref="ruleForm"
-        label-width="110px"
-        label-position="left"
-        :model="nowTaskDetail"
-        :rules="rules"
-      >
-        <el-form-item
-          v-if="statusDialogTitle === '待测试' || statusDialogTitle === '已完成'"
-          label="缺陷原因"
-          prop="bugReason"
-        >
-          <el-select v-model="nowTaskDetail.bugReason" style="width: 100%">
-            <el-option
-              v-for="item in bugReasonEnumList"
-              :key="item.code"
-              :label="item.name"
-              :value="item.code"
-            />
-          </el-select>
-        </el-form-item>
-        <el-form-item
-          v-if="statusDialogTitle === '待测试'"
-          label="修复方式"
-          class="bug_manage_dialog bug_manage_dialog_fixMethod"
-        >
-          <el-input
-            v-model="nowTaskDetail.reasonOrDesc"
-            type="textarea"
-            placeholder="请输入具体原因和修复方式"
-            maxlength="300"
-            show-word-limit
-            rows="4"
-          />
-        </el-form-item>
-        <el-form-item
-          v-if="statusDialogTitle === '已完成'"
-          label="修复结果"
-          prop="repairResult"
-          class="bug_manage_dialog"
-        >
-          <el-select
-            v-model="nowTaskDetail.repairResult"
-            style="width: 100%"
-          >
-            <el-option
-              v-for="item in repairResultEnumList"
-              :key="item.code"
-              :label="item.name"
-              :value="item.code"
-            />
-          </el-select>
-        </el-form-item>
-        <el-form-item v-if="statusDialogTitle === 'Reopen'" label="Reopen原因" prop="reasonOrDesc">
-          <el-input
-            v-model="nowTaskDetail.reasonOrDesc"
-            type="textarea"
-            placeholder="请输入Reopen"
-            maxlength="300"
-            show-word-limit
-            rows="4"
-          />
-        </el-form-item>
-      </el-form>
-    </normal-dialog>
-  </div>
-</template>
-<script>
-import { bugList, bugGetEnum, bugUpdate } from '@/api/defectManage'
-import normalDialog from '@/components/dialog/normalDialog'
-export default {
-  components: { normalDialog },
-  filters: {
-    naspOut(value) {
-      if (!value) return ''
-      var da = value.split(/\s+/)
-      return da[0]
-    }
-  },
-  data() {
-    return {
-      bugsDataList: [],
-      allStatus: [], // 所有状态列表
-      bugReasonEnumList: [], // 所有bug原因列表
-      repairResultEnumList: [], // 修复原因列表
-      pageSize: 10,
-      curIndex: 1,
-      total: 0,
-      nowTaskDetail: null, // 当前需要改变任务的详情
-      statusDialog: false, // 状态修改弹框
-      statusDialogTitle: '',
-      rules: {
-        assigner: [
-          { required: true, message: '责任人不可为空', trigger: 'change' }
-        ],
-        currentHandler: [
-          { required: true, message: '修复人不可为空', trigger: 'change' }
-        ],
-        bugName: [
-          { required: true, message: '标题不可为空', trigger: 'blur' }
-        ],
-        bugReason: [
-          { required: true, message: '请选择缺陷原因', trigger: 'change' }
-        ],
-        repairResult: [
-          { required: true, message: '请选择修复结果', trigger: 'change' }
-        ],
-        reasonOrDesc: [
-          { required: true, message: '请输入Reopen原因', trigger: 'blur' }
-        ]
-      }
-    }
-  },
-  created() {
-    this.getBugGetEnum()
-    this.bugsList()
-  },
-  methods: {
-    async getBugGetEnum() {
-      const res = await bugGetEnum()
-      if (res.code === 200) {
-        this.allStatus = res.data.bugEnumList
-        this.bugReasonEnumList = res.data.bugReasonEnumList
-        this.repairResultEnumList = res.data.repairResultEnumList
-      }
-    },
-    async bugsList() {
-      const params = {
-        bizId: Number(localStorage.getItem('bizId')),
-        pageSize: this.pageSize,
-        curIndex: this.curIndex,
-        requireId: this.$route.query.id
-      }
-      const res = await bugList(params)
-      if (res.code === 200) {
-        this.bugsDataList = res.data
-        this.total = res.total
-      }
-    },
-    handleSizeChange(e) {
-      this.pageSize = e
-      this.bugsList()
-    },
-    handleCurrentChange(e) {
-      this.curIndex = e
-      this.bugsList()
-    },
-    getToDetails(id) { // 详情页跳转
-      this.$router.push({ name: '缺陷详情', params: { id: id }})
-    },
-    statusChange(row) { // 状态改变
-      this.nowTaskDetail = row
-      const nowStatusObj = this.allStatus.find(item => item.code === row.status)
-      if (['待修复', '修复中', 'Hold'].some(item => item === nowStatusObj.name)) {
-        this.bugUpdate()
-      } else {
-        this.statusDialogTitle = nowStatusObj.name
-        this.statusDialog = true
-      }
-    },
-    confirmStatus() { // 确认更改状态
-      this.$refs['ruleForm'].validate((valid) => {
-        if (valid) {
-          this.bugUpdate()
-          this.statusDialog = false
-        }
-      })
-    },
-    async bugUpdate() { // 更改状态请求
-      const userData = {
-        id: '',
-        ename: localStorage.getItem('username'),
-        name: localStorage.getItem('realname')
-      }
-      const res = await bugUpdate({ bugBaseInfo: this.nowTaskDetail, user: userData })
-      if (res.code === 200) {
-        this.$message({ message: '状态修改成功', type: 'success', duration: 1000, offset: 150 })
-      }
-    }
-  }
-}
-</script>
-<style lang="scss" scoped>
-@mixin setStatus($color) {
-  input {
-    color:$color;
-    border: 1px solid $color;
-  }
-  >>> .el-select__caret{
-    color:$color;
-  }
-  >>> .el-input__inner{
-    color:$color;
-    border-color: $color;
-  }
-  >>> .el-input__inner:focus {
-    border-color: $color;
-  }
-}
->>>.el-row .el-col {
-  margin: 10px 0;
-}
-.bug-title {
-  cursor: pointer;
-}
-.P0 {
-  background-color: #F56C6C;
-}
-.P1 {
-  background-color: #FF8952;
-}
-.P2 {
-  background-color: #F5E300;
-}
-.P3 {
-  background-color: #7ED321;
-}
-.P4 {
-  background-color: #61D3B8;
-}
-.P5 {
-  background-color: #69B3FF;
-}
-.P6 {
-  background-color: #BDBDBD;
-}
-.status0 {
-  @include setStatus(#69B3FF)
-}
-.status1 {
-  @include setStatus(#FF8952)
-}
-.status2 {
-  @include setStatus(#2F54EB)
-}
-.status3 {
-  @include setStatus(#61D3B8)
-}
-.status4 {
-  @include setStatus(#F56C6C)
-}
-.status5 {
-  @include setStatus(#7ED321)
-}
-.div_priority {
-  text-align: center;
-  color: #ffffff;
-  padding: inherit;
-  border-radius: 4px;
-  width: 40px;
-  display: inline-block;
-}
-.table-project-name {
-  display: flex;
-  justify-content: center;
-  flex-direction: column;
-  b {
-    color: #A7AEBC;
-    font-size: 10px;
-  }
-  span {
-    font-size: 14px;
-  }
-}
-</style>

+ 23 - 5
src/views/projectManage/requirement/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,
+              'status_color4': scope.row.status === 3,
+              'status_color6': scope.row.status === 2,
+              'status_color7': 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>
@@ -98,19 +106,23 @@ import { taskUpdate } from '@/api/projectViewDetails'
 import { configShowTaskEnum } from '@/api/taskIndex'
 import scheduleList from './scheduleList'
 import normalDialog from '@/components/dialog/normalDialog'
+import '@/styles/PublicStyle/index.scss'
+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: {
@@ -174,9 +187,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'),

+ 0 - 863
src/views/projectManage/requirement/details/index.vue

@@ -1,863 +0,0 @@
-<template>
-  <div @click="display = false">
-    <el-container style="background-color: #F2F3F6;">
-      <el-header style="margin: 15px 1%;" class="layout_header">
-        <div>
-          <el-tooltip :disabled="requirement.name && requirement.name.length > 19 ? false : true" effect="dark" :content="requirement.name" placement="bottom">
-            <span style="font-size:20px;font-family:MicrosoftYaHei;color:rgba(51,51,51,1);">{{ '需求:' + requirement.name | ellipsis }}</span>
-          </el-tooltip>
-          <el-dropdown
-            placement="bottom"
-            @command="updateRequirementStatus"
-          >
-            <el-button
-              size="mini"
-              class="el-dropdown-link drop_down"
-              style="cursor: pointer;margin-left: 15px;"
-            >
-              <span class="el-dropdown-link">{{ getStatusName() }}</span>
-              <i class="el-icon-arrow-down el-icon--right" />
-            </el-button>
-            <el-dropdown-menu slot="dropdown">
-              <el-dropdown-item
-                v-for="(item,index) in searchInfo.requirementStatus"
-                :key="index"
-                :command="item"
-              >{{ item.msg }}</el-dropdown-item>
-            </el-dropdown-menu>
-          </el-dropdown>
-          <div style="display: inline-block;float: right">
-            <span style="line-height: normal;display: inline-flex;vertical-align: middle; cursor: pointer; color: #6F7C93;" @click.stop="setChild(), display = true"><img style="width: 24px; display: inline-block;" :src="image_url"><span style="margin-left: 10px;">{{ num }}</span></span>
-            <el-button size="mini" style="margin-left: 10px" @click="deleteRequirement">删除需求</el-button>
-            <el-button type="primary" size="mini" @click="createTask">新建任务</el-button>
-          </div>
-        </div>
-      </el-header>
-      <el-container>
-        <el-aside width="52%" style="margin: 0% 1% 1% 1%;" class="layout_aside">
-          <div style="display:flex;align-items: center;">
-            <div style="width:4px;height:17px;background:#409EFF;border-radius:1px;" />
-            <div style="width:83px;height:20px;font-size:18px;font-family:MicrosoftYaHei;color:rgba(51,59,74,1);margin-left:6px">数据统计</div>
-          </div>
-          <div v-loading="loading.task || loading.bug" class="div_statistics" style="margin: 2%">
-            <el-container style="border-bottom: 1px solid #D8D8D8">
-              <el-aside width="30%" style="border-right: 1px solid #d8d8d8">
-                <div style="width:100%;text-align: center;">
-                  <div style="font-size: 16px;margin-top: 26px">任务数量</div>
-                  <div style="font-size: 72px">{{ statistics.task.totalCount }}</div>
-                  <div
-                    style="font-size: 14px;color: rgba(245,108,108,1);margin-bottom: 16px"
-                  >{{ '已延期'+statistics.task.delayCount+'个' }}</div>
-                </div>
-              </el-aside>
-              <el-aside width="70%">
-                <requirement-chart
-                  :chart-id="'taskCount'"
-                  :option="taskOption"
-                  style="position: relative;bottom: 30px"
-                />
-              </el-aside>
-            </el-container>
-            <el-container>
-              <el-aside width="30%" style="border-right: 1px solid #d8d8d8">
-                <div style="width:100%;text-align: center;">
-                  <div style="font-size: 16px;margin-top: 26px">bug数量</div>
-                  <div style="font-size: 72px">{{ statistics.bug.totalCount }}</div>
-                  <div
-                    style="font-size: 14px;color: rgba(245,108,108,1);margin-bottom: 16px"
-                  >{{ '以后修复'+statistics.bug.fixInFutureCount+'个' }}</div>
-                </div>
-              </el-aside>
-              <el-aside width="70%">
-                <requirement-chart
-                  :chart-id="'bugCount'"
-                  :option="bugOption"
-                  style="position: relative;bottom: 30px"
-                />
-              </el-aside>
-            </el-container>
-          </div>
-        </el-aside>
-        <el-aside width="45%" style="margin: 0% 1% 1% 0;" class="layout_aside special-button">
-          <div style="display:flex;align-items: center;">
-            <div style="width:4px;height:17px;background:#409EFF;border-radius:1px;" />
-            <div style="width:83px;height:20px;font-size:18px;font-family:MicrosoftYaHei;color:rgba(51,59,74,1);margin-left:6px">基础信息</div>
-          </div>
-          <div style="text-align: right;">
-            <el-button
-              type="info"
-              plain
-              size="mini"
-              @click="updateDialogVisible = true"
-            >修改</el-button>
-          </div>
-          <div
-            style="font-size: 14px;color: #666666"
-            class="div_requirment_info"
-          >
-            <el-row>
-              <el-col :span="6">归属的项目:</el-col>
-              <el-col :span="18">
-                <div
-                  style="display: inline-block;color: #409EFF;cursor: pointer;"
-                  @click="jumpTaskDetal(requirement.belongingProject)"
-                >{{ requirement.belongingProjectName }}</div>
-              </el-col>
-            </el-row>
-            <el-row>
-              <el-col :span="6">业务线:</el-col>
-              <el-col :span="18">{{ requirement.bizName }}</el-col>
-            </el-row>
-            <el-row>
-              <el-col :span="6">优先级:</el-col>
-              <el-col :span="18">{{ requirement.priorityName }}</el-col>
-            </el-row>
-            <el-row>
-              <el-col :span="6">需求来源:</el-col>
-              <el-col :span="18">{{ requirement.sourceTypeName }}</el-col>
-            </el-row>
-            <el-row>
-              <el-col :span="6">PM:</el-col>
-              <el-col :span="18">{{ getPmName() }}</el-col>
-            </el-row>
-            <el-row>
-              <el-col :span="6">PRD链接:</el-col>
-              <el-col :span="18">
-                <el-link type="primary" :href="requirement.mrdUrl">{{ requirement.mrdUrl }}</el-link>
-              </el-col>
-            </el-row>
-            <el-row>
-              <el-col :span="6">是否跟版:</el-col>
-              <el-col :span="18">{{ requirement.dependOnRelease? '是':'否' }}</el-col>
-            </el-row>
-            <el-row v-if="requirement.dependOnRelease">
-              <el-col :span="6">涉及的客户端:</el-col>
-              <el-col :span="18">{{ getAppClientName() }}</el-col>
-            </el-row>
-          </div>
-        </el-aside>
-      </el-container>
-      <el-main id="requirement_details" style="margin: 0 1%;padding: 0" class="layout_main">
-        <div style="display:flex;align-items: center;margin: 2% 0 0 2%;">
-          <div style="width:4px;height:17px;background:#409EFF;border-radius:1px;" />
-          <div style="width:83px;height:20px;font-size:18px;font-family:MicrosoftYaHei;color:rgba(51,59,74,1);margin-left:6px">任务</div>
-        </div>
-        <el-radio-group v-model="radio" size="mini" style="float: right;margin: 0 1% 1% 0">
-          <el-radio-button label="列表" />
-          <el-radio-button label="甘特图" />
-        </el-radio-group>
-        <br>
-        <el-table
-          v-if="radio === '列表'"
-          v-loading="loading.table"
-          :data="tableData"
-          style="width: 100%;"
-          highlight-current-row
-          :header-cell-style="{ background: '#6AB4FF', color: '#FFFFFF',textAlign: 'center'}"
-          :cell-style="{'font-size':'14px','font-family':'MicrosoftYaHei'}"
-        >
-          <el-table-column prop="name" label="任务名" min-width="20%" align="center">
-            <template v-slot="scope">
-              <div style="cursor: pointer;" @click="getToTaskDetails(scope.row.id)">{{ scope.row.name }}</div>
-            </template>
-          </el-table-column>
-          <el-table-column prop="beginTime" label="排期" min-width="15%" align="center">
-            <template
-              v-slot="scope"
-            >{{ getSchedule(scope.row) }}</template>
-          </el-table-column>
-          <el-table-column prop="statusString" label="状态" min-width="10%" align="center">
-            <template v-slot="scope">
-              <div style="color: #FF9500">{{ scope.row.statusString }}</div>
-            </template>
-          </el-table-column>
-          <el-table-column prop="stageString" label="任务健康状态" min-width="12%" align="center">
-            <template v-slot="scope">
-              <div class="double-line">{{ scope.row.stageString }}</div>
-              <div class="double-line-tow">{{ scope.row.lateMsg }}</div>
-            </template>
-          </el-table-column>
-          <el-table-column prop="rate" label="任务进展" min-width="15%" align="left">
-            <template v-slot="scope">
-              <el-progress :percentage="Number(scope.row.rate?scope.row.rate.substring(0,4).replace(/%/g,''):0)" />
-            </template>
-          </el-table-column>
-          <el-table-column prop="rdObject" label="开发负责人" min-width="10%" align="center">
-            <template v-slot="scope">{{ scope.row.rdObject?scope.row.rdObject.name:'空' }}</template>
-          </el-table-column>
-          <el-table-column prop="qaObject" label="测试负责人" min-width="10%" align="center">
-            <template v-slot="scope">{{ scope.row.qaObject?scope.row.qaObject.name:'空' }}</template>
-          </el-table-column>
-          <el-table-column prop="rdList" label="开发" min-width="10%" align="center">
-            <template v-slot="scope">{{ getQaOrRdNameList(scope.row.rdList) }}</template>
-          </el-table-column>
-          <el-table-column prop="qaList" label="测试" min-width="10%" align="center">
-            <template v-slot="scope">{{ getQaOrRdNameList(scope.row.qaList) }}</template>
-          </el-table-column>
-        </el-table>
-        <gantt v-if="radio === '甘特图' && ganttTableData" :versions="ganttVersions" :table-data="ganttTableData" :string-type="'任务'" />
-        <div style="margin:0 2%;padding: 2% 0;border-bottom: 1px solid #D8D8D8;font-size: 14px;color: #333333">排期汇总:{{ getScheduleCollect() }}</div>
-        <el-row style="margin: 2%;font-size: 14px;color: #333333">
-          <el-col :span="8">
-            <div v-for="(item,index) in task.preOnlineVersion" :key="index" style="margin-bottom:10px"> <span :style="{visibility: index===0?'visible ':'hidden'}">预期上线版本:</span>{{ item }}</div>
-          </el-col>
-        <!-- <el-col :span="16">
-          <div v-for="(item,index) in task.preOnlineVersion" :key="index" style="margin-bottom:10px"> <span :style="{visibility: index===0?'visible ':'hidden'}">实际上线版本:</span>{{ item }}</div>
-        </el-col> -->
-        </el-row>
-      </el-main>
-      <el-main style="margin: 1%;padding: 2% !important;" class="layout_main requirement_details_layout_main">
-        <div style="display:flex;align-items: center;margin-bottom:20px">
-          <div style="width:4px;height:17px;background:#409EFF;border-radius:1px;" />
-          <div style="width:83px;height:20px;font-size:18px;font-family:MicrosoftYaHei;color:rgba(51,59,74,1);margin-left:6px">评论</div>
-        </div>
-        <div>
-          <div v-for="(item,index) in comments" :key="index" class="animated bounceInRight">
-            <div
-              style="font-size:14px;color:#333B4A;display: inline-block;"
-            >{{ item.commentInfo.name }}</div>
-            <div
-              style="margin-left:20px;display: inline-block;color: #9B9B9B;font-size:12px"
-            >{{ item.commentInfo.gmtCreater }}</div>
-            <p
-              style="font-size:14px;color:#333B4A;margin-top: 10px;white-space: pre-line;"
-            >{{ item.commentInfo.content }}</p>
-            <br>
-          </div>
-          <el-input
-            v-model="commentContent"
-            type="textarea"
-            placeholder="请输入评论内容"
-            maxlength="300"
-            show-word-limit
-            :autosize="{ minRows: 3, maxRows: 5}"
-            style="margin-bottom: 2%"
-          />
-          <el-button type="primary" size="small" style="float: right" @click="addComment">发表评论</el-button>
-        </div>
-      </el-main>
-      <requirement-update
-        title="编辑需求"
-        :data="requirement"
-        :visible="updateDialogVisible"
-        @cancel="updateDialogVisible=false"
-        @confirm="getRequirementById();updateDialogVisible=false"
-      />
-      <task-create v-if="createTaskDialogVisible" ref="task_createdUpdata" />
-      <drawer
-        ref="drawer"
-        title="需求成员"
-        center
-        :display.sync="display"
-        width="28%"
-        :delete="requirement"
-        :types="false"
-        :inner="true"
-        :mask="false"
-        @childValInput="childVal"
-        @click.stop
-      />
-    </el-container>
-  </div>
-</template>
-
-<script>
-import {
-  getRequirementById,
-  showRequirementEnum,
-  getTaskStatusMapInfo,
-  getBugStatusMapInfo,
-  getTaskByRequireId,
-  deleteRequirement,
-  updateRequirementStatus,
-  getCommentList,
-  addComment
-} from '@/api/requirement.js'
-import Utils from '../../../../util.js'
-import { listByVersionTypeWithTime } from '@/api/version.js'
-import RequirementChart from '@/components/chart/index.vue'
-import RequirementUpdate from '@/views/projectManage/requirement/list/create.vue'
-import Gantt from '@/views/gantta/gantta'
-import dateUtil from '@/utils/dateUtil.js'
-import TaskCreate from '@/views/projectManage/dialog_vue'
-import drawer from '@/views/projectManage/Drawer'
-import image_url from '@/assets/home_images/home_u.png'
-
-export default {
-  components: {
-    RequirementChart,
-    RequirementUpdate,
-    Gantt,
-    TaskCreate,
-    drawer
-  },
-  filters: {
-    ellipsis(value) {
-      if (!value) return ''
-      if (value.length > 20) {
-        return value.slice(0, 20) + '...'
-      }
-      return value
-    }
-  },
-  props: {
-    id: {
-      type: String,
-      default: '0'
-    }
-  },
-  data() {
-    return {
-      num: '',
-      image_url: image_url,
-      display: false,
-      createTaskDialogVisible: false,
-      ganttVersions: {},
-      ganttTableData: null,
-      loading: {
-        table: true,
-        info: true,
-        task: true,
-        bug: true
-      },
-      radio: '列表',
-      updateDialogVisible: false,
-      tableData: null,
-      statistics: {
-        task: {
-          totalCount: 0,
-          delayCount: 0
-        },
-        bug: {
-          totalCount: 0,
-          fixInFutureCount: 0
-        }
-      },
-      belongingProject: { msg: '不存在' },
-      status: {},
-      requirement: {
-        name: ''
-      },
-      projectOb: {},
-      bizTypeOb: {},
-      appClientOb: {},
-      requirementStatusOb: {},
-      searchInfo: {
-        belongingProject: [],
-        sourceType: [],
-        bizType: [],
-        priority: [],
-        requirementStatus: []
-      },
-      taskOption: {
-        color: ['#69B3FF'],
-        title: {
-          show: false
-        },
-        tooltip: {
-          trigger: 'axis',
-          axisPointer: {
-            // 坐标轴指示器,坐标轴触发有效
-            type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
-          }
-        },
-        grid: {
-          left: '3%',
-          right: '4%',
-          bottom: '0%',
-          containLabel: true
-        },
-        xAxis: [
-          {
-            type: 'category',
-            data: ['未开始', '开发中', '测试中', '已上线'],
-            axisTick: {
-              alignWithLabel: true,
-              show: false
-            },
-            axisLine: {
-              show: true,
-              lineStyle: {
-                type: 'dashed'
-              }
-            }
-          }
-        ],
-        yAxis: [
-          {
-            type: 'value',
-            axisTick: {
-              show: false
-            },
-            axisLine: {
-              show: false
-            },
-            axisLabel: {
-              show: false
-            },
-            splitLine: {
-              show: false
-            }
-          }
-        ],
-        series: [
-          {
-            type: 'bar',
-            barWidth: '60%',
-            label: {
-              show: true,
-              position: 'inside',
-              formatter: function(params) {
-                // 如果值大于0 正常显示,否则不显示
-                if (params.value > 0) {
-                  return params.value
-                } else {
-                  return ''
-                }
-              }
-            },
-            data: []
-          }
-        ]
-      },
-      bugOption: {
-        color: ['#69B3FF'],
-        title: {
-          show: false
-        },
-        tooltip: {
-          trigger: 'axis',
-          axisPointer: {
-            // 坐标轴指示器,坐标轴触发有效
-            type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
-          }
-        },
-        grid: {
-          left: '3%',
-          right: '4%',
-          bottom: '0%',
-          containLabel: true
-        },
-        xAxis: [
-          {
-            type: 'category',
-            data: ['待开发', '开发中', '待测试', '已完成', 'Reopen'],
-            axisTick: {
-              alignWithLabel: true,
-              show: false
-            },
-            axisLine: {
-              show: true,
-              lineStyle: {
-                type: 'dashed'
-              }
-            }
-          }
-        ],
-        yAxis: [
-          {
-            type: 'value',
-            axisTick: {
-              show: false
-            },
-            axisLine: {
-              show: false
-            },
-            axisLabel: {
-              show: false
-            },
-            splitLine: {
-              show: false
-            }
-          }
-        ],
-        series: [
-          {
-            type: 'bar',
-            barWidth: '60%',
-            label: {
-              show: true,
-              position: 'inside',
-              formatter: function(params) {
-                // 如果值大于0 正常显示,否则不显示
-                if (params.value > 0) {
-                  return params.value
-                } else {
-                  return ''
-                }
-              }
-            },
-            data: []
-          }
-        ]
-      },
-      comments: [],
-      commentContent: null,
-      task: {
-        reqStartTime: null,
-        reqEndTime: null,
-        preOnlineVersion: []
-      }
-    }
-  },
-  created() {
-    this.$store.state.data.status = true
-    this.$store.state.data.bizId = true
-  },
-  mounted() {
-    this.showRequirementEnum().then(res => {
-      this.getRequirementById()
-    })
-    this.getTaskStatusMapInfo()
-    this.getBugStatusMapInfo()
-    this.getCommentList()
-  },
-  destroyed() {
-    this.$store.state.data.status = false
-    this.$store.state.data.bizId = false
-  },
-  methods: {
-    childVal(val) {
-      this.num = val
-    },
-    getScheduleCollect() {
-      if (this.task && this.task.reqStartTime && this.task.reqEndTime) {
-        return this.task.reqStartTime.substring(0, 10).replace(/-/, '年').replace(/-/, '月') + '日' + ' ~ ' + this.task.reqEndTime.substring(0, 10).replace(/-/, '年').replace(/-/, '月') + '日'
-      }
-      return ''
-    },
-    getSchedule(row) {
-      if (row.beginTime && row.endTime) {
-        return row.beginTime.substring(2, 10).replace(/-/g, '/') + ' ~ ' + row.endTime.substring(2, 10).replace(/-/g, '/')
-      }
-      return '无'
-    },
-    getCommentList() {
-      getCommentList({ type: 4, joinId: this.id }).then(res => {
-        this.comments = res.data
-        this.commentContent = ''
-      })
-    },
-    addComment() {
-      if (!this.commentContent) {
-        this.$message.warning('评论不能为空')
-        return
-      }
-      addComment({
-        commentInfo: { joinId: this.id, type: 4, content: this.commentContent },
-        user: { ename: localStorage.getItem('username') }
-      }).then(res => {
-        if (res.code === 200) {
-          this.getCommentList()
-        } else {
-          this.$message.warning(res.msg)
-        }
-      })
-    },
-    getStatusName() {
-      return this.requirementStatusOb[this.requirement.status]
-    },
-    jumpTaskDetal(id) {
-      this.$router.push({ name: '项目详情', query: { id: id }})
-    },
-    getRequirementById() {
-      this.loading.info = true
-      return getRequirementById({
-        id: this.id
-      }).then(res => {
-        if (res.data.bizId !== Number(localStorage.getItem('bizId'))) {
-          Utils.$emit('demo', res.data.bizId)
-        }
-        this.requirement = res.data
-        this.loading.info = false
-        this.getTaskByRequireId()
-      })
-    },
-    getTaskStatusMapInfo() {
-      getTaskStatusMapInfo({
-        requireId: this.id
-      }).then(res => {
-        const name = []
-        const data = []
-        for (const i in res.data.statusInfoList) {
-          name.push(res.data.statusInfoList[i].statusString)
-          data.push(res.data.statusInfoList[i].count)
-        }
-        this.statistics.task = res.data
-        this.taskOption.xAxis[0].data = name
-        this.taskOption.series[0].data = data
-        this.taskOption = JSON.parse(JSON.stringify(this.taskOption))
-        this.loading.task = false
-      })
-    },
-    getBugStatusMapInfo() {
-      getBugStatusMapInfo({
-        requireId: this.id
-      }).then(res => {
-        const name = []
-        const data = []
-        for (const i in res.data.statusInfoList) {
-          name.push(res.data.statusInfoList[i].statusString)
-          data.push(res.data.statusInfoList[i].count)
-        }
-        this.statistics.bug = res.data
-        this.bugOption.xAxis[0].data = name
-        this.bugOption.series[0].data = data
-        this.bugOption = JSON.parse(JSON.stringify(this.bugOption))
-        this.loading.bug = false
-      })
-    },
-    getTaskByRequireId() {
-      getTaskByRequireId({
-        id: this.id
-      }).then(res => {
-        if (res.code === 200) {
-          if (res.data) {
-            this.task = res.data
-            this.tableData = res.data.taskDetails
-            if (res.data.reqStartTime && res.data.reqEndTime) {
-              for (const i in this.requirement.referredClientType) {
-                this.listByVersionTypeWithTime({
-                  type: this.requirement.referredClientType[i],
-                  startTime: this.tableData.reqStartTime,
-                  endTime: this.tableData.reqEndTime
-                })
-              }
-            }
-            this.ganttTableData = this.parseGanttTableData(this.tableData)
-          }
-          this.loading.table = false
-        } else {
-          this.$message.warning(res.msg)
-        }
-      })
-    },
-    listByVersionTypeWithTime(data) {
-      listByVersionTypeWithTime(data)
-        .then(res => {
-          if (res.data) {
-            for (const i in res.data) {
-              const startStr = res.data[i].startTime.substring(0, 10)
-              const endStr = res.data[i].endTime.substring(0, 10)
-              const startDate = new Date(startStr)
-              const endDate = new Date(endStr)
-              const length = (endDate.getTime() - startDate.getTime()) / (24 * 60 * 60 * 1000)
-              for (let j = 0; j <= length; j++) {
-                const dateStr = dateUtil.dateAddDays(startStr, j)
-                const name = this.appClientOb[data.type] + res.data[i].version + res.data[i].name
-                if (typeof this.ganttVersions[dateStr] === 'undefined') {
-                  this.ganttVersions[dateStr] = name
-                } else if (this.ganttVersions[dateStr].indexOf(name) < 0) {
-                  this.ganttVersions[dateStr] = this.ganttVersions[dateStr] + '\n' + name
-                }
-              }
-            }
-          }
-        })
-    },
-    parseGanttTableData(data) {
-      const arr = []
-      for (const i in data) {
-        if (!(data[i].beginTime && data[i].endTime)) {
-          continue
-        }
-        const task = {
-          task: {
-            description: data[i].name
-          },
-          schedules: []
-        }
-        const schedule = {
-          taskId: null,
-          taskName: null,
-          event: null,
-          schedule: null,
-          startDate: null,
-          length: null,
-          owners: []
-        }
-        schedule.taskId = data[i].id
-        schedule.taskName = data[i].name
-        const startStr = data[i].beginTime.substring(0, 10)
-        const endStr = data[i].endTime.substring(0, 10)
-        const startDate = new Date(data[i].beginTime.substring(0, 10))
-        const endDate = new Date(data[i].endTime.substring(0, 10))
-        schedule.startDate = startStr
-        schedule.schedule = startStr.replace(/-/g, '.') + ' - ' + endStr.replace(/-/g, '.')
-        schedule.length = (endDate.getTime() - startDate.getTime()) / (24 * 60 * 60 * 1000) + 1
-        for (const j in data[i].rdList) {
-          schedule.owners.push(data[i].rdList[j].name)
-        }
-        for (const j in data[i].qaList) {
-          schedule.owners.push(data[i].qaList[j].name)
-        }
-        task.schedules.push(schedule)
-        arr.push(task)
-      }
-      return arr
-    },
-    setChild() {
-      this.$refs.drawer.getRoleList()
-    },
-    getPmName() {
-      const names = []
-      for (const i in this.requirement.pm) {
-        names.push(this.requirement.pm[i].name)
-      }
-      return names.join(',')
-    },
-    getAppClientName() {
-      const names = []
-      for (const i in this.requirement.referredClientType) {
-        names.push(this.appClientOb[this.requirement.referredClientType[i]])
-      }
-      return names.join('\n')
-    },
-    showRequirementEnum() {
-      return showRequirementEnum().then(res => {
-        this.searchInfo = res.data
-        for (const i in this.searchInfo.belongingProject) {
-          this.projectOb[
-            this.searchInfo.belongingProject[i].code
-          ] = this.searchInfo.belongingProject[i].msg
-        }
-        for (const i in this.searchInfo.bizType) {
-          this.bizTypeOb[
-            this.searchInfo.bizType[i].code
-          ] = this.searchInfo.bizType[i].msg
-        }
-        for (const i in this.searchInfo.appClient) {
-          this.appClientOb[
-            this.searchInfo.appClient[i].code
-          ] = this.searchInfo.appClient[i].msg
-        }
-        for (const i in this.searchInfo.requirementStatus) {
-          this.requirementStatusOb[
-            this.searchInfo.requirementStatus[i].code
-          ] = this.searchInfo.requirementStatus[i].msg
-        }
-      })
-    },
-    deleteRequirement() {
-      const user = localStorage.getItem('username')
-      this.$confirm('此操作将永久删除该需求, 是否继续?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        iconClass: 'el-icon-warning-outline',
-        type: 'warning'
-      })
-        .then(() => {
-          deleteRequirement({
-            id: this.id,
-            modifier: user
-          }).then(res => {
-            if (res.code === 200) {
-              this.$router.push({ name: '需求' })
-            } else {
-              this.$message.warning(res.msg)
-            }
-          })
-        })
-        .catch(() => {})
-    },
-    createTask() {
-      this.createTaskDialogVisible = true
-      this.$nextTick(() => { this.$refs.task_createdUpdata.init(4, this.id) })
-    },
-    updateRequirementStatus(status) {
-      const modifier = localStorage.getItem('username')
-      updateRequirementStatus({ id: this.id, status: status.code, modifier: modifier }).then(
-        res => {
-          if (res.code === 200) {
-            this.requirement.status = status.code
-            this.getStatusName()
-          } else {
-            this.$message.warning(res.msg)
-          }
-        }
-      )
-    },
-    getQaOrRdNameList(list) {
-      const arr = []
-      for (const i in list) {
-        arr.push(list[i].name)
-      }
-      return arr.join(',')
-    },
-    getToTaskDetails(id) {
-      const { href } = this.$router.resolve({ name: '任务详情', query: { id: id }})
-      window.open(href, '_blank')
-    }
-  }
-}
-</script>
-
-<style scoped>
-.div_requirment_info .el-row .el-col {
-  margin: 10px 0;
-}
-.double-line {
-  font-size: 17px;
-  text-align: center;
-}
-.double-line-tow {
-  text-align: center;
-  font-size: 12px;
-  font-weight: 400;
-  opacity: 0.7;
-}
-.layout_header,
-.layout_aside,
-.layout_main {
-  border-radius: 4px;
-  background-color: #ffffff;
-}
-.div_statistics > .el-container {
-  margin: 0;
-}
-.layout_aside,
-.layout_main {
-  padding: 2%;
-}
-.layout_header {
-  line-height: 60px;
-}
-.requirement_info::before {
-  height: 0px;
-}
-</style>
-
-<style>
-.layout_header .el-button--info.is-plain:hover {
-  background: #3f9eff !important;
-  border-color: #3f9eff !important;
-}
-.layout_header .el-button--info.is-plain:focus {
-  background-color: white;
-  color: #606266;
-  border-color: #d3d4d6;
-}
-
-.special-button .el-button--info.is-plain {
-  background: white !important;
-}
-.special-button .el-button--info.is-plain:focus{
-  background-color: white;
-  color: #606266;
-  border-color: #d3d4d6;
-}
-
-.el-message-box__status::before {
-  color: red;
-}
-
-.el-dropdown-menu__item:not(.is-disabled):hover {
-  background-color: #f6f7fa;
-  color: #606266;
-}
-
-.requirement_details_layout_main .el-table__body tr:hover td {
-  color: #409eff;
-  background: #eef0f5;
-} /*hover时字体, 背景颜色*/
-</style>

+ 22 - 6
src/views/projectManage/requirement/list/create.vue

@@ -33,6 +33,12 @@
               <el-option v-for="(item,index) in all_bizId" :key="index" :label="item.name" :value="item.code" />
             </el-select>
           </el-form-item>
+          <!-- iterationId -->
+          <el-form-item label="所属迭代" prop="bizId">
+            <el-select v-model="form.iterationId" placeholder="请选择" style="width:20vw">
+              <el-option v-for="(item,index) in iterationList" :key="item.name + index" :label="item.name" :value="item.id" />
+            </el-select>
+          </el-form-item>
         </div>
         <div style="flex; 1; margin: 0 0 0 auto;">
           <el-form-item label="需求来源" prop="sourceType">
@@ -66,7 +72,7 @@
           </el-form-item>
         </div>
       </div>
-      <el-form-item label="PRD链接" prop="mrdUrl">
+      <el-form-item label="PRD链接">
         <el-input v-model="form.mrdUrl" placeholder="请粘贴PRD链接" />
       </el-form-item>
       <div style="display: flex;justify-content: space-between; align-items: center;">
@@ -92,7 +98,7 @@
 
 <script>
 import { getMemberInfo, createRequirement, updateRequirement, showRequirementEnum, settingGetBizList, projectListProject } from '@/api/requirement.js'
-
+import { iterationList } from '@/api/requirement.js'
 export default {
   props: {
     title: {
@@ -113,6 +119,7 @@ export default {
   data() {
     return {
       all_bizId: '', // 业务线
+      iterationList: [], // 所属迭代列表
       formBackgroungInfo: {
         belongingProject: [],
         sourceType: [],
@@ -147,7 +154,7 @@ export default {
         ],
         bizId: [{ required: true, message: '请选择业务线', trigger: 'change' }],
         pm: [{ required: true, message: '请输入PM', trigger: 'change' }],
-        mrdUrl: [{ required: true, message: '请粘贴PRD连接', trigger: 'blur' }],
+        // mrdUrl: [{ required: true, message: '请粘贴PRD连接', trigger: 'blur' }],
         dependOnRelease: [
           { required: true, message: '请选择业务线', trigger: 'blur' }
         ],
@@ -201,9 +208,21 @@ export default {
   },
   mounted() {
     this.getBizId()
+    this.getIterationList()
     this.showRequirementEnum()
   },
   methods: {
+    async getIterationList() { // 获取所属迭代列表
+      const res = await iterationList({
+        bizId: Number(localStorage.getItem('bizId')),
+        curIndex: 1,
+        pageSize: 999
+      })
+      if (res.code === 200) {
+        this.iterationList = res.data.list
+      }
+      this.iterationList.unshift({ id: -1, name: '无' })
+    },
     getBizId() {
       settingGetBizList({}).then(res => {
         this.all_bizId = res.data
@@ -245,9 +264,6 @@ export default {
               } else if (i === 'pm') {
                 this.$message.warning('请填写PM名称')
                 return
-              } else if (i === 'mrdUrl') {
-                this.$message.warning('请输入Prd链接')
-                return
               } else if (i === 'dependOnRelease') {
                 if (this.form[i] === 0) {
                   break

+ 11 - 8
src/views/projectManage/requirement/requirementDetail.vue

@@ -148,21 +148,21 @@
       </el-container>
       <!-- 概览 -->
       <!-- 任务 -->
-      <el-container v-show="activeName === '2'" class="is-vertical">
+      <el-container v-show="activeName === '2'" class="is-vertical" style="height: calc(100vh - 125px);">
         <section class="main-section">
           <tasks-list />
         </section>
       </el-container>
       <!-- 任务 -->
       <!-- 缺陷 -->
-      <el-container v-show="activeName === '3'" class="is-vertical">
+      <el-container v-show="activeName === '3'" class="is-vertical" style="height: calc(100vh - 125px);">
         <section class="main-section">
-          <bugs-list />
+          <bugTableDialog ref="bugTableDialog" />
         </section>
       </el-container>
       <!-- 缺陷 -->
       <!-- 统计 -->
-      <el-container v-if="activeName === '4'" class="is-vertical">
+      <el-container v-if="activeName === '4'" class="is-vertical" style="height: calc(100vh - 125px);">
         <section class="main-section">
           <data-statistics @change="getRequirementById" />
         </section>
@@ -234,9 +234,9 @@ import openDialog from '@/views/projectManage/dialog_vue'
 import image_url from '@/assets/home_images/home_u.png'
 import createdBug from '@/views/projectManage/bugList/file/createdBug'
 import tasksList from './components/taskList'
-import bugsList from './components/bugsList'
 import dataStatistics from './components/dataStatistics'
 import scheduleList from './components/scheduleList'
+import bugTableDialog from '@/views/projectManage/bugList/details/bugTableDialog' // 缺陷表格
 export default {
   components: {
     searchPeople,
@@ -246,9 +246,9 @@ export default {
     openDialog,
     createdBug,
     tasksList,
-    bugsList,
     dataStatistics,
-    scheduleList
+    scheduleList,
+    bugTableDialog
   },
   filters: {
     ellipsis(value, num) {
@@ -302,6 +302,9 @@ export default {
     this.$store.state.data.status = true
     this.$store.state.data.bizId = true
   },
+  mounted() {
+    this.$refs.bugTableDialog.bugGetTableList({ requireId: Number(this.$route.query.id) })
+  },
   destroyed() {
     this.$store.state.data.status = false
     this.$store.state.data.bizId = false
@@ -406,7 +409,7 @@ export default {
     reated_task() { // 新建任务
       this.task_open = true
       this.$nextTick(() => {
-        this.$refs.task_createdUpdata.init(2)
+        this.$refs.task_createdUpdata.init(4, this.$route.query.id)
       })
     },
     created_bug() { // 缺陷创建

+ 0 - 336
src/views/projectManage/taskList/components/bugsList.vue

@@ -1,336 +0,0 @@
-<template>
-  <div>
-    <el-table
-      ref="planTable"
-      :data="bugsDataList"
-      style="width: 100%;"
-      size="mini"
-      row-key="id"
-      :header-cell-style="{ color: '#4A4A4A', fontSize: '14px', fontWeight: '550', textAlign: 'center' }"
-      show-overflow-tooltip="true"
-      :header-row-style="{height: '50px'}"
-    >
-      <el-table-column label="优先级" prop="priority" width="100" sortable align="center">
-        <template slot-scope="scope" style="text-align: center;">
-          <span class="div_priority" :class="scope.row.priorityName">
-            {{ scope.row.priorityName }}
-          </span>
-        </template>
-      </el-table-column>
-      <el-table-column prop="bugName" label="缺陷标题" width="200" align="center" show-overflow-tooltip>
-        <template slot-scope="scope">
-          <span style=" color: #A7AEBC; font-size: 10px;">{{ 'BUG-' + scope.row.id }}</span>
-          <br>
-          <span class="bug-title" @click="getToDetails(scope.row.id)">{{ scope.row.bugName }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column label="状态" width="115" align="center">
-        <template slot-scope="scope">
-          <el-select
-            v-model="scope.row.status"
-            :class="['status'+scope.row.status]"
-            class="btns"
-            size="mini"
-            @change="statusChange(scope.row)"
-          >
-            <el-option v-for="item in allStatus" :key="item.code" :label="item.name" :value="item.code" />
-          </el-select>
-        </template>
-      </el-table-column>
-      <el-table-column prop="priorityName" label="缺陷等级" align="center" />
-      <el-table-column prop="taskName" label="所属任务" align="center" width="200" show-overflow-tooltip />
-      <el-table-column prop="creatorList" label="提报人" width="100" align="center" />
-      <el-table-column prop="assignerList" label="责任人" width="100" align="center" show-overflow-tooltip />
-      <el-table-column prop="currentHandlerList" label="修复人" width="100" align="center" show-overflow-tooltip />
-      <el-table-column prop="gmtCreate" label="创建日期" width="150" align="center">
-        <template slot-scope="scope">{{ scope.row.gmtCreate | naspOut }}</template>
-      </el-table-column>
-    </el-table>
-    <el-col :span="24">
-      <div align="right">
-        <el-pagination
-          :page-sizes="[10, 20, 30, total]"
-          :current-page="curIndex"
-          :page-size="pageSize"
-          background
-          layout="total, sizes, prev, pager, next, jumper"
-          :total="total"
-          @size-change="handleSizeChange"
-          @current-change="handleCurrentChange"
-        />
-      </div>
-    </el-col>
-    <normal-dialog
-      :show-dialog.sync="statusDialog"
-      :title="statusDialogTitle"
-      :width="'50%'"
-      :is-default-close="false"
-      @confirm="confirmStatus()"
-      @cancel="bugsList()"
-    >
-      <el-form
-        v-if="statusDialogTitle !== '删除确认'"
-        ref="ruleForm"
-        label-width="110px"
-        label-position="left"
-        :model="nowTaskDetail"
-        :rules="rules"
-      >
-        <el-form-item
-          v-if="statusDialogTitle === '待测试' || statusDialogTitle === '已完成'"
-          label="缺陷原因"
-          prop="bugReason"
-        >
-          <el-select v-model="nowTaskDetail.bugReason" style="width: 100%">
-            <el-option
-              v-for="item in bugReasonEnumList"
-              :key="item.code"
-              :label="item.name"
-              :value="item.code"
-            />
-          </el-select>
-        </el-form-item>
-        <el-form-item
-          v-if="statusDialogTitle === '待测试'"
-          label="修复方式"
-          class="bug_manage_dialog bug_manage_dialog_fixMethod"
-        >
-          <el-input
-            v-model="nowTaskDetail.reasonOrDesc"
-            type="textarea"
-            placeholder="请输入具体原因和修复方式"
-            maxlength="300"
-            show-word-limit
-            rows="4"
-          />
-        </el-form-item>
-        <el-form-item
-          v-if="statusDialogTitle === '已完成'"
-          label="修复结果"
-          prop="repairResult"
-          class="bug_manage_dialog"
-        >
-          <el-select
-            v-model="nowTaskDetail.repairResult"
-            style="width: 100%"
-          >
-            <el-option
-              v-for="item in repairResultEnumList"
-              :key="item.code"
-              :label="item.name"
-              :value="item.code"
-            />
-          </el-select>
-        </el-form-item>
-        <el-form-item v-if="statusDialogTitle === 'Reopen'" label="Reopen原因" prop="reasonOrDesc">
-          <el-input
-            v-model="nowTaskDetail.reasonOrDesc"
-            type="textarea"
-            placeholder="请输入Reopen"
-            maxlength="300"
-            show-word-limit
-            rows="4"
-          />
-        </el-form-item>
-      </el-form>
-    </normal-dialog>
-  </div>
-</template>
-<script>
-import { bugList, bugGetEnum, bugUpdate } from '@/api/defectManage'
-import normalDialog from '@/components/dialog/normalDialog'
-export default {
-  components: { normalDialog },
-  filters: {
-    naspOut(value) {
-      if (!value) return ''
-      var da = value.split(/\s+/)
-      return da[0]
-    }
-  },
-  data() {
-    return {
-      bugsDataList: [],
-      allStatus: [], // 所有状态列表
-      bugReasonEnumList: [], // 所有bug原因列表
-      repairResultEnumList: [], // 修复原因列表
-      pageSize: 10,
-      curIndex: 1,
-      total: 0,
-      nowTaskDetail: null, // 当前需要改变任务的详情
-      statusDialog: false, // 状态修改弹框
-      statusDialogTitle: '',
-      rules: {
-        assigner: [
-          { required: true, message: '责任人不可为空', trigger: 'change' }
-        ],
-        currentHandler: [
-          { required: true, message: '修复人不可为空', trigger: 'change' }
-        ],
-        bugName: [
-          { required: true, message: '标题不可为空', trigger: 'blur' }
-        ],
-        bugReason: [
-          { required: true, message: '请选择缺陷原因', trigger: 'change' }
-        ],
-        repairResult: [
-          { required: true, message: '请选择修复结果', trigger: 'change' }
-        ],
-        reasonOrDesc: [
-          { required: true, message: '请输入Reopen原因', trigger: 'blur' }
-        ]
-      }
-    }
-  },
-  created() {
-    this.getBugGetEnum()
-    this.bugsList()
-  },
-  methods: {
-    async getBugGetEnum() {
-      const res = await bugGetEnum()
-      if (res.code === 200) {
-        this.allStatus = res.data.bugEnumList
-        this.bugReasonEnumList = res.data.bugReasonEnumList
-        this.repairResultEnumList = res.data.repairResultEnumList
-      }
-    },
-    async bugsList() {
-      const params = {
-        bizId: Number(localStorage.getItem('bizId')),
-        pageSize: this.pageSize,
-        curIndex: this.curIndex,
-        taskId: this.$route.query.id
-      }
-      const res = await bugList(params)
-      if (res.code === 200) {
-        this.bugsDataList = res.data
-        this.total = res.total
-      }
-    },
-    handleSizeChange(e) {
-      this.pageSize = e
-      this.bugsList()
-    },
-    handleCurrentChange(e) {
-      this.curIndex = e
-      this.bugsList()
-    },
-    getToDetails(id) { // 详情页跳转
-      this.$router.push({ name: '缺陷详情', params: { id: id }})
-    },
-    statusChange(row) { // 状态改变
-      this.nowTaskDetail = row
-      const nowStatusObj = this.allStatus.find(item => item.code === row.status)
-      if (['待修复', '修复中', 'Hold'].some(item => item === nowStatusObj.name)) {
-        this.bugUpdate()
-      } else {
-        this.statusDialogTitle = nowStatusObj.name
-        this.statusDialog = true
-      }
-    },
-    confirmStatus() { // 确认更改状态
-      this.$refs['ruleForm'].validate((valid) => {
-        if (valid) {
-          this.bugUpdate()
-          this.statusDialog = false
-        }
-      })
-    },
-    async bugUpdate() { // 更改状态请求
-      const userData = {
-        id: '',
-        ename: localStorage.getItem('username'),
-        name: localStorage.getItem('realname')
-      }
-      const res = await bugUpdate({ bugBaseInfo: this.nowTaskDetail, user: userData })
-      if (res.code === 200) {
-        this.$message({ message: '状态修改成功', type: 'success', duration: 1000, offset: 150 })
-      }
-    }
-  }
-}
-</script>
-<style lang="scss" scoped>
-@mixin setStatus($color) {
-  input {
-    color:$color;
-    border: 1px solid $color;
-  }
-  >>> .el-select__caret{
-    color:$color;
-  }
-  >>> .el-input__inner{
-    color:$color;
-    border-color: $color;
-  }
-  >>> .el-input__inner:focus {
-    border-color: $color;
-  }
-}
->>>.el-row .el-col {
-  margin: 10px 0;
-}
-.bug-title {
-  cursor: pointer;
-}
-.P0 {
-  background-color: #F56C6C;
-}
-.P1 {
-  background-color: #FF8952;
-}
-.P2 {
-  background-color: #F5E300;
-}
-.P3 {
-  background-color: #7ED321;
-}
-.P4 {
-  background-color: #61D3B8;
-}
-.P5 {
-  background-color: #69B3FF;
-}
-.P6 {
-  background-color: #BDBDBD;
-}
-.status0 {
-  @include setStatus(#69B3FF)
-}
-.status1 {
-  @include setStatus(#FF8952)
-}
-.status2 {
-  @include setStatus(#2F54EB)
-}
-.status3 {
-  @include setStatus(#61D3B8)
-}
-.status4 {
-  @include setStatus(#F56C6C)
-}
-.status5 {
-  @include setStatus(#7ED321)
-}
-.div_priority {
-  text-align: center;
-  color: #ffffff;
-  padding: inherit;
-  border-radius: 4px;
-  width: 40px;
-  display: inline-block;
-}
-.table-project-name {
-  display: flex;
-  justify-content: center;
-  flex-direction: column;
-  b {
-    color: #A7AEBC;
-    font-size: 10px;
-  }
-  span {
-    font-size: 14px;
-  }
-}
-</style>

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

@@ -91,6 +91,7 @@ export default {
     },
     OnClose() {
       this.$emit('update:show', false)
+      this.$emit('getList')
     },
     task_status_uptate(e) {
       if (this.statusName === '已提测') {

+ 26 - 32
src/views/projectManage/taskList/taskViewDetail.vue

@@ -154,19 +154,19 @@
       </el-container>
       <!-- 概览 -->
       <!-- 缺陷 -->
-      <el-container v-show="activeName === '2'" class="is-vertical">
+      <el-container v-show="activeName === '2'" class="is-vertical" style="height: calc(100vh - 125px);">
         <section class="main-section">
-          <bugs-list />
+          <bugTableDialog ref="bugTableDialog" />
         </section>
       </el-container>
       <!-- 缺陷 -->
       <!-- 报告 -->
-      <el-container v-show="activeName === '3'" class="is-vertical">
+      <el-container v-show="activeName === '3'" class="is-vertical" style="height: calc(100vh - 125px);">
         <report-list />
       </el-container>
       <!-- 报告 -->
       <!-- 统计 -->
-      <el-container v-if="activeName === '4'" class="is-vertical">
+      <el-container v-if="activeName === '4'" class="is-vertical" style="height: calc(100vh - 125px);">
         <section class="main-section">
           <data-statistics />
         </section>
@@ -190,12 +190,7 @@
         </span>
       </el-dialog>
       <!-- 删除 -->
-      <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>
+      <task-dialog v-if="showTaskDialog" :show.sync="showTaskDialog" :task-id="taskIds.id" :status-name="taskIds.statusString" @getList="taskGet" />
       <drawer
         ref="drawer"
         title="项目成员"
@@ -229,31 +224,33 @@ import textArea from '@/components/input/textArea'
 import drawer from '@/views/projectManage/Drawer'
 import image_url from '@/assets/home_images/home_u.png'
 import createdBug from '@/views/projectManage/bugList/file/createdBug'
-import normalDialog from '@/components/dialog/normalDialog'
+// import normalDialog from '@/components/dialog/normalDialog'
 import openDialog from '@/views/projectManage/dialog_vue'
 import scheduleList from './components/scheduleList'
-import bugsList from './components/bugsList'
 import reportList from './components/reportList'
 import dataStatistics from './components/dataStatistics'
 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 stage from '@/assets/detailPage/已完成@2x.png'
+import taskDialog from '@/views/projectManage/taskList/dialog/taskDialog' // 任务状态修改(已上线/已提测/已准出)
+import bugTableDialog from '@/views/projectManage/bugList/details/bugTableDialog' // 缺陷表格
 export default {
   components: {
     searchPeople,
-    normalDialog,
+    // normalDialog,
     textArea,
     drawer,
     createdBug,
     openDialog,
     scheduleList,
-    bugsList,
     reportList,
     dataStatistics,
     TestReport,
     DailyReport,
-    ClientReport
+    ClientReport,
+    taskDialog,
+    bugTableDialog
   },
   filters: {
     ellipsis(value, num) {
@@ -271,6 +268,7 @@ export default {
       userInformation: localStorage.getItem('username'),
       userNames: localStorage.getItem('realname'),
       textarea: '', // 评论
+      showTaskDialog: false, // 状态弹窗
       taskId: Number(this.$route.query.id), // 任务id
       allStatus: [], // 任务所有状态
       belongProjectList: [], // 所属项目列表
@@ -278,8 +276,6 @@ export default {
       appClient: [], // 跟版客户端列表
       taskScheduleEvent: [], // 排期类型
       dependList: [{ msg: '否', code: 2 }, { msg: '是', code: 1 }], // 是否跟版
-      statusDialog: false, // 修改状态弹框
-      changeStatusDate: null, // 状态改变时间
       form_query: {},
       display: false, // 设置成员弹框
       num: 0, // 成员数量
@@ -292,7 +288,8 @@ export default {
       dialogClient: false, // 新建准出报告
       iterationList: [], // 所属迭代列表
       commentContent: null, // 评论内容
-      comments: [] // 评论列表
+      comments: [], // 评论列表
+      taskIds: '' // 将要修改状态的任务id
     }
   },
   computed: {
@@ -309,6 +306,9 @@ export default {
     this.$store.state.data.status = true
     this.$store.state.data.bizId = true
   },
+  mounted() {
+    this.$refs.bugTableDialog.bugGetTableList({ taskId: Number(this.$route.query.id) })
+  },
   destroyed() {
     this.$store.state.data.status = false
     this.$store.state.data.bizId = false
@@ -388,17 +388,18 @@ export default {
       }
     },
     async updateStatus(e) { // 状态改变
-      if (e.value === 5) { // 已上线
-        this.statusDialog = true
-        this.form_query.status = e.value
+      if (e.value === 2 || e.value === 4 || e.value === 5) {
+        this.taskIds = this.form_query
+        this.allStatus.map(item => {
+          item.code === e.value ? this.taskIds.statusString = e.label : ''
+        })
+        this.showTaskDialog = true
+        this.taskIds.status = e.value
+        return
       } else {
         this.changeArea()
       }
     },
-    async confirmStatus() { // 确认更改状态
-      this.form_query.onlineRealTime = this.changeStatusDate
-      this.changeArea()
-    },
     childVal(val) {
       this.num = val
     },
@@ -567,13 +568,6 @@ export default {
     overflow: hidden;
     text-overflow: ellipsis;
   }
-.dialog-change-status {
-  margin: 2% 3%;
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  white-space:nowrap;
-}
 .form-progress {
   width: 200px;
   padding-top: 12px;