Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qr-consistency-vue3
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘怀志
qr-consistency-vue3
Commits
eb2d36d3
Commit
eb2d36d3
authored
May 09, 2025
by
Mr.Tang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
对应关系国内国际bug修复
parent
f676ae7e
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
290 additions
and
135 deletions
+290
-135
baseLawPartCertificateMiddle.js
src/api/RelationManagement/baseLawPartCertificateMiddle.js
+1
-1
baseLawPartRelation.js
src/api/RelationManagement/baseLawPartRelation.js
+2
-11
cn.json
...lan/relationshipManagement/domesticRegulationPart/cn.json
+1
-1
en.json
...lan/relationshipManagement/domesticRegulationPart/en.json
+1
-1
index.vue
...n/relationshipManagement/domesticRegulationPart/index.vue
+150
-82
index.vue
...ationshipManagement/internationalRegulationPart/index.vue
+135
-39
No files found.
src/api/RelationManagement/baseLawPartCertificateMiddle.js
View file @
eb2d36d3
...
...
@@ -3,7 +3,7 @@ import request from '@/utils/request'
export
function
list
(
query
)
{
return
request
({
url
:
'/control/lawPartMiddle/list'
,
method
:
'
ge
t'
,
method
:
'
pos
t'
,
data
:
query
,
})
}
...
...
src/api/RelationManagement/baseLawPartRelation.js
View file @
eb2d36d3
...
...
@@ -27,15 +27,6 @@ export function partDetails(query) {
})
}
// 新增法规与关键件对应数据管理
export
function
addRelation
(
data
)
{
return
request
({
url
:
'/control/lawPartRelation/add'
,
method
:
'post'
,
data
:
data
,
})
}
// 修改法规与关键件对应数据管理
export
function
updateRelation
(
data
)
{
return
request
({
...
...
@@ -56,8 +47,8 @@ export function addBatchRelation(query) {
/** 移除对应关系 */
export
function
delRelation
(
id
)
{
return
request
({
url
:
'/control/lawPartRelation/del/'
+
id
,
method
:
'
delete
'
,
url
:
`/control/lawPartRelation/del/
${
id
}
`
,
method
:
'
get
'
,
})
}
/**查询没有关联的零部件 */
...
...
src/locales/controlPlan/relationshipManagement/domesticRegulationPart/cn.json
View file @
eb2d36d3
...
...
@@ -3,7 +3,7 @@
"source"
:
"来源"
,
"standardName"
:
"标准名称"
,
"partName"
:
"零件名称"
,
"notice"
:
"共
5
个未关联法规的CQC关键零部件"
,
"notice"
:
"共个未关联法规的CQC关键零部件"
,
"serialNumber"
:
"序号"
,
"correspondingParts"
:
"对应零件"
,
"createTime"
:
"创建时间"
,
...
...
src/locales/controlPlan/relationshipManagement/domesticRegulationPart/en.json
View file @
eb2d36d3
...
...
@@ -3,7 +3,7 @@
"source"
:
"Source"
,
"standardName"
:
"Standard Name"
,
"partName"
:
"Part Name"
,
"notice"
:
"
A total of 5 CQC key components not related to
regulations"
,
"notice"
:
"
CQC key components without associated
regulations"
,
"serialNumber"
:
"Serial Number"
,
"correspondingParts"
:
"Corresponding Parts"
,
"order"
:
"order"
,
...
...
src/views/controlPlan/relationshipManagement/domesticRegulationPart/index.vue
View file @
eb2d36d3
This diff is collapsed.
Click to expand it.
src/views/controlPlan/relationshipManagement/internationalRegulationPart/index.vue
View file @
eb2d36d3
...
...
@@ -167,27 +167,35 @@
<!-- 维护类型描述抽屉 -->
<el-drawer
v-model=
"open"
:title=
"title"
width=
"800px"
append-to-body
>
<el-form
ref=
"middleRef"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form
ref=
"middleRef"
:model=
"queryParams"
:rules=
"rules"
label-width=
"80px"
>
<el-row>
<el-form-item
label=
"项目"
prop=
"project"
>
<el-input
placeholder=
"请输入"
style=
"width: 150px"
/>
<el-form-item
label=
"项目"
prop=
"typeDescription"
>
<el-input
v-model=
"queryParams.typeDescription"
placeholder=
"请输入"
style=
"width: 150px"
/>
</el-form-item>
<el-button
style=
"margin-left: 10px; width: 110px"
class=
"btn-A"
@
click=
"handleQuery"
@
click=
"handleQuery
2
"
>
{{ cn.search }}/{{ en.search }}
</el-button
>
<el-button
class=
"btn-B"
@
click=
"resetQuery"
<el-button
class=
"btn-B"
@
click=
"resetQuery
2
"
>
{{ cn.reset }}/{{ en.reset }}
</el-button
>
<el-button
class=
"btn-C"
@
click=
"
handleAdd
"
<el-button
class=
"btn-C"
@
click=
"
() => handleAdd(currentRow)
"
>
{{ cn.add }}/{{ en.add }}
</el-button
>
</el-row>
</el-form>
<el-table
:key=
"drawerPartKey"
v-loading=
"loading"
:data=
"drawerPartList"
border
...
...
@@ -335,16 +343,19 @@
</el-dialog>
<!-- 查看对应零件 -->
<el-drawer
v-model=
"open2"
:title=
"title"
append-to-body
>
<el-form
ref=
"
partRef"
:model=
"form
"
label-width=
"70px"
>
<el-form
ref=
"
middleRef"
:model=
"queryParams
"
label-width=
"70px"
>
<el-row>
<el-form-item
label=
"零件名称"
prop=
"partName"
>
<el-input
v-model=
"form.partName"
placeholder=
"请输入"
/>
<el-form-item
label=
"零件名称"
prop=
"criticalPartNameCn"
>
<el-input
v-model=
"queryParams.criticalPartNameCn"
placeholder=
"请输入"
/>
</el-form-item>
<el-form-item>
<el-button
class=
"btn-A"
@
click=
"handleQuery"
<el-button
class=
"btn-A"
@
click=
"handleQuery
1
"
>
{{ cn.search }}/{{ en.search }}
</el-button
>
<el-button
class=
"btn-B"
@
click=
"resetQuery"
<el-button
class=
"btn-B"
@
click=
"resetQuery
1
"
>
{{ cn.reset }}/{{ en.reset }}
</el-button
>
</el-form-item>
...
...
@@ -439,8 +450,22 @@ const multiple = ref(true)
const
total
=
ref
(
0
)
const
title
=
ref
(
''
)
const
partDetailsList
=
ref
([])
const
currentRow
=
ref
(
null
)
// 存储当前行的数据
const
currentStandardName
=
ref
(
''
)
const
currentStandardNo
=
ref
(
''
)
// 在父组件中定义当前行数据
const
currentRow
=
ref
({})
// 修改后的数据部分
const
drawerData
=
ref
({
open
:
false
,
title
:
''
,
currentStandardName
:
''
,
list
:
[],
query
:
{
pageNum
:
1
,
pageSize
:
10
,
standardName
:
''
,
},
})
const
data
=
reactive
({
form
:
{},
queryParams
:
{
...
...
@@ -478,16 +503,6 @@ function getList() {
})
}
function
listAll
()
{
loading
.
value
=
true
list
(
queryParams
.
value
).
then
((
response
)
=>
{
drawerPartList
.
value
=
response
console
.
log
(
'------------------'
,
response
)
total
.
value
=
response
.
total
loading
.
value
=
false
})
}
// 取消按钮
function
cancel
()
{
open
.
value
=
false
...
...
@@ -506,13 +521,14 @@ function reset() {
delFlag
:
null
,
partId
:
null
,
standardNumberId
:
null
,
typeDescription
:
null
,
}
proxy
.
resetForm
(
'middleRef'
)
}
/*查看零件详情抽屉*/
function
showPartDialog
(
row
)
{
//currentRow.value = row // 保存当前行
currentStandardName
.
value
=
row
.
standardName
// 保存当前行的 standardName
open2
.
value
=
true
// 打开对话框
this
.
title
=
`查看对应零件(
${
row
.
standardNumber
}
,共
${
row
.
partCount
}
个零件)`
// 设置对话框标题
getPartDetail
(
row
)
...
...
@@ -521,7 +537,11 @@ function getPartDetail(row) {
// 2. 发起请求
loading
.
value
=
true
console
.
log
(
'row'
,
row
)
partDetails
({
standardNo
:
row
.
standardNumber
})
currentStandardNo
.
value
=
row
.
standardNumber
partDetails
({
...
queryParams
.
value
,
standardNo
:
currentStandardNo
.
value
,
})
.
then
((
response
)
=>
{
partDetailsList
.
value
=
response
.
data
||
response
// 兼容不同API结构
total
.
value
=
partDetailsList
.
value
.
length
...
...
@@ -545,6 +565,30 @@ function resetQuery() {
proxy
.
resetForm
(
'middleRef'
)
handleQuery
()
}
function
handleQuery1
()
{
queryParams
.
value
.
pageNum
=
1
getPartDetail
({
criticalPartNameCn
:
queryParams
.
value
.
criticalPartNameCn
,
standardNo
:
currentStandardNo
.
value
,
// 确保此处已赋值
})
}
/** 重置按钮操作 */
function
resetQuery1
()
{
proxy
.
resetForm
(
'middleRef'
)
handleQuery1
()
}
function
handleQuery2
()
{
//queryParams.value.pageNum = 1
listAll
()
}
/** 重置按钮操作 */
function
resetQuery2
()
{
proxy
.
resetForm
(
'middleRef'
)
handleQuery2
()
}
// 多选框选中数据
function
handleSelectionChange
(
selection
)
{
...
...
@@ -554,10 +598,16 @@ function handleSelectionChange(selection) {
}
/** 新增按钮操作 */
function
handleAdd
()
{
function
handleAdd
(
row
)
{
reset
()
open1
.
value
=
true
title
.
value
=
'新增类型描述'
// 确保 standardName 的来源
if
(
row
?.
standardName
)
{
form
.
value
.
standardName
=
row
.
standardName
}
else
if
(
currentRow
.
value
?.
standardName
)
{
form
.
value
.
standardName
=
currentRow
.
value
.
standardName
}
}
/** 修改按钮操作 */
...
...
@@ -567,15 +617,55 @@ function openDialogOpen1(row) {
}
// 维护类型描述抽屉
function
handleMaintain
(
row
)
{
reset
()
const
{
id
,
standardName
}
=
row
const
_id
=
id
||
ids
.
value
list
(
_id
,
standardName
).
then
((
response
)
=>
{
drawerPartList
.
value
=
response
title
.
value
=
'维护类型描述'
open
.
value
=
true
currentRow
.
value
=
row
console
.
log
(
'main'
,
row
)
currentStandardName
.
value
=
row
.
standardName
title
.
value
=
'维护类型描述'
open
.
value
=
true
listAll
(
row
)
}
function
listAll
(
row
=
currentRow
.
value
)
{
loading
.
value
=
true
list
({
// 显式声明为 URL 参数
...
queryParams
.
value
,
standardName
:
row
?.
standardName
,
}).
then
((
response
)
=>
{
drawerPartList
.
value
=
response
.
data
||
response
total
.
value
=
response
.
length
||
response
.
total
loading
.
value
=
false
})
}
// 修改后的方法部分
/*function handleMaintain(row) {
drawerData.value = {
...drawerData.value,
open: true,
title: `维护类型描述`,
currentStandardName: row.standardName,
query: {
...drawerData.value.query,
standardName: row.standardName,
},
}
listAll() // 立即加载数据
}
// 修改后的数据获取方法
function listAll() {
loading.value = true
list({
...drawerData.value.query,
standardName: drawerData.value.currentStandardName, // 确保使用当前标准名称
})
.then((response) => {
drawerData.value.list = response.rows || response
drawerData.value.total = response.total || response.length
})
.finally(() => {
loading.value = false
})
}*/
// 编辑对话框
function
handleEdit
(
row
)
{
reset
()
...
...
@@ -584,20 +674,28 @@ function handleEdit(row) {
open1
.
value
=
true
}
/** 提交按钮 */
function
submitForm
()
{
function
submitForm
(
row
)
{
proxy
.
$refs
[
'middleRef'
].
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
form
.
value
.
id
!=
null
)
{
updateMiddle
(
form
.
value
).
then
((
response
)
=>
{
updateMiddle
({
...
form
.
value
,
standardName
:
row
.
standardName
,
}).
then
((
response
)
=>
{
proxy
.
$modal
.
msgSuccess
(
'修改成功'
)
open1
.
value
=
false
listAll
()
getList
()
})
}
else
{
addMiddle
(
form
.
value
).
then
((
response
)
=>
{
addMiddle
({
...
form
.
value
,
standardName
:
form
.
value
.
standardName
,
}).
then
((
response
)
=>
{
proxy
.
$modal
.
msgSuccess
(
'新增成功'
)
open1
.
value
=
false
listAll
()
getList
()
})
}
}
...
...
@@ -631,7 +729,6 @@ function handleExport() {
}
/** 修改按钮操作 */
const
handleMoveUp
=
async
(
row
)
=>
{
console
.
log
()
try
{
await
moveUp
(
row
.
id
)
proxy
.
$modal
.
msgSuccess
(
'上移成功'
)
...
...
@@ -659,5 +756,4 @@ function colseDialogOpen1() {
open1.value = false
}
getList()
listAll()
</
script
>
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