@@ -73,6 +73,10 @@ const testSuite = ref({
7373 devices: [],
7474 testCases: [],
7575});
76+ const paramEditor = ref ({
77+ idx: 0 ,
78+ data: {},
79+ });
7680const deviceData = ref ([]);
7781const deviceDataBack = ref ([]);
7882const getDevice = () => {
@@ -417,6 +421,68 @@ onMounted(() => {
417421 </el-tab-pane >
418422 </el-tabs >
419423 </el-form-item >
424+ <el-form-item prop =" testSuitesGlobalParams" :label =" $t('suite.testSuiteGlobalParams')" >
425+ <el-table :data =" testSuite.testSuitesGlobalParams" style =" width : 100% " max-height =" 250" size =" small" >
426+ <el-table-column :label =" $t('globalParamsTs.paramsList.name')" width =" 240" prop =" paramsKey" />
427+ <el-table-column :label =" $t('globalParamsTs.paramsList.value')" prop =" paramsValue" />
428+ <el-table-column align =" right" >
429+ <template #header >
430+ <el-button size =" small"
431+ @click =" paramEditor.data = {}; paramEditor.idx = 1 + testSuite.testSuitesGlobalParams.length"
432+ >{{$t('globalParamsTs.addGlobalParams')}}</el-button >
433+ </template >
434+ <template #default =" scope " >
435+ <el-button size =" small"
436+ @click =" paramEditor.data = { ...scope.row }; paramEditor.idx = 1 + scope.$index"
437+ >{{ $t('common.edit') }}
438+ </el-button >
439+ <el-button size =" small" type =" danger"
440+ @click =" testSuite.testSuitesGlobalParams.splice(scope.$index, 1)"
441+ >{{ $t('common.delete') }}
442+ </el-button >
443+ </template >
444+ </el-table-column >
445+ </el-table >
446+ <el-dialog v-model =" paramEditor.idx" :title =" $t('globalParamsTs.dialogVisible.info')" width =" 600px" >
447+ <el-form size =" small" :model =" paramEditor.data" class =" demo-table-expand" label-width =" 90px" label-position =" left" >
448+ <el-form-item
449+ prop =" paramsKey"
450+ :label =" $t('globalParamsTs.dialogVisible.keyName')"
451+ :rules =" {
452+ required: true,
453+ message: $t('globalParamsTs.dialogVisible.keyNameMessage'),
454+ trigger: 'blur',
455+ }"
456+ >
457+ <el-input
458+ v-model =" paramEditor.data.paramsKey"
459+ :placeholder =" $t('globalParamsTs.dialogVisible.inputName')"
460+ ></el-input >
461+ </el-form-item >
462+ <el-form-item
463+ prop =" paramsValue"
464+ :label =" $t('globalParamsTs.dialogVisible.valueName')"
465+ :rules =" {
466+ required: true,
467+ message: $t('globalParamsTs.dialogVisible.valueNameMessage'),
468+ trigger: 'blur',
469+ }"
470+ >
471+ <el-input
472+ v-model =" paramEditor.data.paramsValue"
473+ :placeholder =" $t('globalParamsTs.dialogVisible.inputValue')"
474+ ></el-input >
475+ </el-form-item >
476+ </el-form >
477+ <div style =" text-align : center " >
478+ <el-button size =" small" type =" primary"
479+ @click =" testSuite.testSuitesGlobalParams.splice(paramEditor.idx - 1, 1, paramEditor.data); paramEditor.idx = 0"
480+ >{{
481+ $t('form.confirm')
482+ }}</el-button >
483+ </div >
484+ </el-dialog >
485+ </el-form-item >
420486 </el-form >
421487
422488 <div style =" text-align : center ; margin-top : 20px " >
0 commit comments