Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
weiqiao-vue
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
金民
weiqiao-vue
Commits
8734d750
Commit
8734d750
authored
Feb 26, 2026
by
sunhaiwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改过程质检单页面质检明细的回显
parent
13b212c8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
8 deletions
+15
-8
xjrsoft-vue3/src/views/zlgl/cgzjd/components/Form.vue
+15
-8
No files found.
xjrsoft-vue3/src/views/zlgl/cgzjd/components/Form.vue
View file @
8734d750
...
@@ -54,11 +54,18 @@
...
@@ -54,11 +54,18 @@
deep
:
true
,
deep
:
true
,
},
},
);
);
// 1. 定义初始化标记(默认不执行)
let
isInitialized
=
false
;
// 质检方案联动:根据方案id从接口获取明细,并整体替换当前明细列表
// 质检方案联动:根据方案id从接口获取明细,并整体替换当前明细列表
let
zjfaReqSeq
=
0
;
let
zjfaReqSeq
=
0
;
async
function
handleZjfaChange
(
zjfaId
:
string
)
{
async
function
handleZjfaChange
(
zjfaId
:
string
)
{
const
seq
=
++
zjfaReqSeq
;
const
seq
=
++
zjfaReqSeq
;
// 2. 初始化阶段直接返回(不执行后续逻辑)
if
(
!
isInitialized
)
{
// 可选:初始化完成后开启开关(如果需要后续操作生效)
isInitialized
=
true
;
return
;
}
try
{
try
{
const
resp
=
await
axios
.
get
(
const
resp
=
await
axios
.
get
(
import
.
meta
.
env
.
VITE_GLOB_API_URL
+
'/magic-api/zlgl/zjjcsj/getFaById'
,
import
.
meta
.
env
.
VITE_GLOB_API_URL
+
'/magic-api/zlgl/zjjcsj/getFaById'
,
...
@@ -103,6 +110,8 @@
...
@@ -103,6 +110,8 @@
if
(
!
newZjfaId
)
{
if
(
!
newZjfaId
)
{
state
.
formModel
=
{
...(
state
.
formModel
as
any
),
mesQualityInspectionDetailList
:
[]
};
state
.
formModel
=
{
...(
state
.
formModel
as
any
),
mesQualityInspectionDetailList
:
[]
};
systemFormRef
.
value
?.
setFieldsValue
?.({
mesQualityInspectionDetailList
:
[]
});
systemFormRef
.
value
?.
setFieldsValue
?.({
mesQualityInspectionDetailList
:
[]
});
//没有值将初始化标识改为true
isInitialized
=
true
;
return
;
return
;
}
}
await
handleZjfaChange
(
newZjfaId
);
await
handleZjfaChange
(
newZjfaId
);
...
@@ -171,12 +180,12 @@
...
@@ -171,12 +180,12 @@
systemFormRef
.
value
,
systemFormRef
.
value
,
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:获取表单数据
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:获取表单数据
// 打开编辑弹窗时:用当前方案id刷新明细(放在 getFormDataEvent 后,避免被其覆盖)
await
nextTick
();
await
nextTick
();
const
zjfaId
=
(
state
.
formModel
as
any
)?.
zjfa
;
const
nextModel
=
{
if
(
zjfaId
)
{
...(
state
.
formModel
as
any
),
await
handleZjfaChange
(
zjfaId
);
mesQualityInspectionDetailList
:
record
[
"mesQualityInspectionDetailList"
],
}
};
state
.
formModel
=
nextModel
;
}
catch
(
error
)
{
}
catch
(
error
)
{
}
}
...
@@ -285,4 +294,3 @@
...
@@ -285,4 +294,3 @@
});
});
</
script
>
</
script
>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment