Преглед на файлове

列表选择列表无数据,不请求

prince преди 5 години
родител
ревизия
a9404073ca
променени са 2 файла, в които са добавени 9 реда и са изтрити 3 реда
  1. 6 3
      src/views/projectManage/taskList/versionsCalendar.vue
  2. 3 0
      src/views/projectManage/version/list/index.vue

+ 6 - 3
src/views/projectManage/taskList/versionsCalendar.vue

@@ -21,7 +21,7 @@
                 v-for="item in typeOpt"
                 :key="item.code"
                 :label="item.msg"
-                :value="item"
+                :value="item.msg"
               />
             </el-select>
           </el-col>
@@ -297,8 +297,11 @@ export default {
   },
   methods: {
     celectClientType(e) {
-      this.isCommand = e.code
-      this.clientType = e.msg
+      const newData = this.typeOpt.filter(item => {
+        return item.msg === e
+      })
+      this.isCommand = newData[0].code
+      this.clientType = newData[0].msg
       this.getVersionList()
       this.getVersionBytpye(this.isCommand === '' ? this.typeOpt[0].code : this.isCommand)
       this.versionOpt = this.versionOpt[0].version

+ 3 - 0
src/views/projectManage/version/list/index.vue

@@ -359,6 +359,9 @@ export default {
     },
     // 获取版本事件
     getEvent(id) {
+      if (!id) {
+        return false
+      }
       getEvent(id).then(res => {
         this.timeLineSteps = []
         if (res.data) {