fix(接口测试): 修复复制场景创建人为空的缺陷 (#17042)

--bug=1015905 --user=王孝刚 【接口测试】其他用户复制接口场景,复制后没有创建人
https://www.tapd.cn/55049933/s/1226169

Co-authored-by: wxg0103 <727495428@qq.com>
This commit is contained in:
MeterSphere Bot 2022-08-18 11:18:33 +08:00 committed by GitHub
parent 3ffb2e6b16
commit 19981c2518
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -321,7 +321,8 @@ import {
hasLicense, hasLicense,
hasPermission, hasPermission,
objToStrMap, objToStrMap,
strMapToObj strMapToObj,
getCurrentUserId
} from "@/common/js/utils"; } from "@/common/js/utils";
import { import {
API_SCENARIO_CONFIGS, API_SCENARIO_CONFIGS,
@ -1178,11 +1179,15 @@ export default {
} }
}); });
}, },
copy(row) { copy(row) {
let rowParam = JSON.parse(JSON.stringify(row)); let rowParam = JSON.parse(JSON.stringify(row));
rowParam.copy = true; rowParam.copy = true;
rowParam.name = 'copy_' + rowParam.name; rowParam.name = 'copy_' + rowParam.name;
rowParam.customNum = ''; rowParam.customNum = '';
rowParam.principal = getCurrentUserId();
rowParam.createUser = getCurrentUserId();
rowParam.userId = getCurrentUserId();
this.$emit('edit', rowParam); this.$emit('edit', rowParam);
}, },
showReport(row) { showReport(row) {