Explorar el Código

Merge branch 'http_test' into insist

qinzhipeng_v@didiglobal.com hace 4 años
padre
commit
09ee7e4f8e

+ 8 - 1
src/App.vue

@@ -37,7 +37,14 @@ export default {
   methods: {
     initOmegaTracker() {
       try {
-        OmegaTracker.getTracker(config)
+        // console.log('OmegaTracker.getTracker', config)
+        window.Omega = OmegaTracker.getTracker(config)
+        // window.Omega.trackEvent('注册的埋点id', {
+        //   'bizId': 99,
+        //   'user': 'amyliaozijun',
+        //   'master_func': '项目',
+        //   'detail_func': '行为'
+        // })
       } catch (error) {
         console.error(error)
       }

+ 2 - 2
src/components/chart/statusStayChart.vue

@@ -38,7 +38,7 @@ export default {
   methods: {
     setChart() {
       if (!this.chartData) return
-      const newArr = this.chartData.yaxis.filter(item => { return item.name !== '全部' })
+      const newArr = this.chartData.yaxis.filter(item => { return item && (item.name !== '全部') })
       const colorArr = ['#409EFF', '#F8CE5C', '#F2904F', '#5EE2BE', '#D873F5', '#7479F5']
       let series = null
       if (this.chartData.type === '0') {
@@ -72,7 +72,7 @@ export default {
             return backString + `<span style="color: #F04864">总和</span>:${total}个`
           }
         },
-        legend: { data: newArr.map(item => { return item.name }), left: 0, top: 0 },
+        legend: { data: newArr.map(item => { return item && (item.name !== '全部') }), left: 0, top: 0 },
         grid: { left: '0', right: '0', top: '8%', bottom: '0', containLabel: true },
         xAxis: { type: 'category', data: this.chartData.xaxis, axisTick: { alignWithLabel: true }, axisLabel: { interval: 0, rotate: 40 }},
         yAxis: { type: 'value', axisLine: { show: false }, splitLine: { lineStyle: { type: 'dashed' }}, axisLabel: { formatter: '{value}个' }},

+ 1 - 1
src/utils/global.js

@@ -48,6 +48,6 @@ export function formatHMS(data) {
   var hours = parseInt((data % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60))
   var minutes = parseInt((data % (1000 * 60 * 60)) / (1000 * 60))
   var seconds = parseInt((data % (1000 * 60)) / 1000)
-  time = (hours < 10 ? ('0' + hours) : hours) + ':' + (minutes < 10 ? ('0' + minutes) : minutes) + ':' + (seconds < 10 ? ('0' + seconds) : seconds)
+  time = (hours < 10 ? ('0' + hours) : hours) + '小时' + (minutes < 10 ? ('0' + minutes) : minutes) + '分' + (seconds < 10 ? ('0' + seconds) : seconds) + '秒'
   return time
 }

+ 2 - 2
src/views/projectManage/schedule.vue

@@ -1,10 +1,10 @@
 <template>
-  <el-dialog :title="isSchedule===0?'排期锁定': '排期解锁'" class="task" :visible.sync="dialogVisible" width="30%" :before-close="handleClose">
+  <el-dialog :title="isSchedule===0?'排期锁定': '排期解锁'" class="task" :visible.sync="dialogVisible" width="500px" :before-close="handleClose">
     <div class="blueStripe" />
     <div v-if="isSchedule === 0" align="center">是否需要锁定当前{{ name === '需求'? '需求': "任务" }}的排期?</div>
     <div v-if="isSchedule === 1" align="center">
       <el-form ref="numberValidateForm" :model="numberValidateForm" label-width="100px" class="demo-ruleForm">
-        <p class="tip"><i class="el-icon-warning icon" />解锁后,排期将在24小时后自动锁定,请及时完成排期调整</p>
+        <p v-if="name === '任务'" class="tip"><i class="el-icon-warning icon" />解锁后,排期将在24小时后自动锁定,请及时完成排期调整</p>
         <el-form-item label="解锁原因" :rules="[{ required: true, message: '解锁原因不能为空'}]">
           <el-select v-model="numberValidateForm.remarkType" style="width:100%;" placeholder="请选择">
             <el-option v-for="(item,index) in scheduleOperateReason" :key="index" :label="item.msg" :value="item.code" />

+ 5 - 2
src/views/projectManage/taskList/taskViewDetail.vue

@@ -190,8 +190,8 @@
                     {{ isScheduleLocked === 1 ? '已锁定' : '未锁定' }}
                   </span>
                 </el-tooltip>
-                <span v-if="isScheduleLocked === 0" class="tip">
-                  <i class="el-icon-timer icon" />剩余{{ autoLockScheduleCountdown }}
+                <span v-if="isShowLockedTime" class="tip">
+                  <i class="el-icon-timer icon" />剩余{{ autoLockScheduleCountdown }}将自动锁定
                 </span>
               </div>
             </div>
@@ -463,6 +463,7 @@ export default {
     return {
       autoLockScheduleCountdown: '--', // 解锁剩余时间
       timer: null, // 定时器
+      isShowLockedTime: false, // 是否显示解锁倒计时
       tabPosition: 'first',
       textarea2: '',
       HoldTask: '',
@@ -558,7 +559,9 @@ export default {
       this.SchedulingContent = res.data
       const res1 = await listByTask(this.taskId)
       this.isScheduleLocked = res1.data.isScheduleLocked
+      this.isShowLockedTime = false
       if (res1.data.isScheduleLocked !== 1 && res1.data.autoLockScheduleCountdown > 0) {
+        this.isShowLockedTime = true
         let totolTime = res1.data.autoLockScheduleCountdown || 6000
         clearInterval(this.timer)
         this.timer = setInterval(() => {

+ 32 - 31
src/views/quality/components/requireDrawer.vue

@@ -1,41 +1,42 @@
 <template>
   <el-drawer :title="Statistics.label" :visible.sync="drawer_" :direction="direction" :modal="false" size="100%" :before-close="handleClose">
     <div class="_font">{{ Statistics.total }}</div>
-    <el-table :data="tableData" style="width: 100%" class="integration-num">
-      <el-table-column label="优先级" min-width="180">
-        <template slot-scope="scope">
-          <div class="div_priority" :style="{background: priorityColors[scope.row.priority % priorityColors.length]}">{{ 'P'+scope.row.priority }}</div>
-        </template>
-      </el-table-column>
-      <el-table-column :label="Statistics.typeStr + '名称'" min-width="250">
-        <template slot-scope="scope">
-          <div v-if="Statistics.typeStr === '缺陷'" class="drawer-id">{{ scope.row.bugId }}</div>
-          <div v-if="Statistics.typeStr === '任务'" class="drawer-id">{{ scope.row.taskIdSting }}</div>
-          <div v-if="Statistics.typeStr === '需求'" class="drawer-id">{{ scope.row.requirementDisplayId }}</div>
-          <el-tooltip v-if="Statistics.typeStr === '需求' && scope.row.name.length >= 15 || Statistics.typeStr === '任务' && scope.row.name.length >= 15" class="item" effect="dark" :content="scope.row.name" placement="top">
-            <div class="drawer-name" @click="jumper(scope.row)">{{ scope.row.name | ellipsis }}</div>
-          </el-tooltip>
-          <div v-else class="drawer-name" @click="jumper(scope.row)">{{ scope.row.name | ellipsis }}</div>
-          <el-tooltip v-if="Statistics.typeStr === '缺陷' && scope.row.bugName.length >= 15" class="item" effect="dark" :content="scope.row.bugName" placement="top">
-            <div class="drawer-name" @click="jumper(scope.row)">{{ scope.row.bugName | ellipsis }}</div>
-          </el-tooltip>
-          <div v-else class="drawer-name" @click="jumper(scope.row)">{{ scope.row.bugName | ellipsis }}</div>
-        </template>
-      </el-table-column>
-      <el-table-column label="状态" min-width="180">
-        <template slot-scope="scope">
-          <div v-if="Statistics.typeStr === '需求'">{{ scope.row.statusName }}</div>
-          <div v-if="Statistics.typeStr === '任务'">{{ scope.row.statusString }}</div>
-          <div v-if="Statistics.typeStr === '缺陷'">{{ querySatus(scope.row.status) }}</div>
-        </template>
-      </el-table-column>
-    </el-table>
+    <div style="height: calc(100vh - 200px); overflow: scroll; overflow-x: hidden;">
+      <el-table :data="tableData" style="width: 100%;" class="integration-num">
+        <el-table-column label="优先级" min-width="100">
+          <template slot-scope="scope">
+            <div class="div_priority" :style="{background: priorityColors[scope.row.priority % priorityColors.length]}">{{ 'P'+scope.row.priority }}</div>
+          </template>
+        </el-table-column>
+        <el-table-column :label="Statistics.typeStr + '名称'" min-width="250">
+          <template slot-scope="scope">
+            <div v-if="Statistics.typeStr === '缺陷'" class="drawer-id">{{ scope.row.bugId }}</div>
+            <div v-if="Statistics.typeStr === '任务'" class="drawer-id">{{ scope.row.taskIdSting }}</div>
+            <div v-if="Statistics.typeStr === '需求'" class="drawer-id">{{ scope.row.requirementDisplayId }}</div>
+            <el-tooltip v-if="Statistics.typeStr === '需求' && scope.row.name.length >= 15 || Statistics.typeStr === '任务' && scope.row.name.length >= 15" class="item" effect="dark" :content="scope.row.name" placement="top">
+              <div class="drawer-name" @click="jumper(scope.row)">{{ scope.row.name | ellipsis }}</div>
+            </el-tooltip>
+            <div v-else class="drawer-name" @click="jumper(scope.row)">{{ scope.row.name | ellipsis }}</div>
+            <el-tooltip v-if="Statistics.typeStr === '缺陷' && scope.row.bugName.length >= 15" class="item" effect="dark" :content="scope.row.bugName" placement="top">
+              <div class="drawer-name" @click="jumper(scope.row)">{{ scope.row.bugName | ellipsis }}</div>
+            </el-tooltip>
+            <div v-else class="drawer-name" @click="jumper(scope.row)">{{ scope.row.bugName | ellipsis }}</div>
+          </template>
+        </el-table-column>
+        <el-table-column label="状态" min-width="100">
+          <template slot-scope="scope">
+            <div v-if="Statistics.typeStr === '需求'">{{ scope.row.statusName }}</div>
+            <div v-if="Statistics.typeStr === '任务'">{{ scope.row.statusString }}</div>
+            <div v-if="Statistics.typeStr === '缺陷'">{{ querySatus(scope.row.status) }}</div>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
     <el-pagination
       style="text-align: center;"
       :current-page.sync="currentPage"
-      :page-sizes="[10]"
       :page-size="10"
-      layout="total, sizes, prev, pager, next, jumper"
+      layout="total, prev, pager, next, jumper"
       :total="total"
       @size-change="handleSizeChange"
       @current-change="handleCurrentChange"

+ 6 - 1
src/views/workbench/components/statisticsSection.vue

@@ -27,7 +27,12 @@
           <!-- <h2>未上线{{ title }}状态分布</h2> -->
           <el-radio-group v-model="itemType" @change="onChangeTagRadio">
             <el-radio-button label="0">未上线{{ title }}状态分布</el-radio-button>
-            <el-radio-button label="1">本周{{ title }}状态流入图</el-radio-button>
+            <el-radio-button label="1">
+              本周{{ title }}状态流入图
+              <el-tooltip class="item" effect="dark" :content="'推进状态的时间是在本周的需求数量/推进状态的时间是在本周的任务数量'" placement="top">
+                <i class="el-icon-info" />
+              </el-tooltip>
+            </el-radio-button>
           </el-radio-group>
           <h3 @click="getAll()">总数:<span>{{ totalTask }}</span></h3>
           <div class="chart-contain">

+ 3 - 2
src/views/workbench/mixins/websocket.js

@@ -1,3 +1,4 @@
+const _ = require('lodash')
 import { ws } from '@/apiConfig/requestIP'
 export default {
   name: 'test',
@@ -24,9 +25,9 @@ export default {
     websocketonopen() { // 连接建立之后执行send方法发送数据
 
     },
-    websocketonerror() { // 连接建立失败重连
+    websocketonerror: _.throttle(function() { // 连接建立失败重连
       this.initWebSocket()
-    },
+    }, 5000),
     websocketsend(Data) { // 数据发送
       this.websock.send(Data)
     },