|
@@ -147,7 +147,7 @@ export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
data: [{ description: '', expectedResult: '', remark: '', accessory: '' }],
|
|
data: [{ description: '', expectedResult: '', remark: '', accessory: '' }],
|
|
- userNames: localStorage.getItem('realname'),
|
|
|
|
|
|
+ userNames: localStorage.getItem('username'),
|
|
bizJson: localStorage.getItem('key'),
|
|
bizJson: localStorage.getItem('key'),
|
|
startId: '',
|
|
startId: '',
|
|
caseFolderId: '',
|
|
caseFolderId: '',
|
|
@@ -198,11 +198,13 @@ export default {
|
|
if (this.$route.query.id) { // 编辑
|
|
if (this.$route.query.id) { // 编辑
|
|
this.titleName = '编辑'
|
|
this.titleName = '编辑'
|
|
this.form_Query = true
|
|
this.form_Query = true
|
|
- this.startId = this.$route.query.id
|
|
|
|
this.plus = false
|
|
this.plus = false
|
|
- queryCasesData({ caseFolderId: this.startId }).then(res => {
|
|
|
|
|
|
+ this.url = window.location.href // 获取url中"?"符后的字串
|
|
|
|
+ this.id = this.url.split('?id=')
|
|
|
|
+ this.startId = this.id[1]
|
|
|
|
+ queryCasesData({ caseFolderId: this.id[1] }).then(res => {
|
|
for (var el of res.data.list) {
|
|
for (var el of res.data.list) {
|
|
- el.caseFolderId === this.startId ? this.caseData = el : ''
|
|
|
|
|
|
+ el.caseFolderId === Number(this.id[1]) ? this.caseData = el : ''
|
|
if (this.caseData.accessory !== '') {
|
|
if (this.caseData.accessory !== '') {
|
|
var obj = JSON.parse(this.caseData.accessory.split('{}')[0])
|
|
var obj = JSON.parse(this.caseData.accessory.split('{}')[0])
|
|
for (var a of obj) {
|
|
for (var a of obj) {
|