qinzhipeng_v 5 жил өмнө
parent
commit
43469d6d74

+ 47 - 0
src/components/StatusComponent/StatusComponent.vue

@@ -0,0 +1,47 @@
+<template>
+  <el-select
+    v-model="status"
+    :class="{
+      'item-color': status === 0,
+      'item': status === 3,
+      'item1': status === 2,
+      'item2': status === 4,
+      'item3': status === 5
+    }"
+    class="public_botton"
+    size="mini"
+    @change="blurEvent(status)"
+  >
+    <el-option v-for="item in statusArr" :key="item.code" :label="item.name" :value="item.code" />
+  </el-select>
+</template>
+
+<script>
+import '@/styles/PublicStyle/index.scss'
+export default {
+  props: {
+    title: { type: String, default: null }, // 标题
+    statusData: { type: String, default: null }, // 选择的当前状态
+    statusList: { type: Array, default: null }, // option数据
+    statusRow: { type: Object, default: null }
+  },
+  data() {
+    return {
+      statusArr: this.statusList,
+      status: this.statusData
+    }
+  },
+  mounted() {
+    console.log(this.statusRow, 'title')
+  },
+  methods: {
+    blurEvent(status) {
+      console.log(status, 't')
+    }
+  }
+}
+</script>
+
+<style lang="scss">
+
+</style>

+ 38 - 13
src/views/projectManage/bugList/bugindex.vue

@@ -492,10 +492,15 @@
                     size="mini"
                     @change="blurEvent(scope.row, scope.row.status)"
                   >
-                    <el-option v-for="item in bugEnumList" :key="item.code" :label="item.name" :value="item.code" />
+                    <el-option v-for="item in bugStatusList(scope.row.status)" :key="item.code" :label="item.name" :value="item.code" />
                   </el-select>
                 </template>
               </el-table-column>
+              <el-table-column prop="bugStatusName" label="状态cs" min-width="110" align="center">
+                <template slot-scope="scope">
+                  <Status-component :title="'缺陷'" :status-data="scope.row.status" :status-list="bugEnumList" :status-row="scope.row" />
+                </template>
+              </el-table-column>
               <el-table-column prop="taskName" label="所属任务" align="center" min-width="250" show-overflow-tooltip />
               <el-table-column prop="creatorList" label="提报人" align="center" />
               <el-table-column prop="assignerList" label="责任人" min-width="150" align="center" show-overflow-tooltip />
@@ -610,6 +615,7 @@
 </template>
 
 <script>
+import StatusComponent from '@/components/StatusComponent/StatusComponent.vue'
 import BugDetails from './details/index'
 import createdBug from '@/views/projectManage/bugList/file/createdBug'
 import normalDialog from '@/components/dialog/normalDialog'
@@ -637,7 +643,8 @@ export default {
     createdBug,
     BugDetails,
     normalDialog,
-    filterList
+    filterList,
+    StatusComponent
   },
   filters: {
     oneA(value) {
@@ -795,6 +802,33 @@ export default {
     this.$store.state.data.status = false
   },
   methods: {
+    bugStatusList(status) {
+      if (status === 0) {
+        return this.bugEnumList.filter(item => {
+          return item.code === 2 || item.code === 0 || item.code === 5
+        })
+      }
+      if (status === 2) {
+        return this.bugEnumList.filter(item => {
+          return item.code === 2 || item.code === 3 || item.code === 4
+        })
+      }
+      if (status === 3) {
+        return this.bugEnumList.filter(item => {
+          return item.code === 3
+        })
+      }
+      if (status === 4) {
+        return this.bugEnumList.filter(item => {
+          return item.code === 2 || item.code === 5 || item.code === 4
+        })
+      }
+      if (status === 5) {
+        return this.bugEnumList.filter(item => {
+          return item.code === 2 || item.code === 5
+        })
+      }
+    },
     changeSelect() {
       this.$forceUpdate()
     },
@@ -859,7 +893,7 @@ export default {
     selectStatus(row) {
       row.isSelected = !row.isSelected
     },
-    blurEvent(row, status) {
+    blurEvent(row, status) { // 修改状态
       this.staData = row
       this.statusId = status
       if (status === 0 || status === 1 || status === 5) {
@@ -1229,16 +1263,7 @@ export default {
   padding-left: 10px;
   width: 73px;
 }
-// .btns .el-input__suffix {
-//     // display: none;
-//     visibility: hidden;
-// }
-// .btns :hover {
-//  /deep/ .el-input__suffix {
-//     // display: inline-block;
-//     visibility: inherit;
-//   }
-// }
+
 .item{
   /deep/ input {
     color: rgb(126, 211, 33);

+ 1 - 1
src/views/projectManage/iteration/components/PlanningIteration.vue

@@ -215,7 +215,7 @@ export default {
             return item.id !== val.id
           })
         })
-        this.reqRight = this.leftArray
+        this.reqRight = []
       }
       if (e === 2) {
         this.citiesLeft = this.rightArray.concat(this.citiesLeft)