检测计划列表编辑

This commit is contained in:
sjl
2025-07-29 18:35:46 +08:00
parent 6e22c01dd8
commit 0079f7415e
3 changed files with 56 additions and 26 deletions

View File

@@ -188,7 +188,7 @@ const columns = reactive<ColumnProps<Device.ResPqDev>[]>([
fieldNames: {label: 'name', value: 'id'},
minWidth: 200,
},
{
{
prop: 'cityName',
label: '地市',
minWidth: 150,
@@ -383,6 +383,11 @@ const open = async (textTitle: string,data: Plan.ReqPlan,pattern: string) => {
proTable.value?.getTableList()
isTabPlanFather.value = false//子计划页面按钮默认展示主计划的
patternId.value = pattern
columns.forEach(item => {//刚进去子计划页面隐藏主计划的操作列
if (item.prop === 'operation') {
item.isShow = false;
}
});
console.log('弹窗打开方法',planFormContent.value)
}
@@ -393,6 +398,9 @@ const handleTabClick = (tab:any) => {
if (item.prop === 'boundPlanName') {
item.isShow = false;
}
if (item.prop === 'operation') {
item.isShow = true;
}
});
isTabPlanFather.value = true
}else{
@@ -400,6 +408,9 @@ const handleTabClick = (tab:any) => {
if (item.prop === 'boundPlanName') {
item.isShow = true;
}
if (item.prop === 'operation') {
item.isShow = false;
}
});
isTabPlanFather.value = false
}

View File

@@ -487,17 +487,28 @@ const exportClick = () => {
// 打开 drawer(新增、编辑)
const openDialog = (titleType: string, row: Partial<Plan.ReqPlan> = {}) => {
if(modeStore.currentMode == '比对式'){
if(row.children?.length > 0){
planPopup.value?.open(titleType, row,modeStore.currentMode,0)//0主计划 1子计划 2修改子计划
}else{
planPopup.value?.open(titleType, row,modeStore.currentMode,2)//0主计划 1子计划 2修改子计划
let planType = 0; // 0主计划 1子计划 2修改子计划
if (modeStore.currentMode === '比对式') {
if (titleType === 'add') {
// 新增只能是主计划
planType = 0;
} else {
// 编辑情况
if (row.children?.length > 0) {
// 有子计划 -> 主计划
planType = 0;
} else if (row.origin == null) {
// 没有来源 -> 主计划
planType = 0;
} else {
// 其他 -> 修改子计划
planType = 2;
}
}else{
planPopup.value?.open(titleType, row,modeStore.currentMode,0)//0主计划 1子计划 2修改子计划
}
}
planPopup.value?.open(titleType, row, modeStore.currentMode, planType);
}