fix(测试跟踪): 只读用户可以编辑功能用例

--bug=1013087 --user=陈建星 【测试跟踪】配置只读用户权限,进入测试用例列表,部分模块可以编辑保存 https://www.tapd.cn/55049933/s/1155903
This commit is contained in:
chenjianxing 2022-05-11 15:07:17 +08:00 committed by f2c-ci-robot[bot]
parent 14a6fd6d96
commit e348f33650
4 changed files with 10 additions and 2 deletions

View File

@ -6,7 +6,7 @@
<el-col :span="24">
<el-form-item :label="item.system ? $t(systemNameMap[item.name]) : item.name" :prop="item.name"
:label-width="formLabelWidth">
<custom-filed-component :data="item" :form="form" prop="defaultValue" :disabled="item.type !== 'richText' && isPublic"/>
<custom-filed-component :data="item" :form="form" prop="defaultValue" :disabled="(item.type !== 'richText' && isPublic) || disabled"/>
</el-form-item>
</el-col>
</span>
@ -36,6 +36,12 @@ export default {
default() {
return false;
}
},
disabled: {
type: Boolean,
default() {
return false;
}
}
},
computed: {

View File

@ -43,6 +43,7 @@
label-position="right" label-width="100px" size="small"
class="case-form">
<custom-filed-form-row :form="customFieldForm"
:disabled="readOnly"
:issue-template="testCaseTemplate"/>
</el-form>

View File

@ -63,6 +63,7 @@
</el-dropdown-menu>
</el-dropdown>
<el-button v-else type="primary" class="ms-api-buttion" @click="handleCommand"
:disabled="readOnly"
@command="handleCommand" size="small" style="float: right;margin-right: 20px">
{{ $t('commons.save') }}
</el-button>

View File

@ -85,7 +85,7 @@
</el-tooltip>
<el-row style="margin-top: 10px" v-if="type!=='add'">
<el-col :span="20" :offset="1">{{ $t('test_track.review.comment') }}:
<el-button icon="el-icon-plus" type="mini" @click="openComment"></el-button>
<el-button :disabled="readOnly" icon="el-icon-plus" type="mini" @click="openComment"></el-button>
</el-col>
</el-row>
<el-row v-if="type!=='add'">