浏览代码

电单车上线

panxiandiao_i 5 年之前
父节点
当前提交
0481245903
共有 3 个文件被更改,包括 318 次插入123 次删除
  1. 43 0
      src/api/KanBan.js
  2. 273 122
      src/views/projectManage/taskList/taskListIndex.vue
  3. 2 1
      src/views/virtualDevices/HMvehicle.vue

+ 43 - 0
src/api/KanBan.js

@@ -0,0 +1,43 @@
+import request from '@/utils/request'
+import { mockUrl } from '@/apiConfig/api'
+// ================================== Interface ======================================
+
+// const mockUrl = 'http://172.23.161.241:8980' // 线下
+// const mockUrl = 'http://10.179.24.123:8980' // 线上
+
+// 创建文件夹
+export function createComment(data) {
+  return request({
+    url: mockUrl + '/comment/create',
+    method: 'post',
+    data
+  })
+}
+
+// 更新文件夹
+export function updateComment(data) {
+  return request({
+    url: mockUrl + '/comment/update',
+    method: 'post',
+    data
+  })
+}
+
+// 删除文件
+export function deleteComment(id, data) {
+  return request({
+    url: mockUrl + `/comment/delete?id=` + id,
+    method: 'post',
+    data
+  })
+}
+
+// list
+export function listComment(data) {
+  return request({
+    url: mockUrl + '/comment/list',
+    method: 'post',
+    data
+  })
+}
+

+ 273 - 122
src/views/projectManage/taskList/taskListIndex.vue

@@ -103,41 +103,6 @@
                 <el-button type="primary" size="medium" style="z-index:999" plain @click="kanBanQuery(formKanBan)">查询</el-button>
                 <el-button type="primary" size="medium" style="z-index:999" plain @click="kanBanQuery(formKanBan)">查询</el-button>
               </div>
               </div>
             </el-form>
             </el-form>
-            <!-- <div class="set-scroll">
-              <div class="scroll">
-                <el-divider />
-                <div class="set-label-flex">
-                  <div v-for="lable in labelDrag" :key="lable.status" class="for-flex">
-                    <div class="label">
-                      <p style="margin-bottom:7px">共{{ lable.count }}个</p>
-                      <p :class="{ waitColor: [0, 1, 2, 3, 4, 6, 8, 9].indexOf(lable.status) !== -1, 'processColor': [5, 7].indexOf(lable.status) !== -1, 'finishColor': [10, 11, 12].indexOf(lable.status) !== -1 }">{{ lable.statusString }}</p>
-                    </div>
-                    <div class="line-position">
-                      <div v-if="lable.status !== 12" class="line" />
-                    </div>
-                  </div>
-                </div>
-                <el-divider />
-                <div class="set-flex">
-                  <draggable v-for="statusAll in labelDrag" :key="statusAll.status" v-model="statusAll.taskInfos" class="drag" :sort="false" group="statusAll.taskInfos" :move="checkMove" @add="targetRecording(statusAll.status)">
-                    <div v-for="item in statusAll.taskInfos" :key="item.id" class="inner-drag">
-                      <div class="span-wrap" style="margin-bottom:5px;">
-                        <span style="font-weight:500;">ID :&nbsp;</span>
-                        <span>{{ item.id }}</span>
-                      </div>
-                      <div class="span-wrap">
-                        <span style="font-weight:500;">名称 :&nbsp;</span>
-                        <span>{{ item.name }}</span>
-                      </div>
-                      <div class="tag-wrap">
-                        <el-tag v-if="item.tag" type="info" size="small" style="margin-left:10px">{{ item.tag }}</el-tag>
-                        <el-tag v-if="item.group" size="small">{{ item.group }}</el-tag>
-                      </div>
-                    </div>
-                  </draggable>
-                </div>
-              </div>
-            </div> -->
           </el-tab-pane>
           </el-tab-pane>
         </el-tabs>
         </el-tabs>
       </div>
       </div>
@@ -150,7 +115,7 @@
         <div v-show="!isCollapsing" class="collapse-navigation">
         <div v-show="!isCollapsing" class="collapse-navigation">
           <div class="expand-collapse">
           <div class="expand-collapse">
             <el-tooltip class="item" effect="dark" content="任务分组" placement="top">
             <el-tooltip class="item" effect="dark" content="任务分组" placement="top">
-              <span @click="isCollapsing = !isCollapsing">展开 &gt; &gt;</span>
+              <span @click="isCollapsing = !isCollapsing"><i class="el-icon-d-arrow-right" /></span>
             </el-tooltip>
             </el-tooltip>
           </div>
           </div>
           <div class="tips">
           <div class="tips">
@@ -161,8 +126,62 @@
         </div>
         </div>
         <div class="content">
         <div class="content">
           <div class="under-padding">
           <div class="under-padding">
-            <div style="height:100px;width:2000px;background-color:green" />
-            <div style="height:100px;width:800px;background-color:yellow" />
+            <div class="set-flex">
+              <div v-for="statusAll in labelDrag" :key="statusAll.status" class="drag-head">
+                <div class="head">
+                  <div class="head-name" :class="{ waitColor: [0, 1, 2, 3, 4, 6, 8, 9].indexOf(statusAll.status) !== -1, 'processColor': [5, 7].indexOf(statusAll.status) !== -1, 'finishColor': [10, 11, 12].indexOf(statusAll.status) !== -1 }">{{ statusAll.statusString }}</div>
+                  <div class="head-score">{{ statusAll.count }}&nbsp;/&nbsp;{{ totalKanBan }}</div>
+                </div>
+              </div>
+            </div>
+            <div class="set-flex">
+              <div v-for="statusAll in labelDrag" :key="statusAll.status" class="drag">
+                <div v-if="statusAll.count === 0" :key="statusAll.status" class="inner-drag-blank" :class="{ blankColor: statusAll.count === 0 }">
+                  <div class="content-blank">
+                    <span>暂无数据~</span>
+                  </div>
+                </div>
+                <draggable v-model="statusAll.taskInfos" :sort="false" group="statusAll.taskInfos" :move="checkMove" @add="targetRecording(statusAll.status)">
+                  <div v-for="item in statusAll.taskInfos" :key="item.id" class="inner-drag" :class="{ waitColor: [0, 1, 2, 3, 4, 6, 8, 9].indexOf(statusAll.status) !== -1, 'processColor': [5, 7].indexOf(statusAll.status) !== -1, 'finishColor': [10, 11, 12].indexOf(statusAll.status) !== -1 }">
+                    <div class="span-wrap">
+                      <div class="set-reverse">
+                        <span>ID :&nbsp;{{ item.id }}</span>
+                        <div class="center">
+                          <span>{{ item.group }}</span>
+                        </div>
+                      </div>
+                    </div>
+                    <div class="span-wrap">
+                      <span>名称 :&nbsp;{{ item.name }}</span>
+                    </div>
+                    <div class="span-wrap">
+                      <div class="priority" :class="{ 'priority-red':item.priorityString === 'p0', 'priority-orange':item.priorityString === 'p1', 'priority-green':item.priorityString === 'p2', 'priority-blue':item.priorityString === 'p3', 'priority-purple':item.priorityString === 'p4', 'priority-yellow':item.priorityString === 'p5', 'priority-grey':item.priorityString === 'p6' }">
+                        <span>{{ item.priorityString }}</span>
+                      </div>
+                    </div>
+                    <div class="span-wrap">
+                      <div class="set-wrap">
+                        <div v-for="(role,index) in item.nameGroup" :key="index" class="role-color" :class="{ 'priority-orange':( index+1 ) % 7 === 1, 'priority-blue':( index+1 ) % 7 === 2, 'priority-green':( index+1 ) % 7 === 3, 'priority-red':( index+1 ) % 7 === 4, 'priority-purple':( index+1 ) % 7 === 5, 'priority-yellow':( index+1 ) % 7 === 6, 'priority-grey':( index+1 ) % 7 === 0 }">
+                          <span>
+                            {{ role }}
+                          </span>
+                        </div>
+                      </div>
+                    </div>
+                    <div class="span-wrap">
+                      <div class="only-tag">
+                        <i class="el-icon-price-tag" />
+                        <span>{{ item.tag }}</span>
+                      </div>
+                    </div>
+                  <!-- <div class="tag-wrap">
+                    <el-tag v-if="item.tag" type="info" size="small" style="margin-left:10px">{{ item.tag }}</el-tag>
+                    <el-tag v-if="item.group" size="small">{{ item.group }}</el-tag>
+                  </div> -->
+                  </div>
+                </draggable>
+              </div>
+            </div>
           </div>
           </div>
         </div>
         </div>
       </div>
       </div>
@@ -174,6 +193,7 @@
 import { taskListGet } from '@/api/defectManage'
 import { taskListGet } from '@/api/defectManage'
 import { bugGetEnum } from '@/api/defectManage' // 下拉菜单data
 import { bugGetEnum } from '@/api/defectManage' // 下拉菜单data
 import { deleteTaskData, listMap, updateTaskList } from '@/api/projectPage.js'
 import { deleteTaskData, listMap, updateTaskList } from '@/api/projectPage.js'
+import { updateComment, deleteComment, listComment, createComment } from '@/api/KanBan.js'
 import draggable from 'vuedraggable'
 import draggable from 'vuedraggable'
 
 
 export default {
 export default {
@@ -324,6 +344,7 @@ export default {
     },
     },
     // 看板移动更新
     // 看板移动更新
     checkMove(evt) {
     checkMove(evt) {
+      console.log(evt.draggedContext.element)
       this.pauseFromId = evt.draggedContext.element.id
       this.pauseFromId = evt.draggedContext.element.id
     },
     },
     targetRecording(e) {
     targetRecording(e) {
@@ -344,23 +365,26 @@ export default {
     kanBanDrag() {
     kanBanDrag() {
       this.loadingOnlineProcess = true
       this.loadingOnlineProcess = true
       const initValue = { bizId: this.bizJson }
       const initValue = { bizId: this.bizJson }
+      listComment().then((res) => {
+        console.log(res)
+      })
       listMap(initValue).then((res) => {
       listMap(initValue).then((res) => {
         res.code === 200 ? this.labelDrag = this.bubble(res.data) : this.errorFun(res.msg)
         res.code === 200 ? this.labelDrag = this.bubble(res.data) : this.errorFun(res.msg)
         this.loadingOnlineProcess = false
         this.loadingOnlineProcess = false
       })
       })
     },
     },
-    // 冒泡数量从高到低
+    // 冒泡数量从高到低 和 分组
     bubble(arr) {
     bubble(arr) {
-      const res = Object.assign([], arr)
+      let res = Object.assign([], arr)
       const max = res.length - 1
       const max = res.length - 1
       for (let j = 0; j < max; j++) {
       for (let j = 0; j < max; j++) {
         // 声明一个变量,作为标志位
         // 声明一个变量,作为标志位
         let done = true
         let done = true
         for (let i = 0; i < max - j; i++) {
         for (let i = 0; i < max - j; i++) {
-          if (arr[i].count < arr[i + 1].count) {
-            var temp = arr[i]
-            arr[i] = arr[i + 1]
-            arr[i + 1] = temp
+          if (res[i].count < res[i + 1].count) {
+            var temp = res[i]
+            res[i] = res[i + 1]
+            res[i + 1] = temp
             done = false
             done = false
           }
           }
         }
         }
@@ -368,9 +392,20 @@ export default {
           break
           break
         }
         }
       }
       }
+      // 自己处理 不给后端处理
+      res = res.map(eachData => ({
+        ...eachData,
+        taskInfos: eachData.taskInfos.map(detail => ({
+          ...detail,
+          nameGroup: [
+            ...(detail.pmList ? detail.pmList.split(',').map(str => str.trim()) : []),
+            ...(detail.qaList ? detail.qaList.split(',').map(str => str.trim()) : []),
+            ...(detail.rdList ? detail.rdList.split(',').map(str => str.trim()) : [])
+          ]
+        }))
+      }))
       this.totalKanBan = res.reduce((sumSoFar, item) => sumSoFar + item.count, 0)
       this.totalKanBan = res.reduce((sumSoFar, item) => sumSoFar + item.count, 0)
-      console.log(this.totalKanBan)
-      return arr
+      return res
     },
     },
     // 标签页研发质量
     // 标签页研发质量
     handleClick() {
     handleClick() {
@@ -385,14 +420,14 @@ export default {
     // 看板查询
     // 看板查询
     kanBanQuery(e) {
     kanBanQuery(e) {
       for (const key in e) {
       for (const key in e) {
-        if (!e[key]) {
+        if (e[key] === '') {
           delete e[key]
           delete e[key]
         }
         }
       }
       }
       e.bizId = this.bizJson
       e.bizId = this.bizJson
       this.loadingOnlineProcess = true
       this.loadingOnlineProcess = true
       listMap(e).then((res) => {
       listMap(e).then((res) => {
-        this.labelDrag = res.data
+        res.code === 200 ? this.labelDrag = this.bubble(res.data) : this.errorFun(res.msg)
         this.loadingOnlineProcess = false
         this.loadingOnlineProcess = false
       })
       })
     },
     },
@@ -509,7 +544,7 @@ export default {
             height 100%
             height 100%
             span
             span
               writing-mode vertical-rl
               writing-mode vertical-rl
-              font-size 14px
+              font-size 15px
               font-weight 400
               font-weight 400
               color rgba(111,124,147,1)
               color rgba(111,124,147,1)
               line-height 35px
               line-height 35px
@@ -523,77 +558,193 @@ export default {
         .under-padding
         .under-padding
           width 100%
           width 100%
           height 100%
           height 100%
-          overflow scroll
-    // .set-scroll
-    //   min-width 100%
-    //   overflow scroll
-    //   .scroll
-    //     width 3054px
-    //   .scroll >>> .el-divider--horizontal
-    //     margin 0
-    //   .set-flex
-    //     display flex
-    //     justify-content space-between
-    //     .drag
-    //       margin-top 20px
-    //       width 222px
-    //       border-radius 7px
-    //       height 57vh
-    //       background-color #E1E4E6
-    //       overflow scroll
-    //       .inner-drag
-    //         width 89%
-    //         margin 10px auto 0 auto
-    //         background-color white
-    //         border-radius 4px
-    //         padding 10px
-    //         .span-wrap
-    //           white-space pre-wrap
-    //           word-wrap break-word
-    //           overflow hidden
-    //           text-overflow ellipsis
-    //           display -webkit-box
-    //           -webkit-line-clamp 2
-    //           -webkit-box-orient vertical
-    //           span
-    //             font-size 13px
-    //         .tag-wrap
-    //           margin-top 15px
-    //           display flex
-    //           flex-direction row-reverse
-    //       .inner-drag:last-child
-    //         width 89%
-    //         margin 10px auto
-    //         background-color white
-    //         border-radius 4px
-    //   .set-label-flex
-    //     display flex
-    //     height 70px
-    //     justify-content space-between
-    //     .for-flex
-    //       display flex
-    //       justify-content space-between
-    //       align-items center
-    //       .label
-    //         width 222px
-    //         height 100%
-    //         padding 13px 0px 0px 35%
-    //       .label p
-    //         margin 0
-    //       .waitColor
-    //         color #F56C6C
-    //       .processColor
-    //         color #FB9616
-    //       .finishColor
-    //         color #00C9AE
-    //       .line-position
-    //         width 14px
-    //         height 100%
-    //         display flex
-    //         justify-content center
-    //         align-items center
-    //         .line
-    //           width 1px
-    //           height 80%
-    //           background-color #dcdfe6
+          overflow-x scroll
+          .set-flex
+            width 3880px
+            display flex
+            justify-content space-between
+            .drag-head
+              width 280px
+              border-radius 7px 7px 0 0
+              background-color #ECECEC
+              box-shadow 0px 0px 11px 0px #ececec
+              height fit-content
+              // overflow scroll
+              .head
+                height 50px
+                display flex
+                justify-content center
+                align-items center
+                padding-top 10px
+                .head-name
+                  font-size 14px
+                  font-weight 400
+                  line-height 35px
+                  margin-right 5px
+                .waitColor
+                  color #F56C6C
+                .processColor
+                  color #FB9616
+                .finishColor
+                  color #00C9AE
+                .head-score
+                  font-size 14px
+                  font-weight 400
+                  line-height 35px
+                  margin-left 5px
+            .drag
+              width 280px
+              border-radius 0 0 7px 7px
+              background-color #ECECEC
+              box-shadow 0px 0px 11px 0px #ececec
+              height fit-content
+              // max-height 200px
+              // overflow scroll
+              .inner-drag
+                width 89%
+                margin 10px auto 0 auto
+                background-color white
+                border-radius 4px
+                padding 10px
+                border-left-width 4px
+                border-left-style solid
+                &.waitColor
+                  border-left-color #F56C6C
+                &.processColor
+                  border-left-color #FB9616
+                &.finishColor
+                  border-left-color #00C9AE
+                .span-wrap
+                  width 100%
+                  // margin-bottom 5px
+                  span
+                    font-size 13px
+                    font-weight 400
+                    color rgba(51,59,74,1)
+                    line-height 20px
+                  .priority
+                    width 18px
+                    display flex
+                    align-items center
+                    justify-content center
+                    height 18px
+                    margin-top 3px
+                    border-radius 4px
+                    &.priority-red
+                      background-color #F56C6C
+                    &.priority-orange
+                      background-color #FB9616
+                    &.priority-green
+                      background-color #7DCB72
+                    &.priority-blue
+                      background-color #73C5FA
+                    &.priority-purple
+                      background-color #AEB4FF
+                    &.priority-yellow
+                      background-color yellow
+                    &.priority-grey
+                      background-color grey
+                    span
+                      color rgba(255,255,255,1)
+                      transform scale(0.8)
+                      font-size 12px
+                  .set-wrap
+                    width 100%
+                    display flex
+                    flex-wrap wrap
+                    .role-color
+                      display flex
+                      align-items center
+                      justify-content center
+                      height 18px
+                      margin-top 6px
+                      border-radius 4px
+                      margin-right 8px
+                      padding 0 3px 0 3px
+                      &.priority-red
+                        background-color #F56C6C
+                      &.priority-orange
+                        background-color #FB9616
+                      &.priority-green
+                        background-color #7DCB72
+                      &.priority-blue
+                        background-color #73C5FA
+                      &.priority-purple
+                        background-color #AEB4FF
+                      &.priority-yellow
+                        background-color yellow
+                      &.priority-grey
+                        background-color grey
+                      span
+                        color rgba(255,255,255,1)
+                        transform scale(0.8)
+                        font-size 12px
+                  .only-tag
+                    background-color #EDEDED
+                    display flex
+                    align-items center
+                    justify-content center
+                    margin-top 6px
+                    border-radius 8px
+                    width fit-content
+                    // height 18px
+                    padding 0 6px 0 6px
+                    span
+                      color #333B4A
+                      transform scale(0.8)
+                      font-size 12px
+                    .el-icon-price-tag
+                      margin-right 2px
+                      font-size 12px
+                      transform rotate(-45deg)
+                  .set-reverse
+                    width 100%
+                    display flex
+                    justify-content space-between
+                    span
+                      font-size 13px
+                      font-weight 400
+                      color rgba(51,59,74,1)
+                      line-height 20px
+                    .center
+                      display flex
+                      align-items center
+                      justify-content center
+                      border-radius 4px
+                      border 1px solid #ddd
+                      width fit-content
+                      height 18px
+                      padding 0 6px 0 6px
+                      span
+                        color rgba(151,151,151,1)
+                        transform scale(0.7)
+                        font-size 12px
+                .tag-wrap
+                  margin-top 15px
+                  display flex
+                  flex-direction row-reverse
+              .inner-drag:last-child
+                width 89%
+                margin 10px auto
+                background-color white
+                border-radius 4px
+              .inner-drag-blank
+                width 89%
+                margin 10px auto
+                background-color white
+                border-radius 4px
+                padding 10px
+                border-left-width 4px
+                border-left-style solid
+                &.blankColor
+                  border-left-color #A7AEBC
+                .content-blank
+                  display flex
+                  justify-content center
+                  align-items center
+                  width 100%
+                  height 60px
+                  span
+                    color rgba(167,174,188,1)
+                    font-size 12px
 </style>
 </style>

+ 2 - 1
src/views/virtualDevices/HMvehicle.vue

@@ -402,13 +402,14 @@ export default {
       } else {
       } else {
         activeHmVirtualDevice(params).then(res => {
         activeHmVirtualDevice(params).then(res => {
           if (res.code === 200) {
           if (res.code === 200) {
+            this.loading = true
             setTimeout(() => {
             setTimeout(() => {
               this._queryDeviceInfo()
               this._queryDeviceInfo()
               this.$message({
               this.$message({
                 message: `车辆ID ${scope.vehicleId} 激活成功`,
                 message: `车辆ID ${scope.vehicleId} 激活成功`,
                 type: 'success'
                 type: 'success'
               })
               })
-            }, 500)
+            }, 1000)
           } else {
           } else {
             this.$message.error(res.msg)
             this.$message.error(res.msg)
           }
           }