|
@@ -82,11 +82,8 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
formLabelAlign: {},
|
|
|
- caseFolderId: '',
|
|
|
- id: '',
|
|
|
uptata_Key: [],
|
|
|
- uptataKey: [],
|
|
|
- url: ''
|
|
|
+ uptataKey: []
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -95,15 +92,13 @@ export default {
|
|
|
|
|
|
methods: {
|
|
|
initCode() {
|
|
|
- this.url = window.location.href // 获取url中"?"符后的字串
|
|
|
- this.caseFolderId = this.url.split('&caseFolderId=')
|
|
|
- this.id = this.caseFolderId[0].split('?id=')
|
|
|
- queryCase({ id: this.id[1], caseFolderId: this.caseFolderId[1] }).then(res => {
|
|
|
+ const id = this.$route.query.id
|
|
|
+ queryCase({ id: id, caseFolderId: this.$route.query.caseFolderId }).then(res => {
|
|
|
for (var el of res.data.list) {
|
|
|
- el.id === Number(this.id[1]) ? this.formLabelAlign = el : ''
|
|
|
+ el.id === Number(id) ? this.formLabelAlign = el : ''
|
|
|
this.uptata_Key = JSON.parse(this.formLabelAlign.description.split('{}')[0])
|
|
|
- var obj = JSON.parse(this.formLabelAlign.accessory.split('{}')[0])
|
|
|
- for (var a of obj) {
|
|
|
+ const obj = JSON.parse(this.formLabelAlign.accessory.split('{}')[0])
|
|
|
+ for (const a of obj) {
|
|
|
this.uptataKey.push(a)
|
|
|
}
|
|
|
break
|