Browse Source

修复禁用无效

master
wangxiang 3 years ago
parent
commit
316f17501d
  1. 16
      src/components/AMap/src/components/MapTaskModal.vue

16
src/components/AMap/src/components/MapTaskModal.vue

@ -20,7 +20,7 @@ @@ -20,7 +20,7 @@
label: '删除',
icon: 'ant-design:delete-outlined',
color: 'error',
disabled: !!state.taskOrdinaryCurrentEditRowRef || record.key == state.sendOrderTaskEditKeyRef,
disabled: !!state.taskOrdinaryCurrentEditRowRef || !~~state.mapData.sendOrderTaskType && record.sort == 1,
onClick: handleTaskOrdinaryDelete.bind(null, record)
}
])"
@ -47,7 +47,7 @@ @@ -47,7 +47,7 @@
label: '删除',
icon: 'ant-design:delete-outlined',
color: 'error',
disabled: !!state.taskPresetCurrentEditRowRef || record.key == state.sendOrderTaskEditKeyRef,
disabled: !!state.taskPresetCurrentEditRowRef || ~~state.mapData.sendOrderTaskType && record.sort == 1,
onClick: handleTaskPresetDelete.bind(null, record)
}
])"
@ -80,7 +80,6 @@ @@ -80,7 +80,6 @@
taskPresetCurrentEditRowRef: Nullable<Recordable>;
mapData: MapLogistic;
options: OptionsType;
sendOrderTaskEditKeyRef: string;
}
/** 通用变量统一声明区域 */
@ -92,8 +91,7 @@ @@ -92,8 +91,7 @@
courierUserList: null,
hospitalList: null,
orgList: null
},
sendOrderTaskEditKeyRef: ''
}
});
const emit = defineEmits(['success', 'register']);
const [registerModal, { setModalProps, closeModal }] = useModalInner(async data => {
@ -103,10 +101,6 @@ @@ -103,10 +101,6 @@
state.options = options as OptionsType;
const props: Partial<ModalProps> = { confirmLoading: false };
props.title = '任务配置';
const sendOrderMapTask = state.mapData.mapTask
.filter(item => item.taskType == state.mapData.sendOrderTaskType)
.find(item => item.sort == 1);
state.sendOrderTaskEditKeyRef = sendOrderMapTask?.key;
const taskOrdinaryUpdateColumns: BasicColumn[] = [
{
title: '医院',
@ -117,7 +111,7 @@ @@ -117,7 +111,7 @@
editComponentProps: ({ text, record, column, index }) => ({
style: { width:'100%' },
options: state.options.hospitalList,
disabled: record.key == state.sendOrderTaskEditKeyRef
disabled: !~~state.mapData.sendOrderTaskType && record.sort == 1
}),
editValueMap: value => state.options.hospitalList?.find(item => item.value == value)?.label || value
},
@ -143,7 +137,7 @@ @@ -143,7 +137,7 @@
editComponentProps: ({ text, record, column, index }) => ({
style: { width:'100%' },
options: state.options.hospitalList,
disabled: record.key == state.sendOrderTaskEditKeyRef
disabled: ~~state.mapData.sendOrderTaskType && record.sort == 1
}),
editValueMap: value => state.options.hospitalList?.find(item => item.value == value)?.label || value
},

Loading…
Cancel
Save