This commit is contained in:
caozehui
2025-03-24 19:56:11 +08:00
parent d7df999cf2
commit 312490ce59
2 changed files with 116 additions and 118 deletions

View File

@@ -31,9 +31,8 @@
</template>
<script lang="ts" setup name="IndicatorTypeDialog">
import { defineProps, defineEmits, reactive,watch,ref,computed, type CSSProperties } from 'vue';
import {computed, type CSSProperties, defineProps, ref} from 'vue';
import {dialogBig} from '@/utils/elementBind'
import type { ColumnProps } from '@/components/ProTable/interface'
import type {ErrorSystem} from '@/api/device/interface/error'
import errorDataList from '@/api/device/error/errorData'
import type {TableColumnCtx} from 'element-plus'
@@ -274,12 +273,12 @@ const close = () => {
const open = async (sign: string, data: ErrorSystem.ErrorSystemList) => {
dialogTitle.value = sign + ' 误差体系'
dialogVisible.value = true
if (data.id) {
formContent.value = data as ErrorSystem.ErrorSystemList;
devLevelName.value = dictStore.getDictData('Dev_Level').find(item => item.id === data.devLevel)?.name || '';
devLevelName.value = dictStore.getDictData('Dev_Level').find(item => item.id === data.devLevel)?.name || '';;
if(devLevelName.value === 'A级'){
if (devLevelName.value === 'A级' || data.devLevel === 'A级') {
errorData.value = errorDataList.errorADetail as unknown as ErrorSystem.Error_detail[];
} else {
errorData.value = errorDataList.errorSDetail as unknown as ErrorSystem.Error_detail[];

View File

@@ -219,9 +219,7 @@ const columns = reactive<ColumnProps<Plan.ReqPlan>[]>([
width: 360,
render: scope => {
return (
<el-link type='primary' link onClick={() => showTestScript(scope.row.scriptId)}>
{scope.row.scriptName}
</el-link>
<span>{scope.row.scriptName}</span>
)
},
},
@@ -231,7 +229,7 @@ const columns = reactive<ColumnProps<Plan.ReqPlan>[]>([
width: 200,
render: scope => {
return (
<el-link type='primary' link onClick={() => showData(scope.row.errorSysName || '')}>
<el-link type='primary' link onClick={() => showData(scope.row)}>
{scope.row.errorSysName}
</el-link>
)
@@ -282,8 +280,9 @@ function isVisible(row: Plan.ReqPlan) {
}
function showData(row: string) {
errorStandardPopup.value?.open(row, row)
function showData(row: any) {
let split = row.errorSysName.split('-')
errorStandardPopup.value?.open(row.errorSysName, {id:row.errorSysId,devLevel:split[split.length-1]})
}
async function showTestSource(row:string) {