76a078a8 by lihua

fix: 查看规则详情

1 parent e12d0c17
......@@ -163,7 +163,7 @@ const rulesListByType: any = computed(() => {
// json: checkRulesList.value.filter(r => r.value == ''),
tinyint: checkRulesList.value.filter(r => r.value == 'length_rule' || r.value == 'num_value_rule' || r.value == 'custom_regular_rule'),
time: checkRulesList.value.filter(r => r.value == 'length_rule' || r.value == 'custom_regular_rule'),
bit: checkRulesList.value.filter(r => r.value == 'length_rule' || r.value == 'ch_rule' || r.value == 'en_rule' || r.value == 'custom_regular_rule'),
bit: checkRulesList.value.filter(r => r.value == 'length_rule' || r.value == 'ch_rule' || r.value == 'en_rule' || r.value == 'custom_regular_rule')
}
});
......@@ -188,7 +188,7 @@ onBeforeMount(() => {
}
if (props.smallCategoryList?.length) {
let p = panelList.value[1];
if (p.default) {
if (p.default && !props.readonly) {
if (p.default == '1') {//规范性
panelList.value[2].options = props.smallCategoryList.slice(0, 6);
} else if (p.default == '2') {
......@@ -2395,7 +2395,7 @@ defineExpose({
</el-table-column>
<el-table-column prop="checkRule" label="选择检验规则" width="150px" align="left" show-overflow-tooltip>
<template #default="scope">
<el-select v-if="!props.readonly || (scope.row.dataType == 'text' || scope.row.dataType == 'json')"
<el-select v-if="!props.readonly"
v-model="scope.row['checkRule']" placeholder="请选择" filterable clearable>
<el-option v-for="opt in (rulesListByType[scope.row.dataType] || checkRulesList)" :key="opt['value']"
:label="opt['label']" :value="opt['value']" />
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!