Explorar o código

修复老用例caseFolderId

qinzhipeng_v@didiglobal.com %!s(int64=4) %!d(string=hai) anos
pai
achega
2c297962d8
Modificáronse 1 ficheiros con 2 adicións e 6 borrados
  1. 2 6
      src/views/Platform/useCase/createUse.vue

+ 2 - 6
src/views/Platform/useCase/createUse.vue

@@ -95,7 +95,6 @@ export default {
       caseData: {},
       dis: false,
       btn_show: false,
-      id: '',
       arr: [],
       uptataKey: [],
       title_Name: '',
@@ -119,12 +118,9 @@ export default {
       }
       if (this.$route.query.id) {
         this.title_Name = '编辑'
-        this.url = window.location.href // 获取url中"?"符后的字串
-        this.caseFolderId = this.url.split('&caseFolderId=')
-        this.id = this.caseFolderId[0].split('?id=')
-        queryCasesData({ caseFolderId: this.caseFolderId[1] }).then(res => {
+        queryCasesData({ caseFolderId: this.$route.query.caseFolderId }).then(res => {
           for (var el of res.data.list) {
-            if (el.id === Number(this.id[1])) {
+            if (el.id === Number(this.$route.query.id)) {
               this.caseData = el
               if (this.caseData.description !== '') {
                 var obj_description = JSON.parse(this.caseData.description.split('{}'))