Selaa lähdekoodia

修改length报错

qinzhipeng_v 5 vuotta sitten
vanhempi
sitoutus
f5f113e400

+ 1 - 1
src/views/projectManage/projectList/projectViewDetails.vue

@@ -6,7 +6,7 @@
         style="margin: 1%;height: 60px;display: flex; justify-content: space-between; align-items: center;"
       >
         <span style="display: flex; justify-content: space-between; align-items: center;">
-          <el-tooltip :disabled="form_query.name.length > 20 ? false : true" effect="dark" :content="form_query.name" placement="bottom">
+          <el-tooltip :disabled="form_query.name && form_query.name.length > 20 ? false : true" effect="dark" :content="form_query.name" placement="bottom">
             <div style="float: left; font-size:20px;font-family: MicrosoftYaHei;color: rgb(51, 59, 74);margin-right:8%;white-space: nowrap; ">项目 : {{ form_query.name | ellipsis }}</div>
           </el-tooltip>
           <el-dropdown placement="bottom" @command="handleCommand">

+ 1 - 1
src/views/projectManage/requirement/details/index.vue

@@ -2,7 +2,7 @@
   <el-container style="background-color: #F2F3F6;">
     <el-header style="margin: 1%;" class="layout_header">
       <div>
-        <el-tooltip :disabled="requirement.name.length > 19 ? false : true" effect="dark" :content="requirement.name" placement="bottom">
+        <el-tooltip :disabled="requirement.name && requirement.name.length > 19 ? false : true" effect="dark" :content="requirement.name" placement="bottom">
           <span style="font-size:20px;font-family:MicrosoftYaHei;color:rgba(51,51,51,1);">{{ '需求:' + requirement.name | ellipsis }}</span>
         </el-tooltip>
         <el-dropdown

+ 37 - 33
src/views/projectManage/taskList/taskViewDetails.vue

@@ -13,7 +13,7 @@
               <br>
               {{ task_form.lateMsg }}
             </span>
-            <el-tooltip :disabled="task_form.name.length > 20 ? false : true" class="item" effect="dark" :content="task_form.name" placement="bottom">
+            <el-tooltip :disabled="task_form.name && task_form.name.length < 19 ? true : false" class="item" effect="dark" :content="task_form.name" placement="bottom">
               <span style="font-size:20px;font-family:MicrosoftYaHei;color:rgba(51,51,51,1);">任务 : {{ task_form.name | ellipsis }}</span>
             </el-tooltip>
             <el-dropdown trigger="click" placement="bottom" @command="handleCommand">
@@ -623,39 +623,43 @@ export default {
         this.bugStatus.unshift({ code: -1, msg: '全部' })
       })
       taskGet(this.taskId[1]).then(res => {
-        if (res.data.bizId !== Number(localStorage.getItem('bizId'))) {
-          Utils.$emit('demo', res.data.bizId)
-        }
-        this.pauseName = res.data.involveAppString === null ? '' : res.data.involveAppString
-        this.task_form = res.data
-        this.total = res.total
-        this.tiem_date.startTime = res.data.scheduleListResponse.startTime // 开始时间
-        this.tiem_date.endTime = res.data.scheduleListResponse.endTime // 结束时间
-        this.arr_event = res.data.scheduleListResponse.schedulDetailResponseList
-        this.table_loading = false
-        this.bug_list(-1)
-        this.task_form.bugBaseInfoDOList !== null ? (this.bugBaseInfoDOList = res.date.bugBaseInfoDOList) : (this.bugBaseInfoDOList = []) // bug
-        const param = {
-          appType: Number(res.data.involveApp),
-          startTime: res.data.scheduleListResponse.startTime,
-          endTime: res.data.scheduleListResponse.endTime
-        }
-        this.ganttData = this.tableDeal(
-          res.data.scheduleListResponse.schedulDetailResponseList
-        )
-        releaseScheduleList(param).then(res => {
-          if (res.code === 200) {
-            this.appVersion = this.versionDeal(res.data)
+        if (res.code === 200) {
+          if (res.data.bizId !== Number(localStorage.getItem('bizId'))) {
+            Utils.$emit('demo', res.data.bizId)
           }
-        })
-        if (this.task_form.stageString === '未知') {
-          this.bgStyle = '#f4f4f5'
-          this.colorStyle = '#909399'
-          this.isHeadShow = true
+          this.pauseName = res.data.involveAppString === null ? '' : res.data.involveAppString
+          this.task_form = res.data
+          this.total = res.total
+          this.tiem_date.startTime = res.data.scheduleListResponse.startTime // 开始时间
+          this.tiem_date.endTime = res.data.scheduleListResponse.endTime // 结束时间
+          this.arr_event = res.data.scheduleListResponse.schedulDetailResponseList
+          this.table_loading = false
+          this.bug_list(-1)
+          this.task_form.bugBaseInfoDOList !== null ? (this.bugBaseInfoDOList = res.date.bugBaseInfoDOList) : (this.bugBaseInfoDOList = []) // bug
+          const param = {
+            appType: Number(res.data.involveApp),
+            startTime: res.data.scheduleListResponse.startTime,
+            endTime: res.data.scheduleListResponse.endTime
+          }
+          this.ganttData = this.tableDeal(
+            res.data.scheduleListResponse.schedulDetailResponseList
+          )
+          releaseScheduleList(param).then(res => {
+            if (res.code === 200) {
+              this.appVersion = this.versionDeal(res.data)
+            }
+          })
+          if (this.task_form.stageString === '未知') {
+            this.bgStyle = '#f4f4f5'
+            this.colorStyle = '#909399'
+            this.isHeadShow = true
+          }
+          this.task_form.stageString === '正常' ? this.bgStyle = '#69B3FF' : ''
+          this.task_form.stageString === '延期' ? this.bgStyle = '#FF8952' : ''
+          this.task_form.stageString === '已延期' ? this.bgStyle = '#F56C6C' : ''
+        } else {
+          this.$message({ message: res.msg, type: 'error', offset: 150 })
         }
-        this.task_form.stageString === '正常' ? this.bgStyle = '#69B3FF' : ''
-        this.task_form.stageString === '延期' ? this.bgStyle = '#FF8952' : ''
-        this.task_form.stageString === '已延期' ? this.bgStyle = '#F56C6C' : ''
       })
       commentList({ type: 3, joinId: this.taskId[1] }).then(res => {
         this.commentTxt = res.data
@@ -1066,7 +1070,7 @@ export default {
       switch (e) {
         case 1: // 提测
           if (this.task_form.statusString !== '开发中') {
-            this.$message({ message: '存在状态不是【开发中】的任务,请将任务状态为【开发中】才可测,请检查!', type: 'warning' })
+            this.$message({ message: '存在状态不是【开发中】的任务,请将任务状态为【开发中】才可测,请检查!', type: 'warning' })
           } else {
             this.dialogVisible1 = true
             this.$nextTick(() => { this.$refs.TestReport.init(1, ele) })