fix:修复编辑用例js报错

This commit is contained in:
wenyann 2021-03-26 13:14:43 +08:00
parent e903441002
commit deaf05dd5f
2 changed files with 6 additions and 6 deletions

View File

@ -1,2 +0,0 @@
-- api_scenario_report modify column length
ALTER TABLE api_scenario_report MODIFY COLUMN name VARCHAR(300);

View File

@ -631,8 +631,11 @@ export default {
})
},
async setFormData(testCase) {
//testCase.tags = JSON.parse(testCase.tags);
testCase.selected = JSON.parse(testCase.testId);
try {
testCase.selected = JSON.parse(testCase.testId);
} catch (error) {
testCase.selected = testCase.testId
}
let tmp = {};
Object.assign(tmp, testCase);
tmp.steps = JSON.parse(testCase.steps);
@ -643,9 +646,8 @@ export default {
Object.assign(this.form, tmp);
this.form.module = testCase.nodeId;
this.getFileMetaData(testCase);
/* testCase.selected = JSON.parse(testCase.testId);
this.form.selected= testCase.selected*/
await this.loadOptions(this.sysList)
},
setTestCaseExtInfo(testCase) {
this.testCase = {};