添加查看页面
This commit is contained in:
@@ -130,32 +130,38 @@
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="215">
|
||||
<el-table-column label="操作" width="165">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
:icon="CopyDocument"
|
||||
@click="copyRow(row)"
|
||||
>
|
||||
复制
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
:icon="CopyDocument"
|
||||
@click="openDialog('edit', row)"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
:icon="Delete"
|
||||
@click="deleteRow(row)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
<div class="actionButtons">
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
:icon="CopyDocument"
|
||||
@click="copyRow(row)"
|
||||
>
|
||||
复制
|
||||
</el-button>
|
||||
<el-button type="primary" link :icon="View" @click="view(row)">
|
||||
查看
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
:icon="EditPen"
|
||||
@click="openDialog('edit', row)"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
:icon="Delete"
|
||||
@click="deleteRow(row)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -180,6 +186,8 @@
|
||||
@close="showDialog = false"
|
||||
v-if="showDialog"
|
||||
/>
|
||||
<!-- 查看 -->
|
||||
<viewRow ref="viewRowRef" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -189,7 +197,7 @@ import Tree from './tree.vue'
|
||||
import Commun from './communication.vue'
|
||||
import type { CascaderOption } from 'element-plus'
|
||||
import { getTreeData } from '@/api/check/test'
|
||||
import { CirclePlus, Delete, Check, CopyDocument } from '@element-plus/icons-vue'
|
||||
import { CirclePlus, Delete, Check, CopyDocument, View, EditPen } from '@element-plus/icons-vue'
|
||||
import type { TestScript } from '@/api/device/interface/testScript'
|
||||
import TestProjectPopup from '@/views/machine/testScript/components/testProjectPopup.vue'
|
||||
import { CheckData } from '@/api/check/interface'
|
||||
@@ -197,6 +205,7 @@ import { dlsDetails, deleteDtls, updateDtls, addScriptDtls, checkDataList } from
|
||||
import { useDictStore } from '@/stores/modules/dict'
|
||||
import { useHandleData } from '@/hooks/useHandleData'
|
||||
import { scriptDtlsCheckDataList } from '@/api/device/testScript/index'
|
||||
import viewRow from './viewRow.vue'
|
||||
interface TabOption {
|
||||
label?: string
|
||||
name?: string
|
||||
@@ -222,6 +231,7 @@ const dictStore = useDictStore()
|
||||
const activeName = ref('')
|
||||
const childActiveName = ref('')
|
||||
const firstName = 'first'
|
||||
const viewRowRef = ref()
|
||||
const communicationList = ref([])
|
||||
const testProjectPopupRef = ref()
|
||||
const tableData: any = ref([])
|
||||
@@ -365,6 +375,10 @@ const copyRow = async (row: any) => {
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查看
|
||||
const view = (row: any) => {
|
||||
viewRowRef.value?.open(row)
|
||||
}
|
||||
// 删除
|
||||
const deleteRow = async (row: any) => {
|
||||
await useHandleData(deleteDtls, { enable: row.enable, index: row.index, scriptId: row.scriptId }, `删除`)
|
||||
@@ -476,6 +490,12 @@ onMounted(() => {
|
||||
width: 20px !important;
|
||||
}
|
||||
}
|
||||
.actionButtons {
|
||||
.el-button {
|
||||
margin-left: 0px;
|
||||
margin: 5px 6px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
input::-webkit-inner-spin-button {
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
:disabled="!form[0].dipFlag"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label-width="120px" label="持续时间(周波)">
|
||||
<el-form-item label-width="120px" label="持续时间(s)">
|
||||
<el-input
|
||||
type="number"
|
||||
v-model="form[0].dipData.retainTime"
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
style="width: 180px"
|
||||
filterable
|
||||
v-model="form[0].flickerData.fchagFre"
|
||||
:disabled="!form[0].flickerFlag || props.childForm[0].flickerData.flickerValue == null"
|
||||
@change="changeWaveType"
|
||||
>
|
||||
<el-option
|
||||
@@ -44,7 +43,6 @@
|
||||
placeholder="请输入变动量"
|
||||
style="width: 180px"
|
||||
v-model="form[0].flickerData.fchagValue"
|
||||
:disabled="!form[0].flickerFlag || props.childForm[0].flickerData.flickerValue == null"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
@@ -115,8 +115,8 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="onSubmit1" size="small">确定</el-button>
|
||||
<el-button type="primary" @click="empty(1)" size="small">清空表格</el-button>
|
||||
<el-button type="primary" :icon="Check" @click="onSubmit1" size="small">确定</el-button>
|
||||
<el-button type="primary" :icon="Delete" @click="empty(1)" size="small">清空表格</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- 电流通道内容 -->
|
||||
|
||||
@@ -46,23 +46,13 @@
|
||||
<el-table-column prop="inharm" align="center" label="次数" width="60" />
|
||||
<el-table-column prop="famp" align="center" label="间谐波含有率">
|
||||
<template #default="{ row }">
|
||||
<el-input
|
||||
type="number"
|
||||
v-if="row.show"
|
||||
|
||||
v-model="row.famp"
|
||||
/>
|
||||
<el-input type="number" v-if="row.show" v-model="row.famp" />
|
||||
<span v-else>{{ row.famp }}%</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="fphase" label="间谐波相角" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-input
|
||||
type="number"
|
||||
v-if="row.show"
|
||||
|
||||
v-model="row.fphase"
|
||||
/>
|
||||
<el-input type="number" v-if="row.show" v-model="row.fphase" />
|
||||
<span v-else>{{ row.fphase }}°</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -125,8 +115,8 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="onSubmit1" size="small">确定</el-button>
|
||||
<el-button type="primary" @click="empty(1)" size="small">清空表格</el-button>
|
||||
<el-button type="primary" :icon="Check" @click="onSubmit1" size="small">确定</el-button>
|
||||
<el-button type="primary" :icon="Delete" @click="empty(1)" size="small">清空表格</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- 电流通道内容 -->
|
||||
@@ -135,23 +125,13 @@
|
||||
<el-table-column prop="inharm" align="center" label="次数" width="60" />
|
||||
<el-table-column prop="famp" align="center" label="间谐波含有率">
|
||||
<template #default="{ row }">
|
||||
<el-input
|
||||
type="number"
|
||||
v-if="row.show"
|
||||
|
||||
v-model="row.famp"
|
||||
/>
|
||||
<el-input type="number" v-if="row.show" v-model="row.famp" />
|
||||
<span v-else>{{ row.famp }}%</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="fphase" label="间谐波相角" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-input
|
||||
type="number"
|
||||
v-if="row.show"
|
||||
|
||||
v-model="row.fphase"
|
||||
/>
|
||||
<el-input type="number" v-if="row.show" v-model="row.fphase" />
|
||||
<span v-else>{{ row.fphase }}°</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
200
frontend/src/views/machine/testScript/components/viewRow.vue
Normal file
200
frontend/src/views/machine/testScript/components/viewRow.vue
Normal file
@@ -0,0 +1,200 @@
|
||||
<template>
|
||||
<el-dialog v-model="dialogVisible" title="频率_额定工作条件下的检测_详情" v-bind="dialogBig">
|
||||
<!-- <el-descriptions :column="5" border>
|
||||
<el-descriptions-item label="脚本名称">测试</el-descriptions-item>
|
||||
<el-descriptions-item label="参照标准名称">GBT 19862</el-descriptions-item>
|
||||
<el-descriptions-item label="标准推行年份">2025</el-descriptions-item>
|
||||
<el-descriptions-item label="模板类型">模版</el-descriptions-item>
|
||||
<el-descriptions-item label="值类型">相对值</el-descriptions-item>
|
||||
</el-descriptions> -->
|
||||
<!-- tableData?.channelList -->
|
||||
<el-tabs type="border-card">
|
||||
<el-tab-pane :label="`L${item}`" v-for="item in 3">
|
||||
<div class="tabPane">
|
||||
<el-descriptions :column="4" border>
|
||||
<el-descriptions-item label-align="right" label="电压有效值(%)">
|
||||
{{
|
||||
tableData?.channelList[item * 2 - 2].famp == null
|
||||
? '/'
|
||||
: tableData?.channelList[item * 2 - 2].famp
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label-align="right" label="电压相角(°)">
|
||||
{{
|
||||
tableData?.channelList[item * 2 - 2].fphase
|
||||
? '/'
|
||||
: tableData?.channelList[item * 2 - 2].fphase
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label-align="right" label="电流有效值(%)">
|
||||
{{
|
||||
tableData?.channelList[item * 2 - 1].famp == null
|
||||
? '/'
|
||||
: tableData?.channelList[item * 2 - 1].famp
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label-align="right" label="电流相角(°)">
|
||||
{{
|
||||
tableData?.channelList[item * 2 - 1].fphase == null
|
||||
? '/'
|
||||
: tableData?.channelList[item * 2 - 1].fphase
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label-align="right" label="变动频度(次/min)">
|
||||
{{ tableData?.channelList[item * 2 - 2].flickerData.fchagFre || '/' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label-align="right" label="变动量(%)">
|
||||
{{ tableData?.channelList[item * 2 - 2].flickerData.fchagValue || '/' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label-align="right" label="波类型">
|
||||
{{
|
||||
tableData?.channelList[item * 2 - 2].flickerData.fchagValue == ''
|
||||
? '/'
|
||||
: tableData?.channelList[item * 2 - 2].flickerData.waveFluType
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label-align="right" label="占空比(%)">
|
||||
{{
|
||||
tableData?.channelList[item * 2 - 2].flickerData.fchagValue == ''
|
||||
? '/'
|
||||
: tableData?.channelList[item * 2 - 2].flickerData.fdutyCycle
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label-align="right" label="设定幅度(%)">
|
||||
{{ tableData?.channelList[item * 2 - 2].dipData.ftransValue || '/' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label-align="right" label="持续时间(s)">
|
||||
{{ tableData?.channelList[item * 2 - 2].dipData.retainTime || '/' }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<!-- <el-descriptions :column="3" title="谐波电压" border class="mt10">
|
||||
<div v-for="k in tableData?.channelList[item * 2 - 2].harmList">
|
||||
<el-descriptions-item label-align="right" label="次数">{{ k.harm }}</el-descriptions-item>
|
||||
<el-descriptions-item label-align="right" label="谐波含有率(%)">{{k.famp}}</el-descriptions-item>
|
||||
<el-descriptions-item label-align="right" label="谐波相角(°)">{{k.fphase}}</el-descriptions-item>
|
||||
</div>
|
||||
</el-descriptions>
|
||||
<el-descriptions :column="3" title="谐波电流" border class="mt10">
|
||||
<div v-for="k in tableData?.channelList[item * 2 - 2].harmList">
|
||||
<el-descriptions-item label-align="right" label="次数">{{ k.harm }}</el-descriptions-item>
|
||||
<el-descriptions-item label-align="right" label="谐波含有率(%)">{{k.famp}}</el-descriptions-item>
|
||||
<el-descriptions-item label-align="right" label="谐波相角(°)">{{k.fphase}}</el-descriptions-item>
|
||||
</div>
|
||||
</el-descriptions> -->
|
||||
<div style="display: flex" class="mt10">
|
||||
<el-tabs type="border-card" style="flex: 1">
|
||||
<el-tab-pane label="谐波电压">
|
||||
<el-table
|
||||
:data="tableData?.channelList[item * 2 - 2].harmList"
|
||||
border
|
||||
size="small"
|
||||
:header-cell-style="{
|
||||
textAlign: 'center',
|
||||
backgroundColor: '#003078',
|
||||
color: '#fff'
|
||||
}"
|
||||
stripe
|
||||
:cell-style="{ textAlign: 'center' }"
|
||||
height="250px"
|
||||
>
|
||||
<el-table-column prop="harm" label="次数" />
|
||||
<el-table-column prop="famp" label="谐波含有率(%)" />
|
||||
<el-table-column prop="fphase" label="谐波相角(°)" />
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<el-tabs type="border-card" class="ml10" style="flex: 1">
|
||||
<el-tab-pane label="谐波电流">
|
||||
<el-table
|
||||
:data="tableData?.channelList[item * 2 - 1].harmList"
|
||||
border
|
||||
size="small"
|
||||
:header-cell-style="{
|
||||
textAlign: 'center',
|
||||
backgroundColor: '#003078',
|
||||
color: '#fff'
|
||||
}"
|
||||
stripe
|
||||
:cell-style="{ textAlign: 'center' }"
|
||||
height="250px"
|
||||
>
|
||||
<el-table-column prop="harm" label="次数" />
|
||||
<el-table-column prop="famp" label="谐波含有率(%)" />
|
||||
<el-table-column prop="fphase" label="谐波相角(°)" />
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
<div style="display: flex" class="mt10">
|
||||
<el-tabs type="border-card" style="flex: 1">
|
||||
<el-tab-pane label="间谐波电压">
|
||||
<el-table
|
||||
:data="tableData1"
|
||||
border
|
||||
size="small"
|
||||
:header-cell-style="{
|
||||
textAlign: 'center',
|
||||
backgroundColor: '#003078',
|
||||
color: '#fff'
|
||||
}"
|
||||
stripe
|
||||
:cell-style="{ textAlign: 'center' }"
|
||||
height="250px"
|
||||
>
|
||||
<el-table-column prop="name" label="次数" />
|
||||
<el-table-column prop="value" label="间谐波含有率(%)" />
|
||||
<el-table-column prop="errorFlag" label="间谐波相角(°)" />
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<el-tabs type="border-card" class="ml10" style="flex: 1">
|
||||
<el-tab-pane label="间谐波电流">
|
||||
<el-table
|
||||
:data="tableData1"
|
||||
border
|
||||
size="small"
|
||||
:header-cell-style="{
|
||||
textAlign: 'center',
|
||||
backgroundColor: '#003078',
|
||||
color: '#fff'
|
||||
}"
|
||||
stripe
|
||||
:cell-style="{ textAlign: 'center' }"
|
||||
height="250px"
|
||||
>
|
||||
<el-table-column prop="name" label="次数" />
|
||||
<el-table-column prop="value" label="间谐波含有率(%)" />
|
||||
<el-table-column prop="errorFlag" label="间谐波相角(°)" />
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane label="参考设定值列表">L3</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive } from 'vue'
|
||||
import { dialogBig } from '@/utils/elementBind'
|
||||
const dialogVisible = ref(false)
|
||||
|
||||
const tableData: any = ref({})
|
||||
const open = (row: any) => {
|
||||
console.log('🚀 ~ open ~ row:', row)
|
||||
tableData.value = row
|
||||
dialogVisible.value = true
|
||||
}
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
:deep(.el-descriptions__cell) {
|
||||
width: 12.5%;
|
||||
}
|
||||
:deep(.tabPane) {
|
||||
height: 550px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user