检测首页增加不同入口的默认选择状态和禁止选择状态

This commit is contained in:
GYYM
2024-11-07 20:41:32 +08:00
parent 4695a82b38
commit 9804baf8a3
11 changed files with 425 additions and 214 deletions

View File

@@ -33,7 +33,7 @@
<!-- <el-button type='primary' :icon='Download' >下载报告</el-button> -->
<!-- 表格操作 -->
<template #operation='scope'>
<el-button type='primary' link :icon='View' >查看</el-button>
<!-- <el-button type='primary' link :icon='View' >查看</el-button> -->
<el-button type='primary' link :icon='Delete' >移除</el-button>
</template>
</ProTable>
@@ -100,7 +100,7 @@
label: '归档状态',
minWidth: 130,
},
{ prop: 'operation', label: '操作', fixed: 'right', minWidth: 200 },
{ prop: 'operation', label: '操作', fixed: 'right', minWidth: 150 },
])
const open = (textTitle: string) => {

View File

@@ -96,7 +96,7 @@
minWidth: 120,
},
{
prop: 'PlanName',
prop: 'planName',
label: '所属计划',
search: { el: 'input' },
minWidth: 280,

View File

@@ -9,10 +9,10 @@
<el-form-item label="父计划" prop="father_Plan_Id" :label-width="100">
<el-select v-model="formData.father_Plan_Id" placeholder="请选择父计划" autocomplete="off" :disabled="isReadOnly" @change="fatherPlanChange">
<el-option
v-for="plan in fatherPlanList"
:key="plan.value"
v-for="plan in testFatherPlanList"
:key="plan.id"
:label="plan.label"
:value="plan.value">
:value="plan.id">
</el-option>
</el-select>
</el-form-item>
@@ -62,7 +62,7 @@
import{ElMessage, FormInstance,FormItemRule}from'element-plus'
import { defineProps, defineEmits, reactive,watch,ref, Ref } from 'vue';
import { dialogSmall} from '@/utils/elementBind'
import {dictPattern,dictTestState,dictReportState,dictResult,testPlanDataList,testSoureDataList,testScriptDataList,testErrSystDataList,planData} from '@/api/plan/planData'
import {dictPattern,dictTestState,dictReportState,dictResult,testPlanDataList,testSoureDataList,testScriptDataList,testErrSystDataList,planData,testFatherPlanList} from '@/api/plan/planData'
const props = defineProps<{
visible: boolean;

View File

@@ -26,7 +26,7 @@
<!-- <el-button type='primary' :icon='Download' >下载报告</el-button> -->
<!-- 表格操作 -->
<template #operation='scope'>
<el-button type='primary' link :icon='View' >查看</el-button>
<!-- <el-button type='primary' link :icon='View' >查看</el-button> -->
<el-button type='primary' link :icon='Delete' >移除</el-button>
</template>
</ProTable>
@@ -77,7 +77,7 @@
search: { el: 'select' },
minWidth: 150,
},
{ prop: 'operation', label: '操作', fixed: 'right', width: 330 },
{ prop: 'operation', label: '操作', fixed: 'right', width: 150 },
])
const open = (textTitle: string) => {

View File

@@ -45,7 +45,7 @@ import ProTable from '@/components/ProTable/index.vue'
import TimeControl from '@/components/TimeControl/index.vue'
import type { ProTableInstance,ColumnProps } from '@/components/ProTable/interface'
import { CirclePlus, Delete,EditPen,View,Upload,Download,List} from '@element-plus/icons-vue'
import {dictPattern,dictTestState,dictReportState,dictResult,testPlanDataList,testSoureDataList,testScriptDataList,testErrSystDataList,planData} from '@/api/plan/planData'
import {dictPattern,dictTestState,dictReportState,dictResult,testPlanDataList,testSoureDataList,testScriptDataList,testErrSystDataList,planData,testFatherPlanList} from '@/api/plan/planData'
import { reactive,ref } from 'vue'
import type { Plan } from '@/api/plan/interface'
import planPopup from "@/views/plan/planList/components/planPopup.vue"; // 导入子组件
@@ -121,37 +121,40 @@ const columns = reactive<ColumnProps<Plan.PlanBO>[]>([
prop: 'test_State',
label: '检测状态',
width: 100,
enum: dictStore.getDictData('planTestState'),
enum: dictTestState,
// enum: dictStore.getDictData('planTestState'),
search: { el: 'select', props: { filterable: true } },
fieldNames: { label: 'label', value: 'code' },
fieldNames: { label: 'label', value: 'id' },
},
{
prop: 'report_State',
label: '检测报告状态',
width: 150,
enum: dictStore.getDictData('planReportState'),
enum: dictReportState,
// enum: dictStore.getDictData('planReportState'),
search: { el: 'select', props: { filterable: true } },
fieldNames: { label: 'label', value: 'code' },
fieldNames: { label: 'label', value: 'id' },
},
{
prop: 'result',
label: '检测结果',
width: 100,
enum: dictStore.getDictData('planResult'),
enum: dictResult,
// enum: dictStore.getDictData('planResult'),
search: { el: 'select', props: { filterable: true } },
fieldNames: { label: 'label', value: 'code' },
fieldNames: { label: 'label', value: 'id' },
},
{
prop: 'father_Plan_Id',
label: '父节点',
width: 200,
enum: testFatherPlanList,
fieldNames: { label: 'label', value: 'id' },
},
{ prop: 'operation', label: '操作', fixed: 'right' ,width: 500, },
])
const fileInput = ref<HTMLInputElement | null>(null); // 声明 fileInput
function openFileDialog() {
if (fileInput.value) {