Browse Source

缺陷创建任务选择样式调整

wangziqian 5 years ago
parent
commit
34f3498eed

+ 35 - 1
src/views/projectManage/bugList/file/createdBug.vue

@@ -16,7 +16,15 @@
               <div style="width:100%; margin: 0 4%;">
                 <el-form-item label="所属任务" prop="taskId">
                   <el-select v-model="formInline.taskId" filterable placeholder="请选择" style="width:100%;" @click.native="bugListSelect">
-                    <el-option v-for="item in taskEnumList" :key="item.id" :label="item.name" :value="item.id" />
+                    <el-option v-for="item in taskEnumList" :key="item.id" :label="item.name" :value="item.id">
+                      <div class="belong-task">
+                        <div class="modules-name">
+                          <span v-if="item.moduleInfoName" class="modules">{{ item.moduleInfoName | limit(15) }}</span>
+                          <span class="name">{{ item.name }}</span>
+                        </div>
+                        <div class="task-id">{{ item.taskId }}</div>
+                      </div>
+                    </el-option>
                   </el-select>
                 </el-form-item>
                 <el-form-item label="优先级" prop="priorityLevel" style="white-space: nowrap;">
@@ -246,6 +254,15 @@ export default {
   components: {
     normalDialog
   },
+  filters: {
+    limit(e, limit) {
+      if (e.length > limit) {
+        return e.substring(0, limit) + '...'
+      } else {
+        return e
+      }
+    }
+  },
   props: {
     getBugList: {
       type: Function,
@@ -683,4 +700,21 @@ export default {
     margin-right: 5px;
   }
 }
+.belong-task {
+  max-width: 500px;
+  display: flex;
+  justify-content: space-between;
+  .modules-name {
+    width: 80%;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+  }
+  .modules,.task-id{
+    color: #999999;
+  }
+  .name {
+    color: #333333;
+  }
+}
 </style>

+ 1 - 1
src/views/quality/components/tendencyChart.vue

@@ -44,7 +44,7 @@ export default {
         color: ['#3AA1FF'],
         tooltip: { trigger: 'axis', axisPointer: { type: 'line' }}, // 默认为直线,可选为:'line' | 'shadow'
         grid: { left: '0', right: '0', top: '5%', bottom: '0', containLabel: true },
-        xAxis: [{ type: 'category', data: this.chartData.xaxis, axisLabel: { interval: 0, rotate: 0 }, axisTick: { alignWithLabel: true }}],
+        xAxis: [{ type: 'category', data: this.chartData.xaxis, axisLabel: { interval: 0, rotate: 15 }, axisTick: { alignWithLabel: true }}],
         yAxis: [{ type: 'value', axisLine: { show: false }, splitLine: { lineStyle: { type: 'dashed' }}}],
         series: [
           {