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
3eda7149
Commit
3eda7149
authored
May 09, 2025
by
Mr.Tang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增对应关系国内国际零件名称下拉菜单
修复搜索、重置bug 补充部分中英文对照
parent
de09084a
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
149 additions
and
46 deletions
+149
-46
baseLawPartCertificateMiddle.js
src/api/RelationManagement/baseLawPartCertificateMiddle.js
+7
-0
baseLawPartRelation.js
src/api/RelationManagement/baseLawPartRelation.js
+7
-0
en.json
...lan/relationshipManagement/domesticRegulationPart/en.json
+1
-1
cn.json
...elationshipManagement/internationalRegulationPart/cn.json
+2
-1
en.json
...elationshipManagement/internationalRegulationPart/en.json
+2
-1
index.vue
...n/relationshipManagement/domesticRegulationPart/index.vue
+81
-23
index.vue
...ationshipManagement/internationalRegulationPart/index.vue
+49
-20
No files found.
src/api/RelationManagement/baseLawPartCertificateMiddle.js
View file @
3eda7149
...
...
@@ -40,3 +40,10 @@ export function delMiddle(id) {
method
:
'delete'
,
})
}
export
function
InternationalParts
(
query
)
{
return
request
({
url
:
'/control/baseInternationalKeyComponentsDetail/getCriticalPartName'
,
method
:
'get'
,
data
:
query
,
})
}
src/api/RelationManagement/baseLawPartRelation.js
View file @
3eda7149
...
...
@@ -67,3 +67,10 @@ export function selectCanRelateLaw(query) {
data
:
[
query
],
})
}
export
function
domesticParts
(
query
)
{
return
request
({
url
:
'/control/partsName/CqcPartsNamelist'
,
method
:
'get'
,
data
:
query
,
})
}
src/locales/controlPlan/relationshipManagement/domesticRegulationPart/en.json
View file @
3eda7149
...
...
@@ -9,7 +9,7 @@
"order"
:
"order"
,
"createTime"
:
"Create Time"
,
"updateTime"
:
"Update Time"
,
"operation"
:
"
o
peration"
,
"operation"
:
"
O
peration"
,
"add"
:
"add"
,
"handleUpdate"
:
"Edit"
,
"handleDelete"
:
"Delete"
,
...
...
src/locales/controlPlan/relationshipManagement/internationalRegulationPart/cn.json
View file @
3eda7149
...
...
@@ -28,6 +28,7 @@
"responsibleDepartmentForTheGuaranteePlan"
:
"保证计划书责任部门"
,
"typeDescription"
:
"类型描述"
,
"secondaryTypeDescription"
:
"二级类型描述"
,
"responsibleDepartment"
:
"责任部门"
"responsibleDepartment"
:
"责任部门"
,
"project"
:
"项目"
}
src/locales/controlPlan/relationshipManagement/internationalRegulationPart/en.json
View file @
3eda7149
...
...
@@ -29,5 +29,6 @@
"responsibleDepartmentForTheGuaranteePlan"
:
"Responsible department for the guarantee plan"
,
"typeDescription"
:
"Type Description"
,
"secondaryTypeDescription"
:
"Secondary Type Description"
,
"responsibleDepartment"
:
"Responsible Department"
"responsibleDepartment"
:
"Responsible Department"
,
"project"
:
"Project"
}
\ No newline at end of file
src/views/controlPlan/relationshipManagement/domesticRegulationPart/index.vue
View file @
3eda7149
...
...
@@ -2,7 +2,7 @@
<div
class=
"app-container"
>
<el-form
v-show=
"showSearch"
ref=
"
query
Ref"
ref=
"
part
Ref"
:model=
"queryParams"
:inline=
"true"
>
...
...
@@ -19,7 +19,7 @@
</el-form-item>
<el-form-item
:label=
"`$
{cn.standardName}/${en.standardName}`"
prop="standardN
umber
"
prop="standardN
ame
"
>
<el-input
v-model=
"queryParams.standardName"
...
...
@@ -29,12 +29,20 @@
/>
</el-form-item>
<el-form-item
:label=
"`$
{cn.partName}/${en.partName}`" prop="partName">
<el-
inpu
t
<el-
selec
t
v-model=
"queryParams.partName"
:placeholder=
"`$
{cn.pleaseChoose}/${en.pleaseChoose}`"
clearable
@keyup.enter="handleQuery"
/>
filterable
style="width: 200px"
>
<el-option
v-for=
"item in partOptions"
:key=
"item"
:label=
"item"
:value=
"item"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button
style=
"width: 110px"
class=
"btn-A"
@
click=
"handleQuery"
...
...
@@ -160,12 +168,8 @@
clearable
style=
"width: 200px"
>
<el-option
v-for=
"dict in parts_source"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
<el-option
label=
"同步"
:value=
"0"
/>
<el-option
label=
"手动"
:value=
"1"
/>
</el-select>
</el-form-item>
<el-form-item>
...
...
@@ -185,6 +189,14 @@
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"序号"
align=
"center"
width=
"80"
>
<
template
#
header
>
<div
style=
"display: flex; flex-direction: column; align-items: center"
>
<div>
{{
cn
.
serialNumber
}}
</div>
<div>
{{
en
.
serialNumber
}}
</div>
</div>
</
template
>
<
template
#
default=
"scope"
>
{{
scope
.
$index
+
1
}}
</
template
>
...
...
@@ -193,9 +205,35 @@
prop=
"criticalPartNameCn"
label=
"零件名称"
align=
"center"
/>
<el-table-column
prop=
"certificationBody"
label=
"来源"
align=
"center"
/>
>
<
template
#
header
>
<div
style=
"display: flex; flex-direction: column; align-items: center"
>
<div>
{{
cn
.
partName
}}
</div>
<div>
{{
en
.
partName
}}
</div>
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"certificationBody"
label=
"来源"
align=
"center"
>
<
template
#
header
>
<div
style=
"display: flex; flex-direction: column; align-items: center"
>
<div>
{{
cn
.
source
}}
</div>
<div>
{{
en
.
source
}}
</div>
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
>
<
template
#
header
>
<div
style=
"display: flex; flex-direction: column; align-items: center"
>
<div>
{{
cn
.
operation
}}
</div>
<div>
{{
en
.
operation
}}
</div>
</div>
</
template
>
<
template
#
default=
"scope"
>
<!-- 手动来源:显示可点击按钮 -->
<el-button
...
...
@@ -311,12 +349,8 @@
clearable
style=
"width: 200px"
>
<el-option
v-for=
"dict in parts_source"
:key=
"dict.value"
:label=
"dict.value"
:value=
"dict.value"
/>
<el-option
label=
"同步"
:value=
"0"
/>
<el-option
label=
"手动"
:value=
"1"
/>
</el-select>
</el-form-item>
<el-form-item>
...
...
@@ -445,7 +479,7 @@ import {
partDetails
,
addBatchRelation
,
selectCanRelateLaw
,
updateRelation
,
domesticParts
,
delRelation
,
}
from
'@/api/RelationManagement/baseLawPartRelation'
...
...
@@ -480,6 +514,25 @@ const currentStandardNo = ref('')
const
currentPartName
=
ref
(
''
)
// 存储当前操作的零件名称
const
selectedLaws
=
ref
([])
// 存储选中的法规数据
const
getRowKey
=
(
row
)
=>
row
.
id
// 假设每行有唯一id字段
const
partOptions
=
ref
([])
const
partLoading
=
ref
(
false
)
// 获取零件名称选项
const
getPartOptions
=
async
()
=>
{
try
{
partLoading
.
value
=
true
const
res
=
await
domesticParts
({})
// 根据接口要求传递参数
if
(
res
.
code
===
200
)
{
// 提取criticalPartNameCn并去重
partOptions
.
value
=
[
...
new
Set
(
res
.
data
.
map
((
item
)
=>
item
.
criticalPartNameCn
)),
]
}
}
catch
(
error
)
{
console
.
error
(
'获取零件列表失败:'
,
error
)
}
finally
{
partLoading
.
value
=
false
}
}
const
paginationStates
=
reactive
({
// 主表格分页
mainTable
:
{
...
...
@@ -607,6 +660,10 @@ function reset() {
delFlag
:
null
,
partId
:
null
,
standardNumber
:
null
,
standardName
:
null
,
standardNo
:
null
,
criticalPartNameCn
:
null
,
partName
:
null
,
}
proxy
.
resetForm
(
'partRef'
)
}
...
...
@@ -624,7 +681,7 @@ function handleQuery1() {
getSelectNoRelateLawPart
()
}
function
resetQuery1
()
{
proxy
.
resetForm
(
'
query
Ref'
)
proxy
.
resetForm
(
'
part
Ref'
)
handleQuery1
()
}
function
handleQuery2
()
{
...
...
@@ -632,12 +689,12 @@ function handleQuery2() {
getPartDetail
()
}
function
resetQuery2
()
{
proxy
.
resetForm
(
'
query
Ref'
)
proxy
.
resetForm
(
'
part
Ref'
)
handleQuery2
()
}
/** 重置按钮操作 */
function
resetQuery
()
{
proxy
.
resetForm
(
'
query
Ref'
)
proxy
.
resetForm
(
'
part
Ref'
)
handleQuery
()
}
// 多选框选中数据
...
...
@@ -826,4 +883,5 @@ function handleExport() {
getList
()
getSelectNoRelatePart
()
getPartOptions
()
</
script
>
src/views/controlPlan/relationshipManagement/internationalRegulationPart/index.vue
View file @
3eda7149
...
...
@@ -2,7 +2,7 @@
<div
class=
"app-container"
>
<el-form
v-show=
"showSearch"
ref=
"
query
Ref"
ref=
"
middle
Ref"
:model=
"queryParams"
:inline=
"true"
>
...
...
@@ -32,16 +32,24 @@
:label=
"`$
{cn.partName}/${en.partName}`"
prop="standardNumberId"
>
<el-
inpu
t
v-model=
"queryParams.
standardNumberId
"
<el-
selec
t
v-model=
"queryParams.
partName
"
:placeholder=
"`$
{cn.pleaseChoose}/${en.pleaseChoose}`"
clearable
@keyup.enter="handleQuery"
/>
filterable
style="width: 200px"
>
<el-option
v-for=
"(item, index) in partOptions"
:key=
"index"
:label=
"item"
:value=
"item"
/>
</el-select>
</el-form-item>
<el-form-item
:label=
"`$
{cn.applicableMarket}/${en.applicableMarket}`"
prop="
standardNumberId
"
prop="
applicableMarket
"
>
<el-input
v-model=
"queryParams.applicableMarket"
...
...
@@ -167,14 +175,12 @@
<!-- 维护类型描述抽屉 -->
<el-drawer
v-model=
"open"
:title=
"title"
width=
"800px"
append-to-body
>
<el-form
ref=
"middleRef"
:model=
"queryParams"
:rules=
"rules"
label-width=
"80px"
>
<el-form
ref=
"middleRef"
:model=
"queryParams"
:rules=
"rules"
>
<el-row>
<el-form-item
label=
"项目"
prop=
"typeDescription"
>
<el-form-item
:label=
"`${cn.project}/${en.project}`"
prop=
"typeDescription"
>
<el-input
v-model=
"queryParams.typeDescription"
placeholder=
"请输入"
...
...
@@ -343,12 +349,16 @@
</el-dialog>
<!-- 查看对应零件 -->
<el-drawer
v-model=
"open2"
:title=
"title"
append-to-body
>
<el-form
ref=
"middleRef"
:model=
"queryParams"
label-width=
"70px"
>
<el-form
ref=
"middleRef"
:model=
"queryParams"
>
<el-row>
<el-form-item
label=
"零件名称"
prop=
"criticalPartNameCn"
>
<el-form-item
:label=
"`${cn.partName}/${en.partName}`"
prop=
"criticalPartNameCn"
>
<el-input
v-model=
"queryParams.criticalPartNameCn"
placeholder=
"请输入"
:placeholder=
"`${cn.pleaseEnter}/${en.pleaseEnter}`"
clearable
/>
</el-form-item>
<el-form-item>
...
...
@@ -426,6 +436,7 @@ import {
addMiddle
,
updateMiddle
,
delMiddle
,
InternationalParts
,
}
from
'@/api/RelationManagement/baseLawPartCertificateMiddle'
const
{
proxy
}
=
getCurrentInstance
()
const
{
type_description
,
responsible_department
}
=
proxy
.
useDict
(
...
...
@@ -454,6 +465,7 @@ const currentStandardName = ref('')
const
currentStandardNo
=
ref
(
''
)
// 在父组件中定义当前行数据
const
currentRow
=
ref
({})
const
partOptions
=
ref
([])
// 修改后的数据部分
const
drawerData
=
ref
({
open
:
false
,
...
...
@@ -475,6 +487,7 @@ const data = reactive({
standardNumberId
:
null
,
typeDescription
:
null
,
secondaryTypeDescription
:
null
,
criticalPartNameCn
:
null
,
department
:
null
,
sort
:
null
,
},
...
...
@@ -494,6 +507,17 @@ const data = reactive({
})
const
{
queryParams
,
form
,
rules
}
=
toRefs
(
data
)
// 获取下拉数据方法
const
getPartOptions
=
async
()
=>
{
try
{
const
res
=
await
InternationalParts
()
if
(
res
.
code
===
200
)
{
partOptions
.
value
=
res
.
data
// 直接使用接口返回的数组
}
}
catch
(
error
)
{
console
.
error
(
'获取零件选项失败:'
,
error
)
}
}
function
getList
()
{
loading
.
value
=
true
listInternationalRelation
(
queryParams
.
value
).
then
((
response
)
=>
{
...
...
@@ -521,7 +545,11 @@ function reset() {
delFlag
:
null
,
partId
:
null
,
standardNumberId
:
null
,
standardName
:
null
,
partName
:
null
,
typeDescription
:
null
,
applicableMarket
:
null
,
criticalPartNameCn
:
null
,
}
proxy
.
resetForm
(
'middleRef'
)
}
...
...
@@ -529,6 +557,7 @@ function reset() {
/*查看零件详情抽屉*/
function
showPartDialog
(
row
)
{
currentStandardName
.
value
=
row
.
standardName
// 保存当前行的 standardName
currentStandardNo
.
value
=
row
.
standardNumber
open2
.
value
=
true
// 打开对话框
this
.
title
=
`查看对应零件(
${
row
.
standardNumber
}
,共
${
row
.
partCount
}
个零件)`
// 设置对话框标题
getPartDetail
(
row
)
...
...
@@ -536,8 +565,6 @@ function showPartDialog(row) {
function
getPartDetail
(
row
)
{
// 2. 发起请求
loading
.
value
=
true
console
.
log
(
'row'
,
row
)
currentStandardNo
.
value
=
row
.
standardNumber
partDetails
({
...
queryParams
.
value
,
standardNo
:
currentStandardNo
.
value
,
...
...
@@ -567,10 +594,11 @@ function resetQuery() {
}
function
handleQuery1
()
{
queryParams
.
value
.
pageNum
=
1
getPartDetail
({
/*
getPartDetail({
criticalPartNameCn: queryParams.value.criticalPartNameCn,
standardNo: currentStandardNo.value, // 确保此处已赋值
})
})*/
getPartDetail
()
}
/** 重置按钮操作 */
...
...
@@ -756,4 +784,5 @@ function colseDialogOpen1() {
open1.value = false
}
getList()
getPartOptions()
</
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