瀏覽代碼

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

qinzhipeng_v 5 年之前
父節點
當前提交
941c99a323

+ 1 - 1
package.json

@@ -40,6 +40,7 @@
     "path-to-regexp": "2.4.0",
     "qrcodejs2": "0.0.2",
     "simditor": "^2.3.26",
+    "swiper": "^5.3.6",
     "v-jsoneditor": "^1.2.2",
     "vue": "2.6.10",
     "vue-awesome-swiper": "^4.0.4",
@@ -80,7 +81,6 @@
     "stylus-loader": "^3.0.2",
     "svg-sprite-loader": "4.1.3",
     "svgo": "1.2.2",
-    "swiper": "^4.5.1",
     "vue-template-compiler": "2.6.10"
   },
   "engines": {

+ 1 - 1
src/layout/components/AppMain.vue

@@ -28,7 +28,7 @@ export default {
   overflow: hidden;
 }
 .fixed-header+.app-main {
-  padding-top: 80px;
+  padding-top: 60px;
 }
 </style>
 

+ 1 - 1
src/layout/components/Navbar.vue

@@ -172,7 +172,7 @@ export default {
   display: flex;
   align-items: center;
   justify-content: space-between;
-  height: 80px;
+  height: 60px;
   overflow: hidden;
   position: relative;
   background: #409EFF;

+ 1 - 1
src/layout/components/Sidebar/Logo.vue

@@ -45,7 +45,7 @@ export default {
 .sidebar-logo-container {
   position: relative;
   width: 100%;
-  height: 80px;
+  height: 60px;
   line-height: 50px;
   background: #409EFF;
   text-align: center;

+ 102 - 3
src/views/projectManage/projectList/projectViewDetails.vue

@@ -258,14 +258,29 @@
               <div class="titIcon" />
               <div class="titSonName">任务列表</div>
             </div>
+            <el-row v-if="!showHeader" class="select-main" type="flex" align="center">
+              <el-col :span="2">
+                <el-checkbox v-model="planChecked" class="plan-checked" @change="changeCheck" />
+              </el-col>
+              <el-col :span="2" class="item-checked">已选择<span style="color: #409EFF">{{ curcentChecked }}</span>个</el-col>
+              <el-col :span="1" class="item-click">|</el-col>
+              <el-col :span="2" class="item-click" @click.native="handlePlan('test')">提测</el-col>
+              <el-col :span="2" class="item-click" @click.native="handlePlan('allow')">准出</el-col>
+              <el-col :span="4" class="item-click">建立测试日报</el-col>
+              <el-col :span="4" class="item-click" @click.native="handlePlan('cancel')">取消选择</el-col>
+            </el-row>
             <el-table
+              ref="planTable"
               :data="all_task"
               style="width: 100%;"
               size="mini"
               :header-cell-style="{ color: '#4A4A4A', fontSize: '14px', fontWeight: '550', textAlign: 'center' }"
               show-overflow-tooltip="true"
+              :show-header="showHeader"
+              @selection-change="handleSelectionChange"
             >
-              <el-table-column label="任务名称" min-width="100" align="center" show-overflow-tooltip>
+              <el-table-column type="selection" width="55" align="center" />
+              <el-table-column label="任务名称" min-width="90" align="center" show-overflow-tooltip>
                 <template slot-scope="scope"><div style="cursor: pointer;" @click="link_task(scope.row.id)">{{ scope.row.name }}</div></template>
               </el-table-column>
               <el-table-column label="所属需求" min-width="100" align="center" show-overflow-tooltip>
@@ -274,7 +289,7 @@
               <el-table-column label="状态" min-width="100" align="center">
                 <template slot-scope="scope">{{ scope.row.statusString }}</template>
               </el-table-column>
-              <el-table-column label="任务健康状态" min-width="100" align="center">
+              <el-table-column label="任务健康状态" min-width="120" align="center">
                 <template slot-scope="scope">{{ scope.row.stageString }}</template>
               </el-table-column>
               <el-table-column label="开发负责人" min-width="100" align="center" show-overflow-tooltip>
@@ -716,7 +731,12 @@ export default {
       condition: '',
       noRequire: '',
       formBackgroungInfo: [],
-      requirement: null
+      requirement: null,
+      showHeader: true, // 任务列表的表头是否显示
+      curcentList: [], // 当前已选择的列表
+      curcentChecked: 0, // 当前已选择的数量
+      planChecked: false,
+      planHandleType: '' // 任务列表操作类型
     }
   },
   created() {
@@ -1126,7 +1146,86 @@ export default {
     handleCurrentChange(curIndex) { //  分页
       this.curIndex = curIndex
       this.click_name1(this.condition)
+    },
+    handleSelectionChange(val) { // 任务列表删选操作
+      val.length > 0 ? this.showHeader = false : this.showHeader = true
+      this.curcentChecked = val.length
+      this.curcentList = val
+    },
+    changeCheck(val) {
+      if (val) {
+        this.all_task.forEach(row => {
+          this.$refs.planTable.toggleRowSelection(row, true)
+        })
+      } else {
+        this.$refs.planTable.clearSelection()
+      }
+    },
+    handlePlan(type) { // 任务列表操作
+      this.planHandleType = type
+      switch (type) {
+        case 'test':
+          this.filtrateTest()
+          break
+        case 'allow':
+          this.filtrateAllow()
+          break
+        case 'cancel':
+          this.$refs.planTable.clearSelection()
+          break
+      }
+    },
+    filtrateTest() { // 提测筛选
+      const isDevelop = this.curcentList.every(item => {
+        return item.statusString === '开发中'
+      })
+      if (!isDevelop) {
+        this.$message({
+          message: '存在状态不是【开发中】的任务,请将任务状态为【开发中】才可提测,请检查!',
+          type: 'error',
+          duration: 3000,
+          offset: 150
+        })
+      }
+    },
+    filtrateAllow() { // 准出筛选
+      const isDevelop = this.curcentList.every(item => {
+        return item.statusString === '测试中'
+      })
+      if (!isDevelop) {
+        this.$message({
+          message: '存在状态不是【测试中】的任务,请将任务状态为【测试中】才可提测,请检查!',
+          type: 'error',
+          duration: 3000,
+          offset: 150
+        })
+      }
     }
   }
 }
 </script>
+<style scoped lang="scss">
+.plan-checked {
+  padding-left: 21px;
+}
+.select-main {
+  border-bottom: 1px solid #DCDFE6;
+  .item-checked {
+    color: #606266;
+    font-size: 14px;
+    display: flex;
+    align-items: center;
+    justify-content: left;
+    cursor: pointer;
+  }
+  .item-click{
+    color: #606266;
+    font-size: 14px;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    cursor: pointer;
+  }
+}
+
+</style>

+ 1 - 1
src/views/projectManage/taskList/taskViewDetails.vue

@@ -265,7 +265,7 @@
                   @click="bug_list(item.code)"
                 ><span :style="{color: item.msg === '全部'? colorSty :''}">{{ item.msg }}</span></span>
               </div>
-              <el-table size="mini" :data="bugBaseInfoDOList" min-height="200" style="width: 100%; font-size: 14px; color:rgba(102,102,102,1);" show-overflow-tooltip="true" :default-sort="{prop: 'priorityCode'}" :header-cell-style="{ color: '#4A4A4A', fontSize: '14px', fontWeight: '500' }">
+              <el-table size="mini" :data="bugBaseInfoDOList" min-height="200" style="width: 100%; font-size: 14px; color:rgba(102,102,102,1);" show-overflow-tooltip="true" :default-sort="{prop: 'priorityCode'}" :header-cell-style="{ color: '#4A4A4A', fontSize: '14px', fontWeight: '500',borderTop: '0.5px solid #EEF0F5'}">
                 <el-table-column label="优先级" prop="priorityCode" sortable align="center">
                   <template slot-scope="scope">
                     <div class="div_priority" :style="{background: priorityColors[scope.row.priorityCode]}">{{ scope.row.priorityLevel | oneA }}</div>

+ 47 - 12
src/views/projectManage/version/list/index.vue

@@ -18,7 +18,7 @@
               clearable
               filterable
               placeholder="请选择"
-              @change="getVersionHomePageList()"
+              @change="onChangeClientType(searchForm.clientType);getVersionHomePageList()"
             >
               <el-option
                 v-for="item in searchInfo.clients"
@@ -35,7 +35,7 @@
               clearable
               filterable
               placeholder="请选择"
-              @change="getVersionHomePageList()"
+              @change="onChangeVersionType(searchForm.versionType);getVersionHomePageList()"
             >
               <el-option
                 v-for="item in searchInfo.versions"
@@ -130,7 +130,9 @@
 
 <script>
 import TimeLine from './timeLine'
+import { getEvent } from '@/api/versionsCalendar'
 import { getVersionHomePageList, showAppClientEnum, showVersionEnum } from '@/api/version.js'
+
 import VersionChart from '@/components/chart/index.vue'
 
 export default {
@@ -140,14 +142,7 @@ export default {
   },
   data() {
     return {
-      timeLineSteps: [
-        { dateLabel: 'January 2017', title: 'Gathering Information' },
-        { dateLabel: 'February 2017', title: 'Planning' },
-        { dateLabel: 'March 2017', title: 'Design' },
-        { dateLabel: 'April 2017', title: 'Content Writing and Assembly' },
-        { dateLabel: 'May 2017', title: 'Coding' },
-        { dateLabel: 'June 2017', title: 'Testing, Review & Launch' },
-        { dateLabel: 'July 2017', title: 'Maintenance' }],
+      timeLineSteps: [],
       timeLineShow: false,
       priorityColors: ['#F56C6C', '#FF8952', '#F5E300', '#7ED321', '#61D3B8', '#69B3FF', '#BDBDBD'],
       tableData: [],
@@ -349,18 +344,33 @@ export default {
       this.loading = true
       getVersionHomePageList(this.searchForm)
         .then(res => {
+          this.getEvent(this.searchForm.versionType)
           if (res.code === 200) {
             this.createTaskOption(res.data.list)
             this.createTaskHealthOption(res.data.list)
             this.tableData = res.data.list
             this.total = res.data.total
           } else {
-            this.tableData = null
-            this.$message.warning(res.msg)
+            this.tableData = []
           }
           this.loading = false
         })
     },
+    // 获取版本事件
+    getEvent(id) {
+      getEvent(id).then(res => {
+        this.timeLineSteps = []
+        if (res.data) {
+          for (const i in res.data) {
+            const item = {
+              dateLabel: res.data[i].endTime,
+              title: res.data[i].name
+            }
+            this.timeLineSteps.push(item)
+          }
+        }
+      })
+    },
     createTaskOption(data) {
       this.taskOptionList = []
       for (const i in data) {
@@ -419,6 +429,31 @@ export default {
           }
         })
     },
+    onChangeClientType(clientType) {
+      for (const i in this.searchInfo.clients) {
+        if (this.searchInfo.clients[i].code === clientType) {
+          this.searchTitle.client = this.searchInfo.clients[i].msg
+          if (this.searchInfo.clients[i].childEnumInfos && this.searchInfo.clients[i].childEnumInfos.length > 0) {
+            this.searchInfo.versions = this.searchInfo.clients[i].childEnumInfos
+            this.searchForm.versionType = this.searchInfo.versions[0].code
+            this.searchTitle.version = this.searchInfo.versions[0].msg
+          } else {
+            this.searchInfo.versions = []
+            this.searchForm.versionType = ''
+            this.searchTitle.version = ''
+          }
+        }
+      }
+    },
+    onChangeVersionType(versionType) {
+      for (const i in this.searchInfo.versions) {
+        if (this.searchInfo.versions[i].code === versionType) {
+          this.searchTitle.version = this.searchInfo.versions[i].msg
+          return
+        }
+      }
+      this.searchTitle.version = ''
+    },
     showVersionEnum() {
       showVersionEnum()
         .then(res => {

+ 8 - 14
src/views/projectManage/version/list/timeLine.vue

@@ -14,12 +14,8 @@
       <!-- 左右箭头 -->
     </swiper>
     <div class="swiper-button">
-      <div class="swiper-button-prev">
-        <img style="width:100%;height:100%" :src="preImg">
-      </div>
-      <div class="swiper-button-next">
-        <img style="width:100%;height:100%" :src="nextImg">
-      </div>
+      <div class="swiper-button-prev" />
+      <div class="swiper-button-next" />
     </div>
   </div>
 </template>
@@ -27,10 +23,10 @@
 <script>
 import preImg from '@/icons/png/previous.png'
 import nextImg from '@/icons/png/next.png'
-import 'swiper/dist/css/swiper.css'
+// import 'swiper/dist/css/swiper.css'
 // import Swiper from 'swiper'
 import { Swiper, SwiperSlide, directive } from 'vue-awesome-swiper'
-// import 'swiper/css/swiper.css'
+import 'swiper/css/swiper.css'
 
 export default {
   components: {
@@ -79,8 +75,6 @@ export default {
     swiper() {
       return this.$refs.mySwiper.$swiper
     }
-  },
-  mounted() {
   }
 }
 </script>
@@ -149,14 +143,14 @@ export default {
   position: relative;
   top: -108px;
 }
-.swiper-button-prev,
-.swiper-button-next {
-  background-image: none !important;
-}
 </style>
 
 <style>
 .swiper-container .swiper-pagination-bullet-active {
   background-color: #409eff;
 }
+.swiper-container .swiper-button-prev,
+.swiper-container .swiper-button-next {
+  color: #409eff;
+}
 </style>

+ 2 - 2
src/views/workbench/person/index.vue

@@ -75,7 +75,7 @@
       class="workbench_fullscreen_dialog"
       :visible.sync="teamInfoDialogVisible"
       :fullscreen="true"
-      style="margin-top: 80px;"
+      style="margin-top: 60px;"
       :modal="false"
     >
       <template v-slot:title>
@@ -120,7 +120,7 @@
       class="workbench_fullscreen_dialog"
       :visible.sync="calendarDialogVisible"
       :fullscreen="true"
-      style="margin-top: 80px;"
+      style="margin-top: 60px;"
       :modal="false"
     >
       <el-tabs v-model="tabsActiveName" @tab-click="handleTabsClick">

+ 19 - 10
src/views/workbench/team/index.vue

@@ -61,7 +61,7 @@
             />
           </div>
         </el-col>
-        <el-col v-if="radio1 === '空闲'" :span="12" style="text-align: right">
+        <el-col :span="12" style="text-align: right">
           <div style="display: inline-block" @click="radio2 = ''">
             <el-radio-group v-model="radio2" size="small" @change="radioChange">
               <el-radio-button label="今天" />
@@ -261,21 +261,28 @@ export default {
     radioChange(val) {
       if (val === '忙碌') {
         this.queryTeamWorkList()
-      } else {
+          .then(res => {
+            this.changeDateLength('日')
+            this.changeDateLength(this.radio3)
+          })
+      } else if (val === '空闲') {
         this.queryTeamIdleList()
+          .then(res => {
+            this.changeDateLength('日')
+            this.changeDateLength(this.radio3)
+          })
       }
       if (val === '今天') {
-        // if (this.radio2TF) {
-        //   this.radio2 = ''
-        // }
         this.$refs.ganttHeader.recenterPosition()
-        // this.radio2TF = !this.radio2TF
       }
+      this.changeDateLength(val)
+    },
+    changeDateLength(val) {
       if (val === '月') {
-        this.$refs.ganttHeader.scale = 24
+        this.$refs.ganttHeader.scale = 21
       }
       if (val === '周') {
-        this.$refs.ganttHeader.scale = 20
+        this.$refs.ganttHeader.scale = 19
       }
       if (val === '日') {
         this.$refs.ganttHeader.scale = 17
@@ -305,23 +312,25 @@ export default {
       })
     },
     queryTeamWorkList() {
-      workbenchApi.queryTeamWorkList(this.searchForm)
+      return workbenchApi.queryTeamWorkList(this.searchForm)
         .then(res => {
           if (res.data) {
             this.createTasks(res, '忙碌')
           }
+          return res
         })
     },
     queryTeamIdleList() {
       this.idleSearchForm.startTime = dayjs(this.timeSelectVal[0]).format('YYYY.MM.DD')
       this.idleSearchForm.endTime = dayjs(this.timeSelectVal[1]).format('YYYY.MM.DD')
-      workbenchApi.queryTeamIdleList({
+      return workbenchApi.queryTeamIdleList({
         timeInfo: this.idleSearchForm,
         teamWorkQueryInfo: this.searchForm
       }).then(res => {
         if (res.data) {
           this.createTasks(res, '空闲')
         }
+        return res
       })
     },
     createTasks(res, mode) {