Parcourir la source

团队select or input

panxiandiao_i il y a 5 ans
Parent
commit
60224308fe

+ 4 - 12
src/views/Platform/bugManage/bugQuery.vue

@@ -210,18 +210,6 @@ export default {
     this._initBegin()
     // this.getLocalStor()
   },
-  mounted() {
-    // console.log(document.getElementsByClassName('add-border')[0].style.cssText)
-    setTimeout(() => {
-      console.log(document.getElementById('specialP').childNodes[1])
-    }, 1000)
-    // this.$nextTick(() => {
-    // console.log(document.getElementById('specialP').childNodes.length)
-    // console.log(document.getElementById('specialP').childNodes[1])
-    // document.getElementById('specialP').childNodes[0].style.cssText = 'margin-top:0'
-    // document.getElementById('specialPAnother').childNodes[0].style.cssText = 'margin-top:0'
-    // })
-  },
   methods: {
     // getLocalStor() {
     //   var str = localStorage.getItem('updata')
@@ -242,6 +230,10 @@ export default {
       })
       bugGet(this.$route.query.id).then(res => {
         this.form = res.data
+        this.$nextTick(() => {
+          document.getElementById('specialP').childNodes[0].style.cssText = 'margin-top:0'
+          document.getElementById('specialPAnother').childNodes[0].style.cssText = 'margin-top:0'
+        })
         if (res.data.accessory === '') {
           var str = res.data.accessory
           if (str !== '') {

+ 18 - 7
src/views/Platform/bugManage/bugUpdate.vue

@@ -250,6 +250,7 @@ export default {
       taskIdStr: '',
       platformTypeStr: [],
       bugTypeStr: [],
+      platFormAppStr: [],
       discoveryMethodStr: [],
       reasonStr: [],
       bugStatusStr: [],
@@ -333,7 +334,7 @@ export default {
           this.errorFun(res.msg)
         }
       })
-      bugGet(this.$route.query.id).then(res => {
+      await bugGet(this.$route.query.id).then(res => {
         this.form = res.data
         this.form.bugDescribe = res.data.bugDescribe
         const editorDescribe = new E('#wangeditorDescribe')
@@ -374,11 +375,12 @@ export default {
         if (this.form.currentHandler) {
           this.form.currentHandler = this.form.currentHandler.split(',')
         }
-        this.appGet()
-        if (!this.platFormApp) {
-          this.form.appVersionList = this.form.appVersion.split(',')
-        }
       })
+      await this.appGet()
+      if (!this.platFormApp) {
+        // console.log(this.form.appVersion)
+        this.form.appVersionList = this.form.appVersion.split(',')
+      }
     },
     // 获取任务数据
     taskIdGet() {
@@ -399,11 +401,19 @@ export default {
       this.$set(this.form, 'assigner', [])
       this.getMember() // 保证bizId存在
     },
+    // 接口不接受空值处理
+    emptyJudge(obj) {
+      for (const key in obj) {
+        if (obj[key] === '' || obj[key].length === 0) {
+          delete obj[key]
+        }
+      }
+    },
     // 版本号获取
     appGet() {
       const sendData = { name: 'appVersion', bizId: this.form.bizId, plateId: this.form.platformType, clientId: this.form.clientType }
       this.emptyJudge(sendData)
-      appDataGet(sendData).then(res => {
+      return appDataGet(sendData).then(res => {
         // console.log(res.data[0].content.substring(2, res.data[0].content.length - 2).split(','))
         if (res.data === null) {
           this.platFormApp = true
@@ -412,7 +422,8 @@ export default {
         const newRxp = res.data[0].content.replace(/\"|\{|\}/g, '').split(',').map(eachData => ({
           name: eachData
         }))
-        this.form.appVersionList = []
+        // this.form.appVersionList = []
+        this.$set(this.form, 'appVersionList', [])
         this.platFormAppStr = newRxp
         this.platFormApp = false
       })