diff --git a/src/views/pages/autoexec/detail/logcomponents/node-log.vue b/src/views/pages/autoexec/detail/logcomponents/node-log.vue
index efd34d277b76d394003dfb01b44cad591f509962..166047de0fa1033d4e0b88c0b5ed8ff0d8d8ae94 100644
--- a/src/views/pages/autoexec/detail/logcomponents/node-log.vue
+++ b/src/views/pages/autoexec/detail/logcomponents/node-log.vue
@@ -15,7 +15,7 @@
v-for="(log, index) in logContentList"
:id="'content' + index"
:key="index"
- :class="log.anchor && log.anchor.replace(/[-\.\/]+?/gi, '_')"
+ :class="log.anchor && ('content_'+ log.anchor).replace(/[-\.\/]+?/gi, '_')"
class="content-grid"
>
{{ log.time }}
@@ -301,7 +301,7 @@ export default {
locationId: {
handler: function(val) {
if (val) {
- this.$utils.jumpTo('.' + val, 'smooth', this.$refs['codeContent'], 'start');
+ this.$utils.jumpTo('.content_' + val, 'smooth', this.$refs['codeContent'], 'start');
}
}
}
diff --git a/src/views/pages/autoexec/detail/script-detail.vue b/src/views/pages/autoexec/detail/script-detail.vue
index 6540b885fbc2e69a092dcf979668e5ab199c010b..abcaff2708b3f2cde8dedf79589168a9ffec1d2f 100644
--- a/src/views/pages/autoexec/detail/script-detail.vue
+++ b/src/views/pages/autoexec/detail/script-detail.vue
@@ -332,7 +332,7 @@ export default {
return false;
}
let data = this.saveData();
- if (this.$utils.isSame(this.initData, data)) {
+ if (this.$utils.isSame(this.initData, data) || this.versionStatus === 'passed') {
this.$router.push({
path: '/test-detail',
query: {
diff --git a/src/views/pages/autoexec/detail/test-detail.vue b/src/views/pages/autoexec/detail/test-detail.vue
index fd8cc10676b47bcc199bdcf58f6650e5d4209905..f65bd4b2b8fe4dea733baa8387735b8b7078be22 100644
--- a/src/views/pages/autoexec/detail/test-detail.vue
+++ b/src/views/pages/autoexec/detail/test-detail.vue
@@ -155,7 +155,8 @@ export default {
runnerGroup: {
mappingMode: 'constant',
value: '-1'
- }
+ },
+ scriptId: null
};
},
beforeCreate() {},
@@ -164,6 +165,9 @@ export default {
if (this.$route.query.id) {
this.id = parseInt(this.$route.query.id);
}
+ if (this.$route.query.scriptId) {
+ this.scriptId = parseInt(this.$route.query.scriptId);
+ }
if (this.$route.query.type) {
this.type = this.$route.query.type;
}
@@ -194,24 +198,37 @@ export default {
},
getData() {
//根据id获取详情
- if (!this.id) {
+ if (!this.id && !this.scriptId) {
return;
}
- let param = { id: this.id, type: this.type};
+ let param = { type: this.type };
+ if (this.id) {
+ param.id = this.id;
+ } else if (this.scriptId) {
+ param.scriptId = this.scriptId;
+ }
this.$api.autoexec.script.getTestDetail(param).then(res => {
if (res.Status == 'OK' && res.Return) {
this.dataConfig = res.Return;
if (!this.jobId) {
this.nameForm.itemList.name.value = this.dataConfig.name;
}
+ if (!this.id) {
+ this.id = this.dataConfig.id;
+ }
}
});
},
getArgument() {
- if (!this.id) {
+ if (!this.id && !this.scriptId) {
return;
}
- let param = { id: this.id, type: this.type};
+ let param = { type: this.type };
+ if (this.id) {
+ param.id = this.id;
+ } else if (this.scriptId) {
+ param.scriptId = this.scriptId;
+ }
this.$api.autoexec.script.getArgument(param).then(res => {
if (res.Status == 'OK' && res.Return) {
this.argumentConfig = res.Return || {};
diff --git a/src/views/pages/autoexec/manage/script-manage.vue b/src/views/pages/autoexec/manage/script-manage.vue
index a01f343df8ec9544cd437f05efd5f0abd1ca108f..0263f5f7bfabe932377f6b1bf116e516ebe1b66d 100644
--- a/src/views/pages/autoexec/manage/script-manage.vue
+++ b/src/views/pages/autoexec/manage/script-manage.vue
@@ -261,7 +261,8 @@ export default {
'generateToCombop': 'tsfont-tool',
'copy': 'tsfont-copy',
'export': 'tsfont-download',
- 'delete': 'tsfont-trash-o'
+ 'delete': 'tsfont-trash-o',
+ 'test': 'tsfont-test'
},
showEdit: false,
editId: null,
@@ -494,8 +495,21 @@ export default {
this.exportRow(row);
} else if (type == 'delete') {
this.deleteRow(item, row);
+ } else if (type == 'test') {
+ this.testRow(row);
}
},
+ testRow(row) {
+ //跳转到测试页面
+ this.$router.push({
+ path: '/test-detail',
+ query: {
+ scriptId: row.id,
+ type: 'script',
+ execMode: row.execMode
+ }
+ });
+ },
close(isRefresh) {
this.editId = null;
this.showEdit = false;