合并
This commit is contained in:
@ -240,17 +240,17 @@ const initFormData: ContractorToolEntryForm = {
|
||||
recordNumber: undefined
|
||||
};
|
||||
const info = ref({
|
||||
contractorName:undefined,
|
||||
toolNumber:undefined,
|
||||
toolName:undefined,
|
||||
toolModel:undefined
|
||||
contractorName: undefined,
|
||||
toolNumber: undefined,
|
||||
toolName: undefined,
|
||||
toolModel: undefined
|
||||
});
|
||||
const data = reactive<PageData<ContractorToolEntryForm, ContractorToolEntryQuery>>({
|
||||
form: { ...initFormData },
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
projectId: currentProject.value.id,
|
||||
projectId: currentProject.value?.id,
|
||||
contractorId: undefined,
|
||||
contractorToolId: undefined,
|
||||
toolNumber: undefined,
|
||||
@ -314,7 +314,7 @@ const handleAdd = (type, label) => {
|
||||
titleLable.value = label;
|
||||
dialog.visible = true;
|
||||
form.value.recordType = type;
|
||||
dialog.title = '工器具'+(type==1?'进场':'出场');
|
||||
dialog.title = '工器具' + (type == 1 ? '进场' : '出场');
|
||||
};
|
||||
|
||||
/** 修改按钮操作 */
|
||||
@ -364,12 +364,11 @@ const getAll = (obj) => {
|
||||
initFormData.contractorToolId = obj.id;
|
||||
data.form.contractorToolId = obj.id;
|
||||
data.queryParams.contractorToolId = obj.id;
|
||||
getDetail( obj.id);
|
||||
getDetail(obj.id);
|
||||
getList();
|
||||
};
|
||||
defineExpose({
|
||||
getAll
|
||||
});
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
</script>
|
||||
|
||||
@ -172,7 +172,7 @@ const dialogLevan = reactive<DialogOption>({
|
||||
|
||||
const initFormData: ContractorToolForm = {
|
||||
id: undefined,
|
||||
projectId: currentProject.value.id,
|
||||
projectId: currentProject.value?.id,
|
||||
contractorId: undefined,
|
||||
toolName: undefined,
|
||||
toolType: undefined,
|
||||
@ -186,7 +186,7 @@ const data = reactive<PageData<ContractorToolForm, ContractorToolQuery>>({
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
projectId: currentProject.value.id,
|
||||
projectId: currentProject.value?.id,
|
||||
contractorId: undefined,
|
||||
toolName: undefined,
|
||||
toolType: undefined,
|
||||
@ -210,7 +210,7 @@ const getSubList = async () => {
|
||||
const res = await listContractor({
|
||||
pageNum: 1,
|
||||
pageSize: 10000,
|
||||
projectId: currentProject.value.id
|
||||
projectId: currentProject.value?.id
|
||||
});
|
||||
contractorList.value = res.rows;
|
||||
handleQuery();
|
||||
@ -302,7 +302,7 @@ const handleDelete = async (row?: ContractorToolVO) => {
|
||||
|
||||
//监听项目id刷新数据
|
||||
const listeningProject = watch(
|
||||
() => currentProject.value.id,
|
||||
() => currentProject.value?.id,
|
||||
(nid, oid) => {
|
||||
queryParams.value.projectId = nid;
|
||||
form.value.projectId = nid;
|
||||
|
||||
Reference in New Issue
Block a user