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> </template>
<script lang="ts" setup name="IndicatorTypeDialog"> <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 {dialogBig} from '@/utils/elementBind'
import type { ColumnProps } from '@/components/ProTable/interface'
import type {ErrorSystem} from '@/api/device/interface/error' import type {ErrorSystem} from '@/api/device/interface/error'
import errorDataList from '@/api/device/error/errorData' import errorDataList from '@/api/device/error/errorData'
import type {TableColumnCtx} from 'element-plus' import type {TableColumnCtx} from 'element-plus'
@@ -274,12 +273,12 @@ const close = () => {
const open = async (sign: string, data: ErrorSystem.ErrorSystemList) => { const open = async (sign: string, data: ErrorSystem.ErrorSystemList) => {
dialogTitle.value = sign + ' 误差体系' dialogTitle.value = sign + ' 误差体系'
dialogVisible.value = true dialogVisible.value = true
if (data.id) { if (data.id) {
formContent.value = data as ErrorSystem.ErrorSystemList; 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级' || data.devLevel === 'A级') {
if(devLevelName.value === 'A级'){
errorData.value = errorDataList.errorADetail as unknown as ErrorSystem.Error_detail[]; errorData.value = errorDataList.errorADetail as unknown as ErrorSystem.Error_detail[];
} else { } else {
errorData.value = errorDataList.errorSDetail as unknown as ErrorSystem.Error_detail[]; errorData.value = errorDataList.errorSDetail as unknown as ErrorSystem.Error_detail[];

View File

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