修改浙江无线测试用例bug
This commit is contained in:
@@ -496,6 +496,7 @@ export default {
|
||||
colors.push('#CC0000')
|
||||
break
|
||||
}
|
||||
|
||||
|
||||
if (waveDatas[0].unit === '电压') {
|
||||
if (this.value === 1) {
|
||||
@@ -506,6 +507,8 @@ export default {
|
||||
} else {
|
||||
unit = 'A'
|
||||
}
|
||||
|
||||
|
||||
//把剩余的DIV先拼接好
|
||||
for (var step = 1; step < waveDatas.length; step++) {
|
||||
var waveId = 'wave' + step
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
<!-- switch -->
|
||||
<el-switch v-if="field.render == 'switch'" @change="onChangeField(field, $event)"
|
||||
:model-value="fieldValue.toString()" :loading="row.loading" inline-prompt :active-value="field.activeValue" :active-text="field.activeText"
|
||||
:inactive-value="field.inactiveValue" :inactive-text="field.inactiveText" />
|
||||
:model-value="fieldValue.toString()" :loading="row.loading" inline-prompt :active-value="field.activeValue"
|
||||
:active-text="field.activeText" :inactive-value="field.inactiveValue" :inactive-text="field.inactiveText" />
|
||||
|
||||
<!-- image -->
|
||||
<div v-if="field.render == 'image' && fieldValue" class="ba-render-image">
|
||||
<el-image :hide-on-click-modal="true" :preview-teleported="true" :preview-src-list="[fullUrl(fieldValue)]"
|
||||
:src="fullUrl(fieldValue)"></el-image>
|
||||
:src="fieldValue.length > 100 ? fieldValue : fullUrl(fieldValue)"></el-image>
|
||||
</div>
|
||||
|
||||
<!-- tag -->
|
||||
@@ -196,7 +196,7 @@ const handlerCommand = (item: OptButton) => {
|
||||
|
||||
.el-image {
|
||||
height: 36px;
|
||||
width: 36px;
|
||||
// width: 36px;
|
||||
}
|
||||
|
||||
.table-operate-text {
|
||||
|
||||
@@ -158,9 +158,41 @@ const onMenuCollapse = () => {
|
||||
menuCollapse.value = !menuCollapse.value
|
||||
proxy.eventBus.emit('cnTreeCollapse', menuCollapse)
|
||||
}
|
||||
const filterNode = (value: string, data: any) => {
|
||||
const filterNode = (value: string, data: any, node: any) => {
|
||||
if (!value) return true
|
||||
return data.name.includes(value)
|
||||
// return data.name.includes(value)
|
||||
if (data.name) {
|
||||
|
||||
return chooseNode(value, data, node)
|
||||
}
|
||||
}
|
||||
|
||||
// 过滤父节点 / 子节点 (如果输入的参数是父节点且能匹配,则返回该节点以及其下的所有子节点;如果参数是子节点,则返回该节点的父节点。name是中文字符,enName是英文字符.
|
||||
const chooseNode = (value: string, data: any, node: any) => {
|
||||
|
||||
if (data.name.indexOf(value) !== -1) {
|
||||
return true
|
||||
}
|
||||
const level = node.level
|
||||
// 如果传入的节点本身就是一级节点就不用校验了
|
||||
if (level === 1) {
|
||||
return false
|
||||
}
|
||||
// 先取当前节点的父节点
|
||||
let parentData = node.parent
|
||||
// 遍历当前节点的父节点
|
||||
let index = 0
|
||||
while (index < level - 1) {
|
||||
// 如果匹配到直接返回,此处name值是中文字符,enName是英文字符。判断匹配中英文过滤
|
||||
if (parentData.data.name.indexOf(value) !== -1) {
|
||||
return true
|
||||
}
|
||||
// 否则的话再往上一层做匹配
|
||||
parentData = parentData.parent
|
||||
index++
|
||||
}
|
||||
// 没匹配到返回false
|
||||
return false
|
||||
}
|
||||
//治理
|
||||
const treeRef1 = ref<InstanceType<typeof ElTree>>()
|
||||
|
||||
Reference in New Issue
Block a user