优化检测脚本页面

This commit is contained in:
GGJ
2025-02-24 16:45:39 +08:00
parent 1a23bcb510
commit bd1eecc106
8 changed files with 544 additions and 411 deletions

View File

@@ -16,7 +16,13 @@
<el-table-column prop="name" label="指标" show-overflow-tooltip width="180px" />
<el-table-column align="center" label="参与误差比较">
<template #default="{ row }">
<el-switch v-model="row.errorFlag" v-if="row.show" :active-value="1" :inactive-value="0">
<el-switch
v-model="row.errorFlag"
v-if="row.show"
:active-value="1"
:inactive-value="0"
:disabled="disabled"
>
<template #active-action>
<span></span>
</template>
@@ -28,7 +34,13 @@
</el-table-column>
<el-table-column align="center" label="是否启用">
<template #default="{ row }">
<el-switch v-model="row.enable" v-if="row.show" :active-value="1" :inactive-value="0">
<el-switch
v-model="row.enable"
v-if="row.show"
:active-value="1"
:inactive-value="0"
:disabled="disabled"
>
<template #active-action>
<span></span>
</template>
@@ -51,10 +63,26 @@ const props = defineProps({
activeName: {
type: String,
required: true
},
formContent: {
type: Object,
required: true
},
disabled: {
type: Boolean,
default: true
}
})
const tableData = ref<any[]>([])
const info = async () => {
let checkData: any = []
await checkDataList({
scriptId: props.formContent.id,
scriptType: props.activeName
}).then((res: any) => {
checkData = res.data
})
let { data } = await getDictTreeByCode({
name: '',
id: '',
@@ -72,22 +100,46 @@ const info = async () => {
children: []
})
item.children.forEach((k: any) => {
let childrenList: any = []
checkData.forEach((j: any) => {
if (j.valueType == k.id) {
childrenList.push(j)
}
})
if (childrenList.length > 0) {
tableData.value[i].children.push({
id: k.id,
pid: item.id,
name: k.name,
dataType: 'real',
dataType: item.name == '闪变' ? 'avg' : item.name == '暂态' ? 'avg' : 'real',
show: true,
errorFlag: childrenList[0].errorFlag,
enable: childrenList[0].enable
})
} else {
tableData.value[i].children.push({
id: k.id,
pid: item.id,
name: k.name,
dataType: item.name == '闪变' ? 'avg' : item.name == '暂态' ? 'avg' : 'real',
show: true,
errorFlag: 0,
enable: 0
})
}
})
})
console.log('🚀 ~ item.children.forEach ~ tableData.value:', tableData.value)
}
const getData = () => {
return tableData.value
}
onMounted(() => {
info()
// tableData.value = data.data[0].children || []
})
// 对外映射
defineExpose({ getData })
</script>
<style lang="scss" scoped></style>

View File

@@ -26,6 +26,7 @@ let scriptForm: any = {
}
], //间谐波
flickerData: {
flickerValue: '1', //标准值
fchagValue: '', //变动量
fchagFre: '', //波动频度
waveType: 'CPM', // 波动类型
@@ -34,7 +35,7 @@ let scriptForm: any = {
}, //闪变
dipData: {
ftransValue: 0, // 暂态幅值
fretainTime: 0 // 暂态持续时间
retainTime: 0 // 暂态持续时间
} //暂态
},
{
@@ -55,6 +56,7 @@ let scriptForm: any = {
}
], //间谐波
flickerData: {
flickerValue: '1', //标准值
fchagValue: '', //变动量
fchagFre: '', //波动频度
waveType: 'CMP', // 波动类型
@@ -63,7 +65,7 @@ let scriptForm: any = {
}, //闪变
dipData: {
ftransValue: 0, // 暂态幅值
fretainTime: 0 // 暂态持续时间
retainTime: 0 // 暂态持续时间
} //暂态
},
{
@@ -84,6 +86,7 @@ let scriptForm: any = {
}
], //间谐波
flickerData: {
flickerValue: '1', //标准值
fchagValue: '', //变动量
fchagFre: '', //波动频度
waveType: 'CMP', // 波动类型
@@ -92,7 +95,7 @@ let scriptForm: any = {
}, //闪变
dipData: {
ftransValue: 0, // 暂态幅值
fretainTime: 0 // 暂态持续时间
retainTime: 0 // 暂态持续时间
} //暂态
},
{
@@ -113,6 +116,7 @@ let scriptForm: any = {
}
], //间谐波
flickerData: {
flickerValue: '1', //标准值
fchagValue: '', //变动量
fchagFre: '', //波动频度
waveType: 'CMP', // 波动类型
@@ -121,7 +125,7 @@ let scriptForm: any = {
}, //闪变
dipData: {
ftransValue: 0, // 暂态幅值
fretainTime: 0 // 暂态持续时间
retainTime: 0 // 暂态持续时间
} //暂态
},
{
@@ -142,6 +146,7 @@ let scriptForm: any = {
}
], //间谐波
flickerData: {
flickerValue: '1', //标准值
fchagValue: '', //变动量
fchagFre: '', //波动频度
waveType: 'CMP', // 波动类型
@@ -150,7 +155,7 @@ let scriptForm: any = {
}, //闪变
dipData: {
ftransValue: 0, // 暂态幅值
fretainTime: 0 // 暂态持续时间
retainTime: 0 // 暂态持续时间
} //暂态
},
{
@@ -171,6 +176,7 @@ let scriptForm: any = {
}
], //间谐波
flickerData: {
flickerValue: '1', //标准值
fchagValue: '', //变动量
fchagFre: '', //波动频度
waveType: 'CMP', // 波动类型
@@ -179,7 +185,7 @@ let scriptForm: any = {
}, //闪变
dipData: {
ftransValue: 0, // 暂态幅值
fretainTime: 0 // 暂态持续时间
retainTime: 0 // 暂态持续时间
} //暂态
}
]

View File

@@ -1,7 +1,4 @@
import { ref } from "vue"
<template>
<el-dialog title="检测项目信息" v-model="dialogVisible" @close="close" v-bind="dialogBig" width="1400">
<div class="table-container">
<el-table
:data="tableData"
@@ -17,8 +14,14 @@ import { ref } from "vue"
<el-table-column type="index" label="序号" width="60" />
<el-table-column prop="pname" label="参考设定值类型" />
<el-table-column prop="name" label="参考设定值子类型" />
<el-table-column prop="dataType" label="值类型" :formatter="formatter" />
<el-table-column prop="phase" label="相别" />
<el-table-column prop="value" label="参考设定值" />
<el-table-column prop="value" label="参与误差比较">
<template #default="{ row }">
{{ row.errorFlag == 0 ? '否' : '是' }}
</template>
</el-table-column>
<el-table-column label="操作">
<template #default="{ row }">
<el-button type="primary" link :icon="EditPen">编辑</el-button>
@@ -26,69 +29,7 @@ import { ref } from "vue"
</el-table-column>
</el-table>
</div>
<!-- <ProTable
ref="proTable"
:columns="columns"
:request-api="getTableList"
:pagination="false"
:toolButton="false"
:style="{ height: '530px', maxHeight: '530px', overflow: 'hidden' }"
>
<template #tableHeader="scope">
<el-button v-auth.testScript="'add'" type="primary" :icon="CirclePlus" @click="add">新增</el-button>
<el-button
v-auth.testScript="'delete'"
type="danger"
:icon="Delete"
plain
:disabled="!scope.isSelected"
@click="batchDelete(scope.selectedListIds)"
>
删除
</el-button>
</template>
<template #operation="scope">
<el-button
v-auth.testScript="'upgrade'"
type="primary"
v-if="scope.row.type !== 1"
link
:icon="Share"
@click="copy(scope.row)"
>
复制
</el-button>
<el-button
v-auth.testScript="'edit'"
type="primary"
link
:icon="EditPen"
:model-value="false"
@click="edit(scope.row)"
>
编辑
</el-button>
<el-button
v-auth.testScript="'delete'"
type="primary"
link
:icon="Delete"
@click="batchDelete(scope.row)"
>
删除
</el-button>
</template>
</ProTable> -->
<template #footer>
<div>
<el-button @click="close"> </el-button>
<el-button type="primary" @click="save">保存</el-button>
</div>
</template>
</el-dialog>
<el-dialog :title="dialogTitle" v-model="showForm" @close="close" width="500">
<el-form ref="form" :model="form" label-width="auto">
<el-form-item label="参考设定值类型" prop="name">
@@ -111,8 +52,6 @@ import { ref } from "vue"
</template>
<script setup lang="ts">
import type { TestScript } from '@/api/device/interface/testScript'
import type { ColumnProps } from '@/components/ProTable/interface'
import { CirclePlus, EditPen, Delete, Share } from '@element-plus/icons-vue'
import { reactive, ref } from 'vue'
import { getDictTreeByCode } from '@/api/system/dictionary/dictTree'
@@ -144,13 +83,25 @@ const form = ref({
standardName: 0,
standardTime: 0
})
const formatter = (row: any, column: any) => {
if (column.property == 'dataType') {
return row.dataType == 'real'
? '实时'
: row.dataType == 'cp95'
? 'CP95值'
: row.dataType == 'avg'
? '平均值'
: row.dataType == 'min'
? '最小值'
: row.dataType == 'max'
? '最大值'
: row.dataType
}
}
// 打开弹窗,可能是新增,也可能是编辑
const open = async (row: any) => {
dialogVisible.value = true
// checkDataList({ scriptId: props.formContent.id, scriptType: props.activeName }).then((res: any) => {
// })
const open = async (row: any) => {
let treeData: any = []
await getDictTreeByCode({
name: '',
@@ -162,16 +113,21 @@ const open = async (row: any) => {
}).then((res: any) => {
treeData = res.data[0].children
})
let checkDataList = [
{
pid: '004e06c7145e8454493dd69ad485c2a9',
valueType: '2da2a32c0cd19fb6368b9f4c249c2b3c',
dataType: 'real',
enable: 1,
errorFlag: 1
let checkDataList: any = []
await row.forEach((item: any) => {
item.children.forEach((k: any) => {
if (k.enable != 0 || k.errorFlag != 0) {
checkDataList.push({
pid: k.pid,
valueType: k.id,
dataType: k.dataType,
enable: k.enable,
errorFlag: k.errorFlag
})
}
]
})
})
await scriptDtlsCheckDataList({
...props.form,
scriptId: props.formContent?.id,
@@ -189,14 +145,18 @@ const open = async (row: any) => {
const save = () => {
dialogVisible.value = false
}
const getTableData = () => {
return tableData.value
}
// 关闭弹窗
const close = () => {
dialogVisible.value = false
}
onMounted(() => {})
// 对外映射
defineExpose({ open })
defineExpose({ open, getTableData })
</script>
<style scoped></style>

View File

@@ -1,7 +1,9 @@
<template>
<el-dialog :title="dialogTitle" v-model="dialogVisible" @close="close" v-bind="dialogBig" width="1400px">
<el-carousel height="620px" :autoplay="false" ref="carouselRef" indicator-position="none">
<el-carousel-item :name="0" style="height: 100%; overflow-y: auto">
<div class="dialog-content">
<el-tabs type="border-card" class="right-tabs" style="height: 100%">
<el-tabs type="border-card" class="right-tabs">
<el-tab-pane label="检测">
<!-- 全局设置菜单内容 -->
<div style="height: 295px">
@@ -39,15 +41,16 @@
<template #default="{ row, $index }">
<span>
{{ row.type === 'V' ? '电压' : '电流' }}{{ form.channelList[$index].famp
}}{{ valueCode == 'Absolute' ? (row.type === 'V' ? 'V' : 'A') : '%' }} 相角{{
form.channelList[$index].fphase
}}°
}}{{
valueCode == 'Absolute' ? (row.type === 'V' ? 'V' : 'A') : '%'
}}
相角{{ form.channelList[$index].fphase }}°
</span>
</template>
</el-table-column>
<el-table-column label="操作" width="85">
<template #default="{ row, $index }">
<el-button
<!-- <el-button
type="primary"
v-if="$index != 4"
link
@@ -55,7 +58,26 @@
@click="copyRow($index)"
>
复制
</el-button>
</el-button> -->
<el-dropdown placement="top-start">
<el-button type="primary" link :icon="CopyDocument">复制</el-button>
<template #dropdown>
<el-dropdown-menu>
<div v-if="$index == 0">
<el-dropdown-item @click="copyRow(0, 2)">L2</el-dropdown-item>
<el-dropdown-item @click="copyRow(0, 4)">L3</el-dropdown-item>
</div>
<div v-if="$index == 2">
<el-dropdown-item @click="copyRow(2, 0)">L1</el-dropdown-item>
<el-dropdown-item @click="copyRow(2, 4)">L3</el-dropdown-item>
</div>
<div v-if="$index == 4">
<el-dropdown-item @click="copyRow(4, 0)">L1</el-dropdown-item>
<el-dropdown-item @click="copyRow(4, 2)">L2</el-dropdown-item>
</div>
</el-dropdown-menu>
</template>
</el-dropdown>
</template>
</el-table-column>
<el-table-column label="操作" align="center">
@@ -63,27 +85,22 @@
<el-checkbox-button
v-model="form.channelList[$index].channelFlag"
label="通道使能"
size="small"
/>
<el-checkbox-button
v-model="form.channelList[$index].harmFlag"
label="谐波使能"
size="small"
/>
<el-checkbox-button
v-model="form.channelList[$index].inHarmFlag"
label="间谐波使能"
size="small"
/>
<el-checkbox-button
v-model="form.channelList[$index].flickerFlag"
label="闪变使能"
size="small"
/>
<el-checkbox-button
v-model="form.channelList[$index].dipFlag"
label="暂态使能"
size="small"
/>
</template>
</el-table-column>
@@ -107,18 +124,18 @@
</div>
</el-form-item>
</div>
<div class="button-label-container">
<!-- <div class="button-label-container">
<label>参考设定值列表:</label>
<el-button type="primary" :icon="EditPen" @click="openDialog">编辑</el-button>
</div>
</div> -->
</div>
</el-tab-pane>
</el-tabs>
</div>
<div style="margin-top: 10px">
<div style="margin-top: 10px; height: 245px">
<el-tabs type="border-card" class="custom-tabs">
<el-tab-pane label="电压/电流编辑" v-if="childForm[0].channelFlag || childForm[1].channelFlag">
<TestScriptVolCurTab :childForm="childForm" />
<TestScriptVolCurTab :childForm="childForm" :valueCode="valueCode" />
</el-tab-pane>
<el-tab-pane label="谐波编辑" v-if="childForm[0].harmFlag || childForm[1].harmFlag">
<TestScriptHarmTab :childForm="childForm" />
@@ -134,23 +151,27 @@
</el-tab-pane>
</el-tabs>
</div>
<!-- <SetValueTable ref="setValueTableRef" v-if="showSetValueTable" /> -->
<template #footer>
<div>
<el-button @click="close"> </el-button>
<el-button type="primary" @click="save">保存</el-button>
</div>
</template>
</el-dialog>
</el-carousel-item>
<el-carousel-item :name="1" style="height: 100%; overflow-y: auto" v-if="showSetValueTable">
<SetValueTable
ref="setValueTableRef"
:activeName="props.activeName"
:formContent="props.formContent"
:form="form"
v-if="showSetValueTable"
:key="initial"
/>
</el-carousel-item>
</el-carousel>
<template #footer>
<div>
<el-button @click="close"> </el-button>
<el-button type="primary" @click="next" v-if="!showSetValueTable">下一步</el-button>
<el-button type="primary" @click="previous" v-if="showSetValueTable">上一步</el-button>
<el-button type="primary" @click="save" v-if="showSetValueTable">保存</el-button>
</div>
</template>
</el-dialog>
</template>
<script setup lang="ts">
@@ -165,10 +186,10 @@ import TestScriptInHarmTab from '@/views/machine/testScript/components/testScrip
import TestScriptFlickerTab from '@/views/machine/testScript/components/testScriptFlickerTab.vue'
import TestScriptDipTab from '@/views/machine/testScript/components/testScriptDipTab.vue'
import { useDictStore } from '@/stores/modules/dict'
import { addScriptDtls, } from '@/api/device/testScript'
import { addScriptDtls } from '@/api/device/testScript'
import scriptForm from './scriptForm'
const emit = defineEmits(['addTab', 'close'])
const emit = defineEmits(['addTab', 'close', 'getCommunication'])
const dictStore = useDictStore()
const props = defineProps({
options: {
@@ -186,6 +207,10 @@ const props = defineProps({
formContent: {
type: [Object, Array],
required: true
},
communicationList: {
type: Array,
required: true
}
})
const key = ref(0)
@@ -194,6 +219,8 @@ const showSetValueTable = ref(false)
const form: any = ref(JSON.parse(JSON.stringify(scriptForm)))
const childForm: any = ref([])
const ScriptValueType = ref('')
const initial = ref(0) //轮播图索引
const carouselRef = ref()
const setValueTableRef = ref()
const dialogVisible = ref(false)
const dialogTitle = ref()
@@ -255,6 +282,7 @@ const close = () => {
// 保存数据
const save = () => {
let copyForm = handleHarmData()
copyForm.checkDataList = setValueTableRef.value?.getTableData()
addScriptDtls({ ...copyForm, scriptId: props.formContent.id, scriptType: props.activeName }).then(res => {
if (res.code === 'A0000') {
ElMessage.success({
@@ -267,6 +295,59 @@ const save = () => {
})
// emit('addTab', form.value)
}
// 上一步
const previous = () => {
carouselRef.value.setActiveItem(0)
showSetValueTable.value = false
}
// 下一步
const next = () => {
emit('getCommunication')
setTimeout(() => {
// 判断通讯脚本
if (!checkFlags(props.communicationList)) {
ElMessage.warning({
message: '请先完善通讯脚本',
type: 'warning'
})
return
}
// 判断够选通道
if (!checkChannel(form.value)) {
ElMessage.warning({
message: '请先选择使能通道',
type: 'warning'
})
return
}
}, 100)
showSetValueTable.value = true
setTimeout(() => {
setValueTableRef.value?.open(props.communicationList)
carouselRef.value.setActiveItem(1)
}, 100)
// 切换轮播图
}
// 判断通讯脚本是否有值
const checkFlags = (data: any) => {
for (let i = 0; i < data.length; i++) {
const item = data[i]
if (item.children) {
for (let j = 0; j < item.children.length; j++) {
const child = item.children[j]
if (child.errorFlag != 0 || child.enable != 0) {
return true
}
}
}
}
return false
}
// 判断够选通道
const checkChannel = (data: row) => {
return data.channelList.every(item => item.channelFlag === true)
}
//处理谐波数据
const handleHarmData = () => {
let copyForm = JSON.parse(JSON.stringify(form.value))
@@ -324,15 +405,15 @@ const setharmList = (row: any) => {
return row
}
// 复制
const copyRow = (index: number) => {
form.value.channelList[index + 2] = JSON.parse(JSON.stringify(form.value.channelList[index]))
form.value.channelList[index + 3] = JSON.parse(JSON.stringify(form.value.channelList[index + 1]))
form.value.channelList[index].channelType == 'Ua'
? (form.value.channelList[index + 2].channelType = 'Ub')
: (form.value.channelList[index + 2].channelType = 'Uc')
form.value.channelList[index + 1].channelType == 'Ia'
? (form.value.channelList[index + 3].channelType = 'Ib')
: (form.value.channelList[index + 3].channelType = 'Ic')
const copyRow = (num: number, index: number) => {
form.value.channelList[index] = JSON.parse(JSON.stringify(form.value.channelList[num]))
form.value.channelList[index + 1] = JSON.parse(JSON.stringify(form.value.channelList[num + 1]))
form.value.channelList[num].channelType == 'Ua'
? (form.value.channelList[index].channelType = 'Ub')
: (form.value.channelList[index].channelType = 'Uc')
form.value.channelList[num + 1].channelType == 'Ia'
? (form.value.channelList[index + 1].channelType = 'Ib')
: (form.value.channelList[index + 1].channelType = 'Ic')
key.value += 1
ElMessage.success({
message: '复制成功!',
@@ -341,15 +422,7 @@ const copyRow = (index: number) => {
}
// 打开 drawer(新增、编辑)
const openDialog = () => {
let copyForm = JSON.parse(JSON.stringify(form.value))
showSetValueTable.value = true
// setValueTableRef.value?.open()
setTimeout(() => {
setValueTableRef.value?.open(props.formContent)
}, 100)
}
const openDialog = () => {}
// 对外映射
defineExpose({ open })
@@ -360,7 +433,6 @@ defineExpose({ open })
display: flex;
justify-content: flex-start;
align-items: stretch;
height: 100%;
}
.tabs-container {
@@ -402,4 +474,10 @@ defineExpose({ open })
.input-label-container label {
margin-left: 5px; /* 添加标签与输入框之间的间距 */
}
:deep(.el-carousel__indicators) {
display: none !important;
}
:deep(.el-carousel__arrow) {
display: none !important;
}
</style>

View File

@@ -13,15 +13,21 @@
<div class="content-right-Tabs" style="height: calc(100vh - 335px); width: 100px">
<el-tabs type="border-card" style="height: 100%" v-model="activeName" @tab-change="tabChange">
<el-tab-pane v-for="tab in tabData" :key="tab.value" :label="tab.label" :name="tab.value">
<div v-if="activeName == tab.value">
<div class="dialog-footer">
<el-button :icon="CirclePlus" type="primary" @click="openDialog('add')">新增</el-button>
<el-button :icon="Check" type="primary" @click="saveTheNewsletter">保存通讯脚本</el-button>
</div>
<div style="display: flex">
<!-- 通信脚本 -->
<el-tabs type="border-card" v-model="firstName" style="height: 100%">
<el-tab-pane label="通讯脚本" name="first">
<Commun :activeName="activeName" style="width: 400px" />
<Commun
:activeName="activeName"
:formContent="props.formContent"
style="width: 400px"
:disabled="tab.children.length == 0 ? false : true"
ref="communRef"
/>
</el-tab-pane>
</el-tabs>
<!-- 2级tab -->
@@ -52,7 +58,11 @@
>
<el-table-column type="index" label="组次" width="60" />
<el-table-column prop="ffreq" label="频率(Hz)" width="100" />
<el-table-column :label="item.label" v-for="item in column" :key="item.label">
<el-table-column
:label="item.label"
v-for="item in column"
:key="item.label"
>
<template #default="{ row }">
<table class="tableL">
<tr>
@@ -78,7 +88,11 @@
}}
</td>
<td>
{{ '相角=' + row.channelList[item.num + 1]?.fphase + '°' }}
{{
'相角=' +
row.channelList[item.num + 1]?.fphase +
'°'
}}
</td>
</tr>
</table>
@@ -119,7 +133,12 @@
>
编辑
</el-button>
<el-button type="primary" link :icon="Delete" @click="deleteRow(row)">
<el-button
type="primary"
link
:icon="Delete"
@click="deleteRow(row)"
>
删除
</el-button>
</template>
@@ -128,6 +147,7 @@
</el-tab-pane>
</el-tabs>
</div>
</div>
</el-tab-pane>
</el-tabs>
</div>
@@ -139,7 +159,9 @@
:activeName="activeName"
:childActiveName="childActiveName"
:formContent="props.formContent"
:communicationList="communicationList"
@addTab="addTab"
@getCommunication="getCommunication"
@close="showDialog = false"
v-if="showDialog"
/>
@@ -166,6 +188,7 @@ interface TabOption {
code?: string
children?: TabOption[]
}
const communRef = ref()
const treeData = ref<CheckData.TreeItem[]>([])
const valueCode = ref('') //Absolute绝对值
const props = defineProps({
@@ -183,6 +206,7 @@ const dictStore = useDictStore()
const activeName = ref('')
const childActiveName = ref('')
const firstName = 'first'
const communicationList = ref([])
const testProjectPopupRef = ref()
const tableData: any = ref([])
const tabData: any = ref([])
@@ -241,7 +265,10 @@ const getTree = () => {
})
}
const copyActiveName = ref('')
// 获取通讯脚本点击
const getCommunication = () => {
communicationList.value = communRef.value[0]?.getData()
}
// 切换大tab控制小tab
const tabChange = () => {
if (copyActiveName.value != activeName.value) {
@@ -326,9 +353,7 @@ const addTab = (row: any) => {
getTree()
}
// 保存通信脚本
const saveTheNewsletter=()=>{
}
const saveTheNewsletter = () => {}
onMounted(() => {
getTree()
props.options.forEach((item: any) => {

View File

@@ -4,7 +4,7 @@
<!-- 左侧编辑区域内容 -->
<img src="@/assets/images/transient.png" />
<div class="inputTop">
<!-- <div class="inputTop">
<el-input v-model="form[0].dipData.fValue" style="width: 150px; left: 4%" :disabled="!form[0].dipFlag">
<template #append>S</template>
</el-input>
@@ -22,7 +22,7 @@
<el-input v-model="form[0].dipData.fValue" style="width: 150px; left: 40%" :disabled="!form[0].dipFlag">
<template #append>S</template>
</el-input>
</div>
</div> -->
</div>
<div class="right-editor">
<!-- 右侧编辑区域内容 -->
@@ -30,7 +30,7 @@
<el-input v-model="form[0].dipData.ftransValue" style="width: 150px" :disabled="!form[0].dipFlag"/>
</el-form-item>
<el-form-item label-width="120px" label="持续时间(周波)">
<el-input v-model="form[0].dipData.fretainTime" style="width: 150px" :disabled="!form[0].dipFlag"/>
<el-input v-model="form[0].dipData.retainTime" style="width: 150px" :disabled="!form[0].dipFlag"/>
</el-form-item>
</div>
</div>

View File

@@ -1,11 +1,16 @@
<template>
<div class="tabs-container">
<el-tabs type="border-card" class="fixed-width-tabs" style="height: 100%">
<el-tab-pane label="波动">
<el-tab-pane label="短闪">
<!-- 全局设置菜单内容 Modulation-->
<div>
<el-form-item label="标准值" label-width="180px">
<el-select v-model="standardValue" style="width: 180px" placeholder="请选择标准值">
<div style="display: flex">
<el-form-item label="标准值">
<el-select
v-model="form[0].flickerData.flickerValue"
style="width: 180px"
placeholder="请选择标准值"
>
<el-option
v-for="item in standard"
:key="item.label"
@@ -14,7 +19,6 @@
/>
</el-select>
</el-form-item>
<el-form-item abel-width="180px">
<template #label>
<el-select
@@ -48,8 +52,11 @@
/>
</el-select>
</el-form-item>
</div>
<div style="display: flex; justify-content: end">
<el-form-item label="变动量(%)" label-width="180px">
<el-input
placeholder="请输入变动量"
style="width: 180px"
v-model="form[0].flickerData.fchagValue"
:disabled="!form[0].flickerFlag"
@@ -97,7 +104,7 @@ const props = defineProps({
required: true
}
})
const standardValue = ref('1')
const standard = [
{
label: '1',
@@ -200,7 +207,7 @@ const waveList = [
]
const waveChildrenList = computed(() => {
return waveList.filter((item: any) => item.value === form.value[0].flickerData.waveType)[0][
standardValue.value == '1' ? 'children1' : 'children3'
props.childForm[0].flickerData.flickerValue == '1' ? 'children1' : 'children3'
]
})
const changeLable = e => {

View File

@@ -8,7 +8,7 @@
<div class="right-editor">
<!-- 右侧编辑区域内容 -->
<el-form :inline="true" label-width="auto" :model="form" class="form-two">
<el-form-item label="电压有效值(V)">
<el-form-item :label="`电压有效值(${valueCode == 'Absolute' ? 'V' : '%'})`">
<el-input
type="number"
@mousewheel.native.prevent
@@ -16,14 +16,6 @@
:disabled="!form[0].channelFlag"
/>
</el-form-item>
<el-form-item label="电流有效值(A)">
<el-input
type="number"
@mousewheel.native.prevent
v-model="form[1].famp"
:disabled="!form[1].channelFlag"
/>
</el-form-item>
<el-form-item label="电压相角(°)">
<el-input
type="number"
@@ -32,6 +24,15 @@
:disabled="!form[0].channelFlag"
/>
</el-form-item>
<el-form-item :label="`电流有效值(${valueCode == 'Absolute' ? 'A' : '%'})`">
<el-input
type="number"
@mousewheel.native.prevent
v-model="form[1].famp"
:disabled="!form[1].channelFlag"
/>
</el-form-item>
<el-form-item label="电流相角(°)">
<el-input
type="number"
@@ -53,6 +54,10 @@ const props = defineProps({
childForm: {
type: Array,
required: true
},
valueCode: {
type: String,
required: true
}
})